@ranger-testing/ranger-cli 2.5.4-alpha.a98f848-6 → 2.5.4-alpha.b28d3b1-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/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 +13 -7
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +25 -18
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5c3b(){const _0x521c5d=['986648BXOObo','KSrCD','project','WYaCO','beaTg','HkpcM','jDFoT','Would\x20you\x20like\x20to\x20install\x20skills?','794013twgOeR','install','✓\x20Marketplace\x20already\x20added','110HrOEdu','plugin','❌\x20Failed\x20to\x20install\x20plugin:','✓\x20Ranger\x20skills\x20already\x20installed','list','❌\x20Failed\x20to\x20add\x20marketplace:','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','Afcom','fLcfb','gxpsb','output','BdUaT','316zllTCq','ynTis','385184oLyqKO','24DYvEwn','117VUnMxF','9309VOCnZa','ranger-testing/trailhead','confirm','error','685865eZPXHJ','412156gWvKbA','Project\x20(shared\x20with\x20team\x20via\x20git)','fKFnp','includes','already\x20enabled','success','XiTxh','ofcLP','lRufA','log','.claude','JnGFa','775691vcOJIQ'];_0x5c3b=function(){return _0x521c5d;};return _0x5c3b();}(function(_0x505318,_0x582e2d){const _0x1715cf=_0x3928,_0x46b745=_0x505318();while(!![]){try{const _0x2b6b94=parseInt(_0x1715cf(0x18a))/0x1+-parseInt(_0x1715cf(0x169))/0x2+parseInt(_0x1715cf(0x185))/0x3*(-parseInt(_0x1715cf(0x180))/0x4)+parseInt(_0x1715cf(0x189))/0x5+-parseInt(_0x1715cf(0x183))/0x6*(-parseInt(_0x1715cf(0x168))/0x7)+-parseInt(_0x1715cf(0x182))/0x8*(parseInt(_0x1715cf(0x184))/0x9)+-parseInt(_0x1715cf(0x174))/0xa*(-parseInt(_0x1715cf(0x171))/0xb);if(_0x2b6b94===_0x582e2d)break;else _0x46b745['push'](_0x46b745['shift']());}catch(_0x2b73c0){_0x46b745['push'](_0x46b745['shift']());}}}(_0x5c3b,0x67141));import{join}from'path';import{existsSync}from'fs';import _0x402a09 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x3928(_0x197cc7,_0x5c2fc9){_0x197cc7=_0x197cc7-0x165;const _0x5c3b3b=_0x5c3b();let _0x3928be=_0x5c3b3b[_0x197cc7];return _0x3928be;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x5e12cc){const _0x3bc244=_0x3928,_0x27da15={'beaTg':'ranger@trailhead','BdUaT':function(_0x59aed6,_0x2da426,_0x709c86){return _0x59aed6(_0x2da426,_0x709c86);},'HpMMJ':'.claude','KSrCD':_0x3bc244(0x178),'JEnHU':'Where\x20should\x20the\x20plugin\x20be\x20installed?','ZFStk':'User\x20(available\x20in\x20all\x20your\x20projects)','bgyQS':'user','cqvqj':function(_0x1d783e,_0x40f809){return _0x1d783e(_0x40f809);},'yaDKt':'trailhead','jDFoT':_0x3bc244(0x173),'ZICJJ':'plugin','fObaH':'marketplace','rMLgP':_0x3bc244(0x179),'XiTxh':'\x0aYou\x20can\x20install\x20manually\x20with:','laOdb':function(_0x4f5cc4,_0x567384,_0x2be295){return _0x4f5cc4(_0x567384,_0x2be295);},'Afcom':_0x3bc244(0x172),'iRHfB':'--scope','ofcLP':_0x3bc244(0x16b),'tWyvN':function(_0x4fa9fd){return _0x4fa9fd();},'UlvnN':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','liQFi':function(_0x21d9b9,_0x51a57c){return _0x21d9b9===_0x51a57c;},'yQKWW':function(_0x1a3f99,_0x4bef61,_0x63236b){return _0x1a3f99(_0x4bef61,_0x63236b);},'bViAO':function(_0x1bf3e2,_0x38c1ad){return _0x1bf3e2===_0x38c1ad;},'UgwYS':'⚠\x20Failed\x20to\x20enable\x20plugin:','lRufA':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x46946f=await isPluginInstalled(_0x27da15[_0x3bc244(0x16d)]);if(_0x46946f)return console[_0x3bc244(0x165)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x19fb78=existsSync(_0x27da15[_0x3bc244(0x17f)](join,getProjectRoot(),_0x27da15['HpMMJ']));let _0x7e2a0e;if(_0x5e12cc)_0x7e2a0e=_0x5e12cc;else{if(_0x19fb78)_0x7e2a0e=_0x3bc244(0x16b);else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x3e51ba=await _0x402a09['prompt']([{'type':_0x27da15[_0x3bc244(0x16a)],'name':'pluginScope','message':_0x27da15['JEnHU'],'choices':[{'name':_0x27da15['ZFStk'],'value':'user'},{'name':_0x3bc244(0x18b),'value':'project'}],'default':_0x27da15['bgyQS']}]);_0x7e2a0e=_0x3e51ba['pluginScope'];}}console[_0x3bc244(0x165)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x7e2a0e+'\x20level)...\x0a');const _0x226939=await _0x27da15['cqvqj'](isMarketplaceAdded,_0x27da15['yaDKt']);let _0x59534d=_0x226939;if(_0x226939)console[_0x3bc244(0x165)](_0x27da15[_0x3bc244(0x16f)]);else{const _0x1679a1=await runClaudeCommand([_0x27da15['ZICJJ'],_0x27da15['fObaH'],'add',_0x3bc244(0x186)]);!_0x1679a1[_0x3bc244(0x18f)]?(console[_0x3bc244(0x188)](_0x27da15['rMLgP'],_0x1679a1[_0x3bc244(0x188)]),console['log'](_0x27da15[_0x3bc244(0x190)]),console['log']('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x7e2a0e)):_0x59534d=!![];}if(_0x59534d){const _0x22246c=await _0x27da15['laOdb'](runClaudeCommand,['plugin',_0x27da15[_0x3bc244(0x17b)],_0x27da15['beaTg'],_0x27da15['iRHfB'],_0x7e2a0e],{'cwd':_0x7e2a0e===_0x27da15[_0x3bc244(0x191)]?_0x27da15['tWyvN'](getProjectRoot):undefined});if(!_0x22246c['success'])console['error'](_0x3bc244(0x176),_0x22246c['error']),console[_0x3bc244(0x165)](_0x27da15['XiTxh']),console[_0x3bc244(0x165)](_0x3bc244(0x17a)+_0x7e2a0e);else{console['log'](_0x27da15['UlvnN']);const _0x16a917=[_0x3bc244(0x175),'enable','ranger@trailhead'];_0x27da15['liQFi'](_0x7e2a0e,_0x3bc244(0x16b))&&_0x16a917['push'](_0x27da15['iRHfB'],_0x27da15['ofcLP']);const _0x3f07e7=await _0x27da15['yQKWW'](runClaudeCommand,_0x16a917,{'captureOutput':!![],'cwd':_0x27da15['bViAO'](_0x7e2a0e,_0x3bc244(0x16b))?getProjectRoot():undefined}),_0x5913bf=_0x3f07e7[_0x3bc244(0x17e)]?.[_0x3bc244(0x18d)](_0x3bc244(0x18e));!_0x3f07e7['success']&&!_0x5913bf?console['error'](_0x27da15['UgwYS'],_0x3f07e7[_0x3bc244(0x188)]):console[_0x3bc244(0x165)](_0x27da15[_0x3bc244(0x192)]);}}return!![];}export async function ensureClaudeSkills(_0x13025d){const _0x3706d8=_0x3928,_0x2a591c={'JnGFa':function(_0x34bc9a,_0x25abf2){return _0x34bc9a(_0x25abf2);},'ckQlA':function(_0x31a87e,_0x4a83a9,_0x2c2b98,_0x1f5881){return _0x31a87e(_0x4a83a9,_0x2c2b98,_0x1f5881);},'ezIsG':function(_0x18a8da,_0x20109d){return _0x18a8da(_0x20109d);},'WYaCO':'user','HNRmp':'ranger','uqDCZ':function(_0x18a0bb,_0x22f709){return _0x18a0bb(_0x22f709);},'PoHau':function(_0x2d8ff2,_0x4a3c65,_0x278022,_0x37fa67){return _0x2d8ff2(_0x4a3c65,_0x278022,_0x37fa67);},'HkpcM':function(_0x3e05ed,_0x7d253d){return _0x3e05ed(_0x7d253d);},'fLcfb':'project','wMPfp':'SKILL.md','zNmTh':_0x3706d8(0x177),'fKFnp':function(_0x57a1b9,_0x5e3e9d,_0x13abaf){return _0x57a1b9(_0x5e3e9d,_0x13abaf);},'ynTis':function(_0x4f8652){return _0x4f8652();},'kRkXg':_0x3706d8(0x187),'gxpsb':'wantsSkillup','nJEIJ':_0x3706d8(0x170)},_0x31a782=_0x2a591c[_0x3706d8(0x167)](existsSync,_0x2a591c['ckQlA'](join,_0x2a591c['ezIsG'](getSkillsDir,_0x2a591c[_0x3706d8(0x16c)]),_0x2a591c['HNRmp'],'SKILL.md')),_0x59c8d2=_0x2a591c['uqDCZ'](existsSync,_0x2a591c['PoHau'](join,_0x2a591c[_0x3706d8(0x16e)](getSkillsDir,_0x2a591c['fLcfb']),_0x2a591c['HNRmp'],_0x2a591c['wMPfp']));if(_0x31a782||_0x59c8d2)return console[_0x3706d8(0x165)](_0x2a591c['zNmTh']),![];const _0x2fe12b=existsSync(_0x2a591c[_0x3706d8(0x18c)](join,_0x2a591c[_0x3706d8(0x181)](getProjectRoot),_0x3706d8(0x166)));let _0x55552a=!![];if(_0x13025d)await _0x2a591c[_0x3706d8(0x16e)](skillup,{'autoInstall':_0x13025d,'suppressUsage':!![]});else{if(_0x2fe12b)await skillup({'autoInstall':_0x2a591c[_0x3706d8(0x17c)],'suppressUsage':!![]});else{const _0x418020=await _0x402a09['prompt']([{'type':_0x2a591c['kRkXg'],'name':_0x2a591c[_0x3706d8(0x17d)],'message':_0x2a591c['nJEIJ'],'default':!![]}]);_0x55552a=_0x418020['wantsSkillup'],_0x55552a&&await skillup({'suppressUsage':!![]});}}return _0x55552a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3322c9,_0x445d4e){const _0x345bb0=_0x164a,_0x22a138=_0x3322c9();while(!![]){try{const _0xe1ed38=-parseInt(_0x345bb0(0xf1))/0x1+parseInt(_0x345bb0(0xde))/0x2+parseInt(_0x345bb0(0xef))/0x3+parseInt(_0x345bb0(0xe2))/0x4+-parseInt(_0x345bb0(0xda))/0x5*(-parseInt(_0x345bb0(0xec))/0x6)+parseInt(_0x345bb0(0xf7))/0x7+parseInt(_0x345bb0(0xe0))/0x8*(-parseInt(_0x345bb0(0xf3))/0x9);if(_0xe1ed38===_0x445d4e)break;else _0x22a138['push'](_0x22a138['shift']());}catch(_0x3eaef7){_0x22a138['push'](_0x22a138['shift']());}}}(_0x3eaf,0x772db));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x3eaf(){const _0x13e5b3=['error','162102PMlSBs','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','248eQgTrB','✓\x20OpenCode\x20plugin\x20configured','2389756FutoWK','Jmxyr','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','@ranger-testing/opencode-plugin','user','QuCzP','$schema','utgRV','utf-8','6zbSDwI','plugin','WQVPh','1618389hOEXHE','kWEgo','303178nwHOSy','opencode.json','397179sWJDuf','DkpTh','ktIyh','prompt','4109385ikgGDy','log','1771930YImfaM','stringify','HurPU'];_0x3eaf=function(){return _0x13e5b3;};return _0x3eaf();}function _0x164a(_0x673f41,_0x22a196){_0x673f41=_0x673f41-0xda;const _0x3eafe3=_0x3eaf();let _0x164ab5=_0x3eafe3[_0x673f41];return _0x164ab5;}import _0x3e36d9 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x15e285){const _0x32b419=_0x164a,_0x2a20bd={'kWEgo':function(_0x4bce46,_0x3a0b62,_0x47e55a){return _0x4bce46(_0x3a0b62,_0x47e55a);},'Jmxyr':function(_0x29d869,_0x3d10dc){return _0x29d869(_0x3d10dc);},'HurPU':'project','dZhwa':'\x0a📦\x20OpenCode\x20Plugin\x0a','YJKGl':'pluginScope','ouRmU':_0x32b419(0xe5),'WQVPh':'Project\x20(shared\x20with\x20team\x20via\x20git)','QuCzP':_0x32b419(0xe7),'utgRV':'opencode.json','ktIyh':'Failed\x20to\x20read\x20opencode.json','SUUQH':'✓\x20OpenCode\x20plugin\x20already\x20configured','DkpTh':function(_0x5dee17,_0x311368,_0x222284){return _0x5dee17(_0x311368,_0x222284);},'KrDgK':_0x32b419(0xe1)},_0xa26772=existsSync(_0x2a20bd[_0x32b419(0xf0)](join,_0x2a20bd[_0x32b419(0xe3)](getOpencodeConfigDir,_0x2a20bd[_0x32b419(0xdc)]),_0x32b419(0xf2)));let _0x32b60c;if(_0x15e285)_0x32b60c=_0x15e285;else{if(_0xa26772)_0x32b60c=_0x2a20bd['HurPU'];else{console[_0x32b419(0xf8)](_0x2a20bd['dZhwa']);const _0x4e6743=await _0x3e36d9[_0x32b419(0xf6)]([{'type':'list','name':_0x2a20bd['YJKGl'],'message':_0x2a20bd['ouRmU'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x32b419(0xe7)},{'name':_0x2a20bd[_0x32b419(0xee)],'value':'project'}],'default':_0x2a20bd[_0x32b419(0xe8)]}]);_0x32b60c=_0x4e6743['pluginScope'];}}const _0x8cab46=_0x2a20bd['kWEgo'](join,_0x2a20bd['Jmxyr'](getOpencodeConfigDir,_0x32b60c),_0x2a20bd[_0x32b419(0xea)]),_0x26f909=_0x32b419(0xe6),_0x3d33ff='https://opencode.ai/config.json';let _0x33b39d={};if(_0x2a20bd['Jmxyr'](existsSync,_0x8cab46))try{const _0x1cdc68=await readFile(_0x8cab46,_0x32b419(0xeb));_0x33b39d=JSON[_0x32b419(0xe4)](_0x1cdc68);}catch(_0x12d3f8){return console[_0x32b419(0xdd)](_0x32b419(0xdf)),{'configured':![],'scope':_0x32b60c,'error':_0x2a20bd[_0x32b419(0xf5)],'details':_0x12d3f8};}const _0x12b36f=Array['isArray'](_0x33b39d[_0x32b419(0xed)])?_0x33b39d[_0x32b419(0xed)]:[];if(_0x12b36f['includes'](_0x26f909))return console[_0x32b419(0xf8)](_0x2a20bd['SUUQH']),{'configured':![],'scope':_0x32b60c};return _0x33b39d[_0x32b419(0xe9)]=_0x33b39d['$schema']||_0x3d33ff,_0x33b39d['plugin']=[..._0x12b36f,_0x26f909],await _0x2a20bd[_0x32b419(0xf4)](mkdir,_0x2a20bd[_0x32b419(0xe3)](getOpencodeConfigDir,_0x32b60c),{'recursive':!![]}),await writeFile(_0x8cab46,JSON[_0x32b419(0xdb)](_0x33b39d,null,0x2)+'\x0a'),console[_0x32b419(0xf8)](_0x2a20bd['KrDgK']),{'configured':!![],'scope':_0x32b60c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4f73f2,_0x594af9){const _0x516f9c=_0x19bc,_0x27715c=_0x4f73f2();while(!![]){try{const _0x524249=-parseInt(_0x516f9c(0x146))/0x1*(parseInt(_0x516f9c(0x131))/0x2)+parseInt(_0x516f9c(0x11d))/0x3*(parseInt(_0x516f9c(0x134))/0x4)+parseInt(_0x516f9c(0x105))/0x5*(-parseInt(_0x516f9c(0x141))/0x6)+parseInt(_0x516f9c(0x107))/0x7*(parseInt(_0x516f9c(0x13f))/0x8)+parseInt(_0x516f9c(0x12d))/0x9*(-parseInt(_0x516f9c(0x129))/0xa)+-parseInt(_0x516f9c(0x145))/0xb*(parseInt(_0x516f9c(0x13c))/0xc)+parseInt(_0x516f9c(0x11e))/0xd;if(_0x524249===_0x594af9)break;else _0x27715c['push'](_0x27715c['shift']());}catch(_0x408896){_0x27715c['push'](_0x27715c['shift']());}}}(_0x5ae8,0xabba4));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x19bc(_0x517a0c,_0x173c12){_0x517a0c=_0x517a0c-0xf9;const _0x5ae87e=_0x5ae8();let _0x19bc7f=_0x5ae87e[_0x517a0c];return _0x19bc7f;}function _0x5ae8(){const _0x413045=['kBUYT','✓\x20Claude\x20Code\x20plugin\x20installed','12776FyiJrG','YCZlN','619350RzUjYG','path','VDIVF','baseUrl','12827881ldYThq','12qIxCpd','RCSSJ','mTlLc','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','✓\x20Auth\x20state\x20found','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','install','QoINW','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Multiple\x20CI\x20profiles\x20found:\x20','error','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','5VDzPqR','GBRpS','1022bGZkIv','ZDXCZ','log','Auto-detected\x20CI\x20profile:\x20','settings.json','plugin','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','success','VjwhC','RFgcY','HFoTw','No\x20API\x20token\x20available\x20for\x20decryption','DGIpm','mWJlN','isDirectory','trackPhaseEnd','trackPhaseStart','seNLY','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','DyoxF','ranger@trailhead','sygIB','2649CUySYP','22620481RpEuuA','sjNaT','RppZN','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','bhiLx','chromium','auth','iDpGf','Ffghn','add','ranger-testing/trailhead','539420KmeQjP','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','✓\x20Active\x20profile:\x20','profile','63setPQg','Failed\x20to\x20add\x20marketplace:','skipChromium','marketplace','72676XzQBxK','IEqeR','TejcL','3684ZlqsOU','✓\x20Marketplace\x20already\x20added','wiQbM','name','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','BmArc','message','12BrNMom'];_0x5ae8=function(){return _0x413045;};return _0x5ae8();}import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x14eb00){const _0x571f91=_0x19bc,_0x373451={'kBUYT':function(_0x4a5606,_0xc7aaaf,_0x3a4312){return _0x4a5606(_0xc7aaaf,_0x3a4312);},'EMOwC':function(_0x9bce6d,_0x4ff814){return _0x9bce6d(_0x4ff814);},'QCCob':function(_0x564145,_0x3ee949){return _0x564145+_0x3ee949;},'StpEN':_0x571f91(0xfe),'RppZN':_0x571f91(0x10d)},_0x2bb1f3=getRangerDir(),_0x4eef20=_0x373451['kBUYT'](join,_0x2bb1f3,'ci');if(_0x14eb00){const _0x7af39b=_0x373451[_0x571f91(0x13d)](join,_0x4eef20,_0x14eb00);return{'name':_0x14eb00,'path':_0x7af39b};}if(!_0x373451['EMOwC'](existsSync,_0x4eef20))throw new Error(_0x373451['QCCob'](_0x373451['StpEN'],_0x571f91(0x104)));const _0x5436fa=await readdir(_0x4eef20,{'withFileTypes':!![]}),_0x4f6ae0=_0x5436fa['filter'](_0x1e5736=>_0x1e5736[_0x571f91(0x115)]())['map'](_0x1f9a37=>_0x1f9a37[_0x571f91(0x137)]);if(_0x4f6ae0['length']===0x0)throw new Error(_0x373451[_0x571f91(0x120)]+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');if(_0x4f6ae0['length']===0x1){const _0x2b20e6=_0x4f6ae0[0x0];return console[_0x571f91(0x109)](_0x571f91(0x10a)+_0x2b20e6),{'name':_0x2b20e6,'path':join(_0x4eef20,_0x2b20e6)};}throw new Error(_0x571f91(0x102)+_0x4f6ae0['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x57aba8=_0x19bc,_0x372112={'IEqeR':function(_0x38e00d,_0x53cd86){return _0x38e00d(_0x53cd86);},'HFoTw':_0x57aba8(0x11b),'DyoxF':'trailhead','sygIB':function(_0x3ccd1d,_0x4b0fa1){return _0x3ccd1d(_0x4b0fa1);},'ZglTL':_0x57aba8(0x127),'wiQbM':_0x57aba8(0x12e),'kAhzz':_0x57aba8(0x139),'seNLY':function(_0x486e4b,_0x3eb94e){return _0x486e4b(_0x3eb94e);},'emqrj':_0x57aba8(0xff),'zmljj':'--scope','VDIVF':'project','aVeKR':'Failed\x20to\x20install\x20plugin:','UnOsB':_0x57aba8(0x13e)},_0x43b65a=await _0x372112[_0x57aba8(0x132)](isPluginInstalled,_0x372112[_0x57aba8(0x111)]);if(_0x43b65a)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x57aba8(0x109)](_0x57aba8(0x12a));const _0x3454da=await _0x372112['IEqeR'](isMarketplaceAdded,_0x372112[_0x57aba8(0x11a)]);let _0x581d80=_0x3454da;if(_0x3454da)console['log'](_0x57aba8(0x135));else{const _0x4d5383=await _0x372112[_0x57aba8(0x11c)](runClaudeCommand,[_0x57aba8(0x10c),_0x57aba8(0x130),_0x372112['ZglTL'],_0x57aba8(0x128)]);!_0x4d5383[_0x57aba8(0x10e)]?(console[_0x57aba8(0x103)](_0x372112[_0x57aba8(0x136)],_0x4d5383['error']),console[_0x57aba8(0x109)](_0x372112['kAhzz'])):_0x581d80=!![];}if(_0x581d80){const _0x23a949=await _0x372112[_0x57aba8(0x118)](runClaudeCommand,['plugin',_0x372112['emqrj'],'ranger@trailhead',_0x372112['zmljj'],_0x372112[_0x57aba8(0x143)]]);!_0x23a949['success']?(console[_0x57aba8(0x103)](_0x372112['aVeKR'],_0x23a949['error']),console['log'](_0x57aba8(0xfd))):console['log'](_0x372112['UnOsB']);}return!![];}export async function setupCi(_0x1705cc,_0x5b365c,_0x3a8c5d){const _0x562a3a=_0x19bc,_0x401f71={'YCZlN':_0x562a3a(0x124),'vIZsp':'dir_setup','RFgcY':function(_0x6ffad6){return _0x6ffad6();},'VjwhC':function(_0x143314,_0xa4ad54){return _0x143314(_0xa4ad54);},'bhiLx':function(_0x5f55cf,_0x525781,_0x494f60){return _0x5f55cf(_0x525781,_0x494f60);},'mTlLc':'sessions','GBRpS':function(_0x4109cf,_0x4f7792){return _0x4109cf(_0x4f7792);},'gElkq':_0x562a3a(0x138),'DGIpm':function(_0x3eec6c){return _0x3eec6c();},'RCSSJ':_0x562a3a(0x123),'KVWxq':'profile_activate','BmArc':function(_0x5b58fb,_0x1ebb12,_0x5eb558){return _0x5b58fb(_0x1ebb12,_0x5eb558);},'LrvXI':function(_0x40bff0,_0x155c08,_0x3b1495){return _0x40bff0(_0x155c08,_0x3b1495);},'kVrln':function(_0x291a4d,_0x4ca2ac,_0x1ed51d){return _0x291a4d(_0x4ca2ac,_0x1ed51d);},'ReOjr':'auth.json.enc','TejcL':function(_0x1616dd,_0x17d3a5){return _0x1616dd(_0x17d3a5);},'mWJlN':function(_0x4c11db,_0x4b156c){return _0x4c11db(_0x4b156c);},'sjNaT':function(_0x18522f,_0x5083eb){return _0x18522f(_0x5083eb);},'WSpjO':_0x562a3a(0x119),'TPmLw':function(_0x41da32,_0x4f4d14){return _0x41da32 instanceof _0x4f4d14;},'Ffghn':function(_0xbe2771,_0x1bfa72){return _0xbe2771(_0x1bfa72);},'MfdCp':_0x562a3a(0xfc),'iDpGf':_0x562a3a(0x121),'ysxtS':'plugin','ZDXCZ':'project','QoINW':'skills'};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x3a8c5d?.[_0x562a3a(0x117)](_0x401f71[_0x562a3a(0x140)]),await authenticate(_0x1705cc),_0x3a8c5d?.[_0x562a3a(0x116)](_0x401f71[_0x562a3a(0x140)]),_0x3a8c5d?.['trackPhaseStart'](_0x401f71['vIZsp']);const {path:_0x39081c,installed:_0x3a33d6}=await _0x401f71[_0x562a3a(0x110)](ensureRangerDir);await _0x401f71[_0x562a3a(0x10f)](writeRangerGitignore,_0x39081c);const _0x4fbf85=_0x401f71['bhiLx'](join,_0x39081c,_0x401f71[_0x562a3a(0xfa)]);!_0x401f71[_0x562a3a(0x106)](existsSync,_0x4fbf85)&&await _0x401f71[_0x562a3a(0x122)](mkdir,_0x4fbf85,{'recursive':!![]});_0x3a8c5d?.[_0x562a3a(0x116)]('dir_setup',{'installed':_0x3a33d6}),_0x3a8c5d?.['trackPhaseStart'](_0x562a3a(0x123));let _0x3fad67=![];_0x5b365c?.[_0x562a3a(0x12f)]?console['log'](_0x401f71['gElkq']):_0x3fad67=await _0x401f71[_0x562a3a(0x113)](ensureChromium);_0x3a8c5d?.['trackPhaseEnd'](_0x401f71[_0x562a3a(0xf9)],{'installed':_0x3fad67,'skipped':!!_0x5b365c?.['skipChromium']}),_0x3a8c5d?.[_0x562a3a(0x117)](_0x401f71['KVWxq']);const _0xd96ac7=await _0x401f71[_0x562a3a(0x10f)](findCiProfile,_0x5b365c?.[_0x562a3a(0x12c)]);let _0x3d1e67=![];_0x5b365c?.[_0x562a3a(0x144)]&&(await _0x401f71[_0x562a3a(0x13a)](mkdir,_0xd96ac7['path'],{'recursive':!![]}),await saveSettings(_0xd96ac7['name'],{'baseUrl':_0x5b365c['baseUrl'],'headless':!![]}),console[_0x562a3a(0x109)](_0x562a3a(0x101)+_0x5b365c[_0x562a3a(0x144)]),_0x3d1e67=!![]);const _0x215441=_0x401f71['LrvXI'](join,_0xd96ac7[_0x562a3a(0x142)],_0x562a3a(0x10b));if(!existsSync(_0x215441)&&!_0x3d1e67)throw new Error('CI\x20profile\x20\x22'+_0xd96ac7['name']+_0x562a3a(0xfb));const _0x53fd40=join(_0xd96ac7['path'],'auth.json'),_0x553bd5=_0x401f71['kVrln'](join,_0xd96ac7[_0x562a3a(0x142)],_0x401f71['ReOjr']),_0x41b79b=_0x401f71[_0x562a3a(0x133)](existsSync,_0x53fd40),_0x4a763d=_0x401f71[_0x562a3a(0x114)](existsSync,_0x553bd5);if(_0x4a763d)try{const _0x5f9b35=await getToken();if(!_0x5f9b35)throw new Error(_0x562a3a(0x112));const _0x5ab592=await _0x401f71[_0x562a3a(0x11f)](readFile,_0x553bd5);decrypt(_0x5ab592,_0x5f9b35),console[_0x562a3a(0x109)](_0x401f71['WSpjO']);}catch(_0x5025c5){const _0x1dad9c=_0x401f71['TPmLw'](_0x5025c5,Error)?_0x5025c5[_0x562a3a(0x13b)]:_0x401f71[_0x562a3a(0x126)](String,_0x5025c5);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0xd96ac7['name']+'\x22:\x20'+_0x1dad9c);}else _0x41b79b?console['log'](_0x401f71['MfdCp']):console[_0x562a3a(0x109)](_0x401f71[_0x562a3a(0x125)]);await _0x401f71['Ffghn'](writeActiveProfileName,_0xd96ac7['name']),console[_0x562a3a(0x109)](_0x562a3a(0x12b)+_0xd96ac7[_0x562a3a(0x137)]),_0x3a8c5d?.['trackPhaseEnd'](_0x401f71['KVWxq'],{'profileName':_0xd96ac7['name'],'hasAuth':_0x41b79b,'hasEncryptedAuth':_0x4a763d,'createdSettings':_0x3d1e67}),_0x3a8c5d?.[_0x562a3a(0x117)](_0x401f71['ysxtS']);const _0x46e383=await installPluginNonInteractive();_0x3a8c5d?.[_0x562a3a(0x116)](_0x401f71['ysxtS'],{'installed':_0x46e383}),_0x3a8c5d?.[_0x562a3a(0x117)]('skills'),await skillup({'autoInstall':_0x401f71[_0x562a3a(0x108)]}),_0x3a8c5d?.['trackPhaseEnd'](_0x401f71[_0x562a3a(0x100)]),console[_0x562a3a(0x109)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
|
|
1
|
+
(function(_0x5d2cdd,_0x155496){var _0x39cc00=_0x5310,_0xb2660a=_0x5d2cdd();while(!![]){try{var _0x29be24=-parseInt(_0x39cc00(0x6d))/0x1*(-parseInt(_0x39cc00(0x6a))/0x2)+-parseInt(_0x39cc00(0x70))/0x3+-parseInt(_0x39cc00(0x71))/0x4+-parseInt(_0x39cc00(0x77))/0x5+parseInt(_0x39cc00(0x79))/0x6*(-parseInt(_0x39cc00(0x6f))/0x7)+parseInt(_0x39cc00(0x76))/0x8+parseInt(_0x39cc00(0x69))/0x9*(parseInt(_0x39cc00(0x7a))/0xa);if(_0x29be24===_0x155496)break;else _0xb2660a['push'](_0xb2660a['shift']());}catch(_0x1a813c){_0xb2660a['push'](_0xb2660a['shift']());}}}(_0x4d3f,0xb2f13));function _0x5310(_0x326f81,_0x39cb11){_0x326f81=_0x326f81-0x68;var _0x4d3fe4=_0x4d3f();var _0x531001=_0x4d3fe4[_0x326f81];return _0x531001;}export async function setupCi(_0x19b251,_0x502451,_0x5c4425){var _0x316777=_0x5310,_0x3c16d7={'XNCbm':function(_0x36385e,_0x44067e){return _0x36385e+_0x44067e;},'TWJyl':function(_0x2f0ab8,_0x2b7393){return _0x2f0ab8+_0x2b7393;},'UUFkZ':function(_0x1be881,_0x12f4bb){return _0x1be881+_0x12f4bb;},'OGmjs':_0x316777(0x6b),'Tccss':_0x316777(0x75),'BNEJI':'\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a','cIzHD':_0x316777(0x6c)};console[_0x316777(0x73)](_0x3c16d7[_0x316777(0x74)](_0x3c16d7[_0x316777(0x68)](_0x3c16d7['UUFkZ'](_0x3c16d7['OGmjs'],_0x3c16d7[_0x316777(0x6e)]),_0x3c16d7['BNEJI'])+_0x3c16d7['cIzHD'],_0x316777(0x72))),process[_0x316777(0x78)](0x1);}function _0x4d3f(){var _0x59aec5=['3307297TqklwI','4101456OrChpB','2591852FeAjRj','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','error','XNCbm','Use\x20the\x20new\x20flow:\x0a','3324032EawMiI','1717370dcAhRp','exit','6WcXyqg','60IpJQBH','TWJyl','4376349wIaNPl','42pAGodM','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','For\x20a\x20shared\x20cloud\x20profile:\x20ranger\x20profile\x20add\x20<account-email>\x0a','10997hErJTg','Tccss'];_0x4d3f=function(){return _0x59aec5;};return _0x4d3f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x200913,_0x57effb){const _0x2524aa=_0x1f88,_0x113898=_0x200913();while(!![]){try{const _0x5a9eea=-parseInt(_0x2524aa(0x1ff))/0x1*(parseInt(_0x2524aa(0x205))/0x2)+parseInt(_0x2524aa(0x1f5))/0x3*(parseInt(_0x2524aa(0x206))/0x4)+parseInt(_0x2524aa(0x20a))/0x5+parseInt(_0x2524aa(0x203))/0x6+-parseInt(_0x2524aa(0x1e7))/0x7*(-parseInt(_0x2524aa(0x1f3))/0x8)+parseInt(_0x2524aa(0x1fe))/0x9*(parseInt(_0x2524aa(0x20b))/0xa)+parseInt(_0x2524aa(0x1f7))/0xb*(-parseInt(_0x2524aa(0x1ea))/0xc);if(_0x5a9eea===_0x57effb)break;else _0x113898['push'](_0x113898['shift']());}catch(_0x515ca0){_0x113898['push'](_0x113898['shift']());}}}(_0x1277,0x1c6bb));import{basename}from'path';function _0x1f88(_0x57d15e,_0x3ef5f6){_0x57d15e=_0x57d15e-0x1e5;const _0x12774d=_0x1277();let _0x1f8848=_0x12774d[_0x57d15e];return _0x1f8848;}import _0x32ef79 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x19a206={}){const _0x2b79c6=_0x1f88,_0x2aadf6={'ybuYe':function(_0xcfc283,_0x4c8b9b){return _0xcfc283===_0x4c8b9b;},'tilme':'opencode','dUgVE':_0x2b79c6(0x200),'SFiwQ':function(_0x1ec6db){return _0x1ec6db();},'IJrIk':'user','MnUxt':function(_0x1ed2b7,_0x11d3c7){return _0x1ed2b7===_0x11d3c7;},'OlppG':'list','ySxpu':_0x2b79c6(0x208),'Bodtq':'project','IMADO':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','GPeVs':'project-level','GKAvO':_0x2b79c6(0x209)};console[_0x2b79c6(0x204)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x59b004=_0x19a206['platform']??'claude',_0x1ab5af=await getToken();if(!_0x1ab5af){console['log'](_0x2b79c6(0x1f9)),console[_0x2b79c6(0x204)]('To\x20get\x20started:'),console[_0x2b79c6(0x204)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console[_0x2b79c6(0x204)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x2aadf6[_0x2b79c6(0x1e6)](_0x59b004,_0x2aadf6[_0x2b79c6(0x1fc)])?_0x2aadf6[_0x2b79c6(0x1fa)]:'')+_0x2b79c6(0x1f8)),console['log'](_0x2b79c6(0x201)+(_0x59b004===_0x2aadf6[_0x2b79c6(0x1fc)]?_0x2b79c6(0x200):'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0x243e88=_0x2aadf6['SFiwQ'](getProjectRoot),_0x4a1862=basename(_0x243e88),_0x2b47b1=_0x2aadf6['ybuYe'](_0x59b004,'opencode')?getOpencodeConfigDir(_0x2aadf6['IJrIk'])+_0x2b79c6(0x1f1):getClaudeConfigDir()+'/skills/',_0x1c8337=_0x2aadf6[_0x2b79c6(0x202)](_0x59b004,'opencode')?_0x243e88+'/.opencode/skills/':_0x243e88+_0x2b79c6(0x1f2),_0x398ff2=process['stdin'][_0x2b79c6(0x1e9)]&&process['stdout']['isTTY'];let _0x3f1a3e;if(_0x19a206['autoInstall'])_0x3f1a3e=_0x19a206['autoInstall'];else{if(_0x398ff2){const _0x5e3eb2=await _0x32ef79['prompt']([{'type':_0x2aadf6['OlppG'],'name':_0x2aadf6['ySxpu'],'message':_0x2b79c6(0x1ee),'choices':[{'name':_0x2b79c6(0x1ec)+_0x2b47b1+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x1c8337+')','value':_0x2b79c6(0x1fd)}]}]);_0x3f1a3e=_0x5e3eb2['installLevel'];}else _0x3f1a3e=_0x2aadf6['Bodtq'],console['log'](_0x2b79c6(0x1e5)+_0x1c8337+')');}let _0x1e5f19=0x0;const _0x3a3648=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x53d46b=await installSkill(_0x2b79c6(0x1e8),{'cliVersion':_0x3a3648,'level':_0x3f1a3e,'platform':_0x59b004});_0x53d46b&&_0x1e5f19++;}catch(_0x3b6216){console[_0x2b79c6(0x1f4)](_0x2aadf6['IMADO'],_0x3b6216 instanceof Error?_0x3b6216['message']:_0x3b6216);}if(_0x1e5f19>0x0){const _0x1aa86f=_0x2aadf6[_0x2b79c6(0x1e6)](_0x3f1a3e,_0x2aadf6['IJrIk'])?_0x2b79c6(0x1ef):_0x2aadf6['GPeVs'];console[_0x2b79c6(0x204)]('\x0a✅\x20Installed\x20'+_0x1e5f19+'\x20'+_0x1aa86f+_0x2b79c6(0x1eb)+(_0x1e5f19>0x1?'s':'')+'\x20successfully!\x0a'),!_0x19a206[_0x2b79c6(0x1ed)]&&(console[_0x2b79c6(0x204)](_0x2b79c6(0x1f6)),_0x59b004===_0x2b79c6(0x1fb)?console['log'](_0x2b79c6(0x1f0)):console['log'](_0x2aadf6[_0x2b79c6(0x207)]));}else console[_0x2b79c6(0x204)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}function _0x1277(){const _0x5e7ec3=['11012vHCgJM','147436TogDmQ','GKAvO','installLevel','\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!','1096140wfjlUy','130wCQqkk','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','ybuYe','49469EGRpow','ranger','isTTY','300cYTUoc','\x20skill','All\x20projects\x20(','suppressUsage','Where\x20should\x20skills\x20be\x20installed?','user-level','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','/skills/','/.claude/skills/','248gChXhV','warn','6crQFOF','To\x20use:','260975qFuVnF','\x20<your-api-token>','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','dUgVE','opencode','tilme','project','114867nSGemW','33qnxjbd','\x20--opencode','\x20\x203.\x20Run:\x20ranger\x20skillup','MnUxt','1279752HzHETT','log'];_0x1277=function(){return _0x5e7ec3;};return _0x1277();}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x6622a8=_0x4fe4;(function(_0x212ebb,_0x44dad2){const _0x1c7b7b=_0x4fe4,_0x4defaf=_0x212ebb();while(!![]){try{const _0x56f30c=parseInt(_0x1c7b7b(0x148))/0x1*(-parseInt(_0x1c7b7b(0x153))/0x2)+-parseInt(_0x1c7b7b(0xf4))/0x3+parseInt(_0x1c7b7b(0x125))/0x4*(-parseInt(_0x1c7b7b(0x12d))/0x5)+parseInt(_0x1c7b7b(0x101))/0x6*(-parseInt(_0x1c7b7b(0x13b))/0x7)+parseInt(_0x1c7b7b(0x12e))/0x8+parseInt(_0x1c7b7b(0x145))/0x9+parseInt(_0x1c7b7b(0x147))/0xa;if(_0x56f30c===_0x44dad2)break;else _0x4defaf['push'](_0x4defaf['shift']());}catch(_0x3a822a){_0x4defaf['push'](_0x4defaf['shift']());}}}(_0x2e8e,0x30706));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x1b6e77 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,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';function _0x2e8e(){const _0x16ea15=['git_check','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','kWTjS','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','existing_token','pEPnC','profile','XWnuI','jRAYq','force','No\x20git\x20repository\x20found','✓\x20Playwright\x20Chromium\x20browser\x20found','✓\x20Stored\x20credentials\x20locally','\x20and\x20','Installation\x20failed\x20with\x20exit\x20code\x20','229284LyzUDB',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','isTTY','\x20install\x20chromium','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','jKDHA','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','You\x20can\x20install\x20it\x20manually\x20by\x20running:','digBI','install','MoqfW','stdout','local','42540XPUiTs','confirm','PNpPM','✓\x20Already\x20authenticated\x20to\x20','LtTBK','aOlod','AZZLA','log','organizationName','1.58.2','JHsTa','Authentication\x20failed:\x20','\x0aInstalling\x20Chromium\x20browser...\x0a','stdin','user','close','trackPhaseStart','GDVSL','✓\x20Local\x20profile\x20already\x20exists','iZSIL','evIkM','stMAt','opencode','resolve','\x0aIn\x20Claude\x20Code,\x20run\x20','skipChromium','ranger','\x20now?','playwright@','skipped','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','LSLzH','\x20(fallback\x20version)','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','✓\x20Authenticated\x20to\x20','scope','12236aUWblM','sNsKE','RANGER_TEST_USERNAME','zZfja','\x20for\x20explicit\x20profile\x20management).','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','PmotB','GkNit','405xJaNSJ','2248824CIQumc','iAgWs','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','✓\x20Created\x20.ranger/.gitignore','provided_token','\x0a❌\x20Profile\x20setup\x20failed:','✓\x20Exported\x20credentials\x20for\x20CI','error','ranger\x20profile\x20add','pgNJa','version','eEQfd','plugin','154UmVWhO','iQjUG','Zvyls','\x20directory\x20already\x20exists','ready','message','\x20and\x20prompt\x20the\x20coding','success','auth','RANGER_TEST_PASSWORD','2438820dGWGMd','\x0a🚀\x20Ranger\x20Setup\x0a','3020590SDVcyp','175549HfSjHu','JsBxH','inherit','\x20directory','url','trackPhaseEnd','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','tdkml','✓\x20Skipping\x20authentication\x20(--skip-auth)','--with-deps','✓\x20Created\x20','2PceoOH','ignore','platform','VficC','NofEv','mwPQa'];_0x2e8e=function(){return _0x16ea15;};return _0x2e8e();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x6622a8(0x10a);function _0x4fe4(_0x399a76,_0xf64eec){_0x399a76=_0x399a76-0xe8;const _0x2e8efe=_0x2e8e();let _0x4fe4b3=_0x2e8efe[_0x399a76];return _0x4fe4b3;}const bold=_0x153ffa=>'\x1b[1m'+_0x153ffa+'\x1b[0m';export function getPlaywrightVersion(){const _0xca4257=_0x6622a8,_0x801f30={'cBWnq':function(_0x8f1e48,_0x3ae8c6){return _0x8f1e48(_0x3ae8c6);}};try{const _0x11f3e1=require[_0xca4257(0x118)]('playwright/package.json'),_0xfaf32f=_0x801f30['cBWnq'](require,_0x11f3e1);return _0xfaf32f[_0xca4257(0x138)];}catch{return null;}}export function installChromiumBinary(_0x56c5a4,_0x57f2e0=![]){const _0x126d36=_0x6622a8,_0x4b31c7={'sNsKE':function(_0x29baeb,_0x102b2f){return _0x29baeb(_0x102b2f);},'GkNit':_0x126d36(0x151),'zZfja':'chromium','LSLzH':_0x126d36(0x154),'stMAt':_0x126d36(0x14a),'vDSEq':function(_0x4a07ac,_0x5a5ae7){return _0x4a07ac===_0x5a5ae7;},'QqtqD':_0x126d36(0x110),'XWnuI':_0x126d36(0x135)};return new Promise((_0x3b892f,_0x1fa3c2)=>{const _0x516d54=_0x126d36,_0x3e015d={'NUMpV':function(_0x2ede39,_0x2b849f){return _0x2ede39===_0x2b849f;},'wGxoE':function(_0xbc3931){return _0xbc3931();},'ogZXv':function(_0x146ffc,_0x300006){return _0x146ffc(_0x300006);},'MkvVd':function(_0x4c4fa9,_0x4b5f5c){const _0x28663a=_0x4fe4;return _0x4b31c7[_0x28663a(0x126)](_0x4c4fa9,_0x4b5f5c);}},_0x55842e=[_0x516d54(0x11d)+_0x56c5a4,_0x516d54(0xfd),..._0x57f2e0?[_0x4b31c7[_0x516d54(0x12c)]]:[],_0x4b31c7[_0x516d54(0x128)]],_0x3a6be3=spawn('npx',_0x55842e,{'stdio':[_0x4b31c7[_0x516d54(0x120)],_0x4b31c7['stMAt'],_0x4b31c7[_0x516d54(0x116)]],'shell':_0x4b31c7['vDSEq'](process[_0x516d54(0x155)],'win32')});_0x3a6be3['on'](_0x4b31c7['QqtqD'],_0x5d7b7d=>{const _0x39aa79=_0x516d54;_0x3e015d['NUMpV'](_0x5d7b7d,0x0)?_0x3e015d['wGxoE'](_0x3b892f):_0x3e015d['ogZXv'](_0x1fa3c2,new Error(_0x39aa79(0xf3)+_0x5d7b7d));}),_0x3a6be3['on'](_0x4b31c7[_0x516d54(0xec)],_0x129116=>{_0x3e015d['MkvVd'](_0x1fa3c2,_0x129116);});});}export async function authenticate(_0x1e3f87){const _0x28b03a=_0x6622a8,_0x5c45cd={'lbakf':function(_0x41fa74){return _0x41fa74();},'JsBxH':function(_0x2b75b1,_0x5ebf7b){return _0x2b75b1(_0x5ebf7b);},'xQYxj':function(_0x59637a,_0x5be6de){return _0x59637a(_0x5be6de);},'zNDdr':_0x28b03a(0xf1),'evIkM':_0x28b03a(0x132)};if(!_0x1e3f87){const _0x437d57=await _0x5c45cd['lbakf'](getToken);if(_0x437d57){const _0x3c1712=await getCurrentUser(_0x437d57);if(_0x3c1712['success'])return console['log'](_0x28b03a(0x104)+_0x3c1712['user']['organizationName']),{'token':_0x437d57,'method':_0x28b03a(0xe9)};}try{_0x1e3f87=await _0x5c45cd['lbakf'](runDeviceAuthFlow);}catch(_0x3cddef){throw new Error(_0x28b03a(0x10c)+(_0x3cddef instanceof Error?_0x3cddef['message']:_0x3cddef));}const _0x19fafc=await _0x5c45cd[_0x28b03a(0x149)](getCurrentUser,_0x1e3f87);if(!_0x19fafc['success'])throw new Error(_0x28b03a(0x122)+_0x19fafc[_0x28b03a(0x135)]);return console[_0x28b03a(0x108)]('✓\x20Authenticated\x20to\x20'+_0x19fafc['user'][_0x28b03a(0x109)]),{'token':_0x1e3f87,'method':'device_auth'};}console[_0x28b03a(0x108)]('Validating\x20API\x20token...');const _0x254cb5=await getCurrentUser(_0x1e3f87);if(!_0x254cb5[_0x28b03a(0x142)]){if(_0x254cb5['status'])throw new Error(_0x28b03a(0x10c)+_0x254cb5[_0x28b03a(0x135)]+_0x28b03a(0x130));else throw new Error(_0x28b03a(0x11f)+_0x254cb5[_0x28b03a(0x135)]+_0x28b03a(0x14e));}return console['log'](_0x28b03a(0x123)+_0x254cb5['user'][_0x28b03a(0x109)]),await _0x5c45cd['xQYxj'](storeToken,_0x1e3f87),console[_0x28b03a(0x108)](process['env']['GITHUB_ENV']?_0x28b03a(0x134):_0x5c45cd['zNDdr']),{'token':_0x1e3f87,'method':_0x5c45cd[_0x28b03a(0x115)]};}export async function ensureRangerDir(_0x340617){const _0x5c741a=_0x6622a8,_0x4f5ec7={'FUEqf':'user','fmoqg':'~/.ranger/','PmotB':function(_0x5566e1,_0x2a3264){return _0x5566e1===_0x2a3264;},'iXoBy':function(_0x30b01f){return _0x30b01f();},'lektr':function(_0x4f0f83,_0x3ae4ab,_0x20c723){return _0x4f0f83(_0x3ae4ab,_0x20c723);}};let _0x1ad234;const _0x2e3088=_0x340617===_0x4f5ec7['FUEqf']?_0x4f5ec7['fmoqg']:'.ranger/';if(_0x4f5ec7[_0x5c741a(0x12b)](_0x340617,_0x4f5ec7['FUEqf']))_0x1ad234=_0x4f5ec7['iXoBy'](getRangerHomeDir);else{const _0x2fb6df=findGitRoot();_0x1ad234=_0x2fb6df?_0x4f5ec7['lektr'](join,_0x2fb6df,'.ranger'):getRangerDir();}return!existsSync(_0x1ad234)?(await mkdir(_0x1ad234,{'recursive':!![]}),console['log'](_0x5c741a(0x152)+_0x2e3088+_0x5c741a(0x14b)),{'path':_0x1ad234,'installed':!![]}):(console['log']('✓\x20'+_0x2e3088+_0x5c741a(0x13e)),{'path':_0x1ad234,'installed':![]});}export async function ensureChromium(_0x39d312=![]){const _0x551c75=_0x6622a8,_0x3c7d9a={'GDVSL':_0x551c75(0xf0),'jRAYq':function(_0x3fb99e){return _0x3fb99e();},'DVSgA':function(_0x93d61e,_0x475db9){return _0x93d61e??_0x475db9;},'aOlod':function(_0x352848,_0x4f7514,_0x5d952a){return _0x352848(_0x4f7514,_0x5d952a);},'JHsTa':function(_0x3d8a68,_0x21e778){return _0x3d8a68 instanceof _0x21e778;},'Svcst':_0x551c75(0xfb)};let _0x33870e=![];try{const _0x5a9fa2=chromium['executablePath']();_0x33870e=existsSync(_0x5a9fa2);}catch{_0x33870e=![];}if(_0x33870e)return console['log'](_0x3c7d9a[_0x551c75(0x112)]),![];const _0x382284=_0x3c7d9a[_0x551c75(0xed)](getPlaywrightVersion),_0x4416a6=_0x3c7d9a['DVSgA'](_0x382284,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x42f2de=!_0x382284,_0x566520=process['stdin'][_0x551c75(0xf6)]&&process['stdout'][_0x551c75(0xf6)];let _0x5edfcf=!![];if(_0x566520){const {install:_0x5d06dc}=await _0x1b6e77['prompt']([{'type':_0x551c75(0x102),'name':'install','message':_0x42f2de?_0x551c75(0xfa)+_0x4416a6+_0x551c75(0x11c):'The\x20required\x20version\x20('+_0x4416a6+_0x551c75(0xf5),'default':!![]}]);_0x5edfcf=_0x5d06dc;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x4416a6+(_0x42f2de?_0x551c75(0x121):'')+'...');if(_0x5edfcf){console['log'](_0x551c75(0x10d));try{await _0x3c7d9a[_0x551c75(0x106)](installChromiumBinary,_0x4416a6,_0x39d312),console[_0x551c75(0x108)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x5b74ce){console[_0x551c75(0x135)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x3c7d9a[_0x551c75(0x10b)](_0x5b74ce,Error)?_0x5b74ce['message']:_0x5b74ce),console['log'](_0x3c7d9a['Svcst']),console['log']('\x20\x20npx\x20playwright@'+_0x4416a6+_0x551c75(0xf7));}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x551c75(0x108)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0x4416a6+_0x551c75(0xf7));return!![];}export async function writeRangerGitignore(_0x18e037){const _0x41ec17=_0x6622a8,_0x423e80={'jKDHA':'.gitignore','pEPnC':_0x41ec17(0x131)},_0x21e76f=join(_0x18e037,_0x423e80[_0x41ec17(0xf9)]),_0x4b1f4b='\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(_0x21e76f,_0x4b1f4b),console['log'](_0x423e80[_0x41ec17(0xea)]);}export async function ensureLocalEnv(_0x2ed23a,_0x1fc1be){const _0x1d1b89=_0x6622a8,_0x43017b={'IzQeI':function(_0x491be6){return _0x491be6();},'AZZLA':function(_0x498fe0,_0x2a717a){return _0x498fe0!==_0x2a717a;},'gesqr':'user','mNucx':function(_0x2de94c,_0x4b9eb8){return _0x2de94c===_0x4b9eb8;},'lkcSx':_0x1d1b89(0x100),'piGXx':function(_0x57ea2c,_0x258826){return _0x57ea2c instanceof _0x258826;}};if(!_0x43017b['IzQeI'](findGitRoot)&&_0x43017b[_0x1d1b89(0x107)](_0x2ed23a?.['scope'],_0x43017b['gesqr']))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x58fdaf=_0x43017b['mNucx'](_0x2ed23a?.['scope'],_0x43017b['gesqr'])?getRangerHomeDir():undefined;if(findExistingEnv(_0x43017b['lkcSx'],{'locations':['local'],'rangerDir':_0x58fdaf}))return console[_0x1d1b89(0x108)](_0x1d1b89(0x113)),{'ready':!![],'skipped':![]};try{return await addEnv('local',{'url':_0x2ed23a?.[_0x1d1b89(0x14c)],'force':_0x2ed23a?.['force'],'allowInsecureLocalhost':_0x2ed23a?.['allowInsecureLocalhost'],'scope':_0x2ed23a?.[_0x1d1b89(0x124)]},_0x1fc1be),{'ready':!![],'skipped':![]};}catch(_0x2a00a1){return console[_0x1d1b89(0x135)](_0x1d1b89(0x133),_0x43017b['piGXx'](_0x2a00a1,Error)?_0x2a00a1[_0x1d1b89(0x140)]:_0x2a00a1),{'ready':![],'skipped':![]};}}export async function start(_0x39f48b,_0x35d168,_0x2273dd){const _0x971fad=_0x6622a8,_0x4a1899={'SnwcM':function(_0x1b9b13,_0x25fd4b){return _0x1b9b13===_0x25fd4b;},'MoqfW':_0x971fad(0x10f),'kWTjS':'git_check','jzRSB':'No\x20git\x20repository\x20found\x20for\x20--scope\x20project.\x20Re-run\x20without\x20`--scope\x20project`\x20to\x20install\x20at\x20user\x20scope.','eEQfd':function(_0x247124,_0x18e320){return _0x247124(_0x18e320);},'VficC':function(_0x3650a0){return _0x3650a0();},'wjZcL':function(_0x5d62a2,_0x32833c){return _0x5d62a2(_0x32833c);},'Zvyls':_0x971fad(0x11e),'digBI':_0x971fad(0x143),'rupXZ':'chromium','iAgWs':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','gSArs':function(_0x46da5a,_0x1a9596){return _0x46da5a(_0x1a9596);},'tdkml':'plugin','PNpPM':function(_0x2d898e,_0x5ee69a){return _0x2d898e(_0x5ee69a);},'lEwet':function(_0x856731,_0x542097){return _0x856731(_0x542097);},'NofEv':function(_0x3eddc3,_0x33e9ad){return _0x3eddc3&&_0x33e9ad;},'iQjUG':function(_0xfd7791,_0x1c0b7f,_0x5b5161){return _0xfd7791(_0x1c0b7f,_0x5b5161);},'EyMxr':_0x971fad(0x11b),'bGIoM':'opencode','izJwH':function(_0x24440,_0x2d6fcd){return _0x24440 instanceof _0x2d6fcd;},'UkUiH':'skills','LtTBK':function(_0x16ba41,_0x2afc2d){return _0x16ba41(_0x2afc2d);},'Yehxc':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','mwPQa':function(_0x47caa0,_0x30c58f){return _0x47caa0(_0x30c58f);},'tGAKl':_0x971fad(0x127),'iZSIL':_0x971fad(0x144),'iaHll':function(_0x4770ae,_0x18ed69){return _0x4770ae(_0x18ed69);},'wsXir':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','vWLHB':'/ranger:enable','pgNJa':function(_0x5afb3e,_0x463ea5){return _0x5afb3e+_0x463ea5;}};console[_0x971fad(0x108)](_0x971fad(0x146));const _0x590546=process[_0x971fad(0x10e)][_0x971fad(0xf6)]&&process[_0x971fad(0xff)][_0x971fad(0xf6)];!_0x35d168?.[_0x971fad(0x124)]&&(_0x35d168={..._0x35d168,'scope':_0x971fad(0x10f)});const _0x262da2=_0x4a1899['SnwcM'](_0x35d168?.[_0x971fad(0x124)],_0x4a1899[_0x971fad(0xfe)]);_0x2273dd?.['trackPhaseStart'](_0x4a1899[_0x971fad(0x15b)]);if(!_0x262da2&&!findGitRoot()){await _0x2273dd?.['trackPhaseError']('git_check',new Error(_0x971fad(0xef)));throw new Error(_0x4a1899['jzRSB']);}_0x2273dd?.[_0x971fad(0x14d)](_0x971fad(0x159));const _0x3edff8=_0x262da2?!_0x4a1899[_0x971fad(0x139)](existsSync,_0x4a1899[_0x971fad(0x156)](getRangerHomeDir)):!_0x4a1899['wjZcL'](existsSync,getRangerDir()),{path:_0x1a8593}=await ensureRangerDir(_0x262da2?'user':undefined);if(_0x35d168?.['skipAuth'])console[_0x971fad(0x108)](_0x971fad(0x150)),_0x2273dd?.[_0x971fad(0x14d)]('auth',{'isFirstRun':_0x3edff8,'method':_0x4a1899[_0x971fad(0x13d)]});else{_0x2273dd?.['trackPhaseStart'](_0x4a1899['digBI']);const _0x136bc3=await authenticate(_0x39f48b);_0x2273dd?.['trackPhaseEnd'](_0x4a1899[_0x971fad(0xfc)],{'isFirstRun':_0x3edff8,'method':_0x136bc3['method']});}_0x2273dd?.[_0x971fad(0x111)](_0x4a1899['rupXZ']);_0x35d168?.[_0x971fad(0x11a)]?console['log'](_0x4a1899[_0x971fad(0x12f)]):await _0x4a1899['wjZcL'](ensureChromium,_0x35d168?.['withDeps']);_0x2273dd?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3edff8,'skipped':!!_0x35d168?.[_0x971fad(0x11a)]});!_0x262da2&&await _0x4a1899['gSArs'](writeRangerGitignore,_0x1a8593);console[_0x971fad(0x108)](_0x971fad(0x15a));const _0x1de66d=_0x35d168?.['scope'],_0x9e002a=_0x35d168?.[_0x971fad(0x117)]??![];let _0x5a9486=null;_0x9e002a?(_0x2273dd?.['trackPhaseStart'](_0x4a1899[_0x971fad(0x14f)]),_0x5a9486=await _0x4a1899[_0x971fad(0x103)](ensureOpencodePluginConfig,_0x1de66d),_0x2273dd?.['trackPhaseEnd'](_0x4a1899[_0x971fad(0x14f)],{'isFirstRun':_0x3edff8,'opencode':!![]})):(_0x2273dd?.[_0x971fad(0x111)](_0x971fad(0x13a)),await _0x4a1899['lEwet'](ensureClaudePlugin,_0x1de66d),_0x2273dd?.[_0x971fad(0x14d)](_0x4a1899[_0x971fad(0x14f)],{'isFirstRun':_0x3edff8}));if(_0x4a1899[_0x971fad(0x157)](_0x9e002a,_0x5a9486)){_0x2273dd?.[_0x971fad(0x111)]('skills');try{await _0x4a1899[_0x971fad(0x13c)](installSkill,_0x4a1899['EyMxr'],{'level':_0x5a9486['scope'],'cliVersion':getCurrentVersion(),'platform':_0x4a1899['bGIoM']}),_0x2273dd?.['trackPhaseEnd']('skills',{'isFirstRun':_0x3edff8,'opencode':!![]});}catch(_0x54a5b7){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x4a1899['izJwH'](_0x54a5b7,Error)?_0x54a5b7['message']:_0x54a5b7),_0x2273dd?.['trackPhaseEnd'](_0x4a1899['UkUiH'],{'isFirstRun':_0x3edff8,'opencode':!![],'failed':!![]});}}else _0x2273dd?.['trackPhaseStart'](_0x4a1899['UkUiH']),await _0x4a1899[_0x971fad(0x105)](ensureClaudeSkills,_0x1de66d),_0x2273dd?.[_0x971fad(0x14d)](_0x4a1899['UkUiH'],{'isFirstRun':_0x3edff8});if(_0x35d168?.['skipAuth'])console[_0x971fad(0x108)](_0x4a1899['Yehxc']);else{if(_0x35d168?.['url']){_0x2273dd?.['trackPhaseStart']('profile');const _0x3c30c2=await ensureLocalEnv({'url':_0x35d168['url'],'force':_0x35d168?.[_0x971fad(0xee)],'allowInsecureLocalhost':_0x35d168?.['allowInsecureLocalhost'],'scope':_0x4a1899['SnwcM'](_0x35d168?.[_0x971fad(0x124)],_0x4a1899['MoqfW'])?_0x4a1899['MoqfW']:undefined},_0x2273dd);_0x2273dd?.['trackPhaseEnd'](_0x971fad(0xeb),{'isFirstRun':_0x3edff8,'profileReady':_0x3c30c2[_0x971fad(0x13f)],'userSkipped':_0x3c30c2['skipped']});}else console[_0x971fad(0x108)]('\x0aTo\x20verify\x20with\x20a\x20browser:\x20set\x20'+_0x4a1899[_0x971fad(0x158)](bold,_0x4a1899['tGAKl'])+_0x971fad(0xf2)+bold(_0x4a1899[_0x971fad(0x114)])),console['log']('\x20\x20(or\x20use\x20'+_0x4a1899['iaHll'](bold,_0x971fad(0x136))+_0x971fad(0x129));}if(_0x9e002a)console['log'](_0x971fad(0x12a)),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x4a1899['wsXir']);else{const _0x48e077=bold(_0x4a1899['vWLHB']);console[_0x971fad(0x108)](_0x4a1899[_0x971fad(0x137)](_0x971fad(0x119)+_0x48e077+_0x971fad(0x141)+_0x971fad(0xf8),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x971fad(0xe8));}}
|
|
1
|
+
const _0x47a614=_0x45a4;(function(_0x43fdf7,_0x20bd84){const _0xa7dcc6=_0x45a4,_0x4a3c98=_0x43fdf7();while(!![]){try{const _0x3b5ea8=-parseInt(_0xa7dcc6(0x184))/0x1+-parseInt(_0xa7dcc6(0x158))/0x2*(-parseInt(_0xa7dcc6(0x1a3))/0x3)+parseInt(_0xa7dcc6(0x191))/0x4*(-parseInt(_0xa7dcc6(0x18f))/0x5)+parseInt(_0xa7dcc6(0x16a))/0x6+parseInt(_0xa7dcc6(0x164))/0x7+parseInt(_0xa7dcc6(0x162))/0x8*(parseInt(_0xa7dcc6(0x17e))/0x9)+-parseInt(_0xa7dcc6(0x154))/0xa;if(_0x3b5ea8===_0x20bd84)break;else _0x4a3c98['push'](_0x4a3c98['shift']());}catch(_0x44f17f){_0x4a3c98['push'](_0x4a3c98['shift']());}}}(_0x48a1,0x84def));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x228a2c from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';function _0x45a4(_0x12ad47,_0x41d5fe){_0x12ad47=_0x12ad47-0x146;const _0x48a186=_0x48a1();let _0x45a4fb=_0x48a186[_0x12ad47];return _0x45a4fb;}import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x495aa4=>_0x47a614(0x198)+_0x495aa4+_0x47a614(0x1ad);export function getPlaywrightVersion(){const _0x136d5f=_0x47a614,_0x3e0a76={'Nfmfv':'playwright/package.json'};try{const _0x40c929=require['resolve'](_0x3e0a76[_0x136d5f(0x1a7)]),_0x1579ca=require(_0x40c929);return _0x1579ca['version'];}catch{return null;}}export function installChromiumBinary(_0x9d759c,_0x51825f=![]){const _0x30ead2={'pyfYv':function(_0x1efefe,_0x4ec2fa){return _0x1efefe===_0x4ec2fa;},'RZzlu':function(_0x1d916c){return _0x1d916c();},'whuwk':function(_0x11e98e,_0x1c5f5f){return _0x11e98e(_0x1c5f5f);},'QYANt':'install','NPylJ':'npx','psolt':'inherit'};return new Promise((_0x845359,_0xb14a01)=>{const _0x287963=_0x45a4,_0x53fe4b=['playwright@'+_0x9d759c,_0x30ead2['QYANt'],..._0x51825f?[_0x287963(0x170)]:[],_0x287963(0x16b)],_0x231ff8=spawn(_0x30ead2[_0x287963(0x17b)],_0x53fe4b,{'stdio':[_0x287963(0x1a6),'inherit',_0x30ead2['psolt']],'shell':process[_0x287963(0x18a)]===_0x287963(0x15c)});_0x231ff8['on']('close',_0x3f1565=>{const _0x58b09e=_0x287963;_0x30ead2['pyfYv'](_0x3f1565,0x0)?_0x30ead2[_0x58b09e(0x1ae)](_0x845359):_0x30ead2['whuwk'](_0xb14a01,new Error(_0x58b09e(0x146)+_0x3f1565));}),_0x231ff8['on'](_0x287963(0x163),_0x2da29f=>{_0x30ead2['whuwk'](_0xb14a01,_0x2da29f);});});}export async function authenticate(_0x45524e){const _0x156c51=_0x47a614,_0xa09526={'bFSVF':function(_0x43c060){return _0x43c060();},'qEbWo':function(_0x4f7b95,_0x47dea0){return _0x4f7b95 instanceof _0x47dea0;},'JYPBA':_0x156c51(0x1a1)};if(!_0x45524e){const _0x410716=await _0xa09526[_0x156c51(0x15f)](getToken);if(_0x410716){const _0x5dff37=await getCurrentUser(_0x410716);if(_0x5dff37['success'])return console[_0x156c51(0x197)]('✓\x20Already\x20authenticated\x20to\x20'+_0x5dff37['user']['organizationName']),{'token':_0x410716,'method':_0x156c51(0x1a0)};}try{_0x45524e=await _0xa09526['bFSVF'](runDeviceAuthFlow);}catch(_0x2bdb07){throw new Error('Authentication\x20failed:\x20'+(_0xa09526[_0x156c51(0x148)](_0x2bdb07,Error)?_0x2bdb07['message']:_0x2bdb07));}const _0xf08903=await getCurrentUser(_0x45524e);if(!_0xf08903['success'])throw new Error(_0x156c51(0x156)+_0xf08903['error']);return console[_0x156c51(0x197)](_0x156c51(0x16f)+_0xf08903[_0x156c51(0x183)]['organizationName']),{'token':_0x45524e,'method':'device_auth'};}console['log'](_0x156c51(0x168));const _0x9f08b0=await getCurrentUser(_0x45524e);if(!_0x9f08b0[_0x156c51(0x187)]){if(_0x9f08b0['status'])throw new Error('Authentication\x20failed:\x20'+_0x9f08b0['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x9f08b0['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x156c51(0x197)]('✓\x20Authenticated\x20to\x20'+_0x9f08b0['user'][_0x156c51(0x167)]),await storeToken(_0x45524e),console[_0x156c51(0x197)](process[_0x156c51(0x149)][_0x156c51(0x157)]?_0x156c51(0x178):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x45524e,'method':_0xa09526[_0x156c51(0x188)]};}function _0x48a1(){const _0xcda3f6=['cRlrD','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Skipping\x20authentication\x20(--skip-auth)','ykktf','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','skipped','13745850msGwTT','✓\x20~/.ranger/\x20directory\x20already\x20exists','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','GITHUB_ENV','44drxiij','mUiwS','rsJHJ','local','win32','\x20for\x20explicit\x20profile\x20management).',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','bFSVF','\x0aInstalling\x20Chromium\x20browser...\x0a','RVRGG','251432BZPlte','error','3563455SDyHBB','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','organizationName','Validating\x20API\x20token...','RANGER_TEST_PASSWORD','3497058eWbzvh','chromium','confirm','skipChromium','install','✓\x20Authenticated\x20to\x20','--with-deps','VYRBi','\x0a\x20\x20your\x20org\x27s\x20auth\x20config\x20drives\x20which\x20flow\x20runs.','aRPMY','\x20when\x20the\x20org\x27s\x20login','.gitignore','SZPVm','✓\x20Created\x20.ranger/.gitignore','✓\x20Exported\x20credentials\x20for\x20CI','auth','cvyAn','NPylJ','prompt','\x20\x20npx\x20playwright@','234pGxJOG','ranger\x20setup\x20--scope=','scope','trackPhaseEnd','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','user','306192XSnKNI','LvFAA','BKpws','success','JYPBA','profile','platform','isTTY','RANGER_TEST_USERNAME','pQUUt','\x0a⚠\x20Skipping\x20Chromium\x20installation.','63070RHGtQB','\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','104QWDfYA','WTdtH','skills','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','CrUYS','MoQeh','log','\x1b[1m','\x0aTo\x20verify\x20with\x20a\x20browser,\x20set\x20','UBkzB','withDeps','emFdC','✓\x20Local\x20profile\x20already\x20exists','yrkdk','\x0a❌\x20Profile\x20setup\x20failed:','existing_token','provided_token','mKeVF','87807Rddfve','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','\x20install\x20chromium','ignore','Nfmfv','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','AvLpQ','\x20is\x20no\x20longer\x20supported.\x20','plugin','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x1b[0m','RZzlu','Installation\x20failed\x20with\x20exit\x20code\x20','url','qEbWo','env','DGRvS','cCguf','trackPhaseStart','\x0aIn\x20Claude\x20Code,\x20run\x20'];_0x48a1=function(){return _0xcda3f6;};return _0x48a1();}export async function ensureRangerDir(_0x36f7f4){const _0x5ef815=_0x47a614,_0x59c036={'cOzjD':function(_0x8c6a7e,_0x549685){return _0x8c6a7e(_0x549685);},'BKpws':'✓\x20Created\x20~/.ranger/\x20directory','cRlrD':_0x5ef815(0x155)};void _0x36f7f4;const _0x5c00e9=getRangerHomeDir();return!_0x59c036['cOzjD'](existsSync,_0x5c00e9)?(await mkdir(_0x5c00e9,{'recursive':!![]}),console['log'](_0x59c036[_0x5ef815(0x186)]),{'path':_0x5c00e9,'installed':!![]}):(console['log'](_0x59c036[_0x5ef815(0x14e)]),{'path':_0x5c00e9,'installed':![]});}export async function ensureChromium(_0x125ca2=![]){const _0x4f9f72=_0x47a614,_0x518769={'DjoKw':function(_0x38cc9e,_0x20f390){return _0x38cc9e(_0x20f390);},'mUiwS':function(_0x30fc51){return _0x30fc51();},'qFGGz':function(_0x3330c3,_0x3c341e){return _0x3330c3??_0x3c341e;},'RVRGG':'\x20(fallback\x20version)','bevqZ':_0x4f9f72(0x160),'RDjPq':function(_0x344bbc,_0x3bd364,_0x2bce99){return _0x344bbc(_0x3bd364,_0x2bce99);},'AvLpQ':function(_0x2f9f8e,_0x250ee6){return _0x2f9f8e instanceof _0x250ee6;},'hQhFB':_0x4f9f72(0x18e)};let _0x398335=![];try{const _0x1c40ff=chromium['executablePath']();_0x398335=_0x518769['DjoKw'](existsSync,_0x1c40ff);}catch{_0x398335=![];}if(_0x398335)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x34e8c2=_0x518769[_0x4f9f72(0x159)](getPlaywrightVersion),_0x36a094=_0x518769['qFGGz'](_0x34e8c2,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0xb7e462=!_0x34e8c2,_0xe351df=process['stdin'][_0x4f9f72(0x18b)]&&process['stdout'][_0x4f9f72(0x18b)];let _0x149d75=!![];if(_0xe351df){const {install:_0x34d1c0}=await _0x228a2c[_0x4f9f72(0x17c)]([{'type':_0x4f9f72(0x16c),'name':_0x4f9f72(0x16e),'message':_0xb7e462?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x36a094+'\x20now?':'The\x20required\x20version\x20('+_0x36a094+_0x4f9f72(0x15e),'default':!![]}]);_0x149d75=_0x34d1c0;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x36a094+(_0xb7e462?_0x518769[_0x4f9f72(0x161)]:'')+'...');if(_0x149d75){console[_0x4f9f72(0x197)](_0x518769['bevqZ']);try{await _0x518769['RDjPq'](installChromiumBinary,_0x36a094,_0x125ca2),console[_0x4f9f72(0x197)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x3d9831){console[_0x4f9f72(0x163)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x518769[_0x4f9f72(0x1a9)](_0x3d9831,Error)?_0x3d9831['message']:_0x3d9831),console[_0x4f9f72(0x197)](_0x4f9f72(0x1ac)),console[_0x4f9f72(0x197)](_0x4f9f72(0x17d)+_0x36a094+'\x20install\x20chromium');}}else console['log'](_0x518769['hQhFB']),console[_0x4f9f72(0x197)](_0x4f9f72(0x1a4)),console['log'](_0x4f9f72(0x17d)+_0x36a094+_0x4f9f72(0x1a5));return!![];}export async function writeRangerGitignore(_0x3af982){const _0x4eb2c6=_0x47a614,_0xb6db01={'cvyAn':function(_0x49a4ce,_0xcaa165,_0x3f3b6c){return _0x49a4ce(_0xcaa165,_0x3f3b6c);},'VYRBi':_0x4eb2c6(0x175)},_0x17815d=_0xb6db01[_0x4eb2c6(0x17a)](join,_0x3af982,_0xb6db01[_0x4eb2c6(0x171)]),_0x57e8bb=_0x4eb2c6(0x190);await _0xb6db01[_0x4eb2c6(0x17a)](writeFile,_0x17815d,_0x57e8bb),console['log'](_0x4eb2c6(0x177));}export async function ensureLocalEnv(_0x43cb85,_0x4c0a30){const _0x5c3b36=_0x47a614,_0x279353={'LvFAA':function(_0x340b30){return _0x340b30();},'rsJHJ':'user','RHVwq':function(_0x53ad5){return _0x53ad5();},'MoQeh':_0x5c3b36(0x15b),'DGRvS':function(_0x1c1aa8,_0x3a9bad,_0x1baafc,_0x5e4a88){return _0x1c1aa8(_0x3a9bad,_0x1baafc,_0x5e4a88);},'cCguf':_0x5c3b36(0x19f)};if(!_0x279353[_0x5c3b36(0x185)](findGitRoot)&&_0x43cb85?.['scope']!==_0x5c3b36(0x183))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x28f1de=_0x43cb85?.[_0x5c3b36(0x180)]===_0x279353[_0x5c3b36(0x15a)]?_0x279353['RHVwq'](getRangerHomeDir):undefined;if(findExistingEnv(_0x279353[_0x5c3b36(0x196)],{'locations':[_0x279353[_0x5c3b36(0x196)]],'rangerDir':_0x28f1de}))return console['log'](_0x5c3b36(0x19d)),{'ready':!![],'skipped':![]};try{return await _0x279353[_0x5c3b36(0x14a)](addEnv,_0x279353[_0x5c3b36(0x196)],{'url':_0x43cb85?.[_0x5c3b36(0x147)],'force':_0x43cb85?.['force'],'allowInsecureLocalhost':_0x43cb85?.['allowInsecureLocalhost'],'scope':_0x43cb85?.[_0x5c3b36(0x180)]},_0x4c0a30),{'ready':!![],'skipped':![]};}catch(_0x33522a){return console['error'](_0x279353[_0x5c3b36(0x14b)],_0x33522a instanceof Error?_0x33522a['message']:_0x33522a),{'ready':![],'skipped':![]};}}export async function start(_0x1d3fad,_0x4ac25c,_0x46a488){const _0x2b832a=_0x47a614,_0x2e6e92={'WTdtH':function(_0x374a88,_0x331f64){return _0x374a88!==_0x331f64;},'mTOSt':function(_0x36d3de,_0xad733c){return _0x36d3de!==_0xad733c;},'CFLgD':_0x2b832a(0x183),'ATvey':function(_0x49a561,_0x4ffe4d){return _0x49a561+_0x4ffe4d;},'gsjOe':function(_0x47dedd,_0x29ccaf){return _0x47dedd(_0x29ccaf);},'mKeVF':function(_0xa799e4,_0x1e4da0){return _0xa799e4(_0x1e4da0);},'UBkzB':function(_0x5d2d38){return _0x5d2d38();},'SZPVm':'auth','xxpxa':_0x2b832a(0x152),'yrkdk':_0x2b832a(0x1ab),'emFdC':_0x2b832a(0x193),'WwBHV':function(_0x1e18e9,_0x396f6e,_0x100ef1){return _0x1e18e9(_0x396f6e,_0x100ef1);},'pQUUt':'opencode','aRPMY':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','IMKKh':function(_0x4c1446,_0x8877dd){return _0x4c1446+_0x8877dd;},'Vevlt':function(_0x48f114,_0x284174){return _0x48f114+_0x284174;},'CrUYS':function(_0x26f467,_0x200f55){return _0x26f467(_0x200f55);},'ykktf':_0x2b832a(0x194),'oHtgq':function(_0x207c9b,_0x3d4e1d){return _0x207c9b+_0x3d4e1d;}};console[_0x2b832a(0x197)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x2e6e92[_0x2b832a(0x192)](_0x4ac25c?.[_0x2b832a(0x180)],undefined)&&_0x2e6e92['mTOSt'](_0x4ac25c[_0x2b832a(0x180)],_0x2e6e92['CFLgD'])&&(console['error'](_0x2e6e92['ATvey'](_0x2b832a(0x17f)+_0x2e6e92['gsjOe'](String,_0x4ac25c['scope'])+_0x2b832a(0x1aa)+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x2b832a(0x182))),process['exit'](0x1));_0x4ac25c={..._0x4ac25c,'scope':'user'};const _0xa33968=!_0x2e6e92[_0x2b832a(0x1a2)](existsSync,_0x2e6e92[_0x2b832a(0x19a)](getRangerHomeDir));await ensureRangerDir('user');if(_0x4ac25c?.['skipAuth'])console['log'](_0x2b832a(0x150)),_0x46a488?.['trackPhaseEnd'](_0x2b832a(0x179),{'isFirstRun':_0xa33968,'method':'skipped'});else{_0x46a488?.[_0x2b832a(0x14c)]('auth');const _0x5f3d14=await authenticate(_0x1d3fad);_0x46a488?.['trackPhaseEnd'](_0x2e6e92[_0x2b832a(0x176)],{'isFirstRun':_0xa33968,'method':_0x5f3d14['method']});}_0x46a488?.[_0x2b832a(0x14c)]('chromium');_0x4ac25c?.[_0x2b832a(0x16d)]?console[_0x2b832a(0x197)](_0x2e6e92['xxpxa']):await _0x2e6e92[_0x2b832a(0x1a2)](ensureChromium,_0x4ac25c?.[_0x2b832a(0x19b)]);_0x46a488?.['trackPhaseEnd'](_0x2b832a(0x16b),{'isFirstRun':_0xa33968,'skipped':!!_0x4ac25c?.['skipChromium']}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x1287ab=_0x4ac25c?.[_0x2b832a(0x180)],_0x231876=_0x4ac25c?.['opencode']??![];let _0x2ecd9a=null;_0x231876?(_0x46a488?.['trackPhaseStart']('plugin'),_0x2ecd9a=await _0x2e6e92['gsjOe'](ensureOpencodePluginConfig,_0x1287ab),_0x46a488?.['trackPhaseEnd'](_0x2e6e92[_0x2b832a(0x19e)],{'isFirstRun':_0xa33968,'opencode':!![]})):(_0x46a488?.['trackPhaseStart'](_0x2b832a(0x1ab)),await ensureClaudePlugin(_0x1287ab),_0x46a488?.[_0x2b832a(0x181)](_0x2b832a(0x1ab),{'isFirstRun':_0xa33968}));if(_0x231876&&_0x2ecd9a){_0x46a488?.['trackPhaseStart'](_0x2e6e92[_0x2b832a(0x19c)]);try{await _0x2e6e92['WwBHV'](installSkill,'ranger',{'level':_0x2ecd9a['scope'],'cliVersion':getCurrentVersion(),'platform':_0x2e6e92[_0x2b832a(0x18d)]}),_0x46a488?.['trackPhaseEnd'](_0x2e6e92[_0x2b832a(0x19c)],{'isFirstRun':_0xa33968,'opencode':!![]});}catch(_0x525e7f){console['warn'](_0x2e6e92[_0x2b832a(0x173)],_0x525e7f instanceof Error?_0x525e7f['message']:_0x525e7f),_0x46a488?.[_0x2b832a(0x181)](_0x2e6e92[_0x2b832a(0x19c)],{'isFirstRun':_0xa33968,'opencode':!![],'failed':!![]});}}else _0x46a488?.['trackPhaseStart'](_0x2b832a(0x193)),await ensureClaudeSkills(_0x1287ab),_0x46a488?.[_0x2b832a(0x181)](_0x2e6e92[_0x2b832a(0x19c)],{'isFirstRun':_0xa33968});if(_0x4ac25c?.['skipAuth'])console['log'](_0x2b832a(0x166));else{if(_0x4ac25c?.[_0x2b832a(0x147)]){_0x46a488?.['trackPhaseStart'](_0x2b832a(0x189));const _0x53520b=await ensureLocalEnv({'url':_0x4ac25c['url'],'force':_0x4ac25c?.['force'],'allowInsecureLocalhost':_0x4ac25c?.['allowInsecureLocalhost'],'scope':_0x2b832a(0x183)},_0x46a488);_0x46a488?.['trackPhaseEnd'](_0x2b832a(0x189),{'isFirstRun':_0xa33968,'profileReady':_0x53520b['ready'],'userSkipped':_0x53520b[_0x2b832a(0x153)]});}else console['log'](_0x2e6e92['ATvey'](_0x2e6e92['IMKKh'](_0x2e6e92['Vevlt'](_0x2b832a(0x199)+_0x2e6e92[_0x2b832a(0x1a2)](bold,_0x2b832a(0x18c))+'\x20','(and\x20'+_0x2e6e92[_0x2b832a(0x1a2)](bold,_0x2b832a(0x169))+_0x2b832a(0x174)),'\x0a\x20\x20config\x20uses\x20username+password).\x20Orgs\x20on\x20SSO/SAML/OAuth'),'\x20may\x20need\x20a\x20one-time\x20headed\x20login\x20instead\x20—')+_0x2b832a(0x172)),console[_0x2b832a(0x197)]('\x20\x20(or\x20use\x20'+_0x2e6e92[_0x2b832a(0x195)](bold,'ranger\x20profile\x20add')+_0x2b832a(0x15d));}if(_0x231876)console[_0x2b832a(0x197)](_0x2e6e92[_0x2b832a(0x151)]),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x2b832a(0x197)](_0x2b832a(0x1a8)),console[_0x2b832a(0x197)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0xfd4f68=bold('/ranger:enable');console[_0x2b832a(0x197)](_0x2e6e92['Vevlt'](_0x2e6e92['oHtgq'](_0x2b832a(0x14d)+_0xfd4f68+'\x20and\x20prompt\x20the\x20coding'+_0x2b832a(0x14f),_0x2b832a(0x165)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x453ebe=_0x4aca;(function(_0x3a5527,_0x1d1e62){const _0x5cc3ee=_0x4aca,_0x323db9=_0x3a5527();while(!![]){try{const _0x4e77a6=parseInt(_0x5cc3ee(0xbb))/0x1+parseInt(_0x5cc3ee(0x107))/0x2+-parseInt(_0x5cc3ee(0xdd))/0x3+parseInt(_0x5cc3ee(0x101))/0x4+parseInt(_0x5cc3ee(0xd3))/0x5+parseInt(_0x5cc3ee(0xd9))/0x6*(-parseInt(_0x5cc3ee(0xc4))/0x7)+parseInt(_0x5cc3ee(0xcd))/0x8*(-parseInt(_0x5cc3ee(0xe9))/0x9);if(_0x4e77a6===_0x1d1e62)break;else _0x323db9['push'](_0x323db9['shift']());}catch(_0x22c75b){_0x323db9['push'](_0x323db9['shift']());}}}(_0x2f59,0xf04b2));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';function _0x2f59(){const _0x2371ec=['trim','zYEfR','unknown','yNBiV','toString','\x20(up\x20to\x20date)','nFwOZ','RBSlL','settingsPath','log','\x1b]8;;file://','No\x20skills\x20installed','(not\x20found)','\x20\x20Not\x20installed','nctLs','pipe','1084080OsAlCu','cHIYO','qEiEg','Root:\x20','name','opencode-plugin','rsAOz','UAbRN','DEBUG','7ApgGKh','length','\x20\x20\x20\x20','\x20(latest:\x20','@ranger-testing/opencode-plugin','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','project','map','5352352osredb','cARit','scope','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x20\x20\x20\x20Settings:\x20','BUOAM','2441460mMyPMS','mYmfT','NnZbA','sIVRu','version','enabled','10667550Fzhyql','status','\x0a📊\x20Ranger\x20Status\x0a','displayName','4327206umyFhO','includes',':\x20installed\x20(','QBhHZ','isDirectory','\x0a---\x20Skills\x20---','opencode','jRiIj','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x0a---\x20Claude\x20Code\x20Plugin\x20---','some','data','9doetkp','uaFli','SwhuC','details','zmynt','parse','pqwaI','string','YzkSz','ztUrK','error','hasPlaintextAuth','heklD','not_configured','DsvnW','ObaEU','KngBs','disabled','\x20\x20Not\x20configured','settings.json','path','SKILL.md','\x20\x20Project-level:','API\x20Token:\x20✗\x20Not\x20found','7558428jkTPJr','ranger@trailhead','yvNVw','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','WCwUF','stdout','2823268gbtWsV','auth.json','dLgkl','configured','Version:\x20'];_0x2f59=function(){return _0x2371ec;};return _0x2f59();}import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x4aca(_0x57adf9,_0x464992){_0x57adf9=_0x57adf9-0xad;const _0x2f593e=_0x2f59();let _0x4acae6=_0x2f593e[_0x57adf9];return _0x4acae6;}import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x39c9b9=>'\x1b[1m'+_0x39c9b9+'\x1b[0m',link=(_0x2d9dc8,_0x56d9f5)=>_0x453ebe(0xb5)+_0x2d9dc8+'\x07'+(_0x56d9f5||_0x2d9dc8)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x55e3e4=_0x453ebe,_0x1303aa={'jRiIj':function(_0x580063,_0x7c05bb){return _0x580063(_0x7c05bb);},'pQkvb':'not_installed','UAbRN':_0x55e3e4(0x10a),'BuXNE':'@ranger-testing/opencode-plugin','zmynt':'debug','rsAOz':'config','gePsV':'pipe','zYEfR':'data','XmsbV':_0x55e3e4(0xf3)};return new Promise(_0x50b342=>{const _0x372b47=_0x55e3e4,_0x5db70f={'tEPFN':_0x1303aa['BuXNE']},_0x47d5c0=spawn(_0x372b47(0xe3),[_0x1303aa[_0x372b47(0xed)],_0x1303aa[_0x372b47(0xc1)]],{'stdio':['ignore',_0x372b47(0xba),_0x1303aa['gePsV']]});let _0x50314d='';_0x47d5c0[_0x372b47(0x106)]?.['on'](_0x372b47(0xe8),_0x16d7b8=>{const _0x3e9cd4=_0x372b47;_0x50314d+=_0x16d7b8[_0x3e9cd4(0xaf)]();}),_0x47d5c0['stderr']?.['on'](_0x1303aa[_0x372b47(0x10d)],_0x1d9369=>{const _0x4cac60=_0x372b47;_0x50314d+=_0x1d9369[_0x4cac60(0xaf)]();}),_0x47d5c0['on'](_0x1303aa['XmsbV'],()=>{_0x50b342({'status':'not_installed'});}),_0x47d5c0['on']('close',_0xd16955=>{const _0x113a9b=_0x372b47;if(_0xd16955!==0x0){_0x1303aa[_0x113a9b(0xe4)](_0x50b342,{'status':_0x1303aa['pQkvb']});return;}const _0x1fd650=_0x50314d[_0x113a9b(0x10c)]();let _0x230953=null;if(_0x1fd650)try{_0x230953=JSON[_0x113a9b(0xee)](_0x1fd650);}catch{const _0x290486=_0x1fd650['match'](/\{[\s\S]*\}$/);if(_0x290486)try{_0x230953=JSON['parse'](_0x290486[0x0]);}catch{_0x230953=null;}}const _0x41417f=Array['isArray'](_0x230953?.['plugin'])?_0x230953?.['plugin']:[],_0x5ef006=_0x41417f[_0x113a9b(0xe7)](_0x5a0946=>{const _0x46c6c6=_0x113a9b;if(typeof _0x5a0946!==_0x46c6c6(0xf0))return![];return _0x5a0946[_0x46c6c6(0xde)](_0x5db70f['tEPFN'])||_0x5a0946[_0x46c6c6(0xde)](_0x46c6c6(0xc0));});if(_0x5ef006){_0x1303aa['jRiIj'](_0x50b342,{'status':_0x1303aa[_0x113a9b(0xc2)],'details':_0x41417f[_0x113a9b(0xc5)]>0x0?_0x41417f['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x41417f[_0x113a9b(0xc5)]>0x0){_0x50b342({'status':_0x113a9b(0xf6),'details':_0x41417f[_0x113a9b(0xc5)]+'\x20plugin(s)\x20configured'});return;}_0x1303aa['jRiIj'](_0x50b342,{'status':'not_configured'});});});}async function getSkillsFromDir(_0xdc7fe5,_0x1a53b6){const _0x50a75c=_0x453ebe,_0x5d393b={'BUOAM':function(_0x5459db,_0x9c3bc5,_0x1687c8){return _0x5459db(_0x9c3bc5,_0x1687c8);},'ObaEU':function(_0x492722,_0x1867e6,_0x34bdae,_0x420a94){return _0x492722(_0x1867e6,_0x34bdae,_0x420a94);}};if(!existsSync(_0xdc7fe5))return[];const _0xe6ca40=[];try{const _0x5e37d8=await _0x5d393b[_0x50a75c(0xd2)](readdir,_0xdc7fe5,{'withFileTypes':!![]});for(const _0x22c3ba of _0x5e37d8){if(_0x22c3ba[_0x50a75c(0xe1)]()){const _0x306274=_0x5d393b[_0x50a75c(0xf8)](join,_0xdc7fe5,_0x22c3ba['name'],_0x50a75c(0xfe));if(existsSync(_0x306274)){let _0x51737d=_0x22c3ba['name'];try{const _0x21d7b7=await readFile(_0x306274,'utf-8'),_0x4a37c2=_0x21d7b7['match'](/name:\s*(.+)/);_0x4a37c2&&(_0x51737d=_0x4a37c2[0x1]['trim']());}catch{}_0xe6ca40['push']({'name':_0x22c3ba[_0x50a75c(0xbf)],'displayName':_0x51737d,'path':_0x306274,'level':_0x1a53b6});}}}}catch{return[];}return _0xe6ca40;}async function getInstalledSkills(){const _0x37f52e=_0x453ebe,_0x24fb8a={'yvNVw':function(_0x4769b3){return _0x4769b3();},'iaWmr':function(_0x31bfff,_0x280b5f,_0x28325c){return _0x31bfff(_0x280b5f,_0x28325c);},'WCwUF':'user'},[_0x4fc26f,_0x13870e]=await Promise['all']([getSkillsFromDir(_0x24fb8a[_0x37f52e(0x103)](getProjectSkillsDir),_0x37f52e(0xcb)),_0x24fb8a['iaWmr'](getSkillsFromDir,_0x24fb8a['yvNVw'](getUserSkillsDir),_0x24fb8a[_0x37f52e(0x105)])]);return{'project':_0x4fc26f,'user':_0x13870e};}async function getEnvironments(){const _0x2913b4=_0x453ebe,_0x1591a0={'cARit':function(_0x4c10ed,_0x424f7c,_0x1a2b18){return _0x4c10ed(_0x424f7c,_0x1a2b18);},'ztUrK':'auth.json.enc','BbREL':'(not\x20found)','KngBs':function(_0x3dae6b,_0x59bb78){return _0x3dae6b(_0x59bb78);},'RBSlL':function(_0x253f24,_0xcba3d8){return _0x253f24===_0xcba3d8;},'qEiEg':function(_0x5146b7){return _0x5146b7();},'zalWp':function(_0x1021ff,_0x242cc5){return _0x1021ff(_0x242cc5);}},{envNames:_0x28a877,activeEnv:_0x423964}=await _0x1591a0[_0x2913b4(0xbd)](getEnvNames),_0x51c7e9=_0x1591a0['qEiEg'](getRangerDir);if(!_0x1591a0['zalWp'](existsSync,_0x51c7e9))return{'envs':[],'activeEnv':null};const _0x4ddb4e=_0x28a877['map'](_0x4b50e0=>{const _0x3d9c6b=_0x2913b4,_0xd56ea8=getEnvDir(_0x4b50e0),_0x3b6f2f=join(_0xd56ea8,_0x3d9c6b(0xfc)),_0x413822=_0x1591a0[_0x3d9c6b(0xce)](join,_0xd56ea8,_0x3d9c6b(0x108)),_0x221e18=_0x1591a0[_0x3d9c6b(0xce)](join,_0xd56ea8,_0x1591a0[_0x3d9c6b(0xf2)]);return{'name':_0x4b50e0,'settingsPath':existsSync(_0x3b6f2f)?_0x3b6f2f:_0x1591a0['BbREL'],'hasPlaintextAuth':_0x1591a0[_0x3d9c6b(0xf9)](existsSync,_0x413822),'hasEncryptedAuth':_0x1591a0[_0x3d9c6b(0xf9)](existsSync,_0x221e18),'isActive':_0x1591a0[_0x3d9c6b(0xb2)](_0x4b50e0,_0x423964)};});return{'envs':_0x4ddb4e,'activeEnv':_0x423964};}export async function status(){const _0x565cd3=_0x453ebe,_0x33cec9={'heklD':function(_0x3ad9c1,_0x13832b){return _0x3ad9c1(_0x13832b);},'QBhHZ':function(_0x535d3c,_0x3e05e0,_0x17276a){return _0x535d3c(_0x3e05e0,_0x17276a);},'nFwOZ':function(_0x34db12){return _0x34db12();},'mXvvq':function(_0x3e053a){return _0x3e053a();},'yNBiV':function(_0x4f7df2){return _0x4f7df2();},'uaFli':'\x0a---\x20OpenCode\x20Plugin\x20---','mYmfT':function(_0xd92116,_0x4fe7f9){return _0xd92116===_0x4fe7f9;},'YzkSz':'configured','xrkEn':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','dLgkl':_0x565cd3(0x102),'nctLs':_0x565cd3(0xfa),'hWALT':_0x565cd3(0xb6),'SwhuC':function(_0x349fb2,_0x201f41,_0x549435){return _0x349fb2(_0x201f41,_0x549435);},'cHIYO':'No\x20profiles\x20configured','bxvwB':'\x20(active)','NnZbA':'encrypted','pqwaI':'plaintext','DsvnW':function(_0x2375db,_0x30d52c){return _0x2375db(_0x30d52c);},'sIVRu':function(_0x47c46e,_0x12127b){return _0x47c46e!==_0x12127b;}};console['log'](_0x565cd3(0xdb));const _0x20b277=process['cwd'](),_0x1f7a1b=getRangerDir();if(!existsSync(_0x1f7a1b)){console['log'](_0x565cd3(0xbe)+link(_0x20b277,_0x33cec9[_0x565cd3(0xf5)](bold,basename(_0x20b277)))),console[_0x565cd3(0xb4)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x565cd3(0xc9));return;}console[_0x565cd3(0xb4)](_0x565cd3(0xbe)+_0x33cec9[_0x565cd3(0xe0)](link,_0x20b277,_0x33cec9[_0x565cd3(0xf5)](bold,_0x33cec9['heklD'](basename,_0x20b277))));const _0x106bb6=getCurrentVersion(),_0x50a8e1=_0x33cec9[_0x565cd3(0xb1)](getLatestVersion);if(_0x50a8e1[_0x565cd3(0xd7)]&&_0x50a8e1['version']!==_0x106bb6)console[_0x565cd3(0xb4)](_0x565cd3(0x10b)+_0x106bb6+_0x565cd3(0xc7)+_0x50a8e1[_0x565cd3(0xd7)]+')'),console[_0x565cd3(0xb4)]('\x20\x20Run:\x20ranger\x20update');else _0x50a8e1[_0x565cd3(0xd7)]?console[_0x565cd3(0xb4)]('Version:\x20'+_0x106bb6+_0x565cd3(0xb0)):console['log'](_0x565cd3(0x10b)+_0x106bb6);const _0x100044=await getToken();if(_0x100044){const _0x129765=await _0x33cec9[_0x565cd3(0xf5)](getCurrentUser,_0x100044);_0x129765['success']?console[_0x565cd3(0xb4)]('Organization:\x20'+_0x33cec9[_0x565cd3(0xf5)](bold,_0x129765['user']['organizationName'])):(console['log'](_0x565cd3(0xd0)),console['log'](_0x565cd3(0xe5)));}else console['log'](_0x565cd3(0x100)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x565cd3(0xc3)]&&(console[_0x565cd3(0xb4)]('API\x20Environment:\x20'+_0x33cec9['mXvvq'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x33cec9[_0x565cd3(0xae)](getApiBaseUrl)));console[_0x565cd3(0xb4)](_0x33cec9[_0x565cd3(0xea)]);const _0x312807=await getOpencodePluginStatus();if(_0x33cec9['mYmfT'](_0x312807[_0x565cd3(0xda)],_0x33cec9[_0x565cd3(0xf1)]))console[_0x565cd3(0xb4)]('\x20\x20'+_0x33cec9['heklD'](bold,_0x565cd3(0xc8))+':\x20configured'),_0x312807[_0x565cd3(0xec)]&&console[_0x565cd3(0xb4)]('\x20\x20'+_0x312807[_0x565cd3(0xec)]);else _0x33cec9[_0x565cd3(0xd4)](_0x312807['status'],'not_configured')?(console['log'](_0x565cd3(0xfb)),_0x312807[_0x565cd3(0xec)]&&console['log']('\x20\x20'+_0x312807['details']),console[_0x565cd3(0xb4)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x565cd3(0xb4)](_0x33cec9['xrkEn']);console['log'](_0x565cd3(0xe6));const _0x49ef6d=await getPluginInfo(_0x33cec9[_0x565cd3(0x109)]);if(_0x49ef6d){const _0x23af4a=_0x49ef6d[_0x565cd3(0xcf)]||_0x565cd3(0xad),_0x379936=_0x49ef6d[_0x565cd3(0xd8)]?_0x565cd3(0xd8):_0x33cec9[_0x565cd3(0xb9)];console['log']('\x20\x20'+bold(_0x33cec9[_0x565cd3(0x109)])+_0x565cd3(0xdf)+_0x23af4a+',\x20'+_0x379936+')');}else console['log'](_0x565cd3(0xb8)),console['log'](_0x565cd3(0x104));console['log'](_0x565cd3(0xe2));const {project:_0x3e351f,user:_0xf5dce1}=await _0x33cec9[_0x565cd3(0xb1)](getInstalledSkills),_0x3c4fa3=_0x3e351f['filter'](_0x42deb3=>RANGER_MANAGED_SKILLS[_0x565cd3(0xde)](_0x42deb3['name'])),_0x2a1454=_0xf5dce1['filter'](_0xbdf40=>RANGER_MANAGED_SKILLS['includes'](_0xbdf40[_0x565cd3(0xbf)])),_0x1e06e3=_0x3c4fa3[_0x565cd3(0xc5)]+_0x2a1454[_0x565cd3(0xc5)];if(_0x33cec9[_0x565cd3(0xd4)](_0x1e06e3,0x0))console[_0x565cd3(0xb4)](_0x33cec9['hWALT']),console[_0x565cd3(0xb4)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3c4fa3['length']>0x0){console['log'](_0x565cd3(0xff));for(const _0x5d0eda of _0x3c4fa3){console[_0x565cd3(0xb4)](_0x565cd3(0xc6)+bold(_0x5d0eda[_0x565cd3(0xdc)])+':\x20'+link(_0x5d0eda['path'],_0x33cec9['heklD'](basename,_0x5d0eda[_0x565cd3(0xfd)])));}}if(_0x2a1454['length']>0x0){console[_0x565cd3(0xb4)]('\x20\x20User-level:');for(const _0x1b9944 of _0x2a1454){console[_0x565cd3(0xb4)]('\x20\x20\x20\x20'+_0x33cec9[_0x565cd3(0xf5)](bold,_0x1b9944[_0x565cd3(0xdc)])+':\x20'+_0x33cec9[_0x565cd3(0xeb)](link,_0x1b9944[_0x565cd3(0xfd)],_0x33cec9['heklD'](basename,_0x1b9944['path'])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x1965b8,activeEnv:_0x42b65e}=await _0x33cec9[_0x565cd3(0xae)](getEnvironments);if(_0x1965b8['length']===0x0)console[_0x565cd3(0xb4)](_0x33cec9[_0x565cd3(0xbc)]),console[_0x565cd3(0xb4)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x3b2d64 of _0x1965b8){const _0x155a78=_0x3b2d64['isActive']?_0x33cec9['bxvwB']:'',_0x438156=_0x3b2d64['hasEncryptedAuth']?_0x33cec9[_0x565cd3(0xd5)]:_0x3b2d64[_0x565cd3(0xf4)]?_0x33cec9[_0x565cd3(0xef)]:'none';console[_0x565cd3(0xb4)]('\x20\x20'+_0x33cec9[_0x565cd3(0xf7)](bold,_0x3b2d64[_0x565cd3(0xbf)])+_0x155a78),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x438156),_0x33cec9[_0x565cd3(0xd6)](_0x3b2d64['settingsPath'],_0x565cd3(0xb7))&&console[_0x565cd3(0xb4)](_0x565cd3(0xd1)+link(_0x3b2d64[_0x565cd3(0xb3)],_0x33cec9['heklD'](basename,_0x3b2d64['settingsPath'])));}!_0x42b65e&&(console[_0x565cd3(0xb4)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x565cd3(0xca)+_0x1965b8[_0x565cd3(0xcc)](_0x233e93=>_0x233e93[_0x565cd3(0xbf)])['join'](',\x20')+')'));}console[_0x565cd3(0xb4)]('');}
|
|
1
|
+
const _0x18dbed=_0x5c19;(function(_0x127ae7,_0x3df785){const _0x1ac6fe=_0x5c19,_0x2d0230=_0x127ae7();while(!![]){try{const _0x568ca1=parseInt(_0x1ac6fe(0x182))/0x1+parseInt(_0x1ac6fe(0x15e))/0x2*(parseInt(_0x1ac6fe(0x14b))/0x3)+-parseInt(_0x1ac6fe(0x187))/0x4*(parseInt(_0x1ac6fe(0x191))/0x5)+parseInt(_0x1ac6fe(0x14c))/0x6+parseInt(_0x1ac6fe(0x18e))/0x7*(-parseInt(_0x1ac6fe(0x16c))/0x8)+-parseInt(_0x1ac6fe(0x176))/0x9*(-parseInt(_0x1ac6fe(0x199))/0xa)+-parseInt(_0x1ac6fe(0x16d))/0xb;if(_0x568ca1===_0x3df785)break;else _0x2d0230['push'](_0x2d0230['shift']());}catch(_0x1a67ed){_0x2d0230['push'](_0x2d0230['shift']());}}}(_0x3a8c,0x9e2a5));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 _0x3a8c(){const _0x356b76=['\x20\x20Not\x20configured','config','stdout','VSycQ','isActive','lYYke','\x1b]8;;file://','\x20plugin(s)\x20configured','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','trim','error','No\x20skills\x20installed','not_installed','12TXtuWy','280020igAWVi','success','gOSAC','PDqBu','displayName','\x0a\x20\x20No\x20active\x20profile\x20set','mYoky','\x20(up\x20to\x20date)','API\x20Environment:\x20','filter','\x20\x20Not\x20installed','nUSpz','hasPlaintextAuth','flPIY','@ranger-testing/opencode-plugin','settingsPath','organizationName','match','516358ixMIkH',':\x20configured','data','join','\x20\x20Project-level:','\x20\x20Run:\x20ranger\x20setup\x20--opencode','status','qBxaw','enabled','log','hasEncryptedAuth','configured','includes','not_configured','573528qDQofE','8130540rRZJho','YxNhe','some','none','ignore','\x20(latest:\x20','(not\x20found)','\x1b]8;;\x07','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','10427463cljdEK','\x20\x20Run:\x20ranger\x20setup\x20[token]','DIYBH','path','disabled','Organization:\x20','\x20\x20\x20\x20','encrypted','LtlbK','\x0a📊\x20Ranger\x20Status\x0a','gEodt','unknown','137609eBiPrW','Version:\x20','\x20\x20\x20\x20Auth:\x20','\x20(active)','length','649040aPUCFq','eCsSx','No\x20profiles\x20configured','lDxKI','utf-8','string','kMPYW','49madxVn','name','toString','15SdDnRR','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','details','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','PcOyG','ThkxG','parse','ZtyXs','10VZBVgY'];_0x3a8c=function(){return _0x356b76;};return _0x3a8c();}const bold=_0x1c3acf=>'\x1b[1m'+_0x1c3acf+'\x1b[0m',link=(_0x2d36ee,_0x46162a)=>_0x18dbed(0x1a0)+_0x2d36ee+'\x07'+(_0x46162a||_0x2d36ee)+_0x18dbed(0x174);async function getOpencodePluginStatus(){const _0x5422de=_0x18dbed,_0x1b9e2d={'nUSpz':function(_0x5c94bc,_0x341020){return _0x5c94bc(_0x341020);},'wLmVs':function(_0x158cec,_0x4a5658,_0x461002,_0x2815c9){return _0x158cec(_0x4a5658,_0x461002,_0x2815c9);},'aUAFX':_0x5422de(0x171),'PDqBu':'pipe','mYoky':'close'};return new Promise(_0x489331=>{const _0x27b744=_0x5422de,_0xf8f52={'YxNhe':function(_0x56c949,_0x2bcf5f){return _0x56c949!==_0x2bcf5f;},'nqGmc':function(_0x5bac00,_0x3c44e4){return _0x5bac00(_0x3c44e4);},'ThkxG':function(_0x80f6a5,_0x156169){return _0x80f6a5(_0x156169);},'kuSmw':function(_0xc32e6c,_0xfecd1a){const _0x4edfa0=_0x5c19;return _0x1b9e2d[_0x4edfa0(0x157)](_0xc32e6c,_0xfecd1a);},'eCsSx':function(_0xa3dc8,_0x17634d){return _0xa3dc8(_0x17634d);}},_0x2b6edd=_0x1b9e2d['wLmVs'](spawn,'opencode',['debug',_0x27b744(0x19b)],{'stdio':[_0x1b9e2d['aUAFX'],_0x1b9e2d[_0x27b744(0x14f)],'pipe']});let _0x3e2cf6='';_0x2b6edd[_0x27b744(0x19c)]?.['on']('data',_0x1999fa=>{_0x3e2cf6+=_0x1999fa['toString']();}),_0x2b6edd['stderr']?.['on'](_0x27b744(0x160),_0x5ea868=>{const _0x1c0316=_0x27b744;_0x3e2cf6+=_0x5ea868[_0x1c0316(0x190)]();}),_0x2b6edd['on'](_0x27b744(0x148),()=>{const _0x3be94d=_0x27b744;_0x489331({'status':_0x3be94d(0x14a)});}),_0x2b6edd['on'](_0x1b9e2d[_0x27b744(0x152)],_0x2d20ea=>{const _0x37106f=_0x27b744;if(_0x2d20ea!==0x0){_0xf8f52['nqGmc'](_0x489331,{'status':_0x37106f(0x14a)});return;}const _0x5bedb6=_0x3e2cf6[_0x37106f(0x1a3)]();let _0x12093c=null;if(_0x5bedb6)try{_0x12093c=JSON['parse'](_0x5bedb6);}catch{const _0x436ec8=_0x5bedb6['match'](/\{[\s\S]*\}$/);if(_0x436ec8)try{_0x12093c=JSON[_0x37106f(0x197)](_0x436ec8[0x0]);}catch{_0x12093c=null;}}const _0x82338c=Array['isArray'](_0x12093c?.['plugin'])?_0x12093c?.['plugin']:[],_0x2785e1=_0x82338c[_0x37106f(0x16f)](_0x8cd0c2=>{const _0x530a91=_0x37106f;if(_0xf8f52[_0x530a91(0x16e)](typeof _0x8cd0c2,_0x530a91(0x18c)))return![];return _0x8cd0c2[_0x530a91(0x16a)](_0x530a91(0x15a))||_0x8cd0c2[_0x530a91(0x16a)]('opencode-plugin');});if(_0x2785e1){_0xf8f52[_0x37106f(0x196)](_0x489331,{'status':_0x37106f(0x169),'details':_0x82338c[_0x37106f(0x186)]>0x0?_0x82338c['length']+_0x37106f(0x1a1):undefined});return;}if(_0x82338c['length']>0x0){_0xf8f52['kuSmw'](_0x489331,{'status':_0x37106f(0x16b),'details':_0x82338c['length']+_0x37106f(0x1a1)});return;}_0xf8f52[_0x37106f(0x188)](_0x489331,{'status':_0x37106f(0x16b)});});});}async function getSkillsFromDir(_0x481b0c,_0x4a5647){const _0x5c4ddb=_0x18dbed,_0x3baec8={'AafRj':function(_0x588384,_0x514623,_0x6b34f7){return _0x588384(_0x514623,_0x6b34f7);},'Kztem':function(_0x1af33e,_0x246642,_0x25a842,_0x39bf45){return _0x1af33e(_0x246642,_0x25a842,_0x39bf45);},'kMPYW':'SKILL.md','vpjbM':function(_0x469ed8,_0x466ea9){return _0x469ed8(_0x466ea9);},'qnqCP':_0x5c4ddb(0x18b)};if(!existsSync(_0x481b0c))return[];const _0x579f70=[];try{const _0x26e7c9=await _0x3baec8['AafRj'](readdir,_0x481b0c,{'withFileTypes':!![]});for(const _0x591806 of _0x26e7c9){if(_0x591806['isDirectory']()){const _0x1b2163=_0x3baec8['Kztem'](join,_0x481b0c,_0x591806[_0x5c4ddb(0x18f)],_0x3baec8[_0x5c4ddb(0x18d)]);if(_0x3baec8['vpjbM'](existsSync,_0x1b2163)){let _0x1f81f7=_0x591806[_0x5c4ddb(0x18f)];try{const _0x316470=await readFile(_0x1b2163,_0x3baec8['qnqCP']),_0x21395a=_0x316470[_0x5c4ddb(0x15d)](/name:\s*(.+)/);_0x21395a&&(_0x1f81f7=_0x21395a[0x1][_0x5c4ddb(0x1a3)]());}catch{}_0x579f70['push']({'name':_0x591806['name'],'displayName':_0x1f81f7,'path':_0x1b2163,'level':_0x4a5647});}}}}catch{return[];}return _0x579f70;}function _0x5c19(_0xcb9b8f,_0x49e2e3){_0xcb9b8f=_0xcb9b8f-0x148;const _0x3a8cc8=_0x3a8c();let _0x5c191e=_0x3a8cc8[_0xcb9b8f];return _0x5c191e;}async function getInstalledSkills(){const _0x25732={'ZUeki':function(_0x17859b,_0x4ba652,_0x4c8b19){return _0x17859b(_0x4ba652,_0x4c8b19);},'lkPah':function(_0x3948a4){return _0x3948a4();},'foVxL':'project','FeFAY':function(_0x2df97c,_0x42ac46,_0x57ad8a){return _0x2df97c(_0x42ac46,_0x57ad8a);},'aeJKE':'user'},[_0x2a4c0c,_0x16d15d]=await Promise['all']([_0x25732['ZUeki'](getSkillsFromDir,_0x25732['lkPah'](getProjectSkillsDir),_0x25732['foVxL']),_0x25732['FeFAY'](getSkillsFromDir,getUserSkillsDir(),_0x25732['aeJKE'])]);return{'project':_0x2a4c0c,'user':_0x16d15d};}async function getEnvironments(){const _0x4117b5={'gOSAC':function(_0x34ac0d,_0x1ce89a){return _0x34ac0d(_0x1ce89a);},'AunMS':'settings.json','VSycQ':'auth.json','kMMeZ':function(_0x484650,_0xe0c85a){return _0x484650(_0xe0c85a);},'ZvNQM':function(_0x4c47ed){return _0x4c47ed();}},{envNames:_0x82e74a,activeEnv:_0x72ed42}=await getEnvNames(),_0x26b38a=_0x4117b5['ZvNQM'](getRangerDir);if(!existsSync(_0x26b38a))return{'envs':[],'activeEnv':null};const _0x518ad6=_0x82e74a['map'](_0xdcd616=>{const _0x5a622b=_0x5c19,_0x573765=_0x4117b5[_0x5a622b(0x14e)](getEnvDir,_0xdcd616),_0x248c49=join(_0x573765,_0x4117b5['AunMS']),_0x6e3277=join(_0x573765,_0x4117b5[_0x5a622b(0x19d)]),_0x124c85=join(_0x573765,'auth.json.enc');return{'name':_0xdcd616,'settingsPath':_0x4117b5['kMMeZ'](existsSync,_0x248c49)?_0x248c49:_0x5a622b(0x173),'hasPlaintextAuth':existsSync(_0x6e3277),'hasEncryptedAuth':existsSync(_0x124c85),'isActive':_0xdcd616===_0x72ed42};});return{'envs':_0x518ad6,'activeEnv':_0x72ed42};}export async function status(){const _0x5a67bd=_0x18dbed,_0x2aaa1b={'qBxaw':_0x5a67bd(0x17f),'ZtyXs':function(_0x2a4b9c,_0x230ed1){return _0x2a4b9c(_0x230ed1);},'flPIY':function(_0x1d589f){return _0x1d589f();},'DIYBH':'\x0a---\x20OpenCode\x20Plugin\x20---','EJdeZ':function(_0x5cc3bd){return _0x5cc3bd();},'btdLb':function(_0x14fda9,_0x8e66dd){return _0x14fda9===_0x8e66dd;},'gEodt':function(_0x228899,_0x555ddc){return _0x228899(_0x555ddc);},'scoVF':'@ranger-testing/opencode-plugin','amHcX':_0x5a67bd(0x16b),'sKaMd':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','vNWKS':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','cBoLn':_0x5a67bd(0x181),'BfZOL':function(_0xacf2b0,_0x4c867a){return _0xacf2b0===_0x4c867a;},'lDxKI':function(_0x514dd6,_0xc62ba3){return _0x514dd6>_0xc62ba3;},'CKhFE':function(_0x3d8b1a,_0x13d083,_0x2ea953){return _0x3d8b1a(_0x13d083,_0x2ea953);},'lYYke':'\x20\x20User-level:','PcOyG':function(_0x54266f,_0x5a3c09){return _0x54266f(_0x5a3c09);},'VHJNe':function(_0x4d05ff,_0x52910b){return _0x4d05ff!==_0x52910b;},'LtlbK':function(_0x57f56e,_0x3805c1,_0x2cb203){return _0x57f56e(_0x3805c1,_0x2cb203);}};console[_0x5a67bd(0x167)](_0x2aaa1b[_0x5a67bd(0x165)]);const _0x429e24=process['cwd'](),_0x4218ac=getRangerDir();if(!existsSync(_0x4218ac)){console[_0x5a67bd(0x167)]('Root:\x20'+link(_0x429e24,_0x2aaa1b['ZtyXs'](bold,_0x2aaa1b[_0x5a67bd(0x198)](basename,_0x429e24)))),console['log'](_0x5a67bd(0x175)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x5a67bd(0x167)]('Root:\x20'+link(_0x429e24,bold(basename(_0x429e24))));const _0x43b806=getCurrentVersion(),_0x928620=getLatestVersion();if(_0x928620['version']&&_0x928620['version']!==_0x43b806)console[_0x5a67bd(0x167)](_0x5a67bd(0x183)+_0x43b806+_0x5a67bd(0x172)+_0x928620['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x928620['version']?console[_0x5a67bd(0x167)](_0x5a67bd(0x183)+_0x43b806+_0x5a67bd(0x153)):console[_0x5a67bd(0x167)]('Version:\x20'+_0x43b806);const _0x4518cf=await _0x2aaa1b[_0x5a67bd(0x159)](getToken);if(_0x4518cf){const _0x5ae0cf=await getCurrentUser(_0x4518cf);_0x5ae0cf[_0x5a67bd(0x14d)]?console['log'](_0x5a67bd(0x17b)+bold(_0x5ae0cf['user'][_0x5a67bd(0x15c)])):(console['log'](_0x5a67bd(0x194)),console[_0x5a67bd(0x167)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x5a67bd(0x177));process['env']['DEBUG']&&(console[_0x5a67bd(0x167)](_0x5a67bd(0x154)+_0x2aaa1b[_0x5a67bd(0x159)](getCurrentEnvironment)),console[_0x5a67bd(0x167)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x5a67bd(0x167)](_0x2aaa1b[_0x5a67bd(0x178)]);const _0x578435=await _0x2aaa1b['EJdeZ'](getOpencodePluginStatus);if(_0x2aaa1b['btdLb'](_0x578435[_0x5a67bd(0x164)],'configured'))console[_0x5a67bd(0x167)]('\x20\x20'+_0x2aaa1b[_0x5a67bd(0x180)](bold,_0x2aaa1b['scoVF'])+_0x5a67bd(0x15f)),_0x578435['details']&&console[_0x5a67bd(0x167)]('\x20\x20'+_0x578435['details']);else _0x578435[_0x5a67bd(0x164)]===_0x2aaa1b['amHcX']?(console[_0x5a67bd(0x167)](_0x5a67bd(0x19a)),_0x578435[_0x5a67bd(0x193)]&&console[_0x5a67bd(0x167)]('\x20\x20'+_0x578435['details']),console['log'](_0x5a67bd(0x163))):console[_0x5a67bd(0x167)](_0x2aaa1b['sKaMd']);console[_0x5a67bd(0x167)](_0x2aaa1b['vNWKS']);const _0x199c49=await getPluginInfo('ranger@trailhead');if(_0x199c49){const _0x443ed9=_0x199c49['scope']||_0x2aaa1b['cBoLn'],_0x2bf250=_0x199c49[_0x5a67bd(0x166)]?'enabled':_0x5a67bd(0x17a);console['log']('\x20\x20'+_0x2aaa1b['ZtyXs'](bold,'ranger@trailhead')+':\x20installed\x20('+_0x443ed9+',\x20'+_0x2bf250+')');}else console[_0x5a67bd(0x167)](_0x5a67bd(0x156)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x5a67bd(0x167)]('\x0a---\x20Skills\x20---');const {project:_0x350276,user:_0x548c2a}=await getInstalledSkills(),_0xc00997=_0x350276[_0x5a67bd(0x155)](_0x23f806=>RANGER_MANAGED_SKILLS[_0x5a67bd(0x16a)](_0x23f806[_0x5a67bd(0x18f)])),_0x47207b=_0x548c2a['filter'](_0x3966eb=>RANGER_MANAGED_SKILLS['includes'](_0x3966eb['name'])),_0x5614a3=_0xc00997['length']+_0x47207b['length'];if(_0x2aaa1b['BfZOL'](_0x5614a3,0x0))console['log'](_0x5a67bd(0x149)),console[_0x5a67bd(0x167)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x2aaa1b[_0x5a67bd(0x18a)](_0xc00997[_0x5a67bd(0x186)],0x0)){console[_0x5a67bd(0x167)](_0x5a67bd(0x162));for(const _0x128287 of _0xc00997){console['log'](_0x5a67bd(0x17c)+_0x2aaa1b[_0x5a67bd(0x198)](bold,_0x128287[_0x5a67bd(0x150)])+':\x20'+_0x2aaa1b['CKhFE'](link,_0x128287[_0x5a67bd(0x179)],_0x2aaa1b['ZtyXs'](basename,_0x128287['path'])));}}if(_0x47207b[_0x5a67bd(0x186)]>0x0){console['log'](_0x2aaa1b[_0x5a67bd(0x19f)]);for(const _0x8f73b6 of _0x47207b){console[_0x5a67bd(0x167)]('\x20\x20\x20\x20'+bold(_0x8f73b6['displayName'])+':\x20'+link(_0x8f73b6[_0x5a67bd(0x179)],_0x2aaa1b[_0x5a67bd(0x180)](basename,_0x8f73b6[_0x5a67bd(0x179)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x26b42c,activeEnv:_0x4c0259}=await _0x2aaa1b[_0x5a67bd(0x159)](getEnvironments);if(_0x26b42c['length']===0x0)console[_0x5a67bd(0x167)](_0x5a67bd(0x189)),console['log'](_0x5a67bd(0x1a2));else{for(const _0x20d511 of _0x26b42c){const _0x470f75=_0x20d511[_0x5a67bd(0x19e)]?_0x5a67bd(0x185):'',_0x51bf38=_0x20d511[_0x5a67bd(0x168)]?_0x5a67bd(0x17d):_0x20d511[_0x5a67bd(0x158)]?'plaintext':_0x5a67bd(0x170);console[_0x5a67bd(0x167)]('\x20\x20'+_0x2aaa1b[_0x5a67bd(0x195)](bold,_0x20d511[_0x5a67bd(0x18f)])+_0x470f75),console[_0x5a67bd(0x167)](_0x5a67bd(0x184)+_0x51bf38),_0x2aaa1b['VHJNe'](_0x20d511[_0x5a67bd(0x15b)],_0x5a67bd(0x173))&&console[_0x5a67bd(0x167)]('\x20\x20\x20\x20Settings:\x20'+_0x2aaa1b[_0x5a67bd(0x17e)](link,_0x20d511['settingsPath'],basename(_0x20d511['settingsPath'])));}!_0x4c0259&&(console['log'](_0x5a67bd(0x151)),console['log'](_0x5a67bd(0x192)+_0x26b42c['map'](_0x27aa6e=>_0x27aa6e[_0x5a67bd(0x18f)])[_0x5a67bd(0x161)](',\x20')+')'));}console['log']('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x178ce8,_0x4cda46){const _0x5e68d8=_0x486a,_0x566567=_0x178ce8();while(!![]){try{const _0x4c042e=-parseInt(_0x5e68d8(0xfa))/0x1*(-parseInt(_0x5e68d8(0xd2))/0x2)+parseInt(_0x5e68d8(0xfe))/0x3+-parseInt(_0x5e68d8(0x10f))/0x4*(-parseInt(_0x5e68d8(0x10b))/0x5)+parseInt(_0x5e68d8(0xd3))/0x6*(-parseInt(_0x5e68d8(0xec))/0x7)+-parseInt(_0x5e68d8(0x102))/0x8*(parseInt(_0x5e68d8(0xde))/0x9)+parseInt(_0x5e68d8(0xf0))/0xa*(parseInt(_0x5e68d8(0xf5))/0xb)+-parseInt(_0x5e68d8(0xf3))/0xc;if(_0x4c042e===_0x4cda46)break;else _0x566567['push'](_0x566567['shift']());}catch(_0x4af16d){_0x566567['push'](_0x566567['shift']());}}}(_0x4e1e,0xd64a8));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';function _0x486a(_0x5d8b9f,_0x2134e6){_0x5d8b9f=_0x5d8b9f-0xca;const _0x4e1ef7=_0x4e1e();let _0x486a95=_0x4e1ef7[_0x5d8b9f];return _0x486a95;}import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';function _0x4e1e(){const _0x3f125c=['utf-8','trailhead','\x0aCurrent\x20version:\x20','1328oZeBVS','\x20skill\x20','findIndex','wJItS','error','Irklv','ranger@trailhead','Update\x20failed:\x20','\x0aCould\x20not\x20check\x20latest\x20version:\x20','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','push','TwecU','iOYvT','project','lCseI','\x20ranger-managed\x20skill(s)...','Prerelease\x20channel\x20detected\x20(@','nKbFz','trim','log','update','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','4rnCtZl','13092BEUBXr','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','yIGMD','win32','\x0aReinstalling\x20','ZneEt','kAxHB','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','pHilC','adLzK','kill','68247xuaYwv','DVkdK','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','Latest\x20version:\x20\x20','xdeCI','KSrNE','✓\x20Migrated\x20active\x20profile\x20file','txhhc','plugin','Update\x20failed\x20for\x20@','aSZsL','inherit','ignore','opencode','917ATKfjQ','warn','npm','Checking\x20for\x20updates...','14681310VLPnCM','user','Claude\x20plugin\x20update\x20failed\x20for\x20','28497864MPSLpi','mtPSF','11qqJhEh','active-profile.txt','latest','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','cIxqE','185951uQiYMs','mZVTf','dBMdP','length','1667214SiKTQr','kFncy','unref','stdio','584JUCoIT','\x20—\x20reinstalling\x20@','endsWith','claude','SJknJ','HvMln','kkRHV','version','hwKuY','25545KCdhfR'];_0x4e1e=function(){return _0x3f125c;};return _0x4e1e();}import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x46e086,_0x1cd8c8,_0x209918){const _0x1eaecf=_0x486a,_0x158e09={'wJItS':function(_0x181222,_0x536ee8,_0x3775bc,_0x309e3b){return _0x181222(_0x536ee8,_0x3775bc,_0x309e3b);},'dWmOG':'inherit','HvMln':_0x1eaecf(0xd6),'cIxqE':'close','WKGjz':_0x1eaecf(0x113)};return new Promise(_0x5bc3ff=>{const _0x4f729c=_0x1eaecf,_0xa748a5={'tiwZm':function(_0x46790c,_0x37113a){return _0x46790c(_0x37113a);},'TkaOy':function(_0x35f5a4,_0x1089f1){return _0x35f5a4(_0x1089f1);},'fyZhc':function(_0x5ee81d,_0x4cf5d4){return _0x5ee81d(_0x4cf5d4);}};let _0x4dd37f=![],_0x1708a7;const _0x2ce883=_0x58f1a2=>{if(_0x4dd37f)return;_0x4dd37f=!![],_0x1708a7&&_0xa748a5['tiwZm'](clearTimeout,_0x1708a7),_0xa748a5['TkaOy'](_0x5bc3ff,_0x58f1a2);},_0x435a63=_0x158e09[_0x4f729c(0x112)](spawn,_0x46e086,_0x1cd8c8,{'stdio':[_0x4f729c(0xea),_0x209918?.['stdio']??_0x4f729c(0xe9),_0x209918?.[_0x4f729c(0x101)]??_0x158e09['dWmOG']],'shell':process['platform']===_0x158e09[_0x4f729c(0x107)]});_0x1708a7=_0x209918?.['timeoutMs']?setTimeout(()=>{const _0x513c69=_0x4f729c;_0x435a63[_0x513c69(0xdd)](),_0x435a63[_0x513c69(0x100)](),_0xa748a5['fyZhc'](_0x2ce883,![]);},_0x209918['timeoutMs']):undefined,_0x435a63['on'](_0x158e09[_0x4f729c(0xf9)],_0x56e5c7=>{_0xa748a5['fyZhc'](_0x2ce883,_0x56e5c7===0x0);}),_0x435a63['on'](_0x158e09['WKGjz'],()=>{_0x2ce883(![]);});});}export function resolveDistTag(_0xb78637){const _0x24f2bd={'qlDqq':'beta'};if(/-alpha\./i['test'](_0xb78637))return'alpha';if(/-beta\./i['test'](_0xb78637))return _0x24f2bd['qlDqq'];if(/-rc\./i['test'](_0xb78637))return'rc';return'latest';}async function runInstall(_0x3c14e1='latest'){const _0x3f4723={'dddAm':'install','mZVTf':'error'};return new Promise(_0x5e4c0b=>{const _0x24e3b7=_0x486a,_0x225235={'aSZsL':function(_0x485380,_0x24b3f3){return _0x485380===_0x24b3f3;}};console[_0x24e3b7(0xcf)]('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x3c14e1+'...\x0a');const _0x1fbb18=spawn(_0x24e3b7(0xee),[_0x3f4723['dddAm'],'-g',PACKAGE_NAME+'@'+_0x3c14e1],{'stdio':[_0x24e3b7(0xea),_0x24e3b7(0xe9),_0x24e3b7(0xe9)],'shell':process['platform']==='win32'});_0x1fbb18['on']('close',_0x2f2396=>{const _0x1fda6e=_0x24e3b7;_0x5e4c0b(_0x225235[_0x1fda6e(0xe8)](_0x2f2396,0x0));}),_0x1fbb18['on'](_0x3f4723[_0x24e3b7(0xfb)],()=>{_0x5e4c0b(![]);});});}async function updateClaudeMarketplace(){const _0x175633=_0x486a,_0xd46ad5={'pHilC':_0x175633(0x105),'IusUL':'marketplace','mDMrY':'update','TwecU':_0x175633(0x10d)},_0x31629f=await runCommand(_0xd46ad5[_0x175633(0xdb)],['plugin',_0xd46ad5['IusUL'],_0xd46ad5['mDMrY'],_0xd46ad5[_0x175633(0x11a)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x31629f)throw new Error(_0x175633(0xda));}async function updateClaudePlugin(_0x3de81c){const _0x4ed112=_0x486a,_0x54a5fd={'xSWkB':_0x4ed112(0xe6),'ZneEt':function(_0x2831cb,_0x17d820){return _0x2831cb??_0x17d820;}},_0x52ab59=[_0x54a5fd['xSWkB'],_0x4ed112(0xd0),_0x4ed112(0x115)];_0x3de81c&&_0x52ab59['push']('--scope',_0x3de81c);const _0x9ca751=await runCommand(_0x4ed112(0x105),_0x52ab59,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x9ca751){const _0xae5670=_0x54a5fd[_0x4ed112(0xd8)](_0x3de81c,'user');throw new Error(_0x4ed112(0xf2)+_0xae5670+_0x4ed112(0xd1));}}function isSkillInstalled(_0x3699e5,_0x599606,_0xb97050){const _0x58a260=_0x486a,_0x23d230={'txhhc':'opencode','jrcYX':function(_0x2f87a8,_0x4f9264,_0x33b823){return _0x2f87a8(_0x4f9264,_0x33b823);},'iOYvT':function(_0x238989,_0x282724){return _0x238989(_0x282724);}},_0x423a53=_0xb97050===_0x23d230[_0x58a260(0xe5)]?getOpencodeSkillsDir(_0x599606):getSkillsDir(_0x599606),_0x4a3f95=_0x23d230['jrcYX'](join,_0x423a53,_0x3699e5);return _0x23d230[_0x58a260(0x11b)](existsSync,_0x4a3f95);}async function reinstallSkills(_0x5311f4){const _0x5b5e0f=_0x486a,_0x4f372e={'kkRHV':_0x5b5e0f(0xf1),'kAxHB':function(_0x4cb474,_0x212124,_0x25d61c,_0x5843df){return _0x4cb474(_0x212124,_0x25d61c,_0x5843df);},'adLzK':'claude','xdeCI':function(_0x37e022,_0x4e98bb,_0x7bc151){return _0x37e022(_0x4e98bb,_0x7bc151);},'klXxl':function(_0x3cdcdb,_0x1ec8e4){return _0x3cdcdb===_0x1ec8e4;},'rfqmL':function(_0x6e69c8,_0x13be5c,_0x3d823f){return _0x6e69c8(_0x13be5c,_0x3d823f);}},_0x3d41f8=[_0x5b5e0f(0x11c),_0x4f372e[_0x5b5e0f(0x108)]],_0x591e5e=[];for(const _0x3cca8d of _0x3d41f8){for(const _0x2a69fc of RANGER_MANAGED_SKILLS){_0x4f372e['kAxHB'](isSkillInstalled,_0x2a69fc,_0x3cca8d,_0x4f372e[_0x5b5e0f(0xdc)])&&_0x591e5e[_0x5b5e0f(0x119)]({'skillName':_0x2a69fc,'level':_0x3cca8d,'platform':_0x4f372e['adLzK']}),_0x4f372e[_0x5b5e0f(0xd9)](isSkillInstalled,_0x2a69fc,_0x3cca8d,'opencode')&&_0x591e5e['push']({'skillName':_0x2a69fc,'level':_0x3cca8d,'platform':_0x5b5e0f(0xeb)});}}for(const _0x1ce893 of _0x3d41f8){for(const _0xdc9135 of DEPRECATED_SKILLS){await _0x4f372e[_0x5b5e0f(0xe2)](removeSkill,_0xdc9135,_0x1ce893);}}if(_0x4f372e['klXxl'](_0x591e5e[_0x5b5e0f(0xfd)],0x0)){console[_0x5b5e0f(0xcf)](_0x5b5e0f(0xf8));return;}console['log'](_0x5b5e0f(0xd7)+_0x591e5e[_0x5b5e0f(0xfd)]+_0x5b5e0f(0xcb));for(const {skillName:_0x559c08,level:_0x42763c,platform:_0x219827}of _0x591e5e){try{await _0x4f372e['rfqmL'](installSkill,_0x559c08,{'level':_0x42763c,'cliVersion':_0x5311f4,'platform':_0x219827});}catch(_0x2346f9){console[_0x5b5e0f(0xed)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x219827+'\x20'+_0x42763c+_0x5b5e0f(0x110)+_0x559c08+':',_0x2346f9);}}}async function ensureActiveProfileGitignored(){const _0x536cea=_0x486a,_0x58234c={'hwKuY':function(_0xedfc87){return _0xedfc87();},'zNFLb':'.gitignore','qnquX':function(_0x49d723,_0x43a1c2,_0x4befd7){return _0x49d723(_0x43a1c2,_0x4befd7);},'AUDcC':function(_0x401508,_0x262269,_0x51fc6e,_0x58bf0b){return _0x401508(_0x262269,_0x51fc6e,_0x58bf0b);},'DVkdK':_0x536cea(0x10c)},_0x3435b5=join(_0x58234c[_0x536cea(0x10a)](getRangerDir),_0x58234c['zNFLb']);if(!existsSync(_0x3435b5))return![];let _0x2986e6='';try{_0x2986e6=await _0x58234c['qnquX'](readFile,_0x3435b5,_0x536cea(0x10c));}catch{return![];}const _0x151fbe=_0x2986e6['split'](/\r?\n/);if(_0x151fbe['some'](_0x598d66=>_0x598d66[_0x536cea(0xce)]()===_0x536cea(0xf6)))return![];let _0x59d0f0=_0x151fbe[_0x536cea(0x111)](_0x4f630b=>_0x4f630b['trim']()==='active-feature.txt');_0x59d0f0===-0x1&&(_0x59d0f0=_0x151fbe[_0x536cea(0xfd)]);_0x151fbe['splice'](_0x59d0f0,0x0,_0x536cea(0xf6));let _0x435d62=_0x151fbe['join']('\x0a');!_0x435d62[_0x536cea(0x104)]('\x0a')&&(_0x435d62+='\x0a');try{await _0x58234c['AUDcC'](writeFile,_0x3435b5,_0x435d62,_0x58234c[_0x536cea(0xdf)]);}catch{return![];}return!![];}export async function update(){const _0x469877=_0x486a,_0x580400={'SJknJ':function(_0x22c7fc){return _0x22c7fc();},'lCseI':function(_0xceb1ae,_0xe37450){return _0xceb1ae(_0xe37450);},'nKbFz':_0x469877(0xf7),'lTijl':_0x469877(0xe4),'YRvGF':'\x0a✅\x20Update\x20complete!','Irklv':'Attempting\x20install\x20anyway...','mtPSF':function(_0x4a25ba){return _0x4a25ba();},'KSrNE':'\x0aSuccessfully\x20installed\x20latest\x20version.','GWdXY':function(_0x5a100e){return _0x5a100e();},'dBMdP':_0x469877(0xe0),'kFncy':function(_0x4a7032,_0x3b4f89){return _0x4a7032<_0x3b4f89;},'yIGMD':'Update\x20failed.','HucyM':_0x469877(0x115),'AsSiO':_0x469877(0xd4),'pZKSj':function(_0x45e4a2,_0x4221fb){return _0x45e4a2===_0x4221fb;},'XNfJk':_0x469877(0x11c)},_0x3965a7=_0x580400['SJknJ'](getCurrentVersion);console['log'](_0x469877(0x10e)+_0x3965a7);const _0x3f0540=_0x580400[_0x469877(0xca)](resolveDistTag,_0x3965a7);if(_0x3f0540!==_0x580400[_0x469877(0xcd)]){console[_0x469877(0xcf)](_0x469877(0xcc)+_0x3f0540+').\x20Staying\x20on\x20'+_0x3f0540+_0x469877(0x103)+_0x3f0540+'...');const _0x1346f8=await runInstall(_0x3f0540);if(!_0x1346f8)throw new Error(_0x469877(0xe7)+_0x3f0540+'\x20channel.');const _0x5bf39a=_0x580400['SJknJ'](getCurrentVersion);console[_0x469877(0xcf)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x3f0540+'.'),await _0x580400[_0x469877(0xca)](reinstallSkills,_0x5bf39a);const _0x29a751=await _0x580400['SJknJ'](migrateActiveProfileFile);_0x29a751&&console[_0x469877(0xcf)](_0x580400['lTijl']);await ensureActiveProfileGitignored(),console['log'](_0x580400['YRvGF']);return;}console[_0x469877(0xcf)](_0x469877(0xef));const _0x5f133e=getLatestVersion();let _0x388d65=_0x3965a7;if(!_0x5f133e[_0x469877(0x109)]){console['warn'](_0x469877(0x117)+_0x5f133e['error']),console['log'](_0x580400[_0x469877(0x114)]);const _0x13dc97=await _0x580400['mtPSF'](runInstall);if(_0x13dc97)console[_0x469877(0xcf)](_0x580400[_0x469877(0xe3)]),_0x388d65=_0x580400['GWdXY'](getCurrentVersion);else throw new Error(_0x469877(0x116)+_0x5f133e['error']);}else{const _0xd2560d=_0x5f133e['version'];console['log'](_0x469877(0xe1)+_0xd2560d);const _0x43809d=compareVersions(_0x3965a7,_0xd2560d);if(_0x43809d===0x0)console['log'](_0x580400[_0x469877(0xfc)]);else{if(_0x580400[_0x469877(0xff)](_0x43809d,0x0))console['log']('\x0aYour\x20version\x20('+_0x3965a7+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0xd2560d+').');else{const _0x2f99a8=await _0x580400[_0x469877(0x106)](runInstall);if(_0x2f99a8)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0xd2560d),_0x388d65=_0xd2560d;else throw new Error(_0x580400[_0x469877(0xd5)]);}}}await reinstallSkills(_0x388d65);const _0x294d3c=await isMarketplaceAdded(_0x469877(0x10d)),_0x1b3772=await isPluginInstalled(_0x580400['HucyM']);_0x294d3c&&(await updateClaudeMarketplace(),console[_0x469877(0xcf)](_0x580400['AsSiO']));if(_0x1b3772){const _0x5f152f=await getPluginInfo(_0x580400['HucyM']);_0x580400['pZKSj'](_0x5f152f?.['scope'],_0x580400['XNfJk'])?(await _0x580400['lCseI'](updateClaudePlugin,_0x469877(0x11c)),console[_0x469877(0xcf)](_0x469877(0x118))):(await updateClaudePlugin(),console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'));}const _0x3b0419=await _0x580400[_0x469877(0xf4)](migrateActiveProfileFile);_0x3b0419&&console['log'](_0x580400['lTijl']);const _0x301ebc=await _0x580400['GWdXY'](ensureActiveProfileGitignored);console[_0x469877(0xcf)]('\x0a✅\x20Update\x20complete!');}
|
|
1
|
+
(function(_0x3842d7,_0x5a30f1){const _0x17d9c8=_0x5a7b,_0x125995=_0x3842d7();while(!![]){try{const _0x1c11be=-parseInt(_0x17d9c8(0x1a2))/0x1+-parseInt(_0x17d9c8(0x1b2))/0x2+parseInt(_0x17d9c8(0x1c8))/0x3+parseInt(_0x17d9c8(0x196))/0x4+parseInt(_0x17d9c8(0x18b))/0x5*(parseInt(_0x17d9c8(0x1b4))/0x6)+-parseInt(_0x17d9c8(0x1c3))/0x7*(parseInt(_0x17d9c8(0x1b8))/0x8)+parseInt(_0x17d9c8(0x1a9))/0x9;if(_0x1c11be===_0x5a30f1)break;else _0x125995['push'](_0x125995['shift']());}catch(_0xae0ebd){_0x125995['push'](_0x125995['shift']());}}}(_0x1362,0xe6144));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x1362(){const _0x2cf367=['kill','\x0aCould\x20not\x20check\x20latest\x20version:\x20','genBK','trim','1485139dAAkYH','\x20ranger-managed\x20skill(s)...','unUlU','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','claude','ignore','PNewO','16656534bjmWeB','ElJeu','JiZzx','VEpoK','Koqrj','\x0aYour\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','YaaSj','--scope','3490376XSLgNh','\x20\x20Failed\x20to\x20reinstall\x20','711606uKOadd','FdKAP','LXidN','BFdkU','52584rNyVGO','BDbFQ','nsARR','error','ranger@trailhead','JUXnD','platform','test','zPngv','length','NjBCr','1309DvgOQU','active-profile.txt','tryQp','local','qbrWz','1465944EBGxYi','user','pqbAB','gPUyb','active-feature.txt','OvxBR','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','Update\x20failed:\x20','cCCbT','trailhead','LCsli','CMisd','cwd','XBfxt','project','beta','scope','timeoutMs','\x0aSuccessfully\x20installed\x20','unref','\x0aInstalling\x20','alpha','\x20—\x20reinstalling\x20@','splice','opencode','push','BWafi','.gitignore','HZaOv','win32','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','inherit','stdio','MEgDC','\x0aCurrent\x20version:\x20','plugin','\x20channel.','BLAYJ','55MoOBZl','bPcaD','odFUl','RQLDD','jpSzh','gxorf','xJPAJ','\x0a✅\x20Update\x20complete!','update','latest','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','7031588szRQSc','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','close','WNwqC','utf-8','install','log','edUup'];_0x1362=function(){return _0x2cf367;};return _0x1362();}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x5a7b(_0x1b2d77,_0x554a42){_0x1b2d77=_0x1b2d77-0x182;const _0x136252=_0x1362();let _0x5a7be3=_0x136252[_0x1b2d77];return _0x5a7be3;}async function runCommand(_0x26a649,_0x1e607b,_0xb01b58){const _0x2aac36={'YaaSj':function(_0x3fa546,_0x367709){return _0x3fa546(_0x367709);},'JUXnD':function(_0x2ff930,_0x2cd4fd){return _0x2ff930===_0x2cd4fd;},'yOvMl':'inherit','pPHnV':function(_0x416e61,_0x129dff,_0x1b9bd5){return _0x416e61(_0x129dff,_0x1b9bd5);}};return new Promise(_0x57fa5e=>{const _0x179d5b=_0x5a7b,_0x2ede76={'RQLDD':function(_0x220c6e,_0x4c9d0e){const _0x1c4808=_0x5a7b;return _0x2aac36[_0x1c4808(0x1b0)](_0x220c6e,_0x4c9d0e);},'Ffpma':function(_0x53b3a5,_0x363e3f){return _0x53b3a5(_0x363e3f);},'cabYW':function(_0x3d9e51,_0x4bb550){const _0x50b9cd=_0x5a7b;return _0x2aac36[_0x50b9cd(0x1bd)](_0x3d9e51,_0x4bb550);}};let _0x595266=![],_0xe04711;const _0xc3be59=_0x2f2316=>{const _0x28b6a7=_0x5a7b;if(_0x595266)return;_0x595266=!![],_0xe04711&&clearTimeout(_0xe04711),_0x2ede76[_0x28b6a7(0x18e)](_0x57fa5e,_0x2f2316);},_0x42db74=spawn(_0x26a649,_0x1e607b,{'stdio':['ignore',_0xb01b58?.['stdio']??'inherit',_0xb01b58?.[_0x179d5b(0x185)]??_0x2aac36['yOvMl']],'cwd':_0xb01b58?.[_0x179d5b(0x1d4)],'shell':process[_0x179d5b(0x1be)]===_0x179d5b(0x182)});_0xe04711=_0xb01b58?.[_0x179d5b(0x1d9)]?_0x2aac36['pPHnV'](setTimeout,()=>{const _0x415f82=_0x179d5b;_0x42db74[_0x415f82(0x19e)](),_0x42db74[_0x415f82(0x1db)](),_0x2ede76['RQLDD'](_0xc3be59,![]);},_0xb01b58['timeoutMs']):undefined,_0x42db74['on'](_0x179d5b(0x198),_0x24fe3c=>{_0x2ede76['Ffpma'](_0xc3be59,_0x2ede76['cabYW'](_0x24fe3c,0x0));}),_0x42db74['on']('error',()=>{_0xc3be59(![]);});});}export function resolveDistTag(_0x30697b){const _0x1f6303=_0x5a7b,_0x5d725e={'JiZzx':_0x1f6303(0x1dd),'yuQIc':_0x1f6303(0x194)};if(/-alpha\./i['test'](_0x30697b))return _0x5d725e[_0x1f6303(0x1ab)];if(/-beta\./i['test'](_0x30697b))return _0x1f6303(0x1d7);if(/-rc\./i[_0x1f6303(0x1bf)](_0x30697b))return'rc';return _0x5d725e['yuQIc'];}async function runInstall(_0x1bf767='latest'){const _0x671e7a=_0x5a7b,_0x597ae1={'eVOGe':function(_0x2e23af,_0x34821b){return _0x2e23af(_0x34821b);},'PNewO':function(_0x3f227a,_0x5270fa,_0x720fe3,_0x9ee05f){return _0x3f227a(_0x5270fa,_0x720fe3,_0x9ee05f);},'dmgko':'npm','NjBCr':_0x671e7a(0x1a7),'sGchV':_0x671e7a(0x184),'onxnM':function(_0x529473,_0x1a3952){return _0x529473===_0x1a3952;},'FdKAP':'close','unUlU':'error'};return new Promise(_0x5847c8=>{const _0x1ddb0e=_0x671e7a,_0x4429ad={'ElJeu':function(_0x6d1bb4,_0x15fde){return _0x597ae1['eVOGe'](_0x6d1bb4,_0x15fde);},'ShjWw':function(_0x469b94,_0x4d8438){return _0x469b94(_0x4d8438);}};console['log'](_0x1ddb0e(0x1dc)+PACKAGE_NAME+'@'+_0x1bf767+'...\x0a');const _0x3e74ad=_0x597ae1[_0x1ddb0e(0x1a8)](spawn,_0x597ae1['dmgko'],[_0x1ddb0e(0x19b),'-g',PACKAGE_NAME+'@'+_0x1bf767],{'stdio':[_0x597ae1[_0x1ddb0e(0x1c2)],'inherit',_0x597ae1['sGchV']],'shell':_0x597ae1['onxnM'](process['platform'],_0x1ddb0e(0x182))});_0x3e74ad['on'](_0x597ae1[_0x1ddb0e(0x1b5)],_0x3279bd=>{const _0x51ad68=_0x1ddb0e;_0x4429ad[_0x51ad68(0x1aa)](_0x5847c8,_0x3279bd===0x0);}),_0x3e74ad['on'](_0x597ae1[_0x1ddb0e(0x1a4)],()=>{_0x4429ad['ShjWw'](_0x5847c8,![]);});});}async function updateClaudeMarketplace(){const _0x3672bf=_0x5a7b,_0x3a6f53={'WNwqC':'claude','Koqrj':_0x3672bf(0x188),'edUup':_0x3672bf(0x183)},_0x2334f6=await runCommand(_0x3a6f53[_0x3672bf(0x199)],[_0x3a6f53[_0x3672bf(0x1ad)],'marketplace',_0x3672bf(0x193),_0x3672bf(0x1d1)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x2334f6)throw new Error(_0x3a6f53[_0x3672bf(0x19d)]);}async function updateClaudePlugin(_0x33528c='user'){const _0x332a58=_0x5a7b,_0x29a3b0={'gxorf':function(_0x16c442,_0x4c196f){return _0x16c442!==_0x4c196f;},'bcsau':'user','GzvWz':_0x332a58(0x1b1),'zPngv':'claude','bPcaD':function(_0x5f2882,_0x56ea0d){return _0x5f2882===_0x56ea0d;},'BWafi':_0x332a58(0x1d6),'XBfxt':function(_0x163a6f,_0x34ef5f){return _0x163a6f===_0x34ef5f;},'Rdjvz':_0x332a58(0x1c6)},_0x47ff35=['plugin',_0x332a58(0x193),_0x332a58(0x1bc)];_0x29a3b0[_0x332a58(0x190)](_0x33528c,_0x29a3b0['bcsau'])&&_0x47ff35[_0x332a58(0x1e1)](_0x29a3b0['GzvWz'],_0x33528c);const _0x2cf8b6=await runCommand(_0x29a3b0[_0x332a58(0x1c0)],_0x47ff35,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x29a3b0[_0x332a58(0x18c)](_0x33528c,_0x29a3b0[_0x332a58(0x1e2)])||_0x29a3b0[_0x332a58(0x1d5)](_0x33528c,_0x29a3b0['Rdjvz'])?getProjectRoot():undefined});if(!_0x2cf8b6)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x33528c+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x1e74c5,_0x51b583,_0x5b2aad){const _0x24bfd5=_0x5a7b,_0x483153={'odFUl':_0x24bfd5(0x1e0),'genBK':function(_0x6da510,_0x53219c,_0x39da9d){return _0x6da510(_0x53219c,_0x39da9d);}},_0x4142ef=_0x5b2aad===_0x483153[_0x24bfd5(0x18d)]?getOpencodeSkillsDir(_0x51b583):getSkillsDir(_0x51b583),_0x4ee3ea=_0x483153[_0x24bfd5(0x1a0)](join,_0x4142ef,_0x1e74c5);return existsSync(_0x4ee3ea);}async function reinstallSkills(_0x25d32e){const _0x565d98=_0x5a7b,_0xa20d3f={'OvxBR':_0x565d98(0x1c9),'BFdkU':function(_0x439a70,_0x3f0bcc,_0x43a3d3,_0xe9adca){return _0x439a70(_0x3f0bcc,_0x43a3d3,_0xe9adca);},'xbjjM':'opencode','pqbAB':function(_0x987eea,_0x454ba1){return _0x987eea===_0x454ba1;},'HZaOv':function(_0x4f7da2,_0x35f9ee,_0x45a1cd){return _0x4f7da2(_0x35f9ee,_0x45a1cd);}},_0x3de17e=[_0x565d98(0x1d6),_0xa20d3f[_0x565d98(0x1cd)]],_0x4d5461=[];for(const _0x20359a of _0x3de17e){for(const _0x1069b5 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x1069b5,_0x20359a,_0x565d98(0x1a6))&&_0x4d5461[_0x565d98(0x1e1)]({'skillName':_0x1069b5,'level':_0x20359a,'platform':_0x565d98(0x1a6)}),_0xa20d3f[_0x565d98(0x1b7)](isSkillInstalled,_0x1069b5,_0x20359a,_0xa20d3f['xbjjM'])&&_0x4d5461['push']({'skillName':_0x1069b5,'level':_0x20359a,'platform':_0x565d98(0x1e0)});}}for(const _0x4de33c of _0x3de17e){for(const _0x5706cc of DEPRECATED_SKILLS){await removeSkill(_0x5706cc,_0x4de33c);}}if(_0xa20d3f[_0x565d98(0x1ca)](_0x4d5461['length'],0x0)){console[_0x565d98(0x19c)](_0x565d98(0x1a5));return;}console['log']('\x0aReinstalling\x20'+_0x4d5461['length']+_0x565d98(0x1a3));for(const {skillName:_0x42862b,level:_0x53769e,platform:_0x4828ce}of _0x4d5461){try{await _0xa20d3f[_0x565d98(0x1e4)](installSkill,_0x42862b,{'level':_0x53769e,'cliVersion':_0x25d32e,'platform':_0x4828ce});}catch(_0x28b9b9){console['warn'](_0x565d98(0x1b3)+_0x4828ce+'\x20'+_0x53769e+'\x20skill\x20'+_0x42862b+':',_0x28b9b9);}}}async function ensureActiveProfileGitignored(){const _0x3ab0f8=_0x5a7b,_0x3e2b9a={'qbrWz':function(_0x3a3113,_0x177fbd,_0x40e7a1){return _0x3a3113(_0x177fbd,_0x40e7a1);},'zEsvw':_0x3ab0f8(0x1e3),'SfuBh':function(_0x4d92f6,_0x4a2750){return _0x4d92f6(_0x4a2750);},'nsARR':function(_0x477d17,_0x782edc){return _0x477d17===_0x782edc;},'BdwxU':function(_0x5ede2a,_0x3722fe,_0x3d5c81,_0x40fbd6){return _0x5ede2a(_0x3722fe,_0x3d5c81,_0x40fbd6);},'JjEzx':_0x3ab0f8(0x19a)},_0x5d76f1=_0x3e2b9a[_0x3ab0f8(0x1c7)](join,getRangerDir(),_0x3e2b9a['zEsvw']);if(!_0x3e2b9a['SfuBh'](existsSync,_0x5d76f1))return![];let _0x417b1d='';try{_0x417b1d=await readFile(_0x5d76f1,'utf-8');}catch{return![];}const _0x31885f=_0x417b1d['split'](/\r?\n/);if(_0x31885f['some'](_0x4b7956=>_0x4b7956[_0x3ab0f8(0x1a1)]()===_0x3ab0f8(0x1c4)))return![];let _0x14208f=_0x31885f['findIndex'](_0x22b94d=>_0x22b94d[_0x3ab0f8(0x1a1)]()===_0x3ab0f8(0x1cc));_0x3e2b9a[_0x3ab0f8(0x1ba)](_0x14208f,-0x1)&&(_0x14208f=_0x31885f[_0x3ab0f8(0x1c1)]);_0x31885f[_0x3ab0f8(0x1df)](_0x14208f,0x0,'active-profile.txt');let _0x297f24=_0x31885f['join']('\x0a');!_0x297f24['endsWith']('\x0a')&&(_0x297f24+='\x0a');try{await _0x3e2b9a['BdwxU'](writeFile,_0x5d76f1,_0x297f24,_0x3e2b9a['JjEzx']);}catch{return![];}return!![];}export async function update(){const _0x4c7349=_0x5a7b,_0x45fabe={'cCCbT':function(_0xab7206){return _0xab7206();},'gPUyb':function(_0x5bfe5c,_0x749120){return _0x5bfe5c(_0x749120);},'CMisd':function(_0x3ec8e6){return _0x3ec8e6();},'MEgDC':_0x4c7349(0x192),'aLBdZ':'Checking\x20for\x20updates...','BLAYJ':'\x0aSuccessfully\x20installed\x20latest\x20version.','UZuMD':function(_0x230921){return _0x230921();},'BDbFQ':function(_0x2522cf,_0x6f20fd,_0x1619cf){return _0x2522cf(_0x6f20fd,_0x1619cf);},'LCsli':function(_0x779a45,_0xaf84ca){return _0x779a45===_0xaf84ca;},'kbNUf':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','VEpoK':function(_0x463d03,_0x95f4d3){return _0x463d03<_0x95f4d3;},'xJPAJ':function(_0x8b8ac3){return _0x8b8ac3();},'hUqbQ':'Update\x20failed.','HvrEq':'trailhead','JqKuN':function(_0x1d7870,_0x547ac9){return _0x1d7870(_0x547ac9);},'tryQp':function(_0x35fa40,_0x33874f){return _0x35fa40===_0x33874f;},'OGDRX':_0x4c7349(0x1d6),'jpSzh':_0x4c7349(0x1af),'LXidN':_0x4c7349(0x195)},_0x11d11e=getCurrentVersion();console[_0x4c7349(0x19c)](_0x4c7349(0x187)+_0x11d11e);const _0x260d99=resolveDistTag(_0x11d11e);if(_0x260d99!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x260d99+').\x20Staying\x20on\x20'+_0x260d99+_0x4c7349(0x1de)+_0x260d99+'...');const _0x51f8d5=await runInstall(_0x260d99);if(!_0x51f8d5)throw new Error('Update\x20failed\x20for\x20@'+_0x260d99+_0x4c7349(0x189));const _0x2a85b5=_0x45fabe[_0x4c7349(0x1d0)](getCurrentVersion);console['log'](_0x4c7349(0x1da)+PACKAGE_NAME+'@'+_0x260d99+'.'),await _0x45fabe[_0x4c7349(0x1cb)](reinstallSkills,_0x2a85b5),await _0x45fabe[_0x4c7349(0x1d3)](ensureActiveProfileGitignored),console['log'](_0x45fabe[_0x4c7349(0x186)]);return;}console['log'](_0x45fabe['aLBdZ']);const _0x21ded7=getLatestVersion();let _0x51b7c0=_0x11d11e;if(!_0x21ded7['version']){console['warn'](_0x4c7349(0x19f)+_0x21ded7[_0x4c7349(0x1bb)]),console[_0x4c7349(0x19c)]('Attempting\x20install\x20anyway...');const _0x4487df=await _0x45fabe['cCCbT'](runInstall);if(_0x4487df)console['log'](_0x45fabe[_0x4c7349(0x18a)]),_0x51b7c0=_0x45fabe['UZuMD'](getCurrentVersion);else throw new Error(_0x4c7349(0x1cf)+_0x21ded7['error']);}else{const _0x2c19ad=_0x21ded7['version'];console[_0x4c7349(0x19c)]('Latest\x20version:\x20\x20'+_0x2c19ad);const _0x5edcc2=_0x45fabe[_0x4c7349(0x1b9)](compareVersions,_0x11d11e,_0x2c19ad);if(_0x45fabe[_0x4c7349(0x1d2)](_0x5edcc2,0x0))console[_0x4c7349(0x19c)](_0x45fabe['kbNUf']);else{if(_0x45fabe[_0x4c7349(0x1ac)](_0x5edcc2,0x0))console[_0x4c7349(0x19c)](_0x4c7349(0x1ae)+_0x11d11e+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x2c19ad+').');else{const _0x2ca7b7=await _0x45fabe[_0x4c7349(0x191)](runInstall);if(_0x2ca7b7)console[_0x4c7349(0x19c)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2c19ad),_0x51b7c0=_0x2c19ad;else throw new Error(_0x45fabe['hUqbQ']);}}}await _0x45fabe['gPUyb'](reinstallSkills,_0x51b7c0);const _0x18817f=await isMarketplaceAdded(_0x45fabe['HvrEq']),_0xea4cb3=await isPluginInstalled(_0x4c7349(0x1bc));_0x18817f&&(await _0x45fabe['xJPAJ'](updateClaudeMarketplace),console['log'](_0x4c7349(0x197)));if(_0xea4cb3){const _0x51fb69=await getPluginInfo('ranger@trailhead'),_0x5ddf8a=_0x51fb69?.[_0x4c7349(0x1d8)]??'user';await _0x45fabe['JqKuN'](updateClaudePlugin,_0x5ddf8a);if(_0x45fabe[_0x4c7349(0x1c5)](_0x5ddf8a,_0x45fabe['OGDRX']))console[_0x4c7349(0x19c)](_0x45fabe[_0x4c7349(0x18f)]);else _0x5ddf8a==='local'?console[_0x4c7349(0x19c)](_0x4c7349(0x1ce)):console['log'](_0x45fabe[_0x4c7349(0x1b6)]);}const _0xdfd7fe=await ensureActiveProfileGitignored();console['log'](_0x4c7349(0x192));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fe56a,_0x50b096){var _0x3e9010=_0x5def,_0x546ed8=_0x1fe56a();while(!![]){try{var _0x2ce41f=parseInt(_0x3e9010(0x1ac))/0x1*(-parseInt(_0x3e9010(0x1a6))/0x2)+-parseInt(_0x3e9010(0x19b))/0x3+-parseInt(_0x3e9010(0x1a2))/0x4*(parseInt(_0x3e9010(0x1ab))/0x5)+-parseInt(_0x3e9010(0x1a8))/0x6*(parseInt(_0x3e9010(0x1a4))/0x7)+parseInt(_0x3e9010(0x1aa))/0x8+parseInt(_0x3e9010(0x1a9))/0x9*(parseInt(_0x3e9010(0x1a7))/0xa)+parseInt(_0x3e9010(0x1a3))/0xb*(parseInt(_0x3e9010(0x19e))/0xc);if(_0x2ce41f===_0x50b096)break;else _0x546ed8['push'](_0x546ed8['shift']());}catch(_0x583434){_0x546ed8['push'](_0x546ed8['shift']());}}}(_0x4198,0x6fec1));export async function updateEnv(_0x1cf0df,_0x43f04f,_0x10cd25){var _0x52f2df=_0x5def,_0x271ff0={'KqZbo':function(_0xdb82a8,_0x93e265){return _0xdb82a8+_0x93e265;},'nSIVw':function(_0x2dfec8,_0x84a062){return _0x2dfec8+_0x84a062;},'TucKX':'ranger\x20profile\x20update\x20writes\x20to\x20the\x20legacy\x20.ranger/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','mDbaf':_0x52f2df(0x1a0)};console[_0x52f2df(0x1a5)](_0x271ff0[_0x52f2df(0x19d)](_0x271ff0[_0x52f2df(0x19c)](_0x271ff0[_0x52f2df(0x1a1)]+'Cloud\x20profiles\x20own\x20canonical\x20session\x20state;\x20re-auth\x20via:\x0a','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a'),'For\x20SSO/headed\x20login:\x20ranger\x20profile\x20add\x20<account-email>\x0a')+_0x271ff0['mDbaf']),process[_0x52f2df(0x19f)](0x1);}function _0x5def(_0x527027,_0x4953c3){_0x527027=_0x527027-0x19b;var _0x41989d=_0x4198();var _0x5def05=_0x41989d[_0x527027];return _0x5def05;}function _0x4198(){var _0x21ac1e=['error','843202GBNClD','122410TjlNdR','702GQufnl','549CrxTaX','2485624hkjDiA','5masmYW','2GbihhR','760614iAMUwB','nSIVw','KqZbo','12jUgoYE','exit','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','TucKX','3135832AoBJyt','18353819UGMoSM','23142aWrZFt'];_0x4198=function(){return _0x21ac1e;};return _0x4198();}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e77a2,_0x330104){const _0x398336=_0x131f,_0x586657=_0x3e77a2();while(!![]){try{const _0x4fae7a=parseInt(_0x398336(0x88))/0x1*(parseInt(_0x398336(0x8c))/0x2)+parseInt(_0x398336(0x8b))/0x3*(parseInt(_0x398336(0x86))/0x4)+parseInt(_0x398336(0x87))/0x5*(parseInt(_0x398336(0x8f))/0x6)+parseInt(_0x398336(0x83))/0x7+parseInt(_0x398336(0x84))/0x8*(-parseInt(_0x398336(0x8a))/0x9)+parseInt(_0x398336(0x8e))/0xa*(-parseInt(_0x398336(0x92))/0xb)+-parseInt(_0x398336(0x93))/0xc;if(_0x4fae7a===_0x330104)break;else _0x586657['push'](_0x586657['shift']());}catch(_0x3ec48e){_0x586657['push'](_0x586657['shift']());}}}(_0x434e,0x4b95b));function _0x131f(_0x1d9336,_0x160ce4){_0x1d9336=_0x1d9336-0x83;const _0x434eaa=_0x434e();let _0x131f9b=_0x434eaa[_0x1d9336];return _0x131f9b;}import{join}from'path';function _0x434e(){const _0x1e6455=['\x0a✓\x20Now\x20using\x20profile\x20\x22','2245383DsutIC','6JNapGr','14964ZGLHut','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','57180yyDMVU','96jLthFb','log','mDjHk','473bWDstU','2855160UgaFpA','2150442XsuEKe','8ECzKnC','WiCDA','399324BvqcpN','137110KcuIwg','13FQXxZd'];_0x434e=function(){return _0x1e6455;};return _0x434e();}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x457ccf){const _0x247dd5=_0x131f,_0x559c3a={'WiCDA':function(_0x586397,_0x3b8ff8,_0x531919){return _0x586397(_0x3b8ff8,_0x531919);},'FApWm':'settings.json','mDjHk':function(_0x3a25d1,_0x3a95b4){return _0x3a25d1(_0x3a95b4);},'aHtta':function(_0x1ed832,_0x55d403){return _0x1ed832 instanceof _0x55d403;}},_0xc1f157=getEnvDir(_0x457ccf),_0x122ae5=_0x559c3a[_0x247dd5(0x85)](join,_0xc1f157,_0x559c3a['FApWm']),_0x2ee4a5=_0x559c3a[_0x247dd5(0x91)](existsSync,_0xc1f157)&&_0x559c3a[_0x247dd5(0x91)](existsSync,_0x122ae5);if(_0x2ee4a5){await writeActiveProfileName(_0x457ccf),console['log'](_0x247dd5(0x89)+_0x457ccf+'\x22');return;}let _0x59276d=null,_0x51ae76=![];try{_0x59276d=await _0x559c3a[_0x247dd5(0x91)](fetchCloudProfile,_0x457ccf);if(!_0x59276d)_0x51ae76=!![];}catch(_0x499059){_0x559c3a['aHtta'](_0x499059,ApiError)&&_0x499059['status']===0x194&&(_0x51ae76=!![]);}if(_0x51ae76)throw new Error('Profile\x20\x22'+_0x457ccf+_0x247dd5(0x8d)+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+('`ranger\x20profile\x20add\x20'+_0x457ccf+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x457ccf),console[_0x247dd5(0x90)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x457ccf+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x4c4ea5=_0x2903;(function(_0x3f59a1,_0x2e87a5){const _0x3b8f8e=_0x2903,_0x27eb76=_0x3f59a1();while(!![]){try{const _0x358ab9=-parseInt(_0x3b8f8e(0x1a7))/0x1+parseInt(_0x3b8f8e(0x1a4))/0x2+-parseInt(_0x3b8f8e(0x1a2))/0x3*(parseInt(_0x3b8f8e(0x1a0))/0x4)+-parseInt(_0x3b8f8e(0x19d))/0x5*(-parseInt(_0x3b8f8e(0x1a8))/0x6)+-parseInt(_0x3b8f8e(0x1ad))/0x7+parseInt(_0x3b8f8e(0x1ac))/0x8*(parseInt(_0x3b8f8e(0x1ae))/0x9)+-parseInt(_0x3b8f8e(0x1a5))/0xa;if(_0x358ab9===_0x2e87a5)break;else _0x27eb76['push'](_0x27eb76['shift']());}catch(_0xe358ae){_0x27eb76['push'](_0x27eb76['shift']());}}}(_0x50da,0x1f161));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=_0x4c4ea5(0x1a6),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function _0x2903(_0x2b76b7,_0xf536d4){_0x2b76b7=_0x2b76b7-0x19d;const _0x50da32=_0x50da();let _0x29034e=_0x50da32[_0x2b76b7];return _0x29034e;}function readLegacyActiveProfileFile(){const _0x35bff4=_0x4c4ea5,_0xb3d80b={'zzvir':function(_0x409a82,_0x4eaff9,_0x2b2874){return _0x409a82(_0x4eaff9,_0x2b2874);},'rWOgd':function(_0x55abd1){return _0x55abd1();},'DHFUi':function(_0x483766,_0x469932){return _0x483766(_0x469932);}},_0x3104b8=[join(getRangerDir(),LEGACY_ACTIVE_PROFILE_FILE),_0xb3d80b['zzvir'](join,getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE),_0xb3d80b[_0x35bff4(0x19f)](join,_0xb3d80b['rWOgd'](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x474933 of _0x3104b8){if(_0xb3d80b[_0x35bff4(0x1a1)](existsSync,_0x474933))return _0x474933;}return null;}function _0x50da(){const _0xb876a5=['active-profile.txt','67252Rkqvdb','6rzakBf','ZZbTg','IZieG','trim','8OCGLta','375235YsEjUV','2138364WndeYt','800395dOsyqx','cwd','zzvir','13236nSFnuV','DHFUi','222oBUiMs','OSCGb','497398CJTICA','1533220orUger'];_0x50da=function(){return _0xb876a5;};return _0x50da();}export async function readActiveProfileName(){const _0x36e3d3=_0x4c4ea5,_0x1daba0={'IZieG':function(_0x1681c4,_0x3419a0){return _0x1681c4(_0x3419a0);},'OSCGb':function(_0x125dbe){return _0x125dbe();},'ZZbTg':'utf-8'},_0x18cd8d=_0x1daba0[_0x36e3d3(0x1aa)](readLastProfile,process['cwd']());if(_0x18cd8d)return _0x18cd8d;const _0x22e5d9=_0x1daba0[_0x36e3d3(0x1a3)](readLegacyActiveProfileFile);if(!_0x22e5d9)return null;try{return(await readFile(_0x22e5d9,_0x1daba0[_0x36e3d3(0x1a9)]))[_0x36e3d3(0x1ab)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x50463f){const _0x82367=_0x4c4ea5,_0x5bac66={'crUGH':function(_0x1cb9f9,_0x589e25,_0xb8c0b2){return _0x1cb9f9(_0x589e25,_0xb8c0b2);}};_0x5bac66['crUGH'](writeLastProfile,process[_0x82367(0x19e)](),_0x50463f);}
|