@lovrabet/cli 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +33 -17
  2. package/lib/add-page/input-page-router.js +1 -1
  3. package/lib/add-page/main.js +1 -1
  4. package/lib/add-page/select-page-template.js +1 -1
  5. package/lib/api/api-doc-ui.js +1 -1
  6. package/lib/api/api-doc.js +1 -1
  7. package/lib/api/api-pull-ui.js +1 -1
  8. package/lib/api/fetch-model-list.js +1 -1
  9. package/lib/api/generate-api-file.js +1 -1
  10. package/lib/api/main.js +1 -1
  11. package/lib/api/pull-silent.js +1 -1
  12. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  13. package/lib/app-menu/create-menu.js +1 -1
  14. package/lib/app-menu/get-local-pages.js +1 -1
  15. package/lib/app-menu/get-online-menu-list.js +1 -1
  16. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  17. package/lib/app-menu/utils.js +1 -1
  18. package/lib/app-menu/valid-url.js +1 -1
  19. package/lib/app-menu-update-cdn/current-content.js +1 -1
  20. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  21. package/lib/app-menu-update-cdn/main.js +1 -1
  22. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  23. package/lib/auth/auth-server-ui.js +1 -1
  24. package/lib/auth/auth-server.js +1 -1
  25. package/lib/auth/constant.js +1 -1
  26. package/lib/auth/get-cookie.js +1 -1
  27. package/lib/auth/is-session-valid.js +1 -1
  28. package/lib/auth/logout.js +1 -1
  29. package/lib/cli.js +1 -1
  30. package/lib/cmd/build-watch.js +1 -1
  31. package/lib/cmd/build.js +1 -1
  32. package/lib/cmd/logs.js +1 -1
  33. package/lib/cmd/preview.js +1 -1
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/task-finished.js +1 -1
  43. package/lib/create-app/task-loading.js +1 -1
  44. package/lib/create-app/task-running.js +1 -1
  45. package/lib/create-app/task-time.js +1 -1
  46. package/lib/create-app/use-copy-project-template.js +1 -1
  47. package/lib/create-app/use-format-code.js +1 -1
  48. package/lib/create-app/use-install-dependencies.js +1 -1
  49. package/lib/help.js +1 -1
  50. package/lib/init/main.js +1 -1
  51. package/lib/mcp/cursor.js +1 -1
  52. package/lib/mcp/main.js +1 -1
  53. package/lib/utils/check-sdk-version.js +1 -1
  54. package/lib/utils/config.js +1 -1
  55. package/lib/utils/copy-directory.js +1 -1
  56. package/lib/utils/http-client.js +1 -1
  57. package/lib/utils/logger.js +1 -1
  58. package/lib/utils/router-updater.js +1 -1
  59. package/lib/utils/sleep.js +1 -1
  60. package/lib/utils/template-replacer.js +1 -1
  61. package/package.json +1 -1
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
+ function a29_0x1f82(){const _0xd9f2c0=['logout','boolean','1004904CMPNSE','cwd','334534bXYMWq','start','flags','string','setLogPath','logs','10304KMlzOm','create','73122oHlGtS','env','执行初始化配置命令','build','api','config','all','执行更新菜单\x20CDN\x20资源命令','1197927GdQibM','info','1392qvOJOZ','lovrabet\x20','mcp','执行预览命令','update','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','setRawCommand','auth','appcode','4996640jAmyLL','add','preview','739340AVLrjt','\x20(监听模式)','argv','trim','exit','slice','page','error','input','init'];a29_0x1f82=function(){return _0xd9f2c0;};return a29_0x1f82();}const a29_0x369ace=a29_0x5328;(function(_0x422191,_0x1c42c5){const _0x1acd9b=a29_0x5328,_0x388b2d=_0x422191();while(!![]){try{const _0x40c472=-parseInt(_0x1acd9b(0x1bb))/0x1+-parseInt(_0x1acd9b(0x197))/0x2+parseInt(_0x1acd9b(0x19f))/0x3+-parseInt(_0x1acd9b(0x1b9))/0x4+parseInt(_0x1acd9b(0x1ad))/0x5+parseInt(_0x1acd9b(0x1a1))/0x6*(-parseInt(_0x1acd9b(0x195))/0x7)+parseInt(_0x1acd9b(0x1aa))/0x8;if(_0x40c472===_0x1c42c5)break;else _0x388b2d['push'](_0x388b2d['shift']());}catch(_0x1efa97){_0x388b2d['push'](_0x388b2d['shift']());}}}(a29_0x1f82,0x32c3c));import{jsx as a29_0x537b49}from'react/jsx-runtime';import a29_0x7dee17 from'meow';function a29_0x5328(_0x4cc63e,_0x50a86d){_0x4cc63e=_0x4cc63e-0x191;const _0x1f8241=a29_0x1f82();let _0x53286d=_0x1f8241[_0x4cc63e];return _0x53286d;}import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a29_0x7dee17(a29_0x369ace(0x1a6),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a29_0x369ace(0x1b8)},'env':{'type':a29_0x369ace(0x192)},'watch':{'type':'boolean'},'help':{'type':a29_0x369ace(0x1b8)},'appcode':{'type':a29_0x369ace(0x192)},'output':{'type':'string'},'params':{'type':a29_0x369ace(0x192)},'datasetcode':{'type':a29_0x369ace(0x192)}},'autoVersion':!![]});await run();async function run(){const _0x59eb5a=a29_0x369ace,_0x1f7297=cli['input'][0x0],_0x15e74d=cli[_0x59eb5a(0x1b5)][0x1],_0x4f5d33=cli[_0x59eb5a(0x1b5)][0x2],_0x2ab877=(_0x59eb5a(0x1a2)+process[_0x59eb5a(0x1af)][_0x59eb5a(0x1b2)](0x2)['join']('\x20'))[_0x59eb5a(0x1b0)]();logger[_0x59eb5a(0x1a7)](_0x2ab877);switch(_0x1f7297){case _0x59eb5a(0x1b6):{const _0xf593bc=cli['flags'][_0x59eb5a(0x1a9)],_0x5cccc5=cli[_0x59eb5a(0x191)][_0x59eb5a(0x198)];logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger['info'](_0x59eb5a(0x1b6),_0x59eb5a(0x199)),render(a29_0x537b49(Init,{'appcode':_0xf593bc,'env':_0x5cccc5}));break;}case _0x59eb5a(0x196):{const _0x518e65=cli[_0x59eb5a(0x1b5)][0x1]?.['trim'](),_0x4c93cf=cli['flags'][_0x59eb5a(0x198)];render(a29_0x537b49(CreateApp,{'projectCode':_0x518e65,'env':_0x4c93cf}));break;}case _0x59eb5a(0x1ab):{cli[_0x59eb5a(0x1b5)][0x1]===_0x59eb5a(0x1b3)&&(logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('add-page','执行添加页面命令'),render(a29_0x537b49(AddPage,{})));break;}case _0x59eb5a(0x1bc):{try{logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1bc),'执行启动命令'),await runStart();}catch(_0xbca29e){console['error'](_0xbca29e),process['exit'](0x1);}break;}case _0x59eb5a(0x19a):{try{logger[_0x59eb5a(0x193)](process['cwd']()),logger[_0x59eb5a(0x1a0)]('build','执行构建命令'),await runBuild();}catch(_0x33dd39){console[_0x59eb5a(0x1b4)](_0x33dd39),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x1ac):{const _0x2f5f54=cli[_0x59eb5a(0x191)]['watch'];logger['setLogPath'](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)](_0x59eb5a(0x1ac),_0x59eb5a(0x1a4)+(_0x2f5f54?_0x59eb5a(0x1ae):''));if(_0x2f5f54)try{await Promise[_0x59eb5a(0x19d)]([runBuildWatch(),runPreview()]);}catch(_0x1cb2e0){console['error'](_0x1cb2e0),process['exit'](0x1);}else try{await runPreview();}catch(_0x14c8e6){console[_0x59eb5a(0x1b4)](_0x14c8e6),process[_0x59eb5a(0x1b1)](0x1);}break;}case _0x59eb5a(0x19c):{render(a29_0x537b49(Config,{'cli':cli}));break;}case _0x59eb5a(0x19b):{await apiCli(cli);break;}case _0x59eb5a(0x1a8):{render(a29_0x537b49(AuthServer,{}));break;}case'menu':{if(_0x15e74d===_0x59eb5a(0x1a5)){logger[_0x59eb5a(0x193)](process[_0x59eb5a(0x1ba)]()),logger[_0x59eb5a(0x1a0)]('menu-update-cdn',_0x59eb5a(0x19e)),render(a29_0x537b49(AppMenuUpdateCdn,{}));break;}else render(a29_0x537b49(AppMenuSyncUI,{}));break;}case _0x59eb5a(0x1b7):{logout();break;}case _0x59eb5a(0x1a3):{const _0x3cd24c=cli['input'][0x1];await mcpCommand(_0x3cd24c);break;}case _0x59eb5a(0x194):{cli[_0x59eb5a(0x191)]['clear']?clearLogs():showLogs();break;}default:render(a29_0x537b49(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_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(_0xa47d15,_0x533341){const _0x37eb74=a30_0x3fb2,_0x1818d9=_0xa47d15();while(!![]){try{const _0x5870da=-parseInt(_0x37eb74(0x1be))/0x1*(-parseInt(_0x37eb74(0x1c0))/0x2)+-parseInt(_0x37eb74(0x1af))/0x3*(parseInt(_0x37eb74(0x1b1))/0x4)+parseInt(_0x37eb74(0x1bd))/0x5*(parseInt(_0x37eb74(0x1b2))/0x6)+-parseInt(_0x37eb74(0x1c2))/0x7+parseInt(_0x37eb74(0x1b8))/0x8+-parseInt(_0x37eb74(0x1c1))/0x9*(parseInt(_0x37eb74(0x1bb))/0xa)+parseInt(_0x37eb74(0x1b7))/0xb;if(_0x5870da===_0x533341)break;else _0x1818d9['push'](_0x1818d9['shift']());}catch(_0x1ee31a){_0x1818d9['push'](_0x1818d9['shift']());}}}(a30_0x1e72,0x87cf2));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a30_0x1e72(){const _0xd26f08=['260MymiSd','vite','44615qzRvQq','89tuOUQV','npm\x20run\x20build\x20exited\x20with\x20code\x20','23858HxPRtM','115344XvLNel','2435377lrSnyk','870LHlOKK','node_modules','14152sZUsHp','90ZLCCif','env','PATH','cwd','error','6018958HZcEGm','4165736wflCLF','close','.bin'];a30_0x1e72=function(){return _0xd26f08;};return a30_0x1e72();}function a30_0x3fb2(_0x1eec03,_0x273a49){_0x1eec03=_0x1eec03-0x1af;const _0x1e7254=a30_0x1e72();let _0x3fb21a=_0x1e7254[_0x1eec03];return _0x3fb21a;}export function runBuildWatch(){return new Promise((_0x855810,_0x2ba4a5)=>{const _0x3beb54=a30_0x3fb2,_0x15081d=spawn(_0x3beb54(0x1bc),['build','--watch'],{'stdio':'inherit','shell':!![],'env':{...process[_0x3beb54(0x1b3)],'PATH':''+join(process[_0x3beb54(0x1b5)](),_0x3beb54(0x1b0),_0x3beb54(0x1ba))+delimiter+process['env'][_0x3beb54(0x1b4)]}});_0x15081d['on'](_0x3beb54(0x1b9),_0x333952=>{const _0x4427a5=_0x3beb54;if(_0x333952===0x0||_0x333952===null)_0x855810();else _0x2ba4a5(new Error(_0x4427a5(0x1bf)+_0x333952));}),_0x15081d['on'](_0x3beb54(0x1b6),_0x2ba4a5);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- function 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(_0x5f2dcd,_0x5a3bc4){const _0x5a4731=a31_0x2a6f,_0x4c0f57=_0x5f2dcd();while(!![]){try{const _0x2db443=parseInt(_0x5a4731(0xb1))/0x1+parseInt(_0x5a4731(0xae))/0x2+parseInt(_0x5a4731(0x96))/0x3*(-parseInt(_0x5a4731(0x98))/0x4)+-parseInt(_0x5a4731(0xb2))/0x5*(parseInt(_0x5a4731(0xa7))/0x6)+-parseInt(_0x5a4731(0x95))/0x7*(parseInt(_0x5a4731(0x93))/0x8)+-parseInt(_0x5a4731(0x97))/0x9*(-parseInt(_0x5a4731(0x9b))/0xa)+-parseInt(_0x5a4731(0x9c))/0xb;if(_0x2db443===_0x5a3bc4)break;else _0x4c0f57['push'](_0x4c0f57['shift']());}catch(_0x3dde76){_0x4c0f57['push'](_0x4c0f57['shift']());}}}(a31_0x1495,0xc5a85));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a31_0x1495(){const _0xd47cdc=['1458666kCdcak','995ysifxe','toString','env','125144wcPsJZ','now','7dDVIgc','2699847OYjSXK','5399289SgHDWQ','4kmbhrm','stderr','项目构建出错','20TZcvIs','12206150BmKwmP','success','npm','close','cwd','run','build','info','项目构建成功','.bin','error','28818DNrDol','npm\x20run\x20build','trim','pipe','inherit','PATH','node_modules','2264272MfvQkK','data','npm\x20run\x20build\x20exited\x20with\x20code\x20'];a31_0x1495=function(){return _0xd47cdc;};return a31_0x1495();}function a31_0x2a6f(_0x397c7b,_0x13bee9){_0x397c7b=_0x397c7b-0x92;const _0x1495bb=a31_0x1495();let _0x2a6f27=_0x1495bb[_0x397c7b];return _0x2a6f27;}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x3a8c9f,_0x3b575b)=>{const _0x545e24=a31_0x2a6f,_0x20edc2=Date[_0x545e24(0x94)]();logger[_0x545e24(0xa3)](_0x545e24(0xa2),'开始构建项目',{'command':_0x545e24(0xa8)});let _0x59dad0='';const _0xc59baf=spawn(_0x545e24(0x9e),[_0x545e24(0xa1),_0x545e24(0xa2)],{'stdio':[_0x545e24(0xab),_0x545e24(0xab),_0x545e24(0xaa)],'shell':!![],'env':{...process[_0x545e24(0x92)],'PATH':''+join(process['cwd'](),_0x545e24(0xad),_0x545e24(0xa5))+delimiter+process[_0x545e24(0x92)][_0x545e24(0xac)]}});_0xc59baf[_0x545e24(0x99)]?.['on'](_0x545e24(0xaf),_0x54f353=>{const _0x3ee2ff=_0x545e24;_0x59dad0+=_0x54f353[_0x3ee2ff(0xb3)]();}),_0xc59baf['on'](_0x545e24(0x9f),_0x2b6910=>{const _0x236163=_0x545e24,_0x1e19b6=Date[_0x236163(0x94)]()-_0x20edc2;if(_0x2b6910===0x0||_0x2b6910===null)logger[_0x236163(0x9d)](_0x236163(0xa2),_0x236163(0xa4),_0x1e19b6),_0x3a8c9f();else{const _0x2845c5={'exitCode':_0x2b6910,'duration':_0x1e19b6,'command':_0x236163(0xa8),'cwd':process[_0x236163(0xa0)]()};_0x59dad0['trim']()&&(_0x2845c5[_0x236163(0x99)]=_0x59dad0['trim']()),logger[_0x236163(0xa6)](_0x236163(0xa2),'项目构建失败',_0x2845c5),_0x3b575b(new Error(_0x236163(0xb0)+_0x2b6910));}}),_0xc59baf['on'](_0x545e24(0xa6),_0x3777c0=>{const _0x2c3810=_0x545e24,_0x9798a8=Date['now']()-_0x20edc2;logger[_0x2c3810(0xa6)](_0x2c3810(0xa2),_0x2c3810(0x9a),{'error':_0x3777c0['message'],'duration':_0x9798a8,'stderr':_0x59dad0[_0x2c3810(0xa9)]()||undefined}),_0x3b575b(_0x3777c0);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function 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 a32_0x5315(_0x1de5f2,_0x42cd4d){_0x1de5f2=_0x1de5f2-0x176;const _0x413fae=a32_0x413f();let _0x531569=_0x413fae[_0x1de5f2];return _0x531569;}(function(_0x1be00a,_0x3006da){const _0x5c16ee=a32_0x5315,_0x1b70e9=_0x1be00a();while(!![]){try{const _0x205f5b=-parseInt(_0x5c16ee(0x180))/0x1+-parseInt(_0x5c16ee(0x176))/0x2+parseInt(_0x5c16ee(0x182))/0x3*(parseInt(_0x5c16ee(0x188))/0x4)+-parseInt(_0x5c16ee(0x194))/0x5*(parseInt(_0x5c16ee(0x190))/0x6)+parseInt(_0x5c16ee(0x17d))/0x7*(parseInt(_0x5c16ee(0x185))/0x8)+parseInt(_0x5c16ee(0x192))/0x9*(-parseInt(_0x5c16ee(0x191))/0xa)+parseInt(_0x5c16ee(0x178))/0xb;if(_0x205f5b===_0x3006da)break;else _0x1b70e9['push'](_0x1b70e9['shift']());}catch(_0x5d3fdb){_0x1b70e9['push'](_0x1b70e9['shift']());}}}(a32_0x413f,0xbce50));import{logger}from'../utils/logger.js';function a32_0x413f(){const _0x2c6f4a=['*\x20暂无日志记录','duration','7oaYeTp','setLogPath','keys','189320YQlNuE','readLogs','15ZoRdNb','warn','toLocaleString','3265960DoIwed','\x20\x20\x20耗时:\x20','timestamp','199812XVgiGx','*\x20日志已清空','success','error','clearLogs','log','\x20\x20\x20详情:\x20','forEach','3546AaQDlc','101930heLLdb','9SBKrUv','details','1915IqnmCl','message','1764238NWnorQ','cwd','15660557zupsZb','level','command'];a32_0x413f=function(){return _0x2c6f4a;};return a32_0x413f();}export function showLogs(){const _0xbf9d1e=a32_0x5315;logger[_0xbf9d1e(0x17e)](process[_0xbf9d1e(0x177)]());const _0x59f9ba=logger[_0xbf9d1e(0x181)]();if(_0x59f9ba['length']===0x0){console[_0xbf9d1e(0x18d)](_0xbf9d1e(0x17b));return;}console[_0xbf9d1e(0x18d)]('*\x20Lovrabet\x20CLI\x20日志记录:\x0a'),_0x59f9ba[_0xbf9d1e(0x18f)]((_0x4e85be,_0x3c2a48)=>{const _0x4c07b4=_0xbf9d1e,_0x386225=new Date(_0x4e85be[_0x4c07b4(0x187)])[_0x4c07b4(0x184)]('zh-CN'),_0x24c03a=_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x18a)?'√':_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x18b)?'×':_0x4e85be[_0x4c07b4(0x179)]===_0x4c07b4(0x183)?'!':'i';console[_0x4c07b4(0x18d)](_0x3c2a48+0x1+'.\x20'+_0x24c03a+'\x20['+_0x4e85be[_0x4c07b4(0x17a)]+']\x20'+_0x4e85be[_0x4c07b4(0x195)]),console[_0x4c07b4(0x18d)]('\x20\x20\x20时间:\x20'+_0x386225),_0x4e85be[_0x4c07b4(0x17c)]&&console['log'](_0x4c07b4(0x186)+_0x4e85be[_0x4c07b4(0x17c)]+'ms'),_0x4e85be[_0x4c07b4(0x193)]&&Object[_0x4c07b4(0x17f)](_0x4e85be[_0x4c07b4(0x193)])['length']>0x0&&console[_0x4c07b4(0x18d)](_0x4c07b4(0x18e)+JSON['stringify'](_0x4e85be['details'],null,0x2)),console[_0x4c07b4(0x18d)]('');});}export function clearLogs(){const _0x8de30b=a32_0x5315;logger['setLogPath'](process[_0x8de30b(0x177)]()),logger[_0x8de30b(0x18c)](),console[_0x8de30b(0x18d)](_0x8de30b(0x189));}
@@ -1 +1 @@
1
- (function(_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(_0x5d23b5,_0x4f391b){const _0x1fc115=a33_0x2043,_0x4648b2=_0x5d23b5();while(!![]){try{const _0xeb3819=parseInt(_0x1fc115(0x1ce))/0x1*(-parseInt(_0x1fc115(0x1dc))/0x2)+parseInt(_0x1fc115(0x1db))/0x3+parseInt(_0x1fc115(0x1e4))/0x4*(parseInt(_0x1fc115(0x1cf))/0x5)+parseInt(_0x1fc115(0x1d6))/0x6+-parseInt(_0x1fc115(0x1eb))/0x7*(-parseInt(_0x1fc115(0x1e7))/0x8)+parseInt(_0x1fc115(0x1e6))/0x9*(-parseInt(_0x1fc115(0x1da))/0xa)+-parseInt(_0x1fc115(0x1e1))/0xb;if(_0xeb3819===_0x4f391b)break;else _0x4648b2['push'](_0x4648b2['shift']());}catch(_0x476ee5){_0x4648b2['push'](_0x4648b2['shift']());}}}(a33_0x5e1f,0x755f4));function a33_0x5e1f(){const _0x464f3c=['1595847ssyJeH','trim','PATH','214048lsSOWE','message','132921FgCfix','22128xtZavJ','预览服务器启动出错','info','success','651hPTzKG','toString','pipe','1SulDVX','70CSGSlI','.bin','预览服务器启动成功','node_modules','preview','stderr','error','5175282JlKfUl','预览服务器启动失败','启动预览服务器','env','590NMNMlH','387594WJpOGJ','1001894XVwbgg','vite\x20preview','inherit','cwd','now'];a33_0x5e1f=function(){return _0x464f3c;};return a33_0x5e1f();}function a33_0x2043(_0x5db96b,_0x104bd6){_0x5db96b=_0x5db96b-0x1ce;const _0x5e1f45=a33_0x5e1f();let _0x204348=_0x5e1f45[_0x5db96b];return _0x204348;}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x32b89b,_0x2d6bbf)=>{const _0x197e1b=a33_0x2043,_0x59b791=Date['now']();logger[_0x197e1b(0x1e9)](_0x197e1b(0x1d3),_0x197e1b(0x1d8),{'command':_0x197e1b(0x1dd)});let _0x27dff2='';const _0x3a049f=spawn('vite',[_0x197e1b(0x1d3)],{'stdio':[_0x197e1b(0x1de),'inherit',_0x197e1b(0x1ed)],'shell':!![],'env':{...process[_0x197e1b(0x1d9)],'PATH':''+join(process[_0x197e1b(0x1df)](),_0x197e1b(0x1d2),_0x197e1b(0x1d0))+delimiter+process[_0x197e1b(0x1d9)][_0x197e1b(0x1e3)]}});_0x3a049f[_0x197e1b(0x1d4)]?.['on']('data',_0x465817=>{const _0x37697f=_0x197e1b;_0x27dff2+=_0x465817[_0x37697f(0x1ec)]();}),_0x3a049f['on']('close',_0x20fa01=>{const _0x1db09b=_0x197e1b,_0x1f3236=Date['now']()-_0x59b791;if(_0x20fa01===0x0||_0x20fa01===null)logger[_0x1db09b(0x1ea)]('preview',_0x1db09b(0x1d1),_0x1f3236),_0x32b89b();else{const _0x39b65c={'exitCode':_0x20fa01,'duration':_0x1f3236,'command':_0x1db09b(0x1dd),'cwd':process[_0x1db09b(0x1df)]()};_0x27dff2['trim']()&&(_0x39b65c[_0x1db09b(0x1d4)]=_0x27dff2[_0x1db09b(0x1e2)]()),logger[_0x1db09b(0x1d5)](_0x1db09b(0x1d3),_0x1db09b(0x1d7),_0x39b65c),_0x2d6bbf(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x20fa01));}}),_0x3a049f['on']('error',_0x3d2972=>{const _0x4ca3b9=_0x197e1b,_0x4d637a=Date[_0x4ca3b9(0x1e0)]()-_0x59b791;logger['error'](_0x4ca3b9(0x1d3),_0x4ca3b9(0x1e8),{'error':_0x3d2972[_0x4ca3b9(0x1e5)],'duration':_0x4d637a,'stderr':_0x27dff2['trim']()||undefined}),_0x2d6bbf(_0x3d2972);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_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(_0x15117e,_0x5e4315){const _0x8ee3b8=a34_0x2ec1,_0x2f0e40=_0x15117e();while(!![]){try{const _0x28b6af=parseInt(_0x8ee3b8(0xaf))/0x1*(-parseInt(_0x8ee3b8(0x97))/0x2)+parseInt(_0x8ee3b8(0x99))/0x3*(parseInt(_0x8ee3b8(0xab))/0x4)+parseInt(_0x8ee3b8(0xae))/0x5*(-parseInt(_0x8ee3b8(0xaa))/0x6)+-parseInt(_0x8ee3b8(0x9d))/0x7+-parseInt(_0x8ee3b8(0xad))/0x8*(parseInt(_0x8ee3b8(0x94))/0x9)+-parseInt(_0x8ee3b8(0xa9))/0xa+parseInt(_0x8ee3b8(0xa1))/0xb*(parseInt(_0x8ee3b8(0xac))/0xc);if(_0x28b6af===_0x5e4315)break;else _0x2f0e40['push'](_0x2f0e40['shift']());}catch(_0x8afa9e){_0x2f0e40['push'](_0x2f0e40['shift']());}}}(a34_0xdd19,0x3fd54));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a34_0x2ec1(_0x59e488,_0x59498a){_0x59e488=_0x59e488-0x90;const _0xdd195b=a34_0xdd19();let _0x2ec13b=_0xdd195b[_0x59e488];return _0x2ec13b;}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a34_0xdd19(){const _0x18340c=['error','开发服务器启动失败','1356201dejBqk','start','minVersion','now','51568FHwCLo','vite\x20exited\x20with\x20code\x20','PATH','inherit','env','stderr','vite','启动开发服务器','273100cBixlt','144iKubpF','257008AxoMBQ','2004wiEbMq','3632KHbyYL','51195zLgHeQ','1mkubNF','warn','SDK\x20版本低于推荐版本','info','node_modules','write','cwd','1971VRTNzh','trim','success','167450rCILZN','data','6TTECts','close'];a34_0xdd19=function(){return _0x18340c;};return a34_0xdd19();}export function runStart(_0x75f112){return new Promise((_0x274b12,_0x4d5438)=>{const _0x2de47c=a34_0x2ec1,_0x5f8a84=Date[_0x2de47c(0xa0)](),_0x5b26be=_0x75f112||process[_0x2de47c(0x93)](),_0x44bdb3=checkSdkVersion(_0x5b26be);_0x44bdb3['needsUpgrade']&&(printSdkUpgradeWarning(_0x44bdb3),logger[_0x2de47c(0xb0)]('start',_0x2de47c(0xb1),{'currentVersion':_0x44bdb3['version'],'minVersion':_0x44bdb3[_0x2de47c(0x9f)]}));logger[_0x2de47c(0x90)](_0x2de47c(0x9e),_0x2de47c(0xa8),{'command':_0x2de47c(0xa7),'cwd':_0x5b26be});let _0x255dbf='';const _0x32b6e7=spawn('vite',{'stdio':[_0x2de47c(0xa4),'inherit','pipe'],'shell':!![],'cwd':_0x5b26be,'env':{...process['env'],'PATH':''+join(_0x5b26be,_0x2de47c(0x91),'.bin')+delimiter+process[_0x2de47c(0xa5)][_0x2de47c(0xa3)]}});_0x32b6e7[_0x2de47c(0xa6)]?.['on'](_0x2de47c(0x98),_0x309f13=>{const _0x464e61=_0x2de47c,_0x214b2c=_0x309f13['toString']();_0x255dbf+=_0x214b2c,process[_0x464e61(0xa6)][_0x464e61(0x92)](_0x214b2c);}),_0x32b6e7['on'](_0x2de47c(0x9a),_0x552cf3=>{const _0x27e2d6=_0x2de47c,_0x443b5c=Date[_0x27e2d6(0xa0)]()-_0x5f8a84;if(_0x552cf3===0x0||_0x552cf3===null)logger[_0x27e2d6(0x96)]('start','开发服务器启动成功',_0x443b5c),_0x274b12();else{const _0x336c0c={'exitCode':_0x552cf3,'duration':_0x443b5c,'command':'vite','cwd':_0x5b26be};_0x255dbf[_0x27e2d6(0x95)]()&&(_0x336c0c[_0x27e2d6(0xa6)]=_0x255dbf[_0x27e2d6(0x95)]()),logger['error'](_0x27e2d6(0x9e),_0x27e2d6(0x9c),_0x336c0c),_0x4d5438(new Error(_0x27e2d6(0xa2)+_0x552cf3));}}),_0x32b6e7['on'](_0x2de47c(0x9b),_0x4da6d0=>{const _0x5b220d=_0x2de47c,_0xc47fa6=Date[_0x5b220d(0xa0)]()-_0x5f8a84,_0x34184f={'error':_0x4da6d0['message'],'duration':_0xc47fa6,'command':_0x5b220d(0xa7),'cwd':_0x5b26be};_0x255dbf[_0x5b220d(0x95)]()&&(_0x34184f[_0x5b220d(0xa6)]=_0x255dbf[_0x5b220d(0x95)]()),logger[_0x5b220d(0x9b)](_0x5b220d(0x9e),'开发服务器启动出错',_0x34184f),_0x4d5438(_0x4da6d0);});});}
@@ -1 +1 @@
1
- function a35_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_0x46b0(){const _0x3edbb3=['列出所有配置项','gray','command','88913ccwFqw','1062FEaYBI','834790SdNiLG','9342180GNkWFi','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','map','配置当前项目的\x20App\x20Code','设置环境\x20(online/daily)','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','7992UdUCtC','2648548PcHaCB','669yeurgc','685964OYHWzy','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','6003NXneTt','description','24vKnIPL'];a35_0x46b0=function(){return _0x3edbb3;};return a35_0x46b0();}(function(_0x3f60eb,_0x423ab9){const _0x14b6c7=a35_0x1e17,_0x4459c9=_0x3f60eb();while(!![]){try{const _0x18701a=parseInt(_0x14b6c7(0x1f6))/0x1+-parseInt(_0x14b6c7(0x1f7))/0x2*(-parseInt(_0x14b6c7(0x1ed))/0x3)+parseInt(_0x14b6c7(0x1ee))/0x4+-parseInt(_0x14b6c7(0x1f8))/0x5*(-parseInt(_0x14b6c7(0x1f2))/0x6)+-parseInt(_0x14b6c7(0x1ec))/0x7+-parseInt(_0x14b6c7(0x1eb))/0x8*(-parseInt(_0x14b6c7(0x1f0))/0x9)+-parseInt(_0x14b6c7(0x1f9))/0xa;if(_0x18701a===_0x423ab9)break;else _0x4459c9['push'](_0x4459c9['shift']());}catch(_0x29aef1){_0x4459c9['push'](_0x4459c9['shift']());}}}(a35_0x46b0,0x61c10));function a35_0x1e17(_0x2a10ce,_0x37e192){_0x2a10ce=_0x2a10ce-0x1e8;const _0x46b013=a35_0x46b0();let _0x1e1762=_0x46b013[_0x2a10ce];return _0x1e1762;}import{jsxs as a35_0x142c6c,jsx as a35_0x101ae4}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x236806=a35_0x1e17,_0x28a2c5=[{'command':_0x236806(0x1fa),'description':'设置配置项'},{'command':_0x236806(0x1ea),'description':'获取配置项'},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x236806(0x1f3)}],_0x257f15=[{'command':_0x236806(0x1ef),'description':_0x236806(0x1e8)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x236806(0x1e9)}];return a35_0x142c6c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a35_0x101ae4(Box,{'marginBottom':0x1,'children':a35_0x142c6c(Text,{'color':'gray','children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x28a2c5[_0x236806(0x1fb)](_0x3a8282=>a35_0x142c6c(Box,{'children':[a35_0x142c6c(Text,{'children':['\x20\x20\x20\x20',_0x3a8282['command']]}),a35_0x101ae4(Text,{'color':'gray','children':_0x3a8282[_0x236806(0x1f1)]})]},_0x3a8282[_0x236806(0x1f5)])),a35_0x101ae4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a35_0x101ae4(Text,{'color':_0x236806(0x1f4),'children':'\x20*\x20配置示例:'})}),_0x257f15[_0x236806(0x1fb)](_0x2fc073=>a35_0x142c6c(Box,{'children':[a35_0x142c6c(Text,{'children':['\x20\x20\x20\x20',_0x2fc073['command']]}),a35_0x101ae4(Text,{'color':_0x236806(0x1f4),'children':_0x2fc073[_0x236806(0x1f1)]})]},_0x2fc073[_0x236806(0x1f5)]))]});}
@@ -1 +1 @@
1
- (function(_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 a36_0x2da4(){const _0x58c182=['flags','1148072zCTUMJ','环境配置已设置为:\x20','168644ujMcek','renameSync','未提供配置值','config','includes','dirname','配置值无效或过长','input','get','1HtpuKw','786561wxDwfJ','parse','mkdirSync','stringify','env','保存配置失败','1220344CCHTMB','.tmp','log','11kjBADK','message','set','2973831oKGTkq','--help','319530AmSNjC','help','length','app','18WABezD','utf8','35sKgnNP','保存配置失败:\x20','red','string','error','10649480NEqAHo','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','undefined','appcode'];a36_0x2da4=function(){return _0x58c182;};return a36_0x2da4();}(function(_0x2b0130,_0x4ac25f){const _0x5e367e=a36_0x2bbc,_0x230b26=_0x2b0130();while(!![]){try{const _0x2fb2a3=parseInt(_0x5e367e(0x19b))/0x1*(parseInt(_0x5e367e(0x1bc))/0x2)+-parseInt(_0x5e367e(0x19c))/0x3+-parseInt(_0x5e367e(0x1a2))/0x4+parseInt(_0x5e367e(0x1b0))/0x5*(parseInt(_0x5e367e(0x1aa))/0x6)+-parseInt(_0x5e367e(0x1a8))/0x7+-parseInt(_0x5e367e(0x1ba))/0x8*(parseInt(_0x5e367e(0x1ae))/0x9)+-parseInt(_0x5e367e(0x1b5))/0xa*(-parseInt(_0x5e367e(0x1a5))/0xb);if(_0x2fb2a3===_0x4ac25f)break;else _0x230b26['push'](_0x230b26['shift']());}catch(_0x22341a){_0x230b26['push'](_0x230b26['shift']());}}}(a36_0x2da4,0x3b4f3));import{jsx as a36_0x316f65,jsxs as a36_0x2db172}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a36_0x5e5b12 from'node:fs';function a36_0x2bbc(_0x5e3a83,_0x2a989c){_0x5e3a83=_0x5e3a83-0x198;const _0x2da41e=a36_0x2da4();let _0x2bbc8d=_0x2da41e[_0x5e3a83];return _0x2bbc8d;}import a36_0x2ae3cc from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x5941b4){const _0x75bd19=a36_0x2bbc,{cli:_0x21b97c}=_0x5941b4,_0x502b73=_0x21b97c[_0x75bd19(0x199)][0x1],_0x16e92=_0x21b97c[_0x75bd19(0x199)][0x2],_0x3a2b8a=[_0x75bd19(0x1a7),_0x75bd19(0x19a)][_0x75bd19(0x1c0)](_0x502b73||''),_0x46e730=_0x21b97c[_0x75bd19(0x199)][_0x75bd19(0x1ac)]>=0x3;if(_0x16e92===_0x75bd19(0x1a9)||_0x21b97c[_0x75bd19(0x1b9)][_0x75bd19(0x1ab)])return a36_0x316f65(ConfigHelp,{});const _0x15717a=readConfig();if(_0x502b73==='set'){if(_0x16e92){const _0x3b20bd=_0x21b97c[_0x75bd19(0x199)][0x3];if(typeof _0x3b20bd!=='undefined'){if(_0x16e92===_0x75bd19(0x1a0)&&!['online','daily']['includes'](_0x3b20bd))return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':'red','children':_0x75bd19(0x1b6)})});const _0xb8228e=isInProject(),_0x1822a4=_0xb8228e?projectConfigPath:globalConfigPath;let _0x2682dd={};try{if(existsSync(_0x1822a4)){const _0x329094=readFileSync(_0x1822a4,{'encoding':_0x75bd19(0x1af)});_0x329094&&(_0x2682dd=JSON[_0x75bd19(0x19d)](_0x329094));}}catch(_0x4e37ff){}if(typeof _0x3b20bd!==_0x75bd19(0x1b3)||_0x3b20bd[_0x75bd19(0x1ac)]>0x1f4)return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':'red','children':_0x75bd19(0x198)})});let _0x37fd8a=_0x16e92;_0x16e92===_0x75bd19(0x1ad)&&(_0x37fd8a=_0x75bd19(0x1b8),delete _0x2682dd['app']);_0x16e92===_0x75bd19(0x1b8)&&delete _0x2682dd['app'];_0x2682dd[_0x37fd8a]=_0x3b20bd;try{const _0x211423=a36_0x2ae3cc[_0x75bd19(0x1c1)](_0x1822a4);!existsSync(_0x211423)&&a36_0x5e5b12[_0x75bd19(0x19e)](_0x211423,{'recursive':!![]});const _0x50c327=_0x1822a4+'.tmp';writeFileSync(_0x50c327,JSON[_0x75bd19(0x19f)](_0x2682dd,null,0x2),{'encoding':_0x75bd19(0x1af),'mode':0x180}),a36_0x5e5b12[_0x75bd19(0x1bd)](_0x50c327,_0x1822a4);if(_0x16e92===_0x75bd19(0x1a0)){const _0x1c8744=_0xb8228e?'项目':'全局';console[_0x75bd19(0x1a4)]('✓\x20'+_0x1c8744+_0x75bd19(0x1bb)+_0x3b20bd);}}catch(_0xabb565){const _0x11b6ac=_0x1822a4+_0x75bd19(0x1a3);try{existsSync(_0x11b6ac)&&a36_0x5e5b12['unlinkSync'](_0x11b6ac);}catch(_0x379016){}return logger[_0x75bd19(0x1b4)](_0x75bd19(0x1bf),_0x75bd19(0x1a1),{'error':_0xabb565 instanceof Error?_0xabb565['message']:String(_0xabb565),'configKey':_0x16e92,'configValue':_0x3b20bd,'targetConfigPath':_0x1822a4}),a36_0x316f65(Box,{'children':a36_0x2db172(Text,{'color':_0x75bd19(0x1b2),'children':[_0x75bd19(0x1b1),_0xabb565 instanceof Error?_0xabb565[_0x75bd19(0x1a6)]:String(_0xabb565)]})});}return null;}return a36_0x316f65(Box,{'children':a36_0x316f65(Text,{'color':_0x75bd19(0x1b2),'children':_0x75bd19(0x1be)})});}}if(_0x502b73===_0x75bd19(0x19a)){if(_0x16e92){let _0x2f4f60=_0x16e92;return _0x16e92==='app'&&(_0x2f4f60=_0x75bd19(0x1b8)),console[_0x75bd19(0x1a4)](_0x15717a[_0x2f4f60]||_0x75bd19(0x1b7)),null;}return null;}if(_0x502b73==='list')return console[_0x75bd19(0x1a4)](JSON[_0x75bd19(0x19f)](_0x15717a,null,0x2)),null;if(!_0x3a2b8a||!_0x46e730)return a36_0x316f65(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a37_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_0x2143b1=a37_0x251c;(function(_0x5b8cfc,_0x2e7313){const _0x1c5158=a37_0x251c,_0x3b84d9=_0x5b8cfc();while(!![]){try{const _0x11156a=-parseInt(_0x1c5158(0x1ba))/0x1*(-parseInt(_0x1c5158(0x1bb))/0x2)+parseInt(_0x1c5158(0x1bd))/0x3+-parseInt(_0x1c5158(0x1b4))/0x4*(-parseInt(_0x1c5158(0x1af))/0x5)+-parseInt(_0x1c5158(0x1b7))/0x6*(-parseInt(_0x1c5158(0x1b6))/0x7)+parseInt(_0x1c5158(0x1b1))/0x8*(-parseInt(_0x1c5158(0x1b8))/0x9)+parseInt(_0x1c5158(0x1b3))/0xa*(parseInt(_0x1c5158(0x1b2))/0xb)+-parseInt(_0x1c5158(0x1b0))/0xc;if(_0x11156a===_0x2e7313)break;else _0x3b84d9['push'](_0x3b84d9['shift']());}catch(_0x2d4de9){_0x3b84d9['push'](_0x3b84d9['shift']());}}}(a37_0x90a9,0xc1b60));import{getEnv}from'./env.js';function a37_0x90a9(){const _0x39cafc=['22634280xXnIwW','664528zodLnO','232067DQomdv','40wbzWsT','16zAmtPV','https://user-daily.lovrabet.com','4586232OWXqRP','12kZUtMF','117cqyOfP','online','1KShMrs','869690BmZPaT','https://api.lovrabet.com','2307345ZaHTtp','https://daily-api.lovrabet.com','1450985dtcmUm'];a37_0x90a9=function(){return _0x39cafc;};return a37_0x90a9();}function a37_0x251c(_0x3c6d74,_0x91b217){_0x3c6d74=_0x3c6d74-0x1ae;const _0x90a9d1=a37_0x90a9();let _0x251c51=_0x90a9d1[_0x3c6d74];return _0x251c51;}export const getUserDomain=()=>getEnv()===a37_0x2143b1(0x1b9)?'https://user.lovrabet.com':a37_0x2143b1(0x1b5);export const getApiDomain=()=>getEnv()===a37_0x2143b1(0x1b9)?a37_0x2143b1(0x1bc):a37_0x2143b1(0x1ae);
@@ -1 +1 @@
1
- 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
+ const a38_0x8e7226=a38_0x5e51;function a38_0x5e51(_0x536953,_0x17e1b9){_0x536953=_0x536953-0x171;const _0x3d9887=a38_0x3d98();let _0x5e51b4=_0x3d9887[_0x536953];return _0x5e51b4;}(function(_0x471dff,_0x8f2d42){const _0x239b43=a38_0x5e51,_0x48c8c5=_0x471dff();while(!![]){try{const _0x14ab30=-parseInt(_0x239b43(0x177))/0x1*(-parseInt(_0x239b43(0x178))/0x2)+parseInt(_0x239b43(0x174))/0x3+parseInt(_0x239b43(0x173))/0x4+parseInt(_0x239b43(0x17c))/0x5*(parseInt(_0x239b43(0x179))/0x6)+parseInt(_0x239b43(0x17a))/0x7+parseInt(_0x239b43(0x176))/0x8*(parseInt(_0x239b43(0x175))/0x9)+-parseInt(_0x239b43(0x17d))/0xa;if(_0x14ab30===_0x8f2d42)break;else _0x48c8c5['push'](_0x48c8c5['shift']());}catch(_0x210d4d){_0x48c8c5['push'](_0x48c8c5['shift']());}}}(a38_0x3d98,0xacc87));let env=process[a38_0x8e7226(0x172)][a38_0x8e7226(0x171)]||a38_0x8e7226(0x17b);export function getEnv(){return env;}function a38_0x3d98(){const _0x314210=['36157520lVbnwo','LOVRABET_ENV','env','3267696mICwFp','3913065CqUDaG','1368rEiKYR','28576raEtoT','87uQWarr','3618IrvrOQ','767202fnYAHA','1562365GLRTon','online','50lPzLih'];a38_0x3d98=function(){return _0x314210;};return a38_0x3d98();}export function initEnv(_0x1a878f){env=_0x1a878f;}
@@ -1 +1 @@
1
- function 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(_0x5dcc5d,_0x5c298f){const _0x68ebaf=a39_0x478e,_0x2e5510=_0x5dcc5d();while(!![]){try{const _0x16dcdd=parseInt(_0x68ebaf(0x13f))/0x1*(-parseInt(_0x68ebaf(0x14c))/0x2)+parseInt(_0x68ebaf(0x133))/0x3+parseInt(_0x68ebaf(0x13e))/0x4*(parseInt(_0x68ebaf(0x121))/0x5)+-parseInt(_0x68ebaf(0x153))/0x6*(-parseInt(_0x68ebaf(0x11e))/0x7)+parseInt(_0x68ebaf(0x13b))/0x8*(parseInt(_0x68ebaf(0x116))/0x9)+parseInt(_0x68ebaf(0x110))/0xa+parseInt(_0x68ebaf(0x13d))/0xb*(-parseInt(_0x68ebaf(0x125))/0xc);if(_0x16dcdd===_0x5c298f)break;else _0x2e5510['push'](_0x2e5510['shift']());}catch(_0x350b48){_0x2e5510['push'](_0x2e5510['shift']());}}}(a39_0x3034,0x9d735));import{jsx as a39_0x8d199c,jsxs as a39_0x262220,Fragment as a39_0x3f13e4}from'react/jsx-runtime';function a39_0x3034(){const _0x13b281=['已登录','step','trim','backspace','login-prompt','8ksclmV','api-pull','31596697vMgvFS','192vnkjvL','11190xUAVGL','value','Yes','my-app','未设置','red','yellow','string','login-process','app-code','拉取API配置','*\x20创建新项目','\x20直接回车确认,或输入自定义名称','6cxNolt','includes','[可选]:\x20','green','rightArrow','应用AppCode不合法','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','1486314UWAmPH','return','3057230sGWOBQ','项目名不合法','slice','login','登录状态','creating','5025411kSKqeW','test','*\x20是否要先登录以便拉取\x20API\x20配置?','leftArrow','*\x20项目名:\x20','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','gray','项目名','21FchuTR','\x20\x20使用\x20←→\x20选择,回车确认','!\x20未检测到有效登录','89795VjwNlf','*\x20是否要自动拉取\x20API\x20配置?','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','online','12kyORdQ','√\x20检测到有效登录状态','\x20检查中...','*\x20应用AppCode\x20','confirm-api-pull','应用AppCode','length','login-check','cyan','登录失败','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','column','项目名长度不能超过\x2050\x20个字符','跳过登录','3244869qTWOOA','project-name','\x20←\x20'];a39_0x3034=function(){return _0x13b281;};return a39_0x3034();}import{useState}from'react';function a39_0x478e(_0x8b2000,_0x3dd1e0){_0x8b2000=_0x8b2000-0x10f;const _0x303470=a39_0x3034();let _0x478e60=_0x303470[_0x8b2000];return _0x478e60;}import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x1d2cef){const _0x4f179c=a39_0x478e,{onCreate:_0x38c351,env:_0x1e385e}=_0x1d2cef,[_0x598fd4,_0x21d771]=useState(_0x4f179c(0x134)),[_0x3ee4d3,_0x4bb567]=useState(''),[_0x5ee608,_0x15d85f]=useState(''),[_0x33afec,_0x2497a9]=useState(''),[_0x2bcf76,_0x4db00c]=useState(''),[_0x28a682,_0x53eb54]=useState([]),[_0x4b7b97,_0x44ef03]=useState(null),[_0x26ceab,_0x40d93d]=useState(![]),[_0x496c0a,_0x51c3e3]=useState(![]),[_0x2b5b2a,_0x3c9c94]=useState(![]),[_0x3e7963,_0x3d398b]=useState(0x0),[_0x5a05d2,_0x3c9689]=useState(0x0),_0x17fe9f=_0x4f179c(0x142),_0x1f4b96=readConfig(),_0x4a79c8=typeof _0x1f4b96['env']===_0x4f179c(0x146)?_0x1f4b96['env']:undefined;function _0x2cc452(_0x28d951){const _0x3a1119=_0x4f179c;if(_0x28d951[_0x3a1119(0x12b)]>0x32)return{'valid':![],'message':_0x3a1119(0x131)};const _0xa09755=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x28d951?.['trim']()&&!_0xa09755[_0x3a1119(0x117)](_0x28d951))return{'valid':![],'message':_0x3a1119(0x12f)};return{'valid':!![]};}function _0xaa7faf(_0x6e379e){const _0x1171d2=_0x4f179c;if(!_0x6e379e[_0x1171d2(0x138)]())return{'valid':!![]};if(_0x6e379e[_0x1171d2(0x12b)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x166cfc=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x166cfc[_0x1171d2(0x117)](_0x6e379e))return{'valid':![],'message':_0x1171d2(0x123)};return{'valid':!![]};}async function _0x31bd12(){_0x40d93d(!![]);try{const _0x548ebd=await getIsSessionValid();return _0x44ef03(_0x548ebd),_0x548ebd;}catch(_0x53ba0b){return _0x44ef03(![]),![];}finally{_0x40d93d(![]);}}async function _0x4710c1(){_0x51c3e3(!![]);try{const _0x2248d2=await authServer({'silent':!![]});return _0x44ef03(_0x2248d2),_0x2248d2;}catch(_0x5b52be){return _0x44ef03(![]),![];}finally{_0x51c3e3(![]);}}return useInput(async(_0x2b3a6a,_0x9ac038)=>{const _0x37e41c=_0x4f179c;if(_0x9ac038[_0x37e41c(0x119)]||_0x9ac038[_0x37e41c(0x150)]){if(_0x598fd4==='confirm-api-pull'){_0x3d398b(_0x56baad=>_0x56baad===0x0?0x1:0x0);return;}if(_0x598fd4==='login-prompt'){_0x3c9689(_0x1b1d50=>_0x1b1d50===0x0?0x1:0x0);return;}}if(_0x9ac038[_0x37e41c(0x10f)]){if(_0x598fd4===_0x37e41c(0x134)){const _0x4c6e64=_0x33afec[_0x37e41c(0x138)]()||_0x17fe9f;if(_0x2bcf76)return;_0x4bb567(_0x4c6e64),_0x53eb54([{'step':_0x37e41c(0x134),'label':_0x37e41c(0x11d),'value':_0x4c6e64}]),_0x2497a9(''),_0x4db00c(''),_0x21d771('app-code');return;}if(_0x598fd4===_0x37e41c(0x148)){if(_0x2bcf76)return;const _0x2e34e0=_0x33afec[_0x37e41c(0x138)]();_0x15d85f(_0x2e34e0),_0x53eb54(_0x29452a=>[..._0x29452a,{'step':_0x37e41c(0x148),'label':_0x37e41c(0x12a),'value':_0x2e34e0||_0x37e41c(0x143)}]),_0x2497a9(''),_0x4db00c('');if(_0x2e34e0){_0x21d771(_0x37e41c(0x12c));const _0x48ebd8=await _0x31bd12();_0x48ebd8?_0x21d771(_0x37e41c(0x129)):_0x21d771(_0x37e41c(0x13a));}else{const _0x3ac3ff=_0x1e385e||_0x4a79c8||'online';_0x38c351({'projectName':_0x3ee4d3,'appCode':undefined,'pullApi':![],'env':_0x3ac3ff}),_0x21d771(_0x37e41c(0x115));}return;}if(_0x598fd4==='confirm-api-pull'){const _0x29b881=_0x3e7963===0x0;_0x3c9c94(_0x29b881),_0x53eb54(_0x5580ab=>[..._0x5580ab,{'step':_0x37e41c(0x13c),'label':_0x37e41c(0x149),'value':_0x29b881?'是':'否'}]);const _0x20ae31=_0x1e385e||_0x4a79c8||_0x37e41c(0x124);_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':_0x29b881,'env':_0x20ae31}),_0x21d771('creating');return;}if(_0x598fd4===_0x37e41c(0x13a)){const _0x3dabf7=_0x5a05d2===0x0;if(_0x3dabf7){_0x21d771('login-process');const _0x3c03c1=await _0x4710c1();if(_0x3c03c1)_0x53eb54(_0x305df8=>[..._0x305df8,{'step':_0x37e41c(0x113),'label':_0x37e41c(0x114),'value':_0x37e41c(0x136)}]),_0x21d771(_0x37e41c(0x129));else{_0x53eb54(_0x2588a6=>[..._0x2588a6,{'step':'login','label':_0x37e41c(0x114),'value':_0x37e41c(0x12e)}]);const _0x377a79=_0x1e385e||_0x4a79c8||'online';_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':![],'env':_0x377a79}),_0x21d771(_0x37e41c(0x115));}}else{_0x53eb54(_0x478970=>[..._0x478970,{'step':_0x37e41c(0x113),'label':_0x37e41c(0x114),'value':_0x37e41c(0x132)}]);const _0x3bf170=_0x1e385e||_0x4a79c8||_0x37e41c(0x124);_0x38c351({'projectName':_0x3ee4d3,'appCode':_0x5ee608,'pullApi':![],'env':_0x3bf170}),_0x21d771(_0x37e41c(0x115));}return;}}if(_0x9ac038[_0x37e41c(0x139)]||_0x9ac038['delete']){_0x2497a9(_0x16dfaa=>{const _0x3eb413=_0x37e41c,_0x25e072=_0x16dfaa[_0x3eb413(0x112)](0x0,-0x1);if(_0x598fd4===_0x3eb413(0x134)){const {valid:_0x810d01,message:_0x4d0dca}=_0x2cc452(_0x25e072);_0x4db00c(_0x810d01?'':_0x4d0dca||_0x3eb413(0x111));}else{if(_0x598fd4===_0x3eb413(0x148)){const {valid:_0x53a6a2,message:_0x5e4b06}=_0xaa7faf(_0x25e072);_0x4db00c(_0x53a6a2?'':_0x5e4b06||_0x3eb413(0x151));}}return _0x25e072;});return;}if([_0x37e41c(0x115),_0x37e41c(0x12c),_0x37e41c(0x147)][_0x37e41c(0x14d)](_0x598fd4))return;if(_0x598fd4===_0x37e41c(0x129)||_0x598fd4===_0x37e41c(0x13a))return;_0x2497a9(_0x2920da=>{const _0x542e41=_0x37e41c,_0x255b76=_0x2920da+_0x2b3a6a;if(_0x598fd4===_0x542e41(0x134)){const {valid:_0x4b7eb4,message:_0x5dbc96}=_0x2cc452(_0x255b76);_0x4db00c(_0x4b7eb4?'':_0x5dbc96||_0x542e41(0x111));}else{if(_0x598fd4===_0x542e41(0x148)){const {valid:_0x3e3323,message:_0x427c0a}=_0xaa7faf(_0x255b76);_0x4db00c(_0x3e3323?'':_0x427c0a||_0x542e41(0x151));}}return _0x255b76;});}),a39_0x262220(Box,{'flexDirection':_0x4f179c(0x130),'marginTop':0x1,'children':[_0x28a682[_0x4f179c(0x12b)]===0x0&&a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'cyan','children':_0x4f179c(0x14a)})}),_0x28a682['map'](_0x17bf26=>a39_0x262220(Box,{'children':[a39_0x262220(Text,{'color':_0x4f179c(0x14f),'children':['√\x20',_0x17bf26['label'],':\x20']}),a39_0x8d199c(Text,{'color':_0x4f179c(0x12d),'children':_0x17bf26[_0x4f179c(0x140)]})]},_0x17bf26[_0x4f179c(0x137)])),_0x598fd4==='project-name'&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':_0x4f179c(0x11a)}),_0x33afec?a39_0x8d199c(Text,{'color':_0x4f179c(0x14f),'children':_0x33afec}):a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x17fe9f}),_0x2bcf76&&a39_0x262220(Text,{'color':'red','children':[_0x4f179c(0x135),_0x2bcf76]})]}),!_0x2bcf76&&!_0x33afec&&a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x14b)})})]}),_0x598fd4===_0x4f179c(0x148)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':_0x4f179c(0x128)}),a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x14e)}),a39_0x8d199c(Text,{'color':'green','children':_0x33afec}),_0x2bcf76&&a39_0x262220(Text,{'color':_0x4f179c(0x144),'children':['\x20←\x20',_0x2bcf76]})]}),!_0x2bcf76&&a39_0x8d199c(Box,{'children':a39_0x262220(Text,{'color':'gray','children':['\x20',_0x4f179c(0x11b)]})})]}),_0x598fd4===_0x4f179c(0x12c)&&a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':'*\x20正在检查登录状态...'}),_0x26ceab&&a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x127)})]}),_0x598fd4===_0x4f179c(0x129)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'green','children':_0x4f179c(0x126)})}),a39_0x8d199c(Box,{'marginTop':0x1,'children':a39_0x8d199c(Text,{'children':_0x4f179c(0x122)})}),a39_0x262220(Box,{'marginLeft':0x2,'children':[a39_0x262220(Text,{'color':_0x3e7963===0x0?'green':_0x4f179c(0x11c),'children':[_0x3e7963===0x0?'▶\x20':'\x20\x20','Yes']}),a39_0x8d199c(Text,{'children':'\x20'}),a39_0x262220(Text,{'color':_0x3e7963===0x1?_0x4f179c(0x14f):_0x4f179c(0x11c),'children':[_0x3e7963===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':_0x4f179c(0x11f)})}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'yellow','children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x598fd4===_0x4f179c(0x13a)&&a39_0x262220(a39_0x3f13e4,{'children':[a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x145),'children':_0x4f179c(0x120)})}),a39_0x8d199c(Box,{'marginTop':0x1,'children':a39_0x8d199c(Text,{'children':_0x4f179c(0x118)})}),a39_0x262220(Box,{'marginLeft':0x2,'children':[a39_0x262220(Text,{'color':_0x5a05d2===0x0?_0x4f179c(0x14f):_0x4f179c(0x11c),'children':[_0x5a05d2===0x0?'▶\x20':'\x20\x20',_0x4f179c(0x141)]}),a39_0x8d199c(Text,{'children':'\x20'}),a39_0x262220(Text,{'color':_0x5a05d2===0x1?_0x4f179c(0x14f):'gray','children':[_0x5a05d2===0x1?'▶\x20':'\x20\x20','No']})]}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a39_0x8d199c(Box,{'children':a39_0x8d199c(Text,{'color':_0x4f179c(0x145),'children':_0x4f179c(0x152)})})]}),_0x598fd4===_0x4f179c(0x147)&&a39_0x262220(Box,{'children':[a39_0x8d199c(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x496c0a&&a39_0x8d199c(Text,{'color':_0x4f179c(0x11c),'children':'\x20登录中...'})]})]});}
@@ -1 +1 @@
1
- (function(_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_0x22bb(_0xde4772,_0x59c094){_0xde4772=_0xde4772-0x165;const _0x1e2748=a40_0x1e27();let _0x22bbbf=_0x1e2748[_0xde4772];return _0x22bbbf;}(function(_0x323cc0,_0x45c282){const _0x232965=a40_0x22bb,_0x483d9a=_0x323cc0();while(!![]){try{const _0x1e841a=-parseInt(_0x232965(0x169))/0x1+-parseInt(_0x232965(0x167))/0x2*(-parseInt(_0x232965(0x166))/0x3)+parseInt(_0x232965(0x165))/0x4*(parseInt(_0x232965(0x172))/0x5)+parseInt(_0x232965(0x168))/0x6+-parseInt(_0x232965(0x16c))/0x7*(parseInt(_0x232965(0x170))/0x8)+parseInt(_0x232965(0x16b))/0x9*(parseInt(_0x232965(0x16e))/0xa)+parseInt(_0x232965(0x16f))/0xb*(-parseInt(_0x232965(0x16a))/0xc);if(_0x1e841a===_0x45c282)break;else _0x483d9a['push'](_0x483d9a['shift']());}catch(_0x19f515){_0x483d9a['push'](_0x483d9a['shift']());}}}(a40_0x1e27,0xb9978));export function formatElapsed(_0x4de5ab){const _0x4e0857=a40_0x22bb,_0x3ee6e9=Date[_0x4e0857(0x16d)]()-_0x4de5ab;if(_0x3ee6e9<0x3e8)return _0x3ee6e9+'ms';const _0xa5811f=(_0x3ee6e9/0x3e8)[_0x4e0857(0x171)](0x2),_0x5af70d=_0xa5811f['replace'](/\.?0+$/u,'');return _0x5af70d+'s';}function a40_0x1e27(){const _0x29e54f=['8uJqAgI','3WCWffM','2866158hceNdC','2443710Ehuopc','501996EaFOVb','432HUJcvL','1076022aGuQwh','14812jejGzZ','now','60pLLXZu','580107HUMylE','1256gkWXAW','toFixed','2338030gPLnBH'];a40_0x1e27=function(){return _0x29e54f;};return a40_0x1e27();}
@@ -1 +1 @@
1
- (function(_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(_0x11e880,_0x1bb300){const _0x24b23e=a41_0x3873,_0x3a4243=_0x11e880();while(!![]){try{const _0x330d54=-parseInt(_0x24b23e(0x15a))/0x1+-parseInt(_0x24b23e(0x121))/0x2+-parseInt(_0x24b23e(0x146))/0x3*(-parseInt(_0x24b23e(0x135))/0x4)+-parseInt(_0x24b23e(0x147))/0x5+parseInt(_0x24b23e(0x16e))/0x6+parseInt(_0x24b23e(0x144))/0x7*(parseInt(_0x24b23e(0x177))/0x8)+parseInt(_0x24b23e(0x162))/0x9;if(_0x330d54===_0x1bb300)break;else _0x3a4243['push'](_0x3a4243['shift']());}catch(_0x50039a){_0x3a4243['push'](_0x3a4243['shift']());}}}(a41_0x1dfd,0x638ef));import{jsx as a41_0x30a03e,Fragment as a41_0x57e905,jsxs as a41_0x200a49}from'react/jsx-runtime';import a41_0xf60639 from'node:path';import a41_0x256ed9 from'node:fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';function a41_0x1dfd(){const _0x8c70f1=['lovrabet\x20api\x20pull\x20--appcode\x20[app-code]','🚀\x20接下来可以:','length','appCode','projectCode','已自动拉取\x20✓','cyan','×\x20项目名不能为空','\x20已存在,请使用其他项目名','white','574805xSQocM','doTask','972810ZFMnMZ','3178275kaLWFI','lovrabet\x20config\x20set\x20appcode\x20[app-code]','success','√\x20配置文件已创建,应用AppCode:\x20','readFileSync','parse','online','utf8','toLocaleString','\x20Generated\x20by\x20lovrabet\x20cli\x20','dirname','existsSync','1.\x20','version','拉取API配置:\x20','env','pullApi','resolve','1.0.0','810762PWnahO','2.\x20','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','√\x20package.json\x20已更新:\x20name=','×\x20项目创建失败:\x20','配置应用AppCode:\x20','warn','cd\x20','10968147xWIbKt','\x20创建配置文件','.lovrabetrc','\x20配置应用AppCode:\x20','*\x20清理失败的项目目录:\x20','name','清理项目目录失败:\x20','setLogPath','📁\x20项目名称:\x20','yellow','项目名称:\x20','../..','811146bxSzFJ','trim','message','log','info','writeFileSync','未配置','string','cwd','8YdyOUR','更新\x20package.json\x20失败:\x20','join','green','error','\x20|\x20应用AppCode:\x20','stringify','constants','lovrabet\x20api\x20pull','460642kuOwuB','×\x20项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','开始创建项目:\x20','description','配置应用AppCode失败:\x20','API\x20配置拉取失败:\x20','\x20√\x20','🎉\x20项目创建成功!','gray','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','启动项目:\x20','*\x20正在为项目\x20','create','×\x20项目名过长,最多支持\x20100\x20个字符','projectName','\x20&&\x20lovrabet\x20start','×\x20无法在当前目录创建项目,请检查目录权限','package.json','column','🔗\x20应用AppCode:\x20','8kqxpIr','×\x20项目目录\x20','API\x20配置拉取异常:\x20','accessSync','*\x20正在拉取\x20API\x20配置...'];a41_0x1dfd=function(){return _0x8c70f1;};return a41_0x1dfd();}function a41_0x3873(_0x4101b7,_0x350c23){_0x4101b7=_0x4101b7-0x11f;const _0x1dfd5c=a41_0x1dfd();let _0x3873df=_0x1dfd5c[_0x4101b7];return _0x3873df;}import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x38addd){const _0x262bb9=a41_0x3873,[_0x310cea,_0x1d287a]=useState(![]),[_0x4aafe0,_0x5ea151]=useState(![]),[_0x367564,_0x21e607]=useState(null),_0x5d838e=useCopyProjectTemplate(),_0x35691b=useInstallDependencies(),_0x446100=useFormatCode(),_0x18603c=async _0x24f2f7=>{const _0x59b865=a41_0x3873;if(!_0x24f2f7['projectName']||_0x24f2f7[_0x59b865(0x12f)][_0x59b865(0x16f)]()===''){console['error'](_0x59b865(0x141));return;}const _0x4d282c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4d282c['test'](_0x24f2f7[_0x59b865(0x12f)])){console[_0x59b865(0x17b)](_0x59b865(0x122));return;}if(_0x24f2f7['projectName'][_0x59b865(0x13c)]>0x64){console[_0x59b865(0x17b)](_0x59b865(0x12e));return;}const _0x55006b=a41_0xf60639[_0x59b865(0x158)](process[_0x59b865(0x176)](),_0x24f2f7[_0x59b865(0x12f)]);if(a41_0x256ed9['existsSync'](_0x55006b)){console[_0x59b865(0x17b)](_0x59b865(0x136)+_0x24f2f7['projectName']+_0x59b865(0x142));return;}try{const _0x2dad25=a41_0xf60639[_0x59b865(0x151)](_0x55006b);a41_0x256ed9[_0x59b865(0x138)](_0x2dad25,a41_0x256ed9[_0x59b865(0x11f)]['W_OK']);}catch(_0xde19cf){console[_0x59b865(0x17b)](_0x59b865(0x131));return;}_0x21e607(_0x24f2f7),_0x1d287a(!![]),logger[_0x59b865(0x169)](_0x55006b),logger[_0x59b865(0x172)](_0x59b865(0x12d),_0x59b865(0x123)+_0x24f2f7['projectName'],{'projectDir':_0x55006b,'appCode':_0x24f2f7['appCode']});try{await _0x5d838e[_0x59b865(0x145)](_0x24f2f7['projectName']),await _0x4faa38(_0x24f2f7[_0x59b865(0x12f)]),await _0x35691b['doTask'](_0x24f2f7['projectName']),await _0x446100['doTask'](_0x24f2f7[_0x59b865(0x12f)]),await _0x4fc4cb(_0x24f2f7[_0x59b865(0x12f)],_0x24f2f7['appCode']||'',_0x24f2f7[_0x59b865(0x156)]);if(_0x24f2f7[_0x59b865(0x157)]&&_0x24f2f7[_0x59b865(0x13d)]){console['log'](_0x59b865(0x139));try{const _0x510168=await pullApiSilent(_0x24f2f7[_0x59b865(0x13d)],undefined,_0x55006b,_0x24f2f7[_0x59b865(0x156)]);_0x510168?(console[_0x59b865(0x171)]('√\x20API\x20配置拉取完成'),logger[_0x59b865(0x172)](_0x59b865(0x12d),'API\x20配置拉取成功:\x20'+_0x24f2f7['appCode'],{'projectDir':_0x55006b,'appCode':_0x24f2f7[_0x59b865(0x13d)],'env':_0x24f2f7[_0x59b865(0x156)]})):(console[_0x59b865(0x171)]('!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull'),logger['warn'](_0x59b865(0x12d),_0x59b865(0x126)+_0x24f2f7[_0x59b865(0x13d)],{'projectDir':_0x55006b,'appCode':_0x24f2f7['appCode'],'env':_0x24f2f7[_0x59b865(0x156)]}));}catch(_0x219925){console[_0x59b865(0x171)](_0x59b865(0x15c)),logger[_0x59b865(0x160)](_0x59b865(0x12d),_0x59b865(0x137)+_0x24f2f7[_0x59b865(0x13d)],{'projectDir':_0x55006b,'appCode':_0x24f2f7[_0x59b865(0x13d)],'env':_0x24f2f7[_0x59b865(0x156)],'error':_0x219925 instanceof Error?_0x219925[_0x59b865(0x170)]:String(_0x219925)});}}logger[_0x59b865(0x149)](_0x59b865(0x12d),'项目创建完成:\x20'+_0x24f2f7['projectName']),_0x5ea151(!![]),_0x1d287a(![]);}catch(_0x189abe){logger[_0x59b865(0x17b)](_0x59b865(0x12d),'项目创建失败:\x20'+_0x24f2f7['projectName'],{'error':_0x189abe instanceof Error?_0x189abe[_0x59b865(0x170)]:String(_0x189abe)});try{a41_0x256ed9[_0x59b865(0x152)](_0x55006b)&&(console[_0x59b865(0x171)](_0x59b865(0x166)+_0x55006b),a41_0x256ed9['rmSync'](_0x55006b,{'recursive':!![],'force':!![]}));}catch(_0x568931){logger[_0x59b865(0x160)](_0x59b865(0x12d),_0x59b865(0x168)+_0x55006b,{'error':_0x568931 instanceof Error?_0x568931[_0x59b865(0x170)]:String(_0x568931)});}_0x1d287a(![]),console['error'](_0x59b865(0x15e)+(_0x189abe instanceof Error?_0x189abe[_0x59b865(0x170)]:String(_0x189abe)));}},_0x5ebcc6=async _0xb222a3=>{const _0x3227af=a41_0x3873;await _0x18603c({'projectName':_0xb222a3,'env':_0x38addd[_0x3227af(0x156)]});},_0x4faa38=async _0x63ef9d=>{const _0x4e35ce=a41_0x3873,_0x2b19fc=a41_0xf60639[_0x4e35ce(0x158)](process['cwd'](),_0x63ef9d),_0x39eefb=a41_0xf60639[_0x4e35ce(0x179)](_0x2b19fc,'package.json');try{console['log']('*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段');const _0x501110=fileURLToPath(import.meta.url),_0x5e391=a41_0xf60639[_0x4e35ce(0x158)](a41_0xf60639[_0x4e35ce(0x151)](_0x501110),'../..'),_0x47bf3a=a41_0xf60639[_0x4e35ce(0x179)](_0x5e391,'package.json');let _0x11a562=_0x4e35ce(0x159);try{const _0x4300ab=JSON[_0x4e35ce(0x14c)](a41_0x256ed9[_0x4e35ce(0x14b)](_0x47bf3a,_0x4e35ce(0x14e)));_0x11a562=_0x4300ab[_0x4e35ce(0x154)]||'1.0.0';}catch(_0x56b73e){}const _0x16537c=a41_0x256ed9[_0x4e35ce(0x14b)](_0x39eefb,_0x4e35ce(0x14e)),_0x4998bf=JSON['parse'](_0x16537c);_0x4998bf[_0x4e35ce(0x167)]=_0x63ef9d,_0x4998bf[_0x4e35ce(0x124)]=_0x63ef9d+_0x4e35ce(0x150)+_0x11a562,a41_0x256ed9[_0x4e35ce(0x173)](_0x39eefb,JSON[_0x4e35ce(0x17d)](_0x4998bf,null,0x2)+'\x0a',_0x4e35ce(0x14e)),console[_0x4e35ce(0x171)](_0x4e35ce(0x15d)+_0x63ef9d+',\x20description='+_0x4998bf[_0x4e35ce(0x124)]),logger[_0x4e35ce(0x172)]('create','更新\x20package.json\x20name\x20和\x20description\x20字段',{'projectName':_0x63ef9d,'description':_0x4998bf['description'],'cliVersion':_0x11a562,'packageJsonPath':_0x4e35ce(0x132)});}catch(_0x4d03a8){logger[_0x4e35ce(0x17b)](_0x4e35ce(0x12d),_0x4e35ce(0x178)+_0x63ef9d,{'projectName':_0x63ef9d,'error':_0x4d03a8 instanceof Error?_0x4d03a8['message']:String(_0x4d03a8)});throw _0x4d03a8;}},_0x4fc4cb=async(_0x3e35f8,_0x3a5e31,_0x3677f1)=>{const _0x4aeb76=a41_0x3873,_0x1ce710=a41_0xf60639[_0x4aeb76(0x158)](process[_0x4aeb76(0x176)](),_0x3e35f8),_0x533684=a41_0xf60639[_0x4aeb76(0x179)](_0x1ce710,_0x4aeb76(0x164));try{_0x3a5e31?console[_0x4aeb76(0x171)](_0x4aeb76(0x12c)+_0x3e35f8+_0x4aeb76(0x165)+_0x3a5e31):console[_0x4aeb76(0x171)](_0x4aeb76(0x12c)+_0x3e35f8+_0x4aeb76(0x163));console[_0x4aeb76(0x171)]('*\x20配置文件路径:\x20'+_0x533684);const _0x3fa9c9=fileURLToPath(import.meta.url),_0x18323a=a41_0xf60639[_0x4aeb76(0x158)](a41_0xf60639[_0x4aeb76(0x151)](_0x3fa9c9),_0x4aeb76(0x16d)),_0x3f46e6=a41_0xf60639['join'](_0x18323a,'package.json');let _0x5f5364='1.0.0';try{const _0x2c7474=JSON['parse'](a41_0x256ed9[_0x4aeb76(0x14b)](_0x3f46e6,'utf8'));_0x5f5364=_0x2c7474['version']||_0x4aeb76(0x159);}catch(_0x20a288){}const _0xf0485d=readConfig(),_0x2b1d6f=typeof _0xf0485d[_0x4aeb76(0x156)]===_0x4aeb76(0x175)?_0xf0485d[_0x4aeb76(0x156)]:undefined,{app:_0x2f5779,appcode:_0x4a6ecf,..._0x239a62}=_0xf0485d,_0x4b52ad={..._0x239a62,'appcode':_0x3a5e31||'','env':_0x3677f1||_0x2b1d6f||_0x4aeb76(0x14d),'createdAt':new Date()[_0x4aeb76(0x14f)](),'version':_0x5f5364};a41_0x256ed9['writeFileSync'](_0x533684,JSON['stringify'](_0x4b52ad,null,0x2),_0x4aeb76(0x14e)),_0x3a5e31?console[_0x4aeb76(0x171)](_0x4aeb76(0x14a)+_0x3a5e31):console[_0x4aeb76(0x171)](_0x4aeb76(0x12a)),logger[_0x4aeb76(0x172)]('create',_0x4aeb76(0x15f)+_0x3a5e31,{'projectName':_0x3e35f8,'configFile':_0x4aeb76(0x164)});}catch(_0x137c66){logger[_0x4aeb76(0x17b)]('create',_0x4aeb76(0x125)+_0x3a5e31,{'projectName':_0x3e35f8,'error':_0x137c66 instanceof Error?_0x137c66[_0x4aeb76(0x170)]:String(_0x137c66)});}};useEffect(()=>{const _0x822c8e=a41_0x3873;_0x38addd[_0x822c8e(0x13e)]&&_0x5ebcc6(_0x38addd[_0x822c8e(0x13e)]);},[_0x38addd['projectCode']]);if(!_0x310cea&&!_0x4aafe0&&!_0x38addd[_0x262bb9(0x13e)])return a41_0x30a03e(EnhancedGuidedCreate,{'onCreate':_0x18603c,'env':_0x38addd['env']});if(_0x310cea)return a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'marginTop':0x1,'children':[a41_0x30a03e(Box,{'width':'1'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x262bb9(0x127)}),a41_0x30a03e(Text,{'children':_0x262bb9(0x16c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x367564?.['projectName']}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x30a03e(Text,{'children':_0x262bb9(0x17c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x367564[_0x262bb9(0x13d)]})]})]}),a41_0x30a03e(TaskRunning,{..._0x5d838e}),a41_0x30a03e(TaskRunning,{..._0x35691b}),a41_0x30a03e(TaskRunning,{..._0x446100})]});if(_0x4aafe0)return a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'marginTop':0x1,'children':[a41_0x30a03e(Box,{'width':'1'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'\x20√\x20'}),a41_0x30a03e(Text,{'children':_0x262bb9(0x16c)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':_0x367564?.[_0x262bb9(0x12f)]}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x30a03e(Text,{'children':_0x262bb9(0x17c)}),a41_0x30a03e(Text,{'color':'cyan','children':_0x367564[_0x262bb9(0x13d)]})]})]}),a41_0x30a03e(TaskFinished,{..._0x5d838e}),a41_0x30a03e(TaskFinished,{..._0x35691b}),a41_0x30a03e(TaskFinished,{..._0x446100}),a41_0x30a03e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'─'['repeat'](0x3c)})}),a41_0x30a03e(Box,{'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'bold':!![],'children':_0x262bb9(0x128)})}),a41_0x200a49(Box,{'marginTop':0x1,'flexDirection':'column','children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x262bb9(0x16a)}),a41_0x30a03e(Text,{'color':'white','bold':!![],'children':_0x367564?.[_0x262bb9(0x12f)]})]}),_0x367564?.[_0x262bb9(0x13d)]&&a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':_0x262bb9(0x134)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'bold':!![],'children':_0x367564[_0x262bb9(0x13d)]})]}),a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'children':'📦\x20API配置:\x20'}),_0x367564?.[_0x262bb9(0x157)]?a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'bold':!![],'children':_0x262bb9(0x13f)}):_0x367564?.['appCode']?a41_0x30a03e(Text,{'color':_0x262bb9(0x16b),'bold':!![],'children':'需手动拉取'}):a41_0x30a03e(Text,{'color':'gray','bold':!![],'children':_0x262bb9(0x174)})]})]}),a41_0x30a03e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a41_0x30a03e(Text,{'color':'cyan','bold':!![],'children':_0x262bb9(0x13b)})}),a41_0x200a49(Box,{'marginLeft':0x2,'flexDirection':_0x262bb9(0x133),'children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':'green','children':_0x262bb9(0x153)}),a41_0x30a03e(Text,{'color':'white','children':_0x262bb9(0x12b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x161)+_0x367564?.[_0x262bb9(0x12f)]+_0x262bb9(0x130)})]}),_0x367564?.[_0x262bb9(0x13d)]&&!_0x367564?.[_0x262bb9(0x157)]&&a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x16b),'children':_0x262bb9(0x15b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':_0x262bb9(0x155)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x120)})]}),!_0x367564?.['appCode']&&a41_0x200a49(a41_0x57e905,{'children':[a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x129),'children':_0x262bb9(0x15b)}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':'配置AppCode:\x20'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x140),'bold':!![],'children':_0x262bb9(0x148)})]}),a41_0x200a49(Box,{'children':[a41_0x30a03e(Text,{'color':_0x262bb9(0x129),'children':'3.\x20'}),a41_0x30a03e(Text,{'color':_0x262bb9(0x143),'children':'拉取API配置:\x20'}),a41_0x30a03e(Text,{'color':'cyan','bold':!![],'children':_0x262bb9(0x13a)})]})]})]}),a41_0x30a03e(Box,{'marginTop':0x1,'children':a41_0x30a03e(Text,{'color':_0x262bb9(0x17a),'children':'─'['repeat'](0x3c)})})]});return null;}
@@ -1 +1 @@
1
- (function(_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(_0x25d749,_0x25eabf){var _0xb4c1ac=a42_0x6137,_0x42ce0a=_0x25d749();while(!![]){try{var _0x5d2bea=-parseInt(_0xb4c1ac(0x1d6))/0x1*(-parseInt(_0xb4c1ac(0x1cd))/0x2)+parseInt(_0xb4c1ac(0x1d4))/0x3+-parseInt(_0xb4c1ac(0x1d0))/0x4+parseInt(_0xb4c1ac(0x1d2))/0x5*(parseInt(_0xb4c1ac(0x1da))/0x6)+parseInt(_0xb4c1ac(0x1d8))/0x7+parseInt(_0xb4c1ac(0x1d3))/0x8*(-parseInt(_0xb4c1ac(0x1db))/0x9)+-parseInt(_0xb4c1ac(0x1d1))/0xa*(parseInt(_0xb4c1ac(0x1d7))/0xb);if(_0x5d2bea===_0x25eabf)break;else _0x42ce0a['push'](_0x42ce0a['shift']());}catch(_0x339783){_0x42ce0a['push'](_0x42ce0a['shift']());}}}(a42_0x1a40,0x1e5e8));import{jsx as a42_0x453b89,jsxs as a42_0xe2fd78}from'react/jsx-runtime';function a42_0x6137(_0x366718,_0x4766c5){_0x366718=_0x366718-0x1cd;var _0x1a40c0=a42_0x1a40();var _0x613706=_0x1a40c0[_0x366718];return _0x613706;}import{Box,Text}from'ink';function a42_0x1a40(){var _0x3f3662=['taskName','\x20√\x20','778104lkHccn','24050VOpaUM','2260fgahcN','56qFYGcW','301962FyGKLx','green','29510eqDKKm','506FQrQTi','1391047SPzsQj','elapsed','360lIeQjX','19269XWCRTQ','8JqguyO'];a42_0x1a40=function(){return _0x3f3662;};return a42_0x1a40();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x1eaa75){var _0x5cc263=a42_0x6137;return a42_0xe2fd78(Box,{'children':[a42_0x453b89(Box,{'width':'1'}),a42_0x453b89(Text,{'color':_0x5cc263(0x1d5),'children':_0x5cc263(0x1cf)}),a42_0x453b89(Text,{'children':_0x1eaa75[_0x5cc263(0x1ce)]}),a42_0x453b89(TaskTime,{'elapsed':_0x1eaa75[_0x5cc263(0x1d9)]})]});}
@@ -1 +1 @@
1
- (function(_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(_0x48fdde,_0x1b4493){var _0x38c2d4=a43_0x1b0f,_0x28d0c6=_0x48fdde();while(!![]){try{var _0x325216=parseInt(_0x38c2d4(0xc0))/0x1+parseInt(_0x38c2d4(0xbf))/0x2*(parseInt(_0x38c2d4(0xb9))/0x3)+parseInt(_0x38c2d4(0xc1))/0x4+parseInt(_0x38c2d4(0xbc))/0x5+parseInt(_0x38c2d4(0xbd))/0x6*(parseInt(_0x38c2d4(0xb7))/0x7)+-parseInt(_0x38c2d4(0xba))/0x8+-parseInt(_0x38c2d4(0xc2))/0x9;if(_0x325216===_0x1b4493)break;else _0x28d0c6['push'](_0x28d0c6['shift']());}catch(_0x12955e){_0x28d0c6['push'](_0x28d0c6['shift']());}}}(a43_0x313f,0x6ff90));function a43_0x1b0f(_0x3c7711,_0x3d9a59){_0x3c7711=_0x3c7711-0xb6;var _0x313fe4=a43_0x313f();var _0x1b0f2f=_0x313fe4[_0x3c7711];return _0x1b0f2f;}import{jsx as a43_0x1413c5,jsxs as a43_0x4bccd3}from'react/jsx-runtime';import{Text}from'ink';function a43_0x313f(){var _0x22a222=['green','45HxPiGZ','2856480GlEfWA','dots','680310xwIdrx','12YbKLyf','finished','120634rwwLtj','754985wOURZp','1511716beJrfx','19085643cvNVPW','loading','2669086ljkDDS'];a43_0x313f=function(){return _0x22a222;};return a43_0x313f();}import a43_0x5311f9 from'ink-spinner';export function TaskLoading(_0x49df93){var _0x54e32e=a43_0x1b0f;if(_0x49df93[_0x54e32e(0xbe)])return a43_0x1413c5(Text,{'color':_0x54e32e(0xb8),'children':'\x20√\x20'});if(_0x49df93[_0x54e32e(0xb6)])return a43_0x4bccd3(Text,{'color':'green','children':['\x20',a43_0x1413c5(a43_0x5311f9,{'type':_0x54e32e(0xbb)}),'\x20']});return a43_0x1413c5(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- (function(_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 a44_0x3cdf(_0x1692b0,_0x35f3e5){_0x1692b0=_0x1692b0-0x110;var _0x4ccee9=a44_0x4cce();var _0x3cdff7=_0x4ccee9[_0x1692b0];return _0x3cdff7;}(function(_0x93a208,_0x44e00d){var _0x10d35f=a44_0x3cdf,_0x3ecc34=_0x93a208();while(!![]){try{var _0x1132d9=-parseInt(_0x10d35f(0x112))/0x1+-parseInt(_0x10d35f(0x116))/0x2+-parseInt(_0x10d35f(0x113))/0x3*(-parseInt(_0x10d35f(0x119))/0x4)+parseInt(_0x10d35f(0x111))/0x5*(-parseInt(_0x10d35f(0x115))/0x6)+parseInt(_0x10d35f(0x118))/0x7*(-parseInt(_0x10d35f(0x11b))/0x8)+parseInt(_0x10d35f(0x114))/0x9*(parseInt(_0x10d35f(0x11a))/0xa)+parseInt(_0x10d35f(0x117))/0xb*(parseInt(_0x10d35f(0x110))/0xc);if(_0x1132d9===_0x44e00d)break;else _0x3ecc34['push'](_0x3ecc34['shift']());}catch(_0x1ad735){_0x3ecc34['push'](_0x3ecc34['shift']());}}}(a44_0x4cce,0x8052b));import{jsx as a44_0x4f20ba,jsxs as a44_0x5a0522}from'react/jsx-runtime';function a44_0x4cce(){var _0x49db92=['232QEeCvT','12NAgjoR','20VFNUGx','835731NjsGLY','24syRLNq','2079IcURNT','208788tgEJNn','1011376GfZEzk','16493235eGLQMt','6181sBdGyT','225104BbtnNB','3560MyRASe'];a44_0x4cce=function(){return _0x49db92;};return a44_0x4cce();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x2600df){return a44_0x5a0522(Box,{'children':[a44_0x4f20ba(Box,{'width':'1'}),a44_0x4f20ba(TaskLoading,{..._0x2600df}),a44_0x4f20ba(Text,{'children':_0x2600df['taskName']}),a44_0x4f20ba(TaskTime,{'elapsed':_0x2600df['elapsed']})]});}
@@ -1 +1 @@
1
- (function(_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(_0x146ea7,_0x114cb4){var _0x650673=a45_0x4812,_0x28dee5=_0x146ea7();while(!![]){try{var _0x5cdbbb=-parseInt(_0x650673(0xc2))/0x1*(parseInt(_0x650673(0xcc))/0x2)+parseInt(_0x650673(0xc3))/0x3+-parseInt(_0x650673(0xca))/0x4*(parseInt(_0x650673(0xcf))/0x5)+-parseInt(_0x650673(0xc7))/0x6*(-parseInt(_0x650673(0xce))/0x7)+parseInt(_0x650673(0xc4))/0x8*(-parseInt(_0x650673(0xc1))/0x9)+-parseInt(_0x650673(0xcd))/0xa*(parseInt(_0x650673(0xc8))/0xb)+-parseInt(_0x650673(0xc5))/0xc*(-parseInt(_0x650673(0xc6))/0xd);if(_0x5cdbbb===_0x114cb4)break;else _0x28dee5['push'](_0x28dee5['shift']());}catch(_0x150b30){_0x28dee5['push'](_0x28dee5['shift']());}}}(a45_0x5dda,0x84ba8));function a45_0x4812(_0x1321d0,_0x58ea81){_0x1321d0=_0x1321d0-0xc1;var _0x5ddadd=a45_0x5dda();var _0x481270=_0x5ddadd[_0x1321d0];return _0x481270;}import{jsx as a45_0x5965cc,Fragment as a45_0x357ed7,jsxs as a45_0x157142}from'react/jsx-runtime';import{Text}from'ink';function a45_0x5dda(){var _0x5a6c60=['279504unDIXB','108mchuad','1723839ENRnbV','83802GBFOLm','11WvNSce','gray','394276IZNgyz','elapsed','128lXVpXS','5200450qyyGjs','301Fpapek','25TLpxEg','45RDEFFV','7383aGWuHS','1229220cfSzpR'];a45_0x5dda=function(){return _0x5a6c60;};return a45_0x5dda();}export function TaskTime(_0x41211c){var _0x5b19ca=a45_0x4812;if(_0x41211c[_0x5b19ca(0xcb)])return a45_0x157142(a45_0x357ed7,{'children':[a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'children':'\x20['}),a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'bold':!![],'children':_0x41211c['elapsed']}),a45_0x5965cc(Text,{'color':_0x5b19ca(0xc9),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a46_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_0x2270c1=a46_0x57c2;(function(_0xea891d,_0x407bcd){const _0x3b305d=a46_0x57c2,_0x38271b=_0xea891d();while(!![]){try{const _0x1c2668=-parseInt(_0x3b305d(0x72))/0x1*(-parseInt(_0x3b305d(0x65))/0x2)+parseInt(_0x3b305d(0x66))/0x3+-parseInt(_0x3b305d(0x78))/0x4*(parseInt(_0x3b305d(0x69))/0x5)+parseInt(_0x3b305d(0x6e))/0x6*(parseInt(_0x3b305d(0x75))/0x7)+-parseInt(_0x3b305d(0x6f))/0x8*(-parseInt(_0x3b305d(0x76))/0x9)+-parseInt(_0x3b305d(0x6c))/0xa+-parseInt(_0x3b305d(0x68))/0xb*(parseInt(_0x3b305d(0x67))/0xc);if(_0x1c2668===_0x407bcd)break;else _0x38271b['push'](_0x38271b['shift']());}catch(_0x144eff){_0x38271b['push'](_0x38271b['shift']());}}}(a46_0xda6b,0x694d1));import a46_0x1cbd2d from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';function a46_0x57c2(_0x2adff4,_0x5b4368){_0x2adff4=_0x2adff4-0x64;const _0xda6b94=a46_0xda6b();let _0x57c2ec=_0xda6b94[_0x2adff4];return _0x57c2ec;}import{logger}from'../utils/logger.js';const __dirname=a46_0x1cbd2d[a46_0x2270c1(0x6b)](fileURLToPath(import.meta.url)),templateDir=a46_0x1cbd2d[a46_0x2270c1(0x77)](__dirname,'../../templates/projects/sub-app-react-demo');export function useCopyProjectTemplate(){const _0x1c600d=a46_0x2270c1,[_0x1e3ec4,_0xe0a6ab]=useState(![]),[_0x4e0130,_0x27a6d9]=useState(![]),[_0x7026ec,_0x2ac3de]=useState(''),_0x5eec6b=useCallback(async _0x102bdd=>{const _0x25f92c=a46_0x57c2,_0x34232b=Date[_0x25f92c(0x6a)](),_0x7c2304=a46_0x1cbd2d['resolve'](process[_0x25f92c(0x71)](),_0x102bdd);_0xe0a6ab(!![]);try{logger[_0x25f92c(0x70)](_0x25f92c(0x79),'开始复制项目模板',{'projectCode':_0x102bdd,'templateDir':templateDir}),await copyDirectory(templateDir,_0x7c2304);const _0x4aaeab=Date[_0x25f92c(0x6a)]()-_0x34232b;logger[_0x25f92c(0x74)](_0x25f92c(0x79),_0x25f92c(0x73),_0x4aaeab,{'projectCode':_0x102bdd});}catch(_0x56304d){const _0x4bf26f=Date['now']()-_0x34232b;logger[_0x25f92c(0x64)](_0x25f92c(0x79),_0x25f92c(0x7a),{'projectCode':_0x102bdd,'error':_0x56304d instanceof Error?_0x56304d['message']:String(_0x56304d),'duration':_0x4bf26f});throw _0x56304d;}finally{_0xe0a6ab(![]),_0x27a6d9(!![]),_0x2ac3de(formatElapsed(_0x34232b));}},[]);return{'taskName':_0x1c600d(0x6d),'finished':_0x4e0130,'loading':_0x1e3ec4,'elapsed':_0x7026ec,'doTask':_0x5eec6b};}function a46_0xda6b(){const _0x2d6376=['5139ZVsTnz','resolve','284vJfith','copy','项目模板复制失败','error','2mpVloe','1685385UWbGiB','24aOPlMz','5370541Xyvykz','35765QFoCca','now','dirname','2216290cWXbAt','复制项目文件','2550162fQxBma','328Iaylhs','info','cwd','702007MffJco','项目模板复制完成','success','14lHGYbB'];a46_0xda6b=function(){return _0x2d6376;};return a46_0xda6b();}