@lovrabet/cli 1.2.3 → 1.2.5-beta.1

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 (89) 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/claude.js +1 -0
  52. package/lib/mcp/cursor.js +1 -1
  53. package/lib/mcp/main.js +1 -1
  54. package/lib/skills/main.js +1 -0
  55. package/lib/utils/check-sdk-version.js +1 -1
  56. package/lib/utils/config.js +1 -1
  57. package/lib/utils/copy-directory.js +1 -1
  58. package/lib/utils/http-client.js +1 -1
  59. package/lib/utils/logger.js +1 -1
  60. package/lib/utils/router-updater.js +1 -1
  61. package/lib/utils/sleep.js +1 -1
  62. package/lib/utils/template-replacer.js +1 -1
  63. package/package.json +1 -1
  64. package/templates/projects/sub-app-react-demo/index.html +22 -34
  65. package/templates/projects/sub-app-react-demo/public/logo.svg +1 -0
  66. package/templates/projects/sub-app-react-demo/src/api/api.ts +1 -1
  67. package/templates/projects/sub-app-react-demo/src/api/client.ts +1 -1
  68. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +44 -71
  69. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +387 -927
  70. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +1 -1
  71. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +293 -0
  72. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +100 -414
  73. package/templates/projects/sub-app-react-demo/src/style.css +21 -15
  74. package/templates/projects/sub-app-react-demo/vite.config.ts +18 -13
  75. package/templates/rules/lovrabet_rules.mdc.tpl +636 -43
  76. package/templates/skills/.claude/skills/lovrabet/SKILL.md +257 -0
  77. package/templates/skills/.cursor/commands/lovrabet.md +247 -0
  78. package/templates/skills/.cursorrules +109 -0
  79. package/templates/skills/.shared/README.md +45 -0
  80. package/templates/skills/.shared/guides/01-filter-query/guide.md +300 -0
  81. package/templates/skills/.shared/guides/02-mcp-sql-workflow/guide.md +272 -0
  82. package/templates/skills/.shared/guides/03-antd-style/guide.md +227 -0
  83. package/templates/skills/.shared/guides/04-troubleshooting/guide.md +426 -0
  84. package/templates/skills/.shared/guides/05-api-integration/guide.md +327 -0
  85. package/templates/skills/.shared/guides/06-menu-management/guide.md +305 -0
  86. package/templates/skills/.windsurf/workflows/lovrabet.md +256 -0
  87. package/templates/projects/sub-app-react-demo/.vscode/extensions.json +0 -3
  88. package/templates/projects/sub-app-react-demo/.vscode/settings.json +0 -57
  89. package/templates/projects/sub-app-react-demo/src/pages/intro/index.tsx +0 -560
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a29_0x343d9b=a29_0x1fce;(function(_0xf1f47c,_0x1864d3){const _0x331ad2=a29_0x1fce,_0x102273=_0xf1f47c();while(!![]){try{const _0x2bea46=parseInt(_0x331ad2(0x13c))/0x1*(parseInt(_0x331ad2(0x142))/0x2)+parseInt(_0x331ad2(0x153))/0x3*(parseInt(_0x331ad2(0x145))/0x4)+parseInt(_0x331ad2(0x140))/0x5+parseInt(_0x331ad2(0x148))/0x6*(-parseInt(_0x331ad2(0x13f))/0x7)+-parseInt(_0x331ad2(0x15c))/0x8*(parseInt(_0x331ad2(0x133))/0x9)+-parseInt(_0x331ad2(0x14a))/0xa+parseInt(_0x331ad2(0x136))/0xb;if(_0x2bea46===_0x1864d3)break;else _0x102273['push'](_0x102273['shift']());}catch(_0x5237d1){_0x102273['push'](_0x102273['shift']());}}}(a29_0x4087,0x37f59));import{jsx as a29_0x27fb63}from'react/jsx-runtime';import a29_0x2798fb 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';function a29_0x4087(){const _0x306f26=['36zBWekH','preview','config','build','add-page','input','执行预览命令','create','mcp','8EWcCkR','setLogPath','slice','boolean','setRawCommand','执行初始化配置命令','logout','update','3326877RluBVm','start','add','9695598RynLml','error','auth','flags','lovrabet\x20','env','3891gUmpCX','\x20(监听模式)','info','1986649RIHNyP','7525gBCTkR','\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','4zYfEWB','exit','string','50800cCUdub','logs','执行添加页面命令','6TYJwTD','trim','1604360PgSdgK','cwd','执行启动命令','menu-update-cdn','argv','init','join','appcode','page'];a29_0x4087=function(){return _0x306f26;};return a29_0x4087();}import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x2798fb(a29_0x343d9b(0x141),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x343d9b(0x144)},'clear':{'type':a29_0x343d9b(0x12e)},'env':{'type':'string'},'watch':{'type':a29_0x343d9b(0x12e)},'help':{'type':a29_0x343d9b(0x12e)},'appcode':{'type':'string'},'output':{'type':a29_0x343d9b(0x144)},'params':{'type':a29_0x343d9b(0x144)},'datasetcode':{'type':'string'}},'autoVersion':!![]});function a29_0x1fce(_0x59569f,_0xa4146){_0x59569f=_0x59569f-0x12c;const _0x4087f8=a29_0x4087();let _0x1fceaf=_0x4087f8[_0x59569f];return _0x1fceaf;}await run();async function run(){const _0x4ec0ad=a29_0x343d9b,_0x57eb45=cli[_0x4ec0ad(0x158)][0x0],_0x40b77d=cli[_0x4ec0ad(0x158)][0x1],_0x5edf81=cli[_0x4ec0ad(0x158)][0x2],_0x4dea11=(_0x4ec0ad(0x13a)+process[_0x4ec0ad(0x14e)][_0x4ec0ad(0x12d)](0x2)[_0x4ec0ad(0x150)]('\x20'))[_0x4ec0ad(0x149)]();logger[_0x4ec0ad(0x12f)](_0x4dea11);switch(_0x57eb45){case _0x4ec0ad(0x14f):{const _0x3ecfe8=cli[_0x4ec0ad(0x139)][_0x4ec0ad(0x151)],_0x5d5f45=cli['flags'][_0x4ec0ad(0x13b)];logger[_0x4ec0ad(0x12c)](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x14f),_0x4ec0ad(0x130)),render(a29_0x27fb63(Init,{'appcode':_0x3ecfe8,'env':_0x5d5f45}));break;}case _0x4ec0ad(0x15a):{const _0x3f29d2=cli[_0x4ec0ad(0x158)][0x1]?.[_0x4ec0ad(0x149)](),_0x8ddea0=cli[_0x4ec0ad(0x139)]['env'];render(a29_0x27fb63(CreateApp,{'projectCode':_0x3f29d2,'env':_0x8ddea0}));break;}case _0x4ec0ad(0x135):{cli[_0x4ec0ad(0x158)][0x1]===_0x4ec0ad(0x152)&&(logger['setLogPath'](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x157),_0x4ec0ad(0x147)),render(a29_0x27fb63(AddPage,{})));break;}case _0x4ec0ad(0x134):{try{logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x134),_0x4ec0ad(0x14c)),await runStart();}catch(_0x4a43c9){console[_0x4ec0ad(0x137)](_0x4a43c9),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x156):{try{logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x156),'执行构建命令'),await runBuild();}catch(_0x19f05a){console[_0x4ec0ad(0x137)](_0x19f05a),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x154):{const _0x41d759=cli['flags']['watch'];logger[_0x4ec0ad(0x12c)](process['cwd']()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x154),_0x4ec0ad(0x159)+(_0x41d759?_0x4ec0ad(0x13d):''));if(_0x41d759)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x57bd8d){console[_0x4ec0ad(0x137)](_0x57bd8d),process[_0x4ec0ad(0x143)](0x1);}else try{await runPreview();}catch(_0x58bbba){console[_0x4ec0ad(0x137)](_0x58bbba),process[_0x4ec0ad(0x143)](0x1);}break;}case _0x4ec0ad(0x155):{render(a29_0x27fb63(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x4ec0ad(0x138):{render(a29_0x27fb63(AuthServer,{}));break;}case'menu':{if(_0x40b77d===_0x4ec0ad(0x132)){logger[_0x4ec0ad(0x12c)](process[_0x4ec0ad(0x14b)]()),logger[_0x4ec0ad(0x13e)](_0x4ec0ad(0x14d),'执行更新菜单\x20CDN\x20资源命令'),render(a29_0x27fb63(AppMenuUpdateCdn,{}));break;}else render(a29_0x27fb63(AppMenuSyncUI,{}));break;}case _0x4ec0ad(0x131):{logout();break;}case _0x4ec0ad(0x15b):{const _0x512260=cli[_0x4ec0ad(0x158)][0x1];await mcpCommand(_0x512260);break;}case _0x4ec0ad(0x146):{cli[_0x4ec0ad(0x139)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x27fb63(Help,{}));break;}}
2
+ const a29_0x17fc9e=a29_0x1912;(function(_0x275fd1,_0x4f1876){const _0x372ee9=a29_0x1912,_0x5168ff=_0x275fd1();while(!![]){try{const _0x457ae9=-parseInt(_0x372ee9(0x117))/0x1+-parseInt(_0x372ee9(0x11e))/0x2*(parseInt(_0x372ee9(0x118))/0x3)+-parseInt(_0x372ee9(0x104))/0x4*(-parseInt(_0x372ee9(0x10d))/0x5)+-parseInt(_0x372ee9(0x112))/0x6+parseInt(_0x372ee9(0x100))/0x7+-parseInt(_0x372ee9(0x107))/0x8+parseInt(_0x372ee9(0x124))/0x9;if(_0x457ae9===_0x4f1876)break;else _0x5168ff['push'](_0x5168ff['shift']());}catch(_0x46761e){_0x5168ff['push'](_0x5168ff['shift']());}}}(a29_0x525e,0x8e326));import{jsx as a29_0x290965}from'react/jsx-runtime';import a29_0x43db14 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';function a29_0x525e(){const _0x45b4ae=['start','setRawCommand','52315UwlGiQ','create','auth','all','flags','1049520uDcvOx','add','string','trim','page','115039LpPBxm','11781HKbDLQ','config','menu-update-cdn','setLogPath','exit','slice','232RCcxgk','mcp','lovrabet\x20','cwd','info','build','14627367xCbHTz','argv','join','appcode','error','执行更新菜单\x20CDN\x20资源命令','执行添加页面命令','4215918HGDSqY','logout','boolean','\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\x20install\x20<ide>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装\x20MCP\x20配置\x20(cursor/claude)\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20显示技能包帮助信息\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装技能包到项目\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','20NtsKjS','input','menu','7615384wQDoBz','执行初始化配置命令','add-page','env'];a29_0x525e=function(){return _0x45b4ae;};return a29_0x525e();}function a29_0x1912(_0xce06d,_0x17f35b){_0xce06d=_0xce06d-0x100;const _0x525e52=a29_0x525e();let _0x191221=_0x525e52[_0xce06d];return _0x191221;}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';import{skillsCommand}from'./skills/main.js';const cli=a29_0x43db14(a29_0x17fc9e(0x103),{'importMeta':import.meta,'flags':{'name':{'type':a29_0x17fc9e(0x114)},'clear':{'type':a29_0x17fc9e(0x102)},'env':{'type':a29_0x17fc9e(0x114)},'watch':{'type':'boolean'},'help':{'type':a29_0x17fc9e(0x102)},'appcode':{'type':'string'},'output':{'type':'string'},'params':{'type':a29_0x17fc9e(0x114)},'datasetcode':{'type':a29_0x17fc9e(0x114)}},'autoVersion':!![]});await run();async function run(){const _0x293e31=a29_0x17fc9e,_0x284703=cli[_0x293e31(0x105)][0x0],_0x4d73e=cli['input'][0x1],_0x5479b9=cli[_0x293e31(0x105)][0x2],_0xa1623b=(_0x293e31(0x120)+process[_0x293e31(0x125)][_0x293e31(0x11d)](0x2)[_0x293e31(0x126)]('\x20'))[_0x293e31(0x115)]();logger[_0x293e31(0x10c)](_0xa1623b);switch(_0x284703){case'init':{const _0x1d3104=cli[_0x293e31(0x111)][_0x293e31(0x127)],_0xc18323=cli[_0x293e31(0x111)][_0x293e31(0x10a)];logger[_0x293e31(0x11b)](process[_0x293e31(0x121)]()),logger['info']('init',_0x293e31(0x108)),render(a29_0x290965(Init,{'appcode':_0x1d3104,'env':_0xc18323}));break;}case _0x293e31(0x10e):{const _0x21dee4=cli[_0x293e31(0x105)][0x1]?.['trim'](),_0x4bf989=cli[_0x293e31(0x111)][_0x293e31(0x10a)];render(a29_0x290965(CreateApp,{'projectCode':_0x21dee4,'env':_0x4bf989}));break;}case _0x293e31(0x113):{cli[_0x293e31(0x105)][0x1]===_0x293e31(0x116)&&(logger['setLogPath'](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x109),_0x293e31(0x12a)),render(a29_0x290965(AddPage,{})));break;}case _0x293e31(0x10b):{try{logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x10b),'执行启动命令'),await runStart();}catch(_0x3703d6){console['error'](_0x3703d6),process[_0x293e31(0x11c)](0x1);}break;}case _0x293e31(0x123):{try{logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)](_0x293e31(0x123),'执行构建命令'),await runBuild();}catch(_0x260788){console['error'](_0x260788),process[_0x293e31(0x11c)](0x1);}break;}case'preview':{const _0x49c4fa=cli[_0x293e31(0x111)]['watch'];logger[_0x293e31(0x11b)](process['cwd']()),logger[_0x293e31(0x122)]('preview','执行预览命令'+(_0x49c4fa?'\x20(监听模式)':''));if(_0x49c4fa)try{await Promise[_0x293e31(0x110)]([runBuildWatch(),runPreview()]);}catch(_0x893689){console[_0x293e31(0x128)](_0x893689),process[_0x293e31(0x11c)](0x1);}else try{await runPreview();}catch(_0x5658b5){console['error'](_0x5658b5),process[_0x293e31(0x11c)](0x1);}break;}case _0x293e31(0x119):{render(a29_0x290965(Config,{'cli':cli}));break;}case'api':{await apiCli(cli);break;}case _0x293e31(0x10f):{render(a29_0x290965(AuthServer,{}));break;}case _0x293e31(0x106):{if(_0x4d73e==='update'){logger[_0x293e31(0x11b)](process[_0x293e31(0x121)]()),logger[_0x293e31(0x122)](_0x293e31(0x11a),_0x293e31(0x129)),render(a29_0x290965(AppMenuUpdateCdn,{}));break;}else render(a29_0x290965(AppMenuSyncUI,{}));break;}case _0x293e31(0x101):{logout();break;}case _0x293e31(0x11f):{const _0x21cd74=cli[_0x293e31(0x105)][0x1],_0x197b00=cli[_0x293e31(0x105)][_0x293e31(0x11d)](0x2);await mcpCommand(_0x21cd74,_0x197b00,cli['flags']);break;}case'skill':{const _0x31efd8=cli[_0x293e31(0x105)][0x1],_0x5d8d16=cli[_0x293e31(0x105)]['slice'](0x2);await skillsCommand(_0x31efd8,_0x5d8d16,cli[_0x293e31(0x111)]);break;}case'logs':{cli[_0x293e31(0x111)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x290965(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x35bae6,_0x8bdf75){const _0x2ff2b6=a30_0x1b7b,_0x2f795d=_0x35bae6();while(!![]){try{const _0x16451a=parseInt(_0x2ff2b6(0x157))/0x1*(-parseInt(_0x2ff2b6(0x153))/0x2)+parseInt(_0x2ff2b6(0x151))/0x3*(-parseInt(_0x2ff2b6(0x159))/0x4)+-parseInt(_0x2ff2b6(0x152))/0x5+-parseInt(_0x2ff2b6(0x160))/0x6*(parseInt(_0x2ff2b6(0x150))/0x7)+-parseInt(_0x2ff2b6(0x154))/0x8+parseInt(_0x2ff2b6(0x15b))/0x9*(-parseInt(_0x2ff2b6(0x15f))/0xa)+parseInt(_0x2ff2b6(0x15e))/0xb;if(_0x16451a===_0x8bdf75)break;else _0x2f795d['push'](_0x2f795d['shift']());}catch(_0x32d0a0){_0x2f795d['push'](_0x2f795d['shift']());}}}(a30_0xcb0b,0xf1d0c));function a30_0xcb0b(){const _0x22db44=['vite','PATH','95350926sWSYOE','250EqbyVj','654gVrVZu','--watch','107499OSbqaF','105qZaelS','7599410kWlWsJ','229762gZkwDI','14616760EMlgDG','env','close','15YMBYpq','build','3144AzEIEd','node_modules','326223RBqksb'];a30_0xcb0b=function(){return _0x22db44;};return a30_0xcb0b();}import{spawn}from'node:child_process';function a30_0x1b7b(_0x501fa2,_0x21bb7e){_0x501fa2=_0x501fa2-0x14f;const _0xcb0b14=a30_0xcb0b();let _0x1b7b99=_0xcb0b14[_0x501fa2];return _0x1b7b99;}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x185a17,_0x5aed0d)=>{const _0x51f1a9=a30_0x1b7b,_0x3c8939=spawn(_0x51f1a9(0x15c),[_0x51f1a9(0x158),_0x51f1a9(0x14f)],{'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x51f1a9(0x15a),'.bin')+delimiter+process[_0x51f1a9(0x155)][_0x51f1a9(0x15d)]}});_0x3c8939['on'](_0x51f1a9(0x156),_0x43f651=>{if(_0x43f651===0x0||_0x43f651===null)_0x185a17();else _0x5aed0d(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x43f651));}),_0x3c8939['on']('error',_0x5aed0d);});}
1
+ function a30_0x21bd(_0x2dea71,_0x5885cb){_0x2dea71=_0x2dea71-0x1db;const _0x5be469=a30_0x5be4();let _0x21bd0d=_0x5be469[_0x2dea71];return _0x21bd0d;}(function(_0x60c9b9,_0x3dd650){const _0x2e88b4=a30_0x21bd,_0x15cc64=_0x60c9b9();while(!![]){try{const _0x14113c=parseInt(_0x2e88b4(0x1e5))/0x1+-parseInt(_0x2e88b4(0x1e7))/0x2+parseInt(_0x2e88b4(0x1de))/0x3+-parseInt(_0x2e88b4(0x1e3))/0x4*(-parseInt(_0x2e88b4(0x1e6))/0x5)+-parseInt(_0x2e88b4(0x1e4))/0x6*(parseInt(_0x2e88b4(0x1e1))/0x7)+parseInt(_0x2e88b4(0x1e9))/0x8+-parseInt(_0x2e88b4(0x1e8))/0x9*(-parseInt(_0x2e88b4(0x1dd))/0xa);if(_0x14113c===_0x3dd650)break;else _0x15cc64['push'](_0x15cc64['shift']());}catch(_0x17e461){_0x15cc64['push'](_0x15cc64['shift']());}}}(a30_0x5be4,0xb5df5));function a30_0x5be4(){const _0x5e3b98=['10210sxDKcf','2450402yqCmGp','900333rPYXoj','9031808eKclEm','env','cwd','build','40kXbKFb','1347285jYZQcA','.bin','inherit','6385547dryHEk','PATH','68ASvRwv','6tNGwFw','869438QqCwwe'];a30_0x5be4=function(){return _0x5e3b98;};return a30_0x5be4();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x3c39b2,_0x452ba7)=>{const _0x39514a=a30_0x21bd,_0x11cd74=spawn('vite',[_0x39514a(0x1dc),'--watch'],{'stdio':_0x39514a(0x1e0),'shell':!![],'env':{...process[_0x39514a(0x1ea)],'PATH':''+join(process[_0x39514a(0x1db)](),'node_modules',_0x39514a(0x1df))+delimiter+process[_0x39514a(0x1ea)][_0x39514a(0x1e2)]}});_0x11cd74['on']('close',_0x671f29=>{if(_0x671f29===0x0||_0x671f29===null)_0x3c39b2();else _0x452ba7(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x671f29));}),_0x11cd74['on']('error',_0x452ba7);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- function a31_0x25f2(_0x4db91d,_0x3dd8c4){_0x4db91d=_0x4db91d-0x87;const _0x521cbb=a31_0x521c();let _0x25f287=_0x521cbb[_0x4db91d];return _0x25f287;}(function(_0xd84bfc,_0x3c5b78){const _0x569df2=a31_0x25f2,_0x554054=_0xd84bfc();while(!![]){try{const _0x14996a=parseInt(_0x569df2(0x9e))/0x1+-parseInt(_0x569df2(0x87))/0x2*(parseInt(_0x569df2(0x91))/0x3)+-parseInt(_0x569df2(0x9f))/0x4*(parseInt(_0x569df2(0x9d))/0x5)+parseInt(_0x569df2(0xa1))/0x6+-parseInt(_0x569df2(0xa6))/0x7*(-parseInt(_0x569df2(0x88))/0x8)+parseInt(_0x569df2(0x93))/0x9*(parseInt(_0x569df2(0xa9))/0xa)+-parseInt(_0x569df2(0x94))/0xb*(parseInt(_0x569df2(0x95))/0xc);if(_0x14996a===_0x3c5b78)break;else _0x554054['push'](_0x554054['shift']());}catch(_0x4297fc){_0x554054['push'](_0x554054['shift']());}}}(a31_0x521c,0xb8727));import{delimiter,join}from'node:path';function a31_0x521c(){const _0x44ff6b=['开始构建项目','.bin','项目构建成功','npm','stderr','项目构建失败','635193cKxbOJ','cwd','7857CimsNU','17677sFCbyU','9684QcjXLu','toString','build','env','data','pipe','info','node_modules','644825tGxkuR','1389743ZBHKtg','28oNLsuS','项目构建出错','312552HrWJDI','error','npm\x20run\x20build\x20exited\x20with\x20code\x20','trim','message','7osqEui','npm\x20run\x20build','now','4180UVeJDF','2wsFfPw','10880648fjYvoo','inherit','close'];a31_0x521c=function(){return _0x44ff6b;};return a31_0x521c();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x144d34,_0x50f68e)=>{const _0xb60ff9=a31_0x25f2,_0x2b4198=Date[_0xb60ff9(0xa8)]();logger[_0xb60ff9(0x9b)](_0xb60ff9(0x97),_0xb60ff9(0x8b),{'command':_0xb60ff9(0xa7)});let _0x333dc6='';const _0x2b8376=spawn(_0xb60ff9(0x8e),['run',_0xb60ff9(0x97)],{'stdio':[_0xb60ff9(0x89),_0xb60ff9(0x89),_0xb60ff9(0x9a)],'shell':!![],'env':{...process[_0xb60ff9(0x98)],'PATH':''+join(process['cwd'](),_0xb60ff9(0x9c),_0xb60ff9(0x8c))+delimiter+process['env']['PATH']}});_0x2b8376['stderr']?.['on'](_0xb60ff9(0x99),_0x480c1a=>{const _0x299970=_0xb60ff9;_0x333dc6+=_0x480c1a[_0x299970(0x96)]();}),_0x2b8376['on'](_0xb60ff9(0x8a),_0x4b5923=>{const _0x2c9b10=_0xb60ff9,_0x471d68=Date['now']()-_0x2b4198;if(_0x4b5923===0x0||_0x4b5923===null)logger['success'](_0x2c9b10(0x97),_0x2c9b10(0x8d),_0x471d68),_0x144d34();else{const _0x5236a9={'exitCode':_0x4b5923,'duration':_0x471d68,'command':'npm\x20run\x20build','cwd':process[_0x2c9b10(0x92)]()};_0x333dc6[_0x2c9b10(0xa4)]()&&(_0x5236a9[_0x2c9b10(0x8f)]=_0x333dc6[_0x2c9b10(0xa4)]()),logger[_0x2c9b10(0xa2)]('build',_0x2c9b10(0x90),_0x5236a9),_0x50f68e(new Error(_0x2c9b10(0xa3)+_0x4b5923));}}),_0x2b8376['on'](_0xb60ff9(0xa2),_0x478a4b=>{const _0x5145f3=_0xb60ff9,_0x5abea4=Date[_0x5145f3(0xa8)]()-_0x2b4198;logger[_0x5145f3(0xa2)](_0x5145f3(0x97),_0x5145f3(0xa0),{'error':_0x478a4b[_0x5145f3(0xa5)],'duration':_0x5abea4,'stderr':_0x333dc6[_0x5145f3(0xa4)]()||undefined}),_0x50f68e(_0x478a4b);});});}
1
+ (function(_0x68236,_0x4f974b){const _0x47efb6=a31_0x192e,_0x3549ef=_0x68236();while(!![]){try{const _0x389043=parseInt(_0x47efb6(0x17e))/0x1*(parseInt(_0x47efb6(0x17c))/0x2)+-parseInt(_0x47efb6(0x17d))/0x3+parseInt(_0x47efb6(0x182))/0x4+parseInt(_0x47efb6(0x192))/0x5*(-parseInt(_0x47efb6(0x198))/0x6)+-parseInt(_0x47efb6(0x181))/0x7+parseInt(_0x47efb6(0x17f))/0x8*(parseInt(_0x47efb6(0x18c))/0x9)+parseInt(_0x47efb6(0x186))/0xa*(-parseInt(_0x47efb6(0x189))/0xb);if(_0x389043===_0x4f974b)break;else _0x3549ef['push'](_0x3549ef['shift']());}catch(_0x58ece8){_0x3549ef['push'](_0x3549ef['shift']());}}}(a31_0x328d,0xb72fd));function a31_0x328d(){const _0x1d2d91=['.bin','success','4308111hBMdHu','build','env','npm\x20run\x20build\x20exited\x20with\x20code\x20','error','项目构建失败','85jUbLeK','项目构建出错','node_modules','npm','run','开始构建项目','35292WVcjRN','cwd','inherit','message','2jKQmuE','26388vUzYDD','530569gGWxgn','24JCvTHg','toString','6201937PyaaUD','372604ICNSPO','now','npm\x20run\x20build','trim','149830ZfvMZf','stderr','data','231zNZSdT'];a31_0x328d=function(){return _0x1d2d91;};return a31_0x328d();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a31_0x192e(_0x1385cc,_0x4088b0){_0x1385cc=_0x1385cc-0x17a;const _0x328d1b=a31_0x328d();let _0x192eae=_0x328d1b[_0x1385cc];return _0x192eae;}export function runBuild(){return new Promise((_0x55ccdd,_0x1ba5e6)=>{const _0x14a984=a31_0x192e,_0x362997=Date['now']();logger['info'](_0x14a984(0x18d),_0x14a984(0x197),{'command':'npm\x20run\x20build'});let _0x161c7e='';const _0x46d0b5=spawn(_0x14a984(0x195),[_0x14a984(0x196),'build'],{'stdio':[_0x14a984(0x17a),_0x14a984(0x17a),'pipe'],'shell':!![],'env':{...process[_0x14a984(0x18e)],'PATH':''+join(process[_0x14a984(0x199)](),_0x14a984(0x194),_0x14a984(0x18a))+delimiter+process[_0x14a984(0x18e)]['PATH']}});_0x46d0b5[_0x14a984(0x187)]?.['on'](_0x14a984(0x188),_0x5e93a4=>{const _0x5ef660=_0x14a984;_0x161c7e+=_0x5e93a4[_0x5ef660(0x180)]();}),_0x46d0b5['on']('close',_0x51c4d3=>{const _0x59886a=_0x14a984,_0x32cbed=Date[_0x59886a(0x183)]()-_0x362997;if(_0x51c4d3===0x0||_0x51c4d3===null)logger[_0x59886a(0x18b)](_0x59886a(0x18d),'项目构建成功',_0x32cbed),_0x55ccdd();else{const _0x550709={'exitCode':_0x51c4d3,'duration':_0x32cbed,'command':_0x59886a(0x184),'cwd':process[_0x59886a(0x199)]()};_0x161c7e['trim']()&&(_0x550709['stderr']=_0x161c7e['trim']()),logger[_0x59886a(0x190)]('build',_0x59886a(0x191),_0x550709),_0x1ba5e6(new Error(_0x59886a(0x18f)+_0x51c4d3));}}),_0x46d0b5['on'](_0x14a984(0x190),_0xc45062=>{const _0x2591a4=_0x14a984,_0x593d73=Date[_0x2591a4(0x183)]()-_0x362997;logger['error'](_0x2591a4(0x18d),_0x2591a4(0x193),{'error':_0xc45062[_0x2591a4(0x17b)],'duration':_0x593d73,'stderr':_0x161c7e[_0x2591a4(0x185)]()||undefined}),_0x1ba5e6(_0xc45062);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function a32_0x5a1e(){const _0x4e5dcb=['\x20\x20\x20时间:\x20','2168684TefiGe','zh-CN','setLogPath','25HxaqFP','clearLogs','duration','187689YEWRRf','*\x20日志已清空','1129530ecretp','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','2111010ecszjf','error','12430864MBXVNj','timestamp','\x20\x20\x20详情:\x20','warn','\x20\x20\x20耗时:\x20','level','35694648WCgntJ','log','320157AxhrtU','length','forEach','cwd','message','36ytrksb'];a32_0x5a1e=function(){return _0x4e5dcb;};return a32_0x5a1e();}(function(_0x4d91d5,_0x14d8d2){const _0x3a7141=a32_0x10b6,_0x4f9009=_0x4d91d5();while(!![]){try{const _0x17c62c=parseInt(_0x3a7141(0x158))/0x1+parseInt(_0x3a7141(0x169))/0x2+parseInt(_0x3a7141(0x165))/0x3*(parseInt(_0x3a7141(0x15d))/0x4)+parseInt(_0x3a7141(0x162))/0x5*(parseInt(_0x3a7141(0x167))/0x6)+parseInt(_0x3a7141(0x15f))/0x7+parseInt(_0x3a7141(0x150))/0x8+-parseInt(_0x3a7141(0x156))/0x9;if(_0x17c62c===_0x14d8d2)break;else _0x4f9009['push'](_0x4f9009['shift']());}catch(_0xe7aa65){_0x4f9009['push'](_0x4f9009['shift']());}}}(a32_0x5a1e,0xbdd82));import{logger}from'../utils/logger.js';function a32_0x10b6(_0x135cef,_0x199082){_0x135cef=_0x135cef-0x150;const _0x5a1e09=a32_0x5a1e();let _0x10b62b=_0x5a1e09[_0x135cef];return _0x10b62b;}export function showLogs(){const _0xeb9f9b=a32_0x10b6;logger['setLogPath'](process[_0xeb9f9b(0x15b)]());const _0x4fd25d=logger['readLogs']();if(_0x4fd25d[_0xeb9f9b(0x159)]===0x0){console[_0xeb9f9b(0x157)]('*\x20暂无日志记录');return;}console[_0xeb9f9b(0x157)](_0xeb9f9b(0x168)),_0x4fd25d[_0xeb9f9b(0x15a)]((_0x3376de,_0x35ff69)=>{const _0x1e481c=_0xeb9f9b,_0x202538=new Date(_0x3376de[_0x1e481c(0x151)])['toLocaleString'](_0x1e481c(0x160)),_0x2049eb=_0x3376de[_0x1e481c(0x155)]==='success'?'√':_0x3376de['level']===_0x1e481c(0x16a)?'×':_0x3376de[_0x1e481c(0x155)]===_0x1e481c(0x153)?'!':'i';console[_0x1e481c(0x157)](_0x35ff69+0x1+'.\x20'+_0x2049eb+'\x20['+_0x3376de['command']+']\x20'+_0x3376de[_0x1e481c(0x15c)]),console[_0x1e481c(0x157)](_0x1e481c(0x15e)+_0x202538),_0x3376de[_0x1e481c(0x164)]&&console['log'](_0x1e481c(0x154)+_0x3376de[_0x1e481c(0x164)]+'ms'),_0x3376de['details']&&Object['keys'](_0x3376de['details'])[_0x1e481c(0x159)]>0x0&&console[_0x1e481c(0x157)](_0x1e481c(0x152)+JSON['stringify'](_0x3376de['details'],null,0x2)),console[_0x1e481c(0x157)]('');});}export function clearLogs(){const _0x155e82=a32_0x10b6;logger[_0x155e82(0x161)](process[_0x155e82(0x15b)]()),logger[_0x155e82(0x163)](),console[_0x155e82(0x157)](_0x155e82(0x166));}
1
+ (function(_0x41463c,_0x1d7faf){const _0x1c09ba=a32_0x2bad,_0x4429ba=_0x41463c();while(!![]){try{const _0x58ae3c=parseInt(_0x1c09ba(0x1a4))/0x1*(parseInt(_0x1c09ba(0x1a5))/0x2)+-parseInt(_0x1c09ba(0x196))/0x3+-parseInt(_0x1c09ba(0x1a0))/0x4*(-parseInt(_0x1c09ba(0x19b))/0x5)+-parseInt(_0x1c09ba(0x19a))/0x6+-parseInt(_0x1c09ba(0x19f))/0x7*(parseInt(_0x1c09ba(0x1ac))/0x8)+-parseInt(_0x1c09ba(0x1a9))/0x9+parseInt(_0x1c09ba(0x1af))/0xa;if(_0x58ae3c===_0x1d7faf)break;else _0x4429ba['push'](_0x4429ba['shift']());}catch(_0x4150a7){_0x4429ba['push'](_0x4429ba['shift']());}}}(a32_0x2aa2,0xd1bef));function a32_0x2bad(_0x2db67c,_0x2738e8){_0x2db67c=_0x2db67c-0x193;const _0x2aa232=a32_0x2aa2();let _0x2bad6f=_0x2aa232[_0x2db67c];return _0x2bad6f;}import{logger}from'../utils/logger.js';export function showLogs(){const _0x2e75a7=a32_0x2bad;logger['setLogPath'](process[_0x2e75a7(0x1b0)]());const _0x497ddf=logger['readLogs']();if(_0x497ddf['length']===0x0){console[_0x2e75a7(0x1a2)](_0x2e75a7(0x1aa));return;}console[_0x2e75a7(0x1a2)](_0x2e75a7(0x194)),_0x497ddf[_0x2e75a7(0x1ad)]((_0x362980,_0x48dcf0)=>{const _0x58b4a3=_0x2e75a7,_0x2771a0=new Date(_0x362980[_0x58b4a3(0x1a8)])[_0x58b4a3(0x1a3)]('zh-CN'),_0x24d24e=_0x362980[_0x58b4a3(0x1ae)]===_0x58b4a3(0x19c)?'√':_0x362980[_0x58b4a3(0x1ae)]==='error'?'×':_0x362980[_0x58b4a3(0x1ae)]==='warn'?'!':'i';console[_0x58b4a3(0x1a2)](_0x48dcf0+0x1+'.\x20'+_0x24d24e+'\x20['+_0x362980['command']+']\x20'+_0x362980[_0x58b4a3(0x1a6)]),console[_0x58b4a3(0x1a2)](_0x58b4a3(0x193)+_0x2771a0),_0x362980[_0x58b4a3(0x1a1)]&&console[_0x58b4a3(0x1a2)](_0x58b4a3(0x1a7)+_0x362980['duration']+'ms'),_0x362980[_0x58b4a3(0x19d)]&&Object[_0x58b4a3(0x197)](_0x362980['details'])[_0x58b4a3(0x19e)]>0x0&&console[_0x58b4a3(0x1a2)](_0x58b4a3(0x195)+JSON[_0x58b4a3(0x1ab)](_0x362980[_0x58b4a3(0x19d)],null,0x2)),console['log']('');});}export function clearLogs(){const _0x1d29d3=a32_0x2bad;logger[_0x1d29d3(0x199)](process[_0x1d29d3(0x1b0)]()),logger[_0x1d29d3(0x198)](),console[_0x1d29d3(0x1a2)]('*\x20日志已清空');}function a32_0x2aa2(){const _0x3eb406=['14662260evmpek','cwd','\x20\x20\x20时间:\x20','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','\x20\x20\x20详情:\x20','2570118enKfDY','keys','clearLogs','setLogPath','2452428QNuYBV','4106805dsTUZM','success','details','length','21OVyNHX','8jjsaFk','duration','log','toLocaleString','67434ppIzJl','30rUlces','message','\x20\x20\x20耗时:\x20','timestamp','3318552gspuHa','*\x20暂无日志记录','stringify','4339112tMLIhl','forEach','level'];a32_0x2aa2=function(){return _0x3eb406;};return a32_0x2aa2();}
@@ -1 +1 @@
1
- (function(_0x2a1a0f,_0x1f25c9){const _0x40b2a4=a33_0x4774,_0x1792d7=_0x2a1a0f();while(!![]){try{const _0x37c29b=parseInt(_0x40b2a4(0xb7))/0x1*(parseInt(_0x40b2a4(0xb5))/0x2)+-parseInt(_0x40b2a4(0xae))/0x3+parseInt(_0x40b2a4(0xb9))/0x4+parseInt(_0x40b2a4(0xbb))/0x5+-parseInt(_0x40b2a4(0xb6))/0x6*(parseInt(_0x40b2a4(0xb0))/0x7)+parseInt(_0x40b2a4(0xc0))/0x8+parseInt(_0x40b2a4(0xb3))/0x9;if(_0x37c29b===_0x1f25c9)break;else _0x1792d7['push'](_0x1792d7['shift']());}catch(_0x3676db){_0x1792d7['push'](_0x1792d7['shift']());}}}(a33_0x1d20,0x56120));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a33_0x4774(_0x58bac6,_0x4ea04a){_0x58bac6=_0x58bac6-0xa3;const _0x1d2010=a33_0x1d20();let _0x477499=_0x1d2010[_0x58bac6];return _0x477499;}function a33_0x1d20(){const _0x1dbe04=['data','1704055XWIvZv','trim','.bin','info','cwd','610432iPMgOM','preview','inherit','stderr','预览服务器启动失败','node_modules','启动预览服务器','预览服务器启动出错','now','close','pipe','vite\x20preview','2072055KSrDOx','toString','3504361aGPGip','env','vite','8868699YSgAso','success','62024goPSjk','6ddcpPA','3QMqffy','message','193160UBiZTV'];a33_0x1d20=function(){return _0x1dbe04;};return a33_0x1d20();}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x5ae9ad,_0x3d1874)=>{const _0x204d5e=a33_0x4774,_0xd1d61=Date[_0x204d5e(0xaa)]();logger[_0x204d5e(0xbe)]('preview',_0x204d5e(0xa8),{'command':_0x204d5e(0xad)});let _0x49baa3='';const _0x4b82d5=spawn(_0x204d5e(0xb2),[_0x204d5e(0xa3)],{'stdio':[_0x204d5e(0xa4),_0x204d5e(0xa4),_0x204d5e(0xac)],'shell':!![],'env':{...process[_0x204d5e(0xb1)],'PATH':''+join(process[_0x204d5e(0xbf)](),_0x204d5e(0xa7),_0x204d5e(0xbd))+delimiter+process[_0x204d5e(0xb1)]['PATH']}});_0x4b82d5[_0x204d5e(0xa5)]?.['on'](_0x204d5e(0xba),_0x40f17a=>{const _0x5050af=_0x204d5e;_0x49baa3+=_0x40f17a[_0x5050af(0xaf)]();}),_0x4b82d5['on'](_0x204d5e(0xab),_0x154d1a=>{const _0x1d091c=_0x204d5e,_0x1f9bba=Date[_0x1d091c(0xaa)]()-_0xd1d61;if(_0x154d1a===0x0||_0x154d1a===null)logger[_0x1d091c(0xb4)](_0x1d091c(0xa3),'预览服务器启动成功',_0x1f9bba),_0x5ae9ad();else{const _0x5df6a9={'exitCode':_0x154d1a,'duration':_0x1f9bba,'command':_0x1d091c(0xad),'cwd':process[_0x1d091c(0xbf)]()};_0x49baa3[_0x1d091c(0xbc)]()&&(_0x5df6a9[_0x1d091c(0xa5)]=_0x49baa3[_0x1d091c(0xbc)]()),logger['error']('preview',_0x1d091c(0xa6),_0x5df6a9),_0x3d1874(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x154d1a));}}),_0x4b82d5['on']('error',_0x23bd51=>{const _0x2ffdde=_0x204d5e,_0x1801d6=Date[_0x2ffdde(0xaa)]()-_0xd1d61;logger['error']('preview',_0x2ffdde(0xa9),{'error':_0x23bd51[_0x2ffdde(0xb8)],'duration':_0x1801d6,'stderr':_0x49baa3[_0x2ffdde(0xbc)]()||undefined}),_0x3d1874(_0x23bd51);});});}
1
+ (function(_0x406255,_0x9e5661){const _0x38557d=a33_0xa797,_0x4be167=_0x406255();while(!![]){try{const _0x579718=-parseInt(_0x38557d(0x1da))/0x1*(parseInt(_0x38557d(0x1f3))/0x2)+parseInt(_0x38557d(0x1df))/0x3*(parseInt(_0x38557d(0x1ee))/0x4)+-parseInt(_0x38557d(0x1dc))/0x5+-parseInt(_0x38557d(0x1e1))/0x6+-parseInt(_0x38557d(0x1e7))/0x7*(parseInt(_0x38557d(0x1de))/0x8)+parseInt(_0x38557d(0x1f2))/0x9*(parseInt(_0x38557d(0x1dd))/0xa)+parseInt(_0x38557d(0x1eb))/0xb*(parseInt(_0x38557d(0x1ed))/0xc);if(_0x579718===_0x9e5661)break;else _0x4be167['push'](_0x4be167['shift']());}catch(_0x1c8339){_0x4be167['push'](_0x4be167['shift']());}}}(a33_0x4fb2,0xf2130));import{delimiter,join}from'node:path';function a33_0xa797(_0x737a2e,_0xf022aa){_0x737a2e=_0x737a2e-0x1d8;const _0x4fb28e=a33_0x4fb2();let _0xa7971d=_0x4fb28e[_0x737a2e];return _0xa7971d;}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x5965a3,_0x342cad)=>{const _0x33cb38=a33_0xa797,_0x1d76c4=Date['now']();logger[_0x33cb38(0x1f0)](_0x33cb38(0x1ef),_0x33cb38(0x1f5),{'command':_0x33cb38(0x1db)});let _0x2ca1ff='';const _0x512c9f=spawn('vite',[_0x33cb38(0x1ef)],{'stdio':[_0x33cb38(0x1e2),_0x33cb38(0x1e2),_0x33cb38(0x1d9)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x33cb38(0x1f6)](),'node_modules',_0x33cb38(0x1e5))+delimiter+process['env'][_0x33cb38(0x1e8)]}});_0x512c9f[_0x33cb38(0x1f4)]?.['on'](_0x33cb38(0x1e3),_0x373175=>{const _0x33a92e=_0x33cb38;_0x2ca1ff+=_0x373175[_0x33a92e(0x1ec)]();}),_0x512c9f['on']('close',_0x4dd59f=>{const _0x597b55=_0x33cb38,_0x478d44=Date[_0x597b55(0x1e0)]()-_0x1d76c4;if(_0x4dd59f===0x0||_0x4dd59f===null)logger[_0x597b55(0x1e6)](_0x597b55(0x1ef),_0x597b55(0x1ea),_0x478d44),_0x5965a3();else{const _0x2be0e5={'exitCode':_0x4dd59f,'duration':_0x478d44,'command':'vite\x20preview','cwd':process[_0x597b55(0x1f6)]()};_0x2ca1ff[_0x597b55(0x1e4)]()&&(_0x2be0e5[_0x597b55(0x1f4)]=_0x2ca1ff['trim']()),logger[_0x597b55(0x1e9)](_0x597b55(0x1ef),'预览服务器启动失败',_0x2be0e5),_0x342cad(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x4dd59f));}}),_0x512c9f['on'](_0x33cb38(0x1e9),_0x1ddc6d=>{const _0x24f326=_0x33cb38,_0x4a645e=Date['now']()-_0x1d76c4;logger['error']('preview',_0x24f326(0x1f1),{'error':_0x1ddc6d[_0x24f326(0x1d8)],'duration':_0x4a645e,'stderr':_0x2ca1ff[_0x24f326(0x1e4)]()||undefined}),_0x342cad(_0x1ddc6d);});});}function a33_0x4fb2(){const _0x43c993=['8aPPSbR','preview','info','预览服务器启动出错','21699MVLOOv','4892vBsRxn','stderr','启动预览服务器','cwd','message','pipe','570HwYAra','vite\x20preview','1828025AUuTtL','1110ZVbmsA','9904kNmRfN','2808453cBkXTq','now','2189904WrTWTH','inherit','data','trim','.bin','success','4928dchwrs','PATH','error','预览服务器启动成功','11UbFbMH','toString','22175688dJHnvt'];a33_0x4fb2=function(){return _0x43c993;};return a33_0x4fb2();}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x8f4bb,_0x469af8){const _0x5aba15=a34_0x25f6,_0x51dd50=_0x8f4bb();while(!![]){try{const _0x356f28=parseInt(_0x5aba15(0x125))/0x1*(parseInt(_0x5aba15(0x11e))/0x2)+-parseInt(_0x5aba15(0x10e))/0x3+parseInt(_0x5aba15(0x124))/0x4+-parseInt(_0x5aba15(0x127))/0x5*(parseInt(_0x5aba15(0x118))/0x6)+parseInt(_0x5aba15(0x10b))/0x7+parseInt(_0x5aba15(0x11f))/0x8+parseInt(_0x5aba15(0x11c))/0x9;if(_0x356f28===_0x469af8)break;else _0x51dd50['push'](_0x51dd50['shift']());}catch(_0x3c3074){_0x51dd50['push'](_0x51dd50['shift']());}}}(a34_0x1516,0x2c6c0));function a34_0x25f6(_0x24cc47,_0x417813){_0x24cc47=_0x24cc47-0x104;const _0x151627=a34_0x1516();let _0x25f6f8=_0x151627[_0x24cc47];return _0x25f6f8;}function a34_0x1516(){const _0x29127f=['1031925tKkEVS','开发服务器启动出错','vite','node_modules','inherit','stderr','success','close','start','1074164leojGP','cwd','version','429273xaayKM','minVersion','error','SDK\x20版本低于推荐版本','data','.bin','env','trim','warn','vite\x20exited\x20with\x20code\x20','6dvoGwf','PATH','开发服务器启动成功','开发服务器启动失败','548811IWEuep','toString','51026EmfYuz','12448dmGZIx','now','message','pipe','write','853556RocQlo','4gqxkxv','启动开发服务器'];a34_0x1516=function(){return _0x29127f;};return a34_0x1516();}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(_0x5d921a){return new Promise((_0x11c930,_0x59822a)=>{const _0x146af9=a34_0x25f6,_0x4f12e7=Date[_0x146af9(0x120)](),_0xf14073=_0x5d921a||process[_0x146af9(0x10c)](),_0x2ff68d=checkSdkVersion(_0xf14073);_0x2ff68d['needsUpgrade']&&(printSdkUpgradeWarning(_0x2ff68d),logger[_0x146af9(0x116)](_0x146af9(0x10a),_0x146af9(0x111),{'currentVersion':_0x2ff68d[_0x146af9(0x10d)],'minVersion':_0x2ff68d[_0x146af9(0x10f)]}));logger['info'](_0x146af9(0x10a),_0x146af9(0x126),{'command':_0x146af9(0x104),'cwd':_0xf14073});let _0x865e28='';const _0x3b43ba=spawn(_0x146af9(0x104),{'stdio':[_0x146af9(0x106),'inherit',_0x146af9(0x122)],'shell':!![],'cwd':_0xf14073,'env':{...process['env'],'PATH':''+join(_0xf14073,_0x146af9(0x105),_0x146af9(0x113))+delimiter+process[_0x146af9(0x114)][_0x146af9(0x119)]}});_0x3b43ba[_0x146af9(0x107)]?.['on'](_0x146af9(0x112),_0x23288d=>{const _0x304730=_0x146af9,_0x2a4949=_0x23288d[_0x304730(0x11d)]();_0x865e28+=_0x2a4949,process[_0x304730(0x107)][_0x304730(0x123)](_0x2a4949);}),_0x3b43ba['on'](_0x146af9(0x109),_0x17967a=>{const _0x2d730b=_0x146af9,_0x24faa9=Date[_0x2d730b(0x120)]()-_0x4f12e7;if(_0x17967a===0x0||_0x17967a===null)logger[_0x2d730b(0x108)]('start',_0x2d730b(0x11a),_0x24faa9),_0x11c930();else{const _0x245d90={'exitCode':_0x17967a,'duration':_0x24faa9,'command':'vite','cwd':_0xf14073};_0x865e28['trim']()&&(_0x245d90[_0x2d730b(0x107)]=_0x865e28['trim']()),logger['error'](_0x2d730b(0x10a),_0x2d730b(0x11b),_0x245d90),_0x59822a(new Error(_0x2d730b(0x117)+_0x17967a));}}),_0x3b43ba['on'](_0x146af9(0x110),_0x405280=>{const _0x145da1=_0x146af9,_0x5cbb0c=Date[_0x145da1(0x120)]()-_0x4f12e7,_0x421104={'error':_0x405280[_0x145da1(0x121)],'duration':_0x5cbb0c,'command':_0x145da1(0x104),'cwd':_0xf14073};_0x865e28[_0x145da1(0x115)]()&&(_0x421104[_0x145da1(0x107)]=_0x865e28[_0x145da1(0x115)]()),logger[_0x145da1(0x110)](_0x145da1(0x10a),_0x145da1(0x128),_0x421104),_0x59822a(_0x405280);});});}
1
+ (function(_0x31f3d9,_0x14266a){const _0x5829c1=a34_0x183d,_0x11e7d5=_0x31f3d9();while(!![]){try{const _0x113d06=parseInt(_0x5829c1(0x14a))/0x1+parseInt(_0x5829c1(0x12c))/0x2+-parseInt(_0x5829c1(0x13d))/0x3*(-parseInt(_0x5829c1(0x142))/0x4)+-parseInt(_0x5829c1(0x139))/0x5+-parseInt(_0x5829c1(0x136))/0x6*(parseInt(_0x5829c1(0x148))/0x7)+-parseInt(_0x5829c1(0x146))/0x8*(-parseInt(_0x5829c1(0x145))/0x9)+-parseInt(_0x5829c1(0x138))/0xa;if(_0x113d06===_0x14266a)break;else _0x11e7d5['push'](_0x11e7d5['shift']());}catch(_0x4e3f5e){_0x11e7d5['push'](_0x11e7d5['shift']());}}}(a34_0x3b37,0x7ca31));function a34_0x183d(_0x52e61c,_0x325836){_0x52e61c=_0x52e61c-0x129;const _0x3b3744=a34_0x3b37();let _0x183d4c=_0x3b3744[_0x52e61c];return _0x183d4c;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a34_0x3b37(){const _0x3ca07b=['开发服务器启动出错','626706FJuYcg','write','now','start','1210328SXBdye','error','trim','version','success','env','info','启动开发服务器','data','warn','246gvLLqV','vite\x20exited\x20with\x20code\x20','1445040CFQDbJ','2005370elpuEC','PATH','pipe','vite','179727tEehZp','message','stderr','toString','close','8eNwfSl','inherit','.bin','1622367JoqeMj','16YZioQd','needsUpgrade','112021xBIdqL'];a34_0x3b37=function(){return _0x3ca07b;};return a34_0x3b37();}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';export function runStart(_0x3bfb74){return new Promise((_0x127580,_0x1fcf20)=>{const _0x5d5d65=a34_0x183d,_0x871c81=Date['now'](),_0x457178=_0x3bfb74||process['cwd'](),_0x348490=checkSdkVersion(_0x457178);_0x348490[_0x5d5d65(0x147)]&&(printSdkUpgradeWarning(_0x348490),logger[_0x5d5d65(0x135)]('start','SDK\x20版本低于推荐版本',{'currentVersion':_0x348490[_0x5d5d65(0x12f)],'minVersion':_0x348490['minVersion']}));logger[_0x5d5d65(0x132)](_0x5d5d65(0x12b),_0x5d5d65(0x133),{'command':_0x5d5d65(0x13c),'cwd':_0x457178});let _0x17f0e7='';const _0x14ba52=spawn('vite',{'stdio':['inherit',_0x5d5d65(0x143),_0x5d5d65(0x13b)],'shell':!![],'cwd':_0x457178,'env':{...process[_0x5d5d65(0x131)],'PATH':''+join(_0x457178,'node_modules',_0x5d5d65(0x144))+delimiter+process[_0x5d5d65(0x131)][_0x5d5d65(0x13a)]}});_0x14ba52[_0x5d5d65(0x13f)]?.['on'](_0x5d5d65(0x134),_0x1f799a=>{const _0x271913=_0x5d5d65,_0x9f76cb=_0x1f799a[_0x271913(0x140)]();_0x17f0e7+=_0x9f76cb,process[_0x271913(0x13f)][_0x271913(0x129)](_0x9f76cb);}),_0x14ba52['on'](_0x5d5d65(0x141),_0x2618ff=>{const _0x298faf=_0x5d5d65,_0x215f27=Date[_0x298faf(0x12a)]()-_0x871c81;if(_0x2618ff===0x0||_0x2618ff===null)logger[_0x298faf(0x130)](_0x298faf(0x12b),'开发服务器启动成功',_0x215f27),_0x127580();else{const _0x2021d9={'exitCode':_0x2618ff,'duration':_0x215f27,'command':_0x298faf(0x13c),'cwd':_0x457178};_0x17f0e7[_0x298faf(0x12e)]()&&(_0x2021d9[_0x298faf(0x13f)]=_0x17f0e7[_0x298faf(0x12e)]()),logger[_0x298faf(0x12d)](_0x298faf(0x12b),'开发服务器启动失败',_0x2021d9),_0x1fcf20(new Error(_0x298faf(0x137)+_0x2618ff));}}),_0x14ba52['on'](_0x5d5d65(0x12d),_0x11ecd3=>{const _0x11b955=_0x5d5d65,_0x1df17f=Date[_0x11b955(0x12a)]()-_0x871c81,_0x5aff67={'error':_0x11ecd3[_0x11b955(0x13e)],'duration':_0x1df17f,'command':_0x11b955(0x13c),'cwd':_0x457178};_0x17f0e7[_0x11b955(0x12e)]()&&(_0x5aff67[_0x11b955(0x13f)]=_0x17f0e7[_0x11b955(0x12e)]()),logger[_0x11b955(0x12d)](_0x11b955(0x12b),_0x11b955(0x149),_0x5aff67),_0x1fcf20(_0x11ecd3);});});}
@@ -1 +1 @@
1
- function a35_0x2bdb(_0x2b997b,_0x3b35eb){_0x2b997b=_0x2b997b-0xb8;const _0x1c47ce=a35_0x1c47();let _0x2bdb54=_0x1c47ce[_0x2b997b];return _0x2bdb54;}(function(_0x4176f9,_0x259eb3){const _0x3b0979=a35_0x2bdb,_0x2900ec=_0x4176f9();while(!![]){try{const _0x4a9c5d=parseInt(_0x3b0979(0xcc))/0x1*(-parseInt(_0x3b0979(0xbf))/0x2)+parseInt(_0x3b0979(0xd0))/0x3*(parseInt(_0x3b0979(0xc1))/0x4)+-parseInt(_0x3b0979(0xcd))/0x5+-parseInt(_0x3b0979(0xc4))/0x6*(-parseInt(_0x3b0979(0xc6))/0x7)+-parseInt(_0x3b0979(0xc3))/0x8+parseInt(_0x3b0979(0xba))/0x9*(parseInt(_0x3b0979(0xc0))/0xa)+parseInt(_0x3b0979(0xc9))/0xb*(parseInt(_0x3b0979(0xc2))/0xc);if(_0x4a9c5d===_0x259eb3)break;else _0x2900ec['push'](_0x2900ec['shift']());}catch(_0x5383b2){_0x2900ec['push'](_0x2900ec['shift']());}}}(a35_0x1c47,0x37586));import{jsxs as a35_0x56081a,jsx as a35_0x2a332c}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x2519fa=a35_0x2bdb,_0x3c7d0f=[{'command':_0x2519fa(0xb9),'description':'设置配置项'},{'command':_0x2519fa(0xd1),'description':_0x2519fa(0xc7)},{'command':_0x2519fa(0xd2),'description':_0x2519fa(0xbb)}],_0xe1402b=[{'command':_0x2519fa(0xca),'description':_0x2519fa(0xbc)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x2519fa(0xbe)}];return a35_0x56081a(Box,{'flexDirection':_0x2519fa(0xbd),'marginTop':0x1,'marginBottom':0x1,'children':[a35_0x2a332c(Box,{'marginBottom':0x1,'children':a35_0x56081a(Text,{'color':_0x2519fa(0xcb),'children':['\x20!','\x20\x20',_0x2519fa(0xcf)]})}),_0x3c7d0f[_0x2519fa(0xc5)](_0x1398f7=>a35_0x56081a(Box,{'children':[a35_0x56081a(Text,{'children':[_0x2519fa(0xc8),_0x1398f7[_0x2519fa(0xd3)]]}),a35_0x2a332c(Text,{'color':_0x2519fa(0xcb),'children':_0x1398f7[_0x2519fa(0xce)]})]},_0x1398f7[_0x2519fa(0xd3)])),a35_0x2a332c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x2a332c(Text,{'color':_0x2519fa(0xcb),'children':_0x2519fa(0xb8)})}),_0xe1402b['map'](_0x4f49ce=>a35_0x56081a(Box,{'children':[a35_0x56081a(Text,{'children':[_0x2519fa(0xc8),_0x4f49ce[_0x2519fa(0xd3)]]}),a35_0x2a332c(Text,{'color':'gray','children':_0x4f49ce['description']})]},_0x4f49ce['command']))]});}function a35_0x1c47(){const _0x23f417=['99372FTKrLO','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','\x20*\x20配置示例:','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','579825LZpiYO','列出所有配置项','配置当前项目的\x20App\x20Code','column','设置环境\x20(online/daily)','109070vPANKm','70DlmBSC','16yjdXHN','64068yEwTMW','2866344xVpKdy','1740qirexB','map','1085aKuFdj','获取配置项','\x20\x20\x20\x20','869FzNCEV','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','gray','5tXuBpO','962700DezDwI','description','无效的命令,可用命令如下:'];a35_0x1c47=function(){return _0x23f417;};return a35_0x1c47();}
1
+ function a35_0x23ad(_0x5da8ea,_0x4d825d){_0x5da8ea=_0x5da8ea-0x15a;const _0x407dc4=a35_0x407d();let _0x23adb6=_0x407dc4[_0x5da8ea];return _0x23adb6;}(function(_0x261044,_0x1e45e8){const _0x1eef6f=a35_0x23ad,_0x27b283=_0x261044();while(!![]){try{const _0x478b85=-parseInt(_0x1eef6f(0x16b))/0x1*(parseInt(_0x1eef6f(0x15e))/0x2)+parseInt(_0x1eef6f(0x16d))/0x3+-parseInt(_0x1eef6f(0x15f))/0x4+parseInt(_0x1eef6f(0x167))/0x5+-parseInt(_0x1eef6f(0x169))/0x6*(-parseInt(_0x1eef6f(0x172))/0x7)+parseInt(_0x1eef6f(0x15c))/0x8*(parseInt(_0x1eef6f(0x161))/0x9)+parseInt(_0x1eef6f(0x15d))/0xa*(-parseInt(_0x1eef6f(0x171))/0xb);if(_0x478b85===_0x1e45e8)break;else _0x27b283['push'](_0x27b283['shift']());}catch(_0x9b9af8){_0x27b283['push'](_0x27b283['shift']());}}}(a35_0x407d,0xa1cc0));import{jsxs as a35_0x44f631,jsx as a35_0x243e1f}from'react/jsx-runtime';function a35_0x407d(){const _0x3c819a=['列出所有配置项','配置当前项目的\x20App\x20Code','178893TfwRMf','32774ycPBza','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','gray','8WwNCSR','690vMnWDX','27072rjsQak','3765896VbmGyp','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','6567948VLbZNl','获取配置项','\x20*\x20配置示例:','\x20\x20\x20\x20','description','column','5493340KrXztt','设置环境\x20(online/daily)','678IIyvvW','无效的命令,可用命令如下:','6odsnvp','map','1350153WkSYIh','command'];a35_0x407d=function(){return _0x3c819a;};return a35_0x407d();}import{Box,Text}from'ink';export function ConfigHelp(){const _0x653ebb=a35_0x23ad,_0x2f5e73=[{'command':_0x653ebb(0x160),'description':'设置配置项'},{'command':'lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x653ebb(0x162)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x653ebb(0x16f)}],_0xb84658=[{'command':_0x653ebb(0x15a),'description':_0x653ebb(0x170)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x653ebb(0x168)}];return a35_0x44f631(Box,{'flexDirection':_0x653ebb(0x166),'marginTop':0x1,'marginBottom':0x1,'children':[a35_0x243e1f(Box,{'marginBottom':0x1,'children':a35_0x44f631(Text,{'color':'gray','children':['\x20!','\x20\x20',_0x653ebb(0x16a)]})}),_0x2f5e73[_0x653ebb(0x16c)](_0x1e80a3=>a35_0x44f631(Box,{'children':[a35_0x44f631(Text,{'children':[_0x653ebb(0x164),_0x1e80a3['command']]}),a35_0x243e1f(Text,{'color':_0x653ebb(0x15b),'children':_0x1e80a3['description']})]},_0x1e80a3[_0x653ebb(0x16e)])),a35_0x243e1f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x243e1f(Text,{'color':'gray','children':_0x653ebb(0x163)})}),_0xb84658[_0x653ebb(0x16c)](_0x531f97=>a35_0x44f631(Box,{'children':[a35_0x44f631(Text,{'children':[_0x653ebb(0x164),_0x531f97[_0x653ebb(0x16e)]]}),a35_0x243e1f(Text,{'color':_0x653ebb(0x15b),'children':_0x531f97[_0x653ebb(0x165)]})]},_0x531f97[_0x653ebb(0x16e)]))]});}
@@ -1 +1 @@
1
- (function(_0x3ea12d,_0x20e735){const _0x4922a4=a36_0x26f8,_0x51c200=_0x3ea12d();while(!![]){try{const _0x2cf155=parseInt(_0x4922a4(0x197))/0x1*(parseInt(_0x4922a4(0x186))/0x2)+-parseInt(_0x4922a4(0x190))/0x3*(parseInt(_0x4922a4(0x18e))/0x4)+-parseInt(_0x4922a4(0x18f))/0x5+parseInt(_0x4922a4(0x188))/0x6*(parseInt(_0x4922a4(0x199))/0x7)+parseInt(_0x4922a4(0x17e))/0x8+parseInt(_0x4922a4(0x196))/0x9+-parseInt(_0x4922a4(0x17d))/0xa;if(_0x2cf155===_0x20e735)break;else _0x51c200['push'](_0x51c200['shift']());}catch(_0x439b3c){_0x51c200['push'](_0x51c200['shift']());}}}(a36_0x5f37,0x2f282));import{jsx as a36_0x1d942c,jsxs as a36_0x285424}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x280ef1 from'node:fs';import a36_0x3a422f from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a36_0x5f37(){const _0x4f3b37=['2089480CylGNe','flags','includes','.tmp','保存配置失败','daily','parse','配置值无效或过长','718598xciKKQ','undefined','138324vnIYPw','环境配置已设置为:\x20','length','message','log','string','168ogjxbJ','821515tZPmJF','405YpYUHf','red','保存配置失败:\x20','dirname','list','未提供配置值','2087775ZyIwlO','1KSWOSe','env','35GcTEqk','unlinkSync','input','set','utf8','appcode','get','online','stringify','--help','app','6046020UJcVyK'];a36_0x5f37=function(){return _0x4f3b37;};return a36_0x5f37();}import{logger}from'../utils/logger.js';function a36_0x26f8(_0x1a92fd,_0x3e7db9){_0x1a92fd=_0x1a92fd-0x175;const _0x5f37c6=a36_0x5f37();let _0x26f86e=_0x5f37c6[_0x1a92fd];return _0x26f86e;}export function Config(_0x28e92d){const _0x3a6427=a36_0x26f8,{cli:_0x573afb}=_0x28e92d,_0x41a5a7=_0x573afb['input'][0x1],_0x190496=_0x573afb[_0x3a6427(0x19b)][0x2],_0x1d824c=[_0x3a6427(0x175),_0x3a6427(0x178)][_0x3a6427(0x180)](_0x41a5a7||''),_0x4ab5fd=_0x573afb['input'][_0x3a6427(0x18a)]>=0x3;if(_0x190496===_0x3a6427(0x17b)||_0x573afb[_0x3a6427(0x17f)]['help'])return a36_0x1d942c(ConfigHelp,{});const _0x1693ba=readConfig();if(_0x41a5a7==='set'){if(_0x190496){const _0x67a80a=_0x573afb[_0x3a6427(0x19b)][0x3];if(typeof _0x67a80a!==_0x3a6427(0x187)){if(_0x190496===_0x3a6427(0x198)&&![_0x3a6427(0x179),_0x3a6427(0x183)]['includes'](_0x67a80a))return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':_0x3a6427(0x191),'children':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22'})});const _0x435096=isInProject(),_0x324ec0=_0x435096?projectConfigPath:globalConfigPath;let _0x8737b8={};try{if(existsSync(_0x324ec0)){const _0x502113=readFileSync(_0x324ec0,{'encoding':_0x3a6427(0x176)});_0x502113&&(_0x8737b8=JSON[_0x3a6427(0x184)](_0x502113));}}catch(_0x17e0f2){}if(typeof _0x67a80a!==_0x3a6427(0x18d)||_0x67a80a['length']>0x1f4)return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':'red','children':_0x3a6427(0x185)})});let _0x1319ee=_0x190496;_0x190496===_0x3a6427(0x17c)&&(_0x1319ee=_0x3a6427(0x177),delete _0x8737b8[_0x3a6427(0x17c)]);_0x190496===_0x3a6427(0x177)&&delete _0x8737b8[_0x3a6427(0x17c)];_0x8737b8[_0x1319ee]=_0x67a80a;try{const _0x1ba1db=a36_0x3a422f[_0x3a6427(0x193)](_0x324ec0);!existsSync(_0x1ba1db)&&a36_0x280ef1['mkdirSync'](_0x1ba1db,{'recursive':!![]});const _0x1b95c0=_0x324ec0+_0x3a6427(0x181);writeFileSync(_0x1b95c0,JSON[_0x3a6427(0x17a)](_0x8737b8,null,0x2),{'encoding':_0x3a6427(0x176),'mode':0x180}),a36_0x280ef1['renameSync'](_0x1b95c0,_0x324ec0);if(_0x190496===_0x3a6427(0x198)){const _0x49950c=_0x435096?'项目':'全局';console[_0x3a6427(0x18c)]('✓\x20'+_0x49950c+_0x3a6427(0x189)+_0x67a80a);}}catch(_0x3eadfe){const _0x3b49aa=_0x324ec0+'.tmp';try{existsSync(_0x3b49aa)&&a36_0x280ef1[_0x3a6427(0x19a)](_0x3b49aa);}catch(_0x3a748e){}return logger['error']('config',_0x3a6427(0x182),{'error':_0x3eadfe instanceof Error?_0x3eadfe[_0x3a6427(0x18b)]:String(_0x3eadfe),'configKey':_0x190496,'configValue':_0x67a80a,'targetConfigPath':_0x324ec0}),a36_0x1d942c(Box,{'children':a36_0x285424(Text,{'color':_0x3a6427(0x191),'children':[_0x3a6427(0x192),_0x3eadfe instanceof Error?_0x3eadfe['message']:String(_0x3eadfe)]})});}return null;}return a36_0x1d942c(Box,{'children':a36_0x1d942c(Text,{'color':'red','children':_0x3a6427(0x195)})});}}if(_0x41a5a7===_0x3a6427(0x178)){if(_0x190496){let _0x55bbbe=_0x190496;return _0x190496==='app'&&(_0x55bbbe='appcode'),console[_0x3a6427(0x18c)](_0x1693ba[_0x55bbbe]||'undefined'),null;}return null;}if(_0x41a5a7===_0x3a6427(0x194))return console[_0x3a6427(0x18c)](JSON[_0x3a6427(0x17a)](_0x1693ba,null,0x2)),null;if(!_0x1d824c||!_0x4ab5fd)return a36_0x1d942c(ConfigHelp,{});return null;}
1
+ (function(_0x4620ce,_0x620369){const _0x1da581=a36_0xc9f6,_0x2a574e=_0x4620ce();while(!![]){try{const _0x52f1a2=-parseInt(_0x1da581(0x1bc))/0x1+-parseInt(_0x1da581(0x1b3))/0x2*(parseInt(_0x1da581(0x1c4))/0x3)+-parseInt(_0x1da581(0x1cb))/0x4*(-parseInt(_0x1da581(0x1c8))/0x5)+parseInt(_0x1da581(0x1c3))/0x6+-parseInt(_0x1da581(0x1be))/0x7*(-parseInt(_0x1da581(0x1c2))/0x8)+parseInt(_0x1da581(0x1bd))/0x9+-parseInt(_0x1da581(0x1ce))/0xa*(parseInt(_0x1da581(0x1ad))/0xb);if(_0x52f1a2===_0x620369)break;else _0x2a574e['push'](_0x2a574e['shift']());}catch(_0x3c861c){_0x2a574e['push'](_0x2a574e['shift']());}}}(a36_0x24dc,0x87555));import{jsx as a36_0x4fdbc5,jsxs as a36_0x3f08cc}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x1e7420 from'node:fs';function a36_0xc9f6(_0x8c627,_0x4b2c85){_0x8c627=_0x8c627-0x1a8;const _0x24dc5b=a36_0x24dc();let _0xc9f650=_0x24dc5b[_0x8c627];return _0xc9f650;}function a36_0x24dc(){const _0x332e16=['undefined','mkdirSync','input','496486IrnwXr','config','online','help','stringify','配置值无效或过长','appcode','保存配置失败','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','34690rBqlVA','8589132VrJMrt','289625wInhnN','未提供配置值','app','flags','40UIJRNV','4721454UqgaZa','3kKBUCs','includes','dirname','message','2584355qbxLiS','env','string','8FFuOlA','set','red','10723080qZouBM','utf8','daily','length','.tmp','get','log','--help','parse','环境配置已设置为:\x20','22XAdAMm','renameSync','error'];a36_0x24dc=function(){return _0x332e16;};return a36_0x24dc();}import a36_0x3b8e7e 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(_0x11438f){const _0x13a729=a36_0xc9f6,{cli:_0x34a5a0}=_0x11438f,_0x5e5be1=_0x34a5a0['input'][0x1],_0x5f0a4f=_0x34a5a0['input'][0x2],_0x481d8f=[_0x13a729(0x1cc),'get'][_0x13a729(0x1c5)](_0x5e5be1||''),_0x4ae147=_0x34a5a0[_0x13a729(0x1b2)][_0x13a729(0x1d1)]>=0x3;if(_0x5f0a4f===_0x13a729(0x1aa)||_0x34a5a0[_0x13a729(0x1c1)][_0x13a729(0x1b6)])return a36_0x4fdbc5(ConfigHelp,{});const _0x98ba6d=readConfig();if(_0x5e5be1===_0x13a729(0x1cc)){if(_0x5f0a4f){const _0x15173f=_0x34a5a0['input'][0x3];if(typeof _0x15173f!=='undefined'){if(_0x5f0a4f==='env'&&![_0x13a729(0x1b5),_0x13a729(0x1d0)]['includes'](_0x15173f))return a36_0x4fdbc5(Box,{'children':a36_0x4fdbc5(Text,{'color':'red','children':_0x13a729(0x1bb)})});const _0xdcd054=isInProject(),_0x3939ea=_0xdcd054?projectConfigPath:globalConfigPath;let _0x25fd78={};try{if(existsSync(_0x3939ea)){const _0x3bda8f=readFileSync(_0x3939ea,{'encoding':_0x13a729(0x1cf)});_0x3bda8f&&(_0x25fd78=JSON[_0x13a729(0x1ab)](_0x3bda8f));}}catch(_0x106bb2){}if(typeof _0x15173f!==_0x13a729(0x1ca)||_0x15173f['length']>0x1f4)return a36_0x4fdbc5(Box,{'children':a36_0x4fdbc5(Text,{'color':_0x13a729(0x1cd),'children':_0x13a729(0x1b8)})});let _0x3b5d6c=_0x5f0a4f;_0x5f0a4f===_0x13a729(0x1c0)&&(_0x3b5d6c=_0x13a729(0x1b9),delete _0x25fd78['app']);_0x5f0a4f===_0x13a729(0x1b9)&&delete _0x25fd78[_0x13a729(0x1c0)];_0x25fd78[_0x3b5d6c]=_0x15173f;try{const _0x2bd1b1=a36_0x3b8e7e[_0x13a729(0x1c6)](_0x3939ea);!existsSync(_0x2bd1b1)&&a36_0x1e7420[_0x13a729(0x1b1)](_0x2bd1b1,{'recursive':!![]});const _0x9846c1=_0x3939ea+_0x13a729(0x1d2);writeFileSync(_0x9846c1,JSON[_0x13a729(0x1b7)](_0x25fd78,null,0x2),{'encoding':'utf8','mode':0x180}),a36_0x1e7420[_0x13a729(0x1ae)](_0x9846c1,_0x3939ea);if(_0x5f0a4f===_0x13a729(0x1c9)){const _0x2ee694=_0xdcd054?'项目':'全局';console[_0x13a729(0x1a9)]('✓\x20'+_0x2ee694+_0x13a729(0x1ac)+_0x15173f);}}catch(_0x5a3a6c){const _0x303b58=_0x3939ea+'.tmp';try{existsSync(_0x303b58)&&a36_0x1e7420['unlinkSync'](_0x303b58);}catch(_0x393242){}return logger[_0x13a729(0x1af)](_0x13a729(0x1b4),_0x13a729(0x1ba),{'error':_0x5a3a6c instanceof Error?_0x5a3a6c[_0x13a729(0x1c7)]:String(_0x5a3a6c),'configKey':_0x5f0a4f,'configValue':_0x15173f,'targetConfigPath':_0x3939ea}),a36_0x4fdbc5(Box,{'children':a36_0x3f08cc(Text,{'color':_0x13a729(0x1cd),'children':['保存配置失败:\x20',_0x5a3a6c instanceof Error?_0x5a3a6c['message']:String(_0x5a3a6c)]})});}return null;}return a36_0x4fdbc5(Box,{'children':a36_0x4fdbc5(Text,{'color':'red','children':_0x13a729(0x1bf)})});}}if(_0x5e5be1===_0x13a729(0x1a8)){if(_0x5f0a4f){let _0x4fc982=_0x5f0a4f;return _0x5f0a4f===_0x13a729(0x1c0)&&(_0x4fc982=_0x13a729(0x1b9)),console['log'](_0x98ba6d[_0x4fc982]||_0x13a729(0x1b0)),null;}return null;}if(_0x5e5be1==='list')return console[_0x13a729(0x1a9)](JSON[_0x13a729(0x1b7)](_0x98ba6d,null,0x2)),null;if(!_0x481d8f||!_0x4ae147)return a36_0x4fdbc5(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a37_0x22d55e=a37_0x5370;function a37_0x5370(_0x63b38f,_0x105b5b){_0x63b38f=_0x63b38f-0x10c;const _0x37a211=a37_0x37a2();let _0x537095=_0x37a211[_0x63b38f];return _0x537095;}(function(_0x22c668,_0x451442){const _0x12cd48=a37_0x5370,_0x541e69=_0x22c668();while(!![]){try{const _0x269b08=-parseInt(_0x12cd48(0x118))/0x1*(-parseInt(_0x12cd48(0x10e))/0x2)+parseInt(_0x12cd48(0x10f))/0x3+-parseInt(_0x12cd48(0x119))/0x4+parseInt(_0x12cd48(0x11a))/0x5*(parseInt(_0x12cd48(0x11b))/0x6)+-parseInt(_0x12cd48(0x115))/0x7*(parseInt(_0x12cd48(0x113))/0x8)+-parseInt(_0x12cd48(0x11c))/0x9*(parseInt(_0x12cd48(0x117))/0xa)+parseInt(_0x12cd48(0x112))/0xb*(parseInt(_0x12cd48(0x111))/0xc);if(_0x269b08===_0x451442)break;else _0x541e69['push'](_0x541e69['shift']());}catch(_0x2a7b07){_0x541e69['push'](_0x541e69['shift']());}}}(a37_0x37a2,0x619c7));function a37_0x37a2(){const _0x465eb2=['2yReHig','1376877QztaSc','online','12348xzOgVx','8371QCfhni','8yKyqbv','https://api.lovrabet.com','1724023ONqhse','https://user.lovrabet.com','20nKfQZv','409074gOmvxA','1585592QwZMJj','30DRoxPz','50610OdRPxH','2966445qtLGny','https://daily-api.lovrabet.com','https://user-daily.lovrabet.com'];a37_0x37a2=function(){return _0x465eb2;};return a37_0x37a2();}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()==='online'?a37_0x22d55e(0x116):a37_0x22d55e(0x10d);export const getApiDomain=()=>getEnv()===a37_0x22d55e(0x110)?a37_0x22d55e(0x114):a37_0x22d55e(0x10c);
1
+ const a37_0x56e973=a37_0x1056;function a37_0x1056(_0x516617,_0x157641){_0x516617=_0x516617-0x6a;const _0x127d0e=a37_0x127d();let _0x105611=_0x127d0e[_0x516617];return _0x105611;}function a37_0x127d(){const _0x56b9f3=['804858OoLdbS','https://api.lovrabet.com','389gsjFkv','330010CBkIvq','https://user-daily.lovrabet.com','online','https://user.lovrabet.com','1082uNQTEB','3950597KKAkRJ','6miuUjC','36HiCKvr','2397970Ogfyuu','https://daily-api.lovrabet.com','493228xsxnhq','6552136xxpadq'];a37_0x127d=function(){return _0x56b9f3;};return a37_0x127d();}(function(_0x32a10f,_0x3506bc){const _0x355b6d=a37_0x1056,_0x1cc41c=_0x32a10f();while(!![]){try{const _0xd6103=parseInt(_0x355b6d(0x78))/0x1*(-parseInt(_0x355b6d(0x6e))/0x2)+-parseInt(_0x355b6d(0x76))/0x3+-parseInt(_0x355b6d(0x74))/0x4+-parseInt(_0x355b6d(0x72))/0x5+parseInt(_0x355b6d(0x70))/0x6*(parseInt(_0x355b6d(0x6f))/0x7)+parseInt(_0x355b6d(0x75))/0x8+-parseInt(_0x355b6d(0x71))/0x9*(-parseInt(_0x355b6d(0x6a))/0xa);if(_0xd6103===_0x3506bc)break;else _0x1cc41c['push'](_0x1cc41c['shift']());}catch(_0x44fecd){_0x1cc41c['push'](_0x1cc41c['shift']());}}}(a37_0x127d,0x69e5c));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a37_0x56e973(0x6c)?a37_0x56e973(0x6d):a37_0x56e973(0x6b);export const getApiDomain=()=>getEnv()==='online'?a37_0x56e973(0x77):a37_0x56e973(0x73);
@@ -1 +1 @@
1
- const a38_0x24b6a5=a38_0xb1e2;(function(_0x4a92b8,_0x3f4f71){const _0x248429=a38_0xb1e2,_0x157d6c=_0x4a92b8();while(!![]){try{const _0x1f2b2c=-parseInt(_0x248429(0xf3))/0x1*(-parseInt(_0x248429(0xf0))/0x2)+parseInt(_0x248429(0xef))/0x3+-parseInt(_0x248429(0xf1))/0x4*(parseInt(_0x248429(0xed))/0x5)+-parseInt(_0x248429(0xeb))/0x6*(parseInt(_0x248429(0xec))/0x7)+parseInt(_0x248429(0xea))/0x8*(parseInt(_0x248429(0xe9))/0x9)+-parseInt(_0x248429(0xf2))/0xa*(-parseInt(_0x248429(0xf4))/0xb)+-parseInt(_0x248429(0xee))/0xc;if(_0x1f2b2c===_0x3f4f71)break;else _0x157d6c['push'](_0x157d6c['shift']());}catch(_0x47a3bd){_0x157d6c['push'](_0x157d6c['shift']());}}}(a38_0x340d,0xcf365));let env=process[a38_0x24b6a5(0xe8)][a38_0x24b6a5(0xe7)]||'online';export function getEnv(){return env;}function a38_0xb1e2(_0x5354e3,_0x2d58da){_0x5354e3=_0x5354e3-0xe7;const _0x340de6=a38_0x340d();let _0xb1e2f=_0x340de6[_0x5354e3];return _0xb1e2f;}function a38_0x340d(){const _0x98673c=['2SZYGkS','44363feZgWU','LOVRABET_ENV','env','9RDpIGv','6172520SRDyyi','2298690lzuJZm','28kVXwqy','1070mMnlIc','2783832rZOzeX','302076czObuY','1316334yrlyiu','20860CQIkVq','3820yulGAJ'];a38_0x340d=function(){return _0x98673c;};return a38_0x340d();}export function initEnv(_0x3c7f43){env=_0x3c7f43;}
1
+ function a38_0x1e7d(){const _0x4b2ca4=['272EjFGUm','2610mVkLLL','61457BqWesx','4910710cXSpJD','10622538YOrJPe','346515OmlJFt','297633dbNhlP','2274570YlZpEw','124011RydrDu','6laPdJL','env','online','12tHxvga'];a38_0x1e7d=function(){return _0x4b2ca4;};return a38_0x1e7d();}const a38_0xe993c5=a38_0x4bf1;(function(_0x59f167,_0x1bd475){const _0x169cbf=a38_0x4bf1,_0xb2cf2f=_0x59f167();while(!![]){try{const _0x3903c4=-parseInt(_0x169cbf(0x14b))/0x1+parseInt(_0x169cbf(0x14d))/0x2+parseInt(_0x169cbf(0x14e))/0x3*(-parseInt(_0x169cbf(0x145))/0x4)+parseInt(_0x169cbf(0x149))/0x5*(-parseInt(_0x169cbf(0x14f))/0x6)+parseInt(_0x169cbf(0x14c))/0x7*(-parseInt(_0x169cbf(0x146))/0x8)+parseInt(_0x169cbf(0x14a))/0x9+-parseInt(_0x169cbf(0x147))/0xa*(-parseInt(_0x169cbf(0x148))/0xb);if(_0x3903c4===_0x1bd475)break;else _0xb2cf2f['push'](_0xb2cf2f['shift']());}catch(_0x5f5cb9){_0xb2cf2f['push'](_0xb2cf2f['shift']());}}}(a38_0x1e7d,0xd6394));let env=process[a38_0xe993c5(0x150)]['LOVRABET_ENV']||a38_0xe993c5(0x151);function a38_0x4bf1(_0x436b01,_0x3c0991){_0x436b01=_0x436b01-0x145;const _0x1e7dad=a38_0x1e7d();let _0x4bf18d=_0x1e7dad[_0x436b01];return _0x4bf18d;}export function getEnv(){return env;}export function initEnv(_0x4f9a0a){env=_0x4f9a0a;}
@@ -1 +1 @@
1
- function a39_0x3c50(){const _0x912466=['*\x20项目名:\x20','619482IMOZew','!\x20未检测到有效登录','api-pull','login','return','yellow','[可选]:\x20','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','9ViKrvF','backspace','length','项目名长度不能超过\x2050\x20个字符','slice','map','login-check','项目名不合法','未设置','rightArrow','confirm-api-pull','*\x20是否要自动拉取\x20API\x20配置?','login-process','\x20登录中...','项目名','label','\x20\x20使用\x20←→\x20选择,回车确认','拉取API配置','green','登录状态','cyan','online','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','151451InOgRO','*\x20正在登录,请前往浏览器完成登录...','*\x20创建新项目','Yes','应用AppCode','login-prompt','gray','*\x20应用AppCode\x20','9708QlUoRQ','project-name','*\x20正在检查登录状态...','跳过登录','√\x20检测到有效登录状态','delete','604933EYMcxC','creating','\x20直接回车确认,或输入自定义名称','trim','应用AppCode不合法','leftArrow','my-app','7450920pVPlPb','env','column','585164tKGqQU','应用AppCode长度不能超过\x20100\x20个字符','36XjEbtn','test','775280uogfxs','app-code','\x20←\x20','*\x20是否要先登录以便拉取\x20API\x20配置?','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','已登录'];a39_0x3c50=function(){return _0x912466;};return a39_0x3c50();}function a39_0x4b29(_0x2f1900,_0x483dc7){_0x2f1900=_0x2f1900-0x196;const _0x3c5070=a39_0x3c50();let _0x4b2976=_0x3c5070[_0x2f1900];return _0x4b2976;}(function(_0x4ce934,_0x50d234){const _0x5a6c23=a39_0x4b29,_0x4160b5=_0x4ce934();while(!![]){try{const _0x2ebc28=-parseInt(_0x5a6c23(0x1d3))/0x1+-parseInt(_0x5a6c23(0x1ab))/0x2*(parseInt(_0x5a6c23(0x199))/0x3)+-parseInt(_0x5a6c23(0x1a9))/0x4+-parseInt(_0x5a6c23(0x1ad))/0x5+-parseInt(_0x5a6c23(0x1b4))/0x6+-parseInt(_0x5a6c23(0x19f))/0x7+-parseInt(_0x5a6c23(0x1a6))/0x8*(-parseInt(_0x5a6c23(0x1bc))/0x9);if(_0x2ebc28===_0x50d234)break;else _0x4160b5['push'](_0x4160b5['shift']());}catch(_0x1ec5e9){_0x4160b5['push'](_0x4160b5['shift']());}}}(a39_0x3c50,0x384fd));import{jsx as a39_0x5c448b,jsxs as a39_0x21ab56,Fragment as a39_0x2d01c9}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';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x351162){const _0x3a91b1=a39_0x4b29,{onCreate:_0x21b672,env:_0x185a93}=_0x351162,[_0x487bc9,_0x4257c4]=useState(_0x3a91b1(0x19a)),[_0x2907e5,_0x2020c4]=useState(''),[_0x1d8a6c,_0x8d2ddc]=useState(''),[_0x247c82,_0x319ad1]=useState(''),[_0x20ce46,_0x1f4e2e]=useState(''),[_0x3e5576,_0x5cf8d2]=useState([]),[_0x48b8b4,_0x1bb1a0]=useState(null),[_0x5d29f9,_0x4e0ab1]=useState(![]),[_0x1b7e9c,_0x2838c7]=useState(![]),[_0x150e18,_0x5c9594]=useState(![]),[_0x1a37f5,_0x5efb22]=useState(0x0),[_0x12f4d4,_0x4f396b]=useState(0x0),_0x2ca476=_0x3a91b1(0x1a5),_0x4dfda8=readConfig(),_0x5a16c1=typeof _0x4dfda8[_0x3a91b1(0x1a7)]==='string'?_0x4dfda8[_0x3a91b1(0x1a7)]:undefined;function _0x9559b1(_0xb54937){const _0x253ff5=_0x3a91b1;if(_0xb54937[_0x253ff5(0x1be)]>0x32)return{'valid':![],'message':_0x253ff5(0x1bf)};const _0x5797ac=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xb54937?.[_0x253ff5(0x1a2)]()&&!_0x5797ac[_0x253ff5(0x1ac)](_0xb54937))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x204443(_0x3b1c26){const _0x29f942=_0x3a91b1;if(!_0x3b1c26[_0x29f942(0x1a2)]())return{'valid':!![]};if(_0x3b1c26['length']>0x64)return{'valid':![],'message':_0x29f942(0x1aa)};const _0x2b0227=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x2b0227['test'](_0x3b1c26))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x2c3c06(){_0x4e0ab1(!![]);try{const _0x350080=await getIsSessionValid();return _0x1bb1a0(_0x350080),_0x350080;}catch(_0x15151a){return _0x1bb1a0(![]),![];}finally{_0x4e0ab1(![]);}}async function _0x5b3e13(){_0x2838c7(!![]);try{const _0x243b72=await authServer({'silent':!![]});return _0x1bb1a0(_0x243b72),_0x243b72;}catch(_0x12478f){return _0x1bb1a0(![]),![];}finally{_0x2838c7(![]);}}return useInput(async(_0x52a8b8,_0x2f3e3e)=>{const _0x330509=_0x3a91b1;if(_0x2f3e3e[_0x330509(0x1a4)]||_0x2f3e3e[_0x330509(0x1c5)]){if(_0x487bc9===_0x330509(0x1c6)){_0x5efb22(_0x104796=>_0x104796===0x0?0x1:0x0);return;}if(_0x487bc9===_0x330509(0x196)){_0x4f396b(_0x46fd4b=>_0x46fd4b===0x0?0x1:0x0);return;}}if(_0x2f3e3e[_0x330509(0x1b8)]){if(_0x487bc9==='project-name'){const _0x2586e3=_0x247c82['trim']()||_0x2ca476;if(_0x20ce46)return;_0x2020c4(_0x2586e3),_0x5cf8d2([{'step':_0x330509(0x19a),'label':_0x330509(0x1ca),'value':_0x2586e3}]),_0x319ad1(''),_0x1f4e2e(''),_0x4257c4('app-code');return;}if(_0x487bc9===_0x330509(0x1ae)){if(_0x20ce46)return;const _0x4a60a0=_0x247c82[_0x330509(0x1a2)]();_0x8d2ddc(_0x4a60a0),_0x5cf8d2(_0x5d3c5e=>[..._0x5d3c5e,{'step':_0x330509(0x1ae),'label':_0x330509(0x1d7),'value':_0x4a60a0||_0x330509(0x1c4)}]),_0x319ad1(''),_0x1f4e2e('');if(_0x4a60a0){_0x4257c4('login-check');const _0x4a76cb=await _0x2c3c06();_0x4a76cb?_0x4257c4(_0x330509(0x1c6)):_0x4257c4(_0x330509(0x196));}else{const _0x19b497=_0x185a93||_0x5a16c1||'online';_0x21b672({'projectName':_0x2907e5,'appCode':undefined,'pullApi':![],'env':_0x19b497}),_0x4257c4(_0x330509(0x1a0));}return;}if(_0x487bc9===_0x330509(0x1c6)){const _0x23319b=_0x1a37f5===0x0;_0x5c9594(_0x23319b),_0x5cf8d2(_0x1da41d=>[..._0x1da41d,{'step':_0x330509(0x1b6),'label':_0x330509(0x1cd),'value':_0x23319b?'是':'否'}]);const _0x5a5253=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':_0x23319b,'env':_0x5a5253}),_0x4257c4(_0x330509(0x1a0));return;}if(_0x487bc9==='login-prompt'){const _0x525e1d=_0x12f4d4===0x0;if(_0x525e1d){_0x4257c4(_0x330509(0x1c8));const _0x4f26f1=await _0x5b3e13();if(_0x4f26f1)_0x5cf8d2(_0x48d7aa=>[..._0x48d7aa,{'step':_0x330509(0x1b7),'label':_0x330509(0x1cf),'value':_0x330509(0x1b2)}]),_0x4257c4(_0x330509(0x1c6));else{_0x5cf8d2(_0x4b3911=>[..._0x4b3911,{'step':_0x330509(0x1b7),'label':_0x330509(0x1cf),'value':'登录失败'}]);const _0x3b75c9=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':![],'env':_0x3b75c9}),_0x4257c4(_0x330509(0x1a0));}}else{_0x5cf8d2(_0x3ebe2c=>[..._0x3ebe2c,{'step':_0x330509(0x1b7),'label':'登录状态','value':_0x330509(0x19c)}]);const _0x461dfe=_0x185a93||_0x5a16c1||_0x330509(0x1d1);_0x21b672({'projectName':_0x2907e5,'appCode':_0x1d8a6c,'pullApi':![],'env':_0x461dfe}),_0x4257c4(_0x330509(0x1a0));}return;}}if(_0x2f3e3e[_0x330509(0x1bd)]||_0x2f3e3e[_0x330509(0x19e)]){_0x319ad1(_0x16a9a4=>{const _0x11869f=_0x330509,_0x11ff95=_0x16a9a4[_0x11869f(0x1c0)](0x0,-0x1);if(_0x487bc9===_0x11869f(0x19a)){const {valid:_0x5c45f3,message:_0x46b628}=_0x9559b1(_0x11ff95);_0x1f4e2e(_0x5c45f3?'':_0x46b628||_0x11869f(0x1c3));}else{if(_0x487bc9===_0x11869f(0x1ae)){const {valid:_0x3f74ab,message:_0xe2b8e}=_0x204443(_0x11ff95);_0x1f4e2e(_0x3f74ab?'':_0xe2b8e||_0x11869f(0x1a3));}}return _0x11ff95;});return;}if([_0x330509(0x1a0),_0x330509(0x1c2),_0x330509(0x1c8)]['includes'](_0x487bc9))return;if(_0x487bc9==='confirm-api-pull'||_0x487bc9===_0x330509(0x196))return;_0x319ad1(_0x1b8105=>{const _0x596239=_0x330509,_0x878078=_0x1b8105+_0x52a8b8;if(_0x487bc9===_0x596239(0x19a)){const {valid:_0x5d3ab1,message:_0x52c7fd}=_0x9559b1(_0x878078);_0x1f4e2e(_0x5d3ab1?'':_0x52c7fd||_0x596239(0x1c3));}else{if(_0x487bc9===_0x596239(0x1ae)){const {valid:_0x4aa96d,message:_0x504869}=_0x204443(_0x878078);_0x1f4e2e(_0x4aa96d?'':_0x504869||_0x596239(0x1a3));}}return _0x878078;});}),a39_0x21ab56(Box,{'flexDirection':_0x3a91b1(0x1a8),'marginTop':0x1,'children':[_0x3e5576['length']===0x0&&a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1d0),'children':_0x3a91b1(0x1d5)})}),_0x3e5576[_0x3a91b1(0x1c1)](_0xfbe590=>a39_0x21ab56(Box,{'children':[a39_0x21ab56(Text,{'color':_0x3a91b1(0x1ce),'children':['√\x20',_0xfbe590[_0x3a91b1(0x1cb)],':\x20']}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x1d0),'children':_0xfbe590['value']})]},_0xfbe590['step'])),_0x487bc9===_0x3a91b1(0x19a)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x1b3)}),_0x247c82?a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x247c82}):a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x2ca476}),_0x20ce46&&a39_0x21ab56(Text,{'color':'red','children':[_0x3a91b1(0x1af),_0x20ce46]})]}),!_0x20ce46&&!_0x247c82&&a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1a1)})})]}),_0x487bc9==='app-code'&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x198)}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1ba)}),a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x247c82}),_0x20ce46&&a39_0x21ab56(Text,{'color':'red','children':[_0x3a91b1(0x1af),_0x20ce46]})]}),!_0x20ce46&&a39_0x5c448b(Box,{'children':a39_0x21ab56(Text,{'color':'gray','children':['\x20',_0x3a91b1(0x1b1)]})})]}),_0x487bc9===_0x3a91b1(0x1c2)&&a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x19b)}),_0x5d29f9&&a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':'\x20检查中...'})]}),_0x487bc9===_0x3a91b1(0x1c6)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1ce),'children':_0x3a91b1(0x19d)})}),a39_0x5c448b(Box,{'marginTop':0x1,'children':a39_0x5c448b(Text,{'children':_0x3a91b1(0x1c7)})}),a39_0x21ab56(Box,{'marginLeft':0x2,'children':[a39_0x21ab56(Text,{'color':_0x1a37f5===0x0?'green':_0x3a91b1(0x197),'children':[_0x1a37f5===0x0?'▶\x20':'\x20\x20',_0x3a91b1(0x1d6)]}),a39_0x5c448b(Text,{'children':'\x20'}),a39_0x21ab56(Text,{'color':_0x1a37f5===0x1?_0x3a91b1(0x1ce):_0x3a91b1(0x197),'children':[_0x1a37f5===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1b9),'children':_0x3a91b1(0x1d2)})})]}),_0x487bc9===_0x3a91b1(0x196)&&a39_0x21ab56(a39_0x2d01c9,{'children':[a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x1b9),'children':_0x3a91b1(0x1b5)})}),a39_0x5c448b(Box,{'marginTop':0x1,'children':a39_0x5c448b(Text,{'children':_0x3a91b1(0x1b0)})}),a39_0x21ab56(Box,{'marginLeft':0x2,'children':[a39_0x21ab56(Text,{'color':_0x12f4d4===0x0?_0x3a91b1(0x1ce):'gray','children':[_0x12f4d4===0x0?'▶\x20':'\x20\x20','Yes']}),a39_0x5c448b(Text,{'children':'\x20'}),a39_0x21ab56(Text,{'color':_0x12f4d4===0x1?_0x3a91b1(0x1ce):_0x3a91b1(0x197),'children':[_0x12f4d4===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1cc)})}),a39_0x5c448b(Box,{'children':a39_0x5c448b(Text,{'color':'yellow','children':_0x3a91b1(0x1bb)})})]}),_0x487bc9===_0x3a91b1(0x1c8)&&a39_0x21ab56(Box,{'children':[a39_0x5c448b(Text,{'children':_0x3a91b1(0x1d4)}),_0x1b7e9c&&a39_0x5c448b(Text,{'color':_0x3a91b1(0x197),'children':_0x3a91b1(0x1c9)})]})]});}
1
+ (function(_0x36f6b0,_0x175cc1){const _0x1adba2=a39_0x2362,_0x3f613a=_0x36f6b0();while(!![]){try{const _0x59835f=-parseInt(_0x1adba2(0x164))/0x1+-parseInt(_0x1adba2(0x181))/0x2*(parseInt(_0x1adba2(0x16e))/0x3)+-parseInt(_0x1adba2(0x16f))/0x4*(-parseInt(_0x1adba2(0x16d))/0x5)+-parseInt(_0x1adba2(0x197))/0x6+parseInt(_0x1adba2(0x169))/0x7+parseInt(_0x1adba2(0x19c))/0x8*(-parseInt(_0x1adba2(0x18b))/0x9)+-parseInt(_0x1adba2(0x182))/0xa*(-parseInt(_0x1adba2(0x16c))/0xb);if(_0x59835f===_0x175cc1)break;else _0x3f613a['push'](_0x3f613a['shift']());}catch(_0x4d383b){_0x3f613a['push'](_0x3f613a['shift']());}}}(a39_0x28ce,0x48736));import{jsx as a39_0xd0ae6a,jsxs as a39_0x302da6,Fragment as a39_0x325f7f}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';import{readConfig}from'../utils/config.js';function a39_0x2362(_0x2910af,_0x53d6db){_0x2910af=_0x2910af-0x160;const _0x28ce4b=a39_0x28ce();let _0x236239=_0x28ce4b[_0x2910af];return _0x236239;}export function EnhancedGuidedCreate(_0x525266){const _0x358ad7=a39_0x2362,{onCreate:_0x141d0d,env:_0x117ed0}=_0x525266,[_0x256d46,_0x30e139]=useState('project-name'),[_0x2e1efb,_0x1524b1]=useState(''),[_0x264cda,_0x27f0d5]=useState(''),[_0x573ef2,_0x48c312]=useState(''),[_0x3a9ab5,_0x1c0efc]=useState(''),[_0x34e7bb,_0x299ae7]=useState([]),[_0x18a3f5,_0x42d623]=useState(null),[_0x2125c1,_0x553d6a]=useState(![]),[_0x19d0fa,_0x4c98aa]=useState(![]),[_0x1a592a,_0xad3361]=useState(![]),[_0x2c62ea,_0x2c5f92]=useState(0x0),[_0x350dad,_0x539f87]=useState(0x0),_0x5a8e64=_0x358ad7(0x189),_0xb6cf5f=readConfig(),_0x59a6c8=typeof _0xb6cf5f['env']===_0x358ad7(0x180)?_0xb6cf5f[_0x358ad7(0x166)]:undefined;function _0x5686ee(_0x547c6b){const _0x342424=_0x358ad7;if(_0x547c6b[_0x342424(0x1a0)]>0x32)return{'valid':![],'message':_0x342424(0x170)};const _0x12e5e5=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x547c6b?.[_0x342424(0x165)]()&&!_0x12e5e5[_0x342424(0x193)](_0x547c6b))return{'valid':![],'message':_0x342424(0x173)};return{'valid':!![]};}function _0x3154af(_0x241b16){const _0x1ea7d8=_0x358ad7;if(!_0x241b16[_0x1ea7d8(0x165)]())return{'valid':!![]};if(_0x241b16[_0x1ea7d8(0x1a0)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x18c0aa=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x18c0aa['test'](_0x241b16))return{'valid':![],'message':_0x1ea7d8(0x178)};return{'valid':!![]};}async function _0x333496(){_0x553d6a(!![]);try{const _0x105509=await getIsSessionValid();return _0x42d623(_0x105509),_0x105509;}catch(_0x54de14){return _0x42d623(![]),![];}finally{_0x553d6a(![]);}}async function _0x2de975(){_0x4c98aa(!![]);try{const _0x3f62d8=await authServer({'silent':!![]});return _0x42d623(_0x3f62d8),_0x3f62d8;}catch(_0x2214ba){return _0x42d623(![]),![];}finally{_0x4c98aa(![]);}}return useInput(async(_0x25d718,_0x965ef4)=>{const _0x360aab=_0x358ad7;if(_0x965ef4[_0x360aab(0x172)]||_0x965ef4[_0x360aab(0x184)]){if(_0x256d46===_0x360aab(0x185)){_0x2c5f92(_0xa64628=>_0xa64628===0x0?0x1:0x0);return;}if(_0x256d46===_0x360aab(0x17b)){_0x539f87(_0x47e165=>_0x47e165===0x0?0x1:0x0);return;}}if(_0x965ef4[_0x360aab(0x187)]){if(_0x256d46===_0x360aab(0x196)){const _0x2d6f60=_0x573ef2[_0x360aab(0x165)]()||_0x5a8e64;if(_0x3a9ab5)return;_0x1524b1(_0x2d6f60),_0x299ae7([{'step':'project-name','label':_0x360aab(0x16b),'value':_0x2d6f60}]),_0x48c312(''),_0x1c0efc(''),_0x30e139(_0x360aab(0x191));return;}if(_0x256d46===_0x360aab(0x191)){if(_0x3a9ab5)return;const _0x2ad1d8=_0x573ef2[_0x360aab(0x165)]();_0x27f0d5(_0x2ad1d8),_0x299ae7(_0x4ec75e=>[..._0x4ec75e,{'step':'app-code','label':'应用AppCode','value':_0x2ad1d8||_0x360aab(0x17a)}]),_0x48c312(''),_0x1c0efc('');if(_0x2ad1d8){_0x30e139(_0x360aab(0x163));const _0x360a2b=await _0x333496();_0x360a2b?_0x30e139('confirm-api-pull'):_0x30e139(_0x360aab(0x17b));}else{const _0x3665f4=_0x117ed0||_0x59a6c8||_0x360aab(0x18d);_0x141d0d({'projectName':_0x2e1efb,'appCode':undefined,'pullApi':![],'env':_0x3665f4}),_0x30e139(_0x360aab(0x160));}return;}if(_0x256d46===_0x360aab(0x185)){const _0x1bcebb=_0x2c62ea===0x0;_0xad3361(_0x1bcebb),_0x299ae7(_0x254a04=>[..._0x254a04,{'step':_0x360aab(0x188),'label':'拉取API配置','value':_0x1bcebb?'是':'否'}]);const _0x29b0b9=_0x117ed0||_0x59a6c8||_0x360aab(0x18d);_0x141d0d({'projectName':_0x2e1efb,'appCode':_0x264cda,'pullApi':_0x1bcebb,'env':_0x29b0b9}),_0x30e139(_0x360aab(0x160));return;}if(_0x256d46===_0x360aab(0x17b)){const _0x2af4bf=_0x350dad===0x0;if(_0x2af4bf){_0x30e139('login-process');const _0xfd9fce=await _0x2de975();if(_0xfd9fce)_0x299ae7(_0x51e6fd=>[..._0x51e6fd,{'step':'login','label':_0x360aab(0x176),'value':_0x360aab(0x17e)}]),_0x30e139(_0x360aab(0x185));else{_0x299ae7(_0x4ab934=>[..._0x4ab934,{'step':_0x360aab(0x194),'label':'登录状态','value':_0x360aab(0x16a)}]);const _0x3041c4=_0x117ed0||_0x59a6c8||_0x360aab(0x18d);_0x141d0d({'projectName':_0x2e1efb,'appCode':_0x264cda,'pullApi':![],'env':_0x3041c4}),_0x30e139('creating');}}else{_0x299ae7(_0x3f894b=>[..._0x3f894b,{'step':_0x360aab(0x194),'label':_0x360aab(0x176),'value':_0x360aab(0x19a)}]);const _0x16cb70=_0x117ed0||_0x59a6c8||_0x360aab(0x18d);_0x141d0d({'projectName':_0x2e1efb,'appCode':_0x264cda,'pullApi':![],'env':_0x16cb70}),_0x30e139(_0x360aab(0x160));}return;}}if(_0x965ef4['backspace']||_0x965ef4[_0x360aab(0x17f)]){_0x48c312(_0x147b77=>{const _0x14cb53=_0x360aab,_0x966ffc=_0x147b77[_0x14cb53(0x19d)](0x0,-0x1);if(_0x256d46==='project-name'){const {valid:_0x4b4da5,message:_0x2bf87f}=_0x5686ee(_0x966ffc);_0x1c0efc(_0x4b4da5?'':_0x2bf87f||'项目名不合法');}else{if(_0x256d46===_0x14cb53(0x191)){const {valid:_0x4aebca,message:_0x32ef73}=_0x3154af(_0x966ffc);_0x1c0efc(_0x4aebca?'':_0x32ef73||_0x14cb53(0x190));}}return _0x966ffc;});return;}if(['creating',_0x360aab(0x163),_0x360aab(0x171)][_0x360aab(0x18c)](_0x256d46))return;if(_0x256d46===_0x360aab(0x185)||_0x256d46===_0x360aab(0x17b))return;_0x48c312(_0x12b31b=>{const _0x802c5e=_0x360aab,_0x1d0d56=_0x12b31b+_0x25d718;if(_0x256d46===_0x802c5e(0x196)){const {valid:_0x42629f,message:_0x2619fe}=_0x5686ee(_0x1d0d56);_0x1c0efc(_0x42629f?'':_0x2619fe||_0x802c5e(0x174));}else{if(_0x256d46==='app-code'){const {valid:_0x4dd2aa,message:_0x540703}=_0x3154af(_0x1d0d56);_0x1c0efc(_0x4dd2aa?'':_0x540703||_0x802c5e(0x190));}}return _0x1d0d56;});}),a39_0x302da6(Box,{'flexDirection':_0x358ad7(0x19e),'marginTop':0x1,'children':[_0x34e7bb[_0x358ad7(0x1a0)]===0x0&&a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':'cyan','children':'*\x20创建新项目'})}),_0x34e7bb[_0x358ad7(0x17d)](_0x16dfe4=>a39_0x302da6(Box,{'children':[a39_0x302da6(Text,{'color':_0x358ad7(0x19f),'children':['√\x20',_0x16dfe4['label'],':\x20']}),a39_0xd0ae6a(Text,{'color':_0x358ad7(0x168),'children':_0x16dfe4[_0x358ad7(0x179)]})]},_0x16dfe4['step'])),_0x256d46===_0x358ad7(0x196)&&a39_0x302da6(a39_0x325f7f,{'children':[a39_0x302da6(Box,{'children':[a39_0xd0ae6a(Text,{'children':_0x358ad7(0x17c)}),_0x573ef2?a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19f),'children':_0x573ef2}):a39_0xd0ae6a(Text,{'color':'gray','children':_0x5a8e64}),_0x3a9ab5&&a39_0x302da6(Text,{'color':_0x358ad7(0x192),'children':[_0x358ad7(0x167),_0x3a9ab5]})]}),!_0x3a9ab5&&!_0x573ef2&&a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19b),'children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x256d46===_0x358ad7(0x191)&&a39_0x302da6(a39_0x325f7f,{'children':[a39_0x302da6(Box,{'children':[a39_0xd0ae6a(Text,{'children':'*\x20应用AppCode\x20'}),a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19b),'children':_0x358ad7(0x161)}),a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19f),'children':_0x573ef2}),_0x3a9ab5&&a39_0x302da6(Text,{'color':'red','children':[_0x358ad7(0x167),_0x3a9ab5]})]}),!_0x3a9ab5&&a39_0xd0ae6a(Box,{'children':a39_0x302da6(Text,{'color':_0x358ad7(0x19b),'children':['\x20',_0x358ad7(0x162)]})})]}),_0x256d46==='login-check'&&a39_0x302da6(Box,{'children':[a39_0xd0ae6a(Text,{'children':_0x358ad7(0x198)}),_0x2125c1&&a39_0xd0ae6a(Text,{'color':'gray','children':_0x358ad7(0x199)})]}),_0x256d46===_0x358ad7(0x185)&&a39_0x302da6(a39_0x325f7f,{'children':[a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19f),'children':'√\x20检测到有效登录状态'})}),a39_0xd0ae6a(Box,{'marginTop':0x1,'children':a39_0xd0ae6a(Text,{'children':_0x358ad7(0x177)})}),a39_0x302da6(Box,{'marginLeft':0x2,'children':[a39_0x302da6(Text,{'color':_0x2c62ea===0x0?_0x358ad7(0x19f):'gray','children':[_0x2c62ea===0x0?'▶\x20':'\x20\x20','Yes']}),a39_0xd0ae6a(Text,{'children':'\x20'}),a39_0x302da6(Text,{'color':_0x2c62ea===0x1?_0x358ad7(0x19f):'gray','children':[_0x2c62ea===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19b),'children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x195),'children':_0x358ad7(0x175)})})]}),_0x256d46===_0x358ad7(0x17b)&&a39_0x302da6(a39_0x325f7f,{'children':[a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':'yellow','children':_0x358ad7(0x18e)})}),a39_0xd0ae6a(Box,{'marginTop':0x1,'children':a39_0xd0ae6a(Text,{'children':_0x358ad7(0x186)})}),a39_0x302da6(Box,{'marginLeft':0x2,'children':[a39_0x302da6(Text,{'color':_0x350dad===0x0?_0x358ad7(0x19f):_0x358ad7(0x19b),'children':[_0x350dad===0x0?'▶\x20':'\x20\x20',_0x358ad7(0x183)]}),a39_0xd0ae6a(Text,{'children':'\x20'}),a39_0x302da6(Text,{'color':_0x350dad===0x1?'green':'gray','children':[_0x350dad===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x19b),'children':_0x358ad7(0x18f)})}),a39_0xd0ae6a(Box,{'children':a39_0xd0ae6a(Text,{'color':_0x358ad7(0x195),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x256d46===_0x358ad7(0x171)&&a39_0x302da6(Box,{'children':[a39_0xd0ae6a(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x19d0fa&&a39_0xd0ae6a(Text,{'color':'gray','children':_0x358ad7(0x18a)})]})]});}function a39_0x28ce(){const _0x12b046=['app-code','red','test','login','yellow','project-name','128088avGHIi','*\x20正在检查登录状态...','\x20检查中...','跳过登录','gray','40lRoVbt','slice','column','green','length','creating','[可选]:\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','login-check','391426MfwQPv','trim','env','\x20←\x20','cyan','1106588GihfOZ','登录失败','项目名','11eZajAG','10205puJQmY','1599HezTmy','68gmAwYw','项目名长度不能超过\x2050\x20个字符','login-process','leftArrow','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','项目名不合法','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','登录状态','*\x20是否要自动拉取\x20API\x20配置?','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','value','未设置','login-prompt','*\x20项目名:\x20','map','已登录','delete','string','360xaAhCF','11441210jepdCb','Yes','rightArrow','confirm-api-pull','*\x20是否要先登录以便拉取\x20API\x20配置?','return','api-pull','my-app','\x20登录中...','956574wMpSAw','includes','online','!\x20未检测到有效登录','\x20\x20使用\x20←→\x20选择,回车确认','应用AppCode不合法'];a39_0x28ce=function(){return _0x12b046;};return a39_0x28ce();}
@@ -1 +1 @@
1
- (function(_0x2e38e2,_0x3efd92){const _0x233996=a40_0x3e0e,_0x504258=_0x2e38e2();while(!![]){try{const _0x370ec0=-parseInt(_0x233996(0x17c))/0x1+parseInt(_0x233996(0x180))/0x2+parseInt(_0x233996(0x17f))/0x3+-parseInt(_0x233996(0x178))/0x4+parseInt(_0x233996(0x17e))/0x5*(parseInt(_0x233996(0x17b))/0x6)+-parseInt(_0x233996(0x182))/0x7*(-parseInt(_0x233996(0x179))/0x8)+parseInt(_0x233996(0x17a))/0x9*(-parseInt(_0x233996(0x183))/0xa);if(_0x370ec0===_0x3efd92)break;else _0x504258['push'](_0x504258['shift']());}catch(_0x54ba5a){_0x504258['push'](_0x504258['shift']());}}}(a40_0x4b9a,0xdb53c));function a40_0x3e0e(_0x3f6617,_0x553ed6){_0x3f6617=_0x3f6617-0x178;const _0x4b9aac=a40_0x4b9a();let _0x3e0e8a=_0x4b9aac[_0x3f6617];return _0x3e0e8a;}function a40_0x4b9a(){const _0x2a9f26=['20uHzAPx','1066788gApnyF','379438fUQxvO','replace','21kXBdXc','19540YYPoQV','toFixed','2749336kVFAxF','4238632RhgGDn','6750NENHBV','2356590GLlwMA','654664acQtVb','now'];a40_0x4b9a=function(){return _0x2a9f26;};return a40_0x4b9a();}export function formatElapsed(_0x4f7823){const _0x14a16b=a40_0x3e0e,_0x486ff7=Date[_0x14a16b(0x17d)]()-_0x4f7823;if(_0x486ff7<0x3e8)return _0x486ff7+'ms';const _0x475052=(_0x486ff7/0x3e8)[_0x14a16b(0x184)](0x2),_0x39197=_0x475052[_0x14a16b(0x181)](/\.?0+$/u,'');return _0x39197+'s';}
1
+ function a40_0x4780(_0x3133b0,_0x13afb1){_0x3133b0=_0x3133b0-0x184;const _0xe3fb36=a40_0xe3fb();let _0x47800c=_0xe3fb36[_0x3133b0];return _0x47800c;}function a40_0xe3fb(){const _0x35cd8c=['16070VgBkdQ','7553154RHeeiz','3529946AZRiFY','280GVwRyh','1228JOxDct','222728umEMje','13427325GcTmxj','3141453fFHzSl','now','199832YzlHmT','16FYALWd','15YBOChH'];a40_0xe3fb=function(){return _0x35cd8c;};return a40_0xe3fb();}(function(_0x5d7fe1,_0x511f66){const _0x41ba31=a40_0x4780,_0x54f035=_0x5d7fe1();while(!![]){try{const _0x603930=-parseInt(_0x41ba31(0x189))/0x1*(parseInt(_0x41ba31(0x187))/0x2)+parseInt(_0x41ba31(0x185))/0x3+parseInt(_0x41ba31(0x18e))/0x4*(-parseInt(_0x41ba31(0x18a))/0x5)+parseInt(_0x41ba31(0x18b))/0x6+-parseInt(_0x41ba31(0x18c))/0x7*(parseInt(_0x41ba31(0x188))/0x8)+parseInt(_0x41ba31(0x184))/0x9+-parseInt(_0x41ba31(0x18d))/0xa*(-parseInt(_0x41ba31(0x18f))/0xb);if(_0x603930===_0x511f66)break;else _0x54f035['push'](_0x54f035['shift']());}catch(_0x28487a){_0x54f035['push'](_0x54f035['shift']());}}}(a40_0xe3fb,0xd49e5));export function formatElapsed(_0x12dba3){const _0x3ab710=a40_0x4780,_0x524482=Date[_0x3ab710(0x186)]()-_0x12dba3;if(_0x524482<0x3e8)return _0x524482+'ms';const _0x422396=(_0x524482/0x3e8)['toFixed'](0x2),_0x588869=_0x422396['replace'](/\.?0+$/u,'');return _0x588869+'s';}
@@ -1 +1 @@
1
- (function(_0x87510d,_0x1ac1c6){const _0x42eafe=a41_0x2eb0,_0x1ea0fa=_0x87510d();while(!![]){try{const _0xf4b473=-parseInt(_0x42eafe(0x142))/0x1*(-parseInt(_0x42eafe(0x12d))/0x2)+parseInt(_0x42eafe(0x138))/0x3*(-parseInt(_0x42eafe(0x132))/0x4)+parseInt(_0x42eafe(0x14d))/0x5*(-parseInt(_0x42eafe(0x124))/0x6)+-parseInt(_0x42eafe(0x15f))/0x7+parseInt(_0x42eafe(0x175))/0x8+-parseInt(_0x42eafe(0x137))/0x9*(parseInt(_0x42eafe(0x133))/0xa)+-parseInt(_0x42eafe(0x169))/0xb*(-parseInt(_0x42eafe(0x13b))/0xc);if(_0xf4b473===_0x1ac1c6)break;else _0x1ea0fa['push'](_0x1ea0fa['shift']());}catch(_0x354c35){_0x1ea0fa['push'](_0x1ea0fa['shift']());}}}(a41_0x5036,0xe2f05));import{jsx as a41_0x1d9e59,Fragment as a41_0x32a5aa,jsxs as a41_0x1c8b3a}from'react/jsx-runtime';import a41_0x295675 from'node:path';import a41_0x5c289c from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';function a41_0x2eb0(_0x229a75,_0xcc872a){_0x229a75=_0x229a75-0x11c;const _0x503667=a41_0x5036();let _0x2eb0d8=_0x503667[_0x229a75];return _0x2eb0d8;}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';function a41_0x5036(){const _0x49a925=['更新\x20package.json\x20name\x20和\x20description\x20字段','cwd','log','length','*\x20正在为项目\x20','../..','清理项目目录失败:\x20','6927224KhCfAL','lovrabet\x20config\x20set\x20appcode\x20[app-code]','toLocaleString','已自动拉取\x20✓','utf8','*\x20正在拉取\x20API\x20配置...','accessSync','启动项目:\x20','green','lovrabet\x20api\x20pull','package.json','1.\x20','未配置','setLogPath','🎉\x20项目创建成功!','拉取API配置:\x20','6ViGOod','message','API\x20配置拉取失败:\x20','项目名称:\x20','🔗\x20应用AppCode:\x20','cyan',',\x20description=','version','\x20配置应用AppCode:\x20','38sLBucq','stringify','\x20|\x20应用AppCode:\x20','yellow','online','4ohIboX','10pZNFdK','*\x20配置文件路径:\x20','.lovrabetrc','constants','1739196CdsFDv','165831yXlWfd','配置应用AppCode失败:\x20','需手动拉取','60opHZSS','更新\x20package.json\x20失败:\x20','trim','gray','×\x20项目创建失败:\x20','dirname','parse','59489FqRGZt','resolve','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','2.\x20','rmSync','env','√\x20API\x20配置拉取完成','projectName','1.0.0','×\x20项目目录\x20','pullApi','7200145hDmFpu','projectCode','white','API\x20配置拉取异常:\x20','description','readFileSync','cd\x20','repeat','create','writeFileSync','test','√\x20配置文件已创建,应用AppCode:\x20','√\x20package.json\x20已更新:\x20name=','×\x20无法在当前目录创建项目,请检查目录权限','info','开始创建项目:\x20','配置应用AppCode:\x20','join','472976pjzRCZ','*\x20清理失败的项目目录:\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','existsSync','doTask','appCode','API\x20配置拉取成功:\x20','warn','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','\x20Generated\x20by\x20lovrabet\x20cli\x20','1516823xSWLIi','\x20√\x20','column','string','error'];a41_0x5036=function(){return _0x49a925;};return a41_0x5036();}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(_0x537d0c){const _0x4e8e91=a41_0x2eb0,[_0x41f8a6,_0x2e8572]=useState(![]),[_0xfad347,_0x13110b]=useState(![]),[_0x11824c,_0x3869ad]=useState(null),_0x17ef51=useCopyProjectTemplate(),_0x3b732b=useInstallDependencies(),_0x4afcae=useFormatCode(),_0x1fb133=async _0xf0e5ae=>{const _0x55072a=a41_0x2eb0;if(!_0xf0e5ae['projectName']||_0xf0e5ae[_0x55072a(0x149)][_0x55072a(0x13d)]()===''){console[_0x55072a(0x16d)]('×\x20项目名不能为空');return;}const _0x55eee6=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x55eee6[_0x55072a(0x157)](_0xf0e5ae[_0x55072a(0x149)])){console[_0x55072a(0x16d)](_0x55072a(0x144));return;}if(_0xf0e5ae[_0x55072a(0x149)][_0x55072a(0x171)]>0x64){console[_0x55072a(0x16d)]('×\x20项目名过长,最多支持\x20100\x20个字符');return;}const _0x160723=a41_0x295675[_0x55072a(0x143)](process[_0x55072a(0x16f)](),_0xf0e5ae[_0x55072a(0x149)]);if(a41_0x5c289c[_0x55072a(0x162)](_0x160723)){console[_0x55072a(0x16d)](_0x55072a(0x14b)+_0xf0e5ae[_0x55072a(0x149)]+'\x20已存在,请使用其他项目名');return;}try{const _0x2ae4e2=a41_0x295675[_0x55072a(0x140)](_0x160723);a41_0x5c289c[_0x55072a(0x17b)](_0x2ae4e2,a41_0x5c289c[_0x55072a(0x136)]['W_OK']);}catch(_0x5a9cea){console[_0x55072a(0x16d)](_0x55072a(0x15a));return;}_0x3869ad(_0xf0e5ae),_0x2e8572(!![]),logger[_0x55072a(0x121)](_0x160723),logger[_0x55072a(0x15b)](_0x55072a(0x155),_0x55072a(0x15c)+_0xf0e5ae[_0x55072a(0x149)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)]});try{await _0x17ef51[_0x55072a(0x163)](_0xf0e5ae[_0x55072a(0x149)]),await _0xc1646f(_0xf0e5ae[_0x55072a(0x149)]),await _0x3b732b[_0x55072a(0x163)](_0xf0e5ae[_0x55072a(0x149)]),await _0x4afcae[_0x55072a(0x163)](_0xf0e5ae['projectName']),await _0x124866(_0xf0e5ae[_0x55072a(0x149)],_0xf0e5ae['appCode']||'',_0xf0e5ae[_0x55072a(0x147)]);if(_0xf0e5ae[_0x55072a(0x14c)]&&_0xf0e5ae[_0x55072a(0x164)]){console[_0x55072a(0x170)](_0x55072a(0x17a));try{const _0x514cd4=await pullApiSilent(_0xf0e5ae[_0x55072a(0x164)],undefined,_0x160723,_0xf0e5ae[_0x55072a(0x147)]);_0x514cd4?(console['log'](_0x55072a(0x148)),logger[_0x55072a(0x15b)](_0x55072a(0x155),_0x55072a(0x165)+_0xf0e5ae[_0x55072a(0x164)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae[_0x55072a(0x147)]})):(console[_0x55072a(0x170)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger[_0x55072a(0x166)](_0x55072a(0x155),_0x55072a(0x126)+_0xf0e5ae[_0x55072a(0x164)],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae[_0x55072a(0x147)]}));}catch(_0x2ed9e6){console[_0x55072a(0x170)](_0x55072a(0x161)),logger[_0x55072a(0x166)](_0x55072a(0x155),_0x55072a(0x150)+_0xf0e5ae['appCode'],{'projectDir':_0x160723,'appCode':_0xf0e5ae[_0x55072a(0x164)],'env':_0xf0e5ae['env'],'error':_0x2ed9e6 instanceof Error?_0x2ed9e6[_0x55072a(0x125)]:String(_0x2ed9e6)});}}logger['success'](_0x55072a(0x155),'项目创建完成:\x20'+_0xf0e5ae[_0x55072a(0x149)]),_0x13110b(!![]),_0x2e8572(![]);}catch(_0x18aa3b){logger[_0x55072a(0x16d)](_0x55072a(0x155),'项目创建失败:\x20'+_0xf0e5ae[_0x55072a(0x149)],{'error':_0x18aa3b instanceof Error?_0x18aa3b[_0x55072a(0x125)]:String(_0x18aa3b)});try{a41_0x5c289c[_0x55072a(0x162)](_0x160723)&&(console[_0x55072a(0x170)](_0x55072a(0x160)+_0x160723),a41_0x5c289c[_0x55072a(0x146)](_0x160723,{'recursive':!![],'force':!![]}));}catch(_0x1cf5fc){logger['warn'](_0x55072a(0x155),_0x55072a(0x174)+_0x160723,{'error':_0x1cf5fc instanceof Error?_0x1cf5fc['message']:String(_0x1cf5fc)});}_0x2e8572(![]),console[_0x55072a(0x16d)](_0x55072a(0x13f)+(_0x18aa3b instanceof Error?_0x18aa3b[_0x55072a(0x125)]:String(_0x18aa3b)));}},_0x5953cc=async _0x22871f=>{await _0x1fb133({'projectName':_0x22871f,'env':_0x537d0c['env']});},_0xc1646f=async _0x208962=>{const _0x22d221=a41_0x2eb0,_0x26b8a6=a41_0x295675[_0x22d221(0x143)](process[_0x22d221(0x16f)](),_0x208962),_0x281d4d=a41_0x295675['join'](_0x26b8a6,_0x22d221(0x11e));try{console[_0x22d221(0x170)](_0x22d221(0x167));const _0x1261b0=fileURLToPath(import.meta.url),_0x498519=a41_0x295675[_0x22d221(0x143)](a41_0x295675[_0x22d221(0x140)](_0x1261b0),_0x22d221(0x173)),_0x5e7d8e=a41_0x295675[_0x22d221(0x15e)](_0x498519,_0x22d221(0x11e));let _0xed9f67=_0x22d221(0x14a);try{const _0x232ebc=JSON[_0x22d221(0x141)](a41_0x5c289c[_0x22d221(0x152)](_0x5e7d8e,_0x22d221(0x179)));_0xed9f67=_0x232ebc[_0x22d221(0x12b)]||'1.0.0';}catch(_0x6b6e54){}const _0x2385cb=a41_0x5c289c[_0x22d221(0x152)](_0x281d4d,'utf8'),_0x5a7df8=JSON['parse'](_0x2385cb);_0x5a7df8['name']=_0x208962,_0x5a7df8[_0x22d221(0x151)]=_0x208962+_0x22d221(0x168)+_0xed9f67,a41_0x5c289c[_0x22d221(0x156)](_0x281d4d,JSON[_0x22d221(0x12e)](_0x5a7df8,null,0x2)+'\x0a',_0x22d221(0x179)),console[_0x22d221(0x170)](_0x22d221(0x159)+_0x208962+_0x22d221(0x12a)+_0x5a7df8[_0x22d221(0x151)]),logger[_0x22d221(0x15b)](_0x22d221(0x155),_0x22d221(0x16e),{'projectName':_0x208962,'description':_0x5a7df8['description'],'cliVersion':_0xed9f67,'packageJsonPath':'package.json'});}catch(_0x143a41){logger[_0x22d221(0x16d)](_0x22d221(0x155),_0x22d221(0x13c)+_0x208962,{'projectName':_0x208962,'error':_0x143a41 instanceof Error?_0x143a41[_0x22d221(0x125)]:String(_0x143a41)});throw _0x143a41;}},_0x124866=async(_0x3073fd,_0x2a1f2a,_0x28baf8)=>{const _0x1446c8=a41_0x2eb0,_0x412ed3=a41_0x295675['resolve'](process[_0x1446c8(0x16f)](),_0x3073fd),_0x5f0dc4=a41_0x295675[_0x1446c8(0x15e)](_0x412ed3,_0x1446c8(0x135));try{_0x2a1f2a?console['log']('*\x20正在为项目\x20'+_0x3073fd+_0x1446c8(0x12c)+_0x2a1f2a):console[_0x1446c8(0x170)](_0x1446c8(0x172)+_0x3073fd+'\x20创建配置文件');console[_0x1446c8(0x170)](_0x1446c8(0x134)+_0x5f0dc4);const _0x389076=fileURLToPath(import.meta.url),_0x4217f9=a41_0x295675[_0x1446c8(0x143)](a41_0x295675[_0x1446c8(0x140)](_0x389076),'../..'),_0x3729c7=a41_0x295675[_0x1446c8(0x15e)](_0x4217f9,_0x1446c8(0x11e));let _0xff18f9='1.0.0';try{const _0xb3e394=JSON[_0x1446c8(0x141)](a41_0x5c289c[_0x1446c8(0x152)](_0x3729c7,'utf8'));_0xff18f9=_0xb3e394[_0x1446c8(0x12b)]||_0x1446c8(0x14a);}catch(_0x346dad){}const _0x9a0916=readConfig(),_0x3f9426=typeof _0x9a0916[_0x1446c8(0x147)]===_0x1446c8(0x16c)?_0x9a0916[_0x1446c8(0x147)]:undefined,{app:_0x255cdd,appcode:_0x196dd0,..._0xed39d3}=_0x9a0916,_0x30dc45={..._0xed39d3,'appcode':_0x2a1f2a||'','env':_0x28baf8||_0x3f9426||_0x1446c8(0x131),'createdAt':new Date()[_0x1446c8(0x177)](),'version':_0xff18f9};a41_0x5c289c[_0x1446c8(0x156)](_0x5f0dc4,JSON[_0x1446c8(0x12e)](_0x30dc45,null,0x2),_0x1446c8(0x179)),_0x2a1f2a?console[_0x1446c8(0x170)](_0x1446c8(0x158)+_0x2a1f2a):console[_0x1446c8(0x170)]('√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置'),logger[_0x1446c8(0x15b)](_0x1446c8(0x155),_0x1446c8(0x15d)+_0x2a1f2a,{'projectName':_0x3073fd,'configFile':_0x1446c8(0x135)});}catch(_0x5e8406){logger[_0x1446c8(0x16d)]('create',_0x1446c8(0x139)+_0x2a1f2a,{'projectName':_0x3073fd,'error':_0x5e8406 instanceof Error?_0x5e8406[_0x1446c8(0x125)]:String(_0x5e8406)});}};useEffect(()=>{const _0x3d120b=a41_0x2eb0;_0x537d0c[_0x3d120b(0x14e)]&&_0x5953cc(_0x537d0c[_0x3d120b(0x14e)]);},[_0x537d0c[_0x4e8e91(0x14e)]]);if(!_0x41f8a6&&!_0xfad347&&!_0x537d0c[_0x4e8e91(0x14e)])return a41_0x1d9e59(EnhancedGuidedCreate,{'onCreate':_0x1fb133,'env':_0x537d0c['env']});if(_0x41f8a6)return a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'marginTop':0x1,'children':[a41_0x1d9e59(Box,{'width':'1'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x16a)}),a41_0x1d9e59(Text,{'children':_0x4e8e91(0x127)}),a41_0x1d9e59(Text,{'color':'green','children':_0x11824c?.['projectName']}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1d9e59(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x11824c[_0x4e8e91(0x164)]})]})]}),a41_0x1d9e59(TaskRunning,{..._0x17ef51}),a41_0x1d9e59(TaskRunning,{..._0x3b732b}),a41_0x1d9e59(TaskRunning,{..._0x4afcae})]});if(_0xfad347)return a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'marginTop':0x1,'children':[a41_0x1d9e59(Box,{'width':'1'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x16a)}),a41_0x1d9e59(Text,{'children':_0x4e8e91(0x127)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x11824c?.[_0x4e8e91(0x149)]}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1d9e59(Text,{'children':_0x4e8e91(0x12f)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x11824c[_0x4e8e91(0x164)]})]})]}),a41_0x1d9e59(TaskFinished,{..._0x17ef51}),a41_0x1d9e59(TaskFinished,{..._0x3b732b}),a41_0x1d9e59(TaskFinished,{..._0x4afcae}),a41_0x1d9e59(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x1d9e59(Text,{'color':'green','children':'─'['repeat'](0x3c)})}),a41_0x1d9e59(Box,{'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'bold':!![],'children':_0x4e8e91(0x122)})}),a41_0x1c8b3a(Box,{'marginTop':0x1,'flexDirection':_0x4e8e91(0x16b),'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':'cyan','children':'📁\x20项目名称:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'bold':!![],'children':_0x11824c?.[_0x4e8e91(0x149)]})]}),_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':_0x4e8e91(0x128)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'bold':!![],'children':_0x11824c[_0x4e8e91(0x164)]})]}),a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'children':'📦\x20API配置:\x20'}),_0x11824c?.[_0x4e8e91(0x14c)]?a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'bold':!![],'children':_0x4e8e91(0x178)}):_0x11824c?.[_0x4e8e91(0x164)]?a41_0x1d9e59(Text,{'color':_0x4e8e91(0x130),'bold':!![],'children':_0x4e8e91(0x13a)}):a41_0x1d9e59(Text,{'color':_0x4e8e91(0x13e),'bold':!![],'children':_0x4e8e91(0x120)})]})]}),a41_0x1d9e59(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':'🚀\x20接下来可以:'})}),a41_0x1c8b3a(Box,{'marginLeft':0x2,'flexDirection':_0x4e8e91(0x16b),'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':_0x4e8e91(0x11f)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x17c)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x153)+_0x11824c?.[_0x4e8e91(0x149)]+'\x20&&\x20lovrabet\x20start'})]}),_0x11824c?.[_0x4e8e91(0x164)]&&!_0x11824c?.['pullApi']&&a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x130),'children':_0x4e8e91(0x145)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x123)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x11d)})]}),!_0x11824c?.[_0x4e8e91(0x164)]&&a41_0x1c8b3a(a41_0x32a5aa,{'children':[a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':_0x4e8e91(0x13e),'children':_0x4e8e91(0x145)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':'配置AppCode:\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':_0x4e8e91(0x176)})]}),a41_0x1c8b3a(Box,{'children':[a41_0x1d9e59(Text,{'color':'gray','children':'3.\x20'}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x14f),'children':_0x4e8e91(0x123)}),a41_0x1d9e59(Text,{'color':_0x4e8e91(0x129),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a41_0x1d9e59(Box,{'marginTop':0x1,'children':a41_0x1d9e59(Text,{'color':_0x4e8e91(0x11c),'children':'─'[_0x4e8e91(0x154)](0x3c)})})]});return null;}
1
+ (function(_0x241f71,_0x3f6243){const _0x354cd0=a41_0xefb4,_0x59fa15=_0x241f71();while(!![]){try{const _0x2ae1cc=-parseInt(_0x354cd0(0x1d3))/0x1+-parseInt(_0x354cd0(0x217))/0x2*(parseInt(_0x354cd0(0x200))/0x3)+parseInt(_0x354cd0(0x212))/0x4+-parseInt(_0x354cd0(0x213))/0x5+parseInt(_0x354cd0(0x1d8))/0x6+-parseInt(_0x354cd0(0x219))/0x7*(parseInt(_0x354cd0(0x216))/0x8)+parseInt(_0x354cd0(0x1ee))/0x9;if(_0x2ae1cc===_0x3f6243)break;else _0x59fa15['push'](_0x59fa15['shift']());}catch(_0x350d64){_0x59fa15['push'](_0x59fa15['shift']());}}}(a41_0x490c,0xc60d3));import{jsx as a41_0x4ac8cf,Fragment as a41_0x174646,jsxs as a41_0x3d46d3}from'react/jsx-runtime';import a41_0x103edc from'node:path';import a41_0x181adc 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';function a41_0xefb4(_0x239a30,_0xe4a59c){_0x239a30=_0x239a30-0x1ce;const _0x490c24=a41_0x490c();let _0xefb4b4=_0x490c24[_0x239a30];return _0xefb4b4;}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';function a41_0x490c(){const _0xd8a772=['1544732uMHNqr','yellow','配置AppCode:\x20','package.json','lovrabet\x20api\x20pull','API\x20配置拉取异常:\x20','white','*\x20正在为项目\x20','projectCode','2.\x20','启动项目:\x20',',\x20description=','×\x20无法在当前目录创建项目,请检查目录权限','已自动拉取\x20✓','projectName','√\x20API\x20配置拉取完成','1.\x20','appCode','dirname','toLocaleString','🎉\x20项目创建成功!','配置应用AppCode失败:\x20','527408GbBwDt','info','writeFileSync','utf8','resolve','9657090yrjzqN','*\x20正在拉取\x20API\x20配置...','column','cwd','env','description','×\x20项目目录\x20','📁\x20项目名称:\x20','\x20√\x20','更新\x20package.json\x20name\x20和\x20description\x20字段','doTask','*\x20配置文件路径:\x20','\x20Generated\x20by\x20lovrabet\x20cli\x20','*\x20清理失败的项目目录:\x20','🔗\x20应用AppCode:\x20','拉取API配置:\x20','\x20已存在,请使用其他项目名','项目名称:\x20','\x20配置应用AppCode:\x20','accessSync','parse','warn','18311067rmmglG','×\x20项目创建失败:\x20','error','readFileSync','rmSync','stringify','cyan','gray','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','\x20&&\x20lovrabet\x20start','配置应用AppCode:\x20','📦\x20API配置:\x20','\x20|\x20应用AppCode:\x20','更新\x20package.json\x20失败:\x20','√\x20package.json\x20已更新:\x20name=','×\x20项目名过长,最多支持\x20100\x20个字符','pullApi','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','1004511WadNNK','../..','green','trim','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','existsSync','项目创建失败:\x20','W_OK','message','log','API\x20配置拉取失败:\x20','name','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','未配置','repeat','join','.lovrabetrc','constants','610392khNfRv','3957550suevcT','create','cd\x20','24obOBja','6tLxLUt','1.0.0'];a41_0x490c=function(){return _0xd8a772;};return a41_0x490c();}import{logger}from'../utils/logger.js';export function CreateApp(_0x2284ea){const _0x326bb9=a41_0xefb4,[_0x119ba1,_0x38e77a]=useState(![]),[_0x594577,_0x58b307]=useState(![]),[_0x556714,_0x6bed8f]=useState(null),_0x11006d=useCopyProjectTemplate(),_0x528914=useInstallDependencies(),_0x494562=useFormatCode(),_0x27455e=async _0x231836=>{const _0x3ecaa9=a41_0xefb4;if(!_0x231836[_0x3ecaa9(0x227)]||_0x231836[_0x3ecaa9(0x227)][_0x3ecaa9(0x203)]()===''){console[_0x3ecaa9(0x1f0)]('×\x20项目名不能为空');return;}const _0x1ff816=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1ff816['test'](_0x231836[_0x3ecaa9(0x227)])){console['error'](_0x3ecaa9(0x1ff));return;}if(_0x231836['projectName']['length']>0x64){console[_0x3ecaa9(0x1f0)](_0x3ecaa9(0x1fd));return;}const _0x1b49ac=a41_0x103edc['resolve'](process[_0x3ecaa9(0x1db)](),_0x231836[_0x3ecaa9(0x227)]);if(a41_0x181adc[_0x3ecaa9(0x205)](_0x1b49ac)){console[_0x3ecaa9(0x1f0)](_0x3ecaa9(0x1de)+_0x231836[_0x3ecaa9(0x227)]+_0x3ecaa9(0x1e8));return;}try{const _0x166cb6=a41_0x103edc[_0x3ecaa9(0x1cf)](_0x1b49ac);a41_0x181adc[_0x3ecaa9(0x1eb)](_0x166cb6,a41_0x181adc[_0x3ecaa9(0x211)][_0x3ecaa9(0x207)]);}catch(_0x530e30){console[_0x3ecaa9(0x1f0)](_0x3ecaa9(0x225));return;}_0x6bed8f(_0x231836),_0x38e77a(!![]),logger['setLogPath'](_0x1b49ac),logger[_0x3ecaa9(0x1d4)]('create','开始创建项目:\x20'+_0x231836[_0x3ecaa9(0x227)],{'projectDir':_0x1b49ac,'appCode':_0x231836[_0x3ecaa9(0x1ce)]});try{await _0x11006d[_0x3ecaa9(0x1e2)](_0x231836[_0x3ecaa9(0x227)]),await _0x2bb1f4(_0x231836[_0x3ecaa9(0x227)]),await _0x528914[_0x3ecaa9(0x1e2)](_0x231836['projectName']),await _0x494562['doTask'](_0x231836[_0x3ecaa9(0x227)]),await _0x81f6a0(_0x231836[_0x3ecaa9(0x227)],_0x231836['appCode']||'',_0x231836['env']);if(_0x231836[_0x3ecaa9(0x1fe)]&&_0x231836['appCode']){console[_0x3ecaa9(0x209)](_0x3ecaa9(0x1d9));try{const _0x551f7e=await pullApiSilent(_0x231836['appCode'],undefined,_0x1b49ac,_0x231836['env']);_0x551f7e?(console[_0x3ecaa9(0x209)](_0x3ecaa9(0x228)),logger[_0x3ecaa9(0x1d4)](_0x3ecaa9(0x214),'API\x20配置拉取成功:\x20'+_0x231836[_0x3ecaa9(0x1ce)],{'projectDir':_0x1b49ac,'appCode':_0x231836[_0x3ecaa9(0x1ce)],'env':_0x231836[_0x3ecaa9(0x1dc)]})):(console['log'](_0x3ecaa9(0x204)),logger[_0x3ecaa9(0x1ed)](_0x3ecaa9(0x214),_0x3ecaa9(0x20a)+_0x231836[_0x3ecaa9(0x1ce)],{'projectDir':_0x1b49ac,'appCode':_0x231836['appCode'],'env':_0x231836['env']}));}catch(_0x55c12b){console[_0x3ecaa9(0x209)](_0x3ecaa9(0x20c)),logger[_0x3ecaa9(0x1ed)]('create',_0x3ecaa9(0x21e)+_0x231836['appCode'],{'projectDir':_0x1b49ac,'appCode':_0x231836[_0x3ecaa9(0x1ce)],'env':_0x231836[_0x3ecaa9(0x1dc)],'error':_0x55c12b instanceof Error?_0x55c12b[_0x3ecaa9(0x208)]:String(_0x55c12b)});}}logger['success']('create','项目创建完成:\x20'+_0x231836[_0x3ecaa9(0x227)]),_0x58b307(!![]),_0x38e77a(![]);}catch(_0x285235){logger['error'](_0x3ecaa9(0x214),_0x3ecaa9(0x206)+_0x231836[_0x3ecaa9(0x227)],{'error':_0x285235 instanceof Error?_0x285235[_0x3ecaa9(0x208)]:String(_0x285235)});try{a41_0x181adc[_0x3ecaa9(0x205)](_0x1b49ac)&&(console[_0x3ecaa9(0x209)](_0x3ecaa9(0x1e5)+_0x1b49ac),a41_0x181adc[_0x3ecaa9(0x1f2)](_0x1b49ac,{'recursive':!![],'force':!![]}));}catch(_0x3fa0de){logger[_0x3ecaa9(0x1ed)](_0x3ecaa9(0x214),'清理项目目录失败:\x20'+_0x1b49ac,{'error':_0x3fa0de instanceof Error?_0x3fa0de['message']:String(_0x3fa0de)});}_0x38e77a(![]),console['error'](_0x3ecaa9(0x1ef)+(_0x285235 instanceof Error?_0x285235['message']:String(_0x285235)));}},_0x2e40e9=async _0x204d2b=>{const _0x158234=a41_0xefb4;await _0x27455e({'projectName':_0x204d2b,'env':_0x2284ea[_0x158234(0x1dc)]});},_0x2bb1f4=async _0x2a294e=>{const _0x66deb5=a41_0xefb4,_0x15b5ea=a41_0x103edc[_0x66deb5(0x1d7)](process[_0x66deb5(0x1db)](),_0x2a294e),_0x50fa5b=a41_0x103edc['join'](_0x15b5ea,_0x66deb5(0x21c));try{console[_0x66deb5(0x209)]('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x34ccef=fileURLToPath(import.meta.url),_0x33ef35=a41_0x103edc[_0x66deb5(0x1d7)](a41_0x103edc['dirname'](_0x34ccef),_0x66deb5(0x201)),_0x58da95=a41_0x103edc[_0x66deb5(0x20f)](_0x33ef35,_0x66deb5(0x21c));let _0x3668ae='1.0.0';try{const _0x305415=JSON['parse'](a41_0x181adc[_0x66deb5(0x1f1)](_0x58da95,'utf8'));_0x3668ae=_0x305415['version']||_0x66deb5(0x218);}catch(_0x25e20f){}const _0x4f4dbe=a41_0x181adc[_0x66deb5(0x1f1)](_0x50fa5b,_0x66deb5(0x1d6)),_0x45e2ef=JSON[_0x66deb5(0x1ec)](_0x4f4dbe);_0x45e2ef[_0x66deb5(0x20b)]=_0x2a294e,_0x45e2ef[_0x66deb5(0x1dd)]=_0x2a294e+_0x66deb5(0x1e4)+_0x3668ae,a41_0x181adc['writeFileSync'](_0x50fa5b,JSON[_0x66deb5(0x1f3)](_0x45e2ef,null,0x2)+'\x0a',_0x66deb5(0x1d6)),console['log'](_0x66deb5(0x1fc)+_0x2a294e+_0x66deb5(0x224)+_0x45e2ef[_0x66deb5(0x1dd)]),logger[_0x66deb5(0x1d4)](_0x66deb5(0x214),_0x66deb5(0x1e1),{'projectName':_0x2a294e,'description':_0x45e2ef[_0x66deb5(0x1dd)],'cliVersion':_0x3668ae,'packageJsonPath':'package.json'});}catch(_0x7e3129){logger[_0x66deb5(0x1f0)]('create',_0x66deb5(0x1fb)+_0x2a294e,{'projectName':_0x2a294e,'error':_0x7e3129 instanceof Error?_0x7e3129[_0x66deb5(0x208)]:String(_0x7e3129)});throw _0x7e3129;}},_0x81f6a0=async(_0x3b3dff,_0x2d11da,_0x35e596)=>{const _0x420276=a41_0xefb4,_0x444e69=a41_0x103edc[_0x420276(0x1d7)](process['cwd'](),_0x3b3dff),_0x27e0f1=a41_0x103edc[_0x420276(0x20f)](_0x444e69,_0x420276(0x210));try{_0x2d11da?console[_0x420276(0x209)](_0x420276(0x220)+_0x3b3dff+_0x420276(0x1ea)+_0x2d11da):console[_0x420276(0x209)]('*\x20正在为项目\x20'+_0x3b3dff+'\x20创建配置文件');console[_0x420276(0x209)](_0x420276(0x1e3)+_0x27e0f1);const _0x47c08d=fileURLToPath(import.meta.url),_0x2b3cec=a41_0x103edc[_0x420276(0x1d7)](a41_0x103edc[_0x420276(0x1cf)](_0x47c08d),_0x420276(0x201)),_0x2c7112=a41_0x103edc[_0x420276(0x20f)](_0x2b3cec,'package.json');let _0x143138='1.0.0';try{const _0x264ec5=JSON[_0x420276(0x1ec)](a41_0x181adc[_0x420276(0x1f1)](_0x2c7112,_0x420276(0x1d6)));_0x143138=_0x264ec5['version']||'1.0.0';}catch(_0x2375e9){}const _0x4c76eb=readConfig(),_0x2d2203=typeof _0x4c76eb[_0x420276(0x1dc)]==='string'?_0x4c76eb['env']:undefined,{app:_0xcc599b,appcode:_0x715cc6,..._0xa6c177}=_0x4c76eb,_0x3a1819={..._0xa6c177,'appcode':_0x2d11da||'','env':_0x35e596||_0x2d2203||'online','createdAt':new Date()[_0x420276(0x1d0)](),'version':_0x143138};a41_0x181adc[_0x420276(0x1d5)](_0x27e0f1,JSON[_0x420276(0x1f3)](_0x3a1819,null,0x2),_0x420276(0x1d6)),_0x2d11da?console[_0x420276(0x209)]('√\x20配置文件已创建,应用AppCode:\x20'+_0x2d11da):console[_0x420276(0x209)](_0x420276(0x1f6)),logger[_0x420276(0x1d4)](_0x420276(0x214),_0x420276(0x1f8)+_0x2d11da,{'projectName':_0x3b3dff,'configFile':'.lovrabetrc'});}catch(_0x27931d){logger['error'](_0x420276(0x214),_0x420276(0x1d2)+_0x2d11da,{'projectName':_0x3b3dff,'error':_0x27931d instanceof Error?_0x27931d[_0x420276(0x208)]:String(_0x27931d)});}};useEffect(()=>{const _0x5473bc=a41_0xefb4;_0x2284ea['projectCode']&&_0x2e40e9(_0x2284ea[_0x5473bc(0x221)]);},[_0x2284ea[_0x326bb9(0x221)]]);if(!_0x119ba1&&!_0x594577&&!_0x2284ea[_0x326bb9(0x221)])return a41_0x4ac8cf(EnhancedGuidedCreate,{'onCreate':_0x27455e,'env':_0x2284ea[_0x326bb9(0x1dc)]});if(_0x119ba1)return a41_0x3d46d3(a41_0x174646,{'children':[a41_0x3d46d3(Box,{'marginTop':0x1,'children':[a41_0x4ac8cf(Box,{'width':'1'}),a41_0x4ac8cf(Text,{'color':'green','children':_0x326bb9(0x1e0)}),a41_0x4ac8cf(Text,{'children':_0x326bb9(0x1e9)}),a41_0x4ac8cf(Text,{'color':'green','children':_0x556714?.[_0x326bb9(0x227)]}),_0x556714?.['appCode']&&a41_0x3d46d3(a41_0x174646,{'children':[a41_0x4ac8cf(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'children':_0x556714['appCode']})]})]}),a41_0x4ac8cf(TaskRunning,{..._0x11006d}),a41_0x4ac8cf(TaskRunning,{..._0x528914}),a41_0x4ac8cf(TaskRunning,{..._0x494562})]});if(_0x594577)return a41_0x3d46d3(a41_0x174646,{'children':[a41_0x3d46d3(Box,{'marginTop':0x1,'children':[a41_0x4ac8cf(Box,{'width':'1'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'children':_0x326bb9(0x1e0)}),a41_0x4ac8cf(Text,{'children':'项目名称:\x20'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'children':_0x556714?.[_0x326bb9(0x227)]}),_0x556714?.[_0x326bb9(0x1ce)]&&a41_0x3d46d3(a41_0x174646,{'children':[a41_0x4ac8cf(Text,{'children':_0x326bb9(0x1fa)}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'children':_0x556714[_0x326bb9(0x1ce)]})]})]}),a41_0x4ac8cf(TaskFinished,{..._0x11006d}),a41_0x4ac8cf(TaskFinished,{..._0x528914}),a41_0x4ac8cf(TaskFinished,{..._0x494562}),a41_0x4ac8cf(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x4ac8cf(Text,{'color':'green','children':'─'[_0x326bb9(0x20e)](0x3c)})}),a41_0x4ac8cf(Box,{'children':a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'bold':!![],'children':_0x326bb9(0x1d1)})}),a41_0x3d46d3(Box,{'marginTop':0x1,'flexDirection':_0x326bb9(0x1da),'children':[a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':'cyan','children':_0x326bb9(0x1df)}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21f),'bold':!![],'children':_0x556714?.[_0x326bb9(0x227)]})]}),_0x556714?.[_0x326bb9(0x1ce)]&&a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'children':_0x326bb9(0x1e6)}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21f),'bold':!![],'children':_0x556714[_0x326bb9(0x1ce)]})]}),a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'children':_0x326bb9(0x1f9)}),_0x556714?.['pullApi']?a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'bold':!![],'children':_0x326bb9(0x226)}):_0x556714?.[_0x326bb9(0x1ce)]?a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21a),'bold':!![],'children':'需手动拉取'}):a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f5),'bold':!![],'children':_0x326bb9(0x20d)})]})]}),a41_0x4ac8cf(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x4ac8cf(Text,{'color':'cyan','bold':!![],'children':'🚀\x20接下来可以:'})}),a41_0x3d46d3(Box,{'marginLeft':0x2,'flexDirection':_0x326bb9(0x1da),'children':[a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'children':_0x326bb9(0x229)}),a41_0x4ac8cf(Text,{'color':'white','children':_0x326bb9(0x223)}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'bold':!![],'children':_0x326bb9(0x215)+_0x556714?.[_0x326bb9(0x227)]+_0x326bb9(0x1f7)})]}),_0x556714?.[_0x326bb9(0x1ce)]&&!_0x556714?.[_0x326bb9(0x1fe)]&&a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21a),'children':_0x326bb9(0x222)}),a41_0x4ac8cf(Text,{'color':'white','children':'拉取API配置:\x20'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'bold':!![],'children':_0x326bb9(0x21d)})]}),!_0x556714?.['appCode']&&a41_0x3d46d3(a41_0x174646,{'children':[a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f5),'children':'2.\x20'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21f),'children':_0x326bb9(0x21b)}),a41_0x4ac8cf(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20config\x20set\x20appcode\x20[app-code]'})]}),a41_0x3d46d3(Box,{'children':[a41_0x4ac8cf(Text,{'color':'gray','children':'3.\x20'}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x21f),'children':_0x326bb9(0x1e7)}),a41_0x4ac8cf(Text,{'color':_0x326bb9(0x1f4),'bold':!![],'children':'lovrabet\x20api\x20pull\x20--appcode\x20[app-code]'})]})]})]}),a41_0x4ac8cf(Box,{'marginTop':0x1,'children':a41_0x4ac8cf(Text,{'color':_0x326bb9(0x202),'children':'─'[_0x326bb9(0x20e)](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- (function(_0x115d8f,_0x53b049){var _0x210fc4=a42_0x5413,_0x122c0c=_0x115d8f();while(!![]){try{var _0x538eb6=parseInt(_0x210fc4(0x193))/0x1*(parseInt(_0x210fc4(0x18e))/0x2)+parseInt(_0x210fc4(0x189))/0x3+parseInt(_0x210fc4(0x18b))/0x4*(parseInt(_0x210fc4(0x195))/0x5)+-parseInt(_0x210fc4(0x18f))/0x6*(-parseInt(_0x210fc4(0x18c))/0x7)+-parseInt(_0x210fc4(0x18a))/0x8+-parseInt(_0x210fc4(0x194))/0x9*(-parseInt(_0x210fc4(0x191))/0xa)+-parseInt(_0x210fc4(0x18d))/0xb;if(_0x538eb6===_0x53b049)break;else _0x122c0c['push'](_0x122c0c['shift']());}catch(_0xc58bc2){_0x122c0c['push'](_0x122c0c['shift']());}}}(a42_0x23f7,0x83579));import{jsx as a42_0x459593,jsxs as a42_0x3768db}from'react/jsx-runtime';import{Box,Text}from'ink';function a42_0x5413(_0x398537,_0x57ed4c){_0x398537=_0x398537-0x189;var _0x23f703=a42_0x23f7();var _0x5413a3=_0x23f703[_0x398537];return _0x5413a3;}function a42_0x23f7(){var _0x4d397a=['green','240220ckHLSr','1062bsolRK','7675JmAVZp','1703541lubgJq','1711920KtVgWA','716ZTIYLr','35VdFaSJ','18744616vfOYXM','8UatdXP','447162vupMNM','elapsed','23720ylyMVU'];a42_0x23f7=function(){return _0x4d397a;};return a42_0x23f7();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x4836f4){var _0x29771d=a42_0x5413;return a42_0x3768db(Box,{'children':[a42_0x459593(Box,{'width':'1'}),a42_0x459593(Text,{'color':_0x29771d(0x192),'children':'\x20√\x20'}),a42_0x459593(Text,{'children':_0x4836f4['taskName']}),a42_0x459593(TaskTime,{'elapsed':_0x4836f4[_0x29771d(0x190)]})]});}
1
+ (function(_0x1adc20,_0x47ae29){var _0x155e3e=a42_0x38ab,_0x51f0c1=_0x1adc20();while(!![]){try{var _0x3bedd4=-parseInt(_0x155e3e(0xce))/0x1+parseInt(_0x155e3e(0xd0))/0x2*(-parseInt(_0x155e3e(0xcf))/0x3)+parseInt(_0x155e3e(0xd6))/0x4+-parseInt(_0x155e3e(0xc9))/0x5*(-parseInt(_0x155e3e(0xd4))/0x6)+-parseInt(_0x155e3e(0xcc))/0x7*(parseInt(_0x155e3e(0xd5))/0x8)+parseInt(_0x155e3e(0xcb))/0x9+parseInt(_0x155e3e(0xd3))/0xa*(parseInt(_0x155e3e(0xd1))/0xb);if(_0x3bedd4===_0x47ae29)break;else _0x51f0c1['push'](_0x51f0c1['shift']());}catch(_0x250ad4){_0x51f0c1['push'](_0x51f0c1['shift']());}}}(a42_0x69b3,0x28f35));import{jsx as a42_0x27c136,jsxs as a42_0x555e25}from'react/jsx-runtime';function a42_0x38ab(_0x29fcf2,_0x292b02){_0x29fcf2=_0x29fcf2-0xc9;var _0x69b37f=a42_0x69b3();var _0x38ab18=_0x69b37f[_0x29fcf2];return _0x38ab18;}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';function a42_0x69b3(){var _0x30244c=['572891DRTRAx','\x20√\x20','10fLkgTC','444768DylvtV','40yKHOBo','650548cnrAjl','10soqMbI','elapsed','2011212EsPvDL','435442vwXSPg','taskName','85672tmfkmG','177RoaufH','746wAAJot'];a42_0x69b3=function(){return _0x30244c;};return a42_0x69b3();}export function TaskFinished(_0x4c83b8){var _0x5261be=a42_0x38ab;return a42_0x555e25(Box,{'children':[a42_0x27c136(Box,{'width':'1'}),a42_0x27c136(Text,{'color':'green','children':_0x5261be(0xd2)}),a42_0x27c136(Text,{'children':_0x4c83b8[_0x5261be(0xcd)]}),a42_0x27c136(TaskTime,{'elapsed':_0x4c83b8[_0x5261be(0xca)]})]});}
@@ -1 +1 @@
1
- (function(_0x25e37c,_0x2fd928){var _0xf800eb=a43_0xd5de,_0x2661a3=_0x25e37c();while(!![]){try{var _0x3abb09=-parseInt(_0xf800eb(0x77))/0x1+-parseInt(_0xf800eb(0x78))/0x2+parseInt(_0xf800eb(0x7e))/0x3+-parseInt(_0xf800eb(0x79))/0x4+parseInt(_0xf800eb(0x7b))/0x5+-parseInt(_0xf800eb(0x75))/0x6+parseInt(_0xf800eb(0x73))/0x7;if(_0x3abb09===_0x2fd928)break;else _0x2661a3['push'](_0x2661a3['shift']());}catch(_0x4e0082){_0x2661a3['push'](_0x2661a3['shift']());}}}(a43_0x2c2c,0x1dcb7));function a43_0x2c2c(){var _0x4205d1=['2051140znrKcb','finished','715794TLFsNs','\x20\x20\x20','98538WGyQuD','263882lQGchF','80036zSNppA','dots','334860IoAToR','green','loading','395502xJdbEl'];a43_0x2c2c=function(){return _0x4205d1;};return a43_0x2c2c();}import{jsx as a43_0x3ef0d8,jsxs as a43_0x515587}from'react/jsx-runtime';import{Text}from'ink';function a43_0xd5de(_0x15ef8b,_0x8a3fee){_0x15ef8b=_0x15ef8b-0x73;var _0x2c2c93=a43_0x2c2c();var _0xd5de1e=_0x2c2c93[_0x15ef8b];return _0xd5de1e;}import a43_0x310142 from'ink-spinner';export function TaskLoading(_0x1cab5a){var _0x5af9d9=a43_0xd5de;if(_0x1cab5a[_0x5af9d9(0x74)])return a43_0x3ef0d8(Text,{'color':_0x5af9d9(0x7c),'children':'\x20√\x20'});if(_0x1cab5a[_0x5af9d9(0x7d)])return a43_0x515587(Text,{'color':'green','children':['\x20',a43_0x3ef0d8(a43_0x310142,{'type':_0x5af9d9(0x7a)}),'\x20']});return a43_0x3ef0d8(Text,{'children':_0x5af9d9(0x76)});}
1
+ (function(_0x57db1e,_0x5d3b1f){var _0x38a0f4=a43_0x2726,_0x3a396a=_0x57db1e();while(!![]){try{var _0x4fc563=-parseInt(_0x38a0f4(0x1ae))/0x1*(parseInt(_0x38a0f4(0x1a5))/0x2)+parseInt(_0x38a0f4(0x1aa))/0x3+-parseInt(_0x38a0f4(0x1a9))/0x4*(parseInt(_0x38a0f4(0x1a4))/0x5)+parseInt(_0x38a0f4(0x1a2))/0x6+parseInt(_0x38a0f4(0x1ac))/0x7+-parseInt(_0x38a0f4(0x1ad))/0x8+-parseInt(_0x38a0f4(0x1a0))/0x9*(parseInt(_0x38a0f4(0x1ab))/0xa);if(_0x4fc563===_0x5d3b1f)break;else _0x3a396a['push'](_0x3a396a['shift']());}catch(_0x224c15){_0x3a396a['push'](_0x3a396a['shift']());}}}(a43_0x215f,0x82771));import{jsx as a43_0x11ea1a,jsxs as a43_0x110940}from'react/jsx-runtime';function a43_0x2726(_0x333117,_0x41d0e8){_0x333117=_0x333117-0x1a0;var _0x215fff=a43_0x215f();var _0x27266d=_0x215fff[_0x333117];return _0x27266d;}import{Text}from'ink';import a43_0x2afa1f from'ink-spinner';export function TaskLoading(_0x5eda31){var _0x130951=a43_0x2726;if(_0x5eda31[_0x130951(0x1a6)])return a43_0x11ea1a(Text,{'color':_0x130951(0x1a7),'children':'\x20√\x20'});if(_0x5eda31[_0x130951(0x1a1)])return a43_0x110940(Text,{'color':'green','children':['\x20',a43_0x11ea1a(a43_0x2afa1f,{'type':_0x130951(0x1a8)}),'\x20']});return a43_0x11ea1a(Text,{'children':_0x130951(0x1a3)});}function a43_0x215f(){var _0x436dc6=['5312832mIJEJQ','\x20\x20\x20','75565tzfgAO','350GByhle','finished','green','dots','148XOKIKr','1502418quPBpu','137570KpBnDR','3107566ZFqefV','1305152WFtSFj','683SoRNyy','297ZaeHBJ','loading'];a43_0x215f=function(){return _0x436dc6;};return a43_0x215f();}
@@ -1 +1 @@
1
- (function(_0x41eb70,_0x35e5ba){var _0x3c74fe=a44_0x8a66,_0x5bf760=_0x41eb70();while(!![]){try{var _0x321e83=parseInt(_0x3c74fe(0xa7))/0x1*(parseInt(_0x3c74fe(0xa5))/0x2)+parseInt(_0x3c74fe(0xaf))/0x3*(-parseInt(_0x3c74fe(0xb0))/0x4)+-parseInt(_0x3c74fe(0xad))/0x5+parseInt(_0x3c74fe(0xae))/0x6*(parseInt(_0x3c74fe(0xa8))/0x7)+parseInt(_0x3c74fe(0xa9))/0x8+parseInt(_0x3c74fe(0xa4))/0x9*(parseInt(_0x3c74fe(0xac))/0xa)+-parseInt(_0x3c74fe(0xa6))/0xb;if(_0x321e83===_0x35e5ba)break;else _0x5bf760['push'](_0x5bf760['shift']());}catch(_0x135caa){_0x5bf760['push'](_0x5bf760['shift']());}}}(a44_0x5505,0x4c017));import{jsx as a44_0x400b30,jsxs as a44_0x2bf371}from'react/jsx-runtime';import{Box,Text}from'ink';function a44_0x8a66(_0x28b928,_0x483dd0){_0x28b928=_0x28b928-0xa4;var _0x550504=a44_0x5505();var _0x8a6665=_0x550504[_0x28b928];return _0x8a6665;}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x10f825){var _0x5315a3=a44_0x8a66;return a44_0x2bf371(Box,{'children':[a44_0x400b30(Box,{'width':'1'}),a44_0x400b30(TaskLoading,{..._0x10f825}),a44_0x400b30(Text,{'children':_0x10f825[_0x5315a3(0xab)]}),a44_0x400b30(TaskTime,{'elapsed':_0x10f825[_0x5315a3(0xaa)]})]});}function a44_0x5505(){var _0x19d159=['519740KJYbYc','2772375SmpNag','1062QvPpzU','33oRrRbf','126876OckgnD','90xTaPzc','360214oDhkkI','5510186vyQTgP','3qCIKVU','13601UPmRbf','2493256fyiceK','elapsed','taskName'];a44_0x5505=function(){return _0x19d159;};return a44_0x5505();}
1
+ (function(_0x27ccfb,_0x590bc8){var _0x24db06=a44_0x130a,_0x190f3a=_0x27ccfb();while(!![]){try{var _0x2cf208=-parseInt(_0x24db06(0x1e3))/0x1+parseInt(_0x24db06(0x1ec))/0x2*(-parseInt(_0x24db06(0x1e2))/0x3)+-parseInt(_0x24db06(0x1eb))/0x4*(parseInt(_0x24db06(0x1e5))/0x5)+-parseInt(_0x24db06(0x1e8))/0x6*(parseInt(_0x24db06(0x1e6))/0x7)+-parseInt(_0x24db06(0x1e4))/0x8*(parseInt(_0x24db06(0x1ed))/0x9)+-parseInt(_0x24db06(0x1ea))/0xa+parseInt(_0x24db06(0x1e7))/0xb*(parseInt(_0x24db06(0x1e1))/0xc);if(_0x2cf208===_0x590bc8)break;else _0x190f3a['push'](_0x190f3a['shift']());}catch(_0x2c94d6){_0x190f3a['push'](_0x190f3a['shift']());}}}(a44_0x13d2,0x66f1b));function a44_0x130a(_0x3ac8d7,_0x1060ab){_0x3ac8d7=_0x3ac8d7-0x1e1;var _0x13d2f9=a44_0x13d2();var _0x130acb=_0x13d2f9[_0x3ac8d7];return _0x130acb;}import{jsx as a44_0x267739,jsxs as a44_0x1ecfa1}from'react/jsx-runtime';import{Box,Text}from'ink';function a44_0x13d2(){var _0x381fcd=['1144CzuznX','5iuXjZw','511tdAkxZ','10233751haEzWP','34962EepoKV','elapsed','5421690rudwXi','898604RuGlIx','41082rBSNlq','48753EpiERS','36SXSqZU','18AgFuTg','279296fqeYoe'];a44_0x13d2=function(){return _0x381fcd;};return a44_0x13d2();}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x13a3e2){var _0x155cdb=a44_0x130a;return a44_0x1ecfa1(Box,{'children':[a44_0x267739(Box,{'width':'1'}),a44_0x267739(TaskLoading,{..._0x13a3e2}),a44_0x267739(Text,{'children':_0x13a3e2['taskName']}),a44_0x267739(TaskTime,{'elapsed':_0x13a3e2[_0x155cdb(0x1e9)]})]});}
@@ -1 +1 @@
1
- (function(_0x59fe26,_0x40b199){var _0x3af824=a45_0x9eb0,_0x2b9e0f=_0x59fe26();while(!![]){try{var _0x18491d=parseInt(_0x3af824(0xb3))/0x1+parseInt(_0x3af824(0xab))/0x2*(parseInt(_0x3af824(0xb2))/0x3)+-parseInt(_0x3af824(0xad))/0x4*(parseInt(_0x3af824(0xae))/0x5)+-parseInt(_0x3af824(0xa9))/0x6+-parseInt(_0x3af824(0xb4))/0x7*(parseInt(_0x3af824(0xaa))/0x8)+parseInt(_0x3af824(0xb1))/0x9+parseInt(_0x3af824(0xaf))/0xa;if(_0x18491d===_0x40b199)break;else _0x2b9e0f['push'](_0x2b9e0f['shift']());}catch(_0x4ad142){_0x2b9e0f['push'](_0x2b9e0f['shift']());}}}(a45_0x3a5e,0xb1192));import{jsx as a45_0x31bf0b,Fragment as a45_0x51d0e8,jsxs as a45_0x45229a}from'react/jsx-runtime';import{Text}from'ink';function a45_0x3a5e(){var _0x56b2a0=['8432ADwyrK','2044828WtWkzW','elapsed','380qGHCif','55095LybEgu','4741940ZmfEgz','gray','11120868JckupM','3tkPrva','185733BnVhHS','1939SccukN','5123016ARptgm'];a45_0x3a5e=function(){return _0x56b2a0;};return a45_0x3a5e();}function a45_0x9eb0(_0x43bc79,_0x5cb17e){_0x43bc79=_0x43bc79-0xa9;var _0x3a5e43=a45_0x3a5e();var _0x9eb003=_0x3a5e43[_0x43bc79];return _0x9eb003;}export function TaskTime(_0x367512){var _0x48a266=a45_0x9eb0;if(_0x367512[_0x48a266(0xac)])return a45_0x45229a(a45_0x51d0e8,{'children':[a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'children':'\x20['}),a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'bold':!![],'children':_0x367512[_0x48a266(0xac)]}),a45_0x31bf0b(Text,{'color':_0x48a266(0xb0),'children':']'})]});return null;}
1
+ function a45_0xc004(_0x3432ff,_0x37c7fd){_0x3432ff=_0x3432ff-0x92;var _0x28ba59=a45_0x28ba();var _0xc0042f=_0x28ba59[_0x3432ff];return _0xc0042f;}(function(_0x47992e,_0x387b98){var _0x57cba4=a45_0xc004,_0x3cb408=_0x47992e();while(!![]){try{var _0x3d6eea=-parseInt(_0x57cba4(0x9b))/0x1*(parseInt(_0x57cba4(0x99))/0x2)+-parseInt(_0x57cba4(0x98))/0x3*(parseInt(_0x57cba4(0x9d))/0x4)+parseInt(_0x57cba4(0x97))/0x5+parseInt(_0x57cba4(0x92))/0x6+parseInt(_0x57cba4(0x96))/0x7*(-parseInt(_0x57cba4(0x9c))/0x8)+parseInt(_0x57cba4(0x94))/0x9+-parseInt(_0x57cba4(0x9e))/0xa*(-parseInt(_0x57cba4(0x93))/0xb);if(_0x3d6eea===_0x387b98)break;else _0x3cb408['push'](_0x3cb408['shift']());}catch(_0x491c07){_0x3cb408['push'](_0x3cb408['shift']());}}}(a45_0x28ba,0x84666));import{jsx as a45_0x373afe,Fragment as a45_0x2b3b6a,jsxs as a45_0x18c1e3}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x5041c4){var _0x38b506=a45_0xc004;if(_0x5041c4[_0x38b506(0x9a)])return a45_0x18c1e3(a45_0x2b3b6a,{'children':[a45_0x373afe(Text,{'color':'gray','children':'\x20['}),a45_0x373afe(Text,{'color':_0x38b506(0x95),'bold':!![],'children':_0x5041c4[_0x38b506(0x9a)]}),a45_0x373afe(Text,{'color':_0x38b506(0x95),'children':']'})]});return null;}function a45_0x28ba(){var _0x5b0b0f=['2445368mvswGt','12sagdei','606810epnbCp','2544930rghUyg','121hUzmDs','6676884TOCiZC','gray','14uVfQUP','3391095Qhjsyi','983805QTpjlx','2VoeCJw','elapsed','374284eolpuT'];a45_0x28ba=function(){return _0x5b0b0f;};return a45_0x28ba();}
@@ -1 +1 @@
1
- const a46_0xb100e8=a46_0x45a2;(function(_0x2e1352,_0x5a562f){const _0x38cf61=a46_0x45a2,_0x252c9f=_0x2e1352();while(!![]){try{const _0x4097ea=parseInt(_0x38cf61(0xb1))/0x1*(-parseInt(_0x38cf61(0xb4))/0x2)+-parseInt(_0x38cf61(0xb6))/0x3+parseInt(_0x38cf61(0xc0))/0x4*(-parseInt(_0x38cf61(0xba))/0x5)+parseInt(_0x38cf61(0xb3))/0x6*(-parseInt(_0x38cf61(0xb0))/0x7)+parseInt(_0x38cf61(0xb9))/0x8+-parseInt(_0x38cf61(0xbe))/0x9*(-parseInt(_0x38cf61(0xbf))/0xa)+parseInt(_0x38cf61(0xaf))/0xb*(parseInt(_0x38cf61(0xb2))/0xc);if(_0x4097ea===_0x5a562f)break;else _0x252c9f['push'](_0x252c9f['shift']());}catch(_0x375a41){_0x252c9f['push'](_0x252c9f['shift']());}}}(a46_0x10a2,0x9a6da));import a46_0x1f3e6e from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a46_0x45a2(_0x4085d3,_0x12e8b2){_0x4085d3=_0x4085d3-0xae;const _0x10a2c9=a46_0x10a2();let _0x45a252=_0x10a2c9[_0x4085d3];return _0x45a252;}const __dirname=a46_0x1f3e6e['dirname'](fileURLToPath(import.meta.url)),templateDir=a46_0x1f3e6e[a46_0xb100e8(0xbc)](__dirname,a46_0xb100e8(0xbd));function a46_0x10a2(){const _0x16ab18=['472848JtKNAU','30aGCwMK','44786wFrGti','now','2894643mxwUea','info','copy','8040792GlhUFY','4130QKmuKf','cwd','resolve','../../templates/projects/sub-app-react-demo','4329171bvDTWz','10xOjihL','4300vclHfi','项目模板复制完成','error','开始复制项目模板','复制项目文件','781ynbsMl','1545950HePDxS','31HQUQQd'];a46_0x10a2=function(){return _0x16ab18;};return a46_0x10a2();}export function useCopyProjectTemplate(){const _0x716a79=a46_0xb100e8,[_0x4c1339,_0x1e4276]=useState(![]),[_0x2318a7,_0x5e794f]=useState(![]),[_0x268092,_0x5d30b9]=useState(''),_0x22bc5f=useCallback(async _0x1b298b=>{const _0x2bdbfa=a46_0x45a2,_0x2f26b5=Date[_0x2bdbfa(0xb5)](),_0x37037f=a46_0x1f3e6e[_0x2bdbfa(0xbc)](process[_0x2bdbfa(0xbb)](),_0x1b298b);_0x1e4276(!![]);try{logger[_0x2bdbfa(0xb7)](_0x2bdbfa(0xb8),_0x2bdbfa(0xc3),{'projectCode':_0x1b298b,'templateDir':templateDir}),await copyDirectory(templateDir,_0x37037f);const _0x8422c2=Date[_0x2bdbfa(0xb5)]()-_0x2f26b5;logger['success'](_0x2bdbfa(0xb8),_0x2bdbfa(0xc1),_0x8422c2,{'projectCode':_0x1b298b});}catch(_0x43b73e){const _0x103312=Date[_0x2bdbfa(0xb5)]()-_0x2f26b5;logger[_0x2bdbfa(0xc2)](_0x2bdbfa(0xb8),'项目模板复制失败',{'projectCode':_0x1b298b,'error':_0x43b73e instanceof Error?_0x43b73e['message']:String(_0x43b73e),'duration':_0x103312});throw _0x43b73e;}finally{_0x1e4276(![]),_0x5e794f(!![]),_0x5d30b9(formatElapsed(_0x2f26b5));}},[]);return{'taskName':_0x716a79(0xae),'finished':_0x2318a7,'loading':_0x4c1339,'elapsed':_0x268092,'doTask':_0x22bc5f};}
1
+ const a46_0x578a88=a46_0x41d6;function a46_0x3233(){const _0x16de52=['now','3224649syPOkQ','message','29216ywRcNH','copy','4058978NcxWZL','12664496mgfabB','50gVglnx','复制项目文件','1027918gniTQU','开始复制项目模板','1419040vKmTNB','项目模板复制失败','resolve','info','success','343290ibvQCj','项目模板复制完成','../../templates/projects/sub-app-react-demo'];a46_0x3233=function(){return _0x16de52;};return a46_0x3233();}(function(_0x1f06b7,_0x6568c9){const _0x27a144=a46_0x41d6,_0x28d84d=_0x1f06b7();while(!![]){try{const _0x373826=parseInt(_0x27a144(0xe1))/0x1+parseInt(_0x27a144(0xdf))/0x2+parseInt(_0x27a144(0xea))/0x3+parseInt(_0x27a144(0xec))/0x4*(parseInt(_0x27a144(0xdd))/0x5)+-parseInt(_0x27a144(0xe6))/0x6+-parseInt(_0x27a144(0xdb))/0x7+-parseInt(_0x27a144(0xdc))/0x8;if(_0x373826===_0x6568c9)break;else _0x28d84d['push'](_0x28d84d['shift']());}catch(_0x1332f1){_0x28d84d['push'](_0x28d84d['shift']());}}}(a46_0x3233,0xd2277));import a46_0x75aae from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';function a46_0x41d6(_0x3f2826,_0x5f3936){_0x3f2826=_0x3f2826-0xdb;const _0x32333b=a46_0x3233();let _0x41d60a=_0x32333b[_0x3f2826];return _0x41d60a;}import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a46_0x75aae['dirname'](fileURLToPath(import.meta.url)),templateDir=a46_0x75aae[a46_0x578a88(0xe3)](__dirname,a46_0x578a88(0xe8));export function useCopyProjectTemplate(){const _0x2d3a5d=a46_0x578a88,[_0x1c406c,_0x6db95f]=useState(![]),[_0x419865,_0x27f718]=useState(![]),[_0x56f544,_0x3cf3b3]=useState(''),_0x5e47c7=useCallback(async _0x6f5133=>{const _0x1fe45b=a46_0x41d6,_0x15d83c=Date['now'](),_0xd52e9c=a46_0x75aae[_0x1fe45b(0xe3)](process['cwd'](),_0x6f5133);_0x6db95f(!![]);try{logger[_0x1fe45b(0xe4)](_0x1fe45b(0xed),_0x1fe45b(0xe0),{'projectCode':_0x6f5133,'templateDir':templateDir}),await copyDirectory(templateDir,_0xd52e9c);const _0x43cf74=Date[_0x1fe45b(0xe9)]()-_0x15d83c;logger[_0x1fe45b(0xe5)](_0x1fe45b(0xed),_0x1fe45b(0xe7),_0x43cf74,{'projectCode':_0x6f5133});}catch(_0x9b7f1d){const _0x1b89a4=Date['now']()-_0x15d83c;logger['error'](_0x1fe45b(0xed),_0x1fe45b(0xe2),{'projectCode':_0x6f5133,'error':_0x9b7f1d instanceof Error?_0x9b7f1d[_0x1fe45b(0xeb)]:String(_0x9b7f1d),'duration':_0x1b89a4});throw _0x9b7f1d;}finally{_0x6db95f(![]),_0x27f718(!![]),_0x3cf3b3(formatElapsed(_0x15d83c));}},[]);return{'taskName':_0x2d3a5d(0xde),'finished':_0x419865,'loading':_0x1c406c,'elapsed':_0x56f544,'doTask':_0x5e47c7};}