@ranger-testing/ranger-cli 2.5.4-alpha.78800d3-3 → 2.5.4-alpha.8c24bb2-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +36 -6
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +46 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x92f768,_0x28feff){const _0x3f6569=_0x3d19,_0x3b719d=_0x92f768();while(!![]){try{const _0x5792b0=parseInt(_0x3f6569(0x143))/0x1*(parseInt(_0x3f6569(0x16c))/0x2)+-parseInt(_0x3f6569(0x167))/0x3*(-parseInt(_0x3f6569(0x13d))/0x4)+-parseInt(_0x3f6569(0x153))/0x5+-parseInt(_0x3f6569(0x16f))/0x6*(-parseInt(_0x3f6569(0x170))/0x7)+parseInt(_0x3f6569(0x169))/0x8+-parseInt(_0x3f6569(0x14e))/0x9*(parseInt(_0x3f6569(0x168))/0xa)+parseInt(_0x3f6569(0x166))/0xb*(-parseInt(_0x3f6569(0x13f))/0xc);if(_0x5792b0===_0x28feff)break;else _0x3b719d['push'](_0x3b719d['shift']());}catch(_0x514a62){_0x3b719d['push'](_0x3b719d['shift']());}}}(_0x2d4b,0x2f50f));import{join}from'path';import{existsSync}from'fs';import _0x295fc1 from'inquirer';import{skillup}from'../skillup.js';function _0x3d19(_0x117187,_0x5d6635){_0x117187=_0x117187-0x138;const _0x2d4b10=_0x2d4b();let _0x3d19f5=_0x2d4b10[_0x117187];return _0x3d19f5;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x2d4b(){const _0x4e8bfd=['ZSOwo','pluginScope','233293rIOSlJ','jgdJK','marketplace','aQROr','wJtre','prompt','push','success','✓\x20Marketplace\x20already\x20added','project','ddqnn','45wyygkJ','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','output','WsjCY','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','989070yqmGNa','user','❌\x20Failed\x20to\x20add\x20marketplace:','add','log','OBZum','ranger@trailhead','VQLLm','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','Where\x20should\x20the\x20plugin\x20be\x20installed?','HhpnS','includes','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','✓\x20Ranger\x20skills\x20already\x20installed','list','siADg','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20enabled','1727YpeGlh','360sbVxeU','657130grYdYc','2118784irfwAd','Ihubd','wantsSkillup','2OQNFzH','CMbJu','ITXYN','6waRkPT','41972YLENaL','confirm','.claude','uUFcO','zVQrG','⚠\x20Failed\x20to\x20enable\x20plugin:','EjKaE','8892QPudVC','ranger','3876cTHAwU','error'];_0x2d4b=function(){return _0x4e8bfd;};return _0x2d4b();}export async function ensureClaudePlugin(_0x52038d){const _0x4cb6d2=_0x3d19,_0x31aa70={'zVQrG':function(_0x7b58fa,_0x3086e2){return _0x7b58fa(_0x3086e2);},'WsjCY':function(_0x48d247,_0x5a2cc5,_0x439a16){return _0x48d247(_0x5a2cc5,_0x439a16);},'OAvAb':'.claude','IiJlK':_0x4cb6d2(0x162),'HeveL':_0x4cb6d2(0x15d),'uUFcO':'User\x20(available\x20in\x20all\x20your\x20projects)','eCWli':_0x4cb6d2(0x154),'xqWYK':_0x4cb6d2(0x14b),'JTUuq':_0x4cb6d2(0x156),'TZZwy':'ranger-testing/trailhead','wJtre':'\x0aYou\x20can\x20install\x20manually\x20with:','EKpsZ':_0x4cb6d2(0x164),'EjKaE':'plugin','RQARK':'ranger@trailhead','ddqnn':'--scope','CMbJu':function(_0x1d92cc){return _0x1d92cc();},'RRKlT':'❌\x20Failed\x20to\x20install\x20plugin:','IqCVT':'enable','nnbhK':_0x4cb6d2(0x14c),'ITXYN':function(_0x11d8fa,_0x5d2713){return _0x11d8fa===_0x5d2713;},'OBZum':_0x4cb6d2(0x13b)},_0x29be78=await _0x31aa70[_0x4cb6d2(0x13a)](isPluginInstalled,_0x4cb6d2(0x159));if(_0x29be78)return console[_0x4cb6d2(0x157)](_0x4cb6d2(0x15c)),![];const _0x3fb81d=existsSync(_0x31aa70['WsjCY'](join,getProjectRoot(),_0x31aa70['OAvAb']));let _0x1551d1;if(_0x52038d)_0x1551d1=_0x52038d;else{if(_0x3fb81d)_0x1551d1=_0x4cb6d2(0x14c);else{console['log'](_0x4cb6d2(0x160));const _0x195cb0=await _0x295fc1[_0x4cb6d2(0x148)]([{'type':_0x31aa70['IiJlK'],'name':'pluginScope','message':_0x31aa70['HeveL'],'choices':[{'name':_0x31aa70[_0x4cb6d2(0x139)],'value':_0x31aa70['eCWli']},{'name':_0x4cb6d2(0x15b),'value':'project'}],'default':_0x4cb6d2(0x154)}]);_0x1551d1=_0x195cb0[_0x4cb6d2(0x142)];}}console[_0x4cb6d2(0x157)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1551d1+'\x20level)...\x0a');const _0x12eab8=await isMarketplaceAdded('trailhead');let _0x36e8f5=_0x12eab8;if(_0x12eab8)console[_0x4cb6d2(0x157)](_0x31aa70['xqWYK']);else{const _0x1f6fdd=await runClaudeCommand(['plugin',_0x4cb6d2(0x145),_0x31aa70['JTUuq'],_0x31aa70['TZZwy']]);!_0x1f6fdd[_0x4cb6d2(0x14a)]?(console['error'](_0x4cb6d2(0x155),_0x1f6fdd[_0x4cb6d2(0x140)]),console[_0x4cb6d2(0x157)](_0x31aa70[_0x4cb6d2(0x147)]),console[_0x4cb6d2(0x157)](_0x31aa70['EKpsZ']),console[_0x4cb6d2(0x157)](_0x4cb6d2(0x14f)+_0x1551d1)):_0x36e8f5=!![];}if(_0x36e8f5){const _0x13d23c=await _0x31aa70[_0x4cb6d2(0x151)](runClaudeCommand,[_0x31aa70[_0x4cb6d2(0x13c)],'install',_0x31aa70['RQARK'],_0x31aa70[_0x4cb6d2(0x14d)],_0x1551d1],{'cwd':_0x1551d1===_0x4cb6d2(0x14c)?_0x31aa70[_0x4cb6d2(0x16d)](getProjectRoot):undefined});if(!_0x13d23c[_0x4cb6d2(0x14a)])console[_0x4cb6d2(0x140)](_0x31aa70['RRKlT'],_0x13d23c['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x4cb6d2(0x157)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1551d1);else{console['log'](_0x4cb6d2(0x152));const _0x3bdbdc=['plugin',_0x31aa70['IqCVT'],_0x4cb6d2(0x159)];_0x1551d1===_0x31aa70['nnbhK']&&_0x3bdbdc[_0x4cb6d2(0x149)](_0x31aa70[_0x4cb6d2(0x14d)],_0x31aa70['nnbhK']);const _0x1a9007=await runClaudeCommand(_0x3bdbdc,{'captureOutput':!![],'cwd':_0x31aa70[_0x4cb6d2(0x16e)](_0x1551d1,'project')?_0x31aa70[_0x4cb6d2(0x16d)](getProjectRoot):undefined}),_0x515063=_0x1a9007[_0x4cb6d2(0x150)]?.[_0x4cb6d2(0x15f)]('already\x20enabled');!_0x1a9007['success']&&!_0x515063?console[_0x4cb6d2(0x140)](_0x31aa70[_0x4cb6d2(0x158)],_0x1a9007['error']):console['log'](_0x4cb6d2(0x165));}}return!![];}export async function ensureClaudeSkills(_0x2beee5){const _0x1115d9=_0x3d19,_0x1b54cd={'EKstp':function(_0xff2560,_0x4223ea){return _0xff2560(_0x4223ea);},'HhpnS':function(_0xa4633,_0x35379b,_0x4125b1,_0x43384d){return _0xa4633(_0x35379b,_0x4125b1,_0x43384d);},'AESGe':function(_0x932232,_0xf087d7){return _0x932232(_0xf087d7);},'Ihubd':_0x1115d9(0x13e),'ZSOwo':'SKILL.md','aQROr':function(_0x5e8e2f,_0x4d5e7b){return _0x5e8e2f||_0x4d5e7b;},'WkgCP':_0x1115d9(0x161),'WqwNl':function(_0x3c873c,_0x2af6aa,_0x104b3e){return _0x3c873c(_0x2af6aa,_0x104b3e);},'ulbXR':_0x1115d9(0x138),'VQLLm':function(_0x3c484d,_0x3515fe){return _0x3c484d(_0x3515fe);},'jgdJK':_0x1115d9(0x171),'siADg':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x5bee8e=_0x1b54cd['EKstp'](existsSync,_0x1b54cd[_0x1115d9(0x15e)](join,_0x1b54cd['AESGe'](getSkillsDir,_0x1115d9(0x154)),_0x1b54cd[_0x1115d9(0x16a)],_0x1b54cd[_0x1115d9(0x141)])),_0x1b83f7=existsSync(join(_0x1b54cd['EKstp'](getSkillsDir,_0x1115d9(0x14c)),_0x1115d9(0x13e),_0x1b54cd['ZSOwo']));if(_0x1b54cd[_0x1115d9(0x146)](_0x5bee8e,_0x1b83f7))return console['log'](_0x1b54cd['WkgCP']),![];const _0x471999=existsSync(_0x1b54cd['WqwNl'](join,getProjectRoot(),_0x1b54cd['ulbXR']));let _0x47ebdf=!![];if(_0x2beee5)await _0x1b54cd[_0x1115d9(0x15a)](skillup,{'autoInstall':_0x2beee5,'suppressUsage':!![]});else{if(_0x471999)await skillup({'autoInstall':'project','suppressUsage':!![]});else{const _0x41a142=await _0x295fc1['prompt']([{'type':_0x1b54cd[_0x1115d9(0x144)],'name':_0x1115d9(0x16b),'message':_0x1b54cd[_0x1115d9(0x163)],'default':!![]}]);_0x47ebdf=_0x41a142['wantsSkillup'],_0x47ebdf&&await skillup({'suppressUsage':!![]});}}return _0x47ebdf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a89b5,_0x540135){const _0x40afbf=_0x3803,_0x5caef1=_0x2a89b5();while(!![]){try{const _0x20ba68=-parseInt(_0x40afbf(0x15b))/0x1+parseInt(_0x40afbf(0x15c))/0x2+parseInt(_0x40afbf(0x161))/0x3*(-parseInt(_0x40afbf(0x153))/0x4)+parseInt(_0x40afbf(0x16b))/0x5*(-parseInt(_0x40afbf(0x16f))/0x6)+-parseInt(_0x40afbf(0x174))/0x7*(parseInt(_0x40afbf(0x177))/0x8)+-parseInt(_0x40afbf(0x175))/0x9*(-parseInt(_0x40afbf(0x155))/0xa)+parseInt(_0x40afbf(0x15a))/0xb*(parseInt(_0x40afbf(0x16e))/0xc);if(_0x20ba68===_0x540135)break;else _0x5caef1['push'](_0x5caef1['shift']());}catch(_0x4b1f16){_0x5caef1['push'](_0x5caef1['shift']());}}}(_0x918a,0xdf62d));import{join}from'path';function _0x3803(_0x210aff,_0x25c011){_0x210aff=_0x210aff-0x152;const _0x918a08=_0x918a();let _0x380352=_0x918a08[_0x210aff];return _0x380352;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x306a4f from'inquirer';function _0x918a(){const _0x456125=['3RPUMew','log','user','prompt','UaaEJ','utf-8','\x0a📦\x20OpenCode\x20Plugin\x0a','plugin','parse','includes','2458805HLXruV','error','$schema','156HXthwu','12IsogGE','FQqyS','BVjCp','WdLQb','✓\x20OpenCode\x20plugin\x20configured','7vIvsFp','2094768DXaoDV','WFfXb','11501264lnWBHG','opencode.json','5361904XEKOCp','Where\x20should\x20the\x20plugin\x20be\x20installed?','20ObsCej','pluginScope','pXflB','WuSHY','project','3367727wUjcfh','974523BLsRHb','2411246jjCdPL','ZoLYB','JAiGT','Project\x20(shared\x20with\x20team\x20via\x20git)','KomnB'];_0x918a=function(){return _0x456125;};return _0x918a();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x10b82e){const _0x54bed8=_0x3803,_0x8d9567={'NxQrF':function(_0x32b220,_0x5160ad){return _0x32b220(_0x5160ad);},'WFfXb':_0x54bed8(0x159),'pmzAB':_0x54bed8(0x152),'WdLQb':_0x54bed8(0x167),'eqAOr':'list','pXflB':_0x54bed8(0x156),'WuSHY':_0x54bed8(0x154),'UaaEJ':'User\x20(available\x20in\x20all\x20your\x20projects)','ZoLYB':_0x54bed8(0x15f),'KomnB':_0x54bed8(0x163),'DpkYD':'https://opencode.ai/config.json','YlCCE':function(_0x2c9318,_0x4a5191,_0x193b07){return _0x2c9318(_0x4a5191,_0x193b07);},'hUtIk':_0x54bed8(0x166),'JAiGT':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','gUXrO':'Failed\x20to\x20read\x20opencode.json','wieXs':'✓\x20OpenCode\x20plugin\x20already\x20configured','BVjCp':function(_0x5d2a99,_0x43021b,_0x5da6df){return _0x5d2a99(_0x43021b,_0x5da6df);},'FQqyS':function(_0x3f06ea,_0x35da07){return _0x3f06ea(_0x35da07);}},_0x5cdb2f=existsSync(join(_0x8d9567['NxQrF'](getOpencodeConfigDir,_0x8d9567[_0x54bed8(0x176)]),_0x8d9567['pmzAB']));let _0x41cfea;if(_0x10b82e)_0x41cfea=_0x10b82e;else{if(_0x5cdb2f)_0x41cfea='project';else{console['log'](_0x8d9567[_0x54bed8(0x172)]);const _0x364dc9=await _0x306a4f[_0x54bed8(0x164)]([{'type':_0x8d9567['eqAOr'],'name':_0x8d9567[_0x54bed8(0x157)],'message':_0x8d9567[_0x54bed8(0x158)],'choices':[{'name':_0x8d9567[_0x54bed8(0x165)],'value':'user'},{'name':_0x8d9567[_0x54bed8(0x15d)],'value':_0x8d9567[_0x54bed8(0x176)]}],'default':_0x8d9567[_0x54bed8(0x160)]}]);_0x41cfea=_0x364dc9[_0x54bed8(0x156)];}}const _0x18d512=join(getOpencodeConfigDir(_0x41cfea),_0x8d9567['pmzAB']),_0x211d8e='@ranger-testing/opencode-plugin',_0x2c0439=_0x8d9567['DpkYD'];let _0xfca833={};if(existsSync(_0x18d512))try{const _0x321859=await _0x8d9567['YlCCE'](readFile,_0x18d512,_0x8d9567['hUtIk']);_0xfca833=JSON[_0x54bed8(0x169)](_0x321859);}catch(_0x536bf6){return console[_0x54bed8(0x16c)](_0x8d9567[_0x54bed8(0x15e)]),{'configured':![],'scope':_0x41cfea,'error':_0x8d9567['gUXrO'],'details':_0x536bf6};}const _0x2ef857=Array['isArray'](_0xfca833['plugin'])?_0xfca833[_0x54bed8(0x168)]:[];if(_0x2ef857[_0x54bed8(0x16a)](_0x211d8e))return console['log'](_0x8d9567['wieXs']),{'configured':![],'scope':_0x41cfea};return _0xfca833['$schema']=_0xfca833[_0x54bed8(0x16d)]||_0x2c0439,_0xfca833['plugin']=[..._0x2ef857,_0x211d8e],await _0x8d9567[_0x54bed8(0x171)](mkdir,_0x8d9567[_0x54bed8(0x170)](getOpencodeConfigDir,_0x41cfea),{'recursive':!![]}),await writeFile(_0x18d512,JSON['stringify'](_0xfca833,null,0x2)+'\x0a'),console[_0x54bed8(0x162)](_0x54bed8(0x173)),{'configured':!![],'scope':_0x41cfea};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1fb5ff,_0x10ef82){const _0x2a3801=_0x16ff,_0x26e544=_0x1fb5ff();while(!![]){try{const _0x497705=-parseInt(_0x2a3801(0x100))/0x1*(parseInt(_0x2a3801(0x10f))/0x2)+-parseInt(_0x2a3801(0x129))/0x3+-parseInt(_0x2a3801(0x11b))/0x4*(-parseInt(_0x2a3801(0x12c))/0x5)+parseInt(_0x2a3801(0xf8))/0x6+-parseInt(_0x2a3801(0x12a))/0x7+-parseInt(_0x2a3801(0x127))/0x8*(-parseInt(_0x2a3801(0x10b))/0x9)+-parseInt(_0x2a3801(0x133))/0xa*(-parseInt(_0x2a3801(0x130))/0xb);if(_0x497705===_0x10ef82)break;else _0x26e544['push'](_0x26e544['shift']());}catch(_0x354b2a){_0x26e544['push'](_0x26e544['shift']());}}}(_0x4863,0xaf63c));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';function _0x4863(){const _0x10c3a3=['RXRsB','UmRqV','trackPhaseStart','eQwIv','settings.json','lDBTB','chromium','dir_setup','log','profile_activate','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','12072lMrkuB','gqBGT','4106550zPTqsm','8923236LJeyWl','IddrW','5812405cFkpbO','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','154bMulld','join','fmmtP','367390MylLZj','XZXZU','TbAFU','length','plugin','baseUrl','error','cPpLW','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ufxLb','OYcJN','skills','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','success','UkAiS','ixCII','kJpPU','path','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','6001008bXtCuu','✓\x20Claude\x20Code\x20plugin\x20installed','ySBHY','myFlD','message','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Failed\x20to\x20add\x20marketplace:','UXVko','3TwUVAx','map','cJdOB','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','auth.json.enc','VHAFT','trackPhaseEnd','✓\x20Auth\x20state\x20found','OHTxS','wzTSE','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','5337ILZNQt','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','RRCYY','filter','139892RkptzF','project','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','JVYUO','onlWs','name','HVzei','skipChromium','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','wYtOK','auth','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','4HJtLjg'];_0x4863=function(){return _0x10c3a3;};return _0x4863();}import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x16ff(_0x4a98d3,_0x433ae6){_0x4a98d3=_0x4a98d3-0xf3;const _0x4863de=_0x4863();let _0x16ff33=_0x4863de[_0x4a98d3];return _0x16ff33;}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(_0x34b2bf){const _0xaaa9cb=_0x16ff,_0x26f8b3={'NeMrx':function(_0x3ff3aa){return _0x3ff3aa();},'gqBGT':function(_0x4036bf,_0x3bc664,_0x58e9d8){return _0x4036bf(_0x3bc664,_0x58e9d8);},'ezjrh':_0xaaa9cb(0x103),'eQwIv':function(_0x4de6b7,_0x4615e8){return _0x4de6b7===_0x4615e8;},'lDBTB':function(_0x161e7a,_0x334c53){return _0x161e7a+_0x334c53;},'OHTxS':_0xaaa9cb(0x11a),'myFlD':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x310b04=_0x26f8b3['NeMrx'](getRangerDir),_0x458dd9=join(_0x310b04,'ci');if(_0x34b2bf){const _0x343a4c=_0x26f8b3[_0xaaa9cb(0x128)](join,_0x458dd9,_0x34b2bf);return{'name':_0x34b2bf,'path':_0x343a4c};}if(!existsSync(_0x458dd9))throw new Error(_0x26f8b3['ezjrh']+_0xaaa9cb(0x13b));const _0x5a3d9e=await readdir(_0x458dd9,{'withFileTypes':!![]}),_0x19c092=_0x5a3d9e[_0xaaa9cb(0x10e)](_0x42dacd=>_0x42dacd['isDirectory']())[_0xaaa9cb(0x101)](_0x32a46f=>_0x32a46f['name']);if(_0x26f8b3[_0xaaa9cb(0x11f)](_0x19c092[_0xaaa9cb(0x136)],0x0))throw new Error(_0x26f8b3[_0xaaa9cb(0x121)](_0x26f8b3[_0xaaa9cb(0x108)],_0x26f8b3[_0xaaa9cb(0xfb)]));if(_0x19c092[_0xaaa9cb(0x136)]===0x1){const _0x41325f=_0x19c092[0x0];return console[_0xaaa9cb(0x124)]('Auto-detected\x20CI\x20profile:\x20'+_0x41325f),{'name':_0x41325f,'path':join(_0x458dd9,_0x41325f)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x19c092[_0xaaa9cb(0x131)](',\x20')+_0xaaa9cb(0xf7));}async function installPluginNonInteractive(){const _0x36cdff=_0x16ff,_0x3fa74d={'IddrW':function(_0x481d20,_0x2b67db){return _0x481d20(_0x2b67db);},'UXVko':_0x36cdff(0x13f),'ixCII':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','VHAFT':_0x36cdff(0x12d),'OYcJN':'✓\x20Marketplace\x20already\x20added','DpGBB':'marketplace','gFKfi':'ranger-testing/trailhead','ieojc':_0x36cdff(0xfe),'TbAFU':_0x36cdff(0x111),'RRCYY':'plugin','vSbfS':'install','wPsVU':'ranger@trailhead','onlWs':'--scope','XXLtt':'Failed\x20to\x20install\x20plugin:','ySBHY':_0x36cdff(0x117),'ufxLb':_0x36cdff(0xf9)},_0x262a88=await _0x3fa74d[_0x36cdff(0x12b)](isPluginInstalled,'ranger@trailhead');if(_0x262a88)return console['log'](_0x3fa74d[_0x36cdff(0xff)]),![];console['log'](_0x3fa74d[_0x36cdff(0xf4)]);const _0x424b0f=await isMarketplaceAdded(_0x3fa74d[_0x36cdff(0x105)]);let _0xcacc58=_0x424b0f;if(_0x424b0f)console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0x13d)]);else{const _0x3ee3a5=await _0x3fa74d['IddrW'](runClaudeCommand,[_0x36cdff(0x137),_0x3fa74d['DpGBB'],'add',_0x3fa74d['gFKfi']]);!_0x3ee3a5['success']?(console['error'](_0x3fa74d['ieojc'],_0x3ee3a5[_0x36cdff(0x139)]),console['log'](_0x3fa74d[_0x36cdff(0x135)])):_0xcacc58=!![];}if(_0xcacc58){const _0x332d03=await runClaudeCommand([_0x3fa74d[_0x36cdff(0x10d)],_0x3fa74d['vSbfS'],_0x3fa74d['wPsVU'],_0x3fa74d[_0x36cdff(0x113)],_0x36cdff(0x110)]);!_0x332d03[_0x36cdff(0x140)]?(console['error'](_0x3fa74d['XXLtt'],_0x332d03[_0x36cdff(0x139)]),console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0xfa)])):console['log'](_0x3fa74d[_0x36cdff(0x13c)]);}return!![];}export async function setupCi(_0x19ce0d,_0x4c1c59,_0x10bfea){const _0x415991=_0x16ff,_0x642f74={'wYtOK':_0x415991(0x119),'fmmtP':function(_0x16f84f,_0x16bae5){return _0x16f84f(_0x16bae5);},'UkAiS':function(_0xd70b64){return _0xd70b64();},'RXRsB':function(_0x36db1b,_0x142361){return _0x36db1b(_0x142361);},'cPpLW':function(_0x41d59,_0x3481f3,_0x182ea7){return _0x41d59(_0x3481f3,_0x182ea7);},'pebBx':'chromium','dKdLd':_0x415991(0x125),'HVzei':function(_0x5baa1c,_0x403e8f,_0x132bb1){return _0x5baa1c(_0x403e8f,_0x132bb1);},'UmRqV':_0x415991(0x120),'JVYUO':function(_0x39551b,_0x46cc58,_0x481a85){return _0x39551b(_0x46cc58,_0x481a85);},'cJdOB':'auth.json','NUBNA':_0x415991(0x104),'wzTSE':_0x415991(0x12e),'kJpPU':_0x415991(0x12f),'XZXZU':function(_0x2574d2,_0x563c42){return _0x2574d2 instanceof _0x563c42;},'VChAe':function(_0x30c34b,_0x4e9123){return _0x30c34b(_0x4e9123);},'TOnJF':_0x415991(0x13e),'rDXjd':_0x415991(0x10a)};console[_0x415991(0x124)](_0x415991(0x126)),_0x10bfea?.['trackPhaseStart'](_0x642f74['wYtOK']),await _0x642f74[_0x415991(0x132)](authenticate,_0x19ce0d),_0x10bfea?.[_0x415991(0x106)](_0x642f74[_0x415991(0x118)]),_0x10bfea?.['trackPhaseStart'](_0x415991(0x123));const {path:_0x1ce6ac,installed:_0x3fb084}=await _0x642f74[_0x415991(0xf3)](ensureRangerDir);await writeRangerGitignore(_0x1ce6ac);const _0x35ac06=join(_0x1ce6ac,'sessions');!_0x642f74[_0x415991(0x11c)](existsSync,_0x35ac06)&&await _0x642f74[_0x415991(0x13a)](mkdir,_0x35ac06,{'recursive':!![]});_0x10bfea?.['trackPhaseEnd'](_0x415991(0x123),{'installed':_0x3fb084}),_0x10bfea?.['trackPhaseStart'](_0x642f74['pebBx']);let _0x4953ff=![];_0x4c1c59?.[_0x415991(0x116)]?console[_0x415991(0x124)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x4953ff=await ensureChromium();_0x10bfea?.[_0x415991(0x106)](_0x415991(0x122),{'installed':_0x4953ff,'skipped':!!_0x4c1c59?.['skipChromium']}),_0x10bfea?.[_0x415991(0x11e)](_0x642f74['dKdLd']);const _0x1c80e7=await _0x642f74['fmmtP'](findCiProfile,_0x4c1c59?.['profile']);let _0xd5cd49=![];_0x4c1c59?.['baseUrl']&&(await mkdir(_0x1c80e7['path'],{'recursive':!![]}),await _0x642f74['HVzei'](saveSettings,_0x1c80e7['name'],{'baseUrl':_0x4c1c59[_0x415991(0x138)],'headless':!![]}),console[_0x415991(0x124)](_0x415991(0xfd)+_0x4c1c59[_0x415991(0x138)]),_0xd5cd49=!![]);const _0x42dbe5=join(_0x1c80e7[_0x415991(0xf6)],_0x642f74[_0x415991(0x11d)]);if(!existsSync(_0x42dbe5)&&!_0xd5cd49)throw new Error('CI\x20profile\x20\x22'+_0x1c80e7['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x500d61=_0x642f74[_0x415991(0x112)](join,_0x1c80e7['path'],_0x642f74[_0x415991(0x102)]),_0x2c9f83=join(_0x1c80e7['path'],_0x642f74['NUBNA']),_0x514a97=_0x642f74['fmmtP'](existsSync,_0x500d61),_0x4b0c1b=_0x642f74[_0x415991(0x11c)](existsSync,_0x2c9f83);if(_0x4b0c1b)try{const _0x2d5b4f=await getToken();if(!_0x2d5b4f)throw new Error(_0x642f74[_0x415991(0x109)]);const _0x42273e=await readFile(_0x2c9f83);_0x642f74[_0x415991(0x115)](decrypt,_0x42273e,_0x2d5b4f),console['log'](_0x642f74[_0x415991(0xf5)]);}catch(_0x2537fd){const _0x28ba59=_0x642f74[_0x415991(0x134)](_0x2537fd,Error)?_0x2537fd[_0x415991(0xfc)]:String(_0x2537fd);throw new Error(_0x415991(0x10c)+_0x1c80e7['name']+'\x22:\x20'+_0x28ba59);}else _0x514a97?console[_0x415991(0x124)](_0x415991(0x107)):console['log']('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x642f74['VChAe'](writeActiveProfileName,_0x1c80e7['name']),console[_0x415991(0x124)]('✓\x20Active\x20profile:\x20'+_0x1c80e7[_0x415991(0x114)]),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x125),{'profileName':_0x1c80e7[_0x415991(0x114)],'hasAuth':_0x514a97,'hasEncryptedAuth':_0x4b0c1b,'createdSettings':_0xd5cd49}),_0x10bfea?.['trackPhaseStart']('plugin');const _0x1184b0=await _0x642f74['UkAiS'](installPluginNonInteractive);_0x10bfea?.[_0x415991(0x106)]('plugin',{'installed':_0x1184b0}),_0x10bfea?.['trackPhaseStart'](_0x642f74['TOnJF']),await _0x642f74['fmmtP'](skillup,{'autoInstall':_0x415991(0x110)}),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x13e)),console[_0x415991(0x124)](_0x642f74['rDXjd']);}
|
|
1
|
+
function _0x29a7(){var _0x3b3a92=['93267IuNZXx','916eOxmzB','1755608oBeyaz','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','exit','2096633diLfgQ','197671GzinLA','14HJWnFO','1220PpObmG','2PzUseU','RrRpH','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','793404qqQiwW','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','280839vCFGPa','210SwgmwV'];_0x29a7=function(){return _0x3b3a92;};return _0x29a7();}function _0x1eaf(_0x57c11f,_0x1ef4de){_0x57c11f=_0x57c11f-0x88;var _0x29a7a3=_0x29a7();var _0x1eafda=_0x29a7a3[_0x57c11f];return _0x1eafda;}(function(_0x53974f,_0x2b4ce3){var _0x1697cd=_0x1eaf,_0x5b266f=_0x53974f();while(!![]){try{var _0x2cfcb3=-parseInt(_0x1697cd(0x91))/0x1*(-parseInt(_0x1697cd(0x94))/0x2)+-parseInt(_0x1697cd(0x89))/0x3+parseInt(_0x1697cd(0x8c))/0x4*(parseInt(_0x1697cd(0x93))/0x5)+-parseInt(_0x1697cd(0x97))/0x6*(parseInt(_0x1697cd(0x92))/0x7)+parseInt(_0x1697cd(0x8d))/0x8+parseInt(_0x1697cd(0x8b))/0x9*(parseInt(_0x1697cd(0x8a))/0xa)+-parseInt(_0x1697cd(0x90))/0xb;if(_0x2cfcb3===_0x2b4ce3)break;else _0x5b266f['push'](_0x5b266f['shift']());}catch(_0x438b74){_0x5b266f['push'](_0x5b266f['shift']());}}}(_0x29a7,0x22a71));export async function setupCi(_0x578302,_0xe365fb,_0xdf9073){var _0x144d0b=_0x1eaf,_0x196502={'RrRpH':function(_0x37626f,_0xf865a9){return _0x37626f+_0xf865a9;},'MwkpD':function(_0xc864fc,_0x50908e){return _0xc864fc+_0x50908e;},'eMSEo':function(_0x599efb,_0x4ba199){return _0x599efb+_0x4ba199;},'SKjFb':_0x144d0b(0x8e)};console['error'](_0x196502[_0x144d0b(0x95)](_0x196502['MwkpD'](_0x196502['eMSEo'](_0x196502['SKjFb'],'\x0a'),_0x144d0b(0x88))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+_0x144d0b(0x96),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x144d0b(0x8f)](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53bfda,_0x434e69){const _0x1ae76d=_0x1feb,_0x2f3cb3=_0x53bfda();while(!![]){try{const _0xbcd292=parseInt(_0x1ae76d(0x149))/0x1+parseInt(_0x1ae76d(0x131))/0x2+parseInt(_0x1ae76d(0x151))/0x3+-parseInt(_0x1ae76d(0x140))/0x4+parseInt(_0x1ae76d(0x12a))/0x5+parseInt(_0x1ae76d(0x144))/0x6*(-parseInt(_0x1ae76d(0x148))/0x7)+parseInt(_0x1ae76d(0x137))/0x8;if(_0xbcd292===_0x434e69)break;else _0x2f3cb3['push'](_0x2f3cb3['shift']());}catch(_0x184fac){_0x2f3cb3['push'](_0x2f3cb3['shift']());}}}(_0x5d70,0x87206));import{basename}from'path';import _0x26dc88 from'inquirer';function _0x1feb(_0x6e69f1,_0x167e75){_0x6e69f1=_0x6e69f1-0x12a;const _0x5d70be=_0x5d70();let _0x1feb9c=_0x5d70be[_0x6e69f1];return _0x1feb9c;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x5d70(){const _0x2519cb=['To\x20get\x20started:','This\x20project\x20only\x20(','autoInstall','prompt','373786JjVWWO','✓\x20Found\x20API\x20token','user','\x0a✅\x20Installed\x20','xugwN','Where\x20should\x20skills\x20be\x20installed?','9642392DbMlMa','log','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','To\x20use:','installLevel','DgNdB','mcIkv','QSQes','\x20--opencode','4124536ZwLUnm','opencode','claude','/skills/','3049962ilKSns','\x20\x202.\x20Run:\x20ranger\x20setup','uvwSB','cWGCz','14WBmDxI','274743uAIJep','NwtMx','XyKNv','stdout','KmgKp','xhHPF','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','suppressUsage','1546068WZBbxE','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','\x20successfully!\x0a','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','UihCJ','project-level','2094875LDhhFO','platform','pZiun'];_0x5d70=function(){return _0x2519cb;};return _0x5d70();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0xc53ae1={}){const _0x37bc91=_0x1feb,_0x369a43={'NwtMx':_0x37bc91(0x142),'uvwSB':function(_0x5af69f){return _0x5af69f();},'XnLzd':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','QSQes':_0x37bc91(0x12d),'XyKNv':_0x37bc91(0x154),'teuyu':_0x37bc91(0x141),'hqfQU':function(_0x46e912,_0x4de1c3){return _0x46e912===_0x4de1c3;},'KqAGd':_0x37bc91(0x132),'xugwN':function(_0x1928dd,_0x1fad8d){return _0x1928dd(_0x1fad8d);},'ExzTa':function(_0x104527,_0x4783da){return _0x104527===_0x4783da;},'gCYaZ':function(_0x2f735e){return _0x2f735e();},'CKXqO':_0x37bc91(0x136),'xhHPF':'user','mcIkv':'project','kpOFI':function(_0x478740){return _0x478740();},'dggGK':'\x0a📦\x20Installing\x20skills...\x0a','cWGCz':function(_0x659887,_0x56f727,_0x77a25){return _0x659887(_0x56f727,_0x77a25);},'KmgKp':_0x37bc91(0x14f),'OBHir':function(_0x1ebbcd,_0x41dee2){return _0x1ebbcd instanceof _0x41dee2;},'Vvrak':function(_0x44bb1b,_0x39d84e){return _0x44bb1b===_0x39d84e;},'wfguc':_0x37bc91(0x13a),'UihCJ':function(_0x5277f2,_0x219af1){return _0x5277f2===_0x219af1;},'pZiun':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','DgNdB':'\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!'};console[_0x37bc91(0x138)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x42628a=_0xc53ae1[_0x37bc91(0x12b)]??_0x369a43[_0x37bc91(0x14a)],_0x74c731=await _0x369a43[_0x37bc91(0x146)](getToken);if(!_0x74c731){console['log'](_0x369a43['XnLzd']),console['log'](_0x369a43[_0x37bc91(0x13e)]),console[_0x37bc91(0x138)](_0x369a43[_0x37bc91(0x14b)]),console[_0x37bc91(0x138)](_0x37bc91(0x145)+(_0x42628a===_0x369a43['teuyu']?'\x20--opencode':'')+'\x20<your-api-token>'),console[_0x37bc91(0x138)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x369a43['hqfQU'](_0x42628a,_0x37bc91(0x141))?_0x37bc91(0x13f):'')+'\x0a');return;}console[_0x37bc91(0x138)](_0x369a43['KqAGd']);const _0xa891e9=getProjectRoot(),_0x44a4da=_0x369a43[_0x37bc91(0x135)](basename,_0xa891e9),_0x164379=_0x369a43['ExzTa'](_0x42628a,_0x369a43['teuyu'])?getOpencodeConfigDir(_0x37bc91(0x133))+_0x37bc91(0x143):_0x369a43['gCYaZ'](getClaudeConfigDir)+'/skills/',_0x351705=_0x42628a===_0x369a43['teuyu']?_0xa891e9+'/.opencode/skills/':_0xa891e9+'/.claude/skills/',_0x2c0af1=process['stdin']['isTTY']&&process[_0x37bc91(0x14c)]['isTTY'];let _0x517b70;if(_0xc53ae1['autoInstall'])_0x517b70=_0xc53ae1[_0x37bc91(0x12f)];else{if(_0x2c0af1){const _0x45af7f=await _0x26dc88[_0x37bc91(0x130)]([{'type':'list','name':'installLevel','message':_0x369a43['CKXqO'],'choices':[{'name':'All\x20projects\x20('+_0x164379+')','value':_0x369a43[_0x37bc91(0x14e)]},{'name':_0x37bc91(0x12e)+_0x351705+')','value':_0x369a43[_0x37bc91(0x13d)]}]}]);_0x517b70=_0x45af7f[_0x37bc91(0x13b)];}else _0x517b70=_0x369a43[_0x37bc91(0x13d)],console['log'](_0x37bc91(0x152)+_0x351705+')');}let _0x31acbc=0x0;const _0x51ddc9=_0x369a43['kpOFI'](getCurrentVersion);console[_0x37bc91(0x138)](_0x369a43['dggGK']);try{const _0x37c1bb=await _0x369a43[_0x37bc91(0x147)](installSkill,'ranger',{'cliVersion':_0x51ddc9,'level':_0x517b70,'platform':_0x42628a});_0x37c1bb&&_0x31acbc++;}catch(_0x1e3eff){console['warn'](_0x369a43[_0x37bc91(0x14d)],_0x369a43['OBHir'](_0x1e3eff,Error)?_0x1e3eff['message']:_0x1e3eff);}if(_0x31acbc>0x0){const _0x4154ad=_0x369a43['Vvrak'](_0x517b70,_0x369a43[_0x37bc91(0x14e)])?'user-level':_0x37bc91(0x156);console['log'](_0x37bc91(0x134)+_0x31acbc+'\x20'+_0x4154ad+'\x20skill'+(_0x31acbc>0x1?'s':'')+_0x37bc91(0x153)),!_0xc53ae1[_0x37bc91(0x150)]&&(console['log'](_0x369a43['wfguc']),_0x369a43[_0x37bc91(0x155)](_0x42628a,'opencode')?console['log'](_0x369a43[_0x37bc91(0x12c)]):console['log'](_0x369a43[_0x37bc91(0x13c)]));}else console['log'](_0x37bc91(0x139));}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3cbded,_0x18f702){const _0x48e7f1=_0x34bd,_0x56b54c=_0x3cbded();while(!![]){try{const _0x25e0c1=parseInt(_0x48e7f1(0xb6))/0x1+parseInt(_0x48e7f1(0xe0))/0x2*(parseInt(_0x48e7f1(0xa5))/0x3)+-parseInt(_0x48e7f1(0xdf))/0x4+parseInt(_0x48e7f1(0xbb))/0x5+parseInt(_0x48e7f1(0xaf))/0x6*(parseInt(_0x48e7f1(0xcf))/0x7)+parseInt(_0x48e7f1(0xe2))/0x8*(-parseInt(_0x48e7f1(0x9a))/0x9)+-parseInt(_0x48e7f1(0xdd))/0xa*(parseInt(_0x48e7f1(0xd0))/0xb);if(_0x25e0c1===_0x18f702)break;else _0x56b54c['push'](_0x56b54c['shift']());}catch(_0x536256){_0x56b54c['push'](_0x56b54c['shift']());}}}(_0x5243,0xea9b8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x14a49 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x5243(){const _0x102791=['Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','skills','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','SAuXB','message','gJZQV','6RInzdt',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','voDvt','\x0aIn\x20Claude\x20Code,\x20run\x20','xbdli','error','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','1889832bfhEnS','git_check','platform','install','Abemy','1476370nWOAZK','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','xfbdL','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','AUhdt','url','skipChromium','yoKAZ','plugin','playwright@','✓\x20Already\x20authenticated\x20to\x20','BiLcw','BjdBA','No\x20git\x20repository\x20found','wantsProfile','stdin','✓\x20Authenticated\x20to\x20','skipAuth','paaIB','XuYRV','13372121diKrlL','1368037jmrjlQ','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','ranger','The\x20required\x20version\x20(','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','nbesD','npx','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','✓\x20.ranger/\x20directory\x20already\x20exists','✓\x20Local\x20profile\x20already\x20exists','qrJEk','opencode','ranger\x20profile\x20add\x20local','130SYjqAJ','log','6073620WlTuBr','67148mMtYBj','or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','256664CfSQbS','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FiVvv','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','trackPhaseStart','CvjmK','trackPhaseEnd','RhuWm','isTTY','ready','trackPhaseError','withDeps','Kidwe','rzRxt','scope','force','\x0a🚀\x20Ranger\x20Setup\x0a','organizationName','✓\x20Skipping\x20authentication\x20(--skip-auth)','chromium','uGdhf','confirm','aqApF','inherit','stdout','success','DQuZB','status','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','wKCyc','bzBWi','local','JXDys','207plWxrD','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipped','user','BWhYW','auth','TlcIl','prompt','\x0aInstalling\x20Chromium\x20browser...\x0a','djUHM','\x20install\x20chromium','66DjyLLz','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','\x20now?','UGoUt'];_0x5243=function(){return _0x102791;};return _0x5243();}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';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);function _0x34bd(_0x5b2730,_0x236302){_0x5b2730=_0x5b2730-0x85;const _0x524368=_0x5243();let _0x34bdc2=_0x524368[_0x5b2730];return _0x34bdc2;}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x49ad42=>'\x1b[1m'+_0x49ad42+'\x1b[0m';export function getPlaywrightVersion(){const _0x1d9ba5={'iSGlC':'playwright/package.json','VKSMG':function(_0x29e086,_0x30aeb6){return _0x29e086(_0x30aeb6);}};try{const _0x1394ff=require['resolve'](_0x1d9ba5['iSGlC']),_0xfce0bc=_0x1d9ba5['VKSMG'](require,_0x1394ff);return _0xfce0bc['version'];}catch{return null;}}export function installChromiumBinary(_0x5df785,_0x3ec58c=![]){const _0x387c45=_0x34bd,_0x4014c5={'LrdzZ':function(_0x596823,_0x36ec1b){return _0x596823===_0x36ec1b;},'Ylplu':'--with-deps','BBGMW':'chromium','yoKAZ':function(_0x2395fb,_0x318cbf,_0x299d22,_0x58ff78){return _0x2395fb(_0x318cbf,_0x299d22,_0x58ff78);},'Abemy':'ignore','eoMzf':_0x387c45(0x90),'RhuWm':function(_0x2314a3,_0x3db73b){return _0x2314a3===_0x3db73b;},'DQuZB':'win32'};return new Promise((_0x592807,_0x44b43f)=>{const _0xf07d38=_0x387c45,_0x58b44f=[_0xf07d38(0xc4)+_0x5df785,_0xf07d38(0xb9),..._0x3ec58c?[_0x4014c5['Ylplu']]:[],_0x4014c5['BBGMW']],_0xbc947c=_0x4014c5[_0xf07d38(0xc2)](spawn,_0xf07d38(0xd6),_0x58b44f,{'stdio':[_0x4014c5[_0xf07d38(0xba)],_0xf07d38(0x90),_0x4014c5['eoMzf']],'shell':_0x4014c5[_0xf07d38(0xea)](process[_0xf07d38(0xb8)],_0x4014c5[_0xf07d38(0x93)])});_0xbc947c['on']('close',_0x503383=>{_0x4014c5['LrdzZ'](_0x503383,0x0)?_0x592807():_0x44b43f(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x503383));}),_0xbc947c['on']('error',_0x2c0307=>{_0x44b43f(_0x2c0307);});});}export async function authenticate(_0x354002){const _0x4bf6b1=_0x34bd,_0x19d3ba={'NLSSX':function(_0x4d3807,_0x1c56f9){return _0x4d3807(_0x1c56f9);},'UGoUt':function(_0x55f57d,_0x559480){return _0x55f57d instanceof _0x559480;},'djUHM':'device_auth','snDRE':function(_0x127d29,_0x183671){return _0x127d29(_0x183671);},'BWhYW':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x354002){const _0xb52e49=await getToken();if(_0xb52e49){const _0x52976a=await _0x19d3ba['NLSSX'](getCurrentUser,_0xb52e49);if(_0x52976a[_0x4bf6b1(0x92)])return console['log'](_0x4bf6b1(0xc5)+_0x52976a['user'][_0x4bf6b1(0x8a)]),{'token':_0xb52e49,'method':'existing_token'};}try{_0x354002=await runDeviceAuthFlow();}catch(_0x240926){throw new Error('Authentication\x20failed:\x20'+(_0x19d3ba[_0x4bf6b1(0xa8)](_0x240926,Error)?_0x240926[_0x4bf6b1(0xad)]:_0x240926));}const _0x160a69=await getCurrentUser(_0x354002);if(!_0x160a69[_0x4bf6b1(0x92)])throw new Error(_0x4bf6b1(0xbc)+_0x160a69[_0x4bf6b1(0xb4)]);return console['log'](_0x4bf6b1(0xcb)+_0x160a69[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),{'token':_0x354002,'method':_0x19d3ba[_0x4bf6b1(0xa3)]};}console['log']('Validating\x20API\x20token...');const _0x4f8d5f=await _0x19d3ba['NLSSX'](getCurrentUser,_0x354002);if(!_0x4f8d5f[_0x4bf6b1(0x92)]){if(_0x4f8d5f[_0x4bf6b1(0x94)])throw new Error('Authentication\x20failed:\x20'+_0x4f8d5f[_0x4bf6b1(0xb4)]+_0x4bf6b1(0x95));else throw new Error(_0x4bf6b1(0x9b)+_0x4f8d5f['error']+_0x4bf6b1(0xe3));}return console['log'](_0x4bf6b1(0xcb)+_0x4f8d5f[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),await _0x19d3ba['snDRE'](storeToken,_0x354002),console['log'](process['env']['GITHUB_ENV']?_0x19d3ba[_0x4bf6b1(0x9e)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x354002,'method':'provided_token'};}export async function ensureRangerDir(_0x2067f7){const _0x9118e1=_0x34bd,_0x355c5d={'paaIB':function(_0x2d7d4f){return _0x2d7d4f();},'wKCyc':function(_0x22f3d7,_0x4bebb9,_0x364573){return _0x22f3d7(_0x4bebb9,_0x364573);},'ASFGe':'.ranger','BjdBA':function(_0x50fa9b){return _0x50fa9b();},'TlcIl':'✓\x20Created\x20.ranger/\x20directory'};let _0x592bfd;if(_0x2067f7==='user')_0x592bfd=_0x355c5d[_0x9118e1(0xcd)](getRangerHomeDir);else{const _0x4df03=_0x355c5d['paaIB'](findGitRoot);_0x592bfd=_0x4df03?_0x355c5d[_0x9118e1(0x96)](join,_0x4df03,_0x355c5d['ASFGe']):_0x355c5d[_0x9118e1(0xc7)](getRangerDir);}return!existsSync(_0x592bfd)?(await _0x355c5d[_0x9118e1(0x96)](mkdir,_0x592bfd,{'recursive':!![]}),console[_0x9118e1(0xde)](_0x355c5d[_0x9118e1(0xa0)]),{'path':_0x592bfd,'installed':!![]}):(console['log'](_0x9118e1(0xd8)),{'path':_0x592bfd,'installed':![]});}export async function ensureChromium(_0xfb96a8=![]){const _0x141526=_0x34bd,_0x294d51={'BMBsf':function(_0x2088da,_0x450373){return _0x2088da(_0x450373);},'xfbdL':'✓\x20Playwright\x20Chromium\x20browser\x20found','XfIQs':function(_0x55f170){return _0x55f170();},'avNdZ':_0x141526(0xa2),'bzBWi':_0x141526(0xbe),'IIuRy':_0x141526(0xb5),'tsNGm':function(_0x19d409,_0x38fcab){return _0x19d409 instanceof _0x38fcab;},'JXDys':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','YDDnc':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0xfae1f2=![];try{const _0xf936b0=chromium['executablePath']();_0xfae1f2=_0x294d51['BMBsf'](existsSync,_0xf936b0);}catch{_0xfae1f2=![];}if(_0xfae1f2)return console['log'](_0x294d51[_0x141526(0xbd)]),![];const _0x530f22=_0x294d51['XfIQs'](getPlaywrightVersion),_0x203450=_0x530f22??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1e3a2d=!_0x530f22,_0x18404a=process[_0x141526(0xca)][_0x141526(0xeb)]&&process[_0x141526(0x91)]['isTTY'];let _0x1ce09b=!![];if(_0x18404a){const {install:_0x2ca713}=await _0x14a49[_0x141526(0xa1)]([{'type':'confirm','name':'install','message':_0x1e3a2d?_0x141526(0xa9)+_0x203450+_0x141526(0xa7):_0x141526(0xd3)+_0x203450+_0x141526(0xb0),'default':!![]}]);_0x1ce09b=_0x2ca713;}else console[_0x141526(0xde)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x203450+(_0x1e3a2d?'\x20(fallback\x20version)':'')+'...');if(_0x1ce09b){console['log'](_0x294d51['avNdZ']);try{await installChromiumBinary(_0x203450,_0xfb96a8),console[_0x141526(0xde)](_0x294d51[_0x141526(0x97)]);}catch(_0x408911){console['error'](_0x294d51['IIuRy'],_0x294d51['tsNGm'](_0x408911,Error)?_0x408911['message']:_0x408911),console['log'](_0x294d51[_0x141526(0x99)]),console[_0x141526(0xde)]('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));}}else console['log'](_0x294d51['YDDnc']),console[_0x141526(0xde)](_0x141526(0xab)),console['log']('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));return!![];}export async function writeRangerGitignore(_0x5040c5){const _0x25963c={'vWfEq':'.gitignore','nWBlX':'✓\x20Created\x20.ranger/.gitignore'},_0x4166ea=join(_0x5040c5,_0x25963c['vWfEq']),_0x3393f5='\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(_0x4166ea,_0x3393f5),console['log'](_0x25963c['nWBlX']);}function printProfileSetupLaterInstructions(){const _0x16be80=_0x34bd,_0x578865={'Tcogw':_0x16be80(0xdc),'FrzLC':_0x16be80(0xd4)};console['log'](_0x16be80(0xd7)),console[_0x16be80(0xde)]('\x20\x20'+bold(_0x578865['Tcogw'])),console[_0x16be80(0xde)](_0x578865['FrzLC']);}export async function ensureLocalEnv(_0xb969fa,_0x2322ef){const _0x42cb89=_0x34bd,_0x1b21ae={'smnZA':function(_0x82cc94){return _0x82cc94();},'xbKsb':function(_0x16ced6,_0x583d7,_0x2921e9){return _0x16ced6(_0x583d7,_0x2921e9);},'iwFUB':_0x42cb89(0x98),'yZRTe':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','OrNcc':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','kCXst':'use\x20until\x20the\x20session\x20expires.\x0a','hsPjt':_0x42cb89(0x8e),'wHHfA':_0x42cb89(0xc9),'uGdhf':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','xbdli':function(_0x5969f1){return _0x5969f1();}};if(!_0x1b21ae['smnZA'](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};const _0x245acc=_0xb969fa?.['scope']===_0x42cb89(0x9d)?_0x1b21ae['smnZA'](getRangerHomeDir):undefined;if(_0x1b21ae['xbKsb'](findExistingEnv,_0x42cb89(0x98),{'locations':[_0x1b21ae['iwFUB']],'rangerDir':_0x245acc}))return console['log'](_0x42cb89(0xd9)),{'ready':!![],'skipped':![]};const _0x339aa8=process[_0x42cb89(0xca)][_0x42cb89(0xeb)]&&process['stdout']['isTTY'];if(_0x339aa8&&!_0xb969fa?.['url']){console[_0x42cb89(0xde)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x42cb89(0xde)](_0x1b21ae['yZRTe']),console['log'](_0x1b21ae['OrNcc']),console[_0x42cb89(0xde)](_0x1b21ae['kCXst']),console[_0x42cb89(0xde)](_0x42cb89(0xa6));const {wantsProfile:_0x34d828}=await _0x14a49[_0x42cb89(0xa1)]([{'type':_0x1b21ae['hsPjt'],'name':_0x1b21ae['wHHfA'],'message':_0x1b21ae[_0x42cb89(0x8d)],'default':!![]}]);if(!_0x34d828)return _0x1b21ae[_0x42cb89(0xb3)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x42cb89(0x98),{'url':_0xb969fa?.[_0x42cb89(0xc0)],'force':_0xb969fa?.[_0x42cb89(0x88)],'allowInsecureLocalhost':_0xb969fa?.['allowInsecureLocalhost'],'scope':_0xb969fa?.['scope']},_0x2322ef),{'ready':!![],'skipped':![]};}catch(_0x55cd77){return console[_0x42cb89(0xb4)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x55cd77 instanceof Error?_0x55cd77[_0x42cb89(0xad)]:_0x55cd77),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x30c640,_0x4d267e,_0x50fdb0){const _0x16bb11=_0x34bd,_0x15f6ac={'zlaUY':_0x16bb11(0x89),'FiVvv':'user','pLpHA':function(_0x5f22b2,_0x3b897c){return _0x5f22b2===_0x3b897c;},'voDvt':'git_check','AUhdt':_0x16bb11(0xc8),'rzRxt':function(_0x4529b3,_0x2b4c84){return _0x4529b3+_0x2b4c84;},'pQAMB':_0x16bb11(0xe1),'PLBOV':function(_0x416cbb,_0x171e50){return _0x416cbb(_0x171e50);},'SAuXB':function(_0x554a8d,_0x23b179){return _0x554a8d(_0x23b179);},'BiLcw':_0x16bb11(0x9f),'iAmxY':_0x16bb11(0x8c),'CvjmK':_0x16bb11(0xc3),'uxQKJ':_0x16bb11(0xd2),'XuYRV':'skills','Kidwe':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','SGObZ':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','luwYr':function(_0x26d471,_0x4c5883){return _0x26d471(_0x4c5883);},'qrJEk':'profile','aqApF':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','FwcAE':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','PWyUi':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','nbesD':function(_0x5e4d0c,_0x755917){return _0x5e4d0c(_0x755917);},'gJZQV':'/ranger:enable','aulTv':function(_0x5a1237,_0x58789f){return _0x5a1237+_0x58789f;}};console[_0x16bb11(0xde)](_0x15f6ac['zlaUY']);const _0x410b12=process['stdin'][_0x16bb11(0xeb)]&&process[_0x16bb11(0x91)]['isTTY'];!_0x410b12&&!_0x4d267e?.['scope']&&(console['log']('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x4d267e={..._0x4d267e,'scope':_0x15f6ac[_0x16bb11(0xe5)]});const _0x47692d=_0x15f6ac['pLpHA'](_0x4d267e?.['scope'],_0x15f6ac[_0x16bb11(0xe5)]);_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xb1)]);const _0x1ce205=findGitRoot();if(!_0x1ce205&&!_0x47692d){await _0x50fdb0?.[_0x16bb11(0xed)]('git_check',new Error(_0x15f6ac[_0x16bb11(0xbf)]));throw new Error(_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xd1),_0x15f6ac['pQAMB']));}_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xb7));const _0x3aba9e=!existsSync(getRangerDir()),{path:_0x258783}=await _0x15f6ac['PLBOV'](ensureRangerDir,_0x47692d?_0x15f6ac['FiVvv']:undefined);if(_0x4d267e?.[_0x16bb11(0xcc)])console['log'](_0x16bb11(0x8b)),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0x9f),{'isFirstRun':_0x3aba9e,'method':_0x16bb11(0x9c)});else{_0x50fdb0?.['trackPhaseStart'](_0x16bb11(0x9f));const _0x39dce8=await _0x15f6ac[_0x16bb11(0xac)](authenticate,_0x30c640);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac[_0x16bb11(0xc6)],{'isFirstRun':_0x3aba9e,'method':_0x39dce8['method']});}_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['iAmxY']);_0x4d267e?.[_0x16bb11(0xc1)]?console[_0x16bb11(0xde)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x4d267e?.[_0x16bb11(0xee)]);_0x50fdb0?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3aba9e,'skipped':!!_0x4d267e?.[_0x16bb11(0xc1)]});!_0x47692d&&await _0x15f6ac['SAuXB'](writeRangerGitignore,_0x258783);console[_0x16bb11(0xde)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x255637=_0x4d267e?.[_0x16bb11(0x87)],_0x21fbbc=_0x4d267e?.[_0x16bb11(0xdb)]??![];let _0x326a36=null;_0x21fbbc?(_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['CvjmK']),_0x326a36=await _0x15f6ac['PLBOV'](ensureOpencodePluginConfig,_0x255637),_0x50fdb0?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3aba9e,'opencode':!![]})):(_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xe8)]),await ensureClaudePlugin(_0x255637),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac['CvjmK'],{'isFirstRun':_0x3aba9e}));if(_0x21fbbc&&_0x326a36){_0x50fdb0?.['trackPhaseStart']('skills');try{await installSkill(_0x15f6ac['uxQKJ'],{'level':_0x326a36[_0x16bb11(0x87)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![]});}catch(_0x8e25f3){console['warn'](_0x15f6ac[_0x16bb11(0x85)],_0x8e25f3 instanceof Error?_0x8e25f3[_0x16bb11(0xad)]:_0x8e25f3),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![],'failed':!![]});}}else _0x50fdb0?.[_0x16bb11(0xe7)]('skills'),await _0x15f6ac['SAuXB'](ensureClaudeSkills,_0x255637),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xaa),{'isFirstRun':_0x3aba9e});if(_0x4d267e?.['skipAuth'])console[_0x16bb11(0xde)](_0x16bb11(0xe6));else{if(!_0x410b12&&!_0x4d267e?.[_0x16bb11(0xc0)])console[_0x16bb11(0xde)](_0x15f6ac['SGObZ']),console['log']('\x20\x20'+_0x15f6ac['luwYr'](bold,_0x16bb11(0xdc))+'\x0a');else{_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xda)]);const _0x15927b=await ensureLocalEnv({'url':_0x4d267e?.['url'],'force':_0x4d267e?.[_0x16bb11(0x88)],'allowInsecureLocalhost':_0x4d267e?.['allowInsecureLocalhost'],'scope':_0x4d267e?.['scope']==='user'?_0x15f6ac[_0x16bb11(0xe5)]:undefined},_0x50fdb0);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac['qrJEk'],{'isFirstRun':_0x3aba9e,'profileReady':_0x15927b['ready'],'userSkipped':_0x15927b[_0x16bb11(0x9c)]}),_0x15927b[_0x16bb11(0xec)]&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}}if(_0x21fbbc)console[_0x16bb11(0xde)](_0x15f6ac[_0x16bb11(0x8f)]),console[_0x16bb11(0xde)](_0x15f6ac['FwcAE']),console[_0x16bb11(0xde)](_0x15f6ac['PWyUi']),console[_0x16bb11(0xde)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x207266=_0x15f6ac[_0x16bb11(0xd5)](bold,_0x15f6ac[_0x16bb11(0xae)]);console[_0x16bb11(0xde)](_0x15f6ac['aulTv'](_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xb2)+_0x207266+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0x16bb11(0xe4),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
|
|
1
|
+
const _0x3ec517=_0x14a3;(function(_0xac4843,_0x383870){const _0x4c7e9d=_0x14a3,_0x48501f=_0xac4843();while(!![]){try{const _0x23e3e9=-parseInt(_0x4c7e9d(0x10a))/0x1*(-parseInt(_0x4c7e9d(0xf6))/0x2)+-parseInt(_0x4c7e9d(0xca))/0x3*(parseInt(_0x4c7e9d(0xe5))/0x4)+parseInt(_0x4c7e9d(0x106))/0x5+-parseInt(_0x4c7e9d(0x11c))/0x6+parseInt(_0x4c7e9d(0xd1))/0x7*(-parseInt(_0x4c7e9d(0x126))/0x8)+-parseInt(_0x4c7e9d(0xdf))/0x9+parseInt(_0x4c7e9d(0xf4))/0xa*(parseInt(_0x4c7e9d(0xd9))/0xb);if(_0x23e3e9===_0x383870)break;else _0x48501f['push'](_0x48501f['shift']());}catch(_0xea984c){_0x48501f['push'](_0x48501f['shift']());}}}(_0x22b6,0x36dc0));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2c39e5 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';function _0x22b6(){const _0xc90e5=['\x0aTo\x20verify\x20with\x20a\x20browser,\x20set\x20','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','profile','KyKJh','\x0aIn\x20Claude\x20Code,\x20run\x20','GFxpM','RANGER_TEST_USERNAME','NXiGQ','allowInsecureLocalhost','DOnNb','executablePath','10eXdWVw','close','34xdkTjE','\x20\x20(or\x20use\x20','KPGjf','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x20(fallback\x20version)','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','isTTY','MMKUu','error','playwright@','nTNAN','skipChromium','force','url','trackPhaseStart','\x20\x20npx\x20playwright@','1462675nKvjDz','✓\x20Created\x20~/.ranger/\x20directory','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','MMvfw','8709jpmHgz','scope','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Exported\x20credentials\x20for\x20CI','Validating\x20API\x20token...','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','SLNcq','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','KuDOq','prompt','NJvWy','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','.gitignore','chromium','trackPhaseEnd','plugin','✓\x20Created\x20.ranger/.gitignore','(and\x20','948288flbZAc','QGUtw','NvOXC','inherit','skipped','\x1b[1m','AMTKL','log','ranger','ledLC','174904sVKaSH','dLXiz','jBbXs','kcTOK','existing_token','auth','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','RmDUM','user','The\x20required\x20version\x20(','1.58.2','hJpfh','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','593682bKpaWM','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','success','LwFSy','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','skills','✓\x20Playwright\x20Chromium\x20browser\x20found','56EhcVAc','Ydtlc','--with-deps','install','/ranger:enable','skipAuth','\x20install\x20chromium','PmWPf','7215934oFvFuW','RANGER_TEST_PASSWORD','hgudP','✓\x20Authenticated\x20to\x20','SkbdT','NyLur','1288242eWPdLq','ranger\x20profile\x20add','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','playwright/package.json','AfxxC','Authentication\x20failed:\x20','8yJieul','organizationName','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','local'];_0x22b6=function(){return _0xc90e5;};return _0x22b6();}import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x3ec517(0x130);const bold=_0xdf807d=>_0x3ec517(0x121)+_0xdf807d+'\x1b[0m';export function getPlaywrightVersion(){const _0x5e478d=_0x3ec517,_0x4aa777={'SQBNM':_0x5e478d(0xe2),'fazMp':function(_0x4d138e,_0x4a5320){return _0x4d138e(_0x4a5320);}};try{const _0x339331=require['resolve'](_0x4aa777['SQBNM']),_0x2ebbea=_0x4aa777['fazMp'](require,_0x339331);return _0x2ebbea['version'];}catch{return null;}}export function installChromiumBinary(_0x4297c1,_0x1aafc2=![]){const _0x174e88=_0x3ec517,_0x9292e7={'EFkxn':_0x174e88(0xd3),'KyKJh':function(_0x5f0741,_0x300fac,_0x4b91fd,_0x389e05){return _0x5f0741(_0x300fac,_0x4b91fd,_0x389e05);},'MMvfw':'npx','NvOXC':'ignore','QGUtw':function(_0x57edb5,_0x860514){return _0x57edb5===_0x860514;}};return new Promise((_0x1e30dd,_0x2f8308)=>{const _0x1db54e=_0x174e88,_0x227752={'bxcTz':function(_0x247a29,_0x456d70){return _0x247a29(_0x456d70);}},_0x427a85=[_0x1db54e(0xff)+_0x4297c1,_0x1db54e(0xd4),..._0x1aafc2?[_0x9292e7['EFkxn']]:[],'chromium'],_0x38b004=_0x9292e7[_0x1db54e(0xec)](spawn,_0x9292e7[_0x1db54e(0x109)],_0x427a85,{'stdio':[_0x9292e7[_0x1db54e(0x11e)],'inherit',_0x1db54e(0x11f)],'shell':_0x9292e7[_0x1db54e(0x11d)](process['platform'],'win32')});_0x38b004['on'](_0x1db54e(0xf5),_0x40f4f1=>{_0x40f4f1===0x0?_0x1e30dd():_0x2f8308(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x40f4f1));}),_0x38b004['on'](_0x1db54e(0xfe),_0x20adf8=>{_0x227752['bxcTz'](_0x2f8308,_0x20adf8);});});}export async function authenticate(_0x4e593e){const _0x580a96=_0x3ec517,_0x21e163={'tzhup':function(_0x35cb40){return _0x35cb40();},'mGDak':_0x580a96(0x10e),'nTNAN':function(_0x562e71,_0x102ee2){return _0x562e71(_0x102ee2);},'Ydtlc':'provided_token'};if(!_0x4e593e){const _0x7a2360=await _0x21e163['tzhup'](getToken);if(_0x7a2360){const _0x132ce8=await getCurrentUser(_0x7a2360);if(_0x132ce8[_0x580a96(0xcc)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x132ce8[_0x580a96(0x12e)][_0x580a96(0xe6)]),{'token':_0x7a2360,'method':_0x580a96(0x12a)};}try{_0x4e593e=await runDeviceAuthFlow();}catch(_0x408334){throw new Error(_0x580a96(0xe4)+(_0x408334 instanceof Error?_0x408334['message']:_0x408334));}const _0x3a07c7=await getCurrentUser(_0x4e593e);if(!_0x3a07c7[_0x580a96(0xcc)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3a07c7[_0x580a96(0xfe)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x3a07c7[_0x580a96(0x12e)]['organizationName']),{'token':_0x4e593e,'method':'device_auth'};}console[_0x580a96(0x123)](_0x21e163['mGDak']);const _0x140934=await _0x21e163[_0x580a96(0x100)](getCurrentUser,_0x4e593e);if(!_0x140934['success']){if(_0x140934['status'])throw new Error('Authentication\x20failed:\x20'+_0x140934['error']+_0x580a96(0x12c));else throw new Error(_0x580a96(0x111)+_0x140934['error']+_0x580a96(0xe1));}return console['log'](_0x580a96(0xdc)+_0x140934[_0x580a96(0x12e)]['organizationName']),await storeToken(_0x4e593e),console['log'](process['env']['GITHUB_ENV']?_0x580a96(0x10d):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x4e593e,'method':_0x21e163[_0x580a96(0xd2)]};}export async function ensureRangerDir(_0x49d4d6){const _0x2f1096=_0x3ec517,_0x5a5c3a={'WDBnf':function(_0x541d20,_0x3a826c){return _0x541d20(_0x3a826c);},'TWnvw':_0x2f1096(0x107),'KPGjf':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x49d4d6;const _0x12ce52=getRangerHomeDir();return!_0x5a5c3a['WDBnf'](existsSync,_0x12ce52)?(await mkdir(_0x12ce52,{'recursive':!![]}),console[_0x2f1096(0x123)](_0x5a5c3a['TWnvw']),{'path':_0x12ce52,'installed':!![]}):(console[_0x2f1096(0x123)](_0x5a5c3a[_0x2f1096(0xf8)]),{'path':_0x12ce52,'installed':![]});}function _0x14a3(_0x56f51d,_0x1e0bd0){_0x56f51d=_0x56f51d-0xc9;const _0x22b691=_0x22b6();let _0x14a36e=_0x22b691[_0x56f51d];return _0x14a36e;}export async function ensureChromium(_0x972cb7=![]){const _0x585726=_0x3ec517,_0x5bea85={'JhJDO':function(_0xee6ad9,_0x373c97){return _0xee6ad9(_0x373c97);},'UHGSi':function(_0x72d4a1){return _0x72d4a1();},'kcTOK':function(_0x180274,_0x2279b0){return _0x180274??_0x2279b0;},'YBHAK':'confirm','RzrKo':_0x585726(0xfa),'RNHlt':_0x585726(0xe7),'nfUHz':function(_0x1ce03,_0x3e153d){return _0x1ce03 instanceof _0x3e153d;},'OxHFI':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','dLXiz':_0x585726(0xf9),'RmDUM':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x3aa794=![];try{const _0x26068f=chromium[_0x585726(0xf3)]();_0x3aa794=_0x5bea85['JhJDO'](existsSync,_0x26068f);}catch{_0x3aa794=![];}if(_0x3aa794)return console[_0x585726(0x123)](_0x585726(0xd0)),![];const _0x4e7e1e=_0x5bea85['UHGSi'](getPlaywrightVersion),_0x2e0250=_0x5bea85[_0x585726(0x129)](_0x4e7e1e,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x155f7f=!_0x4e7e1e,_0x5bc08c=process['stdin'][_0x585726(0xfc)]&&process['stdout']['isTTY'];let _0x5876f9=!![];if(_0x5bc08c){const {install:_0x495b87}=await _0x2c39e5[_0x585726(0x113)]([{'type':_0x5bea85['YBHAK'],'name':'install','message':_0x155f7f?_0x585726(0x108)+_0x2e0250+'\x20now?':_0x585726(0x12f)+_0x2e0250+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x5876f9=_0x495b87;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x2e0250+(_0x155f7f?_0x5bea85['RzrKo']:'')+'...');if(_0x5876f9){console[_0x585726(0x123)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x2e0250,_0x972cb7),console[_0x585726(0x123)](_0x5bea85['RNHlt']);}catch(_0x11b71f){console[_0x585726(0xfe)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x5bea85['nfUHz'](_0x11b71f,Error)?_0x11b71f['message']:_0x11b71f),console['log'](_0x5bea85['OxHFI']),console[_0x585726(0x123)](_0x585726(0x105)+_0x2e0250+'\x20install\x20chromium');}}else console['log'](_0x5bea85[_0x585726(0x127)]),console[_0x585726(0x123)](_0x5bea85[_0x585726(0x12d)]),console[_0x585726(0x123)](_0x585726(0x105)+_0x2e0250+_0x585726(0xd7));return!![];}export async function writeRangerGitignore(_0xc0a4d3){const _0x5a1cc6=_0x3ec517,_0x48382b={'hgudP':_0x5a1cc6(0x116),'xvxJZ':_0x5a1cc6(0x11a)},_0x13248d=join(_0xc0a4d3,_0x48382b[_0x5a1cc6(0xdb)]),_0x221a44='\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(_0x13248d,_0x221a44),console[_0x5a1cc6(0x123)](_0x48382b['xvxJZ']);}export async function ensureLocalEnv(_0x32dcb2,_0x2cba4f){const _0x2201dd=_0x3ec517,_0x40147a={'WpccE':function(_0x54fd9c){return _0x54fd9c();},'OoKpW':function(_0x487e89,_0x1de3a3){return _0x487e89!==_0x1de3a3;},'MydFO':_0x2201dd(0x12e),'DdHET':function(_0x41cd8f,_0x34b6b9,_0x5bedcc){return _0x41cd8f(_0x34b6b9,_0x5bedcc);},'XSVDp':_0x2201dd(0xe8),'NyLur':'✓\x20Local\x20profile\x20already\x20exists'};if(!_0x40147a['WpccE'](findGitRoot)&&_0x40147a['OoKpW'](_0x32dcb2?.[_0x2201dd(0x10b)],_0x2201dd(0x12e)))return console[_0x2201dd(0x123)](_0x2201dd(0x10f)),{'ready':![],'skipped':!![]};const _0x43c39c=_0x32dcb2?.['scope']===_0x40147a['MydFO']?getRangerHomeDir():undefined;if(_0x40147a['DdHET'](findExistingEnv,_0x40147a['XSVDp'],{'locations':[_0x2201dd(0xe8)],'rangerDir':_0x43c39c}))return console['log'](_0x40147a[_0x2201dd(0xde)]),{'ready':!![],'skipped':![]};try{return await addEnv(_0x2201dd(0xe8),{'url':_0x32dcb2?.[_0x2201dd(0x103)],'force':_0x32dcb2?.[_0x2201dd(0x102)],'allowInsecureLocalhost':_0x32dcb2?.[_0x2201dd(0xf1)],'scope':_0x32dcb2?.['scope']},_0x2cba4f),{'ready':!![],'skipped':![]};}catch(_0x111570){return console[_0x2201dd(0xfe)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x111570 instanceof Error?_0x111570['message']:_0x111570),{'ready':![],'skipped':![]};}}export async function start(_0x2c4fca,_0x545567,_0x25eed0){const _0x11d5f3=_0x3ec517,_0x587a16={'ledLC':'\x0a🚀\x20Ranger\x20Setup\x0a','PmWPf':function(_0x5f065d,_0x241ac0){return _0x5f065d!==_0x241ac0;},'bHqDp':'user','AMTKL':function(_0x17a94f,_0x20b1ee){return _0x17a94f+_0x20b1ee;},'LqjgP':function(_0x59fa37){return _0x59fa37();},'hJpfh':function(_0x2756f2,_0x436290){return _0x2756f2(_0x436290);},'COUUv':'✓\x20Skipping\x20authentication\x20(--skip-auth)','UHqIJ':'auth','fIWST':function(_0x425a02,_0x518e8a){return _0x425a02(_0x518e8a);},'MMKUu':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','SLNcq':'plugin','LVkEO':function(_0x3d930e,_0x855d4){return _0x3d930e&&_0x855d4;},'NJvWy':function(_0x703b47,_0x281978,_0x10f563){return _0x703b47(_0x281978,_0x10f563);},'jBbXs':_0x11d5f3(0x124),'Hbpkg':function(_0xf64a9b){return _0xf64a9b();},'GFxpM':'skills','QAcBe':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','AfxxC':_0x11d5f3(0xeb),'EDHkE':_0x11d5f3(0xef),'hVIEo':function(_0x33d7fd,_0x2f4d4a){return _0x33d7fd(_0x2f4d4a);},'LwFSy':_0x11d5f3(0xda),'SkbdT':_0x11d5f3(0xe0),'KuDOq':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','eJSoU':_0x11d5f3(0xea),'NXiGQ':_0x11d5f3(0xd5),'DOnNb':function(_0x21f5eb,_0x1d376e){return _0x21f5eb+_0x1d376e;},'PPPKe':function(_0x4a8aef,_0x376f77){return _0x4a8aef+_0x376f77;}};console['log'](_0x587a16[_0x11d5f3(0x125)]);_0x545567?.[_0x11d5f3(0x10b)]!==undefined&&_0x587a16[_0x11d5f3(0xd8)](_0x545567[_0x11d5f3(0x10b)],_0x587a16['bHqDp'])&&(console['error'](_0x587a16[_0x11d5f3(0x122)]('ranger\x20setup\x20--scope='+String(_0x545567[_0x11d5f3(0x10b)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x11d5f3(0xc9),_0x11d5f3(0xcb))),process['exit'](0x1));_0x545567={..._0x545567,'scope':_0x11d5f3(0x12e)};const _0x583a76=!existsSync(_0x587a16['LqjgP'](getRangerHomeDir));await _0x587a16['hJpfh'](ensureRangerDir,_0x11d5f3(0x12e));if(_0x545567?.[_0x11d5f3(0xd6)])console[_0x11d5f3(0x123)](_0x587a16['COUUv']),_0x25eed0?.[_0x11d5f3(0x118)](_0x11d5f3(0x12b),{'isFirstRun':_0x583a76,'method':'skipped'});else{_0x25eed0?.[_0x11d5f3(0x104)](_0x587a16['UHqIJ']);const _0x5c3df8=await _0x587a16['fIWST'](authenticate,_0x2c4fca);_0x25eed0?.['trackPhaseEnd']('auth',{'isFirstRun':_0x583a76,'method':_0x5c3df8['method']});}_0x25eed0?.['trackPhaseStart']('chromium');_0x545567?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x545567?.['withDeps']);_0x25eed0?.['trackPhaseEnd'](_0x11d5f3(0x117),{'isFirstRun':_0x583a76,'skipped':!!_0x545567?.[_0x11d5f3(0x101)]}),console[_0x11d5f3(0x123)](_0x587a16[_0x11d5f3(0xfd)]);const _0x58202d=_0x545567?.[_0x11d5f3(0x10b)],_0x24fb50=_0x545567?.['opencode']??![];let _0x5bd27a=null;_0x24fb50?(_0x25eed0?.[_0x11d5f3(0x104)](_0x587a16[_0x11d5f3(0x110)]),_0x5bd27a=await _0x587a16['hJpfh'](ensureOpencodePluginConfig,_0x58202d),_0x25eed0?.[_0x11d5f3(0x118)](_0x587a16[_0x11d5f3(0x110)],{'isFirstRun':_0x583a76,'opencode':!![]})):(_0x25eed0?.[_0x11d5f3(0x104)](_0x11d5f3(0x119)),await ensureClaudePlugin(_0x58202d),_0x25eed0?.[_0x11d5f3(0x118)](_0x587a16['SLNcq'],{'isFirstRun':_0x583a76}));if(_0x587a16['LVkEO'](_0x24fb50,_0x5bd27a)){_0x25eed0?.[_0x11d5f3(0x104)]('skills');try{await _0x587a16[_0x11d5f3(0x114)](installSkill,_0x587a16[_0x11d5f3(0x128)],{'level':_0x5bd27a['scope'],'cliVersion':_0x587a16['Hbpkg'](getCurrentVersion),'platform':'opencode'}),_0x25eed0?.['trackPhaseEnd'](_0x11d5f3(0xcf),{'isFirstRun':_0x583a76,'opencode':!![]});}catch(_0x4bd365){console['warn'](_0x11d5f3(0xfb),_0x4bd365 instanceof Error?_0x4bd365['message']:_0x4bd365),_0x25eed0?.[_0x11d5f3(0x118)]('skills',{'isFirstRun':_0x583a76,'opencode':!![],'failed':!![]});}}else _0x25eed0?.[_0x11d5f3(0x104)](_0x587a16[_0x11d5f3(0xee)]),await _0x587a16[_0x11d5f3(0x131)](ensureClaudeSkills,_0x58202d),_0x25eed0?.[_0x11d5f3(0x118)](_0x587a16[_0x11d5f3(0xee)],{'isFirstRun':_0x583a76});if(_0x545567?.['skipAuth'])console['log'](_0x587a16['QAcBe']);else{if(_0x545567?.['url']){_0x25eed0?.[_0x11d5f3(0x104)](_0x587a16[_0x11d5f3(0xe3)]);const _0x5790e0=await ensureLocalEnv({'url':_0x545567['url'],'force':_0x545567?.[_0x11d5f3(0x102)],'allowInsecureLocalhost':_0x545567?.['allowInsecureLocalhost'],'scope':_0x11d5f3(0x12e)},_0x25eed0);_0x25eed0?.['trackPhaseEnd']('profile',{'isFirstRun':_0x583a76,'profileReady':_0x5790e0['ready'],'userSkipped':_0x5790e0[_0x11d5f3(0x120)]});}else console['log'](_0x587a16['AMTKL'](_0x587a16['AMTKL'](_0x587a16['AMTKL'](_0x11d5f3(0xe9)+bold(_0x587a16['EDHkE'])+'\x20',_0x11d5f3(0x11b)+_0x587a16['hVIEo'](bold,_0x587a16[_0x11d5f3(0xcd)])+'\x20when\x20the\x20org\x27s\x20login'),'\x0a\x20\x20config\x20uses\x20username+password).\x20Orgs\x20on\x20SSO/SAML/OAuth'),'\x20may\x20need\x20a\x20one-time\x20headed\x20login\x20instead\x20—')+'\x0a\x20\x20your\x20org\x27s\x20auth\x20config\x20drives\x20which\x20flow\x20runs.'),console[_0x11d5f3(0x123)](_0x11d5f3(0xf7)+_0x587a16['hVIEo'](bold,_0x587a16[_0x11d5f3(0xdd)])+'\x20for\x20explicit\x20profile\x20management).');}if(_0x24fb50)console[_0x11d5f3(0x123)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x11d5f3(0x123)](_0x587a16[_0x11d5f3(0x112)]),console[_0x11d5f3(0x123)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x587a16['eJSoU']);else{const _0x1eb266=bold(_0x587a16[_0x11d5f3(0xf0)]);console[_0x11d5f3(0x123)](_0x587a16[_0x11d5f3(0xf2)](_0x587a16['PPPKe'](_0x587a16['PPPKe'](_0x11d5f3(0xed)+_0x1eb266+'\x20and\x20prompt\x20the\x20coding',_0x11d5f3(0x10c)),_0x11d5f3(0xce)),_0x11d5f3(0x115)));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x537051,_0x4878f7){const _0x5790ee=_0x37c5,_0x28b3f5=_0x537051();while(!![]){try{const _0x2921b4=parseInt(_0x5790ee(0x1f7))/0x1*(parseInt(_0x5790ee(0x20d))/0x2)+parseInt(_0x5790ee(0x20a))/0x3*(parseInt(_0x5790ee(0x201))/0x4)+parseInt(_0x5790ee(0x1f4))/0x5+parseInt(_0x5790ee(0x229))/0x6*(-parseInt(_0x5790ee(0x22e))/0x7)+parseInt(_0x5790ee(0x221))/0x8+parseInt(_0x5790ee(0x206))/0x9+-parseInt(_0x5790ee(0x224))/0xa;if(_0x2921b4===_0x4878f7)break;else _0x28b3f5['push'](_0x28b3f5['shift']());}catch(_0x50b440){_0x28b3f5['push'](_0x28b3f5['shift']());}}}(_0x3a50,0xac8e1));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';function _0x3a50(){const _0x1bdbdc=['version','stderr','FlHAu','zbwfa','plugin','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','settingsPath','\x20(up\x20to\x20date)','plaintext','\x20\x20Not\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20plugin(s)\x20configured','user','gWKBH','@ranger-testing/opencode-plugin','match','disabled','myegE','data','hasEncryptedAuth','close','\x0a---\x20Profiles\x20---','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','lwEdD','pCsns','Version:\x20','not_installed','999795ciIgzJ','encrypted','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','97aoLKYT','auth.json.enc','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','string','configured','API\x20Token:\x20✗\x20Not\x20found','\x20\x20Run:\x20ranger\x20update','wytNO','isDirectory','details','2198080olFsnf','\x20(active)','name','oENQq','map','11730852RwHXLp','join','oqELa','RTIiU','3sBHldg','tmUbv','Organization:\x20','10882pppVtv','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','status','utf-8','\x0a\x20\x20No\x20active\x20profile\x20set','\x20\x20\x20\x20Auth:\x20','\x0a---\x20Claude\x20Code\x20Plugin\x20---','toString','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20Not\x20installed','error','qQYbB','mzetZ','ranger@trailhead','filter','\x0a---\x20Skills\x20---','path','length','\x20\x20Run:\x20ranger\x20skillup','dAGsz','9402896KlhORc','ezBHa','\x0a---\x20OpenCode\x20Plugin\x20---','17974150aPrGYV','project','BbXkd','emEoD','Root:\x20','2503692irGwNH','push','includes','FiOJv','hasPlaintextAuth','21nTmijG','trim','ignore','some','log','cwd','SKILL.md','enabled','parse'];_0x3a50=function(){return _0x1bdbdc;};return _0x3a50();}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x452fcb=>'\x1b[1m'+_0x452fcb+'\x1b[0m',link=(_0x4ff34c,_0x346289)=>'\x1b]8;;file://'+_0x4ff34c+'\x07'+(_0x346289||_0x4ff34c)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1eec7e=_0x37c5,_0x3f013e={'zdFMs':_0x1eec7e(0x1f3),'KEakM':'configured','oQJKb':function(_0x4f1e5d,_0x3d9857){return _0x4f1e5d>_0x3d9857;},'zbwfa':function(_0x1ff95d,_0x5c3870){return _0x1ff95d(_0x5c3870);},'qQYbB':'not_configured','BbXkd':function(_0x1cf536,_0x38f378,_0x16b90f,_0x160821){return _0x1cf536(_0x38f378,_0x16b90f,_0x160821);},'bdGdQ':'opencode','tmUbv':'config','clWAp':'pipe','hRdzK':_0x1eec7e(0x217)};return new Promise(_0x57343a=>{const _0x167c92=_0x1eec7e,_0x4c5325={'BLZvd':function(_0x5e9332,_0x281952){return _0x5e9332(_0x281952);},'FiOJv':_0x3f013e['zdFMs']},_0x1b4959=_0x3f013e[_0x167c92(0x226)](spawn,_0x3f013e['bdGdQ'],['debug',_0x3f013e[_0x167c92(0x20b)]],{'stdio':[_0x167c92(0x230),_0x3f013e['clWAp'],'pipe']});let _0x5c1169='';_0x1b4959['stdout']?.['on'](_0x167c92(0x1eb),_0x5589ea=>{const _0x328280=_0x167c92;_0x5c1169+=_0x5589ea[_0x328280(0x214)]();}),_0x1b4959[_0x167c92(0x1da)]?.['on']('data',_0x41abae=>{const _0x839a8e=_0x167c92;_0x5c1169+=_0x41abae[_0x839a8e(0x214)]();}),_0x1b4959['on'](_0x3f013e['hRdzK'],()=>{const _0x5e1cb0=_0x167c92;_0x4c5325['BLZvd'](_0x57343a,{'status':_0x4c5325[_0x5e1cb0(0x22c)]});}),_0x1b4959['on'](_0x167c92(0x1ed),_0x20e0b1=>{const _0x32bb05=_0x167c92,_0x57cb9e={'FlHAu':'opencode-plugin'};if(_0x20e0b1!==0x0){_0x57343a({'status':_0x3f013e['zdFMs']});return;}const _0x414339=_0x5c1169[_0x32bb05(0x22f)]();let _0x4e8e47=null;if(_0x414339)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x414339);}catch{const _0x58d596=_0x414339['match'](/\{[\s\S]*\}$/);if(_0x58d596)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x58d596[0x0]);}catch{_0x4e8e47=null;}}const _0x168d16=Array['isArray'](_0x4e8e47?.[_0x32bb05(0x1dd)])?_0x4e8e47?.['plugin']:[],_0x54fbe5=_0x168d16[_0x32bb05(0x1d3)](_0x3ae68b=>{const _0x3a0c41=_0x32bb05;if(typeof _0x3ae68b!==_0x3a0c41(0x1fa))return![];return _0x3ae68b[_0x3a0c41(0x22b)]('@ranger-testing/opencode-plugin')||_0x3ae68b['includes'](_0x57cb9e[_0x3a0c41(0x1db)]);});if(_0x54fbe5){_0x57343a({'status':_0x3f013e['KEakM'],'details':_0x168d16['length']>0x0?_0x168d16[_0x32bb05(0x21e)]+_0x32bb05(0x1e4):undefined});return;}if(_0x3f013e['oQJKb'](_0x168d16[_0x32bb05(0x21e)],0x0)){_0x3f013e[_0x32bb05(0x1dc)](_0x57343a,{'status':_0x3f013e[_0x32bb05(0x218)],'details':_0x168d16['length']+_0x32bb05(0x1e4)});return;}_0x57343a({'status':_0x3f013e['qQYbB']});});});}async function getSkillsFromDir(_0x4e6ba0,_0x24132e){const _0x16b6ef=_0x37c5,_0x35101d={'FAqZX':function(_0x5b661e,_0x52773c,_0x19c319){return _0x5b661e(_0x52773c,_0x19c319);},'emEoD':_0x16b6ef(0x1d6),'GmTQp':function(_0x2580d3,_0x448b09){return _0x2580d3(_0x448b09);},'ALUIW':_0x16b6ef(0x210)};if(!existsSync(_0x4e6ba0))return[];const _0x231a92=[];try{const _0x4892a0=await _0x35101d['FAqZX'](readdir,_0x4e6ba0,{'withFileTypes':!![]});for(const _0x2edcf0 of _0x4892a0){if(_0x2edcf0[_0x16b6ef(0x1ff)]()){const _0x24d41d=join(_0x4e6ba0,_0x2edcf0[_0x16b6ef(0x203)],_0x35101d[_0x16b6ef(0x227)]);if(_0x35101d['GmTQp'](existsSync,_0x24d41d)){let _0x16ddea=_0x2edcf0['name'];try{const _0x317ced=await readFile(_0x24d41d,_0x35101d['ALUIW']),_0x4ca668=_0x317ced[_0x16b6ef(0x1e8)](/name:\s*(.+)/);_0x4ca668&&(_0x16ddea=_0x4ca668[0x1]['trim']());}catch{}_0x231a92[_0x16b6ef(0x22a)]({'name':_0x2edcf0[_0x16b6ef(0x203)],'displayName':_0x16ddea,'path':_0x24d41d,'level':_0x24132e});}}}}catch{return[];}return _0x231a92;}async function getInstalledSkills(){const _0x5d2069=_0x37c5,_0x145922={'FGxon':function(_0x3d312b,_0x1fffd5,_0xa88787){return _0x3d312b(_0x1fffd5,_0xa88787);},'ResuV':_0x5d2069(0x225),'oqELa':function(_0x5d9bee){return _0x5d9bee();}},[_0x21b357,_0x905514]=await Promise['all']([_0x145922['FGxon'](getSkillsFromDir,getProjectSkillsDir(),_0x145922['ResuV']),getSkillsFromDir(_0x145922[_0x5d2069(0x208)](getUserSkillsDir),_0x5d2069(0x1e5))]);return{'project':_0x21b357,'user':_0x905514};}async function getEnvironments(){const _0x2daaa9=_0x37c5,_0x438b5c={'dAGsz':function(_0x4be23c,_0x423f63,_0x3e5818){return _0x4be23c(_0x423f63,_0x3e5818);},'LELqk':'auth.json','nBZzz':'(not\x20found)','ezBHa':function(_0x40ac10){return _0x40ac10();},'EnwkB':function(_0x18235f){return _0x18235f();}},{envNames:_0x57f4fe,activeEnv:_0x3e0bd7}=await _0x438b5c[_0x2daaa9(0x222)](getEnvNames),_0x3b489c=_0x438b5c['EnwkB'](getRangerDir);if(!existsSync(_0x3b489c))return{'envs':[],'activeEnv':null};const _0x222ce0=_0x57f4fe['map'](_0x4703d6=>{const _0x68f36f=_0x2daaa9,_0x2b53c2=getEnvDir(_0x4703d6),_0x5e6add=join(_0x2b53c2,'settings.json'),_0x1f55f1=_0x438b5c[_0x68f36f(0x220)](join,_0x2b53c2,_0x438b5c['LELqk']),_0x89a4f5=join(_0x2b53c2,_0x68f36f(0x1f8));return{'name':_0x4703d6,'settingsPath':existsSync(_0x5e6add)?_0x5e6add:_0x438b5c['nBZzz'],'hasPlaintextAuth':existsSync(_0x1f55f1),'hasEncryptedAuth':existsSync(_0x89a4f5),'isActive':_0x4703d6===_0x3e0bd7};});return{'envs':_0x222ce0,'activeEnv':_0x3e0bd7};}function _0x37c5(_0x1a5327,_0x47f8c3){_0x1a5327=_0x1a5327-0x1d3;const _0x3a50db=_0x3a50();let _0x37c581=_0x3a50db[_0x1a5327];return _0x37c581;}export async function status(){const _0x327f24=_0x37c5,_0x41b1d5={'mzetZ':function(_0x2b3f44){return _0x2b3f44();},'wytNO':function(_0x2071a1,_0x116fc7){return _0x2071a1(_0x116fc7);},'dGOKj':function(_0x58ced4,_0x4fe732,_0x4dc6d0){return _0x58ced4(_0x4fe732,_0x4dc6d0);},'lwEdD':function(_0x433499,_0x2150a1){return _0x433499(_0x2150a1);},'pCsns':function(_0x4e5f71,_0x52ccc0){return _0x4e5f71===_0x52ccc0;},'YGOwj':_0x327f24(0x1fb),'kmnma':_0x327f24(0x1e2),'oENQq':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','kdIFN':'ranger@trailhead','UAlXo':'unknown','uRNAz':_0x327f24(0x1e9),'RTIiU':function(_0x10b5c5,_0x48f533){return _0x10b5c5(_0x48f533);},'myegE':function(_0x522fa3){return _0x522fa3();},'rxGnz':function(_0x446417,_0x5aea8f){return _0x446417>_0x5aea8f;},'VudzM':'\x20\x20Project-level:','cSXIk':function(_0x49a660,_0x1eed77){return _0x49a660(_0x1eed77);},'gWKBH':function(_0x1079e9,_0x5cf078,_0xa09b5f){return _0x1079e9(_0x5cf078,_0xa09b5f);},'pydOh':_0x327f24(0x202),'OaaNw':_0x327f24(0x1e1),'raeYY':'none'};console[_0x327f24(0x1d4)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x32c432=process[_0x327f24(0x1d5)](),_0x3979ef=_0x41b1d5['mzetZ'](getRangerDir);if(!existsSync(_0x3979ef)){console[_0x327f24(0x1d4)]('Root:\x20'+link(_0x32c432,bold(_0x41b1d5['wytNO'](basename,_0x32c432)))),console['log'](_0x327f24(0x1de)),console['log'](_0x327f24(0x1e3));return;}console['log'](_0x327f24(0x228)+_0x41b1d5['dGOKj'](link,_0x32c432,_0x41b1d5[_0x327f24(0x1fe)](bold,_0x41b1d5[_0x327f24(0x1f0)](basename,_0x32c432))));const _0x4c8f34=_0x41b1d5[_0x327f24(0x219)](getCurrentVersion),_0x3c6b2e=getLatestVersion();if(_0x3c6b2e[_0x327f24(0x1d9)]&&_0x3c6b2e['version']!==_0x4c8f34)console[_0x327f24(0x1d4)](_0x327f24(0x1f2)+_0x4c8f34+'\x20(latest:\x20'+_0x3c6b2e['version']+')'),console[_0x327f24(0x1d4)](_0x327f24(0x1fd));else _0x3c6b2e['version']?console['log'](_0x327f24(0x1f2)+_0x4c8f34+_0x327f24(0x1e0)):console['log']('Version:\x20'+_0x4c8f34);const _0x23d463=await getToken();if(_0x23d463){const _0x4b664f=await getCurrentUser(_0x23d463);_0x4b664f['success']?console['log'](_0x327f24(0x20c)+bold(_0x4b664f['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x327f24(0x1d4)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x327f24(0x1fc)),console['log'](_0x327f24(0x215));process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x327f24(0x223));const _0x357bfd=await getOpencodePluginStatus();if(_0x41b1d5[_0x327f24(0x1f1)](_0x357bfd[_0x327f24(0x20f)],_0x41b1d5['YGOwj']))console[_0x327f24(0x1d4)]('\x20\x20'+bold(_0x327f24(0x1e7))+':\x20configured'),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']);else _0x41b1d5['pCsns'](_0x357bfd['status'],'not_configured')?(console['log'](_0x41b1d5['kmnma']),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']),console['log'](_0x41b1d5[_0x327f24(0x204)])):console[_0x327f24(0x1d4)](_0x327f24(0x1ef));console[_0x327f24(0x1d4)](_0x327f24(0x213));const _0x567c79=await getPluginInfo(_0x41b1d5['kdIFN']);if(_0x567c79){const _0xa5748f=_0x567c79['scope']||_0x41b1d5['UAlXo'],_0x112d2a=_0x567c79[_0x327f24(0x1d7)]?'enabled':_0x41b1d5['uRNAz'];console['log']('\x20\x20'+_0x41b1d5[_0x327f24(0x209)](bold,_0x327f24(0x21a))+':\x20installed\x20('+_0xa5748f+',\x20'+_0x112d2a+')');}else console[_0x327f24(0x1d4)](_0x327f24(0x216)),console['log'](_0x327f24(0x20e));console['log'](_0x327f24(0x21c));const {project:_0x527f95,user:_0xb6eacb}=await _0x41b1d5[_0x327f24(0x1ea)](getInstalledSkills),_0x176392=_0x527f95['filter'](_0x130141=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0x130141['name'])),_0x1b2c20=_0xb6eacb[_0x327f24(0x21b)](_0xd1959c=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0xd1959c[_0x327f24(0x203)])),_0xd70cd3=_0x176392[_0x327f24(0x21e)]+_0x1b2c20['length'];if(_0xd70cd3===0x0)console['log']('No\x20skills\x20installed'),console[_0x327f24(0x1d4)](_0x327f24(0x21f));else{if(_0x41b1d5['rxGnz'](_0x176392['length'],0x0)){console[_0x327f24(0x1d4)](_0x41b1d5['VudzM']);for(const _0x2ea72b of _0x176392){console['log']('\x20\x20\x20\x20'+_0x41b1d5['cSXIk'](bold,_0x2ea72b['displayName'])+':\x20'+link(_0x2ea72b['path'],_0x41b1d5[_0x327f24(0x209)](basename,_0x2ea72b[_0x327f24(0x21d)])));}}if(_0x1b2c20['length']>0x0){console['log']('\x20\x20User-level:');for(const _0x209bdd of _0x1b2c20){console['log']('\x20\x20\x20\x20'+bold(_0x209bdd['displayName'])+':\x20'+_0x41b1d5[_0x327f24(0x1e6)](link,_0x209bdd['path'],basename(_0x209bdd['path'])));}}}console['log'](_0x327f24(0x1ee));const {envs:_0x1fdecc,activeEnv:_0x3d5bf7}=await getEnvironments();if(_0x41b1d5[_0x327f24(0x1f1)](_0x1fdecc[_0x327f24(0x21e)],0x0))console['log']('No\x20profiles\x20configured'),console['log'](_0x327f24(0x1f6));else{for(const _0x2ae0c3 of _0x1fdecc){const _0x2529e7=_0x2ae0c3['isActive']?_0x41b1d5['pydOh']:'',_0x4dce2f=_0x2ae0c3[_0x327f24(0x1ec)]?_0x327f24(0x1f5):_0x2ae0c3[_0x327f24(0x22d)]?_0x41b1d5['OaaNw']:_0x41b1d5['raeYY'];console['log']('\x20\x20'+bold(_0x2ae0c3['name'])+_0x2529e7),console[_0x327f24(0x1d4)](_0x327f24(0x212)+_0x4dce2f),_0x2ae0c3[_0x327f24(0x1df)]!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x2ae0c3[_0x327f24(0x1df)],basename(_0x2ae0c3[_0x327f24(0x1df)])));}!_0x3d5bf7&&(console[_0x327f24(0x1d4)](_0x327f24(0x211)),console['log'](_0x327f24(0x1f9)+_0x1fdecc[_0x327f24(0x205)](_0x439628=>_0x439628[_0x327f24(0x203)])[_0x327f24(0x207)](',\x20')+')'));}console[_0x327f24(0x1d4)]('');}
|
|
1
|
+
const _0x215774=_0x7e1a;(function(_0x517f4b,_0x113be6){const _0x2dd760=_0x7e1a,_0x3d6818=_0x517f4b();while(!![]){try{const _0xe7b9ca=parseInt(_0x2dd760(0x1ad))/0x1*(parseInt(_0x2dd760(0x1e2))/0x2)+parseInt(_0x2dd760(0x190))/0x3*(-parseInt(_0x2dd760(0x1bf))/0x4)+parseInt(_0x2dd760(0x1a7))/0x5*(parseInt(_0x2dd760(0x1b2))/0x6)+parseInt(_0x2dd760(0x1d7))/0x7+-parseInt(_0x2dd760(0x18c))/0x8+-parseInt(_0x2dd760(0x19a))/0x9+parseInt(_0x2dd760(0x193))/0xa;if(_0xe7b9ca===_0x113be6)break;else _0x3d6818['push'](_0x3d6818['shift']());}catch(_0x4c135a){_0x3d6818['push'](_0x3d6818['shift']());}}}(_0x2e25,0x59801));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';function _0x2e25(){const _0x182594=['\x20(up\x20to\x20date)','@ranger-testing/opencode-plugin','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','path','auth.json.enc','WagHU','all','none','3598064XHdQOW','settingsPath','includes','wKtVY','1943295tAzLFQ','isDirectory','length','10990910nFeZXF','project','displayName','JEyhb','AAuze','\x0a---\x20Claude\x20Code\x20Plugin\x20---','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','4328154TmbKUn','SLeXd','\x20(latest:\x20','SKILL.md','map','API\x20URL:\x20','rOhEw','disabled','utTEt','configured','\x20\x20Not\x20installed','No\x20profiles\x20configured','\x20\x20\x20\x20Auth:\x20','10SOsPvg','snCux','trim','success','ignore','user','54046PgIfvl','lPBAc','name','Ftrvt','QOizZ','1125870JGCtyk','abIMR','yHYmy','XXENF',':\x20configured','ErTfx','HIStb','cwd','CTWyo','status','jFjeC','\x20\x20\x20\x20','lSDSk','4IfzIvL','isArray','hJJmP','filter','Logch','not_configured','data','pAggS','API\x20Environment:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','XzJvX','oQvph','match','details','SqPYN','\x0a---\x20OpenCode\x20Plugin\x20---','plugin','version','\x0a\x20\x20No\x20active\x20profile\x20set','\x1b]8;;\x07','jbQrO','LuPgh','error','ZGLQT','267911CTWxPa','VbxtT','enabled','\x20\x20Run:\x20ranger\x20skillup','SARDW','\x20\x20Run:\x20ranger\x20update','toString','eJzsy','\x20\x20\x20\x20Settings:\x20','log','djPUl','16yBOuNy','opencode','(not\x20found)','auth.json','env','jDYKH'];_0x2e25=function(){return _0x182594;};return _0x2e25();}import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x7e1a(_0x309a04,_0x275688){_0x309a04=_0x309a04-0x187;const _0x2e2594=_0x2e25();let _0x7e1acc=_0x2e2594[_0x309a04];return _0x7e1acc;}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=_0x474cc1=>'\x1b[1m'+_0x474cc1+'\x1b[0m',link=(_0x2493f7,_0x333a8f)=>'\x1b]8;;file://'+_0x2493f7+'\x07'+(_0x333a8f||_0x2493f7)+_0x215774(0x1d2);async function getOpencodePluginStatus(){const _0x390cfd=_0x215774,_0xf2b903={'lYhox':function(_0x4f036a,_0x106d79){return _0x4f036a!==_0x106d79;},'WagHU':'not_installed','PHlLF':_0x390cfd(0x1c4),'JEyhb':'debug','xhAvW':_0x390cfd(0x1ab),'jDYKH':'pipe','QOizZ':'data','SLeXd':_0x390cfd(0x1d5),'yHYmy':'close'};return new Promise(_0x628f6a=>{const _0x307eaf=_0x390cfd,_0x463815={'wKtVY':_0xf2b903['WagHU']},_0x32a669=spawn(_0x307eaf(0x1e3),[_0xf2b903[_0x307eaf(0x196)],'config'],{'stdio':[_0xf2b903['xhAvW'],_0xf2b903[_0x307eaf(0x1e7)],_0xf2b903[_0x307eaf(0x1e7)]]});let _0x11d4ae='';_0x32a669['stdout']?.['on'](_0xf2b903[_0x307eaf(0x1b1)],_0x22dabc=>{_0x11d4ae+=_0x22dabc['toString']();}),_0x32a669['stderr']?.['on'](_0x307eaf(0x1c5),_0x2a25f7=>{const _0x549371=_0x307eaf;_0x11d4ae+=_0x2a25f7[_0x549371(0x1dd)]();}),_0x32a669['on'](_0xf2b903[_0x307eaf(0x19b)],()=>{const _0x291c35=_0x307eaf;_0x628f6a({'status':_0x463815[_0x291c35(0x18f)]});}),_0x32a669['on'](_0xf2b903[_0x307eaf(0x1b4)],_0x959b89=>{const _0x18a1f3=_0x307eaf,_0x5e5b72={'RjvVG':function(_0x19dd0d,_0x4980cf){return _0xf2b903['lYhox'](_0x19dd0d,_0x4980cf);},'SARDW':'string','hJJmP':'opencode-plugin'};if(_0xf2b903['lYhox'](_0x959b89,0x0)){_0x628f6a({'status':_0xf2b903[_0x18a1f3(0x189)]});return;}const _0x486286=_0x11d4ae[_0x18a1f3(0x1a9)]();let _0x47af4c=null;if(_0x486286)try{_0x47af4c=JSON['parse'](_0x486286);}catch{const _0x1db16d=_0x486286[_0x18a1f3(0x1cb)](/\{[\s\S]*\}$/);if(_0x1db16d)try{_0x47af4c=JSON['parse'](_0x1db16d[0x0]);}catch{_0x47af4c=null;}}const _0x31ff91=Array[_0x18a1f3(0x1c0)](_0x47af4c?.[_0x18a1f3(0x1cf)])?_0x47af4c?.[_0x18a1f3(0x1cf)]:[],_0xb11062=_0x31ff91['some'](_0x190a54=>{const _0x2cce07=_0x18a1f3;if(_0x5e5b72['RjvVG'](typeof _0x190a54,_0x5e5b72[_0x2cce07(0x1db)]))return![];return _0x190a54[_0x2cce07(0x18e)](_0x2cce07(0x1e9))||_0x190a54['includes'](_0x5e5b72[_0x2cce07(0x1c1)]);});if(_0xb11062){_0x628f6a({'status':_0x18a1f3(0x1a3),'details':_0x31ff91['length']>0x0?_0x31ff91['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x31ff91[_0x18a1f3(0x192)]>0x0){_0x628f6a({'status':_0xf2b903['PHlLF'],'details':_0x31ff91[_0x18a1f3(0x192)]+'\x20plugin(s)\x20configured'});return;}_0x628f6a({'status':'not_configured'});});});}async function getSkillsFromDir(_0x4a6272,_0x2d14b8){const _0x6bbbe5=_0x215774,_0xd9a730={'PHESj':function(_0x132bd0,_0x2a5854){return _0x132bd0(_0x2a5854);},'kASqD':_0x6bbbe5(0x19d),'LuPgh':function(_0x34b74d,_0x59767d,_0x5e2702){return _0x34b74d(_0x59767d,_0x5e2702);},'rOhEw':'utf-8'};if(!_0xd9a730['PHESj'](existsSync,_0x4a6272))return[];const _0x2ebd6f=[];try{const _0x54728f=await readdir(_0x4a6272,{'withFileTypes':!![]});for(const _0x5bffca of _0x54728f){if(_0x5bffca[_0x6bbbe5(0x191)]()){const _0x51bf60=join(_0x4a6272,_0x5bffca['name'],_0xd9a730['kASqD']);if(_0xd9a730['PHESj'](existsSync,_0x51bf60)){let _0x56e99b=_0x5bffca['name'];try{const _0x4ec51a=await _0xd9a730[_0x6bbbe5(0x1d4)](readFile,_0x51bf60,_0xd9a730[_0x6bbbe5(0x1a0)]),_0x478f4d=_0x4ec51a[_0x6bbbe5(0x1cb)](/name:\s*(.+)/);_0x478f4d&&(_0x56e99b=_0x478f4d[0x1]['trim']());}catch{}_0x2ebd6f['push']({'name':_0x5bffca['name'],'displayName':_0x56e99b,'path':_0x51bf60,'level':_0x2d14b8});}}}}catch{return[];}return _0x2ebd6f;}async function getInstalledSkills(){const _0xca6b96=_0x215774,_0x151df8={'XWRQS':function(_0x4d2426,_0x1725c1,_0x293e75){return _0x4d2426(_0x1725c1,_0x293e75);},'izBmr':function(_0x60d87e){return _0x60d87e();},'cbKAS':function(_0x49c2fb){return _0x49c2fb();},'HIStb':'user'},[_0x35c327,_0x4c25fd]=await Promise[_0xca6b96(0x18a)]([_0x151df8['XWRQS'](getSkillsFromDir,_0x151df8['izBmr'](getProjectSkillsDir),_0xca6b96(0x194)),_0x151df8['XWRQS'](getSkillsFromDir,_0x151df8['cbKAS'](getUserSkillsDir),_0x151df8[_0xca6b96(0x1b8)])]);return{'project':_0x35c327,'user':_0x4c25fd};}async function getEnvironments(){const _0xf99a58=_0x215774,_0x4f7cc2={'AAuze':function(_0x31891e,_0xce74ad,_0x257cc1){return _0x31891e(_0xce74ad,_0x257cc1);},'XzJvX':function(_0x4410b7,_0x6c403e){return _0x4410b7(_0x6c403e);},'Ftrvt':_0xf99a58(0x1e4),'BQarH':function(_0xa3f334,_0x116b7f){return _0xa3f334(_0x116b7f);},'wjxxH':function(_0xab00bc,_0x2c5c07){return _0xab00bc===_0x2c5c07;},'lPBAc':function(_0x5bed34){return _0x5bed34();}},{envNames:_0x1695da,activeEnv:_0x293a76}=await _0x4f7cc2['lPBAc'](getEnvNames),_0x22f679=_0x4f7cc2[_0xf99a58(0x1ae)](getRangerDir);if(!_0x4f7cc2['XzJvX'](existsSync,_0x22f679))return{'envs':[],'activeEnv':null};const _0x53fdc1=_0x1695da[_0xf99a58(0x19e)](_0x276cf9=>{const _0x2e53cd=_0xf99a58,_0x4cdf74=getEnvDir(_0x276cf9),_0x22d4af=join(_0x4cdf74,'settings.json'),_0x447bfd=_0x4f7cc2[_0x2e53cd(0x197)](join,_0x4cdf74,_0x2e53cd(0x1e5)),_0x3c6ece=join(_0x4cdf74,_0x2e53cd(0x188));return{'name':_0x276cf9,'settingsPath':_0x4f7cc2[_0x2e53cd(0x1c9)](existsSync,_0x22d4af)?_0x22d4af:_0x4f7cc2[_0x2e53cd(0x1b0)],'hasPlaintextAuth':existsSync(_0x447bfd),'hasEncryptedAuth':_0x4f7cc2['BQarH'](existsSync,_0x3c6ece),'isActive':_0x4f7cc2['wjxxH'](_0x276cf9,_0x293a76)};});return{'envs':_0x53fdc1,'activeEnv':_0x293a76};}export async function status(){const _0x3d39e3=_0x215774,_0x286b86={'lIihg':'\x0a📊\x20Ranger\x20Status\x0a','fvmyq':function(_0x3e077e){return _0x3e077e();},'abIMR':function(_0x2ea44b,_0x3d2c07){return _0x2ea44b(_0x3d2c07);},'Logch':function(_0x5a463e,_0x4bc890){return _0x5a463e!==_0x4bc890;},'CTWyo':function(_0x5cf6f3,_0x92bd50){return _0x5cf6f3(_0x92bd50);},'ZGLQT':function(_0x26aff7){return _0x26aff7();},'SqPYN':function(_0x34f6be,_0x2ff73e){return _0x34f6be===_0x2ff73e;},'sjZqN':function(_0x44b968,_0x65b072){return _0x44b968===_0x65b072;},'djPUl':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','snCux':'ranger@trailhead','BzKvV':function(_0x17fa86,_0x1a6904){return _0x17fa86(_0x1a6904);},'jbQrO':'\x0a---\x20Skills\x20---','pAggS':function(_0x368f50,_0x4951c7){return _0x368f50+_0x4951c7;},'ptOvp':function(_0x3f6946,_0x483001){return _0x3f6946===_0x483001;},'ErTfx':function(_0xcda6a6,_0x4be28a){return _0xcda6a6>_0x4be28a;},'XXENF':function(_0x2bf928,_0x37f15b,_0x2e37fd){return _0x2bf928(_0x37f15b,_0x2e37fd);},'utTEt':function(_0x5e3a4f,_0x491535){return _0x5e3a4f(_0x491535);},'AHcHf':'\x20\x20User-level:','oDfqF':function(_0xbcac99,_0x20f1b1){return _0xbcac99(_0x20f1b1);},'czUSZ':'\x0a---\x20Profiles\x20---','VbxtT':function(_0x178ce8){return _0x178ce8();},'oQvph':function(_0x89a35d,_0x702585){return _0x89a35d===_0x702585;},'jFjeC':'\x20(active)','eJzsy':'plaintext','lSDSk':function(_0x5b85fe,_0x3a5596,_0x34d51c){return _0x5b85fe(_0x3a5596,_0x34d51c);}};console['log'](_0x286b86['lIihg']);const _0x4aa727=process[_0x3d39e3(0x1b9)](),_0x4ecea2=_0x286b86['fvmyq'](getRangerDir);if(!existsSync(_0x4ecea2)){console[_0x3d39e3(0x1e0)]('Root:\x20'+link(_0x4aa727,_0x286b86[_0x3d39e3(0x1b3)](bold,basename(_0x4aa727)))),console['log'](_0x3d39e3(0x199)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x3d39e3(0x1e0)]('Root:\x20'+link(_0x4aa727,bold(basename(_0x4aa727))));const _0x33c2ad=getCurrentVersion(),_0x580a34=getLatestVersion();if(_0x580a34[_0x3d39e3(0x1d0)]&&_0x286b86[_0x3d39e3(0x1c3)](_0x580a34[_0x3d39e3(0x1d0)],_0x33c2ad))console['log']('Version:\x20'+_0x33c2ad+_0x3d39e3(0x19c)+_0x580a34[_0x3d39e3(0x1d0)]+')'),console['log'](_0x3d39e3(0x1dc));else _0x580a34['version']?console['log']('Version:\x20'+_0x33c2ad+_0x3d39e3(0x1e8)):console['log']('Version:\x20'+_0x33c2ad);const _0x31bb1c=await getToken();if(_0x31bb1c){const _0x15f250=await _0x286b86['CTWyo'](getCurrentUser,_0x31bb1c);_0x15f250[_0x3d39e3(0x1aa)]?console['log']('Organization:\x20'+bold(_0x15f250[_0x3d39e3(0x1ac)]['organizationName'])):(console[_0x3d39e3(0x1e0)](_0x3d39e3(0x1ea)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x3d39e3(0x1e0)]('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x3d39e3(0x1e6)]['DEBUG']&&(console[_0x3d39e3(0x1e0)](_0x3d39e3(0x1c7)+getCurrentEnvironment()),console['log'](_0x3d39e3(0x19f)+_0x286b86[_0x3d39e3(0x1d6)](getApiBaseUrl)));console['log'](_0x3d39e3(0x1ce));const _0x2ba633=await getOpencodePluginStatus();if(_0x286b86[_0x3d39e3(0x1cd)](_0x2ba633['status'],_0x3d39e3(0x1a3)))console[_0x3d39e3(0x1e0)]('\x20\x20'+_0x286b86[_0x3d39e3(0x1b3)](bold,_0x3d39e3(0x1e9))+_0x3d39e3(0x1b6)),_0x2ba633[_0x3d39e3(0x1cc)]&&console[_0x3d39e3(0x1e0)]('\x20\x20'+_0x2ba633[_0x3d39e3(0x1cc)]);else _0x286b86['sjZqN'](_0x2ba633[_0x3d39e3(0x1bb)],'not_configured')?(console[_0x3d39e3(0x1e0)]('\x20\x20Not\x20configured'),_0x2ba633[_0x3d39e3(0x1cc)]&&console['log']('\x20\x20'+_0x2ba633[_0x3d39e3(0x1cc)]),console[_0x3d39e3(0x1e0)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log'](_0x286b86[_0x3d39e3(0x1e1)]);console['log'](_0x3d39e3(0x198));const _0x51d42a=await getPluginInfo(_0x286b86[_0x3d39e3(0x1a8)]);if(_0x51d42a){const _0x15f78b=_0x51d42a['scope']||'unknown',_0x468a0f=_0x51d42a[_0x3d39e3(0x1d9)]?'enabled':_0x3d39e3(0x1a1);console['log']('\x20\x20'+_0x286b86['BzKvV'](bold,_0x286b86[_0x3d39e3(0x1a8)])+':\x20installed\x20('+_0x15f78b+',\x20'+_0x468a0f+')');}else console['log'](_0x3d39e3(0x1a4)),console['log'](_0x3d39e3(0x1c8));console[_0x3d39e3(0x1e0)](_0x286b86[_0x3d39e3(0x1d3)]);const {project:_0x2d18ab,user:_0x3ec9dc}=await _0x286b86['ZGLQT'](getInstalledSkills),_0x2885d3=_0x2d18ab['filter'](_0xd582cc=>RANGER_MANAGED_SKILLS[_0x3d39e3(0x18e)](_0xd582cc[_0x3d39e3(0x1af)])),_0x4d0ba4=_0x3ec9dc[_0x3d39e3(0x1c2)](_0x43e72e=>RANGER_MANAGED_SKILLS[_0x3d39e3(0x18e)](_0x43e72e[_0x3d39e3(0x1af)])),_0x19467b=_0x286b86[_0x3d39e3(0x1c6)](_0x2885d3['length'],_0x4d0ba4[_0x3d39e3(0x192)]);if(_0x286b86['ptOvp'](_0x19467b,0x0))console['log']('No\x20skills\x20installed'),console['log'](_0x3d39e3(0x1da));else{if(_0x286b86[_0x3d39e3(0x1b7)](_0x2885d3['length'],0x0)){console['log']('\x20\x20Project-level:');for(const _0x18f445 of _0x2885d3){console['log'](_0x3d39e3(0x1bd)+bold(_0x18f445[_0x3d39e3(0x195)])+':\x20'+_0x286b86[_0x3d39e3(0x1b5)](link,_0x18f445['path'],_0x286b86[_0x3d39e3(0x1a2)](basename,_0x18f445[_0x3d39e3(0x187)])));}}if(_0x286b86['ErTfx'](_0x4d0ba4[_0x3d39e3(0x192)],0x0)){console[_0x3d39e3(0x1e0)](_0x286b86['AHcHf']);for(const _0x3e5cf8 of _0x4d0ba4){console['log']('\x20\x20\x20\x20'+bold(_0x3e5cf8['displayName'])+':\x20'+link(_0x3e5cf8['path'],_0x286b86['oDfqF'](basename,_0x3e5cf8['path'])));}}}console[_0x3d39e3(0x1e0)](_0x286b86['czUSZ']);const {envs:_0x207f1a,activeEnv:_0x1db308}=await _0x286b86[_0x3d39e3(0x1d8)](getEnvironments);if(_0x286b86[_0x3d39e3(0x1ca)](_0x207f1a[_0x3d39e3(0x192)],0x0))console[_0x3d39e3(0x1e0)](_0x3d39e3(0x1a5)),console[_0x3d39e3(0x1e0)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x5c97c5 of _0x207f1a){const _0x3ff6c7=_0x5c97c5['isActive']?_0x286b86[_0x3d39e3(0x1bc)]:'',_0x581feb=_0x5c97c5['hasEncryptedAuth']?'encrypted':_0x5c97c5['hasPlaintextAuth']?_0x286b86[_0x3d39e3(0x1de)]:_0x3d39e3(0x18b);console[_0x3d39e3(0x1e0)]('\x20\x20'+_0x286b86[_0x3d39e3(0x1a2)](bold,_0x5c97c5[_0x3d39e3(0x1af)])+_0x3ff6c7),console['log'](_0x3d39e3(0x1a6)+_0x581feb),_0x5c97c5['settingsPath']!=='(not\x20found)'&&console[_0x3d39e3(0x1e0)](_0x3d39e3(0x1df)+_0x286b86[_0x3d39e3(0x1be)](link,_0x5c97c5[_0x3d39e3(0x18d)],_0x286b86[_0x3d39e3(0x1ba)](basename,_0x5c97c5[_0x3d39e3(0x18d)])));}!_0x1db308&&(console['log'](_0x3d39e3(0x1d1)),console[_0x3d39e3(0x1e0)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x207f1a['map'](_0x150ffa=>_0x150ffa['name'])['join'](',\x20')+')'));}console['log']('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x317fa6,_0x3b5bf0){const _0xf29dcc=_0x2217,_0x2354cd=_0x317fa6();while(!![]){try{const _0x56914f=-parseInt(_0xf29dcc(0x1e6))/0x1*(parseInt(_0xf29dcc(0x1c0))/0x2)+parseInt(_0xf29dcc(0x1c5))/0x3+parseInt(_0xf29dcc(0x1a6))/0x4*(parseInt(_0xf29dcc(0x1c6))/0x5)+parseInt(_0xf29dcc(0x1d7))/0x6*(-parseInt(_0xf29dcc(0x198))/0x7)+-parseInt(_0xf29dcc(0x1a5))/0x8*(parseInt(_0xf29dcc(0x19c))/0x9)+parseInt(_0xf29dcc(0x1bb))/0xa*(-parseInt(_0xf29dcc(0x1da))/0xb)+parseInt(_0xf29dcc(0x19d))/0xc;if(_0x56914f===_0x3b5bf0)break;else _0x2354cd['push'](_0x2354cd['shift']());}catch(_0x1185c8){_0x2354cd['push'](_0x2354cd['shift']());}}}(_0x53da,0xd8240));import{spawn}from'child_process';function _0x2217(_0x27a8fc,_0x2bb880){_0x27a8fc=_0x27a8fc-0x198;const _0x53da10=_0x53da();let _0x221783=_0x53da10[_0x27a8fc];return _0x221783;}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x53da(){const _0x962ee0=['\x0a✅\x20Update\x20complete!','.gitignore','ignore','gGSUo','ulGbc','splice','npm','error','\x0aSuccessfully\x20installed\x20latest\x20version.','--scope','@latest','qPjCi','version','590AePwfx','vjsdY','log','rkyee','close','426526AjETmz','\x0aYour\x20version\x20(','\x0aCurrent\x20version:\x20','GXmBn','PqkiM','2655186UeMuJF','443175LJpXeL','TaWNW','sAzvF','kMevY','MqCjo','xXYvI',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x20\x20Failed\x20to\x20reinstall\x20','ranger@trailhead','ZbGEv','inherit','CmJjM','claude','kill','wLLcp','trim','XmOuJ','2334ppWgFr','TqZLH','user','313489TKxTqh','project','Sgzbu','win32','VKyMo','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','join','plugin','active-feature.txt','findIndex','yayaM','opencode','2fTsWcL','29281wkpwkZ','utf-8','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','BydvJ','369wmMoex','48216456pmQMzz','update','icmRR','\x0aInstalling\x20','platform','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','GaXrq','marketplace','107032hsMluI','12Acehnd','✓\x20Migrated\x20active\x20profile\x20file','XaYzO','Vantm','ZxogX','push','jtXZC','\x0aCould\x20not\x20check\x20latest\x20version:\x20'];_0x53da=function(){return _0x962ee0;};return _0x53da();}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x250f97,_0x15db6c,_0x23b549){const _0x34ce7f={'icmRR':function(_0x3bf76f,_0x2fe408){return _0x3bf76f(_0x2fe408);},'IZSdf':function(_0x2c505a,_0xd6294f){return _0x2c505a===_0xd6294f;},'yayaM':function(_0x194779,_0x2cd4d4){return _0x194779(_0x2cd4d4);},'QNimZ':function(_0x4ce6b5,_0x5c5f85,_0x40c431,_0x369494){return _0x4ce6b5(_0x5c5f85,_0x40c431,_0x369494);},'NqIIs':'inherit'};return new Promise(_0x5b67d1=>{const _0x5255f1=_0x2217,_0x3d5c05={'ulGbc':function(_0xa28d01,_0x402d3d){const _0x4c9923=_0x2217;return _0x34ce7f[_0x4c9923(0x1e4)](_0xa28d01,_0x402d3d);}};let _0x10111e=![],_0x348f4a;const _0x5eddde=_0x2b1f9e=>{const _0x39c4fe=_0x2217;if(_0x10111e)return;_0x10111e=!![],_0x348f4a&&clearTimeout(_0x348f4a),_0x34ce7f[_0x39c4fe(0x19f)](_0x5b67d1,_0x2b1f9e);},_0x27cc56=_0x34ce7f['QNimZ'](spawn,_0x250f97,_0x15db6c,{'stdio':[_0x5255f1(0x1b0),_0x23b549?.['stdio']??'inherit',_0x23b549?.['stdio']??_0x34ce7f['NqIIs']],'shell':process[_0x5255f1(0x1a1)]==='win32'});_0x348f4a=_0x23b549?.['timeoutMs']?setTimeout(()=>{const _0x45e1fd=_0x5255f1;_0x27cc56[_0x45e1fd(0x1d3)](),_0x27cc56['unref'](),_0x3d5c05[_0x45e1fd(0x1b2)](_0x5eddde,![]);},_0x23b549['timeoutMs']):undefined,_0x27cc56['on'](_0x5255f1(0x1bf),_0x4feb24=>{_0x5eddde(_0x34ce7f['IZSdf'](_0x4feb24,0x0));}),_0x27cc56['on']('error',()=>{_0x3d5c05['ulGbc'](_0x5eddde,![]);});});}async function runInstall(){const _0x44f70f=_0x2217,_0x2a82fb={'WcqoO':function(_0x501259,_0x419cf7){return _0x501259===_0x419cf7;},'IaMem':function(_0x5427ae,_0x380467,_0x4f31dd,_0x359a2f){return _0x5427ae(_0x380467,_0x4f31dd,_0x359a2f);},'jtXZC':_0x44f70f(0x1b4),'fgPEK':'ignore','rkyee':_0x44f70f(0x1d0),'GaXrq':function(_0x18fd66,_0x1f293d){return _0x18fd66===_0x1f293d;},'vjsdY':_0x44f70f(0x1dd),'tUiaB':'close'};return new Promise(_0x4abb5e=>{const _0x27c00a=_0x44f70f,_0x3d55eb={'qPjCi':function(_0x1ecc71,_0x2f7c3f){return _0x1ecc71(_0x2f7c3f);}};console[_0x27c00a(0x1bd)](_0x27c00a(0x1a0)+PACKAGE_NAME+'@latest...\x0a');const _0x29fb5c=_0x2a82fb['IaMem'](spawn,_0x2a82fb[_0x27c00a(0x1ac)],['install','-g',PACKAGE_NAME+_0x27c00a(0x1b8)],{'stdio':[_0x2a82fb['fgPEK'],_0x2a82fb[_0x27c00a(0x1be)],_0x2a82fb[_0x27c00a(0x1be)]],'shell':_0x2a82fb[_0x27c00a(0x1a3)](process[_0x27c00a(0x1a1)],_0x2a82fb[_0x27c00a(0x1bc)])});_0x29fb5c['on'](_0x2a82fb['tUiaB'],_0x338af3=>{_0x4abb5e(_0x2a82fb['WcqoO'](_0x338af3,0x0));}),_0x29fb5c['on'](_0x27c00a(0x1b5),()=>{const _0x56c51a=_0x27c00a;_0x3d55eb[_0x56c51a(0x1b9)](_0x4abb5e,![]);});});}async function updateClaudeMarketplace(){const _0x220c86=_0x2217,_0x1e0979={'MqCjo':_0x220c86(0x1d2),'xXYvI':_0x220c86(0x1e1),'oSlQF':_0x220c86(0x19e),'eXcCA':'trailhead'},_0x83296e=await runCommand(_0x1e0979[_0x220c86(0x1ca)],[_0x1e0979[_0x220c86(0x1cb)],_0x220c86(0x1a4),_0x1e0979['oSlQF'],_0x1e0979['eXcCA']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x83296e)throw new Error(_0x220c86(0x1df));}async function updateClaudePlugin(_0x44e102){const _0x420366=_0x2217,_0x1dcc99={'UWJGn':_0x420366(0x1e1),'MrPve':_0x420366(0x19e),'pZTxQ':_0x420366(0x1b7),'BydvJ':function(_0x2d680e,_0x21534c,_0x203c14,_0x2432ad){return _0x2d680e(_0x21534c,_0x203c14,_0x2432ad);},'JDOow':function(_0x4b506e,_0x444b1d){return _0x4b506e??_0x444b1d;},'TqZLH':_0x420366(0x1d9)},_0x5208b4=[_0x1dcc99['UWJGn'],_0x1dcc99['MrPve'],_0x420366(0x1ce)];_0x44e102&&_0x5208b4['push'](_0x1dcc99['pZTxQ'],_0x44e102);const _0x48e5d2=await _0x1dcc99[_0x420366(0x19b)](runCommand,_0x420366(0x1d2),_0x5208b4,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x48e5d2){const _0x1d172c=_0x1dcc99['JDOow'](_0x44e102,_0x1dcc99[_0x420366(0x1d8)]);throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1d172c+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x591255,_0x1f6f7a,_0x149618){const _0x3bad00={'Qlsyn':function(_0x4fe7e7,_0xe954a3){return _0x4fe7e7(_0xe954a3);}},_0x3831fe=_0x149618==='opencode'?getOpencodeSkillsDir(_0x1f6f7a):getSkillsDir(_0x1f6f7a),_0x1a2353=join(_0x3831fe,_0x591255);return _0x3bad00['Qlsyn'](existsSync,_0x1a2353);}async function reinstallSkills(_0x2f009b){const _0x1dd615=_0x2217,_0x1e747f={'XaYzO':_0x1dd615(0x1db),'kXaDm':function(_0x27a036,_0x2a1f37,_0x408b78,_0x14a460){return _0x27a036(_0x2a1f37,_0x408b78,_0x14a460);},'PqkiM':'claude','RFqhi':function(_0x335d11,_0x3a1a70){return _0x335d11===_0x3a1a70;},'kMevY':function(_0x519d4f,_0x5e42e7,_0x498b65){return _0x519d4f(_0x5e42e7,_0x498b65);}},_0x527534=[_0x1e747f[_0x1dd615(0x1a8)],'user'],_0x1c4d2e=[];for(const _0x57a554 of _0x527534){for(const _0x59d27b of RANGER_MANAGED_SKILLS){_0x1e747f['kXaDm'](isSkillInstalled,_0x59d27b,_0x57a554,_0x1dd615(0x1d2))&&_0x1c4d2e['push']({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1e747f[_0x1dd615(0x1c4)]}),isSkillInstalled(_0x59d27b,_0x57a554,_0x1dd615(0x1e5))&&_0x1c4d2e[_0x1dd615(0x1ab)]({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1dd615(0x1e5)});}}for(const _0x2e3910 of _0x527534){for(const _0x41a17d of DEPRECATED_SKILLS){await removeSkill(_0x41a17d,_0x2e3910);}}if(_0x1e747f['RFqhi'](_0x1c4d2e['length'],0x0)){console['log'](_0x1dd615(0x19a));return;}console[_0x1dd615(0x1bd)]('\x0aReinstalling\x20'+_0x1c4d2e['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1fbf99,level:_0x54f9b7,platform:_0x17c939}of _0x1c4d2e){try{await _0x1e747f[_0x1dd615(0x1c9)](installSkill,_0x1fbf99,{'level':_0x54f9b7,'cliVersion':_0x2f009b,'platform':_0x17c939});}catch(_0x30974b){console['warn'](_0x1dd615(0x1cd)+_0x17c939+'\x20'+_0x54f9b7+'\x20skill\x20'+_0x1fbf99+':',_0x30974b);}}}async function ensureActiveProfileGitignored(){const _0x123b25=_0x2217,_0x424052={'CmJjM':function(_0x2ed01d,_0x366065,_0x1bed24){return _0x2ed01d(_0x366065,_0x1bed24);},'ndAZP':_0x123b25(0x199),'kEGNp':function(_0x5957af,_0x15567e){return _0x5957af===_0x15567e;},'TaWNW':function(_0x50769b,_0x53a6a2,_0x471388,_0x45bf9c){return _0x50769b(_0x53a6a2,_0x471388,_0x45bf9c);}},_0x3b3153=_0x424052[_0x123b25(0x1d1)](join,getRangerDir(),_0x123b25(0x1af));if(!existsSync(_0x3b3153))return![];let _0x3737f5='';try{_0x3737f5=await readFile(_0x3b3153,_0x424052['ndAZP']);}catch{return![];}const _0x5abb36=_0x3737f5['split'](/\r?\n/);if(_0x5abb36['some'](_0x3448be=>_0x3448be['trim']()==='active-profile.txt'))return![];let _0x371a4b=_0x5abb36[_0x123b25(0x1e3)](_0x5483e0=>_0x5483e0[_0x123b25(0x1d5)]()===_0x123b25(0x1e2));_0x424052['kEGNp'](_0x371a4b,-0x1)&&(_0x371a4b=_0x5abb36['length']);_0x5abb36[_0x123b25(0x1b3)](_0x371a4b,0x0,'active-profile.txt');let _0x459c7f=_0x5abb36[_0x123b25(0x1e0)]('\x0a');!_0x459c7f['endsWith']('\x0a')&&(_0x459c7f+='\x0a');try{await _0x424052[_0x123b25(0x1c7)](writeFile,_0x3b3153,_0x459c7f,_0x123b25(0x199));}catch{return![];}return!![];}export async function update(){const _0x553475=_0x2217,_0x4c277c={'enSTR':'Checking\x20for\x20updates...','wLLcp':'Attempting\x20install\x20anyway...','gGSUo':_0x553475(0x1b6),'ZbGEv':function(_0x234c82,_0x3fcb37){return _0x234c82===_0x3fcb37;},'sAzvF':function(_0x1bd587,_0x4b15bb){return _0x1bd587<_0x4b15bb;},'yQkHo':function(_0x42874a,_0x397885){return _0x42874a(_0x397885);},'ZxogX':'trailhead','VKyMo':function(_0x2d7fed,_0x533249){return _0x2d7fed(_0x533249);},'GXmBn':'ranger@trailhead','Vantm':function(_0x620dd8){return _0x620dd8();},'Sgzbu':function(_0x20b40f,_0xfef018){return _0x20b40f(_0xfef018);},'UoUAK':_0x553475(0x1db),'NTwXo':_0x553475(0x1a2),'XmOuJ':function(_0x11a317){return _0x11a317();},'qDmFp':_0x553475(0x1ae)},_0x16dd49=getCurrentVersion();console[_0x553475(0x1bd)](_0x553475(0x1c2)+_0x16dd49),console['log'](_0x4c277c['enSTR']);const _0x2f191c=getLatestVersion();let _0x4d448c=_0x16dd49;if(!_0x2f191c[_0x553475(0x1ba)]){console['warn'](_0x553475(0x1ad)+_0x2f191c['error']),console[_0x553475(0x1bd)](_0x4c277c[_0x553475(0x1d4)]);const _0xa07f4d=await runInstall();if(_0xa07f4d)console['log'](_0x4c277c[_0x553475(0x1b1)]),_0x4d448c=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x2f191c['error']);}else{const _0x50b633=_0x2f191c[_0x553475(0x1ba)];console[_0x553475(0x1bd)]('Latest\x20version:\x20\x20'+_0x50b633);const _0x45323d=compareVersions(_0x16dd49,_0x50b633);if(_0x4c277c[_0x553475(0x1cf)](_0x45323d,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x4c277c[_0x553475(0x1c8)](_0x45323d,0x0))console[_0x553475(0x1bd)](_0x553475(0x1c1)+_0x16dd49+_0x553475(0x1cc)+_0x50b633+').');else{const _0xafa4e6=await runInstall();if(_0xafa4e6)console[_0x553475(0x1bd)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x50b633),_0x4d448c=_0x50b633;else throw new Error('Update\x20failed.');}}}await _0x4c277c['yQkHo'](reinstallSkills,_0x4d448c);const _0xed3248=await isMarketplaceAdded(_0x4c277c[_0x553475(0x1aa)]),_0x464a53=await _0x4c277c[_0x553475(0x1de)](isPluginInstalled,_0x4c277c['GXmBn']);_0xed3248&&(await _0x4c277c[_0x553475(0x1a9)](updateClaudeMarketplace),console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x464a53){const _0xd81933=await _0x4c277c['yQkHo'](getPluginInfo,_0x4c277c[_0x553475(0x1c3)]);_0x4c277c[_0x553475(0x1cf)](_0xd81933?.['scope'],_0x553475(0x1db))?(await _0x4c277c[_0x553475(0x1dc)](updateClaudePlugin,_0x4c277c['UoUAK']),console['log'](_0x4c277c['NTwXo'])):(await _0x4c277c['XmOuJ'](updateClaudePlugin),console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'));}const _0xb7877c=await migrateActiveProfileFile();_0xb7877c&&console['log'](_0x553475(0x1a7));const _0x2159e2=await _0x4c277c[_0x553475(0x1d6)](ensureActiveProfileGitignored);console['log'](_0x4c277c['qDmFp']);}
|
|
1
|
+
(function(_0x5301df,_0x3f0849){const _0x34237f=_0x349c,_0x259f5c=_0x5301df();while(!![]){try{const _0x32af6f=parseInt(_0x34237f(0x23c))/0x1+-parseInt(_0x34237f(0x1ef))/0x2+-parseInt(_0x34237f(0x225))/0x3*(parseInt(_0x34237f(0x214))/0x4)+-parseInt(_0x34237f(0x202))/0x5+parseInt(_0x34237f(0x239))/0x6*(parseInt(_0x34237f(0x1f2))/0x7)+parseInt(_0x34237f(0x22d))/0x8+-parseInt(_0x34237f(0x21a))/0x9*(-parseInt(_0x34237f(0x227))/0xa);if(_0x32af6f===_0x3f0849)break;else _0x259f5c['push'](_0x259f5c['shift']());}catch(_0xd8f6ff){_0x259f5c['push'](_0x259f5c['shift']());}}}(_0x4e1e,0x5b0da));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';function _0x349c(_0x4b99b4,_0x3a4152){_0x4b99b4=_0x4b99b4-0x1e7;const _0x4e1e36=_0x4e1e();let _0x349cfc=_0x4e1e36[_0x4b99b4];return _0x349cfc;}import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';function _0x4e1e(){const _0x54f856=['split','active-profile.txt','claude','INPze','lCUKd','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','pEjlg','inherit','eOtLY','local','utf-8','162006lhBwED','vIxiH','stdio','637553btQUzp','Arkxq','Update\x20failed.','xczcA','...\x0a','test','OWqNh','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','PXmcL','FRPjR','1420770VnQTho','length','\x20—\x20reinstalling\x20@','63NLFSwj','platform','version','alpha','pNUFs','push','VDFQe','Update\x20failed:\x20','error','ceViB','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','ABVpZ','uZTTB','OFfNe',').\x20Staying\x20on\x20','1135135JGXYUT','\x0aSuccessfully\x20updated\x20to\x20version\x20','beta','user','hBGOY','AVseN','Latest\x20version:\x20\x20','CcscQ','ngoUx','SOKpj','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','\x0a✅\x20Update\x20complete!','\x0aSuccessfully\x20installed\x20','update','marketplace','ranger@trailhead','LvqzD','YiaFd','72RJLuLJ','\x0aInstalling\x20','CBqKh','warn','log','close','3962295pOjuGn','pRMnT','JCOIH','\x0aSuccessfully\x20installed\x20latest\x20version.','GYsNU','.gitignore','sGvXy','\x20ranger-managed\x20skill(s)...','win32','install','TRBTG','89805lTIIuu','trailhead','10KkkdeJ','PdJaH','plugin','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','CGRyT','EaDAd','4227032lQkaob'];_0x4e1e=function(){return _0x54f856;};return _0x4e1e();}import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x18b13e,_0x1d70e7,_0x2137c7){const _0x5e86ed={'UixrU':function(_0x23d219,_0x583615){return _0x23d219(_0x583615);},'Arkxq':function(_0x42599d,_0x3a4b8d){return _0x42599d(_0x3a4b8d);},'bmFgv':'inherit','ABVpZ':'win32','VDFQe':function(_0x3bd2af,_0x5c1a19,_0x34adc3){return _0x3bd2af(_0x5c1a19,_0x34adc3);}};return new Promise(_0x280bec=>{const _0x42ef50=_0x349c,_0x2e977f={'OjMbZ':function(_0x333faf,_0xf5dc34){const _0x4bad7e=_0x349c;return _0x5e86ed[_0x4bad7e(0x23d)](_0x333faf,_0xf5dc34);},'pEjlg':function(_0x466f64,_0x2398d2){return _0x5e86ed['UixrU'](_0x466f64,_0x2398d2);}};let _0x280963=![],_0x3f30db;const _0x3dadb8=_0xe2ceb6=>{const _0x4699b4=_0x349c;if(_0x280963)return;_0x280963=!![],_0x3f30db&&_0x2e977f['OjMbZ'](clearTimeout,_0x3f30db),_0x2e977f[_0x4699b4(0x234)](_0x280bec,_0xe2ceb6);},_0x47bf7b=spawn(_0x18b13e,_0x1d70e7,{'stdio':['ignore',_0x2137c7?.[_0x42ef50(0x23b)]??_0x5e86ed['bmFgv'],_0x2137c7?.['stdio']??'inherit'],'cwd':_0x2137c7?.['cwd'],'shell':process['platform']===_0x5e86ed[_0x42ef50(0x1fe)]});_0x3f30db=_0x2137c7?.['timeoutMs']?_0x5e86ed[_0x42ef50(0x1f8)](setTimeout,()=>{_0x47bf7b['kill'](),_0x47bf7b['unref'](),_0x3dadb8(![]);},_0x2137c7['timeoutMs']):undefined,_0x47bf7b['on'](_0x42ef50(0x219),_0x4c9acd=>{_0x3dadb8(_0x4c9acd===0x0);}),_0x47bf7b['on'](_0x42ef50(0x1fa),()=>{_0x5e86ed['UixrU'](_0x3dadb8,![]);});});}export function resolveDistTag(_0x57155d){const _0x42fa6a=_0x349c;if(/-alpha\./i[_0x42fa6a(0x1ea)](_0x57155d))return _0x42fa6a(0x1f5);if(/-beta\./i['test'](_0x57155d))return _0x42fa6a(0x204);if(/-rc\./i['test'](_0x57155d))return'rc';return'latest';}async function runInstall(_0x55785c='latest'){const _0x467240=_0x349c,_0x2ee0d2={'glWXE':function(_0x2aca62,_0x301008,_0x2dceb1,_0x2ed244){return _0x2aca62(_0x301008,_0x2dceb1,_0x2ed244);},'YiaFd':_0x467240(0x223),'Disfg':_0x467240(0x235),'LvqzD':_0x467240(0x222),'eOtLY':_0x467240(0x1fa)};return new Promise(_0x17b1fc=>{const _0xe8810d=_0x467240,_0x9d036e={'JCOIH':function(_0x35a81d,_0x1a2ee9){return _0x35a81d(_0x1a2ee9);},'pRMnT':function(_0x5d6a4b,_0x486d76){return _0x5d6a4b(_0x486d76);}};console[_0xe8810d(0x218)](_0xe8810d(0x215)+PACKAGE_NAME+'@'+_0x55785c+_0xe8810d(0x1e9));const _0x1fbf80=_0x2ee0d2['glWXE'](spawn,'npm',[_0x2ee0d2[_0xe8810d(0x213)],'-g',PACKAGE_NAME+'@'+_0x55785c],{'stdio':['ignore',_0x2ee0d2['Disfg'],_0xe8810d(0x235)],'shell':process[_0xe8810d(0x1f3)]===_0x2ee0d2[_0xe8810d(0x212)]});_0x1fbf80['on']('close',_0x270be9=>{const _0x41e9b0=_0xe8810d;_0x9d036e[_0x41e9b0(0x21c)](_0x17b1fc,_0x270be9===0x0);}),_0x1fbf80['on'](_0x2ee0d2[_0xe8810d(0x236)],()=>{const _0x1ae184=_0xe8810d;_0x9d036e[_0x1ae184(0x21b)](_0x17b1fc,![]);});});}async function updateClaudeMarketplace(){const _0x497161=_0x349c,_0xac618c={'pNUFs':function(_0x17a226,_0x454417,_0x2ee0d6,_0x24a258){return _0x17a226(_0x454417,_0x2ee0d6,_0x24a258);},'OWqNh':'plugin','RJrhO':_0x497161(0x210),'HInBr':_0x497161(0x20f),'GYsNU':_0x497161(0x226),'dvVeu':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x48eb12=await _0xac618c[_0x497161(0x1f6)](runCommand,_0x497161(0x230),[_0xac618c[_0x497161(0x1eb)],_0xac618c['RJrhO'],_0xac618c['HInBr'],_0xac618c[_0x497161(0x21e)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x48eb12)throw new Error(_0xac618c['dvVeu']);}async function updateClaudePlugin(_0x48aced='user'){const _0x2c8770=_0x349c,_0x554376={'sGvXy':_0x2c8770(0x229),'ceViB':'ranger@trailhead','ldREJ':_0x2c8770(0x230),'CGRyT':'project','hBGOY':function(_0x3e28b4,_0x3ac868){return _0x3e28b4===_0x3ac868;}},_0x4d6457=[_0x554376[_0x2c8770(0x220)],'update',_0x554376[_0x2c8770(0x1fb)]];_0x48aced!=='user'&&_0x4d6457['push']('--scope',_0x48aced);const _0x2c4522=await runCommand(_0x554376['ldREJ'],_0x4d6457,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x48aced===_0x554376[_0x2c8770(0x22b)]||_0x554376[_0x2c8770(0x206)](_0x48aced,'local')?getProjectRoot():undefined});if(!_0x2c4522)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x48aced+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x287e5a,_0x413eab,_0x1f2a86){const _0x4a7d83=_0x349c,_0x5b244a={'EaDAd':function(_0x5da9a1,_0x45bb81){return _0x5da9a1===_0x45bb81;},'awaAU':function(_0x5a2db0,_0x4bf3ca){return _0x5a2db0(_0x4bf3ca);}},_0x374902=_0x5b244a[_0x4a7d83(0x22c)](_0x1f2a86,'opencode')?getOpencodeSkillsDir(_0x413eab):_0x5b244a['awaAU'](getSkillsDir,_0x413eab),_0x1a16dc=join(_0x374902,_0x287e5a);return _0x5b244a['awaAU'](existsSync,_0x1a16dc);}async function reinstallSkills(_0x2f200d){const _0x402248=_0x349c,_0x1e593d={'Yrzyv':_0x402248(0x205),'PXmcL':function(_0x41f90d,_0x3fbed8,_0x33eb6c,_0x1cc77d){return _0x41f90d(_0x3fbed8,_0x33eb6c,_0x1cc77d);},'QTQNB':_0x402248(0x230),'LdJVn':'opencode','TRBTG':function(_0x50f0b9,_0x4558be){return _0x50f0b9===_0x4558be;},'CcscQ':_0x402248(0x20c)},_0x8683e8=['project',_0x1e593d['Yrzyv']],_0x36207a=[];for(const _0x16ecfa of _0x8683e8){for(const _0x4997e9 of RANGER_MANAGED_SKILLS){_0x1e593d['PXmcL'](isSkillInstalled,_0x4997e9,_0x16ecfa,_0x1e593d['QTQNB'])&&_0x36207a[_0x402248(0x1f7)]({'skillName':_0x4997e9,'level':_0x16ecfa,'platform':_0x1e593d['QTQNB']}),_0x1e593d[_0x402248(0x1ed)](isSkillInstalled,_0x4997e9,_0x16ecfa,_0x1e593d['LdJVn'])&&_0x36207a[_0x402248(0x1f7)]({'skillName':_0x4997e9,'level':_0x16ecfa,'platform':'opencode'});}}for(const _0x2b4ae8 of _0x8683e8){for(const _0x3074fc of DEPRECATED_SKILLS){await removeSkill(_0x3074fc,_0x2b4ae8);}}if(_0x1e593d[_0x402248(0x224)](_0x36207a['length'],0x0)){console[_0x402248(0x218)](_0x1e593d[_0x402248(0x209)]);return;}console['log']('\x0aReinstalling\x20'+_0x36207a[_0x402248(0x1f0)]+_0x402248(0x221));for(const {skillName:_0x31ff5f,level:_0x1952e4,platform:_0x11b627}of _0x36207a){try{await installSkill(_0x31ff5f,{'level':_0x1952e4,'cliVersion':_0x2f200d,'platform':_0x11b627});}catch(_0x25819a){console[_0x402248(0x217)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x11b627+'\x20'+_0x1952e4+'\x20skill\x20'+_0x31ff5f+':',_0x25819a);}}}async function ensureActiveProfileGitignored(){const _0x23a0c6=_0x349c,_0x5d604a={'PdJaH':function(_0x70fa45,_0x4f21cf,_0x386c9e){return _0x70fa45(_0x4f21cf,_0x386c9e);},'hoRGV':function(_0x306ebc,_0x55cfff){return _0x306ebc(_0x55cfff);},'AVseN':_0x23a0c6(0x238),'OFfNe':'active-profile.txt','yCJZO':function(_0x51092c,_0x16399e,_0x5b2c5e,_0x4ec85d){return _0x51092c(_0x16399e,_0x5b2c5e,_0x4ec85d);}},_0x9f5cd5=_0x5d604a[_0x23a0c6(0x228)](join,getRangerDir(),_0x23a0c6(0x21f));if(!_0x5d604a['hoRGV'](existsSync,_0x9f5cd5))return![];let _0x89f7d3='';try{_0x89f7d3=await readFile(_0x9f5cd5,_0x5d604a[_0x23a0c6(0x207)]);}catch{return![];}const _0x253018=_0x89f7d3[_0x23a0c6(0x22e)](/\r?\n/);if(_0x253018['some'](_0x366326=>_0x366326[_0x23a0c6(0x1fd)]()===_0x23a0c6(0x22f)))return![];let _0x1400b7=_0x253018['findIndex'](_0x31cc15=>_0x31cc15['trim']()==='active-feature.txt');_0x1400b7===-0x1&&(_0x1400b7=_0x253018[_0x23a0c6(0x1f0)]);_0x253018['splice'](_0x1400b7,0x0,_0x5d604a[_0x23a0c6(0x200)]);let _0x5aa87f=_0x253018['join']('\x0a');!_0x5aa87f['endsWith']('\x0a')&&(_0x5aa87f+='\x0a');try{await _0x5d604a['yCJZO'](writeFile,_0x9f5cd5,_0x5aa87f,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x518017=_0x349c,_0x1efa6b={'ikmjI':function(_0x222fb8){return _0x222fb8();},'SOKpj':function(_0x29756d,_0x16d7c1){return _0x29756d(_0x16d7c1);},'CdRPY':function(_0x22560a){return _0x22560a();},'ngoUx':'Checking\x20for\x20updates...','sMPvw':function(_0x11c413){return _0x11c413();},'CBqKh':'Attempting\x20install\x20anyway...','FRPjR':function(_0x7f8ec){return _0x7f8ec();},'iKktw':function(_0x2bc1b5,_0x16c6f3,_0x26d181){return _0x2bc1b5(_0x16c6f3,_0x26d181);},'lCUKd':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','EaUzk':function(_0x54f1e7){return _0x54f1e7();},'INPze':_0x518017(0x1e7),'uZTTB':function(_0x482fd1,_0x4031ce){return _0x482fd1(_0x4031ce);},'iXiBh':'ranger@trailhead','xczcA':function(_0x4e0b45,_0x32408c){return _0x4e0b45===_0x32408c;},'ZFhOP':_0x518017(0x22a),'vLJWJ':_0x518017(0x237),'vIxiH':_0x518017(0x233)},_0x255a5b=_0x1efa6b['ikmjI'](getCurrentVersion);console[_0x518017(0x218)]('\x0aCurrent\x20version:\x20'+_0x255a5b);const _0x19f674=_0x1efa6b[_0x518017(0x20b)](resolveDistTag,_0x255a5b);if(_0x19f674!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x19f674+_0x518017(0x201)+_0x19f674+_0x518017(0x1f1)+_0x19f674+'...');const _0x4fc0c0=await _0x1efa6b['SOKpj'](runInstall,_0x19f674);if(!_0x4fc0c0)throw new Error('Update\x20failed\x20for\x20@'+_0x19f674+'\x20channel.');const _0x12f362=_0x1efa6b['CdRPY'](getCurrentVersion);console['log'](_0x518017(0x20e)+PACKAGE_NAME+'@'+_0x19f674+'.'),await reinstallSkills(_0x12f362),await ensureActiveProfileGitignored(),console[_0x518017(0x218)](_0x518017(0x20d));return;}console['log'](_0x1efa6b[_0x518017(0x20a)]);const _0x5176ad=_0x1efa6b['sMPvw'](getLatestVersion);let _0x582498=_0x255a5b;if(!_0x5176ad['version']){console['warn'](_0x518017(0x1fc)+_0x5176ad[_0x518017(0x1fa)]),console['log'](_0x1efa6b[_0x518017(0x216)]);const _0x317992=await _0x1efa6b[_0x518017(0x1ee)](runInstall);if(_0x317992)console[_0x518017(0x218)](_0x518017(0x21d)),_0x582498=getCurrentVersion();else throw new Error(_0x518017(0x1f9)+_0x5176ad['error']);}else{const _0x217219=_0x5176ad[_0x518017(0x1f4)];console[_0x518017(0x218)](_0x518017(0x208)+_0x217219);const _0x26388d=_0x1efa6b['iKktw'](compareVersions,_0x255a5b,_0x217219);if(_0x26388d===0x0)console['log'](_0x1efa6b[_0x518017(0x232)]);else{if(_0x26388d<0x0)console[_0x518017(0x218)]('\x0aYour\x20version\x20('+_0x255a5b+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x217219+').');else{const _0x134a28=await _0x1efa6b['EaUzk'](runInstall);if(_0x134a28)console[_0x518017(0x218)](_0x518017(0x203)+_0x217219),_0x582498=_0x217219;else throw new Error(_0x1efa6b[_0x518017(0x231)]);}}}await _0x1efa6b['SOKpj'](reinstallSkills,_0x582498);const _0x267884=await isMarketplaceAdded('trailhead'),_0x5da068=await _0x1efa6b['SOKpj'](isPluginInstalled,_0x518017(0x211));_0x267884&&(await _0x1efa6b['FRPjR'](updateClaudeMarketplace),console[_0x518017(0x218)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x5da068){const _0x91c428=await _0x1efa6b[_0x518017(0x1ff)](getPluginInfo,_0x1efa6b['iXiBh']),_0x51622d=_0x91c428?.['scope']??_0x518017(0x205);await _0x1efa6b[_0x518017(0x1ff)](updateClaudePlugin,_0x51622d);if(_0x1efa6b[_0x518017(0x1e8)](_0x51622d,'project'))console['log'](_0x1efa6b['ZFhOP']);else _0x1efa6b['xczcA'](_0x51622d,_0x1efa6b['vLJWJ'])?console[_0x518017(0x218)](_0x518017(0x1ec)):console[_0x518017(0x218)](_0x1efa6b[_0x518017(0x23a)]);}const _0x41f913=await ensureActiveProfileGitignored();console['log'](_0x518017(0x20d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b1a2d,_0x4c3a32){var _0x1de5a6=_0x36e8,_0xaae52b=_0x1b1a2d();while(!![]){try{var _0x44ee67=-parseInt(_0x1de5a6(0x18d))/0x1*(parseInt(_0x1de5a6(0x18b))/0x2)+parseInt(_0x1de5a6(0x194))/0x3*(-parseInt(_0x1de5a6(0x190))/0x4)+parseInt(_0x1de5a6(0x18e))/0x5*(parseInt(_0x1de5a6(0x18a))/0x6)+parseInt(_0x1de5a6(0x192))/0x7*(parseInt(_0x1de5a6(0x189))/0x8)+-parseInt(_0x1de5a6(0x191))/0x9*(-parseInt(_0x1de5a6(0x18f))/0xa)+-parseInt(_0x1de5a6(0x196))/0xb+-parseInt(_0x1de5a6(0x193))/0xc;if(_0x44ee67===_0x4c3a32)break;else _0xaae52b['push'](_0xaae52b['shift']());}catch(_0x24f20f){_0xaae52b['push'](_0xaae52b['shift']());}}}(_0x5c64,0x57462));function _0x5c64(){var _0x112099=['138VeVCuh','20310EuTVMW','\x20\x20https://docs.ranger.net/main/concepts/profiles','26FiEwIW','71065jnfhPo','10AUTnGl','1182652fWGqQA','6053958dnPrkR','16877lXjZkj','3139356MGgnba','3fevQbT','re-run\x20the\x20same\x20setup\x20that\x20created\x20the\x20profile:\x0a','3889732HDhAsc','UvSRr','WhbrR','ranger\x20profile\x20update\x20is\x20no\x20longer\x20supported.\x20To\x20refresh\x20authentication,\x0a','1768DKybyM'];_0x5c64=function(){return _0x112099;};return _0x5c64();}function _0x36e8(_0x2af80c,_0x5a7e65){_0x2af80c=_0x2af80c-0x189;var _0x5c6403=_0x5c64();var _0x36e810=_0x5c6403[_0x2af80c];return _0x36e810;}export async function updateEnv(_0x2396a5,_0x39401d,_0x31e7fb){var _0xd0e07b=_0x36e8,_0x260f65={'UvSRr':function(_0x50a7dc,_0x950e32){return _0x50a7dc+_0x950e32;},'WhbrR':_0xd0e07b(0x195)};console['error'](_0x260f65[_0xd0e07b(0x197)](_0x260f65[_0xd0e07b(0x197)](_0xd0e07b(0x199)+_0x260f65[_0xd0e07b(0x198)],'\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0xd0e07b(0x18c)),process['exit'](0x1);}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25fc08,_0x27f0ee){const _0x1e37f0=_0x2436,_0x4724b8=_0x25fc08();while(!![]){try{const _0x3131de=-parseInt(_0x1e37f0(0x189))/0x1+-parseInt(_0x1e37f0(0x182))/0x2*(-parseInt(_0x1e37f0(0x191))/0x3)+-parseInt(_0x1e37f0(0x185))/0x4+parseInt(_0x1e37f0(0x18e))/0x5+-parseInt(_0x1e37f0(0x18d))/0x6+-parseInt(_0x1e37f0(0x18c))/0x7*(parseInt(_0x1e37f0(0x18b))/0x8)+parseInt(_0x1e37f0(0x190))/0x9;if(_0x3131de===_0x27f0ee)break;else _0x4724b8['push'](_0x4724b8['shift']());}catch(_0x30cd63){_0x4724b8['push'](_0x4724b8['shift']());}}}(_0x59eb,0x687ae));function _0x59eb(){const _0x499115=['72WUMyTc','496258kCrEMy','2557710YVoMBL','54035FtgPqe','log','13325481TsSlCB','213GpHkQk','17164CgkEok','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','TssCC','2149716MstzJV','`ranger\x20profile\x20add\x20','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','status','71028canJkb','`\x20to\x20create\x20one.'];_0x59eb=function(){return _0x499115;};return _0x59eb();}import{join}from'path';import{existsSync}from'fs';function _0x2436(_0x2b7dc7,_0x32903e){_0x2b7dc7=_0x2b7dc7-0x182;const _0x59ebdc=_0x59eb();let _0x2436eb=_0x59ebdc[_0x2b7dc7];return _0x2436eb;}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x614106){const _0x260dc3=_0x2436,_0x273fe5={'TssCC':function(_0x1162cd,_0x46c13f,_0x2cf68d){return _0x1162cd(_0x46c13f,_0x2cf68d);},'oCUhs':function(_0xeb340f,_0x4a6ae5){return _0xeb340f(_0x4a6ae5);}},_0x34f82f=getEnvDir(_0x614106),_0x43e6ef=_0x273fe5[_0x260dc3(0x184)](join,_0x34f82f,'settings.json'),_0x387889=_0x273fe5['oCUhs'](existsSync,_0x34f82f)&&existsSync(_0x43e6ef);if(_0x387889){await writeActiveProfileName(_0x614106),console[_0x260dc3(0x18f)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x614106+'\x22');return;}let _0x3dcf7f=null,_0x3a644b=![];try{_0x3dcf7f=await fetchCloudProfile(_0x614106);if(!_0x3dcf7f)_0x3a644b=!![];}catch(_0x53caf6){_0x53caf6 instanceof ApiError&&_0x53caf6[_0x260dc3(0x188)]===0x194&&(_0x3a644b=!![]);}if(_0x3a644b)throw new Error('Profile\x20\x22'+_0x614106+_0x260dc3(0x183)+_0x260dc3(0x187)+(_0x260dc3(0x186)+_0x614106+_0x260dc3(0x18a)));await _0x273fe5['oCUhs'](writeActiveProfileName,_0x614106),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x614106+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3c6a(_0x5471dd,_0x2f2aa4){_0x5471dd=_0x5471dd-0x7d;const _0x3ded95=_0x3ded();let _0x3c6af9=_0x3ded95[_0x5471dd];return _0x3c6af9;}function _0x3ded(){const _0x236f3d=['utf-8','MDzld','UxomB','773308IGaYxx','683859ZTarvK','65176BvfhVc','4192559igJmai','cwd','trim','390244GBqVOY','522SaEyqv','Pefvm','1466490AQpcsB','776946cZJAuu','active-env.txt','3HJdzlg'];_0x3ded=function(){return _0x236f3d;};return _0x3ded();}const _0x516ce4=_0x3c6a;(function(_0x273ca6,_0x59e10e){const _0x32394c=_0x3c6a,_0x931298=_0x273ca6();while(!![]){try{const _0x40d5a2=parseInt(_0x32394c(0x7d))/0x1+parseInt(_0x32394c(0x82))/0x2*(parseInt(_0x32394c(0x88))/0x3)+-parseInt(_0x32394c(0x8c))/0x4+-parseInt(_0x32394c(0x85))/0x5+-parseInt(_0x32394c(0x86))/0x6+parseInt(_0x32394c(0x7f))/0x7+parseInt(_0x32394c(0x7e))/0x8*(-parseInt(_0x32394c(0x83))/0x9);if(_0x40d5a2===_0x59e10e)break;else _0x931298['push'](_0x931298['shift']());}catch(_0x1254ff){_0x931298['push'](_0x931298['shift']());}}}(_0x3ded,0x5f09c));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x516ce4(0x87);function readLegacyActiveProfileFile(){const _0x482f63=_0x516ce4,_0x12e7a2={'Pefvm':function(_0x1e0528,_0x38dafd,_0x3b99e6){return _0x1e0528(_0x38dafd,_0x3b99e6);},'UxomB':function(_0x29e7d6){return _0x29e7d6();}},_0x42728a=[_0x12e7a2[_0x482f63(0x84)](join,_0x12e7a2['UxomB'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE),join(_0x12e7a2[_0x482f63(0x8b)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x3831d4 of _0x42728a){if(existsSync(_0x3831d4))return _0x3831d4;}return null;}export async function readActiveProfileName(){const _0x3d3580=_0x516ce4,_0x5b3a8c={'MDzld':function(_0x56c681,_0x3cce35,_0x4e22d3){return _0x56c681(_0x3cce35,_0x4e22d3);}},_0x3b2109=readLastProfile(process[_0x3d3580(0x80)]());if(_0x3b2109)return _0x3b2109;const _0x1bd613=readLegacyActiveProfileFile();if(!_0x1bd613)return null;try{return(await _0x5b3a8c[_0x3d3580(0x8a)](readFile,_0x1bd613,_0x3d3580(0x89)))[_0x3d3580(0x81)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x687d9a){const _0x40ba1b=_0x516ce4;writeLastProfile(process[_0x40ba1b(0x80)](),_0x687d9a);}
|