@lovrabet/cli 1.3.3 → 1.3.4-beta.0

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_0x74b9b8=a71_0x115b;(function(_0x50d496,_0x17d715){const _0x2ee957=a71_0x115b,_0x4b19f3=_0x50d496();while(!![]){try{const _0x42e15c=parseInt(_0x2ee957(0x13a))/0x1*(parseInt(_0x2ee957(0x127))/0x2)+-parseInt(_0x2ee957(0x11c))/0x3+parseInt(_0x2ee957(0x11d))/0x4+-parseInt(_0x2ee957(0x115))/0x5+parseInt(_0x2ee957(0x10b))/0x6*(-parseInt(_0x2ee957(0x132))/0x7)+-parseInt(_0x2ee957(0x117))/0x8*(-parseInt(_0x2ee957(0x122))/0x9)+parseInt(_0x2ee957(0x128))/0xa*(parseInt(_0x2ee957(0x133))/0xb);if(_0x42e15c===_0x17d715)break;else _0x4b19f3['push'](_0x4b19f3['shift']());}catch(_0x56aa72){_0x4b19f3['push'](_0x4b19f3['shift']());}}}(a71_0x42ce,0x578db));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':a71_0x74b9b8(0x11e),'folders':['.cursorrules','.cursor'],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x11f),'template':a71_0x74b9b8(0x13d)}]},'windsurf':{'name':'Windsurf','description':'Windsurf\x20IDE','folders':[a71_0x74b9b8(0x12c)],'files':[{'type':'file','path':a71_0x74b9b8(0x131),'template':a71_0x74b9b8(0x13d)}]},'claude':{'name':a71_0x74b9b8(0x12e),'description':a71_0x74b9b8(0x12e),'folders':['.claude'],'files':[{'type':a71_0x74b9b8(0x136),'path':'.claude/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'cline':{'name':a71_0x74b9b8(0x112),'description':a71_0x74b9b8(0x139),'folders':['.cline'],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x13c),'template':a71_0x74b9b8(0x13d)}]},'codex':{'name':a71_0x74b9b8(0x129),'description':a71_0x74b9b8(0x125),'folders':['.codex'],'files':[{'type':a71_0x74b9b8(0x136),'path':'.codex/skills/lovrabet/SKILL.md','template':a71_0x74b9b8(0x13d)}]},'opencode':{'name':a71_0x74b9b8(0x110),'description':a71_0x74b9b8(0x119),'folders':[a71_0x74b9b8(0x138)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x12f),'template':a71_0x74b9b8(0x13d)}]},'qoder':{'name':'Qoder','description':a71_0x74b9b8(0x10c),'folders':[a71_0x74b9b8(0x12b)],'files':[{'type':'file','path':a71_0x74b9b8(0x12d),'template':a71_0x74b9b8(0x13d)},{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x120),'template':a71_0x74b9b8(0x13d)}]},'codebuddy':{'name':'CodeBuddy','description':a71_0x74b9b8(0x13e),'folders':[a71_0x74b9b8(0x123)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x11b),'template':a71_0x74b9b8(0x13d)}]},'trae':{'name':a71_0x74b9b8(0x116),'description':a71_0x74b9b8(0x11a),'folders':[a71_0x74b9b8(0x10f)],'files':[{'type':a71_0x74b9b8(0x136),'path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a71_0x74b9b8(0x12a),'description':'通用模板\x20-\x20兜底方案','folders':['.agent'],'files':[{'type':'file','path':a71_0x74b9b8(0x118),'template':'SKILL.md.tpl'}]},'antigravity':{'name':'Antigravity','description':a71_0x74b9b8(0x135),'folders':[a71_0x74b9b8(0x113)],'files':[{'type':a71_0x74b9b8(0x136),'path':a71_0x74b9b8(0x118),'template':a71_0x74b9b8(0x13d)}]}};function a71_0x115b(_0x3bdb90,_0x2fcdc1){_0x3bdb90=_0x3bdb90-0x10b;const _0x42ce2e=a71_0x42ce();let _0x115bee=_0x42ce2e[_0x3bdb90];return _0x115bee;}export const CORE_IDE_LIST=[a71_0x74b9b8(0x124),a71_0x74b9b8(0x121),'codebuddy',a71_0x74b9b8(0x114),a71_0x74b9b8(0x134),'opencode','qoder',a71_0x74b9b8(0x13b),'windsurf'];export const IDE_LIST=[a71_0x74b9b8(0x10e),a71_0x74b9b8(0x124),a71_0x74b9b8(0x121),a71_0x74b9b8(0x111),a71_0x74b9b8(0x114),'cursor',a71_0x74b9b8(0x130),'qoder',a71_0x74b9b8(0x13b),a71_0x74b9b8(0x126),a71_0x74b9b8(0x10d)];export const ALL_CORE_IDES=['cursor',a71_0x74b9b8(0x126),'claude','cline',a71_0x74b9b8(0x114),a71_0x74b9b8(0x130),a71_0x74b9b8(0x137),'codebuddy','trae'];function a71_0x42ce(){const _0x4b2d9f=['.qoder/rules/lovrabet.md','Claude\x20Code','.opencode/skills/lovrabet/SKILL.md','opencode','.windsurf/workflows/lovrabet.md','81501DlmBEn','1083269xBsmIM','cursor','Antigravity\x20IDE','file','qoder','.opencode','Cline\x20IDE','47800AbWmrj','trae','.cline/skills/lovrabet/SKILL.md','SKILL.md.tpl','CodeBuddy\x20IDE','342vHijpA','Qoder\x20IDE','agent','antigravity','.trae','OpenCode','codebuddy','Cline','.agent','codex','1640535gJqUFW','Trae','5112YPePBU','.agent/skills/lovrabet/SKILL.md','OpenCode\x20IDE','Trae\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','247764mciuZl','1961300vxyqqy','Cursor\x20IDE','.cursor/skills/lovrabet.md','.qoder/skills/lovrabet/SKILL.md','cline','1791MnTadZ','.codebuddy','claude','Codex\x20IDE','windsurf','30snGrSA','10ZNfgdi','Codex','其他\x20(通用模板)','.qoder','.windsurf'];a71_0x42ce=function(){return _0x4b2d9f;};return a71_0x42ce();}export const MCP_IDES=new Set(['cursor',a71_0x74b9b8(0x124)]);
@@ -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(_0x32a08d,_0x257ef9){const _0x3585d1=a72_0x3c2d,_0x1ab3e9=_0x32a08d();while(!![]){try{const _0x929361=-parseInt(_0x3585d1(0xb5))/0x1*(-parseInt(_0x3585d1(0xa6))/0x2)+parseInt(_0x3585d1(0xb9))/0x3*(-parseInt(_0x3585d1(0xb4))/0x4)+parseInt(_0x3585d1(0xad))/0x5+-parseInt(_0x3585d1(0xb2))/0x6*(-parseInt(_0x3585d1(0xa7))/0x7)+parseInt(_0x3585d1(0xaf))/0x8*(parseInt(_0x3585d1(0xb0))/0x9)+-parseInt(_0x3585d1(0xb6))/0xa*(parseInt(_0x3585d1(0xb7))/0xb)+-parseInt(_0x3585d1(0xa8))/0xc*(parseInt(_0x3585d1(0xab))/0xd);if(_0x929361===_0x257ef9)break;else _0x1ab3e9['push'](_0x1ab3e9['shift']());}catch(_0x379ad9){_0x1ab3e9['push'](_0x1ab3e9['shift']());}}}(a72_0x4f73,0xac458));function a72_0x3c2d(_0xd5b042,_0x3b5ffb){_0xd5b042=_0xd5b042-0xa6;const _0x4f731f=a72_0x4f73();let _0x3c2d5e=_0x4f731f[_0xd5b042];return _0x3c2d5e;}import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x225967=a72_0x3c2d;try{const _0x236ae7=getTemplateBaseUrl(),_0x3ba0e7=_0x236ae7+_0x225967(0xae),_0x56995c=await fetch(_0x3ba0e7,{'headers':{'Accept':_0x225967(0xac)}});if(!_0x56995c['ok'])return null;const _0x1feb2c=await _0x56995c[_0x225967(0xa9)]();if(!_0x1feb2c[_0x225967(0xb8)]?.[_0x225967(0xb3)]||!_0x1feb2c[_0x225967(0xb1)]?.[_0x225967(0xaa)]?.['stableVersion'])return null;return _0x1feb2c;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;function a72_0x4f73(){const _0x5636fb=['sdk','30dUxbYj','stableVersion','1464kOAADk','1nmJVDn','3279460AcjWpr','11nYGbiR','cli','1605kWbDhX','200118TsaOnq','985537Wbtsih','552AbHjgE','json','node','280943Owpinu','application/json','996870xwIdBy','/config.json','157432FjSLTP','558MrRmJI'];a72_0x4f73=function(){return _0x5636fb;};return a72_0x4f73();}export async function getCdnConfig(){const _0x21f81b=Date['now']();if(cachedConfig&&_0x21f81b-cacheTime<CACHE_TTL)return cachedConfig;const _0xd5d257=await fetchCdnConfig();return _0xd5d257&&(cachedConfig=_0xd5d257,cacheTime=_0x21f81b),_0xd5d257;}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_0x1e23f9=a73_0x164e;(function(_0x16f4a5,_0x1d99ca){const _0x652b81=a73_0x164e,_0x18f0e1=_0x16f4a5();while(!![]){try{const _0x52f62d=parseInt(_0x652b81(0x160))/0x1+-parseInt(_0x652b81(0x16a))/0x2*(parseInt(_0x652b81(0x15d))/0x3)+-parseInt(_0x652b81(0x159))/0x4*(-parseInt(_0x652b81(0x15e))/0x5)+-parseInt(_0x652b81(0x163))/0x6*(parseInt(_0x652b81(0x155))/0x7)+parseInt(_0x652b81(0x16c))/0x8+parseInt(_0x652b81(0x161))/0x9+-parseInt(_0x652b81(0x151))/0xa;if(_0x52f62d===_0x1d99ca)break;else _0x18f0e1['push'](_0x18f0e1['shift']());}catch(_0x52ffd1){_0x18f0e1['push'](_0x18f0e1['shift']());}}}(a73_0x4c1a,0x7c32a));import a73_0xeeed99 from'node:fs';function a73_0x164e(_0x236f45,_0x4d9432){_0x236f45=_0x236f45-0x149;const _0x4c1a85=a73_0x4c1a();let _0x164e1f=_0x4c1a85[_0x236f45];return _0x164e1f;}import a73_0x2ad3bd from'node:path';import a73_0x3e61a1 from'semver';import{getCdnConfig}from'./cdn-config.js';import a73_0x16e6de from'../i18n/index.js';const t=a73_0x16e6de['t'][a73_0x1e23f9(0x15c)](a73_0x16e6de),FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0xd7092c){const _0x130388=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x130388['some'](_0x1d0107=>_0x1d0107['test'](_0xd7092c));}function getInstalledVersion(_0x286098,_0x118503){const _0x25ed93=a73_0x1e23f9;try{const _0x53892c=a73_0x2ad3bd[_0x25ed93(0x15a)](_0x286098,_0x25ed93(0x14a),_0x118503,_0x25ed93(0x152));if(a73_0xeeed99['existsSync'](_0x53892c)){const _0x3a9247=JSON[_0x25ed93(0x153)](a73_0xeeed99['readFileSync'](_0x53892c,'utf-8'));return _0x3a9247[_0x25ed93(0x149)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1fa686=a73_0x1e23f9;try{const _0xdbb4c1=await getCdnConfig();return _0xdbb4c1?.[_0x1fa686(0x14b)]?.[_0x1fa686(0x154)]?.[_0x1fa686(0x14d)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x40f4db=a73_0x1e23f9;try{const _0x4390aa=await getCdnConfig();return _0x4390aa?.[_0x40f4db(0x14b)]?.[_0x40f4db(0x154)]?.[_0x40f4db(0x16b)]||_0x40f4db(0x157);}catch{return _0x40f4db(0x157);}}function a73_0x4c1a(){const _0x42dd7f=['upgrade.sdk.current','stableVersion','npm\x20install\x20','readFileSync','dependencies','7221460egiVRM','package.json','parse','node','721TjomCa','upgrade.sdk.stable','@lovrabet/sdk','upgrade.sdk.command','4GMGCrF','join','devDependencies','bind','60iesera','1345915vmIgBG','upgrade.sdk.title','489576cGzzqh','6902100PuHsBF','log','30036bcFnQa','coerce','\x1b[1m','\x1b[0m','existsSync','\x1b[33m','utf8','834HufKAy','packageName','1833272knyQlr','version','node_modules','sdk'];a73_0x4c1a=function(){return _0x42dd7f;};return a73_0x4c1a();}export async function checkSdkVersion(_0x49fb45){const _0x451df6=a73_0x1e23f9,_0x3ec213=a73_0x2ad3bd['join'](_0x49fb45,_0x451df6(0x152)),[_0x59e6c2,_0xdd00d0]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0xbaac4d=_0x59e6c2||FALLBACK_MIN_SDK_VERSION;if(!a73_0xeeed99[_0x451df6(0x167)](_0x3ec213))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};try{const _0x14e98f=JSON[_0x451df6(0x153)](a73_0xeeed99[_0x451df6(0x14f)](_0x3ec213,'utf8')),_0x23d98f=_0x14e98f[_0x451df6(0x150)]||{},_0x45cba7=_0x14e98f[_0x451df6(0x15b)]||{},_0x2391a7=_0x23d98f[_0xdd00d0]||_0x45cba7[_0xdd00d0];if(!_0x2391a7)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};let _0x6d2df4=getInstalledVersion(_0x49fb45,_0xdd00d0);!_0x6d2df4&&(_0x6d2df4=_0x2391a7);if(isNonNumericVersion(_0x2391a7))return{'installed':!![],'version':_0x6d2df4,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};const _0x341239=a73_0x3e61a1[_0x451df6(0x164)](_0x6d2df4),_0x164912=a73_0x3e61a1[_0x451df6(0x164)](_0xbaac4d),_0x2bb276=_0x341239&&_0x164912?a73_0x3e61a1['lt'](_0x341239,_0x164912):![];return{'installed':!![],'version':_0x6d2df4,'needsUpgrade':_0x2bb276,'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xbaac4d,'packageName':_0xdd00d0,'stableVersion':_0x59e6c2};}}export function checkSdkVersionSync(_0x48ce04){const _0x275963=a73_0x1e23f9,_0x4a4f3f=a73_0x2ad3bd[_0x275963(0x15a)](_0x48ce04,_0x275963(0x152)),_0x1bcfdf='@lovrabet/sdk';if(!a73_0xeeed99[_0x275963(0x167)](_0x4a4f3f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};try{const _0xbdea37=JSON['parse'](a73_0xeeed99[_0x275963(0x14f)](_0x4a4f3f,_0x275963(0x169))),_0x909ce9=_0xbdea37[_0x275963(0x150)]||{},_0x1c425d=_0xbdea37[_0x275963(0x15b)]||{},_0xf6f6b8=_0x909ce9[_0x1bcfdf]||_0x1c425d[_0x1bcfdf];if(!_0xf6f6b8)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};let _0xdd1165=getInstalledVersion(_0x48ce04,_0x1bcfdf);!_0xdd1165&&(_0xdd1165=_0xf6f6b8);if(isNonNumericVersion(_0xf6f6b8))return{'installed':!![],'version':_0xdd1165,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};const _0x46c810=a73_0x3e61a1['coerce'](_0xdd1165),_0x382ae0=_0x46c810?a73_0x3e61a1['lt'](_0x46c810,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xdd1165,'needsUpgrade':_0x382ae0,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1bcfdf,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4eb45b){const _0x8e288c=a73_0x1e23f9;if(!_0x4eb45b['needsUpgrade'])return;const _0x3a193e=_0x8e288c(0x168),_0x3f2cbc=_0x8e288c(0x166),_0x3af19a=_0x8e288c(0x165),_0x2ff952=_0x4eb45b['packageName']||_0x8e288c(0x157),_0x8759e0=_0x4eb45b[_0x8e288c(0x14d)]||_0x4eb45b['minVersion'],_0x364114=_0x8e288c(0x14e)+_0x2ff952+'@'+(_0x8759e0||'latest');console[_0x8e288c(0x162)](),console[_0x8e288c(0x162)](''+_0x3a193e+_0x3af19a+t(_0x8e288c(0x15f))+_0x3f2cbc),console['log'](''+_0x3a193e+t(_0x8e288c(0x14c),{'package':_0x2ff952,'version':_0x4eb45b['version']})+_0x3f2cbc),console['log'](''+_0x3a193e+t(_0x8e288c(0x156),{'version':_0x8759e0})+_0x3f2cbc),console[_0x8e288c(0x162)](''+_0x3a193e+t(_0x8e288c(0x158),{'command':_0x364114})+_0x3f2cbc),console[_0x8e288c(0x162)]();}
@@ -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_0x118a85=a74_0x5d85;(function(_0x337728,_0x1761d0){const _0x3387fb=a74_0x5d85,_0x16a2f9=_0x337728();while(!![]){try{const _0x42aac8=-parseInt(_0x3387fb(0x13f))/0x1*(-parseInt(_0x3387fb(0x133))/0x2)+parseInt(_0x3387fb(0x139))/0x3+-parseInt(_0x3387fb(0x145))/0x4*(-parseInt(_0x3387fb(0x14f))/0x5)+-parseInt(_0x3387fb(0x147))/0x6*(parseInt(_0x3387fb(0x14e))/0x7)+-parseInt(_0x3387fb(0x13b))/0x8+-parseInt(_0x3387fb(0x141))/0x9+parseInt(_0x3387fb(0x140))/0xa*(-parseInt(_0x3387fb(0x136))/0xb);if(_0x42aac8===_0x1761d0)break;else _0x16a2f9['push'](_0x16a2f9['shift']());}catch(_0x2205fc){_0x16a2f9['push'](_0x16a2f9['shift']());}}}(a74_0x2b24,0x84394));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a74_0x2f8539 from'semver';import{getCdnConfig}from'./cdn-config.js';import a74_0x5db28c from'../i18n/index.js';const t=a74_0x5db28c['t'][a74_0x118a85(0x13c)](a74_0x5db28c);function getCurrentCliVersion(){const _0x475f19=a74_0x118a85;try{const _0x2176be=fileURLToPath(import.meta.url),_0xb04173=resolve(dirname(_0x2176be),_0x475f19(0x14a)),_0x310692=resolve(_0xb04173,_0x475f19(0x137)),_0x21f89d=JSON[_0x475f19(0x131)](readFileSync(_0x310692,_0x475f19(0x135)));return _0x21f89d[_0x475f19(0x13e)]||_0x475f19(0x143);}catch{return'1.0.0';}}function a74_0x5d85(_0x216851,_0x4a179b){_0x216851=_0x216851-0x12f;const _0x2b24c5=a74_0x2b24();let _0x5d85cf=_0x2b24c5[_0x216851];return _0x5d85cf;}function isNonNumericVersion(_0xdb38f4){const _0x52e2a6=a74_0x118a85,_0x21941d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x21941d[_0x52e2a6(0x12f)](_0x32d94b=>_0x32d94b[_0x52e2a6(0x14d)](_0xdb38f4));}export async function checkCliVersion(){const _0x5db3cb=a74_0x118a85,_0x2e67d1=getCurrentCliVersion(),_0x10d2da=await getCdnConfig(),_0x2a3a48=_0x10d2da?.[_0x5db3cb(0x14b)]?.[_0x5db3cb(0x13d)]||null;let _0x18e43e=![];if(_0x2a3a48)try{const _0x2796d6=a74_0x2f8539[_0x5db3cb(0x14c)](_0x2e67d1),_0xfd5f86=a74_0x2f8539[_0x5db3cb(0x14c)](_0x2a3a48);_0x2796d6&&_0xfd5f86&&(_0x18e43e=a74_0x2f8539['lt'](_0x2796d6,_0xfd5f86));}catch{_0x18e43e=![];}return{'currentVersion':_0x2e67d1,'stableVersion':_0x2a3a48,'needsUpgrade':_0x18e43e,'isPreRelease':![]};}function a74_0x2b24(){const _0x131eb8=['63900tholSR','some','upgrade.cli.title','parse','upgrade.cli.command','1910882rdYgSx','needsUpgrade','utf-8','7557hIfmxM','package.json','upgrade.cli.current','2318748ylpqRf','currentVersion','2200464tLOhkH','bind','stableVersion','version','1qEXcOk','7960pUSucC','562446VvPENK','\x1b[0m','1.0.0','log','96XKBRjZ','npm\x20install\x20-g\x20@lovrabet/cli@latest','366KRMySm','upgrade.cli.stable','\x1b[33m','../..','cli','coerce','test','69895kalkiU'];a74_0x2b24=function(){return _0x131eb8;};return a74_0x2b24();}export function printCliUpgradeWarning(_0x4ef4b3){const _0x3e97b8=a74_0x118a85;if(!_0x4ef4b3[_0x3e97b8(0x134)])return;const _0x9accc8=_0x3e97b8(0x149),_0x43c450=_0x3e97b8(0x142),_0x10dd54='\x1b[1m',_0x5e71e8=_0x3e97b8(0x146);console[_0x3e97b8(0x144)](),console['log'](''+_0x9accc8+_0x10dd54+t(_0x3e97b8(0x130))+_0x43c450),console[_0x3e97b8(0x144)](''+_0x9accc8+t(_0x3e97b8(0x138),{'version':_0x4ef4b3[_0x3e97b8(0x13a)]})+_0x43c450),console['log'](''+_0x9accc8+t(_0x3e97b8(0x148),{'version':_0x4ef4b3['stableVersion']})+_0x43c450),console['log'](''+_0x9accc8+t(_0x3e97b8(0x132),{'command':_0x5e71e8})+_0x43c450),console[_0x3e97b8(0x144)]();}
@@ -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_0x10b03a=a75_0x49e7;(function(_0x4d8a6f,_0x263080){const _0x2f9667=a75_0x49e7,_0x1e9789=_0x4d8a6f();while(!![]){try{const _0x56072a=-parseInt(_0x2f9667(0x6b))/0x1*(parseInt(_0x2f9667(0x72))/0x2)+parseInt(_0x2f9667(0x6a))/0x3*(-parseInt(_0x2f9667(0x67))/0x4)+parseInt(_0x2f9667(0x69))/0x5+-parseInt(_0x2f9667(0x73))/0x6+parseInt(_0x2f9667(0x66))/0x7+-parseInt(_0x2f9667(0x70))/0x8+parseInt(_0x2f9667(0x6d))/0x9;if(_0x56072a===_0x263080)break;else _0x1e9789['push'](_0x1e9789['shift']());}catch(_0x460323){_0x1e9789['push'](_0x1e9789['shift']());}}}(a75_0x4f82,0x6a859));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_0x10b03a(0x6f)](),a75_0x10b03a(0x76));export const globalConfigPath=resolve(homedir(),a75_0x10b03a(0x76));export function readConfig(_0x3e11eb){const _0x5abbbb=a75_0x10b03a;let _0x47c6b5={};try{if(existsSync(globalConfigPath)){const _0x142ecb=readFileSync(globalConfigPath,{'encoding':_0x5abbbb(0x64)});_0x142ecb&&(_0x47c6b5=JSON[_0x5abbbb(0x77)](_0x142ecb));}}catch(_0x1e0f39){}try{const _0x5ad731=_0x3e11eb?resolve(_0x3e11eb,'.lovrabetrc'):projectConfigPath;if(existsSync(_0x5ad731)){const _0x58b8ae=readFileSync(_0x5ad731,{'encoding':'utf8'});if(_0x58b8ae){const _0x20b70c=JSON[_0x5abbbb(0x77)](_0x58b8ae);_0x47c6b5={..._0x47c6b5,..._0x20b70c};}}}catch(_0x262e94){}return _0x47c6b5[_0x5abbbb(0x6e)]&&typeof _0x47c6b5['env']===_0x5abbbb(0x68)&&initEnv(_0x47c6b5[_0x5abbbb(0x6e)]),_0x47c6b5;}export function getConfigAppCode(){const _0x5df1fb=a75_0x10b03a;let _0x13362a={},_0x2249e0={};try{if(existsSync(globalConfigPath)){const _0x42abdf=readFileSync(globalConfigPath,{'encoding':_0x5df1fb(0x64)});_0x42abdf&&(_0x2249e0=JSON['parse'](_0x42abdf));}}catch(_0x2e8ceb){}try{if(existsSync(projectConfigPath)){const _0x4575fc=readFileSync(projectConfigPath,{'encoding':'utf8'});_0x4575fc&&(_0x13362a=JSON[_0x5df1fb(0x77)](_0x4575fc));}}catch(_0x4f4cec){}let _0x52035e;if('appcode'in _0x13362a)_0x52035e=_0x13362a[_0x5df1fb(0x65)];else{if(_0x5df1fb(0x71)in _0x13362a)_0x52035e=_0x13362a[_0x5df1fb(0x71)];else{if(_0x5df1fb(0x65)in _0x2249e0)_0x52035e=_0x2249e0[_0x5df1fb(0x65)];else _0x5df1fb(0x71)in _0x2249e0&&(_0x52035e=_0x2249e0[_0x5df1fb(0x71)]);}}if(typeof _0x52035e!==_0x5df1fb(0x68)||_0x52035e[_0x5df1fb(0x75)]()==='')return undefined;return _0x52035e;}export function isInProject(){return existsSync(projectConfigPath);}function a75_0x4f82(){const _0x41b9f2=['24663eOgwKg','8poDwgL','template_base_url','14226048QDidhN','env','cwd','1402592SFKsKX','app','193370tIwHio','4533108YKRrPj','https://g.lovrabet.com/dist/lovrabet-cli','trim','.lovrabetrc','parse','utf8','appcode','3441907RrMqON','156UwPXht','string','1944405syLDUP'];a75_0x4f82=function(){return _0x41b9f2;};return a75_0x4f82();}function a75_0x49e7(_0x2c4339,_0x168853){_0x2c4339=_0x2c4339-0x64;const _0x4f8249=a75_0x4f82();let _0x49e74a=_0x4f8249[_0x2c4339];return _0x49e74a;}export function getTemplateBaseUrl(){const _0x2b630b=a75_0x10b03a,_0x57982d=readConfig();if(_0x57982d[_0x2b630b(0x6c)]&&typeof _0x57982d[_0x2b630b(0x6c)]===_0x2b630b(0x68))return _0x57982d['template_base_url']['replace'](/\/$/,'');return _0x2b630b(0x74);}
@@ -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(_0x5bf947,_0x38743e){const _0x310eeb=a76_0x53ad,_0x37edd6=_0x5bf947();while(!![]){try{const _0x2ffa17=-parseInt(_0x310eeb(0x7e))/0x1+parseInt(_0x310eeb(0x7c))/0x2+-parseInt(_0x310eeb(0x7f))/0x3+-parseInt(_0x310eeb(0x85))/0x4*(-parseInt(_0x310eeb(0x78))/0x5)+parseInt(_0x310eeb(0x83))/0x6*(parseInt(_0x310eeb(0x81))/0x7)+-parseInt(_0x310eeb(0x7d))/0x8+parseInt(_0x310eeb(0x7a))/0x9;if(_0x2ffa17===_0x38743e)break;else _0x37edd6['push'](_0x37edd6['shift']());}catch(_0x3bdfd0){_0x37edd6['push'](_0x37edd6['shift']());}}}(a76_0x33fe,0x690ca));import a76_0x223ee3 from'node:path';import a76_0xc270eb from'node:fs';function a76_0x53ad(_0x3ba3f5,_0x5a8d8a){_0x3ba3f5=_0x3ba3f5-0x77;const _0x33fe19=a76_0x33fe();let _0x53addc=_0x33fe19[_0x3ba3f5];return _0x53addc;}function a76_0x33fe(){const _0x399b49=['copyFileSync','2152fUCDXU','name','6085dEotyF','join','4951197lCnhjo','复制目录时出错:','1448292BjxGNB','6791384ipXvdX','182588QEHJTb','1588023SXZdET','error','63EiKYSN','isDirectory','41406nVakxS'];a76_0x33fe=function(){return _0x399b49;};return a76_0x33fe();}export async function copyDirectory(_0x357167,_0x466276){const _0x1f07b2=a76_0x53ad;try{const _0x2cd4de=a76_0xc270eb['readdirSync'](_0x357167,{'withFileTypes':!![]});a76_0xc270eb['mkdirSync'](_0x466276,{'recursive':!![]});for(const _0x53ff2b of _0x2cd4de){const _0x2cd34e=a76_0x223ee3[_0x1f07b2(0x79)](_0x357167,_0x53ff2b[_0x1f07b2(0x77)]),_0x34d434=a76_0x223ee3[_0x1f07b2(0x79)](_0x466276,_0x53ff2b[_0x1f07b2(0x77)]);_0x53ff2b[_0x1f07b2(0x82)]()?await copyDirectory(_0x2cd34e,_0x34d434):a76_0xc270eb[_0x1f07b2(0x84)](_0x2cd34e,_0x34d434);}}catch(_0x2c236){console[_0x1f07b2(0x80)](_0x1f07b2(0x7b),_0x2c236);}}
@@ -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(_0x4d5935,_0x43ac8e){const _0x488a66=a77_0x3e31,_0x1e2cdd=_0x4d5935();while(!![]){try{const _0x111c96=parseInt(_0x488a66(0x126))/0x1*(-parseInt(_0x488a66(0x123))/0x2)+parseInt(_0x488a66(0x11f))/0x3+-parseInt(_0x488a66(0x129))/0x4*(parseInt(_0x488a66(0x128))/0x5)+parseInt(_0x488a66(0x124))/0x6+-parseInt(_0x488a66(0x11e))/0x7*(-parseInt(_0x488a66(0x127))/0x8)+parseInt(_0x488a66(0x122))/0x9*(parseInt(_0x488a66(0x121))/0xa)+-parseInt(_0x488a66(0x120))/0xb*(parseInt(_0x488a66(0x125))/0xc);if(_0x111c96===_0x43ac8e)break;else _0x1e2cdd['push'](_0x1e2cdd['shift']());}catch(_0x40dc64){_0x1e2cdd['push'](_0x1e2cdd['shift']());}}}(a77_0x4174,0xafee5));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x182df5,_0x2eb547){const _0x172d2e=statSync(_0x182df5);if(_0x172d2e['isDirectory']()){!existsSync(_0x2eb547)&&mkdirSync(_0x2eb547,{'recursive':!![]});const _0x5e795d=readdirSync(_0x182df5);for(const _0x59f605 of _0x5e795d){await copyDir(join(_0x182df5,_0x59f605),join(_0x2eb547,_0x59f605));}}else copyFileSync(_0x182df5,_0x2eb547);}function a77_0x4174(){const _0x481a7d=['586564ssuhvr','493300Emnqqt','234pjDMJZ','747896MhTmpG','7218084dQZcTg','108Vmgkyd','2YFXiIK','635288hXJFgA','165KpisVg','153528VHUlXA','28QcPBKC','1235379MgAiEz'];a77_0x4174=function(){return _0x481a7d;};return a77_0x4174();}function a77_0x3e31(_0x1ead6e,_0x5ce852){_0x1ead6e=_0x1ead6e-0x11e;const _0x417417=a77_0x4174();let _0x3e311f=_0x417417[_0x1ead6e];return _0x3e311f;}export function ensureDir(_0x52026f){!existsSync(_0x52026f)&&mkdirSync(_0x52026f,{'recursive':!![]});}export function pathExists(_0x148b50){return existsSync(_0x148b50);}
@@ -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_0x1ddbee=a78_0x488a;(function(_0x51c1ef,_0x4e5761){const _0x48e9d9=a78_0x488a,_0x4e13c5=_0x51c1ef();while(!![]){try{const _0x2840b7=-parseInt(_0x48e9d9(0x114))/0x1+-parseInt(_0x48e9d9(0x104))/0x2*(parseInt(_0x48e9d9(0xf3))/0x3)+parseInt(_0x48e9d9(0x110))/0x4+-parseInt(_0x48e9d9(0x10e))/0x5+parseInt(_0x48e9d9(0xee))/0x6*(-parseInt(_0x48e9d9(0x116))/0x7)+parseInt(_0x48e9d9(0xf5))/0x8*(-parseInt(_0x48e9d9(0xf4))/0x9)+-parseInt(_0x48e9d9(0x10c))/0xa*(-parseInt(_0x48e9d9(0xfd))/0xb);if(_0x2840b7===_0x4e5761)break;else _0x4e13c5['push'](_0x4e13c5['shift']());}catch(_0x2dd3a4){_0x4e13c5['push'](_0x4e13c5['shift']());}}}(a78_0x561c,0x4819f));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x3d1a0c=a78_0x488a,_0x3b2a1e=getTemplateBaseUrl();return _0x3b2a1e+_0x3d1a0c(0x105);}function getGuidesExtendCdnUrl(){const _0x54ab48=a78_0x488a,_0x31add2=getTemplateBaseUrl();return _0x31add2+_0x54ab48(0xe8);}function a78_0x488a(_0x1684b9,_0x5f3e93){_0x1684b9=_0x1684b9-0xe6;const _0x561c73=a78_0x561c();let _0x488a80=_0x561c73[_0x1684b9];return _0x488a80;}const CACHE_DIR=join(process[a78_0x1ddbee(0x115)]['HOME']||process[a78_0x1ddbee(0x115)][a78_0x1ddbee(0xea)]||'','.lovrabet',a78_0x1ddbee(0x10d));export async function fetchGuidesFromCDN(_0x58e6b5=![]){const _0x436b6f=a78_0x1ddbee,_0x17b9d2=getGuidesCdnUrl(),_0x5d0946=await fetch(_0x17b9d2,{'headers':{'Accept':'application/json'}});if(!_0x5d0946['ok'])throw new Error(_0x436b6f(0x112)+_0x5d0946['status']+'\x20'+_0x5d0946[_0x436b6f(0x10f)]);const _0x32d85e=await _0x5d0946[_0x436b6f(0xfc)]();if(!_0x32d85e['guides']||typeof _0x32d85e[_0x436b6f(0x10b)]!==_0x436b6f(0x108))throw new Error('CDN\x20返回数据格式错误');if(!_0x58e6b5)return _0x32d85e;try{const _0x2155a7=getGuidesExtendCdnUrl(),_0x5d3eae=await fetch(_0x2155a7,{'headers':{'Accept':_0x436b6f(0x102)}});if(_0x5d3eae['ok']){const _0x51e704=await _0x5d3eae[_0x436b6f(0xfc)]();_0x51e704['guides']&&typeof _0x51e704[_0x436b6f(0x10b)]===_0x436b6f(0x108)&&(_0x32d85e[_0x436b6f(0x10b)]={..._0x32d85e[_0x436b6f(0x10b)],..._0x51e704[_0x436b6f(0x10b)]});}}catch{}return _0x32d85e;}export function writeGuidesToProject(_0x350524,_0x299384,_0x81de99=a78_0x1ddbee(0xeb),_0x288ee1){const _0x564d1c=a78_0x1ddbee,_0x3949dd=join(_0x299384,_0x81de99);for(const [_0x3caba2,_0x41d292]of Object[_0x564d1c(0xfe)](_0x350524[_0x564d1c(0x10b)])){if(_0x41d292[_0x564d1c(0x10a)]&&_0x41d292[_0x564d1c(0x10a)][_0x564d1c(0xf8)]>0x0){const _0x395b0d=_0x41d292['requireFlags'][_0x564d1c(0xff)](_0x4ce180=>_0x288ee1?.[_0x564d1c(0x101)](_0x4ce180));if(!_0x395b0d)continue;}const _0x417d52=join(_0x3949dd,_0x3caba2);mkdirSync(_0x417d52,{'recursive':!![]});let _0x3461ed=_0x41d292[_0x564d1c(0xec)];_0x41d292[_0x564d1c(0xf2)]&&(_0x3461ed=appendUpdateTime(_0x3461ed,_0x41d292['lastUpdated'])),writeFileSync(join(_0x417d52,_0x564d1c(0xe7)),_0x3461ed,_0x564d1c(0xf6));}}export function appendUpdateTime(_0x171447,_0x5ab9b3){const _0x521819=a78_0x1ddbee;return _0x171447=_0x171447['replace'](/\n*>更新时间:.*$/m,''),_0x171447['trimEnd']()+(_0x521819(0xef)+_0x5ab9b3);}function a78_0x561c(){const _0x5cfb68=['entries','some','join','includes','application/json','trimEnd','46EEUImm','/skills/guides.json','title','replace','object','`\x20|\x20','requireFlags','guides','10dGGIFe','cache','1274635eNtKXI','statusText','736560oYGcsv','keys','CDN\x20请求失败:\x20','<!--\x20GUIDES_APPEND\x20-->','50290PLqlRP','env','2916767qVBIgr','test','guide.md','/skills/guides-extend.json','skillTemplate','USERPROFILE','.lovrabet/skill/.shared/guides','content','\x0a<!--\x20GUIDES_APPEND\x20-->','6srvrdH','\x0a\x0a>更新时间:','map','indexOf','lastUpdated','7251NNgizI','666evnXSj','57576FgzknW','utf-8','|\x20`','length','extendContent','path','sort','json','15633794qROwbx'];a78_0x561c=function(){return _0x5cfb68;};return a78_0x561c();}export function getSkillTemplate(_0x587ff4){const _0x579974=a78_0x1ddbee;return _0x587ff4[_0x579974(0xe9)]?.[_0x579974(0xec)]||'';}export function appendExtendContents(_0x4a75fe,_0x5440f7,_0x5365ed){const _0x4204a1=a78_0x1ddbee,_0x46ce24=[];for(const [_0x103a8f,_0x45cc89]of Object['entries'](_0x5440f7[_0x4204a1(0x10b)])){if(_0x45cc89[_0x4204a1(0x10a)]&&_0x45cc89['requireFlags'][_0x4204a1(0xf8)]>0x0){const _0x5b1cd7=_0x45cc89[_0x4204a1(0x10a)]['some'](_0x357071=>_0x5365ed?.[_0x4204a1(0x101)](_0x357071));if(!_0x5b1cd7)continue;}_0x45cc89[_0x4204a1(0xf9)]&&_0x46ce24['push'](_0x45cc89[_0x4204a1(0xf9)][_0x4204a1(0x103)]());}if(_0x46ce24[_0x4204a1(0xf8)]===0x0)return _0x4a75fe;return _0x4a75fe[_0x4204a1(0x103)]()+'\x0a\x0a'+_0x46ce24['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x5dd1da,_0x35cf5d,_0x5623f1,_0x48f240){const _0x3f32b0=a78_0x1ddbee,_0x160a1f=getSkillTemplate(_0x5dd1da);if(!_0x160a1f)throw new Error('CDN\x20数据中缺少\x20skillTemplate');const _0x53f2b1=dirname(_0x35cf5d);mkdirSync(_0x53f2b1,{'recursive':!![]});let _0x29c276=_0x160a1f[_0x3f32b0(0x107)](/\{\{IDE_NAME\}\}/g,_0x5623f1);_0x29c276=insertGuidesSection(_0x29c276,_0x5dd1da,_0x48f240),_0x29c276=appendExtendContents(_0x29c276,_0x5dd1da,_0x48f240),_0x5dd1da[_0x3f32b0(0xe9)][_0x3f32b0(0xf2)]&&(_0x29c276=appendUpdateTime(_0x29c276,_0x5dd1da[_0x3f32b0(0xe9)]['lastUpdated'])),writeFileSync(_0x35cf5d,_0x29c276,_0x3f32b0(0xf6));}export function insertGuidesSection(_0x545adb,_0x3c635d,_0x40bf67){const _0x3649a2=a78_0x1ddbee,_0x1d8a91=_0x3649a2(0x113),_0x3e0bf6=_0x545adb[_0x3649a2(0xf1)](_0x1d8a91);if(_0x3e0bf6===-0x1)return _0x545adb;const _0x2fba37=[],_0x3b6f87=Object[_0x3649a2(0x111)](_0x3c635d[_0x3649a2(0x10b)])[_0x3649a2(0xfb)]();for(const _0x2e8a48 of _0x3b6f87){const _0xb85744=_0x3c635d[_0x3649a2(0x10b)][_0x2e8a48];if(!_0xb85744)continue;if(/^0[1-6]-/[_0x3649a2(0xe6)](_0x2e8a48))continue;if(_0xb85744[_0x3649a2(0x10a)]&&_0xb85744[_0x3649a2(0x10a)][_0x3649a2(0xf8)]>0x0){const _0x49b9e2=_0xb85744['requireFlags'][_0x3649a2(0xff)](_0xca07f4=>_0x40bf67?.['includes'](_0xca07f4));if(!_0x49b9e2)continue;}const _0x5f047a=_0xb85744[_0x3649a2(0xfa)][_0x3649a2(0x107)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x2fba37['push'](_0x3649a2(0xf7)+_0x5f047a+_0x3649a2(0x109)+_0xb85744['title']+'\x20|');}if(_0x2fba37[_0x3649a2(0xf8)]===0x0)return _0x545adb['replace'](_0x1d8a91,_0x3649a2(0x113));const _0x3255dc=_0x2fba37[_0x3649a2(0x100)]('\x0a');return _0x545adb[_0x3649a2(0x107)](_0x1d8a91,_0x3255dc+_0x3649a2(0xed));}export async function installGuides(_0x150819){const _0x4d64a7=a78_0x1ddbee,_0x5540a5=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5540a5,_0x150819),Object[_0x4d64a7(0x111)](_0x5540a5[_0x4d64a7(0x10b)])['length'];}export function getGuidesSummary(_0x48c08a){const _0x1e58eb=a78_0x1ddbee;return Object[_0x1e58eb(0xfe)](_0x48c08a[_0x1e58eb(0x10b)])[_0x1e58eb(0xf0)](([_0x4e2709,_0x49a758])=>({'key':_0x4e2709,'title':_0x49a758[_0x1e58eb(0x106)],'path':_0x49a758[_0x1e58eb(0xfa)]}));}
@@ -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(_0x1ebdcd,_0x1165de){const _0x35eeb4=a79_0x345f,_0x29b0e9=_0x1ebdcd();while(!![]){try{const _0x151b29=-parseInt(_0x35eeb4(0xf0))/0x1*(parseInt(_0x35eeb4(0xfd))/0x2)+parseInt(_0x35eeb4(0xea))/0x3+parseInt(_0x35eeb4(0xf8))/0x4+parseInt(_0x35eeb4(0xf2))/0x5+parseInt(_0x35eeb4(0xfc))/0x6+-parseInt(_0x35eeb4(0x100))/0x7+-parseInt(_0x35eeb4(0xf5))/0x8*(parseInt(_0x35eeb4(0xf7))/0x9);if(_0x151b29===_0x1165de)break;else _0x29b0e9['push'](_0x29b0e9['shift']());}catch(_0x4de681){_0x29b0e9['push'](_0x29b0e9['shift']());}}}(a79_0x3b45,0xa7a67));export async function httpRequest(_0x8338,_0x254ed8={}){const _0x1760df=a79_0x345f,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x254ed8;let _0x3f335c=null;for(let _0x2b244a=0x0;_0x2b244a<=retries;_0x2b244a++){try{const _0x2a1c3b=new AbortController(),_0x40a71a=setTimeout(()=>_0x2a1c3b[_0x1760df(0xee)](),timeout),_0x30505d=await fetch(_0x8338,{'headers':headers,'signal':_0x2a1c3b['signal']});clearTimeout(_0x40a71a);let _0x3d2ca2;const _0x581c78=_0x30505d[_0x1760df(0xed)][_0x1760df(0xef)]('content-type');return _0x581c78?.['includes']('application/json')?_0x3d2ca2=await _0x30505d[_0x1760df(0xf1)]():_0x3d2ca2=await _0x30505d[_0x1760df(0xf3)](),{'ok':_0x30505d['ok'],'status':_0x30505d['status'],'statusText':_0x30505d[_0x1760df(0xfa)],'data':_0x3d2ca2,'headers':_0x30505d[_0x1760df(0xed)],'url':_0x30505d[_0x1760df(0xff)],'text':()=>_0x30505d[_0x1760df(0xf3)]()};}catch(_0x1c107a){_0x3f335c=_0x1c107a instanceof Error?_0x1c107a:new Error(String(_0x1c107a));if(_0x2b244a===retries)break;if(shouldRetry(_0x1c107a)){console['log'](_0x1760df(0xeb)+retryDelay+_0x1760df(0xf6)+(_0x2b244a+0x1)+_0x1760df(0xfe)),await sleep(retryDelay);continue;}else break;}}throw _0x3f335c||new Error('Request\x20failed');}function a79_0x345f(_0x3445a3,_0x37a8b8){_0x3445a3=_0x3445a3-0xea;const _0x3b453d=a79_0x3b45();let _0x345fd8=_0x3b453d[_0x3445a3];return _0x345fd8;}function shouldRetry(_0xe17a15){const _0x2d8be6=a79_0x345f;if(_0xe17a15 instanceof Error){if(_0xe17a15[_0x2d8be6(0xf4)]===_0x2d8be6(0x103))return![];if(_0xe17a15[_0x2d8be6(0xf4)]===_0x2d8be6(0x101)&&_0xe17a15[_0x2d8be6(0xfb)]['includes'](_0x2d8be6(0x102)))return!![];if(_0xe17a15[_0x2d8be6(0xfb)][_0x2d8be6(0xec)](_0x2d8be6(0x104)))return!![];if(_0xe17a15['message'][_0x2d8be6(0xec)](_0x2d8be6(0xf9)))return![];}return![];}function sleep(_0x12608a){return new Promise(_0x463e1a=>setTimeout(_0x463e1a,_0x12608a));}export function validateUrl(_0x51f1cb){try{return new URL(_0x51f1cb),!![];}catch{return![];}}function a79_0x3b45(){const _0x5cf721=['statusText','message','4424988RYeLwR','15002CYbhiI','\x20次重试...','url','3708824ZqYXMT','TypeError','fetch','AbortError','ECONNRESET','3640473OsonrB','*\x20请求失败,','includes','headers','abort','get','34MwpADc','json','6179490zrFyrQ','text','name','30288SPrdzm','ms\x20后进行第\x20','6030KgJxlf','3285176YIyLZv','ENOTFOUND'];a79_0x3b45=function(){return _0x5cf721;};return a79_0x3b45();}
@@ -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
+ const a80_0x4451c8=a80_0x1e5d;(function(_0x57229e,_0x45eaa9){const _0x3d4e86=a80_0x1e5d,_0x436ad8=_0x57229e();while(!![]){try{const _0x4361ae=-parseInt(_0x3d4e86(0x76))/0x1+parseInt(_0x3d4e86(0x69))/0x2*(parseInt(_0x3d4e86(0x8d))/0x3)+parseInt(_0x3d4e86(0x95))/0x4+-parseInt(_0x3d4e86(0x73))/0x5+parseInt(_0x3d4e86(0x6d))/0x6*(-parseInt(_0x3d4e86(0x87))/0x7)+parseInt(_0x3d4e86(0x77))/0x8+parseInt(_0x3d4e86(0x90))/0x9;if(_0x4361ae===_0x45eaa9)break;else _0x436ad8['push'](_0x436ad8['shift']());}catch(_0x5bb0d6){_0x436ad8['push'](_0x436ad8['shift']());}}}(a80_0x509e,0xe31f2));import a80_0x2580a2 from'winston';function a80_0x509e(){const _0x47b3ff=['getWinstonInstance','details','writeFileSync','clear','currentRawCommand','success','logFilePath','addColors','timestamp','2xFEIKA','errors','createLogger','initWinstonLogger','42IFsRPc','now','readFileSync','info','filter','transports','5270515cGetIX','format','winstonLogger','1587460fIhehA','2274224VyLaQG','setRawCommand','.lovrabet.log','readLogs','error','split','message','utf8','green','blue','失败:\x20','map','开始执行:\x20','clearLogs','logTask','red','1754543cZDHUY','printf','join','warn','File','log','1506390mhKUeT','完成:\x20','existsSync','37279485YEyIoK','mkdirSync','toISOString','trim','rawCommand','1591292BuuDSq'];a80_0x509e=function(){return _0x47b3ff;};return a80_0x509e();}function a80_0x1e5d(_0x476571,_0x402d4e){_0x476571=_0x476571-0x66;const _0x509e32=a80_0x509e();let _0x1e5d9c=_0x509e32[_0x476571];return _0x1e5d9c;}import a80_0x205377 from'node:fs';import a80_0x473284 from'node:path';class Logger{[a80_0x4451c8(0x75)];[a80_0x4451c8(0x66)];['currentRawCommand']='';constructor(){const _0x38af4e=a80_0x4451c8;this[_0x38af4e(0x66)]='';}[a80_0x4451c8(0x78)](_0x29723c){const _0x62e81a=a80_0x4451c8;this[_0x62e81a(0x9a)]=_0x29723c;}[a80_0x4451c8(0x6c)](){const _0x722f75=a80_0x4451c8,_0x51d9ac=a80_0x473284['dirname'](this[_0x722f75(0x66)]);!a80_0x205377[_0x722f75(0x8f)](_0x51d9ac)&&a80_0x205377[_0x722f75(0x91)](_0x51d9ac,{'recursive':!![]});const _0x2c068e=a80_0x2580a2[_0x722f75(0x74)]['combine'](a80_0x2580a2[_0x722f75(0x74)][_0x722f75(0x68)](),a80_0x2580a2['format'][_0x722f75(0x6a)]({'stack':!![]}),a80_0x2580a2[_0x722f75(0x74)][_0x722f75(0x88)](_0x20825e=>{const _0xf3375d=_0x722f75,_0x57cdf1={'timestamp':_0x20825e[_0xf3375d(0x68)]||new Date()[_0xf3375d(0x92)](),'level':_0x20825e['level']||_0xf3375d(0x70),'command':_0x20825e['command']||'unknown','rawCommand':_0x20825e[_0xf3375d(0x94)]||this[_0xf3375d(0x9a)]||undefined,'message':_0x20825e[_0xf3375d(0x7d)]||'','duration':_0x20825e['duration']||undefined,'details':_0x20825e[_0xf3375d(0x97)]||undefined};return JSON['stringify'](_0x57cdf1);}));this[_0x722f75(0x75)]=a80_0x2580a2[_0x722f75(0x6b)]({'level':_0x722f75(0x70),'format':_0x2c068e,'transports':[new a80_0x2580a2[(_0x722f75(0x72))][(_0x722f75(0x8b))]({'filename':this[_0x722f75(0x66)],'level':'info'})],'silent':![]}),a80_0x2580a2[_0x722f75(0x67)]({'success':_0x722f75(0x7f),'error':_0x722f75(0x86),'warn':'yellow','info':_0x722f75(0x80)});}['setLogPath'](_0x1c0794){const _0x528747=a80_0x4451c8;this[_0x528747(0x66)]=a80_0x473284[_0x528747(0x89)](_0x1c0794,_0x528747(0x79)),this[_0x528747(0x75)]&&this['winstonLogger'][_0x528747(0x99)](),this[_0x528747(0x6c)]();}[a80_0x4451c8(0x70)](_0x59af71,_0x5d33d9,_0x145878){const _0x18952d=a80_0x4451c8;if(!this['logFilePath']||!this[_0x18952d(0x75)])return;this['winstonLogger'][_0x18952d(0x70)](_0x5d33d9,{'command':_0x59af71,'details':_0x145878});}[a80_0x4451c8(0x9b)](_0x28b2a8,_0x2ed5c7,_0x1ed853,_0x1e7a54){const _0x4caeae=a80_0x4451c8;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x4caeae(0x75)][_0x4caeae(0x8c)](_0x4caeae(0x70),_0x2ed5c7,{'level':_0x4caeae(0x9b),'command':_0x28b2a8,'duration':_0x1ed853,'details':_0x1e7a54});}[a80_0x4451c8(0x7b)](_0x4fa609,_0x36d327,_0x5ec1cb){const _0x301a04=a80_0x4451c8;if(!this[_0x301a04(0x66)]||!this[_0x301a04(0x75)])return;this[_0x301a04(0x75)]['error'](_0x36d327,{'command':_0x4fa609,'details':_0x5ec1cb});}[a80_0x4451c8(0x8a)](_0x17d66c,_0x12530b,_0x2bc158){const _0x522c51=a80_0x4451c8;if(!this[_0x522c51(0x66)]||!this[_0x522c51(0x75)])return;this[_0x522c51(0x75)][_0x522c51(0x8a)](_0x12530b,{'command':_0x17d66c,'details':_0x2bc158});}async[a80_0x4451c8(0x85)](_0x2b7ab6,_0x4999d5,_0x9c4095){const _0x275f55=a80_0x4451c8,_0x3557fa=Date[_0x275f55(0x6e)]();this['info'](_0x2b7ab6,_0x275f55(0x83)+_0x4999d5);try{const _0x476913=await _0x9c4095(),_0x101cbf=Date[_0x275f55(0x6e)]()-_0x3557fa;return this[_0x275f55(0x9b)](_0x2b7ab6,_0x275f55(0x8e)+_0x4999d5,_0x101cbf),_0x476913;}catch(_0x22b620){const _0x596478=Date[_0x275f55(0x6e)]()-_0x3557fa;this['error'](_0x2b7ab6,_0x275f55(0x81)+_0x4999d5,{'error':_0x22b620 instanceof Error?_0x22b620[_0x275f55(0x7d)]:String(_0x22b620),'duration':_0x596478});throw _0x22b620;}}[a80_0x4451c8(0x7a)](){const _0x57707c=a80_0x4451c8;try{if(!a80_0x205377[_0x57707c(0x8f)](this['logFilePath']))return[];const _0x15206a=a80_0x205377[_0x57707c(0x6f)](this[_0x57707c(0x66)],_0x57707c(0x7e));return _0x15206a[_0x57707c(0x7c)]('\x0a')[_0x57707c(0x71)](_0x102ea3=>_0x102ea3[_0x57707c(0x93)]())[_0x57707c(0x82)](_0x1bc1a7=>JSON['parse'](_0x1bc1a7));}catch(_0x3212b3){return console[_0x57707c(0x8a)]('Failed\x20to\x20read\x20logs:',_0x3212b3),[];}}[a80_0x4451c8(0x84)](){const _0xae559d=a80_0x4451c8;try{a80_0x205377['existsSync'](this[_0xae559d(0x66)])&&a80_0x205377[_0xae559d(0x98)](this[_0xae559d(0x66)],'',_0xae559d(0x7e));}catch(_0x208784){console[_0xae559d(0x8a)]('Failed\x20to\x20clear\x20logs:',_0x208784);}}[a80_0x4451c8(0x96)](){const _0x13f17b=a80_0x4451c8;return this[_0x13f17b(0x75)];}}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_0x293839=a81_0x2002;(function(_0x40988a,_0x328125){const _0x3aed10=a81_0x2002,_0xc1319b=_0x40988a();while(!![]){try{const _0x55fe3e=-parseInt(_0x3aed10(0x94))/0x1+parseInt(_0x3aed10(0x97))/0x2*(parseInt(_0x3aed10(0x9e))/0x3)+-parseInt(_0x3aed10(0x9f))/0x4*(parseInt(_0x3aed10(0x96))/0x5)+parseInt(_0x3aed10(0x9a))/0x6+-parseInt(_0x3aed10(0xa1))/0x7*(parseInt(_0x3aed10(0x98))/0x8)+parseInt(_0x3aed10(0x95))/0x9*(parseInt(_0x3aed10(0x93))/0xa)+parseInt(_0x3aed10(0xa3))/0xb*(parseInt(_0x3aed10(0xa0))/0xc);if(_0x55fe3e===_0x328125)break;else _0xc1319b['push'](_0xc1319b['shift']());}catch(_0x2254d0){_0xc1319b['push'](_0xc1319b['shift']());}}}(a81_0x4f6b,0x6118e));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a81_0x4f6b(){const _0x414503=['CDN\x20返回数据格式错误','content','126657QSQgIV','4YVOSad','918444ZQFvqx','2291086poBZyW','string','66EYsraI','catch','CDN\x20请求失败:\x20','status','utf-8','application/json','agents.md','.cursor/rules','statusText','690QcLoUn','735649oSrwKb','100053WhpVlN','1394245DvhMrt','6GutBHh','16xpBIWR','lastUpdated','4283112WVlCmQ','../../cdn-source/rules/lovrabet_rules.mdc.tpl'];a81_0x4f6b=function(){return _0x414503;};return a81_0x4f6b();}import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';function a81_0x2002(_0x5bd37d,_0x536305){_0x5bd37d=_0x5bd37d-0x8f;const _0x4f6b90=a81_0x4f6b();let _0x2002fa=_0x4f6b90[_0x5bd37d];return _0x2002fa;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0xe92173=getTemplateBaseUrl();return _0xe92173+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a81_0x293839(0x9b));export async function fetchRulesFromCDN(){const _0x56e111=a81_0x293839,_0x126f32=getRulesCdnUrl(),_0x100988=await fetch(_0x126f32,{'headers':{'Accept':_0x56e111(0x8f)}});if(!_0x100988['ok'])throw new Error(_0x56e111(0xa5)+_0x100988[_0x56e111(0xa6)]+'\x20'+_0x100988[_0x56e111(0x92)]);const _0x4aecbe=await _0x100988['json']();if(!_0x4aecbe['content']||typeof _0x4aecbe[_0x56e111(0x9d)]!==_0x56e111(0xa2))throw new Error(_0x56e111(0x9c));return _0x4aecbe;}export async function getRulesContent(){const _0x581535=a81_0x293839;try{const _0x231e27=await fetchRulesFromCDN();return _0x231e27[_0x581535(0x9d)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5a1264=a81_0x293839;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5a1264(0xa7));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x41560d){const _0x39e2f6=a81_0x293839,_0x4663f8=await fetchRulesFromCDN()[_0x39e2f6(0xa4)](()=>null);let _0x11dd7d;_0x4663f8?(_0x11dd7d=_0x4663f8[_0x39e2f6(0x9d)],_0x4663f8[_0x39e2f6(0x99)]&&(_0x11dd7d=appendUpdateTime(_0x11dd7d,_0x4663f8[_0x39e2f6(0x99)]))):_0x11dd7d=readLocalTemplate();const _0x4317ba=dirname(_0x41560d);!existsSync(_0x4317ba)&&mkdirSync(_0x4317ba,{'recursive':!![]}),writeFileSync(_0x41560d,_0x11dd7d,_0x39e2f6(0xa7));}export async function copyRulesToCursor(_0x37e14f){const _0x154c78=a81_0x293839,_0x5c556d=join(_0x37e14f,_0x154c78(0x91)),_0x55ac4e=join(_0x5c556d,'lovrabet_rules.mdc');if(existsSync(_0x55ac4e))return![];return await writeRulesFile(_0x55ac4e),!![];}export async function copyRulesToAgentsMd(_0x5dbddd){const _0x399455=a81_0x293839,_0x3ab814=join(_0x5dbddd,_0x399455(0x90));if(existsSync(_0x3ab814))return![];return await writeRulesFile(_0x3ab814),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x234a73){return new Promise(_0x260e97=>setTimeout(_0x260e97,_0x234a73));}
1
+ export function sleep(_0x41af7e){return new Promise(_0x48ab01=>setTimeout(_0x48ab01,_0x41af7e));}
@@ -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_0x4972(){const _0x175458=['模板内容替换完成','promises','isDirectory','slice','replace','split','2611953kUtZJa','processFile','charAt','../../package.json','toComponentName','.json','.ts','2808078NkvfKU','.tpl','numeric','push','.css','651686pIoTWS','isFile','alias','toLocaleString','103891MMlxQe','writeFile','.js','now','模板内容替换失败','extname','\x0a\x20\x20\x20\x20{\x20','alias:\x20\x22','2-digit','replaceApiContent','name','readFile','utf8','datasetCode:\x20\x22','toDisplayTitle','8QrZbef','replaceContent','success','.scss','tableName:\x20\x22','datasetCode','join','1165KsnDwB','processDirectory','.jsx','mkdir','toLocaleTimeString','2220084KTptLV','toISOString','endsWith','YourModel','15390ZyHObD','includes','default','info','1164840HEfxoo','message','pop','toLowerCase','version','\x20},','map','开始处理模板内容替换','toUpperCase','name:\x20\x22'];a83_0x4972=function(){return _0x175458;};return a83_0x4972();}const a83_0x2de1cb=a83_0x3467;(function(_0x45146f,_0x2c5b11){const _0x2357e6=a83_0x3467,_0x42aa8b=_0x45146f();while(!![]){try{const _0x2d4762=-parseInt(_0x2357e6(0x133))/0x1+-parseInt(_0x2357e6(0x12f))/0x2+parseInt(_0x2357e6(0x14e))/0x3+parseInt(_0x2357e6(0x113))/0x4+-parseInt(_0x2357e6(0x149))/0x5*(parseInt(_0x2357e6(0x10f))/0x6)+parseInt(_0x2357e6(0x12a))/0x7+parseInt(_0x2357e6(0x142))/0x8*(parseInt(_0x2357e6(0x123))/0x9);if(_0x2d4762===_0x2c5b11)break;else _0x42aa8b['push'](_0x42aa8b['shift']());}catch(_0x1b1c9c){_0x42aa8b['push'](_0x42aa8b['shift']());}}}(a83_0x4972,0xa9bbe));import a83_0x51389b from'node:fs';function a83_0x3467(_0x33d7f4,_0x295709){_0x33d7f4=_0x33d7f4-0x10d;const _0x4972fe=a83_0x4972();let _0x3467d9=_0x4972fe[_0x33d7f4];return _0x3467d9;}import a83_0x35b46c from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a83_0x2de1cb(0x126))[a83_0x2de1cb(0x117)];export class TemplateReplacer{static['toComponentName'](_0x13aa29){const _0x165ea4=a83_0x2de1cb,_0x2b780f=_0x13aa29['split']('/')[_0x165ea4(0x115)]()||_0x13aa29;return _0x2b780f['split']('-')[_0x165ea4(0x119)](_0x3321ac=>_0x3321ac[_0x165ea4(0x125)](0x0)[_0x165ea4(0x11b)]()+_0x3321ac['slice'](0x1)[_0x165ea4(0x116)]())[_0x165ea4(0x148)]('');}static['toDisplayTitle'](_0xa89ad0){const _0xcf1268=a83_0x2de1cb,_0x48b373=_0xa89ad0[_0xcf1268(0x122)]('/')[_0xcf1268(0x115)]()||_0xa89ad0;return _0x48b373[_0xcf1268(0x122)]('-')['map'](_0x10bdc0=>_0x10bdc0[_0xcf1268(0x125)](0x0)['toUpperCase']()+_0x10bdc0[_0xcf1268(0x120)](0x1)[_0xcf1268(0x116)]())[_0xcf1268(0x148)]('\x20');}static[a83_0x2de1cb(0x143)](_0x537ba0,_0x35c3a9,_0x4aefb9){const _0x251e76=a83_0x2de1cb,_0x27f0ae=this[_0x251e76(0x127)](_0x35c3a9),_0x2117a4=this[_0x251e76(0x141)](_0x35c3a9),_0x3b3da1=new Date(),_0x480a46=_0x3b3da1[_0x251e76(0x132)](undefined,{'year':_0x251e76(0x12c),'month':_0x251e76(0x13b),'day':_0x251e76(0x13b),'hour':_0x251e76(0x13b),'minute':_0x251e76(0x13b),'second':_0x251e76(0x13b),'hour12':![]})[_0x251e76(0x121)](/\//g,'-'),_0x3c3eb3=_0x3b3da1['toLocaleDateString'](undefined,{'year':_0x251e76(0x12c),'month':_0x251e76(0x13b),'day':_0x251e76(0x13b)})[_0x251e76(0x121)](/\//g,'-'),_0x28aea3=_0x3b3da1[_0x251e76(0x14d)](undefined,{'hour12':![]});let _0x3b64d7=_0x537ba0['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x251e76(0x121)](/\{ComponentName\}/g,_0x27f0ae)[_0x251e76(0x121)](/\{DisplayTitle\}/g,_0x2117a4)[_0x251e76(0x121)](/\{PageName\}/g,_0x35c3a9)[_0x251e76(0x121)](/\{TemplateName\}/g,_0x4aefb9)[_0x251e76(0x121)](/\{CreatedAt\}/g,_0x480a46)[_0x251e76(0x121)](/\{CreatedDate\}/g,_0x3c3eb3)[_0x251e76(0x121)](/\{CreatedTime\}/g,_0x28aea3);return _0x3b64d7;}static[a83_0x2de1cb(0x13c)](_0x164b82,_0xeb5e19,_0x31810e,_0x4877da,_0x3654fe,_0x5432ba,_0x5d0d6a){const _0x346f27=a83_0x2de1cb,_0x4d4afe=new Date(),_0x3452e8=_0x4d4afe[_0x346f27(0x14f)](),_0x47ef1d=_0x31810e[_0x346f27(0x119)](_0x1e40e8=>{const _0x32b00b=_0x346f27,_0x55154a=[_0x32b00b(0x140)+_0x1e40e8[_0x32b00b(0x147)]+'\x22',_0x32b00b(0x146)+_0x1e40e8['tableName']+'\x22',_0x32b00b(0x11c)+_0x1e40e8[_0x32b00b(0x13d)]+'\x22'];return _0x1e40e8[_0x32b00b(0x131)]&&_0x55154a[_0x32b00b(0x12d)](_0x32b00b(0x13a)+_0x1e40e8[_0x32b00b(0x131)]+'\x22'),_0x32b00b(0x139)+_0x55154a['join'](',\x20')+_0x32b00b(0x118);})['join'](''),_0x4746d5=_0x4877da||_0x31810e[0x0]?.[_0x346f27(0x131)]||_0x346f27(0x10e);let _0x577460=_0x164b82[_0x346f27(0x121)](/\{AppCode\}/g,_0xeb5e19)[_0x346f27(0x121)](/\{ModelConfigs\}/g,_0x47ef1d)[_0x346f27(0x121)](/\{ExampleModelName\}/g,_0x4746d5)[_0x346f27(0x121)](/\{ApiFileName\}/g,_0x3654fe||'api')[_0x346f27(0x121)](/\{ConfigName\}/g,_0x5432ba||_0x346f27(0x111))['replace'](/\{ClientConfigParam\}/g,_0x5d0d6a||'')[_0x346f27(0x121)](/\{CreatedAt\}/g,_0x3452e8);return _0x577460;}static async['processTemplate'](_0x31e472,_0x410fd2,_0x57782f,_0x35b7b4,_0x46f9bc=!![]){const _0xadccb=a83_0x2de1cb,_0x39c8c7=Date[_0xadccb(0x136)]();try{_0x46f9bc&&logger[_0xadccb(0x112)]('template',_0xadccb(0x11a),{'templatePath':_0x31e472,'targetPath':_0x410fd2,'pageName':_0x57782f,'templateName':_0x35b7b4});await a83_0x51389b[_0xadccb(0x11e)][_0xadccb(0x14c)](_0x410fd2,{'recursive':!![]}),await this[_0xadccb(0x14a)](_0x31e472,_0x410fd2,_0x57782f,_0x35b7b4);if(_0x46f9bc){const _0xe95082=Date['now']()-_0x39c8c7;logger[_0xadccb(0x144)]('template',_0xadccb(0x11d),_0xe95082,{'pageName':_0x57782f,'templateName':_0x35b7b4});}}catch(_0x169a50){if(_0x46f9bc){const _0x562cb0=Date[_0xadccb(0x136)]()-_0x39c8c7;logger['error']('template',_0xadccb(0x137),{'templatePath':_0x31e472,'targetPath':_0x410fd2,'pageName':_0x57782f,'templateName':_0x35b7b4,'error':_0x169a50 instanceof Error?_0x169a50[_0xadccb(0x114)]:String(_0x169a50),'duration':_0x562cb0});}throw _0x169a50;}}static async[a83_0x2de1cb(0x14a)](_0x1694fe,_0x11dfc6,_0x1c012c,_0x37860){const _0x1a5ceb=a83_0x2de1cb,_0x4e54a9=await a83_0x51389b[_0x1a5ceb(0x11e)]['readdir'](_0x1694fe,{'withFileTypes':!![]});for(const _0x575b46 of _0x4e54a9){const _0x135411=a83_0x35b46c[_0x1a5ceb(0x148)](_0x1694fe,_0x575b46[_0x1a5ceb(0x13d)]);let _0x502b6f=a83_0x35b46c[_0x1a5ceb(0x148)](_0x11dfc6,_0x575b46['name']);_0x575b46[_0x1a5ceb(0x13d)][_0x1a5ceb(0x10d)](_0x1a5ceb(0x12b))&&(_0x502b6f=a83_0x35b46c['join'](_0x11dfc6,_0x575b46[_0x1a5ceb(0x13d)][_0x1a5ceb(0x121)](/\.tpl$/,'')));if(_0x575b46[_0x1a5ceb(0x11f)]())await a83_0x51389b['promises'][_0x1a5ceb(0x14c)](_0x502b6f,{'recursive':!![]}),await this[_0x1a5ceb(0x14a)](_0x135411,_0x502b6f,_0x1c012c,_0x37860);else _0x575b46[_0x1a5ceb(0x130)]()&&await this[_0x1a5ceb(0x124)](_0x135411,_0x502b6f,_0x1c012c,_0x37860);}}static async[a83_0x2de1cb(0x124)](_0x522c71,_0xa0e69a,_0x59089f,_0x9ed625){const _0x5ec27d=a83_0x2de1cb,_0x1d63cf=a83_0x35b46c[_0x5ec27d(0x138)](_0x522c71)['toLowerCase']();_0x522c71[_0x5ec27d(0x10d)](_0x5ec27d(0x12b))&&(_0xa0e69a=_0xa0e69a[_0x5ec27d(0x121)](/\.tpl$/,''));const _0x20f750=['.tsx',_0x5ec27d(0x129),_0x5ec27d(0x14b),_0x5ec27d(0x135),_0x5ec27d(0x128),'.md',_0x5ec27d(0x12e),_0x5ec27d(0x145),'.tpl'];if(_0x20f750[_0x5ec27d(0x110)](_0x1d63cf)||_0x522c71[_0x5ec27d(0x10d)](_0x5ec27d(0x12b))){const _0x4b064c=await a83_0x51389b[_0x5ec27d(0x11e)][_0x5ec27d(0x13e)](_0x522c71,_0x5ec27d(0x13f)),_0x293992=this[_0x5ec27d(0x143)](_0x4b064c,_0x59089f,_0x9ed625);await a83_0x51389b[_0x5ec27d(0x11e)][_0x5ec27d(0x134)](_0xa0e69a,_0x293992,'utf8');}else await a83_0x51389b[_0x5ec27d(0x11e)]['copyFile'](_0x522c71,_0xa0e69a);}}
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.0",
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))})})]});}