@lovrabet/cli 1.1.0 → 1.1.2

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 (43) hide show
  1. package/README.md +289 -14
  2. package/lib/add-page/input-page-router.js +1 -1
  3. package/lib/add-page/main.js +1 -1
  4. package/lib/add-page/select-page-template.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/format-dataset.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/api/pull.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/logout.js +1 -1
  17. package/lib/cli.js +1 -1
  18. package/lib/cmd/build-watch.js +1 -1
  19. package/lib/cmd/build.js +1 -1
  20. package/lib/cmd/logs.js +1 -1
  21. package/lib/cmd/preview.js +1 -1
  22. package/lib/cmd/start.js +1 -1
  23. package/lib/config/config-help.js +1 -1
  24. package/lib/config/main.js +1 -1
  25. package/lib/constant/domain.js +1 -1
  26. package/lib/constant/env.js +1 -1
  27. package/lib/create-app/enhanced-guided-create.js +1 -1
  28. package/lib/create-app/format-elapsed.js +1 -1
  29. package/lib/create-app/main.js +1 -1
  30. package/lib/create-app/task-finished.js +1 -1
  31. package/lib/create-app/task-loading.js +1 -1
  32. package/lib/create-app/task-running.js +1 -1
  33. package/lib/create-app/task-time.js +1 -1
  34. package/lib/create-app/use-copy-project-template.js +1 -1
  35. package/lib/create-app/use-format-code.js +1 -1
  36. package/lib/create-app/use-install-dependencies.js +1 -1
  37. package/lib/help.js +1 -1
  38. package/lib/utils/config.js +1 -1
  39. package/lib/utils/copy-directory.js +1 -1
  40. package/lib/utils/logger.js +1 -1
  41. package/lib/utils/router-updater.js +1 -1
  42. package/lib/utils/template-replacer.js +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xa83369,_0x439a77){var _0x580c26=a29_0x28aa,_0x48e694=_0xa83369();while(!![]){try{var _0x16c894=-parseInt(_0x580c26(0x17b))/0x1+-parseInt(_0x580c26(0x171))/0x2*(-parseInt(_0x580c26(0x170))/0x3)+-parseInt(_0x580c26(0x177))/0x4*(parseInt(_0x580c26(0x16d))/0x5)+-parseInt(_0x580c26(0x172))/0x6*(parseInt(_0x580c26(0x176))/0x7)+-parseInt(_0x580c26(0x17c))/0x8+parseInt(_0x580c26(0x17a))/0x9*(parseInt(_0x580c26(0x178))/0xa)+parseInt(_0x580c26(0x175))/0xb*(parseInt(_0x580c26(0x174))/0xc);if(_0x16c894===_0x439a77)break;else _0x48e694['push'](_0x48e694['shift']());}catch(_0x2a586a){_0x48e694['push'](_0x48e694['shift']());}}}(a29_0x3bf2,0x427ee));import{jsx as a29_0x2bcab1,jsxs as a29_0x13ee22}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';function a29_0x28aa(_0x5b96d4,_0x5698a5){var _0x3bf2dc=a29_0x3bf2();return a29_0x28aa=function(_0x28aae2,_0x5f1211){_0x28aae2=_0x28aae2-0x16d;var _0x570f3b=_0x3bf2dc[_0x28aae2];return _0x570f3b;},a29_0x28aa(_0x5b96d4,_0x5698a5);}function a29_0x3bf2(){var _0x17a728=['361632UforpP','209uSXTTi','511Rlabiz','3048fBPRjD','40bbEsFu','taskName','276741RNgotT','123317XODkZh','3642640bGmZRL','430XHURli','elapsed','green','1432680lWnpYs','2cNknXB','21090eGGltj','\x20√\x20'];a29_0x3bf2=function(){return _0x17a728;};return a29_0x3bf2();}export function TaskFinished(_0x242d2e){var _0x2b3c26=a29_0x28aa;return a29_0x13ee22(Box,{'children':[a29_0x2bcab1(Box,{'width':'1'}),a29_0x2bcab1(Text,{'color':_0x2b3c26(0x16f),'children':_0x2b3c26(0x173)}),a29_0x2bcab1(Text,{'children':_0x242d2e[_0x2b3c26(0x179)]}),a29_0x2bcab1(TaskTime,{'elapsed':_0x242d2e[_0x2b3c26(0x16e)]})]});}
