@ranger-testing/ranger-cli 2.5.4-alpha.78800d3-3 → 2.5.4-alpha.816b7e2-24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/deleteProfile.js +1 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -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 +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1be451,_0x190b96){const _0x16f1c3=_0x765a,_0x344d58=_0x1be451();while(!![]){try{const _0xcc4f6f=-parseInt(_0x16f1c3(0x82))/0x1*(parseInt(_0x16f1c3(0x91))/0x2)+parseInt(_0x16f1c3(0xa8))/0x3*(-parseInt(_0x16f1c3(0x93))/0x4)+parseInt(_0x16f1c3(0x95))/0x5+-parseInt(_0x16f1c3(0xb8))/0x6+-parseInt(_0x16f1c3(0xa0))/0x7*(-parseInt(_0x16f1c3(0x9d))/0x8)+parseInt(_0x16f1c3(0xb0))/0x9+-parseInt(_0x16f1c3(0xb6))/0xa*(-parseInt(_0x16f1c3(0xa2))/0xb);if(_0xcc4f6f===_0x190b96)break;else _0x344d58['push'](_0x344d58['shift']());}catch(_0x412573){_0x344d58['push'](_0x344d58['shift']());}}}(_0x40d2,0xa0c56));import{join}from'path';import{existsSync}from'fs';import _0x564ba9 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x40d2(){const _0x4cf8af=['✓\x20Ranger\x20skills\x20already\x20installed','suhTv','ENiSl','18425300MWAyCU','Where\x20should\x20the\x20plugin\x20be\x20installed?','2233908ASreZc','SKILL.md','rbfGn','387052bouMwS','qUbTZ','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','TuFJe','✓\x20Claude\x20Code\x20plugin\x20enabled','confirm','success','MKqIX','list','wFeJO','NEojF','qrzYc','install','⚠\x20Failed\x20to\x20enable\x20plugin:','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','6rHqBna','prompt','5104LjxolW','\x20level)...\x0a','3543350szBoGF','error','EYhfh','ECnzs','vgmxj','✓\x20Marketplace\x20already\x20added','ytoDF','CpQvb','8YAmXGv','ZqVsy','wnFzP','870107zVPSeK','Would\x20you\x20like\x20to\x20install\x20skills?','11GDHBjQ','wantsSkillup','push','\x0aYou\x20can\x20install\x20manually\x20with:','log','RISOm','2967oZnYSF','plugin','project','ranger-testing/trailhead','add','enable','❌\x20Failed\x20to\x20add\x20marketplace:','lJtOv','7006095sNdVdq','xcdRp','sPHiQ'];_0x40d2=function(){return _0x4cf8af;};return _0x40d2();}function _0x765a(_0x577085,_0x4054ce){_0x577085=_0x577085-0x82;const _0x40d227=_0x40d2();let _0x765acd=_0x40d227[_0x577085];return _0x765acd;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x3a773c){const _0x5f0a43=_0x765a,_0xb0d6f8={'TuFJe':'ranger@trailhead','GwDRr':function(_0x486d87,_0x183e1d){return _0x486d87(_0x183e1d);},'vgmxj':function(_0x33f4da,_0x2ba51e,_0x4de6da){return _0x33f4da(_0x2ba51e,_0x4de6da);},'wFeJO':function(_0x438a9b){return _0x438a9b();},'CpQvb':'project','MKqIX':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','ytoDF':'User\x20(available\x20in\x20all\x20your\x20projects)','NFnYE':'user','KNMDH':function(_0x308b4c,_0x4d48d0){return _0x308b4c(_0x4d48d0);},'RISOm':_0x5f0a43(0x9a),'qrzYc':function(_0x238fae,_0x3a1a58){return _0x238fae(_0x3a1a58);},'VmDoE':_0x5f0a43(0xab),'xAmEg':_0x5f0a43(0xae),'wnFzP':_0x5f0a43(0xa5),'xcdRp':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','hajIn':_0x5f0a43(0xa9),'ECnzs':function(_0x3bb585,_0x368f71){return _0x3bb585===_0x368f71;},'chviC':_0x5f0a43(0x84),'xDWvO':'--scope','sPHiQ':'already\x20enabled'},_0x4f8878=await isPluginInstalled(_0xb0d6f8[_0x5f0a43(0x85)]);if(_0x4f8878)return console[_0x5f0a43(0xa6)](_0x5f0a43(0x90)),![];const _0xa6e0=_0xb0d6f8['GwDRr'](existsSync,_0xb0d6f8[_0x5f0a43(0x99)](join,_0xb0d6f8['wFeJO'](getProjectRoot),'.claude'));let _0x2767e9;if(_0x3a773c)_0x2767e9=_0x3a773c;else{if(_0xa6e0)_0x2767e9=_0xb0d6f8['CpQvb'];else{console['log'](_0xb0d6f8[_0x5f0a43(0x89)]);const _0x235957=await _0x564ba9['prompt']([{'type':_0x5f0a43(0x8a),'name':'pluginScope','message':_0x5f0a43(0xb7),'choices':[{'name':_0xb0d6f8[_0x5f0a43(0x9b)],'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0xb0d6f8[_0x5f0a43(0x9c)]}],'default':_0xb0d6f8['NFnYE']}]);_0x2767e9=_0x235957['pluginScope'];}}console[_0x5f0a43(0xa6)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x2767e9+_0x5f0a43(0x94));const _0x115966=await _0xb0d6f8['KNMDH'](isMarketplaceAdded,'trailhead');let _0x5e8327=_0x115966;if(_0x115966)console['log'](_0xb0d6f8[_0x5f0a43(0xa7)]);else{const _0x488dfd=await _0xb0d6f8[_0x5f0a43(0x8d)](runClaudeCommand,[_0x5f0a43(0xa9),'marketplace',_0x5f0a43(0xac),_0xb0d6f8['VmDoE']]);!_0x488dfd['success']?(console[_0x5f0a43(0x96)](_0xb0d6f8['xAmEg'],_0x488dfd[_0x5f0a43(0x96)]),console[_0x5f0a43(0xa6)](_0xb0d6f8[_0x5f0a43(0x9f)]),console[_0x5f0a43(0xa6)](_0xb0d6f8[_0x5f0a43(0xb1)]),console[_0x5f0a43(0xa6)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2767e9)):_0x5e8327=!![];}if(_0x5e8327){const _0x2358fb=await _0xb0d6f8['vgmxj'](runClaudeCommand,[_0xb0d6f8['hajIn'],_0x5f0a43(0x8e),_0xb0d6f8['TuFJe'],'--scope',_0x2767e9],{'cwd':_0xb0d6f8[_0x5f0a43(0x98)](_0x2767e9,'project')?_0xb0d6f8[_0x5f0a43(0x8b)](getProjectRoot):undefined});if(!_0x2358fb[_0x5f0a43(0x88)])console['error']('❌\x20Failed\x20to\x20install\x20plugin:',_0x2358fb[_0x5f0a43(0x96)]),console['log'](_0xb0d6f8['wnFzP']),console[_0x5f0a43(0xa6)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2767e9);else{console[_0x5f0a43(0xa6)](_0xb0d6f8['chviC']);const _0x5db97e=['plugin',_0x5f0a43(0xad),_0xb0d6f8[_0x5f0a43(0x85)]];_0xb0d6f8[_0x5f0a43(0x98)](_0x2767e9,_0xb0d6f8[_0x5f0a43(0x9c)])&&_0x5db97e[_0x5f0a43(0xa4)](_0xb0d6f8['xDWvO'],_0xb0d6f8[_0x5f0a43(0x9c)]);const _0x4fe353=await runClaudeCommand(_0x5db97e,{'captureOutput':!![],'cwd':_0x2767e9===_0x5f0a43(0xaa)?getProjectRoot():undefined}),_0x40b122=_0x4fe353['output']?.['includes'](_0xb0d6f8[_0x5f0a43(0xb2)]);!_0x4fe353[_0x5f0a43(0x88)]&&!_0x40b122?console[_0x5f0a43(0x96)](_0x5f0a43(0x8f),_0x4fe353[_0x5f0a43(0x96)]):console['log'](_0x5f0a43(0x86));}}return!![];}export async function ensureClaudeSkills(_0x2bc77c){const _0x160256=_0x765a,_0x3ed0eb={'ZqVsy':function(_0x2fe6e1,_0x8cdccb){return _0x2fe6e1(_0x8cdccb);},'suhTv':function(_0x3de0a1,_0x8a055d){return _0x3de0a1(_0x8a055d);},'qUbTZ':'ranger','jDhYo':function(_0x85a515,_0x312b6f){return _0x85a515(_0x312b6f);},'IaNPx':_0x160256(0xaa),'rSSQt':'SKILL.md','rbfGn':function(_0x5ca50b,_0x24734a,_0x4b8d99){return _0x5ca50b(_0x24734a,_0x4b8d99);},'ENiSl':'.claude','NEojF':function(_0x309e1b,_0x43e38a){return _0x309e1b(_0x43e38a);},'lJtOv':_0x160256(0x87),'EYhfh':_0x160256(0xa1)},_0x10304e=_0x3ed0eb[_0x160256(0x9e)](existsSync,join(_0x3ed0eb[_0x160256(0xb4)](getSkillsDir,'user'),_0x3ed0eb[_0x160256(0x83)],_0x160256(0xb9))),_0x31ac96=_0x3ed0eb['jDhYo'](existsSync,join(_0x3ed0eb['ZqVsy'](getSkillsDir,_0x3ed0eb['IaNPx']),'ranger',_0x3ed0eb['rSSQt']));if(_0x10304e||_0x31ac96)return console['log'](_0x160256(0xb3)),![];const _0x20fb1e=existsSync(_0x3ed0eb[_0x160256(0xba)](join,getProjectRoot(),_0x3ed0eb[_0x160256(0xb5)]));let _0xa76b3=!![];if(_0x2bc77c)await _0x3ed0eb[_0x160256(0x8c)](skillup,{'autoInstall':_0x2bc77c,'suppressUsage':!![]});else{if(_0x20fb1e)await _0x3ed0eb[_0x160256(0x8c)](skillup,{'autoInstall':_0x3ed0eb['IaNPx'],'suppressUsage':!![]});else{const _0x496a8c=await _0x564ba9[_0x160256(0x92)]([{'type':_0x3ed0eb[_0x160256(0xaf)],'name':_0x160256(0xa3),'message':_0x3ed0eb[_0x160256(0x97)],'default':!![]}]);_0xa76b3=_0x496a8c['wantsSkillup'],_0xa76b3&&await _0x3ed0eb['ZqVsy'](skillup,{'suppressUsage':!![]});}}return _0xa76b3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50c267,_0x1ed54d){const _0x236b80=_0x3b62,_0x44318b=_0x50c267();while(!![]){try{const _0x3cd34a=-parseInt(_0x236b80(0xd9))/0x1*(-parseInt(_0x236b80(0xd0))/0x2)+parseInt(_0x236b80(0xdf))/0x3*(-parseInt(_0x236b80(0xcf))/0x4)+-parseInt(_0x236b80(0xc8))/0x5+parseInt(_0x236b80(0xc6))/0x6+-parseInt(_0x236b80(0xd3))/0x7+parseInt(_0x236b80(0xd6))/0x8+parseInt(_0x236b80(0xce))/0x9;if(_0x3cd34a===_0x1ed54d)break;else _0x44318b['push'](_0x44318b['shift']());}catch(_0x427639){_0x44318b['push'](_0x44318b['shift']());}}}(_0x5198,0xb2f5a));import{join}from'path';function _0x3b62(_0xd27396,_0x4d9a8f){_0xd27396=_0xd27396-0xc5;const _0x5198f1=_0x5198();let _0x3b626b=_0x5198f1[_0xd27396];return _0x3b626b;}function _0x5198(){const _0x45d379=['plugin','6809430YTlSzq','project','YtoAd','$schema','Failed\x20to\x20read\x20opencode.json','isArray','582813fueUQl','8324juPmWt','38SwbzNU','McDAB','NtnAu','516579kgveZV','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','11311544HLVmsT','prompt','@ranger-testing/opencode-plugin','46310OJgqud','pvcOG','log','MSLRp','nLQgU','Project\x20(shared\x20with\x20team\x20via\x20git)','1737rcCtTR','MFNNh','pHSwl','https://opencode.ai/config.json','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','user','6090060kijauw'];_0x5198=function(){return _0x45d379;};return _0x5198();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0xfe76f4 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x4d88d2){const _0x57116e=_0x3b62,_0xc1a5e6={'pHSwl':function(_0x2336dd,_0x28621b,_0x597138){return _0x2336dd(_0x28621b,_0x597138);},'dIQQb':'opencode.json','qxXfd':'\x0a📦\x20OpenCode\x20Plugin\x0a','pvcOG':'list','MFNNh':'pluginScope','nLQgU':'user','NtnAu':function(_0xe2b3b3,_0x26e8c7){return _0xe2b3b3(_0x26e8c7);},'GxzWG':_0x57116e(0xd8),'XMpIS':_0x57116e(0xe2),'YtoAd':'utf-8','dUGVQ':_0x57116e(0xe3),'MSLRp':_0x57116e(0xcc),'kukOf':'✓\x20OpenCode\x20plugin\x20already\x20configured','McDAB':'✓\x20OpenCode\x20plugin\x20configured'},_0x462b8d=existsSync(_0xc1a5e6[_0x57116e(0xe1)](join,getOpencodeConfigDir('project'),_0xc1a5e6['dIQQb']));let _0xab44b9;if(_0x4d88d2)_0xab44b9=_0x4d88d2;else{if(_0x462b8d)_0xab44b9=_0x57116e(0xc9);else{console['log'](_0xc1a5e6['qxXfd']);const _0x366a61=await _0xfe76f4[_0x57116e(0xd7)]([{'type':_0xc1a5e6[_0x57116e(0xda)],'name':_0xc1a5e6[_0x57116e(0xe0)],'message':_0x57116e(0xd5),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0xc1a5e6[_0x57116e(0xdd)]},{'name':_0x57116e(0xde),'value':'project'}],'default':_0x57116e(0xc5)}]);_0xab44b9=_0x366a61['pluginScope'];}}const _0x504865=join(_0xc1a5e6[_0x57116e(0xd2)](getOpencodeConfigDir,_0xab44b9),'opencode.json'),_0x4301b5=_0xc1a5e6['GxzWG'],_0x3e9dd9=_0xc1a5e6['XMpIS'];let _0x1097c8={};if(existsSync(_0x504865))try{const _0x380a95=await readFile(_0x504865,_0xc1a5e6[_0x57116e(0xca)]);_0x1097c8=JSON[_0x57116e(0xd4)](_0x380a95);}catch(_0x26835b){return console['error'](_0xc1a5e6['dUGVQ']),{'configured':![],'scope':_0xab44b9,'error':_0xc1a5e6[_0x57116e(0xdc)],'details':_0x26835b};}const _0x19cf6f=Array[_0x57116e(0xcd)](_0x1097c8['plugin'])?_0x1097c8[_0x57116e(0xc7)]:[];if(_0x19cf6f['includes'](_0x4301b5))return console[_0x57116e(0xdb)](_0xc1a5e6['kukOf']),{'configured':![],'scope':_0xab44b9};return _0x1097c8[_0x57116e(0xcb)]=_0x1097c8[_0x57116e(0xcb)]||_0x3e9dd9,_0x1097c8[_0x57116e(0xc7)]=[..._0x19cf6f,_0x4301b5],await mkdir(getOpencodeConfigDir(_0xab44b9),{'recursive':!![]}),await _0xc1a5e6[_0x57116e(0xe1)](writeFile,_0x504865,JSON['stringify'](_0x1097c8,null,0x2)+'\x0a'),console[_0x57116e(0xdb)](_0xc1a5e6[_0x57116e(0xd1)]),{'configured':!![],'scope':_0xab44b9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(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(_0x46e7d0,_0x39e9ef){var _0x12aac4=_0x31b3,_0x4026c2=_0x46e7d0();while(!![]){try{var _0x43324d=parseInt(_0x12aac4(0x1b3))/0x1+parseInt(_0x12aac4(0x1b5))/0x2*(parseInt(_0x12aac4(0x1b4))/0x3)+-parseInt(_0x12aac4(0x1ba))/0x4*(parseInt(_0x12aac4(0x1bd))/0x5)+-parseInt(_0x12aac4(0x1b2))/0x6*(-parseInt(_0x12aac4(0x1b7))/0x7)+-parseInt(_0x12aac4(0x1bb))/0x8+-parseInt(_0x12aac4(0x1c0))/0x9*(parseInt(_0x12aac4(0x1bf))/0xa)+parseInt(_0x12aac4(0x1b8))/0xb;if(_0x43324d===_0x39e9ef)break;else _0x4026c2['push'](_0x4026c2['shift']());}catch(_0x62d522){_0x4026c2['push'](_0x4026c2['shift']());}}}(_0x5eec,0xa40eb));function _0x31b3(_0x4d3e93,_0x4e3996){_0x4d3e93=_0x4d3e93-0x1b2;var _0x5eec67=_0x5eec();var _0x31b3a7=_0x5eec67[_0x4d3e93];return _0x31b3a7;}function _0x5eec(){var _0x3b7c63=['11681802rATYuj','SygUG','3590108DuIODq','4589960KKtZMB','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','5PbhKwt','error','96510bzjfCO','1134hLgGMG','exit','24uUnkyq','520187XPDLPt','1686VCpOVt','1592iucyag','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2327073TdohXI'];_0x5eec=function(){return _0x3b7c63;};return _0x5eec();}export async function setupCi(_0x7cbf63,_0x5dcf6a,_0x27b9dd){var _0xdc166b=_0x31b3,_0x137545={'TtMuf':function(_0x11402c,_0x28453e){return _0x11402c+_0x28453e;},'SygUG':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'};console[_0xdc166b(0x1be)](_0x137545['TtMuf'](_0x137545['TtMuf'](_0x137545[_0xdc166b(0x1b9)]+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0xdc166b(0x1bc)),'\x0a')+_0xdc166b(0x1b6)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0xdc166b(0x1c1)](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c0ef7,_0x2209fb){const _0x451689=_0x241b,_0x279901=_0x4c0ef7();while(!![]){try{const _0x3b1c51=parseInt(_0x451689(0xfa))/0x1+parseInt(_0x451689(0x116))/0x2*(parseInt(_0x451689(0xf5))/0x3)+parseInt(_0x451689(0xfd))/0x4+-parseInt(_0x451689(0x125))/0x5*(parseInt(_0x451689(0x11a))/0x6)+parseInt(_0x451689(0x120))/0x7*(parseInt(_0x451689(0x119))/0x8)+-parseInt(_0x451689(0x111))/0x9+parseInt(_0x451689(0x112))/0xa*(-parseInt(_0x451689(0xff))/0xb);if(_0x3b1c51===_0x2209fb)break;else _0x279901['push'](_0x279901['shift']());}catch(_0x5277b5){_0x279901['push'](_0x279901['shift']());}}}(_0x120e,0x75730));import{basename}from'path';import _0x3acaf1 from'inquirer';function _0x120e(){const _0x583b01=['BVyVM','145701amtjXu','rXHza','rsLFB','2397344Yebmgo','autoInstall','22000OkoPjh','LUZAy','platform','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','YwfcP','esbRa','FSWig','iqEUq','kdVKw','installLevel','RNzcu','ranger','Where\x20should\x20skills\x20be\x20installed?','user','claude','smJki','GCGEd','isTTY','1537767CWOiTJ','5200YWfowx','\x0a📦\x20Installing\x20skills...\x0a','jeIFF','EKCNY','2694NffPsc','DWxxg','All\x20projects\x20(','6776552CNDyxO','246ZYtQci','\x20\x203.\x20Run:\x20ranger\x20skillup','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','suppressUsage','stdin','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','7ESXCCc','\x20\x202.\x20Run:\x20ranger\x20setup','\x0a✅\x20Installed\x20','prompt','aSxiy','14930nAiabR','1|4|5|3|0|2','/skills/','project-level','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','/.opencode/skills/','495PybJWJ','✓\x20Found\x20API\x20token','project','log'];_0x120e=function(){return _0x583b01;};return _0x120e();}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x241b(_0x51583c,_0x14a96f){_0x51583c=_0x51583c-0xee;const _0x120e53=_0x120e();let _0x241b00=_0x120e53[_0x51583c];return _0x241b00;}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x58cb12={}){const _0xf18657=_0x241b,_0x18684b={'kdVKw':_0xf18657(0x10d),'EKCNY':function(_0x5904f1){return _0x5904f1();},'esbRa':function(_0x2e0d2e,_0x2028dd){return _0x2e0d2e===_0x2028dd;},'LUZAy':'opencode','smJki':'\x20--opencode','BVyVM':_0xf18657(0xf2),'HgQMv':'To\x20get\x20started:','rXHza':function(_0x58c5f4,_0x213e74){return _0x58c5f4(_0x213e74);},'iqEUq':_0xf18657(0x10c),'jeIFF':function(_0x32dae7){return _0x32dae7();},'RNzcu':function(_0x9b86a3,_0x1484fa){return _0x9b86a3===_0x1484fa;},'aSxiy':_0xf18657(0x108),'lfmIw':_0xf18657(0x10b),'rsLFB':'project','GCGEd':function(_0x43a266){return _0x43a266();},'TEhuR':_0xf18657(0x113),'YwfcP':function(_0x35c42c,_0x1f8c54,_0x2c81a2){return _0x35c42c(_0x1f8c54,_0x2c81a2);},'FSWig':_0xf18657(0x10a),'UJOmy':function(_0x25e1ce,_0x3eea0d){return _0x25e1ce instanceof _0x3eea0d;},'QcYJJ':'user-level','Jappt':function(_0x9d56fc,_0x575c37){return _0x9d56fc>_0x575c37;},'mUqjw':_0xf18657(0x11f),'DWxxg':_0xf18657(0x11c)};console['log'](_0xf18657(0xf1));const _0x5291a7=_0x58cb12[_0xf18657(0x101)]??_0x18684b[_0xf18657(0x107)],_0x1e77e4=await _0x18684b[_0xf18657(0x115)](getToken);if(!_0x1e77e4){const _0x1aa369=_0xf18657(0xee)['split']('|');let _0x5cda5c=0x0;while(!![]){switch(_0x1aa369[_0x5cda5c++]){case'0':console['log'](_0xf18657(0x11b)+(_0x18684b['esbRa'](_0x5291a7,_0x18684b[_0xf18657(0x100)])?_0x18684b[_0xf18657(0x10e)]:'')+'\x0a');continue;case'1':console[_0xf18657(0xf8)](_0x18684b[_0xf18657(0xf9)]);continue;case'2':return;case'3':console['log'](_0xf18657(0x121)+(_0x5291a7===_0x18684b[_0xf18657(0x100)]?_0x18684b['smJki']:'')+'\x20<your-api-token>');continue;case'4':console['log'](_0x18684b['HgQMv']);continue;case'5':console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;}break;}}console['log'](_0xf18657(0xf6));const _0xd9b152=getProjectRoot(),_0x358f57=basename(_0xd9b152),_0x27d0d0=_0x18684b['esbRa'](_0x5291a7,_0x18684b['LUZAy'])?_0x18684b[_0xf18657(0xfb)](getOpencodeConfigDir,_0x18684b[_0xf18657(0x106)])+_0xf18657(0xef):_0x18684b[_0xf18657(0x114)](getClaudeConfigDir)+'/skills/',_0x43038e=_0x18684b[_0xf18657(0x109)](_0x5291a7,_0x18684b[_0xf18657(0x100)])?_0xd9b152+_0xf18657(0xf4):_0xd9b152+'/.claude/skills/',_0xfae842=process[_0xf18657(0x11e)][_0xf18657(0x110)]&&process['stdout']['isTTY'];let _0x5aef8b;if(_0x58cb12['autoInstall'])_0x5aef8b=_0x58cb12[_0xf18657(0xfe)];else{if(_0xfae842){const _0x5e78cd=await _0x3acaf1[_0xf18657(0x123)]([{'type':'list','name':_0x18684b[_0xf18657(0x124)],'message':_0x18684b['lfmIw'],'choices':[{'name':_0xf18657(0x118)+_0x27d0d0+')','value':_0xf18657(0x10c)},{'name':'This\x20project\x20only\x20('+_0x43038e+')','value':_0x18684b[_0xf18657(0xfc)]}]}]);_0x5aef8b=_0x5e78cd['installLevel'];}else _0x5aef8b=_0xf18657(0xf7),console[_0xf18657(0xf8)](_0xf18657(0xf3)+_0x43038e+')');}let _0x76d263=0x0;const _0x5e4e2f=_0x18684b[_0xf18657(0x10f)](getCurrentVersion);console[_0xf18657(0xf8)](_0x18684b['TEhuR']);try{const _0x1482b0=await _0x18684b[_0xf18657(0x103)](installSkill,_0x18684b[_0xf18657(0x105)],{'cliVersion':_0x5e4e2f,'level':_0x5aef8b,'platform':_0x5291a7});_0x1482b0&&_0x76d263++;}catch(_0x289a09){console['warn'](_0xf18657(0x102),_0x18684b['UJOmy'](_0x289a09,Error)?_0x289a09['message']:_0x289a09);}if(_0x76d263>0x0){const _0x4a3e04=_0x18684b['RNzcu'](_0x5aef8b,_0x18684b['iqEUq'])?_0x18684b['QcYJJ']:_0xf18657(0xf0);console['log'](_0xf18657(0x122)+_0x76d263+'\x20'+_0x4a3e04+'\x20skill'+(_0x18684b['Jappt'](_0x76d263,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x58cb12[_0xf18657(0x11d)]&&(console[_0xf18657(0xf8)]('To\x20use:'),_0x18684b[_0xf18657(0x104)](_0x5291a7,_0x18684b['LUZAy'])?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console['log'](_0x18684b['mUqjw']));}else console['log'](_0x18684b[_0xf18657(0x117)]);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(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 _0x318988=_0x788c;(function(_0x3630d2,_0x55a7ed){const _0x11ea4f=_0x788c,_0x2b322b=_0x3630d2();while(!![]){try{const _0x409bed=-parseInt(_0x11ea4f(0x210))/0x1+parseInt(_0x11ea4f(0x1fb))/0x2*(parseInt(_0x11ea4f(0x224))/0x3)+-parseInt(_0x11ea4f(0x225))/0x4*(parseInt(_0x11ea4f(0x238))/0x5)+-parseInt(_0x11ea4f(0x24c))/0x6*(parseInt(_0x11ea4f(0x219))/0x7)+-parseInt(_0x11ea4f(0x245))/0x8+-parseInt(_0x11ea4f(0x20e))/0x9+parseInt(_0x11ea4f(0x20b))/0xa;if(_0x409bed===_0x55a7ed)break;else _0x2b322b['push'](_0x2b322b['shift']());}catch(_0x7d99ab){_0x2b322b['push'](_0x2b322b['shift']());}}}(_0x218f,0x37a98));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x509846 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x318988(0x20c);const bold=_0x3792a7=>_0x318988(0x247)+_0x3792a7+'\x1b[0m';export function getPlaywrightVersion(){const _0x3e1f2c=_0x318988,_0x2534ee={'UaevO':'playwright/package.json','vDNow':function(_0x4d3f6f,_0x42fefb){return _0x4d3f6f(_0x42fefb);}};try{const _0x526b4d=require['resolve'](_0x2534ee[_0x3e1f2c(0x23d)]),_0xd5aed6=_0x2534ee['vDNow'](require,_0x526b4d);return _0xd5aed6[_0x3e1f2c(0x243)];}catch{return null;}}export function installChromiumBinary(_0xaa7746,_0x2c2590=![]){const _0x169d09=_0x318988,_0x555bdc={'sHQcY':function(_0x1dc74a,_0x30dda2){return _0x1dc74a===_0x30dda2;},'cDaCX':'npx','KARpt':'inherit','HVrys':_0x169d09(0x1ff),'DQpDe':_0x169d09(0x204)};return new Promise((_0xea007f,_0x1e165f)=>{const _0x38526f=_0x169d09,_0x5e6dba={'wvTfh':function(_0x1fad4f,_0x38c323){const _0x47b7a7=_0x788c;return _0x555bdc[_0x47b7a7(0x206)](_0x1fad4f,_0x38c323);},'CsjHz':function(_0x59db60,_0x1b2db2){return _0x59db60(_0x1b2db2);}},_0x335701=[_0x38526f(0x20d)+_0xaa7746,'install',..._0x2c2590?['--with-deps']:[],'chromium'],_0x28cdf4=spawn(_0x555bdc['cDaCX'],_0x335701,{'stdio':['ignore',_0x555bdc['KARpt'],_0x38526f(0x1f4)],'shell':process[_0x38526f(0x1e3)]===_0x555bdc['HVrys']});_0x28cdf4['on'](_0x38526f(0x24e),_0x42043a=>{const _0xbc7714=_0x38526f;_0x5e6dba[_0xbc7714(0x229)](_0x42043a,0x0)?_0xea007f():_0x5e6dba['CsjHz'](_0x1e165f,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x42043a));}),_0x28cdf4['on'](_0x555bdc[_0x38526f(0x1e2)],_0x472028=>{_0x1e165f(_0x472028);});});}function _0x788c(_0x3a643a,_0x20a7fb){_0x3a643a=_0x3a643a-0x1e1;const _0x218f30=_0x218f();let _0x788c6f=_0x218f30[_0x3a643a];return _0x788c6f;}export async function authenticate(_0x81c3e8){const _0x591837=_0x318988,_0x2fca78={'gdOPc':function(_0xf0b148){return _0xf0b148();},'VZtJM':'device_auth','SUgik':'Validating\x20API\x20token...','RBXFV':function(_0x540985,_0x419382){return _0x540985(_0x419382);},'orByt':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x81c3e8){const _0x45816f=await _0x2fca78['gdOPc'](getToken);if(_0x45816f){const _0x5015be=await getCurrentUser(_0x45816f);if(_0x5015be['success'])return console['log'](_0x591837(0x22a)+_0x5015be['user'][_0x591837(0x223)]),{'token':_0x45816f,'method':_0x591837(0x1f7)};}try{_0x81c3e8=await runDeviceAuthFlow();}catch(_0x38b488){throw new Error(_0x591837(0x205)+(_0x38b488 instanceof Error?_0x38b488['message']:_0x38b488));}const _0x434574=await getCurrentUser(_0x81c3e8);if(!_0x434574['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x434574[_0x591837(0x204)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x434574['user'][_0x591837(0x223)]),{'token':_0x81c3e8,'method':_0x2fca78[_0x591837(0x213)]};}console['log'](_0x2fca78[_0x591837(0x246)]);const _0x3a78cf=await getCurrentUser(_0x81c3e8);if(!_0x3a78cf[_0x591837(0x244)]){if(_0x3a78cf[_0x591837(0x22d)])throw new Error('Authentication\x20failed:\x20'+_0x3a78cf['error']+_0x591837(0x21f));else throw new Error(_0x591837(0x23c)+_0x3a78cf[_0x591837(0x204)]+_0x591837(0x22f));}return console[_0x591837(0x1f0)]('✓\x20Authenticated\x20to\x20'+_0x3a78cf[_0x591837(0x221)][_0x591837(0x223)]),await _0x2fca78[_0x591837(0x241)](storeToken,_0x81c3e8),console['log'](process[_0x591837(0x207)][_0x591837(0x24b)]?_0x2fca78[_0x591837(0x1eb)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x81c3e8,'method':'provided_token'};}export async function ensureRangerDir(_0xce4c7a){const _0xd02f0b=_0x318988,_0x2935aa={'yFScO':function(_0x43a0ba){return _0x43a0ba();}};void _0xce4c7a;const _0x2f58e3=_0x2935aa[_0xd02f0b(0x22c)](getRangerHomeDir);return!existsSync(_0x2f58e3)?(await mkdir(_0x2f58e3,{'recursive':!![]}),console[_0xd02f0b(0x1f0)]('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0x2f58e3,'installed':!![]}):(console[_0xd02f0b(0x1f0)](_0xd02f0b(0x1f5)),{'path':_0x2f58e3,'installed':![]});}export async function ensureChromium(_0xfb826f=![]){const _0x10fcb3=_0x318988,_0x36f3c4={'Wzoid':_0x10fcb3(0x1ef),'saWop':function(_0x285db8,_0x542f7b){return _0x285db8??_0x542f7b;},'BdYsQ':_0x10fcb3(0x226),'PhXHQ':'\x0aInstalling\x20Chromium\x20browser...\x0a','elhRa':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','hgKpR':function(_0x51f881,_0x5a9021){return _0x51f881 instanceof _0x5a9021;},'IrgtJ':_0x10fcb3(0x20a),'OEiDp':_0x10fcb3(0x220)};let _0x5e42aa=![];try{const _0x35cefe=chromium[_0x10fcb3(0x242)]();_0x5e42aa=existsSync(_0x35cefe);}catch{_0x5e42aa=![];}if(_0x5e42aa)return console[_0x10fcb3(0x1f0)](_0x36f3c4['Wzoid']),![];const _0x434e1f=getPlaywrightVersion(),_0x4d3340=_0x36f3c4['saWop'](_0x434e1f,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x39970f=!_0x434e1f,_0x5a3120=process['stdin'][_0x10fcb3(0x21d)]&&process['stdout'][_0x10fcb3(0x21d)];let _0xa4556b=!![];if(_0x5a3120){const {install:_0x4c80fa}=await _0x509846[_0x10fcb3(0x228)]([{'type':_0x36f3c4['BdYsQ'],'name':'install','message':_0x39970f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x4d3340+_0x10fcb3(0x22e):_0x10fcb3(0x218)+_0x4d3340+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0xa4556b=_0x4c80fa;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x4d3340+(_0x39970f?_0x10fcb3(0x1e7):'')+_0x10fcb3(0x233));if(_0xa4556b){console[_0x10fcb3(0x1f0)](_0x36f3c4['PhXHQ']);try{await installChromiumBinary(_0x4d3340,_0xfb826f),console['log'](_0x36f3c4['elhRa']);}catch(_0x15e799){console[_0x10fcb3(0x204)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x36f3c4[_0x10fcb3(0x23f)](_0x15e799,Error)?_0x15e799['message']:_0x15e799),console['log'](_0x36f3c4[_0x10fcb3(0x1f3)]),console['log']('\x20\x20npx\x20playwright@'+_0x4d3340+_0x10fcb3(0x1ee));}}else console[_0x10fcb3(0x1f0)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x10fcb3(0x1f0)](_0x36f3c4['OEiDp']),console['log'](_0x10fcb3(0x1ed)+_0x4d3340+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x13418f){const _0x435f3a=_0x318988,_0x1f115d={'RNoDn':function(_0x4502f3,_0x1721c3,_0x4261e){return _0x4502f3(_0x1721c3,_0x4261e);},'IZEHv':_0x435f3a(0x23e)},_0x4fe3e4=_0x1f115d['RNoDn'](join,_0x13418f,'.gitignore'),_0x4836c2=_0x435f3a(0x208);await writeFile(_0x4fe3e4,_0x4836c2),console[_0x435f3a(0x1f0)](_0x1f115d['IZEHv']);}export async function ensureLocalEnv(_0x232ea1,_0x551b03){const _0xe72460=_0x318988,_0x49b7c9={'ZoChC':function(_0x51d861){return _0x51d861();},'aSujL':function(_0x3dcf03,_0x40f883){return _0x3dcf03!==_0x40f883;},'QtEjT':'user','NlpWD':function(_0x3a4e88,_0x123795,_0x5b7ab7){return _0x3a4e88(_0x123795,_0x5b7ab7);},'cqofu':function(_0x1518f1,_0x57ffa2,_0xcc44df,_0x8e069f){return _0x1518f1(_0x57ffa2,_0xcc44df,_0x8e069f);},'FFGfL':'local','UuRzK':function(_0x2be046,_0xdb298f){return _0x2be046 instanceof _0xdb298f;}};if(!_0x49b7c9['ZoChC'](findGitRoot)&&_0x49b7c9[_0xe72460(0x230)](_0x232ea1?.['scope'],_0xe72460(0x221)))return console[_0xe72460(0x1f0)]('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x35ee99=_0x232ea1?.['scope']===_0x49b7c9['QtEjT']?getRangerHomeDir():undefined;if(_0x49b7c9[_0xe72460(0x216)](findExistingEnv,_0xe72460(0x24d),{'locations':[_0xe72460(0x24d)],'rangerDir':_0x35ee99}))return console[_0xe72460(0x1f0)](_0xe72460(0x20f)),{'ready':!![],'skipped':![]};try{return await _0x49b7c9[_0xe72460(0x1fe)](addEnv,_0x49b7c9[_0xe72460(0x1ea)],{'url':_0x232ea1?.['url'],'force':_0x232ea1?.[_0xe72460(0x1fc)],'allowInsecureLocalhost':_0x232ea1?.['allowInsecureLocalhost'],'scope':_0x232ea1?.['scope']},_0x551b03),{'ready':!![],'skipped':![]};}catch(_0x28b6d1){return console[_0xe72460(0x204)](_0xe72460(0x201),_0x49b7c9[_0xe72460(0x23b)](_0x28b6d1,Error)?_0x28b6d1['message']:_0x28b6d1),{'ready':![],'skipped':![]};}}export async function start(_0x35c0ee,_0xb75ce8,_0x134903){const _0x580b4e=_0x318988,_0x48a8ef={'yxPCm':function(_0x611a84,_0x402d40){return _0x611a84!==_0x402d40;},'kIuRW':function(_0x5ce795,_0x29a3a0){return _0x5ce795(_0x29a3a0);},'BuXOK':'user','jNyOW':'skipped','VArvc':_0x580b4e(0x214),'ImjSq':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','qEBTW':'chromium','zBbcw':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','HnjsD':_0x580b4e(0x1e8),'BBXVU':_0x580b4e(0x1fa),'RBSgD':function(_0x1ebe01,_0x4564dd,_0x4c6dca){return _0x1ebe01(_0x4564dd,_0x4c6dca);},'aenmN':function(_0x2aa452){return _0x2aa452();},'FQwVN':function(_0x1ca4d0,_0xadd1c5){return _0x1ca4d0 instanceof _0xadd1c5;},'dViTS':function(_0x29a5e1,_0x41361c){return _0x29a5e1(_0x41361c);},'yIxsK':_0x580b4e(0x237),'cFzJv':function(_0x505ef4,_0x4a524c,_0x3e1bae){return _0x505ef4(_0x4a524c,_0x3e1bae);},'EZsUR':function(_0x13bf52,_0x59ca97){return _0x13bf52+_0x59ca97;},'kEfUw':'ranger\x20profile\x20add\x20<name>','LPVxx':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','yhWRI':'/ranger:enable'};console['log'](_0x580b4e(0x1f8));_0x48a8ef[_0x580b4e(0x212)](_0xb75ce8?.['scope'],undefined)&&_0xb75ce8['scope']!=='user'&&(console['error'](_0x580b4e(0x227)+_0x48a8ef[_0x580b4e(0x200)](String,_0xb75ce8['scope'])+_0x580b4e(0x215)+_0x580b4e(0x236)+'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.'),process[_0x580b4e(0x21b)](0x1));_0xb75ce8={..._0xb75ce8,'scope':_0x48a8ef['BuXOK']};const _0xc83835=!existsSync(getRangerHomeDir());await ensureRangerDir(_0x48a8ef[_0x580b4e(0x1e6)]);if(_0xb75ce8?.['skipAuth'])console[_0x580b4e(0x1f0)](_0x580b4e(0x1fd)),_0x134903?.['trackPhaseEnd']('auth',{'isFirstRun':_0xc83835,'method':_0x48a8ef['jNyOW']});else{_0x134903?.['trackPhaseStart'](_0x48a8ef['VArvc']);const _0x3e3c88=await _0x48a8ef[_0x580b4e(0x200)](authenticate,_0x35c0ee);_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['VArvc'],{'isFirstRun':_0xc83835,'method':_0x3e3c88['method']});}_0x134903?.[_0x580b4e(0x21a)]('chromium');_0xb75ce8?.[_0x580b4e(0x21e)]?console['log'](_0x48a8ef['ImjSq']):await ensureChromium(_0xb75ce8?.[_0x580b4e(0x222)]);_0x134903?.['trackPhaseEnd'](_0x48a8ef[_0x580b4e(0x234)],{'isFirstRun':_0xc83835,'skipped':!!_0xb75ce8?.['skipChromium']}),console[_0x580b4e(0x1f0)](_0x48a8ef['zBbcw']);const _0x6ea95d=_0xb75ce8?.[_0x580b4e(0x232)],_0xcf41f4=_0xb75ce8?.['opencode']??![];let _0x4d99b7=null;_0xcf41f4?(_0x134903?.['trackPhaseStart'](_0x48a8ef[_0x580b4e(0x240)]),_0x4d99b7=await ensureOpencodePluginConfig(_0x6ea95d),_0x134903?.['trackPhaseEnd']('plugin',{'isFirstRun':_0xc83835,'opencode':!![]})):(_0x134903?.['trackPhaseStart'](_0x48a8ef['HnjsD']),await ensureClaudePlugin(_0x6ea95d),_0x134903?.['trackPhaseEnd'](_0x580b4e(0x1e8),{'isFirstRun':_0xc83835}));if(_0xcf41f4&&_0x4d99b7){_0x134903?.['trackPhaseStart'](_0x48a8ef[_0x580b4e(0x1f1)]);try{await _0x48a8ef[_0x580b4e(0x203)](installSkill,_0x580b4e(0x239),{'level':_0x4d99b7[_0x580b4e(0x232)],'cliVersion':_0x48a8ef[_0x580b4e(0x249)](getCurrentVersion),'platform':_0x580b4e(0x23a)}),_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['BBXVU'],{'isFirstRun':_0xc83835,'opencode':!![]});}catch(_0x344316){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x48a8ef[_0x580b4e(0x1e5)](_0x344316,Error)?_0x344316[_0x580b4e(0x235)]:_0x344316),_0x134903?.[_0x580b4e(0x22b)](_0x580b4e(0x1fa),{'isFirstRun':_0xc83835,'opencode':!![],'failed':!![]});}}else _0x134903?.['trackPhaseStart']('skills'),await _0x48a8ef['dViTS'](ensureClaudeSkills,_0x6ea95d),_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['BBXVU'],{'isFirstRun':_0xc83835});if(_0xb75ce8?.[_0x580b4e(0x248)])console['log']('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0xb75ce8?.[_0x580b4e(0x24a)]){_0x134903?.[_0x580b4e(0x21a)](_0x48a8ef['yIxsK']);const _0x3df19f=await _0x48a8ef['cFzJv'](ensureLocalEnv,{'url':_0xb75ce8[_0x580b4e(0x24a)],'force':_0xb75ce8?.[_0x580b4e(0x1fc)],'allowInsecureLocalhost':_0xb75ce8?.['allowInsecureLocalhost'],'scope':_0x48a8ef['BuXOK']},_0x134903);_0x134903?.['trackPhaseEnd'](_0x48a8ef[_0x580b4e(0x1e1)],{'isFirstRun':_0xc83835,'profileReady':_0x3df19f['ready'],'userSkipped':_0x3df19f[_0x580b4e(0x21c)]});}else console['log'](_0x48a8ef[_0x580b4e(0x209)](_0x580b4e(0x1ec)+('\x0a\x20\x20'+bold(_0x48a8ef['kEfUw']))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)',_0x580b4e(0x217))+_0x580b4e(0x231));}if(_0xcf41f4)console[_0x580b4e(0x1f0)](_0x580b4e(0x211)),console[_0x580b4e(0x1f0)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x580b4e(0x1f0)](_0x48a8ef['LPVxx']),console[_0x580b4e(0x1f0)](_0x580b4e(0x202));else{const _0x25ede5=bold(_0x48a8ef[_0x580b4e(0x1e4)]);console['log'](_0x48a8ef[_0x580b4e(0x209)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x25ede5+_0x580b4e(0x1f6),_0x580b4e(0x1f2))+_0x580b4e(0x1e9)+_0x580b4e(0x1f9));}}function _0x218f(){const _0x5dbdab=['EZsUR','You\x20can\x20install\x20it\x20manually\x20by\x20running:','11300730mGIuPg','1.58.2','playwright@','3286386lcHPxa','✓\x20Local\x20profile\x20already\x20exists','59192sxyuoj','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','yxPCm','VZtJM','auth','\x20is\x20no\x20longer\x20supported.\x20','NlpWD','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','The\x20required\x20version\x20(','7noZSrw','trackPhaseStart','exit','skipped','isTTY','skipChromium','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','user','withDeps','organizationName','27TqFIla','176116FXVDqZ','confirm','ranger\x20setup\x20--scope=','prompt','wvTfh','✓\x20Already\x20authenticated\x20to\x20','trackPhaseEnd','yFScO','status','\x20now?','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','aSujL','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','scope','...','qEBTW','message','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','profile','20TZXrGM','ranger','opencode','UuRzK','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','UaevO','✓\x20Created\x20.ranger/.gitignore','hgKpR','HnjsD','RBXFV','executablePath','version','success','2688328glrnDq','SUgik','\x1b[1m','skipAuth','aenmN','url','GITHUB_ENV','1761390DZWTeP','local','close','yIxsK','DQpDe','platform','yhWRI','FQwVN','BuXOK','\x20(fallback\x20version)','plugin','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FFGfL','orByt','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x20\x20npx\x20playwright@','\x20install\x20chromium','✓\x20Playwright\x20Chromium\x20browser\x20found','log','BBXVU','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','IrgtJ','inherit','✓\x20~/.ranger/\x20directory\x20already\x20exists','\x20and\x20prompt\x20the\x20coding','existing_token','\x0a🚀\x20Ranger\x20Setup\x0a','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','skills','72886nuzntw','force','✓\x20Skipping\x20authentication\x20(--skip-auth)','cqofu','win32','kIuRW','\x0a❌\x20Profile\x20setup\x20failed:','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','RBSgD','error','Authentication\x20failed:\x20','sHQcY','env','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a'];_0x218f=function(){return _0x5dbdab;};return _0x218f();}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(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 _0x56c773=_0x2167;(function(_0x37c788,_0xbf72ef){const _0xd9d674=_0x2167,_0x9e5c16=_0x37c788();while(!![]){try{const _0x195c53=-parseInt(_0xd9d674(0x1a6))/0x1*(parseInt(_0xd9d674(0x177))/0x2)+-parseInt(_0xd9d674(0x1ab))/0x3+parseInt(_0xd9d674(0x17c))/0x4+parseInt(_0xd9d674(0x1a2))/0x5*(parseInt(_0xd9d674(0x1a0))/0x6)+-parseInt(_0xd9d674(0x151))/0x7*(-parseInt(_0xd9d674(0x178))/0x8)+-parseInt(_0xd9d674(0x1aa))/0x9+-parseInt(_0xd9d674(0x15f))/0xa*(parseInt(_0xd9d674(0x161))/0xb);if(_0x195c53===_0xbf72ef)break;else _0x9e5c16['push'](_0x9e5c16['shift']());}catch(_0xf9e910){_0x9e5c16['push'](_0x9e5c16['shift']());}}}(_0x27f8,0x9cf5c));import{readFile,readdir}from'fs/promises';function _0x27f8(){const _0x576572=['filter','ignore','push','gApYF','organizationName','yMTgv','join','opencode','BdLDc','status','length','LYDph','\x0a---\x20Skills\x20---','trim','\x1b[1m','\x1b[0m','isArray','22ypHsdx','9756632cKOQBm','project','QEtfi','\x20[cloud]','4122172yMGNpQ','HzIAd','eQnrf','parse','\x20\x20\x20\x20Settings:\x20','env','\x20\x20\x20\x20','IKLzY','egHzi','scope','OhAaZ','\x20(active)','data','yezJV','JhTeh','includes','gRFag','mmdff','BhIao','\x20(up\x20to\x20date)','\x20[local]','Root:\x20','PfLrO','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','qiWqo',':\x20installed\x20(','hasEncryptedAuth','version','not_configured','luvdU','uECzS','configured','ranger@trailhead','displayName','some','\x20\x20Run:\x20ranger\x20setup\x20[token]','3930VPzrIU','\x20plugin(s)\x20configured','3460YJUsCU','gPffp','\x20local','(not\x20found)','88549avpvAv','nfIOH','close','plugin','8110494hHTSVj','164697hxrTMj','sessionUpdatedAt','unknown','user','settingsPath','upAgc','debug','\x20\x20Project-level:','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','mAmmD','pbjiI','stderr','utf-8','\x0a---\x20OpenCode\x20Plugin\x20---','encrypted','\x20\x20\x20\x20Session:\x20','DUAaK','JbRhM','DEBUG','\x1b]8;;file://','stdout','Organization:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','7yrMTkm','details','pyWVa','API\x20Environment:\x20','Version:\x20','disabled','path','auth.json','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','error','No\x20profiles\x20configured','Fttuf','\x20\x20Active:\x20','name','100qbvNRS','log','143407oWgxtK','map','\x20\x20Not\x20configured','config','JGWMm'];_0x27f8=function(){return _0x576572;};return _0x27f8();}import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x55a115=>_0x56c773(0x174)+_0x55a115+_0x56c773(0x175),link=(_0x52cb55,_0x17a6c3)=>_0x56c773(0x14d)+_0x52cb55+'\x07'+(_0x17a6c3||_0x52cb55)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1526ae=_0x56c773,_0x1b7c8c={'OhAaZ':function(_0x25f28d,_0x16d48a){return _0x25f28d>_0x16d48a;},'VvATh':function(_0x4ee501,_0x193487){return _0x4ee501(_0x193487);},'cUlht':function(_0x2d2c77,_0xe74e25,_0x599600,_0x16eb55){return _0x2d2c77(_0xe74e25,_0x599600,_0x16eb55);},'egHzi':_0x1526ae(0x1b1),'uECzS':'pipe','BdLDc':_0x1526ae(0x1a8)};return new Promise(_0x2f3af2=>{const _0xa9b130=_0x1526ae,_0x12d7e1={'yMTgv':_0xa9b130(0x19b),'QEtfi':function(_0x4ce91d,_0x142a49){const _0x392645=_0xa9b130;return _0x1b7c8c[_0x392645(0x186)](_0x4ce91d,_0x142a49);},'luvdU':function(_0x1cc376,_0x35d875){return _0x1cc376>_0x35d875;},'LYDph':function(_0x54c7e0,_0x46e7f1){return _0x1b7c8c['VvATh'](_0x54c7e0,_0x46e7f1);}},_0x565cd0=_0x1b7c8c['cUlht'](spawn,_0xa9b130(0x16d),[_0x1b7c8c[_0xa9b130(0x184)],_0xa9b130(0x164)],{'stdio':[_0xa9b130(0x167),_0x1b7c8c[_0xa9b130(0x19a)],_0x1b7c8c[_0xa9b130(0x19a)]]});let _0x51cb2c='';_0x565cd0[_0xa9b130(0x14e)]?.['on']('data',_0x31985e=>{_0x51cb2c+=_0x31985e['toString']();}),_0x565cd0[_0xa9b130(0x1b6)]?.['on'](_0xa9b130(0x188),_0x5c4d45=>{_0x51cb2c+=_0x5c4d45['toString']();}),_0x565cd0['on'](_0xa9b130(0x15a),()=>{_0x2f3af2({'status':'not_installed'});}),_0x565cd0['on'](_0x1b7c8c[_0xa9b130(0x16e)],_0x90c655=>{const _0x11f3f0=_0xa9b130,_0x530549={'BhIao':'opencode-plugin'};if(_0x90c655!==0x0){_0x2f3af2({'status':'not_installed'});return;}const _0x45691f=_0x51cb2c[_0x11f3f0(0x173)]();let _0xd992c0=null;if(_0x45691f)try{_0xd992c0=JSON['parse'](_0x45691f);}catch{const _0x5117ff=_0x45691f['match'](/\{[\s\S]*\}$/);if(_0x5117ff)try{_0xd992c0=JSON[_0x11f3f0(0x17f)](_0x5117ff[0x0]);}catch{_0xd992c0=null;}}const _0x287d68=Array[_0x11f3f0(0x176)](_0xd992c0?.[_0x11f3f0(0x1a9)])?_0xd992c0?.[_0x11f3f0(0x1a9)]:[],_0x48117e=_0x287d68[_0x11f3f0(0x19e)](_0x541f82=>{const _0xcf0ba2=_0x11f3f0;if(typeof _0x541f82!=='string')return![];return _0x541f82[_0xcf0ba2(0x18b)]('@ranger-testing/opencode-plugin')||_0x541f82['includes'](_0x530549[_0xcf0ba2(0x18e)]);});if(_0x48117e){_0x2f3af2({'status':_0x12d7e1[_0x11f3f0(0x16b)],'details':_0x12d7e1[_0x11f3f0(0x17a)](_0x287d68['length'],0x0)?_0x287d68['length']+_0x11f3f0(0x1a1):undefined});return;}if(_0x12d7e1[_0x11f3f0(0x199)](_0x287d68['length'],0x0)){_0x12d7e1[_0x11f3f0(0x171)](_0x2f3af2,{'status':'not_configured','details':_0x287d68['length']+'\x20plugin(s)\x20configured'});return;}_0x2f3af2({'status':_0x11f3f0(0x198)});});});}async function getSkillsFromDir(_0x4f9d59,_0x3f3958){const _0x32d2ec=_0x56c773,_0xd3fff9={'JGWMm':function(_0x4c5956,_0x2b3192){return _0x4c5956(_0x2b3192);},'gRFag':function(_0x4d6ee9,_0x2ceeed,_0x17c883){return _0x4d6ee9(_0x2ceeed,_0x17c883);},'yPvvK':'SKILL.md','eDxQr':function(_0x346208,_0x5cd9bb){return _0x346208(_0x5cd9bb);},'PfLrO':_0x32d2ec(0x1b7)};if(!_0xd3fff9[_0x32d2ec(0x165)](existsSync,_0x4f9d59))return[];const _0x39843e=[];try{const _0x2416a2=await _0xd3fff9[_0x32d2ec(0x18c)](readdir,_0x4f9d59,{'withFileTypes':!![]});for(const _0x3e84a0 of _0x2416a2){if(_0x3e84a0['isDirectory']()){const _0x45c3fb=join(_0x4f9d59,_0x3e84a0['name'],_0xd3fff9['yPvvK']);if(_0xd3fff9['eDxQr'](existsSync,_0x45c3fb)){let _0x396c88=_0x3e84a0['name'];try{const _0xfd890a=await readFile(_0x45c3fb,_0xd3fff9[_0x32d2ec(0x192)]),_0x220bd1=_0xfd890a['match'](/name:\s*(.+)/);_0x220bd1&&(_0x396c88=_0x220bd1[0x1][_0x32d2ec(0x173)]());}catch{}_0x39843e['push']({'name':_0x3e84a0['name'],'displayName':_0x396c88,'path':_0x45c3fb,'level':_0x3f3958});}}}}catch{return[];}return _0x39843e;}async function getInstalledSkills(){const _0x4e4ba1=_0x56c773,_0x2c993a={'HzIAd':function(_0x378ed4,_0x5b5a6a,_0x5a9c4e){return _0x378ed4(_0x5b5a6a,_0x5a9c4e);},'mAmmD':_0x4e4ba1(0x179),'pbjiI':function(_0x5e0737){return _0x5e0737();}},[_0x1fdcf3,_0x616db0]=await Promise['all']([_0x2c993a[_0x4e4ba1(0x17d)](getSkillsFromDir,getProjectSkillsDir(),_0x2c993a[_0x4e4ba1(0x1b4)]),getSkillsFromDir(_0x2c993a[_0x4e4ba1(0x1b5)](getUserSkillsDir),_0x4e4ba1(0x1ae))]);return{'project':_0x1fdcf3,'user':_0x616db0};}function _0x2167(_0x24ac71,_0x489e1e){_0x24ac71=_0x24ac71-0x148;const _0x27f8e3=_0x27f8();let _0x216727=_0x27f8e3[_0x24ac71];return _0x216727;}async function getEnvironments(){const _0x5f5cf6=_0x56c773,_0x432e2f={'eQnrf':function(_0x40bf6e,_0x52df65){return _0x40bf6e(_0x52df65);},'pyWVa':function(_0x503445,_0x2042fc,_0x54a018){return _0x503445(_0x2042fc,_0x54a018);},'gApYF':_0x5f5cf6(0x158),'mnMGH':'auth.json.enc','gPffp':function(_0x35c27b,_0x5ca6ab){return _0x35c27b(_0x5ca6ab);}},{envNames:_0x48be11,activeEnv:_0x35f3aa}=await getEnvNames(),_0x122e25=getRangerDir();if(!_0x432e2f[_0x5f5cf6(0x1a3)](existsSync,_0x122e25))return{'envs':[],'activeEnv':null};const _0x2e4616=_0x48be11[_0x5f5cf6(0x162)](_0x5a68f9=>{const _0x5d7483=_0x5f5cf6,_0x28b296=_0x432e2f[_0x5d7483(0x17e)](getEnvDir,_0x5a68f9),_0x3b4dca=_0x432e2f[_0x5d7483(0x153)](join,_0x28b296,'settings.json'),_0x3e1ea0=join(_0x28b296,_0x432e2f[_0x5d7483(0x169)]),_0x2dbf0e=join(_0x28b296,_0x432e2f['mnMGH']);return{'name':_0x5a68f9,'settingsPath':existsSync(_0x3b4dca)?_0x3b4dca:_0x5d7483(0x1a5),'hasPlaintextAuth':_0x432e2f['eQnrf'](existsSync,_0x3e1ea0),'hasEncryptedAuth':existsSync(_0x2dbf0e),'isActive':_0x5a68f9===_0x35f3aa};});return{'envs':_0x2e4616,'activeEnv':_0x35f3aa};}export async function status(){const _0x39b9de=_0x56c773,_0x2bd72b={'UqWQR':function(_0x5218d3,_0x4a2fa8,_0x149740){return _0x5218d3(_0x4a2fa8,_0x149740);},'icrAY':function(_0x26d66e){return _0x26d66e();},'JhTeh':function(_0x5654c0){return _0x5654c0();},'qiWqo':function(_0xcab379,_0x5ac238){return _0xcab379(_0x5ac238);},'upAgc':'@ranger-testing/opencode-plugin','GBgjk':_0x39b9de(0x198),'mmdff':_0x39b9de(0x19c),'yezJV':_0x39b9de(0x156),'oIQih':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','DUAaK':function(_0x5c7a73,_0x22e4c3){return _0x5c7a73+_0x22e4c3;},'YZhMO':function(_0x2377c7,_0x3d8227){return _0x2377c7===_0x3d8227;},'tLFuT':function(_0x3c0c4c,_0x40c0ef){return _0x3c0c4c>_0x40c0ef;},'JbRhM':'\x20\x20User-level:','tOqXt':function(_0x3aaa21,_0x4288d2){return _0x3aaa21(_0x4288d2);},'gObLH':function(_0x350f4d,_0x5d7eb6){return _0x350f4d(_0x5d7eb6);},'zHLJp':_0x39b9de(0x15b),'htLEC':function(_0x1ae1f5,_0x2a6b93){return _0x1ae1f5>_0x2a6b93;},'nfIOH':function(_0x21b4eb,_0x5138f1){return _0x21b4eb(_0x5138f1);},'XRFIe':'no\x20session','IKLzY':_0x39b9de(0x187),'WSIRQ':_0x39b9de(0x148),'bdhws':'plaintext','Fttuf':'none','fnyLw':function(_0x1b8060,_0x41d94c){return _0x1b8060!==_0x41d94c;}};console[_0x39b9de(0x160)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x4e07d5=process['cwd'](),_0x567fd5=getRangerDir();if(!existsSync(_0x567fd5)){console[_0x39b9de(0x160)](_0x39b9de(0x191)+_0x2bd72b['UqWQR'](link,_0x4e07d5,bold(basename(_0x4e07d5)))),console[_0x39b9de(0x160)](_0x39b9de(0x159)),console[_0x39b9de(0x160)](_0x39b9de(0x1b3));return;}console['log']('Root:\x20'+_0x2bd72b['UqWQR'](link,_0x4e07d5,bold(basename(_0x4e07d5))));const _0x4d6d23=_0x2bd72b['icrAY'](getCurrentVersion),_0x3a8099=_0x2bd72b[_0x39b9de(0x18a)](getLatestVersion);if(_0x3a8099['version']&&_0x3a8099[_0x39b9de(0x197)]!==_0x4d6d23)console['log']('Version:\x20'+_0x4d6d23+'\x20(latest:\x20'+_0x3a8099['version']+')'),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20update');else _0x3a8099['version']?console['log'](_0x39b9de(0x155)+_0x4d6d23+_0x39b9de(0x18f)):console['log']('Version:\x20'+_0x4d6d23);const _0x41ba18=await _0x2bd72b[_0x39b9de(0x18a)](getToken);if(_0x41ba18){const _0x1e654b=await getCurrentUser(_0x41ba18);_0x1e654b['success']?console['log'](_0x39b9de(0x14f)+_0x2bd72b[_0x39b9de(0x194)](bold,_0x1e654b[_0x39b9de(0x1ae)][_0x39b9de(0x16a)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x39b9de(0x160)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x39b9de(0x19f));process[_0x39b9de(0x181)][_0x39b9de(0x14c)]&&(console['log'](_0x39b9de(0x154)+getCurrentEnvironment()),console[_0x39b9de(0x160)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x39b9de(0x160)](_0x39b9de(0x1b8));const _0x5bcd5c=await getOpencodePluginStatus();if(_0x5bcd5c['status']===_0x39b9de(0x19b))console['log']('\x20\x20'+bold(_0x2bd72b[_0x39b9de(0x1b0)])+':\x20configured'),_0x5bcd5c['details']&&console['log']('\x20\x20'+_0x5bcd5c['details']);else _0x5bcd5c[_0x39b9de(0x16f)]===_0x2bd72b['GBgjk']?(console['log'](_0x39b9de(0x163)),_0x5bcd5c[_0x39b9de(0x152)]&&console[_0x39b9de(0x160)]('\x20\x20'+_0x5bcd5c[_0x39b9de(0x152)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x39b9de(0x160)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x37d74d=await getPluginInfo(_0x2bd72b['mmdff']);if(_0x37d74d){const _0x14d2ac=_0x37d74d[_0x39b9de(0x185)]||_0x39b9de(0x1ad),_0x68ac40=_0x37d74d['enabled']?'enabled':_0x2bd72b[_0x39b9de(0x189)];console['log']('\x20\x20'+bold(_0x2bd72b[_0x39b9de(0x18d)])+_0x39b9de(0x195)+_0x14d2ac+',\x20'+_0x68ac40+')');}else console[_0x39b9de(0x160)]('\x20\x20Not\x20installed'),console[_0x39b9de(0x160)](_0x2bd72b['oIQih']);console[_0x39b9de(0x160)](_0x39b9de(0x172));const {project:_0x621b1f,user:_0x5eb31a}=await _0x2bd72b[_0x39b9de(0x18a)](getInstalledSkills),_0x3af0a9=_0x621b1f[_0x39b9de(0x166)](_0x3d2508=>RANGER_MANAGED_SKILLS['includes'](_0x3d2508['name'])),_0x49ef00=_0x5eb31a[_0x39b9de(0x166)](_0x441574=>RANGER_MANAGED_SKILLS[_0x39b9de(0x18b)](_0x441574['name'])),_0x4515c7=_0x2bd72b[_0x39b9de(0x14a)](_0x3af0a9['length'],_0x49ef00['length']);if(_0x2bd72b['YZhMO'](_0x4515c7,0x0))console[_0x39b9de(0x160)]('No\x20skills\x20installed'),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3af0a9[_0x39b9de(0x170)]>0x0){console['log'](_0x39b9de(0x1b2));for(const _0x4b4d95 of _0x3af0a9){console[_0x39b9de(0x160)](_0x39b9de(0x182)+_0x2bd72b[_0x39b9de(0x194)](bold,_0x4b4d95[_0x39b9de(0x19d)])+':\x20'+link(_0x4b4d95['path'],_0x2bd72b[_0x39b9de(0x194)](basename,_0x4b4d95['path'])));}}if(_0x2bd72b['tLFuT'](_0x49ef00['length'],0x0)){console['log'](_0x2bd72b[_0x39b9de(0x14b)]);for(const _0x5482e7 of _0x49ef00){console['log'](_0x39b9de(0x182)+_0x2bd72b['tOqXt'](bold,_0x5482e7['displayName'])+':\x20'+link(_0x5482e7['path'],_0x2bd72b['gObLH'](basename,_0x5482e7[_0x39b9de(0x157)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x4460f8,activeEnv:_0x477c09}=await getEnvironments();let _0x367324=[];if(_0x41ba18)try{_0x367324=await listCloudProfiles();}catch{}const _0x2a1323=_0x4460f8[_0x39b9de(0x170)]+_0x367324[_0x39b9de(0x170)];if(_0x2a1323===0x0)console['log'](_0x2bd72b['zHLJp']),console[_0x39b9de(0x160)](_0x39b9de(0x193));else{if(_0x2a1323>0x5){const _0x31718c=[];_0x367324[_0x39b9de(0x170)]>0x0&&_0x31718c['push'](_0x367324[_0x39b9de(0x170)]+'\x20cloud'),_0x2bd72b['htLEC'](_0x4460f8['length'],0x0)&&_0x31718c[_0x39b9de(0x168)](_0x4460f8[_0x39b9de(0x170)]+_0x39b9de(0x1a4)),console['log'](_0x2a1323+'\x20profiles\x20configured\x20('+_0x31718c[_0x39b9de(0x16c)](',\x20')+')'),_0x477c09&&console['log'](_0x39b9de(0x15d)+_0x2bd72b[_0x39b9de(0x1a7)](bold,_0x477c09)),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x574de5 of _0x367324){const _0xf352d1=_0x574de5['name']===_0x477c09?_0x39b9de(0x187):'';console['log']('\x20\x20'+bold(_0x574de5['name'])+_0x39b9de(0x17b)+_0xf352d1);const _0x510661=_0x574de5[_0x39b9de(0x1ac)]?'cached\x20(updated\x20'+_0x574de5['sessionUpdatedAt']+')':_0x2bd72b['XRFIe'];console['log'](_0x39b9de(0x149)+_0x510661);}const _0x5043cc=new Set(_0x367324['map'](_0x1aa423=>_0x1aa423[_0x39b9de(0x15e)]));for(const _0x1a4229 of _0x4460f8){if(_0x5043cc['has'](_0x1a4229[_0x39b9de(0x15e)]))continue;const _0x4bc58e=_0x1a4229['isActive']?_0x2bd72b[_0x39b9de(0x183)]:'',_0x3d8b67=_0x1a4229[_0x39b9de(0x196)]?_0x2bd72b['WSIRQ']:_0x1a4229['hasPlaintextAuth']?_0x2bd72b['bdhws']:_0x2bd72b[_0x39b9de(0x15c)];console[_0x39b9de(0x160)]('\x20\x20'+_0x2bd72b['gObLH'](bold,_0x1a4229[_0x39b9de(0x15e)])+_0x39b9de(0x190)+_0x4bc58e),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x3d8b67),_0x2bd72b['fnyLw'](_0x1a4229[_0x39b9de(0x1af)],_0x39b9de(0x1a5))&&console[_0x39b9de(0x160)](_0x39b9de(0x180)+link(_0x1a4229[_0x39b9de(0x1af)],_0x2bd72b['tOqXt'](basename,_0x1a4229['settingsPath'])));}if(!_0x477c09){console['log'](_0x39b9de(0x150));const _0x59f36f=[..._0x367324['map'](_0x344b0b=>_0x344b0b['name']),..._0x4460f8[_0x39b9de(0x166)](_0x391f66=>!_0x5043cc['has'](_0x391f66[_0x39b9de(0x15e)]))['map'](_0x190d21=>_0x190d21['name'])];console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x59f36f[_0x39b9de(0x16c)](',\x20')+')');}}}console[_0x39b9de(0x160)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(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
|
+
const _0x5f5c44=_0x1c56;(function(_0x215eb5,_0x37edaa){const _0x2ec9f9=_0x1c56,_0x3c9fb3=_0x215eb5();while(!![]){try{const _0x480042=parseInt(_0x2ec9f9(0x12c))/0x1+-parseInt(_0x2ec9f9(0x147))/0x2*(-parseInt(_0x2ec9f9(0x120))/0x3)+parseInt(_0x2ec9f9(0x11e))/0x4*(-parseInt(_0x2ec9f9(0x127))/0x5)+-parseInt(_0x2ec9f9(0x141))/0x6*(parseInt(_0x2ec9f9(0x169))/0x7)+-parseInt(_0x2ec9f9(0x160))/0x8*(-parseInt(_0x2ec9f9(0x143))/0x9)+-parseInt(_0x2ec9f9(0x129))/0xa*(-parseInt(_0x2ec9f9(0x15c))/0xb)+-parseInt(_0x2ec9f9(0x130))/0xc;if(_0x480042===_0x37edaa)break;else _0x3c9fb3['push'](_0x3c9fb3['shift']());}catch(_0x288f7b){_0x3c9fb3['push'](_0x3c9fb3['shift']());}}}(_0x50f6,0xd205d));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x1c56(_0x33d3c6,_0x4a5649){_0x33d3c6=_0x33d3c6-0x118;const _0x50f6e4=_0x50f6();let _0x1c5651=_0x50f6e4[_0x33d3c6];return _0x1c5651;}const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x14dcfb,_0x2b25b2,_0x3268e4){const _0x3238a8={'rGAre':function(_0x54f08c,_0x2d81a0){return _0x54f08c(_0x2d81a0);},'ctvCt':function(_0x287252,_0x2142c9,_0x238672,_0x3a7465){return _0x287252(_0x2142c9,_0x238672,_0x3a7465);},'spTcS':'win32','SkOzu':function(_0x54d6b0,_0x142b28,_0x1d5ed3){return _0x54d6b0(_0x142b28,_0x1d5ed3);},'lPZkW':'error'};return new Promise(_0x318d4d=>{const _0xdadd42=_0x1c56;let _0x5933c1=![],_0x194fec;const _0x521580=_0x531f90=>{if(_0x5933c1)return;_0x5933c1=!![],_0x194fec&&clearTimeout(_0x194fec),_0x318d4d(_0x531f90);},_0x4791ff=_0x3238a8['ctvCt'](spawn,_0x14dcfb,_0x2b25b2,{'stdio':[_0xdadd42(0x11d),_0x3268e4?.['stdio']??_0xdadd42(0x13c),_0x3268e4?.['stdio']??_0xdadd42(0x13c)],'cwd':_0x3268e4?.[_0xdadd42(0x12b)],'shell':process[_0xdadd42(0x132)]===_0x3238a8['spTcS']});_0x194fec=_0x3268e4?.[_0xdadd42(0x16f)]?_0x3238a8[_0xdadd42(0x161)](setTimeout,()=>{const _0x4bd74f=_0xdadd42;_0x4791ff[_0x4bd74f(0x15b)](),_0x4791ff[_0x4bd74f(0x11f)](),_0x521580(![]);},_0x3268e4[_0xdadd42(0x16f)]):undefined,_0x4791ff['on']('close',_0x4bf1a7=>{const _0x15b9e2=_0xdadd42;_0x3238a8[_0x15b9e2(0x171)](_0x521580,_0x4bf1a7===0x0);}),_0x4791ff['on'](_0x3238a8[_0xdadd42(0x14c)],()=>{_0x3238a8['rGAre'](_0x521580,![]);});});}export function resolveDistTag(_0x5a9748){const _0x2ff8b8=_0x1c56,_0xff965={'mapPq':_0x2ff8b8(0x139),'DnqtS':_0x2ff8b8(0x136)};if(/-alpha\./i['test'](_0x5a9748))return _0xff965['mapPq'];if(/-beta\./i['test'](_0x5a9748))return'beta';if(/-rc\./i[_0x2ff8b8(0x170)](_0x5a9748))return'rc';return _0xff965[_0x2ff8b8(0x149)];}async function runInstall(_0x5c90dd=_0x5f5c44(0x136)){const _0x24f6cc=_0x5f5c44,_0x1e906f={'YunDX':function(_0x2dcd29,_0x3f3ea6){return _0x2dcd29(_0x3f3ea6);},'cbbUY':function(_0x305003,_0x259d8f,_0x57f455,_0x323bd7){return _0x305003(_0x259d8f,_0x57f455,_0x323bd7);},'xbSHD':'npm','ZINeU':_0x24f6cc(0x119),'AsfHh':_0x24f6cc(0x11d),'OAVRG':_0x24f6cc(0x13c)};return new Promise(_0x24d72f=>{const _0x3ca8c5=_0x24f6cc,_0x2d7b0c={'qTsXj':function(_0xf71d13,_0x38987f){const _0x4c669a=_0x1c56;return _0x1e906f[_0x4c669a(0x12f)](_0xf71d13,_0x38987f);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x5c90dd+'...\x0a');const _0x3f44a4=_0x1e906f['cbbUY'](spawn,_0x1e906f[_0x3ca8c5(0x14e)],[_0x1e906f[_0x3ca8c5(0x13a)],'-g',PACKAGE_NAME+'@'+_0x5c90dd],{'stdio':[_0x1e906f['AsfHh'],_0x1e906f['OAVRG'],_0x1e906f['OAVRG']],'shell':process[_0x3ca8c5(0x132)]===_0x3ca8c5(0x165)});_0x3f44a4['on']('close',_0x27476e=>{_0x2d7b0c['qTsXj'](_0x24d72f,_0x27476e===0x0);}),_0x3f44a4['on'](_0x3ca8c5(0x13f),()=>{_0x24d72f(![]);});});}function _0x50f6(){const _0x538d79=[')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','...','SrxuY','version','SvdGy','Update\x20failed\x20for\x20@','JtTKi','nomjJ','project','.gitignore','kill','2969791kTgIQf','adpuR','\x20skill\x20','raboR','1696AxGHfp','SkOzu','urptM','SFnNw','\x0aSuccessfully\x20updated\x20to\x20version\x20','win32','YqeBq','trim','gsmiS','795557mWOFxH','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','findIndex','local','\x0a✅\x20Update\x20complete!','BhOpP','timeoutMs','test','rGAre','rOxCb','MNtnA','install',').\x20Staying\x20on\x20','uEXLx','length','ignore','668RsCGHB','unref','71427vqXOYP','Checking\x20for\x20updates...','--scope','user','ralJF','Claude\x20plugin\x20update\x20failed\x20for\x20','log','35965hWStKP','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','10fFVZmD','ixzNx','cwd','790655zgBLlS','ranger@trailhead','EFogH','YunDX','2269488zjWfxe','push','platform','BHsYP','\x20—\x20reinstalling\x20@','opencode','latest','Attempting\x20install\x20anyway...','GZfUW','alpha','ZINeU','Latest\x20version:\x20\x20','inherit','plugin','trailhead','error','endsWith','18iwlexo','SssBM','27594PsHaSK','SujIF','warn','lCxEA','74ekqcRA','utf-8','DnqtS','rxlUz','join','lPZkW','OJkWY','xbSHD','active-feature.txt','lmJJL'];_0x50f6=function(){return _0x538d79;};return _0x50f6();}async function updateClaudeMarketplace(){const _0x35cc72=_0x5f5c44,_0xa5625c={'OJkWY':_0x35cc72(0x13d),'RjCId':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x3c79c6=await runCommand('claude',[_0xa5625c[_0x35cc72(0x14d)],'marketplace','update',_0x35cc72(0x13e)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x3c79c6)throw new Error(_0xa5625c['RjCId']);}async function updateClaudePlugin(_0x16d881='user'){const _0x50b57f=_0x5f5c44,_0x1b2b5a={'SssBM':_0x50b57f(0x13d),'urptM':_0x50b57f(0x12d),'MNtnA':function(_0x4abb70,_0xbb4835){return _0x4abb70!==_0xbb4835;},'SrxuY':_0x50b57f(0x122),'ralJF':function(_0x4078e2,_0x5b89cb,_0x179c47,_0x334927){return _0x4078e2(_0x5b89cb,_0x179c47,_0x334927);},'lCxEA':'claude','dszqv':_0x50b57f(0x16c)},_0x55aa02=[_0x1b2b5a[_0x50b57f(0x142)],'update',_0x1b2b5a[_0x50b57f(0x162)]];_0x1b2b5a[_0x50b57f(0x118)](_0x16d881,'user')&&_0x55aa02['push'](_0x1b2b5a[_0x50b57f(0x153)],_0x16d881);const _0x1bb7b=await _0x1b2b5a[_0x50b57f(0x124)](runCommand,_0x1b2b5a[_0x50b57f(0x146)],_0x55aa02,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x16d881===_0x50b57f(0x159)||_0x16d881===_0x1b2b5a['dszqv']?getProjectRoot():undefined});if(!_0x1bb7b)throw new Error(_0x50b57f(0x125)+_0x16d881+_0x50b57f(0x128));}function isSkillInstalled(_0xb6270a,_0x2419d4,_0x1ca16d){const _0x56a86e=_0x5f5c44,_0x27d2dc={'raboR':function(_0x452cae,_0x3ae9a7){return _0x452cae(_0x3ae9a7);}},_0x5b964e=_0x1ca16d===_0x56a86e(0x135)?_0x27d2dc[_0x56a86e(0x15f)](getOpencodeSkillsDir,_0x2419d4):getSkillsDir(_0x2419d4),_0x1cc380=join(_0x5b964e,_0xb6270a);return existsSync(_0x1cc380);}async function reinstallSkills(_0xa4f7a3){const _0xdbdc81=_0x5f5c44,_0x34aa4a={'BhOpP':_0xdbdc81(0x159),'EFogH':'claude','lmJJL':_0xdbdc81(0x135),'GZfUW':function(_0x4d1fad,_0x3b1062,_0x5a3304){return _0x4d1fad(_0x3b1062,_0x5a3304);}},_0x118963=[_0x34aa4a[_0xdbdc81(0x16e)],_0xdbdc81(0x123)],_0x1e6a34=[];for(const _0x4673e1 of _0x118963){for(const _0x4ad742 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x4ad742,_0x4673e1,'claude')&&_0x1e6a34[_0xdbdc81(0x131)]({'skillName':_0x4ad742,'level':_0x4673e1,'platform':_0x34aa4a[_0xdbdc81(0x12e)]}),isSkillInstalled(_0x4ad742,_0x4673e1,_0x34aa4a['lmJJL'])&&_0x1e6a34[_0xdbdc81(0x131)]({'skillName':_0x4ad742,'level':_0x4673e1,'platform':_0x34aa4a[_0xdbdc81(0x150)]});}}for(const _0x2db705 of _0x118963){for(const _0x30c907 of DEPRECATED_SKILLS){await _0x34aa4a[_0xdbdc81(0x138)](removeSkill,_0x30c907,_0x2db705);}}if(_0x1e6a34['length']===0x0){console[_0xdbdc81(0x126)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console[_0xdbdc81(0x126)]('\x0aReinstalling\x20'+_0x1e6a34[_0xdbdc81(0x11c)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x272c9b,level:_0x1661b5,platform:_0x51f8be}of _0x1e6a34){try{await installSkill(_0x272c9b,{'level':_0x1661b5,'cliVersion':_0xa4f7a3,'platform':_0x51f8be});}catch(_0x1451e7){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x51f8be+'\x20'+_0x1661b5+_0xdbdc81(0x15e)+_0x272c9b+':',_0x1451e7);}}}async function ensureActiveProfileGitignored(){const _0x3c2943=_0x5f5c44,_0x5d6e82={'YrJzG':function(_0x20a6ed){return _0x20a6ed();},'KaZRD':_0x3c2943(0x15a),'xedAF':function(_0x16b15e,_0xe01bb){return _0x16b15e(_0xe01bb);},'LXVCc':'utf-8','xmUVn':function(_0x513897,_0x12541a){return _0x513897===_0x12541a;},'SZmBH':'active-profile.txt','eNwDD':function(_0x2155d8,_0x48c56f,_0x16a31c,_0x5a618c){return _0x2155d8(_0x48c56f,_0x16a31c,_0x5a618c);}},_0x58c021=join(_0x5d6e82['YrJzG'](getRangerDir),_0x5d6e82['KaZRD']);if(!_0x5d6e82['xedAF'](existsSync,_0x58c021))return![];let _0x3385b2='';try{_0x3385b2=await readFile(_0x58c021,_0x5d6e82['LXVCc']);}catch{return![];}const _0x40d60c=_0x3385b2['split'](/\r?\n/);if(_0x40d60c['some'](_0x507c19=>_0x507c19[_0x3c2943(0x167)]()==='active-profile.txt'))return![];let _0x168d21=_0x40d60c[_0x3c2943(0x16b)](_0x353ca7=>_0x353ca7[_0x3c2943(0x167)]()===_0x3c2943(0x14f));_0x5d6e82['xmUVn'](_0x168d21,-0x1)&&(_0x168d21=_0x40d60c[_0x3c2943(0x11c)]);_0x40d60c['splice'](_0x168d21,0x0,_0x5d6e82['SZmBH']);let _0x16f6d1=_0x40d60c[_0x3c2943(0x14b)]('\x0a');!_0x16f6d1[_0x3c2943(0x140)]('\x0a')&&(_0x16f6d1+='\x0a');try{await _0x5d6e82['eNwDD'](writeFile,_0x58c021,_0x16f6d1,_0x3c2943(0x148));}catch{return![];}return!![];}export async function update(){const _0x5a0a0f=_0x5f5c44,_0x516c78={'SFnNw':function(_0x40e356){return _0x40e356();},'adpuR':_0x5a0a0f(0x121),'iUHuQ':_0x5a0a0f(0x137),'ixzNx':function(_0x5f72cb){return _0x5f72cb();},'nomjJ':function(_0x202710){return _0x202710();},'rOxCb':function(_0x3a3b5c,_0x58cefd){return _0x3a3b5c===_0x58cefd;},'SujIF':function(_0x4812f6,_0x130c7c){return _0x4812f6<_0x130c7c;},'JtTKi':function(_0x4015e0,_0x36c63d){return _0x4015e0(_0x36c63d);},'gsmiS':function(_0x154943,_0x10eb2f){return _0x154943(_0x10eb2f);},'moqdy':function(_0x3994a6,_0x2508a2){return _0x3994a6(_0x2508a2);},'kYYPJ':_0x5a0a0f(0x123),'iAtVG':function(_0x538020,_0x47137a){return _0x538020(_0x47137a);},'rxlUz':_0x5a0a0f(0x159),'SvdGy':'\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','YqeBq':_0x5a0a0f(0x16c),'uEXLx':'\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','BHsYP':_0x5a0a0f(0x16d)},_0x1202d0=getCurrentVersion();console[_0x5a0a0f(0x126)]('\x0aCurrent\x20version:\x20'+_0x1202d0);const _0x599e29=resolveDistTag(_0x1202d0);if(_0x599e29!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x599e29+_0x5a0a0f(0x11a)+_0x599e29+_0x5a0a0f(0x134)+_0x599e29+_0x5a0a0f(0x152));const _0x2fb112=await runInstall(_0x599e29);if(!_0x2fb112)throw new Error(_0x5a0a0f(0x156)+_0x599e29+'\x20channel.');const _0x19c10c=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x599e29+'.'),await reinstallSkills(_0x19c10c),await _0x516c78[_0x5a0a0f(0x163)](ensureActiveProfileGitignored),console['log'](_0x5a0a0f(0x16d));return;}console['log'](_0x516c78[_0x5a0a0f(0x15d)]);const _0x5bbd9f=getLatestVersion();let _0x424b48=_0x1202d0;if(!_0x5bbd9f[_0x5a0a0f(0x154)]){console[_0x5a0a0f(0x145)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x5bbd9f[_0x5a0a0f(0x13f)]),console[_0x5a0a0f(0x126)](_0x516c78['iUHuQ']);const _0x225dc2=await _0x516c78[_0x5a0a0f(0x12a)](runInstall);if(_0x225dc2)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x424b48=_0x516c78[_0x5a0a0f(0x158)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5bbd9f[_0x5a0a0f(0x13f)]);}else{const _0x2b8d13=_0x5bbd9f['version'];console['log'](_0x5a0a0f(0x13b)+_0x2b8d13);const _0x3c349c=compareVersions(_0x1202d0,_0x2b8d13);if(_0x516c78[_0x5a0a0f(0x172)](_0x3c349c,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x516c78[_0x5a0a0f(0x144)](_0x3c349c,0x0))console['log']('\x0aYour\x20version\x20('+_0x1202d0+_0x5a0a0f(0x151)+_0x2b8d13+').');else{const _0x3516a4=await runInstall();if(_0x3516a4)console[_0x5a0a0f(0x126)](_0x5a0a0f(0x164)+_0x2b8d13),_0x424b48=_0x2b8d13;else throw new Error('Update\x20failed.');}}}await _0x516c78[_0x5a0a0f(0x157)](reinstallSkills,_0x424b48);const _0x48c39c=await _0x516c78[_0x5a0a0f(0x168)](isMarketplaceAdded,'trailhead'),_0x2e8bb5=await _0x516c78['moqdy'](isPluginInstalled,'ranger@trailhead');_0x48c39c&&(await _0x516c78[_0x5a0a0f(0x158)](updateClaudeMarketplace),console['log'](_0x5a0a0f(0x16a)));if(_0x2e8bb5){const _0x285e37=await _0x516c78['gsmiS'](getPluginInfo,_0x5a0a0f(0x12d)),_0xe528bc=_0x285e37?.['scope']??_0x516c78['kYYPJ'];await _0x516c78['iAtVG'](updateClaudePlugin,_0xe528bc);if(_0xe528bc===_0x516c78[_0x5a0a0f(0x14a)])console['log'](_0x516c78[_0x5a0a0f(0x155)]);else _0xe528bc===_0x516c78[_0x5a0a0f(0x166)]?console['log'](_0x516c78[_0x5a0a0f(0x11b)]):console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).');}const _0x489b06=await ensureActiveProfileGitignored();console['log'](_0x516c78[_0x5a0a0f(0x133)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x375c(_0x137e5c,_0x37e5c2){_0x137e5c=_0x137e5c-0x161;const _0x14cf63=_0x14cf();let _0x375ca3=_0x14cf63[_0x137e5c];return _0x375ca3;}(function(_0x5627a3,_0x4ad624){const _0xc36a8f=_0x375c,_0x143d36=_0x5627a3();while(!![]){try{const _0x387465=parseInt(_0xc36a8f(0x171))/0x1+-parseInt(_0xc36a8f(0x177))/0x2*(-parseInt(_0xc36a8f(0x162))/0x3)+parseInt(_0xc36a8f(0x16a))/0x4*(parseInt(_0xc36a8f(0x170))/0x5)+-parseInt(_0xc36a8f(0x17e))/0x6*(parseInt(_0xc36a8f(0x16b))/0x7)+parseInt(_0xc36a8f(0x16f))/0x8+parseInt(_0xc36a8f(0x17c))/0x9+-parseInt(_0xc36a8f(0x16d))/0xa;if(_0x387465===_0x4ad624)break;else _0x143d36['push'](_0x143d36['shift']());}catch(_0x4bcaee){_0x143d36['push'](_0x143d36['shift']());}}}(_0x14cf,0x7ad29));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';function _0x14cf(){const _0x17863a=['log','Create\x20it\x20with:\x0a','Profile\x20\x22','✓\x20Session\x20refreshed\x20for\x20\x22','eLBrp','2jqxvYD','Refreshing\x20session\x20for\x20\x22','muzFU','Re-create\x20it\x20with:\x0a','Run\x20`ranger\x20profile\x20update\x20','4506273MgutDD','BtlyI','6MARgZv','\x22\x20via\x20server-side\x20login...','FYgLv','Dwwhz','XoElc','\x20\x20ranger\x20profile\x20add\x20','environmentKey','BmlJU','local','2741559kLopda','HtvUb','success','BipGr','error','test_output','status','exit','1256468biQcoZ','2839599skuoJI','iMECt','25405840FblXRe','message','4588808Ouujkd','15SEyayu','518820bnmzMP'];_0x14cf=function(){return _0x17863a;};return _0x14cf();}import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x4b3386,_0x1d8bd0,_0x5f352c){const _0x486310=_0x375c,_0x569234={'HtvUb':function(_0x3b609a,_0x5a797b){return _0x3b609a(_0x5a797b);},'XoElc':function(_0x4a554a){return _0x4a554a();},'iMECt':function(_0x1b18f7,_0x11fde8){return _0x1b18f7===_0x11fde8;},'FYgLv':'legacy','Dwwhz':function(_0x4c805d,_0x29460e){return _0x4c805d===_0x29460e;},'qsYGU':_0x486310(0x161),'nYzyX':function(_0x4e945c,_0x3e2639){return _0x4e945c===_0x3e2639;},'DBkfz':function(_0x2696d3,_0x203d5d){return _0x2696d3+_0x203d5d;},'BipGr':function(_0x4f5076,_0xa7bddb){return _0x4f5076+_0xa7bddb;},'muzFU':function(_0x153be7){return _0x153be7();},'WLvpO':function(_0x2082e8,_0x4d32d7,_0x18133f){return _0x2082e8(_0x4d32d7,_0x18133f);},'LzvdQ':_0x486310(0x164),'uLSLO':'not_configured','QVRuW':'\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','BmlJU':'\x20\x20Falling\x20back\x20to\x20headed\x20browser...','WSvqW':function(_0x523374,_0x369828){return _0x523374 instanceof _0x369828;},'eLBrp':function(_0x138596,_0x3c9916){return _0x138596+_0x3c9916;},'BtlyI':function(_0x5f400d,_0x5e244c,_0x4f5814){return _0x5f400d(_0x5e244c,_0x4f5814);}},_0x342645=await _0x569234[_0x486310(0x163)](fetchCloudProfile,_0x4b3386);if(!_0x342645){const {envTypes:_0x11c626}=await _0x569234[_0x486310(0x182)](getEnvNames),_0x255d0a=_0x11c626[_0x4b3386];(_0x569234[_0x486310(0x16c)](_0x255d0a,_0x569234[_0x486310(0x180)])||_0x569234[_0x486310(0x181)](_0x255d0a,_0x569234['qsYGU'])||_0x569234['nYzyX'](_0x255d0a,'ci'))&&(console[_0x486310(0x166)](_0x569234['DBkfz'](_0x569234[_0x486310(0x165)](_0x486310(0x174)+_0x4b3386+'\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a'+'Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','\x0a'),'\x20\x20ranger\x20profile\x20add\x20'+_0x4b3386+'\x0a')),process[_0x486310(0x169)](0x1));}!_0x342645&&(console['error']('No\x20profile\x20named\x20\x22'+_0x4b3386+'\x22\x20found.\x0a'+_0x486310(0x173)+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x4b3386+'\x0a')),process[_0x486310(0x169)](0x1));const _0x3c3efa=await _0x569234[_0x486310(0x179)](fetchAuthConfig)['catch'](()=>null),_0x2ae7fa=_0x342645[_0x486310(0x184)]&&_0x3c3efa?_0x569234['WLvpO'](resolveAuthEnvironmentLocally,_0x3c3efa,_0x342645[_0x486310(0x184)]):null;if(_0x342645['environmentKey']&&_0x2ae7fa){console['log'](_0x486310(0x178)+_0x4b3386+_0x486310(0x17f));try{const _0x4b5804=await _0x569234['WLvpO'](serverSideLogin,_0x4b3386,{'force':!![]});if(_0x4b5804['status']===_0x569234['LzvdQ']){console['log'](_0x486310(0x175)+_0x4b3386+'\x22.');return;}_0x4b5804[_0x486310(0x168)]===_0x569234['uLSLO']?console['log'](_0x569234['QVRuW']):(_0x4b5804[_0x486310(0x167)]&&(console[_0x486310(0x172)]('\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:'),console[_0x486310(0x172)](_0x4b5804[_0x486310(0x167)])),console['log'](_0x569234['BmlJU']));}catch(_0x517814){console[_0x486310(0x172)]('\x20\x20Server-side\x20login\x20error:\x20'+(_0x569234['WSvqW'](_0x517814,Error)?_0x517814[_0x486310(0x16e)]:_0x569234[_0x486310(0x163)](String,_0x517814))),console['log'](_0x569234[_0x486310(0x185)]);}}const _0x19c67d=_0x342645['settings']??{},_0x2a3e4a=_0x19c67d['setupHeaders'],_0x4ba3e5=_0x19c67d['baseUrl'],_0x378da9=_0x2ae7fa?{..._0x2ae7fa,'setupHeaders':_0x2a3e4a??_0x2ae7fa['setupHeaders']}:_0x4ba3e5?{'key':_0x342645['environmentKey']??'','domains':[_0x4ba3e5],'setupHeaders':_0x2a3e4a}:null;!_0x378da9&&(console[_0x486310(0x166)](_0x569234['BipGr']('Profile\x20\x22'+_0x4b3386+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a',_0x486310(0x17a))+'\x0a'+(_0x486310(0x183)+_0x4b3386+'\x20--url\x20<your-app-url>\x0a')),process[_0x486310(0x169)](0x1)),!_0x569234['XoElc'](isInteractive)&&(console['error'](_0x569234[_0x486310(0x176)]('Can\x27t\x20refresh\x20\x22'+_0x4b3386+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a',_0x486310(0x17b)+_0x4b3386+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x486310(0x169)](0x1)),console['log']('Capturing\x20a\x20fresh\x20session\x20for\x20\x22'+_0x4b3386+'\x22\x20via\x20headed\x20browser...'),await _0x569234[_0x486310(0x17d)](manualBrowserLogin,_0x342645,_0x378da9),console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x4b3386+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14189b,_0x3ec4b1){const _0x324ef4=_0xd4a8,_0x377b6d=_0x14189b();while(!![]){try{const _0x3441b5=parseInt(_0x324ef4(0x1c1))/0x1+-parseInt(_0x324ef4(0x1ba))/0x2+-parseInt(_0x324ef4(0x1b8))/0x3+-parseInt(_0x324ef4(0x1c3))/0x4+parseInt(_0x324ef4(0x1be))/0x5*(-parseInt(_0x324ef4(0x1c7))/0x6)+-parseInt(_0x324ef4(0x1ca))/0x7*(parseInt(_0x324ef4(0x1b9))/0x8)+-parseInt(_0x324ef4(0x1c0))/0x9*(-parseInt(_0x324ef4(0x1bf))/0xa);if(_0x3441b5===_0x3ec4b1)break;else _0x377b6d['push'](_0x377b6d['shift']());}catch(_0x552151){_0x377b6d['push'](_0x377b6d['shift']());}}}(_0x2e30,0x33e10));function _0x2e30(){const _0x21a27b=['1604980KoSGPk','status','settings.json','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','174aRcSKM','\x0a✓\x20Now\x20using\x20profile\x20\x22','fxgSM','7eLPsXc','`\x20to\x20create\x20one.','CNUYE','693333lovKGY','1466984iAJiwO','516132VuJVvs','Profile\x20\x22','dgkao','ewzLc','10695dQMvMn','6410MChrCL','14733YEfIVk','299005ztGlQE','log'];_0x2e30=function(){return _0x21a27b;};return _0x2e30();}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0xd4a8(_0x5a56ff,_0x52daf4){_0x5a56ff=_0x5a56ff-0x1b7;const _0x2e3039=_0x2e30();let _0xd4a828=_0x2e3039[_0x5a56ff];return _0xd4a828;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x47b3ae){const _0x529f6c=_0xd4a8,_0x16e4ee={'dgkao':function(_0x796b8c,_0x27fe60){return _0x796b8c(_0x27fe60);},'TCpmH':function(_0x5a8e30,_0x43de95,_0x47db57){return _0x5a8e30(_0x43de95,_0x47db57);},'fxgSM':_0x529f6c(0x1c5),'mjxIS':function(_0x47aada,_0x588c9d){return _0x47aada(_0x588c9d);},'pKzNJ':function(_0x24ed51,_0x1ed2d5){return _0x24ed51 instanceof _0x1ed2d5;},'CNUYE':function(_0x5571d2,_0x5c1a29){return _0x5571d2===_0x5c1a29;},'ewzLc':function(_0x2beafd,_0x3901c6){return _0x2beafd+_0x3901c6;}},_0x349fed=_0x16e4ee[_0x529f6c(0x1bc)](getEnvDir,_0x47b3ae),_0x57f928=_0x16e4ee['TCpmH'](join,_0x349fed,_0x16e4ee[_0x529f6c(0x1c9)]),_0x693c7e=existsSync(_0x349fed)&&_0x16e4ee[_0x529f6c(0x1bc)](existsSync,_0x57f928);if(_0x693c7e){await _0x16e4ee['mjxIS'](writeActiveProfileName,_0x47b3ae),console[_0x529f6c(0x1c2)](_0x529f6c(0x1c8)+_0x47b3ae+'\x22');return;}let _0x1c10b2=null,_0x2f46d2=![];try{_0x1c10b2=await fetchCloudProfile(_0x47b3ae);if(!_0x1c10b2)_0x2f46d2=!![];}catch(_0x5e9c3d){_0x16e4ee['pKzNJ'](_0x5e9c3d,ApiError)&&_0x16e4ee[_0x529f6c(0x1b7)](_0x5e9c3d[_0x529f6c(0x1c4)],0x194)&&(_0x2f46d2=!![]);}if(_0x2f46d2)throw new Error(_0x16e4ee[_0x529f6c(0x1bd)](_0x16e4ee[_0x529f6c(0x1bd)](_0x529f6c(0x1bb)+_0x47b3ae+_0x529f6c(0x1c6),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),'`ranger\x20profile\x20add\x20'+_0x47b3ae+_0x529f6c(0x1cb)));await writeActiveProfileName(_0x47b3ae),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x47b3ae+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x4dab3d=_0x4b15;(function(_0x30a253,_0x192811){const _0x655474=_0x4b15,_0x4c51ec=_0x30a253();while(!![]){try{const _0x3ebedd=parseInt(_0x655474(0x1d1))/0x1+-parseInt(_0x655474(0x1d2))/0x2*(-parseInt(_0x655474(0x1cd))/0x3)+-parseInt(_0x655474(0x1cb))/0x4+-parseInt(_0x655474(0x1cf))/0x5*(parseInt(_0x655474(0x1ce))/0x6)+-parseInt(_0x655474(0x1d3))/0x7*(-parseInt(_0x655474(0x1c9))/0x8)+parseInt(_0x655474(0x1d5))/0x9+-parseInt(_0x655474(0x1d4))/0xa;if(_0x3ebedd===_0x192811)break;else _0x4c51ec['push'](_0x4c51ec['shift']());}catch(_0xcfe730){_0x4c51ec['push'](_0x4c51ec['shift']());}}}(_0x4ec7,0xb81c5));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0x4dab3d(0x1cc),LEGACY_ACTIVE_ENV_FILE=_0x4dab3d(0x1ca);function readLegacyActiveProfileFile(){const _0x45f557={'yLtOH':function(_0x4a4a5c){return _0x4a4a5c();},'cqIzs':function(_0x5aad37,_0x59fcc9,_0x2f88d9){return _0x5aad37(_0x59fcc9,_0x2f88d9);}},_0x401c76=[join(_0x45f557['yLtOH'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE),_0x45f557['cqIzs'](join,getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x3325b7 of _0x401c76){if(existsSync(_0x3325b7))return _0x3325b7;}return null;}export async function readActiveProfileName(){const _0x166e51=_0x4dab3d,_0x448f91={'mfFma':function(_0x1fe3c2,_0x579703){return _0x1fe3c2(_0x579703);},'fgLVW':function(_0xa7131e,_0x81571f,_0x4099d9){return _0xa7131e(_0x81571f,_0x4099d9);},'fqXeH':_0x166e51(0x1c8)},_0x445da5=_0x448f91[_0x166e51(0x1d0)](readLastProfile,process['cwd']());if(_0x445da5)return _0x445da5;const _0x3bbeab=readLegacyActiveProfileFile();if(!_0x3bbeab)return null;try{return(await _0x448f91['fgLVW'](readFile,_0x3bbeab,_0x448f91[_0x166e51(0x1d6)]))['trim']()||null;}catch{return null;}}function _0x4b15(_0x3f0a01,_0x47a3d6){_0x3f0a01=_0x3f0a01-0x1c8;const _0x4ec761=_0x4ec7();let _0x4b1545=_0x4ec761[_0x3f0a01];return _0x4b1545;}function _0x4ec7(){const _0x6a3d3e=['161NCrYps','11913140XJuQAO','4367034STDzif','fqXeH','cwd','utf-8','369920FsTDbc','active-env.txt','2733504MJmuZx','active-profile.txt','3703719hmpJis','12234WoGCtn','3235jdDRCB','mfFma','1164721IUWvLw','2ZGaiqB'];_0x4ec7=function(){return _0x6a3d3e;};return _0x4ec7();}export async function writeActiveProfileName(_0x48aeb4){const _0x1bfda7=_0x4dab3d,_0x4c4cd9={'RJFkg':function(_0x213398,_0x3aabe8,_0x2896b8){return _0x213398(_0x3aabe8,_0x2896b8);}};_0x4c4cd9['RJFkg'](writeLastProfile,process[_0x1bfda7(0x1d7)](),_0x48aeb4);}
|