@lovrabet/cli 1.3.3 → 1.3.4-beta.1

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.
Files changed (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -1
  52. package/lib/i18n/hooks.js +1 -1
  53. package/lib/i18n/index.js +1 -1
  54. package/lib/i18n/locales/en-US.js +1 -1
  55. package/lib/i18n/locales/zh-CN.js +1 -1
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +4 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- function a73_0x17d7(_0x5064fb,_0x264b6b){_0x5064fb=_0x5064fb-0x10c;const _0x1a8e6b=a73_0x1a8e();let _0x17d796=_0x1a8e6b[_0x5064fb];return _0x17d796;}const a73_0x2f2c9c=a73_0x17d7;(function(_0x490ee8,_0x18ee7f){const _0xc3ebe=a73_0x17d7,_0xfcfd9f=_0x490ee8();while(!![]){try{const _0x21198e=parseInt(_0xc3ebe(0x129))/0x1*(parseInt(_0xc3ebe(0x134))/0x2)+parseInt(_0xc3ebe(0x118))/0x3*(parseInt(_0xc3ebe(0x12e))/0x4)+-parseInt(_0xc3ebe(0x13d))/0x5*(-parseInt(_0xc3ebe(0x123))/0x6)+parseInt(_0xc3ebe(0x126))/0x7+-parseInt(_0xc3ebe(0x114))/0x8+parseInt(_0xc3ebe(0x112))/0x9*(-parseInt(_0xc3ebe(0x13c))/0xa)+parseInt(_0xc3ebe(0x125))/0xb*(-parseInt(_0xc3ebe(0x11f))/0xc);if(_0x21198e===_0x18ee7f)break;else _0xfcfd9f['push'](_0xfcfd9f['shift']());}catch(_0x1c322c){_0xfcfd9f['push'](_0xfcfd9f['shift']());}}}(a73_0x1a8e,0x42379));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a73_0x2f2c9c(0x11c),a73_0x2f2c9c(0x13f)],'files':[{'type':'file','path':'.cursor/skills/lovrabet.md','template':a73_0x2f2c9c(0x122)}]},'windsurf':{'name':a73_0x2f2c9c(0x13e),'description':'Windsurf\x20IDE','folders':[a73_0x2f2c9c(0x117)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':'.windsurf/workflows/lovrabet.md','template':a73_0x2f2c9c(0x122)}]},'claude':{'name':a73_0x2f2c9c(0x121),'description':a73_0x2f2c9c(0x121),'folders':[a73_0x2f2c9c(0x139)],'files':[{'type':'file','path':'.claude/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'cline':{'name':'Cline','description':a73_0x2f2c9c(0x111),'folders':[a73_0x2f2c9c(0x133)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x12a),'template':a73_0x2f2c9c(0x122)}]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':['.codex'],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x12b),'template':a73_0x2f2c9c(0x122)}]},'opencode':{'name':a73_0x2f2c9c(0x12d),'description':a73_0x2f2c9c(0x130),'folders':[a73_0x2f2c9c(0x115)],'files':[{'type':'file','path':'.opencode/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'qoder':{'name':a73_0x2f2c9c(0x12c),'description':a73_0x2f2c9c(0x128),'folders':['.qoder'],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x11a),'template':'SKILL.md.tpl'},{'type':'file','path':'.qoder/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]},'codebuddy':{'name':'CodeBuddy','description':a73_0x2f2c9c(0x138),'folders':[a73_0x2f2c9c(0x135)],'files':[{'type':'file','path':a73_0x2f2c9c(0x12f),'template':a73_0x2f2c9c(0x122)}]},'trae':{'name':a73_0x2f2c9c(0x131),'description':a73_0x2f2c9c(0x11d),'folders':[a73_0x2f2c9c(0x137)],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md','template':a73_0x2f2c9c(0x122)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a73_0x2f2c9c(0x120),'description':a73_0x2f2c9c(0x11b),'folders':[a73_0x2f2c9c(0x11e)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x132),'template':'SKILL.md.tpl'}]},'antigravity':{'name':'Antigravity','description':a73_0x2f2c9c(0x10e),'folders':[a73_0x2f2c9c(0x11e)],'files':[{'type':a73_0x2f2c9c(0x13b),'path':a73_0x2f2c9c(0x132),'template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a73_0x2f2c9c(0x113),'cline',a73_0x2f2c9c(0x10c),a73_0x2f2c9c(0x116),a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x127),a73_0x2f2c9c(0x119),a73_0x2f2c9c(0x110),a73_0x2f2c9c(0x13a)];export const IDE_LIST=[a73_0x2f2c9c(0x136),a73_0x2f2c9c(0x113),a73_0x2f2c9c(0x10f),a73_0x2f2c9c(0x10c),'codex',a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x127),a73_0x2f2c9c(0x119),a73_0x2f2c9c(0x110),a73_0x2f2c9c(0x13a),a73_0x2f2c9c(0x124)];export const ALL_CORE_IDES=[a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x13a),'claude',a73_0x2f2c9c(0x10f),a73_0x2f2c9c(0x116),'opencode',a73_0x2f2c9c(0x119),'codebuddy',a73_0x2f2c9c(0x110)];function a73_0x1a8e(){const _0x2b3caa=['Antigravity\x20IDE','cline','trae','Cline\x20IDE','1827qENQPZ','claude','2153488tJVTkV','.opencode','codex','.windsurf','6cBzErH','qoder','.qoder/rules/lovrabet.md','通用模板\x20-\x20兜底方案','.cursorrules','Trae\x20IDE','.agent','36hgdRey','其他\x20(通用模板)','Claude\x20Code','SKILL.md.tpl','319704nOzSVL','agent','1623127dnrNfv','3631600XkAfBf','opencode','Qoder\x20IDE','1uJrgyJ','.cline/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','Qoder','OpenCode','603656HweIhp','.codebuddy/skills/lovrabet/SKILL.md','OpenCode\x20IDE','Trae','.agent/skills/lovrabet/SKILL.md','.cline','114446iEcKOu','.codebuddy','antigravity','.trae','CodeBuddy\x20IDE','.claude','windsurf','file','13190ubbHdR','35dyPNnm','Windsurf','.cursor','codebuddy','cursor'];a73_0x1a8e=function(){return _0x2b3caa;};return a73_0x1a8e();}export const MCP_IDES=new Set([a73_0x2f2c9c(0x10d),a73_0x2f2c9c(0x113)]);
1
+ const a71_0x1004b4=a71_0x348e;(function(_0x206be9,_0x160dbb){const _0x35ee05=a71_0x348e,_0x3e6d3e=_0x206be9();while(!![]){try{const _0x235c62=parseInt(_0x35ee05(0x219))/0x1*(parseInt(_0x35ee05(0x206))/0x2)+parseInt(_0x35ee05(0x1f4))/0x3*(parseInt(_0x35ee05(0x1f5))/0x4)+-parseInt(_0x35ee05(0x1fc))/0x5+-parseInt(_0x35ee05(0x212))/0x6+-parseInt(_0x35ee05(0x1ed))/0x7*(parseInt(_0x35ee05(0x1f3))/0x8)+parseInt(_0x35ee05(0x1f2))/0x9+parseInt(_0x35ee05(0x20d))/0xa*(parseInt(_0x35ee05(0x1ef))/0xb);if(_0x235c62===_0x160dbb)break;else _0x3e6d3e['push'](_0x3e6d3e['shift']());}catch(_0x36edcb){_0x3e6d3e['push'](_0x3e6d3e['shift']());}}}(a71_0x393a,0xa28f0));export const CORE_IDE_CONFIGS={'cursor':{'name':a71_0x1004b4(0x1f6),'description':a71_0x1004b4(0x1fd),'folders':[a71_0x1004b4(0x1eb),'.cursor'],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x201),'template':'SKILL.md.tpl'}]},'windsurf':{'name':a71_0x1004b4(0x209),'description':a71_0x1004b4(0x1e8),'folders':[a71_0x1004b4(0x204)],'files':[{'type':a71_0x1004b4(0x21d),'path':'.windsurf/workflows/lovrabet.md','template':a71_0x1004b4(0x1ea)}]},'claude':{'name':'Claude\x20Code','description':a71_0x1004b4(0x1e9),'folders':[a71_0x1004b4(0x217)],'files':[{'type':a71_0x1004b4(0x21d),'path':'.claude/skills/lovrabet/SKILL.md','template':a71_0x1004b4(0x1ea)}]},'cline':{'name':a71_0x1004b4(0x21b),'description':'Cline\x20IDE','folders':[a71_0x1004b4(0x1ff)],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x208),'template':a71_0x1004b4(0x1ea)}]},'codex':{'name':a71_0x1004b4(0x1f8),'description':a71_0x1004b4(0x214),'folders':[a71_0x1004b4(0x1f9)],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x1e7),'template':a71_0x1004b4(0x1ea)}]},'opencode':{'name':a71_0x1004b4(0x20a),'description':a71_0x1004b4(0x207),'folders':['.opencode'],'files':[{'type':'file','path':a71_0x1004b4(0x211),'template':a71_0x1004b4(0x1ea)}]},'qoder':{'name':a71_0x1004b4(0x202),'description':a71_0x1004b4(0x1fe),'folders':[a71_0x1004b4(0x203)],'files':[{'type':'file','path':a71_0x1004b4(0x21f),'template':a71_0x1004b4(0x1ea)},{'type':'file','path':a71_0x1004b4(0x1f1),'template':a71_0x1004b4(0x1ea)}]},'codebuddy':{'name':a71_0x1004b4(0x1ec),'description':'CodeBuddy\x20IDE','folders':[a71_0x1004b4(0x1f0)],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x1fa),'template':a71_0x1004b4(0x1ea)}]},'trae':{'name':a71_0x1004b4(0x1ee),'description':'Trae\x20IDE','folders':[a71_0x1004b4(0x20c)],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x20e),'template':a71_0x1004b4(0x1ea)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':a71_0x1004b4(0x215),'folders':[a71_0x1004b4(0x21c)],'files':[{'type':a71_0x1004b4(0x21d),'path':'.agent/skills/lovrabet/SKILL.md','template':a71_0x1004b4(0x1ea)}]},'antigravity':{'name':'Antigravity','description':a71_0x1004b4(0x1fb),'folders':['.agent'],'files':[{'type':a71_0x1004b4(0x21d),'path':a71_0x1004b4(0x210),'template':a71_0x1004b4(0x1ea)}]}};function a71_0x348e(_0x123b77,_0x38a1d7){_0x123b77=_0x123b77-0x1e6;const _0x393add=a71_0x393a();let _0x348efc=_0x393add[_0x123b77];return _0x348efc;}export const CORE_IDE_LIST=[a71_0x1004b4(0x216),a71_0x1004b4(0x205),a71_0x1004b4(0x20f),a71_0x1004b4(0x200),'cursor','opencode',a71_0x1004b4(0x21a),a71_0x1004b4(0x1e6),'windsurf'];function a71_0x393a(){const _0x7a4820=['Codex','.codex','.codebuddy/skills/lovrabet/SKILL.md','Antigravity\x20IDE','2853880RjBdmD','Cursor\x20IDE','Qoder\x20IDE','.cline','codex','.cursor/skills/lovrabet.md','Qoder','.qoder','.windsurf','cline','720162HCMzdl','OpenCode\x20IDE','.cline/skills/lovrabet/SKILL.md','Windsurf','OpenCode','agent','.trae','10WTTktV','.trae/skills/lovrabet/SKILL.md','codebuddy','.agent/skills/lovrabet/SKILL.md','.opencode/skills/lovrabet/SKILL.md','5343672SVcroj','cursor','Codex\x20IDE','通用模板\x20-\x20兜底方案','claude','.claude','opencode','1zGiybn','qoder','Cline','.agent','file','windsurf','.qoder/rules/lovrabet.md','trae','.codex/skills/lovrabet/SKILL.md','Windsurf\x20IDE','Claude\x20Code','SKILL.md.tpl','.cursorrules','CodeBuddy','2360533zXolzn','Trae','14143151gZVjxE','.codebuddy','.qoder/skills/lovrabet/SKILL.md','8028837EFDgsX','16HBcWsU','791253jtHxvI','4XdYtvw','Cursor','antigravity'];a71_0x393a=function(){return _0x7a4820;};return a71_0x393a();}export const IDE_LIST=[a71_0x1004b4(0x1f7),a71_0x1004b4(0x216),a71_0x1004b4(0x205),a71_0x1004b4(0x20f),a71_0x1004b4(0x200),a71_0x1004b4(0x213),a71_0x1004b4(0x218),a71_0x1004b4(0x21a),a71_0x1004b4(0x1e6),a71_0x1004b4(0x21e),a71_0x1004b4(0x20b)];export const ALL_CORE_IDES=[a71_0x1004b4(0x213),a71_0x1004b4(0x21e),'claude',a71_0x1004b4(0x205),'codex','opencode',a71_0x1004b4(0x21a),a71_0x1004b4(0x20f),'trae'];export const MCP_IDES=new Set([a71_0x1004b4(0x213),a71_0x1004b4(0x216)]);
@@ -1 +1 @@
1
- (function(_0x1e65a0,_0x28a795){const _0x8b7961=a74_0x903f,_0x2de9f2=_0x1e65a0();while(!![]){try{const _0x4184b1=-parseInt(_0x8b7961(0x13e))/0x1+-parseInt(_0x8b7961(0x13b))/0x2+-parseInt(_0x8b7961(0x139))/0x3+parseInt(_0x8b7961(0x13c))/0x4*(parseInt(_0x8b7961(0x140))/0x5)+parseInt(_0x8b7961(0x13d))/0x6+parseInt(_0x8b7961(0x145))/0x7+-parseInt(_0x8b7961(0x143))/0x8*(-parseInt(_0x8b7961(0x141))/0x9);if(_0x4184b1===_0x28a795)break;else _0x2de9f2['push'](_0x2de9f2['shift']());}catch(_0x27758b){_0x2de9f2['push'](_0x2de9f2['shift']());}}}(a74_0x2db3,0x753f8));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x39451a=a74_0x903f;try{const _0x3972fc=getTemplateBaseUrl(),_0x4fc9aa=_0x3972fc+_0x39451a(0x147),_0x29c62b=await fetch(_0x4fc9aa,{'headers':{'Accept':_0x39451a(0x146)}});if(!_0x29c62b['ok'])return null;const _0x27083a=await _0x29c62b[_0x39451a(0x144)]();if(!_0x27083a[_0x39451a(0x142)]?.['stableVersion']||!_0x27083a['sdk']?.[_0x39451a(0x13a)]?.[_0x39451a(0x13f)])return null;return _0x27083a;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x3b664=Date['now']();if(cachedConfig&&_0x3b664-cacheTime<CACHE_TTL)return cachedConfig;const _0x3e56a2=await fetchCdnConfig();return _0x3e56a2&&(cachedConfig=_0x3e56a2,cacheTime=_0x3b664),_0x3e56a2;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}function a74_0x903f(_0x2a838b,_0x2f58c3){_0x2a838b=_0x2a838b-0x139;const _0x2db336=a74_0x2db3();let _0x903f23=_0x2db336[_0x2a838b];return _0x903f23;}function a74_0x2db3(){const _0x210ef5=['9WbNwcC','cli','3819176ZQbDxB','json','5853904clzzNn','application/json','/config.json','1089243cqUPBA','node','596404CUgoTe','4GeKIye','1881708fBBtsa','890081hNBqPr','stableVersion','2021625JVaqxD'];a74_0x2db3=function(){return _0x210ef5;};return a74_0x2db3();}
1
+ (function(_0x41bc16,_0x4c9c35){const _0x2baa4f=a72_0x21b7,_0x53a84c=_0x41bc16();while(!![]){try{const _0x51e68e=-parseInt(_0x2baa4f(0x11c))/0x1+parseInt(_0x2baa4f(0x11a))/0x2*(-parseInt(_0x2baa4f(0x114))/0x3)+parseInt(_0x2baa4f(0x122))/0x4*(parseInt(_0x2baa4f(0x118))/0x5)+parseInt(_0x2baa4f(0x11b))/0x6*(-parseInt(_0x2baa4f(0x121))/0x7)+-parseInt(_0x2baa4f(0x11f))/0x8+-parseInt(_0x2baa4f(0x119))/0x9+parseInt(_0x2baa4f(0x120))/0xa;if(_0x51e68e===_0x4c9c35)break;else _0x53a84c['push'](_0x53a84c['shift']());}catch(_0x53d9ec){_0x53a84c['push'](_0x53a84c['shift']());}}}(a72_0x2126,0x4b37f));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x4e6d58=a72_0x21b7;try{const _0x237af2=getTemplateBaseUrl(),_0x2ccc9d=_0x237af2+_0x4e6d58(0x117),_0x4645d3=await fetch(_0x2ccc9d,{'headers':{'Accept':'application/json'}});if(!_0x4645d3['ok'])return null;const _0x33eb18=await _0x4645d3['json']();if(!_0x33eb18['cli']?.[_0x4e6d58(0x11e)]||!_0x33eb18[_0x4e6d58(0x11d)]?.[_0x4e6d58(0x115)]?.[_0x4e6d58(0x11e)])return null;return _0x33eb18;}catch{return null;}}function a72_0x21b7(_0x2acd77,_0x19459f){_0x2acd77=_0x2acd77-0x114;const _0x212679=a72_0x2126();let _0x21b7ec=_0x212679[_0x2acd77];return _0x21b7ec;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x14c26e=a72_0x21b7,_0x3e3e45=Date[_0x14c26e(0x116)]();if(cachedConfig&&_0x3e3e45-cacheTime<CACHE_TTL)return cachedConfig;const _0x34a196=await fetchCdnConfig();return _0x34a196&&(cachedConfig=_0x34a196,cacheTime=_0x3e3e45),_0x34a196;}function a72_0x2126(){const _0x543355=['15742120SfIoec','14hTneWe','4ppEIYm','1268559uWUOHL','node','now','/config.json','1407885ErTRsk','750492PWawLj','2NspMAM','673656bWwSXI','335640LPfwsB','sdk','stableVersion','3850088UzqqST'];a72_0x2126=function(){return _0x543355;};return a72_0x2126();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
@@ -1 +1 @@
1
- const a75_0xfbf196=a75_0x4b97;(function(_0x565e6c,_0x463f7a){const _0x2fc10d=a75_0x4b97,_0x65ada8=_0x565e6c();while(!![]){try{const _0x18d402=parseInt(_0x2fc10d(0x1f9))/0x1+-parseInt(_0x2fc10d(0x1e4))/0x2*(parseInt(_0x2fc10d(0x1f1))/0x3)+parseInt(_0x2fc10d(0x1f2))/0x4+parseInt(_0x2fc10d(0x1df))/0x5+parseInt(_0x2fc10d(0x1e6))/0x6+-parseInt(_0x2fc10d(0x1d7))/0x7+-parseInt(_0x2fc10d(0x1eb))/0x8;if(_0x18d402===_0x463f7a)break;else _0x65ada8['push'](_0x65ada8['shift']());}catch(_0x256fdb){_0x65ada8['push'](_0x65ada8['shift']());}}}(a75_0x5a9f,0x9262d));import a75_0x3bcca7 from'node:fs';import a75_0xf08880 from'node:path';import a75_0x13cfd4 from'semver';import{getCdnConfig}from'./cdn-config.js';import a75_0x5ddd90 from'../i18n/index.js';const t=a75_0x5ddd90['t'][a75_0xfbf196(0x1e8)](a75_0x5ddd90),FALLBACK_MIN_SDK_VERSION=a75_0xfbf196(0x1ef);function isNonNumericVersion(_0x468d44){const _0x1f9d4e=a75_0xfbf196,_0x2a7d3a=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2a7d3a[_0x1f9d4e(0x1ee)](_0x3bfd49=>_0x3bfd49[_0x1f9d4e(0x1f6)](_0x468d44));}function getInstalledVersion(_0x2db0bf,_0x337fa7){const _0x443e6c=a75_0xfbf196;try{const _0x3a3d5b=a75_0xf08880[_0x443e6c(0x1d8)](_0x2db0bf,_0x443e6c(0x1f7),_0x337fa7,_0x443e6c(0x1f4));if(a75_0x3bcca7['existsSync'](_0x3a3d5b)){const _0x16eb6c=JSON[_0x443e6c(0x1ea)](a75_0x3bcca7['readFileSync'](_0x3a3d5b,_0x443e6c(0x1f5)));return _0x16eb6c[_0x443e6c(0x1f3)]||null;}}catch{}return null;}function a75_0x4b97(_0xd4d654,_0x446117){_0xd4d654=_0xd4d654-0x1d4;const _0x5a9f5e=a75_0x5a9f();let _0x4b9790=_0x5a9f5e[_0xd4d654];return _0x4b9790;}function a75_0x5a9f(){const _0x5b8f35=['stableVersion','4448955SXaGSj','join','upgrade.sdk.current','coerce','existsSync','devDependencies','minVersion','needsUpgrade','4428485IpkJFa','@lovrabet/sdk','\x1b[0m','readFileSync','utf8','6HMLaKJ','upgrade.sdk.command','3684396TkDBKt','sdk','bind','log','parse','13381144byvRgg','dependencies','all','some','1.2.0','\x1b[33m','71601byCwoq','3230720KxmxlY','version','package.json','utf-8','test','node_modules','\x1b[1m','671963kAXJkY','upgrade.sdk.stable','latest','node'];a75_0x5a9f=function(){return _0x5b8f35;};return a75_0x5a9f();}async function getSdkStableVersion(){const _0x2e02f4=a75_0xfbf196;try{const _0xa167b3=await getCdnConfig();return _0xa167b3?.[_0x2e02f4(0x1e7)]?.[_0x2e02f4(0x1d5)]?.[_0x2e02f4(0x1d6)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3fcb80=a75_0xfbf196;try{const _0x57102b=await getCdnConfig();return _0x57102b?.[_0x3fcb80(0x1e7)]?.['node']?.['packageName']||'@lovrabet/sdk';}catch{return _0x3fcb80(0x1e0);}}export async function checkSdkVersion(_0x4eaf02){const _0x396d16=a75_0xfbf196,_0x2dcd0f=a75_0xf08880[_0x396d16(0x1d8)](_0x4eaf02,'package.json'),[_0x56e1a2,_0x408974]=await Promise[_0x396d16(0x1ed)]([getSdkStableVersion(),getSdkPackageName()]),_0x291461=_0x56e1a2||FALLBACK_MIN_SDK_VERSION;if(!a75_0x3bcca7[_0x396d16(0x1db)](_0x2dcd0f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};try{const _0xecb045=JSON[_0x396d16(0x1ea)](a75_0x3bcca7[_0x396d16(0x1e2)](_0x2dcd0f,_0x396d16(0x1e3))),_0x528369=_0xecb045[_0x396d16(0x1ec)]||{},_0x5afd25=_0xecb045[_0x396d16(0x1dc)]||{},_0x499385=_0x528369[_0x408974]||_0x5afd25[_0x408974];if(!_0x499385)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};let _0x5dbc68=getInstalledVersion(_0x4eaf02,_0x408974);!_0x5dbc68&&(_0x5dbc68=_0x499385);if(isNonNumericVersion(_0x499385))return{'installed':!![],'version':_0x5dbc68,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};const _0x371c45=a75_0x13cfd4['coerce'](_0x5dbc68),_0x23e9a7=a75_0x13cfd4['coerce'](_0x291461),_0x1bb01f=_0x371c45&&_0x23e9a7?a75_0x13cfd4['lt'](_0x371c45,_0x23e9a7):![];return{'installed':!![],'version':_0x5dbc68,'needsUpgrade':_0x1bb01f,'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x291461,'packageName':_0x408974,'stableVersion':_0x56e1a2};}}export function checkSdkVersionSync(_0x1528cc){const _0x156177=a75_0xfbf196,_0x3499ae=a75_0xf08880['join'](_0x1528cc,_0x156177(0x1f4)),_0x5426fa='@lovrabet/sdk';if(!a75_0x3bcca7['existsSync'](_0x3499ae))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};try{const _0x1dd20c=JSON['parse'](a75_0x3bcca7[_0x156177(0x1e2)](_0x3499ae,'utf8')),_0x222592=_0x1dd20c['dependencies']||{},_0x112349=_0x1dd20c[_0x156177(0x1dc)]||{},_0x2d8b6e=_0x222592[_0x5426fa]||_0x112349[_0x5426fa];if(!_0x2d8b6e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};let _0x4e50b2=getInstalledVersion(_0x1528cc,_0x5426fa);!_0x4e50b2&&(_0x4e50b2=_0x2d8b6e);if(isNonNumericVersion(_0x2d8b6e))return{'installed':!![],'version':_0x4e50b2,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};const _0x442ac0=a75_0x13cfd4[_0x156177(0x1da)](_0x4e50b2),_0x427f50=_0x442ac0?a75_0x13cfd4['lt'](_0x442ac0,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4e50b2,'needsUpgrade':_0x427f50,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5426fa,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x52b26c){const _0x5d35b4=a75_0xfbf196;if(!_0x52b26c[_0x5d35b4(0x1de)])return;const _0x4b78f7=_0x5d35b4(0x1f0),_0x142132=_0x5d35b4(0x1e1),_0x583e77=_0x5d35b4(0x1f8),_0x14ae3d=_0x52b26c['packageName']||_0x5d35b4(0x1e0),_0x3680b0=_0x52b26c[_0x5d35b4(0x1d6)]||_0x52b26c[_0x5d35b4(0x1dd)],_0x50ef09='npm\x20install\x20'+_0x14ae3d+'@'+(_0x3680b0||_0x5d35b4(0x1d4));console['log'](),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+_0x583e77+t('upgrade.sdk.title')+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1d9),{'package':_0x14ae3d,'version':_0x52b26c[_0x5d35b4(0x1f3)]})+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1fa),{'version':_0x3680b0})+_0x142132),console[_0x5d35b4(0x1e9)](''+_0x4b78f7+t(_0x5d35b4(0x1e5),{'command':_0x50ef09})+_0x142132),console[_0x5d35b4(0x1e9)]();}
1
+ const a73_0x52e47c=a73_0x5a47;(function(_0x5537bc,_0x3c6401){const _0x14823c=a73_0x5a47,_0x339fb6=_0x5537bc();while(!![]){try{const _0x58edb4=-parseInt(_0x14823c(0x75))/0x1*(parseInt(_0x14823c(0x73))/0x2)+-parseInt(_0x14823c(0x95))/0x3+-parseInt(_0x14823c(0x76))/0x4*(-parseInt(_0x14823c(0x91))/0x5)+parseInt(_0x14823c(0x8b))/0x6+parseInt(_0x14823c(0x8a))/0x7+-parseInt(_0x14823c(0x8d))/0x8*(parseInt(_0x14823c(0x7e))/0x9)+parseInt(_0x14823c(0x7d))/0xa;if(_0x58edb4===_0x3c6401)break;else _0x339fb6['push'](_0x339fb6['shift']());}catch(_0x394385){_0x339fb6['push'](_0x339fb6['shift']());}}}(a73_0x1c03,0x2036f));import a73_0x219b1f from'node:fs';import a73_0x433541 from'node:path';function a73_0x5a47(_0x784eb8,_0x5124d4){_0x784eb8=_0x784eb8-0x6e;const _0x1c0353=a73_0x1c03();let _0x5a478e=_0x1c0353[_0x784eb8];return _0x5a478e;}import a73_0x5cb27a from'semver';import{getCdnConfig}from'./cdn-config.js';import a73_0x2ca156 from'../i18n/index.js';const t=a73_0x2ca156['t'][a73_0x52e47c(0x6e)](a73_0x2ca156),FALLBACK_MIN_SDK_VERSION=a73_0x52e47c(0x88);function a73_0x1c03(){const _0x3e052f=['133415RhCkYp','parse','upgrade.sdk.command','needsUpgrade','626721ikiaiQ','bind','utf-8','node','upgrade.sdk.stable','@lovrabet/sdk','167588aIGvBD','stableVersion','1TvBijs','4VHhRZb','minVersion','\x1b[0m','sdk','node_modules','version','package.json','5061190DVsyAS','162xPNTLj','devDependencies','readFileSync','\x1b[33m','existsSync','utf8','some','dependencies','log','coerce','1.2.0','join','114604xhliRv','490224IvJRpU','packageName','91656OfwYBQ','upgrade.sdk.title','latest','\x1b[1m'];a73_0x1c03=function(){return _0x3e052f;};return a73_0x1c03();}function isNonNumericVersion(_0xdf7980){const _0x33c760=a73_0x52e47c,_0x159eef=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x159eef[_0x33c760(0x84)](_0x5347e6=>_0x5347e6['test'](_0xdf7980));}function getInstalledVersion(_0x1c6bf2,_0x4f4a99){const _0x3435d7=a73_0x52e47c;try{const _0xc200d6=a73_0x433541[_0x3435d7(0x89)](_0x1c6bf2,_0x3435d7(0x7a),_0x4f4a99,_0x3435d7(0x7c));if(a73_0x219b1f[_0x3435d7(0x82)](_0xc200d6)){const _0x301c70=JSON['parse'](a73_0x219b1f[_0x3435d7(0x80)](_0xc200d6,_0x3435d7(0x6f)));return _0x301c70['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x562f4b=a73_0x52e47c;try{const _0x342a6d=await getCdnConfig();return _0x342a6d?.[_0x562f4b(0x79)]?.[_0x562f4b(0x70)]?.[_0x562f4b(0x74)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x570930=a73_0x52e47c;try{const _0x4655dd=await getCdnConfig();return _0x4655dd?.[_0x570930(0x79)]?.[_0x570930(0x70)]?.['packageName']||_0x570930(0x72);}catch{return _0x570930(0x72);}}export async function checkSdkVersion(_0xe8455c){const _0x2d90cc=a73_0x52e47c,_0x52b7e8=a73_0x433541[_0x2d90cc(0x89)](_0xe8455c,_0x2d90cc(0x7c)),[_0x55fa4b,_0x1fc5c0]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x127cd9=_0x55fa4b||FALLBACK_MIN_SDK_VERSION;if(!a73_0x219b1f['existsSync'](_0x52b7e8))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x127cd9,'packageName':_0x1fc5c0,'stableVersion':_0x55fa4b};try{const _0x25c335=JSON[_0x2d90cc(0x92)](a73_0x219b1f['readFileSync'](_0x52b7e8,_0x2d90cc(0x83))),_0x250235=_0x25c335[_0x2d90cc(0x85)]||{},_0x43c5bb=_0x25c335[_0x2d90cc(0x7f)]||{},_0x542738=_0x250235[_0x1fc5c0]||_0x43c5bb[_0x1fc5c0];if(!_0x542738)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x127cd9,'packageName':_0x1fc5c0,'stableVersion':_0x55fa4b};let _0x474745=getInstalledVersion(_0xe8455c,_0x1fc5c0);!_0x474745&&(_0x474745=_0x542738);if(isNonNumericVersion(_0x542738))return{'installed':!![],'version':_0x474745,'needsUpgrade':![],'minVersion':_0x127cd9,'packageName':_0x1fc5c0,'stableVersion':_0x55fa4b};const _0x10bb61=a73_0x5cb27a[_0x2d90cc(0x87)](_0x474745),_0x4c773d=a73_0x5cb27a[_0x2d90cc(0x87)](_0x127cd9),_0xb7c245=_0x10bb61&&_0x4c773d?a73_0x5cb27a['lt'](_0x10bb61,_0x4c773d):![];return{'installed':!![],'version':_0x474745,'needsUpgrade':_0xb7c245,'minVersion':_0x127cd9,'packageName':_0x1fc5c0,'stableVersion':_0x55fa4b};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x127cd9,'packageName':_0x1fc5c0,'stableVersion':_0x55fa4b};}}export function checkSdkVersionSync(_0x2aebca){const _0x1d2311=a73_0x52e47c,_0x49a5ba=a73_0x433541[_0x1d2311(0x89)](_0x2aebca,'package.json'),_0x4d8017=_0x1d2311(0x72);if(!a73_0x219b1f[_0x1d2311(0x82)](_0x49a5ba))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4d8017,'stableVersion':null};try{const _0x248cb9=JSON[_0x1d2311(0x92)](a73_0x219b1f[_0x1d2311(0x80)](_0x49a5ba,_0x1d2311(0x83))),_0xd2570f=_0x248cb9['dependencies']||{},_0x20e477=_0x248cb9[_0x1d2311(0x7f)]||{},_0x54cc02=_0xd2570f[_0x4d8017]||_0x20e477[_0x4d8017];if(!_0x54cc02)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4d8017,'stableVersion':null};let _0x6825e=getInstalledVersion(_0x2aebca,_0x4d8017);!_0x6825e&&(_0x6825e=_0x54cc02);if(isNonNumericVersion(_0x54cc02))return{'installed':!![],'version':_0x6825e,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4d8017,'stableVersion':null};const _0x1e7830=a73_0x5cb27a[_0x1d2311(0x87)](_0x6825e),_0x7347bd=_0x1e7830?a73_0x5cb27a['lt'](_0x1e7830,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x6825e,'needsUpgrade':_0x7347bd,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4d8017,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4d8017,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x2df0aa){const _0x52b0e5=a73_0x52e47c;if(!_0x2df0aa[_0x52b0e5(0x94)])return;const _0x2dcd79=_0x52b0e5(0x81),_0xf50def=_0x52b0e5(0x78),_0x3be003=_0x52b0e5(0x90),_0x5a07ea=_0x2df0aa[_0x52b0e5(0x8c)]||_0x52b0e5(0x72),_0x38f2a6=_0x2df0aa['stableVersion']||_0x2df0aa[_0x52b0e5(0x77)],_0x13613a='npm\x20install\x20'+_0x5a07ea+'@'+(_0x38f2a6||_0x52b0e5(0x8f));console[_0x52b0e5(0x86)](),console['log'](''+_0x2dcd79+_0x3be003+t(_0x52b0e5(0x8e))+_0xf50def),console[_0x52b0e5(0x86)](''+_0x2dcd79+t('upgrade.sdk.current',{'package':_0x5a07ea,'version':_0x2df0aa[_0x52b0e5(0x7b)]})+_0xf50def),console['log'](''+_0x2dcd79+t(_0x52b0e5(0x71),{'version':_0x38f2a6})+_0xf50def),console[_0x52b0e5(0x86)](''+_0x2dcd79+t(_0x52b0e5(0x93),{'command':_0x13613a})+_0xf50def),console[_0x52b0e5(0x86)]();}
@@ -1 +1 @@
1
- (function(_0x540768,_0x1a3013){const _0x1dd41e=a76_0x25d2,_0x59a401=_0x540768();while(!![]){try{const _0x5d6c29=-parseInt(_0x1dd41e(0x12c))/0x1*(-parseInt(_0x1dd41e(0x129))/0x2)+parseInt(_0x1dd41e(0x131))/0x3+-parseInt(_0x1dd41e(0x140))/0x4+parseInt(_0x1dd41e(0x130))/0x5+-parseInt(_0x1dd41e(0x12b))/0x6*(-parseInt(_0x1dd41e(0x142))/0x7)+parseInt(_0x1dd41e(0x138))/0x8*(-parseInt(_0x1dd41e(0x13b))/0x9)+-parseInt(_0x1dd41e(0x12f))/0xa;if(_0x5d6c29===_0x1a3013)break;else _0x59a401['push'](_0x59a401['shift']());}catch(_0x488e3f){_0x59a401['push'](_0x59a401['shift']());}}}(a76_0x240b,0xb7b6e));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a76_0x412a24 from'semver';import{getCdnConfig}from'./cdn-config.js';function a76_0x240b(){const _0x1ed876=['test','1515474vFpzid','\x1b[33m','upgrade.cli.command','utf-8','\x1b[0m','3181716AAlFgf','version','49qnpolq','some','cli','52XrLPbn','stableVersion','870540BzDdFY','7988Vrbtuc','1.0.0','../..','10202460AKaqXz','5031015jxcjZX','2531418uPgcwx','package.json','coerce','parse','upgrade.cli.title','upgrade.cli.current','\x1b[1m','24hPJpRI','log'];a76_0x240b=function(){return _0x1ed876;};return a76_0x240b();}import a76_0x156c0f from'../i18n/index.js';const t=a76_0x156c0f['t']['bind'](a76_0x156c0f);function getCurrentCliVersion(){const _0x348ac7=a76_0x25d2;try{const _0x383571=fileURLToPath(import.meta.url),_0x2fe086=resolve(dirname(_0x383571),_0x348ac7(0x12e)),_0x5a643b=resolve(_0x2fe086,_0x348ac7(0x132)),_0x1572a5=JSON[_0x348ac7(0x134)](readFileSync(_0x5a643b,_0x348ac7(0x13e)));return _0x1572a5[_0x348ac7(0x141)]||_0x348ac7(0x12d);}catch{return _0x348ac7(0x12d);}}function isNonNumericVersion(_0x4962dc){const _0x511624=a76_0x25d2,_0x32e936=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x32e936[_0x511624(0x143)](_0x4d531e=>_0x4d531e[_0x511624(0x13a)](_0x4962dc));}export async function checkCliVersion(){const _0x4423ab=a76_0x25d2,_0x46cd7a=getCurrentCliVersion(),_0xfaa7b3=await getCdnConfig(),_0x5c9979=_0xfaa7b3?.[_0x4423ab(0x144)]?.[_0x4423ab(0x12a)]||null;let _0x4bdc6f=![];if(_0x5c9979)try{const _0x31dd00=a76_0x412a24[_0x4423ab(0x133)](_0x46cd7a),_0x292bee=a76_0x412a24['coerce'](_0x5c9979);_0x31dd00&&_0x292bee&&(_0x4bdc6f=a76_0x412a24['lt'](_0x31dd00,_0x292bee));}catch{_0x4bdc6f=![];}return{'currentVersion':_0x46cd7a,'stableVersion':_0x5c9979,'needsUpgrade':_0x4bdc6f,'isPreRelease':![]};}function a76_0x25d2(_0x1d04ce,_0x497036){_0x1d04ce=_0x1d04ce-0x129;const _0x240ba6=a76_0x240b();let _0x25d293=_0x240ba6[_0x1d04ce];return _0x25d293;}export function printCliUpgradeWarning(_0x339c49){const _0x15ed9f=a76_0x25d2;if(!_0x339c49['needsUpgrade'])return;const _0x5ee00d=_0x15ed9f(0x13c),_0x55e918=_0x15ed9f(0x13f),_0x57feea=_0x15ed9f(0x137),_0x299b04='npm\x20install\x20-g\x20@lovrabet/cli@latest';console[_0x15ed9f(0x139)](),console[_0x15ed9f(0x139)](''+_0x5ee00d+_0x57feea+t(_0x15ed9f(0x135))+_0x55e918),console['log'](''+_0x5ee00d+t(_0x15ed9f(0x136),{'version':_0x339c49['currentVersion']})+_0x55e918),console[_0x15ed9f(0x139)](''+_0x5ee00d+t('upgrade.cli.stable',{'version':_0x339c49[_0x15ed9f(0x12a)]})+_0x55e918),console[_0x15ed9f(0x139)](''+_0x5ee00d+t(_0x15ed9f(0x13d),{'command':_0x299b04})+_0x55e918),console[_0x15ed9f(0x139)]();}
1
+ const a74_0x18301f=a74_0x2661;(function(_0x54f51f,_0x8aa00d){const _0xb62e6e=a74_0x2661,_0xe2c1a2=_0x54f51f();while(!![]){try{const _0x5d9c52=parseInt(_0xb62e6e(0x1a7))/0x1*(parseInt(_0xb62e6e(0x1a2))/0x2)+parseInt(_0xb62e6e(0x19a))/0x3+parseInt(_0xb62e6e(0x194))/0x4+-parseInt(_0xb62e6e(0x19d))/0x5+-parseInt(_0xb62e6e(0x1a3))/0x6+-parseInt(_0xb62e6e(0x193))/0x7+parseInt(_0xb62e6e(0x1a6))/0x8;if(_0x5d9c52===_0x8aa00d)break;else _0xe2c1a2['push'](_0xe2c1a2['shift']());}catch(_0x1f1103){_0xe2c1a2['push'](_0xe2c1a2['shift']());}}}(a74_0x5c9f,0xc2eca));import{readFileSync}from'node:fs';function a74_0x5c9f(){const _0x34a647=['version','parse','7471672iPDCQa','11327HVgLAg','upgrade.cli.title','currentVersion','coerce','1.0.0','upgrade.cli.current','9340898rdVtIN','4605152xRnGSv','npm\x20install\x20-g\x20@lovrabet/cli@latest','\x1b[33m','package.json','\x1b[1m','log','4171662KRjPAS','needsUpgrade','test','6273685kmyTWT','upgrade.cli.command','stableVersion','upgrade.cli.stable','bind','44gvPiME','2024604nnWylR'];a74_0x5c9f=function(){return _0x34a647;};return a74_0x5c9f();}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a74_0x365305 from'semver';import{getCdnConfig}from'./cdn-config.js';import a74_0x50636a from'../i18n/index.js';const t=a74_0x50636a['t'][a74_0x18301f(0x1a1)](a74_0x50636a);function getCurrentCliVersion(){const _0x57c111=a74_0x18301f;try{const _0x1f28e9=fileURLToPath(import.meta.url),_0x6d927a=resolve(dirname(_0x1f28e9),'../..'),_0x136d4d=resolve(_0x6d927a,_0x57c111(0x197)),_0x20da7d=JSON[_0x57c111(0x1a5)](readFileSync(_0x136d4d,'utf-8'));return _0x20da7d[_0x57c111(0x1a4)]||_0x57c111(0x191);}catch{return'1.0.0';}}function a74_0x2661(_0x135555,_0x38c5c0){_0x135555=_0x135555-0x190;const _0x5c9f35=a74_0x5c9f();let _0x2661ed=_0x5c9f35[_0x135555];return _0x2661ed;}function isNonNumericVersion(_0x37f7a9){const _0xc08cca=a74_0x18301f,_0x254fd8=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x254fd8['some'](_0x448a41=>_0x448a41[_0xc08cca(0x19c)](_0x37f7a9));}export async function checkCliVersion(){const _0x429b71=a74_0x18301f,_0x2bed2f=getCurrentCliVersion(),_0x369571=await getCdnConfig(),_0xb0fe8b=_0x369571?.['cli']?.[_0x429b71(0x19f)]||null;let _0x2c088f=![];if(_0xb0fe8b)try{const _0xb40800=a74_0x365305['coerce'](_0x2bed2f),_0x27a356=a74_0x365305[_0x429b71(0x190)](_0xb0fe8b);_0xb40800&&_0x27a356&&(_0x2c088f=a74_0x365305['lt'](_0xb40800,_0x27a356));}catch{_0x2c088f=![];}return{'currentVersion':_0x2bed2f,'stableVersion':_0xb0fe8b,'needsUpgrade':_0x2c088f,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x878c96){const _0x22df7a=a74_0x18301f;if(!_0x878c96[_0x22df7a(0x19b)])return;const _0x2d4edd=_0x22df7a(0x196),_0x167ba2='\x1b[0m',_0x23bc31=_0x22df7a(0x198),_0x55a60c=_0x22df7a(0x195);console[_0x22df7a(0x199)](),console[_0x22df7a(0x199)](''+_0x2d4edd+_0x23bc31+t(_0x22df7a(0x1a8))+_0x167ba2),console[_0x22df7a(0x199)](''+_0x2d4edd+t(_0x22df7a(0x192),{'version':_0x878c96[_0x22df7a(0x1a9)]})+_0x167ba2),console[_0x22df7a(0x199)](''+_0x2d4edd+t(_0x22df7a(0x1a0),{'version':_0x878c96[_0x22df7a(0x19f)]})+_0x167ba2),console['log'](''+_0x2d4edd+t(_0x22df7a(0x19e),{'command':_0x55a60c})+_0x167ba2),console['log']();}
@@ -1 +1 @@
1
- const a77_0x196d33=a77_0x40cc;(function(_0x34e758,_0x5818bb){const _0x571528=a77_0x40cc,_0x1d7a41=_0x34e758();while(!![]){try{const _0x323d24=-parseInt(_0x571528(0x13a))/0x1+parseInt(_0x571528(0x139))/0x2+parseInt(_0x571528(0x13f))/0x3+-parseInt(_0x571528(0x143))/0x4*(parseInt(_0x571528(0x14a))/0x5)+-parseInt(_0x571528(0x144))/0x6*(-parseInt(_0x571528(0x137))/0x7)+parseInt(_0x571528(0x141))/0x8+-parseInt(_0x571528(0x140))/0x9;if(_0x323d24===_0x5818bb)break;else _0x1d7a41['push'](_0x1d7a41['shift']());}catch(_0x4f2c83){_0x1d7a41['push'](_0x1d7a41['shift']());}}}(a77_0x55a0,0x8eaaf));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';import{initEnv}from'../constant/env.js';function a77_0x55a0(){const _0xd7d188=['app','8gmBdGp','188022HiqFvs','utf8','env','template_base_url','.lovrabetrc','cwd','308090xTiDXz','7HWqdGo','parse','1098602gbpEKp','1050726nQFsyp','appcode','string','replace','https://g.lovrabet.com/dist/lovrabet-cli','1140840qciptD','348696DkzZXT','6689240BJQPBJ'];a77_0x55a0=function(){return _0xd7d188;};return a77_0x55a0();}export const projectConfigPath=resolve(process[a77_0x196d33(0x149)](),a77_0x196d33(0x148));export const globalConfigPath=resolve(homedir(),'.lovrabetrc');export function readConfig(_0x4566ef){const _0x4093a8=a77_0x196d33;let _0x2c045b={};try{if(existsSync(globalConfigPath)){const _0x1dfcb4=readFileSync(globalConfigPath,{'encoding':_0x4093a8(0x145)});_0x1dfcb4&&(_0x2c045b=JSON[_0x4093a8(0x138)](_0x1dfcb4));}}catch(_0x260098){}try{const _0xfcff72=_0x4566ef?resolve(_0x4566ef,_0x4093a8(0x148)):projectConfigPath;if(existsSync(_0xfcff72)){const _0x1f9fea=readFileSync(_0xfcff72,{'encoding':_0x4093a8(0x145)});if(_0x1f9fea){const _0x5b63a8=JSON[_0x4093a8(0x138)](_0x1f9fea);_0x2c045b={..._0x2c045b,..._0x5b63a8};}}}catch(_0x1cb832){}return _0x2c045b[_0x4093a8(0x146)]&&typeof _0x2c045b[_0x4093a8(0x146)]==='string'&&initEnv(_0x2c045b[_0x4093a8(0x146)]),_0x2c045b;}function a77_0x40cc(_0x421cf9,_0x55d53e){_0x421cf9=_0x421cf9-0x137;const _0x55a0df=a77_0x55a0();let _0x40ccc6=_0x55a0df[_0x421cf9];return _0x40ccc6;}export function getConfigAppCode(){const _0x35b7ec=a77_0x196d33;let _0x24a210={},_0x2ddd3f={};try{if(existsSync(globalConfigPath)){const _0x5dc822=readFileSync(globalConfigPath,{'encoding':_0x35b7ec(0x145)});_0x5dc822&&(_0x2ddd3f=JSON[_0x35b7ec(0x138)](_0x5dc822));}}catch(_0x2f69fc){}try{if(existsSync(projectConfigPath)){const _0x938c08=readFileSync(projectConfigPath,{'encoding':_0x35b7ec(0x145)});_0x938c08&&(_0x24a210=JSON[_0x35b7ec(0x138)](_0x938c08));}}catch(_0x162a96){}let _0x5b1a3d;if(_0x35b7ec(0x13b)in _0x24a210)_0x5b1a3d=_0x24a210[_0x35b7ec(0x13b)];else{if('app'in _0x24a210)_0x5b1a3d=_0x24a210['app'];else{if(_0x35b7ec(0x13b)in _0x2ddd3f)_0x5b1a3d=_0x2ddd3f[_0x35b7ec(0x13b)];else _0x35b7ec(0x142)in _0x2ddd3f&&(_0x5b1a3d=_0x2ddd3f['app']);}}if(typeof _0x5b1a3d!==_0x35b7ec(0x13c)||_0x5b1a3d['trim']()==='')return undefined;return _0x5b1a3d;}export function isInProject(){return existsSync(projectConfigPath);}export function getTemplateBaseUrl(){const _0x5e9fcf=a77_0x196d33,_0x393e4d=readConfig();if(_0x393e4d[_0x5e9fcf(0x147)]&&typeof _0x393e4d['template_base_url']==='string')return _0x393e4d['template_base_url'][_0x5e9fcf(0x13d)](/\/$/,'');return _0x5e9fcf(0x13e);}
1
+ const a75_0x30c771=a75_0x3bd5;function a75_0x160e(){const _0x2a34e3=['1176007RzSkSP','24YHBnMm','cwd','9093188TxcghU','replace','11734460ycliOL','8HZmhUP','utf8','https://g.lovrabet.com/dist/lovrabet-cli','11pZxdpZ','51005hTNFwS','env','.lovrabetrc','template_base_url','208XHetlf','app','11630448cgfGdQ','100FGwDXU','appcode','21954YSQeiC','4915lAuylw','parse','6eGIIGP','string'];a75_0x160e=function(){return _0x2a34e3;};return a75_0x160e();}function a75_0x3bd5(_0x1557ef,_0xe52010){_0x1557ef=_0x1557ef-0x193;const _0x160e19=a75_0x160e();let _0x3bd586=_0x160e19[_0x1557ef];return _0x3bd586;}(function(_0x4a493a,_0x14bbf2){const _0x50404b=a75_0x3bd5,_0xf188f0=_0x4a493a();while(!![]){try{const _0x4526ba=-parseInt(_0x50404b(0x193))/0x1+-parseInt(_0x50404b(0x197))/0x2*(parseInt(_0x50404b(0x19c))/0x3)+-parseInt(_0x50404b(0x19a))/0x4*(-parseInt(_0x50404b(0x19d))/0x5)+-parseInt(_0x50404b(0x19f))/0x6*(-parseInt(_0x50404b(0x1a1))/0x7)+parseInt(_0x50404b(0x1a7))/0x8*(parseInt(_0x50404b(0x199))/0x9)+-parseInt(_0x50404b(0x1a6))/0xa*(parseInt(_0x50404b(0x1aa))/0xb)+-parseInt(_0x50404b(0x1a2))/0xc*(-parseInt(_0x50404b(0x1a4))/0xd);if(_0x4526ba===_0x14bbf2)break;else _0xf188f0['push'](_0xf188f0['shift']());}catch(_0xe89e06){_0xf188f0['push'](_0xf188f0['shift']());}}}(a75_0x160e,0xdb4e5));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';import{initEnv}from'../constant/env.js';export const projectConfigPath=resolve(process[a75_0x30c771(0x1a3)](),a75_0x30c771(0x195));export const globalConfigPath=resolve(homedir(),a75_0x30c771(0x195));export function readConfig(_0x1a51ce){const _0x229ced=a75_0x30c771;let _0x16f921={};try{if(existsSync(globalConfigPath)){const _0xba9bea=readFileSync(globalConfigPath,{'encoding':_0x229ced(0x1a8)});_0xba9bea&&(_0x16f921=JSON[_0x229ced(0x19e)](_0xba9bea));}}catch(_0x35db07){}try{const _0x3e2a26=_0x1a51ce?resolve(_0x1a51ce,_0x229ced(0x195)):projectConfigPath;if(existsSync(_0x3e2a26)){const _0x3743ba=readFileSync(_0x3e2a26,{'encoding':_0x229ced(0x1a8)});if(_0x3743ba){const _0x54579b=JSON['parse'](_0x3743ba);_0x16f921={..._0x16f921,..._0x54579b};}}}catch(_0x4aca17){}return _0x16f921[_0x229ced(0x194)]&&typeof _0x16f921[_0x229ced(0x194)]===_0x229ced(0x1a0)&&initEnv(_0x16f921[_0x229ced(0x194)]),_0x16f921;}export function getConfigAppCode(){const _0x525080=a75_0x30c771;let _0x143c55={},_0x3f5050={};try{if(existsSync(globalConfigPath)){const _0x30d8db=readFileSync(globalConfigPath,{'encoding':_0x525080(0x1a8)});_0x30d8db&&(_0x3f5050=JSON['parse'](_0x30d8db));}}catch(_0x103fff){}try{if(existsSync(projectConfigPath)){const _0x17394b=readFileSync(projectConfigPath,{'encoding':'utf8'});_0x17394b&&(_0x143c55=JSON['parse'](_0x17394b));}}catch(_0x49035a){}let _0x2ecdd7;if(_0x525080(0x19b)in _0x143c55)_0x2ecdd7=_0x143c55[_0x525080(0x19b)];else{if(_0x525080(0x198)in _0x143c55)_0x2ecdd7=_0x143c55['app'];else{if('appcode'in _0x3f5050)_0x2ecdd7=_0x3f5050[_0x525080(0x19b)];else _0x525080(0x198)in _0x3f5050&&(_0x2ecdd7=_0x3f5050[_0x525080(0x198)]);}}if(typeof _0x2ecdd7!==_0x525080(0x1a0)||_0x2ecdd7['trim']()==='')return undefined;return _0x2ecdd7;}export function isInProject(){return existsSync(projectConfigPath);}export function getTemplateBaseUrl(){const _0x33aa20=a75_0x30c771,_0x45c35b=readConfig();if(_0x45c35b[_0x33aa20(0x196)]&&typeof _0x45c35b[_0x33aa20(0x196)]===_0x33aa20(0x1a0))return _0x45c35b[_0x33aa20(0x196)][_0x33aa20(0x1a5)](/\/$/,'');return _0x33aa20(0x1a9);}
@@ -1 +1 @@
1
- (function(_0x12d370,_0x20e015){const _0x2d1b53=a78_0x185a,_0x18aa19=_0x12d370();while(!![]){try{const _0x34d3d0=parseInt(_0x2d1b53(0x6b))/0x1+parseInt(_0x2d1b53(0x6a))/0x2*(parseInt(_0x2d1b53(0x76))/0x3)+-parseInt(_0x2d1b53(0x6f))/0x4+-parseInt(_0x2d1b53(0x6d))/0x5+parseInt(_0x2d1b53(0x70))/0x6*(parseInt(_0x2d1b53(0x68))/0x7)+-parseInt(_0x2d1b53(0x69))/0x8*(parseInt(_0x2d1b53(0x66))/0x9)+parseInt(_0x2d1b53(0x74))/0xa*(parseInt(_0x2d1b53(0x6c))/0xb);if(_0x34d3d0===_0x20e015)break;else _0x18aa19['push'](_0x18aa19['shift']());}catch(_0x39deb0){_0x18aa19['push'](_0x18aa19['shift']());}}}(a78_0x5b12,0xdbdc4));import a78_0x19d6ac from'node:path';import a78_0x39b540 from'node:fs';function a78_0x185a(_0x1553aa,_0x5e57b9){_0x1553aa=_0x1553aa-0x66;const _0x5b1281=a78_0x5b12();let _0x185a0f=_0x5b1281[_0x1553aa];return _0x185a0f;}export async function copyDirectory(_0x449e66,_0x3e0acc){const _0x26f6fa=a78_0x185a;try{const _0x2132cb=a78_0x39b540['readdirSync'](_0x449e66,{'withFileTypes':!![]});a78_0x39b540[_0x26f6fa(0x71)](_0x3e0acc,{'recursive':!![]});for(const _0xeb3733 of _0x2132cb){const _0x26d4c0=a78_0x19d6ac[_0x26f6fa(0x72)](_0x449e66,_0xeb3733[_0x26f6fa(0x75)]),_0x10137a=a78_0x19d6ac[_0x26f6fa(0x72)](_0x3e0acc,_0xeb3733[_0x26f6fa(0x75)]);_0xeb3733[_0x26f6fa(0x73)]()?await copyDirectory(_0x26d4c0,_0x10137a):a78_0x39b540['copyFileSync'](_0x26d4c0,_0x10137a);}}catch(_0x511236){console[_0x26f6fa(0x6e)](_0x26f6fa(0x67),_0x511236);}}function a78_0x5b12(){const _0x251bc6=['1560611SZPnAY','3817kBlJrS','5279260FzcwCT','error','5835848aPQGrD','897090ZojFfy','mkdirSync','join','isDirectory','3290ZGdLXg','name','1299GPCPLc','3870zwtZFs','复制目录时出错:','77yunPoQ','1768dYkVFY','882pcbvRB'];a78_0x5b12=function(){return _0x251bc6;};return a78_0x5b12();}
1
+ (function(_0x4ad6da,_0xc01375){const _0x2949e4=a76_0x493e,_0x35443b=_0x4ad6da();while(!![]){try{const _0x41e467=parseInt(_0x2949e4(0x124))/0x1+-parseInt(_0x2949e4(0x121))/0x2+-parseInt(_0x2949e4(0x11c))/0x3*(-parseInt(_0x2949e4(0x125))/0x4)+parseInt(_0x2949e4(0x122))/0x5*(parseInt(_0x2949e4(0x12a))/0x6)+-parseInt(_0x2949e4(0x129))/0x7*(-parseInt(_0x2949e4(0x12b))/0x8)+parseInt(_0x2949e4(0x127))/0x9+parseInt(_0x2949e4(0x11f))/0xa*(-parseInt(_0x2949e4(0x123))/0xb);if(_0x41e467===_0xc01375)break;else _0x35443b['push'](_0x35443b['shift']());}catch(_0x382ef7){_0x35443b['push'](_0x35443b['shift']());}}}(a76_0x5e38,0xe1e4d));import a76_0x4ab7f0 from'node:path';function a76_0x5e38(){const _0x3a4303=['129faZHQf','readdirSync','error','103120VKaaFJ','mkdirSync','2880400mUMDbu','5211215vXFELS','4334QjXTOF','1164376PcaWXR','159468xcBkgZ','name','11350089LdYvLs','copyFileSync','224yzGKFO','6QFjavq','311592WQIkUI','join'];a76_0x5e38=function(){return _0x3a4303;};return a76_0x5e38();}function a76_0x493e(_0x56ae63,_0x36bd9b){_0x56ae63=_0x56ae63-0x11b;const _0x5e38a4=a76_0x5e38();let _0x493e08=_0x5e38a4[_0x56ae63];return _0x493e08;}import a76_0x31a801 from'node:fs';export async function copyDirectory(_0x8cf0bc,_0x445f04){const _0x3acb58=a76_0x493e;try{const _0x1f5dff=a76_0x31a801[_0x3acb58(0x11d)](_0x8cf0bc,{'withFileTypes':!![]});a76_0x31a801[_0x3acb58(0x120)](_0x445f04,{'recursive':!![]});for(const _0x15098e of _0x1f5dff){const _0x2b47ec=a76_0x4ab7f0[_0x3acb58(0x11b)](_0x8cf0bc,_0x15098e[_0x3acb58(0x126)]),_0x467572=a76_0x4ab7f0[_0x3acb58(0x11b)](_0x445f04,_0x15098e[_0x3acb58(0x126)]);_0x15098e['isDirectory']()?await copyDirectory(_0x2b47ec,_0x467572):a76_0x31a801[_0x3acb58(0x128)](_0x2b47ec,_0x467572);}}catch(_0x1214fc){console[_0x3acb58(0x11e)]('复制目录时出错:',_0x1214fc);}}
@@ -1 +1 @@
1
- (function(_0x305102,_0x4dd41f){const _0x13ec54=a79_0xc883,_0x3eb9e7=_0x305102();while(!![]){try{const _0x30f07c=parseInt(_0x13ec54(0x1a6))/0x1*(parseInt(_0x13ec54(0x1a7))/0x2)+-parseInt(_0x13ec54(0x1a3))/0x3*(-parseInt(_0x13ec54(0x1ab))/0x4)+-parseInt(_0x13ec54(0x1a0))/0x5*(-parseInt(_0x13ec54(0x1aa))/0x6)+parseInt(_0x13ec54(0x1a5))/0x7*(-parseInt(_0x13ec54(0x1a4))/0x8)+parseInt(_0x13ec54(0x1a8))/0x9*(-parseInt(_0x13ec54(0x19e))/0xa)+-parseInt(_0x13ec54(0x1a9))/0xb*(parseInt(_0x13ec54(0x1a2))/0xc)+-parseInt(_0x13ec54(0x19f))/0xd;if(_0x30f07c===_0x4dd41f)break;else _0x3eb9e7['push'](_0x3eb9e7['shift']());}catch(_0x589584){_0x3eb9e7['push'](_0x3eb9e7['shift']());}}}(a79_0x4cbb,0x1d348));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a79_0x4cbb(){const _0x35d2f9=['692135QufyRw','isDirectory','60ZIpZCP','6LxWnpd','1048mcwqUa','1337saDNHc','2074WGuZgQ','102DMQoKr','9EfFCLR','420926jPNgaZ','6pQHxWF','379856AswVFI','885140vfVjaX','125320IMRPlu'];a79_0x4cbb=function(){return _0x35d2f9;};return a79_0x4cbb();}export async function copyDir(_0x5d82fd,_0xe02d22){const _0x419d73=a79_0xc883,_0x5c35f5=statSync(_0x5d82fd);if(_0x5c35f5[_0x419d73(0x1a1)]()){!existsSync(_0xe02d22)&&mkdirSync(_0xe02d22,{'recursive':!![]});const _0x25d41c=readdirSync(_0x5d82fd);for(const _0x293f45 of _0x25d41c){await copyDir(join(_0x5d82fd,_0x293f45),join(_0xe02d22,_0x293f45));}}else copyFileSync(_0x5d82fd,_0xe02d22);}export function ensureDir(_0x4c19bd){!existsSync(_0x4c19bd)&&mkdirSync(_0x4c19bd,{'recursive':!![]});}function a79_0xc883(_0x12f241,_0xe0aefe){_0x12f241=_0x12f241-0x19e;const _0x4cbbec=a79_0x4cbb();let _0xc883a3=_0x4cbbec[_0x12f241];return _0xc883a3;}export function pathExists(_0x5a9422){return existsSync(_0x5a9422);}
1
+ (function(_0x607a96,_0x47070b){const _0x22da2c=a77_0x242b,_0xea7a18=_0x607a96();while(!![]){try{const _0x2039e6=-parseInt(_0x22da2c(0x7e))/0x1*(parseInt(_0x22da2c(0x7a))/0x2)+-parseInt(_0x22da2c(0x79))/0x3+-parseInt(_0x22da2c(0x77))/0x4*(parseInt(_0x22da2c(0x76))/0x5)+-parseInt(_0x22da2c(0x78))/0x6+-parseInt(_0x22da2c(0x7f))/0x7*(-parseInt(_0x22da2c(0x7c))/0x8)+parseInt(_0x22da2c(0x7b))/0x9+parseInt(_0x22da2c(0x80))/0xa*(parseInt(_0x22da2c(0x7d))/0xb);if(_0x2039e6===_0x47070b)break;else _0xea7a18['push'](_0xea7a18['shift']());}catch(_0x39ceaa){_0xea7a18['push'](_0xea7a18['shift']());}}}(a77_0x5cc6,0xb0143));function a77_0x5cc6(){const _0x543e3a=['1879WmxSvs','21daDaSj','50GErKAB','31575RyQzkQ','540FGfHNM','1019238NizYCe','793176gTSehQ','934uIDsbj','10924866PMXhOv','3504168VhGwGH','786643MeXMfc'];a77_0x5cc6=function(){return _0x543e3a;};return a77_0x5cc6();}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1192c0,_0x4c9d47){const _0x2a9c9e=statSync(_0x1192c0);if(_0x2a9c9e['isDirectory']()){!existsSync(_0x4c9d47)&&mkdirSync(_0x4c9d47,{'recursive':!![]});const _0x2d6d5c=readdirSync(_0x1192c0);for(const _0x12a343 of _0x2d6d5c){await copyDir(join(_0x1192c0,_0x12a343),join(_0x4c9d47,_0x12a343));}}else copyFileSync(_0x1192c0,_0x4c9d47);}function a77_0x242b(_0x56a179,_0xa8e854){_0x56a179=_0x56a179-0x76;const _0x5cc6df=a77_0x5cc6();let _0x242b16=_0x5cc6df[_0x56a179];return _0x242b16;}export function ensureDir(_0x43e20c){!existsSync(_0x43e20c)&&mkdirSync(_0x43e20c,{'recursive':!![]});}export function pathExists(_0x5f37e2){return existsSync(_0x5f37e2);}
@@ -1 +1 @@
1
- const a80_0x4f4b6b=a80_0x5d4f;(function(_0xd6fc92,_0x28d56){const _0x251189=a80_0x5d4f,_0x189ca8=_0xd6fc92();while(!![]){try{const _0x4d0db9=parseInt(_0x251189(0x11c))/0x1*(parseInt(_0x251189(0x124))/0x2)+-parseInt(_0x251189(0x109))/0x3+-parseInt(_0x251189(0x119))/0x4+-parseInt(_0x251189(0x110))/0x5+-parseInt(_0x251189(0x121))/0x6+parseInt(_0x251189(0x11b))/0x7*(-parseInt(_0x251189(0x11e))/0x8)+-parseInt(_0x251189(0x10b))/0x9*(-parseInt(_0x251189(0x116))/0xa);if(_0x4d0db9===_0x28d56)break;else _0x189ca8['push'](_0x189ca8['shift']());}catch(_0x1ee36d){_0x189ca8['push'](_0x189ca8['shift']());}}}(a80_0xfbc4,0xc57ba));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function a80_0xfbc4(){const _0xa6a4bc=['trimEnd','1233174gqjqPO','push','171pAJcwe','utf-8','\x0a<!--\x20GUIDES_APPEND\x20-->','env','length','110395hETeLo','CDN\x20请求失败:\x20','entries','CDN\x20数据中缺少\x20skillTemplate','|\x20`','lastUpdated','757970zCWhfp','skillTemplate','join','1731716srBAYj','application/json','21wCJEQV','1409127aFFlyh','path','1332824DumsfV','\x0a\x0a>更新时间:','extendContent','4047030Gjrdnr','map','object','2nnaJIE','includes','.lovrabet','requireFlags','json','/skills/guides.json','test','<!--\x20GUIDES_APPEND\x20-->','some','.lovrabet/skill/.shared/guides','replace','guides','keys','status','statusText','guide.md','title','`\x20|\x20','USERPROFILE','HOME'];a80_0xfbc4=function(){return _0xa6a4bc;};return a80_0xfbc4();}function getGuidesCdnUrl(){const _0x3ddcca=a80_0x5d4f,_0x539806=getTemplateBaseUrl();return _0x539806+_0x3ddcca(0xf9);}function getGuidesExtendCdnUrl(){const _0x42bfa8=getTemplateBaseUrl();return _0x42bfa8+'/skills/guides-extend.json';}const CACHE_DIR=join(process[a80_0x4f4b6b(0x10e)][a80_0x4f4b6b(0x107)]||process['env'][a80_0x4f4b6b(0x106)]||'',a80_0x4f4b6b(0x126),'cache');export async function fetchGuidesFromCDN(_0x5be83c=![]){const _0x304134=a80_0x4f4b6b,_0x301d9f=getGuidesCdnUrl(),_0x44087c=await fetch(_0x301d9f,{'headers':{'Accept':_0x304134(0x11a)}});if(!_0x44087c['ok'])throw new Error(_0x304134(0x111)+_0x44087c[_0x304134(0x101)]+'\x20'+_0x44087c[_0x304134(0x102)]);const _0x57fcd5=await _0x44087c[_0x304134(0xf8)]();if(!_0x57fcd5[_0x304134(0xff)]||typeof _0x57fcd5[_0x304134(0xff)]!==_0x304134(0x123))throw new Error('CDN\x20返回数据格式错误');if(!_0x5be83c)return _0x57fcd5;try{const _0x51c915=getGuidesExtendCdnUrl(),_0x476c6d=await fetch(_0x51c915,{'headers':{'Accept':_0x304134(0x11a)}});if(_0x476c6d['ok']){const _0x52681b=await _0x476c6d['json']();_0x52681b[_0x304134(0xff)]&&typeof _0x52681b['guides']===_0x304134(0x123)&&(_0x57fcd5[_0x304134(0xff)]={..._0x57fcd5[_0x304134(0xff)],..._0x52681b[_0x304134(0xff)]});}}catch{}return _0x57fcd5;}export function writeGuidesToProject(_0x25d880,_0x5d44ac,_0x3f2559=a80_0x4f4b6b(0xfd),_0x175ef1){const _0x225749=a80_0x4f4b6b,_0x2418ec=join(_0x5d44ac,_0x3f2559);for(const [_0x125ad8,_0x2e8e87]of Object[_0x225749(0x112)](_0x25d880[_0x225749(0xff)])){if(_0x2e8e87[_0x225749(0xf7)]&&_0x2e8e87[_0x225749(0xf7)][_0x225749(0x10f)]>0x0){const _0x47f3af=_0x2e8e87[_0x225749(0xf7)][_0x225749(0xfc)](_0x2ecd1a=>_0x175ef1?.[_0x225749(0x125)](_0x2ecd1a));if(!_0x47f3af)continue;}const _0xd18a54=join(_0x2418ec,_0x125ad8);mkdirSync(_0xd18a54,{'recursive':!![]});let _0x3b6633=_0x2e8e87['content'];_0x2e8e87[_0x225749(0x115)]&&(_0x3b6633=appendUpdateTime(_0x3b6633,_0x2e8e87['lastUpdated'])),writeFileSync(join(_0xd18a54,_0x225749(0x103)),_0x3b6633,_0x225749(0x10c));}}export function appendUpdateTime(_0xa12182,_0xba4429){const _0x568932=a80_0x4f4b6b;return _0xa12182=_0xa12182[_0x568932(0xfe)](/\n*>更新时间:.*$/m,''),_0xa12182[_0x568932(0x108)]()+(_0x568932(0x11f)+_0xba4429);}export function getSkillTemplate(_0x212d04){const _0x4b1a2c=a80_0x4f4b6b;return _0x212d04[_0x4b1a2c(0x117)]?.['content']||'';}export function appendExtendContents(_0x13173c,_0x1c58e2,_0x408c83){const _0x4cdf38=a80_0x4f4b6b,_0xf094a2=[];for(const [_0x376d1d,_0x55ef94]of Object[_0x4cdf38(0x112)](_0x1c58e2['guides'])){if(_0x55ef94[_0x4cdf38(0xf7)]&&_0x55ef94[_0x4cdf38(0xf7)][_0x4cdf38(0x10f)]>0x0){const _0x9723de=_0x55ef94[_0x4cdf38(0xf7)][_0x4cdf38(0xfc)](_0x112272=>_0x408c83?.['includes'](_0x112272));if(!_0x9723de)continue;}_0x55ef94[_0x4cdf38(0x120)]&&_0xf094a2[_0x4cdf38(0x10a)](_0x55ef94[_0x4cdf38(0x120)][_0x4cdf38(0x108)]());}if(_0xf094a2[_0x4cdf38(0x10f)]===0x0)return _0x13173c;return _0x13173c[_0x4cdf38(0x108)]()+'\x0a\x0a'+_0xf094a2[_0x4cdf38(0x118)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2e76c8,_0x3c502a,_0x1d729d,_0x58120c){const _0x46d2c3=a80_0x4f4b6b,_0x302fb3=getSkillTemplate(_0x2e76c8);if(!_0x302fb3)throw new Error(_0x46d2c3(0x113));const _0x173701=dirname(_0x3c502a);mkdirSync(_0x173701,{'recursive':!![]});let _0x35706e=_0x302fb3[_0x46d2c3(0xfe)](/\{\{IDE_NAME\}\}/g,_0x1d729d);_0x35706e=insertGuidesSection(_0x35706e,_0x2e76c8,_0x58120c),_0x35706e=appendExtendContents(_0x35706e,_0x2e76c8,_0x58120c),_0x2e76c8[_0x46d2c3(0x117)][_0x46d2c3(0x115)]&&(_0x35706e=appendUpdateTime(_0x35706e,_0x2e76c8[_0x46d2c3(0x117)][_0x46d2c3(0x115)])),writeFileSync(_0x3c502a,_0x35706e,_0x46d2c3(0x10c));}function a80_0x5d4f(_0x29f898,_0x20d3a3){_0x29f898=_0x29f898-0xf7;const _0xfbc46e=a80_0xfbc4();let _0x5d4f6f=_0xfbc46e[_0x29f898];return _0x5d4f6f;}export function insertGuidesSection(_0x4e68fd,_0x22bb4e,_0x15d101){const _0x3c6bd6=a80_0x4f4b6b,_0x29d1f4='<!--\x20GUIDES_APPEND\x20-->',_0x4622fc=_0x4e68fd['indexOf'](_0x29d1f4);if(_0x4622fc===-0x1)return _0x4e68fd;const _0x1944e6=[],_0x51301f=Object[_0x3c6bd6(0x100)](_0x22bb4e[_0x3c6bd6(0xff)])['sort']();for(const _0x1b969d of _0x51301f){const _0x17045c=_0x22bb4e[_0x3c6bd6(0xff)][_0x1b969d];if(!_0x17045c)continue;if(/^0[1-6]-/[_0x3c6bd6(0xfa)](_0x1b969d))continue;if(_0x17045c[_0x3c6bd6(0xf7)]&&_0x17045c[_0x3c6bd6(0xf7)][_0x3c6bd6(0x10f)]>0x0){const _0x152c54=_0x17045c[_0x3c6bd6(0xf7)]['some'](_0x28eb16=>_0x15d101?.['includes'](_0x28eb16));if(!_0x152c54)continue;}const _0x58f903=_0x17045c[_0x3c6bd6(0x11d)][_0x3c6bd6(0xfe)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x1944e6[_0x3c6bd6(0x10a)](_0x3c6bd6(0x114)+_0x58f903+_0x3c6bd6(0x105)+_0x17045c[_0x3c6bd6(0x104)]+'\x20|');}if(_0x1944e6[_0x3c6bd6(0x10f)]===0x0)return _0x4e68fd[_0x3c6bd6(0xfe)](_0x29d1f4,_0x3c6bd6(0xfb));const _0x5150a7=_0x1944e6[_0x3c6bd6(0x118)]('\x0a');return _0x4e68fd[_0x3c6bd6(0xfe)](_0x29d1f4,_0x5150a7+_0x3c6bd6(0x10d));}export async function installGuides(_0x170018){const _0x313434=a80_0x4f4b6b,_0x559129=await fetchGuidesFromCDN();return writeGuidesToProject(_0x559129,_0x170018),Object[_0x313434(0x100)](_0x559129[_0x313434(0xff)])[_0x313434(0x10f)];}export function getGuidesSummary(_0x5de4e4){const _0x340847=a80_0x4f4b6b;return Object[_0x340847(0x112)](_0x5de4e4[_0x340847(0xff)])[_0x340847(0x122)](([_0x4e8b8b,_0x534c72])=>({'key':_0x4e8b8b,'title':_0x534c72[_0x340847(0x104)],'path':_0x534c72[_0x340847(0x11d)]}));}
1
+ const a78_0x4ce2b3=a78_0x11c6;(function(_0x111861,_0x5680ba){const _0x31573f=a78_0x11c6,_0x52a243=_0x111861();while(!![]){try{const _0x2a5a13=-parseInt(_0x31573f(0x1ce))/0x1+-parseInt(_0x31573f(0x1c8))/0x2+parseInt(_0x31573f(0x1d1))/0x3+parseInt(_0x31573f(0x1e9))/0x4*(parseInt(_0x31573f(0x1c6))/0x5)+-parseInt(_0x31573f(0x1f1))/0x6+parseInt(_0x31573f(0x1cc))/0x7+parseInt(_0x31573f(0x1cd))/0x8*(parseInt(_0x31573f(0x1d3))/0x9);if(_0x2a5a13===_0x5680ba)break;else _0x52a243['push'](_0x52a243['shift']());}catch(_0x574ff4){_0x52a243['push'](_0x52a243['shift']());}}}(a78_0x1be2,0x63021));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function a78_0x1be2(){const _0x1d66d9=['262444RuJtMo','guide.md','guides','requireFlags','3932586AiHbyW','8eYLhhD','526729kCssPY','json','utf-8','1020627KmiUun','title','181800UlpyaQ','lastUpdated','length','push','path','some','includes','object','sort','map','\x0a\x0a>更新时间:','test','\x0a<!--\x20GUIDES_APPEND\x20-->','entries','CDN\x20数据中缺少\x20skillTemplate','extendContent','.lovrabet/skill/.shared/guides','HOME','keys','/skills/guides-extend.json','.lovrabet','cache','28KieMuA','<!--\x20GUIDES_APPEND\x20-->','status','indexOf','content','CDN\x20请求失败:\x20','application/json','join','2999304zYlbGc','skillTemplate','trimEnd','statusText','env','`\x20|\x20','457975TlMgHG','replace'];a78_0x1be2=function(){return _0x1d66d9;};return a78_0x1be2();}function getGuidesCdnUrl(){const _0x3f056a=getTemplateBaseUrl();return _0x3f056a+'/skills/guides.json';}function getGuidesExtendCdnUrl(){const _0x9b7c4=a78_0x11c6,_0x59fa50=getTemplateBaseUrl();return _0x59fa50+_0x9b7c4(0x1e6);}const CACHE_DIR=join(process[a78_0x4ce2b3(0x1f5)][a78_0x4ce2b3(0x1e4)]||process['env']['USERPROFILE']||'',a78_0x4ce2b3(0x1e7),a78_0x4ce2b3(0x1e8));export async function fetchGuidesFromCDN(_0x2d6289=![]){const _0x575504=a78_0x4ce2b3,_0x47940b=getGuidesCdnUrl(),_0x178d74=await fetch(_0x47940b,{'headers':{'Accept':'application/json'}});if(!_0x178d74['ok'])throw new Error(_0x575504(0x1ee)+_0x178d74[_0x575504(0x1eb)]+'\x20'+_0x178d74[_0x575504(0x1f4)]);const _0x3b093a=await _0x178d74[_0x575504(0x1cf)]();if(!_0x3b093a[_0x575504(0x1ca)]||typeof _0x3b093a[_0x575504(0x1ca)]!=='object')throw new Error('CDN\x20返回数据格式错误');if(!_0x2d6289)return _0x3b093a;try{const _0x31f28b=getGuidesExtendCdnUrl(),_0x2effc3=await fetch(_0x31f28b,{'headers':{'Accept':_0x575504(0x1ef)}});if(_0x2effc3['ok']){const _0x1713fa=await _0x2effc3[_0x575504(0x1cf)]();_0x1713fa[_0x575504(0x1ca)]&&typeof _0x1713fa['guides']===_0x575504(0x1da)&&(_0x3b093a[_0x575504(0x1ca)]={..._0x3b093a[_0x575504(0x1ca)],..._0x1713fa[_0x575504(0x1ca)]});}}catch{}return _0x3b093a;}export function writeGuidesToProject(_0x16aca7,_0x3edf68,_0x527519=a78_0x4ce2b3(0x1e3),_0x141cf0){const _0x30ef2e=a78_0x4ce2b3,_0x531d4f=join(_0x3edf68,_0x527519);for(const [_0x3eabba,_0x50433c]of Object[_0x30ef2e(0x1e0)](_0x16aca7[_0x30ef2e(0x1ca)])){if(_0x50433c['requireFlags']&&_0x50433c[_0x30ef2e(0x1cb)]['length']>0x0){const _0x108b40=_0x50433c[_0x30ef2e(0x1cb)][_0x30ef2e(0x1d8)](_0x4249f5=>_0x141cf0?.[_0x30ef2e(0x1d9)](_0x4249f5));if(!_0x108b40)continue;}const _0x16b643=join(_0x531d4f,_0x3eabba);mkdirSync(_0x16b643,{'recursive':!![]});let _0x4d48e8=_0x50433c[_0x30ef2e(0x1ed)];_0x50433c[_0x30ef2e(0x1d4)]&&(_0x4d48e8=appendUpdateTime(_0x4d48e8,_0x50433c[_0x30ef2e(0x1d4)])),writeFileSync(join(_0x16b643,_0x30ef2e(0x1c9)),_0x4d48e8,'utf-8');}}export function appendUpdateTime(_0x1d915b,_0x3a534e){const _0x25ba40=a78_0x4ce2b3;return _0x1d915b=_0x1d915b[_0x25ba40(0x1c7)](/\n*>更新时间:.*$/m,''),_0x1d915b[_0x25ba40(0x1f3)]()+(_0x25ba40(0x1dd)+_0x3a534e);}export function getSkillTemplate(_0x5ca5d1){const _0x13d291=a78_0x4ce2b3;return _0x5ca5d1[_0x13d291(0x1f2)]?.[_0x13d291(0x1ed)]||'';}export function appendExtendContents(_0x3e136d,_0x34b677,_0x33b952){const _0x204bc8=a78_0x4ce2b3,_0x5b22b8=[];for(const [_0x6f30ee,_0x46c847]of Object[_0x204bc8(0x1e0)](_0x34b677[_0x204bc8(0x1ca)])){if(_0x46c847['requireFlags']&&_0x46c847[_0x204bc8(0x1cb)][_0x204bc8(0x1d5)]>0x0){const _0x345d0b=_0x46c847[_0x204bc8(0x1cb)]['some'](_0xada7c3=>_0x33b952?.['includes'](_0xada7c3));if(!_0x345d0b)continue;}_0x46c847[_0x204bc8(0x1e2)]&&_0x5b22b8[_0x204bc8(0x1d6)](_0x46c847['extendContent']['trimEnd']());}if(_0x5b22b8[_0x204bc8(0x1d5)]===0x0)return _0x3e136d;return _0x3e136d[_0x204bc8(0x1f3)]()+'\x0a\x0a'+_0x5b22b8[_0x204bc8(0x1f0)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x4ecbcd,_0xd31cd0,_0x56261e,_0x206c7f){const _0x1ff0b1=a78_0x4ce2b3,_0x5eb888=getSkillTemplate(_0x4ecbcd);if(!_0x5eb888)throw new Error(_0x1ff0b1(0x1e1));const _0x57a67c=dirname(_0xd31cd0);mkdirSync(_0x57a67c,{'recursive':!![]});let _0x2cd550=_0x5eb888[_0x1ff0b1(0x1c7)](/\{\{IDE_NAME\}\}/g,_0x56261e);_0x2cd550=insertGuidesSection(_0x2cd550,_0x4ecbcd,_0x206c7f),_0x2cd550=appendExtendContents(_0x2cd550,_0x4ecbcd,_0x206c7f),_0x4ecbcd['skillTemplate'][_0x1ff0b1(0x1d4)]&&(_0x2cd550=appendUpdateTime(_0x2cd550,_0x4ecbcd['skillTemplate'][_0x1ff0b1(0x1d4)])),writeFileSync(_0xd31cd0,_0x2cd550,_0x1ff0b1(0x1d0));}export function insertGuidesSection(_0x7ca1be,_0x16cb4d,_0x58a352){const _0x4b48fa=a78_0x4ce2b3,_0x18abf2='<!--\x20GUIDES_APPEND\x20-->',_0x364f2e=_0x7ca1be[_0x4b48fa(0x1ec)](_0x18abf2);if(_0x364f2e===-0x1)return _0x7ca1be;const _0x3d35d5=[],_0x3179f6=Object[_0x4b48fa(0x1e5)](_0x16cb4d[_0x4b48fa(0x1ca)])[_0x4b48fa(0x1db)]();for(const _0x4f347b of _0x3179f6){const _0x3c72a2=_0x16cb4d[_0x4b48fa(0x1ca)][_0x4f347b];if(!_0x3c72a2)continue;if(/^0[1-6]-/[_0x4b48fa(0x1de)](_0x4f347b))continue;if(_0x3c72a2[_0x4b48fa(0x1cb)]&&_0x3c72a2[_0x4b48fa(0x1cb)][_0x4b48fa(0x1d5)]>0x0){const _0x3d5e28=_0x3c72a2[_0x4b48fa(0x1cb)][_0x4b48fa(0x1d8)](_0x34db6a=>_0x58a352?.[_0x4b48fa(0x1d9)](_0x34db6a));if(!_0x3d5e28)continue;}const _0x2f783a=_0x3c72a2[_0x4b48fa(0x1d7)][_0x4b48fa(0x1c7)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x3d35d5[_0x4b48fa(0x1d6)]('|\x20`'+_0x2f783a+_0x4b48fa(0x1f6)+_0x3c72a2[_0x4b48fa(0x1d2)]+'\x20|');}if(_0x3d35d5[_0x4b48fa(0x1d5)]===0x0)return _0x7ca1be[_0x4b48fa(0x1c7)](_0x18abf2,_0x4b48fa(0x1ea));const _0x59373e=_0x3d35d5[_0x4b48fa(0x1f0)]('\x0a');return _0x7ca1be[_0x4b48fa(0x1c7)](_0x18abf2,_0x59373e+_0x4b48fa(0x1df));}export async function installGuides(_0x153875){const _0x36c372=a78_0x4ce2b3,_0x42f4fa=await fetchGuidesFromCDN();return writeGuidesToProject(_0x42f4fa,_0x153875),Object[_0x36c372(0x1e5)](_0x42f4fa['guides'])[_0x36c372(0x1d5)];}function a78_0x11c6(_0x4df885,_0x65fbb9){_0x4df885=_0x4df885-0x1c6;const _0x1be253=a78_0x1be2();let _0x11c66d=_0x1be253[_0x4df885];return _0x11c66d;}export function getGuidesSummary(_0x5e83f9){const _0xc19835=a78_0x4ce2b3;return Object[_0xc19835(0x1e0)](_0x5e83f9[_0xc19835(0x1ca)])[_0xc19835(0x1dc)](([_0x303366,_0x575fdc])=>({'key':_0x303366,'title':_0x575fdc[_0xc19835(0x1d2)],'path':_0x575fdc[_0xc19835(0x1d7)]}));}
@@ -1 +1 @@
1
- (function(_0x481a0b,_0xe02777){const _0x1e1527=a81_0x45ac,_0x5b8b34=_0x481a0b();while(!![]){try{const _0x2bfc08=-parseInt(_0x1e1527(0x17a))/0x1*(-parseInt(_0x1e1527(0x192))/0x2)+-parseInt(_0x1e1527(0x191))/0x3+-parseInt(_0x1e1527(0x185))/0x4*(parseInt(_0x1e1527(0x180))/0x5)+parseInt(_0x1e1527(0x197))/0x6+parseInt(_0x1e1527(0x182))/0x7*(parseInt(_0x1e1527(0x184))/0x8)+parseInt(_0x1e1527(0x17c))/0x9*(parseInt(_0x1e1527(0x18c))/0xa)+parseInt(_0x1e1527(0x186))/0xb;if(_0x2bfc08===_0xe02777)break;else _0x5b8b34['push'](_0x5b8b34['shift']());}catch(_0x5a4fcc){_0x5b8b34['push'](_0x5b8b34['shift']());}}}(a81_0x32a9,0x6a46c));export async function httpRequest(_0x35293d,_0x530290={}){const _0x4c1150=a81_0x45ac,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x530290;let _0xbf7d11=null;for(let _0x24e72e=0x0;_0x24e72e<=retries;_0x24e72e++){try{const _0x13b904=new AbortController(),_0x1b3e14=setTimeout(()=>_0x13b904['abort'](),timeout),_0x469920=await fetch(_0x35293d,{'headers':headers,'signal':_0x13b904['signal']});clearTimeout(_0x1b3e14);let _0x1ace56;const _0x54c015=_0x469920[_0x4c1150(0x194)][_0x4c1150(0x18e)](_0x4c1150(0x188));return _0x54c015?.['includes']('application/json')?_0x1ace56=await _0x469920['json']():_0x1ace56=await _0x469920[_0x4c1150(0x18d)](),{'ok':_0x469920['ok'],'status':_0x469920[_0x4c1150(0x17e)],'statusText':_0x469920[_0x4c1150(0x17f)],'data':_0x1ace56,'headers':_0x469920[_0x4c1150(0x194)],'url':_0x469920[_0x4c1150(0x189)],'text':()=>_0x469920['text']()};}catch(_0x10f577){_0xbf7d11=_0x10f577 instanceof Error?_0x10f577:new Error(String(_0x10f577));if(_0x24e72e===retries)break;if(shouldRetry(_0x10f577)){console[_0x4c1150(0x18b)](_0x4c1150(0x18f)+retryDelay+_0x4c1150(0x179)+(_0x24e72e+0x1)+_0x4c1150(0x17b)),await sleep(retryDelay);continue;}else break;}}throw _0xbf7d11||new Error(_0x4c1150(0x190));}function shouldRetry(_0x22374f){const _0x4e540c=a81_0x45ac;if(_0x22374f instanceof Error){if(_0x22374f['name']===_0x4e540c(0x187))return![];if(_0x22374f[_0x4e540c(0x181)]===_0x4e540c(0x183)&&_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x195)))return!![];if(_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x196)))return!![];if(_0x22374f[_0x4e540c(0x18a)][_0x4e540c(0x193)](_0x4e540c(0x17d)))return![];}return![];}function a81_0x32a9(){const _0x321aee=['40623goIXcq','\x20次重试...','54QhHmpF','ENOTFOUND','status','statusText','40lqbMxM','name','30842LlzOsD','TypeError','424gQDZDC','20324uCeNsj','3299296flvqiD','AbortError','content-type','url','message','log','235110fNobMk','text','get','*\x20请求失败,','Request\x20failed','2191455mHPJod','10LTZbBz','includes','headers','fetch','ECONNRESET','1972836yZXWyY','ms\x20后进行第\x20'];a81_0x32a9=function(){return _0x321aee;};return a81_0x32a9();}function a81_0x45ac(_0x282f2d,_0x342818){_0x282f2d=_0x282f2d-0x179;const _0x32a94c=a81_0x32a9();let _0x45ac69=_0x32a94c[_0x282f2d];return _0x45ac69;}function sleep(_0x50d9fb){return new Promise(_0x5d7aac=>setTimeout(_0x5d7aac,_0x50d9fb));}export function validateUrl(_0x48ce14){try{return new URL(_0x48ce14),!![];}catch{return![];}}
1
+ (function(_0x9be630,_0x40633c){const _0x19a2fc=a79_0x2168,_0x5d258c=_0x9be630();while(!![]){try{const _0x2138bb=parseInt(_0x19a2fc(0x142))/0x1*(-parseInt(_0x19a2fc(0x145))/0x2)+parseInt(_0x19a2fc(0x135))/0x3+-parseInt(_0x19a2fc(0x13c))/0x4*(parseInt(_0x19a2fc(0x13b))/0x5)+parseInt(_0x19a2fc(0x14d))/0x6+parseInt(_0x19a2fc(0x132))/0x7+parseInt(_0x19a2fc(0x144))/0x8+-parseInt(_0x19a2fc(0x143))/0x9*(parseInt(_0x19a2fc(0x14b))/0xa);if(_0x2138bb===_0x40633c)break;else _0x5d258c['push'](_0x5d258c['shift']());}catch(_0x40faa6){_0x5d258c['push'](_0x5d258c['shift']());}}}(a79_0x4128,0x798e3));export async function httpRequest(_0x2a1639,_0x29caa2={}){const _0x7fc4ff=a79_0x2168,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x29caa2;let _0x1fd583=null;for(let _0x29cd8c=0x0;_0x29cd8c<=retries;_0x29cd8c++){try{const _0x1e2412=new AbortController(),_0x4b64d4=setTimeout(()=>_0x1e2412[_0x7fc4ff(0x14a)](),timeout),_0x420aab=await fetch(_0x2a1639,{'headers':headers,'signal':_0x1e2412[_0x7fc4ff(0x13f)]});clearTimeout(_0x4b64d4);let _0xbc8893;const _0x544714=_0x420aab['headers'][_0x7fc4ff(0x138)]('content-type');return _0x544714?.[_0x7fc4ff(0x14c)](_0x7fc4ff(0x141))?_0xbc8893=await _0x420aab[_0x7fc4ff(0x140)]():_0xbc8893=await _0x420aab[_0x7fc4ff(0x149)](),{'ok':_0x420aab['ok'],'status':_0x420aab[_0x7fc4ff(0x137)],'statusText':_0x420aab[_0x7fc4ff(0x148)],'data':_0xbc8893,'headers':_0x420aab[_0x7fc4ff(0x130)],'url':_0x420aab[_0x7fc4ff(0x136)],'text':()=>_0x420aab[_0x7fc4ff(0x149)]()};}catch(_0xa131ff){_0x1fd583=_0xa131ff instanceof Error?_0xa131ff:new Error(String(_0xa131ff));if(_0x29cd8c===retries)break;if(shouldRetry(_0xa131ff)){console[_0x7fc4ff(0x131)]('*\x20请求失败,'+retryDelay+_0x7fc4ff(0x13a)+(_0x29cd8c+0x1)+_0x7fc4ff(0x134)),await sleep(retryDelay);continue;}else break;}}throw _0x1fd583||new Error(_0x7fc4ff(0x146));}function shouldRetry(_0x41dcc3){const _0x1ed5d6=a79_0x2168;if(_0x41dcc3 instanceof Error){if(_0x41dcc3[_0x1ed5d6(0x13e)]==='AbortError')return![];if(_0x41dcc3[_0x1ed5d6(0x13e)]==='TypeError'&&_0x41dcc3['message'][_0x1ed5d6(0x14c)](_0x1ed5d6(0x147)))return!![];if(_0x41dcc3[_0x1ed5d6(0x139)][_0x1ed5d6(0x14c)](_0x1ed5d6(0x13d)))return!![];if(_0x41dcc3[_0x1ed5d6(0x139)][_0x1ed5d6(0x14c)](_0x1ed5d6(0x133)))return![];}return![];}function sleep(_0x4b12c8){return new Promise(_0x16f3b0=>setTimeout(_0x16f3b0,_0x4b12c8));}export function validateUrl(_0x2068a5){try{return new URL(_0x2068a5),!![];}catch{return![];}}function a79_0x2168(_0x50c2e0,_0xa7005c){_0x50c2e0=_0x50c2e0-0x130;const _0x41282e=a79_0x4128();let _0x216816=_0x41282e[_0x50c2e0];return _0x216816;}function a79_0x4128(){const _0x410a13=['status','get','message','ms\x20后进行第\x20','32425xMIhnv','92JHrdLv','ECONNRESET','name','signal','json','application/json','331766KptwRN','9BZlVAW','6727088OqfzjK','2WYcskj','Request\x20failed','fetch','statusText','text','abort','7774630EjBVeu','includes','613482uSINzX','headers','log','756917OoximK','ENOTFOUND','\x20次重试...','2115033KVAXAm','url'];a79_0x4128=function(){return _0x410a13;};return a79_0x4128();}
@@ -1 +1 @@
1
- const a82_0x526f42=a82_0x11c5;(function(_0x52619f,_0x2451b6){const _0x5b87ba=a82_0x11c5,_0x333935=_0x52619f();while(!![]){try{const _0x1125f8=parseInt(_0x5b87ba(0xbb))/0x1*(-parseInt(_0x5b87ba(0xe2))/0x2)+-parseInt(_0x5b87ba(0xcd))/0x3*(parseInt(_0x5b87ba(0xe7))/0x4)+-parseInt(_0x5b87ba(0xb0))/0x5*(-parseInt(_0x5b87ba(0xc5))/0x6)+parseInt(_0x5b87ba(0xc6))/0x7*(parseInt(_0x5b87ba(0xdf))/0x8)+parseInt(_0x5b87ba(0xd6))/0x9*(-parseInt(_0x5b87ba(0xcf))/0xa)+parseInt(_0x5b87ba(0xd3))/0xb+-parseInt(_0x5b87ba(0xe8))/0xc*(parseInt(_0x5b87ba(0xeb))/0xd);if(_0x1125f8===_0x2451b6)break;else _0x333935['push'](_0x333935['shift']());}catch(_0x15f326){_0x333935['push'](_0x333935['shift']());}}}(a82_0xc3dc,0x91dbd));function a82_0x11c5(_0x1c567d,_0x7091d3){_0x1c567d=_0x1c567d-0xaf;const _0xc3dcf7=a82_0xc3dc();let _0x11c5d8=_0xc3dcf7[_0x1c567d];return _0x11c5d8;}function a82_0xc3dc(){const _0x3e8636=['1491108MjMnDH','split','map','13vfoZhh','now','3070575DOzXMI','setRawCommand','logFilePath','filter','existsSync','join','dirname','getWinstonInstance','winstonLogger','currentRawCommand','blue','15934mIyekk','rawCommand','writeFileSync','warn','Failed\x20to\x20clear\x20logs:','mkdirSync','errors','duration','parse','timestamp','6Manxpi','2555917dLakTa','.lovrabet.log','readFileSync','stringify','details','command','format','79107htiwzS','Failed\x20to\x20read\x20logs:','4290gcTUQu','readLogs','setLogPath','message','4391552PNTXtn','完成:\x20','success','9459iwWqqM','error','initWinstonLogger','unknown','yellow','level','开始执行:\x20','toISOString','clearLogs','24ciZmOU','logTask','clear','48RQzEyz','transports','info','trim','失败:\x20','84lqrFoP'];a82_0xc3dc=function(){return _0x3e8636;};return a82_0xc3dc();}import a82_0x51bdaf from'winston';import a82_0xd3f0f3 from'node:fs';import a82_0x1923a4 from'node:path';class Logger{['winstonLogger'];[a82_0x526f42(0xb2)];[a82_0x526f42(0xb9)]='';constructor(){const _0x1afada=a82_0x526f42;this[_0x1afada(0xb2)]='';}[a82_0x526f42(0xb1)](_0x491b4c){const _0x456de3=a82_0x526f42;this[_0x456de3(0xb9)]=_0x491b4c;}[a82_0x526f42(0xd8)](){const _0xe8e725=a82_0x526f42,_0x27fcd3=a82_0x1923a4[_0xe8e725(0xb6)](this[_0xe8e725(0xb2)]);!a82_0xd3f0f3[_0xe8e725(0xb4)](_0x27fcd3)&&a82_0xd3f0f3[_0xe8e725(0xc0)](_0x27fcd3,{'recursive':!![]});const _0x273eb9=a82_0x51bdaf['format']['combine'](a82_0x51bdaf[_0xe8e725(0xcc)]['timestamp'](),a82_0x51bdaf[_0xe8e725(0xcc)][_0xe8e725(0xc1)]({'stack':!![]}),a82_0x51bdaf['format']['printf'](_0x4da083=>{const _0x16171e=_0xe8e725,_0x56be69={'timestamp':_0x4da083[_0x16171e(0xc4)]||new Date()[_0x16171e(0xdd)](),'level':_0x4da083[_0x16171e(0xdb)]||_0x16171e(0xe4),'command':_0x4da083[_0x16171e(0xcb)]||_0x16171e(0xd9),'rawCommand':_0x4da083[_0x16171e(0xbc)]||this[_0x16171e(0xb9)]||undefined,'message':_0x4da083[_0x16171e(0xd2)]||'','duration':_0x4da083[_0x16171e(0xc2)]||undefined,'details':_0x4da083[_0x16171e(0xca)]||undefined};return JSON[_0x16171e(0xc9)](_0x56be69);}));this[_0xe8e725(0xb8)]=a82_0x51bdaf['createLogger']({'level':'info','format':_0x273eb9,'transports':[new a82_0x51bdaf[(_0xe8e725(0xe3))]['File']({'filename':this['logFilePath'],'level':_0xe8e725(0xe4)})],'silent':![]}),a82_0x51bdaf['addColors']({'success':'green','error':'red','warn':_0xe8e725(0xda),'info':_0xe8e725(0xba)});}[a82_0x526f42(0xd1)](_0xa0bb96){const _0x1d06e2=a82_0x526f42;this[_0x1d06e2(0xb2)]=a82_0x1923a4[_0x1d06e2(0xb5)](_0xa0bb96,_0x1d06e2(0xc7)),this[_0x1d06e2(0xb8)]&&this[_0x1d06e2(0xb8)][_0x1d06e2(0xe1)](),this[_0x1d06e2(0xd8)]();}['info'](_0x1477fa,_0x1a944a,_0x496be4){const _0x32cca0=a82_0x526f42;if(!this[_0x32cca0(0xb2)]||!this[_0x32cca0(0xb8)])return;this['winstonLogger'][_0x32cca0(0xe4)](_0x1a944a,{'command':_0x1477fa,'details':_0x496be4});}['success'](_0x4a787d,_0x1d8960,_0x4c750b,_0x369147){const _0x4f603e=a82_0x526f42;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x4f603e(0xb8)]['log'](_0x4f603e(0xe4),_0x1d8960,{'level':_0x4f603e(0xd5),'command':_0x4a787d,'duration':_0x4c750b,'details':_0x369147});}['error'](_0x3b44c4,_0x514406,_0x1aa2fa){const _0x563168=a82_0x526f42;if(!this['logFilePath']||!this[_0x563168(0xb8)])return;this[_0x563168(0xb8)][_0x563168(0xd7)](_0x514406,{'command':_0x3b44c4,'details':_0x1aa2fa});}[a82_0x526f42(0xbe)](_0xb61651,_0x1da249,_0x44e38f){const _0x4f83f7=a82_0x526f42;if(!this[_0x4f83f7(0xb2)]||!this[_0x4f83f7(0xb8)])return;this['winstonLogger'][_0x4f83f7(0xbe)](_0x1da249,{'command':_0xb61651,'details':_0x44e38f});}async[a82_0x526f42(0xe0)](_0x35df5e,_0x457d14,_0x2aad8d){const _0x370269=a82_0x526f42,_0x2f4713=Date[_0x370269(0xaf)]();this[_0x370269(0xe4)](_0x35df5e,_0x370269(0xdc)+_0x457d14);try{const _0xacb295=await _0x2aad8d(),_0x5c7f27=Date[_0x370269(0xaf)]()-_0x2f4713;return this[_0x370269(0xd5)](_0x35df5e,_0x370269(0xd4)+_0x457d14,_0x5c7f27),_0xacb295;}catch(_0x1da726){const _0x41f330=Date[_0x370269(0xaf)]()-_0x2f4713;this['error'](_0x35df5e,_0x370269(0xe6)+_0x457d14,{'error':_0x1da726 instanceof Error?_0x1da726[_0x370269(0xd2)]:String(_0x1da726),'duration':_0x41f330});throw _0x1da726;}}[a82_0x526f42(0xd0)](){const _0x1a671b=a82_0x526f42;try{if(!a82_0xd3f0f3['existsSync'](this['logFilePath']))return[];const _0x464608=a82_0xd3f0f3[_0x1a671b(0xc8)](this['logFilePath'],'utf8');return _0x464608[_0x1a671b(0xe9)]('\x0a')[_0x1a671b(0xb3)](_0x1c7cdf=>_0x1c7cdf[_0x1a671b(0xe5)]())[_0x1a671b(0xea)](_0x1f510a=>JSON[_0x1a671b(0xc3)](_0x1f510a));}catch(_0x8f7584){return console[_0x1a671b(0xbe)](_0x1a671b(0xce),_0x8f7584),[];}}[a82_0x526f42(0xde)](){const _0x2bf3ca=a82_0x526f42;try{a82_0xd3f0f3[_0x2bf3ca(0xb4)](this[_0x2bf3ca(0xb2)])&&a82_0xd3f0f3[_0x2bf3ca(0xbd)](this[_0x2bf3ca(0xb2)],'','utf8');}catch(_0x16d3da){console['warn'](_0x2bf3ca(0xbf),_0x16d3da);}}[a82_0x526f42(0xb7)](){const _0x445cc4=a82_0x526f42;return this[_0x445cc4(0xb8)];}}export const logger=new Logger();
1
+ function a80_0x402d(_0x3fbf56,_0x4c6ace){_0x3fbf56=_0x3fbf56-0xfd;const _0x120237=a80_0x1202();let _0x402d1b=_0x120237[_0x3fbf56];return _0x402d1b;}const a80_0x129492=a80_0x402d;function a80_0x1202(){const _0x53d4ed=['timestamp','info','290GcnmVe','success','开始执行:\x20','2491416gJRmIJ','.lovrabet.log','logFilePath','combine','logTask','1804130xJtOOC','blue','3119872AnwCxo','currentRawCommand','message','addColors','150wXYLUQ','yellow','8mvuRbC','warn','readLogs','command','714033knCdXa','失败:\x20','details','getWinstonInstance','File','duration','完成:\x20','split','filter','green','clearLogs','utf8','1330652WQJgNn','5413960WbnNMP','initWinstonLogger','trim','error','Failed\x20to\x20read\x20logs:','existsSync','setLogPath','red','join','format','winstonLogger','15508MZUZHw','now'];a80_0x1202=function(){return _0x53d4ed;};return a80_0x1202();}(function(_0x3713bc,_0x375cd5){const _0x1683d8=a80_0x402d,_0x1247f1=_0x3713bc();while(!![]){try{const _0x1a341b=parseInt(_0x1683d8(0x114))/0x1+parseInt(_0x1683d8(0x12c))/0x2+parseInt(_0x1683d8(0x102))/0x3*(-parseInt(_0x1683d8(0x120))/0x4)+parseInt(_0x1683d8(0x115))/0x5+parseInt(_0x1683d8(0x127))/0x6+parseInt(_0x1683d8(0xfe))/0x7*(-parseInt(_0x1683d8(0x104))/0x8)+parseInt(_0x1683d8(0x108))/0x9*(-parseInt(_0x1683d8(0x124))/0xa);if(_0x1a341b===_0x375cd5)break;else _0x1247f1['push'](_0x1247f1['shift']());}catch(_0x185aaa){_0x1247f1['push'](_0x1247f1['shift']());}}}(a80_0x1202,0xc0f9a));import a80_0x4fc2c5 from'winston';import a80_0x5b8d76 from'node:fs';import a80_0x489d16 from'node:path';class Logger{[a80_0x129492(0x11f)];[a80_0x129492(0x129)];[a80_0x129492(0xff)]='';constructor(){const _0x51f43e=a80_0x129492;this[_0x51f43e(0x129)]='';}['setRawCommand'](_0x5e2f0c){const _0xc41d8a=a80_0x129492;this[_0xc41d8a(0xff)]=_0x5e2f0c;}[a80_0x129492(0x116)](){const _0x590395=a80_0x129492,_0x5b26a0=a80_0x489d16['dirname'](this['logFilePath']);!a80_0x5b8d76[_0x590395(0x11a)](_0x5b26a0)&&a80_0x5b8d76['mkdirSync'](_0x5b26a0,{'recursive':!![]});const _0xab2090=a80_0x4fc2c5[_0x590395(0x11e)][_0x590395(0x12a)](a80_0x4fc2c5[_0x590395(0x11e)][_0x590395(0x122)](),a80_0x4fc2c5['format']['errors']({'stack':!![]}),a80_0x4fc2c5[_0x590395(0x11e)]['printf'](_0xf81f5d=>{const _0x52a9e7=_0x590395,_0x4cfa59={'timestamp':_0xf81f5d[_0x52a9e7(0x122)]||new Date()['toISOString'](),'level':_0xf81f5d['level']||_0x52a9e7(0x123),'command':_0xf81f5d[_0x52a9e7(0x107)]||'unknown','rawCommand':_0xf81f5d['rawCommand']||this[_0x52a9e7(0xff)]||undefined,'message':_0xf81f5d[_0x52a9e7(0x100)]||'','duration':_0xf81f5d[_0x52a9e7(0x10d)]||undefined,'details':_0xf81f5d[_0x52a9e7(0x10a)]||undefined};return JSON['stringify'](_0x4cfa59);}));this[_0x590395(0x11f)]=a80_0x4fc2c5['createLogger']({'level':_0x590395(0x123),'format':_0xab2090,'transports':[new a80_0x4fc2c5['transports'][(_0x590395(0x10c))]({'filename':this['logFilePath'],'level':_0x590395(0x123)})],'silent':![]}),a80_0x4fc2c5[_0x590395(0x101)]({'success':_0x590395(0x111),'error':_0x590395(0x11c),'warn':_0x590395(0x103),'info':_0x590395(0xfd)});}[a80_0x129492(0x11b)](_0x5bb387){const _0x4ea2e1=a80_0x129492;this[_0x4ea2e1(0x129)]=a80_0x489d16[_0x4ea2e1(0x11d)](_0x5bb387,_0x4ea2e1(0x128)),this[_0x4ea2e1(0x11f)]&&this[_0x4ea2e1(0x11f)]['clear'](),this['initWinstonLogger']();}['info'](_0x2718e8,_0x3928c4,_0x507de5){const _0x108894=a80_0x129492;if(!this['logFilePath']||!this[_0x108894(0x11f)])return;this[_0x108894(0x11f)]['info'](_0x3928c4,{'command':_0x2718e8,'details':_0x507de5});}[a80_0x129492(0x125)](_0x161b94,_0x59a576,_0x12f402,_0x5a562e){const _0x3f5287=a80_0x129492;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x3f5287(0x11f)]['log'](_0x3f5287(0x123),_0x59a576,{'level':'success','command':_0x161b94,'duration':_0x12f402,'details':_0x5a562e});}[a80_0x129492(0x118)](_0x43891f,_0x5a4ce7,_0x31090d){const _0x5a6001=a80_0x129492;if(!this['logFilePath']||!this[_0x5a6001(0x11f)])return;this[_0x5a6001(0x11f)][_0x5a6001(0x118)](_0x5a4ce7,{'command':_0x43891f,'details':_0x31090d});}[a80_0x129492(0x105)](_0x5f4d4d,_0x567326,_0x5b5a0d){const _0x6a39c3=a80_0x129492;if(!this[_0x6a39c3(0x129)]||!this[_0x6a39c3(0x11f)])return;this[_0x6a39c3(0x11f)][_0x6a39c3(0x105)](_0x567326,{'command':_0x5f4d4d,'details':_0x5b5a0d});}async[a80_0x129492(0x12b)](_0x1a5207,_0x3503bc,_0x2cbcd4){const _0x3ad863=a80_0x129492,_0x3b7e97=Date[_0x3ad863(0x121)]();this[_0x3ad863(0x123)](_0x1a5207,_0x3ad863(0x126)+_0x3503bc);try{const _0x34014a=await _0x2cbcd4(),_0x397036=Date[_0x3ad863(0x121)]()-_0x3b7e97;return this[_0x3ad863(0x125)](_0x1a5207,_0x3ad863(0x10e)+_0x3503bc,_0x397036),_0x34014a;}catch(_0xe083e1){const _0x5b1d93=Date['now']()-_0x3b7e97;this[_0x3ad863(0x118)](_0x1a5207,_0x3ad863(0x109)+_0x3503bc,{'error':_0xe083e1 instanceof Error?_0xe083e1[_0x3ad863(0x100)]:String(_0xe083e1),'duration':_0x5b1d93});throw _0xe083e1;}}[a80_0x129492(0x106)](){const _0x32a629=a80_0x129492;try{if(!a80_0x5b8d76[_0x32a629(0x11a)](this[_0x32a629(0x129)]))return[];const _0x25f418=a80_0x5b8d76['readFileSync'](this[_0x32a629(0x129)],_0x32a629(0x113));return _0x25f418[_0x32a629(0x10f)]('\x0a')[_0x32a629(0x110)](_0x2f5439=>_0x2f5439[_0x32a629(0x117)]())['map'](_0x34d2a4=>JSON['parse'](_0x34d2a4));}catch(_0x8cf3a0){return console[_0x32a629(0x105)](_0x32a629(0x119),_0x8cf3a0),[];}}[a80_0x129492(0x112)](){const _0x5e470b=a80_0x129492;try{a80_0x5b8d76[_0x5e470b(0x11a)](this[_0x5e470b(0x129)])&&a80_0x5b8d76['writeFileSync'](this[_0x5e470b(0x129)],'','utf8');}catch(_0x337574){console['warn']('Failed\x20to\x20clear\x20logs:',_0x337574);}}[a80_0x129492(0x10b)](){return this['winstonLogger'];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a84_0x4765d5=a84_0x312e;(function(_0xba1f3e,_0xb4e45f){const _0x24b25c=a84_0x312e,_0x153b42=_0xba1f3e();while(!![]){try{const _0x4e3e17=parseInt(_0x24b25c(0x1f8))/0x1+-parseInt(_0x24b25c(0x1ef))/0x2*(-parseInt(_0x24b25c(0x1f7))/0x3)+-parseInt(_0x24b25c(0x1ea))/0x4+-parseInt(_0x24b25c(0x1f2))/0x5+parseInt(_0x24b25c(0x1e7))/0x6+parseInt(_0x24b25c(0x1f5))/0x7+-parseInt(_0x24b25c(0x1ee))/0x8;if(_0x4e3e17===_0xb4e45f)break;else _0x153b42['push'](_0x153b42['shift']());}catch(_0x42a2f8){_0x153b42['push'](_0x153b42['shift']());}}}(a84_0x34cb,0xceec5));function a84_0x34cb(){const _0x2a1fc8=['lastUpdated','.cursor/rules','../../cdn-source/rules/lovrabet_rules.mdc.tpl','utf-8','json','8570562SOcmla','catch','application/json','6640200MpTtUX','content','CDN\x20请求失败:\x20','/rules/rules.json','3271504UlPkIG','1920862sQbivx','lovrabet_rules.mdc','CDN\x20返回数据格式错误','4807385tiTPBc','本地模板文件不存在:\x20','statusText','7782467cKUQrV','string','3orgUAA','377383rQTIuw'];a84_0x34cb=function(){return _0x2a1fc8;};return a84_0x34cb();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a84_0x312e(_0x2c8c9d,_0x492401){_0x2c8c9d=_0x2c8c9d-0x1e4;const _0x34cb98=a84_0x34cb();let _0x312e24=_0x34cb98[_0x2c8c9d];return _0x312e24;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56861f=a84_0x312e,_0x4098a8=getTemplateBaseUrl();return _0x4098a8+_0x56861f(0x1ed);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a84_0x4765d5(0x1e4));export async function fetchRulesFromCDN(){const _0x1a9557=a84_0x4765d5,_0x3495c7=getRulesCdnUrl(),_0x55b2a1=await fetch(_0x3495c7,{'headers':{'Accept':_0x1a9557(0x1e9)}});if(!_0x55b2a1['ok'])throw new Error(_0x1a9557(0x1ec)+_0x55b2a1['status']+'\x20'+_0x55b2a1[_0x1a9557(0x1f4)]);const _0x48a43d=await _0x55b2a1[_0x1a9557(0x1e6)]();if(!_0x48a43d[_0x1a9557(0x1eb)]||typeof _0x48a43d[_0x1a9557(0x1eb)]!==_0x1a9557(0x1f6))throw new Error(_0x1a9557(0x1f1));return _0x48a43d;}export async function getRulesContent(){const _0x5d8703=a84_0x4765d5;try{const _0x7ab910=await fetchRulesFromCDN();return _0x7ab910[_0x5d8703(0x1eb)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x374f02=a84_0x4765d5;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x374f02(0x1e5));throw new Error(_0x374f02(0x1f3)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x51594f){const _0x47e525=a84_0x4765d5,_0x338643=await fetchRulesFromCDN()[_0x47e525(0x1e8)](()=>null);let _0x4148c6;_0x338643?(_0x4148c6=_0x338643['content'],_0x338643['lastUpdated']&&(_0x4148c6=appendUpdateTime(_0x4148c6,_0x338643[_0x47e525(0x1f9)]))):_0x4148c6=readLocalTemplate();const _0x535989=dirname(_0x51594f);!existsSync(_0x535989)&&mkdirSync(_0x535989,{'recursive':!![]}),writeFileSync(_0x51594f,_0x4148c6,_0x47e525(0x1e5));}export async function copyRulesToCursor(_0x22e3c1){const _0x322773=a84_0x4765d5,_0x3f65bb=join(_0x22e3c1,_0x322773(0x1fa)),_0x25846b=join(_0x3f65bb,_0x322773(0x1f0));if(existsSync(_0x25846b))return![];return await writeRulesFile(_0x25846b),!![];}export async function copyRulesToAgentsMd(_0x2acc20){const _0x2e53d4=join(_0x2acc20,'agents.md');if(existsSync(_0x2e53d4))return![];return await writeRulesFile(_0x2e53d4),!![];}
1
+ const a81_0x7d5378=a81_0x5dcd;(function(_0xb2b37b,_0x131c11){const _0x3c3c29=a81_0x5dcd,_0x55c4e2=_0xb2b37b();while(!![]){try{const _0x193b18=-parseInt(_0x3c3c29(0x1b0))/0x1+parseInt(_0x3c3c29(0x1b9))/0x2+parseInt(_0x3c3c29(0x1b6))/0x3+-parseInt(_0x3c3c29(0x1aa))/0x4*(parseInt(_0x3c3c29(0x1c2))/0x5)+parseInt(_0x3c3c29(0x1bb))/0x6*(parseInt(_0x3c3c29(0x1ba))/0x7)+parseInt(_0x3c3c29(0x1b4))/0x8+-parseInt(_0x3c3c29(0x1b8))/0x9;if(_0x193b18===_0x131c11)break;else _0x55c4e2['push'](_0x55c4e2['shift']());}catch(_0x37ad76){_0x55c4e2['push'](_0x55c4e2['shift']());}}}(a81_0x1a5f,0xe8aa9));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x19d398=a81_0x5dcd,_0x14d62e=getTemplateBaseUrl();return _0x14d62e+_0x19d398(0x1bc);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a81_0x7d5378(0x1af));export async function fetchRulesFromCDN(){const _0x2c4e69=a81_0x7d5378,_0x1adb9f=getRulesCdnUrl(),_0x161596=await fetch(_0x1adb9f,{'headers':{'Accept':_0x2c4e69(0x1c1)}});if(!_0x161596['ok'])throw new Error(_0x2c4e69(0x1b5)+_0x161596[_0x2c4e69(0x1b1)]+'\x20'+_0x161596[_0x2c4e69(0x1be)]);const _0x585b55=await _0x161596[_0x2c4e69(0x1ab)]();if(!_0x585b55[_0x2c4e69(0x1bd)]||typeof _0x585b55[_0x2c4e69(0x1bd)]!==_0x2c4e69(0x1ad))throw new Error(_0x2c4e69(0x1b3));return _0x585b55;}export async function getRulesContent(){const _0x91d07d=a81_0x7d5378;try{const _0x2d8083=await fetchRulesFromCDN();return _0x2d8083[_0x91d07d(0x1bd)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5d0cd2=a81_0x7d5378;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5d0cd2(0x1b7));throw new Error(_0x5d0cd2(0x1ac)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x44017d){const _0x5d7e46=a81_0x7d5378,_0x54aa78=await fetchRulesFromCDN()[_0x5d7e46(0x1c0)](()=>null);let _0x33973a;_0x54aa78?(_0x33973a=_0x54aa78[_0x5d7e46(0x1bd)],_0x54aa78[_0x5d7e46(0x1b2)]&&(_0x33973a=appendUpdateTime(_0x33973a,_0x54aa78[_0x5d7e46(0x1b2)]))):_0x33973a=readLocalTemplate();const _0x12fef3=dirname(_0x44017d);!existsSync(_0x12fef3)&&mkdirSync(_0x12fef3,{'recursive':!![]}),writeFileSync(_0x44017d,_0x33973a,'utf-8');}function a81_0x1a5f(){const _0x499a8e=['91164mPDZbe','/rules/rules.json','content','statusText','.cursor/rules','catch','application/json','8705COOOQy','4344mfehIA','json','本地模板文件不存在:\x20','string','agents.md','../../cdn-source/rules/lovrabet_rules.mdc.tpl','1819970EtBnRJ','status','lastUpdated','CDN\x20返回数据格式错误','6977968cAgoyP','CDN\x20请求失败:\x20','4326399LlRljr','utf-8','803799MCbgJP','1747294RtqBYr','721uoRpwy'];a81_0x1a5f=function(){return _0x499a8e;};return a81_0x1a5f();}export async function copyRulesToCursor(_0x33a276){const _0x5dd719=a81_0x7d5378,_0x573c29=join(_0x33a276,_0x5dd719(0x1bf)),_0x283026=join(_0x573c29,'lovrabet_rules.mdc');if(existsSync(_0x283026))return![];return await writeRulesFile(_0x283026),!![];}function a81_0x5dcd(_0x4b6de1,_0xbc93ab){_0x4b6de1=_0x4b6de1-0x1aa;const _0x1a5ffc=a81_0x1a5f();let _0x5dcdb9=_0x1a5ffc[_0x4b6de1];return _0x5dcdb9;}export async function copyRulesToAgentsMd(_0x58cc95){const _0x4abea6=a81_0x7d5378,_0x299da0=join(_0x58cc95,_0x4abea6(0x1ae));if(existsSync(_0x299da0))return![];return await writeRulesFile(_0x299da0),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x234a73){return new Promise(_0x260e97=>setTimeout(_0x260e97,_0x234a73));}
1
+ export function sleep(_0x3353c0){return new Promise(_0xbdbc80=>setTimeout(_0xbdbc80,_0x3353c0));}
@@ -1 +1 @@
1
- const a86_0x107d32=a86_0xed76;(function(_0x32ad48,_0x53fbf2){const _0x25378f=a86_0xed76,_0x517096=_0x32ad48();while(!![]){try{const _0x3bb1e6=parseInt(_0x25378f(0x152))/0x1+-parseInt(_0x25378f(0x150))/0x2*(-parseInt(_0x25378f(0x121))/0x3)+parseInt(_0x25378f(0x13d))/0x4+-parseInt(_0x25378f(0x14f))/0x5+-parseInt(_0x25378f(0x12b))/0x6+-parseInt(_0x25378f(0x155))/0x7+parseInt(_0x25378f(0x122))/0x8;if(_0x3bb1e6===_0x53fbf2)break;else _0x517096['push'](_0x517096['shift']());}catch(_0x23a6c0){_0x517096['push'](_0x517096['shift']());}}}(a86_0x8a6c,0x29e6d));import a86_0x1d10f5 from'node:fs';import a86_0x49f290 from'node:path';import{createRequire}from'node:module';function a86_0xed76(_0x1611d6,_0x54c6e4){_0x1611d6=_0x1611d6-0x11f;const _0x8a6cb6=a86_0x8a6c();let _0xed7605=_0x8a6cb6[_0x1611d6];return _0xed7605;}import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a86_0x107d32(0x12d))[a86_0x107d32(0x15d)];function a86_0x8a6c(){const _0x2a0566=['.jsx','message','version','includes','replace','toDisplayTitle','numeric','15ETSZhV','2100464EjAvgc','.md','map','replaceApiContent','toComponentName','error','datasetCode','mkdir','readFile','770166AhpcKg','processFile','../../package.json','alias','writeFile','split','alias:\x20\x22','readdir','tableName','toLowerCase','isDirectory','default','name','2-digit','\x20},','api','slice','pop','806204yIpMje','\x0a\x20\x20\x20\x20{\x20','toUpperCase','.tpl','push','template','.json','promises','info','.ts','endsWith','.scss','now','datasetCode:\x20\x22','toLocaleDateString','processDirectory','.js','processTemplate','920520oAveHG','29516Igzfbw','toLocaleString','253220Qhaamf','replaceContent','utf8','2149175zZhcZl','charAt','name:\x20\x22','模板内容替换完成','toLocaleTimeString','join'];a86_0x8a6c=function(){return _0x2a0566;};return a86_0x8a6c();}export class TemplateReplacer{static[a86_0x107d32(0x126)](_0x5169e9){const _0x238c2d=a86_0x107d32,_0x573583=_0x5169e9['split']('/')[_0x238c2d(0x13c)]()||_0x5169e9;return _0x573583[_0x238c2d(0x130)]('-')['map'](_0x384e9c=>_0x384e9c[_0x238c2d(0x156)](0x0)[_0x238c2d(0x13f)]()+_0x384e9c[_0x238c2d(0x13b)](0x1)[_0x238c2d(0x134)]())[_0x238c2d(0x15a)]('');}static[a86_0x107d32(0x11f)](_0x2cb35e){const _0x174722=a86_0x107d32,_0xc2ff0a=_0x2cb35e[_0x174722(0x130)]('/')[_0x174722(0x13c)]()||_0x2cb35e;return _0xc2ff0a['split']('-')[_0x174722(0x124)](_0x2c93e2=>_0x2c93e2['charAt'](0x0)['toUpperCase']()+_0x2c93e2[_0x174722(0x13b)](0x1)['toLowerCase']())[_0x174722(0x15a)]('\x20');}static[a86_0x107d32(0x153)](_0x590715,_0x476558,_0x30184a){const _0x5edda1=a86_0x107d32,_0x2f9ab5=this[_0x5edda1(0x126)](_0x476558),_0x58e706=this[_0x5edda1(0x11f)](_0x476558),_0x2443f3=new Date(),_0x4d8a80=_0x2443f3[_0x5edda1(0x151)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':'2-digit','hour':_0x5edda1(0x138),'minute':_0x5edda1(0x138),'second':_0x5edda1(0x138),'hour12':![]})[_0x5edda1(0x15f)](/\//g,'-'),_0x33bd06=_0x2443f3[_0x5edda1(0x14b)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':_0x5edda1(0x138)})[_0x5edda1(0x15f)](/\//g,'-'),_0xbbd9b7=_0x2443f3[_0x5edda1(0x159)](undefined,{'hour12':![]});let _0x5cc9be=_0x590715[_0x5edda1(0x15f)](/\{CliVersion\}/g,CLI_VERSION)[_0x5edda1(0x15f)](/\{ComponentName\}/g,_0x2f9ab5)[_0x5edda1(0x15f)](/\{DisplayTitle\}/g,_0x58e706)[_0x5edda1(0x15f)](/\{PageName\}/g,_0x476558)[_0x5edda1(0x15f)](/\{TemplateName\}/g,_0x30184a)[_0x5edda1(0x15f)](/\{CreatedAt\}/g,_0x4d8a80)[_0x5edda1(0x15f)](/\{CreatedDate\}/g,_0x33bd06)[_0x5edda1(0x15f)](/\{CreatedTime\}/g,_0xbbd9b7);return _0x5cc9be;}static[a86_0x107d32(0x125)](_0x472412,_0x1c7001,_0x841595,_0xd3cdc1,_0x4ba35d,_0x153e76,_0x503737){const _0x1384f7=a86_0x107d32,_0x731b1b=new Date(),_0x40d547=_0x731b1b['toISOString'](),_0x33117c=_0x841595[_0x1384f7(0x124)](_0x1a5af7=>{const _0x3754e5=_0x1384f7,_0x13191b=[_0x3754e5(0x14a)+_0x1a5af7[_0x3754e5(0x128)]+'\x22','tableName:\x20\x22'+_0x1a5af7[_0x3754e5(0x133)]+'\x22',_0x3754e5(0x157)+_0x1a5af7[_0x3754e5(0x137)]+'\x22'];return _0x1a5af7[_0x3754e5(0x12e)]&&_0x13191b[_0x3754e5(0x141)](_0x3754e5(0x131)+_0x1a5af7['alias']+'\x22'),_0x3754e5(0x13e)+_0x13191b[_0x3754e5(0x15a)](',\x20')+_0x3754e5(0x139);})['join'](''),_0x58312c=_0xd3cdc1||_0x841595[0x0]?.['alias']||'YourModel';let _0x45a8ca=_0x472412['replace'](/\{AppCode\}/g,_0x1c7001)[_0x1384f7(0x15f)](/\{ModelConfigs\}/g,_0x33117c)[_0x1384f7(0x15f)](/\{ExampleModelName\}/g,_0x58312c)[_0x1384f7(0x15f)](/\{ApiFileName\}/g,_0x4ba35d||_0x1384f7(0x13a))[_0x1384f7(0x15f)](/\{ConfigName\}/g,_0x153e76||_0x1384f7(0x136))[_0x1384f7(0x15f)](/\{ClientConfigParam\}/g,_0x503737||'')[_0x1384f7(0x15f)](/\{CreatedAt\}/g,_0x40d547);return _0x45a8ca;}static async[a86_0x107d32(0x14e)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707,_0x3f3b1e=!![]){const _0x1dbdb4=a86_0x107d32,_0x1a4270=Date[_0x1dbdb4(0x149)]();try{_0x3f3b1e&&logger[_0x1dbdb4(0x145)](_0x1dbdb4(0x142),'开始处理模板内容替换',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707});await a86_0x1d10f5[_0x1dbdb4(0x144)][_0x1dbdb4(0x129)](_0x386ea5,{'recursive':!![]}),await this[_0x1dbdb4(0x14c)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707);if(_0x3f3b1e){const _0x4a6360=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger['success']('template',_0x1dbdb4(0x158),_0x4a6360,{'pageName':_0xb0c067,'templateName':_0xaef707});}}catch(_0x3393f9){if(_0x3f3b1e){const _0x5874ef=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger[_0x1dbdb4(0x127)](_0x1dbdb4(0x142),'模板内容替换失败',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707,'error':_0x3393f9 instanceof Error?_0x3393f9[_0x1dbdb4(0x15c)]:String(_0x3393f9),'duration':_0x5874ef});}throw _0x3393f9;}}static async[a86_0x107d32(0x14c)](_0x5ec944,_0x252098,_0x57e117,_0x517d8b){const _0x461890=a86_0x107d32,_0x38eaf4=await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x132)](_0x5ec944,{'withFileTypes':!![]});for(const _0x36358f of _0x38eaf4){const _0x6338b4=a86_0x49f290[_0x461890(0x15a)](_0x5ec944,_0x36358f[_0x461890(0x137)]);let _0x4518f8=a86_0x49f290['join'](_0x252098,_0x36358f[_0x461890(0x137)]);_0x36358f[_0x461890(0x137)][_0x461890(0x147)](_0x461890(0x140))&&(_0x4518f8=a86_0x49f290[_0x461890(0x15a)](_0x252098,_0x36358f[_0x461890(0x137)][_0x461890(0x15f)](/\.tpl$/,'')));if(_0x36358f[_0x461890(0x135)]())await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x129)](_0x4518f8,{'recursive':!![]}),await this[_0x461890(0x14c)](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);else _0x36358f['isFile']()&&await this['processFile'](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);}}static async[a86_0x107d32(0x12c)](_0x46e846,_0xdf234d,_0x1300bc,_0x305213){const _0x2a128b=a86_0x107d32,_0x561bba=a86_0x49f290['extname'](_0x46e846)['toLowerCase']();_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))&&(_0xdf234d=_0xdf234d[_0x2a128b(0x15f)](/\.tpl$/,''));const _0x3a586a=['.tsx',_0x2a128b(0x146),_0x2a128b(0x15b),_0x2a128b(0x14d),_0x2a128b(0x143),_0x2a128b(0x123),'.css',_0x2a128b(0x148),_0x2a128b(0x140)];if(_0x3a586a[_0x2a128b(0x15e)](_0x561bba)||_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))){const _0x14776f=await a86_0x1d10f5[_0x2a128b(0x144)][_0x2a128b(0x12a)](_0x46e846,_0x2a128b(0x154)),_0x1ac727=this[_0x2a128b(0x153)](_0x14776f,_0x1300bc,_0x305213);await a86_0x1d10f5['promises'][_0x2a128b(0x12f)](_0xdf234d,_0x1ac727,_0x2a128b(0x154));}else await a86_0x1d10f5[_0x2a128b(0x144)]['copyFile'](_0x46e846,_0xdf234d);}}
1
+ function a83_0x4561(){const _0x32b549=['alias','toLowerCase','2-digit','replace','api','replaceApiContent','416456GXJMMG','7hNtyZY','join','slice','mkdir','map','../../package.json','promises','\x0a\x20\x20\x20\x20{\x20','error','processFile','toDisplayTitle','extname','41151mlOcyh','replaceContent','.scss','\x20},','copyFile','endsWith','default','345763xGyorc','.css','toComponentName','readFile','datasetCode','processDirectory','1308895iKGiXP','alias:\x20\x22','pop','.ts','22OuWOMy','split','includes','isDirectory','numeric','readdir','2170395UCGqZs','模板内容替换失败','YourModel','18183xLfSQI','.tpl','845250uuUZlT','120VEhRgg','模板内容替换完成','name:\x20\x22','toLocaleString','name','.tsx','writeFile','4dzpmRf','开始处理模板内容替换','toUpperCase','utf8','toLocaleTimeString','tableName:\x20\x22','push','processTemplate','info','template','charAt','version','now','datasetCode:\x20\x22'];a83_0x4561=function(){return _0x32b549;};return a83_0x4561();}function a83_0xa8ef(_0x116534,_0x903728){_0x116534=_0x116534-0x86;const _0x456121=a83_0x4561();let _0xa8efe4=_0x456121[_0x116534];return _0xa8efe4;}const a83_0x2cee84=a83_0xa8ef;(function(_0x48af61,_0x4f54e2){const _0x1cfa99=a83_0xa8ef,_0xf9c472=_0x48af61();while(!![]){try{const _0x32492a=-parseInt(_0x1cfa99(0xbf))/0x1+parseInt(_0x1cfa99(0xc9))/0x2*(-parseInt(_0x1cfa99(0xb8))/0x3)+parseInt(_0x1cfa99(0x97))/0x4*(parseInt(_0x1cfa99(0xc5))/0x5)+parseInt(_0x1cfa99(0x8f))/0x6+-parseInt(_0x1cfa99(0xac))/0x7*(-parseInt(_0x1cfa99(0xab))/0x8)+parseInt(_0x1cfa99(0x8a))/0x9+parseInt(_0x1cfa99(0x90))/0xa*(-parseInt(_0x1cfa99(0x8d))/0xb);if(_0x32492a===_0x4f54e2)break;else _0xf9c472['push'](_0xf9c472['shift']());}catch(_0x5c58e5){_0xf9c472['push'](_0xf9c472['shift']());}}}(a83_0x4561,0x2bcb4));import a83_0x1cdcbb from'node:fs';import a83_0x58ef98 from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a83_0x2cee84(0xb1))[a83_0x2cee84(0xa2)];export class TemplateReplacer{static[a83_0x2cee84(0xc1)](_0x45b9c5){const _0x4422bb=a83_0x2cee84,_0x2d8e28=_0x45b9c5[_0x4422bb(0xca)]('/')[_0x4422bb(0xc7)]()||_0x45b9c5;return _0x2d8e28[_0x4422bb(0xca)]('-')[_0x4422bb(0xb0)](_0x370d3e=>_0x370d3e[_0x4422bb(0xa1)](0x0)[_0x4422bb(0x99)]()+_0x370d3e[_0x4422bb(0xae)](0x1)[_0x4422bb(0xa6)]())[_0x4422bb(0xad)]('');}static['toDisplayTitle'](_0x476240){const _0x193f12=a83_0x2cee84,_0x5bb110=_0x476240[_0x193f12(0xca)]('/')['pop']()||_0x476240;return _0x5bb110[_0x193f12(0xca)]('-')[_0x193f12(0xb0)](_0x22e236=>_0x22e236[_0x193f12(0xa1)](0x0)[_0x193f12(0x99)]()+_0x22e236[_0x193f12(0xae)](0x1)[_0x193f12(0xa6)]())[_0x193f12(0xad)]('\x20');}static['replaceContent'](_0x885fe,_0x1fc2a5,_0x4731e2){const _0x3ece0b=a83_0x2cee84,_0x59b484=this['toComponentName'](_0x1fc2a5),_0x1c4556=this[_0x3ece0b(0xb6)](_0x1fc2a5),_0xd79085=new Date(),_0x32c92c=_0xd79085[_0x3ece0b(0x93)](undefined,{'year':'numeric','month':'2-digit','day':_0x3ece0b(0xa7),'hour':'2-digit','minute':'2-digit','second':_0x3ece0b(0xa7),'hour12':![]})[_0x3ece0b(0xa8)](/\//g,'-'),_0xa6bf71=_0xd79085['toLocaleDateString'](undefined,{'year':_0x3ece0b(0x88),'month':_0x3ece0b(0xa7),'day':_0x3ece0b(0xa7)})['replace'](/\//g,'-'),_0x584a79=_0xd79085[_0x3ece0b(0x9b)](undefined,{'hour12':![]});let _0x5f554b=_0x885fe[_0x3ece0b(0xa8)](/\{CliVersion\}/g,CLI_VERSION)[_0x3ece0b(0xa8)](/\{ComponentName\}/g,_0x59b484)[_0x3ece0b(0xa8)](/\{DisplayTitle\}/g,_0x1c4556)[_0x3ece0b(0xa8)](/\{PageName\}/g,_0x1fc2a5)['replace'](/\{TemplateName\}/g,_0x4731e2)[_0x3ece0b(0xa8)](/\{CreatedAt\}/g,_0x32c92c)[_0x3ece0b(0xa8)](/\{CreatedDate\}/g,_0xa6bf71)[_0x3ece0b(0xa8)](/\{CreatedTime\}/g,_0x584a79);return _0x5f554b;}static[a83_0x2cee84(0xaa)](_0x2eb3ef,_0x5886a2,_0x1a04f2,_0x27f9f5,_0x5ceebd,_0x2c95fa,_0x236cc9){const _0xf722cf=a83_0x2cee84,_0x490f6a=new Date(),_0x407837=_0x490f6a['toISOString'](),_0x57cfc0=_0x1a04f2[_0xf722cf(0xb0)](_0x45f168=>{const _0x5a0919=_0xf722cf,_0x11a0d9=[_0x5a0919(0xa4)+_0x45f168[_0x5a0919(0xc3)]+'\x22',_0x5a0919(0x9c)+_0x45f168['tableName']+'\x22',_0x5a0919(0x92)+_0x45f168[_0x5a0919(0x94)]+'\x22'];return _0x45f168[_0x5a0919(0xa5)]&&_0x11a0d9[_0x5a0919(0x9d)](_0x5a0919(0xc6)+_0x45f168[_0x5a0919(0xa5)]+'\x22'),_0x5a0919(0xb3)+_0x11a0d9['join'](',\x20')+_0x5a0919(0xbb);})[_0xf722cf(0xad)](''),_0x49cd68=_0x27f9f5||_0x1a04f2[0x0]?.[_0xf722cf(0xa5)]||_0xf722cf(0x8c);let _0x5d79e7=_0x2eb3ef[_0xf722cf(0xa8)](/\{AppCode\}/g,_0x5886a2)[_0xf722cf(0xa8)](/\{ModelConfigs\}/g,_0x57cfc0)[_0xf722cf(0xa8)](/\{ExampleModelName\}/g,_0x49cd68)['replace'](/\{ApiFileName\}/g,_0x5ceebd||_0xf722cf(0xa9))[_0xf722cf(0xa8)](/\{ConfigName\}/g,_0x2c95fa||_0xf722cf(0xbe))['replace'](/\{ClientConfigParam\}/g,_0x236cc9||'')[_0xf722cf(0xa8)](/\{CreatedAt\}/g,_0x407837);return _0x5d79e7;}static async[a83_0x2cee84(0x9e)](_0x54f4a2,_0x11432d,_0x47aa23,_0x3844eb,_0x52998c=!![]){const _0x53643c=a83_0x2cee84,_0x20c78a=Date[_0x53643c(0xa3)]();try{_0x52998c&&logger[_0x53643c(0x9f)](_0x53643c(0xa0),_0x53643c(0x98),{'templatePath':_0x54f4a2,'targetPath':_0x11432d,'pageName':_0x47aa23,'templateName':_0x3844eb});await a83_0x1cdcbb[_0x53643c(0xb2)][_0x53643c(0xaf)](_0x11432d,{'recursive':!![]}),await this[_0x53643c(0xc4)](_0x54f4a2,_0x11432d,_0x47aa23,_0x3844eb);if(_0x52998c){const _0x3197d7=Date[_0x53643c(0xa3)]()-_0x20c78a;logger['success'](_0x53643c(0xa0),_0x53643c(0x91),_0x3197d7,{'pageName':_0x47aa23,'templateName':_0x3844eb});}}catch(_0x1462b6){if(_0x52998c){const _0x4383d4=Date[_0x53643c(0xa3)]()-_0x20c78a;logger[_0x53643c(0xb4)]('template',_0x53643c(0x8b),{'templatePath':_0x54f4a2,'targetPath':_0x11432d,'pageName':_0x47aa23,'templateName':_0x3844eb,'error':_0x1462b6 instanceof Error?_0x1462b6['message']:String(_0x1462b6),'duration':_0x4383d4});}throw _0x1462b6;}}static async['processDirectory'](_0x3be36f,_0x5a4327,_0x409831,_0x3f7700){const _0xf79d2e=a83_0x2cee84,_0x10beed=await a83_0x1cdcbb[_0xf79d2e(0xb2)][_0xf79d2e(0x89)](_0x3be36f,{'withFileTypes':!![]});for(const _0x46164c of _0x10beed){const _0xe1d784=a83_0x58ef98[_0xf79d2e(0xad)](_0x3be36f,_0x46164c[_0xf79d2e(0x94)]);let _0x3cbe45=a83_0x58ef98[_0xf79d2e(0xad)](_0x5a4327,_0x46164c['name']);_0x46164c[_0xf79d2e(0x94)][_0xf79d2e(0xbd)]('.tpl')&&(_0x3cbe45=a83_0x58ef98[_0xf79d2e(0xad)](_0x5a4327,_0x46164c[_0xf79d2e(0x94)]['replace'](/\.tpl$/,'')));if(_0x46164c[_0xf79d2e(0x87)]())await a83_0x1cdcbb[_0xf79d2e(0xb2)][_0xf79d2e(0xaf)](_0x3cbe45,{'recursive':!![]}),await this[_0xf79d2e(0xc4)](_0xe1d784,_0x3cbe45,_0x409831,_0x3f7700);else _0x46164c['isFile']()&&await this[_0xf79d2e(0xb5)](_0xe1d784,_0x3cbe45,_0x409831,_0x3f7700);}}static async['processFile'](_0x69d7ef,_0x240587,_0x332904,_0x4bf6e0){const _0x2a57c6=a83_0x2cee84,_0x878adc=a83_0x58ef98[_0x2a57c6(0xb7)](_0x69d7ef)[_0x2a57c6(0xa6)]();_0x69d7ef['endsWith'](_0x2a57c6(0x8e))&&(_0x240587=_0x240587[_0x2a57c6(0xa8)](/\.tpl$/,''));const _0x505644=[_0x2a57c6(0x95),_0x2a57c6(0xc8),'.jsx','.js','.json','.md',_0x2a57c6(0xc0),_0x2a57c6(0xba),'.tpl'];if(_0x505644[_0x2a57c6(0x86)](_0x878adc)||_0x69d7ef[_0x2a57c6(0xbd)]('.tpl')){const _0xb4ccfe=await a83_0x1cdcbb[_0x2a57c6(0xb2)][_0x2a57c6(0xc2)](_0x69d7ef,_0x2a57c6(0x9a)),_0x431d07=this[_0x2a57c6(0xb9)](_0xb4ccfe,_0x332904,_0x4bf6e0);await a83_0x1cdcbb[_0x2a57c6(0xb2)][_0x2a57c6(0x96)](_0x240587,_0x431d07,'utf8');}else await a83_0x1cdcbb[_0x2a57c6(0xb2)][_0x2a57c6(0xbc)](_0x69d7ef,_0x240587);}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.4-beta.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"
@@ -27,6 +27,9 @@
27
27
  "test:unit": "vitest run test/unit",
28
28
  "test:integration": "vitest run test/integration",
29
29
  "test:e2e": "vitest run test/e2e",
30
+ "test:windows": "node test/run-windows-tests.js",
31
+ "test:windows:unit": "node test/run-windows-tests.js unit",
32
+ "test:windows:integration": "node test/run-windows-tests.js integration",
30
33
  "typecheck": "tsc --noEmit",
31
34
  "lint": "echo 'No linter configured yet'",
32
35
  "ci": "npm run typecheck && npm run test:run && npm run build"
@@ -7,59 +7,14 @@
7
7
  ```
8
8
  templates/
9
9
  ├── README.md # 本说明文档
10
- ├── pages/ # 页面模板,用于 `lovrabet add page` 命令
11
- │ ├── blank/ # 简单空白页面模板
12
- │ └── hello-world/ # 功能丰富的演示页面模板
13
- └── projects/ # 项目模板,用于 `lovrabet create project` 命令
10
+ ├── generate-api/ # API 生成模板
11
+ └── projects/ # 项目模板,用于 `lovrabet create` 命令
14
12
  └── sub-app-react-demo/ # Git 子模块,指向主模板仓库
15
13
  ```
16
14
 
17
- ## 页面模板
15
+ ## API 生成模板
18
16
 
19
- ### 可用占位符标签
20
-
21
- 创建页面模板(`.tsx.tpl` 文件)时,可以使用以下占位符标签,它们会被自动替换:
22
-
23
- | 标签 | 说明 | 示例 |
24
- |-----|------|------|
25
- | `{ComponentName}` | PascalCase 组件名 | `UserProfile` |
26
- | `{DisplayTitle}` | 人类可读的标题 | `User Profile` |
27
- | `{PageName}` | 原始的 kebab-case 页面名 | `user-profile` |
28
- | `{TemplateName}` | 使用的模板名称 | `blank` |
29
- | `{CreatedAt}` | 创建时的 ISO 时间戳 | `2024-09-14T15:30:45.123Z` |
30
- | `{CreatedDate}` | 创建日期 | `2024-09-14` |
31
- | `{CreatedTime}` | 创建时间 | `15:30:45` |
32
-
33
- ### 模板文件命名
34
-
35
- - 模板文件应使用 `.tpl` 扩展名(如 `index.tsx.tpl`)
36
- - 生成时会自动移除 `.tpl` 扩展名
37
- - CLI 会处理所有文本文件(`.tsx`, `.ts`, `.jsx`, `.js`, `.json`, `.md`, `.css`, `.scss`, `.tpl`)
38
-
39
- ### 模板使用示例
40
-
41
- ```tsx
42
- /**
43
- * Generated by Lovrabet CLI
44
- * Template: {TemplateName}
45
- * Created: {CreatedAt}
46
- * Page: {PageName}
47
- */
48
- import React from "react";
49
-
50
- function {ComponentName}() {
51
- return <div>{DisplayTitle} 页面</div>;
52
- }
53
-
54
- export default {ComponentName};
55
- ```
56
-
57
- ### 添加新页面模板
58
-
59
- 1. 在 `templates/pages/` 下创建新目录(如 `templates/pages/my-template/`)
60
- 2. 添加带 `.tpl` 扩展名的模板文件
61
- 3. 使用上述文档化的占位符标签
62
- 4. 无需修改 CLI 代码 - 任何新模板都会自动工作!
17
+ `generate-api/` 目录包含用于生成 API 配置的模板。
63
18
 
64
19
  ## 项目模板
65
20
 
@@ -101,18 +56,18 @@ git submodule update --init --recursive
101
56
 
102
57
  添加新模板时:
103
58
 
104
- 1. **页面模板**:放置在 `templates/pages/[template-name]/` 中
105
- 2. **使用占位符标签**:遵循文档化的标签系统
106
- 3. **文件扩展名**:需要处理的模板文件使用 `.tpl`
107
- 4. **本地测试**:提交前使用新模板生成页面进行测试
108
- 5. **更新此 README**:记录任何新功能或标签
59
+ 1. **项目模板**:放置在 `templates/projects/` 中
60
+ 2. **文件扩展名**:需要处理的模板文件使用 `.tpl`
61
+ 3. **本地测试**:提交前使用新模板生成项目进行测试
62
+ 4. **更新此 README**:记录任何新功能
109
63
 
110
64
  ## 注意事项
111
65
 
112
- - 模板在页面/项目生成过程中被复制和处理
66
+ - 模板在项目生成过程中被复制和处理
113
67
  - CLI 使用 `TemplateReplacer` 工具进行标签替换
114
68
  - 生成的文件包含显示生成元数据的头部注释
115
69
  - 所有模板支持国际化并可根据需要扩展
70
+
116
71
  ## Cursor Rules 模板
117
72
 
118
73
  ### 用途
@@ -1 +0,0 @@
1
- (function(_0x28ab51,_0x992edc){const _0x81a2f3=a0_0x1f6b,_0x4d6696=_0x28ab51();while(!![]){try{const _0x35c4bf=-parseInt(_0x81a2f3(0x1f1))/0x1*(-parseInt(_0x81a2f3(0x1f7))/0x2)+parseInt(_0x81a2f3(0x1f5))/0x3*(-parseInt(_0x81a2f3(0x1ff))/0x4)+parseInt(_0x81a2f3(0x201))/0x5+-parseInt(_0x81a2f3(0x1fd))/0x6+parseInt(_0x81a2f3(0x203))/0x7*(-parseInt(_0x81a2f3(0x1ea))/0x8)+-parseInt(_0x81a2f3(0x1ec))/0x9+parseInt(_0x81a2f3(0x1e8))/0xa;if(_0x35c4bf===_0x992edc)break;else _0x4d6696['push'](_0x4d6696['shift']());}catch(_0x5531e1){_0x4d6696['push'](_0x4d6696['shift']());}}}(a0_0x4d6a,0x58e62));import{jsx as a0_0x2469f6,jsxs as a0_0x48b6c8}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';import a0_0x4cce16 from'node:fs';function a0_0x1f6b(_0x5ae4a6,_0x5d1c73){_0x5ae4a6=_0x5ae4a6-0x1e8;const _0x4d6a48=a0_0x4d6a();let _0x1f6be8=_0x4d6a48[_0x5ae4a6];return _0x1f6be8;}function a0_0x4d6a(){const _0x496486=['column','7VBRPdj','return','gray','13718980qKEuxv','delete','4691768FqOeMQ','existsSync','2602899BMpVKf','addPage.input.route.label','red','includes','addPage.validation.path.tooLong','15695QHAvUj','addPage.validation.path.exists','my-page','addPage.validation.path.invalid','21927kZCnbM','addPage.input.route.hint','80UGBjzF','length','trim','green','slice','addPage.steps.step2','2716854dZVhWS','startsWith','292GsGCvN','\x20←\x20','1132400SfFlXZ'];a0_0x4d6a=function(){return _0x496486;};return a0_0x4d6a();}import{useI18n}from'../i18n/hooks.js';export function InputProjectCode(_0x2c8ec9){const _0x2a1175=a0_0x1f6b,{onSubmit:_0x4e9e0c,pagePath:_0x406942}=_0x2c8ec9,{t:_0x27c967}=useI18n(),[_0x2855f3,_0x31c2ca]=useState(''),[_0x4e6b0f,_0x4306d6]=useState(''),_0x188d21=_0x2a1175(0x1f3);function _0x325c78(_0x2c964a){const _0x4bfb34=_0x2a1175;if(_0x2c964a[_0x4bfb34(0x1f8)]>0x64)return{'valid':![],'message':_0x27c967(_0x4bfb34(0x1f0))};if(_0x2c964a[_0x4bfb34(0x1fe)]('/')||_0x2c964a['endsWith']('/'))return{'valid':![],'message':_0x27c967('addPage.validation.path.invalidStartEnd')};if(_0x2c964a[_0x4bfb34(0x1ef)]('//'))return{'valid':![],'message':_0x27c967('addPage.validation.path.doubleSlash')};const _0x22e076=_0x2c964a['split']('/');for(const _0x183cb1 of _0x22e076){if(!_0x183cb1)continue;const _0x1ab1a4=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(!_0x1ab1a4['test'](_0x183cb1))return{'valid':![],'message':_0x27c967('addPage.validation.path.invalidSegment')};}return{'valid':!![]};}return useInput((_0x1090b6,_0x7545de)=>{const _0x16848e=_0x2a1175;if(_0x7545de[_0x16848e(0x204)]){const _0x457fd6=_0x2855f3[_0x16848e(0x1f9)]()||_0x188d21;if(_0x4e6b0f)return;const _0x525fbc=_0x406942+'/'+_0x457fd6;if(a0_0x4cce16[_0x16848e(0x1eb)](_0x525fbc)){_0x4306d6(_0x27c967(_0x16848e(0x1f2),{'path':_0x457fd6}));return;}_0x4e9e0c(_0x457fd6),_0x31c2ca(''),_0x4306d6('');}else _0x7545de['backspace']||_0x7545de[_0x16848e(0x1e9)]?_0x31c2ca(_0x47b8cd=>{const _0x1a7473=_0x16848e,_0x289bbf=_0x47b8cd[_0x1a7473(0x1fb)](0x0,-0x1),{valid:_0x23486e,message:_0x4b1e92}=_0x325c78(_0x289bbf);return _0x4306d6(_0x23486e?'':_0x4b1e92||_0x27c967('addPage.validation.path.invalid')),_0x289bbf;}):_0x31c2ca(_0x47cb49=>{const _0x126f04=_0x16848e,_0x7414ac=_0x47cb49+_0x1090b6,{valid:_0x453522,message:_0x4b7b88}=_0x325c78(_0x7414ac);return _0x4306d6(_0x453522?'':_0x4b7b88||_0x27c967(_0x126f04(0x1f4))),_0x7414ac;});}),a0_0x48b6c8(Box,{'flexDirection':_0x2a1175(0x202),'children':[a0_0x48b6c8(Box,{'children':[a0_0x2469f6(Text,{'color':_0x2a1175(0x205),'children':_0x27c967(_0x2a1175(0x1fc))}),a0_0x2469f6(Text,{'children':_0x27c967(_0x2a1175(0x1ed))}),_0x2855f3?a0_0x2469f6(Text,{'color':_0x2a1175(0x1fa),'children':_0x2855f3}):a0_0x2469f6(Text,{'color':_0x2a1175(0x205),'children':_0x188d21}),_0x4e6b0f&&a0_0x48b6c8(Text,{'color':_0x2a1175(0x1ee),'children':[_0x2a1175(0x200),_0x4e6b0f]})]}),!_0x4e6b0f&&!_0x2855f3&&a0_0x2469f6(Box,{'children':a0_0x2469f6(Text,{'color':_0x2a1175(0x205),'children':_0x27c967(_0x2a1175(0x1f6))})})]});}