1
+ (function(_0x233159,_0x4f332c){var _0x233f63=a29_0x419b,_0x47acb2=_0x233159();while(!![]){try{var _0x95b4c2=-parseInt(_0x233f63(0x163))/0x1*(parseInt(_0x233f63(0x162))/0x2)+-parseInt(_0x233f63(0x16b))/0x3*(parseInt(_0x233f63(0x169))/0x4)+parseInt(_0x233f63(0x15f))/0x5*(-parseInt(_0x233f63(0x16d))/0x6)+parseInt(_0x233f63(0x164))/0x7+parseInt(_0x233f63(0x168))/0x8*(parseInt(_0x233f63(0x16a))/0x9)+parseInt(_0x233f63(0x16c))/0xa*(parseInt(_0x233f63(0x167))/0xb)+-parseInt(_0x233f63(0x165))/0xc*(-parseInt(_0x233f63(0x160))/0xd);if(_0x95b4c2===_0x4f332c)break;else _0x47acb2['push'](_0x47acb2['shift']());}catch(_0x283c90){_0x47acb2['push'](_0x47acb2['shift']());}}}(a29_0x21da,0x6747a));import{jsx as a29_0x40781f,jsxs as a29_0x22fe6b}from'react/jsx-runtime';import{Box,Text}from'ink';function a29_0x419b(_0x2f5f4a,_0x3203af){var _0x21da79=a29_0x21da();return a29_0x419b=function(_0x419b1b,_0x22ac35){_0x419b1b=_0x419b1b-0x15f;var _0x1eea33=_0x21da79[_0x419b1b];return _0x1eea33;},a29_0x419b(_0x2f5f4a,_0x3203af);}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x43cd90){var _0x43f851=a29_0x419b;return a29_0x22fe6b(Box,{'children':[a29_0x40781f(Box,{'width':'1'}),a29_0x40781f(Text,{'color':_0x43f851(0x161),'children':'\x20√\x20'}),a29_0x40781f(Text,{'children':_0x43cd90['taskName']}),a29_0x40781f(TaskTime,{'elapsed':_0x43cd90[_0x43f851(0x166)]})]});}function a29_0x21da(){var _0x4c8c2c=['95445Uyifdn','399020RqHLWn','1422UPfeZG','13370UShRwj','7020jOZjuD','green','88940EnqoEz','6VBpqaR','4309844YFFHzH','7872ebareM','elapsed','99NxmrAs','6136kywoWu','76blkHvZ','7029TmakNQ'];a29_0x21da=function(){return _0x4c8c2c;};return a29_0x21da();}
@@ -1 +1 @@
1
- (function(_0x4c393c,_0x4057d6){var _0x29db4c=a30_0x5b33,_0x1e4e0a=_0x4c393c();while(!![]){try{var _0x4b6aa2=-parseInt(_0x29db4c(0x188))/0x1+-parseInt(_0x29db4c(0x18b))/0x2+-parseInt(_0x29db4c(0x184))/0x3*(parseInt(_0x29db4c(0x18c))/0x4)+parseInt(_0x29db4c(0x18e))/0x5*(-parseInt(_0x29db4c(0x183))/0x6)+-parseInt(_0x29db4c(0x187))/0x7+parseInt(_0x29db4c(0x18f))/0x8*(-parseInt(_0x29db4c(0x18a))/0x9)+parseInt(_0x29db4c(0x181))/0xa*(parseInt(_0x29db4c(0x18d))/0xb);if(_0x4b6aa2===_0x4057d6)break;else _0x1e4e0a['push'](_0x1e4e0a['shift']());}catch(_0x218285){_0x1e4e0a['push'](_0x1e4e0a['shift']());}}}(a30_0x3276,0xf2526));import{jsx as a30_0x1c5420,jsxs as a30_0xd41aab}from'react/jsx-runtime';function a30_0x5b33(_0x4ddb58,_0x4f46f2){var _0x32760e=a30_0x3276();return a30_0x5b33=function(_0x5b33ba,_0x31210a){_0x5b33ba=_0x5b33ba-0x181;var _0x3673ab=_0x32760e[_0x5b33ba];return _0x3673ab;},a30_0x5b33(_0x4ddb58,_0x4f46f2);}import{Text}from'ink';import a30_0x2f113d from'ink-spinner';function a30_0x3276(){var _0x3118c2=['9287474IUSdJZ','703619VPlHbB','loading','2754099QbHvgR','2200806FGJVwf','376ymMuMX','9684895IBbZxA','3163700qKXpLe','40RRjdEo','90fKhlPx','dots','6hWUtRT','52272fIRsTF','green','\x20√\x20'];a30_0x3276=function(){return _0x3118c2;};return a30_0x3276();}export function TaskLoading(_0x52dea7){var _0x3f2cd8=a30_0x5b33;if(_0x52dea7['finished'])return a30_0x1c5420(Text,{'color':_0x3f2cd8(0x185),'children':_0x3f2cd8(0x186)});if(_0x52dea7[_0x3f2cd8(0x189)])return a30_0xd41aab(Text,{'color':_0x3f2cd8(0x185),'children':['\x20',a30_0x1c5420(a30_0x2f113d,{'type':_0x3f2cd8(0x182)}),'\x20']});return a30_0x1c5420(Text,{'children':'\x20\x20\x20'});}
1
+ (function(_0x2a3754,_0x3cf027){var _0x26b1e7=a30_0x5cc3,_0x338b21=_0x2a3754();while(!![]){try{var _0x336c90=parseInt(_0x26b1e7(0x1c7))/0x1*(-parseInt(_0x26b1e7(0x1cb))/0x2)+-parseInt(_0x26b1e7(0x1c2))/0x3+parseInt(_0x26b1e7(0x1c1))/0x4+parseInt(_0x26b1e7(0x1c4))/0x5*(-parseInt(_0x26b1e7(0x1c8))/0x6)+-parseInt(_0x26b1e7(0x1c9))/0x7+-parseInt(_0x26b1e7(0x1c5))/0x8*(-parseInt(_0x26b1e7(0x1c6))/0x9)+parseInt(_0x26b1e7(0x1ca))/0xa;if(_0x336c90===_0x3cf027)break;else _0x338b21['push'](_0x338b21['shift']());}catch(_0x2885a7){_0x338b21['push'](_0x338b21['shift']());}}}(a30_0x1c73,0xcdc72));import{jsx as a30_0x40ca0a,jsxs as a30_0x2bbdb1}from'react/jsx-runtime';function a30_0x1c73(){var _0x2c3128=['3186925FVcaiS','90824dTHMxI','360rEGQmK','1BHltUc','6eXdPjB','3387769CMAuWM','30226170Ehmiui','1663754Ujrjom','green','dots','127736wSNqsg','2137728GacDVi','loading'];a30_0x1c73=function(){return _0x2c3128;};return a30_0x1c73();}import{Text}from'ink';import a30_0x37b146 from'ink-spinner';function a30_0x5cc3(_0xec5088,_0x38ec6b){var _0x1c73f7=a30_0x1c73();return a30_0x5cc3=function(_0x5cc347,_0x56cdaf){_0x5cc347=_0x5cc347-0x1bf;var _0x28e81e=_0x1c73f7[_0x5cc347];return _0x28e81e;},a30_0x5cc3(_0xec5088,_0x38ec6b);}export function TaskLoading(_0xc2c28){var _0x1b947e=a30_0x5cc3;if(_0xc2c28['finished'])return a30_0x40ca0a(Text,{'color':_0x1b947e(0x1bf),'children':'\x20√\x20'});if(_0xc2c28[_0x1b947e(0x1c3)])return a30_0x2bbdb1(Text,{'color':_0x1b947e(0x1bf),'children':['\x20',a30_0x40ca0a(a30_0x37b146,{'type':_0x1b947e(0x1c0)}),'\x20']});return a30_0x40ca0a(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- (function(_0x403e29,_0x48da8b){var _0x5775cb=a31_0xa3cd,_0x51257c=_0x403e29();while(!![]){try{var _0x2d4785=parseInt(_0x5775cb(0xc3))/0x1*(parseInt(_0x5775cb(0xce))/0x2)+-parseInt(_0x5775cb(0xcb))/0x3*(-parseInt(_0x5775cb(0xc4))/0x4)+-parseInt(_0x5775cb(0xcc))/0x5*(-parseInt(_0x5775cb(0xca))/0x6)+-parseInt(_0x5775cb(0xcd))/0x7*(-parseInt(_0x5775cb(0xc8))/0x8)+-parseInt(_0x5775cb(0xc5))/0x9+parseInt(_0x5775cb(0xc7))/0xa+-parseInt(_0x5775cb(0xc6))/0xb;if(_0x2d4785===_0x48da8b)break;else _0x51257c['push'](_0x51257c['shift']());}catch(_0x179716){_0x51257c['push'](_0x51257c['shift']());}}}(a31_0x5bfa,0x2df7f));import{jsx as a31_0x1e34e7,jsxs as a31_0x4976b7}from'react/jsx-runtime';function a31_0x5bfa(){var _0x324dec=['2924490oeWevI','152MGsrwJ','taskName','73914SXWezr','3AgFqTU','5zOvBWv','5866Vunbve','607142EzAKcP','1shUekR','1431988XavLwD','409590uzULoJ','8233071NiKoWx'];a31_0x5bfa=function(){return _0x324dec;};return a31_0x5bfa();}import{Box,Text}from'ink';function a31_0xa3cd(_0x4a141b,_0x16e98f){var _0x5bfa18=a31_0x5bfa();return a31_0xa3cd=function(_0xa3cd8f,_0x36409e){_0xa3cd8f=_0xa3cd8f-0xc3;var _0x1cb8fa=_0x5bfa18[_0xa3cd8f];return _0x1cb8fa;},a31_0xa3cd(_0x4a141b,_0x16e98f);}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x5b3602){var _0xc4fc2e=a31_0xa3cd;return a31_0x4976b7(Box,{'children':[a31_0x1e34e7(Box,{'width':'1'}),a31_0x1e34e7(TaskLoading,{..._0x5b3602}),a31_0x1e34e7(Text,{'children':_0x5b3602[_0xc4fc2e(0xc9)]}),a31_0x1e34e7(TaskTime,{'elapsed':_0x5b3602['elapsed']})]});}
1
+ (function(_0x7b05ee,_0x3fe7ea){var _0x44fa27=a31_0x4a86,_0x36950b=_0x7b05ee();while(!![]){try{var _0x57ccac=parseInt(_0x44fa27(0x108))/0x1*(-parseInt(_0x44fa27(0x109))/0x2)+-parseInt(_0x44fa27(0x105))/0x3*(-parseInt(_0x44fa27(0x104))/0x4)+-parseInt(_0x44fa27(0x10c))/0x5+-parseInt(_0x44fa27(0x10e))/0x6+parseInt(_0x44fa27(0x10a))/0x7*(parseInt(_0x44fa27(0x10b))/0x8)+parseInt(_0x44fa27(0x107))/0x9+parseInt(_0x44fa27(0x103))/0xa;if(_0x57ccac===_0x3fe7ea)break;else _0x36950b['push'](_0x36950b['shift']());}catch(_0x5f5df4){_0x36950b['push'](_0x36950b['shift']());}}}(a31_0x4b82,0x40be5));import{jsx as a31_0x1d31dd,jsxs as a31_0x8fe9a0}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a31_0x4a86(_0x5565b5,_0x528c46){var _0x4b82ab=a31_0x4b82();return a31_0x4a86=function(_0x4a8658,_0x11a8f0){_0x4a8658=_0x4a8658-0x103;var _0x49c43e=_0x4b82ab[_0x4a8658];return _0x49c43e;},a31_0x4a86(_0x5565b5,_0x528c46);}function a31_0x4b82(){var _0xb3102c=['562708EJHoRq','3loqQGe','elapsed','1212912YraDpt','1BADePB','127708rZMdbS','28DdfVCO','931160XCsFuN','1972490oqyqtZ','taskName','229278bxFYGm','207290lekSNS'];a31_0x4b82=function(){return _0xb3102c;};return a31_0x4b82();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x38ffe6){var _0x273d7a=a31_0x4a86;return a31_0x8fe9a0(Box,{'children':[a31_0x1d31dd(Box,{'width':'1'}),a31_0x1d31dd(TaskLoading,{..._0x38ffe6}),a31_0x1d31dd(Text,{'children':_0x38ffe6[_0x273d7a(0x10d)]}),a31_0x1d31dd(TaskTime,{'elapsed':_0x38ffe6[_0x273d7a(0x106)]})]});}
@@ -1 +1 @@
1
- function a32_0x5365(_0xf0dc51,_0x3d798b){var _0x41e9a7=a32_0x41e9();return a32_0x5365=function(_0x536549,_0x10bf46){_0x536549=_0x536549-0x188;var _0x594f8b=_0x41e9a7[_0x536549];return _0x594f8b;},a32_0x5365(_0xf0dc51,_0x3d798b);}(function(_0x23625,_0x57d4e1){var _0x3251a9=a32_0x5365,_0x457aeb=_0x23625();while(!![]){try{var _0xe2aaf9=parseInt(_0x3251a9(0x191))/0x1+parseInt(_0x3251a9(0x18e))/0x2*(parseInt(_0x3251a9(0x18c))/0x3)+-parseInt(_0x3251a9(0x18f))/0x4*(-parseInt(_0x3251a9(0x18d))/0x5)+parseInt(_0x3251a9(0x18a))/0x6*(parseInt(_0x3251a9(0x189))/0x7)+-parseInt(_0x3251a9(0x188))/0x8*(-parseInt(_0x3251a9(0x192))/0x9)+parseInt(_0x3251a9(0x195))/0xa*(-parseInt(_0x3251a9(0x190))/0xb)+-parseInt(_0x3251a9(0x18b))/0xc;if(_0xe2aaf9===_0x57d4e1)break;else _0x457aeb['push'](_0x457aeb['shift']());}catch(_0x291795){_0x457aeb['push'](_0x457aeb['shift']());}}}(a32_0x41e9,0xdac5b));import{jsx as a32_0x1dfd7c,Fragment as a32_0x4c5da1,jsxs as a32_0x239b3f}from'react/jsx-runtime';function a32_0x41e9(){var _0x16799a=['121dEaFSH','753436vqMWaQ','177759DiifSv','elapsed','gray','1331870qtUyzu','8sJkUny','2302867xQyMeB','12QoQuSr','26114604DDHiYm','10071QwBalR','5gSuXfX','986pDBery','5804860zGufpC'];a32_0x41e9=function(){return _0x16799a;};return a32_0x41e9();}import{Text}from'ink';export function TaskTime(_0x5ca7ba){var _0x44e9c6=a32_0x5365;if(_0x5ca7ba[_0x44e9c6(0x193)])return a32_0x239b3f(a32_0x4c5da1,{'children':[a32_0x1dfd7c(Text,{'color':_0x44e9c6(0x194),'children':'\x20['}),a32_0x1dfd7c(Text,{'color':'gray','bold':!![],'children':_0x5ca7ba['elapsed']}),a32_0x1dfd7c(Text,{'color':_0x44e9c6(0x194),'children':']'})]});return null;}
1
+ (function(_0x131e9e,_0x43da48){var _0xac91be=a32_0x5e7f,_0xd61d0=_0x131e9e();while(!![]){try{var _0x48bfa2=-parseInt(_0xac91be(0x1e6))/0x1+-parseInt(_0xac91be(0x1e8))/0x2*(parseInt(_0xac91be(0x1ec))/0x3)+parseInt(_0xac91be(0x1e3))/0x4+-parseInt(_0xac91be(0x1e4))/0x5+-parseInt(_0xac91be(0x1e9))/0x6+-parseInt(_0xac91be(0x1e5))/0x7*(-parseInt(_0xac91be(0x1eb))/0x8)+parseInt(_0xac91be(0x1ed))/0x9;if(_0x48bfa2===_0x43da48)break;else _0xd61d0['push'](_0xd61d0['shift']());}catch(_0x9945ef){_0xd61d0['push'](_0xd61d0['shift']());}}}(a32_0x30a0,0xca4ee));import{jsx as a32_0x1d922e,Fragment as a32_0x580277,jsxs as a32_0x3807f3}from'react/jsx-runtime';function a32_0x5e7f(_0x405b00,_0x4fe080){var _0x30a003=a32_0x30a0();return a32_0x5e7f=function(_0x5e7f5e,_0x54e00c){_0x5e7f5e=_0x5e7f5e-0x1e3;var _0x5c358c=_0x30a003[_0x5e7f5e];return _0x5c358c;},a32_0x5e7f(_0x405b00,_0x4fe080);}function a32_0x30a0(){var _0x8f799d=['3690951NvJsdL','35106831lXjCLV','840ovupRv','3805670oYAcaY','3416644QvZYyM','998966jqiHzH','gray','2pfqSmb','6348492hpnbtY','elapsed','16yFOTdW'];a32_0x30a0=function(){return _0x8f799d;};return a32_0x30a0();}import{Text}from'ink';export function TaskTime(_0x5e36c9){var _0x4328a8=a32_0x5e7f;if(_0x5e36c9[_0x4328a8(0x1ea)])return a32_0x3807f3(a32_0x580277,{'children':[a32_0x1d922e(Text,{'color':'gray','children':'\x20['}),a32_0x1d922e(Text,{'color':_0x4328a8(0x1e7),'bold':!![],'children':_0x5e36c9['elapsed']}),a32_0x1d922e(Text,{'color':'gray','children':']'})]});return null;}
@@ -1 +1 @@
1
- const a33_0x1826b9=a33_0x1d29;(function(_0x50e514,_0x112f1d){const _0x142b77=a33_0x1d29,_0x3af1fc=_0x50e514();while(!![]){try{const _0x3d2901=parseInt(_0x142b77(0x72))/0x1+-parseInt(_0x142b77(0x84))/0x2*(-parseInt(_0x142b77(0x81))/0x3)+-parseInt(_0x142b77(0x73))/0x4*(-parseInt(_0x142b77(0x7f))/0x5)+-parseInt(_0x142b77(0x80))/0x6+parseInt(_0x142b77(0x7e))/0x7+parseInt(_0x142b77(0x79))/0x8+-parseInt(_0x142b77(0x7c))/0x9;if(_0x3d2901===_0x112f1d)break;else _0x3af1fc['push'](_0x3af1fc['shift']());}catch(_0x4a7484){_0x3af1fc['push'](_0x3af1fc['shift']());}}}(a33_0x2c65,0x19706));import a33_0x2ae78e from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';function a33_0x2c65(){const _0x137162=['907380TsLgfk','185046tWuwFq','项目模板复制失败','cwd','2cVrIfM','复制项目文件','152336DRhYGX','12SiZamC','项目模板复制完成','../../templates/projects/sub-app-react-demo','success','info','message','244976RVBqFq','copy','resolve','998910XaHjou','dirname','198779KcRvBB','155635yMrVjp'];a33_0x2c65=function(){return _0x137162;};return a33_0x2c65();}import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a33_0x1d29(_0x1fafdc,_0x369911){const _0x2c654b=a33_0x2c65();return a33_0x1d29=function(_0x1d292c,_0x52e6d7){_0x1d292c=_0x1d292c-0x72;let _0x258c07=_0x2c654b[_0x1d292c];return _0x258c07;},a33_0x1d29(_0x1fafdc,_0x369911);}const __dirname=a33_0x2ae78e[a33_0x1826b9(0x7d)](fileURLToPath(import.meta['url'])),templateDir=a33_0x2ae78e[a33_0x1826b9(0x7b)](__dirname,a33_0x1826b9(0x75));export function useCopyProjectTemplate(){const _0x340c1d=a33_0x1826b9,[_0x850de3,_0x1af543]=useState(![]),[_0x57c1dc,_0x55c44f]=useState(![]),[_0x21e3ec,_0x64973b]=useState(''),_0x268c5d=useCallback(async _0x187098=>{const _0x4ca4f2=a33_0x1d29,_0x562595=Date['now'](),_0x42eb81=a33_0x2ae78e[_0x4ca4f2(0x7b)](process[_0x4ca4f2(0x83)](),_0x187098);_0x1af543(!![]);try{logger[_0x4ca4f2(0x77)](_0x4ca4f2(0x7a),'开始复制项目模板',{'projectCode':_0x187098,'templateDir':templateDir}),await copyDirectory(templateDir,_0x42eb81);const _0xd93d0=Date['now']()-_0x562595;logger[_0x4ca4f2(0x76)]('copy',_0x4ca4f2(0x74),_0xd93d0,{'projectCode':_0x187098});}catch(_0x17ee9e){const _0x47e587=Date['now']()-_0x562595;logger['error']('copy',_0x4ca4f2(0x82),{'projectCode':_0x187098,'error':_0x17ee9e instanceof Error?_0x17ee9e[_0x4ca4f2(0x78)]:String(_0x17ee9e),'duration':_0x47e587});throw _0x17ee9e;}finally{_0x1af543(![]),_0x55c44f(!![]),_0x64973b(formatElapsed(_0x562595));}},[]);return{'taskName':_0x340c1d(0x85),'finished':_0x57c1dc,'loading':_0x850de3,'elapsed':_0x21e3ec,'doTask':_0x268c5d};}
1
+ const a33_0x53b24e=a33_0x5f4e;(function(_0x19c2f3,_0xc89033){const _0x4260d5=a33_0x5f4e,_0x486037=_0x19c2f3();while(!![]){try{const _0x22ed33=parseInt(_0x4260d5(0x94))/0x1+parseInt(_0x4260d5(0x86))/0x2*(-parseInt(_0x4260d5(0x97))/0x3)+-parseInt(_0x4260d5(0x8e))/0x4*(-parseInt(_0x4260d5(0x8a))/0x5)+-parseInt(_0x4260d5(0x8b))/0x6+parseInt(_0x4260d5(0x8c))/0x7+parseInt(_0x4260d5(0x92))/0x8*(-parseInt(_0x4260d5(0x91))/0x9)+parseInt(_0x4260d5(0x90))/0xa;if(_0x22ed33===_0xc89033)break;else _0x486037['push'](_0x486037['shift']());}catch(_0x4723ce){_0x486037['push'](_0x486037['shift']());}}}(a33_0x2a03,0x37e65));import a33_0x4eb395 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';const __dirname=a33_0x4eb395['dirname'](fileURLToPath(import.meta[a33_0x53b24e(0x88)])),templateDir=a33_0x4eb395[a33_0x53b24e(0x8d)](__dirname,'../../templates/projects/sub-app-react-demo');function a33_0x2a03(){const _0x49dc82=['32hxYolP','项目模板复制失败','417205YSKcBH','error','项目模板复制完成','221049JePyuY','info','2ksNDfN','copy','url','复制项目文件','7405tfHKHk','1784286XBJAbR','1178443DpypAP','resolve','728IKbnTW','now','477090wFSoMz','681246eYofWX'];a33_0x2a03=function(){return _0x49dc82;};return a33_0x2a03();}function a33_0x5f4e(_0x2503e6,_0x3d4475){const _0x2a03e2=a33_0x2a03();return a33_0x5f4e=function(_0x5f4e91,_0x5ba8c0){_0x5f4e91=_0x5f4e91-0x86;let _0x43460c=_0x2a03e2[_0x5f4e91];return _0x43460c;},a33_0x5f4e(_0x2503e6,_0x3d4475);}export function useCopyProjectTemplate(){const _0x3a7f76=a33_0x53b24e,[_0x30d7eb,_0x56f279]=useState(![]),[_0x2dfbf0,_0x61a9af]=useState(![]),[_0x262d5e,_0x57d41e]=useState(''),_0x59d24f=useCallback(async _0x5ed23f=>{const _0x1b312c=a33_0x5f4e,_0x587734=Date[_0x1b312c(0x8f)](),_0x44c456=a33_0x4eb395[_0x1b312c(0x8d)](process['cwd'](),_0x5ed23f);_0x56f279(!![]);try{logger[_0x1b312c(0x98)](_0x1b312c(0x87),'开始复制项目模板',{'projectCode':_0x5ed23f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x44c456);const _0x1d2156=Date['now']()-_0x587734;logger['success']('copy',_0x1b312c(0x96),_0x1d2156,{'projectCode':_0x5ed23f});}catch(_0x31ef21){const _0x508374=Date[_0x1b312c(0x8f)]()-_0x587734;logger[_0x1b312c(0x95)](_0x1b312c(0x87),_0x1b312c(0x93),{'projectCode':_0x5ed23f,'error':_0x31ef21 instanceof Error?_0x31ef21['message']:String(_0x31ef21),'duration':_0x508374});throw _0x31ef21;}finally{_0x56f279(![]),_0x61a9af(!![]),_0x57d41e(formatElapsed(_0x587734));}},[]);return{'taskName':_0x3a7f76(0x89),'finished':_0x2dfbf0,'loading':_0x30d7eb,'elapsed':_0x262d5e,'doTask':_0x59d24f};}
@@ -1 +1 @@
1
- (function(_0x24d93d,_0x359014){const _0x5938c2=a34_0x45a1,_0x83474f=_0x24d93d();while(!![]){try{const _0x2d2860=parseInt(_0x5938c2(0x7d))/0x1*(-parseInt(_0x5938c2(0x77))/0x2)+parseInt(_0x5938c2(0x75))/0x3*(-parseInt(_0x5938c2(0x76))/0x4)+-parseInt(_0x5938c2(0x70))/0x5+parseInt(_0x5938c2(0x6b))/0x6+parseInt(_0x5938c2(0x78))/0x7*(parseInt(_0x5938c2(0x6f))/0x8)+-parseInt(_0x5938c2(0x80))/0x9*(parseInt(_0x5938c2(0x6d))/0xa)+parseInt(_0x5938c2(0x7a))/0xb;if(_0x2d2860===_0x359014)break;else _0x83474f['push'](_0x83474f['shift']());}catch(_0x321a16){_0x83474f['push'](_0x83474f['shift']());}}}(a34_0x1aae,0x1fff4));import a34_0x427c36 from'node:path';import{useCallback,useState}from'react';function a34_0x45a1(_0x2853e0,_0x26709b){const _0x1aae26=a34_0x1aae();return a34_0x45a1=function(_0x45a16e,_0x128350){_0x45a16e=_0x45a16e-0x6b;let _0x312091=_0x1aae26[_0x45a16e];return _0x312091;},a34_0x45a1(_0x2853e0,_0x26709b);}import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a34_0x1aae(){const _0x9a15f3=['4327cBYAli','format','prettier','819810swtGTS','resolve','cwd','now','1022850eTZaNV','info','10xdyEyR','message','8fnRuTS','508890OvhZbn','error','success','格式化代码','--write','6EhIiuO','353788KujbNG','98QzAxtR','437626yvNIzx','npx','5278372kIfdwk','代码格式化完成','开始格式化代码'];a34_0x1aae=function(){return _0x9a15f3;};return a34_0x1aae();}export function useFormatCode(){const _0x53ebbd=a34_0x45a1,[_0x25db0c,_0x13423d]=useState(![]),[_0x253f23,_0x4aafb0]=useState(![]),[_0xb2c1d7,_0xabd0f7]=useState(''),_0x437071=useCallback(async _0x40b52a=>{const _0x5212f8=a34_0x45a1,_0x3f7184=Date[_0x5212f8(0x83)](),_0x3ac942=a34_0x427c36[_0x5212f8(0x81)](process[_0x5212f8(0x82)](),_0x40b52a);_0x13423d(!![]);try{logger[_0x5212f8(0x6c)]('format',_0x5212f8(0x7c),{'projectCode':_0x40b52a}),await execa(_0x5212f8(0x79),[_0x5212f8(0x7f),_0x5212f8(0x74),'.'],{'cwd':_0x3ac942});const _0x56e472=Date[_0x5212f8(0x83)]()-_0x3f7184;logger[_0x5212f8(0x72)]('format',_0x5212f8(0x7b),_0x56e472,{'projectCode':_0x40b52a});}catch(_0x364b42){const _0x87d8f2=Date[_0x5212f8(0x83)]()-_0x3f7184;logger[_0x5212f8(0x71)](_0x5212f8(0x7e),'代码格式化失败',{'projectCode':_0x40b52a,'error':_0x364b42 instanceof Error?_0x364b42[_0x5212f8(0x6e)]:String(_0x364b42),'duration':_0x87d8f2});throw _0x364b42;}finally{_0x13423d(![]),_0x4aafb0(!![]),_0xabd0f7(formatElapsed(_0x3f7184));}},[]);return{'taskName':_0x53ebbd(0x73),'finished':_0x253f23,'loading':_0x25db0c,'elapsed':_0xb2c1d7,'doTask':_0x437071};}
1
+ function a34_0x1fd4(){const _0x2c2de6=['resolve','1120428MbqfvE','9450ESLuHu','format','代码格式化失败','191020oYuPVn','error','4361008DPnQzi','info','success','npx','1JZfuVI','6202189MRmzQU','代码格式化完成','3185bYHeRE','10aFEgZj','225261dJiclN','65826hTzzVT','cwd','格式化代码','now'];a34_0x1fd4=function(){return _0x2c2de6;};return a34_0x1fd4();}(function(_0x35863d,_0x181ed0){const _0x72d718=a34_0x39e1,_0x582476=_0x35863d();while(!![]){try{const _0xe18375=-parseInt(_0x72d718(0x1f6))/0x1*(parseInt(_0x72d718(0x1fc))/0x2)+parseInt(_0x72d718(0x1fb))/0x3+parseInt(_0x72d718(0x1f0))/0x4+-parseInt(_0x72d718(0x1f9))/0x5*(-parseInt(_0x72d718(0x1ed))/0x6)+-parseInt(_0x72d718(0x1f7))/0x7+parseInt(_0x72d718(0x1f2))/0x8+-parseInt(_0x72d718(0x201))/0x9*(parseInt(_0x72d718(0x1fa))/0xa);if(_0xe18375===_0x181ed0)break;else _0x582476['push'](_0x582476['shift']());}catch(_0x402c3b){_0x582476['push'](_0x582476['shift']());}}}(a34_0x1fd4,0x99463));import a34_0x1700db from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a34_0x39e1(_0x20ff4c,_0x9b844b){const _0x1fd4dc=a34_0x1fd4();return a34_0x39e1=function(_0x39e15d,_0x4ac5ae){_0x39e15d=_0x39e15d-0x1ed;let _0x5a5224=_0x1fd4dc[_0x39e15d];return _0x5a5224;},a34_0x39e1(_0x20ff4c,_0x9b844b);}import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x565316=a34_0x39e1,[_0x3f3c1c,_0x39cd26]=useState(![]),[_0x3a782e,_0x1a58a3]=useState(![]),[_0x479a67,_0x5d2a21]=useState(''),_0x4b2518=useCallback(async _0x37e50b=>{const _0xefed2=a34_0x39e1,_0x14b9ec=Date[_0xefed2(0x1ff)](),_0x13f1ba=a34_0x1700db[_0xefed2(0x200)](process[_0xefed2(0x1fd)](),_0x37e50b);_0x39cd26(!![]);try{logger[_0xefed2(0x1f3)]('format','开始格式化代码',{'projectCode':_0x37e50b}),await execa(_0xefed2(0x1f5),['prettier','--write','.'],{'cwd':_0x13f1ba});const _0x28764e=Date[_0xefed2(0x1ff)]()-_0x14b9ec;logger[_0xefed2(0x1f4)](_0xefed2(0x1ee),_0xefed2(0x1f8),_0x28764e,{'projectCode':_0x37e50b});}catch(_0x59ae22){const _0x3a1d17=Date[_0xefed2(0x1ff)]()-_0x14b9ec;logger[_0xefed2(0x1f1)](_0xefed2(0x1ee),_0xefed2(0x1ef),{'projectCode':_0x37e50b,'error':_0x59ae22 instanceof Error?_0x59ae22['message']:String(_0x59ae22),'duration':_0x3a1d17});throw _0x59ae22;}finally{_0x39cd26(![]),_0x1a58a3(!![]),_0x5d2a21(formatElapsed(_0x14b9ec));}},[]);return{'taskName':_0x565316(0x1fe),'finished':_0x3a782e,'loading':_0x3f3c1c,'elapsed':_0x479a67,'doTask':_0x4b2518};}
@@ -1 +1 @@
1
- (function(_0x18263f,_0x558783){const _0x4bfb08=a35_0x339c,_0x2b43ac=_0x18263f();while(!![]){try{const _0x490d2f=parseInt(_0x4bfb08(0xdf))/0x1*(-parseInt(_0x4bfb08(0xdb))/0x2)+parseInt(_0x4bfb08(0xe2))/0x3*(-parseInt(_0x4bfb08(0xd1))/0x4)+parseInt(_0x4bfb08(0xe5))/0x5*(-parseInt(_0x4bfb08(0xdc))/0x6)+-parseInt(_0x4bfb08(0xd4))/0x7*(parseInt(_0x4bfb08(0xd3))/0x8)+parseInt(_0x4bfb08(0xe4))/0x9+parseInt(_0x4bfb08(0xd9))/0xa*(parseInt(_0x4bfb08(0xdd))/0xb)+-parseInt(_0x4bfb08(0xda))/0xc*(-parseInt(_0x4bfb08(0xe6))/0xd);if(_0x490d2f===_0x558783)break;else _0x2b43ac['push'](_0x2b43ac['shift']());}catch(_0x482768){_0x2b43ac['push'](_0x2b43ac['shift']());}}}(a35_0x5677,0xb69e5));import a35_0x48c04e from'node:path';function a35_0x339c(_0x28096b,_0x59eeef){const _0x5677fe=a35_0x5677();return a35_0x339c=function(_0x339c19,_0x1ba97e){_0x339c19=_0x339c19-0xd0;let _0x35f803=_0x5677fe[_0x339c19];return _0x35f803;},a35_0x339c(_0x28096b,_0x59eeef);}function a35_0x5677(){const _0x229465=['message','2mFMYrl','依赖安装完成','resolve','3345kbDHhB','开始安装依赖','5643909mwAShc','411865EFUgfk','351pebSnN','依赖安装失败','https://registry.npmmirror.com','install','2116XlPKwg','success','8qUqCKS','8445227LbmLIZ','now','error','cwd','npm','5286560asTHqS','1102932xYHcMa','845934xOUqPP','18NLOBZx','11aYbiBh'];a35_0x5677=function(){return _0x229465;};return a35_0x5677();}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const [_0x1f055b,_0x404df6]=useState(![]),[_0x288356,_0x3e0411]=useState(![]),[_0x1ec3e3,_0x25d5d0]=useState(''),_0x12ada7=useCallback(async _0x55caa4=>{const _0xc632fb=a35_0x339c,_0x1b54ff=Date[_0xc632fb(0xd5)](),_0x48fa2f=a35_0x48c04e[_0xc632fb(0xe1)](process[_0xc632fb(0xd7)](),_0x55caa4);_0x404df6(!![]),_0x3e0411(![]);const _0x55fb80=async(_0x4176d9,_0x576257)=>{await execa(_0x4176d9,_0x576257,{'cwd':_0x48fa2f});};try{logger['info'](_0xc632fb(0xd0),_0xc632fb(0xe3),{'projectCode':_0x55caa4,'registry':'https://registry.npmmirror.com'}),await _0x55fb80(_0xc632fb(0xd8),[_0xc632fb(0xd0),'--registry',_0xc632fb(0xe8)]);const _0x288868=Date[_0xc632fb(0xd5)]()-_0x1b54ff;logger[_0xc632fb(0xd2)]('install',_0xc632fb(0xe0),_0x288868,{'projectCode':_0x55caa4});}catch(_0x4e959c){const _0xebaaec=Date[_0xc632fb(0xd5)]()-_0x1b54ff;logger[_0xc632fb(0xd6)](_0xc632fb(0xd0),_0xc632fb(0xe7),{'projectCode':_0x55caa4,'error':_0x4e959c instanceof Error?_0x4e959c[_0xc632fb(0xde)]:String(_0x4e959c),'duration':_0xebaaec});throw _0x4e959c;}finally{_0x404df6(![]),_0x3e0411(!![]),_0x25d5d0(formatElapsed(_0x1b54ff));}},[]);return{'taskName':'安装依赖','finished':_0x288356,'loading':_0x1f055b,'elapsed':_0x1ec3e3,'doTask':_0x12ada7};}
1
+ (function(_0x1b576d,_0x269874){const _0x1543fb=a35_0x385a,_0x5c8674=_0x1b576d();while(!![]){try{const _0x7dde0a=-parseInt(_0x1543fb(0x98))/0x1*(-parseInt(_0x1543fb(0x9d))/0x2)+-parseInt(_0x1543fb(0x96))/0x3*(-parseInt(_0x1543fb(0xa0))/0x4)+parseInt(_0x1543fb(0x91))/0x5+-parseInt(_0x1543fb(0x9c))/0x6+-parseInt(_0x1543fb(0x9b))/0x7*(parseInt(_0x1543fb(0x95))/0x8)+parseInt(_0x1543fb(0x9e))/0x9+-parseInt(_0x1543fb(0xa1))/0xa;if(_0x7dde0a===_0x269874)break;else _0x5c8674['push'](_0x5c8674['shift']());}catch(_0x2f5186){_0x5c8674['push'](_0x5c8674['shift']());}}}(a35_0x4df1,0x19922));function a35_0x385a(_0x2e0e90,_0x5dcaaf){const _0x4df18e=a35_0x4df1();return a35_0x385a=function(_0x385aea,_0x12d1c3){_0x385aea=_0x385aea-0x91;let _0x5a43ed=_0x4df18e[_0x385aea];return _0x5a43ed;},a35_0x385a(_0x2e0e90,_0x5dcaaf);}import a35_0x56e628 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x222482=a35_0x385a,[_0x245873,_0xadc504]=useState(![]),[_0x1b59f8,_0x5c018c]=useState(![]),[_0x2219e2,_0x2b25aa]=useState(''),_0x12e3ca=useCallback(async _0x29c742=>{const _0x4cedb7=a35_0x385a,_0x5bcc52=Date[_0x4cedb7(0xa2)](),_0x284287=a35_0x56e628[_0x4cedb7(0xa4)](process['cwd'](),_0x29c742);_0xadc504(!![]),_0x5c018c(![]);const _0x31a832=async(_0x26828d,_0x3a5d4b)=>{await execa(_0x26828d,_0x3a5d4b,{'cwd':_0x284287});};try{logger[_0x4cedb7(0x94)](_0x4cedb7(0x9f),'开始安装依赖',{'projectCode':_0x29c742,'registry':_0x4cedb7(0xa5)}),await _0x31a832('npm',[_0x4cedb7(0x9f),'--registry',_0x4cedb7(0xa5)]);const _0x19cdce=Date[_0x4cedb7(0xa2)]()-_0x5bcc52;logger[_0x4cedb7(0x97)](_0x4cedb7(0x9f),_0x4cedb7(0x9a),_0x19cdce,{'projectCode':_0x29c742});}catch(_0x5b0dbb){const _0x42847b=Date[_0x4cedb7(0xa2)]()-_0x5bcc52;logger[_0x4cedb7(0x93)](_0x4cedb7(0x9f),_0x4cedb7(0x99),{'projectCode':_0x29c742,'error':_0x5b0dbb instanceof Error?_0x5b0dbb[_0x4cedb7(0xa3)]:String(_0x5b0dbb),'duration':_0x42847b});throw _0x5b0dbb;}finally{_0xadc504(![]),_0x5c018c(!![]),_0x2b25aa(formatElapsed(_0x5bcc52));}},[]);return{'taskName':_0x222482(0x92),'finished':_0x1b59f8,'loading':_0x245873,'elapsed':_0x2219e2,'doTask':_0x12e3ca};}function a35_0x4df1(){const _0x1e2e5d=['安装依赖','error','info','85480PySJmJ','185685YRZoyA','success','1cFoNTb','依赖安装失败','依赖安装完成','63YtvXaT','641142uPXHGH','107182DmZJgk','396045tFpAii','install','4MyQZsJ','417500ESWKtI','now','message','resolve','https://registry.npmmirror.com','950095JvXEyB'];a35_0x4df1=function(){return _0x1e2e5d;};return a35_0x4df1();}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4e6bb1,_0x35c41f){var _0x16b07b=a36_0x1bf5,_0x38d87b=_0x4e6bb1();while(!![]){try{var _0x18af15=-parseInt(_0x16b07b(0x18c))/0x1+parseInt(_0x16b07b(0x194))/0x2*(parseInt(_0x16b07b(0x188))/0x3)+parseInt(_0x16b07b(0x18d))/0x4*(parseInt(_0x16b07b(0x187))/0x5)+parseInt(_0x16b07b(0x189))/0x6+parseInt(_0x16b07b(0x195))/0x7*(parseInt(_0x16b07b(0x192))/0x8)+parseInt(_0x16b07b(0x191))/0x9+parseInt(_0x16b07b(0x18e))/0xa*(-parseInt(_0x16b07b(0x18b))/0xb);if(_0x18af15===_0x35c41f)break;else _0x38d87b['push'](_0x38d87b['shift']());}catch(_0x43c327){_0x38d87b['push'](_0x38d87b['shift']());}}}(a36_0x8695,0x99f1f));import{jsx as a36_0x5a921a,jsxs as a36_0x211ae8}from'react/jsx-runtime';import{Box,Text}from'ink';function a36_0x1bf5(_0x41db1f,_0x3ceb56){var _0x8695da=a36_0x8695();return a36_0x1bf5=function(_0x1bf5cb,_0x5dec25){_0x1bf5cb=_0x1bf5cb-0x187;var _0x512031=_0x8695da[_0x1bf5cb];return _0x512031;},a36_0x1bf5(_0x41db1f,_0x3ceb56);}export function Help(){var _0xdf7084=a36_0x1bf5;return a36_0x211ae8(Box,{'flexDirection':_0xdf7084(0x193),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x211ae8(Box,{'children':[a36_0x5a921a(Box,{'width':'1'}),a36_0x5a921a(Text,{'children':'!\x20请指定一个有效的命令。'})]}),a36_0x211ae8(Box,{'marginTop':0x1,'children':[a36_0x5a921a(Box,{'width':'1'}),a36_0x211ae8(Text,{'children':['\x20\x20','使用']}),a36_0x211ae8(Text,{'bold':!![],'color':_0xdf7084(0x18f),'children':['\x20',_0xdf7084(0x190),'\x20']}),a36_0x5a921a(Text,{'children':_0xdf7084(0x18a)})]})]});}function a36_0x8695(){var _0x3e6d15=['4050558cfSamO','12368WuOqDx','column','162346YIIwBG','3143LwVIXT','55PrhYmm','3pRWfiq','5928474vvBIvd','查看可用命令。','1018831vIwHao','325025HhcSJd','317236MJJvXt','230HnJhCQ','green','lovrabet\x20--help'];a36_0x8695=function(){return _0x3e6d15;};return a36_0x8695();}
1
+ (function(_0x94fc1e,_0x3f5b6b){var _0x317747=a36_0x1c1c,_0x3aa31d=_0x94fc1e();while(!![]){try{var _0x5ee8f4=-parseInt(_0x317747(0xa6))/0x1*(parseInt(_0x317747(0xa1))/0x2)+parseInt(_0x317747(0x9f))/0x3*(parseInt(_0x317747(0x9d))/0x4)+-parseInt(_0x317747(0x9e))/0x5*(-parseInt(_0x317747(0x98))/0x6)+parseInt(_0x317747(0xa2))/0x7+parseInt(_0x317747(0xa0))/0x8*(parseInt(_0x317747(0x9c))/0x9)+-parseInt(_0x317747(0xa4))/0xa*(-parseInt(_0x317747(0xa5))/0xb)+-parseInt(_0x317747(0x9a))/0xc*(parseInt(_0x317747(0x99))/0xd);if(_0x5ee8f4===_0x3f5b6b)break;else _0x3aa31d['push'](_0x3aa31d['shift']());}catch(_0x4a5673){_0x3aa31d['push'](_0x3aa31d['shift']());}}}(a36_0x23bb,0xafa46));import{jsx as a36_0x477c90,jsxs as a36_0x151560}from'react/jsx-runtime';function a36_0x1c1c(_0x5f897b,_0x2e7c64){var _0x23bbf9=a36_0x23bb();return a36_0x1c1c=function(_0x1c1c92,_0x2a614f){_0x1c1c92=_0x1c1c92-0x96;var _0x35c186=_0x23bbf9[_0x1c1c92];return _0x35c186;},a36_0x1c1c(_0x5f897b,_0x2e7c64);}function a36_0x23bb(){var _0x104154=['18eUEWQL','13YXIunT','30502812cMZPIw','green','12565719WqlLKe','4QDRehD','956680ybhgqu','4158621TSYjrI','8JSqKxo','60970WAAwdc','1565823ooCIyN','查看可用命令。','10eZWZXJ','852951guxwOF','13PKKvCZ','lovrabet\x20--help','!\x20请指定一个有效的命令。','column'];a36_0x23bb=function(){return _0x104154;};return a36_0x23bb();}import{Box,Text}from'ink';export function Help(){var _0x1cc7ee=a36_0x1c1c;return a36_0x151560(Box,{'flexDirection':_0x1cc7ee(0x97),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x151560(Box,{'children':[a36_0x477c90(Box,{'width':'1'}),a36_0x477c90(Text,{'children':_0x1cc7ee(0x96)})]}),a36_0x151560(Box,{'marginTop':0x1,'children':[a36_0x477c90(Box,{'width':'1'}),a36_0x151560(Text,{'children':['\x20\x20','使用']}),a36_0x151560(Text,{'bold':!![],'color':_0x1cc7ee(0x9b),'children':['\x20',_0x1cc7ee(0xa7),'\x20']}),a36_0x477c90(Text,{'children':_0x1cc7ee(0xa3)})]})]});}
@@ -1 +1 @@
1
- function a37_0x3ac6(_0xb31505,_0x5792cb){const _0x1b8690=a37_0x1b86();return a37_0x3ac6=function(_0x3ac648,_0x2e2069){_0x3ac648=_0x3ac648-0x84;let _0x43f4ac=_0x1b8690[_0x3ac648];return _0x43f4ac;},a37_0x3ac6(_0xb31505,_0x5792cb);}(function(_0x2d66b8,_0x4d8f31){const _0x5215a0=a37_0x3ac6,_0x46caec=_0x2d66b8();while(!![]){try{const _0x56c1fa=-parseInt(_0x5215a0(0x90))/0x1*(-parseInt(_0x5215a0(0x87))/0x2)+-parseInt(_0x5215a0(0x85))/0x3*(parseInt(_0x5215a0(0x84))/0x4)+parseInt(_0x5215a0(0x86))/0x5*(-parseInt(_0x5215a0(0x8f))/0x6)+parseInt(_0x5215a0(0x8e))/0x7*(-parseInt(_0x5215a0(0x88))/0x8)+-parseInt(_0x5215a0(0x8c))/0x9*(-parseInt(_0x5215a0(0x91))/0xa)+-parseInt(_0x5215a0(0x92))/0xb+parseInt(_0x5215a0(0x89))/0xc*(parseInt(_0x5215a0(0x8d))/0xd);if(_0x56c1fa===_0x4d8f31)break;else _0x46caec['push'](_0x46caec['shift']());}catch(_0x250d23){_0x46caec['push'](_0x46caec['shift']());}}}(a37_0x1b86,0x856dd));function a37_0x1b86(){const _0x5550d2=['1549278uWYsXv','25975yhyMFG','74fqTcAe','2835528fgHrxg','48GBEDAf','parse','utf8','1314wCWOSp','7210489qsfCvR','21jUlUAF','606EzpFhE','12743IPaMyL','39390bvWHAs','6756508nURJjI','4FtSnsl'];a37_0x1b86=function(){return _0x5550d2;};return a37_0x1b86();}import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';export const configPath=resolve(process['cwd'](),'.lovrabetrc');export function readConfig(){const _0x163658=a37_0x3ac6;try{if(existsSync(configPath)){const _0x90bfdb=readFileSync(configPath,{'encoding':_0x163658(0x8b)});return _0x90bfdb?JSON[_0x163658(0x8a)](_0x90bfdb):{};}}catch(_0x5dd8ec){}return{};}
1
+ const a37_0x1a0dc4=a37_0x4f7e;function a37_0x1645(){const _0x13e047=['.lovrabetrc','98476IDeDgc','7375674JaCGQI','cwd','2529754jKFIhV','140gcUAoa','105GbElNI','66715PMWCGq','62880snXCrZ','1XBZpRS','parse','3110AeGgYG','2710269HSjSZW','3552JEnZlu','utf8','29961sQvTkF'];a37_0x1645=function(){return _0x13e047;};return a37_0x1645();}(function(_0x1d0560,_0x43d55f){const _0x2ff624=a37_0x4f7e,_0x16cead=_0x1d0560();while(!![]){try{const _0x3088fb=-parseInt(_0x2ff624(0x13c))/0x1*(-parseInt(_0x2ff624(0x137))/0x2)+parseInt(_0x2ff624(0x13f))/0x3+parseInt(_0x2ff624(0x144))/0x4*(parseInt(_0x2ff624(0x139))/0x5)+-parseInt(_0x2ff624(0x135))/0x6+parseInt(_0x2ff624(0x138))/0x7*(parseInt(_0x2ff624(0x13b))/0x8)+-parseInt(_0x2ff624(0x142))/0x9*(-parseInt(_0x2ff624(0x13e))/0xa)+-parseInt(_0x2ff624(0x13a))/0xb*(parseInt(_0x2ff624(0x140))/0xc);if(_0x3088fb===_0x43d55f)break;else _0x16cead['push'](_0x16cead['shift']());}catch(_0x171f03){_0x16cead['push'](_0x16cead['shift']());}}}(a37_0x1645,0xd0533));import{existsSync,readFileSync}from'node:fs';function a37_0x4f7e(_0x2c086d,_0x34f4e1){const _0x1645d3=a37_0x1645();return a37_0x4f7e=function(_0x4f7e12,_0xafcdd){_0x4f7e12=_0x4f7e12-0x135;let _0x563805=_0x1645d3[_0x4f7e12];return _0x563805;},a37_0x4f7e(_0x2c086d,_0x34f4e1);}import{resolve}from'node:path';export const configPath=resolve(process[a37_0x1a0dc4(0x136)](),a37_0x1a0dc4(0x143));export function readConfig(){const _0x2aae2a=a37_0x1a0dc4;try{if(existsSync(configPath)){const _0x486cb6=readFileSync(configPath,{'encoding':_0x2aae2a(0x141)});return _0x486cb6?JSON[_0x2aae2a(0x13d)](_0x486cb6):{};}}catch(_0x39d955){}return{};}
@@ -1 +1 @@
1
- (function(_0x209535,_0x1d5d95){const _0x612d87=a38_0x17fe,_0x3fd721=_0x209535();while(!![]){try{const _0x2ea780=parseInt(_0x612d87(0x190))/0x1+parseInt(_0x612d87(0x181))/0x2*(parseInt(_0x612d87(0x188))/0x3)+parseInt(_0x612d87(0x192))/0x4*(parseInt(_0x612d87(0x186))/0x5)+-parseInt(_0x612d87(0x180))/0x6*(-parseInt(_0x612d87(0x18c))/0x7)+-parseInt(_0x612d87(0x18d))/0x8*(-parseInt(_0x612d87(0x187))/0x9)+-parseInt(_0x612d87(0x191))/0xa*(parseInt(_0x612d87(0x189))/0xb)+parseInt(_0x612d87(0x185))/0xc*(-parseInt(_0x612d87(0x18e))/0xd);if(_0x2ea780===_0x1d5d95)break;else _0x3fd721['push'](_0x3fd721['shift']());}catch(_0x3119c7){_0x3fd721['push'](_0x3fd721['shift']());}}}(a38_0x1f46,0x4bd43));import a38_0x35a0a3 from'node:path';function a38_0x17fe(_0x1ac421,_0x5e2b11){const _0x1f46f4=a38_0x1f46();return a38_0x17fe=function(_0x17fe95,_0x263d18){_0x17fe95=_0x17fe95-0x180;let _0x1abee1=_0x1f46f4[_0x17fe95];return _0x1abee1;},a38_0x17fe(_0x1ac421,_0x5e2b11);}import a38_0x3f231e from'node:fs';function a38_0x1f46(){const _0x51e84d=['385OpbUsV','1552336tLHmSM','39hXJfNq','复制目录时出错:','102187ORWwQa','12060TrgnNX','292IXiKHv','join','36894wVLqxC','26cYhfPi','name','isDirectory','error','7024716hJiTpv','39135aQnAzZ','27DCgxWL','112191qhqrjw','121PdWZHf','copyFileSync','mkdirSync'];a38_0x1f46=function(){return _0x51e84d;};return a38_0x1f46();}export async function copyDirectory(_0x1d0204,_0x327a8a){const _0x17bd30=a38_0x17fe;try{const _0x447b12=a38_0x3f231e['readdirSync'](_0x1d0204,{'withFileTypes':!![]});a38_0x3f231e[_0x17bd30(0x18b)](_0x327a8a,{'recursive':!![]});for(const _0xfe9d87 of _0x447b12){const _0x3a00d9=a38_0x35a0a3[_0x17bd30(0x193)](_0x1d0204,_0xfe9d87[_0x17bd30(0x182)]),_0x56b4d0=a38_0x35a0a3[_0x17bd30(0x193)](_0x327a8a,_0xfe9d87[_0x17bd30(0x182)]);_0xfe9d87[_0x17bd30(0x183)]()?await copyDirectory(_0x3a00d9,_0x56b4d0):a38_0x3f231e[_0x17bd30(0x18a)](_0x3a00d9,_0x56b4d0);}}catch(_0x16e02a){console[_0x17bd30(0x184)](_0x17bd30(0x18f),_0x16e02a);}}
1
+ (function(_0x44f4a4,_0x8db6ae){const _0x263176=a38_0x4873,_0x10b51c=_0x44f4a4();while(!![]){try{const _0x404226=parseInt(_0x263176(0x19e))/0x1+parseInt(_0x263176(0x19b))/0x2+parseInt(_0x263176(0x1a2))/0x3+-parseInt(_0x263176(0x19a))/0x4+-parseInt(_0x263176(0x199))/0x5+-parseInt(_0x263176(0x19c))/0x6*(parseInt(_0x263176(0x1a4))/0x7)+-parseInt(_0x263176(0x1a1))/0x8*(-parseInt(_0x263176(0x1a3))/0x9);if(_0x404226===_0x8db6ae)break;else _0x10b51c['push'](_0x10b51c['shift']());}catch(_0x993f5b){_0x10b51c['push'](_0x10b51c['shift']());}}}(a38_0x2198,0xeaa85));import a38_0x390ca7 from'node:path';import a38_0x2f5d07 from'node:fs';function a38_0x4873(_0x2030ad,_0xdc6ffa){const _0x219811=a38_0x2198();return a38_0x4873=function(_0x4873b8,_0x1f1596){_0x4873b8=_0x4873b8-0x198;let _0x1d423e=_0x219811[_0x4873b8];return _0x1d423e;},a38_0x4873(_0x2030ad,_0xdc6ffa);}export async function copyDirectory(_0x1bc896,_0xb10937){const _0x5008b1=a38_0x4873;try{const _0x46d52f=a38_0x2f5d07['readdirSync'](_0x1bc896,{'withFileTypes':!![]});a38_0x2f5d07[_0x5008b1(0x198)](_0xb10937,{'recursive':!![]});for(const _0x16c1b4 of _0x46d52f){const _0x5db597=a38_0x390ca7['join'](_0x1bc896,_0x16c1b4[_0x5008b1(0x19f)]),_0x15e895=a38_0x390ca7[_0x5008b1(0x1a5)](_0xb10937,_0x16c1b4[_0x5008b1(0x19f)]);_0x16c1b4[_0x5008b1(0x1a0)]()?await copyDirectory(_0x5db597,_0x15e895):a38_0x2f5d07['copyFileSync'](_0x5db597,_0x15e895);}}catch(_0x30dd62){console[_0x5008b1(0x1a6)](_0x5008b1(0x19d),_0x30dd62);}}function a38_0x2198(){const _0x5c90e6=['4794925cAjVKl','2305188KmKSfk','1615016FypJKT','5730BomhnE','复制目录时出错:','582281BOlKok','name','isDirectory','8190216SNTKNP','2457534TxyxEQ','9zfOZhS','5397voMRrQ','join','error','mkdirSync'];a38_0x2198=function(){return _0x5c90e6;};return a38_0x2198();}
@@ -1 +1 @@
1
- const a39_0x47f93c=a39_0x5568;(function(_0x3b93dc,_0x3c5cdf){const _0x4ded42=a39_0x5568,_0x6260c8=_0x3b93dc();while(!![]){try{const _0x285ccc=-parseInt(_0x4ded42(0x1ce))/0x1*(parseInt(_0x4ded42(0x1ca))/0x2)+parseInt(_0x4ded42(0x1c1))/0x3+parseInt(_0x4ded42(0x1c8))/0x4+-parseInt(_0x4ded42(0x1c0))/0x5*(-parseInt(_0x4ded42(0x1c4))/0x6)+-parseInt(_0x4ded42(0x1c9))/0x7+-parseInt(_0x4ded42(0x1d1))/0x8+-parseInt(_0x4ded42(0x1bd))/0x9*(-parseInt(_0x4ded42(0x1be))/0xa);if(_0x285ccc===_0x3c5cdf)break;else _0x6260c8['push'](_0x6260c8['shift']());}catch(_0x5d9409){_0x6260c8['push'](_0x6260c8['shift']());}}}(a39_0x2e3e,0xc67b2));import a39_0x6b97bf from'winston';import a39_0xfe08a5 from'node:fs';import a39_0x1159b2 from'node:path';function a39_0x5568(_0x22e084,_0x485880){const _0x2e3ef9=a39_0x2e3e();return a39_0x5568=function(_0x5568f7,_0x1f6f81){_0x5568f7=_0x5568f7-0x19c;let _0x5147b3=_0x2e3ef9[_0x5568f7];return _0x5147b3;},a39_0x5568(_0x22e084,_0x485880);}class Logger{['winstonLogger'];[a39_0x47f93c(0x19f)];constructor(){const _0x38ef06=a39_0x47f93c;this[_0x38ef06(0x19f)]='';}[a39_0x47f93c(0x1d0)](){const _0x282d16=a39_0x47f93c,_0x3f0467=a39_0x1159b2[_0x282d16(0x1af)](this[_0x282d16(0x19f)]);!a39_0xfe08a5['existsSync'](_0x3f0467)&&a39_0xfe08a5[_0x282d16(0x1b9)](_0x3f0467,{'recursive':!![]});const _0x4f1be9=a39_0x6b97bf[_0x282d16(0x1b2)][_0x282d16(0x1b8)](a39_0x6b97bf[_0x282d16(0x1b2)][_0x282d16(0x1b3)](),a39_0x6b97bf[_0x282d16(0x1b2)][_0x282d16(0x1ae)]({'stack':!![]}),a39_0x6b97bf[_0x282d16(0x1b2)][_0x282d16(0x1c7)](_0x5a75e5=>{const _0x3157e6=_0x282d16,_0x73c7cb={'timestamp':_0x5a75e5['timestamp']||new Date()[_0x3157e6(0x1c3)](),'level':_0x5a75e5[_0x3157e6(0x1a5)]||_0x3157e6(0x1a1),'command':_0x5a75e5['command']||_0x3157e6(0x1cb),'message':_0x5a75e5['message']||'','duration':_0x5a75e5[_0x3157e6(0x1ac)]||undefined,'details':_0x5a75e5[_0x3157e6(0x1cc)]||undefined};return JSON[_0x3157e6(0x1a2)](_0x73c7cb);}));this[_0x282d16(0x1bb)]=a39_0x6b97bf['createLogger']({'level':_0x282d16(0x1a1),'format':_0x4f1be9,'transports':[new a39_0x6b97bf[(_0x282d16(0x1a0))]['File']({'filename':this[_0x282d16(0x19f)],'level':_0x282d16(0x1a1)})],'silent':![]}),a39_0x6b97bf['addColors']({'success':'green','error':_0x282d16(0x1cf),'warn':'yellow','info':'blue'});}[a39_0x47f93c(0x1a4)](_0x143b21){const _0x5ede68=a39_0x47f93c;this[_0x5ede68(0x19f)]=a39_0x1159b2[_0x5ede68(0x1bf)](_0x143b21,_0x5ede68(0x1b6)),this[_0x5ede68(0x1bb)]&&this[_0x5ede68(0x1bb)][_0x5ede68(0x1b7)](),this['initWinstonLogger']();}['info'](_0x841557,_0xb14b00,_0x53e738){const _0x37e5dc=a39_0x47f93c;if(!this[_0x37e5dc(0x19f)]||!this[_0x37e5dc(0x1bb)])return;this[_0x37e5dc(0x1bb)][_0x37e5dc(0x1a1)](_0xb14b00,{'command':_0x841557,'details':_0x53e738});}['success'](_0x400c78,_0x529152,_0xba83fe,_0x4b1838){const _0x3ea7a6=a39_0x47f93c;if(!this[_0x3ea7a6(0x19f)]||!this[_0x3ea7a6(0x1bb)])return;this[_0x3ea7a6(0x1bb)][_0x3ea7a6(0x1ad)](_0x3ea7a6(0x1a1),_0x529152,{'level':_0x3ea7a6(0x19d),'command':_0x400c78,'duration':_0xba83fe,'details':_0x4b1838});}['error'](_0x2abcf7,_0x2cb4fe,_0xbcb14f){const _0x496662=a39_0x47f93c;if(!this['logFilePath']||!this[_0x496662(0x1bb)])return;this['winstonLogger'][_0x496662(0x1b5)](_0x2cb4fe,{'command':_0x2abcf7,'details':_0xbcb14f});}[a39_0x47f93c(0x1c2)](_0x2d56a4,_0x3a58f3,_0x36a3db){const _0xfa28a4=a39_0x47f93c;if(!this[_0xfa28a4(0x19f)]||!this[_0xfa28a4(0x1bb)])return;this['winstonLogger'][_0xfa28a4(0x1c2)](_0x3a58f3,{'command':_0x2d56a4,'details':_0x36a3db});}async[a39_0x47f93c(0x1bc)](_0x9b687b,_0x2a89e1,_0x1ce8cc){const _0x4da7b1=a39_0x47f93c,_0x30c09a=Date[_0x4da7b1(0x1a9)]();this[_0x4da7b1(0x1a1)](_0x9b687b,_0x4da7b1(0x1c6)+_0x2a89e1);try{const _0xe08947=await _0x1ce8cc(),_0x1d1943=Date[_0x4da7b1(0x1a9)]()-_0x30c09a;return this[_0x4da7b1(0x19d)](_0x9b687b,_0x4da7b1(0x1a3)+_0x2a89e1,_0x1d1943),_0xe08947;}catch(_0x3fc706){const _0x39f9e7=Date[_0x4da7b1(0x1a9)]()-_0x30c09a;this[_0x4da7b1(0x1b5)](_0x9b687b,_0x4da7b1(0x1cd)+_0x2a89e1,{'error':_0x3fc706 instanceof Error?_0x3fc706['message']:String(_0x3fc706),'duration':_0x39f9e7});throw _0x3fc706;}}[a39_0x47f93c(0x19c)](){const _0x409294=a39_0x47f93c;try{if(!a39_0xfe08a5['existsSync'](this[_0x409294(0x19f)]))return[];const _0x3de6b7=a39_0xfe08a5[_0x409294(0x1ba)](this[_0x409294(0x19f)],'utf8');return _0x3de6b7[_0x409294(0x19e)]('\x0a')[_0x409294(0x1ab)](_0x3d2a70=>_0x3d2a70[_0x409294(0x1b4)]())[_0x409294(0x1a6)](_0x159067=>JSON[_0x409294(0x1aa)](_0x159067));}catch(_0x2f4bf6){return console['warn'](_0x409294(0x1c5),_0x2f4bf6),[];}}[a39_0x47f93c(0x1b0)](){const _0x38e2c6=a39_0x47f93c;try{a39_0xfe08a5['existsSync'](this[_0x38e2c6(0x19f)])&&a39_0xfe08a5['writeFileSync'](this['logFilePath'],'',_0x38e2c6(0x1a8));}catch(_0x2f82b0){console['warn'](_0x38e2c6(0x1a7),_0x2f82b0);}}[a39_0x47f93c(0x1b1)](){return this['winstonLogger'];}}function a39_0x2e3e(){const _0x2392cc=['level','map','Failed\x20to\x20clear\x20logs:','utf8','now','parse','filter','duration','log','errors','dirname','clearLogs','getWinstonInstance','format','timestamp','trim','error','.lovrabet.log','clear','combine','mkdirSync','readFileSync','winstonLogger','logTask','15848523uBUJfZ','10QdxMAW','join','9505oxHazR','1806738kNnoRj','warn','toISOString','1626VFhcXT','Failed\x20to\x20read\x20logs:','开始执行:\x20','printf','6238688aXdbCb','9179660MuzKHI','2srQclN','unknown','details','失败:\x20','1351194SIsEHg','red','initWinstonLogger','7699872HEUYyG','readLogs','success','split','logFilePath','transports','info','stringify','完成:\x20','setLogPath'];a39_0x2e3e=function(){return _0x2392cc;};return a39_0x2e3e();}export const logger=new Logger();
1
+ const a39_0x455b5d=a39_0x454b;function a39_0x1f4b(){const _0x3c0b06=['7269024gjBfSu','mkdirSync','2yfERVr','warn','parse','split','info','3108GIhivr','level','stringify','command','success','失败:\x20','trim','join','format','Failed\x20to\x20clear\x20logs:','开始执行:\x20','dirname','log','toISOString','green','1266365DjYGlm','clearLogs','1460ymvuBH','68787wyFNln','Failed\x20to\x20read\x20logs:','287916lDxBkA','combine','4303388IYIyJz','errors','blue','error','getWinstonInstance','transports','filter','now','.lovrabet.log','winstonLogger','363PzcPtQ','timestamp','initWinstonLogger','logFilePath','addColors','yellow','3818739rEUasn','clear','9138JMkNXI','5BjYxFF','existsSync','details','readLogs','createLogger'];a39_0x1f4b=function(){return _0x3c0b06;};return a39_0x1f4b();}(function(_0x46d964,_0x521516){const _0xb2db99=a39_0x454b,_0x375d2a=_0x46d964();while(!![]){try{const _0x505bbc=-parseInt(_0xb2db99(0x1be))/0x1+parseInt(_0xb2db99(0x1aa))/0x2*(-parseInt(_0xb2db99(0x1a0))/0x3)+-parseInt(_0xb2db99(0x1c5))/0x4*(-parseInt(_0xb2db99(0x1a3))/0x5)+parseInt(_0xb2db99(0x1a2))/0x6*(-parseInt(_0xb2db99(0x1af))/0x7)+parseInt(_0xb2db99(0x1a8))/0x8+-parseInt(_0xb2db99(0x1c1))/0x9*(-parseInt(_0xb2db99(0x1c0))/0xa)+-parseInt(_0xb2db99(0x1cf))/0xb*(-parseInt(_0xb2db99(0x1c3))/0xc);if(_0x505bbc===_0x521516)break;else _0x375d2a['push'](_0x375d2a['shift']());}catch(_0x4a8e42){_0x375d2a['push'](_0x375d2a['shift']());}}}(a39_0x1f4b,0xa5318));import a39_0x46d67b from'winston';function a39_0x454b(_0x2c1662,_0x9a4928){const _0x1f4b5d=a39_0x1f4b();return a39_0x454b=function(_0x454bca,_0x2d7335){_0x454bca=_0x454bca-0x1a0;let _0x40d5f6=_0x1f4b5d[_0x454bca];return _0x40d5f6;},a39_0x454b(_0x2c1662,_0x9a4928);}import a39_0x4bc1b3 from'node:fs';import a39_0x414bbc from'node:path';class Logger{['winstonLogger'];['logFilePath'];constructor(){this['logFilePath']='';}[a39_0x455b5d(0x1d1)](){const _0x5a7922=a39_0x455b5d,_0x41d67a=a39_0x414bbc[_0x5a7922(0x1ba)](this['logFilePath']);!a39_0x4bc1b3[_0x5a7922(0x1a4)](_0x41d67a)&&a39_0x4bc1b3[_0x5a7922(0x1a9)](_0x41d67a,{'recursive':!![]});const _0x1d97f3=a39_0x46d67b[_0x5a7922(0x1b7)][_0x5a7922(0x1c4)](a39_0x46d67b[_0x5a7922(0x1b7)][_0x5a7922(0x1d0)](),a39_0x46d67b[_0x5a7922(0x1b7)][_0x5a7922(0x1c6)]({'stack':!![]}),a39_0x46d67b[_0x5a7922(0x1b7)]['printf'](_0x12a73b=>{const _0x5f02da=_0x5a7922,_0x168899={'timestamp':_0x12a73b[_0x5f02da(0x1d0)]||new Date()[_0x5f02da(0x1bc)](),'level':_0x12a73b[_0x5f02da(0x1b0)]||'info','command':_0x12a73b[_0x5f02da(0x1b2)]||'unknown','message':_0x12a73b['message']||'','duration':_0x12a73b['duration']||undefined,'details':_0x12a73b[_0x5f02da(0x1a5)]||undefined};return JSON[_0x5f02da(0x1b1)](_0x168899);}));this['winstonLogger']=a39_0x46d67b[_0x5a7922(0x1a7)]({'level':_0x5a7922(0x1ae),'format':_0x1d97f3,'transports':[new a39_0x46d67b[(_0x5a7922(0x1ca))]['File']({'filename':this[_0x5a7922(0x1d2)],'level':_0x5a7922(0x1ae)})],'silent':![]}),a39_0x46d67b[_0x5a7922(0x1d3)]({'success':_0x5a7922(0x1bd),'error':'red','warn':_0x5a7922(0x1d4),'info':_0x5a7922(0x1c7)});}['setLogPath'](_0x453a18){const _0x138b41=a39_0x455b5d;this[_0x138b41(0x1d2)]=a39_0x414bbc[_0x138b41(0x1b6)](_0x453a18,_0x138b41(0x1cd)),this[_0x138b41(0x1ce)]&&this[_0x138b41(0x1ce)][_0x138b41(0x1a1)](),this['initWinstonLogger']();}[a39_0x455b5d(0x1ae)](_0xff3064,_0x4a9e37,_0xb5d4aa){const _0x5a8246=a39_0x455b5d;if(!this[_0x5a8246(0x1d2)]||!this[_0x5a8246(0x1ce)])return;this[_0x5a8246(0x1ce)][_0x5a8246(0x1ae)](_0x4a9e37,{'command':_0xff3064,'details':_0xb5d4aa});}['success'](_0x2dd802,_0x53aecb,_0x765674,_0x4294e0){const _0x3b5cbc=a39_0x455b5d;if(!this[_0x3b5cbc(0x1d2)]||!this['winstonLogger'])return;this[_0x3b5cbc(0x1ce)][_0x3b5cbc(0x1bb)]('info',_0x53aecb,{'level':_0x3b5cbc(0x1b3),'command':_0x2dd802,'duration':_0x765674,'details':_0x4294e0});}['error'](_0x4b25f8,_0x4539d4,_0x1b2d89){const _0x283264=a39_0x455b5d;if(!this[_0x283264(0x1d2)]||!this[_0x283264(0x1ce)])return;this[_0x283264(0x1ce)][_0x283264(0x1c8)](_0x4539d4,{'command':_0x4b25f8,'details':_0x1b2d89});}[a39_0x455b5d(0x1ab)](_0x2c6af1,_0x241e7f,_0x33f4dd){const _0x26b9f0=a39_0x455b5d;if(!this[_0x26b9f0(0x1d2)]||!this[_0x26b9f0(0x1ce)])return;this[_0x26b9f0(0x1ce)][_0x26b9f0(0x1ab)](_0x241e7f,{'command':_0x2c6af1,'details':_0x33f4dd});}async['logTask'](_0x4b1d3a,_0x279e94,_0x12df3c){const _0x16e858=a39_0x455b5d,_0x1914cb=Date[_0x16e858(0x1cc)]();this['info'](_0x4b1d3a,_0x16e858(0x1b9)+_0x279e94);try{const _0x470045=await _0x12df3c(),_0xdbe7ac=Date[_0x16e858(0x1cc)]()-_0x1914cb;return this[_0x16e858(0x1b3)](_0x4b1d3a,'完成:\x20'+_0x279e94,_0xdbe7ac),_0x470045;}catch(_0x3b1c10){const _0x49fc66=Date[_0x16e858(0x1cc)]()-_0x1914cb;this[_0x16e858(0x1c8)](_0x4b1d3a,_0x16e858(0x1b4)+_0x279e94,{'error':_0x3b1c10 instanceof Error?_0x3b1c10['message']:String(_0x3b1c10),'duration':_0x49fc66});throw _0x3b1c10;}}[a39_0x455b5d(0x1a6)](){const _0x402ad9=a39_0x455b5d;try{if(!a39_0x4bc1b3['existsSync'](this['logFilePath']))return[];const _0x48afe4=a39_0x4bc1b3['readFileSync'](this[_0x402ad9(0x1d2)],'utf8');return _0x48afe4[_0x402ad9(0x1ad)]('\x0a')[_0x402ad9(0x1cb)](_0x3eacf7=>_0x3eacf7[_0x402ad9(0x1b5)]())['map'](_0x54e127=>JSON[_0x402ad9(0x1ac)](_0x54e127));}catch(_0x48a30f){return console['warn'](_0x402ad9(0x1c2),_0x48a30f),[];}}[a39_0x455b5d(0x1bf)](){const _0x24f089=a39_0x455b5d;try{a39_0x4bc1b3[_0x24f089(0x1a4)](this[_0x24f089(0x1d2)])&&a39_0x4bc1b3['writeFileSync'](this[_0x24f089(0x1d2)],'','utf8');}catch(_0x102d48){console['warn'](_0x24f089(0x1b8),_0x102d48);}}[a39_0x455b5d(0x1c9)](){const _0x373baf=a39_0x455b5d;return this[_0x373baf(0x1ce)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a40_0x28226e=a40_0x21fd;(function(_0xbfee75,_0x41cb60){const _0x3290ed=a40_0x21fd,_0x4ff9ed=_0xbfee75();while(!![]){try{const _0x1238bb=parseInt(_0x3290ed(0x99))/0x1+parseInt(_0x3290ed(0x89))/0x2+parseInt(_0x3290ed(0xa8))/0x3*(parseInt(_0x3290ed(0x88))/0x4)+parseInt(_0x3290ed(0x98))/0x5+-parseInt(_0x3290ed(0x7e))/0x6+parseInt(_0x3290ed(0xa4))/0x7*(parseInt(_0x3290ed(0xa0))/0x8)+-parseInt(_0x3290ed(0x8a))/0x9;if(_0x1238bb===_0x41cb60)break;else _0x4ff9ed['push'](_0x4ff9ed['shift']());}catch(_0x2cc84f){_0x4ff9ed['push'](_0x4ff9ed['shift']());}}}(a40_0x3e1e,0xf07af));import a40_0x3e0d97 from'node:fs';function a40_0x21fd(_0x205663,_0x4457e1){const _0x3e1e94=a40_0x3e1e();return a40_0x21fd=function(_0x21fd9e,_0x4c8bf1){_0x21fd9e=_0x21fd9e-0x7b;let _0x2a9ab0=_0x3e1e94[_0x21fd9e];return _0x2a9ab0;},a40_0x21fd(_0x205663,_0x4457e1);}function a40_0x3e1e(){const _0x373971=['lastIndexOf','join','toComponentName','split','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','writeFile','10852AhpgQU','2717794GikpMf','3449961EhHLpi','error','addImport','now','length','router','slice','index','indexOf','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','toLowerCase','charAt','match','路由配置更新完成','2622030WjjfJL','26806znsCQD','previewChanges','success','addPageRoute','promises','toUpperCase','routerFilePath','949432suWGNL','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','开始更新路由配置','utf8','21KgtxlV','import\x20','readFile','src','717gwenhL','existsSync','路由文件不存在:\x20','index.tsx','addRoute','9277302dIzGRf','includes','path:\x20\x22','map'];a40_0x3e1e=function(){return _0x373971;};return a40_0x3e1e();}import a40_0x22b0cb from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a40_0x28226e(0x9f)];constructor(_0x201119){const _0x2fd31e=a40_0x28226e;this[_0x2fd31e(0x9f)]=a40_0x22b0cb[_0x2fd31e(0x83)](_0x201119,_0x2fd31e(0xa7),'router',_0x2fd31e(0x7c));}async[a40_0x28226e(0x9c)](_0x359215,_0x27a36f){const _0x208401=a40_0x28226e;if(!a40_0x3e0d97[_0x208401(0xa9)](this[_0x208401(0x9f)]))throw new Error(_0x208401(0x7b)+this[_0x208401(0x9f)]);const _0xe20bd5=Date[_0x208401(0x8d)]();logger['info'](_0x208401(0x8f),_0x208401(0xa2),{'pageName':_0x359215,'routePath':_0x27a36f,'file':this['routerFilePath']});try{const _0x24ce22=await a40_0x3e0d97[_0x208401(0x9d)][_0x208401(0xa6)](this[_0x208401(0x9f)],_0x208401(0xa3)),_0x39ae2d=this[_0x208401(0x84)](_0x359215),_0x11d7f4=this[_0x208401(0x8c)](_0x24ce22,_0x39ae2d,_0x359215),_0x7cfc3b=this[_0x208401(0x7d)](_0x11d7f4,_0x27a36f,_0x39ae2d);await a40_0x3e0d97[_0x208401(0x9d)][_0x208401(0x87)](this[_0x208401(0x9f)],_0x7cfc3b,_0x208401(0xa3));const _0x44c546=Date[_0x208401(0x8d)]()-_0xe20bd5;logger[_0x208401(0x9b)](_0x208401(0x8f),_0x208401(0x97),_0x44c546,{'pageName':_0x359215,'routePath':_0x27a36f,'componentName':_0x39ae2d});}catch(_0x325a99){const _0x40f929=Date[_0x208401(0x8d)]()-_0xe20bd5;logger[_0x208401(0x8b)]('router','路由配置更新失败',{'pageName':_0x359215,'routePath':_0x27a36f,'error':_0x325a99 instanceof Error?_0x325a99['message']:String(_0x325a99),'duration':_0x40f929});throw _0x325a99;}}[a40_0x28226e(0x84)](_0x153c60){const _0x433e1b=a40_0x28226e;return _0x153c60[_0x433e1b(0x85)]('-')[_0x433e1b(0x81)](_0x52b869=>_0x52b869[_0x433e1b(0x95)](0x0)[_0x433e1b(0x9e)]()+_0x52b869[_0x433e1b(0x90)](0x1)[_0x433e1b(0x94)]())['join']('');}[a40_0x28226e(0x8c)](_0x7a55a6,_0x48172d,_0x2bd343){const _0x475fd3=a40_0x28226e,_0x219be5=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x3dca1c=_0x7a55a6['match'](_0x219be5)||[],_0x58e4dd=_0x475fd3(0xa5)+_0x48172d+'\x20from\x20\x22../pages/'+_0x2bd343+'\x22;';if(_0x7a55a6[_0x475fd3(0x7f)](_0x58e4dd))return _0x7a55a6;if(_0x3dca1c[_0x475fd3(0x8e)]>0x0){const _0xfaaea4=_0x3dca1c[_0x3dca1c['length']-0x1];if(_0xfaaea4){const _0x40467d=_0x7a55a6[_0x475fd3(0x82)](_0xfaaea4),_0x549499=_0x40467d+_0xfaaea4[_0x475fd3(0x8e)];return _0x7a55a6[_0x475fd3(0x90)](0x0,_0x549499)+_0x58e4dd+'\x0a'+_0x7a55a6['slice'](_0x549499);}}const _0xcb177a=_0x7a55a6[_0x475fd3(0x96)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0xcb177a&&_0xcb177a[_0x475fd3(0x91)]!==undefined){const _0x1f6839=_0xcb177a[_0x475fd3(0x91)]+_0xcb177a[0x0][_0x475fd3(0x8e)];return _0x7a55a6[_0x475fd3(0x90)](0x0,_0x1f6839)+_0x58e4dd+'\x0a'+_0x7a55a6['slice'](_0x1f6839);}return _0x7a55a6;}['addRoute'](_0xc345ad,_0x23b62c,_0xa73962){const _0x23afdc=a40_0x28226e,_0x40591f=_0x23afdc(0x93)+_0x23b62c+_0x23afdc(0xa1)+_0xa73962+_0x23afdc(0x86);if(_0xc345ad[_0x23afdc(0x7f)](_0x23afdc(0x80)+_0x23b62c+'\x22'))return _0xc345ad;const _0x26c0ed=/children:\s*\[([\s\S]*?)\]/,_0x199eae=_0xc345ad[_0x23afdc(0x96)](_0x26c0ed);if(!_0x199eae||_0x199eae['index']===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x143c1f=_0x199eae[0x1],_0x3a90de=_0x199eae[_0x23afdc(0x91)]+_0x199eae[0x0][_0x23afdc(0x92)]('[')+0x1,_0x481e9a=_0x143c1f?.[_0x23afdc(0x96)](/\{[\s\S]*?\},/g)||[];if(_0x481e9a[_0x23afdc(0x8e)]>0x0){const _0x5404f5=_0x481e9a[_0x481e9a[_0x23afdc(0x8e)]-0x1];if(_0x5404f5){const _0x12302d=_0xc345ad['lastIndexOf'](_0x5404f5),_0x17a1ef=_0x12302d+_0x5404f5['length'];return _0xc345ad[_0x23afdc(0x90)](0x0,_0x17a1ef)+'\x0a'+_0x40591f+_0xc345ad[_0x23afdc(0x90)](_0x17a1ef);}}return _0xc345ad[_0x23afdc(0x90)](0x0,_0x3a90de)+'\x0a'+_0x40591f+_0xc345ad['slice'](_0x3a90de);}async[a40_0x28226e(0x9a)](_0x16ae13,_0xb6fec1){const _0x5a8714=a40_0x28226e;if(!a40_0x3e0d97[_0x5a8714(0xa9)](this[_0x5a8714(0x9f)]))throw new Error(_0x5a8714(0x7b)+this[_0x5a8714(0x9f)]);const _0x252881=await a40_0x3e0d97['promises'][_0x5a8714(0xa6)](this[_0x5a8714(0x9f)],_0x5a8714(0xa3)),_0x1f5d3b=this[_0x5a8714(0x84)](_0x16ae13);let _0x1dea22=this[_0x5a8714(0x8c)](_0x252881,_0x1f5d3b,_0x16ae13);return _0x1dea22=this[_0x5a8714(0x7d)](_0x1dea22,_0xb6fec1,_0x1f5d3b),_0x1dea22;}}
1
+ const a40_0xdcf4d8=a40_0x194a;(function(_0x5c04b4,_0x1acb01){const _0x232876=a40_0x194a,_0x550459=_0x5c04b4();while(!![]){try{const _0x129fff=parseInt(_0x232876(0xe1))/0x1*(parseInt(_0x232876(0xdb))/0x2)+parseInt(_0x232876(0xe7))/0x3*(-parseInt(_0x232876(0xca))/0x4)+-parseInt(_0x232876(0xc7))/0x5*(-parseInt(_0x232876(0xc3))/0x6)+-parseInt(_0x232876(0xc4))/0x7+-parseInt(_0x232876(0xcf))/0x8*(parseInt(_0x232876(0xba))/0x9)+parseInt(_0x232876(0xd9))/0xa+parseInt(_0x232876(0xd3))/0xb*(parseInt(_0x232876(0xbc))/0xc);if(_0x129fff===_0x1acb01)break;else _0x550459['push'](_0x550459['shift']());}catch(_0x16d038){_0x550459['push'](_0x550459['shift']());}}}(a40_0x3132,0x7236f));import a40_0x2ea47c from'node:fs';function a40_0x194a(_0x1d0f09,_0x4bf770){const _0x313203=a40_0x3132();return a40_0x194a=function(_0x194a68,_0xd93bd7){_0x194a68=_0x194a68-0xb9;let _0x22aca6=_0x313203[_0x194a68];return _0x22aca6;},a40_0x194a(_0x1d0f09,_0x4bf770);}import a40_0x10a933 from'node:path';import{logger}from'./logger.js';function a40_0x3132(){const _0x332035=['68pOaAOY','src','路由文件不存在:\x20','message','success','path:\x20\x22','3644FqBihW','writeFile','routerFilePath','utf8','promises','lastIndexOf','1390962fZgoLg','addImport','711468jRGZfw','error','23136vtblJc','开始更新路由配置','previewChanges','map','\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','length','213642gNfGKt','1866781DnIlrV','import\x20','toUpperCase','125tyvcMp','charAt','addRoute','8ANUluP','slice','addPageRoute','includes','index','56UmKfFx','路由配置更新失败','index.tsx','未找到路由配置的\x20children\x20数组','4631hibPDR','router','now','match','readFile','\x20from\x20\x22../pages/','3894190TsaIXK','toComponentName'];a40_0x3132=function(){return _0x332035;};return a40_0x3132();}export class RouterUpdater{['routerFilePath'];constructor(_0x25b45b){const _0x10b9c9=a40_0x194a;this[_0x10b9c9(0xe3)]=a40_0x10a933['join'](_0x25b45b,_0x10b9c9(0xdc),_0x10b9c9(0xd4),_0x10b9c9(0xd1));}async[a40_0xdcf4d8(0xcc)](_0x15adab,_0x16ca69){const _0x2127b1=a40_0xdcf4d8;if(!a40_0x2ea47c['existsSync'](this['routerFilePath']))throw new Error(_0x2127b1(0xdd)+this[_0x2127b1(0xe3)]);const _0x417092=Date[_0x2127b1(0xd5)]();logger['info']('router',_0x2127b1(0xbd),{'pageName':_0x15adab,'routePath':_0x16ca69,'file':this[_0x2127b1(0xe3)]});try{const _0x5ce0e3=await a40_0x2ea47c[_0x2127b1(0xe5)][_0x2127b1(0xd7)](this['routerFilePath'],'utf8'),_0x3675c1=this[_0x2127b1(0xda)](_0x15adab),_0x1c75c3=this['addImport'](_0x5ce0e3,_0x3675c1,_0x15adab),_0x29a97c=this[_0x2127b1(0xc9)](_0x1c75c3,_0x16ca69,_0x3675c1);await a40_0x2ea47c[_0x2127b1(0xe5)][_0x2127b1(0xe2)](this[_0x2127b1(0xe3)],_0x29a97c,_0x2127b1(0xe4));const _0x570502=Date[_0x2127b1(0xd5)]()-_0x417092;logger[_0x2127b1(0xdf)](_0x2127b1(0xd4),'路由配置更新完成',_0x570502,{'pageName':_0x15adab,'routePath':_0x16ca69,'componentName':_0x3675c1});}catch(_0x33aa9f){const _0x5cc18a=Date['now']()-_0x417092;logger[_0x2127b1(0xbb)](_0x2127b1(0xd4),_0x2127b1(0xd0),{'pageName':_0x15adab,'routePath':_0x16ca69,'error':_0x33aa9f instanceof Error?_0x33aa9f[_0x2127b1(0xde)]:String(_0x33aa9f),'duration':_0x5cc18a});throw _0x33aa9f;}}[a40_0xdcf4d8(0xda)](_0x44d845){const _0x5eabd3=a40_0xdcf4d8;return _0x44d845['split']('-')[_0x5eabd3(0xbf)](_0x4ca7e6=>_0x4ca7e6[_0x5eabd3(0xc8)](0x0)[_0x5eabd3(0xc6)]()+_0x4ca7e6[_0x5eabd3(0xcb)](0x1)['toLowerCase']())['join']('');}[a40_0xdcf4d8(0xb9)](_0x3cc0d3,_0x3f5fdf,_0x3c062c){const _0x5b54f2=a40_0xdcf4d8,_0x4ca0eb=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0xbd85d6=_0x3cc0d3[_0x5b54f2(0xd6)](_0x4ca0eb)||[],_0x4d6a1c=_0x5b54f2(0xc5)+_0x3f5fdf+_0x5b54f2(0xd8)+_0x3c062c+'\x22;';if(_0x3cc0d3[_0x5b54f2(0xcd)](_0x4d6a1c))return _0x3cc0d3;if(_0xbd85d6[_0x5b54f2(0xc2)]>0x0){const _0x391d21=_0xbd85d6[_0xbd85d6[_0x5b54f2(0xc2)]-0x1];if(_0x391d21){const _0x4b59a7=_0x3cc0d3['lastIndexOf'](_0x391d21),_0x3b7dd0=_0x4b59a7+_0x391d21[_0x5b54f2(0xc2)];return _0x3cc0d3[_0x5b54f2(0xcb)](0x0,_0x3b7dd0)+_0x4d6a1c+'\x0a'+_0x3cc0d3[_0x5b54f2(0xcb)](_0x3b7dd0);}}const _0x20dc37=_0x3cc0d3[_0x5b54f2(0xd6)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x20dc37&&_0x20dc37['index']!==undefined){const _0xa139c4=_0x20dc37[_0x5b54f2(0xce)]+_0x20dc37[0x0][_0x5b54f2(0xc2)];return _0x3cc0d3[_0x5b54f2(0xcb)](0x0,_0xa139c4)+_0x4d6a1c+'\x0a'+_0x3cc0d3[_0x5b54f2(0xcb)](_0xa139c4);}return _0x3cc0d3;}[a40_0xdcf4d8(0xc9)](_0x34e5cd,_0x5ea49b,_0x5aa681){const _0x364bf7=a40_0xdcf4d8,_0x32dcc4=_0x364bf7(0xc1)+_0x5ea49b+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<'+_0x5aa681+_0x364bf7(0xc0);if(_0x34e5cd[_0x364bf7(0xcd)](_0x364bf7(0xe0)+_0x5ea49b+'\x22'))return _0x34e5cd;const _0x3f3ae7=/children:\s*\[([\s\S]*?)\]/,_0x285336=_0x34e5cd[_0x364bf7(0xd6)](_0x3f3ae7);if(!_0x285336||_0x285336[_0x364bf7(0xce)]===undefined)throw new Error(_0x364bf7(0xd2));const _0x58246e=_0x285336[0x1],_0x4c6c10=_0x285336[_0x364bf7(0xce)]+_0x285336[0x0]['indexOf']('[')+0x1,_0x4dbb2d=_0x58246e?.[_0x364bf7(0xd6)](/\{[\s\S]*?\},/g)||[];if(_0x4dbb2d['length']>0x0){const _0x36fc97=_0x4dbb2d[_0x4dbb2d['length']-0x1];if(_0x36fc97){const _0x136529=_0x34e5cd[_0x364bf7(0xe6)](_0x36fc97),_0x2f93ef=_0x136529+_0x36fc97['length'];return _0x34e5cd['slice'](0x0,_0x2f93ef)+'\x0a'+_0x32dcc4+_0x34e5cd[_0x364bf7(0xcb)](_0x2f93ef);}}return _0x34e5cd[_0x364bf7(0xcb)](0x0,_0x4c6c10)+'\x0a'+_0x32dcc4+_0x34e5cd[_0x364bf7(0xcb)](_0x4c6c10);}async[a40_0xdcf4d8(0xbe)](_0x548c4b,_0x3b3e54){const _0x37a2b6=a40_0xdcf4d8;if(!a40_0x2ea47c['existsSync'](this[_0x37a2b6(0xe3)]))throw new Error(_0x37a2b6(0xdd)+this[_0x37a2b6(0xe3)]);const _0x53b943=await a40_0x2ea47c[_0x37a2b6(0xe5)][_0x37a2b6(0xd7)](this[_0x37a2b6(0xe3)],_0x37a2b6(0xe4)),_0x206ebf=this[_0x37a2b6(0xda)](_0x548c4b);let _0x24c773=this[_0x37a2b6(0xb9)](_0x53b943,_0x206ebf,_0x548c4b);return _0x24c773=this[_0x37a2b6(0xc9)](_0x24c773,_0x3b3e54,_0x206ebf),_0x24c773;}}
@@ -1 +1 @@
1
- const a41_0x75efe8=a41_0x3730;function a41_0x41a4(){const _0x49dc3c=['slice','7fWnAHK','176113UeBGhf','keys','1783903gqMhGb','2-digit','isDirectory','1381803paeaLm','utf8','YourModel','2583MXPgNT','success','readdir','.css','464UBBvwl','toISOString','endsWith','toDisplayTitle','error','toLocaleString','api','4GybDpq','charAt','writeFile','extname','now','.ts','split','toUpperCase','replaceApiContent','toLocaleDateString','360674bOBNpd','readFile','replaceContent','toLocaleTimeString','map','processDirectory','template','toComponentName','replace','default','.tpl','name','.json','8944362mkvGgc','copyFile','.jsx','\x20\x20\x20\x20','pop','message','promises','processFile','.md','mkdir','.scss','info','join','8450ywxZcP','processTemplate','toLowerCase','2226235ThHlcn'];a41_0x41a4=function(){return _0x49dc3c;};return a41_0x41a4();}(function(_0x2e0503,_0xf44944){const _0x438532=a41_0x3730,_0x2599e3=_0x2e0503();while(!![]){try{const _0x2bf574=parseInt(_0x438532(0x15a))/0x1*(-parseInt(_0x438532(0x178))/0x2)+parseInt(_0x438532(0x160))/0x3*(-parseInt(_0x438532(0x16e))/0x4)+-parseInt(_0x438532(0x158))/0x5+parseInt(_0x438532(0x185))/0x6+parseInt(_0x438532(0x15b))/0x7*(parseInt(_0x438532(0x167))/0x8)+-parseInt(_0x438532(0x163))/0x9*(-parseInt(_0x438532(0x155))/0xa)+-parseInt(_0x438532(0x15d))/0xb;if(_0x2bf574===_0xf44944)break;else _0x2599e3['push'](_0x2599e3['shift']());}catch(_0x17f8fe){_0x2599e3['push'](_0x2599e3['shift']());}}}(a41_0x41a4,0xd2784));import a41_0x632ae9 from'node:fs';import a41_0x484255 from'node:path';function a41_0x3730(_0x1f4a9d,_0x1de987){const _0x41a451=a41_0x41a4();return a41_0x3730=function(_0x373009,_0x4c9d2b){_0x373009=_0x373009-0x14c;let _0x24fad4=_0x41a451[_0x373009];return _0x24fad4;},a41_0x3730(_0x1f4a9d,_0x1de987);}import{logger}from'./logger.js';export class TemplateReplacer{static[a41_0x75efe8(0x17f)](_0x3c6b88){const _0x3727ed=a41_0x75efe8,_0xf0547=_0x3c6b88['split']('/')[_0x3727ed(0x14c)]()||_0x3c6b88;return _0xf0547[_0x3727ed(0x174)]('-')[_0x3727ed(0x17c)](_0x52be9e=>_0x52be9e[_0x3727ed(0x16f)](0x0)[_0x3727ed(0x175)]()+_0x52be9e['slice'](0x1)[_0x3727ed(0x157)]())[_0x3727ed(0x154)]('');}static[a41_0x75efe8(0x16a)](_0x2505c3){const _0x299019=a41_0x75efe8,_0x53421d=_0x2505c3[_0x299019(0x174)]('/')['pop']()||_0x2505c3;return _0x53421d[_0x299019(0x174)]('-')[_0x299019(0x17c)](_0xb01db=>_0xb01db['charAt'](0x0)[_0x299019(0x175)]()+_0xb01db[_0x299019(0x159)](0x1)['toLowerCase']())[_0x299019(0x154)]('\x20');}static[a41_0x75efe8(0x17a)](_0x5749e7,_0x3f72b7,_0x4f96cb){const _0x41c996=a41_0x75efe8,_0x44f4f6=this[_0x41c996(0x17f)](_0x3f72b7),_0xcb220d=this[_0x41c996(0x16a)](_0x3f72b7),_0x2b1178=new Date(),_0x240a9e=_0x2b1178[_0x41c996(0x16c)](undefined,{'year':'numeric','month':_0x41c996(0x15e),'day':_0x41c996(0x15e),'hour':_0x41c996(0x15e),'minute':_0x41c996(0x15e),'second':_0x41c996(0x15e),'hour12':![]})['replace'](/\//g,'-'),_0x9a8e54=_0x2b1178[_0x41c996(0x177)](undefined,{'year':'numeric','month':_0x41c996(0x15e),'day':_0x41c996(0x15e)})[_0x41c996(0x180)](/\//g,'-'),_0x35190a=_0x2b1178[_0x41c996(0x17b)](undefined,{'hour12':![]});let _0x26b83d=_0x5749e7['replace'](/\{ComponentName\}/g,_0x44f4f6)['replace'](/\{DisplayTitle\}/g,_0xcb220d)[_0x41c996(0x180)](/\{PageName\}/g,_0x3f72b7)[_0x41c996(0x180)](/\{TemplateName\}/g,_0x4f96cb)['replace'](/\{CreatedAt\}/g,_0x240a9e)[_0x41c996(0x180)](/\{CreatedDate\}/g,_0x9a8e54)[_0x41c996(0x180)](/\{CreatedTime\}/g,_0x35190a);return _0x26b83d;}static[a41_0x75efe8(0x176)](_0x43aa1d,_0x5157ac,_0x3fb07b,_0x57a938,_0x3d4fc5,_0x5cc5e8,_0x71c1c7){const _0x1872b6=a41_0x75efe8,_0x4ee5d9=new Date(),_0x26e84b=_0x4ee5d9[_0x1872b6(0x168)](),_0x485160=JSON['stringify'](_0x3fb07b,null,0x2)[_0x1872b6(0x174)]('\x0a')[_0x1872b6(0x159)](0x1,-0x1)['map'](_0x1af58b=>_0x1af58b['replace'](/^ /,_0x1872b6(0x188)))[_0x1872b6(0x154)]('\x0a'),_0x50a638=_0x57a938||Object[_0x1872b6(0x15c)](_0x3fb07b)[0x0]||_0x1872b6(0x162);let _0x4ff5d0=_0x43aa1d[_0x1872b6(0x180)](/\{AppCode\}/g,_0x5157ac)[_0x1872b6(0x180)](/\{ModelConfigs\}/g,_0x485160)['replace'](/\{ExampleModelName\}/g,_0x50a638)[_0x1872b6(0x180)](/\{ApiFileName\}/g,_0x3d4fc5||_0x1872b6(0x16d))[_0x1872b6(0x180)](/\{ConfigName\}/g,_0x5cc5e8||_0x1872b6(0x181))[_0x1872b6(0x180)](/\{ClientConfigParam\}/g,_0x71c1c7||'')[_0x1872b6(0x180)](/\{CreatedAt\}/g,_0x26e84b);return _0x4ff5d0;}static async[a41_0x75efe8(0x156)](_0x3dda6b,_0x4a1662,_0x7fb460,_0x4730bf,_0x293749=!![]){const _0x52bdfa=a41_0x75efe8,_0x2c7648=Date[_0x52bdfa(0x172)]();try{_0x293749&&logger[_0x52bdfa(0x153)]('template','开始处理模板内容替换',{'templatePath':_0x3dda6b,'targetPath':_0x4a1662,'pageName':_0x7fb460,'templateName':_0x4730bf});await a41_0x632ae9[_0x52bdfa(0x14e)]['mkdir'](_0x4a1662,{'recursive':!![]}),await this['processDirectory'](_0x3dda6b,_0x4a1662,_0x7fb460,_0x4730bf);if(_0x293749){const _0x51411d=Date[_0x52bdfa(0x172)]()-_0x2c7648;logger[_0x52bdfa(0x164)](_0x52bdfa(0x17e),'模板内容替换完成',_0x51411d,{'pageName':_0x7fb460,'templateName':_0x4730bf});}}catch(_0x12e8da){if(_0x293749){const _0x4b2ee8=Date[_0x52bdfa(0x172)]()-_0x2c7648;logger[_0x52bdfa(0x16b)]('template','模板内容替换失败',{'templatePath':_0x3dda6b,'targetPath':_0x4a1662,'pageName':_0x7fb460,'templateName':_0x4730bf,'error':_0x12e8da instanceof Error?_0x12e8da[_0x52bdfa(0x14d)]:String(_0x12e8da),'duration':_0x4b2ee8});}throw _0x12e8da;}}static async[a41_0x75efe8(0x17d)](_0x2cf99d,_0x117131,_0x4cf72e,_0xaeb1fe){const _0x31f4c0=a41_0x75efe8,_0xccc041=await a41_0x632ae9[_0x31f4c0(0x14e)][_0x31f4c0(0x165)](_0x2cf99d,{'withFileTypes':!![]});for(const _0x1b207e of _0xccc041){const _0x1e760a=a41_0x484255['join'](_0x2cf99d,_0x1b207e['name']);let _0x1f2ebb=a41_0x484255[_0x31f4c0(0x154)](_0x117131,_0x1b207e[_0x31f4c0(0x183)]);_0x1b207e[_0x31f4c0(0x183)][_0x31f4c0(0x169)]('.tpl')&&(_0x1f2ebb=a41_0x484255['join'](_0x117131,_0x1b207e['name']['replace'](/\.tpl$/,'')));if(_0x1b207e[_0x31f4c0(0x15f)]())await a41_0x632ae9['promises'][_0x31f4c0(0x151)](_0x1f2ebb,{'recursive':!![]}),await this[_0x31f4c0(0x17d)](_0x1e760a,_0x1f2ebb,_0x4cf72e,_0xaeb1fe);else _0x1b207e['isFile']()&&await this[_0x31f4c0(0x14f)](_0x1e760a,_0x1f2ebb,_0x4cf72e,_0xaeb1fe);}}static async[a41_0x75efe8(0x14f)](_0x2290ea,_0x1a2827,_0x58d418,_0x1376c8){const _0x2d1137=a41_0x75efe8,_0x500832=a41_0x484255[_0x2d1137(0x171)](_0x2290ea)[_0x2d1137(0x157)]();_0x2290ea['endsWith'](_0x2d1137(0x182))&&(_0x1a2827=_0x1a2827['replace'](/\.tpl$/,''));const _0x217fdf=['.tsx',_0x2d1137(0x173),_0x2d1137(0x187),'.js',_0x2d1137(0x184),_0x2d1137(0x150),_0x2d1137(0x166),_0x2d1137(0x152),_0x2d1137(0x182)];if(_0x217fdf['includes'](_0x500832)||_0x2290ea['endsWith'](_0x2d1137(0x182))){const _0x2302e4=await a41_0x632ae9[_0x2d1137(0x14e)][_0x2d1137(0x179)](_0x2290ea,_0x2d1137(0x161)),_0x410f5d=this[_0x2d1137(0x17a)](_0x2302e4,_0x58d418,_0x1376c8);await a41_0x632ae9['promises'][_0x2d1137(0x170)](_0x1a2827,_0x410f5d,'utf8');}else await a41_0x632ae9[_0x2d1137(0x14e)][_0x2d1137(0x186)](_0x2290ea,_0x1a2827);}}
1
+ const a41_0x1873ea=a41_0x3599;(function(_0x1ed4c9,_0x5645d4){const _0x55073d=a41_0x3599,_0x19efd3=_0x1ed4c9();while(!![]){try{const _0x16f556=parseInt(_0x55073d(0x1ee))/0x1+-parseInt(_0x55073d(0x1eb))/0x2*(-parseInt(_0x55073d(0x1f2))/0x3)+parseInt(_0x55073d(0x1ed))/0x4+parseInt(_0x55073d(0x1f9))/0x5+parseInt(_0x55073d(0x1de))/0x6+-parseInt(_0x55073d(0x204))/0x7+-parseInt(_0x55073d(0x1f6))/0x8;if(_0x16f556===_0x5645d4)break;else _0x19efd3['push'](_0x19efd3['shift']());}catch(_0x347228){_0x19efd3['push'](_0x19efd3['shift']());}}}(a41_0x37f0,0xdb29c));function a41_0x37f0(){const _0xe29228=['default','isDirectory','toLocaleTimeString','87xWpcmj','template','.js','message','13805936uTPvkF','processFile','processTemplate','5090545ATTyJT','.tsx','writeFile','.css','map','.md','utf8','mkdir','replace','promises','split','1585633bQOfoa','toComponentName','name','pop','YourModel','includes','numeric','extname','.json','toLowerCase','success','.jsx','toUpperCase','processDirectory','api','toISOString','readFile','slice','84330cwTQei','error','replaceApiContent','模板内容替换失败','toDisplayTitle','now','replaceContent','.tpl','toLocaleDateString','endsWith','toLocaleString','join','2-digit','22546pXISKa','charAt','1409824AZiKsO','1138416Pfgocr'];a41_0x37f0=function(){return _0xe29228;};return a41_0x37f0();}import a41_0x4ed406 from'node:fs';function a41_0x3599(_0x4ce985,_0xfdf5cf){const _0x37f0b0=a41_0x37f0();return a41_0x3599=function(_0x3599d4,_0x54b146){_0x3599d4=_0x3599d4-0x1d3;let _0x8bae6f=_0x37f0b0[_0x3599d4];return _0x8bae6f;},a41_0x3599(_0x4ce985,_0xfdf5cf);}import a41_0x5c676f from'node:path';import{logger}from'./logger.js';export class TemplateReplacer{static[a41_0x1873ea(0x205)](_0x2c88e2){const _0x24214e=a41_0x1873ea,_0x28069a=_0x2c88e2['split']('/')[_0x24214e(0x207)]()||_0x2c88e2;return _0x28069a[_0x24214e(0x203)]('-')[_0x24214e(0x1fd)](_0x59f219=>_0x59f219[_0x24214e(0x1ec)](0x0)[_0x24214e(0x1d8)]()+_0x59f219['slice'](0x1)['toLowerCase']())[_0x24214e(0x1e9)]('');}static[a41_0x1873ea(0x1e2)](_0x23ab88){const _0x2f1d1e=a41_0x1873ea,_0x4e5b63=_0x23ab88[_0x2f1d1e(0x203)]('/')[_0x2f1d1e(0x207)]()||_0x23ab88;return _0x4e5b63[_0x2f1d1e(0x203)]('-')[_0x2f1d1e(0x1fd)](_0x5c51e2=>_0x5c51e2[_0x2f1d1e(0x1ec)](0x0)[_0x2f1d1e(0x1d8)]()+_0x5c51e2[_0x2f1d1e(0x1dd)](0x1)[_0x2f1d1e(0x1d5)]())[_0x2f1d1e(0x1e9)]('\x20');}static[a41_0x1873ea(0x1e4)](_0x47a90b,_0x5ba1c4,_0x4b9e51){const _0x338b64=a41_0x1873ea,_0x56561d=this[_0x338b64(0x205)](_0x5ba1c4),_0x4e05de=this[_0x338b64(0x1e2)](_0x5ba1c4),_0x3e871c=new Date(),_0x46bd78=_0x3e871c[_0x338b64(0x1e8)](undefined,{'year':'numeric','month':'2-digit','day':_0x338b64(0x1ea),'hour':_0x338b64(0x1ea),'minute':_0x338b64(0x1ea),'second':_0x338b64(0x1ea),'hour12':![]})[_0x338b64(0x201)](/\//g,'-'),_0x33ca7d=_0x3e871c[_0x338b64(0x1e6)](undefined,{'year':_0x338b64(0x20a),'month':'2-digit','day':_0x338b64(0x1ea)})[_0x338b64(0x201)](/\//g,'-'),_0x614af1=_0x3e871c[_0x338b64(0x1f1)](undefined,{'hour12':![]});let _0x45ef72=_0x47a90b[_0x338b64(0x201)](/\{ComponentName\}/g,_0x56561d)[_0x338b64(0x201)](/\{DisplayTitle\}/g,_0x4e05de)[_0x338b64(0x201)](/\{PageName\}/g,_0x5ba1c4)[_0x338b64(0x201)](/\{TemplateName\}/g,_0x4b9e51)[_0x338b64(0x201)](/\{CreatedAt\}/g,_0x46bd78)['replace'](/\{CreatedDate\}/g,_0x33ca7d)[_0x338b64(0x201)](/\{CreatedTime\}/g,_0x614af1);return _0x45ef72;}static[a41_0x1873ea(0x1e0)](_0x1164d4,_0x2b7f3f,_0x3a0885,_0x28b631,_0x28b442,_0x1bad89,_0x58b08d){const _0x329de5=a41_0x1873ea,_0x4ed22f=new Date(),_0x4da012=_0x4ed22f[_0x329de5(0x1db)](),_0x4f54d3=JSON['stringify'](_0x3a0885,null,0x2)['split']('\x0a')[_0x329de5(0x1dd)](0x1,-0x1)['map'](_0x45c979=>_0x45c979[_0x329de5(0x201)](/^ /,'\x20\x20\x20\x20'))[_0x329de5(0x1e9)]('\x0a'),_0x531c1c=_0x28b631||Object['keys'](_0x3a0885)[0x0]||_0x329de5(0x208);let _0x2c108b=_0x1164d4['replace'](/\{AppCode\}/g,_0x2b7f3f)[_0x329de5(0x201)](/\{ModelConfigs\}/g,_0x4f54d3)[_0x329de5(0x201)](/\{ExampleModelName\}/g,_0x531c1c)['replace'](/\{ApiFileName\}/g,_0x28b442||_0x329de5(0x1da))[_0x329de5(0x201)](/\{ConfigName\}/g,_0x1bad89||_0x329de5(0x1ef))[_0x329de5(0x201)](/\{ClientConfigParam\}/g,_0x58b08d||'')['replace'](/\{CreatedAt\}/g,_0x4da012);return _0x2c108b;}static async[a41_0x1873ea(0x1f8)](_0x149bf0,_0x291a8b,_0x2477a9,_0x1e06b0,_0x25316f=!![]){const _0x365a77=a41_0x1873ea,_0xad4266=Date[_0x365a77(0x1e3)]();try{_0x25316f&&logger['info'](_0x365a77(0x1f3),'开始处理模板内容替换',{'templatePath':_0x149bf0,'targetPath':_0x291a8b,'pageName':_0x2477a9,'templateName':_0x1e06b0});await a41_0x4ed406[_0x365a77(0x202)][_0x365a77(0x200)](_0x291a8b,{'recursive':!![]}),await this[_0x365a77(0x1d9)](_0x149bf0,_0x291a8b,_0x2477a9,_0x1e06b0);if(_0x25316f){const _0x4ac3e2=Date[_0x365a77(0x1e3)]()-_0xad4266;logger[_0x365a77(0x1d6)](_0x365a77(0x1f3),'模板内容替换完成',_0x4ac3e2,{'pageName':_0x2477a9,'templateName':_0x1e06b0});}}catch(_0x367343){if(_0x25316f){const _0x3ded46=Date[_0x365a77(0x1e3)]()-_0xad4266;logger[_0x365a77(0x1df)]('template',_0x365a77(0x1e1),{'templatePath':_0x149bf0,'targetPath':_0x291a8b,'pageName':_0x2477a9,'templateName':_0x1e06b0,'error':_0x367343 instanceof Error?_0x367343[_0x365a77(0x1f5)]:String(_0x367343),'duration':_0x3ded46});}throw _0x367343;}}static async['processDirectory'](_0x5c8d3a,_0x2d45fe,_0x499aa2,_0x44e55c){const _0x58f31c=a41_0x1873ea,_0x2b86cb=await a41_0x4ed406[_0x58f31c(0x202)]['readdir'](_0x5c8d3a,{'withFileTypes':!![]});for(const _0x401900 of _0x2b86cb){const _0x45d8b5=a41_0x5c676f[_0x58f31c(0x1e9)](_0x5c8d3a,_0x401900[_0x58f31c(0x206)]);let _0x2ccf3b=a41_0x5c676f[_0x58f31c(0x1e9)](_0x2d45fe,_0x401900['name']);_0x401900['name'][_0x58f31c(0x1e7)](_0x58f31c(0x1e5))&&(_0x2ccf3b=a41_0x5c676f[_0x58f31c(0x1e9)](_0x2d45fe,_0x401900['name'][_0x58f31c(0x201)](/\.tpl$/,'')));if(_0x401900[_0x58f31c(0x1f0)]())await a41_0x4ed406[_0x58f31c(0x202)][_0x58f31c(0x200)](_0x2ccf3b,{'recursive':!![]}),await this[_0x58f31c(0x1d9)](_0x45d8b5,_0x2ccf3b,_0x499aa2,_0x44e55c);else _0x401900['isFile']()&&await this[_0x58f31c(0x1f7)](_0x45d8b5,_0x2ccf3b,_0x499aa2,_0x44e55c);}}static async[a41_0x1873ea(0x1f7)](_0x565606,_0x13a1b0,_0x43f005,_0x584263){const _0x293969=a41_0x1873ea,_0x221fc7=a41_0x5c676f[_0x293969(0x1d3)](_0x565606)[_0x293969(0x1d5)]();_0x565606[_0x293969(0x1e7)](_0x293969(0x1e5))&&(_0x13a1b0=_0x13a1b0[_0x293969(0x201)](/\.tpl$/,''));const _0x3f22d1=[_0x293969(0x1fa),'.ts',_0x293969(0x1d7),_0x293969(0x1f4),_0x293969(0x1d4),_0x293969(0x1fe),_0x293969(0x1fc),'.scss',_0x293969(0x1e5)];if(_0x3f22d1[_0x293969(0x209)](_0x221fc7)||_0x565606[_0x293969(0x1e7)]('.tpl')){const _0x5d006b=await a41_0x4ed406[_0x293969(0x202)][_0x293969(0x1dc)](_0x565606,'utf8'),_0x54c4fc=this[_0x293969(0x1e4)](_0x5d006b,_0x43f005,_0x584263);await a41_0x4ed406[_0x293969(0x202)][_0x293969(0x1fb)](_0x13a1b0,_0x54c4fc,_0x293969(0x1ff));}else await a41_0x4ed406[_0x293969(0x202)]['copyFile'](_0x565606,_0x13a1b0);}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "lovrabet": "lib/cli.js"