@lovrabet/cli 1.2.1-beta.4 → 1.2.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 (66) hide show
  1. package/README.md +33 -17
  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-doc-ui.js +1 -1
  6. package/lib/api/api-doc.js +1 -1
  7. package/lib/api/api-pull-ui.js +1 -1
  8. package/lib/api/fetch-model-list.js +1 -1
  9. package/lib/api/generate-api-file.js +1 -1
  10. package/lib/api/main.js +1 -1
  11. package/lib/api/pull-silent.js +1 -1
  12. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  13. package/lib/app-menu/create-menu.js +1 -1
  14. package/lib/app-menu/get-local-pages.js +1 -1
  15. package/lib/app-menu/get-online-menu-list.js +1 -1
  16. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  17. package/lib/app-menu/utils.js +1 -1
  18. package/lib/app-menu/valid-url.js +1 -1
  19. package/lib/app-menu-update-cdn/current-content.js +1 -1
  20. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  21. package/lib/app-menu-update-cdn/main.js +1 -1
  22. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  23. package/lib/auth/auth-server-ui.js +1 -1
  24. package/lib/auth/auth-server.js +1 -1
  25. package/lib/auth/constant.js +1 -1
  26. package/lib/auth/get-cookie.js +1 -1
  27. package/lib/auth/is-session-valid.js +1 -1
  28. package/lib/auth/logout.js +1 -1
  29. package/lib/cli.js +1 -1
  30. package/lib/cmd/build-watch.js +1 -1
  31. package/lib/cmd/build.js +1 -1
  32. package/lib/cmd/logs.js +1 -1
  33. package/lib/cmd/preview.js +1 -1
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/task-finished.js +1 -1
  43. package/lib/create-app/task-loading.js +1 -1
  44. package/lib/create-app/task-running.js +1 -1
  45. package/lib/create-app/task-time.js +1 -1
  46. package/lib/create-app/use-copy-project-template.js +1 -1
  47. package/lib/create-app/use-format-code.js +1 -1
  48. package/lib/create-app/use-install-dependencies.js +1 -1
  49. package/lib/help.js +1 -1
  50. package/lib/init/main.js +1 -1
  51. package/lib/mcp/cursor.js +1 -1
  52. package/lib/mcp/main.js +1 -1
  53. package/lib/utils/check-sdk-version.js +1 -1
  54. package/lib/utils/config.js +1 -1
  55. package/lib/utils/copy-directory.js +1 -1
  56. package/lib/utils/http-client.js +1 -1
  57. package/lib/utils/logger.js +1 -1
  58. package/lib/utils/router-updater.js +1 -1
  59. package/lib/utils/sleep.js +1 -1
  60. package/lib/utils/template-replacer.js +1 -1
  61. package/package.json +3 -3
  62. package/templates/projects/sub-app-react-demo/package.json +2 -2
  63. package/templates/projects/sub-app-react-demo/src/api/api.ts +42 -25
  64. package/templates/projects/sub-app-react-demo/src/api/client.ts +11 -10
  65. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +72 -19
  66. package/templates/projects/sub-app-react-demo/package-lock.json +0 -4062
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a29_0x43fa19=a29_0x51e0;(function(_0xf0ac1c,_0x1bd6cc){const _0x310528=a29_0x51e0,_0x472542=_0xf0ac1c();while(!![]){try{const _0x7cbe8e=parseInt(_0x310528(0x1de))/0x1+-parseInt(_0x310528(0x207))/0x2+-parseInt(_0x310528(0x1f0))/0x3*(parseInt(_0x310528(0x1dc))/0x4)+parseInt(_0x310528(0x201))/0x5*(-parseInt(_0x310528(0x1f7))/0x6)+-parseInt(_0x310528(0x205))/0x7*(-parseInt(_0x310528(0x1ff))/0x8)+-parseInt(_0x310528(0x1db))/0x9+parseInt(_0x310528(0x1f1))/0xa;if(_0x7cbe8e===_0x1bd6cc)break;else _0x472542['push'](_0x472542['shift']());}catch(_0x4f47df){_0x472542['push'](_0x472542['shift']());}}}(a29_0x4e8f,0x8aa73));function a29_0x51e0(_0x353bfd,_0x1cf8f0){_0x353bfd=_0x353bfd-0x1da;const _0x4e8f40=a29_0x4e8f();let _0x51e0a5=_0x4e8f40[_0x353bfd];return _0x51e0a5;}import{jsx as a29_0x562442}from'react/jsx-runtime';function a29_0x4e8f(){const _0x48e890=['trim','start','page','preview','appcode','boolean','config','slice','all','setLogPath','flags','auth','add-page','cwd','add','string','执行更新菜单\x20CDN\x20资源命令','534QasfCr','20450710pQSnZP','info','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','menu','\x20(监听模式)','执行启动命令','14118FvPNBH','执行预览命令','menu-update-cdn','logout','build','init','exit','input','1072LEmUxX','argv','1460WEDgEF','join','env','watch','2583amcIlF','执行添加页面命令','355968lHFcoh','api','7840449uAaYPx','380tWMeJp','error','226537rGpJhi'];a29_0x4e8f=function(){return _0x48e890;};return a29_0x4e8f();}import a29_0x2d7af7 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x2d7af7(a29_0x43fa19(0x1f3),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x43fa19(0x1ee)},'clear':{'type':a29_0x43fa19(0x1e4)},'env':{'type':a29_0x43fa19(0x1ee)},'watch':{'type':'boolean'},'help':{'type':a29_0x43fa19(0x1e4)},'appcode':{'type':a29_0x43fa19(0x1ee)},'output':{'type':a29_0x43fa19(0x1ee)},'params':{'type':a29_0x43fa19(0x1ee)},'datasetcode':{'type':a29_0x43fa19(0x1ee)}},'autoVersion':!![]});await run();async function run(){const _0x54a977=a29_0x43fa19,_0x2b24b1=cli[_0x54a977(0x1fe)][0x0],_0x400fef=cli[_0x54a977(0x1fe)][0x1],_0x369688=cli[_0x54a977(0x1fe)][0x2],_0x491fd8=('lovrabet\x20'+process[_0x54a977(0x200)][_0x54a977(0x1e6)](0x2)[_0x54a977(0x202)]('\x20'))['trim']();logger['setRawCommand'](_0x491fd8);switch(_0x2b24b1){case _0x54a977(0x1fc):{const _0x2a345b=cli['flags'][_0x54a977(0x1e3)],_0x272f42=cli[_0x54a977(0x1e9)]['env'];logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1fc),'执行初始化配置命令'),render(a29_0x562442(Init,{'appcode':_0x2a345b,'env':_0x272f42}));break;}case'create':{const _0x4292a9=cli['input'][0x1]?.[_0x54a977(0x1df)](),_0x39b5cb=cli[_0x54a977(0x1e9)][_0x54a977(0x203)];render(a29_0x562442(CreateApp,{'projectCode':_0x4292a9,'env':_0x39b5cb}));break;}case _0x54a977(0x1ed):{cli['input'][0x1]===_0x54a977(0x1e1)&&(logger['setLogPath'](process['cwd']()),logger[_0x54a977(0x1f2)](_0x54a977(0x1eb),_0x54a977(0x206)),render(a29_0x562442(AddPage,{})));break;}case'start':{try{logger[_0x54a977(0x1e8)](process['cwd']()),logger[_0x54a977(0x1f2)](_0x54a977(0x1e0),_0x54a977(0x1f6)),await runStart();}catch(_0x107158){console[_0x54a977(0x1dd)](_0x107158),process[_0x54a977(0x1fd)](0x1);}break;}case'build':{try{logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1fb),'执行构建命令'),await runBuild();}catch(_0x18cec6){console['error'](_0x18cec6),process[_0x54a977(0x1fd)](0x1);}break;}case _0x54a977(0x1e2):{const _0x378714=cli[_0x54a977(0x1e9)][_0x54a977(0x204)];logger['setLogPath'](process[_0x54a977(0x1ec)]()),logger['info'](_0x54a977(0x1e2),_0x54a977(0x1f8)+(_0x378714?_0x54a977(0x1f5):''));if(_0x378714)try{await Promise[_0x54a977(0x1e7)]([runBuildWatch(),runPreview()]);}catch(_0x38ceac){console['error'](_0x38ceac),process[_0x54a977(0x1fd)](0x1);}else try{await runPreview();}catch(_0x2a120b){console[_0x54a977(0x1dd)](_0x2a120b),process[_0x54a977(0x1fd)](0x1);}break;}case _0x54a977(0x1e5):{render(a29_0x562442(Config,{'cli':cli}));break;}case _0x54a977(0x1da):{await apiCli(cli);break;}case _0x54a977(0x1ea):{render(a29_0x562442(AuthServer,{}));break;}case _0x54a977(0x1f4):{if(_0x400fef==='update'){logger[_0x54a977(0x1e8)](process[_0x54a977(0x1ec)]()),logger[_0x54a977(0x1f2)](_0x54a977(0x1f9),_0x54a977(0x1ef)),render(a29_0x562442(AppMenuUpdateCdn,{}));break;}else render(a29_0x562442(AppMenuSyncUI,{}));break;}case _0x54a977(0x1fa):{logout();break;}case'mcp':{const _0x19698f=cli['input'][0x1];await mcpCommand(_0x19698f);break;}case'logs':{cli['flags']['clear']?clearLogs():showLogs();break;}default:render(a29_0x562442(Help,{}));break;}}
2
+ function a29_0x1f82(){const _0xd9f2c0=['logout','boolean','1004904CMPNSE','cwd','334534bXYMWq','start','flags','string','setLogPath','logs','10304KMlzOm','create','73122oHlGtS','env','执行初始化配置命令','build','api','config','all','执行更新菜单\x20CDN\x20资源命令','1197927GdQibM','info','1392qvOJOZ','lovrabet\x20','mcp','执行预览命令','update','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','setRawCommand','auth','appcode','4996640jAmyLL','add','preview','739340AVLrjt','\x20(监听模式)','argv','trim','exit','slice','page','error','input','init'];a29_0x1f82=function(){return _0xd9f2c0;};return a29_0x1f82();}const a29_0x369ace=a29_0x5328;(function(_0x422191,_0x1c42c5){const _0x1acd9b=a29_0x5328,_0x388b2d=_0x422191();while(!![]){try{const _0x40c472=-parseInt(_0x1acd9b(0x1bb))/0x1+-parseInt(_0x1acd9b(0x197))/0x2+parseInt(_0x1acd9b(0x19f))/0x3+-parseInt(_0x1acd9b(0x1b9))/0x4+parseInt(_0x1acd9b(0x1ad))/0x5+parseInt(_0x1acd9b(0x1a1))/0x6*(-parseInt(_0x1acd9b(0x195))/0x7)+parseInt(_0x1acd9b(0x1aa))/0x8;if(_0x40c472===_0x1c42c5)break;else _0x388b2d['push'](_0x388b2d['shift']());}catch(_0x1efa97){_0x388b2d['push'](_0x388b2d['shift']());}}}(a29_0x1f82,0x32c3c));import{jsx as a29_0x537b49}from'react/jsx-runtime';import a29_0x7dee17 from'meow';function a29_0x5328(_0x4cc63e,_0x50a86d){_0x4cc63e=_0x4cc63e-0x191;const _0x1f8241=a29_0x1f82();let _0x53286d=_0x1f8241[_0x4cc63e];return _0x53286d;}import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x7dee17(a29_0x369ace(0x1a6),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a29_0x369ace(0x1b8)},'env':{'type':a29_0x369ace(0x192)},'watch':{'type':'boolean'},'help':{'type':a29_0x369ace(0x1b8)},'appcode':{'type':a29_0x369ace(0x192)},'output':{'type':'string'},'params':{'type':a29_0x369ace(0x192)},'datasetcode':{'type':a29_0x369ace(0x192)}},'autoVersion':!![]});await run();async function run(){const _0x59eb5a=a29_0x369ace,_0x1f7297=cli['input'][0x0],_0x15e74d=cli[_0x59eb5a(0x1b5)][0x1],_0x4f5d33=cli[_0x59eb5a(0x1b5)][0x2],_0x2ab877=(_0x59eb5a(0x1a2)+process[_0x59eb5a(0x1af)][_0x59eb5a(0x1b2)](0x2)['join']('\x20'))[_0x59eb5a(0x1b0)]();logger[_0x59eb5a(0x1a7)](_0x2ab877);switch(_0x1f7297){case _0x59eb5a(0x1b6):{const _0xf593bc=cli['flags'][_0x59eb5a(0x1a9)],_0x5cccc5=cli[_0x59eb5a(0x191)][_0x59eb5a(0x198)];logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger['info'](_0x59eb5a(0x1b6),_0x59eb5a(0x199)),render(a29_0x537b49(Init,{'appcode':_0xf593bc,'env':_0x5cccc5}));break;}case _0x59eb5a(0x196):{const _0x518e65=cli[_0x59eb5a(0x1b5)][0x1]?.['trim'](),_0x4c93cf=cli['flags'][_0x59eb5a(0x198)];render(a29_0x537b49(CreateApp,{'projectCode':_0x518e65,'env':_0x4c93cf}));break;}case _0x59eb5a(0x1ab):{cli[_0x59eb5a(0x1b5)][0x1]===_0x59eb5a(0x1b3)&&(logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('add-page','执行添加页面命令'),render(a29_0x537b49(AddPage,{})));break;}case _0x59eb5a(0x1bc):{try{logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1bc),'执行启动命令'),await runStart();}catch(_0xbca29e){console['error'](_0xbca29e),process['exit'](0x1);}break;}case _0x59eb5a(0x19a):{try{logger[_0x59eb5a(0x193)](process['cwd']()),logger[_0x59eb5a(0x1a0)]('build','执行构建命令'),await runBuild();}catch(_0x33dd39){console[_0x59eb5a(0x1b4)](_0x33dd39),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x1ac):{const _0x2f5f54=cli[_0x59eb5a(0x191)]['watch'];logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1ac),_0x59eb5a(0x1a4)+(_0x2f5f54?_0x59eb5a(0x1ae):''));if(_0x2f5f54)try{await Promise[_0x59eb5a(0x19d)]([runBuildWatch(),runPreview()]);}catch(_0x1cb2e0){console['error'](_0x1cb2e0),process['exit'](0x1);}else try{await runPreview();}catch(_0x14c8e6){console[_0x59eb5a(0x1b4)](_0x14c8e6),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x19c):{render(a29_0x537b49(Config,{'cli':cli}));break;}case _0x59eb5a(0x19b):{await apiCli(cli);break;}case _0x59eb5a(0x1a8):{render(a29_0x537b49(AuthServer,{}));break;}case'menu':{if(_0x15e74d===_0x59eb5a(0x1a5)){logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('menu-update-cdn',_0x59eb5a(0x19e)),render(a29_0x537b49(AppMenuUpdateCdn,{}));break;}else render(a29_0x537b49(AppMenuSyncUI,{}));break;}case _0x59eb5a(0x1b7):{logout();break;}case _0x59eb5a(0x1a3):{const _0x3cd24c=cli['input'][0x1];await mcpCommand(_0x3cd24c);break;}case _0x59eb5a(0x194):{cli[_0x59eb5a(0x191)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x537b49(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x35d32b,_0x9e9a3a){const _0x47da36=a30_0x5241,_0x3292fe=_0x35d32b();while(!![]){try{const _0x424bf7=parseInt(_0x47da36(0x1e3))/0x1+parseInt(_0x47da36(0x1e2))/0x2*(parseInt(_0x47da36(0x1e1))/0x3)+-parseInt(_0x47da36(0x1dd))/0x4+-parseInt(_0x47da36(0x1ec))/0x5+-parseInt(_0x47da36(0x1ed))/0x6*(-parseInt(_0x47da36(0x1df))/0x7)+parseInt(_0x47da36(0x1e8))/0x8+-parseInt(_0x47da36(0x1eb))/0x9;if(_0x424bf7===_0x9e9a3a)break;else _0x3292fe['push'](_0x3292fe['shift']());}catch(_0x3b34f0){_0x3292fe['push'](_0x3292fe['shift']());}}}(a30_0x859b,0xc82f0));function a30_0x5241(_0x3890b3,_0x30fb47){_0x3890b3=_0x3890b3-0x1dc;const _0x859b7d=a30_0x859b();let _0x524114=_0x859b7d[_0x3890b3];return _0x524114;}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x1b1b7b,_0x2bafc1)=>{const _0x11091d=a30_0x5241,_0x2c9c11=spawn('vite',[_0x11091d(0x1e4),_0x11091d(0x1e5)],{'stdio':_0x11091d(0x1de),'shell':!![],'env':{...process[_0x11091d(0x1ea)],'PATH':''+join(process['cwd'](),_0x11091d(0x1e7),_0x11091d(0x1e0))+delimiter+process[_0x11091d(0x1ea)][_0x11091d(0x1e9)]}});_0x2c9c11['on'](_0x11091d(0x1e6),_0x7b42c7=>{if(_0x7b42c7===0x0||_0x7b42c7===null)_0x1b1b7b();else _0x2bafc1(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x7b42c7));}),_0x2c9c11['on'](_0x11091d(0x1dc),_0x2bafc1);});}function a30_0x859b(){const _0x3769b3=['17874CttXOB','error','6483684doDWMb','inherit','2121pNtGtT','.bin','19536OBCeYt','16XonQBJ','1261728BqEsTl','build','--watch','close','node_modules','4070784QnWVSv','PATH','env','1435356oWqGnK','624760alQdAw'];a30_0x859b=function(){return _0x3769b3;};return a30_0x859b();}
1
+ (function(_0xa47d15,_0x533341){const _0x37eb74=a30_0x3fb2,_0x1818d9=_0xa47d15();while(!![]){try{const _0x5870da=-parseInt(_0x37eb74(0x1be))/0x1*(-parseInt(_0x37eb74(0x1c0))/0x2)+-parseInt(_0x37eb74(0x1af))/0x3*(parseInt(_0x37eb74(0x1b1))/0x4)+parseInt(_0x37eb74(0x1bd))/0x5*(parseInt(_0x37eb74(0x1b2))/0x6)+-parseInt(_0x37eb74(0x1c2))/0x7+parseInt(_0x37eb74(0x1b8))/0x8+-parseInt(_0x37eb74(0x1c1))/0x9*(parseInt(_0x37eb74(0x1bb))/0xa)+parseInt(_0x37eb74(0x1b7))/0xb;if(_0x5870da===_0x533341)break;else _0x1818d9['push'](_0x1818d9['shift']());}catch(_0x1ee31a){_0x1818d9['push'](_0x1818d9['shift']());}}}(a30_0x1e72,0x87cf2));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a30_0x1e72(){const _0xd26f08=['260MymiSd','vite','44615qzRvQq','89tuOUQV','npm\x20run\x20build\x20exited\x20with\x20code\x20','23858HxPRtM','115344XvLNel','2435377lrSnyk','870LHlOKK','node_modules','14152sZUsHp','90ZLCCif','env','PATH','cwd','error','6018958HZcEGm','4165736wflCLF','close','.bin'];a30_0x1e72=function(){return _0xd26f08;};return a30_0x1e72();}function a30_0x3fb2(_0x1eec03,_0x273a49){_0x1eec03=_0x1eec03-0x1af;const _0x1e7254=a30_0x1e72();let _0x3fb21a=_0x1e7254[_0x1eec03];return _0x3fb21a;}export function runBuildWatch(){return new Promise((_0x855810,_0x2ba4a5)=>{const _0x3beb54=a30_0x3fb2,_0x15081d=spawn(_0x3beb54(0x1bc),['build','--watch'],{'stdio':'inherit','shell':!![],'env':{...process[_0x3beb54(0x1b3)],'PATH':''+join(process[_0x3beb54(0x1b5)](),_0x3beb54(0x1b0),_0x3beb54(0x1ba))+delimiter+process['env'][_0x3beb54(0x1b4)]}});_0x15081d['on'](_0x3beb54(0x1b9),_0x333952=>{const _0x4427a5=_0x3beb54;if(_0x333952===0x0||_0x333952===null)_0x855810();else _0x2ba4a5(new Error(_0x4427a5(0x1bf)+_0x333952));}),_0x15081d['on'](_0x3beb54(0x1b6),_0x2ba4a5);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x28f7ad,_0x1e37af){const _0x2798ce=a31_0x4636,_0x4d3b4e=_0x28f7ad();while(!![]){try{const _0x3b4be8=parseInt(_0x2798ce(0xcf))/0x1+-parseInt(_0x2798ce(0xcc))/0x2+-parseInt(_0x2798ce(0xdd))/0x3+-parseInt(_0x2798ce(0xd7))/0x4+parseInt(_0x2798ce(0xcb))/0x5*(parseInt(_0x2798ce(0xe1))/0x6)+parseInt(_0x2798ce(0xcd))/0x7+parseInt(_0x2798ce(0xd1))/0x8;if(_0x3b4be8===_0x1e37af)break;else _0x4d3b4e['push'](_0x4d3b4e['shift']());}catch(_0x5c27de){_0x4d3b4e['push'](_0x4d3b4e['shift']());}}}(a31_0x3490,0xcee11));function a31_0x3490(){const _0x32258e=['1279721RylNVk','trim','7311152QIrqWj','node_modules','项目构建出错','run','inherit','cwd','970908WTrkCR','close','info','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','build','4341087csDYSy','now','env','开始构建项目','36jlhEpj','项目构建成功','message','.bin','error','npm','toString','91810IvRbVl','2416542TkQMfV','10091319AmArMa','PATH'];a31_0x3490=function(){return _0x32258e;};return a31_0x3490();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x4636(_0x2d02ce,_0x384851){_0x2d02ce=_0x2d02ce-0xc5;const _0x349050=a31_0x3490();let _0x463659=_0x349050[_0x2d02ce];return _0x463659;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0xa2fc23,_0x3cd3d8)=>{const _0x17bcc7=a31_0x4636,_0xb7df2e=Date[_0x17bcc7(0xde)]();logger[_0x17bcc7(0xd9)](_0x17bcc7(0xdc),_0x17bcc7(0xe0),{'command':'npm\x20run\x20build'});let _0x543a99='';const _0x319ccc=spawn(_0x17bcc7(0xc9),[_0x17bcc7(0xd4),'build'],{'stdio':[_0x17bcc7(0xd5),_0x17bcc7(0xd5),'pipe'],'shell':!![],'env':{...process[_0x17bcc7(0xdf)],'PATH':''+join(process[_0x17bcc7(0xd6)](),_0x17bcc7(0xd2),_0x17bcc7(0xc7))+delimiter+process[_0x17bcc7(0xdf)][_0x17bcc7(0xce)]}});_0x319ccc[_0x17bcc7(0xdb)]?.['on']('data',_0x4dd467=>{const _0xe7bcc9=_0x17bcc7;_0x543a99+=_0x4dd467[_0xe7bcc9(0xca)]();}),_0x319ccc['on'](_0x17bcc7(0xd8),_0x57d333=>{const _0x265c8c=_0x17bcc7,_0x2995ea=Date[_0x265c8c(0xde)]()-_0xb7df2e;if(_0x57d333===0x0||_0x57d333===null)logger['success']('build',_0x265c8c(0xc5),_0x2995ea),_0xa2fc23();else{const _0x25f2a7={'exitCode':_0x57d333,'duration':_0x2995ea,'command':'npm\x20run\x20build','cwd':process[_0x265c8c(0xd6)]()};_0x543a99['trim']()&&(_0x25f2a7[_0x265c8c(0xdb)]=_0x543a99['trim']()),logger['error'](_0x265c8c(0xdc),'项目构建失败',_0x25f2a7),_0x3cd3d8(new Error(_0x265c8c(0xda)+_0x57d333));}}),_0x319ccc['on'](_0x17bcc7(0xc8),_0x46dc30=>{const _0x1019f2=_0x17bcc7,_0x439e0b=Date[_0x1019f2(0xde)]()-_0xb7df2e;logger['error'](_0x1019f2(0xdc),_0x1019f2(0xd3),{'error':_0x46dc30[_0x1019f2(0xc6)],'duration':_0x439e0b,'stderr':_0x543a99[_0x1019f2(0xd0)]()||undefined}),_0x3cd3d8(_0x46dc30);});});}
1
+ (function(_0x5f2dcd,_0x5a3bc4){const _0x5a4731=a31_0x2a6f,_0x4c0f57=_0x5f2dcd();while(!![]){try{const _0x2db443=parseInt(_0x5a4731(0xb1))/0x1+parseInt(_0x5a4731(0xae))/0x2+parseInt(_0x5a4731(0x96))/0x3*(-parseInt(_0x5a4731(0x98))/0x4)+-parseInt(_0x5a4731(0xb2))/0x5*(parseInt(_0x5a4731(0xa7))/0x6)+-parseInt(_0x5a4731(0x95))/0x7*(parseInt(_0x5a4731(0x93))/0x8)+-parseInt(_0x5a4731(0x97))/0x9*(-parseInt(_0x5a4731(0x9b))/0xa)+-parseInt(_0x5a4731(0x9c))/0xb;if(_0x2db443===_0x5a3bc4)break;else _0x4c0f57['push'](_0x4c0f57['shift']());}catch(_0x3dde76){_0x4c0f57['push'](_0x4c0f57['shift']());}}}(a31_0x1495,0xc5a85));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x1495(){const _0xd47cdc=['1458666kCdcak','995ysifxe','toString','env','125144wcPsJZ','now','7dDVIgc','2699847OYjSXK','5399289SgHDWQ','4kmbhrm','stderr','项目构建出错','20TZcvIs','12206150BmKwmP','success','npm','close','cwd','run','build','info','项目构建成功','.bin','error','28818DNrDol','npm\x20run\x20build','trim','pipe','inherit','PATH','node_modules','2264272MfvQkK','data','npm\x20run\x20build\x20exited\x20with\x20code\x20'];a31_0x1495=function(){return _0xd47cdc;};return a31_0x1495();}function a31_0x2a6f(_0x397c7b,_0x13bee9){_0x397c7b=_0x397c7b-0x92;const _0x1495bb=a31_0x1495();let _0x2a6f27=_0x1495bb[_0x397c7b];return _0x2a6f27;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3a8c9f,_0x3b575b)=>{const _0x545e24=a31_0x2a6f,_0x20edc2=Date[_0x545e24(0x94)]();logger[_0x545e24(0xa3)](_0x545e24(0xa2),'开始构建项目',{'command':_0x545e24(0xa8)});let _0x59dad0='';const _0xc59baf=spawn(_0x545e24(0x9e),[_0x545e24(0xa1),_0x545e24(0xa2)],{'stdio':[_0x545e24(0xab),_0x545e24(0xab),_0x545e24(0xaa)],'shell':!![],'env':{...process[_0x545e24(0x92)],'PATH':''+join(process['cwd'](),_0x545e24(0xad),_0x545e24(0xa5))+delimiter+process[_0x545e24(0x92)][_0x545e24(0xac)]}});_0xc59baf[_0x545e24(0x99)]?.['on'](_0x545e24(0xaf),_0x54f353=>{const _0x3ee2ff=_0x545e24;_0x59dad0+=_0x54f353[_0x3ee2ff(0xb3)]();}),_0xc59baf['on'](_0x545e24(0x9f),_0x2b6910=>{const _0x236163=_0x545e24,_0x1e19b6=Date[_0x236163(0x94)]()-_0x20edc2;if(_0x2b6910===0x0||_0x2b6910===null)logger[_0x236163(0x9d)](_0x236163(0xa2),_0x236163(0xa4),_0x1e19b6),_0x3a8c9f();else{const _0x2845c5={'exitCode':_0x2b6910,'duration':_0x1e19b6,'command':_0x236163(0xa8),'cwd':process[_0x236163(0xa0)]()};_0x59dad0['trim']()&&(_0x2845c5[_0x236163(0x99)]=_0x59dad0['trim']()),logger[_0x236163(0xa6)](_0x236163(0xa2),'项目构建失败',_0x2845c5),_0x3b575b(new Error(_0x236163(0xb0)+_0x2b6910));}}),_0xc59baf['on'](_0x545e24(0xa6),_0x3777c0=>{const _0x2c3810=_0x545e24,_0x9798a8=Date['now']()-_0x20edc2;logger[_0x2c3810(0xa6)](_0x2c3810(0xa2),_0x2c3810(0x9a),{'error':_0x3777c0['message'],'duration':_0x9798a8,'stderr':_0x59dad0[_0x2c3810(0xa9)]()||undefined}),_0x3b575b(_0x3777c0);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x50d91b,_0x2fad77){const _0x3d0654=a32_0x25c8,_0x213dec=_0x50d91b();while(!![]){try{const _0x42fc14=parseInt(_0x3d0654(0x1f5))/0x1*(-parseInt(_0x3d0654(0x1e8))/0x2)+parseInt(_0x3d0654(0x1e5))/0x3*(-parseInt(_0x3d0654(0x1f4))/0x4)+-parseInt(_0x3d0654(0x1f2))/0x5*(parseInt(_0x3d0654(0x1e3))/0x6)+-parseInt(_0x3d0654(0x1f9))/0x7+parseInt(_0x3d0654(0x1f7))/0x8*(-parseInt(_0x3d0654(0x1da))/0x9)+parseInt(_0x3d0654(0x1d7))/0xa*(-parseInt(_0x3d0654(0x1df))/0xb)+parseInt(_0x3d0654(0x1e0))/0xc*(parseInt(_0x3d0654(0x1d6))/0xd);if(_0x42fc14===_0x2fad77)break;else _0x213dec['push'](_0x213dec['shift']());}catch(_0x2071dd){_0x213dec['push'](_0x213dec['shift']());}}}(a32_0x119e,0x2c159));import{logger}from'../utils/logger.js';export function showLogs(){const _0x5a2998=a32_0x25c8;logger[_0x5a2998(0x1eb)](process[_0x5a2998(0x1ec)]());const _0x23ce0e=logger[_0x5a2998(0x1ed)]();if(_0x23ce0e[_0x5a2998(0x1e1)]===0x0){console[_0x5a2998(0x1f1)](_0x5a2998(0x1ea));return;}console[_0x5a2998(0x1f1)](_0x5a2998(0x1e7)),_0x23ce0e[_0x5a2998(0x1e9)]((_0x52e7c6,_0x25097b)=>{const _0x4a20c7=_0x5a2998,_0x2b6dcd=new Date(_0x52e7c6['timestamp'])[_0x4a20c7(0x1dd)](_0x4a20c7(0x1de)),_0x68941c=_0x52e7c6[_0x4a20c7(0x1f3)]==='success'?'√':_0x52e7c6[_0x4a20c7(0x1f3)]===_0x4a20c7(0x1f0)?'×':_0x52e7c6[_0x4a20c7(0x1f3)]===_0x4a20c7(0x1d9)?'!':'i';console[_0x4a20c7(0x1f1)](_0x25097b+0x1+'.\x20'+_0x68941c+'\x20['+_0x52e7c6[_0x4a20c7(0x1dc)]+']\x20'+_0x52e7c6['message']),console[_0x4a20c7(0x1f1)](_0x4a20c7(0x1e4)+_0x2b6dcd),_0x52e7c6[_0x4a20c7(0x1f6)]&&console[_0x4a20c7(0x1f1)](_0x4a20c7(0x1d8)+_0x52e7c6[_0x4a20c7(0x1f6)]+'ms'),_0x52e7c6['details']&&Object[_0x4a20c7(0x1e6)](_0x52e7c6[_0x4a20c7(0x1f8)])[_0x4a20c7(0x1e1)]>0x0&&console['log'](_0x4a20c7(0x1e2)+JSON[_0x4a20c7(0x1ee)](_0x52e7c6[_0x4a20c7(0x1f8)],null,0x2)),console['log']('');});}function a32_0x25c8(_0x35c025,_0x17f06a){_0x35c025=_0x35c025-0x1d6;const _0x119e5f=a32_0x119e();let _0x25c84a=_0x119e5f[_0x35c025];return _0x25c84a;}export function clearLogs(){const _0x81cf08=a32_0x25c8;logger[_0x81cf08(0x1eb)](process[_0x81cf08(0x1ec)]()),logger[_0x81cf08(0x1ef)](),console[_0x81cf08(0x1f1)](_0x81cf08(0x1db));}function a32_0x119e(){const _0x44226d=['15204bbHmrh','length','\x20\x20\x20详情:\x20','344010umuqFQ','\x20\x20\x20时间:\x20','96BMBsTF','keys','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','22738JoSlkZ','forEach','*\x20暂无日志记录','setLogPath','cwd','readLogs','stringify','clearLogs','error','log','5XaWHFp','level','42208JHFFyG','1Yehaae','duration','24qPNUQN','details','1684228SUGumO','12233bxTsfM','10znbVGb','\x20\x20\x20耗时:\x20','warn','996831gHzDQN','*\x20日志已清空','command','toLocaleString','zh-CN','356719CLDLiT'];a32_0x119e=function(){return _0x44226d;};return a32_0x119e();}
1
+ function a32_0x5315(_0x1de5f2,_0x42cd4d){_0x1de5f2=_0x1de5f2-0x176;const _0x413fae=a32_0x413f();let _0x531569=_0x413fae[_0x1de5f2];return _0x531569;}(function(_0x1be00a,_0x3006da){const _0x5c16ee=a32_0x5315,_0x1b70e9=_0x1be00a();while(!![]){try{const _0x205f5b=-parseInt(_0x5c16ee(0x180))/0x1+-parseInt(_0x5c16ee(0x176))/0x2+parseInt(_0x5c16ee(0x182))/0x3*(parseInt(_0x5c16ee(0x188))/0x4)+-parseInt(_0x5c16ee(0x194))/0x5*(parseInt(_0x5c16ee(0x190))/0x6)+parseInt(_0x5c16ee(0x17d))/0x7*(parseInt(_0x5c16ee(0x185))/0x8)+parseInt(_0x5c16ee(0x192))/0x9*(-parseInt(_0x5c16ee(0x191))/0xa)+parseInt(_0x5c16ee(0x178))/0xb;if(_0x205f5b===_0x3006da)break;else _0x1b70e9['push'](_0x1b70e9['shift']());}catch(_0x5d3fdb){_0x1b70e9['push'](_0x1b70e9['shift']());}}}(a32_0x413f,0xbce50));import{logger}from'../utils/logger.js';function a32_0x413f(){const _0x2c6f4a=['*\x20暂无日志记录','duration','7oaYeTp','setLogPath','keys','189320YQlNuE','readLogs','15ZoRdNb','warn','toLocaleString','3265960DoIwed','\x20\x20\x20耗时:\x20','timestamp','199812XVgiGx','*\x20日志已清空','success','error','clearLogs','log','\x20\x20\x20详情:\x20','forEach','3546AaQDlc','101930heLLdb','9SBKrUv','details','1915IqnmCl','message','1764238NWnorQ','cwd','15660557zupsZb','level','command'];a32_0x413f=function(){return _0x2c6f4a;};return a32_0x413f();}export function showLogs(){const _0xbf9d1e=a32_0x5315;logger[_0xbf9d1e(0x17e)](process[_0xbf9d1e(0x177)]());const _0x59f9ba=logger[_0xbf9d1e(0x181)]();if(_0x59f9ba['length']===0x0){console[_0xbf9d1e(0x18d)](_0xbf9d1e(0x17b));return;}console[_0xbf9d1e(0x18d)]('*\x20Lovrabet\x20CLI\x20日志记录:\x0a'),_0x59f9ba[_0xbf9d1e(0x18f)]((_0x4e85be,_0x3c2a48)=>{const _0x4c07b4=_0xbf9d1e,_0x386225=new Date(_0x4e85be[_0x4c07b4(0x187)])[_0x4c07b4(0x184)]('zh-CN'),_0x24c03a=_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x18a)?'√':_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x18b)?'×':_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x183)?'!':'i';console[_0x4c07b4(0x18d)](_0x3c2a48+0x1+'.\x20'+_0x24c03a+'\x20['+_0x4e85be[_0x4c07b4(0x17a)]+']\x20'+_0x4e85be[_0x4c07b4(0x195)]),console[_0x4c07b4(0x18d)]('\x20\x20\x20时间:\x20'+_0x386225),_0x4e85be[_0x4c07b4(0x17c)]&&console['log'](_0x4c07b4(0x186)+_0x4e85be[_0x4c07b4(0x17c)]+'ms'),_0x4e85be[_0x4c07b4(0x193)]&&Object[_0x4c07b4(0x17f)](_0x4e85be[_0x4c07b4(0x193)])['length']>0x0&&console[_0x4c07b4(0x18d)](_0x4c07b4(0x18e)+JSON['stringify'](_0x4e85be['details'],null,0x2)),console[_0x4c07b4(0x18d)]('');});}export function clearLogs(){const _0x8de30b=a32_0x5315;logger['setLogPath'](process[_0x8de30b(0x177)]()),logger[_0x8de30b(0x18c)](),console[_0x8de30b(0x18d)](_0x8de30b(0x189));}
@@ -1 +1 @@
1
- (function(_0x183776,_0x2a30e9){const _0x190f62=a33_0x31e0,_0x342a2f=_0x183776();while(!![]){try{const _0x2d7f37=-parseInt(_0x190f62(0xf0))/0x1*(-parseInt(_0x190f62(0xe7))/0x2)+parseInt(_0x190f62(0xd9))/0x3*(parseInt(_0x190f62(0xe5))/0x4)+-parseInt(_0x190f62(0xdb))/0x5+parseInt(_0x190f62(0xf2))/0x6+-parseInt(_0x190f62(0xf6))/0x7*(parseInt(_0x190f62(0xe0))/0x8)+-parseInt(_0x190f62(0xda))/0x9*(parseInt(_0x190f62(0xf1))/0xa)+-parseInt(_0x190f62(0xdd))/0xb*(-parseInt(_0x190f62(0xef))/0xc);if(_0x2d7f37===_0x2a30e9)break;else _0x342a2f['push'](_0x342a2f['shift']());}catch(_0x56d0b9){_0x342a2f['push'](_0x342a2f['shift']());}}}(a33_0x3bb8,0x3f1fa));import{delimiter,join}from'node:path';function a33_0x3bb8(){const _0x20619e=['27213dyjySx','99nVletb','671695uHqAhp','vite\x20preview','5512210XzDYEF','data','message','8ZIPGlX','cwd','trim','预览服务器启动失败','inherit','40WgmUZP','PATH','378002RZeDbC','info','vite','error','stderr','node_modules','预览服务器启动出错','preview','12jwouOH','1tBHMGL','292770hXmljN','144924SPjExA','success','启动预览服务器','env','630245hZRDuy','now','.bin'];a33_0x3bb8=function(){return _0x20619e;};return a33_0x3bb8();}import{spawn}from'node:child_process';function a33_0x31e0(_0x58ebd7,_0x5a7913){_0x58ebd7=_0x58ebd7-0xd8;const _0x3bb844=a33_0x3bb8();let _0x31e050=_0x3bb844[_0x58ebd7];return _0x31e050;}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x12e6fb,_0x879525)=>{const _0x426d2f=a33_0x31e0,_0x2a4a81=Date[_0x426d2f(0xf7)]();logger[_0x426d2f(0xe8)](_0x426d2f(0xee),_0x426d2f(0xf4),{'command':_0x426d2f(0xdc)});let _0x1229a1='';const _0x5c4035=spawn(_0x426d2f(0xe9),[_0x426d2f(0xee)],{'stdio':[_0x426d2f(0xe4),_0x426d2f(0xe4),'pipe'],'shell':!![],'env':{...process[_0x426d2f(0xf5)],'PATH':''+join(process[_0x426d2f(0xe1)](),_0x426d2f(0xec),_0x426d2f(0xd8))+delimiter+process['env'][_0x426d2f(0xe6)]}});_0x5c4035[_0x426d2f(0xeb)]?.['on'](_0x426d2f(0xde),_0x1516a0=>{_0x1229a1+=_0x1516a0['toString']();}),_0x5c4035['on']('close',_0x26754b=>{const _0x34da62=_0x426d2f,_0x5e3e2c=Date[_0x34da62(0xf7)]()-_0x2a4a81;if(_0x26754b===0x0||_0x26754b===null)logger[_0x34da62(0xf3)](_0x34da62(0xee),'预览服务器启动成功',_0x5e3e2c),_0x12e6fb();else{const _0x14aa6f={'exitCode':_0x26754b,'duration':_0x5e3e2c,'command':'vite\x20preview','cwd':process[_0x34da62(0xe1)]()};_0x1229a1['trim']()&&(_0x14aa6f[_0x34da62(0xeb)]=_0x1229a1['trim']()),logger['error'](_0x34da62(0xee),_0x34da62(0xe3),_0x14aa6f),_0x879525(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x26754b));}}),_0x5c4035['on'](_0x426d2f(0xea),_0x1a8639=>{const _0xa42b72=_0x426d2f,_0x1c4274=Date[_0xa42b72(0xf7)]()-_0x2a4a81;logger[_0xa42b72(0xea)]('preview',_0xa42b72(0xed),{'error':_0x1a8639[_0xa42b72(0xdf)],'duration':_0x1c4274,'stderr':_0x1229a1[_0xa42b72(0xe2)]()||undefined}),_0x879525(_0x1a8639);});});}
1
+ (function(_0x5d23b5,_0x4f391b){const _0x1fc115=a33_0x2043,_0x4648b2=_0x5d23b5();while(!![]){try{const _0xeb3819=parseInt(_0x1fc115(0x1ce))/0x1*(-parseInt(_0x1fc115(0x1dc))/0x2)+parseInt(_0x1fc115(0x1db))/0x3+parseInt(_0x1fc115(0x1e4))/0x4*(parseInt(_0x1fc115(0x1cf))/0x5)+parseInt(_0x1fc115(0x1d6))/0x6+-parseInt(_0x1fc115(0x1eb))/0x7*(-parseInt(_0x1fc115(0x1e7))/0x8)+parseInt(_0x1fc115(0x1e6))/0x9*(-parseInt(_0x1fc115(0x1da))/0xa)+-parseInt(_0x1fc115(0x1e1))/0xb;if(_0xeb3819===_0x4f391b)break;else _0x4648b2['push'](_0x4648b2['shift']());}catch(_0x476ee5){_0x4648b2['push'](_0x4648b2['shift']());}}}(a33_0x5e1f,0x755f4));function a33_0x5e1f(){const _0x464f3c=['1595847ssyJeH','trim','PATH','214048lsSOWE','message','132921FgCfix','22128xtZavJ','预览服务器启动出错','info','success','651hPTzKG','toString','pipe','1SulDVX','70CSGSlI','.bin','预览服务器启动成功','node_modules','preview','stderr','error','5175282JlKfUl','预览服务器启动失败','启动预览服务器','env','590NMNMlH','387594WJpOGJ','1001894XVwbgg','vite\x20preview','inherit','cwd','now'];a33_0x5e1f=function(){return _0x464f3c;};return a33_0x5e1f();}function a33_0x2043(_0x5db96b,_0x104bd6){_0x5db96b=_0x5db96b-0x1ce;const _0x5e1f45=a33_0x5e1f();let _0x204348=_0x5e1f45[_0x5db96b];return _0x204348;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x32b89b,_0x2d6bbf)=>{const _0x197e1b=a33_0x2043,_0x59b791=Date['now']();logger[_0x197e1b(0x1e9)](_0x197e1b(0x1d3),_0x197e1b(0x1d8),{'command':_0x197e1b(0x1dd)});let _0x27dff2='';const _0x3a049f=spawn('vite',[_0x197e1b(0x1d3)],{'stdio':[_0x197e1b(0x1de),'inherit',_0x197e1b(0x1ed)],'shell':!![],'env':{...process[_0x197e1b(0x1d9)],'PATH':''+join(process[_0x197e1b(0x1df)](),_0x197e1b(0x1d2),_0x197e1b(0x1d0))+delimiter+process[_0x197e1b(0x1d9)][_0x197e1b(0x1e3)]}});_0x3a049f[_0x197e1b(0x1d4)]?.['on']('data',_0x465817=>{const _0x37697f=_0x197e1b;_0x27dff2+=_0x465817[_0x37697f(0x1ec)]();}),_0x3a049f['on']('close',_0x20fa01=>{const _0x1db09b=_0x197e1b,_0x1f3236=Date['now']()-_0x59b791;if(_0x20fa01===0x0||_0x20fa01===null)logger[_0x1db09b(0x1ea)]('preview',_0x1db09b(0x1d1),_0x1f3236),_0x32b89b();else{const _0x39b65c={'exitCode':_0x20fa01,'duration':_0x1f3236,'command':_0x1db09b(0x1dd),'cwd':process[_0x1db09b(0x1df)]()};_0x27dff2['trim']()&&(_0x39b65c[_0x1db09b(0x1d4)]=_0x27dff2[_0x1db09b(0x1e2)]()),logger[_0x1db09b(0x1d5)](_0x1db09b(0x1d3),_0x1db09b(0x1d7),_0x39b65c),_0x2d6bbf(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x20fa01));}}),_0x3a049f['on']('error',_0x3d2972=>{const _0x4ca3b9=_0x197e1b,_0x4d637a=Date[_0x4ca3b9(0x1e0)]()-_0x59b791;logger['error'](_0x4ca3b9(0x1d3),_0x4ca3b9(0x1e8),{'error':_0x3d2972[_0x4ca3b9(0x1e5)],'duration':_0x4d637a,'stderr':_0x27dff2['trim']()||undefined}),_0x2d6bbf(_0x3d2972);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4242fc,_0x18acb2){const _0x5c1b06=a34_0x18ac,_0xb755ce=_0x4242fc();while(!![]){try{const _0xa27c0c=parseInt(_0x5c1b06(0x1fc))/0x1*(parseInt(_0x5c1b06(0x20f))/0x2)+-parseInt(_0x5c1b06(0x200))/0x3+parseInt(_0x5c1b06(0x1f0))/0x4*(parseInt(_0x5c1b06(0x1f6))/0x5)+parseInt(_0x5c1b06(0x1f7))/0x6*(parseInt(_0x5c1b06(0x207))/0x7)+-parseInt(_0x5c1b06(0x1f5))/0x8+parseInt(_0x5c1b06(0x1f8))/0x9*(parseInt(_0x5c1b06(0x1f3))/0xa)+-parseInt(_0x5c1b06(0x202))/0xb*(parseInt(_0x5c1b06(0x1f1))/0xc);if(_0xa27c0c===_0x18acb2)break;else _0xb755ce['push'](_0xb755ce['shift']());}catch(_0x34b66d){_0xb755ce['push'](_0xb755ce['shift']());}}}(a34_0x1eae,0x8e6fa));function a34_0x18ac(_0x298816,_0x5134ed){_0x298816=_0x298816-0x1ee;const _0x1eaefa=a34_0x1eae();let _0x18ac2d=_0x1eaefa[_0x298816];return _0x18ac2d;}function a34_0x1eae(){const _0x317c93=['cwd','3418Dridhv','inherit','minVersion','node_modules','8QYHkkS','1188YiLnOE','vite','3789910fJxLoM','data','7259592MSBWQW','861550phbRkw','516RFfXHo','9TRLgJV','error','PATH','env','368lTrjMp','now','needsUpgrade','trim','1019394FGzZWO','开发服务器启动出错','18062tLjDOs','toString','vite\x20exited\x20with\x20code\x20','开发服务器启动失败','info','52150TsFIwm','开发服务器启动成功','start','stderr','message','version','success'];a34_0x1eae=function(){return _0x317c93;};return a34_0x1eae();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x22bd14){return new Promise((_0x46d385,_0x3e1a8b)=>{const _0x84bbf3=a34_0x18ac,_0x4bef18=Date[_0x84bbf3(0x1fd)](),_0x16bb30=_0x22bd14||process[_0x84bbf3(0x20e)](),_0x10813a=checkSdkVersion(_0x16bb30);_0x10813a[_0x84bbf3(0x1fe)]&&(printSdkUpgradeWarning(_0x10813a),logger['warn']('start','SDK\x20版本低于推荐版本',{'currentVersion':_0x10813a[_0x84bbf3(0x20c)],'minVersion':_0x10813a[_0x84bbf3(0x1ee)]}));logger[_0x84bbf3(0x206)](_0x84bbf3(0x209),'启动开发服务器',{'command':_0x84bbf3(0x1f2),'cwd':_0x16bb30});let _0x12bdb1='';const _0x2f9c46=spawn(_0x84bbf3(0x1f2),{'stdio':[_0x84bbf3(0x210),_0x84bbf3(0x210),'pipe'],'shell':!![],'cwd':_0x16bb30,'env':{...process[_0x84bbf3(0x1fb)],'PATH':''+join(_0x16bb30,_0x84bbf3(0x1ef),'.bin')+delimiter+process[_0x84bbf3(0x1fb)][_0x84bbf3(0x1fa)]}});_0x2f9c46[_0x84bbf3(0x20a)]?.['on'](_0x84bbf3(0x1f4),_0x3a0252=>{const _0x37ccd4=_0x84bbf3,_0x3ab99c=_0x3a0252[_0x37ccd4(0x203)]();_0x12bdb1+=_0x3ab99c,process[_0x37ccd4(0x20a)]['write'](_0x3ab99c);}),_0x2f9c46['on']('close',_0x5ec40b=>{const _0x2c5e64=_0x84bbf3,_0x1f82ef=Date[_0x2c5e64(0x1fd)]()-_0x4bef18;if(_0x5ec40b===0x0||_0x5ec40b===null)logger[_0x2c5e64(0x20d)](_0x2c5e64(0x209),_0x2c5e64(0x208),_0x1f82ef),_0x46d385();else{const _0x478816={'exitCode':_0x5ec40b,'duration':_0x1f82ef,'command':_0x2c5e64(0x1f2),'cwd':_0x16bb30};_0x12bdb1[_0x2c5e64(0x1ff)]()&&(_0x478816[_0x2c5e64(0x20a)]=_0x12bdb1['trim']()),logger[_0x2c5e64(0x1f9)]('start',_0x2c5e64(0x205),_0x478816),_0x3e1a8b(new Error(_0x2c5e64(0x204)+_0x5ec40b));}}),_0x2f9c46['on'](_0x84bbf3(0x1f9),_0x2a3ab6=>{const _0x58e104=_0x84bbf3,_0x5c3af2=Date[_0x58e104(0x1fd)]()-_0x4bef18,_0x3bec3b={'error':_0x2a3ab6[_0x58e104(0x20b)],'duration':_0x5c3af2,'command':_0x58e104(0x1f2),'cwd':_0x16bb30};_0x12bdb1[_0x58e104(0x1ff)]()&&(_0x3bec3b[_0x58e104(0x20a)]=_0x12bdb1[_0x58e104(0x1ff)]()),logger['error'](_0x58e104(0x209),_0x58e104(0x201),_0x3bec3b),_0x3e1a8b(_0x2a3ab6);});});}
1
+ (function(_0x15117e,_0x5e4315){const _0x8ee3b8=a34_0x2ec1,_0x2f0e40=_0x15117e();while(!![]){try{const _0x28b6af=parseInt(_0x8ee3b8(0xaf))/0x1*(-parseInt(_0x8ee3b8(0x97))/0x2)+parseInt(_0x8ee3b8(0x99))/0x3*(parseInt(_0x8ee3b8(0xab))/0x4)+parseInt(_0x8ee3b8(0xae))/0x5*(-parseInt(_0x8ee3b8(0xaa))/0x6)+-parseInt(_0x8ee3b8(0x9d))/0x7+-parseInt(_0x8ee3b8(0xad))/0x8*(parseInt(_0x8ee3b8(0x94))/0x9)+-parseInt(_0x8ee3b8(0xa9))/0xa+parseInt(_0x8ee3b8(0xa1))/0xb*(parseInt(_0x8ee3b8(0xac))/0xc);if(_0x28b6af===_0x5e4315)break;else _0x2f0e40['push'](_0x2f0e40['shift']());}catch(_0x8afa9e){_0x2f0e40['push'](_0x2f0e40['shift']());}}}(a34_0xdd19,0x3fd54));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a34_0x2ec1(_0x59e488,_0x59498a){_0x59e488=_0x59e488-0x90;const _0xdd195b=a34_0xdd19();let _0x2ec13b=_0xdd195b[_0x59e488];return _0x2ec13b;}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a34_0xdd19(){const _0x18340c=['error','开发服务器启动失败','1356201dejBqk','start','minVersion','now','51568FHwCLo','vite\x20exited\x20with\x20code\x20','PATH','inherit','env','stderr','vite','启动开发服务器','273100cBixlt','144iKubpF','257008AxoMBQ','2004wiEbMq','3632KHbyYL','51195zLgHeQ','1mkubNF','warn','SDK\x20版本低于推荐版本','info','node_modules','write','cwd','1971VRTNzh','trim','success','167450rCILZN','data','6TTECts','close'];a34_0xdd19=function(){return _0x18340c;};return a34_0xdd19();}export function runStart(_0x75f112){return new Promise((_0x274b12,_0x4d5438)=>{const _0x2de47c=a34_0x2ec1,_0x5f8a84=Date[_0x2de47c(0xa0)](),_0x5b26be=_0x75f112||process[_0x2de47c(0x93)](),_0x44bdb3=checkSdkVersion(_0x5b26be);_0x44bdb3['needsUpgrade']&&(printSdkUpgradeWarning(_0x44bdb3),logger[_0x2de47c(0xb0)]('start',_0x2de47c(0xb1),{'currentVersion':_0x44bdb3['version'],'minVersion':_0x44bdb3[_0x2de47c(0x9f)]}));logger[_0x2de47c(0x90)](_0x2de47c(0x9e),_0x2de47c(0xa8),{'command':_0x2de47c(0xa7),'cwd':_0x5b26be});let _0x255dbf='';const _0x32b6e7=spawn('vite',{'stdio':[_0x2de47c(0xa4),'inherit','pipe'],'shell':!![],'cwd':_0x5b26be,'env':{...process['env'],'PATH':''+join(_0x5b26be,_0x2de47c(0x91),'.bin')+delimiter+process[_0x2de47c(0xa5)][_0x2de47c(0xa3)]}});_0x32b6e7[_0x2de47c(0xa6)]?.['on'](_0x2de47c(0x98),_0x309f13=>{const _0x464e61=_0x2de47c,_0x214b2c=_0x309f13['toString']();_0x255dbf+=_0x214b2c,process[_0x464e61(0xa6)][_0x464e61(0x92)](_0x214b2c);}),_0x32b6e7['on'](_0x2de47c(0x9a),_0x552cf3=>{const _0x27e2d6=_0x2de47c,_0x443b5c=Date[_0x27e2d6(0xa0)]()-_0x5f8a84;if(_0x552cf3===0x0||_0x552cf3===null)logger[_0x27e2d6(0x96)]('start','开发服务器启动成功',_0x443b5c),_0x274b12();else{const _0x336c0c={'exitCode':_0x552cf3,'duration':_0x443b5c,'command':'vite','cwd':_0x5b26be};_0x255dbf[_0x27e2d6(0x95)]()&&(_0x336c0c[_0x27e2d6(0xa6)]=_0x255dbf[_0x27e2d6(0x95)]()),logger['error'](_0x27e2d6(0x9e),_0x27e2d6(0x9c),_0x336c0c),_0x4d5438(new Error(_0x27e2d6(0xa2)+_0x552cf3));}}),_0x32b6e7['on'](_0x2de47c(0x9b),_0x4da6d0=>{const _0x5b220d=_0x2de47c,_0xc47fa6=Date[_0x5b220d(0xa0)]()-_0x5f8a84,_0x34184f={'error':_0x4da6d0['message'],'duration':_0xc47fa6,'command':_0x5b220d(0xa7),'cwd':_0x5b26be};_0x255dbf[_0x5b220d(0x95)]()&&(_0x34184f[_0x5b220d(0xa6)]=_0x255dbf[_0x5b220d(0x95)]()),logger[_0x5b220d(0x9b)](_0x5b220d(0x9e),'开发服务器启动出错',_0x34184f),_0x4d5438(_0x4da6d0);});});}
@@ -1 +1 @@
1
- function a35_0x2eeb(){const _0x4278b0=['lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','gray','配置当前项目的\x20App\x20Code','16280eRYRXk','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','6545688cVPaAH','获取配置项','1226365RmEKZK','431006iKErvg','6gQJsvA','无效的命令,可用命令如下:','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','map','command','2FDeYQy','列出所有配置项','1188ZGKsma','column','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','19463810VYuunK','设置环境\x20(online/daily)','589001azxfTI','description','1757836XPCoKk','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','设置配置项'];a35_0x2eeb=function(){return _0x4278b0;};return a35_0x2eeb();}(function(_0x528c60,_0x402794){const _0x586c43=a35_0x5bb3,_0x40b987=_0x528c60();while(!![]){try{const _0x876038=parseInt(_0x586c43(0xb5))/0x1*(parseInt(_0x586c43(0xa1))/0x2)+parseInt(_0x586c43(0xb6))/0x3*(parseInt(_0x586c43(0xaa))/0x4)+-parseInt(_0x586c43(0xb4))/0x5+parseInt(_0x586c43(0xb2))/0x6+parseInt(_0x586c43(0xa8))/0x7+parseInt(_0x586c43(0xb0))/0x8*(parseInt(_0x586c43(0xa3))/0x9)+-parseInt(_0x586c43(0xa6))/0xa;if(_0x876038===_0x402794)break;else _0x40b987['push'](_0x40b987['shift']());}catch(_0x4f8093){_0x40b987['push'](_0x40b987['shift']());}}}(a35_0x2eeb,0x8933d));function a35_0x5bb3(_0xa749d,_0x345a48){_0xa749d=_0xa749d-0x9d;const _0x2eeb26=a35_0x2eeb();let _0x5bb3a8=_0x2eeb26[_0xa749d];return _0x5bb3a8;}import{jsxs as a35_0x1fbc1f,jsx as a35_0x2a114f}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x41f415=a35_0x5bb3,_0x10577b=[{'command':_0x41f415(0xa5),'description':_0x41f415(0xac)},{'command':_0x41f415(0xab),'description':_0x41f415(0xb3)},{'command':_0x41f415(0x9d),'description':_0x41f415(0xa2)}],_0x34644d=[{'command':_0x41f415(0xad),'description':_0x41f415(0xaf)},{'command':_0x41f415(0xb1),'description':_0x41f415(0xa7)}];return a35_0x1fbc1f(Box,{'flexDirection':_0x41f415(0xa4),'marginTop':0x1,'marginBottom':0x1,'children':[a35_0x2a114f(Box,{'marginBottom':0x1,'children':a35_0x1fbc1f(Text,{'color':_0x41f415(0xae),'children':['\x20!','\x20\x20',_0x41f415(0xb7)]})}),_0x10577b['map'](_0x116172=>a35_0x1fbc1f(Box,{'children':[a35_0x1fbc1f(Text,{'children':[_0x41f415(0x9e),_0x116172[_0x41f415(0xa0)]]}),a35_0x2a114f(Text,{'color':_0x41f415(0xae),'children':_0x116172['description']})]},_0x116172[_0x41f415(0xa0)])),a35_0x2a114f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x2a114f(Text,{'color':'gray','children':'\x20*\x20配置示例:'})}),_0x34644d[_0x41f415(0x9f)](_0x2dfe3d=>a35_0x1fbc1f(Box,{'children':[a35_0x1fbc1f(Text,{'children':[_0x41f415(0x9e),_0x2dfe3d[_0x41f415(0xa0)]]}),a35_0x2a114f(Text,{'color':_0x41f415(0xae),'children':_0x2dfe3d[_0x41f415(0xa9)]})]},_0x2dfe3d['command']))]});}
1
+ function a35_0x46b0(){const _0x3edbb3=['列出所有配置项','gray','command','88913ccwFqw','1062FEaYBI','834790SdNiLG','9342180GNkWFi','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','map','配置当前项目的\x20App\x20Code','设置环境\x20(online/daily)','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','7992UdUCtC','2648548PcHaCB','669yeurgc','685964OYHWzy','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','6003NXneTt','description','24vKnIPL'];a35_0x46b0=function(){return _0x3edbb3;};return a35_0x46b0();}(function(_0x3f60eb,_0x423ab9){const _0x14b6c7=a35_0x1e17,_0x4459c9=_0x3f60eb();while(!![]){try{const _0x18701a=parseInt(_0x14b6c7(0x1f6))/0x1+-parseInt(_0x14b6c7(0x1f7))/0x2*(-parseInt(_0x14b6c7(0x1ed))/0x3)+parseInt(_0x14b6c7(0x1ee))/0x4+-parseInt(_0x14b6c7(0x1f8))/0x5*(-parseInt(_0x14b6c7(0x1f2))/0x6)+-parseInt(_0x14b6c7(0x1ec))/0x7+-parseInt(_0x14b6c7(0x1eb))/0x8*(-parseInt(_0x14b6c7(0x1f0))/0x9)+-parseInt(_0x14b6c7(0x1f9))/0xa;if(_0x18701a===_0x423ab9)break;else _0x4459c9['push'](_0x4459c9['shift']());}catch(_0x29aef1){_0x4459c9['push'](_0x4459c9['shift']());}}}(a35_0x46b0,0x61c10));function a35_0x1e17(_0x2a10ce,_0x37e192){_0x2a10ce=_0x2a10ce-0x1e8;const _0x46b013=a35_0x46b0();let _0x1e1762=_0x46b013[_0x2a10ce];return _0x1e1762;}import{jsxs as a35_0x142c6c,jsx as a35_0x101ae4}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x236806=a35_0x1e17,_0x28a2c5=[{'command':_0x236806(0x1fa),'description':'设置配置项'},{'command':_0x236806(0x1ea),'description':'获取配置项'},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x236806(0x1f3)}],_0x257f15=[{'command':_0x236806(0x1ef),'description':_0x236806(0x1e8)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x236806(0x1e9)}];return a35_0x142c6c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a35_0x101ae4(Box,{'marginBottom':0x1,'children':a35_0x142c6c(Text,{'color':'gray','children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x28a2c5[_0x236806(0x1fb)](_0x3a8282=>a35_0x142c6c(Box,{'children':[a35_0x142c6c(Text,{'children':['\x20\x20\x20\x20',_0x3a8282['command']]}),a35_0x101ae4(Text,{'color':'gray','children':_0x3a8282[_0x236806(0x1f1)]})]},_0x3a8282[_0x236806(0x1f5)])),a35_0x101ae4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x101ae4(Text,{'color':_0x236806(0x1f4),'children':'\x20*\x20配置示例:'})}),_0x257f15[_0x236806(0x1fb)](_0x2fc073=>a35_0x142c6c(Box,{'children':[a35_0x142c6c(Text,{'children':['\x20\x20\x20\x20',_0x2fc073['command']]}),a35_0x101ae4(Text,{'color':_0x236806(0x1f4),'children':_0x2fc073[_0x236806(0x1f1)]})]},_0x2fc073[_0x236806(0x1f5)]))]});}
@@ -1 +1 @@
1
- (function(_0x2ceb26,_0x4c2c71){const _0x665222=a36_0x2ea9,_0x4db291=_0x2ceb26();while(!![]){try{const _0x2fa65e=parseInt(_0x665222(0x1e4))/0x1+parseInt(_0x665222(0x1dd))/0x2*(parseInt(_0x665222(0x1d3))/0x3)+-parseInt(_0x665222(0x1c9))/0x4+parseInt(_0x665222(0x1ca))/0x5+parseInt(_0x665222(0x1cb))/0x6*(-parseInt(_0x665222(0x1c8))/0x7)+parseInt(_0x665222(0x1c4))/0x8+-parseInt(_0x665222(0x1e6))/0x9*(parseInt(_0x665222(0x1c5))/0xa);if(_0x2fa65e===_0x4c2c71)break;else _0x4db291['push'](_0x4db291['shift']());}catch(_0x399313){_0x4db291['push'](_0x4db291['shift']());}}}(a36_0x32e0,0x6f7d9));import{jsx as a36_0x2699bd,jsxs as a36_0x46b368}from'react/jsx-runtime';function a36_0x2ea9(_0x9b13ba,_0x19fd25){_0x9b13ba=_0x9b13ba-0x1bd;const _0x32e09a=a36_0x32e0();let _0x2ea99e=_0x32e09a[_0x9b13ba];return _0x2ea99e;}import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x2a1011 from'node:fs';import a36_0x3511fd from'node:path';import{ConfigHelp}from'./config-help.js';function a36_0x32e0(){const _0x3dd35a=['help','list','20847bDRlvC','unlinkSync','保存配置失败:\x20','log','includes','环境配置已设置为:\x20','appcode','未提供配置值','env','flags','104xdeTDh','string','online','message','保存配置失败','utf8','parse','847922jtzYqY','length','9fXiRZi','daily','--help','input','set','red','配置值无效或过长','renameSync','5530760pmUxgt','12701820VgwQkM','.tmp','error','7cSKEVt','1286256HROQvi','1307155paYdrs','681810yLubrd','config','stringify','undefined','get','app'];a36_0x32e0=function(){return _0x3dd35a;};return a36_0x32e0();}import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x2f3552){const _0x2100f0=a36_0x2ea9,{cli:_0x49df2b}=_0x2f3552,_0x1f11ad=_0x49df2b[_0x2100f0(0x1bf)][0x1],_0x3953ae=_0x49df2b['input'][0x2],_0x2406cc=[_0x2100f0(0x1c0),_0x2100f0(0x1cf)][_0x2100f0(0x1d7)](_0x1f11ad||''),_0x403614=_0x49df2b[_0x2100f0(0x1bf)][_0x2100f0(0x1e5)]>=0x3;if(_0x3953ae===_0x2100f0(0x1be)||_0x49df2b[_0x2100f0(0x1dc)][_0x2100f0(0x1d1)])return a36_0x2699bd(ConfigHelp,{});const _0x39392d=readConfig();if(_0x1f11ad==='set'){if(_0x3953ae){const _0x413a58=_0x49df2b[_0x2100f0(0x1bf)][0x3];if(typeof _0x413a58!==_0x2100f0(0x1ce)){if(_0x3953ae===_0x2100f0(0x1db)&&![_0x2100f0(0x1df),_0x2100f0(0x1bd)][_0x2100f0(0x1d7)](_0x413a58))return a36_0x2699bd(Box,{'children':a36_0x2699bd(Text,{'color':_0x2100f0(0x1c1),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x3ddb24=isInProject(),_0x5b4173=_0x3ddb24?projectConfigPath:globalConfigPath;let _0x5670e8={};try{if(existsSync(_0x5b4173)){const _0x2c3d65=readFileSync(_0x5b4173,{'encoding':_0x2100f0(0x1e2)});_0x2c3d65&&(_0x5670e8=JSON[_0x2100f0(0x1e3)](_0x2c3d65));}}catch(_0x4480f2){}if(typeof _0x413a58!==_0x2100f0(0x1de)||_0x413a58[_0x2100f0(0x1e5)]>0x1f4)return a36_0x2699bd(Box,{'children':a36_0x2699bd(Text,{'color':_0x2100f0(0x1c1),'children':_0x2100f0(0x1c2)})});let _0x33c3db=_0x3953ae;_0x3953ae==='app'&&(_0x33c3db=_0x2100f0(0x1d9),delete _0x5670e8[_0x2100f0(0x1d0)]);_0x3953ae===_0x2100f0(0x1d9)&&delete _0x5670e8[_0x2100f0(0x1d0)];_0x5670e8[_0x33c3db]=_0x413a58;try{const _0x3173b0=a36_0x3511fd['dirname'](_0x5b4173);!existsSync(_0x3173b0)&&a36_0x2a1011['mkdirSync'](_0x3173b0,{'recursive':!![]});const _0x3e5ec5=_0x5b4173+'.tmp';writeFileSync(_0x3e5ec5,JSON[_0x2100f0(0x1cd)](_0x5670e8,null,0x2),{'encoding':_0x2100f0(0x1e2),'mode':0x180}),a36_0x2a1011[_0x2100f0(0x1c3)](_0x3e5ec5,_0x5b4173);if(_0x3953ae===_0x2100f0(0x1db)){const _0x2a7e6a=_0x3ddb24?'项目':'全局';console['log']('✓\x20'+_0x2a7e6a+_0x2100f0(0x1d8)+_0x413a58);}}catch(_0x310b18){const _0xeafbc8=_0x5b4173+_0x2100f0(0x1c6);try{existsSync(_0xeafbc8)&&a36_0x2a1011[_0x2100f0(0x1d4)](_0xeafbc8);}catch(_0x2b83d3){}return logger[_0x2100f0(0x1c7)](_0x2100f0(0x1cc),_0x2100f0(0x1e1),{'error':_0x310b18 instanceof Error?_0x310b18['message']:String(_0x310b18),'configKey':_0x3953ae,'configValue':_0x413a58,'targetConfigPath':_0x5b4173}),a36_0x2699bd(Box,{'children':a36_0x46b368(Text,{'color':_0x2100f0(0x1c1),'children':[_0x2100f0(0x1d5),_0x310b18 instanceof Error?_0x310b18[_0x2100f0(0x1e0)]:String(_0x310b18)]})});}return null;}return a36_0x2699bd(Box,{'children':a36_0x2699bd(Text,{'color':_0x2100f0(0x1c1),'children':_0x2100f0(0x1da)})});}}if(_0x1f11ad==='get'){if(_0x3953ae){let _0x519bd1=_0x3953ae;return _0x3953ae===_0x2100f0(0x1d0)&&(_0x519bd1=_0x2100f0(0x1d9)),console[_0x2100f0(0x1d6)](_0x39392d[_0x519bd1]||'undefined'),null;}return null;}if(_0x1f11ad===_0x2100f0(0x1d2))return console[_0x2100f0(0x1d6)](JSON[_0x2100f0(0x1cd)](_0x39392d,null,0x2)),null;if(!_0x2406cc||!_0x403614)return a36_0x2699bd(ConfigHelp,{});return null;}
1
+ function a36_0x2da4(){const _0x58c182=['flags','1148072zCTUMJ','环境配置已设置为:\x20','168644ujMcek','renameSync','未提供配置值','config','includes','dirname','配置值无效或过长','input','get','1HtpuKw','786561wxDwfJ','parse','mkdirSync','stringify','env','保存配置失败','1220344CCHTMB','.tmp','log','11kjBADK','message','set','2973831oKGTkq','--help','319530AmSNjC','help','length','app','18WABezD','utf8','35sKgnNP','保存配置失败:\x20','red','string','error','10649480NEqAHo','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','undefined','appcode'];a36_0x2da4=function(){return _0x58c182;};return a36_0x2da4();}(function(_0x2b0130,_0x4ac25f){const _0x5e367e=a36_0x2bbc,_0x230b26=_0x2b0130();while(!![]){try{const _0x2fb2a3=parseInt(_0x5e367e(0x19b))/0x1*(parseInt(_0x5e367e(0x1bc))/0x2)+-parseInt(_0x5e367e(0x19c))/0x3+-parseInt(_0x5e367e(0x1a2))/0x4+parseInt(_0x5e367e(0x1b0))/0x5*(parseInt(_0x5e367e(0x1aa))/0x6)+-parseInt(_0x5e367e(0x1a8))/0x7+-parseInt(_0x5e367e(0x1ba))/0x8*(parseInt(_0x5e367e(0x1ae))/0x9)+-parseInt(_0x5e367e(0x1b5))/0xa*(-parseInt(_0x5e367e(0x1a5))/0xb);if(_0x2fb2a3===_0x4ac25f)break;else _0x230b26['push'](_0x230b26['shift']());}catch(_0x22341a){_0x230b26['push'](_0x230b26['shift']());}}}(a36_0x2da4,0x3b4f3));import{jsx as a36_0x316f65,jsxs as a36_0x2db172}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x5e5b12 from'node:fs';function a36_0x2bbc(_0x5e3a83,_0x2a989c){_0x5e3a83=_0x5e3a83-0x198;const _0x2da41e=a36_0x2da4();let _0x2bbc8d=_0x2da41e[_0x5e3a83];return _0x2bbc8d;}import a36_0x2ae3cc from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x5941b4){const _0x75bd19=a36_0x2bbc,{cli:_0x21b97c}=_0x5941b4,_0x502b73=_0x21b97c[_0x75bd19(0x199)][0x1],_0x16e92=_0x21b97c[_0x75bd19(0x199)][0x2],_0x3a2b8a=[_0x75bd19(0x1a7),_0x75bd19(0x19a)][_0x75bd19(0x1c0)](_0x502b73||''),_0x46e730=_0x21b97c[_0x75bd19(0x199)][_0x75bd19(0x1ac)]>=0x3;if(_0x16e92===_0x75bd19(0x1a9)||_0x21b97c[_0x75bd19(0x1b9)][_0x75bd19(0x1ab)])return a36_0x316f65(ConfigHelp,{});const _0x15717a=readConfig();if(_0x502b73==='set'){if(_0x16e92){const _0x3b20bd=_0x21b97c[_0x75bd19(0x199)][0x3];if(typeof _0x3b20bd!=='undefined'){if(_0x16e92===_0x75bd19(0x1a0)&&!['online','daily']['includes'](_0x3b20bd))return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':'red','children':_0x75bd19(0x1b6)})});const _0xb8228e=isInProject(),_0x1822a4=_0xb8228e?projectConfigPath:globalConfigPath;let _0x2682dd={};try{if(existsSync(_0x1822a4)){const _0x329094=readFileSync(_0x1822a4,{'encoding':_0x75bd19(0x1af)});_0x329094&&(_0x2682dd=JSON[_0x75bd19(0x19d)](_0x329094));}}catch(_0x4e37ff){}if(typeof _0x3b20bd!==_0x75bd19(0x1b3)||_0x3b20bd[_0x75bd19(0x1ac)]>0x1f4)return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':'red','children':_0x75bd19(0x198)})});let _0x37fd8a=_0x16e92;_0x16e92===_0x75bd19(0x1ad)&&(_0x37fd8a=_0x75bd19(0x1b8),delete _0x2682dd['app']);_0x16e92===_0x75bd19(0x1b8)&&delete _0x2682dd['app'];_0x2682dd[_0x37fd8a]=_0x3b20bd;try{const _0x211423=a36_0x2ae3cc[_0x75bd19(0x1c1)](_0x1822a4);!existsSync(_0x211423)&&a36_0x5e5b12[_0x75bd19(0x19e)](_0x211423,{'recursive':!![]});const _0x50c327=_0x1822a4+'.tmp';writeFileSync(_0x50c327,JSON[_0x75bd19(0x19f)](_0x2682dd,null,0x2),{'encoding':_0x75bd19(0x1af),'mode':0x180}),a36_0x5e5b12[_0x75bd19(0x1bd)](_0x50c327,_0x1822a4);if(_0x16e92===_0x75bd19(0x1a0)){const _0x1c8744=_0xb8228e?'项目':'全局';console[_0x75bd19(0x1a4)]('✓\x20'+_0x1c8744+_0x75bd19(0x1bb)+_0x3b20bd);}}catch(_0xabb565){const _0x11b6ac=_0x1822a4+_0x75bd19(0x1a3);try{existsSync(_0x11b6ac)&&a36_0x5e5b12['unlinkSync'](_0x11b6ac);}catch(_0x379016){}return logger[_0x75bd19(0x1b4)](_0x75bd19(0x1bf),_0x75bd19(0x1a1),{'error':_0xabb565 instanceof Error?_0xabb565['message']:String(_0xabb565),'configKey':_0x16e92,'configValue':_0x3b20bd,'targetConfigPath':_0x1822a4}),a36_0x316f65(Box,{'children':a36_0x2db172(Text,{'color':_0x75bd19(0x1b2),'children':[_0x75bd19(0x1b1),_0xabb565 instanceof Error?_0xabb565[_0x75bd19(0x1a6)]:String(_0xabb565)]})});}return null;}return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':_0x75bd19(0x1b2),'children':_0x75bd19(0x1be)})});}}if(_0x502b73===_0x75bd19(0x19a)){if(_0x16e92){let _0x2f4f60=_0x16e92;return _0x16e92==='app'&&(_0x2f4f60=_0x75bd19(0x1b8)),console[_0x75bd19(0x1a4)](_0x15717a[_0x2f4f60]||_0x75bd19(0x1b7)),null;}return null;}if(_0x502b73==='list')return console[_0x75bd19(0x1a4)](JSON[_0x75bd19(0x19f)](_0x15717a,null,0x2)),null;if(!_0x3a2b8a||!_0x46e730)return a36_0x316f65(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a37_0x552ac9=a37_0x5587;function a37_0x4928(){const _0x3a9038=['5990ONErtb','3176BzNeaE','online','6054608OQwRmY','1516558HAhKah','https://daily-api.lovrabet.com','14gwjjqL','3552206KboqqW','9470694NkixON','2305806DvIwIq','https://user.lovrabet.com','https://user-daily.lovrabet.com','10945smcjmw','93897VvCzuS'];a37_0x4928=function(){return _0x3a9038;};return a37_0x4928();}(function(_0x28c5f3,_0x27005e){const _0x3c2b87=a37_0x5587,_0x58ee98=_0x28c5f3();while(!![]){try{const _0x23a86e=-parseInt(_0x3c2b87(0x1a3))/0x1+parseInt(_0x3c2b87(0x1a6))/0x2+-parseInt(_0x3c2b87(0x19a))/0x3+parseInt(_0x3c2b87(0x1a0))/0x4*(-parseInt(_0x3c2b87(0x19d))/0x5)+-parseInt(_0x3c2b87(0x199))/0x6+parseInt(_0x3c2b87(0x1a5))/0x7*(-parseInt(_0x3c2b87(0x1a2))/0x8)+-parseInt(_0x3c2b87(0x19e))/0x9*(-parseInt(_0x3c2b87(0x19f))/0xa);if(_0x23a86e===_0x27005e)break;else _0x58ee98['push'](_0x58ee98['shift']());}catch(_0x367ec5){_0x58ee98['push'](_0x58ee98['shift']());}}}(a37_0x4928,0xde33f));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a37_0x552ac9(0x1a1)?a37_0x552ac9(0x19b):a37_0x552ac9(0x19c);function a37_0x5587(_0x1d0b87,_0x206a8f){_0x1d0b87=_0x1d0b87-0x199;const _0x49285e=a37_0x4928();let _0x5587b6=_0x49285e[_0x1d0b87];return _0x5587b6;}export const getApiDomain=()=>getEnv()===a37_0x552ac9(0x1a1)?'https://api.lovrabet.com':a37_0x552ac9(0x1a4);
1
+ const a37_0x2143b1=a37_0x251c;(function(_0x5b8cfc,_0x2e7313){const _0x1c5158=a37_0x251c,_0x3b84d9=_0x5b8cfc();while(!![]){try{const _0x11156a=-parseInt(_0x1c5158(0x1ba))/0x1*(-parseInt(_0x1c5158(0x1bb))/0x2)+parseInt(_0x1c5158(0x1bd))/0x3+-parseInt(_0x1c5158(0x1b4))/0x4*(-parseInt(_0x1c5158(0x1af))/0x5)+-parseInt(_0x1c5158(0x1b7))/0x6*(-parseInt(_0x1c5158(0x1b6))/0x7)+parseInt(_0x1c5158(0x1b1))/0x8*(-parseInt(_0x1c5158(0x1b8))/0x9)+parseInt(_0x1c5158(0x1b3))/0xa*(parseInt(_0x1c5158(0x1b2))/0xb)+-parseInt(_0x1c5158(0x1b0))/0xc;if(_0x11156a===_0x2e7313)break;else _0x3b84d9['push'](_0x3b84d9['shift']());}catch(_0x2d4de9){_0x3b84d9['push'](_0x3b84d9['shift']());}}}(a37_0x90a9,0xc1b60));import{getEnv}from'./env.js';function a37_0x90a9(){const _0x39cafc=['22634280xXnIwW','664528zodLnO','232067DQomdv','40wbzWsT','16zAmtPV','https://user-daily.lovrabet.com','4586232OWXqRP','12kZUtMF','117cqyOfP','online','1KShMrs','869690BmZPaT','https://api.lovrabet.com','2307345ZaHTtp','https://daily-api.lovrabet.com','1450985dtcmUm'];a37_0x90a9=function(){return _0x39cafc;};return a37_0x90a9();}function a37_0x251c(_0x3c6d74,_0x91b217){_0x3c6d74=_0x3c6d74-0x1ae;const _0x90a9d1=a37_0x90a9();let _0x251c51=_0x90a9d1[_0x3c6d74];return _0x251c51;}export const getUserDomain=()=>getEnv()===a37_0x2143b1(0x1b9)?'https://user.lovrabet.com':a37_0x2143b1(0x1b5);export const getApiDomain=()=>getEnv()===a37_0x2143b1(0x1b9)?a37_0x2143b1(0x1bc):a37_0x2143b1(0x1ae);
@@ -1 +1 @@
1
- function a38_0x4035(){const _0x34a044=['108213IrmiJx','2977218ViQlZl','3010448kwgbmX','3589655JNUeQO','7htrkim','online','1071QJxJfh','25830ftclZk','2243872SxkpKo','28cnIHBq','824229MPYUot','LOVRABET_ENV'];a38_0x4035=function(){return _0x34a044;};return a38_0x4035();}const a38_0x3a4bfb=a38_0x45ca;(function(_0x59b839,_0xdfe839){const _0x28ecd8=a38_0x45ca,_0x2e62ee=_0x59b839();while(!![]){try{const _0x157db6=parseInt(_0x28ecd8(0x122))/0x1+-parseInt(_0x28ecd8(0x121))/0x2*(parseInt(_0x28ecd8(0x124))/0x3)+parseInt(_0x28ecd8(0x126))/0x4+-parseInt(_0x28ecd8(0x127))/0x5+-parseInt(_0x28ecd8(0x125))/0x6*(parseInt(_0x28ecd8(0x128))/0x7)+parseInt(_0x28ecd8(0x120))/0x8+-parseInt(_0x28ecd8(0x11e))/0x9*(-parseInt(_0x28ecd8(0x11f))/0xa);if(_0x157db6===_0xdfe839)break;else _0x2e62ee['push'](_0x2e62ee['shift']());}catch(_0xa79d56){_0x2e62ee['push'](_0x2e62ee['shift']());}}}(a38_0x4035,0x6cc86));let env=process['env'][a38_0x3a4bfb(0x123)]||a38_0x3a4bfb(0x11d);export function getEnv(){return env;}function a38_0x45ca(_0x28838e,_0x2125be){_0x28838e=_0x28838e-0x11d;const _0x40357a=a38_0x4035();let _0x45ca9c=_0x40357a[_0x28838e];return _0x45ca9c;}export function initEnv(_0x2b5a66){env=_0x2b5a66;}
1
+ const a38_0x8e7226=a38_0x5e51;function a38_0x5e51(_0x536953,_0x17e1b9){_0x536953=_0x536953-0x171;const _0x3d9887=a38_0x3d98();let _0x5e51b4=_0x3d9887[_0x536953];return _0x5e51b4;}(function(_0x471dff,_0x8f2d42){const _0x239b43=a38_0x5e51,_0x48c8c5=_0x471dff();while(!![]){try{const _0x14ab30=-parseInt(_0x239b43(0x177))/0x1*(-parseInt(_0x239b43(0x178))/0x2)+parseInt(_0x239b43(0x174))/0x3+parseInt(_0x239b43(0x173))/0x4+parseInt(_0x239b43(0x17c))/0x5*(parseInt(_0x239b43(0x179))/0x6)+parseInt(_0x239b43(0x17a))/0x7+parseInt(_0x239b43(0x176))/0x8*(parseInt(_0x239b43(0x175))/0x9)+-parseInt(_0x239b43(0x17d))/0xa;if(_0x14ab30===_0x8f2d42)break;else _0x48c8c5['push'](_0x48c8c5['shift']());}catch(_0x210d4d){_0x48c8c5['push'](_0x48c8c5['shift']());}}}(a38_0x3d98,0xacc87));let env=process[a38_0x8e7226(0x172)][a38_0x8e7226(0x171)]||a38_0x8e7226(0x17b);export function getEnv(){return env;}function a38_0x3d98(){const _0x314210=['36157520lVbnwo','LOVRABET_ENV','env','3267696mICwFp','3913065CqUDaG','1368rEiKYR','28576raEtoT','87uQWarr','3618IrvrOQ','767202fnYAHA','1562365GLRTon','online','50lPzLih'];a38_0x3d98=function(){return _0x314210;};return a38_0x3d98();}export function initEnv(_0x1a878f){env=_0x1a878f;}
@@ -1 +1 @@
1
- (function(_0x2d3874,_0x122eba){const _0x501f38=a39_0x4dae,_0x4af7c9=_0x2d3874();while(!![]){try{const _0x90937b=parseInt(_0x501f38(0x150))/0x1*(parseInt(_0x501f38(0x155))/0x2)+parseInt(_0x501f38(0x15e))/0x3*(-parseInt(_0x501f38(0x143))/0x4)+-parseInt(_0x501f38(0x11f))/0x5*(parseInt(_0x501f38(0x124))/0x6)+-parseInt(_0x501f38(0x12a))/0x7+-parseInt(_0x501f38(0x146))/0x8*(parseInt(_0x501f38(0x139))/0x9)+-parseInt(_0x501f38(0x12c))/0xa*(parseInt(_0x501f38(0x120))/0xb)+parseInt(_0x501f38(0x147))/0xc;if(_0x90937b===_0x122eba)break;else _0x4af7c9['push'](_0x4af7c9['shift']());}catch(_0x21eae7){_0x4af7c9['push'](_0x4af7c9['shift']());}}}(a39_0x4860,0xde391));import{jsx as a39_0x4fe754,jsxs as a39_0xf4aba8,Fragment as a39_0x49a188}from'react/jsx-runtime';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 a39_0x4dae(_0x20c37b,_0x33578a){_0x20c37b=_0x20c37b-0x11f;const _0x486014=a39_0x4860();let _0x4dae74=_0x486014[_0x20c37b];return _0x4dae74;}import{readConfig}from'../utils/config.js';function a39_0x4860(){const _0x1b2a75=['includes','*\x20创建新项目','登录状态','red','13947bpRNvw','项目名','online','api-pull','673415dlnOOa','13734721kOxTIP','test','√\x20检测到有效登录状态','rightArrow','12BlrgyD','登录失败','length','\x20\x20使用\x20←→\x20选择,回车确认','\x20←\x20','*\x20应用AppCode\x20','428680NYDBzy','应用AppCode','10ruGEHb','delete','project-name','Yes','return','column','my-app','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','step','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','leftArrow','[可选]:\x20','项目名不合法','657hSTKZn','yellow','项目名长度不能超过\x2050\x20个字符','green','slice','*\x20正在登录,请前往浏览器完成登录...','label','\x20直接回车确认,或输入自定义名称','应用AppCode不合法','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','544GmSQNL','confirm-api-pull','login-prompt','118408jvAeyJ','42707436mRhKeg','env','trim','app-code','backspace','creating','应用AppCode长度不能超过\x20100\x20个字符','login','login-check','16927SryFRi','*\x20是否要先登录以便拉取\x20API\x20配置?','\x20登录中...','*\x20是否要自动拉取\x20API\x20配置?','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','76JpEBAA','已登录','map','login-process','gray'];a39_0x4860=function(){return _0x1b2a75;};return a39_0x4860();}export function EnhancedGuidedCreate(_0x4ab04e){const _0x29d1d5=a39_0x4dae,{onCreate:_0x23d34c,env:_0x8e8c3b}=_0x4ab04e,[_0x2ba40d,_0x15c465]=useState(_0x29d1d5(0x12e)),[_0x19f942,_0x2a88ee]=useState(''),[_0x48a104,_0x5ac2ad]=useState(''),[_0x311ced,_0x3ba32f]=useState(''),[_0x3b9abb,_0x4c3332]=useState(''),[_0x44c15d,_0xa23ada]=useState([]),[_0x17dc5a,_0x52d7b2]=useState(null),[_0x146350,_0x285aec]=useState(![]),[_0xf1104c,_0x4b5e23]=useState(![]),[_0x52c89c,_0x2334f7]=useState(![]),[_0x3ec752,_0x3b8dfc]=useState(0x0),[_0x547edc,_0x4fb3f0]=useState(0x0),_0x2dca57=_0x29d1d5(0x132),_0x185142=readConfig(),_0x29827a=typeof _0x185142[_0x29d1d5(0x148)]==='string'?_0x185142[_0x29d1d5(0x148)]:undefined;function _0x4d82a0(_0x55f3c3){const _0x4b80d5=_0x29d1d5;if(_0x55f3c3['length']>0x32)return{'valid':![],'message':_0x4b80d5(0x13b)};const _0x4e426e=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x55f3c3?.['trim']()&&!_0x4e426e[_0x4b80d5(0x121)](_0x55f3c3))return{'valid':![],'message':_0x4b80d5(0x154)};return{'valid':!![]};}function _0x4926a0(_0x59a63b){const _0x1be289=_0x29d1d5;if(!_0x59a63b['trim']())return{'valid':!![]};if(_0x59a63b[_0x1be289(0x126)]>0x64)return{'valid':![],'message':_0x1be289(0x14d)};const _0x12be27=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x12be27[_0x1be289(0x121)](_0x59a63b))return{'valid':![],'message':_0x1be289(0x142)};return{'valid':!![]};}async function _0x47b64c(){_0x285aec(!![]);try{const _0x47c9a6=await getIsSessionValid();return _0x52d7b2(_0x47c9a6),_0x47c9a6;}catch(_0x5e347e){return _0x52d7b2(![]),![];}finally{_0x285aec(![]);}}async function _0x118393(){_0x4b5e23(!![]);try{const _0x36306c=await authServer({'silent':!![]});return _0x52d7b2(_0x36306c),_0x36306c;}catch(_0x38bcea){return _0x52d7b2(![]),![];}finally{_0x4b5e23(![]);}}return useInput(async(_0x257d4f,_0x454811)=>{const _0x4e33b6=_0x29d1d5;if(_0x454811[_0x4e33b6(0x136)]||_0x454811[_0x4e33b6(0x123)]){if(_0x2ba40d===_0x4e33b6(0x144)){_0x3b8dfc(_0x4ba5a1=>_0x4ba5a1===0x0?0x1:0x0);return;}if(_0x2ba40d==='login-prompt'){_0x4fb3f0(_0x1b9558=>_0x1b9558===0x0?0x1:0x0);return;}}if(_0x454811[_0x4e33b6(0x130)]){if(_0x2ba40d==='project-name'){const _0x9a5d3b=_0x311ced[_0x4e33b6(0x149)]()||_0x2dca57;if(_0x3b9abb)return;_0x2a88ee(_0x9a5d3b),_0xa23ada([{'step':_0x4e33b6(0x12e),'label':_0x4e33b6(0x15f),'value':_0x9a5d3b}]),_0x3ba32f(''),_0x4c3332(''),_0x15c465(_0x4e33b6(0x14a));return;}if(_0x2ba40d===_0x4e33b6(0x14a)){if(_0x3b9abb)return;const _0x52902a=_0x311ced[_0x4e33b6(0x149)]();_0x5ac2ad(_0x52902a),_0xa23ada(_0x2b0471=>[..._0x2b0471,{'step':_0x4e33b6(0x14a),'label':_0x4e33b6(0x12b),'value':_0x52902a||'未设置'}]),_0x3ba32f(''),_0x4c3332('');if(_0x52902a){_0x15c465('login-check');const _0x38a645=await _0x47b64c();_0x38a645?_0x15c465(_0x4e33b6(0x144)):_0x15c465('login-prompt');}else{const _0x3a3a93=_0x8e8c3b||_0x29827a||_0x4e33b6(0x160);_0x23d34c({'projectName':_0x19f942,'appCode':undefined,'pullApi':![],'env':_0x3a3a93}),_0x15c465(_0x4e33b6(0x14c));}return;}if(_0x2ba40d==='confirm-api-pull'){const _0x5baebe=_0x3ec752===0x0;_0x2334f7(_0x5baebe),_0xa23ada(_0x44d25b=>[..._0x44d25b,{'step':_0x4e33b6(0x161),'label':'拉取API配置','value':_0x5baebe?'是':'否'}]);const _0x258b35=_0x8e8c3b||_0x29827a||_0x4e33b6(0x160);_0x23d34c({'projectName':_0x19f942,'appCode':_0x48a104,'pullApi':_0x5baebe,'env':_0x258b35}),_0x15c465(_0x4e33b6(0x14c));return;}if(_0x2ba40d===_0x4e33b6(0x145)){const _0x599c5e=_0x547edc===0x0;if(_0x599c5e){_0x15c465(_0x4e33b6(0x158));const _0x2c2f48=await _0x118393();if(_0x2c2f48)_0xa23ada(_0x51b5f4=>[..._0x51b5f4,{'step':_0x4e33b6(0x14e),'label':_0x4e33b6(0x15c),'value':_0x4e33b6(0x156)}]),_0x15c465(_0x4e33b6(0x144));else{_0xa23ada(_0xcd9551=>[..._0xcd9551,{'step':_0x4e33b6(0x14e),'label':'登录状态','value':_0x4e33b6(0x125)}]);const _0x4bc790=_0x8e8c3b||_0x29827a||_0x4e33b6(0x160);_0x23d34c({'projectName':_0x19f942,'appCode':_0x48a104,'pullApi':![],'env':_0x4bc790}),_0x15c465('creating');}}else{_0xa23ada(_0x47512d=>[..._0x47512d,{'step':_0x4e33b6(0x14e),'label':_0x4e33b6(0x15c),'value':'跳过登录'}]);const _0x546ac6=_0x8e8c3b||_0x29827a||_0x4e33b6(0x160);_0x23d34c({'projectName':_0x19f942,'appCode':_0x48a104,'pullApi':![],'env':_0x546ac6}),_0x15c465(_0x4e33b6(0x14c));}return;}}if(_0x454811[_0x4e33b6(0x14b)]||_0x454811[_0x4e33b6(0x12d)]){_0x3ba32f(_0x13c52e=>{const _0x2c9fba=_0x4e33b6,_0x2a3565=_0x13c52e[_0x2c9fba(0x13d)](0x0,-0x1);if(_0x2ba40d==='project-name'){const {valid:_0x48142c,message:_0x24b487}=_0x4d82a0(_0x2a3565);_0x4c3332(_0x48142c?'':_0x24b487||_0x2c9fba(0x138));}else{if(_0x2ba40d===_0x2c9fba(0x14a)){const {valid:_0x220a54,message:_0x2262f7}=_0x4926a0(_0x2a3565);_0x4c3332(_0x220a54?'':_0x2262f7||_0x2c9fba(0x141));}}return _0x2a3565;});return;}if([_0x4e33b6(0x14c),'login-check','login-process'][_0x4e33b6(0x15a)](_0x2ba40d))return;if(_0x2ba40d==='confirm-api-pull'||_0x2ba40d===_0x4e33b6(0x145))return;_0x3ba32f(_0x2bee49=>{const _0x4c8432=_0x4e33b6,_0x2c134d=_0x2bee49+_0x257d4f;if(_0x2ba40d===_0x4c8432(0x12e)){const {valid:_0x5d1535,message:_0x1ba21d}=_0x4d82a0(_0x2c134d);_0x4c3332(_0x5d1535?'':_0x1ba21d||'项目名不合法');}else{if(_0x2ba40d==='app-code'){const {valid:_0x4ee2ea,message:_0x51a7b3}=_0x4926a0(_0x2c134d);_0x4c3332(_0x4ee2ea?'':_0x51a7b3||_0x4c8432(0x141));}}return _0x2c134d;});}),a39_0xf4aba8(Box,{'flexDirection':_0x29d1d5(0x131),'marginTop':0x1,'children':[_0x44c15d[_0x29d1d5(0x126)]===0x0&&a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':'cyan','children':_0x29d1d5(0x15b)})}),_0x44c15d[_0x29d1d5(0x157)](_0x9ed6a4=>a39_0xf4aba8(Box,{'children':[a39_0xf4aba8(Text,{'color':_0x29d1d5(0x13c),'children':['√\x20',_0x9ed6a4[_0x29d1d5(0x13f)],':\x20']}),a39_0x4fe754(Text,{'color':'cyan','children':_0x9ed6a4['value']})]},_0x9ed6a4[_0x29d1d5(0x134)])),_0x2ba40d===_0x29d1d5(0x12e)&&a39_0xf4aba8(a39_0x49a188,{'children':[a39_0xf4aba8(Box,{'children':[a39_0x4fe754(Text,{'children':'*\x20项目名:\x20'}),_0x311ced?a39_0x4fe754(Text,{'color':_0x29d1d5(0x13c),'children':_0x311ced}):a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x2dca57}),_0x3b9abb&&a39_0xf4aba8(Text,{'color':_0x29d1d5(0x15d),'children':[_0x29d1d5(0x128),_0x3b9abb]})]}),!_0x3b9abb&&!_0x311ced&&a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x29d1d5(0x140)})})]}),_0x2ba40d===_0x29d1d5(0x14a)&&a39_0xf4aba8(a39_0x49a188,{'children':[a39_0xf4aba8(Box,{'children':[a39_0x4fe754(Text,{'children':_0x29d1d5(0x129)}),a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x29d1d5(0x137)}),a39_0x4fe754(Text,{'color':_0x29d1d5(0x13c),'children':_0x311ced}),_0x3b9abb&&a39_0xf4aba8(Text,{'color':'red','children':[_0x29d1d5(0x128),_0x3b9abb]})]}),!_0x3b9abb&&a39_0x4fe754(Box,{'children':a39_0xf4aba8(Text,{'color':'gray','children':['\x20',_0x29d1d5(0x133)]})})]}),_0x2ba40d===_0x29d1d5(0x14f)&&a39_0xf4aba8(Box,{'children':[a39_0x4fe754(Text,{'children':'*\x20正在检查登录状态...'}),_0x146350&&a39_0x4fe754(Text,{'color':'gray','children':'\x20检查中...'})]}),_0x2ba40d===_0x29d1d5(0x144)&&a39_0xf4aba8(a39_0x49a188,{'children':[a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x13c),'children':_0x29d1d5(0x122)})}),a39_0x4fe754(Box,{'marginTop':0x1,'children':a39_0x4fe754(Text,{'children':_0x29d1d5(0x153)})}),a39_0xf4aba8(Box,{'marginLeft':0x2,'children':[a39_0xf4aba8(Text,{'color':_0x3ec752===0x0?'green':'gray','children':[_0x3ec752===0x0?'▶\x20':'\x20\x20',_0x29d1d5(0x12f)]}),a39_0x4fe754(Text,{'children':'\x20'}),a39_0xf4aba8(Text,{'color':_0x3ec752===0x1?_0x29d1d5(0x13c):_0x29d1d5(0x159),'children':[_0x3ec752===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x29d1d5(0x127)})}),a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x13a),'children':_0x29d1d5(0x135)})})]}),_0x2ba40d===_0x29d1d5(0x145)&&a39_0xf4aba8(a39_0x49a188,{'children':[a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x13a),'children':'!\x20未检测到有效登录'})}),a39_0x4fe754(Box,{'marginTop':0x1,'children':a39_0x4fe754(Text,{'children':_0x29d1d5(0x151)})}),a39_0xf4aba8(Box,{'marginLeft':0x2,'children':[a39_0xf4aba8(Text,{'color':_0x547edc===0x0?_0x29d1d5(0x13c):_0x29d1d5(0x159),'children':[_0x547edc===0x0?'▶\x20':'\x20\x20',_0x29d1d5(0x12f)]}),a39_0x4fe754(Text,{'children':'\x20'}),a39_0xf4aba8(Text,{'color':_0x547edc===0x1?'green':_0x29d1d5(0x159),'children':[_0x547edc===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x29d1d5(0x127)})}),a39_0x4fe754(Box,{'children':a39_0x4fe754(Text,{'color':_0x29d1d5(0x13a),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x2ba40d===_0x29d1d5(0x158)&&a39_0xf4aba8(Box,{'children':[a39_0x4fe754(Text,{'children':_0x29d1d5(0x13e)}),_0xf1104c&&a39_0x4fe754(Text,{'color':_0x29d1d5(0x159),'children':_0x29d1d5(0x152)})]})]});}
1
+ (function(_0x5dcc5d,_0x5c298f){const _0x68ebaf=a39_0x478e,_0x2e5510=_0x5dcc5d();while(!![]){try{const _0x16dcdd=parseInt(_0x68ebaf(0x13f))/0x1*(-parseInt(_0x68ebaf(0x14c))/0x2)+parseInt(_0x68ebaf(0x133))/0x3+parseInt(_0x68ebaf(0x13e))/0x4*(parseInt(_0x68ebaf(0x121))/0x5)+-parseInt(_0x68ebaf(0x153))/0x6*(-parseInt(_0x68ebaf(0x11e))/0x7)+parseInt(_0x68ebaf(0x13b))/0x8*(parseInt(_0x68ebaf(0x116))/0x9)+parseInt(_0x68ebaf(0x110))/0xa+parseInt(_0x68ebaf(0x13d))/0xb*(-parseInt(_0x68ebaf(0x125))/0xc);if(_0x16dcdd===_0x5c298f)break;else _0x2e5510['push'](_0x2e5510['shift']());}catch(_0x350b48){_0x2e5510['push'](_0x2e5510['shift']());}}}(a39_0x3034,0x9d735));import{jsx as a39_0x8d199c,jsxs as a39_0x262220,Fragment as a39_0x3f13e4}from'react/jsx-runtime';function a39_0x3034(){const _0x13b281=['已登录','step','trim','backspace','login-prompt','8ksclmV','api-pull','31596697vMgvFS','192vnkjvL','11190xUAVGL','value','Yes','my-app','未设置','red','yellow','string','login-process','app-code','拉取API配置','*\x20创建新项目','\x20直接回车确认,或输入自定义名称','6cxNolt','includes','[可选]:\x20','green','rightArrow','应用AppCode不合法','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','1486314UWAmPH','return','3057230sGWOBQ','项目名不合法','slice','login','登录状态','creating','5025411kSKqeW','test','*\x20是否要先登录以便拉取\x20API\x20配置?','leftArrow','*\x20项目名:\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','gray','项目名','21FchuTR','\x20\x20使用\x20←→\x20选择,回车确认','!\x20未检测到有效登录','89795VjwNlf','*\x20是否要自动拉取\x20API\x20配置?','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','online','12kyORdQ','√\x20检测到有效登录状态','\x20检查中...','*\x20应用AppCode\x20','confirm-api-pull','应用AppCode','length','login-check','cyan','登录失败','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','column','项目名长度不能超过\x2050\x20个字符','跳过登录','3244869qTWOOA','project-name','\x20←\x20'];a39_0x3034=function(){return _0x13b281;};return a39_0x3034();}import{useState}from'react';function a39_0x478e(_0x8b2000,_0x3dd1e0){_0x8b2000=_0x8b2000-0x10f;const _0x303470=a39_0x3034();let _0x478e60=_0x303470[_0x8b2000];return _0x478e60;}import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x1d2cef){const _0x4f179c=a39_0x478e,{onCreate:_0x38c351,env:_0x1e385e}=_0x1d2cef,[_0x598fd4,_0x21d771]=useState(_0x4f179c(0x134)),[_0x3ee4d3,_0x4bb567]=useState(''),[_0x5ee608,_0x15d85f]=useState(''),[_0x33afec,_0x2497a9]=useState(''),[_0x2bcf76,_0x4db00c]=useState(''),[_0x28a682,_0x53eb54]=useState([]),[_0x4b7b97,_0x44ef03]=useState(null),[_0x26ceab,_0x40d93d]=useState(![]),[_0x496c0a,_0x51c3e3]=useState(![]),[_0x2b5b2a,_0x3c9c94]=useState(![]),[_0x3e7963,_0x3d398b]=useState(0x0),[_0x5a05d2,_0x3c9689]=useState(0x0),_0x17fe9f=_0x4f179c(0x142),_0x1f4b96=readConfig(),_0x4a79c8=typeof _0x1f4b96['env']===_0x4f179c(0x146)?_0x1f4b96['env']:undefined;function _0x2cc452(_0x28d951){const _0x3a1119=_0x4f179c;if(_0x28d951[_0x3a1119(0x12b)]>0x32)return{'valid':![],'message':_0x3a1119(0x131)};const _0xa09755=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x28d951?.['trim']()&&!_0xa09755[_0x3a1119(0x117)](_0x28d951))return{'valid':![],'message':_0x3a1119(0x12f)};return{'valid':!![]};}function _0xaa7faf(_0x6e379e){const _0x1171d2=_0x4f179c;if(!_0x6e379e[_0x1171d2(0x138)]())return{'valid':!![]};if(_0x6e379e[_0x1171d2(0x12b)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x166cfc=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x166cfc[_0x1171d2(0x117)](_0x6e379e))return{'valid':![],'message':_0x1171d2(0x123)};return{'valid':!![]};}async function _0x31bd12(){_0x40d93d(!![]);try{const _0x548ebd=await getIsSessionValid();return _0x44ef03(_0x548ebd),_0x548ebd;}catch(_0x53ba0b){return _0x44ef03(![]),![];}finally{_0x40d93d(![]);}}async function _0x4710c1(){_0x51c3e3(!![]);try{const _0x2248d2=await authServer({'silent':!![]});return _0x44ef03(_0x2248d2),_0x2248d2;}catch(_0x5b52be){return _0x44ef03(![]),![];}finally{_0x51c3e3(![]);}}return useInput(async(_0x2b3a6a,_0x9ac038)=>{const _0x37e41c=_0x4f179c;if(_0x9ac038[_0x37e41c(0x119)]||_0x9ac038[_0x37e41c(0x150)]){if(_0x598fd4==='confirm-api-pull'){_0x3d398b(_0x56baad=>_0x56baad===0x0?0x1:0x0);return;}if(_0x598fd4==='login-prompt'){_0x3c9689(_0x1b1d50=>_0x1b1d50===0x0?0x1:0x0);return;}}if(_0x9ac038[_0x37e41c(0x10f)]){if(_0x598fd4===_0x37e41c(0x134)){const _0x4c6e64=_0x33afec[_0x37e41c(0x138)]()||_0x17fe9f;if(_0x2bcf76)return;_0x4bb567(_0x4c6e64),_0x53eb54([{'step':_0x37e41c(0x134),'label':_0x37e41c(0x11d),'value':_0x4c6e64}]),_0x2497a9(''),_0x4db00c(''),_0x21d771('app-code');return;}if(_0x598fd4===_0x37e41c(0x148)){if(_0x2bcf76)return;const _0x2e34e0=_0x33afec[_0x37e41c(0x138)]();_0x15d85f(_0x2e34e0),_0x53eb54(_0x29452a=>[..._0x29452a,{'step':_0x37e41c(0x148),'label':_0x37e41c(0x12a),'value':_0x2e34e0||_0x37e41c(0x143)}]),_0x2497a9(''),_0x4db00c('');if(_0x2e34e0){_0x21d771(_0x37e41c(0x12c));const _0x48ebd8=await _0x31bd12();_0x48ebd8?_0x21d771(_0x37e41c(0x129)):_0x21d771(_0x37e41c(0x13a));}else{const _0x3ac3ff=_0x1e385e||_0x4a79c8||'online';_0x38c351({'projectName':_0x3ee4d3,'appCode':undefined,'pullApi':![],'env':_0x3ac3ff}),_0x21d771(_0x37e41c(0x115));}return;}if(_0x598fd4==='confirm-api-pull'){const _0x29b881=_0x3e7963===0x0;_0x3c9c94(_0x29b881),_0x53eb54(_0x5580ab=>[..._0x5580ab,{'step':_0x37e41c(0x13c),'label':_0x37e41c(0x149),'value':_0x29b881?'是':'否'}]);const _0x20ae31=_0x1e385e||_0x4a79c8||_0x37e41c(0x124);_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':_0x29b881,'env':_0x20ae31}),_0x21d771('creating');return;}if(_0x598fd4===_0x37e41c(0x13a)){const _0x3dabf7=_0x5a05d2===0x0;if(_0x3dabf7){_0x21d771('login-process');const _0x3c03c1=await _0x4710c1();if(_0x3c03c1)_0x53eb54(_0x305df8=>[..._0x305df8,{'step':_0x37e41c(0x113),'label':_0x37e41c(0x114),'value':_0x37e41c(0x136)}]),_0x21d771(_0x37e41c(0x129));else{_0x53eb54(_0x2588a6=>[..._0x2588a6,{'step':'login','label':_0x37e41c(0x114),'value':_0x37e41c(0x12e)}]);const _0x377a79=_0x1e385e||_0x4a79c8||'online';_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':![],'env':_0x377a79}),_0x21d771(_0x37e41c(0x115));}}else{_0x53eb54(_0x478970=>[..._0x478970,{'step':_0x37e41c(0x113),'label':_0x37e41c(0x114),'value':_0x37e41c(0x132)}]);const _0x3bf170=_0x1e385e||_0x4a79c8||_0x37e41c(0x124);_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':![],'env':_0x3bf170}),_0x21d771(_0x37e41c(0x115));}return;}}if(_0x9ac038[_0x37e41c(0x139)]||_0x9ac038['delete']){_0x2497a9(_0x16dfaa=>{const _0x3eb413=_0x37e41c,_0x25e072=_0x16dfaa[_0x3eb413(0x112)](0x0,-0x1);if(_0x598fd4===_0x3eb413(0x134)){const {valid:_0x810d01,message:_0x4d0dca}=_0x2cc452(_0x25e072);_0x4db00c(_0x810d01?'':_0x4d0dca||_0x3eb413(0x111));}else{if(_0x598fd4===_0x3eb413(0x148)){const {valid:_0x53a6a2,message:_0x5e4b06}=_0xaa7faf(_0x25e072);_0x4db00c(_0x53a6a2?'':_0x5e4b06||_0x3eb413(0x151));}}return _0x25e072;});return;}if([_0x37e41c(0x115),_0x37e41c(0x12c),_0x37e41c(0x147)][_0x37e41c(0x14d)](_0x598fd4))return;if(_0x598fd4===_0x37e41c(0x129)||_0x598fd4===_0x37e41c(0x13a))return;_0x2497a9(_0x2920da=>{const _0x542e41=_0x37e41c,_0x255b76=_0x2920da+_0x2b3a6a;if(_0x598fd4===_0x542e41(0x134)){const {valid:_0x4b7eb4,message:_0x5dbc96}=_0x2cc452(_0x255b76);_0x4db00c(_0x4b7eb4?'':_0x5dbc96||_0x542e41(0x111));}else{if(_0x598fd4===_0x542e41(0x148)){const {valid:_0x3e3323,message:_0x427c0a}=_0xaa7faf(_0x255b76);_0x4db00c(_0x3e3323?'':_0x427c0a||_0x542e41(0x151));}}return _0x255b76;});}),a39_0x262220(Box,{'flexDirection':_0x4f179c(0x130),'marginTop':0x1,'children':[_0x28a682[_0x4f179c(0x12b)]===0x0&&a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'cyan','children':_0x4f179c(0x14a)})}),_0x28a682['map'](_0x17bf26=>a39_0x262220(Box,{'children':[a39_0x262220(Text,{'color':_0x4f179c(0x14f),'children':['√\x20',_0x17bf26['label'],':\x20']}),a39_0x8d199c(Text,{'color':_0x4f179c(0x12d),'children':_0x17bf26[_0x4f179c(0x140)]})]},_0x17bf26[_0x4f179c(0x137)])),_0x598fd4==='project-name'&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':_0x4f179c(0x11a)}),_0x33afec?a39_0x8d199c(Text,{'color':_0x4f179c(0x14f),'children':_0x33afec}):a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x17fe9f}),_0x2bcf76&&a39_0x262220(Text,{'color':'red','children':[_0x4f179c(0x135),_0x2bcf76]})]}),!_0x2bcf76&&!_0x33afec&&a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x14b)})})]}),_0x598fd4===_0x4f179c(0x148)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':_0x4f179c(0x128)}),a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x14e)}),a39_0x8d199c(Text,{'color':'green','children':_0x33afec}),_0x2bcf76&&a39_0x262220(Text,{'color':_0x4f179c(0x144),'children':['\x20←\x20',_0x2bcf76]})]}),!_0x2bcf76&&a39_0x8d199c(Box,{'children':a39_0x262220(Text,{'color':'gray','children':['\x20',_0x4f179c(0x11b)]})})]}),_0x598fd4===_0x4f179c(0x12c)&&a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':'*\x20正在检查登录状态...'}),_0x26ceab&&a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x127)})]}),_0x598fd4===_0x4f179c(0x129)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'green','children':_0x4f179c(0x126)})}),a39_0x8d199c(Box,{'marginTop':0x1,'children':a39_0x8d199c(Text,{'children':_0x4f179c(0x122)})}),a39_0x262220(Box,{'marginLeft':0x2,'children':[a39_0x262220(Text,{'color':_0x3e7963===0x0?'green':_0x4f179c(0x11c),'children':[_0x3e7963===0x0?'▶\x20':'\x20\x20','Yes']}),a39_0x8d199c(Text,{'children':'\x20'}),a39_0x262220(Text,{'color':_0x3e7963===0x1?_0x4f179c(0x14f):_0x4f179c(0x11c),'children':[_0x3e7963===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x11f)})}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'yellow','children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x598fd4===_0x4f179c(0x13a)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x145),'children':_0x4f179c(0x120)})}),a39_0x8d199c(Box,{'marginTop':0x1,'children':a39_0x8d199c(Text,{'children':_0x4f179c(0x118)})}),a39_0x262220(Box,{'marginLeft':0x2,'children':[a39_0x262220(Text,{'color':_0x5a05d2===0x0?_0x4f179c(0x14f):_0x4f179c(0x11c),'children':[_0x5a05d2===0x0?'▶\x20':'\x20\x20',_0x4f179c(0x141)]}),a39_0x8d199c(Text,{'children':'\x20'}),a39_0x262220(Text,{'color':_0x5a05d2===0x1?_0x4f179c(0x14f):'gray','children':[_0x5a05d2===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x145),'children':_0x4f179c(0x152)})})]}),_0x598fd4===_0x4f179c(0x147)&&a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x496c0a&&a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':'\x20登录中...'})]})]});}
@@ -1 +1 @@
1
- function a40_0x42b8(_0x4abedf,_0x18c952){_0x4abedf=_0x4abedf-0x6f;const _0x2058a0=a40_0x2058();let _0x42b8aa=_0x2058a0[_0x4abedf];return _0x42b8aa;}(function(_0x246894,_0xb5c869){const _0x5e37a9=a40_0x42b8,_0x21ba99=_0x246894();while(!![]){try{const _0x534a7d=parseInt(_0x5e37a9(0x77))/0x1+parseInt(_0x5e37a9(0x74))/0x2+-parseInt(_0x5e37a9(0x6f))/0x3+-parseInt(_0x5e37a9(0x78))/0x4*(parseInt(_0x5e37a9(0x7a))/0x5)+parseInt(_0x5e37a9(0x71))/0x6*(-parseInt(_0x5e37a9(0x79))/0x7)+-parseInt(_0x5e37a9(0x76))/0x8+-parseInt(_0x5e37a9(0x70))/0x9*(parseInt(_0x5e37a9(0x72))/0xa);if(_0x534a7d===_0xb5c869)break;else _0x21ba99['push'](_0x21ba99['shift']());}catch(_0x585790){_0x21ba99['push'](_0x21ba99['shift']());}}}(a40_0x2058,0x3c140));export function formatElapsed(_0x1faf6f){const _0x596636=a40_0x42b8,_0x151c0c=Date[_0x596636(0x75)]()-_0x1faf6f;if(_0x151c0c<0x3e8)return _0x151c0c+'ms';const _0x3f6199=(_0x151c0c/0x3e8)['toFixed'](0x2),_0x3ab85d=_0x3f6199[_0x596636(0x73)](/\.?0+$/u,'');return _0x3ab85d+'s';}function a40_0x2058(){const _0xa15b4e=['1980536naXrUP','441994vSupce','76vyaXUQ','966679BQLGra','10555RwbYNY','7263BClmUg','1224PqZdPH','6CPCKDH','7630uEMWJX','replace','672096KMlCVI','now'];a40_0x2058=function(){return _0xa15b4e;};return a40_0x2058();}
1
+ function a40_0x22bb(_0xde4772,_0x59c094){_0xde4772=_0xde4772-0x165;const _0x1e2748=a40_0x1e27();let _0x22bbbf=_0x1e2748[_0xde4772];return _0x22bbbf;}(function(_0x323cc0,_0x45c282){const _0x232965=a40_0x22bb,_0x483d9a=_0x323cc0();while(!![]){try{const _0x1e841a=-parseInt(_0x232965(0x169))/0x1+-parseInt(_0x232965(0x167))/0x2*(-parseInt(_0x232965(0x166))/0x3)+parseInt(_0x232965(0x165))/0x4*(parseInt(_0x232965(0x172))/0x5)+parseInt(_0x232965(0x168))/0x6+-parseInt(_0x232965(0x16c))/0x7*(parseInt(_0x232965(0x170))/0x8)+parseInt(_0x232965(0x16b))/0x9*(parseInt(_0x232965(0x16e))/0xa)+parseInt(_0x232965(0x16f))/0xb*(-parseInt(_0x232965(0x16a))/0xc);if(_0x1e841a===_0x45c282)break;else _0x483d9a['push'](_0x483d9a['shift']());}catch(_0x19f515){_0x483d9a['push'](_0x483d9a['shift']());}}}(a40_0x1e27,0xb9978));export function formatElapsed(_0x4de5ab){const _0x4e0857=a40_0x22bb,_0x3ee6e9=Date[_0x4e0857(0x16d)]()-_0x4de5ab;if(_0x3ee6e9<0x3e8)return _0x3ee6e9+'ms';const _0xa5811f=(_0x3ee6e9/0x3e8)[_0x4e0857(0x171)](0x2),_0x5af70d=_0xa5811f['replace'](/\.?0+$/u,'');return _0x5af70d+'s';}function a40_0x1e27(){const _0x29e54f=['8uJqAgI','3WCWffM','2866158hceNdC','2443710Ehuopc','501996EaFOVb','432HUJcvL','1076022aGuQwh','14812jejGzZ','now','60pLLXZu','580107HUMylE','1256gkWXAW','toFixed','2338030gPLnBH'];a40_0x1e27=function(){return _0x29e54f;};return a40_0x1e27();}
@@ -1 +1 @@
1
- (function(_0x50b2c,_0x26fd62){const _0x505500=a41_0x30df,_0x54bd3d=_0x50b2c();while(!![]){try{const _0x36cda5=parseInt(_0x505500(0x1db))/0x1*(parseInt(_0x505500(0x237))/0x2)+-parseInt(_0x505500(0x1da))/0x3*(parseInt(_0x505500(0x1ea))/0x4)+parseInt(_0x505500(0x234))/0x5+-parseInt(_0x505500(0x1f6))/0x6+parseInt(_0x505500(0x1ec))/0x7*(parseInt(_0x505500(0x201))/0x8)+parseInt(_0x505500(0x212))/0x9+parseInt(_0x505500(0x218))/0xa*(-parseInt(_0x505500(0x205))/0xb);if(_0x36cda5===_0x26fd62)break;else _0x54bd3d['push'](_0x54bd3d['shift']());}catch(_0x3cf951){_0x54bd3d['push'](_0x54bd3d['shift']());}}}(a41_0x42f6,0x390f8));function a41_0x42f6(){const _0xb994d4=['lovrabet\x20api\x20pull','*\x20正在拉取\x20API\x20配置...','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','配置应用AppCode:\x20','192486zTdbbu','1gMnWcn','package.json','项目名称:\x20','cyan','cd\x20','gray','version','lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','parse','清理项目目录失败:\x20','column','\x20|\x20应用AppCode:\x20','拉取API配置:\x20','.lovrabetrc','√\x20package.json\x20已更新:\x20name=','4SjoFjb','log','731241uZXCLq','create','utf8','\x20√\x20','项目创建完成:\x20','green','existsSync','配置AppCode:\x20','appCode','projectCode','1328304dhPbRg','trim','length','配置应用AppCode失败:\x20','🎉\x20项目创建成功!','name','error','accessSync','dirname','\x20Generated\x20by\x20lovrabet\x20cli\x20','更新\x20package.json\x20失败:\x20','8HlyQsl','setLogPath','×\x20项目目录\x20','writeFileSync','11QIxOhE','repeat','1.\x20','更新\x20package.json\x20name\x20和\x20description\x20字段','doTask','√\x20配置文件已创建,应用AppCode:\x20','env','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','cwd','string','×\x20项目名过长,最多支持\x20100\x20个字符','🚀\x20接下来可以:','×\x20项目创建失败:\x20','3635874BZMqXr','pullApi','projectName','×\x20项目名不能为空','../..','1.0.0','4942210NzBCEk','\x20创建配置文件','info','stringify','white','API\x20配置拉取成功:\x20',',\x20description=','2.\x20','online','description','📁\x20项目名称:\x20','success','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','*\x20配置文件路径:\x20','yellow','resolve','join','test','lovrabet\x20config\x20set\x20appcode\x20[app-code]','W_OK','*\x20正在为项目\x20','message','\x20配置应用AppCode:\x20','warn','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','readFileSync','\x20已存在,请使用其他项目名','×\x20无法在当前目录创建项目,请检查目录权限','726160TvUCiM','需手动拉取','未配置','719612EsXVYy','√\x20API\x20配置拉取完成'];a41_0x42f6=function(){return _0xb994d4;};return a41_0x42f6();}import{jsx as a41_0xc02386,Fragment as a41_0xa965e9,jsxs as a41_0x4312da}from'react/jsx-runtime';import a41_0x79bd0d from'node:path';import a41_0x5b1801 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';function a41_0x30df(_0x8b7031,_0x11a87c){_0x8b7031=_0x8b7031-0x1d7;const _0x42f691=a41_0x42f6();let _0x30dff8=_0x42f691[_0x8b7031];return _0x30dff8;}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(_0x27237b){const _0x3a93a5=a41_0x30df,[_0x53104a,_0x40600f]=useState(![]),[_0x205f8f,_0xac69b7]=useState(![]),[_0x2d3ecb,_0x5954f9]=useState(null),_0x2da05b=useCopyProjectTemplate(),_0x5a80d9=useInstallDependencies(),_0x36fe14=useFormatCode(),_0x5800bf=async _0x278c78=>{const _0x31baef=a41_0x30df;if(!_0x278c78[_0x31baef(0x214)]||_0x278c78[_0x31baef(0x214)][_0x31baef(0x1f7)]()===''){console['error'](_0x31baef(0x215));return;}const _0x37aa44=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x37aa44[_0x31baef(0x229)](_0x278c78[_0x31baef(0x214)])){console[_0x31baef(0x1fc)](_0x31baef(0x1d7));return;}if(_0x278c78[_0x31baef(0x214)][_0x31baef(0x1f8)]>0x64){console[_0x31baef(0x1fc)](_0x31baef(0x20f));return;}const _0x50c3af=a41_0x79bd0d[_0x31baef(0x227)](process[_0x31baef(0x20d)](),_0x278c78[_0x31baef(0x214)]);if(a41_0x5b1801[_0x31baef(0x1f2)](_0x50c3af)){console['error'](_0x31baef(0x203)+_0x278c78[_0x31baef(0x214)]+_0x31baef(0x232));return;}try{const _0x49ae01=a41_0x79bd0d[_0x31baef(0x1fe)](_0x50c3af);a41_0x5b1801[_0x31baef(0x1fd)](_0x49ae01,a41_0x5b1801['constants'][_0x31baef(0x22b)]);}catch(_0x33145c){console[_0x31baef(0x1fc)](_0x31baef(0x233));return;}_0x5954f9(_0x278c78),_0x40600f(!![]),logger[_0x31baef(0x202)](_0x50c3af),logger[_0x31baef(0x21a)](_0x31baef(0x1ed),'开始创建项目:\x20'+_0x278c78[_0x31baef(0x214)],{'projectDir':_0x50c3af,'appCode':_0x278c78[_0x31baef(0x1f4)]});try{await _0x2da05b[_0x31baef(0x209)](_0x278c78[_0x31baef(0x214)]),await _0x326a13(_0x278c78[_0x31baef(0x214)]),await _0x5a80d9[_0x31baef(0x209)](_0x278c78['projectName']),await _0x36fe14[_0x31baef(0x209)](_0x278c78[_0x31baef(0x214)]),await _0x4f0210(_0x278c78['projectName'],_0x278c78['appCode']||'',_0x278c78[_0x31baef(0x20b)]);if(_0x278c78[_0x31baef(0x213)]&&_0x278c78[_0x31baef(0x1f4)]){console[_0x31baef(0x1eb)](_0x31baef(0x23a));try{const _0x374a33=await pullApiSilent(_0x278c78['appCode'],undefined,_0x50c3af,_0x278c78['env']);_0x374a33?(console['log'](_0x31baef(0x238)),logger[_0x31baef(0x21a)](_0x31baef(0x1ed),_0x31baef(0x21d)+_0x278c78[_0x31baef(0x1f4)],{'projectDir':_0x50c3af,'appCode':_0x278c78[_0x31baef(0x1f4)],'env':_0x278c78['env']})):(console[_0x31baef(0x1eb)](_0x31baef(0x224)),logger[_0x31baef(0x22f)](_0x31baef(0x1ed),'API\x20配置拉取失败:\x20'+_0x278c78[_0x31baef(0x1f4)],{'projectDir':_0x50c3af,'appCode':_0x278c78['appCode'],'env':_0x278c78[_0x31baef(0x20b)]}));}catch(_0x266ba4){console[_0x31baef(0x1eb)](_0x31baef(0x20c)),logger[_0x31baef(0x22f)](_0x31baef(0x1ed),'API\x20配置拉取异常:\x20'+_0x278c78[_0x31baef(0x1f4)],{'projectDir':_0x50c3af,'appCode':_0x278c78['appCode'],'env':_0x278c78[_0x31baef(0x20b)],'error':_0x266ba4 instanceof Error?_0x266ba4[_0x31baef(0x22d)]:String(_0x266ba4)});}}logger[_0x31baef(0x223)](_0x31baef(0x1ed),_0x31baef(0x1f0)+_0x278c78[_0x31baef(0x214)]),_0xac69b7(!![]),_0x40600f(![]);}catch(_0x24c000){logger['error'](_0x31baef(0x1ed),'项目创建失败:\x20'+_0x278c78['projectName'],{'error':_0x24c000 instanceof Error?_0x24c000[_0x31baef(0x22d)]:String(_0x24c000)});try{a41_0x5b1801[_0x31baef(0x1f2)](_0x50c3af)&&(console[_0x31baef(0x1eb)]('*\x20清理失败的项目目录:\x20'+_0x50c3af),a41_0x5b1801['rmSync'](_0x50c3af,{'recursive':!![],'force':!![]}));}catch(_0x17d538){logger[_0x31baef(0x22f)](_0x31baef(0x1ed),_0x31baef(0x1e4)+_0x50c3af,{'error':_0x17d538 instanceof Error?_0x17d538[_0x31baef(0x22d)]:String(_0x17d538)});}_0x40600f(![]),console['error'](_0x31baef(0x211)+(_0x24c000 instanceof Error?_0x24c000[_0x31baef(0x22d)]:String(_0x24c000)));}},_0x425219=async _0x580a5e=>{const _0x3c0310=a41_0x30df;await _0x5800bf({'projectName':_0x580a5e,'env':_0x27237b[_0x3c0310(0x20b)]});},_0x326a13=async _0x321b50=>{const _0x4e7c6b=a41_0x30df,_0x15e462=a41_0x79bd0d[_0x4e7c6b(0x227)](process[_0x4e7c6b(0x20d)](),_0x321b50),_0x580e4d=a41_0x79bd0d[_0x4e7c6b(0x228)](_0x15e462,_0x4e7c6b(0x1dc));try{console[_0x4e7c6b(0x1eb)](_0x4e7c6b(0x230));const _0x26904d=fileURLToPath(import.meta.url),_0xa65e0f=a41_0x79bd0d['resolve'](a41_0x79bd0d['dirname'](_0x26904d),'../..'),_0x29afdd=a41_0x79bd0d[_0x4e7c6b(0x228)](_0xa65e0f,_0x4e7c6b(0x1dc));let _0x1aebe8='1.0.0';try{const _0x24363f=JSON[_0x4e7c6b(0x1e3)](a41_0x5b1801[_0x4e7c6b(0x231)](_0x29afdd,'utf8'));_0x1aebe8=_0x24363f[_0x4e7c6b(0x1e1)]||_0x4e7c6b(0x217);}catch(_0x2a3502){}const _0x5e1cb9=a41_0x5b1801[_0x4e7c6b(0x231)](_0x580e4d,_0x4e7c6b(0x1ee)),_0x475168=JSON[_0x4e7c6b(0x1e3)](_0x5e1cb9);_0x475168[_0x4e7c6b(0x1fb)]=_0x321b50,_0x475168[_0x4e7c6b(0x221)]=_0x321b50+_0x4e7c6b(0x1ff)+_0x1aebe8,a41_0x5b1801[_0x4e7c6b(0x204)](_0x580e4d,JSON[_0x4e7c6b(0x21b)](_0x475168,null,0x2)+'\x0a',_0x4e7c6b(0x1ee)),console[_0x4e7c6b(0x1eb)](_0x4e7c6b(0x1e9)+_0x321b50+_0x4e7c6b(0x21e)+_0x475168[_0x4e7c6b(0x221)]),logger[_0x4e7c6b(0x21a)]('create',_0x4e7c6b(0x208),{'projectName':_0x321b50,'description':_0x475168[_0x4e7c6b(0x221)],'cliVersion':_0x1aebe8,'packageJsonPath':'package.json'});}catch(_0x595a22){logger[_0x4e7c6b(0x1fc)](_0x4e7c6b(0x1ed),_0x4e7c6b(0x200)+_0x321b50,{'projectName':_0x321b50,'error':_0x595a22 instanceof Error?_0x595a22['message']:String(_0x595a22)});throw _0x595a22;}},_0x4f0210=async(_0x34b3da,_0x3500b1,_0x2d0195)=>{const _0x6a3d72=a41_0x30df,_0x5597ad=a41_0x79bd0d[_0x6a3d72(0x227)](process[_0x6a3d72(0x20d)](),_0x34b3da),_0x15f9dd=a41_0x79bd0d[_0x6a3d72(0x228)](_0x5597ad,_0x6a3d72(0x1e8));try{_0x3500b1?console[_0x6a3d72(0x1eb)](_0x6a3d72(0x22c)+_0x34b3da+_0x6a3d72(0x22e)+_0x3500b1):console[_0x6a3d72(0x1eb)](_0x6a3d72(0x22c)+_0x34b3da+_0x6a3d72(0x219));console['log'](_0x6a3d72(0x225)+_0x15f9dd);const _0x1e166a=fileURLToPath(import.meta.url),_0x7d990a=a41_0x79bd0d[_0x6a3d72(0x227)](a41_0x79bd0d[_0x6a3d72(0x1fe)](_0x1e166a),_0x6a3d72(0x216)),_0x5a1468=a41_0x79bd0d[_0x6a3d72(0x228)](_0x7d990a,_0x6a3d72(0x1dc));let _0x4af519=_0x6a3d72(0x217);try{const _0x3e560f=JSON[_0x6a3d72(0x1e3)](a41_0x5b1801[_0x6a3d72(0x231)](_0x5a1468,_0x6a3d72(0x1ee)));_0x4af519=_0x3e560f[_0x6a3d72(0x1e1)]||_0x6a3d72(0x217);}catch(_0x1e8ef6){}const _0x467118=readConfig(),_0xfc18a3=typeof _0x467118[_0x6a3d72(0x20b)]===_0x6a3d72(0x20e)?_0x467118[_0x6a3d72(0x20b)]:undefined,{app:_0x257402,appcode:_0x5dd49a,..._0x47bde9}=_0x467118,_0x4f1df9={..._0x47bde9,'appcode':_0x3500b1||'','env':_0x2d0195||_0xfc18a3||_0x6a3d72(0x220),'createdAt':new Date()['toLocaleString'](),'version':_0x4af519};a41_0x5b1801['writeFileSync'](_0x15f9dd,JSON[_0x6a3d72(0x21b)](_0x4f1df9,null,0x2),_0x6a3d72(0x1ee)),_0x3500b1?console[_0x6a3d72(0x1eb)](_0x6a3d72(0x20a)+_0x3500b1):console[_0x6a3d72(0x1eb)](_0x6a3d72(0x1d8)),logger[_0x6a3d72(0x21a)](_0x6a3d72(0x1ed),_0x6a3d72(0x1d9)+_0x3500b1,{'projectName':_0x34b3da,'configFile':_0x6a3d72(0x1e8)});}catch(_0x4442e2){logger[_0x6a3d72(0x1fc)](_0x6a3d72(0x1ed),_0x6a3d72(0x1f9)+_0x3500b1,{'projectName':_0x34b3da,'error':_0x4442e2 instanceof Error?_0x4442e2['message']:String(_0x4442e2)});}};useEffect(()=>{const _0x3b1447=a41_0x30df;_0x27237b['projectCode']&&_0x425219(_0x27237b[_0x3b1447(0x1f5)]);},[_0x27237b[_0x3a93a5(0x1f5)]]);if(!_0x53104a&&!_0x205f8f&&!_0x27237b[_0x3a93a5(0x1f5)])return a41_0xc02386(EnhancedGuidedCreate,{'onCreate':_0x5800bf,'env':_0x27237b[_0x3a93a5(0x20b)]});if(_0x53104a)return a41_0x4312da(a41_0xa965e9,{'children':[a41_0x4312da(Box,{'marginTop':0x1,'children':[a41_0xc02386(Box,{'width':'1'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':_0x3a93a5(0x1ef)}),a41_0xc02386(Text,{'children':'项目名称:\x20'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':_0x2d3ecb?.['projectName']}),_0x2d3ecb?.[_0x3a93a5(0x1f4)]&&a41_0x4312da(a41_0xa965e9,{'children':[a41_0xc02386(Text,{'children':_0x3a93a5(0x1e6)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'children':_0x2d3ecb[_0x3a93a5(0x1f4)]})]})]}),a41_0xc02386(TaskRunning,{..._0x2da05b}),a41_0xc02386(TaskRunning,{..._0x5a80d9}),a41_0xc02386(TaskRunning,{..._0x36fe14})]});if(_0x205f8f)return a41_0x4312da(a41_0xa965e9,{'children':[a41_0x4312da(Box,{'marginTop':0x1,'children':[a41_0xc02386(Box,{'width':'1'}),a41_0xc02386(Text,{'color':'green','children':'\x20√\x20'}),a41_0xc02386(Text,{'children':_0x3a93a5(0x1dd)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':_0x2d3ecb?.[_0x3a93a5(0x214)]}),_0x2d3ecb?.[_0x3a93a5(0x1f4)]&&a41_0x4312da(a41_0xa965e9,{'children':[a41_0xc02386(Text,{'children':_0x3a93a5(0x1e6)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'children':_0x2d3ecb[_0x3a93a5(0x1f4)]})]})]}),a41_0xc02386(TaskFinished,{..._0x2da05b}),a41_0xc02386(TaskFinished,{..._0x5a80d9}),a41_0xc02386(TaskFinished,{..._0x36fe14}),a41_0xc02386(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':'─'[_0x3a93a5(0x206)](0x3c)})}),a41_0xc02386(Box,{'children':a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'bold':!![],'children':_0x3a93a5(0x1fa)})}),a41_0x4312da(Box,{'marginTop':0x1,'flexDirection':'column','children':[a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'children':_0x3a93a5(0x222)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x21c),'bold':!![],'children':_0x2d3ecb?.[_0x3a93a5(0x214)]})]}),_0x2d3ecb?.['appCode']&&a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'children':'🔗\x20应用AppCode:\x20'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x21c),'bold':!![],'children':_0x2d3ecb[_0x3a93a5(0x1f4)]})]}),a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'children':'📦\x20API配置:\x20'}),_0x2d3ecb?.['pullApi']?a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'bold':!![],'children':'已自动拉取\x20✓'}):_0x2d3ecb?.[_0x3a93a5(0x1f4)]?a41_0xc02386(Text,{'color':_0x3a93a5(0x226),'bold':!![],'children':_0x3a93a5(0x235)}):a41_0xc02386(Text,{'color':_0x3a93a5(0x1e0),'bold':!![],'children':_0x3a93a5(0x236)})]})]}),a41_0xc02386(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'bold':!![],'children':_0x3a93a5(0x210)})}),a41_0x4312da(Box,{'marginLeft':0x2,'flexDirection':_0x3a93a5(0x1e5),'children':[a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':_0x3a93a5(0x207)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x21c),'children':'启动项目:\x20'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'bold':!![],'children':_0x3a93a5(0x1df)+_0x2d3ecb?.[_0x3a93a5(0x214)]+'\x20&&\x20lovrabet\x20start'})]}),_0x2d3ecb?.[_0x3a93a5(0x1f4)]&&!_0x2d3ecb?.['pullApi']&&a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x226),'children':'2.\x20'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x21c),'children':_0x3a93a5(0x1e7)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'bold':!![],'children':_0x3a93a5(0x239)})]}),!_0x2d3ecb?.[_0x3a93a5(0x1f4)]&&a41_0x4312da(a41_0xa965e9,{'children':[a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1e0),'children':_0x3a93a5(0x21f)}),a41_0xc02386(Text,{'color':'white','children':_0x3a93a5(0x1f3)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'bold':!![],'children':_0x3a93a5(0x22a)})]}),a41_0x4312da(Box,{'children':[a41_0xc02386(Text,{'color':_0x3a93a5(0x1e0),'children':'3.\x20'}),a41_0xc02386(Text,{'color':_0x3a93a5(0x21c),'children':_0x3a93a5(0x1e7)}),a41_0xc02386(Text,{'color':_0x3a93a5(0x1de),'bold':!![],'children':_0x3a93a5(0x1e2)})]})]})]}),a41_0xc02386(Box,{'marginTop':0x1,'children':a41_0xc02386(Text,{'color':_0x3a93a5(0x1f1),'children':'─'[_0x3a93a5(0x206)](0x3c)})})]});return null;}
1
+ (function(_0x11e880,_0x1bb300){const _0x24b23e=a41_0x3873,_0x3a4243=_0x11e880();while(!![]){try{const _0x330d54=-parseInt(_0x24b23e(0x15a))/0x1+-parseInt(_0x24b23e(0x121))/0x2+-parseInt(_0x24b23e(0x146))/0x3*(-parseInt(_0x24b23e(0x135))/0x4)+-parseInt(_0x24b23e(0x147))/0x5+parseInt(_0x24b23e(0x16e))/0x6+parseInt(_0x24b23e(0x144))/0x7*(parseInt(_0x24b23e(0x177))/0x8)+parseInt(_0x24b23e(0x162))/0x9;if(_0x330d54===_0x1bb300)break;else _0x3a4243['push'](_0x3a4243['shift']());}catch(_0x50039a){_0x3a4243['push'](_0x3a4243['shift']());}}}(a41_0x1dfd,0x638ef));import{jsx as a41_0x30a03e,Fragment as a41_0x57e905,jsxs as a41_0x200a49}from'react/jsx-runtime';import a41_0xf60639 from'node:path';import a41_0x256ed9 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';function a41_0x1dfd(){const _0x8c70f1=['lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','🚀\x20接下来可以:','length','appCode','projectCode','已自动拉取\x20✓','cyan','×\x20项目名不能为空','\x20已存在,请使用其他项目名','white','574805xSQocM','doTask','972810ZFMnMZ','3178275kaLWFI','lovrabet\x20config\x20set\x20appcode\x20[app-code]','success','√\x20配置文件已创建,应用AppCode:\x20','readFileSync','parse','online','utf8','toLocaleString','\x20Generated\x20by\x20lovrabet\x20cli\x20','dirname','existsSync','1.\x20','version','拉取API配置:\x20','env','pullApi','resolve','1.0.0','810762PWnahO','2.\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','√\x20package.json\x20已更新:\x20name=','×\x20项目创建失败:\x20','配置应用AppCode:\x20','warn','cd\x20','10968147xWIbKt','\x20创建配置文件','.lovrabetrc','\x20配置应用AppCode:\x20','*\x20清理失败的项目目录:\x20','name','清理项目目录失败:\x20','setLogPath','📁\x20项目名称:\x20','yellow','项目名称:\x20','../..','811146bxSzFJ','trim','message','log','info','writeFileSync','未配置','string','cwd','8YdyOUR','更新\x20package.json\x20失败:\x20','join','green','error','\x20|\x20应用AppCode:\x20','stringify','constants','lovrabet\x20api\x20pull','460642kuOwuB','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','开始创建项目:\x20','description','配置应用AppCode失败:\x20','API\x20配置拉取失败:\x20','\x20√\x20','🎉\x20项目创建成功!','gray','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','启动项目:\x20','*\x20正在为项目\x20','create','×\x20项目名过长,最多支持\x20100\x20个字符','projectName','\x20&&\x20lovrabet\x20start','×\x20无法在当前目录创建项目,请检查目录权限','package.json','column','🔗\x20应用AppCode:\x20','8kqxpIr','×\x20项目目录\x20','API\x20配置拉取异常:\x20','accessSync','*\x20正在拉取\x20API\x20配置...'];a41_0x1dfd=function(){return _0x8c70f1;};return a41_0x1dfd();}function a41_0x3873(_0x4101b7,_0x350c23){_0x4101b7=_0x4101b7-0x11f;const _0x1dfd5c=a41_0x1dfd();let _0x3873df=_0x1dfd5c[_0x4101b7];return _0x3873df;}import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.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(_0x38addd){const _0x262bb9=a41_0x3873,[_0x310cea,_0x1d287a]=useState(![]),[_0x4aafe0,_0x5ea151]=useState(![]),[_0x367564,_0x21e607]=useState(null),_0x5d838e=useCopyProjectTemplate(),_0x35691b=useInstallDependencies(),_0x446100=useFormatCode(),_0x18603c=async _0x24f2f7=>{const _0x59b865=a41_0x3873;if(!_0x24f2f7['projectName']||_0x24f2f7[_0x59b865(0x12f)][_0x59b865(0x16f)]()===''){console['error'](_0x59b865(0x141));return;}const _0x4d282c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4d282c['test'](_0x24f2f7[_0x59b865(0x12f)])){console[_0x59b865(0x17b)](_0x59b865(0x122));return;}if(_0x24f2f7['projectName'][_0x59b865(0x13c)]>0x64){console[_0x59b865(0x17b)](_0x59b865(0x12e));return;}const _0x55006b=a41_0xf60639[_0x59b865(0x158)](process[_0x59b865(0x176)](),_0x24f2f7[_0x59b865(0x12f)]);if(a41_0x256ed9['existsSync'](_0x55006b)){console[_0x59b865(0x17b)](_0x59b865(0x136)+_0x24f2f7['projectName']+_0x59b865(0x142));return;}try{const _0x2dad25=a41_0xf60639[_0x59b865(0x151)](_0x55006b);a41_0x256ed9[_0x59b865(0x138)](_0x2dad25,a41_0x256ed9[_0x59b865(0x11f)]['W_OK']);}catch(_0xde19cf){console[_0x59b865(0x17b)](_0x59b865(0x131));return;}_0x21e607(_0x24f2f7),_0x1d287a(!![]),logger[_0x59b865(0x169)](_0x55006b),logger[_0x59b865(0x172)](_0x59b865(0x12d),_0x59b865(0x123)+_0x24f2f7['projectName'],{'projectDir':_0x55006b,'appCode':_0x24f2f7['appCode']});try{await _0x5d838e[_0x59b865(0x145)](_0x24f2f7['projectName']),await _0x4faa38(_0x24f2f7[_0x59b865(0x12f)]),await _0x35691b['doTask'](_0x24f2f7['projectName']),await _0x446100['doTask'](_0x24f2f7[_0x59b865(0x12f)]),await _0x4fc4cb(_0x24f2f7[_0x59b865(0x12f)],_0x24f2f7['appCode']||'',_0x24f2f7[_0x59b865(0x156)]);if(_0x24f2f7[_0x59b865(0x157)]&&_0x24f2f7[_0x59b865(0x13d)]){console['log'](_0x59b865(0x139));try{const _0x510168=await pullApiSilent(_0x24f2f7[_0x59b865(0x13d)],undefined,_0x55006b,_0x24f2f7[_0x59b865(0x156)]);_0x510168?(console[_0x59b865(0x171)]('√\x20API\x20配置拉取完成'),logger[_0x59b865(0x172)](_0x59b865(0x12d),'API\x20配置拉取成功:\x20'+_0x24f2f7['appCode'],{'projectDir':_0x55006b,'appCode':_0x24f2f7[_0x59b865(0x13d)],'env':_0x24f2f7[_0x59b865(0x156)]})):(console[_0x59b865(0x171)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger['warn'](_0x59b865(0x12d),_0x59b865(0x126)+_0x24f2f7[_0x59b865(0x13d)],{'projectDir':_0x55006b,'appCode':_0x24f2f7['appCode'],'env':_0x24f2f7[_0x59b865(0x156)]}));}catch(_0x219925){console[_0x59b865(0x171)](_0x59b865(0x15c)),logger[_0x59b865(0x160)](_0x59b865(0x12d),_0x59b865(0x137)+_0x24f2f7[_0x59b865(0x13d)],{'projectDir':_0x55006b,'appCode':_0x24f2f7[_0x59b865(0x13d)],'env':_0x24f2f7[_0x59b865(0x156)],'error':_0x219925 instanceof Error?_0x219925[_0x59b865(0x170)]:String(_0x219925)});}}logger[_0x59b865(0x149)](_0x59b865(0x12d),'项目创建完成:\x20'+_0x24f2f7['projectName']),_0x5ea151(!![]),_0x1d287a(![]);}catch(_0x189abe){logger[_0x59b865(0x17b)](_0x59b865(0x12d),'项目创建失败:\x20'+_0x24f2f7['projectName'],{'error':_0x189abe instanceof Error?_0x189abe[_0x59b865(0x170)]:String(_0x189abe)});try{a41_0x256ed9[_0x59b865(0x152)](_0x55006b)&&(console[_0x59b865(0x171)](_0x59b865(0x166)+_0x55006b),a41_0x256ed9['rmSync'](_0x55006b,{'recursive':!![],'force':!![]}));}catch(_0x568931){logger[_0x59b865(0x160)](_0x59b865(0x12d),_0x59b865(0x168)+_0x55006b,{'error':_0x568931 instanceof Error?_0x568931[_0x59b865(0x170)]:String(_0x568931)});}_0x1d287a(![]),console['error'](_0x59b865(0x15e)+(_0x189abe instanceof Error?_0x189abe[_0x59b865(0x170)]:String(_0x189abe)));}},_0x5ebcc6=async _0xb222a3=>{const _0x3227af=a41_0x3873;await _0x18603c({'projectName':_0xb222a3,'env':_0x38addd[_0x3227af(0x156)]});},_0x4faa38=async _0x63ef9d=>{const _0x4e35ce=a41_0x3873,_0x2b19fc=a41_0xf60639[_0x4e35ce(0x158)](process['cwd'](),_0x63ef9d),_0x39eefb=a41_0xf60639[_0x4e35ce(0x179)](_0x2b19fc,'package.json');try{console['log']('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x501110=fileURLToPath(import.meta.url),_0x5e391=a41_0xf60639[_0x4e35ce(0x158)](a41_0xf60639[_0x4e35ce(0x151)](_0x501110),'../..'),_0x47bf3a=a41_0xf60639[_0x4e35ce(0x179)](_0x5e391,'package.json');let _0x11a562=_0x4e35ce(0x159);try{const _0x4300ab=JSON[_0x4e35ce(0x14c)](a41_0x256ed9[_0x4e35ce(0x14b)](_0x47bf3a,_0x4e35ce(0x14e)));_0x11a562=_0x4300ab[_0x4e35ce(0x154)]||'1.0.0';}catch(_0x56b73e){}const _0x16537c=a41_0x256ed9[_0x4e35ce(0x14b)](_0x39eefb,_0x4e35ce(0x14e)),_0x4998bf=JSON['parse'](_0x16537c);_0x4998bf[_0x4e35ce(0x167)]=_0x63ef9d,_0x4998bf[_0x4e35ce(0x124)]=_0x63ef9d+_0x4e35ce(0x150)+_0x11a562,a41_0x256ed9[_0x4e35ce(0x173)](_0x39eefb,JSON[_0x4e35ce(0x17d)](_0x4998bf,null,0x2)+'\x0a',_0x4e35ce(0x14e)),console[_0x4e35ce(0x171)](_0x4e35ce(0x15d)+_0x63ef9d+',\x20description='+_0x4998bf[_0x4e35ce(0x124)]),logger[_0x4e35ce(0x172)]('create','更新\x20package.json\x20name\x20和\x20description\x20字段',{'projectName':_0x63ef9d,'description':_0x4998bf['description'],'cliVersion':_0x11a562,'packageJsonPath':_0x4e35ce(0x132)});}catch(_0x4d03a8){logger[_0x4e35ce(0x17b)](_0x4e35ce(0x12d),_0x4e35ce(0x178)+_0x63ef9d,{'projectName':_0x63ef9d,'error':_0x4d03a8 instanceof Error?_0x4d03a8['message']:String(_0x4d03a8)});throw _0x4d03a8;}},_0x4fc4cb=async(_0x3e35f8,_0x3a5e31,_0x3677f1)=>{const _0x4aeb76=a41_0x3873,_0x1ce710=a41_0xf60639[_0x4aeb76(0x158)](process[_0x4aeb76(0x176)](),_0x3e35f8),_0x533684=a41_0xf60639[_0x4aeb76(0x179)](_0x1ce710,_0x4aeb76(0x164));try{_0x3a5e31?console[_0x4aeb76(0x171)](_0x4aeb76(0x12c)+_0x3e35f8+_0x4aeb76(0x165)+_0x3a5e31):console[_0x4aeb76(0x171)](_0x4aeb76(0x12c)+_0x3e35f8+_0x4aeb76(0x163));console[_0x4aeb76(0x171)]('*\x20配置文件路径:\x20'+_0x533684);const _0x3fa9c9=fileURLToPath(import.meta.url),_0x18323a=a41_0xf60639[_0x4aeb76(0x158)](a41_0xf60639[_0x4aeb76(0x151)](_0x3fa9c9),_0x4aeb76(0x16d)),_0x3f46e6=a41_0xf60639['join'](_0x18323a,'package.json');let _0x5f5364='1.0.0';try{const _0x2c7474=JSON['parse'](a41_0x256ed9[_0x4aeb76(0x14b)](_0x3f46e6,'utf8'));_0x5f5364=_0x2c7474['version']||_0x4aeb76(0x159);}catch(_0x20a288){}const _0xf0485d=readConfig(),_0x2b1d6f=typeof _0xf0485d[_0x4aeb76(0x156)]===_0x4aeb76(0x175)?_0xf0485d[_0x4aeb76(0x156)]:undefined,{app:_0x2f5779,appcode:_0x4a6ecf,..._0x239a62}=_0xf0485d,_0x4b52ad={..._0x239a62,'appcode':_0x3a5e31||'','env':_0x3677f1||_0x2b1d6f||_0x4aeb76(0x14d),'createdAt':new Date()[_0x4aeb76(0x14f)](),'version':_0x5f5364};a41_0x256ed9['writeFileSync'](_0x533684,JSON['stringify'](_0x4b52ad,null,0x2),_0x4aeb76(0x14e)),_0x3a5e31?console[_0x4aeb76(0x171)](_0x4aeb76(0x14a)+_0x3a5e31):console[_0x4aeb76(0x171)](_0x4aeb76(0x12a)),logger[_0x4aeb76(0x172)]('create',_0x4aeb76(0x15f)+_0x3a5e31,{'projectName':_0x3e35f8,'configFile':_0x4aeb76(0x164)});}catch(_0x137c66){logger[_0x4aeb76(0x17b)]('create',_0x4aeb76(0x125)+_0x3a5e31,{'projectName':_0x3e35f8,'error':_0x137c66 instanceof Error?_0x137c66[_0x4aeb76(0x170)]:String(_0x137c66)});}};useEffect(()=>{const _0x822c8e=a41_0x3873;_0x38addd[_0x822c8e(0x13e)]&&_0x5ebcc6(_0x38addd[_0x822c8e(0x13e)]);},[_0x38addd['projectCode']]);if(!_0x310cea&&!_0x4aafe0&&!_0x38addd[_0x262bb9(0x13e)])return a41_0x30a03e(EnhancedGuidedCreate,{'onCreate':_0x18603c,'env':_0x38addd['env']});if(_0x310cea)return a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'marginTop':0x1,'children':[a41_0x30a03e(Box,{'width':'1'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x262bb9(0x127)}),a41_0x30a03e(Text,{'children':_0x262bb9(0x16c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x367564?.['projectName']}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x30a03e(Text,{'children':_0x262bb9(0x17c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x367564[_0x262bb9(0x13d)]})]})]}),a41_0x30a03e(TaskRunning,{..._0x5d838e}),a41_0x30a03e(TaskRunning,{..._0x35691b}),a41_0x30a03e(TaskRunning,{..._0x446100})]});if(_0x4aafe0)return a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'marginTop':0x1,'children':[a41_0x30a03e(Box,{'width':'1'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'\x20√\x20'}),a41_0x30a03e(Text,{'children':_0x262bb9(0x16c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x367564?.[_0x262bb9(0x12f)]}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x30a03e(Text,{'children':_0x262bb9(0x17c)}),a41_0x30a03e(Text,{'color':'cyan','children':_0x367564[_0x262bb9(0x13d)]})]})]}),a41_0x30a03e(TaskFinished,{..._0x5d838e}),a41_0x30a03e(TaskFinished,{..._0x35691b}),a41_0x30a03e(TaskFinished,{..._0x446100}),a41_0x30a03e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'─'['repeat'](0x3c)})}),a41_0x30a03e(Box,{'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'bold':!![],'children':_0x262bb9(0x128)})}),a41_0x200a49(Box,{'marginTop':0x1,'flexDirection':'column','children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x262bb9(0x16a)}),a41_0x30a03e(Text,{'color':'white','bold':!![],'children':_0x367564?.[_0x262bb9(0x12f)]})]}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x262bb9(0x134)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'bold':!![],'children':_0x367564[_0x262bb9(0x13d)]})]}),a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':'📦\x20API配置:\x20'}),_0x367564?.[_0x262bb9(0x157)]?a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'bold':!![],'children':_0x262bb9(0x13f)}):_0x367564?.['appCode']?a41_0x30a03e(Text,{'color':_0x262bb9(0x16b),'bold':!![],'children':'需手动拉取'}):a41_0x30a03e(Text,{'color':'gray','bold':!![],'children':_0x262bb9(0x174)})]})]}),a41_0x30a03e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x30a03e(Text,{'color':'cyan','bold':!![],'children':_0x262bb9(0x13b)})}),a41_0x200a49(Box,{'marginLeft':0x2,'flexDirection':_0x262bb9(0x133),'children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':'green','children':_0x262bb9(0x153)}),a41_0x30a03e(Text,{'color':'white','children':_0x262bb9(0x12b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x161)+_0x367564?.[_0x262bb9(0x12f)]+_0x262bb9(0x130)})]}),_0x367564?.[_0x262bb9(0x13d)]&&!_0x367564?.[_0x262bb9(0x157)]&&a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x16b),'children':_0x262bb9(0x15b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':_0x262bb9(0x155)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x120)})]}),!_0x367564?.['appCode']&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x129),'children':_0x262bb9(0x15b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':'配置AppCode:\x20'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x148)})]}),a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x129),'children':'3.\x20'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':'拉取API配置:\x20'}),a41_0x30a03e(Text,{'color':'cyan','bold':!![],'children':_0x262bb9(0x13a)})]})]})]}),a41_0x30a03e(Box,{'marginTop':0x1,'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'─'['repeat'](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- function a42_0x4432(_0x5be27c,_0x3335d7){_0x5be27c=_0x5be27c-0x1f3;var _0x4192bf=a42_0x4192();var _0x44326b=_0x4192bf[_0x5be27c];return _0x44326b;}(function(_0x2c2507,_0x47e76e){var _0x2ec97c=a42_0x4432,_0x24925a=_0x2c2507();while(!![]){try{var _0x882ea7=parseInt(_0x2ec97c(0x1fc))/0x1*(parseInt(_0x2ec97c(0x1f7))/0x2)+-parseInt(_0x2ec97c(0x1f8))/0x3+-parseInt(_0x2ec97c(0x1fd))/0x4+-parseInt(_0x2ec97c(0x1f4))/0x5+-parseInt(_0x2ec97c(0x1f3))/0x6+parseInt(_0x2ec97c(0x1ff))/0x7*(parseInt(_0x2ec97c(0x1f9))/0x8)+parseInt(_0x2ec97c(0x1fa))/0x9*(parseInt(_0x2ec97c(0x1f6))/0xa);if(_0x882ea7===_0x47e76e)break;else _0x24925a['push'](_0x24925a['shift']());}catch(_0x51a754){_0x24925a['push'](_0x24925a['shift']());}}}(a42_0x4192,0x2d3c5));import{jsx as a42_0x47b4f3,jsxs as a42_0x5551e7}from'react/jsx-runtime';import{Box,Text}from'ink';function a42_0x4192(){var _0xda0cd9=['green','31859ZMgQUL','419060KkwbdQ','\x20√\x20','7AMKsYd','1571256RUtwMu','577585VueRPC','taskName','680VVcBws','6MuPSyH','16689aZnwNw','792936MmfYNA','63306HPSWPM'];a42_0x4192=function(){return _0xda0cd9;};return a42_0x4192();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x25e935){var _0x2d6d62=a42_0x4432;return a42_0x5551e7(Box,{'children':[a42_0x47b4f3(Box,{'width':'1'}),a42_0x47b4f3(Text,{'color':_0x2d6d62(0x1fb),'children':_0x2d6d62(0x1fe)}),a42_0x47b4f3(Text,{'children':_0x25e935[_0x2d6d62(0x1f5)]}),a42_0x47b4f3(TaskTime,{'elapsed':_0x25e935['elapsed']})]});}
1
+ (function(_0x25d749,_0x25eabf){var _0xb4c1ac=a42_0x6137,_0x42ce0a=_0x25d749();while(!![]){try{var _0x5d2bea=-parseInt(_0xb4c1ac(0x1d6))/0x1*(-parseInt(_0xb4c1ac(0x1cd))/0x2)+parseInt(_0xb4c1ac(0x1d4))/0x3+-parseInt(_0xb4c1ac(0x1d0))/0x4+parseInt(_0xb4c1ac(0x1d2))/0x5*(parseInt(_0xb4c1ac(0x1da))/0x6)+parseInt(_0xb4c1ac(0x1d8))/0x7+parseInt(_0xb4c1ac(0x1d3))/0x8*(-parseInt(_0xb4c1ac(0x1db))/0x9)+-parseInt(_0xb4c1ac(0x1d1))/0xa*(parseInt(_0xb4c1ac(0x1d7))/0xb);if(_0x5d2bea===_0x25eabf)break;else _0x42ce0a['push'](_0x42ce0a['shift']());}catch(_0x339783){_0x42ce0a['push'](_0x42ce0a['shift']());}}}(a42_0x1a40,0x1e5e8));import{jsx as a42_0x453b89,jsxs as a42_0xe2fd78}from'react/jsx-runtime';function a42_0x6137(_0x366718,_0x4766c5){_0x366718=_0x366718-0x1cd;var _0x1a40c0=a42_0x1a40();var _0x613706=_0x1a40c0[_0x366718];return _0x613706;}import{Box,Text}from'ink';function a42_0x1a40(){var _0x3f3662=['taskName','\x20√\x20','778104lkHccn','24050VOpaUM','2260fgahcN','56qFYGcW','301962FyGKLx','green','29510eqDKKm','506FQrQTi','1391047SPzsQj','elapsed','360lIeQjX','19269XWCRTQ','8JqguyO'];a42_0x1a40=function(){return _0x3f3662;};return a42_0x1a40();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x1eaa75){var _0x5cc263=a42_0x6137;return a42_0xe2fd78(Box,{'children':[a42_0x453b89(Box,{'width':'1'}),a42_0x453b89(Text,{'color':_0x5cc263(0x1d5),'children':_0x5cc263(0x1cf)}),a42_0x453b89(Text,{'children':_0x1eaa75[_0x5cc263(0x1ce)]}),a42_0x453b89(TaskTime,{'elapsed':_0x1eaa75[_0x5cc263(0x1d9)]})]});}
@@ -1 +1 @@
1
- (function(_0x292106,_0x2cd3cb){var _0x40ae9a=a43_0x4498,_0x18e299=_0x292106();while(!![]){try{var _0x15711d=-parseInt(_0x40ae9a(0x198))/0x1+parseInt(_0x40ae9a(0x193))/0x2+parseInt(_0x40ae9a(0x191))/0x3*(-parseInt(_0x40ae9a(0x189))/0x4)+-parseInt(_0x40ae9a(0x195))/0x5*(parseInt(_0x40ae9a(0x18e))/0x6)+parseInt(_0x40ae9a(0x196))/0x7+parseInt(_0x40ae9a(0x18b))/0x8*(parseInt(_0x40ae9a(0x194))/0x9)+-parseInt(_0x40ae9a(0x18c))/0xa*(-parseInt(_0x40ae9a(0x18f))/0xb);if(_0x15711d===_0x2cd3cb)break;else _0x18e299['push'](_0x18e299['shift']());}catch(_0x5d566b){_0x18e299['push'](_0x18e299['shift']());}}}(a43_0x15e3,0xb8bd7));import{jsx as a43_0x4e24ed,jsxs as a43_0x28a8ff}from'react/jsx-runtime';import{Text}from'ink';function a43_0x4498(_0x1f2cff,_0x393a91){_0x1f2cff=_0x1f2cff-0x189;var _0x15e368=a43_0x15e3();var _0x4498db=_0x15e368[_0x1f2cff];return _0x4498db;}import a43_0x32d905 from'ink-spinner';export function TaskLoading(_0x4a42ff){var _0x1ffa72=a43_0x4498;if(_0x4a42ff[_0x1ffa72(0x190)])return a43_0x4e24ed(Text,{'color':_0x1ffa72(0x18a),'children':_0x1ffa72(0x197)});if(_0x4a42ff['loading'])return a43_0x28a8ff(Text,{'color':'green','children':['\x20',a43_0x4e24ed(a43_0x32d905,{'type':_0x1ffa72(0x18d)}),'\x20']});return a43_0x4e24ed(Text,{'children':_0x1ffa72(0x192)});}function a43_0x15e3(){var _0x2011fc=['5351076yJkQrU','11aIlMOO','finished','1347kxJYnR','\x20\x20\x20','1203290XFzCva','9CYKgHn','5PhETGg','2030588GuKFkn','\x20√\x20','1435873dfJIdB','140aOvFTD','green','1688520zhWdVq','19973350nmTuYJ','dots'];a43_0x15e3=function(){return _0x2011fc;};return a43_0x15e3();}
1
+ (function(_0x48fdde,_0x1b4493){var _0x38c2d4=a43_0x1b0f,_0x28d0c6=_0x48fdde();while(!![]){try{var _0x325216=parseInt(_0x38c2d4(0xc0))/0x1+parseInt(_0x38c2d4(0xbf))/0x2*(parseInt(_0x38c2d4(0xb9))/0x3)+parseInt(_0x38c2d4(0xc1))/0x4+parseInt(_0x38c2d4(0xbc))/0x5+parseInt(_0x38c2d4(0xbd))/0x6*(parseInt(_0x38c2d4(0xb7))/0x7)+-parseInt(_0x38c2d4(0xba))/0x8+-parseInt(_0x38c2d4(0xc2))/0x9;if(_0x325216===_0x1b4493)break;else _0x28d0c6['push'](_0x28d0c6['shift']());}catch(_0x12955e){_0x28d0c6['push'](_0x28d0c6['shift']());}}}(a43_0x313f,0x6ff90));function a43_0x1b0f(_0x3c7711,_0x3d9a59){_0x3c7711=_0x3c7711-0xb6;var _0x313fe4=a43_0x313f();var _0x1b0f2f=_0x313fe4[_0x3c7711];return _0x1b0f2f;}import{jsx as a43_0x1413c5,jsxs as a43_0x4bccd3}from'react/jsx-runtime';import{Text}from'ink';function a43_0x313f(){var _0x22a222=['green','45HxPiGZ','2856480GlEfWA','dots','680310xwIdrx','12YbKLyf','finished','120634rwwLtj','754985wOURZp','1511716beJrfx','19085643cvNVPW','loading','2669086ljkDDS'];a43_0x313f=function(){return _0x22a222;};return a43_0x313f();}import a43_0x5311f9 from'ink-spinner';export function TaskLoading(_0x49df93){var _0x54e32e=a43_0x1b0f;if(_0x49df93[_0x54e32e(0xbe)])return a43_0x1413c5(Text,{'color':_0x54e32e(0xb8),'children':'\x20√\x20'});if(_0x49df93[_0x54e32e(0xb6)])return a43_0x4bccd3(Text,{'color':'green','children':['\x20',a43_0x1413c5(a43_0x5311f9,{'type':_0x54e32e(0xbb)}),'\x20']});return a43_0x1413c5(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- (function(_0x35ccd7,_0x5708e7){var _0x4a0a64=a44_0x1ce7,_0x419e07=_0x35ccd7();while(!![]){try{var _0x505d35=-parseInt(_0x4a0a64(0x8c))/0x1+parseInt(_0x4a0a64(0x87))/0x2+-parseInt(_0x4a0a64(0x88))/0x3+-parseInt(_0x4a0a64(0x90))/0x4*(parseInt(_0x4a0a64(0x89))/0x5)+parseInt(_0x4a0a64(0x8a))/0x6+parseInt(_0x4a0a64(0x8f))/0x7*(-parseInt(_0x4a0a64(0x8b))/0x8)+parseInt(_0x4a0a64(0x86))/0x9*(parseInt(_0x4a0a64(0x91))/0xa);if(_0x505d35===_0x5708e7)break;else _0x419e07['push'](_0x419e07['shift']());}catch(_0x2ba0f5){_0x419e07['push'](_0x419e07['shift']());}}}(a44_0x437c,0xa5e6e));import{jsx as a44_0x53d7d4,jsxs as a44_0x406009}from'react/jsx-runtime';function a44_0x437c(){var _0x5809ff=['5310CaVmvd','4826028tnpjyY','2056RQSNFu','57175wvVPbQ','elapsed','taskName','8148LpxzDm','304ivtaGk','11670SYSrrx','2943xCzrUl','1043076WeYWUS','1772748hEcRRP'];a44_0x437c=function(){return _0x5809ff;};return a44_0x437c();}function a44_0x1ce7(_0x2fac6d,_0x18c1bd){_0x2fac6d=_0x2fac6d-0x86;var _0x437cdc=a44_0x437c();var _0x1ce768=_0x437cdc[_0x2fac6d];return _0x1ce768;}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x424473){var _0x3c9db9=a44_0x1ce7;return a44_0x406009(Box,{'children':[a44_0x53d7d4(Box,{'width':'1'}),a44_0x53d7d4(TaskLoading,{..._0x424473}),a44_0x53d7d4(Text,{'children':_0x424473[_0x3c9db9(0x8e)]}),a44_0x53d7d4(TaskTime,{'elapsed':_0x424473[_0x3c9db9(0x8d)]})]});}
1
+ function a44_0x3cdf(_0x1692b0,_0x35f3e5){_0x1692b0=_0x1692b0-0x110;var _0x4ccee9=a44_0x4cce();var _0x3cdff7=_0x4ccee9[_0x1692b0];return _0x3cdff7;}(function(_0x93a208,_0x44e00d){var _0x10d35f=a44_0x3cdf,_0x3ecc34=_0x93a208();while(!![]){try{var _0x1132d9=-parseInt(_0x10d35f(0x112))/0x1+-parseInt(_0x10d35f(0x116))/0x2+-parseInt(_0x10d35f(0x113))/0x3*(-parseInt(_0x10d35f(0x119))/0x4)+parseInt(_0x10d35f(0x111))/0x5*(-parseInt(_0x10d35f(0x115))/0x6)+parseInt(_0x10d35f(0x118))/0x7*(-parseInt(_0x10d35f(0x11b))/0x8)+parseInt(_0x10d35f(0x114))/0x9*(parseInt(_0x10d35f(0x11a))/0xa)+parseInt(_0x10d35f(0x117))/0xb*(parseInt(_0x10d35f(0x110))/0xc);if(_0x1132d9===_0x44e00d)break;else _0x3ecc34['push'](_0x3ecc34['shift']());}catch(_0x1ad735){_0x3ecc34['push'](_0x3ecc34['shift']());}}}(a44_0x4cce,0x8052b));import{jsx as a44_0x4f20ba,jsxs as a44_0x5a0522}from'react/jsx-runtime';function a44_0x4cce(){var _0x49db92=['232QEeCvT','12NAgjoR','20VFNUGx','835731NjsGLY','24syRLNq','2079IcURNT','208788tgEJNn','1011376GfZEzk','16493235eGLQMt','6181sBdGyT','225104BbtnNB','3560MyRASe'];a44_0x4cce=function(){return _0x49db92;};return a44_0x4cce();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x2600df){return a44_0x5a0522(Box,{'children':[a44_0x4f20ba(Box,{'width':'1'}),a44_0x4f20ba(TaskLoading,{..._0x2600df}),a44_0x4f20ba(Text,{'children':_0x2600df['taskName']}),a44_0x4f20ba(TaskTime,{'elapsed':_0x2600df['elapsed']})]});}
@@ -1 +1 @@
1
- (function(_0x31157b,_0x238c31){var _0x157683=a45_0x487d,_0xc4aa56=_0x31157b();while(!![]){try{var _0x3e0795=parseInt(_0x157683(0x93))/0x1*(parseInt(_0x157683(0x8a))/0x2)+parseInt(_0x157683(0x8d))/0x3+parseInt(_0x157683(0x8e))/0x4*(-parseInt(_0x157683(0x92))/0x5)+parseInt(_0x157683(0x90))/0x6*(parseInt(_0x157683(0x91))/0x7)+-parseInt(_0x157683(0x8f))/0x8+-parseInt(_0x157683(0x94))/0x9+-parseInt(_0x157683(0x89))/0xa*(-parseInt(_0x157683(0x8c))/0xb);if(_0x3e0795===_0x238c31)break;else _0xc4aa56['push'](_0xc4aa56['shift']());}catch(_0x3c532a){_0xc4aa56['push'](_0xc4aa56['shift']());}}}(a45_0x512d,0x290a2));import{jsx as a45_0x24cda4,Fragment as a45_0x235b9c,jsxs as a45_0x3aab57}from'react/jsx-runtime';import{Text}from'ink';function a45_0x487d(_0xf6db5f,_0x46c0d2){_0xf6db5f=_0xf6db5f-0x89;var _0x512d13=a45_0x512d();var _0x487d60=_0x512d13[_0xf6db5f];return _0x487d60;}export function TaskTime(_0x219f7e){var _0x44a924=a45_0x487d;if(_0x219f7e['elapsed'])return a45_0x3aab57(a45_0x235b9c,{'children':[a45_0x24cda4(Text,{'color':_0x44a924(0x8b),'children':'\x20['}),a45_0x24cda4(Text,{'color':_0x44a924(0x8b),'bold':!![],'children':_0x219f7e[_0x44a924(0x95)]}),a45_0x24cda4(Text,{'color':'gray','children':']'})]});return null;}function a45_0x512d(){var _0xb3e2ba=['144234EuBsWc','gray','145486wIwjAg','157119LVirZp','80sZzWNT','495528yMWWjl','306hrPeex','41741fjpsPj','54040pRCokk','1PESjyp','2222316ZxCOsO','elapsed','200mcvWsf'];a45_0x512d=function(){return _0xb3e2ba;};return a45_0x512d();}
1
+ (function(_0x146ea7,_0x114cb4){var _0x650673=a45_0x4812,_0x28dee5=_0x146ea7();while(!![]){try{var _0x5cdbbb=-parseInt(_0x650673(0xc2))/0x1*(parseInt(_0x650673(0xcc))/0x2)+parseInt(_0x650673(0xc3))/0x3+-parseInt(_0x650673(0xca))/0x4*(parseInt(_0x650673(0xcf))/0x5)+-parseInt(_0x650673(0xc7))/0x6*(-parseInt(_0x650673(0xce))/0x7)+parseInt(_0x650673(0xc4))/0x8*(-parseInt(_0x650673(0xc1))/0x9)+-parseInt(_0x650673(0xcd))/0xa*(parseInt(_0x650673(0xc8))/0xb)+-parseInt(_0x650673(0xc5))/0xc*(-parseInt(_0x650673(0xc6))/0xd);if(_0x5cdbbb===_0x114cb4)break;else _0x28dee5['push'](_0x28dee5['shift']());}catch(_0x150b30){_0x28dee5['push'](_0x28dee5['shift']());}}}(a45_0x5dda,0x84ba8));function a45_0x4812(_0x1321d0,_0x58ea81){_0x1321d0=_0x1321d0-0xc1;var _0x5ddadd=a45_0x5dda();var _0x481270=_0x5ddadd[_0x1321d0];return _0x481270;}import{jsx as a45_0x5965cc,Fragment as a45_0x357ed7,jsxs as a45_0x157142}from'react/jsx-runtime';import{Text}from'ink';function a45_0x5dda(){var _0x5a6c60=['279504unDIXB','108mchuad','1723839ENRnbV','83802GBFOLm','11WvNSce','gray','394276IZNgyz','elapsed','128lXVpXS','5200450qyyGjs','301Fpapek','25TLpxEg','45RDEFFV','7383aGWuHS','1229220cfSzpR'];a45_0x5dda=function(){return _0x5a6c60;};return a45_0x5dda();}export function TaskTime(_0x41211c){var _0x5b19ca=a45_0x4812;if(_0x41211c[_0x5b19ca(0xcb)])return a45_0x157142(a45_0x357ed7,{'children':[a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'children':'\x20['}),a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'bold':!![],'children':_0x41211c['elapsed']}),a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a46_0x45a490=a46_0x351f;(function(_0x337ec0,_0x31343c){const _0x1c1d57=a46_0x351f,_0x2c88d8=_0x337ec0();while(!![]){try{const _0x1452a2=-parseInt(_0x1c1d57(0x1f9))/0x1*(-parseInt(_0x1c1d57(0x1fa))/0x2)+-parseInt(_0x1c1d57(0x200))/0x3*(-parseInt(_0x1c1d57(0x1f1))/0x4)+parseInt(_0x1c1d57(0x1f2))/0x5*(-parseInt(_0x1c1d57(0x1ed))/0x6)+-parseInt(_0x1c1d57(0x1f0))/0x7*(parseInt(_0x1c1d57(0x1ff))/0x8)+parseInt(_0x1c1d57(0x1fc))/0x9+parseInt(_0x1c1d57(0x201))/0xa+parseInt(_0x1c1d57(0x203))/0xb*(-parseInt(_0x1c1d57(0x1f3))/0xc);if(_0x1452a2===_0x31343c)break;else _0x2c88d8['push'](_0x2c88d8['shift']());}catch(_0x5b4de9){_0x2c88d8['push'](_0x2c88d8['shift']());}}}(a46_0x1b22,0x321a8));import a46_0x39c414 from'node:path';function a46_0x351f(_0x4c3938,_0x35e1bb){_0x4c3938=_0x4c3938-0x1ec;const _0x1b22c4=a46_0x1b22();let _0x351fbd=_0x1b22c4[_0x4c3938];return _0x351fbd;}import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a46_0x1b22(){const _0x46f938=['now','info','message','error','开始复制项目模板','1SixciA','446356PdoJhz','项目模板复制完成','2159766czyGDm','resolve','项目模板复制失败','1832368LcNvdR','6FZzvPI','878980KIyyaP','cwd','36421BwrrCB','success','dirname','copy','97494xGVqTK','复制项目文件','../../templates/projects/sub-app-react-demo','7CUdyMW','498924mtoskj','75WPHYxU','444soslLM'];a46_0x1b22=function(){return _0x46f938;};return a46_0x1b22();}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a46_0x39c414[a46_0x45a490(0x205)](fileURLToPath(import.meta.url)),templateDir=a46_0x39c414[a46_0x45a490(0x1fd)](__dirname,a46_0x45a490(0x1ef));export function useCopyProjectTemplate(){const _0x37d914=a46_0x45a490,[_0x221875,_0x3fb503]=useState(![]),[_0x3f18cc,_0x385f7a]=useState(![]),[_0x21e25f,_0x5a8e48]=useState(''),_0x18941d=useCallback(async _0x4d459b=>{const _0x3abdad=a46_0x351f,_0x563465=Date[_0x3abdad(0x1f4)](),_0x36db0a=a46_0x39c414[_0x3abdad(0x1fd)](process[_0x3abdad(0x202)](),_0x4d459b);_0x3fb503(!![]);try{logger[_0x3abdad(0x1f5)](_0x3abdad(0x1ec),_0x3abdad(0x1f8),{'projectCode':_0x4d459b,'templateDir':templateDir}),await copyDirectory(templateDir,_0x36db0a);const _0x272f48=Date[_0x3abdad(0x1f4)]()-_0x563465;logger[_0x3abdad(0x204)](_0x3abdad(0x1ec),_0x3abdad(0x1fb),_0x272f48,{'projectCode':_0x4d459b});}catch(_0x1620c1){const _0x1abd73=Date[_0x3abdad(0x1f4)]()-_0x563465;logger[_0x3abdad(0x1f7)]('copy',_0x3abdad(0x1fe),{'projectCode':_0x4d459b,'error':_0x1620c1 instanceof Error?_0x1620c1[_0x3abdad(0x1f6)]:String(_0x1620c1),'duration':_0x1abd73});throw _0x1620c1;}finally{_0x3fb503(![]),_0x385f7a(!![]),_0x5a8e48(formatElapsed(_0x563465));}},[]);return{'taskName':_0x37d914(0x1ee),'finished':_0x3f18cc,'loading':_0x221875,'elapsed':_0x21e25f,'doTask':_0x18941d};}
1
+ const a46_0x2270c1=a46_0x57c2;(function(_0xea891d,_0x407bcd){const _0x3b305d=a46_0x57c2,_0x38271b=_0xea891d();while(!![]){try{const _0x1c2668=-parseInt(_0x3b305d(0x72))/0x1*(-parseInt(_0x3b305d(0x65))/0x2)+parseInt(_0x3b305d(0x66))/0x3+-parseInt(_0x3b305d(0x78))/0x4*(parseInt(_0x3b305d(0x69))/0x5)+parseInt(_0x3b305d(0x6e))/0x6*(parseInt(_0x3b305d(0x75))/0x7)+-parseInt(_0x3b305d(0x6f))/0x8*(-parseInt(_0x3b305d(0x76))/0x9)+-parseInt(_0x3b305d(0x6c))/0xa+-parseInt(_0x3b305d(0x68))/0xb*(parseInt(_0x3b305d(0x67))/0xc);if(_0x1c2668===_0x407bcd)break;else _0x38271b['push'](_0x38271b['shift']());}catch(_0x144eff){_0x38271b['push'](_0x38271b['shift']());}}}(a46_0xda6b,0x694d1));import a46_0x1cbd2d 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';function a46_0x57c2(_0x2adff4,_0x5b4368){_0x2adff4=_0x2adff4-0x64;const _0xda6b94=a46_0xda6b();let _0x57c2ec=_0xda6b94[_0x2adff4];return _0x57c2ec;}import{logger}from'../utils/logger.js';const __dirname=a46_0x1cbd2d[a46_0x2270c1(0x6b)](fileURLToPath(import.meta.url)),templateDir=a46_0x1cbd2d[a46_0x2270c1(0x77)](__dirname,'../../templates/projects/sub-app-react-demo');export function useCopyProjectTemplate(){const _0x1c600d=a46_0x2270c1,[_0x1e3ec4,_0xe0a6ab]=useState(![]),[_0x4e0130,_0x27a6d9]=useState(![]),[_0x7026ec,_0x2ac3de]=useState(''),_0x5eec6b=useCallback(async _0x102bdd=>{const _0x25f92c=a46_0x57c2,_0x34232b=Date[_0x25f92c(0x6a)](),_0x7c2304=a46_0x1cbd2d['resolve'](process[_0x25f92c(0x71)](),_0x102bdd);_0xe0a6ab(!![]);try{logger[_0x25f92c(0x70)](_0x25f92c(0x79),'开始复制项目模板',{'projectCode':_0x102bdd,'templateDir':templateDir}),await copyDirectory(templateDir,_0x7c2304);const _0x4aaeab=Date[_0x25f92c(0x6a)]()-_0x34232b;logger[_0x25f92c(0x74)](_0x25f92c(0x79),_0x25f92c(0x73),_0x4aaeab,{'projectCode':_0x102bdd});}catch(_0x56304d){const _0x4bf26f=Date['now']()-_0x34232b;logger[_0x25f92c(0x64)](_0x25f92c(0x79),_0x25f92c(0x7a),{'projectCode':_0x102bdd,'error':_0x56304d instanceof Error?_0x56304d['message']:String(_0x56304d),'duration':_0x4bf26f});throw _0x56304d;}finally{_0xe0a6ab(![]),_0x27a6d9(!![]),_0x2ac3de(formatElapsed(_0x34232b));}},[]);return{'taskName':_0x1c600d(0x6d),'finished':_0x4e0130,'loading':_0x1e3ec4,'elapsed':_0x7026ec,'doTask':_0x5eec6b};}function a46_0xda6b(){const _0x2d6376=['5139ZVsTnz','resolve','284vJfith','copy','项目模板复制失败','error','2mpVloe','1685385UWbGiB','24aOPlMz','5370541Xyvykz','35765QFoCca','now','dirname','2216290cWXbAt','复制项目文件','2550162fQxBma','328Iaylhs','info','cwd','702007MffJco','项目模板复制完成','success','14lHGYbB'];a46_0xda6b=function(){return _0x2d6376;};return a46_0xda6b();}