@ranger-testing/ranger-cli 2.5.4-alpha.a70fc60-4 → 2.5.4-alpha.b2ba935-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/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 -0
- 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 +35 -5
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +46 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x34a44b,_0x2b753d){const _0x1f16aa=_0x4bc0,_0x31154b=_0x34a44b();while(!![]){try{const _0x5dc6ce=-parseInt(_0x1f16aa(0xe2))/0x1+-parseInt(_0x1f16aa(0xf0))/0x2*(parseInt(_0x1f16aa(0xd7))/0x3)+parseInt(_0x1f16aa(0xf1))/0x4+-parseInt(_0x1f16aa(0xf3))/0x5+-parseInt(_0x1f16aa(0xf2))/0x6+-parseInt(_0x1f16aa(0xd5))/0x7+parseInt(_0x1f16aa(0xf5))/0x8;if(_0x5dc6ce===_0x2b753d)break;else _0x31154b['push'](_0x31154b['shift']());}catch(_0x478638){_0x31154b['push'](_0x31154b['shift']());}}}(_0x1866,0xdd53a));import{join}from'path';import{existsSync}from'fs';import _0x332c7d from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x1866(){const _0x210e05=['log','already\x20enabled','output','list','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','user','NUuuq','trailhead','1015766lxjZEc','1963372VKgcJi','1939602sBcGUn','4447310tpxwuU','error','34045952Gabgwd','pTBXW','❌\x20Failed\x20to\x20add\x20marketplace:','XWSlx','--scope','wantsSkillup','❌\x20Failed\x20to\x20install\x20plugin:','aPgOX','prompt','pluginScope','uhIgI','xTvmz','Wyfbs','.claude','enable','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','⚠\x20Failed\x20to\x20enable\x20plugin:','success','6435310qYyiuM','cDSVZ','9GJVPcK','\x20level)...\x0a','✓\x20Ranger\x20skills\x20already\x20installed','JYmBa','cyiGB','Where\x20should\x20the\x20plugin\x20be\x20installed?','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','project','vnocy','YgKtw','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','184325izvFku','confirm','RLntP','QfPSY','install','includes'];_0x1866=function(){return _0x210e05;};return _0x1866();}function _0x4bc0(_0x468f77,_0xa3b268){_0x468f77=_0x468f77-0xd3;const _0x1866c2=_0x1866();let _0x4bc035=_0x1866c2[_0x468f77];return _0x4bc035;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4f5489){const _0x186126=_0x4bc0,_0x54de4f={'dJSsb':'ranger@trailhead','cCcRP':_0x186126(0x104),'vnocy':function(_0x4dac92,_0x484a72,_0x576cba){return _0x4dac92(_0x484a72,_0x576cba);},'Wyfbs':function(_0x38ce8e){return _0x38ce8e();},'pVwxV':'pluginScope','mCjKx':'project','XWSlx':function(_0x258632,_0x4205f4){return _0x258632(_0x4205f4);},'IvkKy':_0x186126(0xef),'fTZuK':'✓\x20Marketplace\x20already\x20added','AUSFl':function(_0x40ecc4,_0x24527d){return _0x40ecc4(_0x24527d);},'YgKtw':'plugin','YUNCn':'marketplace','aPgOX':'ranger-testing/trailhead','cyiGB':_0x186126(0xf7),'JYmBa':_0x186126(0xf9),'mRYUM':function(_0x52040a,_0xede377){return _0x52040a===_0xede377;},'pTBXW':_0x186126(0xfb),'AvHXJ':_0x186126(0x103),'hwwFr':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0xb9c58a=await isPluginInstalled(_0x54de4f['dJSsb']);if(_0xb9c58a)return console['log'](_0x54de4f['cCcRP']),![];const _0x137a3c=existsSync(_0x54de4f['vnocy'](join,_0x54de4f[_0x186126(0x101)](getProjectRoot),_0x186126(0x102)));let _0x8e46c1;if(_0x4f5489)_0x8e46c1=_0x4f5489;else{if(_0x137a3c)_0x8e46c1='project';else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x2ad04d=await _0x332c7d[_0x186126(0xfd)]([{'type':_0x186126(0xeb),'name':_0x54de4f['pVwxV'],'message':_0x186126(0xdc),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x54de4f['mCjKx']}],'default':_0x186126(0xed)}]);_0x8e46c1=_0x2ad04d[_0x186126(0xfe)];}}console[_0x186126(0xe8)](_0x186126(0xdd)+_0x8e46c1+_0x186126(0xd8));const _0x5ad4f5=await _0x54de4f[_0x186126(0xf8)](isMarketplaceAdded,_0x54de4f['IvkKy']);let _0x41dcc5=_0x5ad4f5;if(_0x5ad4f5)console[_0x186126(0xe8)](_0x54de4f['fTZuK']);else{const _0x25de54=await _0x54de4f['AUSFl'](runClaudeCommand,[_0x54de4f['YgKtw'],_0x54de4f['YUNCn'],'add',_0x54de4f[_0x186126(0xfc)]]);!_0x25de54['success']?(console[_0x186126(0xf4)](_0x54de4f[_0x186126(0xdb)],_0x25de54['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x186126(0xe8)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log'](_0x186126(0xe1)+_0x8e46c1)):_0x41dcc5=!![];}if(_0x41dcc5){const _0x1bdbc3=await _0x54de4f[_0x186126(0xdf)](runClaudeCommand,[_0x54de4f['YgKtw'],_0x186126(0xe6),'ranger@trailhead',_0x54de4f['JYmBa'],_0x8e46c1],{'cwd':_0x54de4f['mRYUM'](_0x8e46c1,'project')?getProjectRoot():undefined});if(!_0x1bdbc3[_0x186126(0xd4)])console[_0x186126(0xf4)](_0x54de4f[_0x186126(0xf6)],_0x1bdbc3['error']),console[_0x186126(0xe8)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x186126(0xe8)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x8e46c1);else{console[_0x186126(0xe8)](_0x186126(0xec));const _0x5624ab=[_0x54de4f[_0x186126(0xe0)],_0x54de4f['AvHXJ'],_0x54de4f['dJSsb']];_0x8e46c1==='project'&&_0x5624ab['push'](_0x54de4f[_0x186126(0xda)],'project');const _0x3cfe83=await runClaudeCommand(_0x5624ab,{'captureOutput':!![],'cwd':_0x54de4f['mRYUM'](_0x8e46c1,_0x54de4f['mCjKx'])?getProjectRoot():undefined}),_0x5c35b3=_0x3cfe83[_0x186126(0xea)]?.[_0x186126(0xe7)](_0x186126(0xe9));!_0x3cfe83[_0x186126(0xd4)]&&!_0x5c35b3?console[_0x186126(0xf4)](_0x186126(0xd3),_0x3cfe83[_0x186126(0xf4)]):console[_0x186126(0xe8)](_0x54de4f['hwwFr']);}}return!![];}export async function ensureClaudeSkills(_0x598ddf){const _0x5991ec=_0x4bc0,_0x50307f={'NUuuq':function(_0x170c2b,_0x6d081a){return _0x170c2b(_0x6d081a);},'gTYQn':function(_0x180f53,_0x5da341,_0x464bd9,_0x3cfe33){return _0x180f53(_0x5da341,_0x464bd9,_0x3cfe33);},'rgUin':_0x5991ec(0xed),'cDSVZ':'ranger','QPWNi':'SKILL.md','RLntP':function(_0x4c7e5e,_0x540262,_0x463bbe,_0x48eada){return _0x4c7e5e(_0x540262,_0x463bbe,_0x48eada);},'dRHdz':function(_0x307126,_0x7eedb5){return _0x307126(_0x7eedb5);},'xTvmz':_0x5991ec(0xde),'vInZM':_0x5991ec(0x102),'QfPSY':_0x5991ec(0xfa),'uhIgI':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x46d1c9=_0x50307f[_0x5991ec(0xee)](existsSync,_0x50307f['gTYQn'](join,getSkillsDir(_0x50307f['rgUin']),_0x50307f[_0x5991ec(0xd6)],_0x50307f['QPWNi'])),_0x5e3db0=_0x50307f[_0x5991ec(0xee)](existsSync,_0x50307f[_0x5991ec(0xe4)](join,_0x50307f['dRHdz'](getSkillsDir,_0x50307f['xTvmz']),_0x50307f[_0x5991ec(0xd6)],_0x50307f['QPWNi']));if(_0x46d1c9||_0x5e3db0)return console['log'](_0x5991ec(0xd9)),![];const _0x2a35e5=existsSync(join(getProjectRoot(),_0x50307f['vInZM']));let _0xc5d610=!![];if(_0x598ddf)await skillup({'autoInstall':_0x598ddf,'suppressUsage':!![]});else{if(_0x2a35e5)await skillup({'autoInstall':_0x50307f[_0x5991ec(0x100)],'suppressUsage':!![]});else{const _0xf2796f=await _0x332c7d['prompt']([{'type':_0x5991ec(0xe3),'name':_0x50307f[_0x5991ec(0xe5)],'message':_0x50307f[_0x5991ec(0xff)],'default':!![]}]);_0xc5d610=_0xf2796f[_0x5991ec(0xfa)],_0xc5d610&&await _0x50307f[_0x5991ec(0xee)](skillup,{'suppressUsage':!![]});}}return _0xc5d610;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x423e2f,_0x3bf0cc){const _0x397ad4=_0x5ef3,_0x52bf3b=_0x423e2f();while(!![]){try{const _0x306bde=parseInt(_0x397ad4(0x90))/0x1*(-parseInt(_0x397ad4(0xa7))/0x2)+-parseInt(_0x397ad4(0x95))/0x3+-parseInt(_0x397ad4(0x8c))/0x4+-parseInt(_0x397ad4(0x9d))/0x5+parseInt(_0x397ad4(0xa4))/0x6+parseInt(_0x397ad4(0x96))/0x7*(-parseInt(_0x397ad4(0xa3))/0x8)+parseInt(_0x397ad4(0xa5))/0x9*(parseInt(_0x397ad4(0xa0))/0xa);if(_0x306bde===_0x3bf0cc)break;else _0x52bf3b['push'](_0x52bf3b['shift']());}catch(_0x4644a3){_0x52bf3b['push'](_0x52bf3b['shift']());}}}(_0x4808,0x8d8dd));function _0x4808(){const _0x5405bd=['plugin','2gnvRkE','XSrFo','error','pluginScope','mZbly','2255946VwhtbD','4123roKBNj','opencode.json','$schema','stringify','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','log','✓\x20OpenCode\x20plugin\x20already\x20configured','347395VTctOg','isArray','jNvBj','54870BvJvQv','Failed\x20to\x20read\x20opencode.json','fMEUW','2608kbIZzz','2698662iXIjAL','3987nRRUHB','list','887066XtuHQL','bImiV','MmpVP','1600688XoqSTC','includes','\x0a📦\x20OpenCode\x20Plugin\x0a'];_0x4808=function(){return _0x5405bd;};return _0x4808();}import{join}from'path';function _0x5ef3(_0x355d4a,_0x3379ea){_0x355d4a=_0x355d4a-0x8a;const _0x4808e9=_0x4808();let _0x5ef38d=_0x4808e9[_0x355d4a];return _0x5ef38d;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x1898cf from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x3e57b7){const _0x2b55da=_0x5ef3,_0x3c0b29={'mZbly':function(_0xaf22ce,_0x3dd59d){return _0xaf22ce(_0x3dd59d);},'fMEUW':'project','AheGd':_0x2b55da(0x93),'jNvBj':'Where\x20should\x20the\x20plugin\x20be\x20installed?','bImiV':'user','XSrFo':'Project\x20(shared\x20with\x20team\x20via\x20git)','MmpVP':function(_0x306b49,_0x31f353,_0x33b601){return _0x306b49(_0x31f353,_0x33b601);},'cQjAk':'utf-8','TAZed':_0x2b55da(0x9c)},_0x519c01=_0x3c0b29['mZbly'](existsSync,join(_0x3c0b29[_0x2b55da(0x94)](getOpencodeConfigDir,_0x3c0b29[_0x2b55da(0xa2)]),'opencode.json'));let _0x5401fa;if(_0x3e57b7)_0x5401fa=_0x3e57b7;else{if(_0x519c01)_0x5401fa='project';else{console[_0x2b55da(0x9b)](_0x2b55da(0x8e));const _0x27f4b8=await _0x1898cf['prompt']([{'type':_0x2b55da(0xa6),'name':_0x3c0b29['AheGd'],'message':_0x3c0b29[_0x2b55da(0x9f)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x3c0b29[_0x2b55da(0x8a)]},{'name':_0x3c0b29[_0x2b55da(0x91)],'value':'project'}],'default':'user'}]);_0x5401fa=_0x27f4b8[_0x2b55da(0x93)];}}const _0x222e23=join(_0x3c0b29['mZbly'](getOpencodeConfigDir,_0x5401fa),_0x2b55da(0x97)),_0x30af99='@ranger-testing/opencode-plugin',_0x671651='https://opencode.ai/config.json';let _0x5743f5={};if(existsSync(_0x222e23))try{const _0x198056=await _0x3c0b29[_0x2b55da(0x8b)](readFile,_0x222e23,_0x3c0b29['cQjAk']);_0x5743f5=JSON['parse'](_0x198056);}catch(_0x581862){return console[_0x2b55da(0x92)](_0x2b55da(0x9a)),{'configured':![],'scope':_0x5401fa,'error':_0x2b55da(0xa1),'details':_0x581862};}const _0x26fb49=Array[_0x2b55da(0x9e)](_0x5743f5['plugin'])?_0x5743f5[_0x2b55da(0x8f)]:[];if(_0x26fb49[_0x2b55da(0x8d)](_0x30af99))return console[_0x2b55da(0x9b)](_0x3c0b29['TAZed']),{'configured':![],'scope':_0x5401fa};return _0x5743f5['$schema']=_0x5743f5[_0x2b55da(0x98)]||_0x671651,_0x5743f5['plugin']=[..._0x26fb49,_0x30af99],await mkdir(getOpencodeConfigDir(_0x5401fa),{'recursive':!![]}),await writeFile(_0x222e23,JSON[_0x2b55da(0x99)](_0x5743f5,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x5401fa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1835(){var _0x1f6bf5=['\x20\x20https://docs.ranger.net/main/concepts/profiles','TFmNE','Prndx','40fANSGG','1208018eRMJBJ','252786IOZdEN','3313746TPKzoP','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','1LQyamy','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','7541468CYSARp','11685906REVWXa','2689280lDmEHh','8358637rsHrko','85FmIFCh','8dnTWhs'];_0x1835=function(){return _0x1f6bf5;};return _0x1835();}(function(_0x188452,_0x5c126e){var _0x386592=_0x354d,_0x50457b=_0x188452();while(!![]){try{var _0xeabcd1=-parseInt(_0x386592(0x79))/0x1*(parseInt(_0x386592(0x75))/0x2)+-parseInt(_0x386592(0x77))/0x3+parseInt(_0x386592(0x7b))/0x4+parseInt(_0x386592(0x6f))/0x5*(-parseInt(_0x386592(0x76))/0x6)+parseInt(_0x386592(0x6e))/0x7+-parseInt(_0x386592(0x70))/0x8*(-parseInt(_0x386592(0x6c))/0x9)+-parseInt(_0x386592(0x74))/0xa*(parseInt(_0x386592(0x6d))/0xb);if(_0xeabcd1===_0x5c126e)break;else _0x50457b['push'](_0x50457b['shift']());}catch(_0x45e7a9){_0x50457b['push'](_0x50457b['shift']());}}}(_0x1835,0xee132));function _0x354d(_0x5c9c80,_0x39e50f){_0x5c9c80=_0x5c9c80-0x6c;var _0x18351d=_0x1835();var _0x354d58=_0x18351d[_0x5c9c80];return _0x354d58;}export async function setupCi(_0x56b2b8,_0x1e8313,_0x2fc58a){var _0x540627=_0x354d,_0x5403c6={'TFmNE':function(_0x37e5c4,_0x27185d){return _0x37e5c4+_0x27185d;},'wGXhK':_0x540627(0x7a),'Prndx':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','QQsoL':_0x540627(0x71)};console['error'](_0x5403c6['TFmNE'](_0x5403c6[_0x540627(0x72)](_0x5403c6['TFmNE'](_0x5403c6['wGXhK']+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x5403c6[_0x540627(0x73)]),'\x0a'),_0x540627(0x78))+_0x5403c6['QQsoL']),process['exit'](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x38b4(){const _0x5e558c=['\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','project-level','/.claude/skills/','2vtMoib','4pNpEov','isTTY','1218136jGuyxg','tqBsa','14945DiRfRl','/skills/','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','Oasna','\x20skill','750VEfAYf','\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!','paUBG','1052856klVDTM','ranger','All\x20projects\x20(','uHeOM','project','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','prompt','SJMye','9xCISWC','warn','list','opencode','✓\x20Found\x20API\x20token','273270TPMBQz','installLevel','\x20\x202.\x20Run:\x20ranger\x20setup','\x0a📦\x20Installing\x20skills...\x0a','user','HhQeI','321580MOrpLn','3079296GvqtRS','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','IwuEE','message','HJEJn','platform','log','653155gkffRf','GwIZx','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20--opencode','OFYMd'];_0x38b4=function(){return _0x5e558c;};return _0x38b4();}(function(_0x139b51,_0x1f1108){const _0x2bb80f=_0x40b9,_0x21afbf=_0x139b51();while(!![]){try{const _0x2ef752=-parseInt(_0x2bb80f(0xbd))/0x1+parseInt(_0x2bb80f(0x9d))/0x2*(parseInt(_0x2bb80f(0xaa))/0x3)+parseInt(_0x2bb80f(0x9e))/0x4*(-parseInt(_0x2bb80f(0xc5))/0x5)+-parseInt(_0x2bb80f(0xa7))/0x6*(-parseInt(_0x2bb80f(0xa2))/0x7)+-parseInt(_0x2bb80f(0xa0))/0x8+-parseInt(_0x2bb80f(0xb2))/0x9*(parseInt(_0x2bb80f(0xb7))/0xa)+parseInt(_0x2bb80f(0xbe))/0xb;if(_0x2ef752===_0x1f1108)break;else _0x21afbf['push'](_0x21afbf['shift']());}catch(_0x2a34a4){_0x21afbf['push'](_0x21afbf['shift']());}}}(_0x38b4,0x40ee6));import{basename}from'path';import _0x9fe2a1 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x40b9(_0x5ca3bf,_0x1cf874){_0x5ca3bf=_0x5ca3bf-0x99;const _0x38b4c9=_0x38b4();let _0x40b9f8=_0x38b4c9[_0x5ca3bf];return _0x40b9f8;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0xed6e29={}){const _0x536a8c=_0x40b9,_0x1856ed={'tqBsa':_0x536a8c(0xa4),'JLZAw':'5|2|0|4|3|1','OFYMd':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','IwuEE':function(_0x44948b,_0x3f6327){return _0x44948b===_0x3f6327;},'XItcV':_0x536a8c(0xb5),'paUBG':_0x536a8c(0xc8),'eVFMI':function(_0x287691,_0xe584bb){return _0x287691===_0xe584bb;},'uHeOM':_0x536a8c(0xbf),'hFYgB':_0x536a8c(0xb6),'Vklwm':'Where\x20should\x20skills\x20be\x20installed?','XeOeM':_0x536a8c(0xae),'HJEJn':function(_0x4ea0f8,_0x10a5a1,_0x1a53ea){return _0x4ea0f8(_0x10a5a1,_0x1a53ea);},'Oasna':_0x536a8c(0xab),'SJMye':function(_0x236eb5,_0x1963f9){return _0x236eb5 instanceof _0x1963f9;},'cwEGQ':function(_0x5c4636,_0x53e6f0){return _0x5c4636===_0x53e6f0;},'RhfOu':'user-level','HhQeI':'To\x20use:','GwIZx':_0x536a8c(0xc7)};console['log'](_0x1856ed[_0x536a8c(0xa1)]);const _0xdadc81=_0xed6e29[_0x536a8c(0xc3)]??'claude',_0xe0fc65=await getToken();if(!_0xe0fc65){const _0x441dd6=_0x1856ed['JLZAw']['split']('|');let _0x283331=0x0;while(!![]){switch(_0x441dd6[_0x283331++]){case'0':console[_0x536a8c(0xc4)](_0x1856ed[_0x536a8c(0x99)]);continue;case'1':return;case'2':console['log']('To\x20get\x20started:');continue;case'3':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x1856ed[_0x536a8c(0xc0)](_0xdadc81,_0x1856ed['XItcV'])?_0x1856ed['paUBG']:'')+'\x0a');continue;case'4':console['log'](_0x536a8c(0xb9)+(_0x1856ed['eVFMI'](_0xdadc81,'opencode')?_0x1856ed[_0x536a8c(0xa9)]:'')+'\x20<your-api-token>');continue;case'5':console[_0x536a8c(0xc4)](_0x1856ed[_0x536a8c(0xad)]);continue;}break;}}console[_0x536a8c(0xc4)](_0x1856ed['hFYgB']);const _0x3a5c94=getProjectRoot(),_0x3a7309=basename(_0x3a5c94),_0x2f1bfb=_0xdadc81===_0x536a8c(0xb5)?getOpencodeConfigDir('user')+_0x536a8c(0xa3):getClaudeConfigDir()+'/skills/',_0x1b60c7=_0x1856ed['eVFMI'](_0xdadc81,_0x1856ed['XItcV'])?_0x3a5c94+'/.opencode/skills/':_0x3a5c94+_0x536a8c(0x9c),_0x4a1b60=process['stdin'][_0x536a8c(0x9f)]&&process['stdout']['isTTY'];let _0x52bb51;if(_0xed6e29['autoInstall'])_0x52bb51=_0xed6e29['autoInstall'];else{if(_0x4a1b60){const _0x2cf6a9=await _0x9fe2a1[_0x536a8c(0xb0)]([{'type':_0x536a8c(0xb4),'name':_0x536a8c(0xb8),'message':_0x1856ed['Vklwm'],'choices':[{'name':_0x536a8c(0xac)+_0x2f1bfb+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x1b60c7+')','value':_0x1856ed['XeOeM']}]}]);_0x52bb51=_0x2cf6a9[_0x536a8c(0xb8)];}else _0x52bb51=_0x536a8c(0xae),console['log'](_0x536a8c(0xaf)+_0x1b60c7+')');}let _0x518061=0x0;const _0x48cf2f=getCurrentVersion();console[_0x536a8c(0xc4)](_0x536a8c(0xba));try{const _0x156286=await _0x1856ed[_0x536a8c(0xc2)](installSkill,_0x1856ed[_0x536a8c(0xa5)],{'cliVersion':_0x48cf2f,'level':_0x52bb51,'platform':_0xdadc81});_0x156286&&_0x518061++;}catch(_0xa00797){console[_0x536a8c(0xb3)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x1856ed[_0x536a8c(0xb1)](_0xa00797,Error)?_0xa00797[_0x536a8c(0xc1)]:_0xa00797);}if(_0x518061>0x0){const _0x206921=_0x1856ed['cwEGQ'](_0x52bb51,_0x536a8c(0xbb))?_0x1856ed['RhfOu']:_0x536a8c(0x9b);console['log']('\x0a✅\x20Installed\x20'+_0x518061+'\x20'+_0x206921+_0x536a8c(0xa6)+(_0x518061>0x1?'s':'')+'\x20successfully!\x0a'),!_0xed6e29['suppressUsage']&&(console['log'](_0x1856ed[_0x536a8c(0xbc)]),_0x1856ed['IwuEE'](_0xdadc81,_0x536a8c(0xb5))?console['log'](_0x1856ed[_0x536a8c(0xc6)]):console[_0x536a8c(0xc4)](_0x536a8c(0xa8)));}else console['log'](_0x536a8c(0x9a));}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xc5da9b=_0x348d;(function(_0x4d5613,_0x317877){const _0x334d65=_0x348d,_0x10495f=_0x4d5613();while(!![]){try{const _0xc9d0c3=parseInt(_0x334d65(0x1db))/0x1*(-parseInt(_0x334d65(0x190))/0x2)+-parseInt(_0x334d65(0x1b2))/0x3+-parseInt(_0x334d65(0x1a9))/0x4*(parseInt(_0x334d65(0x18c))/0x5)+-parseInt(_0x334d65(0x1d1))/0x6+-parseInt(_0x334d65(0x1cd))/0x7*(parseInt(_0x334d65(0x18a))/0x8)+-parseInt(_0x334d65(0x1a3))/0x9+-parseInt(_0x334d65(0x1ef))/0xa*(-parseInt(_0x334d65(0x1fc))/0xb);if(_0xc9d0c3===_0x317877)break;else _0x10495f['push'](_0x10495f['shift']());}catch(_0x2d8d7e){_0x10495f['push'](_0x10495f['shift']());}}}(_0x5756,0xc9035));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x48c491 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';function _0x5756(){const _0x59336d=['--with-deps','withDeps','trackPhaseError','2JXCDSG','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','skipAuth','Validating\x20API\x20token...','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','plugin','url','playwright@','prompt','tNXow','Authentication\x20failed:\x20','/ranger:enable','pfdkl','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','log','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','YQEiE','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','14791932Pqcoog','RgeAD','KqxqR','success','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','213572HfqjJJ','FSeMe','auth','MxgHF','skipped','fpfJz','NyGUD','wantsProfile','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','4840605DeHpkf','git_check','user','provided_token','inherit','jLnhm','VzjHc','chromium','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','fSRef','allowInsecureLocalhost','install','scope','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','organizationName','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','NukDd','RMZKz','local','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','bYNOt','The\x20required\x20version\x20(','error','OVLTV','force','HDkMQ','4563965arPIzO','rFLYA','rewHC','zuLjS','3626658AodRFL','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','\x20(fallback\x20version)','fnZTg','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','1.58.2','rmSEY','HUzDi','lfmAw','926119qSDFic','\x1b[1m','isTTY','trackPhaseStart','✓\x20Created\x20.ranger/\x20directory','cKvaF','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x0a🚀\x20Ranger\x20Setup\x0a','TtMLF','stdout','ranger\x20profile\x20add\x20local','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','\x0aIn\x20Claude\x20Code,\x20run\x20','opencode','No\x20git\x20repository\x20found','existing_token','or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','stdin','10cugypG','uPKjS','HQBvU','✓\x20Exported\x20credentials\x20for\x20CI','message','oCdec','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','trackPhaseEnd','confirm','profile','skills','ranger','ticZY','82525377FAAwbv','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','ADOCE','FPgul','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','\x0a❌\x20Profile\x20setup\x20failed:','\x20and\x20prompt\x20the\x20coding','use\x20until\x20the\x20session\x20expires.\x0a','16RXJqlj','heGoC','55CXpDzz'];_0x5756=function(){return _0x59336d;};return _0x5756();}import{getRangerDir,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=_0xc5da9b(0x1d7);const bold=_0x4e022b=>_0xc5da9b(0x1dc)+_0x4e022b+'\x1b[0m';export function getPlaywrightVersion(){const _0x449662={'Dfayk':function(_0x364042,_0x3cab0d){return _0x364042(_0x3cab0d);}};try{const _0xf9513b=require['resolve']('playwright/package.json'),_0x5a20ce=_0x449662['Dfayk'](require,_0xf9513b);return _0x5a20ce['version'];}catch{return null;}}export function installChromiumBinary(_0x480907,_0x31cda7=![]){const _0x301238=_0xc5da9b,_0x4c26e7={'heGoC':function(_0x8bdd27){return _0x8bdd27();},'ticZY':function(_0x433e01,_0x3b2ee5){return _0x433e01(_0x3b2ee5);},'RCcTP':_0x301238(0x18d),'eTvgm':_0x301238(0x1b9),'cKvaF':'npx','cuxsP':function(_0x1589a7,_0x26f964){return _0x1589a7===_0x26f964;},'mJdyw':'win32','VzjHc':_0x301238(0x1c9)};return new Promise((_0x17e7ad,_0x47c58d)=>{const _0x40ebca=_0x301238,_0x3ce4fa={'fRZZV':function(_0x2c02dc,_0x37c063){return _0x2c02dc===_0x37c063;},'rFLYA':function(_0xb2f4f0){const _0x2e83b7=_0x348d;return _0x4c26e7[_0x2e83b7(0x18b)](_0xb2f4f0);},'zuLjS':function(_0x377523,_0x3a865f){const _0xa4b5ee=_0x348d;return _0x4c26e7[_0xa4b5ee(0x1fb)](_0x377523,_0x3a865f);}},_0x52624b=[_0x40ebca(0x197)+_0x480907,_0x40ebca(0x1be),..._0x31cda7?[_0x4c26e7['RCcTP']]:[],_0x4c26e7['eTvgm']],_0x1e0539=spawn(_0x4c26e7[_0x40ebca(0x1e0)],_0x52624b,{'stdio':['ignore','inherit',_0x40ebca(0x1b6)],'shell':_0x4c26e7['cuxsP'](process['platform'],_0x4c26e7['mJdyw'])});_0x1e0539['on']('close',_0x2e4b7e=>{const _0x32cc65=_0x40ebca;_0x3ce4fa['fRZZV'](_0x2e4b7e,0x0)?_0x3ce4fa[_0x32cc65(0x1ce)](_0x17e7ad):_0x3ce4fa[_0x32cc65(0x1d0)](_0x47c58d,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x2e4b7e));}),_0x1e0539['on'](_0x4c26e7[_0x40ebca(0x1b8)],_0x23a2fe=>{_0x47c58d(_0x23a2fe);});});}export async function authenticate(_0x48737f){const _0x32c0ca=_0xc5da9b,_0x34566d={'ADgoW':_0x32c0ca(0x1ec),'HUzDi':function(_0x14f8b2){return _0x14f8b2();},'nbkyN':'device_auth','MxgHF':'✓\x20Stored\x20credentials\x20locally'};if(!_0x48737f){const _0x266e08=await getToken();if(_0x266e08){const _0x5d4e2d=await getCurrentUser(_0x266e08);if(_0x5d4e2d['success'])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x5d4e2d[_0x32c0ca(0x1b4)][_0x32c0ca(0x1c1)]),{'token':_0x266e08,'method':_0x34566d['ADgoW']};}try{_0x48737f=await _0x34566d[_0x32c0ca(0x1d9)](runDeviceAuthFlow);}catch(_0x163513){throw new Error(_0x32c0ca(0x19a)+(_0x163513 instanceof Error?_0x163513[_0x32c0ca(0x1f3)]:_0x163513));}const _0x1e31ff=await getCurrentUser(_0x48737f);if(!_0x1e31ff[_0x32c0ca(0x1a6)])throw new Error(_0x32c0ca(0x1e8)+_0x1e31ff[_0x32c0ca(0x1c9)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x1e31ff['user']['organizationName']),{'token':_0x48737f,'method':_0x34566d['nbkyN']};}console[_0x32c0ca(0x19e)](_0x32c0ca(0x193));const _0x4e1ea6=await getCurrentUser(_0x48737f);if(!_0x4e1ea6[_0x32c0ca(0x1a6)]){if(_0x4e1ea6['status'])throw new Error('Authentication\x20failed:\x20'+_0x4e1ea6[_0x32c0ca(0x1c9)]+_0x32c0ca(0x1a1));else throw new Error(_0x32c0ca(0x1d6)+_0x4e1ea6['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x32c0ca(0x19e)]('✓\x20Authenticated\x20to\x20'+_0x4e1ea6['user']['organizationName']),await storeToken(_0x48737f),console[_0x32c0ca(0x19e)](process['env']['GITHUB_ENV']?_0x32c0ca(0x1f2):_0x34566d[_0x32c0ca(0x1ac)]),{'token':_0x48737f,'method':_0x32c0ca(0x1b5)};}export async function ensureRangerDir(_0x72482f){const _0x4257f5=_0xc5da9b,_0x7e1e9c={'kYvLW':_0x4257f5(0x1b4),'mswSS':function(_0x404c20){return _0x404c20();},'cshdB':function(_0xfef1a8,_0x4f349b,_0x1dc2ee){return _0xfef1a8(_0x4f349b,_0x1dc2ee);},'lcmne':'.ranger','fpfJz':function(_0x542ccf){return _0x542ccf();},'UxPob':function(_0x3960db,_0x58bdef){return _0x3960db(_0x58bdef);},'waVto':function(_0x49618b,_0x46c5a2,_0x5e97b0){return _0x49618b(_0x46c5a2,_0x5e97b0);}};let _0x4c6358;if(_0x72482f===_0x7e1e9c['kYvLW'])_0x4c6358=getRangerHomeDir();else{const _0x16babd=_0x7e1e9c['mswSS'](findGitRoot);_0x4c6358=_0x16babd?_0x7e1e9c['cshdB'](join,_0x16babd,_0x7e1e9c['lcmne']):_0x7e1e9c[_0x4257f5(0x1ae)](getRangerDir);}return!_0x7e1e9c['UxPob'](existsSync,_0x4c6358)?(await _0x7e1e9c['waVto'](mkdir,_0x4c6358,{'recursive':!![]}),console['log'](_0x4257f5(0x1df)),{'path':_0x4c6358,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x4c6358,'installed':![]});}export async function ensureChromium(_0x5679bf=![]){const _0x531ac1=_0xc5da9b,_0x51cce5={'Knqej':function(_0xb7be3a,_0x1cd418){return _0xb7be3a(_0x1cd418);},'pjkvF':_0x531ac1(0x1d4),'HDkMQ':function(_0x3ea635,_0x37b01a,_0x21eafd){return _0x3ea635(_0x37b01a,_0x21eafd);},'TVJno':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','SnABa':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','OVLTV':function(_0x217745,_0x5486f4){return _0x217745 instanceof _0x5486f4;},'FSeMe':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','szcjI':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x1323ce=![];try{const _0x28f0dc=chromium['executablePath']();_0x1323ce=_0x51cce5['Knqej'](existsSync,_0x28f0dc);}catch{_0x1323ce=![];}if(_0x1323ce)return console[_0x531ac1(0x19e)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0xc1c535=getPlaywrightVersion(),_0x3532c0=_0xc1c535??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x3ecb32=!_0xc1c535,_0x545213=process['stdin'][_0x531ac1(0x1dd)]&&process[_0x531ac1(0x1e4)][_0x531ac1(0x1dd)];let _0x21682f=!![];if(_0x545213){const {install:_0xf83906}=await _0x48c491['prompt']([{'type':'confirm','name':'install','message':_0x3ecb32?_0x531ac1(0x191)+_0x3532c0+'\x20now?':_0x531ac1(0x1c8)+_0x3532c0+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x21682f=_0xf83906;}else console['log'](_0x531ac1(0x1e6)+_0x3532c0+(_0x3ecb32?_0x51cce5['pjkvF']:'')+'...');if(_0x21682f){console[_0x531ac1(0x19e)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x51cce5[_0x531ac1(0x1cc)](installChromiumBinary,_0x3532c0,_0x5679bf),console['log'](_0x51cce5['TVJno']);}catch(_0x1c93ba){console['error'](_0x51cce5['SnABa'],_0x51cce5[_0x531ac1(0x1ca)](_0x1c93ba,Error)?_0x1c93ba['message']:_0x1c93ba),console[_0x531ac1(0x19e)](_0x51cce5[_0x531ac1(0x1aa)]),console['log']('\x20\x20npx\x20playwright@'+_0x3532c0+'\x20install\x20chromium');}}else console['log'](_0x51cce5['szcjI']),console[_0x531ac1(0x19e)](_0x531ac1(0x1bb)),console['log']('\x20\x20npx\x20playwright@'+_0x3532c0+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0xb1b317){const _0xf70164=_0xc5da9b,_0x1bb47b={'KqxqR':function(_0x9425e8,_0x50bc08,_0x275e31){return _0x9425e8(_0x50bc08,_0x275e31);},'NyGUD':'✓\x20Created\x20.ranger/.gitignore'},_0x31a3e1=_0x1bb47b[_0xf70164(0x1a5)](join,_0xb1b317,'.gitignore'),_0x224a3f='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x31a3e1,_0x224a3f),console['log'](_0x1bb47b[_0xf70164(0x1af)]);}function printProfileSetupLaterInstructions(){const _0x42b7fd=_0xc5da9b,_0x305627={'uCcEI':_0x42b7fd(0x1e5)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+bold(_0x305627['uCcEI'])),console['log'](_0x42b7fd(0x1b1));}export async function ensureLocalEnv(_0x5b787f,_0x286ea0){const _0x21102b=_0xc5da9b,_0xc2b040={'nWETn':function(_0x3493ba){return _0x3493ba();},'YQEiE':_0x21102b(0x1a2),'tNXow':function(_0x234acf,_0xcc429c){return _0x234acf===_0xcc429c;},'ZfGTF':function(_0x44efca,_0x4b7ae5,_0x9fc83b){return _0x44efca(_0x4b7ae5,_0x9fc83b);},'jLnhm':_0x21102b(0x1c6),'rewHC':_0x21102b(0x194),'tSaqz':_0x21102b(0x189),'QfBoy':_0x21102b(0x1f7),'uPKjS':_0x21102b(0x186),'ZHmxw':function(_0x595470){return _0x595470();}};if(!_0xc2b040['nWETn'](findGitRoot))return console['log'](_0xc2b040[_0x21102b(0x1a0)]),{'ready':![],'skipped':!![]};const _0xd8e2a1=_0xc2b040[_0x21102b(0x199)](_0x5b787f?.[_0x21102b(0x1bf)],_0x21102b(0x1b4))?getRangerHomeDir():undefined;if(_0xc2b040['ZfGTF'](findExistingEnv,_0x21102b(0x1c5),{'locations':[_0x21102b(0x1c5)],'rangerDir':_0xd8e2a1}))return console['log']('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x5c08f0=process[_0x21102b(0x1ee)][_0x21102b(0x1dd)]&&process['stdout'][_0x21102b(0x1dd)];if(_0x5c08f0&&!_0x5b787f?.['url']){console[_0x21102b(0x19e)](_0xc2b040[_0x21102b(0x1b7)]),console[_0x21102b(0x19e)](_0x21102b(0x19d)),console[_0x21102b(0x19e)](_0xc2b040[_0x21102b(0x1cf)]),console['log'](_0xc2b040['tSaqz']),console['log'](_0x21102b(0x1d2));const {wantsProfile:_0x489518}=await _0x48c491[_0x21102b(0x198)]([{'type':_0xc2b040['QfBoy'],'name':_0x21102b(0x1b0),'message':_0xc2b040[_0x21102b(0x1f0)],'default':!![]}]);if(!_0x489518)return _0xc2b040['nWETn'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x21102b(0x1c5),{'url':_0x5b787f?.['url'],'force':_0x5b787f?.['force'],'allowInsecureLocalhost':_0x5b787f?.[_0x21102b(0x1bd)],'scope':_0x5b787f?.[_0x21102b(0x1bf)]},_0x286ea0),{'ready':!![],'skipped':![]};}catch(_0x48bead){return console['error'](_0x21102b(0x187),_0x48bead instanceof Error?_0x48bead[_0x21102b(0x1f3)]:_0x48bead),_0xc2b040['ZHmxw'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}function _0x348d(_0x26e6b7,_0x2b3620){_0x26e6b7=_0x26e6b7-0x183;const _0x5756b4=_0x5756();let _0x348d79=_0x5756b4[_0x26e6b7];return _0x348d79;}export async function start(_0x218159,_0x510947,_0x178d41){const _0x45c284=_0xc5da9b,_0x7cad77={'eJPMq':_0x45c284(0x1e2),'BGmWu':_0x45c284(0x1d3),'bYNOt':'user','HQBvU':_0x45c284(0x1b3),'kyyaY':function(_0x155cbc,_0x240d31){return _0x155cbc&&_0x240d31;},'aAOnD':_0x45c284(0x183),'aVUOp':_0x45c284(0x1ed),'RgeAD':function(_0xdc7f44,_0x511818){return _0xdc7f44(_0x511818);},'kYFhR':function(_0x110a6d){return _0x110a6d();},'RMZKz':function(_0x299026,_0x3ce072){return _0x299026(_0x3ce072);},'fSRef':'✓\x20Skipping\x20authentication\x20(--skip-auth)','fnZTg':'auth','NukDd':'chromium','AZEJq':_0x45c284(0x1e1),'Jlicy':_0x45c284(0x1c2),'ADOCE':_0x45c284(0x195),'gDUBX':function(_0x5164db,_0x48ea28,_0x5343dd){return _0x5164db(_0x48ea28,_0x5343dd);},'mMBBw':_0x45c284(0x1fa),'rQusG':'opencode','lfmAw':_0x45c284(0x1a7),'FPgul':'skills','rmSEY':function(_0x4909ef,_0xd15a00){return _0x4909ef(_0xd15a00);},'pfdkl':_0x45c284(0x1e7),'aIntX':_0x45c284(0x1f8),'oCdec':_0x45c284(0x1a8),'MEnlX':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','vMQxN':_0x45c284(0x19b),'TtMLF':function(_0x47f8c6,_0xaadc6a){return _0x47f8c6+_0xaadc6a;}};console[_0x45c284(0x19e)](_0x7cad77['eJPMq']);const _0x4cd57c=process['stdin'][_0x45c284(0x1dd)]&&process['stdout'][_0x45c284(0x1dd)];!_0x4cd57c&&!_0x510947?.[_0x45c284(0x1bf)]&&(console['log'](_0x7cad77['BGmWu']),_0x510947={..._0x510947,'scope':_0x7cad77[_0x45c284(0x1c7)]});const _0x3ce0eb=_0x510947?.['scope']===_0x45c284(0x1b4);_0x178d41?.[_0x45c284(0x1de)](_0x7cad77[_0x45c284(0x1f1)]);const _0x1d01ff=findGitRoot();if(_0x7cad77['kyyaY'](!_0x1d01ff,!_0x3ce0eb)){await _0x178d41?.[_0x45c284(0x18f)](_0x7cad77['HQBvU'],new Error(_0x45c284(0x1eb)));throw new Error(_0x7cad77['aAOnD']+_0x7cad77['aVUOp']);}_0x178d41?.[_0x45c284(0x1f6)](_0x7cad77['HQBvU']);const _0x3613c4=!_0x7cad77[_0x45c284(0x1a4)](existsSync,_0x7cad77['kYFhR'](getRangerDir)),{path:_0x39f011}=await _0x7cad77[_0x45c284(0x1c4)](ensureRangerDir,_0x3ce0eb?_0x7cad77['bYNOt']:undefined);if(_0x510947?.[_0x45c284(0x192)])console['log'](_0x7cad77[_0x45c284(0x1bc)]),_0x178d41?.['trackPhaseEnd'](_0x7cad77['fnZTg'],{'isFirstRun':_0x3613c4,'method':_0x45c284(0x1ad)});else{_0x178d41?.['trackPhaseStart'](_0x7cad77[_0x45c284(0x1d5)]);const _0x4f9976=await _0x7cad77[_0x45c284(0x1c4)](authenticate,_0x218159);_0x178d41?.['trackPhaseEnd'](_0x45c284(0x1ab),{'isFirstRun':_0x3613c4,'method':_0x4f9976['method']});}_0x178d41?.['trackPhaseStart'](_0x7cad77['NukDd']);_0x510947?.['skipChromium']?console['log'](_0x7cad77['AZEJq']):await ensureChromium(_0x510947?.[_0x45c284(0x18e)]);_0x178d41?.[_0x45c284(0x1f6)](_0x7cad77[_0x45c284(0x1c3)],{'isFirstRun':_0x3613c4,'skipped':!!_0x510947?.['skipChromium']});!_0x3ce0eb&&await writeRangerGitignore(_0x39f011);console[_0x45c284(0x19e)](_0x7cad77['Jlicy']);const _0x2cbc1a=_0x510947?.['scope'],_0x51d0d3=_0x510947?.[_0x45c284(0x1ea)]??![];let _0x24b5a7=null;_0x51d0d3?(_0x178d41?.['trackPhaseStart'](_0x7cad77['ADOCE']),_0x24b5a7=await _0x7cad77[_0x45c284(0x1a4)](ensureOpencodePluginConfig,_0x2cbc1a),_0x178d41?.['trackPhaseEnd'](_0x7cad77[_0x45c284(0x184)],{'isFirstRun':_0x3613c4,'opencode':!![]})):(_0x178d41?.['trackPhaseStart'](_0x7cad77['ADOCE']),await ensureClaudePlugin(_0x2cbc1a),_0x178d41?.['trackPhaseEnd'](_0x7cad77[_0x45c284(0x184)],{'isFirstRun':_0x3613c4}));if(_0x51d0d3&&_0x24b5a7){_0x178d41?.['trackPhaseStart']('skills');try{await _0x7cad77['gDUBX'](installSkill,_0x7cad77['mMBBw'],{'level':_0x24b5a7[_0x45c284(0x1bf)],'cliVersion':_0x7cad77['kYFhR'](getCurrentVersion),'platform':_0x7cad77['rQusG']}),_0x178d41?.[_0x45c284(0x1f6)](_0x45c284(0x1f9),{'isFirstRun':_0x3613c4,'opencode':!![]});}catch(_0xff92fd){console['warn'](_0x7cad77[_0x45c284(0x1da)],_0xff92fd instanceof Error?_0xff92fd[_0x45c284(0x1f3)]:_0xff92fd),_0x178d41?.[_0x45c284(0x1f6)](_0x7cad77['FPgul'],{'isFirstRun':_0x3613c4,'opencode':!![],'failed':!![]});}}else _0x178d41?.[_0x45c284(0x1de)]('skills'),await _0x7cad77[_0x45c284(0x1d8)](ensureClaudeSkills,_0x2cbc1a),_0x178d41?.[_0x45c284(0x1f6)](_0x7cad77[_0x45c284(0x185)],{'isFirstRun':_0x3613c4});if(_0x510947?.['skipAuth'])console['log'](_0x45c284(0x1ba));else{if(!_0x4cd57c&&!_0x510947?.[_0x45c284(0x196)])console['log'](_0x7cad77[_0x45c284(0x19c)]),console[_0x45c284(0x19e)]('\x20\x20'+bold('ranger\x20profile\x20add\x20local')+'\x0a');else{_0x178d41?.[_0x45c284(0x1de)](_0x45c284(0x1f8));const _0xb5b338=await ensureLocalEnv({'url':_0x510947?.['url'],'force':_0x510947?.[_0x45c284(0x1cb)],'allowInsecureLocalhost':_0x510947?.[_0x45c284(0x1bd)],'scope':_0x510947?.['scope']===_0x7cad77[_0x45c284(0x1c7)]?_0x7cad77['bYNOt']:undefined},_0x178d41);_0x178d41?.[_0x45c284(0x1f6)](_0x7cad77['aIntX'],{'isFirstRun':_0x3613c4,'profileReady':_0xb5b338['ready'],'userSkipped':_0xb5b338['skipped']}),_0xb5b338['ready']&&console['log'](_0x45c284(0x1f5));}}if(_0x51d0d3)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x7cad77[_0x45c284(0x1f4)]),console['log'](_0x7cad77['MEnlX']);else{const _0xdc52a2=bold(_0x7cad77['vMQxN']);console['log'](_0x7cad77[_0x45c284(0x1e3)](_0x45c284(0x1e9)+_0xdc52a2+_0x45c284(0x188)+_0x45c284(0x19f),_0x45c284(0x1c0))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
|
|
1
|
+
const _0xef9ad6=_0x2f46;(function(_0x492837,_0x55116d){const _0x2ddb7b=_0x2f46,_0x331e33=_0x492837();while(!![]){try{const _0x143f5a=-parseInt(_0x2ddb7b(0x14d))/0x1*(-parseInt(_0x2ddb7b(0x180))/0x2)+-parseInt(_0x2ddb7b(0x16a))/0x3+-parseInt(_0x2ddb7b(0x1a5))/0x4+parseInt(_0x2ddb7b(0x157))/0x5*(parseInt(_0x2ddb7b(0x1a1))/0x6)+parseInt(_0x2ddb7b(0x18f))/0x7+parseInt(_0x2ddb7b(0x15f))/0x8+-parseInt(_0x2ddb7b(0x1b0))/0x9*(-parseInt(_0x2ddb7b(0x197))/0xa);if(_0x143f5a===_0x55116d)break;else _0x331e33['push'](_0x331e33['shift']());}catch(_0x6527ca){_0x331e33['push'](_0x331e33['shift']());}}}(_0x2f79,0x1b54d));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x2f46(_0x174d0e,_0x1247b9){_0x174d0e=_0x174d0e-0x140;const _0x2f7989=_0x2f79();let _0x2f46a3=_0x2f7989[_0x174d0e];return _0x2f46a3;}import _0x18405f from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';function _0x2f79(){const _0xcd604=['Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','stdout','ceDOT','XKufc','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','40vLPtAO','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','\x0aIn\x20Claude\x20Code,\x20run\x20','skipped','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','1.58.2','IDgXu','RANGER_TEST_PASSWORD','xbqZY','ready','6wSzmeR','url','SxGCG','\x20install\x20chromium','432588bdmeRY','status','version','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','skipAuth','cMZJe','\x20\x20(or\x20use\x20','user','YKVrv','✓\x20~/.ranger/\x20directory\x20already\x20exists','executablePath','299799RQrnXc','existing_token','UIiPY','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','gwqir','EoDtw','JKoir','/ranger:enable','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','plugin','isTTY','yXigd','QyDjm','message','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','3848XCMBRA','GITHUB_ENV','confirm','win32','wZjei','skipChromium','playwright/package.json','success','device_auth','KoThL','36565zWBery','fiewP','YBuuW','BkePq','resolve','\x1b[1m','scope','allowInsecureLocalhost','159056eVWvGy',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20Created\x20~/.ranger/\x20directory','trackPhaseStart','inherit','log','QKfUy','ujDKw','\x20when\x20the\x20org\x27s\x20login','pdDGO','trackPhaseEnd','250977IigCmq','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','pKqQN','MtYQi','AdMMe','✓\x20Already\x20authenticated\x20to\x20','warn','withDeps','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','yJhPY','skills','DvKve','close','CHjjc','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','✓\x20Created\x20.ranger/.gitignore','cfHAc','nCezB','XYMIr','ztbOg','opencode','✓\x20Playwright\x20Chromium\x20browser\x20found','16lSlAek','EZJES','You\x20can\x20install\x20it\x20manually\x20by\x20running:','organizationName','\x20\x20npx\x20playwright@','Authentication\x20failed:\x20','\x0a❌\x20Profile\x20setup\x20failed:','platform','whXQM','ranger\x20profile\x20add','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aTo\x20verify\x20with\x20a\x20browser,\x20set\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','ranger\x20setup\x20--scope=','error','787724UcNDnY','Installation\x20failed\x20with\x20exit\x20code\x20','exit'];_0x2f79=function(){return _0xcd604;};return _0x2f79();}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=_0xef9ad6(0x19c);const bold=_0x4dd745=>_0xef9ad6(0x15c)+_0x4dd745+'\x1b[0m';export function getPlaywrightVersion(){const _0x530456=_0xef9ad6,_0x3c405a={'whXQM':function(_0x26eddc,_0x96563a){return _0x26eddc(_0x96563a);}};try{const _0x57c4b1=require[_0x530456(0x15b)](_0x530456(0x153)),_0x559132=_0x3c405a[_0x530456(0x188)](require,_0x57c4b1);return _0x559132[_0x530456(0x1a7)];}catch{return null;}}export function installChromiumBinary(_0x2d4c2e,_0x570e35=![]){const _0xe9a9f7=_0xef9ad6,_0x2788cc={'fiewP':function(_0x2527ff){return _0x2527ff();},'sjfAQ':'--with-deps','xbqZY':'ignore','cMZJe':_0xe9a9f7(0x163),'EoDtw':function(_0x14ec92,_0x3eb50f){return _0x14ec92===_0x3eb50f;}};return new Promise((_0x38bba8,_0x4cfa14)=>{const _0x26a840=_0xe9a9f7,_0x19be94={'yJhPY':function(_0x27bd81,_0x8c2e5a){return _0x27bd81(_0x8c2e5a);}},_0x56a59c=['playwright@'+_0x2d4c2e,'install',..._0x570e35?[_0x2788cc['sjfAQ']]:[],'chromium'],_0x125dbc=spawn('npx',_0x56a59c,{'stdio':[_0x2788cc[_0x26a840(0x19f)],_0x2788cc[_0x26a840(0x1aa)],_0x2788cc['cMZJe']],'shell':_0x2788cc[_0x26a840(0x143)](process[_0x26a840(0x187)],_0x26a840(0x150))});_0x125dbc['on'](_0x26a840(0x176),_0x4166bc=>{const _0x3e4731=_0x26a840;_0x4166bc===0x0?_0x2788cc[_0x3e4731(0x158)](_0x38bba8):_0x4cfa14(new Error(_0x3e4731(0x190)+_0x4166bc));}),_0x125dbc['on'](_0x26a840(0x18e),_0x300f9a=>{const _0x55bbe7=_0x26a840;_0x19be94[_0x55bbe7(0x173)](_0x4cfa14,_0x300f9a);});});}export async function authenticate(_0x133a62){const _0x5d871f=_0xef9ad6,_0x370571={'hwvUE':_0x5d871f(0x1b1),'CHjjc':_0x5d871f(0x155),'QqYPS':'Validating\x20API\x20token...','ujDKw':function(_0x2d505f,_0x12db6f){return _0x2d505f(_0x12db6f);},'IDgXu':'✓\x20Exported\x20credentials\x20for\x20CI','fcTOn':'✓\x20Stored\x20credentials\x20locally'};if(!_0x133a62){const _0x262f35=await getToken();if(_0x262f35){const _0x5730a6=await getCurrentUser(_0x262f35);if(_0x5730a6[_0x5d871f(0x154)])return console[_0x5d871f(0x164)](_0x5d871f(0x16f)+_0x5730a6[_0x5d871f(0x1ac)][_0x5d871f(0x183)]),{'token':_0x262f35,'method':_0x370571['hwvUE']};}try{_0x133a62=await runDeviceAuthFlow();}catch(_0xe5db6c){throw new Error('Authentication\x20failed:\x20'+(_0xe5db6c instanceof Error?_0xe5db6c[_0x5d871f(0x14b)]:_0xe5db6c));}const _0x455c68=await getCurrentUser(_0x133a62);if(!_0x455c68[_0x5d871f(0x154)])throw new Error(_0x5d871f(0x192)+_0x455c68[_0x5d871f(0x18e)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x455c68[_0x5d871f(0x1ac)]['organizationName']),{'token':_0x133a62,'method':_0x370571[_0x5d871f(0x177)]};}console['log'](_0x370571['QqYPS']);const _0x30997f=await getCurrentUser(_0x133a62);if(!_0x30997f['success']){if(_0x30997f[_0x5d871f(0x1a6)])throw new Error(_0x5d871f(0x185)+_0x30997f['error']+_0x5d871f(0x196));else throw new Error(_0x5d871f(0x14c)+_0x30997f[_0x5d871f(0x18e)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x30997f['user'][_0x5d871f(0x183)]),await _0x370571[_0x5d871f(0x166)](storeToken,_0x133a62),console['log'](process['env'][_0x5d871f(0x14e)]?_0x370571[_0x5d871f(0x19d)]:_0x370571['fcTOn']),{'token':_0x133a62,'method':'provided_token'};}export async function ensureRangerDir(_0x363e4b){const _0x2fee4f=_0xef9ad6,_0x2683a2={'MwrKv':function(_0x24f72e){return _0x24f72e();},'HrPYe':function(_0x469ecf,_0x4655f9){return _0x469ecf(_0x4655f9);},'Jayib':_0x2fee4f(0x161),'PNFfD':_0x2fee4f(0x1ae)};void _0x363e4b;const _0x2acc09=_0x2683a2['MwrKv'](getRangerHomeDir);return!_0x2683a2['HrPYe'](existsSync,_0x2acc09)?(await mkdir(_0x2acc09,{'recursive':!![]}),console['log'](_0x2683a2['Jayib']),{'path':_0x2acc09,'installed':!![]}):(console['log'](_0x2683a2['PNFfD']),{'path':_0x2acc09,'installed':![]});}export async function ensureChromium(_0x45d73b=![]){const _0x4e7b26=_0xef9ad6,_0x57dcde={'grCrU':function(_0x51c3d0,_0x4c7709){return _0x51c3d0(_0x4c7709);},'VdlZB':_0x4e7b26(0x17f),'QyDjm':'\x0aInstalling\x20Chromium\x20browser...\x0a','wZjei':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','RoXFq':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','AdMMe':_0x4e7b26(0x182),'yFyXj':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','DZqmX':_0x4e7b26(0x178)};let _0x28ebbf=![];try{const _0x27e16b=chromium[_0x4e7b26(0x1af)]();_0x28ebbf=_0x57dcde['grCrU'](existsSync,_0x27e16b);}catch{_0x28ebbf=![];}if(_0x28ebbf)return console['log'](_0x57dcde['VdlZB']),![];const _0x5ebe96=getPlaywrightVersion(),_0x3d9ed6=_0x5ebe96??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1c09f5=!_0x5ebe96,_0x10a463=process['stdin']['isTTY']&&process[_0x4e7b26(0x193)][_0x4e7b26(0x148)];let _0x4501a3=!![];if(_0x10a463){const {install:_0x40e882}=await _0x18405f['prompt']([{'type':_0x4e7b26(0x14f),'name':'install','message':_0x1c09f5?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x3d9ed6+'\x20now?':'The\x20required\x20version\x20('+_0x3d9ed6+_0x4e7b26(0x160),'default':!![]}]);_0x4501a3=_0x40e882;}else console[_0x4e7b26(0x164)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x3d9ed6+(_0x1c09f5?'\x20(fallback\x20version)':'')+'...');if(_0x4501a3){console[_0x4e7b26(0x164)](_0x57dcde[_0x4e7b26(0x14a)]);try{await installChromiumBinary(_0x3d9ed6,_0x45d73b),console[_0x4e7b26(0x164)](_0x57dcde[_0x4e7b26(0x151)]);}catch(_0x2fbc13){console['error'](_0x57dcde['RoXFq'],_0x2fbc13 instanceof Error?_0x2fbc13['message']:_0x2fbc13),console[_0x4e7b26(0x164)](_0x57dcde[_0x4e7b26(0x16e)]),console['log'](_0x4e7b26(0x184)+_0x3d9ed6+'\x20install\x20chromium');}}else console['log'](_0x57dcde['yFyXj']),console['log'](_0x57dcde['DZqmX']),console['log'](_0x4e7b26(0x184)+_0x3d9ed6+_0x4e7b26(0x1a4));return!![];}export async function writeRangerGitignore(_0x12c12f){const _0x4116cd=_0xef9ad6,_0x375468={'yPRCu':'.gitignore','YBuuW':_0x4116cd(0x179)},_0x149473=join(_0x12c12f,_0x375468['yPRCu']),_0x264b27='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x149473,_0x264b27),console[_0x4116cd(0x164)](_0x375468[_0x4116cd(0x159)]);}export async function ensureLocalEnv(_0x251e4e,_0x2e9802){const _0x26a635=_0xef9ad6,_0x533253={'HtJCA':function(_0x2ea9ac){return _0x2ea9ac();},'DCJVB':'user','BiUII':function(_0x2ea266,_0x489cc5){return _0x2ea266===_0x489cc5;},'ceDOT':function(_0x2b3bc6){return _0x2b3bc6();},'QoIvh':function(_0x2016e9,_0x509423,_0x11341c){return _0x2016e9(_0x509423,_0x11341c);},'HlDQc':'local','xdMZm':'✓\x20Local\x20profile\x20already\x20exists','pKqQN':function(_0x425c69,_0x1d7e8e,_0x5abf6d,_0x3aa00e){return _0x425c69(_0x1d7e8e,_0x5abf6d,_0x3aa00e);},'QKfUy':function(_0x4656a7,_0x1b9185){return _0x4656a7 instanceof _0x1b9185;}};if(!_0x533253['HtJCA'](findGitRoot)&&_0x251e4e?.[_0x26a635(0x15d)]!==_0x533253['DCJVB'])return console['log'](_0x26a635(0x19b)),{'ready':![],'skipped':!![]};const _0x3c05d7=_0x533253['BiUII'](_0x251e4e?.['scope'],_0x26a635(0x1ac))?_0x533253[_0x26a635(0x194)](getRangerHomeDir):undefined;if(_0x533253['QoIvh'](findExistingEnv,'local',{'locations':[_0x533253['HlDQc']],'rangerDir':_0x3c05d7}))return console['log'](_0x533253['xdMZm']),{'ready':!![],'skipped':![]};try{return await _0x533253[_0x26a635(0x16c)](addEnv,'local',{'url':_0x251e4e?.[_0x26a635(0x1a2)],'force':_0x251e4e?.['force'],'allowInsecureLocalhost':_0x251e4e?.[_0x26a635(0x15e)],'scope':_0x251e4e?.['scope']},_0x2e9802),{'ready':!![],'skipped':![]};}catch(_0x100be2){return console[_0x26a635(0x18e)](_0x26a635(0x186),_0x533253[_0x26a635(0x165)](_0x100be2,Error)?_0x100be2[_0x26a635(0x14b)]:_0x100be2),{'ready':![],'skipped':![]};}}export async function start(_0x49fa31,_0x1dd852,_0x891463){const _0x29296d=_0xef9ad6,_0x3b4dfc={'UIiPY':'\x0a🚀\x20Ranger\x20Setup\x0a','DvKve':function(_0x1dc5f9,_0x822e1b){return _0x1dc5f9!==_0x822e1b;},'XYMIr':'user','YKVrv':function(_0x588863,_0xb05362){return _0x588863+_0xb05362;},'MtYQi':function(_0x40df7a,_0x26cfcb){return _0x40df7a(_0x26cfcb);},'pdDGO':function(_0x209f6a,_0x2ca86e){return _0x209f6a(_0x2ca86e);},'Oxldy':'✓\x20Skipping\x20authentication\x20(--skip-auth)','BkePq':'auth','xEPch':_0x29296d(0x19a),'yXigd':_0x29296d(0x147),'mjoCh':function(_0x13b816,_0x396c6f){return _0x13b816&&_0x396c6f;},'cfHAc':'skills','ztbOg':function(_0x422ca9,_0x462419,_0x4f4144){return _0x422ca9(_0x462419,_0x4f4144);},'nCezB':'ranger','FxRVg':'opencode','HXDUq':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','zELtH':function(_0x16be15,_0x10fcf3){return _0x16be15 instanceof _0x10fcf3;},'SgTmo':function(_0x496fb4,_0x536263){return _0x496fb4(_0x536263);},'XKufc':'profile','Ifoos':function(_0x4ac012,_0x71ac99,_0x46f51f){return _0x4ac012(_0x71ac99,_0x46f51f);},'gwqir':_0x29296d(0x19e),'KoThL':function(_0x44d35d,_0x35efd5){return _0x44d35d(_0x35efd5);},'JKoir':_0x29296d(0x189),'SxGCG':_0x29296d(0x146),'TRgRK':_0x29296d(0x141),'EZJES':_0x29296d(0x1a8),'dphRD':function(_0x4ffabe,_0x2c0b54){return _0x4ffabe+_0x2c0b54;},'Wgtyc':function(_0x3b0d53,_0x45814c){return _0x3b0d53+_0x45814c;}};console[_0x29296d(0x164)](_0x3b4dfc[_0x29296d(0x140)]);_0x3b4dfc[_0x29296d(0x175)](_0x1dd852?.['scope'],undefined)&&_0x3b4dfc['DvKve'](_0x1dd852[_0x29296d(0x15d)],_0x3b4dfc[_0x29296d(0x17c)])&&(console[_0x29296d(0x18e)](_0x3b4dfc['YKVrv'](_0x29296d(0x18d)+_0x3b4dfc[_0x29296d(0x16d)](String,_0x1dd852[_0x29296d(0x15d)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x29296d(0x198),_0x29296d(0x18c))),process[_0x29296d(0x191)](0x1));_0x1dd852={..._0x1dd852,'scope':'user'};const _0x1df1c3=!existsSync(getRangerHomeDir());await _0x3b4dfc['pdDGO'](ensureRangerDir,_0x3b4dfc['XYMIr']);if(_0x1dd852?.[_0x29296d(0x1a9)])console['log'](_0x3b4dfc['Oxldy']),_0x891463?.['trackPhaseEnd'](_0x3b4dfc['BkePq'],{'isFirstRun':_0x1df1c3,'method':_0x3b4dfc['xEPch']});else{_0x891463?.[_0x29296d(0x162)](_0x3b4dfc[_0x29296d(0x15a)]);const _0x56bc5c=await authenticate(_0x49fa31);_0x891463?.[_0x29296d(0x169)](_0x3b4dfc[_0x29296d(0x15a)],{'isFirstRun':_0x1df1c3,'method':_0x56bc5c['method']});}_0x891463?.['trackPhaseStart']('chromium');_0x1dd852?.[_0x29296d(0x152)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x3b4dfc[_0x29296d(0x16d)](ensureChromium,_0x1dd852?.[_0x29296d(0x171)]);_0x891463?.[_0x29296d(0x169)]('chromium',{'isFirstRun':_0x1df1c3,'skipped':!!_0x1dd852?.['skipChromium']}),console[_0x29296d(0x164)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x46af19=_0x1dd852?.[_0x29296d(0x15d)],_0x4383e9=_0x1dd852?.[_0x29296d(0x17e)]??![];let _0x2fe183=null;_0x4383e9?(_0x891463?.['trackPhaseStart']('plugin'),_0x2fe183=await _0x3b4dfc[_0x29296d(0x168)](ensureOpencodePluginConfig,_0x46af19),_0x891463?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x1df1c3,'opencode':!![]})):(_0x891463?.[_0x29296d(0x162)](_0x3b4dfc[_0x29296d(0x149)]),await ensureClaudePlugin(_0x46af19),_0x891463?.['trackPhaseEnd'](_0x3b4dfc[_0x29296d(0x149)],{'isFirstRun':_0x1df1c3}));if(_0x3b4dfc['mjoCh'](_0x4383e9,_0x2fe183)){_0x891463?.['trackPhaseStart'](_0x3b4dfc[_0x29296d(0x17a)]);try{await _0x3b4dfc[_0x29296d(0x17d)](installSkill,_0x3b4dfc[_0x29296d(0x17b)],{'level':_0x2fe183[_0x29296d(0x15d)],'cliVersion':getCurrentVersion(),'platform':_0x3b4dfc['FxRVg']}),_0x891463?.[_0x29296d(0x169)](_0x3b4dfc['cfHAc'],{'isFirstRun':_0x1df1c3,'opencode':!![]});}catch(_0x27267a){console[_0x29296d(0x170)](_0x3b4dfc['HXDUq'],_0x3b4dfc['zELtH'](_0x27267a,Error)?_0x27267a['message']:_0x27267a),_0x891463?.[_0x29296d(0x169)](_0x29296d(0x174),{'isFirstRun':_0x1df1c3,'opencode':!![],'failed':!![]});}}else _0x891463?.[_0x29296d(0x162)](_0x3b4dfc['cfHAc']),await _0x3b4dfc['SgTmo'](ensureClaudeSkills,_0x46af19),_0x891463?.['trackPhaseEnd'](_0x3b4dfc[_0x29296d(0x17a)],{'isFirstRun':_0x1df1c3});if(_0x1dd852?.[_0x29296d(0x1a9)])console['log'](_0x29296d(0x16b));else{if(_0x1dd852?.[_0x29296d(0x1a2)]){_0x891463?.['trackPhaseStart'](_0x3b4dfc['XKufc']);const _0x2afeaa=await _0x3b4dfc['Ifoos'](ensureLocalEnv,{'url':_0x1dd852['url'],'force':_0x1dd852?.['force'],'allowInsecureLocalhost':_0x1dd852?.[_0x29296d(0x15e)],'scope':_0x3b4dfc[_0x29296d(0x17c)]},_0x891463);_0x891463?.['trackPhaseEnd'](_0x3b4dfc[_0x29296d(0x195)],{'isFirstRun':_0x1df1c3,'profileReady':_0x2afeaa[_0x29296d(0x1a0)],'userSkipped':_0x2afeaa[_0x29296d(0x19a)]});}else console['log'](_0x3b4dfc[_0x29296d(0x1ad)](_0x3b4dfc['YKVrv'](_0x29296d(0x18b)+bold('RANGER_TEST_USERNAME')+'\x20','(and\x20'+_0x3b4dfc[_0x29296d(0x168)](bold,_0x3b4dfc[_0x29296d(0x142)])+_0x29296d(0x167))+'\x0a\x20\x20config\x20uses\x20username+password).\x20Orgs\x20on\x20SSO/SAML/OAuth','\x20may\x20need\x20a\x20one-time\x20headed\x20login\x20instead\x20—')+'\x0a\x20\x20your\x20org\x27s\x20auth\x20config\x20drives\x20which\x20flow\x20runs.'),console[_0x29296d(0x164)](_0x29296d(0x1ab)+_0x3b4dfc[_0x29296d(0x156)](bold,_0x3b4dfc[_0x29296d(0x144)])+'\x20for\x20explicit\x20profile\x20management).');}if(_0x4383e9)console[_0x29296d(0x164)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x29296d(0x164)](_0x3b4dfc[_0x29296d(0x1a3)]),console['log'](_0x3b4dfc['TRgRK']),console['log'](_0x3b4dfc[_0x29296d(0x181)]);else{const _0x5a1d83=bold(_0x29296d(0x145));console[_0x29296d(0x164)](_0x3b4dfc['dphRD'](_0x3b4dfc['Wgtyc'](_0x29296d(0x199)+_0x5a1d83+'\x20and\x20prompt\x20the\x20coding',_0x29296d(0x172))+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser',_0x29296d(0x18a)));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4f3369=_0x1bc0;(function(_0x11c3b6,_0x52bee5){const _0x1b6ccb=_0x1bc0,_0x53a50d=_0x11c3b6();while(!![]){try{const _0x22c027=-parseInt(_0x1b6ccb(0x13d))/0x1+parseInt(_0x1b6ccb(0x145))/0x2+parseInt(_0x1b6ccb(0xfe))/0x3*(-parseInt(_0x1b6ccb(0x152))/0x4)+parseInt(_0x1b6ccb(0xfb))/0x5+-parseInt(_0x1b6ccb(0x15a))/0x6*(parseInt(_0x1b6ccb(0xf8))/0x7)+parseInt(_0x1b6ccb(0x144))/0x8*(parseInt(_0x1b6ccb(0x149))/0x9)+parseInt(_0x1b6ccb(0x11c))/0xa;if(_0x22c027===_0x52bee5)break;else _0x53a50d['push'](_0x53a50d['shift']());}catch(_0x2a67a8){_0x53a50d['push'](_0x53a50d['shift']());}}}(_0x431c,0x1cbbb));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x431c(){const _0x45d0aa=['cLAHc','cZZeK','includes',':\x20installed\x20(','auth.json.enc','ccnQz','\x20\x20User-level:','KjBhU','\x20\x20Run:\x20ranger\x20skillup','aRkuq','encrypted','\x20\x20\x20\x20Settings:\x20','QmleN','778030TNKmmB','hasPlaintextAuth','cwd',':\x20configured','utf-8','\x20plugin(s)\x20configured','unknown','disabled','fnpWN','opencode','length','\x1b[1m','organizationName','\x20\x20Run:\x20ranger\x20setup\x20[token]','REkRi','version','QSknJ','not_installed','\x0a---\x20OpenCode\x20Plugin\x20---','Root:\x20','toString','\x20\x20Run:\x20ranger\x20setup\x20--opencode','settings.json','efcXQ','xtztu','saDCq','auth.json','TlIAn','YFecX','dBVlr','\x0a\x20\x20No\x20active\x20profile\x20set','isActive','BBvcn','28473OZahEH','ranger@trailhead','\x20\x20Not\x20configured','API\x20URL:\x20','flTaj','isArray','HUAvt','1061264mkUJki','207970dUOrvq','name','UgDDC','filter','9rAeduA','opencode-plugin','\x1b]8;;\x07','user','Organization:\x20','klItt','\x0a---\x20Skills\x20---','UQPKd','\x0a---\x20Profiles\x20---','4YXWZzW','YPUCr','NLAnj','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20\x20\x20Auth:\x20','match','log','LPASh','942BAvdyG','plugin','fJWFx','details','8813ZAJYJL','API\x20Token:\x20✗\x20Not\x20found','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','154400VdNJHY','dnfYE','KBIHf','4497qbUbCR','Hgxwm','data','settingsPath','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','vdRco','configured','map','\x20\x20\x20\x20','some','XIvdW','enabled','isDirectory','config','ppueL','LPqJx'];_0x431c=function(){return _0x45d0aa;};return _0x431c();}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=_0x7edeef=>_0x4f3369(0x127)+_0x7edeef+'\x1b[0m',link=(_0x47b0d2,_0x277e21)=>'\x1b]8;;file://'+_0x47b0d2+'\x07'+(_0x277e21||_0x47b0d2)+_0x4f3369(0x14b);async function getOpencodePluginStatus(){const _0x43e32f=_0x4f3369,_0x22d7ac={'Hgxwm':function(_0x2fe8fd,_0x186ed7){return _0x2fe8fd(_0x186ed7);},'ifsKl':'configured','efcXQ':'debug','zTdde':_0x43e32f(0x10c),'REkRi':'ignore','cLAHc':'pipe','NLAnj':'data'};return new Promise(_0x3d65ab=>{const _0x446c45=_0x43e32f,_0x4311d1={'YPUCr':_0x22d7ac['ifsKl'],'VsDlY':function(_0x34b5cf,_0xd269be){return _0x34b5cf>_0xd269be;},'flTaj':'not_configured','XIvdW':function(_0x3f173a,_0x2a9a1d){return _0x22d7ac['Hgxwm'](_0x3f173a,_0x2a9a1d);}},_0x4d1148=spawn(_0x446c45(0x125),[_0x22d7ac[_0x446c45(0x133)],_0x22d7ac['zTdde']],{'stdio':[_0x22d7ac[_0x446c45(0x12a)],_0x22d7ac[_0x446c45(0x10f)],'pipe']});let _0xd998f6='';_0x4d1148['stdout']?.['on'](_0x22d7ac[_0x446c45(0x154)],_0x456abc=>{const _0x51094d=_0x446c45;_0xd998f6+=_0x456abc[_0x51094d(0x130)]();}),_0x4d1148['stderr']?.['on'](_0x446c45(0x100),_0x7d37=>{_0xd998f6+=_0x7d37['toString']();}),_0x4d1148['on']('error',()=>{const _0x59fed6=_0x446c45;_0x22d7ac[_0x59fed6(0xff)](_0x3d65ab,{'status':_0x59fed6(0x12d)});}),_0x4d1148['on']('close',_0x5c7d74=>{const _0x2e848c=_0x446c45,_0x4e4da5={'QmleN':function(_0x2cae75,_0x5630f2){return _0x2cae75!==_0x5630f2;},'tWilf':'@ranger-testing/opencode-plugin'};if(_0x5c7d74!==0x0){_0x3d65ab({'status':'not_installed'});return;}const _0x123811=_0xd998f6['trim']();let _0x47e4b2=null;if(_0x123811)try{_0x47e4b2=JSON['parse'](_0x123811);}catch{const _0xe7074d=_0x123811[_0x2e848c(0x157)](/\{[\s\S]*\}$/);if(_0xe7074d)try{_0x47e4b2=JSON['parse'](_0xe7074d[0x0]);}catch{_0x47e4b2=null;}}const _0xf9eb84=Array[_0x2e848c(0x142)](_0x47e4b2?.['plugin'])?_0x47e4b2?.[_0x2e848c(0x15b)]:[],_0x37633a=_0xf9eb84[_0x2e848c(0x108)](_0x3c46a7=>{const _0x20a057=_0x2e848c;if(_0x4e4da5[_0x20a057(0x11b)](typeof _0x3c46a7,'string'))return![];return _0x3c46a7[_0x20a057(0x111)](_0x4e4da5['tWilf'])||_0x3c46a7[_0x20a057(0x111)](_0x20a057(0x14a));});if(_0x37633a){_0x3d65ab({'status':_0x4311d1[_0x2e848c(0x153)],'details':_0x4311d1['VsDlY'](_0xf9eb84[_0x2e848c(0x126)],0x0)?_0xf9eb84[_0x2e848c(0x126)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0xf9eb84['length']>0x0){_0x3d65ab({'status':_0x4311d1['flTaj'],'details':_0xf9eb84[_0x2e848c(0x126)]+_0x2e848c(0x121)});return;}_0x4311d1[_0x2e848c(0x109)](_0x3d65ab,{'status':_0x4311d1[_0x2e848c(0x141)]});});});}async function getSkillsFromDir(_0x166660,_0x42f483){const _0x3284d2=_0x4f3369;if(!existsSync(_0x166660))return[];const _0x53589e=[];try{const _0x35a18a=await readdir(_0x166660,{'withFileTypes':!![]});for(const _0x3bc512 of _0x35a18a){if(_0x3bc512[_0x3284d2(0x10b)]()){const _0x4a4458=join(_0x166660,_0x3bc512['name'],'SKILL.md');if(existsSync(_0x4a4458)){let _0x284366=_0x3bc512[_0x3284d2(0x146)];try{const _0x2dd081=await readFile(_0x4a4458,_0x3284d2(0x120)),_0x483f46=_0x2dd081[_0x3284d2(0x157)](/name:\s*(.+)/);_0x483f46&&(_0x284366=_0x483f46[0x1]['trim']());}catch{}_0x53589e['push']({'name':_0x3bc512['name'],'displayName':_0x284366,'path':_0x4a4458,'level':_0x42f483});}}}}catch{return[];}return _0x53589e;}async function getInstalledSkills(){const _0x372bf7=_0x4f3369,_0x114221={'LPASh':function(_0x56c460,_0x3cfae5,_0x4b41f9){return _0x56c460(_0x3cfae5,_0x4b41f9);},'KjBhU':function(_0x375c8f){return _0x375c8f();},'XkmaE':'project','fJWFx':function(_0x550a52){return _0x550a52();},'FaaIg':_0x372bf7(0x14c)},[_0x4f75b3,_0x351661]=await Promise['all']([_0x114221[_0x372bf7(0x159)](getSkillsFromDir,_0x114221[_0x372bf7(0x116)](getProjectSkillsDir),_0x114221['XkmaE']),getSkillsFromDir(_0x114221[_0x372bf7(0x15c)](getUserSkillsDir),_0x114221['FaaIg'])]);return{'project':_0x4f75b3,'user':_0x351661};}async function getEnvironments(){const _0x3988c2=_0x4f3369,_0x3697fd={'QSknJ':function(_0x22421c,_0x4e7fdd,_0x49ab52){return _0x22421c(_0x4e7fdd,_0x49ab52);},'GbXns':_0x3988c2(0x132),'fnpWN':_0x3988c2(0x136),'vdRco':_0x3988c2(0x113),'cZZeK':function(_0x4a5730,_0x32a896){return _0x4a5730(_0x32a896);},'rBCcS':function(_0x592dd7,_0x15296f){return _0x592dd7(_0x15296f);},'UgDDC':function(_0x418103,_0x95461e){return _0x418103===_0x95461e;}},{envNames:_0x2386db,activeEnv:_0x358ae8}=await getEnvNames(),_0x480688=getRangerDir();if(!existsSync(_0x480688))return{'envs':[],'activeEnv':null};const _0x5cb21a=_0x2386db[_0x3988c2(0x106)](_0x28715c=>{const _0x5c52a0=_0x3988c2,_0x15571d=getEnvDir(_0x28715c),_0xdab0ac=_0x3697fd['QSknJ'](join,_0x15571d,_0x3697fd['GbXns']),_0x2590bf=_0x3697fd[_0x5c52a0(0x12c)](join,_0x15571d,_0x3697fd[_0x5c52a0(0x124)]),_0x2f0493=_0x3697fd['QSknJ'](join,_0x15571d,_0x3697fd[_0x5c52a0(0x104)]);return{'name':_0x28715c,'settingsPath':existsSync(_0xdab0ac)?_0xdab0ac:'(not\x20found)','hasPlaintextAuth':_0x3697fd[_0x5c52a0(0x110)](existsSync,_0x2590bf),'hasEncryptedAuth':_0x3697fd['rBCcS'](existsSync,_0x2f0493),'isActive':_0x3697fd[_0x5c52a0(0x147)](_0x28715c,_0x358ae8)};});return{'envs':_0x5cb21a,'activeEnv':_0x358ae8};}function _0x1bc0(_0x3777aa,_0x333a0b){_0x3777aa=_0x3777aa-0xf7;const _0x431c0c=_0x431c();let _0x1bc02b=_0x431c0c[_0x3777aa];return _0x1bc02b;}export async function status(){const _0x8e542f=_0x4f3369,_0x1c4219={'HUAvt':'\x0a📊\x20Ranger\x20Status\x0a','TlIAn':function(_0x5009c9){return _0x5009c9();},'UQPKd':function(_0x360af4,_0x1faa2f,_0x4b206a){return _0x360af4(_0x1faa2f,_0x4b206a);},'EfRBv':function(_0x306c41,_0x5913e0){return _0x306c41(_0x5913e0);},'FsCKe':function(_0x343d73,_0x305572,_0x31fd70){return _0x343d73(_0x305572,_0x31fd70);},'bsBVT':function(_0x1cab9b){return _0x1cab9b();},'IRsBd':function(_0x562da3){return _0x562da3();},'KBIHf':_0x8e542f(0x12e),'ccnQz':function(_0x3b9d02,_0x4c74b9){return _0x3b9d02===_0x4c74b9;},'vGxeh':_0x8e542f(0x105),'klItt':'@ranger-testing/opencode-plugin','weuMU':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','BBvcn':function(_0x1c1da0,_0x1bd29d){return _0x1c1da0(_0x1bd29d);},'YFecX':_0x8e542f(0x10a),'mrwIh':'\x20\x20Not\x20installed','sTAsW':_0x8e542f(0x103),'dBVlr':'No\x20skills\x20installed','aRkuq':function(_0x5c5395,_0xf1db5a){return _0x5c5395>_0xf1db5a;},'FTOIQ':function(_0x270252,_0x17a842,_0x3cf98a){return _0x270252(_0x17a842,_0x3cf98a);},'CIBFS':_0x8e542f(0x115),'saDCq':_0x8e542f(0x151),'dnfYE':function(_0x452dec){return _0x452dec();},'LPqJx':'No\x20profiles\x20configured','zMeXM':'\x20(active)','ppueL':_0x8e542f(0x119),'YxqzJ':function(_0x48f6c2,_0x5a735b){return _0x48f6c2!==_0x5a735b;},'xtztu':'(not\x20found)'};console[_0x8e542f(0x158)](_0x1c4219[_0x8e542f(0x143)]);const _0x4efcca=process[_0x8e542f(0x11e)](),_0x3387bc=_0x1c4219[_0x8e542f(0x137)](getRangerDir);if(!existsSync(_0x3387bc)){console[_0x8e542f(0x158)](_0x8e542f(0x12f)+_0x1c4219[_0x8e542f(0x150)](link,_0x4efcca,bold(_0x1c4219['EfRBv'](basename,_0x4efcca)))),console[_0x8e542f(0x158)](_0x8e542f(0x155)),console[_0x8e542f(0x158)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x8e542f(0x12f)+_0x1c4219['FsCKe'](link,_0x4efcca,_0x1c4219['EfRBv'](bold,_0x1c4219['EfRBv'](basename,_0x4efcca))));const _0x5e094d=getCurrentVersion(),_0x1c8e61=_0x1c4219['bsBVT'](getLatestVersion);if(_0x1c8e61[_0x8e542f(0x12b)]&&_0x1c8e61['version']!==_0x5e094d)console[_0x8e542f(0x158)]('Version:\x20'+_0x5e094d+'\x20(latest:\x20'+_0x1c8e61[_0x8e542f(0x12b)]+')'),console[_0x8e542f(0x158)]('\x20\x20Run:\x20ranger\x20update');else _0x1c8e61[_0x8e542f(0x12b)]?console['log']('Version:\x20'+_0x5e094d+_0x8e542f(0x102)):console[_0x8e542f(0x158)]('Version:\x20'+_0x5e094d);const _0x300ff4=await getToken();if(_0x300ff4){const _0x2ca098=await getCurrentUser(_0x300ff4);_0x2ca098['success']?console[_0x8e542f(0x158)](_0x8e542f(0x14d)+bold(_0x2ca098[_0x8e542f(0x14c)][_0x8e542f(0x128)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x8e542f(0x129)));}else console['log'](_0x8e542f(0xf9)),console['log'](_0x8e542f(0x129));process['env']['DEBUG']&&(console[_0x8e542f(0x158)]('API\x20Environment:\x20'+_0x1c4219['IRsBd'](getCurrentEnvironment)),console['log'](_0x8e542f(0x140)+_0x1c4219['TlIAn'](getApiBaseUrl)));console['log'](_0x1c4219[_0x8e542f(0xfd)]);const _0x516879=await _0x1c4219[_0x8e542f(0x137)](getOpencodePluginStatus);if(_0x1c4219[_0x8e542f(0x114)](_0x516879['status'],_0x1c4219['vGxeh']))console['log']('\x20\x20'+bold(_0x1c4219[_0x8e542f(0x14e)])+_0x8e542f(0x11f)),_0x516879['details']&&console['log']('\x20\x20'+_0x516879['details']);else _0x516879['status']==='not_configured'?(console['log'](_0x8e542f(0x13f)),_0x516879[_0x8e542f(0xf7)]&&console['log']('\x20\x20'+_0x516879['details']),console[_0x8e542f(0x158)](_0x8e542f(0x131))):console['log'](_0x1c4219['weuMU']);console[_0x8e542f(0x158)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x1ef0c4=await _0x1c4219['BBvcn'](getPluginInfo,'ranger@trailhead');if(_0x1ef0c4){const _0x44ff12=_0x1ef0c4['scope']||_0x8e542f(0x122),_0x10ac74=_0x1ef0c4[_0x8e542f(0x10a)]?_0x1c4219[_0x8e542f(0x138)]:_0x8e542f(0x123);console['log']('\x20\x20'+bold(_0x8e542f(0x13e))+_0x8e542f(0x112)+_0x44ff12+',\x20'+_0x10ac74+')');}else console[_0x8e542f(0x158)](_0x1c4219['mrwIh']),console['log'](_0x1c4219['sTAsW']);console['log'](_0x8e542f(0x14f));const {project:_0x1343e2,user:_0x21497d}=await _0x1c4219[_0x8e542f(0x137)](getInstalledSkills),_0x2db20b=_0x1343e2[_0x8e542f(0x148)](_0x53ea92=>RANGER_MANAGED_SKILLS['includes'](_0x53ea92[_0x8e542f(0x146)])),_0x3703e2=_0x21497d['filter'](_0x3998d0=>RANGER_MANAGED_SKILLS[_0x8e542f(0x111)](_0x3998d0[_0x8e542f(0x146)])),_0x49f254=_0x2db20b[_0x8e542f(0x126)]+_0x3703e2['length'];if(_0x49f254===0x0)console['log'](_0x1c4219[_0x8e542f(0x139)]),console[_0x8e542f(0x158)](_0x8e542f(0x117));else{if(_0x1c4219[_0x8e542f(0x118)](_0x2db20b['length'],0x0)){console[_0x8e542f(0x158)]('\x20\x20Project-level:');for(const _0x48231b of _0x2db20b){console[_0x8e542f(0x158)]('\x20\x20\x20\x20'+bold(_0x48231b['displayName'])+':\x20'+_0x1c4219['FTOIQ'](link,_0x48231b['path'],basename(_0x48231b['path'])));}}if(_0x1c4219['aRkuq'](_0x3703e2['length'],0x0)){console['log'](_0x1c4219['CIBFS']);for(const _0xa33440 of _0x3703e2){console[_0x8e542f(0x158)](_0x8e542f(0x107)+bold(_0xa33440['displayName'])+':\x20'+link(_0xa33440['path'],basename(_0xa33440['path'])));}}}console[_0x8e542f(0x158)](_0x1c4219[_0x8e542f(0x135)]);const {envs:_0x58750f,activeEnv:_0x2a2ccc}=await _0x1c4219[_0x8e542f(0xfc)](getEnvironments);if(_0x1c4219[_0x8e542f(0x114)](_0x58750f['length'],0x0))console['log'](_0x1c4219[_0x8e542f(0x10e)]),console[_0x8e542f(0x158)](_0x8e542f(0xfa));else{for(const _0x4e23cb of _0x58750f){const _0xfd9f23=_0x4e23cb[_0x8e542f(0x13b)]?_0x1c4219['zMeXM']:'',_0x36bf37=_0x4e23cb['hasEncryptedAuth']?_0x1c4219[_0x8e542f(0x10d)]:_0x4e23cb[_0x8e542f(0x11d)]?'plaintext':'none';console['log']('\x20\x20'+_0x1c4219[_0x8e542f(0x13c)](bold,_0x4e23cb[_0x8e542f(0x146)])+_0xfd9f23),console[_0x8e542f(0x158)](_0x8e542f(0x156)+_0x36bf37),_0x1c4219['YxqzJ'](_0x4e23cb[_0x8e542f(0x101)],_0x1c4219[_0x8e542f(0x134)])&&console[_0x8e542f(0x158)](_0x8e542f(0x11a)+link(_0x4e23cb['settingsPath'],basename(_0x4e23cb[_0x8e542f(0x101)])));}!_0x2a2ccc&&(console['log'](_0x8e542f(0x13a)),console[_0x8e542f(0x158)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x58750f[_0x8e542f(0x106)](_0x2dff7d=>_0x2dff7d['name'])['join'](',\x20')+')'));}console[_0x8e542f(0x158)]('');}
|
|
1
|
+
const _0x5a5d42=_0x2fca;(function(_0x4b5dca,_0x715065){const _0x2e32fe=_0x2fca,_0x222539=_0x4b5dca();while(!![]){try{const _0x826251=-parseInt(_0x2e32fe(0x1ad))/0x1*(parseInt(_0x2e32fe(0x198))/0x2)+parseInt(_0x2e32fe(0x18c))/0x3+-parseInt(_0x2e32fe(0x1c0))/0x4*(-parseInt(_0x2e32fe(0x18d))/0x5)+parseInt(_0x2e32fe(0x19f))/0x6*(-parseInt(_0x2e32fe(0x1b1))/0x7)+-parseInt(_0x2e32fe(0x1a5))/0x8+parseInt(_0x2e32fe(0x1c3))/0x9+-parseInt(_0x2e32fe(0x171))/0xa*(-parseInt(_0x2e32fe(0x197))/0xb);if(_0x826251===_0x715065)break;else _0x222539['push'](_0x222539['shift']());}catch(_0x4a148c){_0x222539['push'](_0x222539['shift']());}}}(_0x2a16,0xb1aed));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';function _0x2fca(_0x15822f,_0x5362f3){_0x15822f=_0x15822f-0x16d;const _0x2a1601=_0x2a16();let _0x2fca55=_0x2a1601[_0x15822f];return _0x2fca55;}const bold=_0x4e596f=>'\x1b[1m'+_0x4e596f+'\x1b[0m',link=(_0x2d47f9,_0x437f9e)=>'\x1b]8;;file://'+_0x2d47f9+'\x07'+(_0x437f9e||_0x2d47f9)+_0x5a5d42(0x1bf);async function getOpencodePluginStatus(){const _0xdd906f=_0x5a5d42,_0xeaf9d2={'sNkzt':function(_0x25c6c2,_0x2ac70e){return _0x25c6c2(_0x2ac70e);},'oeeVx':'not_installed','kkOYY':_0xdd906f(0x1ab),'Dmmnm':function(_0x5afcf8,_0x592f55){return _0x5afcf8>_0x592f55;},'XFTZc':'not_configured','FDaHz':function(_0x3dbe8a,_0xb02239){return _0x3dbe8a(_0xb02239);},'OoLQX':'string','ltkqR':function(_0x10fca2,_0x57c0f7,_0x5bee97,_0x18741d){return _0x10fca2(_0x57c0f7,_0x5bee97,_0x18741d);},'JtqLd':'debug','ChnUd':_0xdd906f(0x1ce),'PCyGb':_0xdd906f(0x18e),'dCjqm':_0xdd906f(0x176),'fjHMI':'error','OBFwQ':'close'};return new Promise(_0x15dead=>{const _0x23f6ce=_0xdd906f,_0x3fd8ea={'yrdMA':_0xeaf9d2['OoLQX'],'URVmP':'opencode-plugin'},_0x2d6f00=_0xeaf9d2[_0x23f6ce(0x1b4)](spawn,_0x23f6ce(0x17c),[_0xeaf9d2['JtqLd'],_0xeaf9d2[_0x23f6ce(0x1c7)]],{'stdio':[_0xeaf9d2['PCyGb'],_0xeaf9d2[_0x23f6ce(0x18f)],_0x23f6ce(0x176)]});let _0xb16422='';_0x2d6f00['stdout']?.['on'](_0x23f6ce(0x1b6),_0x1cd2a0=>{const _0x4e67bb=_0x23f6ce;_0xb16422+=_0x1cd2a0[_0x4e67bb(0x1ca)]();}),_0x2d6f00['stderr']?.['on'](_0x23f6ce(0x1b6),_0x39143a=>{_0xb16422+=_0x39143a['toString']();}),_0x2d6f00['on'](_0xeaf9d2['fjHMI'],()=>{const _0x38c0b4=_0x23f6ce;_0xeaf9d2['sNkzt'](_0x15dead,{'status':_0xeaf9d2[_0x38c0b4(0x190)]});}),_0x2d6f00['on'](_0xeaf9d2[_0x23f6ce(0x184)],_0x34e4f9=>{const _0x28876a=_0x23f6ce;if(_0x34e4f9!==0x0){_0xeaf9d2['sNkzt'](_0x15dead,{'status':_0xeaf9d2['oeeVx']});return;}const _0x27cddd=_0xb16422[_0x28876a(0x1c8)]();let _0x4920ab=null;if(_0x27cddd)try{_0x4920ab=JSON['parse'](_0x27cddd);}catch{const _0xc2f076=_0x27cddd['match'](/\{[\s\S]*\}$/);if(_0xc2f076)try{_0x4920ab=JSON['parse'](_0xc2f076[0x0]);}catch{_0x4920ab=null;}}const _0x131ffb=Array['isArray'](_0x4920ab?.['plugin'])?_0x4920ab?.['plugin']:[],_0x22e443=_0x131ffb['some'](_0x84712e=>{const _0x1000e0=_0x28876a;if(typeof _0x84712e!==_0x3fd8ea[_0x1000e0(0x1c1)])return![];return _0x84712e[_0x1000e0(0x174)](_0x1000e0(0x1bc))||_0x84712e['includes'](_0x3fd8ea['URVmP']);});if(_0x22e443){_0xeaf9d2['sNkzt'](_0x15dead,{'status':_0xeaf9d2['kkOYY'],'details':_0xeaf9d2[_0x28876a(0x1a3)](_0x131ffb[_0x28876a(0x17e)],0x0)?_0x131ffb['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x131ffb[_0x28876a(0x17e)]>0x0){_0xeaf9d2['sNkzt'](_0x15dead,{'status':_0xeaf9d2['XFTZc'],'details':_0x131ffb['length']+_0x28876a(0x1c6)});return;}_0xeaf9d2['FDaHz'](_0x15dead,{'status':_0xeaf9d2['XFTZc']});});});}async function getSkillsFromDir(_0x5872be,_0x16dd44){const _0x62c79a=_0x5a5d42,_0x24636e={'JBrEU':function(_0x12d79a,_0x285df1,_0x40b7db){return _0x12d79a(_0x285df1,_0x40b7db);}};if(!existsSync(_0x5872be))return[];const _0x3194fc=[];try{const _0x2fa6d1=await readdir(_0x5872be,{'withFileTypes':!![]});for(const _0x25e348 of _0x2fa6d1){if(_0x25e348['isDirectory']()){const _0x32ea26=join(_0x5872be,_0x25e348['name'],_0x62c79a(0x182));if(existsSync(_0x32ea26)){let _0x196461=_0x25e348['name'];try{const _0x5e689f=await _0x24636e[_0x62c79a(0x19b)](readFile,_0x32ea26,_0x62c79a(0x192)),_0x2b67e8=_0x5e689f[_0x62c79a(0x19d)](/name:\s*(.+)/);_0x2b67e8&&(_0x196461=_0x2b67e8[0x1]['trim']());}catch{}_0x3194fc[_0x62c79a(0x193)]({'name':_0x25e348['name'],'displayName':_0x196461,'path':_0x32ea26,'level':_0x16dd44});}}}}catch{return[];}return _0x3194fc;}function _0x2a16(){const _0x7e929d=['NpnoV','JBrEU','API\x20Environment:\x20','match','env','3624VNGAkS','\x20\x20Run:\x20ranger\x20setup\x20--opencode','settingsPath','path','Dmmnm','map','6276600CepJdF','OHhVX','organizationName','VDlYI','SEkXb','\x0a📊\x20Ranger\x20Status\x0a','configured','log','289763rllVwm','\x20(up\x20to\x20date)','hasPlaintextAuth','details','7672FSVBjm','name','ranger@trailhead','ltkqR','PyMPG','data','RrLZi','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','project','\x20\x20\x20\x20Settings:\x20','not_configured','@ranger-testing/opencode-plugin','filter','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x1b]8;;\x07','92Ukihhx','yrdMA','\x20\x20Not\x20configured','2729781BEUZRj','jEhiG','rLYpU','\x20plugin(s)\x20configured','ChnUd','trim','auth.json.enc','toString','XelSQ','none','DEBUG','config','user','(not\x20found)',':\x20configured','RSyGN','10672510vDJDuD','KJrhs','No\x20profiles\x20configured','includes','IaySl','pipe','\x20\x20\x20\x20','Root:\x20','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20(latest:\x20','enabled','opencode','all','length','cedDO','\x0a---\x20OpenCode\x20Plugin\x20---','zentB','SKILL.md','settings.json','OBFwQ','Version:\x20','version','Lqzrp','displayName','\x20\x20Run:\x20ranger\x20setup\x20[token]','hasEncryptedAuth','cwd','3917232VYFxPH','79855JXDlVB','ignore','dCjqm','oeeVx','auth.json','utf-8','push','Wusvf','\x20\x20\x20\x20Auth:\x20','zlVEv','11oDvXjJ','6oCGCJj','\x20(active)'];_0x2a16=function(){return _0x7e929d;};return _0x2a16();}async function getInstalledSkills(){const _0x3fef9c=_0x5a5d42,_0x1014f3={'XelSQ':_0x3fef9c(0x1b9),'Wusvf':function(_0x5de053,_0x39b475,_0x126f0e){return _0x5de053(_0x39b475,_0x126f0e);},'MlIOC':function(_0x683ab9){return _0x683ab9();},'XLtky':_0x3fef9c(0x16d)},[_0x422b8e,_0x4a3e31]=await Promise[_0x3fef9c(0x17d)]([getSkillsFromDir(getProjectSkillsDir(),_0x1014f3[_0x3fef9c(0x1cb)]),_0x1014f3[_0x3fef9c(0x194)](getSkillsFromDir,_0x1014f3['MlIOC'](getUserSkillsDir),_0x1014f3['XLtky'])]);return{'project':_0x422b8e,'user':_0x4a3e31};}async function getEnvironments(){const _0x5d9b4d=_0x5a5d42,_0x300f09={'zlVEv':function(_0x3ee428,_0x5debb0){return _0x3ee428(_0x5debb0);},'HgOSw':function(_0x1ddbe7,_0x32a104,_0x59ed52){return _0x1ddbe7(_0x32a104,_0x59ed52);},'jEhiG':_0x5d9b4d(0x191),'CVKvj':function(_0x30428e,_0x1815d1){return _0x30428e===_0x1815d1;},'NpnoV':function(_0x2eb698){return _0x2eb698();}},{envNames:_0x2ed1e1,activeEnv:_0x456738}=await getEnvNames(),_0x5501d5=_0x300f09[_0x5d9b4d(0x19a)](getRangerDir);if(!existsSync(_0x5501d5))return{'envs':[],'activeEnv':null};const _0x46b0ed=_0x2ed1e1[_0x5d9b4d(0x1a4)](_0x29e0f6=>{const _0x364e24=_0x5d9b4d,_0x4b7275=_0x300f09[_0x364e24(0x196)](getEnvDir,_0x29e0f6),_0x516cb1=join(_0x4b7275,_0x364e24(0x183)),_0xc834e1=_0x300f09['HgOSw'](join,_0x4b7275,_0x300f09[_0x364e24(0x1c4)]),_0x59b308=_0x300f09['HgOSw'](join,_0x4b7275,_0x364e24(0x1c9));return{'name':_0x29e0f6,'settingsPath':_0x300f09[_0x364e24(0x196)](existsSync,_0x516cb1)?_0x516cb1:_0x364e24(0x16e),'hasPlaintextAuth':existsSync(_0xc834e1),'hasEncryptedAuth':existsSync(_0x59b308),'isActive':_0x300f09['CVKvj'](_0x29e0f6,_0x456738)};});return{'envs':_0x46b0ed,'activeEnv':_0x456738};}export async function status(){const _0x1c18a0=_0x5a5d42,_0x5703d5={'XkIkJ':_0x1c18a0(0x1aa),'zentB':function(_0x50cf09,_0x375eed,_0x163d57){return _0x50cf09(_0x375eed,_0x163d57);},'dlSAt':function(_0x38e67b,_0x21188b){return _0x38e67b(_0x21188b);},'VDlYI':function(_0x9fcb9b){return _0x9fcb9b();},'RrLZi':function(_0x1920c1,_0x565476){return _0x1920c1===_0x565476;},'AmIny':'configured','PTWTp':_0x1c18a0(0x1bc),'SEkXb':_0x1c18a0(0x1bb),'Fxzfz':_0x1c18a0(0x1a0),'ZyDON':_0x1c18a0(0x1b3),'OHhVX':function(_0x4b28c7,_0x3daa79){return _0x4b28c7(_0x3daa79);},'WLYGk':_0x1c18a0(0x1be),'VFzde':function(_0x5a98c4,_0x18cd97){return _0x5a98c4+_0x18cd97;},'PyMPG':'No\x20skills\x20installed','RSyGN':function(_0x351822,_0x419432){return _0x351822>_0x419432;},'WlJQY':'\x20\x20Project-level:','Lqzrp':'\x20\x20User-level:','znvNy':function(_0x2fa884,_0x4a57f3){return _0x2fa884(_0x4a57f3);},'rLYpU':_0x1c18a0(0x199),'IaySl':'plaintext','lzZGY':_0x1c18a0(0x1cc),'tBmtw':function(_0x24d4c0,_0x5086ac){return _0x24d4c0(_0x5086ac);},'cedDO':function(_0x167d3c,_0x3a80c8){return _0x167d3c!==_0x3a80c8;},'KJrhs':'(not\x20found)'};console['log'](_0x5703d5['XkIkJ']);const _0x1c751d=process[_0x1c18a0(0x18b)](),_0x22255d=getRangerDir();if(!existsSync(_0x22255d)){console[_0x1c18a0(0x1ac)]('Root:\x20'+link(_0x1c751d,bold(basename(_0x1c751d)))),console[_0x1c18a0(0x1ac)](_0x1c18a0(0x179)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x1c18a0(0x178)+_0x5703d5['zentB'](link,_0x1c751d,bold(_0x5703d5['dlSAt'](basename,_0x1c751d))));const _0x324a5d=getCurrentVersion(),_0x64338f=getLatestVersion();if(_0x64338f['version']&&_0x64338f['version']!==_0x324a5d)console['log']('Version:\x20'+_0x324a5d+_0x1c18a0(0x17a)+_0x64338f[_0x1c18a0(0x186)]+')'),console[_0x1c18a0(0x1ac)]('\x20\x20Run:\x20ranger\x20update');else _0x64338f[_0x1c18a0(0x186)]?console[_0x1c18a0(0x1ac)]('Version:\x20'+_0x324a5d+_0x1c18a0(0x1ae)):console['log'](_0x1c18a0(0x185)+_0x324a5d);const _0x19a246=await getToken();if(_0x19a246){const _0x5bbf7b=await getCurrentUser(_0x19a246);_0x5bbf7b['success']?console['log']('Organization:\x20'+bold(_0x5bbf7b['user'][_0x1c18a0(0x1a7)])):(console[_0x1c18a0(0x1ac)](_0x1c18a0(0x1b8)),console[_0x1c18a0(0x1ac)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x1c18a0(0x1ac)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x1c18a0(0x189));process[_0x1c18a0(0x19e)][_0x1c18a0(0x1cd)]&&(console['log'](_0x1c18a0(0x19c)+getCurrentEnvironment()),console[_0x1c18a0(0x1ac)]('API\x20URL:\x20'+_0x5703d5['VDlYI'](getApiBaseUrl)));console['log'](_0x1c18a0(0x180));const _0x57abe3=await getOpencodePluginStatus();if(_0x5703d5['RrLZi'](_0x57abe3['status'],_0x5703d5['AmIny']))console[_0x1c18a0(0x1ac)]('\x20\x20'+bold(_0x5703d5['PTWTp'])+_0x1c18a0(0x16f)),_0x57abe3[_0x1c18a0(0x1b0)]&&console[_0x1c18a0(0x1ac)]('\x20\x20'+_0x57abe3[_0x1c18a0(0x1b0)]);else _0x5703d5['RrLZi'](_0x57abe3['status'],_0x5703d5[_0x1c18a0(0x1a9)])?(console['log'](_0x1c18a0(0x1c2)),_0x57abe3['details']&&console['log']('\x20\x20'+_0x57abe3['details']),console['log'](_0x5703d5['Fxzfz'])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x59a33b=await getPluginInfo(_0x5703d5['ZyDON']);if(_0x59a33b){const _0x5c73e3=_0x59a33b['scope']||'unknown',_0x53233d=_0x59a33b[_0x1c18a0(0x17b)]?'enabled':'disabled';console['log']('\x20\x20'+_0x5703d5[_0x1c18a0(0x1a6)](bold,_0x1c18a0(0x1b3))+':\x20installed\x20('+_0x5c73e3+',\x20'+_0x53233d+')');}else console['log']('\x20\x20Not\x20installed'),console['log'](_0x5703d5['WLYGk']);console['log']('\x0a---\x20Skills\x20---');const {project:_0x413c10,user:_0x374082}=await _0x5703d5['VDlYI'](getInstalledSkills),_0x4345f2=_0x413c10[_0x1c18a0(0x1bd)](_0xcefe1a=>RANGER_MANAGED_SKILLS[_0x1c18a0(0x174)](_0xcefe1a[_0x1c18a0(0x1b2)])),_0x2c893c=_0x374082[_0x1c18a0(0x1bd)](_0x1ae0d0=>RANGER_MANAGED_SKILLS['includes'](_0x1ae0d0['name'])),_0x189a4d=_0x5703d5['VFzde'](_0x4345f2[_0x1c18a0(0x17e)],_0x2c893c[_0x1c18a0(0x17e)]);if(_0x5703d5[_0x1c18a0(0x1b7)](_0x189a4d,0x0))console[_0x1c18a0(0x1ac)](_0x5703d5[_0x1c18a0(0x1b5)]),console[_0x1c18a0(0x1ac)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5703d5[_0x1c18a0(0x170)](_0x4345f2[_0x1c18a0(0x17e)],0x0)){console['log'](_0x5703d5['WlJQY']);for(const _0x490a0d of _0x4345f2){console['log']('\x20\x20\x20\x20'+bold(_0x490a0d[_0x1c18a0(0x188)])+':\x20'+link(_0x490a0d['path'],basename(_0x490a0d[_0x1c18a0(0x1a2)])));}}if(_0x2c893c['length']>0x0){console[_0x1c18a0(0x1ac)](_0x5703d5[_0x1c18a0(0x187)]);for(const _0x38da4f of _0x2c893c){console[_0x1c18a0(0x1ac)](_0x1c18a0(0x177)+_0x5703d5['OHhVX'](bold,_0x38da4f[_0x1c18a0(0x188)])+':\x20'+_0x5703d5[_0x1c18a0(0x181)](link,_0x38da4f['path'],_0x5703d5['znvNy'](basename,_0x38da4f[_0x1c18a0(0x1a2)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x2d9753,activeEnv:_0x272931}=await _0x5703d5[_0x1c18a0(0x1a8)](getEnvironments);if(_0x2d9753['length']===0x0)console['log'](_0x1c18a0(0x173)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x282273 of _0x2d9753){const _0x252520=_0x282273['isActive']?_0x5703d5[_0x1c18a0(0x1c5)]:'',_0x2c9aa8=_0x282273[_0x1c18a0(0x18a)]?'encrypted':_0x282273[_0x1c18a0(0x1af)]?_0x5703d5[_0x1c18a0(0x175)]:_0x5703d5['lzZGY'];console['log']('\x20\x20'+_0x5703d5['tBmtw'](bold,_0x282273['name'])+_0x252520),console['log'](_0x1c18a0(0x195)+_0x2c9aa8),_0x5703d5[_0x1c18a0(0x17f)](_0x282273['settingsPath'],_0x5703d5[_0x1c18a0(0x172)])&&console['log'](_0x1c18a0(0x1ba)+_0x5703d5[_0x1c18a0(0x181)](link,_0x282273[_0x1c18a0(0x1a1)],basename(_0x282273['settingsPath'])));}!_0x272931&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x1c18a0(0x1ac)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x2d9753['map'](_0x3b83f7=>_0x3b83f7['name'])['join'](',\x20')+')'));}console[_0x1c18a0(0x1ac)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x30c913,_0x21d00f){const _0x551ab0=_0x8555,_0x1761fb=_0x30c913();while(!![]){try{const _0x2b322e=-parseInt(_0x551ab0(0x93))/0x1+-parseInt(_0x551ab0(0x83))/0x2+-parseInt(_0x551ab0(0xd1))/0x3+parseInt(_0x551ab0(0xbb))/0x4+-parseInt(_0x551ab0(0xc0))/0x5*(-parseInt(_0x551ab0(0xae))/0x6)+parseInt(_0x551ab0(0xce))/0x7*(-parseInt(_0x551ab0(0xc3))/0x8)+parseInt(_0x551ab0(0xb6))/0x9;if(_0x2b322e===_0x21d00f)break;else _0x1761fb['push'](_0x1761fb['shift']());}catch(_0x54b23c){_0x1761fb['push'](_0x1761fb['shift']());}}}(_0x3d33,0xb63b0));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';function _0x8555(_0x1e8e56,_0x5247e7){_0x1e8e56=_0x1e8e56-0x81;const _0x3d3388=_0x3d33();let _0x8555df=_0x3d3388[_0x1e8e56];return _0x8555df;}import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x3d33(){const _0x451783=['Claude\x20plugin\x20update\x20failed\x20for\x20','update','aZgQl','EVebA','gxIHM','LtGcQ','CQctd','install','OTWca','Update\x20failed\x20for\x20@','\x20—\x20reinstalling\x20@','VaJBW','vRWIY','utf-8','test','1231866dcDATP','QQktc','YQbDZ','eaQRA','\x20ranger-managed\x20skill(s)...','user','claude','close','wUhkt',').\x20Staying\x20on\x20','win32','log','xGwss','tNCzQ','CtPiU','split','active-profile.txt','Checking\x20for\x20updates...','khztU','endsWith','ysnrW','...',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','npm','\x0a✅\x20Update\x20complete!','FZnMf','Update\x20failed.','9012pmRGyc','\x0aYour\x20version\x20(','inherit','DmLdS','KefWB','error','OPxud','IArkB','13773141miVHZd','marketplace','ranger@trailhead','TBvWk','latest','473084sWJnAs','ITToO','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','\x20skill\x20','3585MgsjxH','trailhead','ysbeg','8gtRIPe','CsHUY','warn','version','join','eFlbQ','findIndex','project','BVMMo','timeoutMs','\x0aCurrent\x20version:\x20','1294153xDhkMm','platform','ZVEAk','261708gDFjAd','CRrKz','opencode','push','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','pnEpJ','trim','ignore','nZuQx','950314rrBCfw'];_0x3d33=function(){return _0x451783;};return _0x3d33();}async function runCommand(_0x8fa2f0,_0x3e76e9,_0x236714){const _0x403b82=_0x8555,_0x1ac76c={'RJiBs':function(_0x374afb,_0x23169e,_0x56f049,_0x428408){return _0x374afb(_0x23169e,_0x56f049,_0x428408);},'ITToO':'inherit','vRWIY':'win32','EVebA':function(_0xcc7148,_0x200dd2,_0x4b8291){return _0xcc7148(_0x200dd2,_0x4b8291);},'wAnQV':_0x403b82(0x9a)};return new Promise(_0x1172fc=>{const _0x35624f=_0x403b82;let _0x3e854b=![],_0x5ea3c6;const _0x5d1698=_0xc32591=>{if(_0x3e854b)return;_0x3e854b=!![],_0x5ea3c6&&clearTimeout(_0x5ea3c6),_0x1172fc(_0xc32591);},_0x2ecadc=_0x1ac76c['RJiBs'](spawn,_0x8fa2f0,_0x3e76e9,{'stdio':[_0x35624f(0x81),_0x236714?.['stdio']??_0x1ac76c[_0x35624f(0xbc)],_0x236714?.['stdio']??_0x35624f(0xb0)],'shell':process['platform']===_0x1ac76c[_0x35624f(0x90)]});_0x5ea3c6=_0x236714?.[_0x35624f(0xcc)]?_0x1ac76c[_0x35624f(0x87)](setTimeout,()=>{_0x2ecadc['kill'](),_0x2ecadc['unref'](),_0x5d1698(![]);},_0x236714['timeoutMs']):undefined,_0x2ecadc['on'](_0x1ac76c['wAnQV'],_0x4d6c2e=>{_0x5d1698(_0x4d6c2e===0x0);}),_0x2ecadc['on'](_0x35624f(0xb3),()=>{_0x5d1698(![]);});});}export function resolveDistTag(_0x54f51b){const _0x475c8e=_0x8555,_0x46aab3={'xGwss':_0x475c8e(0xba)};if(/-alpha\./i['test'](_0x54f51b))return'alpha';if(/-beta\./i[_0x475c8e(0x92)](_0x54f51b))return'beta';if(/-rc\./i['test'](_0x54f51b))return'rc';return _0x46aab3[_0x475c8e(0x9f)];}async function runInstall(_0x3d6665='latest'){const _0x205d82=_0x8555,_0x38fb06={'NGWSp':function(_0x5d6926,_0x4ebba0){return _0x5d6926(_0x4ebba0);},'OTWca':function(_0x26fcac,_0x16599d){return _0x26fcac===_0x16599d;},'ysnrW':_0x205d82(0x9d),'rlhxc':'error'};return new Promise(_0xef2fe6=>{const _0xb39348=_0x205d82;console[_0xb39348(0x9e)]('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x3d6665+'...\x0a');const _0x505bd6=spawn(_0xb39348(0xaa),[_0xb39348(0x8b),'-g',PACKAGE_NAME+'@'+_0x3d6665],{'stdio':['ignore',_0xb39348(0xb0),'inherit'],'shell':process[_0xb39348(0xcf)]===_0x38fb06[_0xb39348(0xa7)]});_0x505bd6['on']('close',_0x52ab85=>{const _0x2f2920=_0xb39348;_0x38fb06['NGWSp'](_0xef2fe6,_0x38fb06[_0x2f2920(0x8c)](_0x52ab85,0x0));}),_0x505bd6['on'](_0x38fb06['rlhxc'],()=>{_0xef2fe6(![]);});});}async function updateClaudeMarketplace(){const _0x56fbc6=_0x8555,_0x237e22={'ZVEAk':function(_0x5b3772,_0xb567b8,_0x4ccb15,_0x2c1382){return _0x5b3772(_0xb567b8,_0x4ccb15,_0x2c1382);}},_0x318284=await _0x237e22[_0x56fbc6(0xd0)](runCommand,'claude',['plugin',_0x56fbc6(0xb7),'update',_0x56fbc6(0xc1)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x318284)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x1ff116){const _0x3cfb0e=_0x8555,_0x731cc6={'BVMMo':'plugin','qBQkG':function(_0x3efe1f,_0x4c8798,_0x155e8b,_0x5e6b38){return _0x3efe1f(_0x4c8798,_0x155e8b,_0x5e6b38);},'CQctd':function(_0x1aa7c3,_0xe61b43){return _0x1aa7c3??_0xe61b43;}},_0x58d919=[_0x731cc6[_0x3cfb0e(0xcb)],_0x3cfb0e(0x85),_0x3cfb0e(0xb8)];_0x1ff116&&_0x58d919[_0x3cfb0e(0xd4)]('--scope',_0x1ff116);const _0x180e29=await _0x731cc6['qBQkG'](runCommand,'claude',_0x58d919,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x180e29){const _0x1ec9fd=_0x731cc6[_0x3cfb0e(0x8a)](_0x1ff116,_0x3cfb0e(0x98));throw new Error(_0x3cfb0e(0x84)+_0x1ec9fd+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x37d87c,_0x531662,_0x106025){const _0x37439d=_0x8555,_0x166075={'khztU':function(_0x2bbfaf,_0x237596){return _0x2bbfaf===_0x237596;},'ZMfAo':function(_0xb3ceed,_0x2554e3){return _0xb3ceed(_0x2554e3);},'gxIHM':function(_0xe928a9,_0x4e2710,_0x5199b6){return _0xe928a9(_0x4e2710,_0x5199b6);}},_0x11e721=_0x166075[_0x37439d(0xa5)](_0x106025,_0x37439d(0xd3))?getOpencodeSkillsDir(_0x531662):_0x166075['ZMfAo'](getSkillsDir,_0x531662),_0x5d0902=_0x166075[_0x37439d(0x88)](join,_0x11e721,_0x37d87c);return existsSync(_0x5d0902);}async function reinstallSkills(_0x5bf9d8){const _0x6e3643=_0x8555,_0x5a0bf4={'wUhkt':'project','eaQRA':'user','zEiNm':_0x6e3643(0x99),'evKPe':function(_0x16bcc8,_0x2421f3,_0x22f138,_0x441f4f){return _0x16bcc8(_0x2421f3,_0x22f138,_0x441f4f);},'FZnMf':function(_0x3b697f,_0x22b98c,_0x4bc1f3){return _0x3b697f(_0x22b98c,_0x4bc1f3);},'nZuQx':function(_0x29015f,_0x688be4){return _0x29015f===_0x688be4;}},_0xa7158f=[_0x5a0bf4[_0x6e3643(0x9b)],_0x5a0bf4[_0x6e3643(0x96)]],_0x7b4bd4=[];for(const _0x454db4 of _0xa7158f){for(const _0xa40ddd of RANGER_MANAGED_SKILLS){isSkillInstalled(_0xa40ddd,_0x454db4,_0x6e3643(0x99))&&_0x7b4bd4[_0x6e3643(0xd4)]({'skillName':_0xa40ddd,'level':_0x454db4,'platform':_0x5a0bf4['zEiNm']}),_0x5a0bf4['evKPe'](isSkillInstalled,_0xa40ddd,_0x454db4,'opencode')&&_0x7b4bd4['push']({'skillName':_0xa40ddd,'level':_0x454db4,'platform':_0x6e3643(0xd3)});}}for(const _0x382397 of _0xa7158f){for(const _0x2c6373 of DEPRECATED_SKILLS){await _0x5a0bf4[_0x6e3643(0xac)](removeSkill,_0x2c6373,_0x382397);}}if(_0x5a0bf4[_0x6e3643(0x82)](_0x7b4bd4['length'],0x0)){console['log'](_0x6e3643(0xd5));return;}console['log']('\x0aReinstalling\x20'+_0x7b4bd4['length']+_0x6e3643(0x97));for(const {skillName:_0x49cea5,level:_0x7c33be,platform:_0x15ea0f}of _0x7b4bd4){try{await installSkill(_0x49cea5,{'level':_0x7c33be,'cliVersion':_0x5bf9d8,'platform':_0x15ea0f});}catch(_0x3d6d1d){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x15ea0f+'\x20'+_0x7c33be+_0x6e3643(0xbf)+_0x49cea5+':',_0x3d6d1d);}}}async function ensureActiveProfileGitignored(){const _0x11afc3=_0x8555,_0x10b118={'VaJBW':function(_0x1545f0,_0xcc593d,_0x293aea){return _0x1545f0(_0xcc593d,_0x293aea);},'DmLdS':function(_0x24eff5){return _0x24eff5();},'KefWB':'.gitignore','YQbDZ':_0x11afc3(0x91),'aZgQl':function(_0x55795a,_0x258a8f){return _0x55795a===_0x258a8f;},'TBvWk':'active-profile.txt','HiFoN':function(_0x126d23,_0xbdd9dd,_0x2956a4,_0x5e8b04){return _0x126d23(_0xbdd9dd,_0x2956a4,_0x5e8b04);}},_0x2c8020=_0x10b118[_0x11afc3(0x8f)](join,_0x10b118[_0x11afc3(0xb1)](getRangerDir),_0x10b118[_0x11afc3(0xb2)]);if(!existsSync(_0x2c8020))return![];let _0x20866e='';try{_0x20866e=await readFile(_0x2c8020,_0x10b118[_0x11afc3(0x95)]);}catch{return![];}const _0x4e45e3=_0x20866e[_0x11afc3(0xa2)](/\r?\n/);if(_0x4e45e3['some'](_0x559757=>_0x559757['trim']()===_0x11afc3(0xa3)))return![];let _0x209aa2=_0x4e45e3[_0x11afc3(0xc9)](_0x31f0a6=>_0x31f0a6[_0x11afc3(0xd7)]()==='active-feature.txt');_0x10b118[_0x11afc3(0x86)](_0x209aa2,-0x1)&&(_0x209aa2=_0x4e45e3['length']);_0x4e45e3['splice'](_0x209aa2,0x0,_0x10b118[_0x11afc3(0xb9)]);let _0x130754=_0x4e45e3[_0x11afc3(0xc7)]('\x0a');!_0x130754[_0x11afc3(0xa6)]('\x0a')&&(_0x130754+='\x0a');try{await _0x10b118['HiFoN'](writeFile,_0x2c8020,_0x130754,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x2acdb0=_0x8555,_0x176f00={'CRrKz':function(_0x229564){return _0x229564();},'eFlbQ':function(_0xfdd544,_0x3765d6){return _0xfdd544(_0x3765d6);},'CtPiU':'Attempting\x20install\x20anyway...','QQktc':function(_0x5166b9){return _0x5166b9();},'OPxud':'\x0aSuccessfully\x20installed\x20latest\x20version.','tNCzQ':function(_0x1dda5a,_0x5c3004,_0x2b2c48){return _0x1dda5a(_0x5c3004,_0x2b2c48);},'CYvBW':function(_0x20e7c1,_0x35fa5c){return _0x20e7c1===_0x35fa5c;},'pnEpJ':_0x2acdb0(0xad),'LtGcQ':'trailhead','MAwwB':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','IArkB':function(_0x34d4bf,_0x2253cd){return _0x34d4bf(_0x2253cd);},'Irbra':_0x2acdb0(0xca),'ysbeg':_0x2acdb0(0xbe),'CsHUY':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ANQYB':'✓\x20Migrated\x20active\x20profile\x20file'},_0x4e7046=getCurrentVersion();console[_0x2acdb0(0x9e)](_0x2acdb0(0xcd)+_0x4e7046);const _0xf8ac26=resolveDistTag(_0x4e7046);if(_0xf8ac26!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0xf8ac26+_0x2acdb0(0x9c)+_0xf8ac26+_0x2acdb0(0x8e)+_0xf8ac26+_0x2acdb0(0xa8));const _0x90ee7a=await runInstall(_0xf8ac26);if(!_0x90ee7a)throw new Error(_0x2acdb0(0x8d)+_0xf8ac26+'\x20channel.');const _0x388deb=_0x176f00['CRrKz'](getCurrentVersion);console[_0x2acdb0(0x9e)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0xf8ac26+'.'),await _0x176f00['eFlbQ'](reinstallSkills,_0x388deb);const _0xc9bcfc=await migrateActiveProfileFile();_0xc9bcfc&&console[_0x2acdb0(0x9e)]('✓\x20Migrated\x20active\x20profile\x20file');await _0x176f00[_0x2acdb0(0xd2)](ensureActiveProfileGitignored),console[_0x2acdb0(0x9e)]('\x0a✅\x20Update\x20complete!');return;}console['log'](_0x2acdb0(0xa4));const _0x51c8aa=getLatestVersion();let _0x41cbc1=_0x4e7046;if(!_0x51c8aa['version']){console[_0x2acdb0(0xc5)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x51c8aa[_0x2acdb0(0xb3)]),console[_0x2acdb0(0x9e)](_0x176f00[_0x2acdb0(0xa1)]);const _0x59d73e=await _0x176f00[_0x2acdb0(0x94)](runInstall);if(_0x59d73e)console['log'](_0x176f00[_0x2acdb0(0xb4)]),_0x41cbc1=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x51c8aa[_0x2acdb0(0xb3)]);}else{const _0x1c25fe=_0x51c8aa[_0x2acdb0(0xc6)];console['log']('Latest\x20version:\x20\x20'+_0x1c25fe);const _0xf835c2=_0x176f00[_0x2acdb0(0xa0)](compareVersions,_0x4e7046,_0x1c25fe);if(_0x176f00['CYvBW'](_0xf835c2,0x0))console['log'](_0x2acdb0(0xbd));else{if(_0xf835c2<0x0)console[_0x2acdb0(0x9e)](_0x2acdb0(0xaf)+_0x4e7046+_0x2acdb0(0xa9)+_0x1c25fe+').');else{const _0xeafad7=await runInstall();if(_0xeafad7)console[_0x2acdb0(0x9e)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1c25fe),_0x41cbc1=_0x1c25fe;else throw new Error(_0x176f00[_0x2acdb0(0xd6)]);}}}await reinstallSkills(_0x41cbc1);const _0x27fb6b=await _0x176f00[_0x2acdb0(0xc8)](isMarketplaceAdded,_0x176f00[_0x2acdb0(0x89)]),_0xfcd4b3=await isPluginInstalled('ranger@trailhead');_0x27fb6b&&(await updateClaudeMarketplace(),console['log'](_0x176f00['MAwwB']));if(_0xfcd4b3){const _0x9f0c6f=await _0x176f00[_0x2acdb0(0xb5)](getPluginInfo,_0x2acdb0(0xb8));_0x176f00['CYvBW'](_0x9f0c6f?.['scope'],_0x176f00['Irbra'])?(await updateClaudePlugin('project'),console[_0x2acdb0(0x9e)](_0x176f00[_0x2acdb0(0xc2)])):(await updateClaudePlugin(),console[_0x2acdb0(0x9e)](_0x176f00[_0x2acdb0(0xc4)]));}const _0x1c07e4=await migrateActiveProfileFile();_0x1c07e4&&console[_0x2acdb0(0x9e)](_0x176f00['ANQYB']);const _0x56c371=await ensureActiveProfileGitignored();console[_0x2acdb0(0x9e)](_0x2acdb0(0xab));}
|
|
1
|
+
const _0x47a9a2=_0xfe66;(function(_0x25a893,_0x5bd928){const _0x5a6875=_0xfe66,_0x20084c=_0x25a893();while(!![]){try{const _0xab1097=-parseInt(_0x5a6875(0x8d))/0x1*(parseInt(_0x5a6875(0x77))/0x2)+parseInt(_0x5a6875(0x80))/0x3+-parseInt(_0x5a6875(0x9f))/0x4*(-parseInt(_0x5a6875(0x9b))/0x5)+-parseInt(_0x5a6875(0xb7))/0x6*(parseInt(_0x5a6875(0x8a))/0x7)+parseInt(_0x5a6875(0xb8))/0x8*(-parseInt(_0x5a6875(0x96))/0x9)+-parseInt(_0x5a6875(0x7a))/0xa+parseInt(_0x5a6875(0x7c))/0xb;if(_0xab1097===_0x5bd928)break;else _0x20084c['push'](_0x20084c['shift']());}catch(_0x16377d){_0x20084c['push'](_0x20084c['shift']());}}}(_0x4c95,0x63d97));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';function _0xfe66(_0x485fad,_0xf43a2d){_0x485fad=_0x485fad-0x6d;const _0x4c9515=_0x4c95();let _0xfe6688=_0x4c9515[_0x485fad];return _0xfe6688;}import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x25e701,_0x17719f,_0x59949f){const _0x18c876=_0xfe66,_0x19f81f={'AgzEi':function(_0x16ccdd,_0xcd63e2){return _0x16ccdd(_0xcd63e2);},'AkVWn':'inherit','IURYo':_0x18c876(0x93)};return new Promise(_0x2529c3=>{const _0x2d835a=_0x18c876;let _0x536286=![],_0x25f048;const _0x3aad60=_0x4a7284=>{if(_0x536286)return;_0x536286=!![],_0x25f048&&clearTimeout(_0x25f048),_0x2529c3(_0x4a7284);},_0xe4d353=spawn(_0x25e701,_0x17719f,{'stdio':[_0x2d835a(0xb3),_0x59949f?.[_0x2d835a(0xa3)]??_0x2d835a(0x97),_0x59949f?.[_0x2d835a(0xa3)]??_0x19f81f[_0x2d835a(0x6e)]],'cwd':_0x59949f?.[_0x2d835a(0x81)],'shell':process[_0x2d835a(0x79)]==='win32'});_0x25f048=_0x59949f?.[_0x2d835a(0xa4)]?setTimeout(()=>{const _0x5dcfd0=_0x2d835a;_0xe4d353[_0x5dcfd0(0xa5)](),_0xe4d353['unref'](),_0x3aad60(![]);},_0x59949f['timeoutMs']):undefined,_0xe4d353['on'](_0x2d835a(0x75),_0x4c1d4b=>{_0x19f81f['AgzEi'](_0x3aad60,_0x4c1d4b===0x0);}),_0xe4d353['on'](_0x19f81f['IURYo'],()=>{_0x3aad60(![]);});});}export function resolveDistTag(_0x65026a){const _0x2db7dd=_0xfe66,_0x1b09bd={'ckWOA':_0x2db7dd(0xb5),'ZfEOL':_0x2db7dd(0x71)};if(/-alpha\./i[_0x2db7dd(0x6f)](_0x65026a))return _0x2db7dd(0xb1);if(/-beta\./i['test'](_0x65026a))return _0x1b09bd[_0x2db7dd(0x8b)];if(/-rc\./i[_0x2db7dd(0x6f)](_0x65026a))return'rc';return _0x1b09bd['ZfEOL'];}function _0x4c95(){const _0x3ea18c=['4735014CBrHFu','271784MVvJFK','\x20channel.','opencode','.gitignore','project','wqwVg','gJtfG','active-feature.txt','AkVWn','test','UBepH','latest','log','SNqhN','\x20\x20Failed\x20to\x20reinstall\x20','close','split','46paaftI','Update\x20failed\x20for\x20@','platform','3567050UEloBA','plugin','17440093MyWPay','local','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','ViIUZ','454032xOATEu','cwd','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','push','active-profile.txt','\x0a✅\x20Update\x20complete!','\x20ranger-managed\x20skill(s)...','\x0aCurrent\x20version:\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','trim','7LPOMWs','ckWOA','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','3813yuwUMq','length','\x0aReinstalling\x20','scope','kYCuP','npm','error','fmirl','findIndex','198uGVKwl','inherit','ranger@trailhead','claude','\x0aSuccessfully\x20updated\x20to\x20version\x20','25XtltSe','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','trailhead','user','522524BaORYt','aqJWb','Checking\x20for\x20updates...','iMQxv','stdio','timeoutMs','kill','win32','HAsYB','cACuv','fUuYN','Latest\x20version:\x20\x20','endsWith','wryWU','qLsTA','ylycf','YXKBQ','imXCk','alpha','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','ignore','splice','beta','xRmXm'];_0x4c95=function(){return _0x3ea18c;};return _0x4c95();}async function runInstall(_0x2f1da9=_0x47a9a2(0x71)){const _0x107059=_0x47a9a2,_0x3ae029={'XsFvd':function(_0x3dad71,_0x875bd3){return _0x3dad71(_0x875bd3);},'HAsYB':_0x107059(0x92),'ynHgl':'install','RWfKv':'ignore','xRmXm':_0x107059(0xa6)};return new Promise(_0x3ca12b=>{const _0x30adf5=_0x107059;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x2f1da9+'...\x0a');const _0x22f299=spawn(_0x3ae029[_0x30adf5(0xa7)],[_0x3ae029['ynHgl'],'-g',PACKAGE_NAME+'@'+_0x2f1da9],{'stdio':[_0x3ae029['RWfKv'],'inherit','inherit'],'shell':process[_0x30adf5(0x79)]===_0x3ae029[_0x30adf5(0xb6)]});_0x22f299['on']('close',_0x3e2ab2=>{_0x3ae029['XsFvd'](_0x3ca12b,_0x3e2ab2===0x0);}),_0x22f299['on']('error',()=>{_0x3ca12b(![]);});});}async function updateClaudeMarketplace(){const _0x37211b=_0x47a9a2,_0x9f060={'wVmKC':_0x37211b(0x99),'ruydY':_0x37211b(0x7b),'IxCpt':'marketplace','ZWksM':'update','gJtfG':_0x37211b(0x9d),'NTJYy':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x894fd3=await runCommand(_0x9f060['wVmKC'],[_0x9f060['ruydY'],_0x9f060['IxCpt'],_0x9f060['ZWksM'],_0x9f060[_0x37211b(0xbe)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x894fd3)throw new Error(_0x9f060['NTJYy']);}async function updateClaudePlugin(_0x358d67=_0x47a9a2(0x9e)){const _0x114ebd=_0x47a9a2,_0x41dcc0={'fmirl':'plugin','BBZls':'update','qLsTA':function(_0x4e4400,_0x1209f2){return _0x4e4400!==_0x1209f2;},'fUuYN':_0x114ebd(0x9e),'nlCyX':'--scope','wryWU':function(_0x48dfc3,_0x10413a,_0x333bb8,_0x49ffdb){return _0x48dfc3(_0x10413a,_0x333bb8,_0x49ffdb);},'kYCuP':_0x114ebd(0xbc),'aqJWb':function(_0x2c6168){return _0x2c6168();}},_0x5816d4=[_0x41dcc0[_0x114ebd(0x94)],_0x41dcc0['BBZls'],'ranger@trailhead'];_0x41dcc0[_0x114ebd(0xad)](_0x358d67,_0x41dcc0[_0x114ebd(0xa9)])&&_0x5816d4[_0x114ebd(0x83)](_0x41dcc0['nlCyX'],_0x358d67);const _0x5be6c9=await _0x41dcc0[_0x114ebd(0xac)](runCommand,_0x114ebd(0x99),_0x5816d4,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x358d67===_0x41dcc0[_0x114ebd(0x91)]||_0x358d67===_0x114ebd(0x7d)?_0x41dcc0[_0x114ebd(0xa0)](getProjectRoot):undefined});if(!_0x5be6c9)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x358d67+_0x114ebd(0x9c));}function isSkillInstalled(_0x1cbc94,_0x2d5f68,_0x106de3){const _0x3f50dc=_0x47a9a2,_0x654663={'tNPgz':function(_0x48982a,_0x9af21f){return _0x48982a===_0x9af21f;},'ViIUZ':'opencode','ELYhL':function(_0x17b1ed,_0x4f256c){return _0x17b1ed(_0x4f256c);},'owpMi':function(_0x1c8d31,_0xdc638f){return _0x1c8d31(_0xdc638f);}},_0x35d30e=_0x654663['tNPgz'](_0x106de3,_0x654663[_0x3f50dc(0x7f)])?_0x654663['ELYhL'](getOpencodeSkillsDir,_0x2d5f68):_0x654663['owpMi'](getSkillsDir,_0x2d5f68),_0x43866e=join(_0x35d30e,_0x1cbc94);return existsSync(_0x43866e);}async function reinstallSkills(_0x49bfa2){const _0x2a384f=_0x47a9a2,_0x235368={'HHSmv':'user','cACuv':function(_0x3fbee7,_0x2b7a3f,_0x22d62b){return _0x3fbee7(_0x2b7a3f,_0x22d62b);}},_0x521094=[_0x2a384f(0xbc),_0x235368['HHSmv']],_0x4aa3aa=[];for(const _0x5e755c of _0x521094){for(const _0x2df40c of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x2df40c,_0x5e755c,_0x2a384f(0x99))&&_0x4aa3aa['push']({'skillName':_0x2df40c,'level':_0x5e755c,'platform':'claude'}),isSkillInstalled(_0x2df40c,_0x5e755c,'opencode')&&_0x4aa3aa['push']({'skillName':_0x2df40c,'level':_0x5e755c,'platform':_0x2a384f(0xba)});}}for(const _0x2fc5c of _0x521094){for(const _0x254266 of DEPRECATED_SKILLS){await removeSkill(_0x254266,_0x2fc5c);}}if(_0x4aa3aa[_0x2a384f(0x8e)]===0x0){console['log'](_0x2a384f(0x8c));return;}console['log'](_0x2a384f(0x8f)+_0x4aa3aa['length']+_0x2a384f(0x86));for(const {skillName:_0x4fb7d0,level:_0xb73c39,platform:_0x404cee}of _0x4aa3aa){try{await _0x235368[_0x2a384f(0xa8)](installSkill,_0x4fb7d0,{'level':_0xb73c39,'cliVersion':_0x49bfa2,'platform':_0x404cee});}catch(_0x297ff2){console['warn'](_0x2a384f(0x74)+_0x404cee+'\x20'+_0xb73c39+'\x20skill\x20'+_0x4fb7d0+':',_0x297ff2);}}}async function ensureActiveProfileGitignored(){const _0x8a69a4=_0x47a9a2,_0x390fa4={'gEeNb':function(_0x140f7d,_0xf9d418,_0x3290e7){return _0x140f7d(_0xf9d418,_0x3290e7);},'hAnwT':function(_0x5201f7){return _0x5201f7();},'rGLlb':function(_0x137f00,_0x50aa1b){return _0x137f00(_0x50aa1b);},'hOFhH':function(_0x589d60,_0x5c7db8,_0x5054f4){return _0x589d60(_0x5c7db8,_0x5054f4);},'CleGJ':function(_0x40c2d0,_0x29bb8c,_0x3b3e82,_0x188292){return _0x40c2d0(_0x29bb8c,_0x3b3e82,_0x188292);},'YXKBQ':'utf-8'},_0x516f83=_0x390fa4['gEeNb'](join,_0x390fa4['hAnwT'](getRangerDir),_0x8a69a4(0xbb));if(!_0x390fa4['rGLlb'](existsSync,_0x516f83))return![];let _0x99829b='';try{_0x99829b=await _0x390fa4['hOFhH'](readFile,_0x516f83,'utf-8');}catch{return![];}const _0x33fe41=_0x99829b[_0x8a69a4(0x76)](/\r?\n/);if(_0x33fe41['some'](_0x1960ca=>_0x1960ca['trim']()===_0x8a69a4(0x84)))return![];let _0x4c198a=_0x33fe41[_0x8a69a4(0x95)](_0x8af685=>_0x8af685[_0x8a69a4(0x89)]()===_0x8a69a4(0x6d));_0x4c198a===-0x1&&(_0x4c198a=_0x33fe41[_0x8a69a4(0x8e)]);_0x33fe41[_0x8a69a4(0xb4)](_0x4c198a,0x0,'active-profile.txt');let _0x3826e2=_0x33fe41['join']('\x0a');!_0x3826e2[_0x8a69a4(0xab)]('\x0a')&&(_0x3826e2+='\x0a');try{await _0x390fa4['CleGJ'](writeFile,_0x516f83,_0x3826e2,_0x390fa4[_0x8a69a4(0xaf)]);}catch{return![];}return!![];}export async function update(){const _0x56bcb1=_0x47a9a2,_0x2b0375={'Xslbg':function(_0x56d9b0,_0x7d5640){return _0x56d9b0!==_0x7d5640;},'imXCk':function(_0x5287db){return _0x5287db();},'COMHl':function(_0x440e11,_0x4c5283){return _0x440e11(_0x4c5283);},'jgSvV':function(_0x10e3e5){return _0x10e3e5();},'tVaED':function(_0x16c724){return _0x16c724();},'iMQxv':function(_0x2eed6c,_0x1b6e15){return _0x2eed6c<_0x1b6e15;},'vWWXK':function(_0x683de){return _0x683de();},'Ehxjs':_0x56bcb1(0x98),'krOep':function(_0x50f2aa){return _0x50f2aa();},'ylycf':_0x56bcb1(0x82),'DecVq':_0x56bcb1(0x9e),'xzUOC':function(_0x20e874,_0x44df06){return _0x20e874===_0x44df06;},'SNqhN':_0x56bcb1(0xbc),'SgUIf':_0x56bcb1(0xb2),'wqwVg':function(_0x56f6be,_0x2e7f63){return _0x56f6be===_0x2e7f63;},'Couhr':_0x56bcb1(0x7d),'UBepH':function(_0x38da77){return _0x38da77();}},_0x310854=getCurrentVersion();console['log'](_0x56bcb1(0x87)+_0x310854);const _0x15cc31=resolveDistTag(_0x310854);if(_0x2b0375['Xslbg'](_0x15cc31,_0x56bcb1(0x71))){console[_0x56bcb1(0x72)]('Prerelease\x20channel\x20detected\x20(@'+_0x15cc31+').\x20Staying\x20on\x20'+_0x15cc31+'\x20—\x20reinstalling\x20@'+_0x15cc31+'...');const _0x37b1b2=await runInstall(_0x15cc31);if(!_0x37b1b2)throw new Error(_0x56bcb1(0x78)+_0x15cc31+_0x56bcb1(0xb9));const _0x989306=_0x2b0375[_0x56bcb1(0xb0)](getCurrentVersion);console[_0x56bcb1(0x72)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x15cc31+'.'),await _0x2b0375['COMHl'](reinstallSkills,_0x989306),await _0x2b0375['jgSvV'](ensureActiveProfileGitignored),console[_0x56bcb1(0x72)](_0x56bcb1(0x85));return;}console[_0x56bcb1(0x72)](_0x56bcb1(0xa1));const _0x20fcdf=getLatestVersion();let _0x666964=_0x310854;if(!_0x20fcdf['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x20fcdf[_0x56bcb1(0x93)]),console['log']('Attempting\x20install\x20anyway...');const _0x25de54=await runInstall();if(_0x25de54)console[_0x56bcb1(0x72)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x666964=_0x2b0375['tVaED'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x20fcdf[_0x56bcb1(0x93)]);}else{const _0x117392=_0x20fcdf['version'];console[_0x56bcb1(0x72)](_0x56bcb1(0xaa)+_0x117392);const _0x291132=compareVersions(_0x310854,_0x117392);if(_0x291132===0x0)console[_0x56bcb1(0x72)](_0x56bcb1(0x7e));else{if(_0x2b0375[_0x56bcb1(0xa2)](_0x291132,0x0))console['log']('\x0aYour\x20version\x20('+_0x310854+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x117392+').');else{const _0x2562c6=await _0x2b0375['vWWXK'](runInstall);if(_0x2562c6)console['log'](_0x56bcb1(0x9a)+_0x117392),_0x666964=_0x117392;else throw new Error('Update\x20failed.');}}}await _0x2b0375['COMHl'](reinstallSkills,_0x666964);const _0x28041a=await isMarketplaceAdded('trailhead'),_0x19e0ff=await isPluginInstalled(_0x2b0375['Ehxjs']);_0x28041a&&(await _0x2b0375['krOep'](updateClaudeMarketplace),console['log'](_0x2b0375[_0x56bcb1(0xae)]));if(_0x19e0ff){const _0x16ca5f=await getPluginInfo(_0x2b0375['Ehxjs']),_0x26cd8f=_0x16ca5f?.[_0x56bcb1(0x90)]??_0x2b0375['DecVq'];await updateClaudePlugin(_0x26cd8f);if(_0x2b0375['xzUOC'](_0x26cd8f,_0x2b0375[_0x56bcb1(0x73)]))console[_0x56bcb1(0x72)](_0x2b0375['SgUIf']);else _0x2b0375[_0x56bcb1(0xbd)](_0x26cd8f,_0x2b0375['Couhr'])?console['log']('\x0aClaude\x20plugin\x20updated\x20(local\x20scope).'):console['log'](_0x56bcb1(0x88));}const _0x22f67e=await _0x2b0375[_0x56bcb1(0x70)](ensureActiveProfileGitignored);console[_0x56bcb1(0x72)]('\x0a✅\x20Update\x20complete!');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x28d2(_0x193bbf,_0x3c84f7){_0x193bbf=_0x193bbf-0xbb;var _0x3689c8=_0x3689();var _0x28d283=_0x3689c8[_0x193bbf];return _0x28d283;}(function(_0x4ebd35,_0x3d8d80){var _0x35b417=_0x28d2,_0x424e55=_0x4ebd35();while(!![]){try{var _0x58537e=parseInt(_0x35b417(0xbb))/0x1+-parseInt(_0x35b417(0xbd))/0x2+-parseInt(_0x35b417(0xbc))/0x3+-parseInt(_0x35b417(0xc5))/0x4+parseInt(_0x35b417(0xc3))/0x5*(parseInt(_0x35b417(0xbf))/0x6)+parseInt(_0x35b417(0xc1))/0x7*(-parseInt(_0x35b417(0xc7))/0x8)+parseInt(_0x35b417(0xc6))/0x9;if(_0x58537e===_0x3d8d80)break;else _0x424e55['push'](_0x424e55['shift']());}catch(_0x39d1d5){_0x424e55['push'](_0x424e55['shift']());}}}(_0x3689,0xea8da));export async function updateEnv(_0x5a268d,_0x33347d,_0x4ae58f){var _0x1c0db2=_0x28d2,_0x1c47ec={'ikISY':function(_0x543dd4,_0x3c2ffd){return _0x543dd4+_0x3c2ffd;},'WqnJd':_0x1c0db2(0xc9),'bCKuh':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','qaRFk':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','WcnJn':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x1c47ec[_0x1c0db2(0xbe)](_0x1c47ec['ikISY'](_0x1c47ec[_0x1c0db2(0xc0)]+'re-run\x20the\x20same\x20setup\x20that\x20created\x20the\x20profile:\x0a'+'\x0a',_0x1c47ec[_0x1c0db2(0xc2)]),'\x0a')+_0x1c47ec['qaRFk']+_0x1c47ec[_0x1c0db2(0xc4)]),process[_0x1c0db2(0xc8)](0x1);}function _0x3689(){var _0x28a10d=['bCKuh','5DMtUSR','WcnJn','4118444WqgpTg','22846914mAwMxm','8961152jTrEXX','exit','ranger\x20profile\x20update\x20is\x20no\x20longer\x20supported.\x20To\x20refresh\x20authentication,\x0a','329856kIKZex','3105351MmUdjX','408734zAxods','ikISY','8889402cvZVOD','WqnJd','7BNjsXd'];_0x3689=function(){return _0x28a10d;};return _0x3689();}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x17f6f6,_0x3bd156){const _0x76db46=_0x2427,_0x1bd0f7=_0x17f6f6();while(!![]){try{const _0x1cab15=parseInt(_0x76db46(0x17d))/0x1*(-parseInt(_0x76db46(0x179))/0x2)+parseInt(_0x76db46(0x176))/0x3*(parseInt(_0x76db46(0x184))/0x4)+-parseInt(_0x76db46(0x17f))/0x5*(-parseInt(_0x76db46(0x178))/0x6)+parseInt(_0x76db46(0x186))/0x7*(parseInt(_0x76db46(0x183))/0x8)+-parseInt(_0x76db46(0x17e))/0x9*(parseInt(_0x76db46(0x17b))/0xa)+parseInt(_0x76db46(0x185))/0xb+-parseInt(_0x76db46(0x180))/0xc;if(_0x1cab15===_0x3bd156)break;else _0x1bd0f7['push'](_0x1bd0f7['shift']());}catch(_0x2bf4f1){_0x1bd0f7['push'](_0x1bd0f7['shift']());}}}(_0x1820,0x5c408));import{join}from'path';import{existsSync}from'fs';function _0x1820(){const _0x4e3b0a=['GJzBt','40KkitDk','102356ODVneU','4172487feyytp','728371GwNdnA','log','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','87ZBJkMs','Profile\x20\x22','31818vNAryu','6PsvXfP','\x0a✓\x20Now\x20using\x20profile\x20\x22','372020qiFYjq','tLqta','73162oTuvDF','45pvUuLj','240nGCDei','13354164shaCSd','XoqKN'];_0x1820=function(){return _0x4e3b0a;};return _0x1820();}function _0x2427(_0x5a6dcf,_0x25cdfc){_0x5a6dcf=_0x5a6dcf-0x174;const _0x1820d3=_0x1820();let _0x242798=_0x1820d3[_0x5a6dcf];return _0x242798;}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x29cc36){const _0x515ad8=_0x2427,_0x2de98a={'XoqKN':function(_0x3d5534,_0x4ccc23){return _0x3d5534(_0x4ccc23);},'tLqta':function(_0x1fc2f4,_0x225d9c,_0x5984a2){return _0x1fc2f4(_0x225d9c,_0x5984a2);},'cOLEm':function(_0x149cdd,_0x562d62){return _0x149cdd instanceof _0x562d62;},'GJzBt':function(_0x1cc087,_0x113d44){return _0x1cc087+_0x113d44;}},_0x18378e=_0x2de98a[_0x515ad8(0x181)](getEnvDir,_0x29cc36),_0x28cacd=_0x2de98a[_0x515ad8(0x17c)](join,_0x18378e,'settings.json'),_0x2fd1e1=existsSync(_0x18378e)&&existsSync(_0x28cacd);if(_0x2fd1e1){await writeActiveProfileName(_0x29cc36),console[_0x515ad8(0x174)](_0x515ad8(0x17a)+_0x29cc36+'\x22');return;}let _0x2efb99=null,_0x28e06c=![];try{_0x2efb99=await fetchCloudProfile(_0x29cc36);if(!_0x2efb99)_0x28e06c=!![];}catch(_0x4e6add){_0x2de98a['cOLEm'](_0x4e6add,ApiError)&&_0x4e6add['status']===0x194&&(_0x28e06c=!![]);}if(_0x28e06c)throw new Error(_0x2de98a[_0x515ad8(0x182)](_0x515ad8(0x177)+_0x29cc36+_0x515ad8(0x175)+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','`ranger\x20profile\x20add\x20'+_0x29cc36+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x29cc36),console[_0x515ad8(0x174)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x29cc36+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1575ad,_0x496f09){const _0x581988=_0x5f2c,_0x571a87=_0x1575ad();while(!![]){try{const _0x148137=parseInt(_0x581988(0x1a3))/0x1*(-parseInt(_0x581988(0x1ad))/0x2)+-parseInt(_0x581988(0x1ab))/0x3+-parseInt(_0x581988(0x1a9))/0x4+parseInt(_0x581988(0x1b0))/0x5+-parseInt(_0x581988(0x1a7))/0x6+parseInt(_0x581988(0x1a5))/0x7+parseInt(_0x581988(0x1ac))/0x8;if(_0x148137===_0x496f09)break;else _0x571a87['push'](_0x571a87['shift']());}catch(_0x38af0c){_0x571a87['push'](_0x571a87['shift']());}}}(_0x7d80,0xb9d3b));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='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function readLegacyActiveProfileFile(){const _0xff8557=_0x5f2c,_0x163ef0={'EsrzN':function(_0x337801,_0x12d652,_0x21e656){return _0x337801(_0x12d652,_0x21e656);},'Hwhgm':function(_0x387412){return _0x387412();},'tPHyX':function(_0x5e540d,_0x14d6cc){return _0x5e540d(_0x14d6cc);}},_0x38c377=[_0x163ef0[_0xff8557(0x1a8)](join,getRangerDir(),LEGACY_ACTIVE_PROFILE_FILE),join(_0x163ef0[_0xff8557(0x1ae)](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0x163ef0['Hwhgm'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),join(_0x163ef0['Hwhgm'](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x35a485 of _0x38c377){if(_0x163ef0[_0xff8557(0x1a2)](existsSync,_0x35a485))return _0x35a485;}return null;}export async function readActiveProfileName(){const _0x46fc1a=_0x5f2c,_0x4433a6={'folVd':function(_0x4f4021){return _0x4f4021();},'hJyVl':function(_0x2346c8,_0x2ab41b,_0x3e7cec){return _0x2346c8(_0x2ab41b,_0x3e7cec);},'uhaaG':_0x46fc1a(0x1a4)},_0x432b6e=readLastProfile(process[_0x46fc1a(0x1a6)]());if(_0x432b6e)return _0x432b6e;const _0x2fe251=_0x4433a6['folVd'](readLegacyActiveProfileFile);if(!_0x2fe251)return null;try{return(await _0x4433a6['hJyVl'](readFile,_0x2fe251,_0x4433a6[_0x46fc1a(0x1aa)]))[_0x46fc1a(0x1af)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x36a1e5){const _0x13fb36=_0x5f2c,_0x160b65={'xZNXl':function(_0x457e55,_0x26df24,_0x467f94){return _0x457e55(_0x26df24,_0x467f94);}};_0x160b65[_0x13fb36(0x1a1)](writeLastProfile,process['cwd'](),_0x36a1e5);}function _0x5f2c(_0x1d1896,_0x24bf16){_0x1d1896=_0x1d1896-0x1a1;const _0x7d80d9=_0x7d80();let _0x5f2c27=_0x7d80d9[_0x1d1896];return _0x5f2c27;}function _0x7d80(){const _0x26e932=['xZNXl','tPHyX','597778WQBTdZ','utf-8','305963QgjwPJ','cwd','3767208MOVtKR','EsrzN','2691344QLMxJo','uhaaG','3610863lQzFUy','20229392KGDFiQ','2bZcVMh','Hwhgm','trim','6454335CKShCp'];_0x7d80=function(){return _0x26e932;};return _0x7d80();}
|