@lovrabet/cli 1.1.6 → 1.1.8

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 (45) hide show
  1. package/LICENSE +45 -0
  2. package/README.md +85 -4
  3. package/lib/add-page/input-page-router.js +1 -1
  4. package/lib/add-page/main.js +1 -1
  5. package/lib/add-page/select-page-template.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/format-dataset.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/api/pull.js +1 -1
  12. package/lib/auth/auth-server-ui.js +1 -1
  13. package/lib/auth/auth-server.js +1 -1
  14. package/lib/auth/constant.js +1 -1
  15. package/lib/auth/get-cookie.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli.js +1 -1
  19. package/lib/cmd/build-watch.js +1 -1
  20. package/lib/cmd/build.js +1 -1
  21. package/lib/cmd/logs.js +1 -1
  22. package/lib/cmd/preview.js +1 -1
  23. package/lib/cmd/start.js +1 -1
  24. package/lib/config/config-help.js +1 -1
  25. package/lib/config/main.js +1 -1
  26. package/lib/constant/domain.js +1 -1
  27. package/lib/constant/env.js +1 -1
  28. package/lib/create-app/enhanced-guided-create.js +1 -1
  29. package/lib/create-app/format-elapsed.js +1 -1
  30. package/lib/create-app/main.js +1 -1
  31. package/lib/create-app/task-finished.js +1 -1
  32. package/lib/create-app/task-loading.js +1 -1
  33. package/lib/create-app/task-running.js +1 -1
  34. package/lib/create-app/task-time.js +1 -1
  35. package/lib/create-app/use-copy-project-template.js +1 -1
  36. package/lib/create-app/use-format-code.js +1 -1
  37. package/lib/create-app/use-install-dependencies.js +1 -1
  38. package/lib/help.js +1 -1
  39. package/lib/utils/config.js +1 -1
  40. package/lib/utils/copy-directory.js +1 -1
  41. package/lib/utils/http-client.js +1 -1
  42. package/lib/utils/logger.js +1 -1
  43. package/lib/utils/router-updater.js +1 -1
  44. package/lib/utils/template-replacer.js +1 -1
  45. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x56f97e,_0x47e1d7){var _0x536031=a30_0x439d,_0x3642d9=_0x56f97e();while(!![]){try{var _0x319fa7=parseInt(_0x536031(0xdc))/0x1+parseInt(_0x536031(0xe0))/0x2+-parseInt(_0x536031(0xdd))/0x3+-parseInt(_0x536031(0xd9))/0x4*(-parseInt(_0x536031(0xd6))/0x5)+parseInt(_0x536031(0xdb))/0x6*(parseInt(_0x536031(0xe1))/0x7)+-parseInt(_0x536031(0xe2))/0x8*(parseInt(_0x536031(0xdf))/0x9)+parseInt(_0x536031(0xda))/0xa*(-parseInt(_0x536031(0xde))/0xb);if(_0x319fa7===_0x47e1d7)break;else _0x3642d9['push'](_0x3642d9['shift']());}catch(_0xc2f51e){_0x3642d9['push'](_0x3642d9['shift']());}}}(a30_0xc6b2,0x33c95));import{jsx as a30_0x15f856,jsxs as a30_0x23e384}from'react/jsx-runtime';import{Text}from'ink';import a30_0x35bffa from'ink-spinner';function a30_0x439d(_0x403d9a,_0x1d317f){var _0xc6b2e=a30_0xc6b2();return a30_0x439d=function(_0x439db4,_0x31c8f3){_0x439db4=_0x439db4-0xd6;var _0x3c2f6a=_0xc6b2e[_0x439db4];return _0x3c2f6a;},a30_0x439d(_0x403d9a,_0x1d317f);}export function TaskLoading(_0x4d7c34){var _0x36a52b=a30_0x439d;if(_0x4d7c34[_0x36a52b(0xe3)])return a30_0x15f856(Text,{'color':_0x36a52b(0xd7),'children':'\x20√\x20'});if(_0x4d7c34[_0x36a52b(0xd8)])return a30_0x23e384(Text,{'color':_0x36a52b(0xd7),'children':['\x20',a30_0x15f856(a30_0x35bffa,{'type':_0x36a52b(0xe5)}),'\x20']});return a30_0x15f856(Text,{'children':_0x36a52b(0xe4)});}function a30_0xc6b2(){var _0x1481c6=['27ZHMbFk','828378qILyCg','7JHdKyS','89944XZhqql','finished','\x20\x20\x20','dots','725Fnorrd','green','loading','10412QmiQsh','150jzHerI','274938OwCRtn','257086UbBqrc','894696FRABuM','403667InrJXY'];a30_0xc6b2=function(){return _0x1481c6;};return a30_0xc6b2();}
