@lovrabet/cli 1.2.5-beta.3 → 1.2.5-beta.5

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 (66) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli.js +1 -1
  31. package/lib/cmd/build-watch.js +1 -1
  32. package/lib/cmd/build.js +1 -1
  33. package/lib/cmd/logs.js +1 -1
  34. package/lib/cmd/preview.js +1 -1
  35. package/lib/cmd/start.js +1 -1
  36. package/lib/config/config-help.js +1 -1
  37. package/lib/config/main.js +1 -1
  38. package/lib/constant/domain.js +1 -1
  39. package/lib/constant/env.js +1 -1
  40. package/lib/create-app/enhanced-guided-create.js +1 -1
  41. package/lib/create-app/format-elapsed.js +1 -1
  42. package/lib/create-app/main.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/init/main.js +1 -1
  52. package/lib/mcp/McpInstallUI.js +1 -1
  53. package/lib/mcp/claude.js +1 -1
  54. package/lib/mcp/cursor.js +1 -1
  55. package/lib/mcp/main.js +1 -1
  56. package/lib/skills/SkillInstallUI.js +1 -1
  57. package/lib/skills/main.js +1 -1
  58. package/lib/utils/check-sdk-version.js +1 -1
  59. package/lib/utils/config.js +1 -1
  60. package/lib/utils/copy-directory.js +1 -1
  61. package/lib/utils/http-client.js +1 -1
  62. package/lib/utils/logger.js +1 -1
  63. package/lib/utils/router-updater.js +1 -1
  64. package/lib/utils/sleep.js +1 -1
  65. package/lib/utils/template-replacer.js +1 -1
  66. package/package.json +1 -1
