@lovrabet/cli 1.1.2 → 1.1.4

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 (47) hide show
  1. package/README.md +2 -2
  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
  44. package/templates/pages/sdk-fetch/index.tsx.tpl +14 -5
  45. package/templates/projects/sub-app-react-demo/package-lock.json +2856 -0
  46. package/templates/projects/sub-app-react-demo/package.json +1 -1
  47. package/templates/projects/sub-app-react-demo/src/api/api.ts +6 -6
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x9a3cfb,_0x484d1e){const _0x1bd07d=a18_0x31d5,_0x43ebda=_0x9a3cfb();while(!![]){try{const _0x468d84=parseInt(_0x1bd07d(0x16e))/0x1*(-parseInt(_0x1bd07d(0x173))/0x2)+parseInt(_0x1bd07d(0x16b))/0x3+-parseInt(_0x1bd07d(0x177))/0x4*(parseInt(_0x1bd07d(0x182))/0x5)+-parseInt(_0x1bd07d(0x169))/0x6*(-parseInt(_0x1bd07d(0x17f))/0x7)+-parseInt(_0x1bd07d(0x179))/0x8*(parseInt(_0x1bd07d(0x175))/0x9)+-parseInt(_0x1bd07d(0x168))/0xa*(-parseInt(_0x1bd07d(0x170))/0xb)+parseInt(_0x1bd07d(0x180))/0xc;if(_0x468d84===_0x484d1e)break;else _0x43ebda['push'](_0x43ebda['shift']());}catch(_0x3af5f9){_0x43ebda['push'](_0x43ebda['shift']());}}}(a18_0x5125,0x894b3));function a18_0x31d5(_0x4eaeea,_0x2b9031){const _0x51259d=a18_0x5125();return a18_0x31d5=function(_0x31d5f7,_0x4359be){_0x31d5f7=_0x31d5f7-0x164;let _0x4051ef=_0x51259d[_0x31d5f7];return _0x4051ef;},a18_0x31d5(_0x4eaeea,_0x2b9031);}import{delimiter,join}from'node:path';function a18_0x5125(){const _0x57ccc5=['1762976vfCWHe','toString','4838337PYTUct','env','4IUzWeB','trim','8jmiWUV','run','.bin','npm\x20run\x20build\x20exited\x20with\x20code\x20','info','npm\x20run\x20build','8841ssHdeO','849156DchOZu','error','1658060JzPQWR','cwd','开始构建项目','node_modules','build','1096420kRjOlc','2112UVGdgt','PATH','2761719hcjmVT','inherit','npm','1aImdCX','now','88tJETfY','success','close'];a18_0x5125=function(){return _0x57ccc5;};return a18_0x5125();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x19013e,_0x2ac2ff)=>{const _0x535ea5=a18_0x31d5,_0x5c96b5=Date[_0x535ea5(0x16f)]();logger[_0x535ea5(0x17d)](_0x535ea5(0x167),_0x535ea5(0x165),{'command':'npm\x20run\x20build'});let _0x552411='';const _0x389619=spawn(_0x535ea5(0x16d),[_0x535ea5(0x17a),'build'],{'stdio':[_0x535ea5(0x16c),_0x535ea5(0x16c),'pipe'],'shell':!![],'env':{...process[_0x535ea5(0x176)],'PATH':''+join(process[_0x535ea5(0x164)](),_0x535ea5(0x166),_0x535ea5(0x17b))+delimiter+process['env'][_0x535ea5(0x16a)]}});_0x389619['stderr']?.['on']('data',_0x1af9e6=>{const _0x37c032=_0x535ea5;_0x552411+=_0x1af9e6[_0x37c032(0x174)]();}),_0x389619['on'](_0x535ea5(0x172),_0x2fdc38=>{const _0x8e2701=_0x535ea5,_0x42aa4b=Date[_0x8e2701(0x16f)]()-_0x5c96b5;if(_0x2fdc38===0x0||_0x2fdc38===null)logger[_0x8e2701(0x171)](_0x8e2701(0x167),'项目构建成功',_0x42aa4b),_0x19013e();else{const _0x4bc5dd={'exitCode':_0x2fdc38,'duration':_0x42aa4b,'command':_0x8e2701(0x17e),'cwd':process[_0x8e2701(0x164)]()};_0x552411[_0x8e2701(0x178)]()&&(_0x4bc5dd['stderr']=_0x552411[_0x8e2701(0x178)]()),logger['error'](_0x8e2701(0x167),'项目构建失败',_0x4bc5dd),_0x2ac2ff(new Error(_0x8e2701(0x17c)+_0x2fdc38));}}),_0x389619['on'](_0x535ea5(0x181),_0x5d7f71=>{const _0x136002=_0x535ea5,_0x440bce=Date[_0x136002(0x16f)]()-_0x5c96b5;logger[_0x136002(0x181)](_0x136002(0x167),'项目构建出错',{'error':_0x5d7f71['message'],'duration':_0x440bce,'stderr':_0x552411[_0x136002(0x178)]()||undefined}),_0x2ac2ff(_0x5d7f71);});});}
1
+ (function(_0x19a30c,_0xc4f9ea){const _0x4f26c8=a18_0x1f04,_0x583f95=_0x19a30c();while(!![]){try{const _0x37770a=-parseInt(_0x4f26c8(0x102))/0x1*(parseInt(_0x4f26c8(0x101))/0x2)+-parseInt(_0x4f26c8(0xe5))/0x3*(parseInt(_0x4f26c8(0xf5))/0x4)+parseInt(_0x4f26c8(0xef))/0x5+-parseInt(_0x4f26c8(0xe4))/0x6*(-parseInt(_0x4f26c8(0xff))/0x7)+parseInt(_0x4f26c8(0xf6))/0x8*(parseInt(_0x4f26c8(0xfc))/0x9)+parseInt(_0x4f26c8(0xfb))/0xa+-parseInt(_0x4f26c8(0xeb))/0xb*(parseInt(_0x4f26c8(0xf4))/0xc);if(_0x37770a===_0xc4f9ea)break;else _0x583f95['push'](_0x583f95['shift']());}catch(_0x24aa57){_0x583f95['push'](_0x583f95['shift']());}}}(a18_0x59ad,0xc9306));import{delimiter,join}from'node:path';function a18_0x59ad(){const _0x178a66=['npm\x20run\x20build\x20exited\x20with\x20code\x20','PATH','29582971XGksTj','stderr','pipe','开始构建项目','5826900ulMbYj','run','close','npm','message','12ZIEztn','4ZPdofm','40224jpXRmq','now','error','项目构建成功','inherit','13475740CZSseL','2493jFTMjN','success','项目构建失败','8309GrxddJ','env','22tlnOVZ','79882RzePEd','toString','data','项目构建出错','info','node_modules','4452QsrVnK','1182993NfMvHa','cwd','build','trim'];a18_0x59ad=function(){return _0x178a66;};return a18_0x59ad();}import{spawn}from'node:child_process';function a18_0x1f04(_0xa6d45d,_0x44761d){const _0x59ad62=a18_0x59ad();return a18_0x1f04=function(_0x1f046c,_0x247e8f){_0x1f046c=_0x1f046c-0xe4;let _0x221787=_0x59ad62[_0x1f046c];return _0x221787;},a18_0x1f04(_0xa6d45d,_0x44761d);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x7ff016,_0x947301)=>{const _0xb6b62f=a18_0x1f04,_0x2c2393=Date[_0xb6b62f(0xf7)]();logger[_0xb6b62f(0x106)](_0xb6b62f(0xe7),_0xb6b62f(0xee),{'command':'npm\x20run\x20build'});let _0x2f90ea='';const _0x8313d9=spawn(_0xb6b62f(0xf2),[_0xb6b62f(0xf0),'build'],{'stdio':[_0xb6b62f(0xfa),_0xb6b62f(0xfa),_0xb6b62f(0xed)],'shell':!![],'env':{...process[_0xb6b62f(0x100)],'PATH':''+join(process[_0xb6b62f(0xe6)](),_0xb6b62f(0x107),'.bin')+delimiter+process[_0xb6b62f(0x100)][_0xb6b62f(0xea)]}});_0x8313d9[_0xb6b62f(0xec)]?.['on'](_0xb6b62f(0x104),_0x231b08=>{const _0x574310=_0xb6b62f;_0x2f90ea+=_0x231b08[_0x574310(0x103)]();}),_0x8313d9['on'](_0xb6b62f(0xf1),_0x2dbc02=>{const _0x58e15e=_0xb6b62f,_0x211859=Date[_0x58e15e(0xf7)]()-_0x2c2393;if(_0x2dbc02===0x0||_0x2dbc02===null)logger[_0x58e15e(0xfd)](_0x58e15e(0xe7),_0x58e15e(0xf9),_0x211859),_0x7ff016();else{const _0x32b16c={'exitCode':_0x2dbc02,'duration':_0x211859,'command':'npm\x20run\x20build','cwd':process[_0x58e15e(0xe6)]()};_0x2f90ea[_0x58e15e(0xe8)]()&&(_0x32b16c[_0x58e15e(0xec)]=_0x2f90ea[_0x58e15e(0xe8)]()),logger[_0x58e15e(0xf8)](_0x58e15e(0xe7),_0x58e15e(0xfe),_0x32b16c),_0x947301(new Error(_0x58e15e(0xe9)+_0x2dbc02));}}),_0x8313d9['on']('error',_0x2ee457=>{const _0x31a913=_0xb6b62f,_0x24c9b0=Date[_0x31a913(0xf7)]()-_0x2c2393;logger['error'](_0x31a913(0xe7),_0x31a913(0x105),{'error':_0x2ee457[_0x31a913(0xf3)],'duration':_0x24c9b0,'stderr':_0x2f90ea[_0x31a913(0xe8)]()||undefined}),_0x947301(_0x2ee457);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3ae8e3,_0x3f7254){const _0x41b047=a19_0x14ac,_0x4763d9=_0x3ae8e3();while(!![]){try{const _0x2fe79c=-parseInt(_0x41b047(0x1d5))/0x1*(-parseInt(_0x41b047(0x1ce))/0x2)+parseInt(_0x41b047(0x1e5))/0x3+-parseInt(_0x41b047(0x1de))/0x4*(parseInt(_0x41b047(0x1d9))/0x5)+parseInt(_0x41b047(0x1d3))/0x6+parseInt(_0x41b047(0x1cd))/0x7*(parseInt(_0x41b047(0x1e0))/0x8)+parseInt(_0x41b047(0x1db))/0x9+-parseInt(_0x41b047(0x1e1))/0xa;if(_0x2fe79c===_0x3f7254)break;else _0x4763d9['push'](_0x4763d9['shift']());}catch(_0x3cf875){_0x4763d9['push'](_0x4763d9['shift']());}}}(a19_0x4ac3,0x8fb21));import{logger}from'../utils/logger.js';export function showLogs(){const _0x4dfd0d=a19_0x14ac;logger['setLogPath'](process[_0x4dfd0d(0x1ca)]());const _0x3c7d2f=logger[_0x4dfd0d(0x1d2)]();if(_0x3c7d2f['length']===0x0){console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1da));return;}console[_0x4dfd0d(0x1cc)](_0x4dfd0d(0x1c9)),_0x3c7d2f[_0x4dfd0d(0x1d4)]((_0x1bbf29,_0x301bdf)=>{const _0x346811=_0x4dfd0d,_0x136300=new Date(_0x1bbf29['timestamp'])[_0x346811(0x1d8)]('zh-CN'),_0x28e624=_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1cf)?'√':_0x1bbf29['level']==='error'?'×':_0x1bbf29[_0x346811(0x1df)]===_0x346811(0x1e3)?'!':'i';console[_0x346811(0x1cc)](_0x301bdf+0x1+'.\x20'+_0x28e624+'\x20['+_0x1bbf29[_0x346811(0x1cb)]+']\x20'+_0x1bbf29['message']),console[_0x346811(0x1cc)](_0x346811(0x1d7)+_0x136300),_0x1bbf29[_0x346811(0x1dc)]&&console[_0x346811(0x1cc)](_0x346811(0x1e4)+_0x1bbf29[_0x346811(0x1dc)]+'ms'),_0x1bbf29[_0x346811(0x1d6)]&&Object[_0x346811(0x1e6)](_0x1bbf29[_0x346811(0x1d6)])[_0x346811(0x1dd)]>0x0&&console[_0x346811(0x1cc)](_0x346811(0x1d1)+JSON['stringify'](_0x1bbf29[_0x346811(0x1d6)],null,0x2)),console[_0x346811(0x1cc)]('');});}function a19_0x14ac(_0x343f72,_0x2bb358){const _0x4ac334=a19_0x4ac3();return a19_0x14ac=function(_0x14ac6e,_0x125b47){_0x14ac6e=_0x14ac6e-0x1c9;let _0x4c098e=_0x4ac334[_0x14ac6e];return _0x4c098e;},a19_0x14ac(_0x343f72,_0x2bb358);}export function clearLogs(){const _0x3686a2=a19_0x14ac;logger[_0x3686a2(0x1d0)](process['cwd']()),logger[_0x3686a2(0x1e2)](),console['log']('*\x20日志已清空');}function a19_0x4ac3(){const _0x561bd8=['13079950JKKLdD','clearLogs','warn','\x20\x20\x20耗时:\x20','809691ScPtUk','keys','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','cwd','command','log','5348MMpxaM','177646rxVgRd','success','setLogPath','\x20\x20\x20详情:\x20','readLogs','5563812VTugHq','forEach','11dVoqKu','details','\x20\x20\x20时间:\x20','toLocaleString','624055vaFuIW','*\x20暂无日志记录','443268JDXavi','duration','length','32ZdgvBa','level','7032MHLnZy'];a19_0x4ac3=function(){return _0x561bd8;};return a19_0x4ac3();}
1
+ (function(_0x5856e3,_0x12902d){const _0x1d25ae=a19_0x41d6,_0x23c6ab=_0x5856e3();while(!![]){try{const _0x481d79=parseInt(_0x1d25ae(0x1a6))/0x1+-parseInt(_0x1d25ae(0x197))/0x2*(-parseInt(_0x1d25ae(0x19f))/0x3)+-parseInt(_0x1d25ae(0x19a))/0x4+-parseInt(_0x1d25ae(0x19b))/0x5+parseInt(_0x1d25ae(0x1a3))/0x6+-parseInt(_0x1d25ae(0x1b1))/0x7+parseInt(_0x1d25ae(0x19d))/0x8;if(_0x481d79===_0x12902d)break;else _0x23c6ab['push'](_0x23c6ab['shift']());}catch(_0xda117e){_0x23c6ab['push'](_0x23c6ab['shift']());}}}(a19_0x131a,0x4129a));function a19_0x41d6(_0x1bec12,_0x1d8457){const _0x131abf=a19_0x131a();return a19_0x41d6=function(_0x41d679,_0xfbb97a){_0x41d679=_0x41d679-0x197;let _0xfd3244=_0x131abf[_0x41d679];return _0xfd3244;},a19_0x41d6(_0x1bec12,_0x1d8457);}import{logger}from'../utils/logger.js';export function showLogs(){const _0x536533=a19_0x41d6;logger[_0x536533(0x1ab)](process[_0x536533(0x1b0)]());const _0x351593=logger[_0x536533(0x1ae)]();if(_0x351593[_0x536533(0x1ac)]===0x0){console[_0x536533(0x199)](_0x536533(0x1aa));return;}console[_0x536533(0x199)](_0x536533(0x1a7)),_0x351593[_0x536533(0x19c)]((_0x504f52,_0x32255f)=>{const _0x18bdf5=_0x536533,_0x10af44=new Date(_0x504f52['timestamp'])[_0x18bdf5(0x1a5)]('zh-CN'),_0x310dca=_0x504f52[_0x18bdf5(0x1af)]===_0x18bdf5(0x1a9)?'√':_0x504f52[_0x18bdf5(0x1af)]===_0x18bdf5(0x1a8)?'×':_0x504f52[_0x18bdf5(0x1af)]==='warn'?'!':'i';console[_0x18bdf5(0x199)](_0x32255f+0x1+'.\x20'+_0x310dca+'\x20['+_0x504f52[_0x18bdf5(0x198)]+']\x20'+_0x504f52[_0x18bdf5(0x1ad)]),console['log'](_0x18bdf5(0x1a0)+_0x10af44),_0x504f52[_0x18bdf5(0x1a2)]&&console['log']('\x20\x20\x20耗时:\x20'+_0x504f52[_0x18bdf5(0x1a2)]+'ms'),_0x504f52[_0x18bdf5(0x1a1)]&&Object['keys'](_0x504f52[_0x18bdf5(0x1a1)])[_0x18bdf5(0x1ac)]>0x0&&console['log'](_0x18bdf5(0x19e)+JSON[_0x18bdf5(0x1a4)](_0x504f52['details'],null,0x2)),console[_0x18bdf5(0x199)]('');});}export function clearLogs(){const _0x3b4130=a19_0x41d6;logger[_0x3b4130(0x1ab)](process[_0x3b4130(0x1b0)]()),logger['clearLogs'](),console['log'](_0x3b4130(0x1b2));}function a19_0x131a(){const _0x3be34d=['1683144xzJrfh','\x20\x20\x20详情:\x20','3NWqRZq','\x20\x20\x20时间:\x20','details','duration','2791368TCIHbw','stringify','toLocaleString','166667OBpsjS','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','error','success','*\x20暂无日志记录','setLogPath','length','message','readLogs','level','cwd','453159TmGFgJ','*\x20日志已清空','123174FUXDeE','command','log','1422572RrqgIC','1082945RwlufS','forEach'];a19_0x131a=function(){return _0x3be34d;};return a19_0x131a();}
@@ -1 +1 @@
1
- (function(_0x5abf21,_0x38d410){const _0x2acaa1=a20_0x41f9,_0x9328f5=_0x5abf21();while(!![]){try{const _0x1b12bc=-parseInt(_0x2acaa1(0x93))/0x1+parseInt(_0x2acaa1(0x8c))/0x2+parseInt(_0x2acaa1(0x90))/0x3+-parseInt(_0x2acaa1(0x84))/0x4*(parseInt(_0x2acaa1(0x8b))/0x5)+-parseInt(_0x2acaa1(0x88))/0x6+parseInt(_0x2acaa1(0x92))/0x7+-parseInt(_0x2acaa1(0x79))/0x8*(-parseInt(_0x2acaa1(0x95))/0x9);if(_0x1b12bc===_0x38d410)break;else _0x9328f5['push'](_0x9328f5['shift']());}catch(_0x2b7cb6){_0x9328f5['push'](_0x9328f5['shift']());}}}(a20_0x2d7e,0x50207));function a20_0x2d7e(){const _0x359298=['449376zACRdB','PATH','vite\x20preview','node_modules','218196EqtCgd','inherit','3534622gRAokm','502139siKEoI','success','54dkBWRb','908608biUEod','env','.bin','preview','info','预览服务器启动成功','error','cwd','vite\x20preview\x20exited\x20with\x20code\x20','close','pipe','11884sspboj','trim','stderr','预览服务器启动出错','3439602PztKLe','now','toString','135dErCyl'];a20_0x2d7e=function(){return _0x359298;};return a20_0x2d7e();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x41f9(_0xf9865c,_0x6f6dae){const _0x2d7e3c=a20_0x2d7e();return a20_0x41f9=function(_0x41f9b2,_0x4dd122){_0x41f9b2=_0x41f9b2-0x79;let _0x10373e=_0x2d7e3c[_0x41f9b2];return _0x10373e;},a20_0x41f9(_0xf9865c,_0x6f6dae);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x49d6d8,_0x52974f)=>{const _0x3aaa68=a20_0x41f9,_0x49ab4f=Date[_0x3aaa68(0x89)]();logger[_0x3aaa68(0x7d)](_0x3aaa68(0x7c),'启动预览服务器',{'command':_0x3aaa68(0x8e)});let _0x335e43='';const _0x5789ad=spawn('vite',[_0x3aaa68(0x7c)],{'stdio':[_0x3aaa68(0x91),_0x3aaa68(0x91),_0x3aaa68(0x83)],'shell':!![],'env':{...process[_0x3aaa68(0x7a)],'PATH':''+join(process[_0x3aaa68(0x80)](),_0x3aaa68(0x8f),_0x3aaa68(0x7b))+delimiter+process[_0x3aaa68(0x7a)][_0x3aaa68(0x8d)]}});_0x5789ad['stderr']?.['on']('data',_0x46d558=>{const _0x835ec=_0x3aaa68;_0x335e43+=_0x46d558[_0x835ec(0x8a)]();}),_0x5789ad['on'](_0x3aaa68(0x82),_0x4e12c0=>{const _0x2fa331=_0x3aaa68,_0x2d592a=Date[_0x2fa331(0x89)]()-_0x49ab4f;if(_0x4e12c0===0x0||_0x4e12c0===null)logger[_0x2fa331(0x94)](_0x2fa331(0x7c),_0x2fa331(0x7e),_0x2d592a),_0x49d6d8();else{const _0x36b526={'exitCode':_0x4e12c0,'duration':_0x2d592a,'command':_0x2fa331(0x8e),'cwd':process['cwd']()};_0x335e43[_0x2fa331(0x85)]()&&(_0x36b526[_0x2fa331(0x86)]=_0x335e43[_0x2fa331(0x85)]()),logger[_0x2fa331(0x7f)](_0x2fa331(0x7c),'预览服务器启动失败',_0x36b526),_0x52974f(new Error(_0x2fa331(0x81)+_0x4e12c0));}}),_0x5789ad['on'](_0x3aaa68(0x7f),_0x138af8=>{const _0x1b955d=_0x3aaa68,_0x4c5647=Date['now']()-_0x49ab4f;logger[_0x1b955d(0x7f)](_0x1b955d(0x7c),_0x1b955d(0x87),{'error':_0x138af8['message'],'duration':_0x4c5647,'stderr':_0x335e43[_0x1b955d(0x85)]()||undefined}),_0x52974f(_0x138af8);});});}
1
+ function a20_0x46fc(){const _0x565525=['vite\x20preview','data','4533604PifbNg','stderr','env','PATH','预览服务器启动失败','trim','607728moDBmK','vite','cwd','1049914HurgAe','preview','node_modules','pipe','3vsihBg','211366wnuPCp','预览服务器启动成功','inherit','toString','16761609TJFtLd','success','64tlyeGS','303982yofEUY','启动预览服务器','now','1720860TrYjoC','info','error'];a20_0x46fc=function(){return _0x565525;};return a20_0x46fc();}(function(_0x41d472,_0x44782a){const _0x45ea50=a20_0x205f,_0x355065=_0x41d472();while(!![]){try{const _0x20d998=-parseInt(_0x45ea50(0xf7))/0x1+-parseInt(_0x45ea50(0x10f))/0x2+parseInt(_0x45ea50(0xf6))/0x3*(-parseInt(_0x45ea50(0x106))/0x4)+parseInt(_0x45ea50(0x101))/0x5+-parseInt(_0x45ea50(0x10c))/0x6+-parseInt(_0x45ea50(0xfe))/0x7*(-parseInt(_0x45ea50(0xfd))/0x8)+parseInt(_0x45ea50(0xfb))/0x9;if(_0x20d998===_0x44782a)break;else _0x355065['push'](_0x355065['shift']());}catch(_0x487d94){_0x355065['push'](_0x355065['shift']());}}}(a20_0x46fc,0x8e539));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a20_0x205f(_0x51b9d1,_0x223cce){const _0x46fc07=a20_0x46fc();return a20_0x205f=function(_0x205f76,_0x9c62){_0x205f76=_0x205f76-0xf6;let _0x50d171=_0x46fc07[_0x205f76];return _0x50d171;},a20_0x205f(_0x51b9d1,_0x223cce);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x173145,_0x5ed404)=>{const _0x5b9434=a20_0x205f,_0x38a25f=Date['now']();logger[_0x5b9434(0x102)](_0x5b9434(0x110),_0x5b9434(0xff),{'command':_0x5b9434(0x104)});let _0x2ed725='';const _0x4861=spawn(_0x5b9434(0x10d),[_0x5b9434(0x110)],{'stdio':[_0x5b9434(0xf9),_0x5b9434(0xf9),_0x5b9434(0x112)],'shell':!![],'env':{...process[_0x5b9434(0x108)],'PATH':''+join(process[_0x5b9434(0x10e)](),_0x5b9434(0x111),'.bin')+delimiter+process['env'][_0x5b9434(0x109)]}});_0x4861[_0x5b9434(0x107)]?.['on'](_0x5b9434(0x105),_0xa4cd31=>{const _0x5da27c=_0x5b9434;_0x2ed725+=_0xa4cd31[_0x5da27c(0xfa)]();}),_0x4861['on']('close',_0x40858c=>{const _0x2b97fd=_0x5b9434,_0x52f61c=Date[_0x2b97fd(0x100)]()-_0x38a25f;if(_0x40858c===0x0||_0x40858c===null)logger[_0x2b97fd(0xfc)]('preview',_0x2b97fd(0xf8),_0x52f61c),_0x173145();else{const _0x3e03d8={'exitCode':_0x40858c,'duration':_0x52f61c,'command':'vite\x20preview','cwd':process[_0x2b97fd(0x10e)]()};_0x2ed725[_0x2b97fd(0x10b)]()&&(_0x3e03d8[_0x2b97fd(0x107)]=_0x2ed725[_0x2b97fd(0x10b)]()),logger['error'](_0x2b97fd(0x110),_0x2b97fd(0x10a),_0x3e03d8),_0x5ed404(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x40858c));}}),_0x4861['on'](_0x5b9434(0x103),_0x4eec2c=>{const _0x334e12=_0x5b9434,_0x4dec36=Date[_0x334e12(0x100)]()-_0x38a25f;logger['error']('preview','预览服务器启动出错',{'error':_0x4eec2c['message'],'duration':_0x4dec36,'stderr':_0x2ed725['trim']()||undefined}),_0x5ed404(_0x4eec2c);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- function a21_0x1a14(_0x3ce0bb,_0x2d7ed8){const _0xcd6d5d=a21_0xcd6d();return a21_0x1a14=function(_0x1a1445,_0x5e3653){_0x1a1445=_0x1a1445-0xc7;let _0x1f724e=_0xcd6d5d[_0x1a1445];return _0x1f724e;},a21_0x1a14(_0x3ce0bb,_0x2d7ed8);}function a21_0xcd6d(){const _0x1cbd82=['env','525WYxzcr','pipe','12vaOFTL','578866ByYLZY','45138afeYWq','1647921KCLZIL','inherit','开发服务器启动失败','2770888LdGxJj','开发服务器启动出错','225VaCDbD','info','4971DkoOJB','cwd','toString','启动开发服务器','127510tnSBXQ','295908kBACnV','开发服务器启动成功','now','PATH','612GDelWl','error','35gTnxIb','close','vite\x20exited\x20with\x20code\x20','start','stderr','trim','vite','data'];a21_0xcd6d=function(){return _0x1cbd82;};return a21_0xcd6d();}(function(_0x2f2ca9,_0x891438){const _0x5032c3=a21_0x1a14,_0x31a936=_0x2f2ca9();while(!![]){try{const _0x395eec=parseInt(_0x5032c3(0xdf))/0x1+-parseInt(_0x5032c3(0xd1))/0x2*(parseInt(_0x5032c3(0xc8))/0x3)+-parseInt(_0x5032c3(0xcd))/0x4*(parseInt(_0x5032c3(0xd3))/0x5)+parseInt(_0x5032c3(0xe0))/0x6*(parseInt(_0x5032c3(0xdc))/0x7)+parseInt(_0x5032c3(0xe4))/0x8+parseInt(_0x5032c3(0xe6))/0x9*(-parseInt(_0x5032c3(0xcc))/0xa)+-parseInt(_0x5032c3(0xe1))/0xb*(-parseInt(_0x5032c3(0xde))/0xc);if(_0x395eec===_0x891438)break;else _0x31a936['push'](_0x31a936['shift']());}catch(_0xcd599){_0x31a936['push'](_0x31a936['shift']());}}}(a21_0xcd6d,0x482b7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runStart(_0x35e1d2){return new Promise((_0x434500,_0x22f833)=>{const _0x1ddb10=a21_0x1a14,_0x4d754b=Date[_0x1ddb10(0xcf)](),_0x12c8d8=_0x35e1d2||process[_0x1ddb10(0xc9)]();logger[_0x1ddb10(0xc7)](_0x1ddb10(0xd6),_0x1ddb10(0xcb),{'command':_0x1ddb10(0xd9),'cwd':_0x12c8d8});let _0x286678='';const _0x5411aa=spawn(_0x1ddb10(0xd9),{'stdio':[_0x1ddb10(0xe2),'inherit',_0x1ddb10(0xdd)],'shell':!![],'cwd':_0x12c8d8,'env':{...process['env'],'PATH':''+join(_0x12c8d8,'node_modules','.bin')+delimiter+process[_0x1ddb10(0xdb)][_0x1ddb10(0xd0)]}});_0x5411aa['stderr']?.['on'](_0x1ddb10(0xda),_0x5bafaf=>{const _0x17be89=_0x1ddb10,_0x50f02f=_0x5bafaf[_0x17be89(0xca)]();_0x286678+=_0x50f02f,process[_0x17be89(0xd7)]['write'](_0x50f02f);}),_0x5411aa['on'](_0x1ddb10(0xd4),_0x1ddcfa=>{const _0x5c1249=_0x1ddb10,_0x24eed1=Date[_0x5c1249(0xcf)]()-_0x4d754b;if(_0x1ddcfa===0x0||_0x1ddcfa===null)logger['success'](_0x5c1249(0xd6),_0x5c1249(0xce),_0x24eed1),_0x434500();else{const _0x3788a0={'exitCode':_0x1ddcfa,'duration':_0x24eed1,'command':'vite','cwd':_0x12c8d8};_0x286678[_0x5c1249(0xd8)]()&&(_0x3788a0[_0x5c1249(0xd7)]=_0x286678[_0x5c1249(0xd8)]()),logger[_0x5c1249(0xd2)](_0x5c1249(0xd6),_0x5c1249(0xe3),_0x3788a0),_0x22f833(new Error(_0x5c1249(0xd5)+_0x1ddcfa));}}),_0x5411aa['on'](_0x1ddb10(0xd2),_0x3e2c30=>{const _0x2689f0=_0x1ddb10,_0x4fa829=Date[_0x2689f0(0xcf)]()-_0x4d754b,_0x2670e9={'error':_0x3e2c30['message'],'duration':_0x4fa829,'command':'vite','cwd':_0x12c8d8};_0x286678['trim']()&&(_0x2670e9['stderr']=_0x286678[_0x2689f0(0xd8)]()),logger[_0x2689f0(0xd2)](_0x2689f0(0xd6),_0x2689f0(0xe5),_0x2670e9),_0x22f833(_0x3e2c30);});});}
1
+ function a21_0x361d(_0x48465b,_0x1d7488){const _0x48ef1e=a21_0x48ef();return a21_0x361d=function(_0x361dff,_0x25dbcb){_0x361dff=_0x361dff-0x8f;let _0x497f6d=_0x48ef1e[_0x361dff];return _0x497f6d;},a21_0x361d(_0x48465b,_0x1d7488);}(function(_0x310c92,_0x38dc12){const _0xfe0418=a21_0x361d,_0x55666e=_0x310c92();while(!![]){try{const _0x14a079=parseInt(_0xfe0418(0xa8))/0x1*(-parseInt(_0xfe0418(0xa3))/0x2)+parseInt(_0xfe0418(0xaa))/0x3*(parseInt(_0xfe0418(0xa6))/0x4)+-parseInt(_0xfe0418(0xa0))/0x5+parseInt(_0xfe0418(0x94))/0x6*(parseInt(_0xfe0418(0x8f))/0x7)+-parseInt(_0xfe0418(0x97))/0x8*(parseInt(_0xfe0418(0xa1))/0x9)+parseInt(_0xfe0418(0xa2))/0xa+parseInt(_0xfe0418(0x90))/0xb*(parseInt(_0xfe0418(0xac))/0xc);if(_0x14a079===_0x38dc12)break;else _0x55666e['push'](_0x55666e['shift']());}catch(_0x1d047c){_0x55666e['push'](_0x55666e['shift']());}}}(a21_0x48ef,0x757a3));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a21_0x48ef(){const _0x165939=['env','inherit','1783280GeGOWQ','5759100EvQxFl','4428860bIDcKj','7102DBPQAe','node_modules','success','251884shYxYk','start','159HVqObv','now','27EzFbuL','stderr','24utjnSA','info','error','vite','启动开发服务器','505897GfBJyX','1307603nxHRwA','trim','开发服务器启动成功','toString','66fiWqQT','开发服务器启动出错','cwd','8IbAfvu','.bin','message','close','data','pipe','vite\x20exited\x20with\x20code\x20'];a21_0x48ef=function(){return _0x165939;};return a21_0x48ef();}export function runStart(_0x9c8e6c){return new Promise((_0x10d414,_0x690374)=>{const _0x3d1754=a21_0x361d,_0x3de577=Date['now'](),_0x5d4bee=_0x9c8e6c||process[_0x3d1754(0x96)]();logger[_0x3d1754(0xad)](_0x3d1754(0xa7),_0x3d1754(0xb0),{'command':_0x3d1754(0xaf),'cwd':_0x5d4bee});let _0x5a13a8='';const _0x1f4735=spawn(_0x3d1754(0xaf),{'stdio':[_0x3d1754(0x9f),_0x3d1754(0x9f),_0x3d1754(0x9c)],'shell':!![],'cwd':_0x5d4bee,'env':{...process[_0x3d1754(0x9e)],'PATH':''+join(_0x5d4bee,_0x3d1754(0xa4),_0x3d1754(0x98))+delimiter+process[_0x3d1754(0x9e)]['PATH']}});_0x1f4735[_0x3d1754(0xab)]?.['on'](_0x3d1754(0x9b),_0x3bebfa=>{const _0x5c596c=_0x3d1754,_0x5ca47d=_0x3bebfa[_0x5c596c(0x93)]();_0x5a13a8+=_0x5ca47d,process[_0x5c596c(0xab)]['write'](_0x5ca47d);}),_0x1f4735['on'](_0x3d1754(0x9a),_0x340749=>{const _0x2f201b=_0x3d1754,_0x35564b=Date['now']()-_0x3de577;if(_0x340749===0x0||_0x340749===null)logger[_0x2f201b(0xa5)]('start',_0x2f201b(0x92),_0x35564b),_0x10d414();else{const _0xeec043={'exitCode':_0x340749,'duration':_0x35564b,'command':_0x2f201b(0xaf),'cwd':_0x5d4bee};_0x5a13a8[_0x2f201b(0x91)]()&&(_0xeec043[_0x2f201b(0xab)]=_0x5a13a8['trim']()),logger[_0x2f201b(0xae)](_0x2f201b(0xa7),'开发服务器启动失败',_0xeec043),_0x690374(new Error(_0x2f201b(0x9d)+_0x340749));}}),_0x1f4735['on']('error',_0x375cce=>{const _0x2f06b1=_0x3d1754,_0x18f3d5=Date[_0x2f06b1(0xa9)]()-_0x3de577,_0x2c3c3e={'error':_0x375cce[_0x2f06b1(0x99)],'duration':_0x18f3d5,'command':_0x2f06b1(0xaf),'cwd':_0x5d4bee};_0x5a13a8[_0x2f06b1(0x91)]()&&(_0x2c3c3e['stderr']=_0x5a13a8[_0x2f06b1(0x91)]()),logger[_0x2f06b1(0xae)](_0x2f06b1(0xa7),_0x2f06b1(0x95),_0x2c3c3e),_0x690374(_0x375cce);});});}
@@ -1 +1 @@
1
- (function(_0x1a09f7,_0x457af9){const _0x283713=a22_0x6e26,_0x5cfcf1=_0x1a09f7();while(!![]){try{const _0x558336=-parseInt(_0x283713(0x81))/0x1*(-parseInt(_0x283713(0x7c))/0x2)+parseInt(_0x283713(0x76))/0x3+-parseInt(_0x283713(0x7a))/0x4*(-parseInt(_0x283713(0x82))/0x5)+-parseInt(_0x283713(0x7e))/0x6*(-parseInt(_0x283713(0x83))/0x7)+parseInt(_0x283713(0x79))/0x8+parseInt(_0x283713(0x78))/0x9*(parseInt(_0x283713(0x80))/0xa)+-parseInt(_0x283713(0x7d))/0xb;if(_0x558336===_0x457af9)break;else _0x5cfcf1['push'](_0x5cfcf1['shift']());}catch(_0x5d4227){_0x5cfcf1['push'](_0x5cfcf1['shift']());}}}(a22_0x29f3,0x60620));function a22_0x29f3(){const _0x2c74f1=['6JjuTPS','description','72500pfgAly','1qHKXOf','605YbeOtJ','2585387dzykdI','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','map','gray','command','列出所有配置项','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','无效的命令,可用命令如下:','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','1843572hSCTRJ','\x20*\x20配置示例:','927lucmxn','3709640oKEjrf','1244pTdmku','\x20\x20\x20\x20','1808YDHJSY','20218781qlNmiI'];a22_0x29f3=function(){return _0x2c74f1;};return a22_0x29f3();}function a22_0x6e26(_0x1f3d63,_0x277a6b){const _0x29f393=a22_0x29f3();return a22_0x6e26=function(_0x6e26d3,_0x5972b7){_0x6e26d3=_0x6e26d3-0x6e;let _0x313fb=_0x29f393[_0x6e26d3];return _0x313fb;},a22_0x6e26(_0x1f3d63,_0x277a6b);}import{jsxs as a22_0x1838bc,jsx as a22_0x225820}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x28f630=a22_0x6e26,_0x2852e9=[{'command':_0x28f630(0x75),'description':'设置配置项'},{'command':_0x28f630(0x74),'description':'获取配置项'},{'command':_0x28f630(0x72),'description':_0x28f630(0x71)}],_0x464059=[{'command':_0x28f630(0x84),'description':'配置当前项目的\x20App\x20Code'}];return a22_0x1838bc(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x225820(Box,{'marginBottom':0x1,'children':a22_0x1838bc(Text,{'color':_0x28f630(0x6f),'children':['\x20!','\x20\x20',_0x28f630(0x73)]})}),_0x2852e9[_0x28f630(0x6e)](_0xc98d9=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0xc98d9['command']]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0xc98d9['description']})]},_0xc98d9[_0x28f630(0x70)])),a22_0x225820(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x28f630(0x77)})}),_0x464059[_0x28f630(0x6e)](_0x2a959e=>a22_0x1838bc(Box,{'children':[a22_0x1838bc(Text,{'children':[_0x28f630(0x7b),_0x2a959e[_0x28f630(0x70)]]}),a22_0x225820(Text,{'color':_0x28f630(0x6f),'children':_0x2a959e[_0x28f630(0x7f)]})]},_0x2a959e[_0x28f630(0x70)]))]});}
1
+ function a22_0x2ff3(){const _0x4ffa7f=['获取配置项','map','4tsvhjy','63MIGFMG','486838vzCSYo','326964tOSzpt','2226745yoMtae','186216LFoDTu','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','无效的命令,可用命令如下:','description','列出所有配置项','column','配置当前项目的\x20App\x20Code','15xKvqsk','gray','10eKsxeG','\x20\x20\x20\x20','2151063dkMIlY','150838gPTxOk','8744NODbSQ','\x20*\x20配置示例:','command'];a22_0x2ff3=function(){return _0x4ffa7f;};return a22_0x2ff3();}(function(_0x3a9a8d,_0x39f5e4){const _0xca50e2=a22_0x52d6,_0x4f0574=_0x3a9a8d();while(!![]){try{const _0x2cb906=parseInt(_0xca50e2(0xdb))/0x1*(-parseInt(_0xca50e2(0xd5))/0x2)+-parseInt(_0xca50e2(0xd0))/0x3*(parseInt(_0xca50e2(0xc8))/0x4)+parseInt(_0xca50e2(0xc7))/0x5+parseInt(_0xca50e2(0xc6))/0x6+parseInt(_0xca50e2(0xdc))/0x7*(-parseInt(_0xca50e2(0xd6))/0x8)+parseInt(_0xca50e2(0xd4))/0x9+parseInt(_0xca50e2(0xd2))/0xa*(parseInt(_0xca50e2(0xdd))/0xb);if(_0x2cb906===_0x39f5e4)break;else _0x4f0574['push'](_0x4f0574['shift']());}catch(_0x334a2b){_0x4f0574['push'](_0x4f0574['shift']());}}}(a22_0x2ff3,0x3a4e9));import{jsxs as a22_0x22a208,jsx as a22_0x59af41}from'react/jsx-runtime';import{Box,Text}from'ink';function a22_0x52d6(_0x15fe21,_0x27181e){const _0x2ff350=a22_0x2ff3();return a22_0x52d6=function(_0x52d665,_0x26cf3a){_0x52d665=_0x52d665-0xc6;let _0x19c07a=_0x2ff350[_0x52d665];return _0x19c07a;},a22_0x52d6(_0x15fe21,_0x27181e);}export function ConfigHelp(){const _0x4208f7=a22_0x52d6,_0x11ded3=[{'command':_0x4208f7(0xca),'description':'设置配置项'},{'command':'lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x4208f7(0xd9)},{'command':_0x4208f7(0xc9),'description':_0x4208f7(0xcd)}],_0x18977d=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x4208f7(0xcf)}];return a22_0x22a208(Box,{'flexDirection':_0x4208f7(0xce),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x59af41(Box,{'marginBottom':0x1,'children':a22_0x22a208(Text,{'color':_0x4208f7(0xd1),'children':['\x20!','\x20\x20',_0x4208f7(0xcb)]})}),_0x11ded3[_0x4208f7(0xda)](_0x22ecdb=>a22_0x22a208(Box,{'children':[a22_0x22a208(Text,{'children':[_0x4208f7(0xd3),_0x22ecdb[_0x4208f7(0xd8)]]}),a22_0x59af41(Text,{'color':_0x4208f7(0xd1),'children':_0x22ecdb[_0x4208f7(0xcc)]})]},_0x22ecdb[_0x4208f7(0xd8)])),a22_0x59af41(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x59af41(Text,{'color':_0x4208f7(0xd1),'children':_0x4208f7(0xd7)})}),_0x18977d[_0x4208f7(0xda)](_0x5ed199=>a22_0x22a208(Box,{'children':[a22_0x22a208(Text,{'children':[_0x4208f7(0xd3),_0x5ed199[_0x4208f7(0xd8)]]}),a22_0x59af41(Text,{'color':'gray','children':_0x5ed199[_0x4208f7(0xcc)]})]},_0x5ed199['command']))]});}
@@ -1 +1 @@
1
- (function(_0x123e10,_0x4b12d5){const _0x4f098a=a23_0x2200,_0x54ceac=_0x123e10();while(!![]){try{const _0x267b6c=-parseInt(_0x4f098a(0x133))/0x1+parseInt(_0x4f098a(0x13a))/0x2*(parseInt(_0x4f098a(0x131))/0x3)+parseInt(_0x4f098a(0x127))/0x4+parseInt(_0x4f098a(0x132))/0x5*(parseInt(_0x4f098a(0x137))/0x6)+parseInt(_0x4f098a(0x138))/0x7*(-parseInt(_0x4f098a(0x12f))/0x8)+-parseInt(_0x4f098a(0x126))/0x9+-parseInt(_0x4f098a(0x12c))/0xa;if(_0x267b6c===_0x4b12d5)break;else _0x54ceac['push'](_0x54ceac['shift']());}catch(_0x52b164){_0x54ceac['push'](_0x54ceac['shift']());}}}(a23_0x2888,0xba684));import{jsx as a23_0x2f1a41}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process['cwd'](),'.lovrabetrc');function a23_0x2200(_0x4546c3,_0x1fbf5a){const _0x288895=a23_0x2888();return a23_0x2200=function(_0x2200e4,_0x3eb194){_0x2200e4=_0x2200e4-0x126;let _0x51e8e2=_0x288895[_0x2200e4];return _0x51e8e2;},a23_0x2200(_0x4546c3,_0x1fbf5a);}function a23_0x2888(){const _0x176a53=['2526435wdAtMT','5860100BoiSrh','undefined','保存配置失败','utf8','red','21003460PmUXkm','get','log','25288JBfEGz','stringify','6675sOxIIt','114160rEiWCB','1120481ADUboP','未提供配置值','input','includes','378zciWsd','350migPYN','set','1366NYHaIK','list'];a23_0x2888=function(){return _0x176a53;};return a23_0x2888();}export function Config(_0x3d119c){const _0x542099=a23_0x2200,{cli:_0x38d40a}=_0x3d119c,_0x923786=_0x38d40a[_0x542099(0x135)][0x1],_0x33002b=_0x38d40a[_0x542099(0x135)][0x2],_0x3b3d0d=[_0x542099(0x139),_0x542099(0x12d)][_0x542099(0x136)](_0x923786||''),_0x35d118=_0x38d40a[_0x542099(0x135)]['length']>=0x3,_0x4726c9=readConfig();if(_0x923786===_0x542099(0x139)){if(_0x33002b){const _0x4b432d=_0x38d40a[_0x542099(0x135)][0x3];if(typeof _0x4b432d!==_0x542099(0x128)){_0x4726c9[_0x33002b]=_0x4b432d;try{writeFileSync(configPath,JSON[_0x542099(0x130)](_0x4726c9,null,0x2),{'encoding':_0x542099(0x12a)});}catch(_0x2aac8d){return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':_0x542099(0x12b),'children':_0x542099(0x129)})});}return null;}return a23_0x2f1a41(Box,{'children':a23_0x2f1a41(Text,{'color':'red','children':_0x542099(0x134)})});}}if(_0x923786===_0x542099(0x12d)){if(_0x33002b)return console['log'](_0x4726c9[_0x33002b]||_0x542099(0x128)),null;return null;}if(_0x923786===_0x542099(0x13b))return console[_0x542099(0x12e)](JSON[_0x542099(0x130)](_0x4726c9,null,0x2)),null;if(!_0x3b3d0d||!_0x35d118)return a23_0x2f1a41(ConfigHelp,{});return null;}
1
+ function a23_0x34a5(){const _0x24acd7=['list','571172kbMRiC','red','cwd','230EVsGEz','.lovrabetrc','set','833562ZBGtbD','1431057kWJQca','479280oZuPkV','undefined','length','stringify','保存配置失败','8DsCxVf','12199mkGYdz','get','16460zMxFLY','1775424ZhMWAA','2vrKzqB','log','42030lWAsnP','input','includes'];a23_0x34a5=function(){return _0x24acd7;};return a23_0x34a5();}const a23_0x5634b7=a23_0x33ed;(function(_0x552136,_0x130293){const _0x1de7a0=a23_0x33ed,_0x434b01=_0x552136();while(!![]){try{const _0x56ab74=-parseInt(_0x1de7a0(0x1eb))/0x1+parseInt(_0x1de7a0(0x1f5))/0x2*(-parseInt(_0x1de7a0(0x1ea))/0x3)+-parseInt(_0x1de7a0(0x1e3))/0x4+parseInt(_0x1de7a0(0x1e6))/0x5*(-parseInt(_0x1de7a0(0x1f7))/0x6)+-parseInt(_0x1de7a0(0x1f4))/0x7+-parseInt(_0x1de7a0(0x1f0))/0x8*(-parseInt(_0x1de7a0(0x1e9))/0x9)+parseInt(_0x1de7a0(0x1f3))/0xa*(parseInt(_0x1de7a0(0x1f1))/0xb);if(_0x56ab74===_0x130293)break;else _0x434b01['push'](_0x434b01['shift']());}catch(_0x4e863a){_0x434b01['push'](_0x434b01['shift']());}}}(a23_0x34a5,0x3b586));function a23_0x33ed(_0x409645,_0x20f1ce){const _0x34a500=a23_0x34a5();return a23_0x33ed=function(_0x33ede7,_0x12d38b){_0x33ede7=_0x33ede7-0x1e3;let _0x45c01f=_0x34a500[_0x33ede7];return _0x45c01f;},a23_0x33ed(_0x409645,_0x20f1ce);}import{jsx as a23_0x7ed2b}from'react/jsx-runtime';import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process[a23_0x5634b7(0x1e5)](),a23_0x5634b7(0x1e7));export function Config(_0x725a72){const _0x3e60b1=a23_0x5634b7,{cli:_0x5665e8}=_0x725a72,_0x32d6dd=_0x5665e8['input'][0x1],_0x17d796=_0x5665e8[_0x3e60b1(0x1f8)][0x2],_0x3d3223=[_0x3e60b1(0x1e8),_0x3e60b1(0x1f2)][_0x3e60b1(0x1f9)](_0x32d6dd||''),_0x30590c=_0x5665e8['input'][_0x3e60b1(0x1ed)]>=0x3,_0x5659a2=readConfig();if(_0x32d6dd===_0x3e60b1(0x1e8)){if(_0x17d796){const _0x5a6eb6=_0x5665e8[_0x3e60b1(0x1f8)][0x3];if(typeof _0x5a6eb6!=='undefined'){_0x5659a2[_0x17d796]=_0x5a6eb6;try{writeFileSync(configPath,JSON[_0x3e60b1(0x1ee)](_0x5659a2,null,0x2),{'encoding':'utf8'});}catch(_0x36d2fb){return a23_0x7ed2b(Box,{'children':a23_0x7ed2b(Text,{'color':_0x3e60b1(0x1e4),'children':_0x3e60b1(0x1ef)})});}return null;}return a23_0x7ed2b(Box,{'children':a23_0x7ed2b(Text,{'color':_0x3e60b1(0x1e4),'children':'未提供配置值'})});}}if(_0x32d6dd===_0x3e60b1(0x1f2)){if(_0x17d796)return console[_0x3e60b1(0x1f6)](_0x5659a2[_0x17d796]||_0x3e60b1(0x1ec)),null;return null;}if(_0x32d6dd===_0x3e60b1(0x1fa))return console[_0x3e60b1(0x1f6)](JSON[_0x3e60b1(0x1ee)](_0x5659a2,null,0x2)),null;if(!_0x3d3223||!_0x30590c)return a23_0x7ed2b(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- function a24_0x292b(){const _0x6200ff=['https://user-daily.lovrabet.com','50lclDBy','https://api.lovrabet.com','7tCFybF','1370238UQOomD','https://user.lovrabet.com','393804Zrpaea','7004240uEeRlJ','2050677haSufm','https://daily-api.lovrabet.com','262404eyPNRy','online','6sTyJyl','3171688uizQUL','556336pKoisL'];a24_0x292b=function(){return _0x6200ff;};return a24_0x292b();}const a24_0x2bd64b=a24_0x459e;function a24_0x459e(_0x53d99c,_0x5a70bb){const _0x292bef=a24_0x292b();return a24_0x459e=function(_0x459ed4,_0x575b10){_0x459ed4=_0x459ed4-0x114;let _0x5479b3=_0x292bef[_0x459ed4];return _0x5479b3;},a24_0x459e(_0x53d99c,_0x5a70bb);}(function(_0x4a5e82,_0x7300ba){const _0x1efcef=a24_0x459e,_0x1ad5cb=_0x4a5e82();while(!![]){try{const _0x3b2c0f=parseInt(_0x1efcef(0x114))/0x1+parseInt(_0x1efcef(0x11c))/0x2*(-parseInt(_0x1efcef(0x116))/0x3)+-parseInt(_0x1efcef(0x11e))/0x4+parseInt(_0x1efcef(0x120))/0x5*(-parseInt(_0x1efcef(0x11a))/0x6)+-parseInt(_0x1efcef(0x122))/0x7*(parseInt(_0x1efcef(0x11d))/0x8)+parseInt(_0x1efcef(0x118))/0x9+parseInt(_0x1efcef(0x117))/0xa;if(_0x3b2c0f===_0x7300ba)break;else _0x1ad5cb['push'](_0x1ad5cb['shift']());}catch(_0x525596){_0x1ad5cb['push'](_0x1ad5cb['shift']());}}}(a24_0x292b,0xe37f2));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x115):a24_0x2bd64b(0x11f);export const getApiDomain=()=>getEnv()===a24_0x2bd64b(0x11b)?a24_0x2bd64b(0x121):a24_0x2bd64b(0x119);
1
+ function a24_0x3129(_0x581295,_0x271698){const _0x10c7c0=a24_0x10c7();return a24_0x3129=function(_0x3129bc,_0x15fbfa){_0x3129bc=_0x3129bc-0x11e;let _0x2fb5e1=_0x10c7c0[_0x3129bc];return _0x2fb5e1;},a24_0x3129(_0x581295,_0x271698);}const a24_0x2780f0=a24_0x3129;function a24_0x10c7(){const _0x55a048=['148lwCVdF','22215JbURqs','48632OjJdJa','48444fJsNvX','6698030SFMHAb','1937931ZBpHLB','6tlpBZl','https://user-daily.lovrabet.com','online','246164JHwwcI','https://api.lovrabet.com','136003QrsVzQ','2WPhvKw','459adjWsc'];a24_0x10c7=function(){return _0x55a048;};return a24_0x10c7();}(function(_0x532132,_0xe626e7){const _0xd86cda=a24_0x3129,_0x1f779f=_0x532132();while(!![]){try{const _0x1cced3=parseInt(_0xd86cda(0x128))/0x1*(parseInt(_0xd86cda(0x12b))/0x2)+-parseInt(_0xd86cda(0x124))/0x3+-parseInt(_0xd86cda(0x11f))/0x4*(parseInt(_0xd86cda(0x120))/0x5)+parseInt(_0xd86cda(0x125))/0x6*(parseInt(_0xd86cda(0x12a))/0x7)+parseInt(_0xd86cda(0x121))/0x8*(parseInt(_0xd86cda(0x11e))/0x9)+parseInt(_0xd86cda(0x123))/0xa+-parseInt(_0xd86cda(0x122))/0xb;if(_0x1cced3===_0xe626e7)break;else _0x1f779f['push'](_0x1f779f['shift']());}catch(_0x320eed){_0x1f779f['push'](_0x1f779f['shift']());}}}(a24_0x10c7,0x6923d));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x2780f0(0x127)?'https://user.lovrabet.com':a24_0x2780f0(0x126);export const getApiDomain=()=>getEnv()==='online'?a24_0x2780f0(0x129):'https://daily-api.lovrabet.com';
@@ -1 +1 @@
1
- const a25_0x3c2969=a25_0x1692;function a25_0x3d70(){const _0x2f2699=['10378720TpFIme','9561730JwxWIC','1854459spluvP','env','234iavNRb','18036IuaHgC','1535tAIKVd','LOVRABET_ENV','65834UeoDWN','123557GlQdhu','4247310tataBa','3eJFhrH','online'];a25_0x3d70=function(){return _0x2f2699;};return a25_0x3d70();}(function(_0x166ec2,_0x979157){const _0x10213e=a25_0x1692,_0x144e6d=_0x166ec2();while(!![]){try{const _0x39597d=-parseInt(_0x10213e(0x1d8))/0x1*(parseInt(_0x10213e(0x1d5))/0x2)+parseInt(_0x10213e(0x1d7))/0x3+parseInt(_0x10213e(0x1d2))/0x4*(parseInt(_0x10213e(0x1d3))/0x5)+-parseInt(_0x10213e(0x1d1))/0x6*(-parseInt(_0x10213e(0x1d6))/0x7)+-parseInt(_0x10213e(0x1cd))/0x8+-parseInt(_0x10213e(0x1cf))/0x9+-parseInt(_0x10213e(0x1ce))/0xa;if(_0x39597d===_0x979157)break;else _0x144e6d['push'](_0x144e6d['shift']());}catch(_0x2c9f29){_0x144e6d['push'](_0x144e6d['shift']());}}}(a25_0x3d70,0xe313b));let env=process[a25_0x3c2969(0x1d0)][a25_0x3c2969(0x1d4)]||a25_0x3c2969(0x1d9);function a25_0x1692(_0x55760d,_0xa3bf17){const _0x3d7023=a25_0x3d70();return a25_0x1692=function(_0x1692d1,_0x312882){_0x1692d1=_0x1692d1-0x1cd;let _0x758b98=_0x3d7023[_0x1692d1];return _0x758b98;},a25_0x1692(_0x55760d,_0xa3bf17);}export function getEnv(){return env;}export function initEnv(_0x153a9a){env=_0x153a9a;}
1
+ const a25_0x54e24f=a25_0x562a;(function(_0xf00e2c,_0x2cabe0){const _0x5f08e2=a25_0x562a,_0x4c6308=_0xf00e2c();while(!![]){try{const _0x3ba83f=parseInt(_0x5f08e2(0xb5))/0x1*(-parseInt(_0x5f08e2(0xb3))/0x2)+-parseInt(_0x5f08e2(0xb9))/0x3*(parseInt(_0x5f08e2(0xb4))/0x4)+-parseInt(_0x5f08e2(0xae))/0x5*(parseInt(_0x5f08e2(0xaf))/0x6)+-parseInt(_0x5f08e2(0xb7))/0x7+-parseInt(_0x5f08e2(0xb6))/0x8*(parseInt(_0x5f08e2(0xbb))/0x9)+-parseInt(_0x5f08e2(0xb8))/0xa+parseInt(_0x5f08e2(0xb0))/0xb*(parseInt(_0x5f08e2(0xb2))/0xc);if(_0x3ba83f===_0x2cabe0)break;else _0x4c6308['push'](_0x4c6308['shift']());}catch(_0x1b960c){_0x4c6308['push'](_0x4c6308['shift']());}}}(a25_0x1d46,0x98c8d));function a25_0x562a(_0x45b02a,_0x56c707){const _0x1d464b=a25_0x1d46();return a25_0x562a=function(_0x562a09,_0x25ddf8){_0x562a09=_0x562a09-0xae;let _0x484858=_0x1d464b[_0x562a09];return _0x484858;},a25_0x562a(_0x45b02a,_0x56c707);}let env=process[a25_0x54e24f(0xb1)][a25_0x54e24f(0xba)]||'online';export function getEnv(){return env;}function a25_0x1d46(){const _0x466bcb=['341iKIfAp','env','1531596mqhukO','2UWowUP','3234388ziziJg','278071uoyAsJ','16jhjxuN','8276240oRQjXL','5024080dzEgEj','3tPBoeH','LOVRABET_ENV','1429209eHVZEJ','10700lyZCBq','678cIZsxr'];a25_0x1d46=function(){return _0x466bcb;};return a25_0x1d46();}export function initEnv(_0x150ed2){env=_0x150ed2;}
@@ -1 +1 @@
1
- (function(_0x1ffb5c,_0xc6df0b){const _0x2b335b=a26_0x25a8,_0x28f22d=_0x1ffb5c();while(!![]){try{const _0x5dd65c=-parseInt(_0x2b335b(0x1a5))/0x1+-parseInt(_0x2b335b(0x1ac))/0x2*(-parseInt(_0x2b335b(0x19e))/0x3)+parseInt(_0x2b335b(0x1c8))/0x4+-parseInt(_0x2b335b(0x1af))/0x5*(parseInt(_0x2b335b(0x1bf))/0x6)+-parseInt(_0x2b335b(0x19d))/0x7+-parseInt(_0x2b335b(0x1a4))/0x8*(-parseInt(_0x2b335b(0x194))/0x9)+parseInt(_0x2b335b(0x19c))/0xa;if(_0x5dd65c===_0xc6df0b)break;else _0x28f22d['push'](_0x28f22d['shift']());}catch(_0x38825b){_0x28f22d['push'](_0x28f22d['shift']());}}}(a26_0x5662,0x3c3f5));import{jsx as a26_0x565250,jsxs as a26_0x54147c,Fragment as a26_0x3d557c}from'react/jsx-runtime';function a26_0x5662(){const _0x5e9985=['跳过登录','gray','*\x20项目名:\x20','yellow','*\x20正在检查登录状态...','268586kICJVj','!\x20未检测到有效登录','column','5ZqMexo','red','login','app-code','Yes','登录状态','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','登录失败','green','delete','项目名长度不能超过\x2050\x20个字符','cyan','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20\x20使用\x20←→\x20选择,回车确认','leftArrow','应用AppCode不合法','1165578KfkphY','*\x20是否要自动拉取\x20API\x20配置?','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','creating','api-pull','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','slice','应用AppCode','已登录','511212NlXUua','未设置','test','拉取API配置','label','405wkxfIm','rightArrow','√\x20检测到有效登录状态','includes','*\x20创建新项目','trim','confirm-api-pull','项目名','5216210HhJEez','3092474qAvZxY','3atiEWz','backspace','login-check','length','project-name','login-prompt','67960DBoIGH','283174kQkaPy','my-app'];a26_0x5662=function(){return _0x5e9985;};return a26_0x5662();}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a26_0x25a8(_0xb26e23,_0x1268ce){const _0x56627d=a26_0x5662();return a26_0x25a8=function(_0x25a8c4,_0x21dfd5){_0x25a8c4=_0x25a8c4-0x194;let _0x3d37b9=_0x56627d[_0x25a8c4];return _0x3d37b9;},a26_0x25a8(_0xb26e23,_0x1268ce);}export function EnhancedGuidedCreate(_0x2ab0bc){const _0x2a9ccb=a26_0x25a8,{onCreate:_0x215690}=_0x2ab0bc,[_0x118380,_0x2ef382]=useState(_0x2a9ccb(0x1a2)),[_0x5897ed,_0x23033d]=useState(''),[_0x51d5f4,_0xe7aee2]=useState(''),[_0x2550e7,_0x2c89de]=useState(''),[_0x191c6e,_0x20d162]=useState(''),[_0x233fd7,_0x1aec9b]=useState([]),[_0x52f3a8,_0x37186d]=useState(null),[_0xcc9bff,_0x4e0dfe]=useState(![]),[_0x116149,_0x4b82d2]=useState(![]),[_0x119f99,_0x4f81bb]=useState(![]),[_0x2f0762,_0x43d793]=useState(0x0),[_0x249740,_0x5f5867]=useState(0x0),_0x18a7f4=_0x2a9ccb(0x1a6);function _0x44579d(_0x213e41){const _0x2d82db=_0x2a9ccb;if(_0x213e41[_0x2d82db(0x1a1)]>0x32)return{'valid':![],'message':_0x2d82db(0x1b9)};const _0x234dae=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x213e41?.[_0x2d82db(0x199)]()&&!_0x234dae[_0x2d82db(0x1ca)](_0x213e41))return{'valid':![],'message':_0x2d82db(0x1c1)};return{'valid':!![]};}function _0x4444b3(_0x4a03ae){const _0x1b830e=_0x2a9ccb;if(!_0x4a03ae['trim']())return{'valid':!![]};if(_0x4a03ae[_0x1b830e(0x1a1)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x59c2db=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x59c2db[_0x1b830e(0x1ca)](_0x4a03ae))return{'valid':![],'message':_0x1b830e(0x1b5)};return{'valid':!![]};}async function _0x5faf4a(){_0x4e0dfe(!![]);try{const _0x5de3d6=await getIsSessionValid();return _0x37186d(_0x5de3d6),_0x5de3d6;}catch(_0x16e762){return _0x37186d(![]),![];}finally{_0x4e0dfe(![]);}}async function _0x4f9f4d(){_0x4b82d2(!![]);try{const _0x139659=await authServer({'silent':!![]});return _0x37186d(_0x139659),_0x139659;}catch(_0x48d876){return _0x37186d(![]),![];}finally{_0x4b82d2(![]);}}return useInput(async(_0x1d2460,_0x25df23)=>{const _0x78a3af=_0x2a9ccb;if(_0x25df23[_0x78a3af(0x1bd)]||_0x25df23[_0x78a3af(0x195)]){if(_0x118380===_0x78a3af(0x19a)){_0x43d793(_0x12934f=>_0x12934f===0x0?0x1:0x0);return;}if(_0x118380===_0x78a3af(0x1a3)){_0x5f5867(_0x287c89=>_0x287c89===0x0?0x1:0x0);return;}}if(_0x25df23['return']){if(_0x118380===_0x78a3af(0x1a2)){const _0x45d065=_0x2550e7[_0x78a3af(0x199)]()||_0x18a7f4;if(_0x191c6e)return;_0x23033d(_0x45d065),_0x1aec9b([{'step':_0x78a3af(0x1a2),'label':_0x78a3af(0x19b),'value':_0x45d065}]),_0x2c89de(''),_0x20d162(''),_0x2ef382(_0x78a3af(0x1b2));return;}if(_0x118380===_0x78a3af(0x1b2)){if(_0x191c6e)return;const _0x484cd9=_0x2550e7[_0x78a3af(0x199)]();_0xe7aee2(_0x484cd9),_0x1aec9b(_0xa5a7e4=>[..._0xa5a7e4,{'step':_0x78a3af(0x1b2),'label':_0x78a3af(0x1c6),'value':_0x484cd9||_0x78a3af(0x1c9)}]),_0x2c89de(''),_0x20d162('');if(_0x484cd9){_0x2ef382(_0x78a3af(0x1a0));const _0x4a93bf=await _0x5faf4a();_0x4a93bf?_0x2ef382(_0x78a3af(0x19a)):_0x2ef382(_0x78a3af(0x1a3));}else _0x215690({'projectName':_0x5897ed,'appCode':undefined,'pullApi':![]}),_0x2ef382('creating');return;}if(_0x118380===_0x78a3af(0x19a)){const _0x50cc69=_0x2f0762===0x0;_0x4f81bb(_0x50cc69),_0x1aec9b(_0x2f63f9=>[..._0x2f63f9,{'step':_0x78a3af(0x1c3),'label':_0x78a3af(0x1cb),'value':_0x50cc69?'是':'否'}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':_0x50cc69}),_0x2ef382(_0x78a3af(0x1c2));return;}if(_0x118380===_0x78a3af(0x1a3)){const _0x2bff41=_0x249740===0x0;if(_0x2bff41){_0x2ef382('login-process');const _0x99ceaa=await _0x4f9f4d();_0x99ceaa?(_0x1aec9b(_0x537d92=>[..._0x537d92,{'step':_0x78a3af(0x1b1),'label':_0x78a3af(0x1b4),'value':_0x78a3af(0x1c7)}]),_0x2ef382(_0x78a3af(0x19a))):(_0x1aec9b(_0xea2963=>[..._0xea2963,{'step':_0x78a3af(0x1b1),'label':'登录状态','value':_0x78a3af(0x1b6)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382(_0x78a3af(0x1c2)));}else _0x1aec9b(_0x58e9be=>[..._0x58e9be,{'step':'login','label':'登录状态','value':_0x78a3af(0x1a7)}]),_0x215690({'projectName':_0x5897ed,'appCode':_0x51d5f4,'pullApi':![]}),_0x2ef382('creating');return;}}if(_0x25df23[_0x78a3af(0x19f)]||_0x25df23[_0x78a3af(0x1b8)]){_0x2c89de(_0x28b1bd=>{const _0x32da4b=_0x78a3af,_0x35b94c=_0x28b1bd[_0x32da4b(0x1c5)](0x0,-0x1);if(_0x118380===_0x32da4b(0x1a2)){const {valid:_0x2b2577,message:_0x462c76}=_0x44579d(_0x35b94c);_0x20d162(_0x2b2577?'':_0x462c76||'项目名不合法');}else{if(_0x118380===_0x32da4b(0x1b2)){const {valid:_0x5507f4,message:_0x244300}=_0x4444b3(_0x35b94c);_0x20d162(_0x5507f4?'':_0x244300||'应用AppCode不合法');}}return _0x35b94c;});return;}if([_0x78a3af(0x1c2),_0x78a3af(0x1a0),'login-process'][_0x78a3af(0x197)](_0x118380))return;if(_0x118380===_0x78a3af(0x19a)||_0x118380===_0x78a3af(0x1a3))return;_0x2c89de(_0x584b7e=>{const _0x5ae9df=_0x78a3af,_0x266a5b=_0x584b7e+_0x1d2460;if(_0x118380===_0x5ae9df(0x1a2)){const {valid:_0x136a6a,message:_0x583743}=_0x44579d(_0x266a5b);_0x20d162(_0x136a6a?'':_0x583743||'项目名不合法');}else{if(_0x118380==='app-code'){const {valid:_0x3860af,message:_0x48e651}=_0x4444b3(_0x266a5b);_0x20d162(_0x3860af?'':_0x48e651||_0x5ae9df(0x1be));}}return _0x266a5b;});}),a26_0x54147c(Box,{'flexDirection':_0x2a9ccb(0x1ae),'marginTop':0x1,'children':[_0x233fd7[_0x2a9ccb(0x1a1)]===0x0&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1ba),'children':_0x2a9ccb(0x198)})}),_0x233fd7['map'](_0x5890cf=>a26_0x54147c(Box,{'children':[a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b7),'children':['√\x20',_0x5890cf[_0x2a9ccb(0x1cc)],':\x20']}),a26_0x565250(Text,{'color':'cyan','children':_0x5890cf['value']})]},_0x5890cf['step'])),_0x118380==='project-name'&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1a9)}),_0x2550e7?a26_0x565250(Text,{'color':'green','children':_0x2550e7}):a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x18a7f4}),_0x191c6e&&a26_0x54147c(Text,{'color':_0x2a9ccb(0x1b0),'children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&!_0x2550e7&&a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x118380===_0x2a9ccb(0x1b2)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20应用AppCode\x20'}),a26_0x565250(Text,{'color':'gray','children':'[可选]:\x20'}),a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2550e7}),_0x191c6e&&a26_0x54147c(Text,{'color':'red','children':['\x20←\x20',_0x191c6e]})]}),!_0x191c6e&&a26_0x565250(Box,{'children':a26_0x54147c(Text,{'color':_0x2a9ccb(0x1a8),'children':['\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)']})})]}),_0x118380==='login-check'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':_0x2a9ccb(0x1ab)}),_0xcc9bff&&a26_0x565250(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x118380===_0x2a9ccb(0x19a)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1b7),'children':_0x2a9ccb(0x196)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1c0)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x2f0762===0x0?'green':'gray','children':[_0x2f0762===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x2f0762===0x1?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x2f0762===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x118380===_0x2a9ccb(0x1a3)&&a26_0x54147c(a26_0x3d557c,{'children':[a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':'yellow','children':_0x2a9ccb(0x1ad)})}),a26_0x565250(Box,{'marginTop':0x1,'children':a26_0x565250(Text,{'children':_0x2a9ccb(0x1bb)})}),a26_0x54147c(Box,{'marginLeft':0x2,'children':[a26_0x54147c(Text,{'color':_0x249740===0x0?_0x2a9ccb(0x1b7):_0x2a9ccb(0x1a8),'children':[_0x249740===0x0?'▶\x20':'\x20\x20',_0x2a9ccb(0x1b3)]}),a26_0x565250(Text,{'children':'\x20'}),a26_0x54147c(Text,{'color':_0x249740===0x1?'green':_0x2a9ccb(0x1a8),'children':[_0x249740===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1a8),'children':_0x2a9ccb(0x1bc)})}),a26_0x565250(Box,{'children':a26_0x565250(Text,{'color':_0x2a9ccb(0x1aa),'children':_0x2a9ccb(0x1c4)})})]}),_0x118380==='login-process'&&a26_0x54147c(Box,{'children':[a26_0x565250(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x116149&&a26_0x565250(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
1
+ (function(_0x402512,_0x3a1729){const _0x409da8=a26_0x22d0,_0x45da02=_0x402512();while(!![]){try{const _0x386c6b=-parseInt(_0x409da8(0x1f6))/0x1+-parseInt(_0x409da8(0x1f3))/0x2+parseInt(_0x409da8(0x20c))/0x3+parseInt(_0x409da8(0x205))/0x4*(-parseInt(_0x409da8(0x1ff))/0x5)+-parseInt(_0x409da8(0x1ef))/0x6*(parseInt(_0x409da8(0x20a))/0x7)+parseInt(_0x409da8(0x1fa))/0x8*(-parseInt(_0x409da8(0x1f8))/0x9)+parseInt(_0x409da8(0x1e4))/0xa;if(_0x386c6b===_0x3a1729)break;else _0x45da02['push'](_0x45da02['shift']());}catch(_0x539704){_0x45da02['push'](_0x45da02['shift']());}}}(a26_0x20ba,0xc5f5b));import{jsx as a26_0x576e02,jsxs as a26_0x272e05,Fragment as a26_0x5709ab}from'react/jsx-runtime';function a26_0x20ba(){const _0x4fcce5=['red','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20←\x20','√\x20检测到有效登录状态','api-pull','应用AppCode不合法','project-name','slice','yellow','项目名长度不能超过\x2050\x20个字符','green','35049300oDKnlc','*\x20创建新项目','\x20检查中...','return','app-code','项目名','leftArrow','trim','\x20\x20使用\x20←→\x20选择,回车确认','!\x20未检测到有效登录','项目名不合法','808512vdkmVu','my-app','confirm-api-pull','login','2340052exAWuf','Yes','test','883464epyhNN','应用AppCode','27DiyRRE','登录状态','1124648IgnluN','value','跳过登录','creating','login-check','3045290MjoZxX','login-process','gray','rightArrow','未设置','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','4gQtNbL','*\x20正在登录,请前往浏览器完成登录...','backspace','*\x20应用AppCode\x20','step','56QjUecA','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','4404660vwZNhg','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','\x20登录中...','拉取API配置','length','应用AppCode长度不能超过\x20100\x20个字符','已登录','login-prompt'];a26_0x20ba=function(){return _0x4fcce5;};return a26_0x20ba();}import{useState}from'react';function a26_0x22d0(_0xc0c85c,_0x56a90a){const _0x20ba02=a26_0x20ba();return a26_0x22d0=function(_0x22d074,_0xa9f9a2){_0x22d074=_0x22d074-0x1d5;let _0x50f686=_0x20ba02[_0x22d074];return _0x50f686;},a26_0x22d0(_0xc0c85c,_0x56a90a);}import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0x4dde7d){const _0xa28773=a26_0x22d0,{onCreate:_0x24d767}=_0x4dde7d,[_0x2b2d94,_0x23b38d]=useState('project-name'),[_0x3135b2,_0x252d92]=useState(''),[_0x7996c6,_0x308746]=useState(''),[_0x55c032,_0x4a4262]=useState(''),[_0x4dc370,_0x2dad70]=useState(''),[_0x15520c,_0xda5de8]=useState([]),[_0x473992,_0x4e6f63]=useState(null),[_0x3eaea3,_0xd9ef21]=useState(![]),[_0x3e07f2,_0x437371]=useState(![]),[_0x53c516,_0x1aebc7]=useState(![]),[_0x13d28c,_0x33ad6d]=useState(0x0),[_0x35b162,_0x308045]=useState(0x0),_0x39b412=_0xa28773(0x1f0);function _0x152869(_0x58c3c9){const _0x5e153e=_0xa28773;if(_0x58c3c9[_0x5e153e(0x1d5)]>0x32)return{'valid':![],'message':_0x5e153e(0x1e2)};const _0x50af45=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x58c3c9?.[_0x5e153e(0x1eb)]()&&!_0x50af45[_0x5e153e(0x1f5)](_0x58c3c9))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x1341c1(_0x228425){const _0x4c5cea=_0xa28773;if(!_0x228425[_0x4c5cea(0x1eb)]())return{'valid':!![]};if(_0x228425['length']>0x64)return{'valid':![],'message':_0x4c5cea(0x1d6)};const _0x214278=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x214278[_0x4c5cea(0x1f5)](_0x228425))return{'valid':![],'message':_0x4c5cea(0x20d)};return{'valid':!![]};}async function _0x5bea1f(){_0xd9ef21(!![]);try{const _0x187490=await getIsSessionValid();return _0x4e6f63(_0x187490),_0x187490;}catch(_0x34009b){return _0x4e6f63(![]),![];}finally{_0xd9ef21(![]);}}async function _0x57078c(){_0x437371(!![]);try{const _0x5e98f7=await authServer({'silent':!![]});return _0x4e6f63(_0x5e98f7),_0x5e98f7;}catch(_0x4b7b06){return _0x4e6f63(![]),![];}finally{_0x437371(![]);}}return useInput(async(_0x155fc7,_0x1d400d)=>{const _0x39f773=_0xa28773;if(_0x1d400d[_0x39f773(0x1ea)]||_0x1d400d[_0x39f773(0x202)]){if(_0x2b2d94==='confirm-api-pull'){_0x33ad6d(_0x3bc7b0=>_0x3bc7b0===0x0?0x1:0x0);return;}if(_0x2b2d94===_0x39f773(0x1d8)){_0x308045(_0x49e201=>_0x49e201===0x0?0x1:0x0);return;}}if(_0x1d400d[_0x39f773(0x1e7)]){if(_0x2b2d94===_0x39f773(0x1df)){const _0xa114a9=_0x55c032[_0x39f773(0x1eb)]()||_0x39b412;if(_0x4dc370)return;_0x252d92(_0xa114a9),_0xda5de8([{'step':_0x39f773(0x1df),'label':_0x39f773(0x1e9),'value':_0xa114a9}]),_0x4a4262(''),_0x2dad70(''),_0x23b38d(_0x39f773(0x1e8));return;}if(_0x2b2d94===_0x39f773(0x1e8)){if(_0x4dc370)return;const _0x439088=_0x55c032['trim']();_0x308746(_0x439088),_0xda5de8(_0x19a998=>[..._0x19a998,{'step':'app-code','label':_0x39f773(0x1f7),'value':_0x439088||_0x39f773(0x203)}]),_0x4a4262(''),_0x2dad70('');if(_0x439088){_0x23b38d('login-check');const _0x16600b=await _0x5bea1f();_0x16600b?_0x23b38d('confirm-api-pull'):_0x23b38d(_0x39f773(0x1d8));}else _0x24d767({'projectName':_0x3135b2,'appCode':undefined,'pullApi':![]}),_0x23b38d(_0x39f773(0x1fd));return;}if(_0x2b2d94==='confirm-api-pull'){const _0x5d3424=_0x13d28c===0x0;_0x1aebc7(_0x5d3424),_0xda5de8(_0x3f7155=>[..._0x3f7155,{'step':_0x39f773(0x1dd),'label':_0x39f773(0x20f),'value':_0x5d3424?'是':'否'}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':_0x5d3424}),_0x23b38d(_0x39f773(0x1fd));return;}if(_0x2b2d94===_0x39f773(0x1d8)){const _0x53b94c=_0x35b162===0x0;if(_0x53b94c){_0x23b38d(_0x39f773(0x200));const _0xc84724=await _0x57078c();_0xc84724?(_0xda5de8(_0x579bf2=>[..._0x579bf2,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':_0x39f773(0x1d7)}]),_0x23b38d(_0x39f773(0x1f1))):(_0xda5de8(_0x1c1399=>[..._0x1c1399,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':'登录失败'}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':![]}),_0x23b38d('creating'));}else _0xda5de8(_0x56abeb=>[..._0x56abeb,{'step':_0x39f773(0x1f2),'label':_0x39f773(0x1f9),'value':_0x39f773(0x1fc)}]),_0x24d767({'projectName':_0x3135b2,'appCode':_0x7996c6,'pullApi':![]}),_0x23b38d('creating');return;}}if(_0x1d400d[_0x39f773(0x207)]||_0x1d400d['delete']){_0x4a4262(_0x39373c=>{const _0xecc437=_0x39f773,_0x1068f9=_0x39373c[_0xecc437(0x1e0)](0x0,-0x1);if(_0x2b2d94===_0xecc437(0x1df)){const {valid:_0x1bebf8,message:_0x266d21}=_0x152869(_0x1068f9);_0x2dad70(_0x1bebf8?'':_0x266d21||'项目名不合法');}else{if(_0x2b2d94===_0xecc437(0x1e8)){const {valid:_0x1dedf7,message:_0x355c27}=_0x1341c1(_0x1068f9);_0x2dad70(_0x1dedf7?'':_0x355c27||_0xecc437(0x1de));}}return _0x1068f9;});return;}if([_0x39f773(0x1fd),'login-check',_0x39f773(0x200)]['includes'](_0x2b2d94))return;if(_0x2b2d94===_0x39f773(0x1f1)||_0x2b2d94==='login-prompt')return;_0x4a4262(_0x489a1b=>{const _0x208d67=_0x39f773,_0x39dd1e=_0x489a1b+_0x155fc7;if(_0x2b2d94===_0x208d67(0x1df)){const {valid:_0x529998,message:_0x5add2b}=_0x152869(_0x39dd1e);_0x2dad70(_0x529998?'':_0x5add2b||_0x208d67(0x1ee));}else{if(_0x2b2d94===_0x208d67(0x1e8)){const {valid:_0x385e7b,message:_0x113140}=_0x1341c1(_0x39dd1e);_0x2dad70(_0x385e7b?'':_0x113140||_0x208d67(0x1de));}}return _0x39dd1e;});}),a26_0x272e05(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x15520c[_0xa28773(0x1d5)]===0x0&&a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':'cyan','children':_0xa28773(0x1e5)})}),_0x15520c['map'](_0x274983=>a26_0x272e05(Box,{'children':[a26_0x272e05(Text,{'color':'green','children':['√\x20',_0x274983['label'],':\x20']}),a26_0x576e02(Text,{'color':'cyan','children':_0x274983[_0xa28773(0x1fb)]})]},_0x274983[_0xa28773(0x209)])),_0x2b2d94===_0xa28773(0x1df)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':'*\x20项目名:\x20'}),_0x55c032?a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0x55c032}):a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0x39b412}),_0x4dc370&&a26_0x272e05(Text,{'color':_0xa28773(0x1d9),'children':[_0xa28773(0x1db),_0x4dc370]})]}),!_0x4dc370&&!_0x55c032&&a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x2b2d94===_0xa28773(0x1e8)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':_0xa28773(0x208)}),a26_0x576e02(Text,{'color':'gray','children':'[可选]:\x20'}),a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0x55c032}),_0x4dc370&&a26_0x272e05(Text,{'color':_0xa28773(0x1d9),'children':[_0xa28773(0x1db),_0x4dc370]})]}),!_0x4dc370&&a26_0x576e02(Box,{'children':a26_0x272e05(Text,{'color':'gray','children':['\x20',_0xa28773(0x1da)]})})]}),_0x2b2d94===_0xa28773(0x1fe)&&a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':'*\x20正在检查登录状态...'}),_0x3eaea3&&a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1e6)})]}),_0x2b2d94==='confirm-api-pull'&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e3),'children':_0xa28773(0x1dc)})}),a26_0x576e02(Box,{'marginTop':0x1,'children':a26_0x576e02(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x272e05(Box,{'marginLeft':0x2,'children':[a26_0x272e05(Text,{'color':_0x13d28c===0x0?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x13d28c===0x0?'▶\x20':'\x20\x20',_0xa28773(0x1f4)]}),a26_0x576e02(Text,{'children':'\x20'}),a26_0x272e05(Text,{'color':_0x13d28c===0x1?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x13d28c===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1ec)})}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x20b)})})]}),_0x2b2d94===_0xa28773(0x1d8)&&a26_0x272e05(a26_0x5709ab,{'children':[a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x1ed)})}),a26_0x576e02(Box,{'marginTop':0x1,'children':a26_0x576e02(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a26_0x272e05(Box,{'marginLeft':0x2,'children':[a26_0x272e05(Text,{'color':_0x35b162===0x0?_0xa28773(0x1e3):_0xa28773(0x201),'children':[_0x35b162===0x0?'▶\x20':'\x20\x20','Yes']}),a26_0x576e02(Text,{'children':'\x20'}),a26_0x272e05(Text,{'color':_0x35b162===0x1?'green':_0xa28773(0x201),'children':[_0x35b162===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x201),'children':_0xa28773(0x1ec)})}),a26_0x576e02(Box,{'children':a26_0x576e02(Text,{'color':_0xa28773(0x1e1),'children':_0xa28773(0x204)})})]}),_0x2b2d94===_0xa28773(0x200)&&a26_0x272e05(Box,{'children':[a26_0x576e02(Text,{'children':_0xa28773(0x206)}),_0x3e07f2&&a26_0x576e02(Text,{'color':'gray','children':_0xa28773(0x20e)})]})]});}
@@ -1 +1 @@
1
- (function(_0x580b23,_0x496446){const _0x2bd31e=a27_0xcd40,_0x52c0f7=_0x580b23();while(!![]){try{const _0x11a390=-parseInt(_0x2bd31e(0x8b))/0x1+parseInt(_0x2bd31e(0x89))/0x2*(-parseInt(_0x2bd31e(0x91))/0x3)+-parseInt(_0x2bd31e(0x90))/0x4+-parseInt(_0x2bd31e(0x8a))/0x5*(-parseInt(_0x2bd31e(0x8c))/0x6)+-parseInt(_0x2bd31e(0x88))/0x7+parseInt(_0x2bd31e(0x86))/0x8+-parseInt(_0x2bd31e(0x87))/0x9*(-parseInt(_0x2bd31e(0x8d))/0xa);if(_0x11a390===_0x496446)break;else _0x52c0f7['push'](_0x52c0f7['shift']());}catch(_0x4c1d39){_0x52c0f7['push'](_0x52c0f7['shift']());}}}(a27_0x51a1,0x823ba));export function formatElapsed(_0x393e23){const _0x54e0c2=a27_0xcd40,_0xa0c9e6=Date['now']()-_0x393e23;if(_0xa0c9e6<0x3e8)return _0xa0c9e6+'ms';const _0x5167e7=(_0xa0c9e6/0x3e8)[_0x54e0c2(0x8e)](0x2),_0x1f433=_0x5167e7[_0x54e0c2(0x8f)](/\.?0+$/u,'');return _0x1f433+'s';}function a27_0xcd40(_0x48a574,_0xb555e7){const _0x51a1f2=a27_0x51a1();return a27_0xcd40=function(_0xcd40ab,_0x23481c){_0xcd40ab=_0xcd40ab-0x86;let _0x5a64ef=_0x51a1f2[_0xcd40ab];return _0x5a64ef;},a27_0xcd40(_0x48a574,_0xb555e7);}function a27_0x51a1(){const _0x252738=['325275RzTELV','4269640QfbdHN','367317ovGrRo','5611193wNyZIY','18wsXiAV','25kmRbOy','534530pUXVtR','494580wxZepU','650nnJUBb','toFixed','replace','3013248brXQCX'];a27_0x51a1=function(){return _0x252738;};return a27_0x51a1();}
1
+ (function(_0x59d443,_0xca8014){const _0x39bb79=a27_0x1c95,_0x1ee3a4=_0x59d443();while(!![]){try{const _0x576801=parseInt(_0x39bb79(0x188))/0x1+-parseInt(_0x39bb79(0x185))/0x2*(parseInt(_0x39bb79(0x189))/0x3)+parseInt(_0x39bb79(0x180))/0x4+-parseInt(_0x39bb79(0x182))/0x5*(parseInt(_0x39bb79(0x183))/0x6)+-parseInt(_0x39bb79(0x186))/0x7+parseInt(_0x39bb79(0x18b))/0x8+-parseInt(_0x39bb79(0x18a))/0x9;if(_0x576801===_0xca8014)break;else _0x1ee3a4['push'](_0x1ee3a4['shift']());}catch(_0x1f1ef4){_0x1ee3a4['push'](_0x1ee3a4['shift']());}}}(a27_0x3192,0x6b013));function a27_0x1c95(_0x3b3979,_0x134450){const _0x31920c=a27_0x3192();return a27_0x1c95=function(_0x1c95df,_0xac48b0){_0x1c95df=_0x1c95df-0x180;let _0x2aaf81=_0x31920c[_0x1c95df];return _0x2aaf81;},a27_0x1c95(_0x3b3979,_0x134450);}function a27_0x3192(){const _0x58c7e5=['2XcsODS','1364923UpZkjy','toFixed','799732wPhElV','1382529JOHvyG','3458466EJSJvp','4273080JxzkyM','2054552FicLZx','now','153795axnIJW','72lSjFzi','replace'];a27_0x3192=function(){return _0x58c7e5;};return a27_0x3192();}export function formatElapsed(_0x54fd3d){const _0x4b807d=a27_0x1c95,_0x653991=Date[_0x4b807d(0x181)]()-_0x54fd3d;if(_0x653991<0x3e8)return _0x653991+'ms';const _0x41c39d=(_0x653991/0x3e8)[_0x4b807d(0x187)](0x2),_0x9c8f92=_0x41c39d[_0x4b807d(0x184)](/\.?0+$/u,'');return _0x9c8f92+'s';}
@@ -1 +1 @@
1
- (function(_0x2e086e,_0xa874a8){const _0x2e4ff0=a28_0x1c4c,_0x5e4435=_0x2e086e();while(!![]){try{const _0xad0e5c=-parseInt(_0x2e4ff0(0x179))/0x1*(-parseInt(_0x2e4ff0(0x19f))/0x2)+parseInt(_0x2e4ff0(0x182))/0x3+parseInt(_0x2e4ff0(0x18e))/0x4*(-parseInt(_0x2e4ff0(0x172))/0x5)+-parseInt(_0x2e4ff0(0x19e))/0x6*(-parseInt(_0x2e4ff0(0x17d))/0x7)+parseInt(_0x2e4ff0(0x18b))/0x8+-parseInt(_0x2e4ff0(0x188))/0x9+-parseInt(_0x2e4ff0(0x192))/0xa;if(_0xad0e5c===_0xa874a8)break;else _0x5e4435['push'](_0x5e4435['shift']());}catch(_0x259db6){_0x5e4435['push'](_0x5e4435['shift']());}}}(a28_0x3c50,0x3c0c5));import{jsx as a28_0x27a7d8,Fragment as a28_0x3f8ae6,jsxs as a28_0x503c81}from'react/jsx-runtime';import a28_0x148e58 from'node:path';import a28_0x2fa139 from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';function a28_0x1c4c(_0x5eea15,_0x415d86){const _0x3c506b=a28_0x3c50();return a28_0x1c4c=function(_0x1c4c17,_0x521f1c){_0x1c4c17=_0x1c4c17-0x171;let _0x3bacb7=_0x3c506b[_0x1c4c17];return _0x3bacb7;},a28_0x1c4c(_0x5eea15,_0x415d86);}function a28_0x3c50(){const _0x5d35fa=['cyan','green','.lovrabetrc','*\x20正在拉取\x20API\x20配置...','1.0.0','resolve','projectCode','stringify','cwd','1.\x20','appCode','*\x20正在为项目\x20','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','\x20创建配置文件','132430VlAfpF','\x20|\x20应用AppCode:\x20','yellow','\x20已存在,请使用其他项目名','项目名称:\x20','writeFileSync','开始创建项目:\x20','19517lrZTGB','message','projectName','error','7LiIfRy','create','log','gray','√\x20API\x20配置拉取完成','361365SQsFoT','📦\x20API配置:\x20','启动项目:\x20','配置应用AppCode:\x20','lovrabet\x20config\x20set\x20app\x20[app-code]','white','2397852vvkQbv','需手动拉取','×\x20项目目录\x20','1705440fOOqEI','warn','lovrabet\x20api\x20pull\x20[app-code]','12gofIbV','cd\x20','API\x20配置拉取成功:\x20','pullApi','2498180ijcivI','\x20√\x20','项目创建完成:\x20','doTask','配置AppCode:\x20','🎉\x20项目创建成功!','\x20&&\x20lovrabet\x20start','API\x20配置拉取失败:\x20','column','setLogPath','🔗\x20应用AppCode:\x20','existsSync','823218xQQKfE','38TTKFhV','拉取API配置:\x20','utf8','repeat','info','lovrabet\x20api\x20pull','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置'];a28_0x3c50=function(){return _0x5d35fa;};return a28_0x3c50();}import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x3e0a55){const _0x98da71=a28_0x1c4c,[_0x2ece10,_0xf68574]=useState(![]),[_0x50089d,_0x451324]=useState(![]),[_0x2679a2,_0x35a157]=useState(null),_0x3c4db1=useCopyProjectTemplate(),_0x4c2430=useInstallDependencies(),_0x3e0fb7=useFormatCode(),_0x2ad5ab=async _0x3f996f=>{const _0x4e3eba=a28_0x1c4c,_0x4007f1=a28_0x148e58[_0x4e3eba(0x1ab)](process['cwd'](),_0x3f996f['projectName']);if(a28_0x2fa139[_0x4e3eba(0x19d)](_0x4007f1)){console[_0x4e3eba(0x17c)](_0x4e3eba(0x18a)+_0x3f996f[_0x4e3eba(0x17b)]+_0x4e3eba(0x175));return;}_0x35a157(_0x3f996f),_0xf68574(!![]),logger[_0x4e3eba(0x19b)](_0x4007f1),logger[_0x4e3eba(0x1a3)]('create',_0x4e3eba(0x178)+_0x3f996f[_0x4e3eba(0x17b)],{'projectDir':_0x4007f1,'appCode':_0x3f996f['appCode']});try{await _0x3c4db1['doTask'](_0x3f996f[_0x4e3eba(0x17b)]),await _0x4c2430[_0x4e3eba(0x195)](_0x3f996f[_0x4e3eba(0x17b)]),await _0x3e0fb7[_0x4e3eba(0x195)](_0x3f996f[_0x4e3eba(0x17b)]),await _0x17ac94(_0x3f996f[_0x4e3eba(0x17b)],_0x3f996f['appCode']||'');if(_0x3f996f[_0x4e3eba(0x191)]&&_0x3f996f[_0x4e3eba(0x1b0)]){console[_0x4e3eba(0x17f)](_0x4e3eba(0x1a9));const _0x378d6d=await pullApiSilent(_0x3f996f[_0x4e3eba(0x1b0)],undefined,_0x4007f1);_0x378d6d?(console[_0x4e3eba(0x17f)](_0x4e3eba(0x181)),logger[_0x4e3eba(0x1a3)](_0x4e3eba(0x17e),_0x4e3eba(0x190)+_0x3f996f[_0x4e3eba(0x1b0)],{'projectDir':_0x4007f1,'appCode':_0x3f996f[_0x4e3eba(0x1b0)]})):(console[_0x4e3eba(0x17f)](_0x4e3eba(0x1b2)),logger[_0x4e3eba(0x18c)](_0x4e3eba(0x17e),_0x4e3eba(0x199)+_0x3f996f['appCode'],{'projectDir':_0x4007f1,'appCode':_0x3f996f[_0x4e3eba(0x1b0)]}));}logger['success']('create',_0x4e3eba(0x194)+_0x3f996f[_0x4e3eba(0x17b)]),_0x451324(!![]),_0xf68574(![]);}catch(_0x343e02){logger[_0x4e3eba(0x17c)](_0x4e3eba(0x17e),'项目创建失败:\x20'+_0x3f996f[_0x4e3eba(0x17b)],{'error':_0x343e02 instanceof Error?_0x343e02[_0x4e3eba(0x17a)]:String(_0x343e02)}),_0xf68574(![]);throw _0x343e02;}},_0x44e891=async _0x1dd99f=>{await _0x2ad5ab({'projectName':_0x1dd99f});},_0x17ac94=async(_0x1ce413,_0x209c38)=>{const _0xc823dd=a28_0x1c4c,_0x40f994=a28_0x148e58[_0xc823dd(0x1ab)](process[_0xc823dd(0x1ae)](),_0x1ce413),_0x22a6e0=a28_0x148e58['join'](_0x40f994,'.lovrabetrc');try{_0x209c38?console['log']('*\x20正在为项目\x20'+_0x1ce413+'\x20配置应用AppCode:\x20'+_0x209c38):console['log'](_0xc823dd(0x1b1)+_0x1ce413+_0xc823dd(0x171));console[_0xc823dd(0x17f)]('*\x20配置文件路径:\x20'+_0x22a6e0);const _0x421ba2={'app':_0x209c38||'','createdAt':new Date()['toISOString'](),'version':_0xc823dd(0x1aa)};a28_0x2fa139[_0xc823dd(0x177)](_0x22a6e0,JSON[_0xc823dd(0x1ad)](_0x421ba2,null,0x2),_0xc823dd(0x1a1)),_0x209c38?console['log']('√\x20配置文件已创建,应用AppCode:\x20'+_0x209c38):console[_0xc823dd(0x17f)](_0xc823dd(0x1a5)),logger[_0xc823dd(0x1a3)](_0xc823dd(0x17e),_0xc823dd(0x185)+_0x209c38,{'projectName':_0x1ce413,'configFile':_0xc823dd(0x1a8)});}catch(_0x2ff6c3){logger[_0xc823dd(0x17c)](_0xc823dd(0x17e),'配置应用AppCode失败:\x20'+_0x209c38,{'projectName':_0x1ce413,'error':_0x2ff6c3 instanceof Error?_0x2ff6c3[_0xc823dd(0x17a)]:String(_0x2ff6c3)});}};useEffect(()=>{const _0x4d7536=a28_0x1c4c;_0x3e0a55[_0x4d7536(0x1ac)]&&_0x44e891(_0x3e0a55[_0x4d7536(0x1ac)]);},[_0x3e0a55[_0x98da71(0x1ac)]]);if(!_0x2ece10&&!_0x50089d&&!_0x3e0a55['projectCode'])return a28_0x27a7d8(EnhancedGuidedCreate,{'onCreate':_0x2ad5ab});if(_0x2ece10)return a28_0x503c81(a28_0x3f8ae6,{'children':[a28_0x503c81(Box,{'marginTop':0x1,'children':[a28_0x27a7d8(Box,{'width':'1'}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'children':_0x98da71(0x193)}),a28_0x27a7d8(Text,{'children':'项目名称:\x20'}),a28_0x27a7d8(Text,{'color':'green','children':_0x2679a2?.[_0x98da71(0x17b)]}),_0x2679a2?.[_0x98da71(0x1b0)]&&a28_0x503c81(a28_0x3f8ae6,{'children':[a28_0x27a7d8(Text,{'children':_0x98da71(0x173)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'children':_0x2679a2[_0x98da71(0x1b0)]})]})]}),a28_0x27a7d8(TaskRunning,{..._0x3c4db1}),a28_0x27a7d8(TaskRunning,{..._0x4c2430}),a28_0x27a7d8(TaskRunning,{..._0x3e0fb7})]});if(_0x50089d)return a28_0x503c81(a28_0x3f8ae6,{'children':[a28_0x503c81(Box,{'marginTop':0x1,'children':[a28_0x27a7d8(Box,{'width':'1'}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'children':'\x20√\x20'}),a28_0x27a7d8(Text,{'children':_0x98da71(0x176)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'children':_0x2679a2?.[_0x98da71(0x17b)]}),_0x2679a2?.[_0x98da71(0x1b0)]&&a28_0x503c81(a28_0x3f8ae6,{'children':[a28_0x27a7d8(Text,{'children':_0x98da71(0x173)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'children':_0x2679a2[_0x98da71(0x1b0)]})]})]}),a28_0x27a7d8(TaskFinished,{..._0x3c4db1}),a28_0x27a7d8(TaskFinished,{..._0x4c2430}),a28_0x27a7d8(TaskFinished,{..._0x3e0fb7}),a28_0x27a7d8(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x27a7d8(Text,{'color':'green','children':'─'[_0x98da71(0x1a2)](0x3c)})}),a28_0x27a7d8(Box,{'children':a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'bold':!![],'children':_0x98da71(0x197)})}),a28_0x503c81(Box,{'marginTop':0x1,'flexDirection':_0x98da71(0x19a),'children':[a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'children':'📁\x20项目名称:\x20'}),a28_0x27a7d8(Text,{'color':_0x98da71(0x187),'bold':!![],'children':_0x2679a2?.[_0x98da71(0x17b)]})]}),_0x2679a2?.[_0x98da71(0x1b0)]&&a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':'cyan','children':_0x98da71(0x19c)}),a28_0x27a7d8(Text,{'color':'white','bold':!![],'children':_0x2679a2['appCode']})]}),a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':'cyan','children':_0x98da71(0x183)}),_0x2679a2?.[_0x98da71(0x191)]?a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'bold':!![],'children':'已自动拉取\x20✓'}):_0x2679a2?.['appCode']?a28_0x27a7d8(Text,{'color':_0x98da71(0x174),'bold':!![],'children':_0x98da71(0x189)}):a28_0x27a7d8(Text,{'color':_0x98da71(0x180),'bold':!![],'children':'未配置'})]})]}),a28_0x27a7d8(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'bold':!![],'children':'🚀\x20接下来可以:'})}),a28_0x503c81(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':'green','children':_0x98da71(0x1af)}),a28_0x27a7d8(Text,{'color':'white','children':_0x98da71(0x184)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'bold':!![],'children':_0x98da71(0x18f)+_0x2679a2?.[_0x98da71(0x17b)]+_0x98da71(0x198)})]}),_0x2679a2?.['appCode']&&!_0x2679a2?.[_0x98da71(0x191)]&&a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':_0x98da71(0x174),'children':'2.\x20'}),a28_0x27a7d8(Text,{'color':'white','children':_0x98da71(0x1a0)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'bold':!![],'children':_0x98da71(0x1a4)})]}),!_0x2679a2?.[_0x98da71(0x1b0)]&&a28_0x503c81(a28_0x3f8ae6,{'children':[a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':'gray','children':'2.\x20'}),a28_0x27a7d8(Text,{'color':'white','children':_0x98da71(0x196)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'bold':!![],'children':_0x98da71(0x186)})]}),a28_0x503c81(Box,{'children':[a28_0x27a7d8(Text,{'color':_0x98da71(0x180),'children':'3.\x20'}),a28_0x27a7d8(Text,{'color':'white','children':_0x98da71(0x1a0)}),a28_0x27a7d8(Text,{'color':_0x98da71(0x1a6),'bold':!![],'children':_0x98da71(0x18d)})]})]})]}),a28_0x27a7d8(Box,{'marginTop':0x1,'children':a28_0x27a7d8(Text,{'color':_0x98da71(0x1a7),'children':'─'[_0x98da71(0x1a2)](0x3c)})})]});return null;}
1
+ (function(_0x122d17,_0x3368b0){const _0x26d89=a28_0x1929,_0x1cbdbf=_0x122d17();while(!![]){try{const _0x3262ef=parseInt(_0x26d89(0x9a))/0x1*(-parseInt(_0x26d89(0xaf))/0x2)+-parseInt(_0x26d89(0xae))/0x3*(-parseInt(_0x26d89(0xb7))/0x4)+parseInt(_0x26d89(0xa7))/0x5*(-parseInt(_0x26d89(0xbc))/0x6)+parseInt(_0x26d89(0xad))/0x7+-parseInt(_0x26d89(0xac))/0x8*(-parseInt(_0x26d89(0xd4))/0x9)+-parseInt(_0x26d89(0xa6))/0xa+parseInt(_0x26d89(0xc2))/0xb;if(_0x3262ef===_0x3368b0)break;else _0x1cbdbf['push'](_0x1cbdbf['shift']());}catch(_0x3a0349){_0x1cbdbf['push'](_0x1cbdbf['shift']());}}}(a28_0x5267,0xdb052));import{jsx as a28_0x1906bd,Fragment as a28_0x4b9c4a,jsxs as a28_0x47bbcd}from'react/jsx-runtime';import a28_0x45c8fd from'node:path';import a28_0x48465c from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';function a28_0x5267(){const _0x183af3=['已自动拉取\x20✓','856sZyJjU','1478211YJIxQQ','5982DTpdAd','334VUiuur','gray','√\x20配置文件已创建,应用AppCode:\x20','*\x20正在为项目\x20','1.\x20','stringify','3.\x20','yellow','2060OFSRvH','*\x20正在拉取\x20API\x20配置...','启动项目:\x20','📁\x20项目名称:\x20','lovrabet\x20api\x20pull\x20[app-code]','498642ucyjFc','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','配置AppCode:\x20','API\x20配置拉取成功:\x20','lovrabet\x20api\x20pull','配置应用AppCode失败:\x20','731434ClycSm','配置应用AppCode:\x20','\x20&&\x20lovrabet\x20start','error','\x20创建配置文件','√\x20API\x20配置拉取完成','log','projectCode','cwd','拉取API配置:\x20','green','toISOString','lovrabet\x20config\x20set\x20app\x20[app-code]','*\x20配置文件路径:\x20','.lovrabetrc','pullApi','🔗\x20应用AppCode:\x20','message','76239fTqLFZ','setLogPath','\x20已存在,请使用其他项目名','\x20|\x20应用AppCode:\x20','resolve','1.0.0','success','create','cyan','doTask','452xXgQrJ','warn','projectName','utf8','repeat','2.\x20','开始创建项目:\x20','white','column','info','\x20√\x20','🎉\x20项目创建成功!','3242070CyuxZq','55zDXxYl','appCode','需手动拉取','未配置'];a28_0x5267=function(){return _0x183af3;};return a28_0x5267();}import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';function a28_0x1929(_0x41408e,_0x5cd3f5){const _0x5267bf=a28_0x5267();return a28_0x1929=function(_0x19298e,_0x2eb27f){_0x19298e=_0x19298e-0x92;let _0x22634b=_0x5267bf[_0x19298e];return _0x22634b;},a28_0x1929(_0x41408e,_0x5cd3f5);}import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x3f3a93){const _0x173f03=a28_0x1929,[_0x551021,_0x135a36]=useState(![]),[_0x16dd74,_0x10978e]=useState(![]),[_0x1a3124,_0x21ebc6]=useState(null),_0x12c74f=useCopyProjectTemplate(),_0x4e43ee=useInstallDependencies(),_0x173b8c=useFormatCode(),_0x1c9d52=async _0x4f849e=>{const _0x5a5655=a28_0x1929,_0x375232=a28_0x45c8fd[_0x5a5655(0x94)](process[_0x5a5655(0xca)](),_0x4f849e[_0x5a5655(0x9c)]);if(a28_0x48465c['existsSync'](_0x375232)){console[_0x5a5655(0xc5)]('×\x20项目目录\x20'+_0x4f849e['projectName']+_0x5a5655(0x92));return;}_0x21ebc6(_0x4f849e),_0x135a36(!![]),logger[_0x5a5655(0xd5)](_0x375232),logger[_0x5a5655(0xa3)](_0x5a5655(0x97),_0x5a5655(0xa0)+_0x4f849e[_0x5a5655(0x9c)],{'projectDir':_0x375232,'appCode':_0x4f849e['appCode']});try{await _0x12c74f[_0x5a5655(0x99)](_0x4f849e[_0x5a5655(0x9c)]),await _0x4e43ee[_0x5a5655(0x99)](_0x4f849e[_0x5a5655(0x9c)]),await _0x173b8c[_0x5a5655(0x99)](_0x4f849e['projectName']),await _0x2299d8(_0x4f849e['projectName'],_0x4f849e[_0x5a5655(0xa8)]||'');if(_0x4f849e['pullApi']&&_0x4f849e['appCode']){console[_0x5a5655(0xc8)](_0x5a5655(0xb8));const _0x55aeef=await pullApiSilent(_0x4f849e['appCode'],undefined,_0x375232);_0x55aeef?(console[_0x5a5655(0xc8)](_0x5a5655(0xc7)),logger['info'](_0x5a5655(0x97),_0x5a5655(0xbf)+_0x4f849e[_0x5a5655(0xa8)],{'projectDir':_0x375232,'appCode':_0x4f849e[_0x5a5655(0xa8)]})):(console[_0x5a5655(0xc8)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x5a5655(0x9b)]('create','API\x20配置拉取失败:\x20'+_0x4f849e[_0x5a5655(0xa8)],{'projectDir':_0x375232,'appCode':_0x4f849e[_0x5a5655(0xa8)]}));}logger[_0x5a5655(0x96)]('create','项目创建完成:\x20'+_0x4f849e[_0x5a5655(0x9c)]),_0x10978e(!![]),_0x135a36(![]);}catch(_0x7bba19){logger[_0x5a5655(0xc5)](_0x5a5655(0x97),'项目创建失败:\x20'+_0x4f849e[_0x5a5655(0x9c)],{'error':_0x7bba19 instanceof Error?_0x7bba19[_0x5a5655(0xd3)]:String(_0x7bba19)}),_0x135a36(![]);throw _0x7bba19;}},_0x2a650f=async _0x499802=>{await _0x1c9d52({'projectName':_0x499802});},_0x2299d8=async(_0x17e634,_0x1a73b5)=>{const _0x23ac4e=a28_0x1929,_0x46f749=a28_0x45c8fd[_0x23ac4e(0x94)](process['cwd'](),_0x17e634),_0x59aa5c=a28_0x45c8fd['join'](_0x46f749,_0x23ac4e(0xd0));try{_0x1a73b5?console['log'](_0x23ac4e(0xb2)+_0x17e634+'\x20配置应用AppCode:\x20'+_0x1a73b5):console[_0x23ac4e(0xc8)](_0x23ac4e(0xb2)+_0x17e634+_0x23ac4e(0xc6));console['log'](_0x23ac4e(0xcf)+_0x59aa5c);const _0x418fb7={'app':_0x1a73b5||'','createdAt':new Date()[_0x23ac4e(0xcd)](),'version':_0x23ac4e(0x95)};a28_0x48465c['writeFileSync'](_0x59aa5c,JSON[_0x23ac4e(0xb4)](_0x418fb7,null,0x2),_0x23ac4e(0x9d)),_0x1a73b5?console['log'](_0x23ac4e(0xb1)+_0x1a73b5):console['log'](_0x23ac4e(0xbd)),logger['info'](_0x23ac4e(0x97),_0x23ac4e(0xc3)+_0x1a73b5,{'projectName':_0x17e634,'configFile':'.lovrabetrc'});}catch(_0x508200){logger[_0x23ac4e(0xc5)](_0x23ac4e(0x97),_0x23ac4e(0xc1)+_0x1a73b5,{'projectName':_0x17e634,'error':_0x508200 instanceof Error?_0x508200[_0x23ac4e(0xd3)]:String(_0x508200)});}};useEffect(()=>{const _0x35ad90=a28_0x1929;_0x3f3a93[_0x35ad90(0xc9)]&&_0x2a650f(_0x3f3a93['projectCode']);},[_0x3f3a93['projectCode']]);if(!_0x551021&&!_0x16dd74&&!_0x3f3a93[_0x173f03(0xc9)])return a28_0x1906bd(EnhancedGuidedCreate,{'onCreate':_0x1c9d52});if(_0x551021)return a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'marginTop':0x1,'children':[a28_0x1906bd(Box,{'width':'1'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x173f03(0xa4)}),a28_0x1906bd(Text,{'children':'项目名称:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x1a3124?.[_0x173f03(0x9c)]}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x1906bd(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x1a3124[_0x173f03(0xa8)]})]})]}),a28_0x1906bd(TaskRunning,{..._0x12c74f}),a28_0x1906bd(TaskRunning,{..._0x4e43ee}),a28_0x1906bd(TaskRunning,{..._0x173b8c})]});if(_0x16dd74)return a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'marginTop':0x1,'children':[a28_0x1906bd(Box,{'width':'1'}),a28_0x1906bd(Text,{'color':'green','children':_0x173f03(0xa4)}),a28_0x1906bd(Text,{'children':'项目名称:\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':_0x1a3124?.['projectName']}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x1906bd(Text,{'children':_0x173f03(0x93)}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x1a3124[_0x173f03(0xa8)]})]})]}),a28_0x1906bd(TaskFinished,{..._0x12c74f}),a28_0x1906bd(TaskFinished,{..._0x4e43ee}),a28_0x1906bd(TaskFinished,{..._0x173b8c}),a28_0x1906bd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'children':'─'[_0x173f03(0x9e)](0x3c)})}),a28_0x1906bd(Box,{'children':a28_0x1906bd(Text,{'color':_0x173f03(0xcc),'bold':!![],'children':_0x173f03(0xa5)})}),a28_0x47bbcd(Box,{'marginTop':0x1,'flexDirection':_0x173f03(0xa2),'children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x173f03(0xba)}),a28_0x1906bd(Text,{'color':'white','bold':!![],'children':_0x1a3124?.[_0x173f03(0x9c)]})]}),_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0x98),'children':_0x173f03(0xd2)}),a28_0x1906bd(Text,{'color':'white','bold':!![],'children':_0x1a3124[_0x173f03(0xa8)]})]}),a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'cyan','children':'📦\x20API配置:\x20'}),_0x1a3124?.[_0x173f03(0xd1)]?a28_0x1906bd(Text,{'color':'green','bold':!![],'children':_0x173f03(0xab)}):_0x1a3124?.['appCode']?a28_0x1906bd(Text,{'color':'yellow','bold':!![],'children':_0x173f03(0xa9)}):a28_0x1906bd(Text,{'color':_0x173f03(0xb0),'bold':!![],'children':_0x173f03(0xaa)})]})]}),a28_0x1906bd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1906bd(Text,{'color':_0x173f03(0x98),'bold':!![],'children':'🚀\x20接下来可以:'})}),a28_0x47bbcd(Box,{'marginLeft':0x2,'flexDirection':'column','children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'green','children':_0x173f03(0xb3)}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xb9)}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':'cd\x20'+_0x1a3124?.[_0x173f03(0x9c)]+_0x173f03(0xc4)})]}),_0x1a3124?.[_0x173f03(0xa8)]&&!_0x1a3124?.[_0x173f03(0xd1)]&&a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':_0x173f03(0xb6),'children':_0x173f03(0x9f)}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xcb)}),a28_0x1906bd(Text,{'color':_0x173f03(0x98),'bold':!![],'children':_0x173f03(0xc0)})]}),!_0x1a3124?.[_0x173f03(0xa8)]&&a28_0x47bbcd(a28_0x4b9c4a,{'children':[a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'gray','children':'2.\x20'}),a28_0x1906bd(Text,{'color':_0x173f03(0xa1),'children':_0x173f03(0xbe)}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':_0x173f03(0xce)})]}),a28_0x47bbcd(Box,{'children':[a28_0x1906bd(Text,{'color':'gray','children':_0x173f03(0xb5)}),a28_0x1906bd(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x1906bd(Text,{'color':'cyan','bold':!![],'children':_0x173f03(0xbb)})]})]})]}),a28_0x1906bd(Box,{'marginTop':0x1,'children':a28_0x1906bd(Text,{'color':'green','children':'─'[_0x173f03(0x9e)](0x3c)})})]});return null;}
@@ -1 +1 @@
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
+ (function(_0x5e2920,_0x4a6844){var _0x1e0fa2=a29_0x417f,_0x57ede1=_0x5e2920();while(!![]){try{var _0x48c607=-parseInt(_0x1e0fa2(0xc9))/0x1*(parseInt(_0x1e0fa2(0xc7))/0x2)+parseInt(_0x1e0fa2(0xc4))/0x3*(parseInt(_0x1e0fa2(0xcd))/0x4)+-parseInt(_0x1e0fa2(0xd0))/0x5*(-parseInt(_0x1e0fa2(0xcb))/0x6)+-parseInt(_0x1e0fa2(0xc8))/0x7+parseInt(_0x1e0fa2(0xcf))/0x8+parseInt(_0x1e0fa2(0xc6))/0x9*(parseInt(_0x1e0fa2(0xc5))/0xa)+parseInt(_0x1e0fa2(0xc3))/0xb*(parseInt(_0x1e0fa2(0xc2))/0xc);if(_0x48c607===_0x4a6844)break;else _0x57ede1['push'](_0x57ede1['shift']());}catch(_0x3c8bef){_0x57ede1['push'](_0x57ede1['shift']());}}}(a29_0x4211,0xaed51));import{jsx as a29_0x4f78fc,jsxs as a29_0x40e3b6}from'react/jsx-runtime';import{Box,Text}from'ink';function a29_0x4211(){var _0x36b9d7=['3177ucYayk','33830btckfK','9960825LjxiDF','29CHJgdq','green','433128erZagv','taskName','5980QyoSKT','elapsed','1096224XjfoYY','5QzOHZi','6024cFntub','17248UhKAax','2001iDSrgB','18020WAKAEn'];a29_0x4211=function(){return _0x36b9d7;};return a29_0x4211();}import{TaskTime}from'./task-time.js';function a29_0x417f(_0x28c5a0,_0x2c10fe){var _0x42116e=a29_0x4211();return a29_0x417f=function(_0x417f13,_0x38062e){_0x417f13=_0x417f13-0xc2;var _0x566df6=_0x42116e[_0x417f13];return _0x566df6;},a29_0x417f(_0x28c5a0,_0x2c10fe);}export function TaskFinished(_0x4bf1be){var _0x746aee=a29_0x417f;return a29_0x40e3b6(Box,{'children':[a29_0x4f78fc(Box,{'width':'1'}),a29_0x4f78fc(Text,{'color':_0x746aee(0xca),'children':'\x20√\x20'}),a29_0x4f78fc(Text,{'children':_0x4bf1be[_0x746aee(0xcc)]}),a29_0x4f78fc(TaskTime,{'elapsed':_0x4bf1be[_0x746aee(0xce)]})]});}
@@ -1 +1 @@
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
+ (function(_0x2dfe9a,_0xd534e0){var _0x312243=a30_0x2af8,_0x265cce=_0x2dfe9a();while(!![]){try{var _0x376b54=-parseInt(_0x312243(0xc0))/0x1+-parseInt(_0x312243(0xc7))/0x2+-parseInt(_0x312243(0xc3))/0x3*(-parseInt(_0x312243(0xc6))/0x4)+-parseInt(_0x312243(0xc4))/0x5+-parseInt(_0x312243(0xbf))/0x6+parseInt(_0x312243(0xc9))/0x7*(parseInt(_0x312243(0xc8))/0x8)+parseInt(_0x312243(0xbe))/0x9;if(_0x376b54===_0xd534e0)break;else _0x265cce['push'](_0x265cce['shift']());}catch(_0x53881c){_0x265cce['push'](_0x265cce['shift']());}}}(a30_0x3742,0x5bb41));import{jsx as a30_0x46f7c1,jsxs as a30_0xb8d67b}from'react/jsx-runtime';function a30_0x2af8(_0x44bf9b,_0x2d022e){var _0x3742af=a30_0x3742();return a30_0x2af8=function(_0x2af8f7,_0x21690a){_0x2af8f7=_0x2af8f7-0xbd;var _0x34297f=_0x3742af[_0x2af8f7];return _0x34297f;},a30_0x2af8(_0x44bf9b,_0x2d022e);}function a30_0x3742(){var _0x149d27=['1192kcDueR','17424chRsDn','2712IWEPEW','77FnAiKj','\x20√\x20','green','12770091MIXlcE','3663678wAZjJl','176048TVDnxJ','\x20\x20\x20','finished','495lAkLRv','1504040njREpQ','dots'];a30_0x3742=function(){return _0x149d27;};return a30_0x3742();}import{Text}from'ink';import a30_0x3f9eec from'ink-spinner';export function TaskLoading(_0x5161df){var _0x47b832=a30_0x2af8;if(_0x5161df[_0x47b832(0xc2)])return a30_0x46f7c1(Text,{'color':_0x47b832(0xbd),'children':_0x47b832(0xca)});if(_0x5161df['loading'])return a30_0xb8d67b(Text,{'color':_0x47b832(0xbd),'children':['\x20',a30_0x46f7c1(a30_0x3f9eec,{'type':_0x47b832(0xc5)}),'\x20']});return a30_0x46f7c1(Text,{'children':_0x47b832(0xc1)});}
@@ -1 +1 @@
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
+ (function(_0x542fbc,_0x938675){var _0x56589f=a31_0x164a,_0x38d49c=_0x542fbc();while(!![]){try{var _0x5cdbcb=parseInt(_0x56589f(0x136))/0x1*(-parseInt(_0x56589f(0x137))/0x2)+parseInt(_0x56589f(0x134))/0x3+-parseInt(_0x56589f(0x138))/0x4+parseInt(_0x56589f(0x139))/0x5+-parseInt(_0x56589f(0x135))/0x6*(-parseInt(_0x56589f(0x13a))/0x7)+-parseInt(_0x56589f(0x13b))/0x8+parseInt(_0x56589f(0x133))/0x9;if(_0x5cdbcb===_0x938675)break;else _0x38d49c['push'](_0x38d49c['shift']());}catch(_0xa59a0c){_0x38d49c['push'](_0x38d49c['shift']());}}}(a31_0x44ea,0xdb23c));import{jsx as a31_0x3a28a5,jsxs as a31_0x4e6ad8}from'react/jsx-runtime';function a31_0x164a(_0x577a89,_0x572992){var _0x44eae7=a31_0x44ea();return a31_0x164a=function(_0x164a1d,_0x38346f){_0x164a1d=_0x164a1d-0x132;var _0x4d76d8=_0x44eae7[_0x164a1d];return _0x4d76d8;},a31_0x164a(_0x577a89,_0x572992);}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a31_0x44ea(){var _0x41343a=['1CyNcJc','935218CdTDdP','7142004IgVmDk','1332230iXMQgL','7yerlDi','10687952LBXSNw','elapsed','13204125BDudmf','3980529ORmHOF','8557716FpYqrw'];a31_0x44ea=function(){return _0x41343a;};return a31_0x44ea();}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x38c18a){var _0x351926=a31_0x164a;return a31_0x4e6ad8(Box,{'children':[a31_0x3a28a5(Box,{'width':'1'}),a31_0x3a28a5(TaskLoading,{..._0x38c18a}),a31_0x3a28a5(Text,{'children':_0x38c18a['taskName']}),a31_0x3a28a5(TaskTime,{'elapsed':_0x38c18a[_0x351926(0x132)]})]});}
@@ -1 +1 @@
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
+ (function(_0x5c2c7f,_0x13c302){var _0x2704e7=a32_0x38f8,_0x266985=_0x5c2c7f();while(!![]){try{var _0x1d7da9=parseInt(_0x2704e7(0x1b1))/0x1*(-parseInt(_0x2704e7(0x1b5))/0x2)+parseInt(_0x2704e7(0x1b4))/0x3+parseInt(_0x2704e7(0x1b3))/0x4+-parseInt(_0x2704e7(0x1b7))/0x5*(-parseInt(_0x2704e7(0x1b2))/0x6)+parseInt(_0x2704e7(0x1ae))/0x7*(parseInt(_0x2704e7(0x1af))/0x8)+-parseInt(_0x2704e7(0x1ad))/0x9*(parseInt(_0x2704e7(0x1b0))/0xa)+-parseInt(_0x2704e7(0x1ac))/0xb;if(_0x1d7da9===_0x13c302)break;else _0x266985['push'](_0x266985['shift']());}catch(_0x5b05bf){_0x266985['push'](_0x266985['shift']());}}}(a32_0x2594,0x804f9));import{jsx as a32_0x540ad1,Fragment as a32_0x28e129,jsxs as a32_0x2cc343}from'react/jsx-runtime';import{Text}from'ink';function a32_0x38f8(_0x22df7a,_0x583846){var _0x2594c4=a32_0x2594();return a32_0x38f8=function(_0x38f8b4,_0x34fc5d){_0x38f8b4=_0x38f8b4-0x1ac;var _0x4bd6f4=_0x2594c4[_0x38f8b4];return _0x4bd6f4;},a32_0x38f8(_0x22df7a,_0x583846);}export function TaskTime(_0x5bea80){var _0x51399d=a32_0x38f8;if(_0x5bea80[_0x51399d(0x1b8)])return a32_0x2cc343(a32_0x28e129,{'children':[a32_0x540ad1(Text,{'color':'gray','children':'\x20['}),a32_0x540ad1(Text,{'color':'gray','bold':!![],'children':_0x5bea80[_0x51399d(0x1b8)]}),a32_0x540ad1(Text,{'color':_0x51399d(0x1b6),'children':']'})]});return null;}function a32_0x2594(){var _0x3004d2=['3414xxJzhK','gray','20vseFYI','elapsed','15363227jRVnnB','2710431fGHNHm','7QUKNjd','4499392CbbXxg','10xfwmLT','242MQiFHW','827712zbvNEB','2545040kIfABV','2657937HqmOzY'];a32_0x2594=function(){return _0x3004d2;};return a32_0x2594();}
@@ -1 +1 @@
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
+ const a33_0x526d89=a33_0x37ff;(function(_0x3d0f46,_0x13140e){const _0x11db0f=a33_0x37ff,_0x1ead3d=_0x3d0f46();while(!![]){try{const _0x3c76d9=-parseInt(_0x11db0f(0x155))/0x1*(parseInt(_0x11db0f(0x157))/0x2)+-parseInt(_0x11db0f(0x165))/0x3*(-parseInt(_0x11db0f(0x153))/0x4)+-parseInt(_0x11db0f(0x15e))/0x5*(parseInt(_0x11db0f(0x156))/0x6)+-parseInt(_0x11db0f(0x15c))/0x7+parseInt(_0x11db0f(0x15a))/0x8+parseInt(_0x11db0f(0x152))/0x9+-parseInt(_0x11db0f(0x162))/0xa;if(_0x3c76d9===_0x13140e)break;else _0x1ead3d['push'](_0x1ead3d['shift']());}catch(_0x75243e){_0x1ead3d['push'](_0x1ead3d['shift']());}}}(a33_0x29f8,0x58249));import a33_0x59e965 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a33_0x37ff(_0x1d315b,_0x16bf17){const _0x29f8aa=a33_0x29f8();return a33_0x37ff=function(_0x37ff3e,_0x23406d){_0x37ff3e=_0x37ff3e-0x151;let _0x44a517=_0x29f8aa[_0x37ff3e];return _0x44a517;},a33_0x37ff(_0x1d315b,_0x16bf17);}function a33_0x29f8(){const _0x131c5d=['复制项目文件','386554KKbCLg','success','5vAVgRB','info','url','message','1453300OeAJqO','cwd','dirname','4926PcTArT','resolve','now','3040335LuYgpN','548XIqDEy','copy','5GFZrtp','665928ASTTgn','156710wuELkV','项目模板复制完成','../../templates/projects/sub-app-react-demo','4012632kWhfys'];a33_0x29f8=function(){return _0x131c5d;};return a33_0x29f8();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a33_0x59e965[a33_0x526d89(0x164)](fileURLToPath(import.meta[a33_0x526d89(0x160)])),templateDir=a33_0x59e965[a33_0x526d89(0x166)](__dirname,a33_0x526d89(0x159));export function useCopyProjectTemplate(){const _0x24c373=a33_0x526d89,[_0x101c21,_0x3ce390]=useState(![]),[_0x1f7b68,_0x46e696]=useState(![]),[_0x289158,_0x2d8784]=useState(''),_0xcd0cc1=useCallback(async _0x4c49c=>{const _0x592f57=a33_0x37ff,_0x1fe9f2=Date[_0x592f57(0x151)](),_0x339a19=a33_0x59e965[_0x592f57(0x166)](process[_0x592f57(0x163)](),_0x4c49c);_0x3ce390(!![]);try{logger[_0x592f57(0x15f)]('copy','开始复制项目模板',{'projectCode':_0x4c49c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x339a19);const _0x22da45=Date[_0x592f57(0x151)]()-_0x1fe9f2;logger[_0x592f57(0x15d)](_0x592f57(0x154),_0x592f57(0x158),_0x22da45,{'projectCode':_0x4c49c});}catch(_0x1b70a4){const _0x5b9623=Date['now']()-_0x1fe9f2;logger['error'](_0x592f57(0x154),'项目模板复制失败',{'projectCode':_0x4c49c,'error':_0x1b70a4 instanceof Error?_0x1b70a4[_0x592f57(0x161)]:String(_0x1b70a4),'duration':_0x5b9623});throw _0x1b70a4;}finally{_0x3ce390(![]),_0x46e696(!![]),_0x2d8784(formatElapsed(_0x1fe9f2));}},[]);return{'taskName':_0x24c373(0x15b),'finished':_0x1f7b68,'loading':_0x101c21,'elapsed':_0x289158,'doTask':_0xcd0cc1};}
@@ -1 +1 @@
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
+ (function(_0x5955c8,_0x597736){const _0x232a6e=a34_0x1eae,_0x83838a=_0x5955c8();while(!![]){try{const _0x522085=parseInt(_0x232a6e(0x139))/0x1+-parseInt(_0x232a6e(0x143))/0x2*(parseInt(_0x232a6e(0x13b))/0x3)+parseInt(_0x232a6e(0x13e))/0x4+-parseInt(_0x232a6e(0x144))/0x5+-parseInt(_0x232a6e(0x14c))/0x6*(-parseInt(_0x232a6e(0x149))/0x7)+-parseInt(_0x232a6e(0x145))/0x8*(-parseInt(_0x232a6e(0x140))/0x9)+parseInt(_0x232a6e(0x13f))/0xa*(parseInt(_0x232a6e(0x13a))/0xb);if(_0x522085===_0x597736)break;else _0x83838a['push'](_0x83838a['shift']());}catch(_0x5ce55d){_0x83838a['push'](_0x83838a['shift']());}}}(a34_0x18d8,0xb5b38));import a34_0x5ebafc from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a34_0x18d8(){const _0x23033c=['代码格式化完成','1376990xSCxPz','4114DNMXKK','462015wjfcwU','格式化代码','npx','2367292cYJags','1580DecFJK','232425SihVVA','now','代码格式化失败','12SmJMLZ','5367000DHOmzq','64BrJamu','cwd','开始格式化代码','resolve','3550211FZkgWm','format','info','6GvDeUh','--write','message','success','prettier'];a34_0x18d8=function(){return _0x23033c;};return a34_0x18d8();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a34_0x1eae(_0x4f6be1,_0x1440ad){const _0x18d893=a34_0x18d8();return a34_0x1eae=function(_0x1eaeca,_0x394af4){_0x1eaeca=_0x1eaeca-0x136;let _0x2db9dc=_0x18d893[_0x1eaeca];return _0x2db9dc;},a34_0x1eae(_0x4f6be1,_0x1440ad);}export function useFormatCode(){const _0x585b60=a34_0x1eae,[_0x321b6d,_0x2c72e8]=useState(![]),[_0x4caeba,_0x28cc90]=useState(![]),[_0x289dea,_0x524481]=useState(''),_0x13aaca=useCallback(async _0x3d646c=>{const _0x5320f3=a34_0x1eae,_0x1f92d8=Date['now'](),_0x2f156f=a34_0x5ebafc[_0x5320f3(0x148)](process[_0x5320f3(0x146)](),_0x3d646c);_0x2c72e8(!![]);try{logger[_0x5320f3(0x14b)](_0x5320f3(0x14a),_0x5320f3(0x147),{'projectCode':_0x3d646c}),await execa(_0x5320f3(0x13d),[_0x5320f3(0x137),_0x5320f3(0x14d),'.'],{'cwd':_0x2f156f});const _0x247149=Date[_0x5320f3(0x141)]()-_0x1f92d8;logger[_0x5320f3(0x136)](_0x5320f3(0x14a),_0x5320f3(0x138),_0x247149,{'projectCode':_0x3d646c});}catch(_0x2f5313){const _0x2a7ff4=Date[_0x5320f3(0x141)]()-_0x1f92d8;logger['error'](_0x5320f3(0x14a),_0x5320f3(0x142),{'projectCode':_0x3d646c,'error':_0x2f5313 instanceof Error?_0x2f5313[_0x5320f3(0x14e)]:String(_0x2f5313),'duration':_0x2a7ff4});throw _0x2f5313;}finally{_0x2c72e8(![]),_0x28cc90(!![]),_0x524481(formatElapsed(_0x1f92d8));}},[]);return{'taskName':_0x585b60(0x13c),'finished':_0x4caeba,'loading':_0x321b6d,'elapsed':_0x289dea,'doTask':_0x13aaca};}
@@ -1 +1 @@
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();}
1
+ function a35_0x2f63(_0x23a01f,_0x1c7f52){const _0x53a778=a35_0x53a7();return a35_0x2f63=function(_0x2f6308,_0x1b00af){_0x2f6308=_0x2f6308-0x9f;let _0x44e54f=_0x53a778[_0x2f6308];return _0x44e54f;},a35_0x2f63(_0x23a01f,_0x1c7f52);}(function(_0x423c72,_0x352822){const _0x3e36da=a35_0x2f63,_0x3ea902=_0x423c72();while(!![]){try{const _0x202e5c=parseInt(_0x3e36da(0xaa))/0x1+-parseInt(_0x3e36da(0xa0))/0x2*(parseInt(_0x3e36da(0xa1))/0x3)+-parseInt(_0x3e36da(0xb3))/0x4*(-parseInt(_0x3e36da(0xaf))/0x5)+parseInt(_0x3e36da(0xad))/0x6*(-parseInt(_0x3e36da(0xb2))/0x7)+parseInt(_0x3e36da(0xa8))/0x8+-parseInt(_0x3e36da(0xa4))/0x9*(parseInt(_0x3e36da(0xae))/0xa)+parseInt(_0x3e36da(0x9f))/0xb;if(_0x202e5c===_0x352822)break;else _0x3ea902['push'](_0x3ea902['shift']());}catch(_0x3ccd2c){_0x3ea902['push'](_0x3ea902['shift']());}}}(a35_0x53a7,0x5c419));import a35_0x12815b 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 _0x55c76a=a35_0x2f63,[_0x3ebc4a,_0x40424d]=useState(![]),[_0x4b1bc7,_0x1bed74]=useState(![]),[_0x28447b,_0x1284e1]=useState(''),_0x327dac=useCallback(async _0x3c9dd4=>{const _0x1dea7f=a35_0x2f63,_0x19fde5=Date[_0x1dea7f(0xa3)](),_0x335e3d=a35_0x12815b[_0x1dea7f(0xb1)](process['cwd'](),_0x3c9dd4);_0x40424d(!![]),_0x1bed74(![]);const _0x10d75a=async(_0x49833b,_0x4f8ab5)=>{await execa(_0x49833b,_0x4f8ab5,{'cwd':_0x335e3d});};try{logger[_0x1dea7f(0xa5)](_0x1dea7f(0xa6),'开始安装依赖',{'projectCode':_0x3c9dd4,'registry':'https://registry.npmmirror.com'}),await _0x10d75a('npm',['install','--registry',_0x1dea7f(0xab)]);const _0x130006=Date['now']()-_0x19fde5;logger[_0x1dea7f(0xa9)](_0x1dea7f(0xa6),_0x1dea7f(0xb0),_0x130006,{'projectCode':_0x3c9dd4});}catch(_0x3dfb04){const _0x2a3815=Date[_0x1dea7f(0xa3)]()-_0x19fde5;logger['error'](_0x1dea7f(0xa6),_0x1dea7f(0xac),{'projectCode':_0x3c9dd4,'error':_0x3dfb04 instanceof Error?_0x3dfb04[_0x1dea7f(0xa2)]:String(_0x3dfb04),'duration':_0x2a3815});throw _0x3dfb04;}finally{_0x40424d(![]),_0x1bed74(!![]),_0x1284e1(formatElapsed(_0x19fde5));}},[]);return{'taskName':_0x55c76a(0xa7),'finished':_0x4b1bc7,'loading':_0x3ebc4a,'elapsed':_0x28447b,'doTask':_0x327dac};}function a35_0x53a7(){const _0x4a93a0=['resolve','1813oLeKYi','36Ojuats','18103393LVYJof','538OsFYnw','6363FVkMin','message','now','18477LVuTiC','info','install','安装依赖','947704zqdwno','success','53071gHQawd','https://registry.npmmirror.com','依赖安装失败','4302PTRgsy','3340AscjQV','1410vUXQSg','依赖安装完成'];a35_0x53a7=function(){return _0x4a93a0;};return a35_0x53a7();}
package/lib/help.js CHANGED
@@ -1 +1 @@
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
+ (function(_0x1b3204,_0xcff59f){var _0x43c31c=a36_0x1ba7,_0x1a0823=_0x1b3204();while(!![]){try{var _0xd829b3=-parseInt(_0x43c31c(0x1f4))/0x1+-parseInt(_0x43c31c(0x1fd))/0x2+-parseInt(_0x43c31c(0x1f8))/0x3*(-parseInt(_0x43c31c(0x1fa))/0x4)+-parseInt(_0x43c31c(0x201))/0x5+-parseInt(_0x43c31c(0x1fc))/0x6*(parseInt(_0x43c31c(0x200))/0x7)+parseInt(_0x43c31c(0x1f7))/0x8+parseInt(_0x43c31c(0x1f3))/0x9*(parseInt(_0x43c31c(0x1ff))/0xa);if(_0xd829b3===_0xcff59f)break;else _0x1a0823['push'](_0x1a0823['shift']());}catch(_0x5001a2){_0x1a0823['push'](_0x1a0823['shift']());}}}(a36_0xbad8,0xb5a0f));function a36_0x1ba7(_0x1b432e,_0x375e6b){var _0xbad876=a36_0xbad8();return a36_0x1ba7=function(_0x1ba791,_0x25cb7a){_0x1ba791=_0x1ba791-0x1f3;var _0x297cac=_0xbad876[_0x1ba791];return _0x297cac;},a36_0x1ba7(_0x1b432e,_0x375e6b);}import{jsx as a36_0x1a28db,jsxs as a36_0x40e09b}from'react/jsx-runtime';function a36_0xbad8(){var _0x267f2c=['!\x20请指定一个有效的命令。','5748056ToJyLP','9hvofpI','lovrabet\x20--help','932948AHRAPm','green','6174342TaGbKi','31150HCtqmE','column','1030GGXJau','7vutIiH','2339350lsUyzh','129915xLsRAB','648570kHhmhM','查看可用命令。'];a36_0xbad8=function(){return _0x267f2c;};return a36_0xbad8();}import{Box,Text}from'ink';export function Help(){var _0x567850=a36_0x1ba7;return a36_0x40e09b(Box,{'flexDirection':_0x567850(0x1fe),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x40e09b(Box,{'children':[a36_0x1a28db(Box,{'width':'1'}),a36_0x1a28db(Text,{'children':_0x567850(0x1f6)})]}),a36_0x40e09b(Box,{'marginTop':0x1,'children':[a36_0x1a28db(Box,{'width':'1'}),a36_0x40e09b(Text,{'children':['\x20\x20','使用']}),a36_0x40e09b(Text,{'bold':!![],'color':_0x567850(0x1fb),'children':['\x20',_0x567850(0x1f9),'\x20']}),a36_0x1a28db(Text,{'children':_0x567850(0x1f5)})]})]});}
@@ -1 +1 @@
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
+ const a37_0x481fd3=a37_0x4414;(function(_0x272d0c,_0x51d854){const _0x33b100=a37_0x4414,_0x56498b=_0x272d0c();while(!![]){try{const _0x57e752=-parseInt(_0x33b100(0x17f))/0x1+parseInt(_0x33b100(0x188))/0x2*(-parseInt(_0x33b100(0x189))/0x3)+parseInt(_0x33b100(0x182))/0x4*(-parseInt(_0x33b100(0x17e))/0x5)+-parseInt(_0x33b100(0x185))/0x6+parseInt(_0x33b100(0x183))/0x7+parseInt(_0x33b100(0x184))/0x8+parseInt(_0x33b100(0x186))/0x9*(parseInt(_0x33b100(0x187))/0xa);if(_0x57e752===_0x51d854)break;else _0x56498b['push'](_0x56498b['shift']());}catch(_0x1c5b91){_0x56498b['push'](_0x56498b['shift']());}}}(a37_0x161b,0x21ee2));function a37_0x161b(){const _0x346f6c=['parse','15490qUwKPs','163557jiMqZG','utf8','.lovrabetrc','20ECWJwJ','1111334CauWmL','394816DHHpyA','639948ptfOAY','68103UQvqGn','410XVnPYV','6EEePOW','93678rHrzfg'];a37_0x161b=function(){return _0x346f6c;};return a37_0x161b();}import{existsSync,readFileSync}from'node:fs';function a37_0x4414(_0x2cf8e8,_0x22273e){const _0x161be8=a37_0x161b();return a37_0x4414=function(_0x441408,_0x3d2e21){_0x441408=_0x441408-0x17d;let _0x425934=_0x161be8[_0x441408];return _0x425934;},a37_0x4414(_0x2cf8e8,_0x22273e);}import{resolve}from'node:path';export const configPath=resolve(process['cwd'](),a37_0x481fd3(0x181));export function readConfig(){const _0x291430=a37_0x481fd3;try{if(existsSync(configPath)){const _0x20d518=readFileSync(configPath,{'encoding':_0x291430(0x180)});return _0x20d518?JSON[_0x291430(0x17d)](_0x20d518):{};}}catch(_0x552f54){}return{};}
@@ -1 +1 @@
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
+ (function(_0x5af9af,_0x1a0181){const _0x215c81=a38_0x2693,_0x1a1e08=_0x5af9af();while(!![]){try{const _0x1ef0d2=parseInt(_0x215c81(0x1ec))/0x1+-parseInt(_0x215c81(0x1e1))/0x2+parseInt(_0x215c81(0x1e9))/0x3*(parseInt(_0x215c81(0x1e4))/0x4)+-parseInt(_0x215c81(0x1e6))/0x5*(-parseInt(_0x215c81(0x1de))/0x6)+-parseInt(_0x215c81(0x1df))/0x7+-parseInt(_0x215c81(0x1e3))/0x8+-parseInt(_0x215c81(0x1e7))/0x9*(parseInt(_0x215c81(0x1ef))/0xa);if(_0x1ef0d2===_0x1a0181)break;else _0x1a1e08['push'](_0x1a1e08['shift']());}catch(_0x59f77a){_0x1a1e08['push'](_0x1a1e08['shift']());}}}(a38_0xd5a8,0xbe50c));function a38_0x2693(_0x1edc56,_0x48c48e){const _0xd5a800=a38_0xd5a8();return a38_0x2693=function(_0x2693b0,_0x3c8adc){_0x2693b0=_0x2693b0-0x1de;let _0x567dbf=_0xd5a800[_0x2693b0];return _0x567dbf;},a38_0x2693(_0x1edc56,_0x48c48e);}import a38_0x55e58a from'node:path';import a38_0x21cb0d from'node:fs';export async function copyDirectory(_0x522dfc,_0xdc9674){const _0x5632ef=a38_0x2693;try{const _0x3b5100=a38_0x21cb0d[_0x5632ef(0x1e5)](_0x522dfc,{'withFileTypes':!![]});a38_0x21cb0d[_0x5632ef(0x1eb)](_0xdc9674,{'recursive':!![]});for(const _0x569ebf of _0x3b5100){const _0x1f3fd2=a38_0x55e58a[_0x5632ef(0x1e8)](_0x522dfc,_0x569ebf[_0x5632ef(0x1ed)]),_0x590426=a38_0x55e58a[_0x5632ef(0x1e8)](_0xdc9674,_0x569ebf[_0x5632ef(0x1ed)]);_0x569ebf[_0x5632ef(0x1ee)]()?await copyDirectory(_0x1f3fd2,_0x590426):a38_0x21cb0d[_0x5632ef(0x1e0)](_0x1f3fd2,_0x590426);}}catch(_0x41934f){console[_0x5632ef(0x1ea)](_0x5632ef(0x1e2),_0x41934f);}}function a38_0xd5a8(){const _0x2d0317=['isDirectory','667340PdTaaB','1185798NSVZED','10334415QBebwr','copyFileSync','584224jUdMZm','复制目录时出错:','7330048VUThIY','9532isIpQf','readdirSync','25hUjteo','72HrAqcc','join','1830tsMALK','error','mkdirSync','1556322yntJAC','name'];a38_0xd5a8=function(){return _0x2d0317;};return a38_0xd5a8();}