1
+ (function(_0x2d1acf,_0x103600){var _0x13e05c=a30_0x2842,_0x18315c=_0x2d1acf();while(!![]){try{var _0x3251d4=parseInt(_0x13e05c(0xc2))/0x1+parseInt(_0x13e05c(0xba))/0x2+parseInt(_0x13e05c(0xc3))/0x3+-parseInt(_0x13e05c(0xc0))/0x4*(-parseInt(_0x13e05c(0xb8))/0x5)+parseInt(_0x13e05c(0xb6))/0x6*(parseInt(_0x13e05c(0xb7))/0x7)+-parseInt(_0x13e05c(0xbe))/0x8*(parseInt(_0x13e05c(0xc5))/0x9)+parseInt(_0x13e05c(0xc4))/0xa*(-parseInt(_0x13e05c(0xbf))/0xb);if(_0x3251d4===_0x103600)break;else _0x18315c['push'](_0x18315c['shift']());}catch(_0x50d874){_0x18315c['push'](_0x18315c['shift']());}}}(a30_0x58bc,0xdbd70));import{jsx as a30_0x4ab563,jsxs as a30_0x2409a5}from'react/jsx-runtime';function a30_0x58bc(){var _0x5317c6=['dots','72CeJqfL','137621gARajI','78212rIYFGm','\x20\x20\x20','86860VZjIeM','4295511cEGIEe','1030klUCNK','1516329jNvhPE','4638CTPpdt','511QhpqCz','225OFcVLE','green','2500830NTNFLr','loading','finished'];a30_0x58bc=function(){return _0x5317c6;};return a30_0x58bc();}import{Text}from'ink';import a30_0x18183d from'ink-spinner';function a30_0x2842(_0x3b2b4a,_0x5730a5){var _0x58bcad=a30_0x58bc();return a30_0x2842=function(_0x2842ae,_0x11f5bc){_0x2842ae=_0x2842ae-0xb6;var _0x5354f4=_0x58bcad[_0x2842ae];return _0x5354f4;},a30_0x2842(_0x3b2b4a,_0x5730a5);}export function TaskLoading(_0x249dac){var _0x1c1204=a30_0x2842;if(_0x249dac[_0x1c1204(0xbc)])return a30_0x4ab563(Text,{'color':_0x1c1204(0xb9),'children':'\x20√\x20'});if(_0x249dac[_0x1c1204(0xbb)])return a30_0x2409a5(Text,{'color':_0x1c1204(0xb9),'children':['\x20',a30_0x4ab563(a30_0x18183d,{'type':_0x1c1204(0xbd)}),'\x20']});return a30_0x4ab563(Text,{'children':_0x1c1204(0xc1)});}
@@ -1 +1 @@
1
- (function(_0x4a2c4b,_0x562d34){var _0xd15aec=a31_0xa48e,_0x14cf34=_0x4a2c4b();while(!![]){try{var _0x445942=parseInt(_0xd15aec(0xb6))/0x1+-parseInt(_0xd15aec(0xb0))/0x2*(-parseInt(_0xd15aec(0xae))/0x3)+parseInt(_0xd15aec(0xb5))/0x4+-parseInt(_0xd15aec(0xb1))/0x5+-parseInt(_0xd15aec(0xb2))/0x6*(-parseInt(_0xd15aec(0xad))/0x7)+-parseInt(_0xd15aec(0xaf))/0x8*(parseInt(_0xd15aec(0xb8))/0x9)+-parseInt(_0xd15aec(0xb4))/0xa;if(_0x445942===_0x562d34)break;else _0x14cf34['push'](_0x14cf34['shift']());}catch(_0x5c1323){_0x14cf34['push'](_0x14cf34['shift']());}}}(a31_0x48fa,0x6279c));function a31_0xa48e(_0x475d77,_0x2360bb){var _0x48fac8=a31_0x48fa();return a31_0xa48e=function(_0xa48ee3,_0x39bd6a){_0xa48ee3=_0xa48ee3-0xad;var _0x8b72ce=_0x48fac8[_0xa48ee3];return _0x8b72ce;},a31_0xa48e(_0x475d77,_0x2360bb);}import{jsx as a31_0x2fde7d,jsxs as a31_0x3ae304}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a31_0x48fa(){var _0x1c0a0c=['10938780VoGsxk','2794520pkgALT','668418ZlXmXr','taskName','27aLjjSd','38423NDxHqf','12216IjPQle','1741808PpbfYf','276oUsxFo','1500135kBEdwi','570ngqiPT','elapsed'];a31_0x48fa=function(){return _0x1c0a0c;};return a31_0x48fa();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x1b96d3){var _0x901f0f=a31_0xa48e;return a31_0x3ae304(Box,{'children':[a31_0x2fde7d(Box,{'width':'1'}),a31_0x2fde7d(TaskLoading,{..._0x1b96d3}),a31_0x2fde7d(Text,{'children':_0x1b96d3[_0x901f0f(0xb7)]}),a31_0x2fde7d(TaskTime,{'elapsed':_0x1b96d3[_0x901f0f(0xb3)]})]});}
1
+ function a31_0x7fe6(_0x481d01,_0x5d7899){var _0x6b221f=a31_0x6b22();return a31_0x7fe6=function(_0x7fe6c6,_0x336564){_0x7fe6c6=_0x7fe6c6-0xf7;var _0x1d8746=_0x6b221f[_0x7fe6c6];return _0x1d8746;},a31_0x7fe6(_0x481d01,_0x5d7899);}(function(_0x3b44df,_0x58f35b){var _0x3dc317=a31_0x7fe6,_0x324280=_0x3b44df();while(!![]){try{var _0x4ca32a=parseInt(_0x3dc317(0x100))/0x1+parseInt(_0x3dc317(0x101))/0x2*(parseInt(_0x3dc317(0xf9))/0x3)+-parseInt(_0x3dc317(0xfd))/0x4+parseInt(_0x3dc317(0xf8))/0x5*(-parseInt(_0x3dc317(0xfc))/0x6)+-parseInt(_0x3dc317(0xfb))/0x7*(-parseInt(_0x3dc317(0xf7))/0x8)+-parseInt(_0x3dc317(0xfe))/0x9+parseInt(_0x3dc317(0xff))/0xa;if(_0x4ca32a===_0x58f35b)break;else _0x324280['push'](_0x324280['shift']());}catch(_0x37cd1c){_0x324280['push'](_0x324280['shift']());}}}(a31_0x6b22,0xe7881));import{jsx as a31_0x4be461,jsxs as a31_0x24eedf}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a31_0x6b22(){var _0x435494=['19406510JlzYlY','601788AiQbpu','38046caoHiz','32wAKrKP','15zPDnvI','123ABWIlM','elapsed','1735622QqncvR','981126sHaiji','4442788nQCaoC','15880977BrRUfC'];a31_0x6b22=function(){return _0x435494;};return a31_0x6b22();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x36e265){var _0x3bc01d=a31_0x7fe6;return a31_0x24eedf(Box,{'children':[a31_0x4be461(Box,{'width':'1'}),a31_0x4be461(TaskLoading,{..._0x36e265}),a31_0x4be461(Text,{'children':_0x36e265['taskName']}),a31_0x4be461(TaskTime,{'elapsed':_0x36e265[_0x3bc01d(0xfa)]})]});}
@@ -1 +1 @@
1
- (function(_0x50091d,_0x19442a){var _0x397b4b=a32_0x271e,_0x31f224=_0x50091d();while(!![]){try{var _0x268498=parseInt(_0x397b4b(0x190))/0x1*(-parseInt(_0x397b4b(0x194))/0x2)+-parseInt(_0x397b4b(0x195))/0x3*(parseInt(_0x397b4b(0x18f))/0x4)+parseInt(_0x397b4b(0x193))/0x5+-parseInt(_0x397b4b(0x198))/0x6+parseInt(_0x397b4b(0x192))/0x7*(-parseInt(_0x397b4b(0x197))/0x8)+-parseInt(_0x397b4b(0x196))/0x9+parseInt(_0x397b4b(0x18e))/0xa;if(_0x268498===_0x19442a)break;else _0x31f224['push'](_0x31f224['shift']());}catch(_0x3f8a50){_0x31f224['push'](_0x31f224['shift']());}}}(a32_0x31dd,0xaf301));import{jsx as a32_0x1bbc4f,Fragment as a32_0x51a549,jsxs as a32_0x422097}from'react/jsx-runtime';function a32_0x271e(_0x1026cf,_0x4203ef){var _0x31dd8b=a32_0x31dd();return a32_0x271e=function(_0x271ef5,_0x3638d5){_0x271ef5=_0x271ef5-0x18e;var _0x2a9899=_0x31dd8b[_0x271ef5];return _0x2a9899;},a32_0x271e(_0x1026cf,_0x4203ef);}import{Text}from'ink';function a32_0x31dd(){var _0x1beb32=['2105268fIoVdW','elapsed','43272810TBhFvx','1129748vWpYBj','31813OckypJ','gray','149898ghqGmA','1086460kFEGcS','14aIcoPW','15SGzWOL','8284032ZfGGgi','344RMOJqr'];a32_0x31dd=function(){return _0x1beb32;};return a32_0x31dd();}export function TaskTime(_0x4127e2){var _0x503a2b=a32_0x271e;if(_0x4127e2[_0x503a2b(0x199)])return a32_0x422097(a32_0x51a549,{'children':[a32_0x1bbc4f(Text,{'color':_0x503a2b(0x191),'children':'\x20['}),a32_0x1bbc4f(Text,{'color':_0x503a2b(0x191),'bold':!![],'children':_0x4127e2['elapsed']}),a32_0x1bbc4f(Text,{'color':'gray','children':']'})]});return null;}
1
+ (function(_0x1a6715,_0x32c511){var _0x157924=a32_0x4293,_0x3a8324=_0x1a6715();while(!![]){try{var _0x391675=-parseInt(_0x157924(0x16e))/0x1+parseInt(_0x157924(0x16a))/0x2+-parseInt(_0x157924(0x162))/0x3*(-parseInt(_0x157924(0x163))/0x4)+-parseInt(_0x157924(0x166))/0x5*(-parseInt(_0x157924(0x165))/0x6)+-parseInt(_0x157924(0x16f))/0x7*(parseInt(_0x157924(0x164))/0x8)+parseInt(_0x157924(0x16c))/0x9*(parseInt(_0x157924(0x16b))/0xa)+-parseInt(_0x157924(0x168))/0xb*(parseInt(_0x157924(0x169))/0xc);if(_0x391675===_0x32c511)break;else _0x3a8324['push'](_0x3a8324['shift']());}catch(_0x27abd6){_0x3a8324['push'](_0x3a8324['shift']());}}}(a32_0x1b61,0x31b6d));import{jsx as a32_0x373f03,Fragment as a32_0x5e617f,jsxs as a32_0x229be1}from'react/jsx-runtime';import{Text}from'ink';function a32_0x4293(_0x128833,_0x562b80){var _0x1b616c=a32_0x1b61();return a32_0x4293=function(_0x42935e,_0x194d42){_0x42935e=_0x42935e-0x162;var _0x5a1596=_0x1b616c[_0x42935e];return _0x5a1596;},a32_0x4293(_0x128833,_0x562b80);}function a32_0x1b61(){var _0x247821=['520390rQdtQF','511430AfBQgn','9KJwMQp','elapsed','129069epJGDd','1241989MdxFoX','585MfQkha','1436PYomqv','8lUrvZw','13254PQvkuh','655HXdUlC','gray','11mZGbwS','1927164VQtLKK'];a32_0x1b61=function(){return _0x247821;};return a32_0x1b61();}export function TaskTime(_0xae9350){var _0x3cb7d3=a32_0x4293;if(_0xae9350[_0x3cb7d3(0x16d)])return a32_0x229be1(a32_0x5e617f,{'children':[a32_0x373f03(Text,{'color':_0x3cb7d3(0x167),'children':'\x20['}),a32_0x373f03(Text,{'color':_0x3cb7d3(0x167),'bold':!![],'children':_0xae9350['elapsed']}),a32_0x373f03(Text,{'color':_0x3cb7d3(0x167),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a33_0x7a2527=a33_0x563a;(function(_0x72a426,_0x50bc09){const _0x434542=a33_0x563a,_0x435c61=_0x72a426();while(!![]){try{const _0x3514e3=parseInt(_0x434542(0x1c8))/0x1+parseInt(_0x434542(0x1c3))/0x2*(parseInt(_0x434542(0x1ce))/0x3)+-parseInt(_0x434542(0x1d2))/0x4+parseInt(_0x434542(0x1c1))/0x5*(-parseInt(_0x434542(0x1d3))/0x6)+-parseInt(_0x434542(0x1c2))/0x7+-parseInt(_0x434542(0x1d0))/0x8+parseInt(_0x434542(0x1cb))/0x9;if(_0x3514e3===_0x50bc09)break;else _0x435c61['push'](_0x435c61['shift']());}catch(_0x438da0){_0x435c61['push'](_0x435c61['shift']());}}}(a33_0x4934,0xdb502));import a33_0x640681 from'node:path';import{fileURLToPath}from'node:url';function a33_0x563a(_0x307107,_0x4a396c){const _0x493435=a33_0x4934();return a33_0x563a=function(_0x563a18,_0x295b2f){_0x563a18=_0x563a18-0x1bf;let _0x19dbc8=_0x493435[_0x563a18];return _0x19dbc8;},a33_0x563a(_0x307107,_0x4a396c);}import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a33_0x640681[a33_0x7a2527(0x1c9)](fileURLToPath(import.meta[a33_0x7a2527(0x1c0)])),templateDir=a33_0x640681[a33_0x7a2527(0x1cd)](__dirname,a33_0x7a2527(0x1d1));export function useCopyProjectTemplate(){const [_0x20e7a0,_0x8686df]=useState(![]),[_0x2bf9b6,_0x27cf85]=useState(![]),[_0x38dc4d,_0x260357]=useState(''),_0x2a1eab=useCallback(async _0x108efa=>{const _0xa137d=a33_0x563a,_0x263c2d=Date[_0xa137d(0x1c7)](),_0x336d49=a33_0x640681[_0xa137d(0x1cd)](process['cwd'](),_0x108efa);_0x8686df(!![]);try{logger[_0xa137d(0x1cf)](_0xa137d(0x1bf),_0xa137d(0x1c6),{'projectCode':_0x108efa,'templateDir':templateDir}),await copyDirectory(templateDir,_0x336d49);const _0x51453c=Date[_0xa137d(0x1c7)]()-_0x263c2d;logger['success'](_0xa137d(0x1bf),_0xa137d(0x1cc),_0x51453c,{'projectCode':_0x108efa});}catch(_0x1b8d19){const _0x682644=Date['now']()-_0x263c2d;logger[_0xa137d(0x1c5)](_0xa137d(0x1bf),_0xa137d(0x1ca),{'projectCode':_0x108efa,'error':_0x1b8d19 instanceof Error?_0x1b8d19[_0xa137d(0x1c4)]:String(_0x1b8d19),'duration':_0x682644});throw _0x1b8d19;}finally{_0x8686df(![]),_0x27cf85(!![]),_0x260357(formatElapsed(_0x263c2d));}},[]);return{'taskName':'复制项目文件','finished':_0x2bf9b6,'loading':_0x20e7a0,'elapsed':_0x38dc4d,'doTask':_0x2a1eab};}function a33_0x4934(){const _0x59a643=['项目模板复制失败','21629115vHOWua','项目模板复制完成','resolve','185157wgwmFn','info','11207136Ytthkb','../../templates/projects/sub-app-react-demo','330652WYofxy','198rbPYBN','copy','url','104485AaHUXB','3450692PdkVPU','6nYtbrs','message','error','开始复制项目模板','now','976026qKcYzL','dirname'];a33_0x4934=function(){return _0x59a643;};return a33_0x4934();}
1
+ function a33_0x3315(_0x568c30,_0x3cbaa5){const _0x4b6eb2=a33_0x4b6e();return a33_0x3315=function(_0x3315fb,_0x1cd3a0){_0x3315fb=_0x3315fb-0xa4;let _0x27b9eb=_0x4b6eb2[_0x3315fb];return _0x27b9eb;},a33_0x3315(_0x568c30,_0x3cbaa5);}const a33_0x45e4ac=a33_0x3315;(function(_0x1a1a0e,_0x4dcfb9){const _0x57984a=a33_0x3315,_0x5b3202=_0x1a1a0e();while(!![]){try{const _0x1bf54d=parseInt(_0x57984a(0xa5))/0x1*(parseInt(_0x57984a(0xb3))/0x2)+parseInt(_0x57984a(0xb7))/0x3+parseInt(_0x57984a(0xb5))/0x4*(-parseInt(_0x57984a(0xa9))/0x5)+-parseInt(_0x57984a(0xa4))/0x6+parseInt(_0x57984a(0xa6))/0x7*(-parseInt(_0x57984a(0xb6))/0x8)+parseInt(_0x57984a(0xa8))/0x9*(parseInt(_0x57984a(0xb8))/0xa)+-parseInt(_0x57984a(0xb0))/0xb*(parseInt(_0x57984a(0xb1))/0xc);if(_0x1bf54d===_0x4dcfb9)break;else _0x5b3202['push'](_0x5b3202['shift']());}catch(_0x162837){_0x5b3202['push'](_0x5b3202['shift']());}}}(a33_0x4b6e,0xa7754));import a33_0xa1efc5 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a33_0x4b6e(){const _0x24a706=['1006098lrZFFO','589957nGQCzl','1411627dXVSRM','info','702414QYgJMg','50NCFLEw','resolve','error','dirname','开始复制项目模板','copy','复制项目文件','14729qJvfdd','6168GwAmno','项目模板复制完成','4IsHujT','success','544340fhjwUZ','32CGRQTC','3607905COcnTa','170PpEoLC','now','url'];a33_0x4b6e=function(){return _0x24a706;};return a33_0x4b6e();}const __dirname=a33_0xa1efc5[a33_0x45e4ac(0xac)](fileURLToPath(import.meta[a33_0x45e4ac(0xba)])),templateDir=a33_0xa1efc5[a33_0x45e4ac(0xaa)](__dirname,'../../templates/projects/sub-app-react-demo');export function useCopyProjectTemplate(){const _0x39158b=a33_0x45e4ac,[_0x3717f1,_0x560860]=useState(![]),[_0x544067,_0xaf566c]=useState(![]),[_0x4bb182,_0x445973]=useState(''),_0x68002d=useCallback(async _0x183a65=>{const _0x18deba=a33_0x3315,_0x1167d1=Date[_0x18deba(0xb9)](),_0x3d16f6=a33_0xa1efc5[_0x18deba(0xaa)](process['cwd'](),_0x183a65);_0x560860(!![]);try{logger[_0x18deba(0xa7)](_0x18deba(0xae),_0x18deba(0xad),{'projectCode':_0x183a65,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3d16f6);const _0x240100=Date[_0x18deba(0xb9)]()-_0x1167d1;logger[_0x18deba(0xb4)](_0x18deba(0xae),_0x18deba(0xb2),_0x240100,{'projectCode':_0x183a65});}catch(_0x58da7e){const _0x1cbe1f=Date[_0x18deba(0xb9)]()-_0x1167d1;logger[_0x18deba(0xab)]('copy','项目模板复制失败',{'projectCode':_0x183a65,'error':_0x58da7e instanceof Error?_0x58da7e['message']:String(_0x58da7e),'duration':_0x1cbe1f});throw _0x58da7e;}finally{_0x560860(![]),_0xaf566c(!![]),_0x445973(formatElapsed(_0x1167d1));}},[]);return{'taskName':_0x39158b(0xaf),'finished':_0x544067,'loading':_0x3717f1,'elapsed':_0x4bb182,'doTask':_0x68002d};}
@@ -1 +1 @@
1
- (function(_0x48db26,_0x551dca){const _0x3dd501=a34_0x4107,_0x3095d8=_0x48db26();while(!![]){try{const _0x48d731=-parseInt(_0x3dd501(0x173))/0x1*(-parseInt(_0x3dd501(0x179))/0x2)+-parseInt(_0x3dd501(0x186))/0x3+parseInt(_0x3dd501(0x17f))/0x4*(-parseInt(_0x3dd501(0x17c))/0x5)+parseInt(_0x3dd501(0x178))/0x6*(-parseInt(_0x3dd501(0x172))/0x7)+-parseInt(_0x3dd501(0x184))/0x8*(-parseInt(_0x3dd501(0x17d))/0x9)+parseInt(_0x3dd501(0x183))/0xa+parseInt(_0x3dd501(0x181))/0xb;if(_0x48d731===_0x551dca)break;else _0x3095d8['push'](_0x3095d8['shift']());}catch(_0x401ffb){_0x3095d8['push'](_0x3095d8['shift']());}}}(a34_0x1dd8,0x36991));import a34_0x177fde from'node:path';function a34_0x4107(_0xe74e0d,_0x5d8219){const _0x1dd806=a34_0x1dd8();return a34_0x4107=function(_0x41070b,_0x3ea2da){_0x41070b=_0x41070b-0x172;let _0x1ad976=_0x1dd806[_0x41070b];return _0x1ad976;},a34_0x4107(_0xe74e0d,_0x5d8219);}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a34_0x1dd8(){const _0x33b040=['format','resolve','prettier','开始格式化代码','480tDXTam','20qWDNQX','--write','npx','106960elpRUn','387SGIkAH','now','24ByQzyP','代码格式化完成','1354837XRBuSN','success','1019920AJUhht','42712VufyqO','error','907743hUZVFz','9170bOkEEX','30463EvUEZD'];a34_0x1dd8=function(){return _0x33b040;};return a34_0x1dd8();}import{logger}from'../utils/logger.js';export function useFormatCode(){const [_0x3ca68c,_0x2d79c4]=useState(![]),[_0x3ebbfe,_0x4c879b]=useState(![]),[_0x569825,_0x2eafcb]=useState(''),_0x16cf6d=useCallback(async _0x416897=>{const _0x2eb5d3=a34_0x4107,_0x1d07ed=Date[_0x2eb5d3(0x17e)](),_0x17bbb4=a34_0x177fde[_0x2eb5d3(0x175)](process['cwd'](),_0x416897);_0x2d79c4(!![]);try{logger['info'](_0x2eb5d3(0x174),_0x2eb5d3(0x177),{'projectCode':_0x416897}),await execa(_0x2eb5d3(0x17b),[_0x2eb5d3(0x176),_0x2eb5d3(0x17a),'.'],{'cwd':_0x17bbb4});const _0x29b524=Date['now']()-_0x1d07ed;logger[_0x2eb5d3(0x182)](_0x2eb5d3(0x174),_0x2eb5d3(0x180),_0x29b524,{'projectCode':_0x416897});}catch(_0x2cf536){const _0x584a2c=Date['now']()-_0x1d07ed;logger[_0x2eb5d3(0x185)](_0x2eb5d3(0x174),'代码格式化失败',{'projectCode':_0x416897,'error':_0x2cf536 instanceof Error?_0x2cf536['message']:String(_0x2cf536),'duration':_0x584a2c});throw _0x2cf536;}finally{_0x2d79c4(![]),_0x4c879b(!![]),_0x2eafcb(formatElapsed(_0x1d07ed));}},[]);return{'taskName':'格式化代码','finished':_0x3ebbfe,'loading':_0x3ca68c,'elapsed':_0x569825,'doTask':_0x16cf6d};}
1
+ (function(_0xa0d5fe,_0x2a8c5c){const _0x1921ae=a34_0x55c1,_0x3718cc=_0xa0d5fe();while(!![]){try{const _0x1ed17a=-parseInt(_0x1921ae(0x194))/0x1*(-parseInt(_0x1921ae(0x191))/0x2)+-parseInt(_0x1921ae(0x190))/0x3*(-parseInt(_0x1921ae(0x184))/0x4)+parseInt(_0x1921ae(0x198))/0x5+parseInt(_0x1921ae(0x197))/0x6*(-parseInt(_0x1921ae(0x187))/0x7)+-parseInt(_0x1921ae(0x18f))/0x8+parseInt(_0x1921ae(0x193))/0x9*(-parseInt(_0x1921ae(0x185))/0xa)+parseInt(_0x1921ae(0x19d))/0xb;if(_0x1ed17a===_0x2a8c5c)break;else _0x3718cc['push'](_0x3718cc['shift']());}catch(_0x271932){_0x3718cc['push'](_0x3718cc['shift']());}}}(a34_0x53fc,0x36409));import a34_0x14b66e from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a34_0x53fc(){const _0x230f2e=['success','格式化代码','cwd','2648664HwDqOv','112083AboPwJ','2prViyv','--write','153963faTzio','279949IZJnRZ','format','开始格式化代码','48fFzyIG','443585DWclmI','error','代码格式化失败','prettier','npx','2800842UgfBgc','16TDxytB','80AbnWSu','代码格式化完成','72254XKxKnz','message','now','resolve','info'];a34_0x53fc=function(){return _0x230f2e;};return a34_0x53fc();}import{formatElapsed}from'./format-elapsed.js';function a34_0x55c1(_0x2a9727,_0x4a15a3){const _0x53fcc5=a34_0x53fc();return a34_0x55c1=function(_0x55c19d,_0x286b8c){_0x55c19d=_0x55c19d-0x184;let _0xd93b70=_0x53fcc5[_0x55c19d];return _0xd93b70;},a34_0x55c1(_0x2a9727,_0x4a15a3);}import{logger}from'../utils/logger.js';export function useFormatCode(){const _0xaf7d2c=a34_0x55c1,[_0xa9ee5b,_0x5480bb]=useState(![]),[_0x5b31c4,_0x462253]=useState(![]),[_0x49a347,_0xa8ee56]=useState(''),_0x18f8d9=useCallback(async _0x22d78b=>{const _0xc05f9f=a34_0x55c1,_0x184ba8=Date[_0xc05f9f(0x189)](),_0x368d6d=a34_0x14b66e[_0xc05f9f(0x18a)](process[_0xc05f9f(0x18e)](),_0x22d78b);_0x5480bb(!![]);try{logger[_0xc05f9f(0x18b)]('format',_0xc05f9f(0x196),{'projectCode':_0x22d78b}),await execa(_0xc05f9f(0x19c),[_0xc05f9f(0x19b),_0xc05f9f(0x192),'.'],{'cwd':_0x368d6d});const _0x2a842a=Date['now']()-_0x184ba8;logger[_0xc05f9f(0x18c)](_0xc05f9f(0x195),_0xc05f9f(0x186),_0x2a842a,{'projectCode':_0x22d78b});}catch(_0x6f40f6){const _0x20acca=Date[_0xc05f9f(0x189)]()-_0x184ba8;logger[_0xc05f9f(0x199)]('format',_0xc05f9f(0x19a),{'projectCode':_0x22d78b,'error':_0x6f40f6 instanceof Error?_0x6f40f6[_0xc05f9f(0x188)]:String(_0x6f40f6),'duration':_0x20acca});throw _0x6f40f6;}finally{_0x5480bb(![]),_0x462253(!![]),_0xa8ee56(formatElapsed(_0x184ba8));}},[]);return{'taskName':_0xaf7d2c(0x18d),'finished':_0x5b31c4,'loading':_0xa9ee5b,'elapsed':_0x49a347,'doTask':_0x18f8d9};}
@@ -1 +1 @@
1
- (function(_0x2e6a0c,_0x2e22e4){const _0x3b4831=a35_0x3c35,_0xf7327=_0x2e6a0c();while(!![]){try{const _0x59bef8=parseInt(_0x3b4831(0x16a))/0x1+-parseInt(_0x3b4831(0x166))/0x2*(parseInt(_0x3b4831(0x178))/0x3)+parseInt(_0x3b4831(0x173))/0x4*(parseInt(_0x3b4831(0x175))/0x5)+-parseInt(_0x3b4831(0x165))/0x6+-parseInt(_0x3b4831(0x179))/0x7*(parseInt(_0x3b4831(0x172))/0x8)+-parseInt(_0x3b4831(0x170))/0x9+-parseInt(_0x3b4831(0x167))/0xa*(-parseInt(_0x3b4831(0x177))/0xb);if(_0x59bef8===_0x2e22e4)break;else _0xf7327['push'](_0xf7327['shift']());}catch(_0x2af7ee){_0xf7327['push'](_0xf7327['shift']());}}}(a35_0x3151,0x1f768));import a35_0x2d4bc0 from'node:path';function a35_0x3c35(_0x10e2b7,_0x179e74){const _0x315130=a35_0x3151();return a35_0x3c35=function(_0x3c35c3,_0x7afc0f){_0x3c35c3=_0x3c35c3-0x165;let _0x19b78d=_0x315130[_0x3c35c3];return _0x19b78d;},a35_0x3c35(_0x10e2b7,_0x179e74);}import{useCallback,useState}from'react';function a35_0x3151(){const _0x1559ae=['2215dAqIXZ','依赖安装失败','33011fTJKZj','603bdSomA','7EncvyP','error','安装依赖','https://registry.npmmirror.com','297480QOrDBF','502ULyXiR','710VYNHuo','info','resolve','112921fIfzYq','开始安装依赖','依赖安装完成','--registry','message','npm','945108gKkkZq','now','773000PcRdLB','944pLfhIl','install'];a35_0x3151=function(){return _0x1559ae;};return a35_0x3151();}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x28d9e1=a35_0x3c35,[_0xb55f75,_0x2ad61c]=useState(![]),[_0x2ee073,_0x54d844]=useState(![]),[_0x254ac1,_0x389d17]=useState(''),_0x2c9d8d=useCallback(async _0x5697f6=>{const _0x1e3fad=a35_0x3c35,_0x40798e=Date['now'](),_0x4e7917=a35_0x2d4bc0[_0x1e3fad(0x169)](process['cwd'](),_0x5697f6);_0x2ad61c(!![]),_0x54d844(![]);const _0x5b82f8=async(_0x287a67,_0x5a43a0)=>{await execa(_0x287a67,_0x5a43a0,{'cwd':_0x4e7917});};try{logger[_0x1e3fad(0x168)](_0x1e3fad(0x174),_0x1e3fad(0x16b),{'projectCode':_0x5697f6,'registry':_0x1e3fad(0x17c)}),await _0x5b82f8(_0x1e3fad(0x16f),['install',_0x1e3fad(0x16d),'https://registry.npmmirror.com']);const _0x4567aa=Date[_0x1e3fad(0x171)]()-_0x40798e;logger['success']('install',_0x1e3fad(0x16c),_0x4567aa,{'projectCode':_0x5697f6});}catch(_0x5396d9){const _0xf70662=Date['now']()-_0x40798e;logger[_0x1e3fad(0x17a)](_0x1e3fad(0x174),_0x1e3fad(0x176),{'projectCode':_0x5697f6,'error':_0x5396d9 instanceof Error?_0x5396d9[_0x1e3fad(0x16e)]:String(_0x5396d9),'duration':_0xf70662});throw _0x5396d9;}finally{_0x2ad61c(![]),_0x54d844(!![]),_0x389d17(formatElapsed(_0x40798e));}},[]);return{'taskName':_0x28d9e1(0x17b),'finished':_0x2ee073,'loading':_0xb55f75,'elapsed':_0x254ac1,'doTask':_0x2c9d8d};}
1
+ (function(_0x11143d,_0x334e0e){const _0x5e2daf=a35_0x1a1c,_0x4fc358=_0x11143d();while(!![]){try{const _0x48a99a=-parseInt(_0x5e2daf(0x1ee))/0x1*(parseInt(_0x5e2daf(0x204))/0x2)+parseInt(_0x5e2daf(0x1fd))/0x3*(-parseInt(_0x5e2daf(0x1ff))/0x4)+parseInt(_0x5e2daf(0x205))/0x5+parseInt(_0x5e2daf(0x202))/0x6+parseInt(_0x5e2daf(0x1f8))/0x7*(-parseInt(_0x5e2daf(0x200))/0x8)+-parseInt(_0x5e2daf(0x1f9))/0x9+parseInt(_0x5e2daf(0x1f7))/0xa;if(_0x48a99a===_0x334e0e)break;else _0x4fc358['push'](_0x4fc358['shift']());}catch(_0x1bdabc){_0x4fc358['push'](_0x4fc358['shift']());}}}(a35_0x42bc,0xa6631));function a35_0x42bc(){const _0x43c3cf=['1507340OfFAjm','3ZnrxMN','resolve','message','开始安装依赖','now','info','安装依赖','cwd','https://registry.npmmirror.com','22471930xatYho','5943777rjbflp','5108715SnkhUq','npm','--registry','install','9PMxHuS','error','205148SACnUb','8immCTs','success','374574MINksM','依赖安装失败','239308qMcEGN'];a35_0x42bc=function(){return _0x43c3cf;};return a35_0x42bc();}import a35_0x5a5133 from'node:path';import{useCallback,useState}from'react';function a35_0x1a1c(_0x1735cd,_0xf49f37){const _0x42bcbd=a35_0x42bc();return a35_0x1a1c=function(_0x1a1cd8,_0x41485e){_0x1a1cd8=_0x1a1cd8-0x1ee;let _0x2cfaab=_0x42bcbd[_0x1a1cd8];return _0x2cfaab;},a35_0x1a1c(_0x1735cd,_0xf49f37);}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x403772=a35_0x1a1c,[_0x1e0259,_0x3bd50e]=useState(![]),[_0x2cf60,_0x3b1bf7]=useState(![]),[_0x4f188c,_0x37a250]=useState(''),_0xdc061=useCallback(async _0x8effcf=>{const _0x94a57=a35_0x1a1c,_0x3a6666=Date[_0x94a57(0x1f2)](),_0x5cc1fb=a35_0x5a5133[_0x94a57(0x1ef)](process[_0x94a57(0x1f5)](),_0x8effcf);_0x3bd50e(!![]),_0x3b1bf7(![]);const _0x1d33a7=async(_0xaec872,_0x204e97)=>{await execa(_0xaec872,_0x204e97,{'cwd':_0x5cc1fb});};try{logger[_0x94a57(0x1f3)](_0x94a57(0x1fc),_0x94a57(0x1f1),{'projectCode':_0x8effcf,'registry':_0x94a57(0x1f6)}),await _0x1d33a7(_0x94a57(0x1fa),['install',_0x94a57(0x1fb),'https://registry.npmmirror.com']);const _0x52f6c5=Date[_0x94a57(0x1f2)]()-_0x3a6666;logger[_0x94a57(0x201)]('install','依赖安装完成',_0x52f6c5,{'projectCode':_0x8effcf});}catch(_0x2448ab){const _0x25f8c3=Date[_0x94a57(0x1f2)]()-_0x3a6666;logger[_0x94a57(0x1fe)]('install',_0x94a57(0x203),{'projectCode':_0x8effcf,'error':_0x2448ab instanceof Error?_0x2448ab[_0x94a57(0x1f0)]:String(_0x2448ab),'duration':_0x25f8c3});throw _0x2448ab;}finally{_0x3bd50e(![]),_0x3b1bf7(!![]),_0x37a250(formatElapsed(_0x3a6666));}},[]);return{'taskName':_0x403772(0x1f4),'finished':_0x2cf60,'loading':_0x1e0259,'elapsed':_0x4f188c,'doTask':_0xdc061};}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4ead7b,_0x3c2e1a){var _0x377d53=a36_0x4063,_0x380b6c=_0x4ead7b();while(!![]){try{var _0x1dbdf1=-parseInt(_0x377d53(0x1b1))/0x1+parseInt(_0x377d53(0x1b9))/0x2*(parseInt(_0x377d53(0x1b3))/0x3)+-parseInt(_0x377d53(0x1b6))/0x4+parseInt(_0x377d53(0x1ba))/0x5*(-parseInt(_0x377d53(0x1b2))/0x6)+-parseInt(_0x377d53(0x1ae))/0x7*(-parseInt(_0x377d53(0x1bb))/0x8)+parseInt(_0x377d53(0x1b8))/0x9+parseInt(_0x377d53(0x1b5))/0xa*(parseInt(_0x377d53(0x1ad))/0xb);if(_0x1dbdf1===_0x3c2e1a)break;else _0x380b6c['push'](_0x380b6c['shift']());}catch(_0x5427c2){_0x380b6c['push'](_0x380b6c['shift']());}}}(a36_0x35d6,0xe654b));function a36_0x4063(_0x39ee3f,_0x18d1cf){var _0x35d681=a36_0x35d6();return a36_0x4063=function(_0x406333,_0x327711){_0x406333=_0x406333-0x1ad;var _0x22e086=_0x35d681[_0x406333];return _0x22e086;},a36_0x4063(_0x39ee3f,_0x18d1cf);}function a36_0x35d6(){var _0x4f71fa=['89830VrgAOe','6183148VDwiMi','column','621954focGAX','2pbgGYU','21965KQTBry','896080MewmDb','4070wJpXgm','35IXZFtO','green','查看可用命令。','808196mSWxWC','942jYbckB','102759oBETBP','!\x20请指定一个有效的命令。'];a36_0x35d6=function(){return _0x4f71fa;};return a36_0x35d6();}import{jsx as a36_0x11d27d,jsxs as a36_0xb9d4b6}from'react/jsx-runtime';import{Box,Text}from'ink';export function Help(){var _0x5c7b85=a36_0x4063;return a36_0xb9d4b6(Box,{'flexDirection':_0x5c7b85(0x1b7),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0xb9d4b6(Box,{'children':[a36_0x11d27d(Box,{'width':'1'}),a36_0x11d27d(Text,{'children':_0x5c7b85(0x1b4)})]}),a36_0xb9d4b6(Box,{'marginTop':0x1,'children':[a36_0x11d27d(Box,{'width':'1'}),a36_0xb9d4b6(Text,{'children':['\x20\x20','使用']}),a36_0xb9d4b6(Text,{'bold':!![],'color':_0x5c7b85(0x1af),'children':['\x20','lovrabet\x20--help','\x20']}),a36_0x11d27d(Text,{'children':_0x5c7b85(0x1b0)})]})]});}
1
+ (function(_0x58bfe0,_0x555d5d){var _0x2c8847=a36_0x188f,_0x3f7572=_0x58bfe0();while(!![]){try{var _0x3a83e9=parseInt(_0x2c8847(0x14d))/0x1*(-parseInt(_0x2c8847(0x146))/0x2)+parseInt(_0x2c8847(0x143))/0x3+-parseInt(_0x2c8847(0x148))/0x4*(-parseInt(_0x2c8847(0x14b))/0x5)+-parseInt(_0x2c8847(0x149))/0x6+parseInt(_0x2c8847(0x14e))/0x7+-parseInt(_0x2c8847(0x142))/0x8*(-parseInt(_0x2c8847(0x14c))/0x9)+parseInt(_0x2c8847(0x145))/0xa*(-parseInt(_0x2c8847(0x141))/0xb);if(_0x3a83e9===_0x555d5d)break;else _0x3f7572['push'](_0x3f7572['shift']());}catch(_0x4b9e9e){_0x3f7572['push'](_0x3f7572['shift']());}}}(a36_0x34d0,0x21404));import{jsx as a36_0x8daa2e,jsxs as a36_0x127fbd}from'react/jsx-runtime';import{Box,Text}from'ink';function a36_0x188f(_0x55d5fb,_0x48067e){var _0x34d050=a36_0x34d0();return a36_0x188f=function(_0x188f47,_0x1a92c0){_0x188f47=_0x188f47-0x13f;var _0x117b69=_0x34d050[_0x188f47];return _0x117b69;},a36_0x188f(_0x55d5fb,_0x48067e);}function a36_0x34d0(){var _0x280801=['30lbdWev','2zaojhM','查看可用命令。','4HkdSOi','443046cmQick','lovrabet\x20--help','325285niTRwK','58887WdBncM','60529PgtpuC','1815821bNPehX','column','green','1132351Rvgzvv','184hfuwvd','313320ZdzLsS','!\x20请指定一个有效的命令。'];a36_0x34d0=function(){return _0x280801;};return a36_0x34d0();}export function Help(){var _0x123c0c=a36_0x188f;return a36_0x127fbd(Box,{'flexDirection':_0x123c0c(0x13f),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x127fbd(Box,{'children':[a36_0x8daa2e(Box,{'width':'1'}),a36_0x8daa2e(Text,{'children':_0x123c0c(0x144)})]}),a36_0x127fbd(Box,{'marginTop':0x1,'children':[a36_0x8daa2e(Box,{'width':'1'}),a36_0x127fbd(Text,{'children':['\x20\x20','使用']}),a36_0x127fbd(Text,{'bold':!![],'color':_0x123c0c(0x140),'children':['\x20',_0x123c0c(0x14a),'\x20']}),a36_0x8daa2e(Text,{'children':_0x123c0c(0x147)})]})]});}
@@ -1 +1 @@
1
- const a37_0xcf3cc4=a37_0x1859;function a37_0x1859(_0x1f957c,_0x3490f5){const _0x555f59=a37_0x555f();return a37_0x1859=function(_0x185999,_0x5984b9){_0x185999=_0x185999-0x1a7;let _0x5520cc=_0x555f59[_0x185999];return _0x5520cc;},a37_0x1859(_0x1f957c,_0x3490f5);}(function(_0x40ca3d,_0x3b10d9){const _0x17aadd=a37_0x1859,_0x1b08ab=_0x40ca3d();while(!![]){try{const _0x30bcde=-parseInt(_0x17aadd(0x1aa))/0x1+parseInt(_0x17aadd(0x1ab))/0x2+parseInt(_0x17aadd(0x1b0))/0x3+-parseInt(_0x17aadd(0x1b2))/0x4+parseInt(_0x17aadd(0x1af))/0x5+parseInt(_0x17aadd(0x1a7))/0x6*(-parseInt(_0x17aadd(0x1ad))/0x7)+-parseInt(_0x17aadd(0x1b1))/0x8*(parseInt(_0x17aadd(0x1a8))/0x9);if(_0x30bcde===_0x3b10d9)break;else _0x1b08ab['push'](_0x1b08ab['shift']());}catch(_0x4878ac){_0x1b08ab['push'](_0x1b08ab['shift']());}}}(a37_0x555f,0x31e54));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{homedir}from'node:os';export const projectConfigPath=resolve(process['cwd'](),a37_0xcf3cc4(0x1ae));export const globalConfigPath=resolve(homedir(),a37_0xcf3cc4(0x1ae));export function readConfig(){const _0xc58350=a37_0xcf3cc4;let _0x294000={};try{if(existsSync(globalConfigPath)){const _0x403fc0=readFileSync(globalConfigPath,{'encoding':_0xc58350(0x1ac)});_0x403fc0&&(_0x294000=JSON[_0xc58350(0x1a9)](_0x403fc0));}}catch(_0x4049ec){}try{if(existsSync(projectConfigPath)){const _0x57e0e5=readFileSync(projectConfigPath,{'encoding':_0xc58350(0x1ac)});if(_0x57e0e5){const _0x1330de=JSON['parse'](_0x57e0e5);_0x294000={..._0x294000,..._0x1330de};}}}catch(_0x229aa){}return _0x294000;}export function isInProject(){return existsSync(projectConfigPath);}function a37_0x555f(){const _0x26cdd0=['3874581UsOliU','parse','84137ebujcM','596986YeOyWS','utf8','88452asqVwD','.lovrabetrc','1274500qMbibD','807720jhxvYN','8gNLbyq','60652HrdBYX','42kjOJCP'];a37_0x555f=function(){return _0x26cdd0;};return a37_0x555f();}
1
+ const a37_0x3ecc39=a37_0x2087;(function(_0x52520c,_0x3f2ea9){const _0x58cc01=a37_0x2087,_0x19b177=_0x52520c();while(!![]){try{const _0x5d7e67=-parseInt(_0x58cc01(0x90))/0x1+-parseInt(_0x58cc01(0x91))/0x2*(-parseInt(_0x58cc01(0x97))/0x3)+parseInt(_0x58cc01(0x9a))/0x4*(-parseInt(_0x58cc01(0x9b))/0x5)+-parseInt(_0x58cc01(0x93))/0x6+parseInt(_0x58cc01(0x94))/0x7*(-parseInt(_0x58cc01(0x8f))/0x8)+parseInt(_0x58cc01(0x95))/0x9+parseInt(_0x58cc01(0x9c))/0xa*(parseInt(_0x58cc01(0x92))/0xb);if(_0x5d7e67===_0x3f2ea9)break;else _0x19b177['push'](_0x19b177['shift']());}catch(_0x331319){_0x19b177['push'](_0x19b177['shift']());}}}(a37_0x577a,0x94051));import{existsSync,readFileSync}from'node:fs';function a37_0x2087(_0x46c570,_0x353ee4){const _0x577a09=a37_0x577a();return a37_0x2087=function(_0x20870b,_0x467b97){_0x20870b=_0x20870b-0x8f;let _0x210c2d=_0x577a09[_0x20870b];return _0x210c2d;},a37_0x2087(_0x46c570,_0x353ee4);}function a37_0x577a(){const _0x4b4d84=['130552uhhcFo','919859GPjJiQ','1556VnTXWM','504009VzqSKi','4780326lsuZNn','70kgKJLk','7211547HyAmll','.lovrabetrc','3261VPcqBm','utf8','parse','1592092IHWjMP','5qLBPrD','270nDwRvC','cwd'];a37_0x577a=function(){return _0x4b4d84;};return a37_0x577a();}import{resolve}from'node:path';import{homedir}from'node:os';export const projectConfigPath=resolve(process[a37_0x3ecc39(0x9d)](),'.lovrabetrc');export const globalConfigPath=resolve(homedir(),a37_0x3ecc39(0x96));export function readConfig(){const _0x58fc54=a37_0x3ecc39;let _0x3eba24={};try{if(existsSync(globalConfigPath)){const _0x1f44d9=readFileSync(globalConfigPath,{'encoding':'utf8'});_0x1f44d9&&(_0x3eba24=JSON[_0x58fc54(0x99)](_0x1f44d9));}}catch(_0x3cd0ce){}try{if(existsSync(projectConfigPath)){const _0x4946ed=readFileSync(projectConfigPath,{'encoding':_0x58fc54(0x98)});if(_0x4946ed){const _0x4cda31=JSON[_0x58fc54(0x99)](_0x4946ed);_0x3eba24={..._0x3eba24,..._0x4cda31};}}}catch(_0x3a2143){}return _0x3eba24;}export function isInProject(){return existsSync(projectConfigPath);}
@@ -1 +1 @@
1
- (function(_0x230ee5,_0xdebf66){const _0x2f67b9=a38_0x3efb,_0x2672c5=_0x230ee5();while(!![]){try{const _0x243c30=-parseInt(_0x2f67b9(0x1ad))/0x1*(parseInt(_0x2f67b9(0x1b5))/0x2)+-parseInt(_0x2f67b9(0x1a8))/0x3+parseInt(_0x2f67b9(0x1b6))/0x4+-parseInt(_0x2f67b9(0x1aa))/0x5+parseInt(_0x2f67b9(0x1b2))/0x6*(-parseInt(_0x2f67b9(0x1a9))/0x7)+-parseInt(_0x2f67b9(0x1af))/0x8+-parseInt(_0x2f67b9(0x1ab))/0x9*(-parseInt(_0x2f67b9(0x1b4))/0xa);if(_0x243c30===_0xdebf66)break;else _0x2672c5['push'](_0x2672c5['shift']());}catch(_0x4ee198){_0x2672c5['push'](_0x2672c5['shift']());}}}(a38_0x1d07,0xe7696));function a38_0x3efb(_0x33a9b7,_0x36adf2){const _0x1d0708=a38_0x1d07();return a38_0x3efb=function(_0x3efba8,_0x18f55d){_0x3efba8=_0x3efba8-0x1a8;let _0x482f04=_0x1d0708[_0x3efba8];return _0x482f04;},a38_0x3efb(_0x33a9b7,_0x36adf2);}import a38_0x169c1d from'node:path';function a38_0x1d07(){const _0x4ee85d=['4056256iZdvpt','name','mkdirSync','6mtIlsX','isDirectory','40rYBRHV','2rewkoN','3047460HjpBeQ','582429jfqrIy','8424899VVRMER','1236780FzhLGn','5505633mmCWhh','join','108863YQcApO','readdirSync'];a38_0x1d07=function(){return _0x4ee85d;};return a38_0x1d07();}import a38_0x493214 from'node:fs';export async function copyDirectory(_0x4646a4,_0x5eb758){const _0x5b9303=a38_0x3efb;try{const _0xb4a6e6=a38_0x493214[_0x5b9303(0x1ae)](_0x4646a4,{'withFileTypes':!![]});a38_0x493214[_0x5b9303(0x1b1)](_0x5eb758,{'recursive':!![]});for(const _0x49c82d of _0xb4a6e6){const _0x53bcf8=a38_0x169c1d[_0x5b9303(0x1ac)](_0x4646a4,_0x49c82d[_0x5b9303(0x1b0)]),_0x3e92ea=a38_0x169c1d['join'](_0x5eb758,_0x49c82d[_0x5b9303(0x1b0)]);_0x49c82d[_0x5b9303(0x1b3)]()?await copyDirectory(_0x53bcf8,_0x3e92ea):a38_0x493214['copyFileSync'](_0x53bcf8,_0x3e92ea);}}catch(_0x4528ab){console['error']('复制目录时出错:',_0x4528ab);}}
1
+ (function(_0x572ff2,_0x2e6a45){const _0x50e80c=a38_0x53af,_0x4c7642=_0x572ff2();while(!![]){try{const _0x2f2026=parseInt(_0x50e80c(0xbe))/0x1*(-parseInt(_0x50e80c(0xcb))/0x2)+-parseInt(_0x50e80c(0xca))/0x3+-parseInt(_0x50e80c(0xc1))/0x4*(parseInt(_0x50e80c(0xc4))/0x5)+-parseInt(_0x50e80c(0xc0))/0x6*(parseInt(_0x50e80c(0xc3))/0x7)+-parseInt(_0x50e80c(0xbd))/0x8+parseInt(_0x50e80c(0xc5))/0x9*(-parseInt(_0x50e80c(0xc9))/0xa)+-parseInt(_0x50e80c(0xc7))/0xb*(-parseInt(_0x50e80c(0xba))/0xc);if(_0x2f2026===_0x2e6a45)break;else _0x4c7642['push'](_0x4c7642['shift']());}catch(_0x1e310a){_0x4c7642['push'](_0x4c7642['shift']());}}}(a38_0x3184,0xc3df6));import a38_0x2591aa from'node:path';function a38_0x3184(){const _0x5bfd19=['mkdirSync','3834aKpost','8NjiEYx','复制目录时出错:','13097giLGUz','1042025bBhxDz','21213nZTzRn','error','58383413nPLIwy','readdirSync','2510oDBfBp','2579634rWwZPW','6NfAUjK','copyFileSync','12owBjBm','join','name','6190608xQaQsc','222533hwlZID'];a38_0x3184=function(){return _0x5bfd19;};return a38_0x3184();}function a38_0x53af(_0x4ab13b,_0x34382b){const _0x318420=a38_0x3184();return a38_0x53af=function(_0x53afe7,_0x329db9){_0x53afe7=_0x53afe7-0xba;let _0x374214=_0x318420[_0x53afe7];return _0x374214;},a38_0x53af(_0x4ab13b,_0x34382b);}import a38_0x408958 from'node:fs';export async function copyDirectory(_0x4413fa,_0x2e778e){const _0x4165e8=a38_0x53af;try{const _0x4f07b1=a38_0x408958[_0x4165e8(0xc8)](_0x4413fa,{'withFileTypes':!![]});a38_0x408958[_0x4165e8(0xbf)](_0x2e778e,{'recursive':!![]});for(const _0x5d9331 of _0x4f07b1){const _0x421742=a38_0x2591aa[_0x4165e8(0xbb)](_0x4413fa,_0x5d9331['name']),_0x29b251=a38_0x2591aa[_0x4165e8(0xbb)](_0x2e778e,_0x5d9331[_0x4165e8(0xbc)]);_0x5d9331['isDirectory']()?await copyDirectory(_0x421742,_0x29b251):a38_0x408958[_0x4165e8(0xcc)](_0x421742,_0x29b251);}}catch(_0xf4857d){console[_0x4165e8(0xc6)](_0x4165e8(0xc2),_0xf4857d);}}
@@ -1 +1 @@
1
- (function(_0x2cb040,_0x44959b){const _0x4f6a86=a39_0x2222,_0x58a3fd=_0x2cb040();while(!![]){try{const _0x488cde=-parseInt(_0x4f6a86(0xeb))/0x1*(-parseInt(_0x4f6a86(0xee))/0x2)+parseInt(_0x4f6a86(0xe2))/0x3*(parseInt(_0x4f6a86(0xdc))/0x4)+parseInt(_0x4f6a86(0xd7))/0x5*(-parseInt(_0x4f6a86(0xda))/0x6)+parseInt(_0x4f6a86(0xdd))/0x7*(-parseInt(_0x4f6a86(0xe0))/0x8)+parseInt(_0x4f6a86(0xd5))/0x9+-parseInt(_0x4f6a86(0xd6))/0xa+parseInt(_0x4f6a86(0xec))/0xb;if(_0x488cde===_0x44959b)break;else _0x58a3fd['push'](_0x58a3fd['shift']());}catch(_0x10975d){_0x58a3fd['push'](_0x58a3fd['shift']());}}}(a39_0x1e8d,0xb36e6));function a39_0x2222(_0x22c8c5,_0x10b261){const _0x1e8d81=a39_0x1e8d();return a39_0x2222=function(_0x222277,_0x4b36ca){_0x222277=_0x222277-0xd3;let _0x1c75e2=_0x1e8d81[_0x222277];return _0x1c75e2;},a39_0x2222(_0x22c8c5,_0x10b261);}export async function httpRequest(_0x5034e4,_0x47e7ff={}){const _0x12c812=a39_0x2222,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x47e7ff;let _0x3e55c6=null;for(let _0x333d34=0x0;_0x333d34<=retries;_0x333d34++){try{const _0xd47b1c=new AbortController(),_0xd3ac5b=setTimeout(()=>_0xd47b1c[_0x12c812(0xe9)](),timeout),_0x2b5066=await fetch(_0x5034e4,{'headers':headers,'signal':_0xd47b1c['signal']});clearTimeout(_0xd3ac5b);let _0x8fed2d;const _0x45caca=_0x2b5066[_0x12c812(0xd8)][_0x12c812(0xea)]('content-type');return _0x45caca?.[_0x12c812(0xdf)]('application/json')?_0x8fed2d=await _0x2b5066[_0x12c812(0xd9)]():_0x8fed2d=await _0x2b5066[_0x12c812(0xd3)](),{'ok':_0x2b5066['ok'],'status':_0x2b5066[_0x12c812(0xef)],'statusText':_0x2b5066[_0x12c812(0xe3)],'data':_0x8fed2d,'headers':_0x2b5066[_0x12c812(0xd8)],'url':_0x2b5066['url'],'text':()=>_0x2b5066[_0x12c812(0xd3)]()};}catch(_0x165cd4){_0x3e55c6=_0x165cd4 instanceof Error?_0x165cd4:new Error(String(_0x165cd4));if(_0x333d34===retries)break;if(shouldRetry(_0x165cd4)){console[_0x12c812(0xde)](_0x12c812(0xe4)+retryDelay+_0x12c812(0xe7)+(_0x333d34+0x1)+_0x12c812(0xe5)),await sleep(retryDelay);continue;}else break;}}throw _0x3e55c6||new Error('Request\x20failed');}function shouldRetry(_0x35164f){const _0xa1d44f=a39_0x2222;if(_0x35164f instanceof Error){if(_0x35164f[_0xa1d44f(0xdb)]==='AbortError')return![];if(_0x35164f['name']===_0xa1d44f(0xd4)&&_0x35164f[_0xa1d44f(0xe8)][_0xa1d44f(0xdf)](_0xa1d44f(0xe6)))return!![];if(_0x35164f[_0xa1d44f(0xe8)][_0xa1d44f(0xdf)](_0xa1d44f(0xe1)))return!![];if(_0x35164f['message'][_0xa1d44f(0xdf)](_0xa1d44f(0xed)))return![];}return![];}function sleep(_0xdb5b82){return new Promise(_0x1f9af9=>setTimeout(_0x1f9af9,_0xdb5b82));}export function validateUrl(_0x2a7bdb){try{return new URL(_0x2a7bdb),!![];}catch{return![];}}function a39_0x1e8d(){const _0x561f61=['5650810dGdBpB','ENOTFOUND','611138ByHVIe','status','text','TypeError','6595983dzgUhc','11335410QxARZR','474115mTofpv','headers','json','12VOtawt','name','4jEElOA','35AgvcFv','log','includes','2281744eUgKWu','ECONNRESET','3962769OxWpPV','statusText','*\x20请求失败,','\x20次重试...','fetch','ms\x20后进行第\x20','message','abort','get','3WZCwdo'];a39_0x1e8d=function(){return _0x561f61;};return a39_0x1e8d();}
1
+ (function(_0x523c18,_0x405974){const _0x5c7340=a39_0x5ec1,_0x2d7b73=_0x523c18();while(!![]){try{const _0x165bab=-parseInt(_0x5c7340(0x8f))/0x1*(-parseInt(_0x5c7340(0x9a))/0x2)+parseInt(_0x5c7340(0x88))/0x3+parseInt(_0x5c7340(0x92))/0x4*(-parseInt(_0x5c7340(0x80))/0x5)+-parseInt(_0x5c7340(0x83))/0x6*(-parseInt(_0x5c7340(0x8c))/0x7)+-parseInt(_0x5c7340(0x85))/0x8*(parseInt(_0x5c7340(0x94))/0x9)+parseInt(_0x5c7340(0x99))/0xa+-parseInt(_0x5c7340(0x9b))/0xb;if(_0x165bab===_0x405974)break;else _0x2d7b73['push'](_0x2d7b73['shift']());}catch(_0x24d3d6){_0x2d7b73['push'](_0x2d7b73['shift']());}}}(a39_0x4918,0xacbf8));function a39_0x4918(){const _0xced451=['signal','1205560AbefEg','log','get','1235013LZHYwL','ENOTFOUND','text','*\x20请求失败,','1833797sHvRIN','includes','status','513179xzuUan','Request\x20failed','content-type','4tFjtwT','headers','9bIEXoR','json','statusText','ECONNRESET','message','2916540tuawia','2rbjtLY','6150243NeVOUT','AbortError','fetch','1615310XskVkY','TypeError','name','12BVryYS'];a39_0x4918=function(){return _0xced451;};return a39_0x4918();}function a39_0x5ec1(_0x787407,_0x50f8c4){const _0x4918fa=a39_0x4918();return a39_0x5ec1=function(_0x5ec1a7,_0x5bb1bd){_0x5ec1a7=_0x5ec1a7-0x7e;let _0x2c2332=_0x4918fa[_0x5ec1a7];return _0x2c2332;},a39_0x5ec1(_0x787407,_0x50f8c4);}export async function httpRequest(_0x161c00,_0x2f60e4={}){const _0x58f5d3=a39_0x5ec1,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2f60e4;let _0x302284=null;for(let _0x6e2893=0x0;_0x6e2893<=retries;_0x6e2893++){try{const _0x12d674=new AbortController(),_0x540243=setTimeout(()=>_0x12d674['abort'](),timeout),_0x492f6f=await fetch(_0x161c00,{'headers':headers,'signal':_0x12d674[_0x58f5d3(0x84)]});clearTimeout(_0x540243);let _0x2dca86;const _0x3d81db=_0x492f6f[_0x58f5d3(0x93)][_0x58f5d3(0x87)](_0x58f5d3(0x91));return _0x3d81db?.[_0x58f5d3(0x8d)]('application/json')?_0x2dca86=await _0x492f6f[_0x58f5d3(0x95)]():_0x2dca86=await _0x492f6f[_0x58f5d3(0x8a)](),{'ok':_0x492f6f['ok'],'status':_0x492f6f[_0x58f5d3(0x8e)],'statusText':_0x492f6f[_0x58f5d3(0x96)],'data':_0x2dca86,'headers':_0x492f6f['headers'],'url':_0x492f6f['url'],'text':()=>_0x492f6f[_0x58f5d3(0x8a)]()};}catch(_0x120908){_0x302284=_0x120908 instanceof Error?_0x120908:new Error(String(_0x120908));if(_0x6e2893===retries)break;if(shouldRetry(_0x120908)){console[_0x58f5d3(0x86)](_0x58f5d3(0x8b)+retryDelay+'ms\x20后进行第\x20'+(_0x6e2893+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x302284||new Error(_0x58f5d3(0x90));}function shouldRetry(_0x25f34c){const _0x377314=a39_0x5ec1;if(_0x25f34c instanceof Error){if(_0x25f34c[_0x377314(0x82)]===_0x377314(0x7e))return![];if(_0x25f34c['name']===_0x377314(0x81)&&_0x25f34c[_0x377314(0x98)][_0x377314(0x8d)](_0x377314(0x7f)))return!![];if(_0x25f34c['message'][_0x377314(0x8d)](_0x377314(0x97)))return!![];if(_0x25f34c[_0x377314(0x98)][_0x377314(0x8d)](_0x377314(0x89)))return![];}return![];}function sleep(_0x4516b8){return new Promise(_0x1f4f8f=>setTimeout(_0x1f4f8f,_0x4516b8));}export function validateUrl(_0x1c6f53){try{return new URL(_0x1c6f53),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a40_0xb1b111=a40_0x1f6a;(function(_0x2ee7fc,_0x3d3c0d){const _0x1c8cdc=a40_0x1f6a,_0x3368fc=_0x2ee7fc();while(!![]){try{const _0x314952=-parseInt(_0x1c8cdc(0xd5))/0x1+parseInt(_0x1c8cdc(0xb2))/0x2+-parseInt(_0x1c8cdc(0xce))/0x3*(-parseInt(_0x1c8cdc(0xd3))/0x4)+parseInt(_0x1c8cdc(0xdc))/0x5*(parseInt(_0x1c8cdc(0xd8))/0x6)+parseInt(_0x1c8cdc(0xc4))/0x7+parseInt(_0x1c8cdc(0xde))/0x8+parseInt(_0x1c8cdc(0xb4))/0x9*(-parseInt(_0x1c8cdc(0xe3))/0xa);if(_0x314952===_0x3d3c0d)break;else _0x3368fc['push'](_0x3368fc['shift']());}catch(_0x175985){_0x3368fc['push'](_0x3368fc['shift']());}}}(a40_0x3b1c,0xb6b48));import a40_0x5d548e from'winston';import a40_0x366046 from'node:fs';import a40_0x4b4d31 from'node:path';function a40_0x3b1c(){const _0x150965=['2414500rvdyww','createLogger','351EVmurj','transports','开始执行:\x20','Failed\x20to\x20read\x20logs:','duration','format','readLogs','filter','map','success','error','command','warn','utf8','printf','stringify','3288285GGpxzd','mkdirSync','dirname','initWinstonLogger','combine','winstonLogger','logFilePath','details','errors','parse','34326PEdPRr','clear','.lovrabet.log','clearLogs','toISOString','216mZtNXA','getWinstonInstance','204048svsePD','unknown','blue','12BSWLqe','timestamp','green','yellow','3233165ssgTOR','readFileSync','11179008wWvooN','完成:\x20','join','setLogPath','message','1034130objvtW','File','split','info','logTask','existsSync','Failed\x20to\x20clear\x20logs:','addColors','now'];a40_0x3b1c=function(){return _0x150965;};return a40_0x3b1c();}function a40_0x1f6a(_0x590e88,_0xed2833){const _0x3b1c19=a40_0x3b1c();return a40_0x1f6a=function(_0x1f6a05,_0x1f6403){_0x1f6a05=_0x1f6a05-0xb1;let _0x18a13a=_0x3b1c19[_0x1f6a05];return _0x18a13a;},a40_0x1f6a(_0x590e88,_0xed2833);}class Logger{[a40_0xb1b111(0xc9)];[a40_0xb1b111(0xca)];constructor(){const _0x3e753b=a40_0xb1b111;this[_0x3e753b(0xca)]='';}[a40_0xb1b111(0xc7)](){const _0x52f48e=a40_0xb1b111,_0x41d3d0=a40_0x4b4d31[_0x52f48e(0xc6)](this[_0x52f48e(0xca)]);!a40_0x366046[_0x52f48e(0xe8)](_0x41d3d0)&&a40_0x366046[_0x52f48e(0xc5)](_0x41d3d0,{'recursive':!![]});const _0x4f0a70=a40_0x5d548e['format'][_0x52f48e(0xc8)](a40_0x5d548e[_0x52f48e(0xb9)][_0x52f48e(0xd9)](),a40_0x5d548e[_0x52f48e(0xb9)][_0x52f48e(0xcc)]({'stack':!![]}),a40_0x5d548e[_0x52f48e(0xb9)][_0x52f48e(0xc2)](_0x3159d0=>{const _0x1a703d=_0x52f48e,_0x30bdae={'timestamp':_0x3159d0[_0x1a703d(0xd9)]||new Date()[_0x1a703d(0xd2)](),'level':_0x3159d0['level']||_0x1a703d(0xe6),'command':_0x3159d0[_0x1a703d(0xbf)]||_0x1a703d(0xd6),'message':_0x3159d0[_0x1a703d(0xe2)]||'','duration':_0x3159d0[_0x1a703d(0xb8)]||undefined,'details':_0x3159d0[_0x1a703d(0xcb)]||undefined};return JSON[_0x1a703d(0xc3)](_0x30bdae);}));this[_0x52f48e(0xc9)]=a40_0x5d548e[_0x52f48e(0xb3)]({'level':'info','format':_0x4f0a70,'transports':[new a40_0x5d548e[(_0x52f48e(0xb5))][(_0x52f48e(0xe4))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a40_0x5d548e[_0x52f48e(0xea)]({'success':_0x52f48e(0xda),'error':'red','warn':_0x52f48e(0xdb),'info':_0x52f48e(0xd7)});}[a40_0xb1b111(0xe1)](_0x20a899){const _0x2e9d11=a40_0xb1b111;this[_0x2e9d11(0xca)]=a40_0x4b4d31[_0x2e9d11(0xe0)](_0x20a899,_0x2e9d11(0xd0)),this[_0x2e9d11(0xc9)]&&this[_0x2e9d11(0xc9)][_0x2e9d11(0xcf)](),this['initWinstonLogger']();}[a40_0xb1b111(0xe6)](_0x16947a,_0x13a37c,_0x50f85b){const _0x46e940=a40_0xb1b111;if(!this['logFilePath']||!this[_0x46e940(0xc9)])return;this[_0x46e940(0xc9)]['info'](_0x13a37c,{'command':_0x16947a,'details':_0x50f85b});}[a40_0xb1b111(0xbd)](_0xaf9410,_0xa5eb22,_0x252bcd,_0x2c0fc4){const _0x2f4eff=a40_0xb1b111;if(!this[_0x2f4eff(0xca)]||!this[_0x2f4eff(0xc9)])return;this[_0x2f4eff(0xc9)]['log'](_0x2f4eff(0xe6),_0xa5eb22,{'level':_0x2f4eff(0xbd),'command':_0xaf9410,'duration':_0x252bcd,'details':_0x2c0fc4});}['error'](_0x193c1a,_0x5cb20b,_0x3067ce){const _0x1a8c6d=a40_0xb1b111;if(!this['logFilePath']||!this[_0x1a8c6d(0xc9)])return;this['winstonLogger'][_0x1a8c6d(0xbe)](_0x5cb20b,{'command':_0x193c1a,'details':_0x3067ce});}[a40_0xb1b111(0xc0)](_0x58f1b0,_0x445379,_0x413372){const _0x418b10=a40_0xb1b111;if(!this[_0x418b10(0xca)]||!this[_0x418b10(0xc9)])return;this['winstonLogger'][_0x418b10(0xc0)](_0x445379,{'command':_0x58f1b0,'details':_0x413372});}async[a40_0xb1b111(0xe7)](_0x2acfc8,_0xe7350c,_0x277122){const _0x3df681=a40_0xb1b111,_0x56bb1b=Date['now']();this[_0x3df681(0xe6)](_0x2acfc8,_0x3df681(0xb6)+_0xe7350c);try{const _0x4a4c5b=await _0x277122(),_0x4760e5=Date[_0x3df681(0xb1)]()-_0x56bb1b;return this[_0x3df681(0xbd)](_0x2acfc8,_0x3df681(0xdf)+_0xe7350c,_0x4760e5),_0x4a4c5b;}catch(_0x27cee5){const _0x38847a=Date[_0x3df681(0xb1)]()-_0x56bb1b;this['error'](_0x2acfc8,'失败:\x20'+_0xe7350c,{'error':_0x27cee5 instanceof Error?_0x27cee5[_0x3df681(0xe2)]:String(_0x27cee5),'duration':_0x38847a});throw _0x27cee5;}}[a40_0xb1b111(0xba)](){const _0x17d354=a40_0xb1b111;try{if(!a40_0x366046['existsSync'](this[_0x17d354(0xca)]))return[];const _0xbdebd9=a40_0x366046[_0x17d354(0xdd)](this[_0x17d354(0xca)],_0x17d354(0xc1));return _0xbdebd9[_0x17d354(0xe5)]('\x0a')[_0x17d354(0xbb)](_0x103e45=>_0x103e45['trim']())[_0x17d354(0xbc)](_0x5a936c=>JSON[_0x17d354(0xcd)](_0x5a936c));}catch(_0x57cf6e){return console[_0x17d354(0xc0)](_0x17d354(0xb7),_0x57cf6e),[];}}[a40_0xb1b111(0xd1)](){const _0x89a8c7=a40_0xb1b111;try{a40_0x366046[_0x89a8c7(0xe8)](this[_0x89a8c7(0xca)])&&a40_0x366046['writeFileSync'](this[_0x89a8c7(0xca)],'',_0x89a8c7(0xc1));}catch(_0xd9f54f){console[_0x89a8c7(0xc0)](_0x89a8c7(0xe9),_0xd9f54f);}}[a40_0xb1b111(0xd4)](){const _0x5029a3=a40_0xb1b111;return this[_0x5029a3(0xc9)];}}export const logger=new Logger();
1
+ const a40_0x3b978a=a40_0x38c0;(function(_0x1d1044,_0x3614af){const _0x3cd2bb=a40_0x38c0,_0xee15aa=_0x1d1044();while(!![]){try{const _0x1b38d9=parseInt(_0x3cd2bb(0x1f3))/0x1+parseInt(_0x3cd2bb(0x205))/0x2*(parseInt(_0x3cd2bb(0x1e9))/0x3)+-parseInt(_0x3cd2bb(0x1f1))/0x4*(parseInt(_0x3cd2bb(0x1ef))/0x5)+-parseInt(_0x3cd2bb(0x1dc))/0x6*(parseInt(_0x3cd2bb(0x1e8))/0x7)+parseInt(_0x3cd2bb(0x1fe))/0x8+parseInt(_0x3cd2bb(0x1df))/0x9+parseInt(_0x3cd2bb(0x208))/0xa*(-parseInt(_0x3cd2bb(0x1ec))/0xb);if(_0x1b38d9===_0x3614af)break;else _0xee15aa['push'](_0xee15aa['shift']());}catch(_0x3d46d1){_0xee15aa['push'](_0xee15aa['shift']());}}}(a40_0xdad8,0xd0436));import a40_0x3eeac6 from'winston';import a40_0x23a1a4 from'node:fs';function a40_0xdad8(){const _0x240a46=['713474ozoNPQ','stringify','readFileSync','14510NxXcbA','error','dirname','.lovrabet.log','unknown','initWinstonLogger','File','green','getWinstonInstance','174nLVHJm','existsSync','warn','154899HSRcPE','red','timestamp','command','writeFileSync','Failed\x20to\x20clear\x20logs:','开始执行:\x20','map','duration','8617xuspRj','9RroTQL','level','winstonLogger','21439xlBGPn','now','Failed\x20to\x20read\x20logs:','5150wuOYlu','logFilePath','1348tfuENC','trim','1336909njIZDC','format','combine','log','toISOString','parse','info','logTask','details','yellow','printf','13116184cwfzXu','clear','addColors','message','utf8','transports','success'];a40_0xdad8=function(){return _0x240a46;};return a40_0xdad8();}function a40_0x38c0(_0x327462,_0x4042fe){const _0xdad841=a40_0xdad8();return a40_0x38c0=function(_0x38c0da,_0x576c07){_0x38c0da=_0x38c0da-0x1db;let _0x483db0=_0xdad841[_0x38c0da];return _0x483db0;},a40_0x38c0(_0x327462,_0x4042fe);}import a40_0x2d51fa from'node:path';class Logger{[a40_0x3b978a(0x1eb)];[a40_0x3b978a(0x1f0)];constructor(){const _0x25a23e=a40_0x3b978a;this[_0x25a23e(0x1f0)]='';}[a40_0x3b978a(0x20d)](){const _0x4fb63d=a40_0x3b978a,_0x35f2a1=a40_0x2d51fa[_0x4fb63d(0x20a)](this[_0x4fb63d(0x1f0)]);!a40_0x23a1a4[_0x4fb63d(0x1dd)](_0x35f2a1)&&a40_0x23a1a4['mkdirSync'](_0x35f2a1,{'recursive':!![]});const _0x50d874=a40_0x3eeac6[_0x4fb63d(0x1f4)][_0x4fb63d(0x1f5)](a40_0x3eeac6[_0x4fb63d(0x1f4)][_0x4fb63d(0x1e1)](),a40_0x3eeac6[_0x4fb63d(0x1f4)]['errors']({'stack':!![]}),a40_0x3eeac6[_0x4fb63d(0x1f4)][_0x4fb63d(0x1fd)](_0x33e78d=>{const _0xe142d8=_0x4fb63d,_0x1015fe={'timestamp':_0x33e78d['timestamp']||new Date()[_0xe142d8(0x1f7)](),'level':_0x33e78d[_0xe142d8(0x1ea)]||_0xe142d8(0x1f9),'command':_0x33e78d[_0xe142d8(0x1e2)]||_0xe142d8(0x20c),'message':_0x33e78d[_0xe142d8(0x201)]||'','duration':_0x33e78d[_0xe142d8(0x1e7)]||undefined,'details':_0x33e78d[_0xe142d8(0x1fb)]||undefined};return JSON[_0xe142d8(0x206)](_0x1015fe);}));this[_0x4fb63d(0x1eb)]=a40_0x3eeac6['createLogger']({'level':_0x4fb63d(0x1f9),'format':_0x50d874,'transports':[new a40_0x3eeac6[(_0x4fb63d(0x203))][(_0x4fb63d(0x20e))]({'filename':this[_0x4fb63d(0x1f0)],'level':_0x4fb63d(0x1f9)})],'silent':![]}),a40_0x3eeac6[_0x4fb63d(0x200)]({'success':_0x4fb63d(0x20f),'error':_0x4fb63d(0x1e0),'warn':_0x4fb63d(0x1fc),'info':'blue'});}['setLogPath'](_0x6625b2){const _0x14052d=a40_0x3b978a;this['logFilePath']=a40_0x2d51fa['join'](_0x6625b2,_0x14052d(0x20b)),this[_0x14052d(0x1eb)]&&this[_0x14052d(0x1eb)][_0x14052d(0x1ff)](),this[_0x14052d(0x20d)]();}['info'](_0x4be2ed,_0x51c827,_0x339435){const _0x5aebe0=a40_0x3b978a;if(!this[_0x5aebe0(0x1f0)]||!this[_0x5aebe0(0x1eb)])return;this[_0x5aebe0(0x1eb)][_0x5aebe0(0x1f9)](_0x51c827,{'command':_0x4be2ed,'details':_0x339435});}[a40_0x3b978a(0x204)](_0xfad895,_0x4fa848,_0x2c8199,_0x2eff7a){const _0x35924f=a40_0x3b978a;if(!this[_0x35924f(0x1f0)]||!this[_0x35924f(0x1eb)])return;this[_0x35924f(0x1eb)][_0x35924f(0x1f6)]('info',_0x4fa848,{'level':'success','command':_0xfad895,'duration':_0x2c8199,'details':_0x2eff7a});}[a40_0x3b978a(0x209)](_0x3def66,_0x51e3d6,_0x1cdfd9){const _0x23d2e3=a40_0x3b978a;if(!this[_0x23d2e3(0x1f0)]||!this[_0x23d2e3(0x1eb)])return;this[_0x23d2e3(0x1eb)]['error'](_0x51e3d6,{'command':_0x3def66,'details':_0x1cdfd9});}[a40_0x3b978a(0x1de)](_0x1d93f6,_0xd759b9,_0x327d6b){const _0x5a091b=a40_0x3b978a;if(!this[_0x5a091b(0x1f0)]||!this[_0x5a091b(0x1eb)])return;this['winstonLogger'][_0x5a091b(0x1de)](_0xd759b9,{'command':_0x1d93f6,'details':_0x327d6b});}async[a40_0x3b978a(0x1fa)](_0x37a6ef,_0x3c3ea7,_0x26739a){const _0x51f5ee=a40_0x3b978a,_0x47670a=Date['now']();this[_0x51f5ee(0x1f9)](_0x37a6ef,_0x51f5ee(0x1e5)+_0x3c3ea7);try{const _0x577028=await _0x26739a(),_0x3a537a=Date[_0x51f5ee(0x1ed)]()-_0x47670a;return this[_0x51f5ee(0x204)](_0x37a6ef,'完成:\x20'+_0x3c3ea7,_0x3a537a),_0x577028;}catch(_0x59dd49){const _0x6a91ae=Date['now']()-_0x47670a;this[_0x51f5ee(0x209)](_0x37a6ef,'失败:\x20'+_0x3c3ea7,{'error':_0x59dd49 instanceof Error?_0x59dd49[_0x51f5ee(0x201)]:String(_0x59dd49),'duration':_0x6a91ae});throw _0x59dd49;}}['readLogs'](){const _0x347e09=a40_0x3b978a;try{if(!a40_0x23a1a4[_0x347e09(0x1dd)](this['logFilePath']))return[];const _0x18d8e0=a40_0x23a1a4[_0x347e09(0x207)](this[_0x347e09(0x1f0)],_0x347e09(0x202));return _0x18d8e0['split']('\x0a')['filter'](_0x1c72aa=>_0x1c72aa[_0x347e09(0x1f2)]())[_0x347e09(0x1e6)](_0x3c7ba9=>JSON[_0x347e09(0x1f8)](_0x3c7ba9));}catch(_0x4cf216){return console[_0x347e09(0x1de)](_0x347e09(0x1ee),_0x4cf216),[];}}['clearLogs'](){const _0x3ccaf2=a40_0x3b978a;try{a40_0x23a1a4[_0x3ccaf2(0x1dd)](this[_0x3ccaf2(0x1f0)])&&a40_0x23a1a4[_0x3ccaf2(0x1e3)](this[_0x3ccaf2(0x1f0)],'','utf8');}catch(_0x22029e){console['warn'](_0x3ccaf2(0x1e4),_0x22029e);}}[a40_0x3b978a(0x1db)](){const _0x4edc39=a40_0x3b978a;return this[_0x4edc39(0x1eb)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a41_0x9a9e8e=a41_0x49d4;(function(_0x5c5989,_0x43e33b){const _0x99945b=a41_0x49d4,_0x171680=_0x5c5989();while(!![]){try{const _0x3fb3f0=parseInt(_0x99945b(0x1e8))/0x1+parseInt(_0x99945b(0x1cc))/0x2+parseInt(_0x99945b(0x1de))/0x3*(-parseInt(_0x99945b(0x1f4))/0x4)+-parseInt(_0x99945b(0x1e3))/0x5+-parseInt(_0x99945b(0x1d7))/0x6*(-parseInt(_0x99945b(0x1ce))/0x7)+parseInt(_0x99945b(0x1d1))/0x8*(-parseInt(_0x99945b(0x1f3))/0x9)+parseInt(_0x99945b(0x1e9))/0xa*(-parseInt(_0x99945b(0x1ed))/0xb);if(_0x3fb3f0===_0x43e33b)break;else _0x171680['push'](_0x171680['shift']());}catch(_0xeab82c){_0x171680['push'](_0x171680['shift']());}}}(a41_0x149e,0xcd65f));import a41_0x4094ac from'node:fs';import a41_0x265e5b from'node:path';import{logger}from'./logger.js';function a41_0x149e(){const _0xf275=['message','indexOf','error','src','addPageRoute','toUpperCase','2634969rRnPZj','promises','slice','toComponentName','includes','5006460EHbwqb','import\x20','路由配置更新完成','utf8','readFile','1076599RkeOvC','60XPpieb','match','index.tsx','lastIndexOf','2009282CkTeip','split','路由配置更新失败','existsSync','路由文件不存在:\x20','path:\x20\x22','532422XPAfHI','4BoqjMS','now','success','index','charAt','routerFilePath','开始更新路由配置','2958276xvRERf','info','877849nRdcup','addRoute','addImport','16wCurAP','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','join','router','previewChanges','length','66lAzqoG'];a41_0x149e=function(){return _0xf275;};return a41_0x149e();}function a41_0x49d4(_0xa40773,_0x20e37d){const _0x149e08=a41_0x149e();return a41_0x49d4=function(_0x49d4bc,_0x2de8b0){_0x49d4bc=_0x49d4bc-0x1cc;let _0x4bbf37=_0x149e08[_0x49d4bc];return _0x4bbf37;},a41_0x49d4(_0xa40773,_0x20e37d);}export class RouterUpdater{['routerFilePath'];constructor(_0x29136a){const _0x56c771=a41_0x49d4;this[_0x56c771(0x1f9)]=a41_0x265e5b[_0x56c771(0x1d3)](_0x29136a,_0x56c771(0x1db),_0x56c771(0x1d4),_0x56c771(0x1eb));}async[a41_0x9a9e8e(0x1dc)](_0x18870b,_0x4e0bd6){const _0xb2dfd6=a41_0x9a9e8e;if(!a41_0x4094ac[_0xb2dfd6(0x1f0)](this[_0xb2dfd6(0x1f9)]))throw new Error(_0xb2dfd6(0x1f1)+this[_0xb2dfd6(0x1f9)]);const _0x20fbbf=Date[_0xb2dfd6(0x1f5)]();logger[_0xb2dfd6(0x1cd)](_0xb2dfd6(0x1d4),_0xb2dfd6(0x1fa),{'pageName':_0x18870b,'routePath':_0x4e0bd6,'file':this[_0xb2dfd6(0x1f9)]});try{const _0x4e24a8=await a41_0x4094ac[_0xb2dfd6(0x1df)]['readFile'](this[_0xb2dfd6(0x1f9)],_0xb2dfd6(0x1e6)),_0x3af9ab=this[_0xb2dfd6(0x1e1)](_0x18870b),_0x126b7f=this[_0xb2dfd6(0x1d0)](_0x4e24a8,_0x3af9ab,_0x18870b),_0xbd494=this[_0xb2dfd6(0x1cf)](_0x126b7f,_0x4e0bd6,_0x3af9ab);await a41_0x4094ac['promises']['writeFile'](this[_0xb2dfd6(0x1f9)],_0xbd494,_0xb2dfd6(0x1e6));const _0x39030e=Date['now']()-_0x20fbbf;logger[_0xb2dfd6(0x1f6)](_0xb2dfd6(0x1d4),_0xb2dfd6(0x1e5),_0x39030e,{'pageName':_0x18870b,'routePath':_0x4e0bd6,'componentName':_0x3af9ab});}catch(_0x25b1de){const _0x336789=Date[_0xb2dfd6(0x1f5)]()-_0x20fbbf;logger[_0xb2dfd6(0x1da)](_0xb2dfd6(0x1d4),_0xb2dfd6(0x1ef),{'pageName':_0x18870b,'routePath':_0x4e0bd6,'error':_0x25b1de instanceof Error?_0x25b1de[_0xb2dfd6(0x1d8)]:String(_0x25b1de),'duration':_0x336789});throw _0x25b1de;}}[a41_0x9a9e8e(0x1e1)](_0x4956e6){const _0x486b0e=a41_0x9a9e8e;return _0x4956e6[_0x486b0e(0x1ee)]('-')['map'](_0x23be6b=>_0x23be6b[_0x486b0e(0x1f8)](0x0)[_0x486b0e(0x1dd)]()+_0x23be6b[_0x486b0e(0x1e0)](0x1)['toLowerCase']())[_0x486b0e(0x1d3)]('');}[a41_0x9a9e8e(0x1d0)](_0x1b57a2,_0x56e4c5,_0x4b2d14){const _0x429d5d=a41_0x9a9e8e,_0x3b6e0b=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x206386=_0x1b57a2[_0x429d5d(0x1ea)](_0x3b6e0b)||[],_0x2d23ac=_0x429d5d(0x1e4)+_0x56e4c5+'\x20from\x20\x22../pages/'+_0x4b2d14+'\x22;';if(_0x1b57a2[_0x429d5d(0x1e2)](_0x2d23ac))return _0x1b57a2;if(_0x206386[_0x429d5d(0x1d6)]>0x0){const _0x218539=_0x206386[_0x206386[_0x429d5d(0x1d6)]-0x1];if(_0x218539){const _0x9eb143=_0x1b57a2['lastIndexOf'](_0x218539),_0x34e86f=_0x9eb143+_0x218539['length'];return _0x1b57a2[_0x429d5d(0x1e0)](0x0,_0x34e86f)+_0x2d23ac+'\x0a'+_0x1b57a2[_0x429d5d(0x1e0)](_0x34e86f);}}const _0x1921b5=_0x1b57a2[_0x429d5d(0x1ea)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x1921b5&&_0x1921b5[_0x429d5d(0x1f7)]!==undefined){const _0xda759d=_0x1921b5[_0x429d5d(0x1f7)]+_0x1921b5[0x0]['length'];return _0x1b57a2[_0x429d5d(0x1e0)](0x0,_0xda759d)+_0x2d23ac+'\x0a'+_0x1b57a2[_0x429d5d(0x1e0)](_0xda759d);}return _0x1b57a2;}[a41_0x9a9e8e(0x1cf)](_0x4d7210,_0x14e8b3,_0x1bcbc3){const _0x1a5f52=a41_0x9a9e8e,_0x14cf67='\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22'+_0x14e8b3+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<'+_0x1bcbc3+_0x1a5f52(0x1d2);if(_0x4d7210[_0x1a5f52(0x1e2)](_0x1a5f52(0x1f2)+_0x14e8b3+'\x22'))return _0x4d7210;const _0x4ba2a7=/children:\s*\[([\s\S]*?)\]/,_0x40dc54=_0x4d7210[_0x1a5f52(0x1ea)](_0x4ba2a7);if(!_0x40dc54||_0x40dc54[_0x1a5f52(0x1f7)]===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x2d2821=_0x40dc54[0x1],_0x132be5=_0x40dc54[_0x1a5f52(0x1f7)]+_0x40dc54[0x0][_0x1a5f52(0x1d9)]('[')+0x1,_0x2a1291=_0x2d2821?.[_0x1a5f52(0x1ea)](/\{[\s\S]*?\},/g)||[];if(_0x2a1291[_0x1a5f52(0x1d6)]>0x0){const _0x221e7d=_0x2a1291[_0x2a1291[_0x1a5f52(0x1d6)]-0x1];if(_0x221e7d){const _0x5288a0=_0x4d7210[_0x1a5f52(0x1ec)](_0x221e7d),_0x333c8d=_0x5288a0+_0x221e7d[_0x1a5f52(0x1d6)];return _0x4d7210[_0x1a5f52(0x1e0)](0x0,_0x333c8d)+'\x0a'+_0x14cf67+_0x4d7210[_0x1a5f52(0x1e0)](_0x333c8d);}}return _0x4d7210['slice'](0x0,_0x132be5)+'\x0a'+_0x14cf67+_0x4d7210[_0x1a5f52(0x1e0)](_0x132be5);}async[a41_0x9a9e8e(0x1d5)](_0x56eabf,_0x255989){const _0x90401b=a41_0x9a9e8e;if(!a41_0x4094ac['existsSync'](this[_0x90401b(0x1f9)]))throw new Error(_0x90401b(0x1f1)+this[_0x90401b(0x1f9)]);const _0x3af2c1=await a41_0x4094ac['promises'][_0x90401b(0x1e7)](this[_0x90401b(0x1f9)],_0x90401b(0x1e6)),_0x4e99d1=this[_0x90401b(0x1e1)](_0x56eabf);let _0x911922=this[_0x90401b(0x1d0)](_0x3af2c1,_0x4e99d1,_0x56eabf);return _0x911922=this[_0x90401b(0x1cf)](_0x911922,_0x255989,_0x4e99d1),_0x911922;}}
1
+ const a41_0x6037ed=a41_0x482e;function a41_0x5d40(){const _0x1b9cbf=['\x20from\x20\x22../pages/','charAt','map','531486GUPgio','writeFile','now','toComponentName','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','addPageRoute','6aMRiWT','2144165GhDsmR','path:\x20\x22','2209536bfuyEE','includes','toUpperCase','addImport','slice','index','src','success','readFile','existsSync','56248vjLqRl','1719oGBkPR','868538knjHXM','router','未找到路由配置的\x20children\x20数组','previewChanges','length','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','开始更新路由配置','info','message','match','路由文件不存在:\x20','lastIndexOf','utf8','indexOf','1944735QNplqZ','路由配置更新失败','routerFilePath','路由配置更新完成','join','promises','index.tsx','addRoute','242308JVdQdX','toLowerCase'];a41_0x5d40=function(){return _0x1b9cbf;};return a41_0x5d40();}(function(_0x1a607c,_0x2511ee){const _0x378993=a41_0x482e,_0x10bb4d=_0x1a607c();while(!![]){try{const _0x26b403=parseInt(_0x378993(0x10a))/0x1+-parseInt(_0x378993(0xf5))/0x2+-parseInt(_0x378993(0xe8))/0x3+-parseInt(_0x378993(0xf0))/0x4+-parseInt(_0x378993(0xfc))/0x5*(parseInt(_0x378993(0xfb))/0x6)+-parseInt(_0x378993(0xfe))/0x7+-parseInt(_0x378993(0x108))/0x8*(-parseInt(_0x378993(0x109))/0x9);if(_0x26b403===_0x2511ee)break;else _0x10bb4d['push'](_0x10bb4d['shift']());}catch(_0x3c2afc){_0x10bb4d['push'](_0x10bb4d['shift']());}}}(a41_0x5d40,0x7837d));function a41_0x482e(_0xd528ce,_0x226d5a){const _0x5d402b=a41_0x5d40();return a41_0x482e=function(_0x482ec9,_0x2bcbe8){_0x482ec9=_0x482ec9-0xe0;let _0x530a18=_0x5d402b[_0x482ec9];return _0x530a18;},a41_0x482e(_0xd528ce,_0x226d5a);}import a41_0x5973f1 from'node:fs';import a41_0x2835fd from'node:path';import{logger}from'./logger.js';export class RouterUpdater{['routerFilePath'];constructor(_0x478503){const _0xe454f8=a41_0x482e;this['routerFilePath']=a41_0x2835fd[_0xe454f8(0xec)](_0x478503,_0xe454f8(0x104),_0xe454f8(0x10b),_0xe454f8(0xee));}async[a41_0x6037ed(0xfa)](_0x38b7aa,_0xde9671){const _0x33e550=a41_0x6037ed;if(!a41_0x5973f1[_0x33e550(0x107)](this[_0x33e550(0xea)]))throw new Error(_0x33e550(0xe4)+this['routerFilePath']);const _0x5cbf2d=Date[_0x33e550(0xf7)]();logger[_0x33e550(0xe1)](_0x33e550(0x10b),_0x33e550(0xe0),{'pageName':_0x38b7aa,'routePath':_0xde9671,'file':this[_0x33e550(0xea)]});try{const _0x44e5b9=await a41_0x5973f1['promises'][_0x33e550(0x106)](this['routerFilePath'],_0x33e550(0xe6)),_0x486c24=this[_0x33e550(0xf8)](_0x38b7aa),_0x3f5e64=this['addImport'](_0x44e5b9,_0x486c24,_0x38b7aa),_0x295f6a=this[_0x33e550(0xef)](_0x3f5e64,_0xde9671,_0x486c24);await a41_0x5973f1[_0x33e550(0xed)][_0x33e550(0xf6)](this['routerFilePath'],_0x295f6a,'utf8');const _0x5a3cd0=Date[_0x33e550(0xf7)]()-_0x5cbf2d;logger[_0x33e550(0x105)](_0x33e550(0x10b),_0x33e550(0xeb),_0x5a3cd0,{'pageName':_0x38b7aa,'routePath':_0xde9671,'componentName':_0x486c24});}catch(_0x2d0e92){const _0x1c04e8=Date[_0x33e550(0xf7)]()-_0x5cbf2d;logger['error'](_0x33e550(0x10b),_0x33e550(0xe9),{'pageName':_0x38b7aa,'routePath':_0xde9671,'error':_0x2d0e92 instanceof Error?_0x2d0e92[_0x33e550(0xe2)]:String(_0x2d0e92),'duration':_0x1c04e8});throw _0x2d0e92;}}[a41_0x6037ed(0xf8)](_0x5bd7ff){const _0x3cd084=a41_0x6037ed;return _0x5bd7ff['split']('-')[_0x3cd084(0xf4)](_0xe8636c=>_0xe8636c[_0x3cd084(0xf3)](0x0)[_0x3cd084(0x100)]()+_0xe8636c['slice'](0x1)[_0x3cd084(0xf1)]())[_0x3cd084(0xec)]('');}[a41_0x6037ed(0x101)](_0x12bbd5,_0x4b7e0c,_0x54b471){const _0x74ff0b=a41_0x6037ed,_0x2dbbbb=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x28c657=_0x12bbd5[_0x74ff0b(0xe3)](_0x2dbbbb)||[],_0x14e97f='import\x20'+_0x4b7e0c+_0x74ff0b(0xf2)+_0x54b471+'\x22;';if(_0x12bbd5[_0x74ff0b(0xff)](_0x14e97f))return _0x12bbd5;if(_0x28c657[_0x74ff0b(0x10e)]>0x0){const _0x7a9f2d=_0x28c657[_0x28c657['length']-0x1];if(_0x7a9f2d){const _0x221640=_0x12bbd5[_0x74ff0b(0xe5)](_0x7a9f2d),_0x1687a5=_0x221640+_0x7a9f2d['length'];return _0x12bbd5[_0x74ff0b(0x102)](0x0,_0x1687a5)+_0x14e97f+'\x0a'+_0x12bbd5[_0x74ff0b(0x102)](_0x1687a5);}}const _0x2b5073=_0x12bbd5[_0x74ff0b(0xe3)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x2b5073&&_0x2b5073[_0x74ff0b(0x103)]!==undefined){const _0x392aad=_0x2b5073['index']+_0x2b5073[0x0][_0x74ff0b(0x10e)];return _0x12bbd5[_0x74ff0b(0x102)](0x0,_0x392aad)+_0x14e97f+'\x0a'+_0x12bbd5[_0x74ff0b(0x102)](_0x392aad);}return _0x12bbd5;}[a41_0x6037ed(0xef)](_0x316974,_0x35397b,_0x2a6cf9){const _0x494327=a41_0x6037ed,_0x34a9d3='\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22'+_0x35397b+_0x494327(0x10f)+_0x2a6cf9+_0x494327(0xf9);if(_0x316974[_0x494327(0xff)](_0x494327(0xfd)+_0x35397b+'\x22'))return _0x316974;const _0x5b74d9=/children:\s*\[([\s\S]*?)\]/,_0x4da162=_0x316974['match'](_0x5b74d9);if(!_0x4da162||_0x4da162[_0x494327(0x103)]===undefined)throw new Error(_0x494327(0x10c));const _0x465d56=_0x4da162[0x1],_0xdb947=_0x4da162[_0x494327(0x103)]+_0x4da162[0x0][_0x494327(0xe7)]('[')+0x1,_0x32282a=_0x465d56?.[_0x494327(0xe3)](/\{[\s\S]*?\},/g)||[];if(_0x32282a['length']>0x0){const _0x12eab8=_0x32282a[_0x32282a[_0x494327(0x10e)]-0x1];if(_0x12eab8){const _0x203f6b=_0x316974[_0x494327(0xe5)](_0x12eab8),_0x5bdeab=_0x203f6b+_0x12eab8[_0x494327(0x10e)];return _0x316974[_0x494327(0x102)](0x0,_0x5bdeab)+'\x0a'+_0x34a9d3+_0x316974['slice'](_0x5bdeab);}}return _0x316974[_0x494327(0x102)](0x0,_0xdb947)+'\x0a'+_0x34a9d3+_0x316974['slice'](_0xdb947);}async[a41_0x6037ed(0x10d)](_0x508090,_0x568585){const _0x115bb3=a41_0x6037ed;if(!a41_0x5973f1[_0x115bb3(0x107)](this['routerFilePath']))throw new Error(_0x115bb3(0xe4)+this['routerFilePath']);const _0x52d707=await a41_0x5973f1[_0x115bb3(0xed)][_0x115bb3(0x106)](this['routerFilePath'],_0x115bb3(0xe6)),_0x2533f0=this['toComponentName'](_0x508090);let _0x28c385=this[_0x115bb3(0x101)](_0x52d707,_0x2533f0,_0x508090);return _0x28c385=this[_0x115bb3(0xef)](_0x28c385,_0x568585,_0x2533f0),_0x28c385;}}
@@ -1 +1 @@
1
- const a42_0x49b78e=a42_0x4b83;(function(_0x1450b6,_0x5e208d){const _0x26a2bb=a42_0x4b83,_0x341af9=_0x1450b6();while(!![]){try{const _0x715f08=-parseInt(_0x26a2bb(0x16f))/0x1+parseInt(_0x26a2bb(0x16c))/0x2*(-parseInt(_0x26a2bb(0x17e))/0x3)+parseInt(_0x26a2bb(0x196))/0x4+-parseInt(_0x26a2bb(0x174))/0x5+-parseInt(_0x26a2bb(0x185))/0x6*(parseInt(_0x26a2bb(0x189))/0x7)+parseInt(_0x26a2bb(0x171))/0x8*(-parseInt(_0x26a2bb(0x16b))/0x9)+-parseInt(_0x26a2bb(0x19d))/0xa*(-parseInt(_0x26a2bb(0x198))/0xb);if(_0x715f08===_0x5e208d)break;else _0x341af9['push'](_0x341af9['shift']());}catch(_0x2ade5c){_0x341af9['push'](_0x341af9['shift']());}}}(a42_0x5c4f,0x500dd));import a42_0x16afce from'node:fs';function a42_0x4b83(_0x3a87ce,_0x23c547){const _0x5c4f0a=a42_0x5c4f();return a42_0x4b83=function(_0x4b8376,_0x5bb2e3){_0x4b8376=_0x4b8376-0x166;let _0x528b91=_0x5c4f0a[_0x4b8376];return _0x528b91;},a42_0x4b83(_0x3a87ce,_0x23c547);}import a42_0xae1664 from'node:path';function a42_0x5c4f(){const _0x4cb297=['模板内容替换失败','info','stringify','copyFile','4460ruXBpE','.jsx','开始处理模板内容替换','message','2-digit','split','.md','.js','now','readFile','3761820xlzwkR','430174uBNReh','toLocaleString','readdir','625598UQvUrk','api','8iUXGHh','join','keys','2583290SsDYMt','error','processDirectory','charAt','name','extname','template','slice','.tpl','map','3plzzBp','success','endsWith','toLocaleDateString','numeric','promises','processFile','198TDHoah','includes','.ts','writeFile','138761agiRdJ','toComponentName','utf8','toDisplayTitle','replaceContent','.tsx','YourModel','.json','toUpperCase','toLowerCase','replace','mkdir','.css','2107748MFPYBI','pop','55011xVRJEW'];a42_0x5c4f=function(){return _0x4cb297;};return a42_0x5c4f();}import{logger}from'./logger.js';export class TemplateReplacer{static[a42_0x49b78e(0x18a)](_0x435fab){const _0x2cfe0c=a42_0x49b78e,_0x3b5e08=_0x435fab[_0x2cfe0c(0x166)]('/')[_0x2cfe0c(0x197)]()||_0x435fab;return _0x3b5e08['split']('-')[_0x2cfe0c(0x17d)](_0x2cbb9c=>_0x2cbb9c[_0x2cfe0c(0x177)](0x0)[_0x2cfe0c(0x191)]()+_0x2cbb9c[_0x2cfe0c(0x17b)](0x1)['toLowerCase']())['join']('');}static[a42_0x49b78e(0x18c)](_0x504d0){const _0x2569c6=a42_0x49b78e,_0x538baa=_0x504d0['split']('/')[_0x2569c6(0x197)]()||_0x504d0;return _0x538baa[_0x2569c6(0x166)]('-')['map'](_0x3cb26c=>_0x3cb26c['charAt'](0x0)[_0x2569c6(0x191)]()+_0x3cb26c[_0x2569c6(0x17b)](0x1)[_0x2569c6(0x192)]())[_0x2569c6(0x172)]('\x20');}static[a42_0x49b78e(0x18d)](_0x1ec2ad,_0x115b63,_0x20faca){const _0x3b0afe=a42_0x49b78e,_0x3045e5=this[_0x3b0afe(0x18a)](_0x115b63),_0x275207=this[_0x3b0afe(0x18c)](_0x115b63),_0x4ae3d6=new Date(),_0x59ce71=_0x4ae3d6[_0x3b0afe(0x16d)](undefined,{'year':_0x3b0afe(0x182),'month':_0x3b0afe(0x1a1),'day':_0x3b0afe(0x1a1),'hour':_0x3b0afe(0x1a1),'minute':'2-digit','second':_0x3b0afe(0x1a1),'hour12':![]})[_0x3b0afe(0x193)](/\//g,'-'),_0x15d882=_0x4ae3d6[_0x3b0afe(0x181)](undefined,{'year':_0x3b0afe(0x182),'month':'2-digit','day':_0x3b0afe(0x1a1)})['replace'](/\//g,'-'),_0x21996=_0x4ae3d6['toLocaleTimeString'](undefined,{'hour12':![]});let _0x49536c=_0x1ec2ad[_0x3b0afe(0x193)](/\{ComponentName\}/g,_0x3045e5)[_0x3b0afe(0x193)](/\{DisplayTitle\}/g,_0x275207)['replace'](/\{PageName\}/g,_0x115b63)[_0x3b0afe(0x193)](/\{TemplateName\}/g,_0x20faca)['replace'](/\{CreatedAt\}/g,_0x59ce71)['replace'](/\{CreatedDate\}/g,_0x15d882)[_0x3b0afe(0x193)](/\{CreatedTime\}/g,_0x21996);return _0x49536c;}static['replaceApiContent'](_0xaf9084,_0x2d3f3a,_0xda3cca,_0x192643,_0x25cf05,_0x5a76c8,_0x385c30){const _0x566743=a42_0x49b78e,_0x387dce=new Date(),_0x1b7c53=_0x387dce['toISOString'](),_0x370018=JSON[_0x566743(0x19b)](_0xda3cca,null,0x2)[_0x566743(0x166)]('\x0a')[_0x566743(0x17b)](0x1,-0x1)[_0x566743(0x17d)](_0x5316a7=>_0x5316a7[_0x566743(0x193)](/^ /,'\x20\x20\x20\x20'))['join']('\x0a'),_0x184d0a=_0x192643||Object[_0x566743(0x173)](_0xda3cca)[0x0]||_0x566743(0x18f);let _0x4fd07a=_0xaf9084['replace'](/\{AppCode\}/g,_0x2d3f3a)['replace'](/\{ModelConfigs\}/g,_0x370018)['replace'](/\{ExampleModelName\}/g,_0x184d0a)[_0x566743(0x193)](/\{ApiFileName\}/g,_0x25cf05||_0x566743(0x170))['replace'](/\{ConfigName\}/g,_0x5a76c8||'default')[_0x566743(0x193)](/\{ClientConfigParam\}/g,_0x385c30||'')[_0x566743(0x193)](/\{CreatedAt\}/g,_0x1b7c53);return _0x4fd07a;}static async['processTemplate'](_0x127ea7,_0x1eaa08,_0x106b16,_0x2e1a8e,_0x54f6b1=!![]){const _0x46998d=a42_0x49b78e,_0x3e3198=Date['now']();try{_0x54f6b1&&logger[_0x46998d(0x19a)](_0x46998d(0x17a),_0x46998d(0x19f),{'templatePath':_0x127ea7,'targetPath':_0x1eaa08,'pageName':_0x106b16,'templateName':_0x2e1a8e});await a42_0x16afce['promises'][_0x46998d(0x194)](_0x1eaa08,{'recursive':!![]}),await this[_0x46998d(0x176)](_0x127ea7,_0x1eaa08,_0x106b16,_0x2e1a8e);if(_0x54f6b1){const _0xae7aca=Date[_0x46998d(0x169)]()-_0x3e3198;logger[_0x46998d(0x17f)]('template','模板内容替换完成',_0xae7aca,{'pageName':_0x106b16,'templateName':_0x2e1a8e});}}catch(_0x25dbf9){if(_0x54f6b1){const _0x24f00e=Date[_0x46998d(0x169)]()-_0x3e3198;logger[_0x46998d(0x175)](_0x46998d(0x17a),_0x46998d(0x199),{'templatePath':_0x127ea7,'targetPath':_0x1eaa08,'pageName':_0x106b16,'templateName':_0x2e1a8e,'error':_0x25dbf9 instanceof Error?_0x25dbf9[_0x46998d(0x1a0)]:String(_0x25dbf9),'duration':_0x24f00e});}throw _0x25dbf9;}}static async['processDirectory'](_0x4f1e2a,_0x3a8729,_0x14f2f9,_0x42160b){const _0xa26681=a42_0x49b78e,_0x11879a=await a42_0x16afce['promises'][_0xa26681(0x16e)](_0x4f1e2a,{'withFileTypes':!![]});for(const _0x425a9c of _0x11879a){const _0x551eb7=a42_0xae1664['join'](_0x4f1e2a,_0x425a9c[_0xa26681(0x178)]);let _0x1bac24=a42_0xae1664[_0xa26681(0x172)](_0x3a8729,_0x425a9c[_0xa26681(0x178)]);_0x425a9c[_0xa26681(0x178)]['endsWith']('.tpl')&&(_0x1bac24=a42_0xae1664[_0xa26681(0x172)](_0x3a8729,_0x425a9c[_0xa26681(0x178)][_0xa26681(0x193)](/\.tpl$/,'')));if(_0x425a9c['isDirectory']())await a42_0x16afce[_0xa26681(0x183)][_0xa26681(0x194)](_0x1bac24,{'recursive':!![]}),await this[_0xa26681(0x176)](_0x551eb7,_0x1bac24,_0x14f2f9,_0x42160b);else _0x425a9c['isFile']()&&await this[_0xa26681(0x184)](_0x551eb7,_0x1bac24,_0x14f2f9,_0x42160b);}}static async[a42_0x49b78e(0x184)](_0x2f2714,_0x3f265f,_0x401b4e,_0x2c1a55){const _0x12bb09=a42_0x49b78e,_0x2bb7ea=a42_0xae1664[_0x12bb09(0x179)](_0x2f2714)[_0x12bb09(0x192)]();_0x2f2714[_0x12bb09(0x180)]('.tpl')&&(_0x3f265f=_0x3f265f[_0x12bb09(0x193)](/\.tpl$/,''));const _0x29492c=[_0x12bb09(0x18e),_0x12bb09(0x187),_0x12bb09(0x19e),_0x12bb09(0x168),_0x12bb09(0x190),_0x12bb09(0x167),_0x12bb09(0x195),'.scss',_0x12bb09(0x17c)];if(_0x29492c[_0x12bb09(0x186)](_0x2bb7ea)||_0x2f2714[_0x12bb09(0x180)](_0x12bb09(0x17c))){const _0x3bf656=await a42_0x16afce[_0x12bb09(0x183)][_0x12bb09(0x16a)](_0x2f2714,_0x12bb09(0x18b)),_0x460514=this['replaceContent'](_0x3bf656,_0x401b4e,_0x2c1a55);await a42_0x16afce['promises'][_0x12bb09(0x188)](_0x3f265f,_0x460514,'utf8');}else await a42_0x16afce['promises'][_0x12bb09(0x19c)](_0x2f2714,_0x3f265f);}}
1
+ function a42_0x532e(){const _0x198f08=['mkdir','split','map','.tpl','9656460eigSKd','message','.tsx','processFile','writeFile','readFile','模板内容替换失败','isDirectory','108oTyzZv','toISOString','keys','stringify','.json','name','replaceApiContent','.ts','template','now','模板内容替换完成','8134392tegRbk','6121350ZRUISk','.js','numeric','toDisplayTitle','toUpperCase','includes','.jsx','YourModel','toLowerCase','toLocaleString','pop','api','readdir','10293864JMasQX','promises','info','charAt','endsWith','350623npdrbU','2-digit','.scss','success','开始处理模板内容替换','toLocaleDateString','48466gnSFJQ','slice','default','processDirectory','6231028nojcll','utf8','toComponentName','join','replace'];a42_0x532e=function(){return _0x198f08;};return a42_0x532e();}const a42_0x1e044f=a42_0x16e3;(function(_0x1abf7e,_0x10fcf7){const _0x36f07f=a42_0x16e3,_0x3b538b=_0x1abf7e();while(!![]){try{const _0x5c052c=parseInt(_0x36f07f(0x177))/0x1+-parseInt(_0x36f07f(0x17d))/0x2*(parseInt(_0x36f07f(0x159))/0x3)+parseInt(_0x36f07f(0x148))/0x4+-parseInt(_0x36f07f(0x165))/0x5+parseInt(_0x36f07f(0x151))/0x6+-parseInt(_0x36f07f(0x172))/0x7+parseInt(_0x36f07f(0x164))/0x8;if(_0x5c052c===_0x10fcf7)break;else _0x3b538b['push'](_0x3b538b['shift']());}catch(_0x57bc14){_0x3b538b['push'](_0x3b538b['shift']());}}}(a42_0x532e,0xec2d3));function a42_0x16e3(_0x5a1a77,_0x59fa38){const _0x532ecc=a42_0x532e();return a42_0x16e3=function(_0x16e3a7,_0x5e55f6){_0x16e3a7=_0x16e3a7-0x147;let _0x340cd2=_0x532ecc[_0x16e3a7];return _0x340cd2;},a42_0x16e3(_0x5a1a77,_0x59fa38);}import a42_0xb2cc0 from'node:fs';import a42_0x3eb393 from'node:path';import{logger}from'./logger.js';export class TemplateReplacer{static[a42_0x1e044f(0x14a)](_0x4555b8){const _0xb22fbb=a42_0x1e044f,_0x5d92aa=_0x4555b8[_0xb22fbb(0x14e)]('/')[_0xb22fbb(0x16f)]()||_0x4555b8;return _0x5d92aa['split']('-')[_0xb22fbb(0x14f)](_0x84cfc0=>_0x84cfc0['charAt'](0x0)[_0xb22fbb(0x169)]()+_0x84cfc0[_0xb22fbb(0x17e)](0x1)[_0xb22fbb(0x16d)]())[_0xb22fbb(0x14b)]('');}static[a42_0x1e044f(0x168)](_0x451aca){const _0x3516fe=a42_0x1e044f,_0x34e514=_0x451aca[_0x3516fe(0x14e)]('/')[_0x3516fe(0x16f)]()||_0x451aca;return _0x34e514['split']('-')[_0x3516fe(0x14f)](_0x1332ca=>_0x1332ca[_0x3516fe(0x175)](0x0)['toUpperCase']()+_0x1332ca[_0x3516fe(0x17e)](0x1)[_0x3516fe(0x16d)]())[_0x3516fe(0x14b)]('\x20');}static['replaceContent'](_0x15d584,_0x2c13d2,_0x43ddf6){const _0x3ff237=a42_0x1e044f,_0x236d81=this['toComponentName'](_0x2c13d2),_0xcc0d5f=this['toDisplayTitle'](_0x2c13d2),_0x4a99df=new Date(),_0xcce2f2=_0x4a99df[_0x3ff237(0x16e)](undefined,{'year':_0x3ff237(0x167),'month':_0x3ff237(0x178),'day':_0x3ff237(0x178),'hour':_0x3ff237(0x178),'minute':'2-digit','second':_0x3ff237(0x178),'hour12':![]})[_0x3ff237(0x14c)](/\//g,'-'),_0xd3794d=_0x4a99df[_0x3ff237(0x17c)](undefined,{'year':_0x3ff237(0x167),'month':_0x3ff237(0x178),'day':'2-digit'})[_0x3ff237(0x14c)](/\//g,'-'),_0x280595=_0x4a99df['toLocaleTimeString'](undefined,{'hour12':![]});let _0x4a1a49=_0x15d584[_0x3ff237(0x14c)](/\{ComponentName\}/g,_0x236d81)[_0x3ff237(0x14c)](/\{DisplayTitle\}/g,_0xcc0d5f)[_0x3ff237(0x14c)](/\{PageName\}/g,_0x2c13d2)[_0x3ff237(0x14c)](/\{TemplateName\}/g,_0x43ddf6)[_0x3ff237(0x14c)](/\{CreatedAt\}/g,_0xcce2f2)[_0x3ff237(0x14c)](/\{CreatedDate\}/g,_0xd3794d)['replace'](/\{CreatedTime\}/g,_0x280595);return _0x4a1a49;}static[a42_0x1e044f(0x15f)](_0x5254f7,_0x4ae240,_0x2fbdac,_0x1688c0,_0x1fc4f5,_0x1a3f14,_0x4ff997){const _0xec6a69=a42_0x1e044f,_0x5d3ff1=new Date(),_0x5c8770=_0x5d3ff1[_0xec6a69(0x15a)](),_0xd29412=JSON[_0xec6a69(0x15c)](_0x2fbdac,null,0x2)[_0xec6a69(0x14e)]('\x0a')[_0xec6a69(0x17e)](0x1,-0x1)[_0xec6a69(0x14f)](_0x2e3e96=>_0x2e3e96[_0xec6a69(0x14c)](/^ /,'\x20\x20\x20\x20'))[_0xec6a69(0x14b)]('\x0a'),_0x34cc68=_0x1688c0||Object[_0xec6a69(0x15b)](_0x2fbdac)[0x0]||_0xec6a69(0x16c);let _0x447db3=_0x5254f7[_0xec6a69(0x14c)](/\{AppCode\}/g,_0x4ae240)['replace'](/\{ModelConfigs\}/g,_0xd29412)['replace'](/\{ExampleModelName\}/g,_0x34cc68)['replace'](/\{ApiFileName\}/g,_0x1fc4f5||_0xec6a69(0x170))[_0xec6a69(0x14c)](/\{ConfigName\}/g,_0x1a3f14||_0xec6a69(0x17f))[_0xec6a69(0x14c)](/\{ClientConfigParam\}/g,_0x4ff997||'')[_0xec6a69(0x14c)](/\{CreatedAt\}/g,_0x5c8770);return _0x447db3;}static async['processTemplate'](_0x3aab97,_0x3ec8cd,_0x18076c,_0x2cb147,_0x345596=!![]){const _0x201408=a42_0x1e044f,_0x8a3ba=Date[_0x201408(0x162)]();try{_0x345596&&logger[_0x201408(0x174)]('template',_0x201408(0x17b),{'templatePath':_0x3aab97,'targetPath':_0x3ec8cd,'pageName':_0x18076c,'templateName':_0x2cb147});await a42_0xb2cc0['promises'][_0x201408(0x14d)](_0x3ec8cd,{'recursive':!![]}),await this[_0x201408(0x147)](_0x3aab97,_0x3ec8cd,_0x18076c,_0x2cb147);if(_0x345596){const _0x37432f=Date['now']()-_0x8a3ba;logger[_0x201408(0x17a)](_0x201408(0x161),_0x201408(0x163),_0x37432f,{'pageName':_0x18076c,'templateName':_0x2cb147});}}catch(_0x52c9a7){if(_0x345596){const _0x17061f=Date[_0x201408(0x162)]()-_0x8a3ba;logger['error'](_0x201408(0x161),_0x201408(0x157),{'templatePath':_0x3aab97,'targetPath':_0x3ec8cd,'pageName':_0x18076c,'templateName':_0x2cb147,'error':_0x52c9a7 instanceof Error?_0x52c9a7[_0x201408(0x152)]:String(_0x52c9a7),'duration':_0x17061f});}throw _0x52c9a7;}}static async[a42_0x1e044f(0x147)](_0x338890,_0x5fc9b,_0x2ecb22,_0x1f3b0b){const _0x38b0eb=a42_0x1e044f,_0x39a386=await a42_0xb2cc0[_0x38b0eb(0x173)][_0x38b0eb(0x171)](_0x338890,{'withFileTypes':!![]});for(const _0x4eaea1 of _0x39a386){const _0x3033e6=a42_0x3eb393[_0x38b0eb(0x14b)](_0x338890,_0x4eaea1['name']);let _0x216533=a42_0x3eb393[_0x38b0eb(0x14b)](_0x5fc9b,_0x4eaea1[_0x38b0eb(0x15e)]);_0x4eaea1[_0x38b0eb(0x15e)][_0x38b0eb(0x176)](_0x38b0eb(0x150))&&(_0x216533=a42_0x3eb393[_0x38b0eb(0x14b)](_0x5fc9b,_0x4eaea1[_0x38b0eb(0x15e)][_0x38b0eb(0x14c)](/\.tpl$/,'')));if(_0x4eaea1[_0x38b0eb(0x158)]())await a42_0xb2cc0['promises']['mkdir'](_0x216533,{'recursive':!![]}),await this[_0x38b0eb(0x147)](_0x3033e6,_0x216533,_0x2ecb22,_0x1f3b0b);else _0x4eaea1['isFile']()&&await this[_0x38b0eb(0x154)](_0x3033e6,_0x216533,_0x2ecb22,_0x1f3b0b);}}static async[a42_0x1e044f(0x154)](_0x3305e0,_0x8824ee,_0x19771e,_0xf33796){const _0x34feba=a42_0x1e044f,_0x4d2dac=a42_0x3eb393['extname'](_0x3305e0)['toLowerCase']();_0x3305e0['endsWith'](_0x34feba(0x150))&&(_0x8824ee=_0x8824ee[_0x34feba(0x14c)](/\.tpl$/,''));const _0x9bc3d7=[_0x34feba(0x153),_0x34feba(0x160),_0x34feba(0x16b),_0x34feba(0x166),_0x34feba(0x15d),'.md','.css',_0x34feba(0x179),_0x34feba(0x150)];if(_0x9bc3d7[_0x34feba(0x16a)](_0x4d2dac)||_0x3305e0['endsWith'](_0x34feba(0x150))){const _0x37fb9d=await a42_0xb2cc0[_0x34feba(0x173)][_0x34feba(0x156)](_0x3305e0,_0x34feba(0x149)),_0x5a38dd=this['replaceContent'](_0x37fb9d,_0x19771e,_0xf33796);await a42_0xb2cc0[_0x34feba(0x173)][_0x34feba(0x155)](_0x8824ee,_0x5a38dd,'utf8');}else await a42_0xb2cc0[_0x34feba(0x173)]['copyFile'](_0x3305e0,_0x8824ee);}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.1.6",
4
- "license": "MIT",
3
+ "version": "1.1.8",
4
+ "license": "SEE LICENSE IN LICENSE",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"
7
7
  },