@@ -1 +1 @@
1
- const a60_0x92acf0=a60_0x3133;function a60_0x2669(){const _0x48cee1=['\x20\x20\x20查看最新版本:\x20https://www.npmjs.com/package/@lovrabet/sdk','16185110OnJose','existsSync','\x20或更高版本:','\x20\x20\x20当前\x20CLI\x20版本已升级模型注册协议,但检测到您的\x20@lovrabet/sdk\x20版本\x20','578589tnZTTP','\x20\x20\x20请升级\x20SDK\x20至\x20','package.json','coerce','482ZggtHa','needsUpgrade','\x1b[1m','log','utf8','\x1b[0m','version','2907795vhRndi','1107naaaXr','@lovrabet/sdk','13329hEvmZT','parse','devDependencies','1190567EwjxHP','368920NuNlGe','1.2.0','readFileSync','dependencies','12ctzkcf','944VTUbXG','\x20\x20\x20npm\x20install\x20@lovrabet/sdk@latest','join','\x1b[33m'];a60_0x2669=function(){return _0x48cee1;};return a60_0x2669();}(function(_0x1885d5,_0x5f45ae){const _0x4ab4be=a60_0x3133,_0x19728f=_0x1885d5();while(!![]){try{const _0x6f5a16=-parseInt(_0x4ab4be(0x141))/0x1+parseInt(_0x4ab4be(0x145))/0x2*(-parseInt(_0x4ab4be(0x14d))/0x3)+parseInt(_0x4ab4be(0x153))/0x4+-parseInt(_0x4ab4be(0x14c))/0x5+parseInt(_0x4ab4be(0x137))/0x6*(-parseInt(_0x4ab4be(0x152))/0x7)+parseInt(_0x4ab4be(0x138))/0x8*(parseInt(_0x4ab4be(0x14f))/0x9)+parseInt(_0x4ab4be(0x13d))/0xa;if(_0x6f5a16===_0x5f45ae)break;else _0x19728f['push'](_0x19728f['shift']());}catch(_0x10706a){_0x19728f['push'](_0x19728f['shift']());}}}(a60_0x2669,0x48544));function a60_0x3133(_0x35a403,_0x46b938){_0x35a403=_0x35a403-0x137;const _0x2669cf=a60_0x2669();let _0x313312=_0x2669cf[_0x35a403];return _0x313312;}import a60_0x1d1287 from'node:fs';import a60_0x3fb59b from'node:path';import a60_0x175ccf from'semver';const MIN_SDK_VERSION=a60_0x92acf0(0x154);export function checkSdkVersion(_0xcc8ee1){const _0x216c48=a60_0x92acf0,_0x214123=a60_0x3fb59b[_0x216c48(0x13a)](_0xcc8ee1,_0x216c48(0x143));if(!a60_0x1d1287[_0x216c48(0x13e)](_0x214123))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};try{const _0x4c4367=JSON[_0x216c48(0x150)](a60_0x1d1287[_0x216c48(0x155)](_0x214123,_0x216c48(0x149))),_0x2bfd0b=_0x4c4367[_0x216c48(0x156)]||{},_0x3781ad=_0x4c4367[_0x216c48(0x151)]||{},_0x1c1822=_0x2bfd0b[_0x216c48(0x14e)]||_0x3781ad[_0x216c48(0x14e)];if(!_0x1c1822)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};const _0x5752fb=a60_0x175ccf[_0x216c48(0x144)](_0x1c1822),_0x2b336e=_0x5752fb?a60_0x175ccf['lt'](_0x5752fb,MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1c1822,'needsUpgrade':_0x2b336e,'minVersion':MIN_SDK_VERSION};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};}}export function printSdkUpgradeWarning(_0x32e53a){const _0x307f95=a60_0x92acf0;if(!_0x32e53a[_0x307f95(0x146)])return;const _0x4e6cb8=_0x307f95(0x13b),_0x789dba=_0x307f95(0x14a),_0x41f438=_0x307f95(0x147);console[_0x307f95(0x148)](),console['log'](''+_0x4e6cb8+_0x41f438+'⚠️\x20\x20SDK\x20版本不兼容'+_0x789dba),console[_0x307f95(0x148)](_0x4e6cb8+_0x307f95(0x140)+_0x32e53a[_0x307f95(0x14b)]+'\x20不支持新协议。'+_0x789dba),console[_0x307f95(0x148)](_0x4e6cb8+_0x307f95(0x142)+_0x32e53a['minVersion']+_0x307f95(0x13f)+_0x789dba),console['log'](_0x4e6cb8+_0x307f95(0x139)+_0x789dba),console[_0x307f95(0x148)](_0x4e6cb8+_0x307f95(0x13c)+_0x789dba),console[_0x307f95(0x148)]();}
1
+ function a60_0x59e3(_0x2e5ac6,_0x2dcae3){_0x2e5ac6=_0x2e5ac6-0x10e;const _0xaeca9a=a60_0xaeca();let _0x59e33c=_0xaeca9a[_0x2e5ac6];return _0x59e33c;}function a60_0xaeca(){const _0x7a6337=['dependencies','@lovrabet/sdk','12wblSsE','utf8','\x1b[33m','join','devDependencies','⚠️\x20\x20SDK\x20版本不兼容','3380232LNfHMv','\x20\x20\x20npm\x20install\x20@lovrabet/sdk@latest','2peLfhX','version','349902dylvsJ','\x20\x20\x20查看最新版本:\x20https://www.npmjs.com/package/@lovrabet/sdk','\x20\x20\x20请升级\x20SDK\x20至\x20','log','22AtdfjM','minVersion','423973xGeLiZ','package.json','188190CIaPTv','needsUpgrade','3085983oovqBA','204HzGPsh','\x20或更高版本:','\x20\x20\x20当前\x20CLI\x20版本已升级模型注册协议,但检测到您的\x20@lovrabet/sdk\x20版本\x20','parse','8dwffIG','919615CFUHqr','readFileSync','\x1b[1m','\x1b[0m','10209SeaARo','existsSync'];a60_0xaeca=function(){return _0x7a6337;};return a60_0xaeca();}(function(_0x3b18df,_0x563438){const _0x1bfdd8=a60_0x59e3,_0x2a162a=_0x3b18df();while(!![]){try{const _0x510f02=parseInt(_0x1bfdd8(0x125))/0x1*(-parseInt(_0x1bfdd8(0x11d))/0x2)+parseInt(_0x1bfdd8(0x111))/0x3*(parseInt(_0x1bfdd8(0x12a))/0x4)+-parseInt(_0x1bfdd8(0x12f))/0x5*(parseInt(_0x1bfdd8(0x115))/0x6)+-parseInt(_0x1bfdd8(0x11f))/0x7*(parseInt(_0x1bfdd8(0x12e))/0x8)+parseInt(_0x1bfdd8(0x129))/0x9+-parseInt(_0x1bfdd8(0x127))/0xa+parseInt(_0x1bfdd8(0x123))/0xb*(parseInt(_0x1bfdd8(0x11b))/0xc);if(_0x510f02===_0x563438)break;else _0x2a162a['push'](_0x2a162a['shift']());}catch(_0x3d96e7){_0x2a162a['push'](_0x2a162a['shift']());}}}(a60_0xaeca,0x35834));import a60_0xcb869b from'node:fs';import a60_0x4c442a from'node:path';import a60_0x516152 from'semver';const MIN_SDK_VERSION='1.2.0';export function checkSdkVersion(_0x5e8176){const _0x3cefff=a60_0x59e3,_0x32a6b2=a60_0x4c442a[_0x3cefff(0x118)](_0x5e8176,_0x3cefff(0x126));if(!a60_0xcb869b[_0x3cefff(0x112)](_0x32a6b2))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};try{const _0x1a990e=JSON[_0x3cefff(0x12d)](a60_0xcb869b[_0x3cefff(0x10e)](_0x32a6b2,_0x3cefff(0x116))),_0x3d7522=_0x1a990e[_0x3cefff(0x113)]||{},_0x3168b9=_0x1a990e[_0x3cefff(0x119)]||{},_0x4efc85=_0x3d7522[_0x3cefff(0x114)]||_0x3168b9[_0x3cefff(0x114)];if(!_0x4efc85)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};const _0x41da87=a60_0x516152['coerce'](_0x4efc85),_0x48fa2c=_0x41da87?a60_0x516152['lt'](_0x41da87,MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4efc85,'needsUpgrade':_0x48fa2c,'minVersion':MIN_SDK_VERSION};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':MIN_SDK_VERSION};}}export function printSdkUpgradeWarning(_0x5e97cf){const _0x24fe75=a60_0x59e3;if(!_0x5e97cf[_0x24fe75(0x128)])return;const _0x2848bc=_0x24fe75(0x117),_0x3d6118=_0x24fe75(0x110),_0x5e7a8d=_0x24fe75(0x10f);console[_0x24fe75(0x122)](),console[_0x24fe75(0x122)](''+_0x2848bc+_0x5e7a8d+_0x24fe75(0x11a)+_0x3d6118),console['log'](_0x2848bc+_0x24fe75(0x12c)+_0x5e97cf[_0x24fe75(0x11e)]+'\x20不支持新协议。'+_0x3d6118),console[_0x24fe75(0x122)](_0x2848bc+_0x24fe75(0x121)+_0x5e97cf[_0x24fe75(0x124)]+_0x24fe75(0x12b)+_0x3d6118),console[_0x24fe75(0x122)](_0x2848bc+_0x24fe75(0x11c)+_0x3d6118),console['log'](_0x2848bc+_0x24fe75(0x120)+_0x3d6118),console[_0x24fe75(0x122)]();}
@@ -1 +1 @@
1
- const a61_0x30bb26=a61_0x4487;(function(_0x35347e,_0x547a96){const _0x174935=a61_0x4487,_0x27155b=_0x35347e();while(!![]){try{const _0x260bb4=-parseInt(_0x174935(0x10f))/0x1*(parseInt(_0x174935(0x112))/0x2)+parseInt(_0x174935(0x10a))/0x3*(parseInt(_0x174935(0x116))/0x4)+parseInt(_0x174935(0x114))/0x5+parseInt(_0x174935(0x118))/0x6*(parseInt(_0x174935(0x119))/0x7)+-parseInt(_0x174935(0x108))/0x8+parseInt(_0x174935(0x10b))/0x9+-parseInt(_0x174935(0x117))/0xa;if(_0x260bb4===_0x547a96)break;else _0x27155b['push'](_0x27155b['shift']());}catch(_0x2cbc22){_0x27155b['push'](_0x27155b['shift']());}}}(a61_0x2d04,0x89c08));import{existsSync,readFileSync}from'node:fs';function a61_0x4487(_0x2d1a1f,_0x3e94a5){_0x2d1a1f=_0x2d1a1f-0x108;const _0x2d041a=a61_0x2d04();let _0x44871a=_0x2d041a[_0x2d1a1f];return _0x44871a;}import{resolve}from'node:path';import{homedir}from'node:os';export const projectConfigPath=resolve(process[a61_0x30bb26(0x10e)](),a61_0x30bb26(0x10c));export const globalConfigPath=resolve(homedir(),a61_0x30bb26(0x10c));export function readConfig(_0x5168b6){const _0xb71429=a61_0x30bb26;let _0xaa2547={};try{if(existsSync(globalConfigPath)){const _0xccd70d=readFileSync(globalConfigPath,{'encoding':_0xb71429(0x109)});_0xccd70d&&(_0xaa2547=JSON[_0xb71429(0x111)](_0xccd70d));}}catch(_0x391d25){}try{const _0x50614f=_0x5168b6?resolve(_0x5168b6,_0xb71429(0x10c)):projectConfigPath;if(existsSync(_0x50614f)){const _0x528364=readFileSync(_0x50614f,{'encoding':_0xb71429(0x109)});if(_0x528364){const _0x1617d0=JSON[_0xb71429(0x111)](_0x528364);_0xaa2547={..._0xaa2547,..._0x1617d0};}}}catch(_0x65d61b){}return _0xaa2547;}export function getConfigAppCode(){const _0x1a70d9=a61_0x30bb26;let _0x5d61a3={},_0x4a826d={};try{if(existsSync(globalConfigPath)){const _0x93bb52=readFileSync(globalConfigPath,{'encoding':_0x1a70d9(0x109)});_0x93bb52&&(_0x4a826d=JSON[_0x1a70d9(0x111)](_0x93bb52));}}catch(_0x5d910c){}try{if(existsSync(projectConfigPath)){const _0x38a449=readFileSync(projectConfigPath,{'encoding':_0x1a70d9(0x109)});_0x38a449&&(_0x5d61a3=JSON['parse'](_0x38a449));}}catch(_0x11fd5e){}let _0x239fbc;if(_0x1a70d9(0x10d)in _0x5d61a3)_0x239fbc=_0x5d61a3[_0x1a70d9(0x10d)];else{if(_0x1a70d9(0x115)in _0x5d61a3)_0x239fbc=_0x5d61a3['app'];else{if(_0x1a70d9(0x10d)in _0x4a826d)_0x239fbc=_0x4a826d['appcode'];else _0x1a70d9(0x115)in _0x4a826d&&(_0x239fbc=_0x4a826d['app']);}}if(typeof _0x239fbc!==_0x1a70d9(0x113)||_0x239fbc[_0x1a70d9(0x110)]()==='')return undefined;return _0x239fbc;}function a61_0x2d04(){const _0x38e695=['1102219InjGoM','trim','parse','2JxGfra','string','4883965GXouRY','app','3950908mFFAwb','2791810qyCEpo','17274Ydzhar','1113uDuFDO','6211584FYqnWx','utf8','3wbYlET','2698191BMayTn','.lovrabetrc','appcode','cwd'];a61_0x2d04=function(){return _0x38e695;};return a61_0x2d04();}export function isInProject(){return existsSync(projectConfigPath);}
1
+ function a61_0x54bd(){const _0x1cda84=['parse','3773182hBJzJZ','string','32418OpQoXb','trim','4UEIktg','3svhOXn','9042385ELQfCt','.lovrabetrc','cwd','app','utf8','9204576rcOaZa','env','110332DRpUrl','3860wylGiw','appcode','2354012wkoNBJ','24PBljRQ','845200eYSgNd'];a61_0x54bd=function(){return _0x1cda84;};return a61_0x54bd();}const a61_0x3237fe=a61_0xc33f;(function(_0xef358c,_0x4521ff){const _0x530408=a61_0xc33f,_0x368dba=_0xef358c();while(!![]){try{const _0x54aa48=-parseInt(_0x530408(0x147))/0x1*(-parseInt(_0x530408(0x152))/0x2)+parseInt(_0x530408(0x153))/0x3*(-parseInt(_0x530408(0x14a))/0x4)+-parseInt(_0x530408(0x14c))/0x5*(-parseInt(_0x530408(0x14b))/0x6)+-parseInt(_0x530408(0x14e))/0x7+-parseInt(_0x530408(0x145))/0x8+parseInt(_0x530408(0x150))/0x9*(parseInt(_0x530408(0x148))/0xa)+parseInt(_0x530408(0x154))/0xb;if(_0x54aa48===_0x4521ff)break;else _0x368dba['push'](_0x368dba['shift']());}catch(_0x36fa76){_0x368dba['push'](_0x368dba['shift']());}}}(a61_0x54bd,0xcae9a));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';function a61_0xc33f(_0x4cab1d,_0x55daa6){_0x4cab1d=_0x4cab1d-0x142;const _0x54bd84=a61_0x54bd();let _0xc33f9e=_0x54bd84[_0x4cab1d];return _0xc33f9e;}import{homedir}from'node:os';import{initEnv}from'../constant/env.js';export const projectConfigPath=resolve(process[a61_0x3237fe(0x142)](),'.lovrabetrc');export const globalConfigPath=resolve(homedir(),a61_0x3237fe(0x155));export function readConfig(_0x356583){const _0x111d5e=a61_0x3237fe;let _0x32f880={};try{if(existsSync(globalConfigPath)){const _0x2166d3=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x2166d3&&(_0x32f880=JSON[_0x111d5e(0x14d)](_0x2166d3));}}catch(_0x3743c2){}try{const _0x3d501e=_0x356583?resolve(_0x356583,_0x111d5e(0x155)):projectConfigPath;if(existsSync(_0x3d501e)){const _0x1bc271=readFileSync(_0x3d501e,{'encoding':_0x111d5e(0x144)});if(_0x1bc271){const _0x38a53f=JSON[_0x111d5e(0x14d)](_0x1bc271);_0x32f880={..._0x32f880,..._0x38a53f};}}}catch(_0x2565d0){}return _0x32f880[_0x111d5e(0x146)]&&typeof _0x32f880[_0x111d5e(0x146)]===_0x111d5e(0x14f)&&initEnv(_0x32f880[_0x111d5e(0x146)]),_0x32f880;}export function getConfigAppCode(){const _0x2180c6=a61_0x3237fe;let _0x2b676a={},_0x3b2720={};try{if(existsSync(globalConfigPath)){const _0x59cd74=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x59cd74&&(_0x3b2720=JSON['parse'](_0x59cd74));}}catch(_0x2c3db7){}try{if(existsSync(projectConfigPath)){const _0x119ae1=readFileSync(projectConfigPath,{'encoding':_0x2180c6(0x144)});_0x119ae1&&(_0x2b676a=JSON[_0x2180c6(0x14d)](_0x119ae1));}}catch(_0x1e7fea){}let _0x4b7854;if(_0x2180c6(0x149)in _0x2b676a)_0x4b7854=_0x2b676a[_0x2180c6(0x149)];else{if(_0x2180c6(0x143)in _0x2b676a)_0x4b7854=_0x2b676a[_0x2180c6(0x143)];else{if(_0x2180c6(0x149)in _0x3b2720)_0x4b7854=_0x3b2720[_0x2180c6(0x149)];else _0x2180c6(0x143)in _0x3b2720&&(_0x4b7854=_0x3b2720['app']);}}if(typeof _0x4b7854!==_0x2180c6(0x14f)||_0x4b7854[_0x2180c6(0x151)]()==='')return undefined;return _0x4b7854;}export function isInProject(){return existsSync(projectConfigPath);}
@@ -1 +1 @@
1
- (function(_0xe42b38,_0x5e3a3b){const _0x58b9f5=a62_0x4bc8,_0x32376b=_0xe42b38();while(!![]){try{const _0x4056d9=-parseInt(_0x58b9f5(0x136))/0x1+parseInt(_0x58b9f5(0x12b))/0x2+parseInt(_0x58b9f5(0x133))/0x3+-parseInt(_0x58b9f5(0x12a))/0x4*(-parseInt(_0x58b9f5(0x129))/0x5)+-parseInt(_0x58b9f5(0x12e))/0x6+-parseInt(_0x58b9f5(0x130))/0x7+parseInt(_0x58b9f5(0x12f))/0x8;if(_0x4056d9===_0x5e3a3b)break;else _0x32376b['push'](_0x32376b['shift']());}catch(_0xc7e4bd){_0x32376b['push'](_0x32376b['shift']());}}}(a62_0x5a4a,0xf4104));function a62_0x4bc8(_0x1cfb69,_0x672319){_0x1cfb69=_0x1cfb69-0x129;const _0x5a4af7=a62_0x5a4a();let _0x4bc835=_0x5a4af7[_0x1cfb69];return _0x4bc835;}import a62_0x22ad02 from'node:path';import a62_0x152844 from'node:fs';function a62_0x5a4a(){const _0x271329=['1238512nrOVVP','readdirSync','copyFileSync','6391842oFzEbN','7070376sEArYS','708043JFUFVO','isDirectory','name','2248806hyqjSD','复制目录时出错:','error','702988wWPAvw','mkdirSync','31135eOGJpI','396JwvXsd'];a62_0x5a4a=function(){return _0x271329;};return a62_0x5a4a();}export async function copyDirectory(_0x5624e1,_0x5f5443){const _0x42d2dc=a62_0x4bc8;try{const _0x38b749=a62_0x152844[_0x42d2dc(0x12c)](_0x5624e1,{'withFileTypes':!![]});a62_0x152844[_0x42d2dc(0x137)](_0x5f5443,{'recursive':!![]});for(const _0x4cccb4 of _0x38b749){const _0x32f070=a62_0x22ad02['join'](_0x5624e1,_0x4cccb4[_0x42d2dc(0x132)]),_0x1ff003=a62_0x22ad02['join'](_0x5f5443,_0x4cccb4[_0x42d2dc(0x132)]);_0x4cccb4[_0x42d2dc(0x131)]()?await copyDirectory(_0x32f070,_0x1ff003):a62_0x152844[_0x42d2dc(0x12d)](_0x32f070,_0x1ff003);}}catch(_0x43bb38){console[_0x42d2dc(0x135)](_0x42d2dc(0x134),_0x43bb38);}}
1
+ (function(_0x4a5448,_0xf6a3f3){const _0x582771=a62_0x3103,_0x37b5ab=_0x4a5448();while(!![]){try{const _0x502673=parseInt(_0x582771(0x189))/0x1+parseInt(_0x582771(0x18d))/0x2+-parseInt(_0x582771(0x184))/0x3+-parseInt(_0x582771(0x187))/0x4+parseInt(_0x582771(0x190))/0x5*(-parseInt(_0x582771(0x18c))/0x6)+parseInt(_0x582771(0x185))/0x7+-parseInt(_0x582771(0x18b))/0x8*(parseInt(_0x582771(0x18e))/0x9);if(_0x502673===_0xf6a3f3)break;else _0x37b5ab['push'](_0x37b5ab['shift']());}catch(_0x3c2a1e){_0x37b5ab['push'](_0x37b5ab['shift']());}}}(a62_0x11f5,0xe1d84));function a62_0x11f5(){const _0x898915=['2104mWiPYA','3791574GfdRQQ','2694718kPDMaG','45612hJJXor','join','5sQlvpR','复制目录时出错:','mkdirSync','error','995904Cjzktt','12540010ywuKae','readdirSync','1532364ENFENe','isDirectory','466143XLZOCM','name'];a62_0x11f5=function(){return _0x898915;};return a62_0x11f5();}function a62_0x3103(_0x54f5dd,_0x3a2eb0){_0x54f5dd=_0x54f5dd-0x181;const _0x11f58c=a62_0x11f5();let _0x31033a=_0x11f58c[_0x54f5dd];return _0x31033a;}import a62_0x3a7b12 from'node:path';import a62_0x2858fa from'node:fs';export async function copyDirectory(_0xa2bcff,_0x51f9c5){const _0x2456ec=a62_0x3103;try{const _0x3a182e=a62_0x2858fa[_0x2456ec(0x186)](_0xa2bcff,{'withFileTypes':!![]});a62_0x2858fa[_0x2456ec(0x182)](_0x51f9c5,{'recursive':!![]});for(const _0x516ffe of _0x3a182e){const _0x52c56c=a62_0x3a7b12[_0x2456ec(0x18f)](_0xa2bcff,_0x516ffe[_0x2456ec(0x18a)]),_0x46b638=a62_0x3a7b12['join'](_0x51f9c5,_0x516ffe[_0x2456ec(0x18a)]);_0x516ffe[_0x2456ec(0x188)]()?await copyDirectory(_0x52c56c,_0x46b638):a62_0x2858fa['copyFileSync'](_0x52c56c,_0x46b638);}}catch(_0x4f4e3b){console[_0x2456ec(0x183)](_0x2456ec(0x181),_0x4f4e3b);}}
@@ -1 +1 @@
1
- (function(_0x324266,_0x27a704){const _0xfa40f8=a63_0x5cf1,_0x430bb8=_0x324266();while(!![]){try{const _0x3892f1=-parseInt(_0xfa40f8(0x147))/0x1+-parseInt(_0xfa40f8(0x148))/0x2*(-parseInt(_0xfa40f8(0x15b))/0x3)+parseInt(_0xfa40f8(0x14f))/0x4*(-parseInt(_0xfa40f8(0x153))/0x5)+parseInt(_0xfa40f8(0x14a))/0x6+-parseInt(_0xfa40f8(0x149))/0x7*(parseInt(_0xfa40f8(0x158))/0x8)+-parseInt(_0xfa40f8(0x15c))/0x9+parseInt(_0xfa40f8(0x157))/0xa;if(_0x3892f1===_0x27a704)break;else _0x430bb8['push'](_0x430bb8['shift']());}catch(_0x511aad){_0x430bb8['push'](_0x430bb8['shift']());}}}(a63_0x2df2,0xbaa9c));export async function httpRequest(_0x514309,_0x4a6550={}){const _0x44a89d=a63_0x5cf1,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4a6550;let _0x774cf1=null;for(let _0x13ed64=0x0;_0x13ed64<=retries;_0x13ed64++){try{const _0x4d40d9=new AbortController(),_0x1556b9=setTimeout(()=>_0x4d40d9['abort'](),timeout),_0x5c210b=await fetch(_0x514309,{'headers':headers,'signal':_0x4d40d9[_0x44a89d(0x156)]});clearTimeout(_0x1556b9);let _0x9dfe0;const _0x208f6d=_0x5c210b[_0x44a89d(0x146)]['get'](_0x44a89d(0x14c));return _0x208f6d?.['includes']('application/json')?_0x9dfe0=await _0x5c210b[_0x44a89d(0x14d)]():_0x9dfe0=await _0x5c210b[_0x44a89d(0x152)](),{'ok':_0x5c210b['ok'],'status':_0x5c210b['status'],'statusText':_0x5c210b[_0x44a89d(0x15a)],'data':_0x9dfe0,'headers':_0x5c210b[_0x44a89d(0x146)],'url':_0x5c210b[_0x44a89d(0x159)],'text':()=>_0x5c210b[_0x44a89d(0x152)]()};}catch(_0x5557aa){_0x774cf1=_0x5557aa instanceof Error?_0x5557aa:new Error(String(_0x5557aa));if(_0x13ed64===retries)break;if(shouldRetry(_0x5557aa)){console['log']('*\x20请求失败,'+retryDelay+_0x44a89d(0x15d)+(_0x13ed64+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x774cf1||new Error(_0x44a89d(0x154));}function a63_0x5cf1(_0x7a1b70,_0x5857fa){_0x7a1b70=_0x7a1b70-0x146;const _0x2df238=a63_0x2df2();let _0x5cf192=_0x2df238[_0x7a1b70];return _0x5cf192;}function shouldRetry(_0x52d16a){const _0x17228f=a63_0x5cf1;if(_0x52d16a instanceof Error){if(_0x52d16a[_0x17228f(0x155)]===_0x17228f(0x14b))return![];if(_0x52d16a[_0x17228f(0x155)]==='TypeError'&&_0x52d16a[_0x17228f(0x150)]['includes']('fetch'))return!![];if(_0x52d16a['message'][_0x17228f(0x151)](_0x17228f(0x14e)))return!![];if(_0x52d16a[_0x17228f(0x150)][_0x17228f(0x151)]('ENOTFOUND'))return![];}return![];}function sleep(_0x582c9c){return new Promise(_0x5a13d7=>setTimeout(_0x5a13d7,_0x582c9c));}function a63_0x2df2(){const _0x28f65b=['message','includes','text','240YcosUe','Request\x20failed','name','signal','11487140dRYEwD','16VflseK','url','statusText','462UbDPLy','609183xXDGei','ms\x20后进行第\x20','headers','303249XRiokt','5312cxLApa','1623587WfXPvK','2368152QkgDfW','AbortError','content-type','json','ECONNRESET','29420frEZof'];a63_0x2df2=function(){return _0x28f65b;};return a63_0x2df2();}export function validateUrl(_0xf819a7){try{return new URL(_0xf819a7),!![];}catch{return![];}}
1
+ (function(_0x3b5e2b,_0x5a548a){const _0x1f555b=a63_0x535c,_0x267a24=_0x3b5e2b();while(!![]){try{const _0x173bd2=-parseInt(_0x1f555b(0x1c1))/0x1+-parseInt(_0x1f555b(0x1b1))/0x2*(parseInt(_0x1f555b(0x1b7))/0x3)+-parseInt(_0x1f555b(0x1c0))/0x4*(parseInt(_0x1f555b(0x1bc))/0x5)+parseInt(_0x1f555b(0x1ad))/0x6*(parseInt(_0x1f555b(0x1b9))/0x7)+parseInt(_0x1f555b(0x1ac))/0x8+-parseInt(_0x1f555b(0x1af))/0x9*(-parseInt(_0x1f555b(0x1ab))/0xa)+parseInt(_0x1f555b(0x1c4))/0xb;if(_0x173bd2===_0x5a548a)break;else _0x267a24['push'](_0x267a24['shift']());}catch(_0x2276dc){_0x267a24['push'](_0x267a24['shift']());}}}(a63_0x1693,0xa7298));function a63_0x535c(_0x229b38,_0xf0a1af){_0x229b38=_0x229b38-0x1aa;const _0x169325=a63_0x1693();let _0x535cf1=_0x169325[_0x229b38];return _0x535cf1;}export async function httpRequest(_0x27186f,_0x219710={}){const _0x548eb1=a63_0x535c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x219710;let _0x5566a6=null;for(let _0x229343=0x0;_0x229343<=retries;_0x229343++){try{const _0xe4dfef=new AbortController(),_0x66845f=setTimeout(()=>_0xe4dfef[_0x548eb1(0x1ae)](),timeout),_0x2e1ab7=await fetch(_0x27186f,{'headers':headers,'signal':_0xe4dfef[_0x548eb1(0x1c2)]});clearTimeout(_0x66845f);let _0x3752d8;const _0x478a0f=_0x2e1ab7[_0x548eb1(0x1b4)][_0x548eb1(0x1aa)]('content-type');return _0x478a0f?.[_0x548eb1(0x1c8)]('application/json')?_0x3752d8=await _0x2e1ab7[_0x548eb1(0x1c3)]():_0x3752d8=await _0x2e1ab7[_0x548eb1(0x1bb)](),{'ok':_0x2e1ab7['ok'],'status':_0x2e1ab7['status'],'statusText':_0x2e1ab7[_0x548eb1(0x1bf)],'data':_0x3752d8,'headers':_0x2e1ab7[_0x548eb1(0x1b4)],'url':_0x2e1ab7[_0x548eb1(0x1bd)],'text':()=>_0x2e1ab7[_0x548eb1(0x1bb)]()};}catch(_0x18986d){_0x5566a6=_0x18986d instanceof Error?_0x18986d:new Error(String(_0x18986d));if(_0x229343===retries)break;if(shouldRetry(_0x18986d)){console[_0x548eb1(0x1c7)](_0x548eb1(0x1b6)+retryDelay+_0x548eb1(0x1b2)+(_0x229343+0x1)+_0x548eb1(0x1b8)),await sleep(retryDelay);continue;}else break;}}throw _0x5566a6||new Error(_0x548eb1(0x1b3));}function shouldRetry(_0x5adce4){const _0x369d94=a63_0x535c;if(_0x5adce4 instanceof Error){if(_0x5adce4[_0x369d94(0x1be)]==='AbortError')return![];if(_0x5adce4[_0x369d94(0x1be)]===_0x369d94(0x1ba)&&_0x5adce4[_0x369d94(0x1c5)][_0x369d94(0x1c8)](_0x369d94(0x1c6)))return!![];if(_0x5adce4[_0x369d94(0x1c5)][_0x369d94(0x1c8)](_0x369d94(0x1b0)))return!![];if(_0x5adce4[_0x369d94(0x1c5)][_0x369d94(0x1c8)](_0x369d94(0x1b5)))return![];}return![];}function sleep(_0x2cf52b){return new Promise(_0x58a0ac=>setTimeout(_0x58a0ac,_0x2cf52b));}function a63_0x1693(){const _0x1eb16f=['name','statusText','18544gNNOWa','418550IbQLaK','signal','json','12728925IpnODs','message','fetch','log','includes','get','10TpQxRv','8520552eQEHFv','2723898YTGBIC','abort','3660948rRMZhL','ECONNRESET','15810cujNoL','ms\x20后进行第\x20','Request\x20failed','headers','ENOTFOUND','*\x20请求失败,','315aZLTxh','\x20次重试...','7VmVsAK','TypeError','text','1240izuZWq','url'];a63_0x1693=function(){return _0x1eb16f;};return a63_0x1693();}export function validateUrl(_0x1ef3bc){try{return new URL(_0x1ef3bc),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a64_0x14bd(_0x140fdf,_0x17379e){_0x140fdf=_0x140fdf-0x12a;const _0x1db82f=a64_0x1db8();let _0x14bdb6=_0x1db82f[_0x140fdf];return _0x14bdb6;}const a64_0x234030=a64_0x14bd;(function(_0x475d29,_0x4a9dd5){const _0x4e9081=a64_0x14bd,_0x1f92d4=_0x475d29();while(!![]){try{const _0x3d1da2=parseInt(_0x4e9081(0x15a))/0x1+parseInt(_0x4e9081(0x159))/0x2+-parseInt(_0x4e9081(0x141))/0x3*(-parseInt(_0x4e9081(0x156))/0x4)+-parseInt(_0x4e9081(0x140))/0x5*(-parseInt(_0x4e9081(0x154))/0x6)+parseInt(_0x4e9081(0x15e))/0x7*(parseInt(_0x4e9081(0x15f))/0x8)+-parseInt(_0x4e9081(0x12b))/0x9+-parseInt(_0x4e9081(0x14f))/0xa*(parseInt(_0x4e9081(0x12a))/0xb);if(_0x3d1da2===_0x4a9dd5)break;else _0x1f92d4['push'](_0x1f92d4['shift']());}catch(_0x136630){_0x1f92d4['push'](_0x1f92d4['shift']());}}}(a64_0x1db8,0x91179));function a64_0x1db8(){const _0x1f03a5=['stringify','File','existsSync','unknown','details','readLogs','format','565sJydBR','3gGtbCu','readFileSync','printf','transports','errors','setRawCommand','yellow','完成:\x20','clear','createLogger','command','initWinstonLogger','blue','join','30iasmfK','warn','green','combine','rawCommand','6738MnEFvQ','red','2508784vEBjud','toISOString','error','1529512LWdRQv','155059UEPQpT','.lovrabet.log','writeFileSync','log','1390501XPZCQw','24kczdMN','filter','setLogPath','Failed\x20to\x20read\x20logs:','map','Failed\x20to\x20clear\x20logs:','utf8','info','message','4297887mnGWRX','4530519BaRNdB','currentRawCommand','trim','addColors','clearLogs','logTask','timestamp','success','mkdirSync','level','winstonLogger','logFilePath','parse','now'];a64_0x1db8=function(){return _0x1f03a5;};return a64_0x1db8();}import a64_0x56efd1 from'winston';import a64_0x11edf7 from'node:fs';import a64_0x17ad5b from'node:path';class Logger{[a64_0x234030(0x135)];['logFilePath'];['currentRawCommand']='';constructor(){const _0x219d18=a64_0x234030;this[_0x219d18(0x136)]='';}[a64_0x234030(0x146)](_0x21b6fd){this['currentRawCommand']=_0x21b6fd;}[a64_0x234030(0x14c)](){const _0x3c3cb8=a64_0x234030,_0x349e89=a64_0x17ad5b['dirname'](this[_0x3c3cb8(0x136)]);!a64_0x11edf7[_0x3c3cb8(0x13b)](_0x349e89)&&a64_0x11edf7[_0x3c3cb8(0x133)](_0x349e89,{'recursive':!![]});const _0x5cba2b=a64_0x56efd1['format'][_0x3c3cb8(0x152)](a64_0x56efd1['format'][_0x3c3cb8(0x131)](),a64_0x56efd1[_0x3c3cb8(0x13f)][_0x3c3cb8(0x145)]({'stack':!![]}),a64_0x56efd1['format'][_0x3c3cb8(0x143)](_0x2f5612=>{const _0x561322=_0x3c3cb8,_0x1065d4={'timestamp':_0x2f5612[_0x561322(0x131)]||new Date()[_0x561322(0x157)](),'level':_0x2f5612[_0x561322(0x134)]||_0x561322(0x166),'command':_0x2f5612[_0x561322(0x14b)]||_0x561322(0x13c),'rawCommand':_0x2f5612[_0x561322(0x153)]||this[_0x561322(0x12c)]||undefined,'message':_0x2f5612[_0x561322(0x167)]||'','duration':_0x2f5612['duration']||undefined,'details':_0x2f5612[_0x561322(0x13d)]||undefined};return JSON[_0x561322(0x139)](_0x1065d4);}));this[_0x3c3cb8(0x135)]=a64_0x56efd1[_0x3c3cb8(0x14a)]({'level':'info','format':_0x5cba2b,'transports':[new a64_0x56efd1[(_0x3c3cb8(0x144))][(_0x3c3cb8(0x13a))]({'filename':this[_0x3c3cb8(0x136)],'level':_0x3c3cb8(0x166)})],'silent':![]}),a64_0x56efd1[_0x3c3cb8(0x12e)]({'success':_0x3c3cb8(0x151),'error':_0x3c3cb8(0x155),'warn':_0x3c3cb8(0x147),'info':_0x3c3cb8(0x14d)});}[a64_0x234030(0x161)](_0x1fe383){const _0x26bac3=a64_0x234030;this['logFilePath']=a64_0x17ad5b[_0x26bac3(0x14e)](_0x1fe383,_0x26bac3(0x15b)),this[_0x26bac3(0x135)]&&this[_0x26bac3(0x135)][_0x26bac3(0x149)](),this['initWinstonLogger']();}[a64_0x234030(0x166)](_0xf2f39d,_0x2e77b5,_0x20e56f){const _0x5b875c=a64_0x234030;if(!this['logFilePath']||!this[_0x5b875c(0x135)])return;this[_0x5b875c(0x135)][_0x5b875c(0x166)](_0x2e77b5,{'command':_0xf2f39d,'details':_0x20e56f});}[a64_0x234030(0x132)](_0x71b24a,_0x3f0a86,_0x294b38,_0x207cc1){const _0x445ab8=a64_0x234030;if(!this[_0x445ab8(0x136)]||!this[_0x445ab8(0x135)])return;this[_0x445ab8(0x135)][_0x445ab8(0x15d)](_0x445ab8(0x166),_0x3f0a86,{'level':'success','command':_0x71b24a,'duration':_0x294b38,'details':_0x207cc1});}[a64_0x234030(0x158)](_0x2f820e,_0x2c8736,_0x20c977){const _0x12267b=a64_0x234030;if(!this[_0x12267b(0x136)]||!this[_0x12267b(0x135)])return;this[_0x12267b(0x135)][_0x12267b(0x158)](_0x2c8736,{'command':_0x2f820e,'details':_0x20c977});}['warn'](_0x153bf7,_0x58dcfb,_0x69ef3b){const _0x85adb1=a64_0x234030;if(!this[_0x85adb1(0x136)]||!this[_0x85adb1(0x135)])return;this[_0x85adb1(0x135)][_0x85adb1(0x150)](_0x58dcfb,{'command':_0x153bf7,'details':_0x69ef3b});}async[a64_0x234030(0x130)](_0x53d3b3,_0x33b5ab,_0x1aeced){const _0x454617=a64_0x234030,_0x4a5c84=Date['now']();this[_0x454617(0x166)](_0x53d3b3,'开始执行:\x20'+_0x33b5ab);try{const _0x56e985=await _0x1aeced(),_0x281c80=Date[_0x454617(0x138)]()-_0x4a5c84;return this[_0x454617(0x132)](_0x53d3b3,_0x454617(0x148)+_0x33b5ab,_0x281c80),_0x56e985;}catch(_0x4f8473){const _0x6398e4=Date[_0x454617(0x138)]()-_0x4a5c84;this['error'](_0x53d3b3,'失败:\x20'+_0x33b5ab,{'error':_0x4f8473 instanceof Error?_0x4f8473['message']:String(_0x4f8473),'duration':_0x6398e4});throw _0x4f8473;}}[a64_0x234030(0x13e)](){const _0x5a8354=a64_0x234030;try{if(!a64_0x11edf7[_0x5a8354(0x13b)](this[_0x5a8354(0x136)]))return[];const _0x2bcfdd=a64_0x11edf7[_0x5a8354(0x142)](this[_0x5a8354(0x136)],'utf8');return _0x2bcfdd['split']('\x0a')[_0x5a8354(0x160)](_0x2956a5=>_0x2956a5[_0x5a8354(0x12d)]())[_0x5a8354(0x163)](_0x358b93=>JSON[_0x5a8354(0x137)](_0x358b93));}catch(_0x1ee540){return console[_0x5a8354(0x150)](_0x5a8354(0x162),_0x1ee540),[];}}[a64_0x234030(0x12f)](){const _0x2b4404=a64_0x234030;try{a64_0x11edf7['existsSync'](this['logFilePath'])&&a64_0x11edf7[_0x2b4404(0x15c)](this[_0x2b4404(0x136)],'',_0x2b4404(0x165));}catch(_0x299657){console[_0x2b4404(0x150)](_0x2b4404(0x164),_0x299657);}}['getWinstonInstance'](){return this['winstonLogger'];}}export const logger=new Logger();
1
+ const a64_0x453932=a64_0xec13;(function(_0x4627b6,_0x220a92){const _0x35d7eb=a64_0xec13,_0x4e4c35=_0x4627b6();while(!![]){try{const _0x3a0ec5=parseInt(_0x35d7eb(0x18f))/0x1+-parseInt(_0x35d7eb(0x16f))/0x2*(parseInt(_0x35d7eb(0x195))/0x3)+parseInt(_0x35d7eb(0x190))/0x4+parseInt(_0x35d7eb(0x197))/0x5+-parseInt(_0x35d7eb(0x174))/0x6+parseInt(_0x35d7eb(0x18b))/0x7+parseInt(_0x35d7eb(0x180))/0x8*(parseInt(_0x35d7eb(0x17d))/0x9);if(_0x3a0ec5===_0x220a92)break;else _0x4e4c35['push'](_0x4e4c35['shift']());}catch(_0x3a740f){_0x4e4c35['push'](_0x4e4c35['shift']());}}}(a64_0x5927,0x35610));import a64_0x2c14ce from'winston';import a64_0x446458 from'node:fs';function a64_0xec13(_0x33d2a0,_0x41d49c){_0x33d2a0=_0x33d2a0-0x16c;const _0x5927d7=a64_0x5927();let _0xec13f5=_0x5927d7[_0x33d2a0];return _0xec13f5;}import a64_0x5c283d from'node:path';class Logger{[a64_0x453932(0x177)];[a64_0x453932(0x189)];['currentRawCommand']='';constructor(){const _0x26eb3c=a64_0x453932;this[_0x26eb3c(0x189)]='';}[a64_0x453932(0x18a)](_0x23faa8){this['currentRawCommand']=_0x23faa8;}[a64_0x453932(0x170)](){const _0x2ae3e2=a64_0x453932,_0x46a816=a64_0x5c283d['dirname'](this[_0x2ae3e2(0x189)]);!a64_0x446458['existsSync'](_0x46a816)&&a64_0x446458['mkdirSync'](_0x46a816,{'recursive':!![]});const _0x282a2b=a64_0x2c14ce['format'][_0x2ae3e2(0x176)](a64_0x2c14ce['format']['timestamp'](),a64_0x2c14ce[_0x2ae3e2(0x17a)]['errors']({'stack':!![]}),a64_0x2c14ce[_0x2ae3e2(0x17a)][_0x2ae3e2(0x173)](_0x1c399c=>{const _0x57cf36=_0x2ae3e2,_0x238e74={'timestamp':_0x1c399c['timestamp']||new Date()['toISOString'](),'level':_0x1c399c[_0x57cf36(0x19c)]||'info','command':_0x1c399c[_0x57cf36(0x17b)]||_0x57cf36(0x18e),'rawCommand':_0x1c399c[_0x57cf36(0x196)]||this['currentRawCommand']||undefined,'message':_0x1c399c[_0x57cf36(0x17c)]||'','duration':_0x1c399c['duration']||undefined,'details':_0x1c399c[_0x57cf36(0x1a0)]||undefined};return JSON[_0x57cf36(0x188)](_0x238e74);}));this[_0x2ae3e2(0x177)]=a64_0x2c14ce[_0x2ae3e2(0x17e)]({'level':_0x2ae3e2(0x19a),'format':_0x282a2b,'transports':[new a64_0x2c14ce[(_0x2ae3e2(0x181))][(_0x2ae3e2(0x191))]({'filename':this[_0x2ae3e2(0x189)],'level':_0x2ae3e2(0x19a)})],'silent':![]}),a64_0x2c14ce[_0x2ae3e2(0x17f)]({'success':_0x2ae3e2(0x192),'error':_0x2ae3e2(0x186),'warn':_0x2ae3e2(0x18c),'info':_0x2ae3e2(0x19b)});}[a64_0x453932(0x19e)](_0x543359){const _0x3b3409=a64_0x453932;this[_0x3b3409(0x189)]=a64_0x5c283d[_0x3b3409(0x175)](_0x543359,_0x3b3409(0x185)),this['winstonLogger']&&this[_0x3b3409(0x177)]['clear'](),this[_0x3b3409(0x170)]();}[a64_0x453932(0x19a)](_0x241b72,_0xabf34a,_0xd439f5){const _0x1d0138=a64_0x453932;if(!this[_0x1d0138(0x189)]||!this[_0x1d0138(0x177)])return;this['winstonLogger'][_0x1d0138(0x19a)](_0xabf34a,{'command':_0x241b72,'details':_0xd439f5});}[a64_0x453932(0x198)](_0x119d1b,_0x31b401,_0x5c384d,_0x5c519e){const _0xbdc479=a64_0x453932;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0xbdc479(0x177)]['log']('info',_0x31b401,{'level':'success','command':_0x119d1b,'duration':_0x5c384d,'details':_0x5c519e});}['error'](_0x1673c5,_0x287fca,_0x1f6e54){const _0x2418b9=a64_0x453932;if(!this[_0x2418b9(0x189)]||!this[_0x2418b9(0x177)])return;this[_0x2418b9(0x177)]['error'](_0x287fca,{'command':_0x1673c5,'details':_0x1f6e54});}[a64_0x453932(0x16e)](_0x273dfd,_0x565679,_0x1192a6){const _0x573295=a64_0x453932;if(!this[_0x573295(0x189)]||!this[_0x573295(0x177)])return;this['winstonLogger']['warn'](_0x565679,{'command':_0x273dfd,'details':_0x1192a6});}async[a64_0x453932(0x18d)](_0x3c53df,_0x57ee39,_0x51e451){const _0x3d0597=a64_0x453932,_0x2a26d6=Date[_0x3d0597(0x172)]();this[_0x3d0597(0x19a)](_0x3c53df,'开始执行:\x20'+_0x57ee39);try{const _0x343e8e=await _0x51e451(),_0x568cb2=Date[_0x3d0597(0x172)]()-_0x2a26d6;return this[_0x3d0597(0x198)](_0x3c53df,_0x3d0597(0x194)+_0x57ee39,_0x568cb2),_0x343e8e;}catch(_0x36c72e){const _0x35f16f=Date[_0x3d0597(0x172)]()-_0x2a26d6;this['error'](_0x3c53df,_0x3d0597(0x19d)+_0x57ee39,{'error':_0x36c72e instanceof Error?_0x36c72e['message']:String(_0x36c72e),'duration':_0x35f16f});throw _0x36c72e;}}[a64_0x453932(0x182)](){const _0x33b2de=a64_0x453932;try{if(!a64_0x446458[_0x33b2de(0x178)](this[_0x33b2de(0x189)]))return[];const _0x3c68b2=a64_0x446458[_0x33b2de(0x16d)](this[_0x33b2de(0x189)],'utf8');return _0x3c68b2['split']('\x0a')[_0x33b2de(0x16c)](_0x4d53f6=>_0x4d53f6['trim']())[_0x33b2de(0x187)](_0x2a9f2a=>JSON[_0x33b2de(0x19f)](_0x2a9f2a));}catch(_0x4eb847){return console[_0x33b2de(0x16e)](_0x33b2de(0x171),_0x4eb847),[];}}[a64_0x453932(0x179)](){const _0x5c30a7=a64_0x453932;try{a64_0x446458[_0x5c30a7(0x178)](this['logFilePath'])&&a64_0x446458[_0x5c30a7(0x193)](this[_0x5c30a7(0x189)],'',_0x5c30a7(0x199));}catch(_0x4208bc){console['warn'](_0x5c30a7(0x184),_0x4208bc);}}[a64_0x453932(0x183)](){const _0x43b4b0=a64_0x453932;return this[_0x43b4b0(0x177)];}}export const logger=new Logger();function a64_0x5927(){const _0xf0af71=['readLogs','getWinstonInstance','Failed\x20to\x20clear\x20logs:','.lovrabet.log','red','map','stringify','logFilePath','setRawCommand','1260840iqcxET','yellow','logTask','unknown','127629BmdMou','210784ZcCShv','File','green','writeFileSync','完成:\x20','630621VvtrVh','rawCommand','1454510NeVXHJ','success','utf8','info','blue','level','失败:\x20','setLogPath','parse','details','filter','readFileSync','warn','4RUpcqY','initWinstonLogger','Failed\x20to\x20read\x20logs:','now','printf','839820XtyhtM','join','combine','winstonLogger','existsSync','clearLogs','format','command','message','1971MItGwS','createLogger','addColors','4664gBzUCc','transports'];a64_0x5927=function(){return _0xf0af71;};return a64_0x5927();}
@@ -1 +1 @@
1
- const a65_0x5970db=a65_0x996a;function a65_0x996a(_0x25216b,_0x9a9163){_0x25216b=_0x25216b-0x13b;const _0x234544=a65_0x2345();let _0x996a38=_0x234544[_0x25216b];return _0x996a38;}(function(_0x5eb237,_0x7f8fb4){const _0x5efb23=a65_0x996a,_0x31afe8=_0x5eb237();while(!![]){try{const _0x18bc7b=parseInt(_0x5efb23(0x13e))/0x1*(parseInt(_0x5efb23(0x163))/0x2)+-parseInt(_0x5efb23(0x141))/0x3+parseInt(_0x5efb23(0x157))/0x4+parseInt(_0x5efb23(0x142))/0x5*(-parseInt(_0x5efb23(0x14a))/0x6)+parseInt(_0x5efb23(0x154))/0x7*(-parseInt(_0x5efb23(0x150))/0x8)+-parseInt(_0x5efb23(0x165))/0x9+parseInt(_0x5efb23(0x14d))/0xa*(parseInt(_0x5efb23(0x15a))/0xb);if(_0x18bc7b===_0x7f8fb4)break;else _0x31afe8['push'](_0x31afe8['shift']());}catch(_0x2dc21e){_0x31afe8['push'](_0x31afe8['shift']());}}}(a65_0x2345,0x59b4b));function a65_0x2345(){const _0x728cdf=['1551132TfljJv','match','toComponentName','readFile','error','router','now','开始更新路由配置','join','53995NzWJTb','existsSync','path:\x20\x22','425904mKzIyk','2469095DOoeQF','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','index.tsx','writeFile','lastIndexOf','previewChanges','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','路由文件不存在:\x20','6EYYDgJ','includes','\x20from\x20\x22../pages/','20aAFfCG','indexOf','map','80kdifQg','index','split','utf8','212149btzeto','import\x20','promises','1110828GyupCX','addPageRoute','toLowerCase','6308159zRlCjX','addRoute','routerFilePath','message','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','addImport','length','slice','info','2fuFqJJ','路由配置更新失败'];a65_0x2345=function(){return _0x728cdf;};return a65_0x2345();}import a65_0x1a27a8 from'node:fs';import a65_0x508fa9 from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a65_0x5970db(0x15c)];constructor(_0x259c1d){const _0x3ebaf1=a65_0x5970db;this[_0x3ebaf1(0x15c)]=a65_0x508fa9[_0x3ebaf1(0x13d)](_0x259c1d,'src',_0x3ebaf1(0x16a),_0x3ebaf1(0x144));}async[a65_0x5970db(0x158)](_0x4accc7,_0x1d5805){const _0x18a350=a65_0x5970db;if(!a65_0x1a27a8[_0x18a350(0x13f)](this[_0x18a350(0x15c)]))throw new Error(_0x18a350(0x149)+this['routerFilePath']);const _0x1af791=Date[_0x18a350(0x13b)]();logger[_0x18a350(0x162)](_0x18a350(0x16a),_0x18a350(0x13c),{'pageName':_0x4accc7,'routePath':_0x1d5805,'file':this[_0x18a350(0x15c)]});try{const _0x188d90=await a65_0x1a27a8[_0x18a350(0x156)]['readFile'](this[_0x18a350(0x15c)],_0x18a350(0x153)),_0x52cee3=this[_0x18a350(0x167)](_0x4accc7),_0x2d2c1f=this[_0x18a350(0x15f)](_0x188d90,_0x52cee3,_0x4accc7),_0x1d6b22=this[_0x18a350(0x15b)](_0x2d2c1f,_0x1d5805,_0x52cee3);await a65_0x1a27a8[_0x18a350(0x156)][_0x18a350(0x145)](this[_0x18a350(0x15c)],_0x1d6b22,_0x18a350(0x153));const _0x4540b6=Date[_0x18a350(0x13b)]()-_0x1af791;logger['success']('router','路由配置更新完成',_0x4540b6,{'pageName':_0x4accc7,'routePath':_0x1d5805,'componentName':_0x52cee3});}catch(_0x503b03){const _0x39c578=Date[_0x18a350(0x13b)]()-_0x1af791;logger[_0x18a350(0x169)]('router',_0x18a350(0x164),{'pageName':_0x4accc7,'routePath':_0x1d5805,'error':_0x503b03 instanceof Error?_0x503b03[_0x18a350(0x15d)]:String(_0x503b03),'duration':_0x39c578});throw _0x503b03;}}[a65_0x5970db(0x167)](_0x4cc73b){const _0x396797=a65_0x5970db;return _0x4cc73b[_0x396797(0x152)]('-')[_0x396797(0x14f)](_0x25a9cf=>_0x25a9cf['charAt'](0x0)['toUpperCase']()+_0x25a9cf[_0x396797(0x161)](0x1)[_0x396797(0x159)]())[_0x396797(0x13d)]('');}['addImport'](_0x2d0564,_0x6b13d3,_0xc0954){const _0x208ca9=a65_0x5970db,_0x7e3fec=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x395423=_0x2d0564[_0x208ca9(0x166)](_0x7e3fec)||[],_0x4f0956=_0x208ca9(0x155)+_0x6b13d3+_0x208ca9(0x14c)+_0xc0954+'\x22;';if(_0x2d0564[_0x208ca9(0x14b)](_0x4f0956))return _0x2d0564;if(_0x395423[_0x208ca9(0x160)]>0x0){const _0x12f977=_0x395423[_0x395423[_0x208ca9(0x160)]-0x1];if(_0x12f977){const _0x28cd1a=_0x2d0564[_0x208ca9(0x146)](_0x12f977),_0x3afbb7=_0x28cd1a+_0x12f977[_0x208ca9(0x160)];return _0x2d0564[_0x208ca9(0x161)](0x0,_0x3afbb7)+_0x4f0956+'\x0a'+_0x2d0564[_0x208ca9(0x161)](_0x3afbb7);}}const _0x14048c=_0x2d0564[_0x208ca9(0x166)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x14048c&&_0x14048c[_0x208ca9(0x151)]!==undefined){const _0x2559b4=_0x14048c['index']+_0x14048c[0x0][_0x208ca9(0x160)];return _0x2d0564[_0x208ca9(0x161)](0x0,_0x2559b4)+_0x4f0956+'\x0a'+_0x2d0564['slice'](_0x2559b4);}return _0x2d0564;}['addRoute'](_0x57192f,_0xd2c52b,_0x18eb46){const _0x3f4592=a65_0x5970db,_0x47ae54=_0x3f4592(0x148)+_0xd2c52b+_0x3f4592(0x143)+_0x18eb46+_0x3f4592(0x15e);if(_0x57192f[_0x3f4592(0x14b)](_0x3f4592(0x140)+_0xd2c52b+'\x22'))return _0x57192f;const _0x4a639a=/children:\s*\[([\s\S]*?)\]/,_0x188d9b=_0x57192f[_0x3f4592(0x166)](_0x4a639a);if(!_0x188d9b||_0x188d9b[_0x3f4592(0x151)]===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x253752=_0x188d9b[0x1],_0x2f45c1=_0x188d9b[_0x3f4592(0x151)]+_0x188d9b[0x0][_0x3f4592(0x14e)]('[')+0x1,_0x4f9ddd=_0x253752?.[_0x3f4592(0x166)](/\{[\s\S]*?\},/g)||[];if(_0x4f9ddd[_0x3f4592(0x160)]>0x0){const _0x4eccc9=_0x4f9ddd[_0x4f9ddd[_0x3f4592(0x160)]-0x1];if(_0x4eccc9){const _0x503819=_0x57192f[_0x3f4592(0x146)](_0x4eccc9),_0x2a2c95=_0x503819+_0x4eccc9[_0x3f4592(0x160)];return _0x57192f['slice'](0x0,_0x2a2c95)+'\x0a'+_0x47ae54+_0x57192f[_0x3f4592(0x161)](_0x2a2c95);}}return _0x57192f['slice'](0x0,_0x2f45c1)+'\x0a'+_0x47ae54+_0x57192f[_0x3f4592(0x161)](_0x2f45c1);}async[a65_0x5970db(0x147)](_0x30d7c9,_0xac71ff){const _0x88e313=a65_0x5970db;if(!a65_0x1a27a8[_0x88e313(0x13f)](this[_0x88e313(0x15c)]))throw new Error(_0x88e313(0x149)+this[_0x88e313(0x15c)]);const _0x2016fe=await a65_0x1a27a8['promises'][_0x88e313(0x168)](this[_0x88e313(0x15c)],_0x88e313(0x153)),_0xb2fa4c=this['toComponentName'](_0x30d7c9);let _0x1bbb90=this[_0x88e313(0x15f)](_0x2016fe,_0xb2fa4c,_0x30d7c9);return _0x1bbb90=this['addRoute'](_0x1bbb90,_0xac71ff,_0xb2fa4c),_0x1bbb90;}}
1
+ const a65_0x593a3e=a65_0x17f0;(function(_0x25ad1f,_0x23317c){const _0x919930=a65_0x17f0,_0x9931e4=_0x25ad1f();while(!![]){try{const _0x35e181=-parseInt(_0x919930(0x93))/0x1+-parseInt(_0x919930(0x83))/0x2*(-parseInt(_0x919930(0x7e))/0x3)+-parseInt(_0x919930(0x99))/0x4*(-parseInt(_0x919930(0x82))/0x5)+parseInt(_0x919930(0x7c))/0x6+parseInt(_0x919930(0x95))/0x7+parseInt(_0x919930(0x80))/0x8+-parseInt(_0x919930(0x79))/0x9;if(_0x35e181===_0x23317c)break;else _0x9931e4['push'](_0x9931e4['shift']());}catch(_0x1b98bc){_0x9931e4['push'](_0x9931e4['shift']());}}}(a65_0x5ee2,0xaba6e));import a65_0x3a194f from'node:fs';import a65_0x105dab from'node:path';function a65_0x17f0(_0x250548,_0x528595){_0x250548=_0x250548-0x72;const _0x5ee2c9=a65_0x5ee2();let _0x17f0f4=_0x5ee2c9[_0x250548];return _0x17f0f4;}import{logger}from'./logger.js';function a65_0x5ee2(){const _0x10fcec=['routerFilePath','error','path:\x20\x22','indexOf','211032fmaODl','promises','7854784EBmbiI','src','\x20from\x20\x22../pages/','join','8wpVikJ','writeFile','router','index.tsx','未找到路由配置的\x20children\x20数组','length','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','slice','路由配置更新失败','now','previewChanges','readFile','toComponentName','开始更新路由配置','27155439YwRLpC','addRoute','toLowerCase','926106IQVCGi','路由配置更新完成','237777aWDztZ','match','3385016oMNmop','import\x20','3003580zgadZg','26xYvzCo','message','index','lastIndexOf','includes','utf8','split','charAt','addImport','info','addPageRoute','existsSync'];a65_0x5ee2=function(){return _0x10fcec;};return a65_0x5ee2();}export class RouterUpdater{[a65_0x593a3e(0x8f)];constructor(_0x284f5a){const _0x429b6f=a65_0x593a3e;this[_0x429b6f(0x8f)]=a65_0x105dab['join'](_0x284f5a,_0x429b6f(0x96),_0x429b6f(0x9b),_0x429b6f(0x9c));}async[a65_0x593a3e(0x8d)](_0x576c48,_0x424be){const _0x55d82d=a65_0x593a3e;if(!a65_0x3a194f[_0x55d82d(0x8e)](this[_0x55d82d(0x8f)]))throw new Error('路由文件不存在:\x20'+this[_0x55d82d(0x8f)]);const _0xc9d4e7=Date[_0x55d82d(0x74)]();logger[_0x55d82d(0x8c)](_0x55d82d(0x9b),_0x55d82d(0x78),{'pageName':_0x576c48,'routePath':_0x424be,'file':this['routerFilePath']});try{const _0x2e0a80=await a65_0x3a194f[_0x55d82d(0x94)][_0x55d82d(0x76)](this[_0x55d82d(0x8f)],_0x55d82d(0x88)),_0x18bc4b=this['toComponentName'](_0x576c48),_0x3d8846=this[_0x55d82d(0x8b)](_0x2e0a80,_0x18bc4b,_0x576c48),_0x1fcaf2=this['addRoute'](_0x3d8846,_0x424be,_0x18bc4b);await a65_0x3a194f[_0x55d82d(0x94)][_0x55d82d(0x9a)](this[_0x55d82d(0x8f)],_0x1fcaf2,'utf8');const _0xaae57c=Date[_0x55d82d(0x74)]()-_0xc9d4e7;logger['success']('router',_0x55d82d(0x7d),_0xaae57c,{'pageName':_0x576c48,'routePath':_0x424be,'componentName':_0x18bc4b});}catch(_0x3b2dc2){const _0x5e2471=Date[_0x55d82d(0x74)]()-_0xc9d4e7;logger[_0x55d82d(0x90)](_0x55d82d(0x9b),_0x55d82d(0x73),{'pageName':_0x576c48,'routePath':_0x424be,'error':_0x3b2dc2 instanceof Error?_0x3b2dc2[_0x55d82d(0x84)]:String(_0x3b2dc2),'duration':_0x5e2471});throw _0x3b2dc2;}}[a65_0x593a3e(0x77)](_0xfdd01c){const _0x2c6475=a65_0x593a3e;return _0xfdd01c[_0x2c6475(0x89)]('-')['map'](_0x32e95e=>_0x32e95e[_0x2c6475(0x8a)](0x0)['toUpperCase']()+_0x32e95e[_0x2c6475(0x72)](0x1)[_0x2c6475(0x7b)]())[_0x2c6475(0x98)]('');}['addImport'](_0x47d000,_0x5da588,_0x16ee5e){const _0x5b4afc=a65_0x593a3e,_0x208c1f=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x7dfbdd=_0x47d000[_0x5b4afc(0x7f)](_0x208c1f)||[],_0xe16149=_0x5b4afc(0x81)+_0x5da588+_0x5b4afc(0x97)+_0x16ee5e+'\x22;';if(_0x47d000[_0x5b4afc(0x87)](_0xe16149))return _0x47d000;if(_0x7dfbdd[_0x5b4afc(0x9e)]>0x0){const _0x2fde4b=_0x7dfbdd[_0x7dfbdd['length']-0x1];if(_0x2fde4b){const _0x76aec5=_0x47d000[_0x5b4afc(0x86)](_0x2fde4b),_0x5cf95a=_0x76aec5+_0x2fde4b[_0x5b4afc(0x9e)];return _0x47d000[_0x5b4afc(0x72)](0x0,_0x5cf95a)+_0xe16149+'\x0a'+_0x47d000[_0x5b4afc(0x72)](_0x5cf95a);}}const _0xf58860=_0x47d000[_0x5b4afc(0x7f)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0xf58860&&_0xf58860[_0x5b4afc(0x85)]!==undefined){const _0x55b0a4=_0xf58860[_0x5b4afc(0x85)]+_0xf58860[0x0][_0x5b4afc(0x9e)];return _0x47d000[_0x5b4afc(0x72)](0x0,_0x55b0a4)+_0xe16149+'\x0a'+_0x47d000[_0x5b4afc(0x72)](_0x55b0a4);}return _0x47d000;}['addRoute'](_0x559080,_0x4a28bc,_0x319fe7){const _0x69e84d=a65_0x593a3e,_0x5c56d0='\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22'+_0x4a28bc+_0x69e84d(0x9f)+_0x319fe7+'\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},';if(_0x559080['includes'](_0x69e84d(0x91)+_0x4a28bc+'\x22'))return _0x559080;const _0x467cad=/children:\s*\[([\s\S]*?)\]/,_0x330255=_0x559080[_0x69e84d(0x7f)](_0x467cad);if(!_0x330255||_0x330255[_0x69e84d(0x85)]===undefined)throw new Error(_0x69e84d(0x9d));const _0x513936=_0x330255[0x1],_0x296901=_0x330255[_0x69e84d(0x85)]+_0x330255[0x0][_0x69e84d(0x92)]('[')+0x1,_0x48f8f5=_0x513936?.[_0x69e84d(0x7f)](/\{[\s\S]*?\},/g)||[];if(_0x48f8f5[_0x69e84d(0x9e)]>0x0){const _0x546e76=_0x48f8f5[_0x48f8f5[_0x69e84d(0x9e)]-0x1];if(_0x546e76){const _0x56b4a4=_0x559080[_0x69e84d(0x86)](_0x546e76),_0x3e8e06=_0x56b4a4+_0x546e76['length'];return _0x559080[_0x69e84d(0x72)](0x0,_0x3e8e06)+'\x0a'+_0x5c56d0+_0x559080['slice'](_0x3e8e06);}}return _0x559080[_0x69e84d(0x72)](0x0,_0x296901)+'\x0a'+_0x5c56d0+_0x559080['slice'](_0x296901);}async[a65_0x593a3e(0x75)](_0x5f25fe,_0x13f577){const _0x3230e8=a65_0x593a3e;if(!a65_0x3a194f[_0x3230e8(0x8e)](this[_0x3230e8(0x8f)]))throw new Error('路由文件不存在:\x20'+this[_0x3230e8(0x8f)]);const _0x14d8b0=await a65_0x3a194f['promises'][_0x3230e8(0x76)](this[_0x3230e8(0x8f)],_0x3230e8(0x88)),_0x6f1368=this[_0x3230e8(0x77)](_0x5f25fe);let _0x517eba=this[_0x3230e8(0x8b)](_0x14d8b0,_0x6f1368,_0x5f25fe);return _0x517eba=this[_0x3230e8(0x7a)](_0x517eba,_0x13f577,_0x6f1368),_0x517eba;}}
@@ -1 +1 @@
1
- export function sleep(_0x32345d){return new Promise(_0x40b03=>setTimeout(_0x40b03,_0x32345d));}
1
+ export function sleep(_0x49de81){return new Promise(_0x54edc2=>setTimeout(_0x54edc2,_0x49de81));}
@@ -1 +1 @@
1
- const a67_0x1cac4f=a67_0x202d;(function(_0x1d4123,_0x16f3aa){const _0xcf5ea7=a67_0x202d,_0x4842e4=_0x1d4123();while(!![]){try{const _0x3b3cae=parseInt(_0xcf5ea7(0xe8))/0x1+parseInt(_0xcf5ea7(0xb1))/0x2+-parseInt(_0xcf5ea7(0xd2))/0x3*(-parseInt(_0xcf5ea7(0xd1))/0x4)+parseInt(_0xcf5ea7(0xe5))/0x5+-parseInt(_0xcf5ea7(0xbd))/0x6*(parseInt(_0xcf5ea7(0xbe))/0x7)+-parseInt(_0xcf5ea7(0xc3))/0x8+-parseInt(_0xcf5ea7(0xce))/0x9;if(_0x3b3cae===_0x16f3aa)break;else _0x4842e4['push'](_0x4842e4['shift']());}catch(_0x521c72){_0x4842e4['push'](_0x4842e4['shift']());}}}(a67_0x4fb2,0xa8520));import a67_0x13d74c from'node:fs';import a67_0x339bf2 from'node:path';function a67_0x202d(_0x4fed04,_0x6aa1d2){_0x4fed04=_0x4fed04-0xae;const _0x4fb24c=a67_0x4fb2();let _0x202d7e=_0x4fb24c[_0x4fed04];return _0x202d7e;}function a67_0x4fb2(){const _0x3489b8=['1257402OORBsV','name:\x20\x22','.ts','tableName','../../package.json','readdir','join','isDirectory','default','toComponentName','version','replace','552tlmbMc','39550iEksga','name','map','error','.js','5774800umNRIS','tableName:\x20\x22','includes','writeFile','readFile','.css','processFile','numeric','replaceApiContent','slice','replaceContent','13794147MVAaXM','toUpperCase','split','15784Qfhxzd','753DGGWvc','extname','endsWith','toLocaleTimeString','模板内容替换失败','.json','.tsx','alias:\x20\x22','datasetCode','utf8','.tpl','promises','isFile','processTemplate','template','charAt','toLocaleString','message','mkdir','2768475WRieXU','模板内容替换完成','toLowerCase','1290931DtVQYp','.jsx','processDirectory','copyFile','\x20},','toDisplayTitle','datasetCode:\x20\x22','alias','info','开始处理模板内容替换','2-digit','api','now','\x0a\x20\x20\x20\x20{\x20'];a67_0x4fb2=function(){return _0x3489b8;};return a67_0x4fb2();}import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a67_0x1cac4f(0xb5))[a67_0x1cac4f(0xbb)];export class TemplateReplacer{static[a67_0x1cac4f(0xba)](_0x4f9704){const _0x261024=a67_0x1cac4f,_0x50ba6f=_0x4f9704[_0x261024(0xd0)]('/')['pop']()||_0x4f9704;return _0x50ba6f[_0x261024(0xd0)]('-')[_0x261024(0xc0)](_0xbe745b=>_0xbe745b['charAt'](0x0)[_0x261024(0xcf)]()+_0xbe745b[_0x261024(0xcc)](0x1)[_0x261024(0xe7)]())[_0x261024(0xb7)]('');}static[a67_0x1cac4f(0xed)](_0x10345c){const _0x5e8fa9=a67_0x1cac4f,_0x2ba814=_0x10345c[_0x5e8fa9(0xd0)]('/')['pop']()||_0x10345c;return _0x2ba814['split']('-')[_0x5e8fa9(0xc0)](_0x222995=>_0x222995[_0x5e8fa9(0xe1)](0x0)['toUpperCase']()+_0x222995[_0x5e8fa9(0xcc)](0x1)[_0x5e8fa9(0xe7)]())['join']('\x20');}static[a67_0x1cac4f(0xcd)](_0xc09c9d,_0x67b7eb,_0x1e12d4){const _0x36530d=a67_0x1cac4f,_0x55481b=this[_0x36530d(0xba)](_0x67b7eb),_0x397b84=this[_0x36530d(0xed)](_0x67b7eb),_0x4c27cf=new Date(),_0x111d7c=_0x4c27cf[_0x36530d(0xe2)](undefined,{'year':'numeric','month':_0x36530d(0xf2),'day':_0x36530d(0xf2),'hour':_0x36530d(0xf2),'minute':'2-digit','second':_0x36530d(0xf2),'hour12':![]})['replace'](/\//g,'-'),_0x214753=_0x4c27cf['toLocaleDateString'](undefined,{'year':_0x36530d(0xca),'month':_0x36530d(0xf2),'day':'2-digit'})['replace'](/\//g,'-'),_0x1f0b40=_0x4c27cf[_0x36530d(0xd5)](undefined,{'hour12':![]});let _0x57277d=_0xc09c9d[_0x36530d(0xbc)](/\{CliVersion\}/g,CLI_VERSION)[_0x36530d(0xbc)](/\{ComponentName\}/g,_0x55481b)['replace'](/\{DisplayTitle\}/g,_0x397b84)[_0x36530d(0xbc)](/\{PageName\}/g,_0x67b7eb)[_0x36530d(0xbc)](/\{TemplateName\}/g,_0x1e12d4)[_0x36530d(0xbc)](/\{CreatedAt\}/g,_0x111d7c)['replace'](/\{CreatedDate\}/g,_0x214753)[_0x36530d(0xbc)](/\{CreatedTime\}/g,_0x1f0b40);return _0x57277d;}static[a67_0x1cac4f(0xcb)](_0x1b0012,_0x23dd6c,_0x4c5ab5,_0x142f9c,_0x486cf1,_0x35745f,_0x4762e6){const _0x4830da=a67_0x1cac4f,_0xd62886=new Date(),_0x4b1c5=_0xd62886['toISOString'](),_0x33deb0=_0x4c5ab5[_0x4830da(0xc0)](_0x4d57e9=>{const _0x19b0c6=_0x4830da,_0x1bcc43=[_0x19b0c6(0xee)+_0x4d57e9[_0x19b0c6(0xda)]+'\x22',_0x19b0c6(0xc4)+_0x4d57e9[_0x19b0c6(0xb4)]+'\x22',_0x19b0c6(0xb2)+_0x4d57e9[_0x19b0c6(0xbf)]+'\x22'];return _0x4d57e9[_0x19b0c6(0xef)]&&_0x1bcc43['push'](_0x19b0c6(0xd9)+_0x4d57e9[_0x19b0c6(0xef)]+'\x22'),_0x19b0c6(0xb0)+_0x1bcc43[_0x19b0c6(0xb7)](',\x20')+_0x19b0c6(0xec);})[_0x4830da(0xb7)](''),_0x453008=_0x142f9c||_0x4c5ab5[0x0]?.[_0x4830da(0xef)]||'YourModel';let _0x23268b=_0x1b0012[_0x4830da(0xbc)](/\{AppCode\}/g,_0x23dd6c)[_0x4830da(0xbc)](/\{ModelConfigs\}/g,_0x33deb0)['replace'](/\{ExampleModelName\}/g,_0x453008)['replace'](/\{ApiFileName\}/g,_0x486cf1||_0x4830da(0xae))[_0x4830da(0xbc)](/\{ConfigName\}/g,_0x35745f||_0x4830da(0xb9))['replace'](/\{ClientConfigParam\}/g,_0x4762e6||'')[_0x4830da(0xbc)](/\{CreatedAt\}/g,_0x4b1c5);return _0x23268b;}static async[a67_0x1cac4f(0xdf)](_0x307763,_0x490e7b,_0x54bb92,_0x30b448,_0x1e50eb=!![]){const _0x2b2be3=a67_0x1cac4f,_0x908c3a=Date[_0x2b2be3(0xaf)]();try{_0x1e50eb&&logger[_0x2b2be3(0xf0)](_0x2b2be3(0xe0),_0x2b2be3(0xf1),{'templatePath':_0x307763,'targetPath':_0x490e7b,'pageName':_0x54bb92,'templateName':_0x30b448});await a67_0x13d74c[_0x2b2be3(0xdd)]['mkdir'](_0x490e7b,{'recursive':!![]}),await this[_0x2b2be3(0xea)](_0x307763,_0x490e7b,_0x54bb92,_0x30b448);if(_0x1e50eb){const _0xbd1c0a=Date[_0x2b2be3(0xaf)]()-_0x908c3a;logger['success'](_0x2b2be3(0xe0),_0x2b2be3(0xe6),_0xbd1c0a,{'pageName':_0x54bb92,'templateName':_0x30b448});}}catch(_0x2fff82){if(_0x1e50eb){const _0x4b0c48=Date[_0x2b2be3(0xaf)]()-_0x908c3a;logger[_0x2b2be3(0xc1)](_0x2b2be3(0xe0),_0x2b2be3(0xd6),{'templatePath':_0x307763,'targetPath':_0x490e7b,'pageName':_0x54bb92,'templateName':_0x30b448,'error':_0x2fff82 instanceof Error?_0x2fff82[_0x2b2be3(0xe3)]:String(_0x2fff82),'duration':_0x4b0c48});}throw _0x2fff82;}}static async[a67_0x1cac4f(0xea)](_0x184d6a,_0x2be10a,_0x996f13,_0x156998){const _0x590dbd=a67_0x1cac4f,_0x43d096=await a67_0x13d74c['promises'][_0x590dbd(0xb6)](_0x184d6a,{'withFileTypes':!![]});for(const _0x363120 of _0x43d096){const _0x25600e=a67_0x339bf2[_0x590dbd(0xb7)](_0x184d6a,_0x363120[_0x590dbd(0xbf)]);let _0x255350=a67_0x339bf2[_0x590dbd(0xb7)](_0x2be10a,_0x363120[_0x590dbd(0xbf)]);_0x363120[_0x590dbd(0xbf)][_0x590dbd(0xd4)](_0x590dbd(0xdc))&&(_0x255350=a67_0x339bf2[_0x590dbd(0xb7)](_0x2be10a,_0x363120[_0x590dbd(0xbf)][_0x590dbd(0xbc)](/\.tpl$/,'')));if(_0x363120[_0x590dbd(0xb8)]())await a67_0x13d74c['promises'][_0x590dbd(0xe4)](_0x255350,{'recursive':!![]}),await this['processDirectory'](_0x25600e,_0x255350,_0x996f13,_0x156998);else _0x363120[_0x590dbd(0xde)]()&&await this[_0x590dbd(0xc9)](_0x25600e,_0x255350,_0x996f13,_0x156998);}}static async[a67_0x1cac4f(0xc9)](_0x2b9696,_0x4babd4,_0x4837df,_0x18643d){const _0x2d3c48=a67_0x1cac4f,_0x184516=a67_0x339bf2[_0x2d3c48(0xd3)](_0x2b9696)['toLowerCase']();_0x2b9696['endsWith']('.tpl')&&(_0x4babd4=_0x4babd4[_0x2d3c48(0xbc)](/\.tpl$/,''));const _0x17de2e=[_0x2d3c48(0xd8),_0x2d3c48(0xb3),_0x2d3c48(0xe9),_0x2d3c48(0xc2),_0x2d3c48(0xd7),'.md',_0x2d3c48(0xc8),'.scss',_0x2d3c48(0xdc)];if(_0x17de2e[_0x2d3c48(0xc5)](_0x184516)||_0x2b9696['endsWith'](_0x2d3c48(0xdc))){const _0x8f39a4=await a67_0x13d74c['promises'][_0x2d3c48(0xc7)](_0x2b9696,'utf8'),_0x2c33e7=this[_0x2d3c48(0xcd)](_0x8f39a4,_0x4837df,_0x18643d);await a67_0x13d74c[_0x2d3c48(0xdd)][_0x2d3c48(0xc6)](_0x4babd4,_0x2c33e7,_0x2d3c48(0xdb));}else await a67_0x13d74c[_0x2d3c48(0xdd)][_0x2d3c48(0xeb)](_0x2b9696,_0x4babd4);}}
1
+ const a67_0x4d5938=a67_0x518b;function a67_0x5752(){const _0x5d9c1d=['success','processDirectory','toLocaleTimeString','.scss','name','902334TVajNJ','utf8','datasetCode:\x20\x22','.css','toDisplayTitle','.js','5017560HbYYVM','\x0a\x20\x20\x20\x20{\x20','extname','335WnTFcY','info','numeric','pop','api','tableName:\x20\x22','106680Hsmsqe','version','mkdir','map','9392aQwFQi','alias','.tpl','template','toComponentName','.json','toLowerCase','name:\x20\x22','isFile','6ilnRGV','processFile','now','11115KaIwEn','YourModel','readdir','5957532hnngwy','.jsx','datasetCode','endsWith','toLocaleDateString','processTemplate','charAt','toUpperCase','default','16969579fdhIGb','toISOString','split','1355712zRhrkF','replaceContent','slice','join','isDirectory','promises','\x20},','2-digit','2qDtCko','alias:\x20\x22','replace'];a67_0x5752=function(){return _0x5d9c1d;};return a67_0x5752();}function a67_0x518b(_0x486882,_0x3e339c){_0x486882=_0x486882-0x188;const _0x5752ea=a67_0x5752();let _0x518bc9=_0x5752ea[_0x486882];return _0x518bc9;}(function(_0xae1919,_0x4ebb2d){const _0x4b0f74=a67_0x518b,_0x3f34dc=_0xae1919();while(!![]){try{const _0x4acaf8=-parseInt(_0x4b0f74(0x1a0))/0x1+-parseInt(_0x4b0f74(0x1a8))/0x2*(-parseInt(_0x4b0f74(0x1b0))/0x3)+-parseInt(_0x4b0f74(0x1bf))/0x4*(-parseInt(_0x4b0f74(0x1b9))/0x5)+parseInt(_0x4b0f74(0x18e))/0x6*(parseInt(_0x4b0f74(0x194))/0x7)+-parseInt(_0x4b0f74(0x1c3))/0x8*(-parseInt(_0x4b0f74(0x191))/0x9)+-parseInt(_0x4b0f74(0x1b6))/0xa+-parseInt(_0x4b0f74(0x19d))/0xb;if(_0x4acaf8===_0x4ebb2d)break;else _0x3f34dc['push'](_0x3f34dc['shift']());}catch(_0x50cb20){_0x3f34dc['push'](_0x3f34dc['shift']());}}}(a67_0x5752,0xf153d));import a67_0x1ef214 from'node:fs';import a67_0x4569ea from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require('../../package.json')[a67_0x4d5938(0x1c0)];export class TemplateReplacer{static[a67_0x4d5938(0x189)](_0x1660b4){const _0x1d8208=a67_0x4d5938,_0x5c2dd6=_0x1660b4[_0x1d8208(0x19f)]('/')[_0x1d8208(0x1bc)]()||_0x1660b4;return _0x5c2dd6[_0x1d8208(0x19f)]('-')[_0x1d8208(0x1c2)](_0x359774=>_0x359774['charAt'](0x0)['toUpperCase']()+_0x359774[_0x1d8208(0x1a2)](0x1)[_0x1d8208(0x18b)]())[_0x1d8208(0x1a3)]('');}static[a67_0x4d5938(0x1b4)](_0x979c8a){const _0x595dcb=a67_0x4d5938,_0x2c3943=_0x979c8a['split']('/')[_0x595dcb(0x1bc)]()||_0x979c8a;return _0x2c3943['split']('-')[_0x595dcb(0x1c2)](_0x5113ca=>_0x5113ca[_0x595dcb(0x19a)](0x0)[_0x595dcb(0x19b)]()+_0x5113ca['slice'](0x1)[_0x595dcb(0x18b)]())[_0x595dcb(0x1a3)]('\x20');}static['replaceContent'](_0x19b416,_0x41a5d6,_0x3438c3){const _0x2906f1=a67_0x4d5938,_0x49c648=this[_0x2906f1(0x189)](_0x41a5d6),_0x3deb6c=this[_0x2906f1(0x1b4)](_0x41a5d6),_0x30beae=new Date(),_0x352a1a=_0x30beae['toLocaleString'](undefined,{'year':_0x2906f1(0x1bb),'month':_0x2906f1(0x1a7),'day':_0x2906f1(0x1a7),'hour':_0x2906f1(0x1a7),'minute':_0x2906f1(0x1a7),'second':_0x2906f1(0x1a7),'hour12':![]})[_0x2906f1(0x1aa)](/\//g,'-'),_0x327d7b=_0x30beae[_0x2906f1(0x198)](undefined,{'year':'numeric','month':_0x2906f1(0x1a7),'day':'2-digit'})[_0x2906f1(0x1aa)](/\//g,'-'),_0x4d226e=_0x30beae[_0x2906f1(0x1ad)](undefined,{'hour12':![]});let _0x21eeca=_0x19b416[_0x2906f1(0x1aa)](/\{CliVersion\}/g,CLI_VERSION)[_0x2906f1(0x1aa)](/\{ComponentName\}/g,_0x49c648)[_0x2906f1(0x1aa)](/\{DisplayTitle\}/g,_0x3deb6c)[_0x2906f1(0x1aa)](/\{PageName\}/g,_0x41a5d6)[_0x2906f1(0x1aa)](/\{TemplateName\}/g,_0x3438c3)[_0x2906f1(0x1aa)](/\{CreatedAt\}/g,_0x352a1a)[_0x2906f1(0x1aa)](/\{CreatedDate\}/g,_0x327d7b)[_0x2906f1(0x1aa)](/\{CreatedTime\}/g,_0x4d226e);return _0x21eeca;}static['replaceApiContent'](_0x25ab33,_0x26967c,_0x462fda,_0x15d1d4,_0x43bf98,_0x4a9098,_0x884cf3){const _0x1d0ab5=a67_0x4d5938,_0x498108=new Date(),_0x2b9aff=_0x498108[_0x1d0ab5(0x19e)](),_0x587c50=_0x462fda['map'](_0x117f2b=>{const _0x111acd=_0x1d0ab5,_0x3ed05f=[_0x111acd(0x1b2)+_0x117f2b[_0x111acd(0x196)]+'\x22',_0x111acd(0x1be)+_0x117f2b['tableName']+'\x22',_0x111acd(0x18c)+_0x117f2b[_0x111acd(0x1af)]+'\x22'];return _0x117f2b['alias']&&_0x3ed05f['push'](_0x111acd(0x1a9)+_0x117f2b[_0x111acd(0x1c4)]+'\x22'),_0x111acd(0x1b7)+_0x3ed05f[_0x111acd(0x1a3)](',\x20')+_0x111acd(0x1a6);})[_0x1d0ab5(0x1a3)](''),_0x33e6b3=_0x15d1d4||_0x462fda[0x0]?.[_0x1d0ab5(0x1c4)]||_0x1d0ab5(0x192);let _0x2ee52d=_0x25ab33[_0x1d0ab5(0x1aa)](/\{AppCode\}/g,_0x26967c)[_0x1d0ab5(0x1aa)](/\{ModelConfigs\}/g,_0x587c50)[_0x1d0ab5(0x1aa)](/\{ExampleModelName\}/g,_0x33e6b3)[_0x1d0ab5(0x1aa)](/\{ApiFileName\}/g,_0x43bf98||_0x1d0ab5(0x1bd))[_0x1d0ab5(0x1aa)](/\{ConfigName\}/g,_0x4a9098||_0x1d0ab5(0x19c))['replace'](/\{ClientConfigParam\}/g,_0x884cf3||'')[_0x1d0ab5(0x1aa)](/\{CreatedAt\}/g,_0x2b9aff);return _0x2ee52d;}static async[a67_0x4d5938(0x199)](_0x270eeb,_0x1bd18e,_0x2ad467,_0x429a07,_0x5ad26a=!![]){const _0x32c14c=a67_0x4d5938,_0x46db20=Date['now']();try{_0x5ad26a&&logger[_0x32c14c(0x1ba)](_0x32c14c(0x188),'开始处理模板内容替换',{'templatePath':_0x270eeb,'targetPath':_0x1bd18e,'pageName':_0x2ad467,'templateName':_0x429a07});await a67_0x1ef214[_0x32c14c(0x1a5)][_0x32c14c(0x1c1)](_0x1bd18e,{'recursive':!![]}),await this[_0x32c14c(0x1ac)](_0x270eeb,_0x1bd18e,_0x2ad467,_0x429a07);if(_0x5ad26a){const _0x10ad78=Date[_0x32c14c(0x190)]()-_0x46db20;logger[_0x32c14c(0x1ab)]('template','模板内容替换完成',_0x10ad78,{'pageName':_0x2ad467,'templateName':_0x429a07});}}catch(_0x4c3072){if(_0x5ad26a){const _0x264b8c=Date['now']()-_0x46db20;logger['error'](_0x32c14c(0x188),'模板内容替换失败',{'templatePath':_0x270eeb,'targetPath':_0x1bd18e,'pageName':_0x2ad467,'templateName':_0x429a07,'error':_0x4c3072 instanceof Error?_0x4c3072['message']:String(_0x4c3072),'duration':_0x264b8c});}throw _0x4c3072;}}static async[a67_0x4d5938(0x1ac)](_0x24e2b7,_0x2f69e1,_0x2c1e71,_0xd1bce6){const _0x1afdd8=a67_0x4d5938,_0x3f9186=await a67_0x1ef214[_0x1afdd8(0x1a5)][_0x1afdd8(0x193)](_0x24e2b7,{'withFileTypes':!![]});for(const _0x3183a3 of _0x3f9186){const _0x5cf19a=a67_0x4569ea[_0x1afdd8(0x1a3)](_0x24e2b7,_0x3183a3[_0x1afdd8(0x1af)]);let _0x4fcf0f=a67_0x4569ea['join'](_0x2f69e1,_0x3183a3[_0x1afdd8(0x1af)]);_0x3183a3['name'][_0x1afdd8(0x197)](_0x1afdd8(0x1c5))&&(_0x4fcf0f=a67_0x4569ea[_0x1afdd8(0x1a3)](_0x2f69e1,_0x3183a3[_0x1afdd8(0x1af)]['replace'](/\.tpl$/,'')));if(_0x3183a3[_0x1afdd8(0x1a4)]())await a67_0x1ef214[_0x1afdd8(0x1a5)][_0x1afdd8(0x1c1)](_0x4fcf0f,{'recursive':!![]}),await this[_0x1afdd8(0x1ac)](_0x5cf19a,_0x4fcf0f,_0x2c1e71,_0xd1bce6);else _0x3183a3[_0x1afdd8(0x18d)]()&&await this[_0x1afdd8(0x18f)](_0x5cf19a,_0x4fcf0f,_0x2c1e71,_0xd1bce6);}}static async[a67_0x4d5938(0x18f)](_0x5c6cfa,_0x5ecbf1,_0x201766,_0x5808d2){const _0xb76a3e=a67_0x4d5938,_0x593945=a67_0x4569ea[_0xb76a3e(0x1b8)](_0x5c6cfa)['toLowerCase']();_0x5c6cfa[_0xb76a3e(0x197)](_0xb76a3e(0x1c5))&&(_0x5ecbf1=_0x5ecbf1['replace'](/\.tpl$/,''));const _0x37759f=['.tsx','.ts',_0xb76a3e(0x195),_0xb76a3e(0x1b5),_0xb76a3e(0x18a),'.md',_0xb76a3e(0x1b3),_0xb76a3e(0x1ae),_0xb76a3e(0x1c5)];if(_0x37759f['includes'](_0x593945)||_0x5c6cfa[_0xb76a3e(0x197)](_0xb76a3e(0x1c5))){const _0x2efde5=await a67_0x1ef214[_0xb76a3e(0x1a5)]['readFile'](_0x5c6cfa,_0xb76a3e(0x1b1)),_0x547373=this[_0xb76a3e(0x1a1)](_0x2efde5,_0x201766,_0x5808d2);await a67_0x1ef214[_0xb76a3e(0x1a5)]['writeFile'](_0x5ecbf1,_0x547373,_0xb76a3e(0x1b1));}else await a67_0x1ef214[_0xb76a3e(0x1a5)]['copyFile'](_0x5c6cfa,_0x5ecbf1);}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.2.5-beta.3",
3
+ "version": "1.2.5-beta.5",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"