@modern-js/app-tools 2.69.5 → 3.0.0-alpha.0

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 (578) hide show
  1. package/bin/modern.js +2 -8
  2. package/dist/cjs/builder/builder-rspack/index.js +35 -27
  3. package/dist/cjs/builder/generator/adapterCopy.js +75 -46
  4. package/dist/cjs/builder/generator/createBuilderProviderConfig.js +83 -81
  5. package/dist/cjs/builder/generator/createCopyPattern.js +59 -58
  6. package/dist/cjs/builder/generator/getBuilderEnvironments.js +80 -82
  7. package/dist/cjs/builder/generator/index.js +70 -85
  8. package/dist/cjs/builder/index.js +44 -47
  9. package/dist/cjs/builder/shared/builderPlugins/adapterBasic.js +106 -83
  10. package/dist/cjs/builder/shared/builderPlugins/adapterHtml.js +79 -74
  11. package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +131 -165
  12. package/dist/cjs/builder/shared/builderPlugins/builderHooks.js +47 -46
  13. package/dist/cjs/builder/shared/builderPlugins/index.js +76 -25
  14. package/dist/cjs/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +66 -49
  15. package/dist/cjs/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +51 -50
  16. package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +178 -317
  17. package/dist/cjs/builder/shared/bundlerPlugins/index.js +69 -23
  18. package/dist/cjs/builder/shared/createCopyInfo.js +54 -43
  19. package/dist/cjs/builder/shared/index.js +69 -23
  20. package/dist/cjs/builder/shared/loaders/serverModuleLoader.js +35 -23
  21. package/dist/cjs/builder/shared/types.js +17 -15
  22. package/dist/cjs/commands/build.js +107 -96
  23. package/dist/cjs/commands/deploy.js +40 -32
  24. package/dist/cjs/commands/dev.js +122 -141
  25. package/dist/cjs/commands/index.js +74 -121
  26. package/dist/cjs/commands/inspect.js +45 -39
  27. package/dist/cjs/commands/serve.js +87 -84
  28. package/dist/cjs/compat/hooks.js +97 -177
  29. package/dist/cjs/compat/index.js +57 -59
  30. package/dist/cjs/compat/utils.js +125 -116
  31. package/dist/cjs/config/default.js +118 -225
  32. package/dist/cjs/config/index.js +62 -23
  33. package/dist/cjs/config/initialize/index.js +37 -29
  34. package/dist/cjs/config/initialize/inits.js +92 -106
  35. package/dist/cjs/constants.js +37 -37
  36. package/dist/cjs/defineConfig.js +33 -35
  37. package/dist/cjs/esm/esbuild-loader.js +62 -0
  38. package/dist/cjs/esm/esbuild-loader.mjs +11 -23
  39. package/dist/cjs/esm/register-esm.js +85 -0
  40. package/dist/cjs/esm/register-esm.mjs +41 -54
  41. package/dist/cjs/esm/ts-node-loader.js +62 -0
  42. package/dist/cjs/esm/ts-node-loader.mjs +11 -23
  43. package/dist/cjs/esm/utils.js +69 -0
  44. package/dist/cjs/esm/utils.mjs +24 -36
  45. package/dist/cjs/exports/server.js +16 -26
  46. package/dist/cjs/index.js +288 -199
  47. package/dist/cjs/locale/en.js +70 -62
  48. package/dist/cjs/locale/index.js +42 -33
  49. package/dist/cjs/locale/zh.js +70 -62
  50. package/dist/cjs/plugins/analyze/constants.js +43 -36
  51. package/dist/cjs/plugins/analyze/getBundleEntry.js +90 -94
  52. package/dist/cjs/plugins/analyze/getFileSystemEntry.js +110 -137
  53. package/dist/cjs/plugins/analyze/getHtmlTemplate.js +125 -127
  54. package/dist/cjs/plugins/analyze/getServerRoutes.js +160 -164
  55. package/dist/cjs/plugins/analyze/index.js +221 -208
  56. package/dist/cjs/plugins/analyze/isDefaultExportFunction.js +81 -76
  57. package/dist/cjs/plugins/analyze/templates.js +36 -28
  58. package/dist/cjs/plugins/analyze/utils.js +109 -104
  59. package/dist/cjs/plugins/deploy/index.js +64 -56
  60. package/dist/cjs/plugins/deploy/platforms/gh-pages.js +82 -86
  61. package/dist/cjs/plugins/deploy/platforms/netlify-entry.js +35 -2
  62. package/dist/cjs/plugins/deploy/platforms/netlify-handler.js +86 -62
  63. package/dist/cjs/plugins/deploy/platforms/netlify.js +145 -157
  64. package/dist/cjs/plugins/deploy/platforms/node-entry.js +73 -45
  65. package/dist/cjs/plugins/deploy/platforms/node.js +113 -113
  66. package/dist/cjs/plugins/deploy/platforms/platform.js +17 -15
  67. package/dist/cjs/plugins/deploy/platforms/vercel-entry.js +36 -2
  68. package/dist/cjs/plugins/deploy/platforms/vercel-handler.js +87 -63
  69. package/dist/cjs/plugins/deploy/platforms/vercel.js +165 -169
  70. package/dist/cjs/plugins/deploy/utils.js +85 -85
  71. package/dist/cjs/plugins/initialize/index.js +86 -91
  72. package/dist/cjs/plugins/serverBuild.js +85 -78
  73. package/dist/cjs/plugins/serverRuntime.js +46 -34
  74. package/dist/cjs/run/index.js +86 -128
  75. package/dist/cjs/types/config/deploy.js +17 -15
  76. package/dist/cjs/types/config/dev.js +17 -15
  77. package/dist/cjs/types/config/experiments.js +17 -15
  78. package/dist/cjs/types/config/html.js +17 -15
  79. package/dist/cjs/types/config/index.js +55 -19
  80. package/dist/cjs/types/config/output.js +17 -15
  81. package/dist/cjs/types/config/performance.js +17 -15
  82. package/dist/cjs/types/config/resolve.js +17 -15
  83. package/dist/cjs/types/config/security.js +17 -15
  84. package/dist/cjs/types/config/source.js +17 -15
  85. package/dist/cjs/types/config/testing.js +17 -15
  86. package/dist/cjs/types/config/tools.js +17 -15
  87. package/dist/cjs/types/index.js +55 -23
  88. package/dist/cjs/types/plugin.js +18 -0
  89. package/dist/cjs/types/utils.js +17 -15
  90. package/dist/cjs/utils/config.js +40 -80
  91. package/dist/cjs/utils/createServer.js +46 -47
  92. package/dist/cjs/utils/env.js +41 -35
  93. package/dist/cjs/utils/generateWatchFiles.js +49 -60
  94. package/dist/cjs/utils/getConfigFile.js +46 -38
  95. package/dist/cjs/utils/getSelectedEntries.js +55 -53
  96. package/dist/cjs/utils/initAppContext.js +66 -59
  97. package/dist/cjs/utils/loadPlugins.js +77 -70
  98. package/dist/cjs/utils/printInstructions.js +39 -31
  99. package/dist/cjs/utils/register.js +108 -117
  100. package/dist/cjs/utils/restart.js +46 -41
  101. package/dist/cjs/utils/routes.js +60 -52
  102. package/dist/cjs/utils/types.js +17 -15
  103. package/dist/esm/builder/builder-rspack/index.mjs +6 -0
  104. package/dist/esm/builder/generator/adapterCopy.mjs +35 -0
  105. package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +59 -0
  106. package/dist/esm/builder/generator/createCopyPattern.mjs +30 -0
  107. package/dist/esm/builder/generator/getBuilderEnvironments.mjs +56 -0
  108. package/dist/esm/builder/generator/index.mjs +45 -0
  109. package/dist/esm/builder/index.mjs +7 -0
  110. package/dist/esm/builder/shared/builderPlugins/adapterBasic.mjs +78 -0
  111. package/dist/esm/builder/shared/builderPlugins/adapterHtml.mjs +55 -0
  112. package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +117 -0
  113. package/dist/esm/builder/shared/builderPlugins/builderHooks.mjs +17 -0
  114. package/dist/esm/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +37 -0
  115. package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +22 -0
  116. package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +157 -0
  117. package/dist/esm/builder/shared/createCopyInfo.mjs +15 -0
  118. package/dist/esm/builder/shared/loaders/serverModuleLoader.mjs +5 -0
  119. package/dist/esm/commands/build.mjs +68 -0
  120. package/dist/esm/commands/deploy.mjs +10 -0
  121. package/dist/esm/commands/dev.mjs +82 -0
  122. package/dist/esm/commands/index.mjs +37 -0
  123. package/dist/esm/commands/inspect.mjs +15 -0
  124. package/dist/esm/commands/serve.mjs +47 -0
  125. package/dist/esm/compat/hooks.mjs +67 -0
  126. package/dist/esm/compat/index.mjs +28 -0
  127. package/dist/esm/compat/utils.mjs +95 -0
  128. package/dist/esm/config/default.mjs +90 -0
  129. package/dist/{esm-node/config/index.js → esm/config/index.mjs} +0 -1
  130. package/dist/esm/config/initialize/index.mjs +7 -0
  131. package/dist/esm/config/initialize/inits.mjs +54 -0
  132. package/dist/esm/constants.mjs +3 -0
  133. package/dist/esm/defineConfig.mjs +2 -0
  134. package/dist/esm/esm/esbuild-loader.mjs +18 -29
  135. package/dist/esm/esm/register-esm.mjs +45 -57
  136. package/dist/esm/esm/ts-node-loader.mjs +18 -30
  137. package/dist/esm/esm/utils.mjs +31 -42
  138. package/dist/esm/index.mjs +121 -0
  139. package/dist/esm/locale/en.mjs +42 -0
  140. package/dist/esm/locale/index.mjs +9 -0
  141. package/dist/esm/locale/zh.mjs +42 -0
  142. package/dist/esm/plugins/analyze/constants.mjs +8 -0
  143. package/dist/esm/plugins/analyze/getBundleEntry.mjs +53 -0
  144. package/dist/esm/plugins/analyze/getFileSystemEntry.mjs +66 -0
  145. package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +85 -0
  146. package/dist/esm/plugins/analyze/getServerRoutes.mjs +130 -0
  147. package/dist/esm/plugins/analyze/index.mjs +193 -0
  148. package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +41 -0
  149. package/dist/esm/plugins/analyze/templates.mjs +22 -0
  150. package/dist/esm/plugins/analyze/utils.mjs +55 -0
  151. package/dist/esm/plugins/deploy/index.mjs +38 -0
  152. package/dist/esm/plugins/deploy/platforms/gh-pages.mjs +43 -0
  153. package/dist/esm/plugins/deploy/platforms/netlify-entry.mjs +2 -1
  154. package/dist/esm/plugins/deploy/platforms/netlify-handler.mjs +85 -0
  155. package/dist/esm/plugins/deploy/platforms/netlify.mjs +111 -0
  156. package/dist/esm/plugins/deploy/platforms/node-entry.mjs +68 -0
  157. package/dist/esm/plugins/deploy/platforms/node.mjs +77 -0
  158. package/dist/esm/plugins/deploy/platforms/vercel-entry.mjs +3 -3
  159. package/dist/esm/plugins/deploy/platforms/vercel-handler.mjs +85 -0
  160. package/dist/esm/plugins/deploy/platforms/vercel.mjs +131 -0
  161. package/dist/esm/plugins/deploy/utils.mjs +39 -0
  162. package/dist/esm/plugins/initialize/index.mjs +59 -0
  163. package/dist/esm/plugins/serverBuild.mjs +48 -0
  164. package/dist/esm/plugins/serverRuntime.mjs +15 -0
  165. package/dist/esm/run/index.mjs +60 -0
  166. package/dist/esm/types/index.mjs +1 -0
  167. package/dist/esm/utils/config.mjs +11 -0
  168. package/dist/esm/utils/createServer.mjs +12 -0
  169. package/dist/esm/utils/env.mjs +12 -0
  170. package/dist/esm/utils/generateWatchFiles.mjs +10 -0
  171. package/dist/esm/utils/getConfigFile.mjs +5 -0
  172. package/dist/esm/utils/getSelectedEntries.mjs +26 -0
  173. package/dist/esm/utils/initAppContext.mjs +26 -0
  174. package/dist/esm/utils/loadPlugins.mjs +45 -0
  175. package/dist/esm/utils/printInstructions.mjs +9 -0
  176. package/dist/esm/utils/register.mjs +75 -0
  177. package/dist/esm/utils/restart.mjs +18 -0
  178. package/dist/esm/utils/routes.mjs +15 -0
  179. package/dist/esm-node/builder/builder-rspack/index.mjs +6 -0
  180. package/dist/esm-node/builder/generator/adapterCopy.mjs +35 -0
  181. package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +59 -0
  182. package/dist/esm-node/builder/generator/createCopyPattern.mjs +30 -0
  183. package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +56 -0
  184. package/dist/esm-node/builder/generator/index.mjs +45 -0
  185. package/dist/esm-node/builder/index.mjs +7 -0
  186. package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +78 -0
  187. package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.mjs +55 -0
  188. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +117 -0
  189. package/dist/esm-node/builder/shared/builderPlugins/builderHooks.mjs +17 -0
  190. package/dist/esm-node/builder/shared/builderPlugins/index.mjs +4 -0
  191. package/dist/esm-node/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +37 -0
  192. package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +22 -0
  193. package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +157 -0
  194. package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +3 -0
  195. package/dist/esm-node/builder/shared/createCopyInfo.mjs +15 -0
  196. package/dist/esm-node/builder/shared/index.mjs +3 -0
  197. package/dist/esm-node/builder/shared/loaders/serverModuleLoader.mjs +5 -0
  198. package/dist/esm-node/commands/build.mjs +68 -0
  199. package/dist/esm-node/commands/deploy.mjs +10 -0
  200. package/dist/esm-node/commands/dev.mjs +82 -0
  201. package/dist/esm-node/commands/index.mjs +37 -0
  202. package/dist/esm-node/commands/inspect.mjs +15 -0
  203. package/dist/esm-node/commands/serve.mjs +47 -0
  204. package/dist/esm-node/compat/hooks.mjs +67 -0
  205. package/dist/esm-node/compat/index.mjs +28 -0
  206. package/dist/esm-node/compat/utils.mjs +95 -0
  207. package/dist/esm-node/config/default.mjs +90 -0
  208. package/dist/esm-node/config/index.mjs +2 -0
  209. package/dist/esm-node/config/initialize/index.mjs +7 -0
  210. package/dist/esm-node/config/initialize/inits.mjs +54 -0
  211. package/dist/esm-node/constants.mjs +3 -0
  212. package/dist/esm-node/defineConfig.mjs +2 -0
  213. package/dist/esm-node/esm/esbuild-loader.mjs +18 -29
  214. package/dist/esm-node/esm/register-esm.mjs +45 -57
  215. package/dist/esm-node/esm/ts-node-loader.mjs +18 -30
  216. package/dist/esm-node/esm/utils.mjs +31 -42
  217. package/dist/esm-node/index.mjs +121 -0
  218. package/dist/esm-node/locale/en.mjs +42 -0
  219. package/dist/esm-node/locale/index.mjs +9 -0
  220. package/dist/esm-node/locale/zh.mjs +42 -0
  221. package/dist/esm-node/plugins/analyze/constants.mjs +8 -0
  222. package/dist/esm-node/plugins/analyze/getBundleEntry.mjs +53 -0
  223. package/dist/esm-node/plugins/analyze/getFileSystemEntry.mjs +66 -0
  224. package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +85 -0
  225. package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +130 -0
  226. package/dist/esm-node/plugins/analyze/index.mjs +193 -0
  227. package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +41 -0
  228. package/dist/esm-node/plugins/analyze/{templates.js → templates.mjs} +5 -7
  229. package/dist/esm-node/plugins/analyze/utils.mjs +55 -0
  230. package/dist/esm-node/plugins/deploy/index.mjs +38 -0
  231. package/dist/esm-node/plugins/deploy/platforms/gh-pages.mjs +43 -0
  232. package/dist/esm-node/plugins/deploy/platforms/netlify-entry.mjs +2 -1
  233. package/dist/esm-node/plugins/deploy/platforms/netlify-handler.mjs +85 -0
  234. package/dist/esm-node/plugins/deploy/platforms/netlify.mjs +111 -0
  235. package/dist/esm-node/plugins/deploy/platforms/node-entry.mjs +68 -0
  236. package/dist/esm-node/plugins/deploy/platforms/node.mjs +77 -0
  237. package/dist/esm-node/plugins/deploy/platforms/vercel-entry.mjs +3 -3
  238. package/dist/esm-node/plugins/deploy/platforms/vercel-handler.mjs +85 -0
  239. package/dist/esm-node/plugins/deploy/platforms/vercel.mjs +131 -0
  240. package/dist/esm-node/plugins/deploy/utils.mjs +39 -0
  241. package/dist/esm-node/plugins/initialize/index.mjs +59 -0
  242. package/dist/esm-node/plugins/serverBuild.mjs +48 -0
  243. package/dist/esm-node/plugins/serverRuntime.mjs +15 -0
  244. package/dist/esm-node/run/index.mjs +60 -0
  245. package/dist/esm-node/types/config/index.mjs +1 -0
  246. package/dist/esm-node/types/index.mjs +1 -0
  247. package/dist/esm-node/utils/config.mjs +11 -0
  248. package/dist/esm-node/utils/createServer.mjs +12 -0
  249. package/dist/esm-node/utils/env.mjs +12 -0
  250. package/dist/esm-node/utils/generateWatchFiles.mjs +10 -0
  251. package/dist/esm-node/utils/getConfigFile.mjs +5 -0
  252. package/dist/esm-node/utils/getSelectedEntries.mjs +26 -0
  253. package/dist/esm-node/utils/initAppContext.mjs +26 -0
  254. package/dist/esm-node/utils/loadPlugins.mjs +45 -0
  255. package/dist/esm-node/utils/printInstructions.mjs +9 -0
  256. package/dist/esm-node/utils/register.mjs +75 -0
  257. package/dist/esm-node/utils/restart.mjs +18 -0
  258. package/dist/esm-node/utils/routes.mjs +15 -0
  259. package/dist/types/builder/builder-rspack/index.d.ts +1 -1
  260. package/dist/types/builder/generator/adapterCopy.d.ts +2 -3
  261. package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +3 -3
  262. package/dist/types/builder/generator/createCopyPattern.d.ts +5 -5
  263. package/dist/types/builder/generator/getBuilderEnvironments.d.ts +4 -4
  264. package/dist/types/builder/generator/index.d.ts +2 -3
  265. package/dist/types/builder/index.d.ts +2 -2
  266. package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +1 -2
  267. package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +1 -2
  268. package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +1 -2
  269. package/dist/types/builder/shared/builderPlugins/builderHooks.d.ts +1 -2
  270. package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +4 -4
  271. package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +4 -4
  272. package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +3 -5
  273. package/dist/types/builder/shared/createCopyInfo.d.ts +4 -3
  274. package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +2 -2
  275. package/dist/types/builder/shared/types.d.ts +5 -5
  276. package/dist/types/commands/build.d.ts +2 -2
  277. package/dist/types/commands/deploy.d.ts +2 -2
  278. package/dist/types/commands/dev.d.ts +2 -2
  279. package/dist/types/commands/index.d.ts +7 -9
  280. package/dist/types/commands/inspect.d.ts +2 -2
  281. package/dist/types/commands/serve.d.ts +2 -2
  282. package/dist/types/compat/hooks.d.ts +2 -2
  283. package/dist/types/compat/index.d.ts +2 -2
  284. package/dist/types/config/default.d.ts +3 -4
  285. package/dist/types/config/index.d.ts +0 -1
  286. package/dist/types/config/initialize/index.d.ts +2 -2
  287. package/dist/types/config/initialize/inits.d.ts +3 -4
  288. package/dist/types/constants.d.ts +0 -3
  289. package/dist/types/defineConfig.d.ts +7 -8
  290. package/dist/types/exports/server.d.ts +1 -5
  291. package/dist/types/index.d.ts +4 -5
  292. package/dist/types/locale/index.d.ts +1 -1
  293. package/dist/types/plugins/analyze/constants.d.ts +0 -1
  294. package/dist/types/plugins/analyze/getBundleEntry.d.ts +2 -2
  295. package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +2 -2
  296. package/dist/types/plugins/analyze/getHtmlTemplate.d.ts +4 -4
  297. package/dist/types/plugins/analyze/getServerRoutes.d.ts +3 -3
  298. package/dist/types/plugins/analyze/index.d.ts +2 -4
  299. package/dist/types/plugins/deploy/index.d.ts +2 -2
  300. package/dist/types/plugins/deploy/platforms/platform.d.ts +2 -2
  301. package/dist/types/plugins/deploy/utils.d.ts +2 -2
  302. package/dist/types/plugins/initialize/index.d.ts +2 -4
  303. package/dist/types/plugins/serverBuild.d.ts +2 -2
  304. package/dist/types/plugins/serverRuntime.d.ts +2 -2
  305. package/dist/types/run/index.d.ts +3 -8
  306. package/dist/types/types/config/deploy.d.ts +0 -1
  307. package/dist/types/types/config/dev.d.ts +50 -9
  308. package/dist/types/types/config/experiments.d.ts +2 -2
  309. package/dist/types/types/config/html.d.ts +2 -2
  310. package/dist/types/types/config/index.d.ts +10 -14
  311. package/dist/types/types/config/output.d.ts +8 -8
  312. package/dist/types/types/config/performance.d.ts +2 -2
  313. package/dist/types/types/config/resolve.d.ts +2 -2
  314. package/dist/types/types/config/security.d.ts +2 -2
  315. package/dist/types/types/config/source.d.ts +2 -23
  316. package/dist/types/types/config/tools.d.ts +5 -22
  317. package/dist/types/types/index.d.ts +7 -34
  318. package/dist/types/types/{new.d.ts → plugin.d.ts} +10 -39
  319. package/dist/types/types/utils.d.ts +0 -6
  320. package/dist/types/utils/config.d.ts +1 -11
  321. package/dist/types/utils/createServer.d.ts +1 -3
  322. package/dist/types/utils/env.d.ts +2 -2
  323. package/dist/types/utils/generateWatchFiles.d.ts +2 -3
  324. package/dist/types/utils/initAppContext.d.ts +1 -3
  325. package/dist/types/utils/loadPlugins.d.ts +5 -5
  326. package/dist/types/utils/printInstructions.d.ts +2 -2
  327. package/dist/types/utils/restart.d.ts +2 -2
  328. package/dist/types/utils/routes.d.ts +2 -3
  329. package/lib/types.d.ts +5 -16
  330. package/package.json +51 -38
  331. package/rslib.config.mts +20 -0
  332. package/dist/cjs/builder/builder-webpack/index.js +0 -50
  333. package/dist/cjs/config/legacy/createHtmlConfig.js +0 -45
  334. package/dist/cjs/config/legacy/createOutputConfig.js +0 -69
  335. package/dist/cjs/config/legacy/createSourceConfig.js +0 -53
  336. package/dist/cjs/config/legacy/createToolsConfig.js +0 -52
  337. package/dist/cjs/config/legacy/index.js +0 -68
  338. package/dist/cjs/plugins/deploy/platforms/netlify-entry.mjs +0 -1
  339. package/dist/cjs/plugins/deploy/platforms/vercel-entry.mjs +0 -3
  340. package/dist/cjs/types/hooks.js +0 -16
  341. package/dist/cjs/types/legacyConfig/deploy.js +0 -16
  342. package/dist/cjs/types/legacyConfig/dev.js +0 -16
  343. package/dist/cjs/types/legacyConfig/index.js +0 -16
  344. package/dist/cjs/types/legacyConfig/output.js +0 -16
  345. package/dist/cjs/types/legacyConfig/source.js +0 -16
  346. package/dist/cjs/types/legacyConfig/testing.js +0 -16
  347. package/dist/cjs/types/legacyConfig/tools.js +0 -16
  348. package/dist/cjs/types/new.js +0 -16
  349. package/dist/cjs/utils/getUserConfig.js +0 -34
  350. package/dist/esm/builder/builder-rspack/index.js +0 -30
  351. package/dist/esm/builder/builder-webpack/index.js +0 -48
  352. package/dist/esm/builder/generator/adapterCopy.js +0 -29
  353. package/dist/esm/builder/generator/createBuilderProviderConfig.js +0 -56
  354. package/dist/esm/builder/generator/createCopyPattern.js +0 -43
  355. package/dist/esm/builder/generator/getBuilderEnvironments.js +0 -89
  356. package/dist/esm/builder/generator/index.js +0 -116
  357. package/dist/esm/builder/index.js +0 -50
  358. package/dist/esm/builder/shared/builderPlugins/adapterBasic.js +0 -92
  359. package/dist/esm/builder/shared/builderPlugins/adapterHtml.js +0 -126
  360. package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +0 -262
  361. package/dist/esm/builder/shared/builderPlugins/builderHooks.js +0 -120
  362. package/dist/esm/builder/shared/builderPlugins/index.js +0 -4
  363. package/dist/esm/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -51
  364. package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -37
  365. package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.js +0 -420
  366. package/dist/esm/builder/shared/bundlerPlugins/index.js +0 -3
  367. package/dist/esm/builder/shared/createCopyInfo.js +0 -14
  368. package/dist/esm/builder/shared/index.js +0 -3
  369. package/dist/esm/builder/shared/loaders/serverModuleLoader.js +0 -7
  370. package/dist/esm/commands/build.js +0 -142
  371. package/dist/esm/commands/deploy.js +0 -48
  372. package/dist/esm/commands/dev.js +0 -197
  373. package/dist/esm/commands/index.js +0 -401
  374. package/dist/esm/commands/inspect.js +0 -31
  375. package/dist/esm/commands/serve.js +0 -96
  376. package/dist/esm/compat/hooks.js +0 -503
  377. package/dist/esm/compat/index.js +0 -45
  378. package/dist/esm/compat/utils.js +0 -100
  379. package/dist/esm/config/default.js +0 -205
  380. package/dist/esm/config/index.js +0 -3
  381. package/dist/esm/config/initialize/index.js +0 -9
  382. package/dist/esm/config/initialize/inits.js +0 -89
  383. package/dist/esm/config/legacy/createHtmlConfig.js +0 -21
  384. package/dist/esm/config/legacy/createOutputConfig.js +0 -45
  385. package/dist/esm/config/legacy/createSourceConfig.js +0 -46
  386. package/dist/esm/config/legacy/createToolsConfig.js +0 -28
  387. package/dist/esm/config/legacy/index.js +0 -43
  388. package/dist/esm/constants.js +0 -12
  389. package/dist/esm/defineConfig.js +0 -16
  390. package/dist/esm/exports/server.js +0 -4
  391. package/dist/esm/index.js +0 -265
  392. package/dist/esm/locale/en.js +0 -44
  393. package/dist/esm/locale/index.js +0 -12
  394. package/dist/esm/locale/zh.js +0 -44
  395. package/dist/esm/plugins/analyze/constants.js +0 -14
  396. package/dist/esm/plugins/analyze/getBundleEntry.js +0 -108
  397. package/dist/esm/plugins/analyze/getFileSystemEntry.js +0 -268
  398. package/dist/esm/plugins/analyze/getHtmlTemplate.js +0 -251
  399. package/dist/esm/plugins/analyze/getServerRoutes.js +0 -148
  400. package/dist/esm/plugins/analyze/index.js +0 -439
  401. package/dist/esm/plugins/analyze/isDefaultExportFunction.js +0 -49
  402. package/dist/esm/plugins/analyze/templates.js +0 -6
  403. package/dist/esm/plugins/analyze/utils.js +0 -106
  404. package/dist/esm/plugins/deploy/index.js +0 -133
  405. package/dist/esm/plugins/deploy/platforms/gh-pages.js +0 -184
  406. package/dist/esm/plugins/deploy/platforms/netlify-entry.js +0 -11
  407. package/dist/esm/plugins/deploy/platforms/netlify-handler.js +0 -207
  408. package/dist/esm/plugins/deploy/platforms/netlify.js +0 -346
  409. package/dist/esm/plugins/deploy/platforms/node-entry.js +0 -110
  410. package/dist/esm/plugins/deploy/platforms/node.js +0 -178
  411. package/dist/esm/plugins/deploy/platforms/vercel-entry.js +0 -11
  412. package/dist/esm/plugins/deploy/platforms/vercel-handler.js +0 -207
  413. package/dist/esm/plugins/deploy/platforms/vercel.js +0 -280
  414. package/dist/esm/plugins/deploy/utils.js +0 -59
  415. package/dist/esm/plugins/initialize/index.js +0 -116
  416. package/dist/esm/plugins/serverBuild.js +0 -83
  417. package/dist/esm/plugins/serverRuntime.js +0 -22
  418. package/dist/esm/run/index.js +0 -134
  419. package/dist/esm/types/config/index.js +0 -1
  420. package/dist/esm/types/config/source.js +0 -0
  421. package/dist/esm/types/config/testing.js +0 -0
  422. package/dist/esm/types/config/tools.js +0 -0
  423. package/dist/esm/types/hooks.js +0 -0
  424. package/dist/esm/types/index.js +0 -3
  425. package/dist/esm/types/legacyConfig/deploy.js +0 -0
  426. package/dist/esm/types/legacyConfig/dev.js +0 -0
  427. package/dist/esm/types/legacyConfig/index.js +0 -0
  428. package/dist/esm/types/legacyConfig/output.js +0 -0
  429. package/dist/esm/types/legacyConfig/source.js +0 -0
  430. package/dist/esm/types/legacyConfig/testing.js +0 -0
  431. package/dist/esm/types/legacyConfig/tools.js +0 -0
  432. package/dist/esm/types/new.js +0 -0
  433. package/dist/esm/types/utils.js +0 -0
  434. package/dist/esm/utils/config.js +0 -122
  435. package/dist/esm/utils/createServer.js +0 -58
  436. package/dist/esm/utils/env.js +0 -16
  437. package/dist/esm/utils/generateWatchFiles.js +0 -71
  438. package/dist/esm/utils/getConfigFile.js +0 -11
  439. package/dist/esm/utils/getSelectedEntries.js +0 -67
  440. package/dist/esm/utils/getUserConfig.js +0 -32
  441. package/dist/esm/utils/initAppContext.js +0 -30
  442. package/dist/esm/utils/loadPlugins.js +0 -162
  443. package/dist/esm/utils/printInstructions.js +0 -32
  444. package/dist/esm/utils/register.js +0 -182
  445. package/dist/esm/utils/restart.js +0 -68
  446. package/dist/esm/utils/routes.js +0 -42
  447. package/dist/esm/utils/types.js +0 -0
  448. package/dist/esm-node/builder/builder-rspack/index.js +0 -8
  449. package/dist/esm-node/builder/builder-webpack/index.js +0 -16
  450. package/dist/esm-node/builder/generator/adapterCopy.js +0 -26
  451. package/dist/esm-node/builder/generator/createBuilderProviderConfig.js +0 -67
  452. package/dist/esm-node/builder/generator/createCopyPattern.js +0 -41
  453. package/dist/esm-node/builder/generator/getBuilderEnvironments.js +0 -68
  454. package/dist/esm-node/builder/generator/index.js +0 -60
  455. package/dist/esm-node/builder/index.js +0 -16
  456. package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.js +0 -55
  457. package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.js +0 -60
  458. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +0 -151
  459. package/dist/esm-node/builder/shared/builderPlugins/builderHooks.js +0 -26
  460. package/dist/esm-node/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -30
  461. package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -31
  462. package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.js +0 -305
  463. package/dist/esm-node/builder/shared/createCopyInfo.js +0 -14
  464. package/dist/esm-node/builder/shared/loaders/serverModuleLoader.js +0 -7
  465. package/dist/esm-node/commands/build.js +0 -67
  466. package/dist/esm-node/commands/deploy.js +0 -12
  467. package/dist/esm-node/commands/dev.js +0 -111
  468. package/dist/esm-node/commands/index.js +0 -90
  469. package/dist/esm-node/commands/inspect.js +0 -19
  470. package/dist/esm-node/commands/serve.js +0 -54
  471. package/dist/esm-node/compat/hooks.js +0 -159
  472. package/dist/esm-node/compat/index.js +0 -40
  473. package/dist/esm-node/compat/utils.js +0 -100
  474. package/dist/esm-node/config/default.js +0 -206
  475. package/dist/esm-node/config/initialize/index.js +0 -9
  476. package/dist/esm-node/config/initialize/inits.js +0 -79
  477. package/dist/esm-node/config/legacy/createHtmlConfig.js +0 -21
  478. package/dist/esm-node/config/legacy/createOutputConfig.js +0 -45
  479. package/dist/esm-node/config/legacy/createSourceConfig.js +0 -29
  480. package/dist/esm-node/config/legacy/createToolsConfig.js +0 -28
  481. package/dist/esm-node/config/legacy/index.js +0 -43
  482. package/dist/esm-node/constants.js +0 -12
  483. package/dist/esm-node/defineConfig.js +0 -13
  484. package/dist/esm-node/exports/server.js +0 -4
  485. package/dist/esm-node/index.js +0 -160
  486. package/dist/esm-node/locale/en.js +0 -44
  487. package/dist/esm-node/locale/index.js +0 -12
  488. package/dist/esm-node/locale/zh.js +0 -44
  489. package/dist/esm-node/plugins/analyze/constants.js +0 -14
  490. package/dist/esm-node/plugins/analyze/getBundleEntry.js +0 -67
  491. package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +0 -108
  492. package/dist/esm-node/plugins/analyze/getHtmlTemplate.js +0 -99
  493. package/dist/esm-node/plugins/analyze/getServerRoutes.js +0 -146
  494. package/dist/esm-node/plugins/analyze/index.js +0 -184
  495. package/dist/esm-node/plugins/analyze/isDefaultExportFunction.js +0 -47
  496. package/dist/esm-node/plugins/analyze/utils.js +0 -73
  497. package/dist/esm-node/plugins/deploy/index.js +0 -44
  498. package/dist/esm-node/plugins/deploy/platforms/gh-pages.js +0 -57
  499. package/dist/esm-node/plugins/deploy/platforms/netlify-entry.js +0 -11
  500. package/dist/esm-node/plugins/deploy/platforms/netlify-handler.js +0 -73
  501. package/dist/esm-node/plugins/deploy/platforms/netlify.js +0 -133
  502. package/dist/esm-node/plugins/deploy/platforms/node-entry.js +0 -46
  503. package/dist/esm-node/plugins/deploy/platforms/node.js +0 -87
  504. package/dist/esm-node/plugins/deploy/platforms/vercel-entry.js +0 -11
  505. package/dist/esm-node/plugins/deploy/platforms/vercel-handler.js +0 -73
  506. package/dist/esm-node/plugins/deploy/platforms/vercel.js +0 -145
  507. package/dist/esm-node/plugins/deploy/utils.js +0 -55
  508. package/dist/esm-node/plugins/initialize/index.js +0 -78
  509. package/dist/esm-node/plugins/serverBuild.js +0 -56
  510. package/dist/esm-node/plugins/serverRuntime.js +0 -17
  511. package/dist/esm-node/run/index.js +0 -104
  512. package/dist/esm-node/types/index.js +0 -3
  513. package/dist/esm-node/utils/config.js +0 -49
  514. package/dist/esm-node/utils/createServer.js +0 -26
  515. package/dist/esm-node/utils/env.js +0 -16
  516. package/dist/esm-node/utils/generateWatchFiles.js +0 -30
  517. package/dist/esm-node/utils/getConfigFile.js +0 -7
  518. package/dist/esm-node/utils/getSelectedEntries.js +0 -34
  519. package/dist/esm-node/utils/getUserConfig.js +0 -10
  520. package/dist/esm-node/utils/initAppContext.js +0 -29
  521. package/dist/esm-node/utils/loadPlugins.js +0 -52
  522. package/dist/esm-node/utils/printInstructions.js +0 -11
  523. package/dist/esm-node/utils/register.js +0 -94
  524. package/dist/esm-node/utils/restart.js +0 -23
  525. package/dist/esm-node/utils/routes.js +0 -21
  526. package/dist/types/builder/builder-webpack/index.d.ts +0 -2
  527. package/dist/types/config/legacy/createHtmlConfig.d.ts +0 -2
  528. package/dist/types/config/legacy/createOutputConfig.d.ts +0 -2
  529. package/dist/types/config/legacy/createSourceConfig.d.ts +0 -2
  530. package/dist/types/config/legacy/createToolsConfig.d.ts +0 -2
  531. package/dist/types/config/legacy/index.d.ts +0 -3
  532. package/dist/types/types/hooks.d.ts +0 -69
  533. package/dist/types/types/legacyConfig/deploy.d.ts +0 -8
  534. package/dist/types/types/legacyConfig/dev.d.ts +0 -12
  535. package/dist/types/types/legacyConfig/index.d.ts +0 -35
  536. package/dist/types/types/legacyConfig/output.d.ts +0 -50
  537. package/dist/types/types/legacyConfig/source.d.ts +0 -28
  538. package/dist/types/types/legacyConfig/testing.d.ts +0 -8
  539. package/dist/types/types/legacyConfig/tools.d.ts +0 -15
  540. package/dist/types/utils/getUserConfig.d.ts +0 -6
  541. /package/dist/{esm-node/builder/shared/builderPlugins/index.js → esm/builder/shared/builderPlugins/index.mjs} +0 -0
  542. /package/dist/{esm-node/builder/shared/bundlerPlugins/index.js → esm/builder/shared/bundlerPlugins/index.mjs} +0 -0
  543. /package/dist/{esm-node/builder/shared/index.js → esm/builder/shared/index.mjs} +0 -0
  544. /package/dist/{esm-node/types/legacyConfig/output.js → esm/builder/shared/types.mjs} +0 -0
  545. /package/dist/{esm-node/types/legacyConfig/source.js → esm/exports/server.mjs} +0 -0
  546. /package/dist/{esm-node/types/legacyConfig/testing.js → esm/plugins/deploy/platforms/platform.mjs} +0 -0
  547. /package/dist/{esm-node/types/legacyConfig/tools.js → esm/types/config/deploy.mjs} +0 -0
  548. /package/dist/{esm-node/types/new.js → esm/types/config/dev.mjs} +0 -0
  549. /package/dist/{esm-node/types/utils.js → esm/types/config/experiments.mjs} +0 -0
  550. /package/dist/{esm-node/utils/types.js → esm/types/config/html.mjs} +0 -0
  551. /package/dist/{esm-node/types/config/index.js → esm/types/config/index.mjs} +0 -0
  552. /package/dist/esm/{builder/shared/types.js → types/config/output.mjs} +0 -0
  553. /package/dist/esm/{plugins/deploy/platforms/platform.js → types/config/performance.mjs} +0 -0
  554. /package/dist/esm/types/config/{deploy.js → resolve.mjs} +0 -0
  555. /package/dist/esm/types/config/{dev.js → security.mjs} +0 -0
  556. /package/dist/esm/types/config/{experiments.js → source.mjs} +0 -0
  557. /package/dist/esm/types/config/{html.js → testing.mjs} +0 -0
  558. /package/dist/esm/types/config/{output.js → tools.mjs} +0 -0
  559. /package/dist/esm/types/{config/performance.js → plugin.mjs} +0 -0
  560. /package/dist/esm/types/{config/resolve.js → utils.mjs} +0 -0
  561. /package/dist/esm/{types/config/security.js → utils/types.mjs} +0 -0
  562. /package/dist/esm-node/builder/shared/{types.js → types.mjs} +0 -0
  563. /package/dist/esm-node/{plugins/deploy/platforms/platform.js → exports/server.mjs} +0 -0
  564. /package/dist/esm-node/{types/config/deploy.js → plugins/deploy/platforms/platform.mjs} +0 -0
  565. /package/dist/esm-node/types/config/{dev.js → deploy.mjs} +0 -0
  566. /package/dist/esm-node/types/config/{experiments.js → dev.mjs} +0 -0
  567. /package/dist/esm-node/types/config/{html.js → experiments.mjs} +0 -0
  568. /package/dist/esm-node/types/config/{output.js → html.mjs} +0 -0
  569. /package/dist/esm-node/types/config/{performance.js → output.mjs} +0 -0
  570. /package/dist/esm-node/types/config/{resolve.js → performance.mjs} +0 -0
  571. /package/dist/esm-node/types/config/{security.js → resolve.mjs} +0 -0
  572. /package/dist/esm-node/types/config/{source.js → security.mjs} +0 -0
  573. /package/dist/esm-node/types/config/{testing.js → source.mjs} +0 -0
  574. /package/dist/esm-node/types/config/{tools.js → testing.mjs} +0 -0
  575. /package/dist/esm-node/types/{hooks.js → config/tools.mjs} +0 -0
  576. /package/dist/esm-node/types/{legacyConfig/deploy.js → plugin.mjs} +0 -0
  577. /package/dist/esm-node/types/{legacyConfig/dev.js → utils.mjs} +0 -0
  578. /package/dist/esm-node/{types/legacyConfig/index.js → utils/types.mjs} +0 -0
package/dist/cjs/index.js CHANGED
@@ -1,204 +1,293 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
2
+ var __webpack_modules__ = {
3
+ "./commands/dev" (module) {
4
+ module.exports = require("./commands/dev.js");
5
+ },
6
+ "./commands" (module) {
7
+ module.exports = require("./commands/index.js");
8
+ },
9
+ "./commands/serve" (module) {
10
+ module.exports = require("./commands/serve.js");
11
+ },
12
+ "./compat" (module) {
13
+ module.exports = require("./compat/index.js");
14
+ },
15
+ "./constants" (module) {
16
+ module.exports = require("./constants.js");
17
+ },
18
+ "./defineConfig" (module) {
19
+ module.exports = require("./defineConfig.js");
20
+ },
21
+ "./locale" (module) {
22
+ module.exports = require("./locale/index.js");
23
+ },
24
+ "./plugins/analyze" (module) {
25
+ module.exports = require("./plugins/analyze/index.js");
26
+ },
27
+ "./plugins/deploy" (module) {
28
+ module.exports = require("./plugins/deploy/index.js");
29
+ },
30
+ "./plugins/initialize" (module) {
31
+ module.exports = require("./plugins/initialize/index.js");
32
+ },
33
+ "./plugins/serverBuild" (module) {
34
+ module.exports = require("./plugins/serverBuild.js");
35
+ },
36
+ "./plugins/serverRuntime" (module) {
37
+ module.exports = require("./plugins/serverRuntime.js");
38
+ },
39
+ "./types?6efa" (module) {
40
+ module.exports = require("./types/index.js");
41
+ },
42
+ "./utils/generateWatchFiles" (module) {
43
+ module.exports = require("./utils/generateWatchFiles.js");
44
+ },
45
+ "./utils/initAppContext" (module) {
46
+ module.exports = require("./utils/initAppContext.js");
47
+ },
48
+ "./utils/restart" (module) {
49
+ module.exports = require("./utils/restart.js");
50
+ },
51
+ "@modern-js/builder" (module) {
52
+ module.exports = require("@modern-js/builder");
53
+ },
54
+ "@modern-js/i18n-utils/language-detector" (module) {
55
+ module.exports = require("@modern-js/i18n-utils/language-detector");
56
+ },
57
+ "@modern-js/plugin" (module) {
58
+ module.exports = require("@modern-js/plugin");
59
+ },
60
+ "@modern-js/plugin/cli" (module) {
61
+ module.exports = require("@modern-js/plugin/cli");
62
+ },
63
+ "@modern-js/utils" (module) {
64
+ module.exports = require("@modern-js/utils");
65
+ },
66
+ path (module) {
67
+ module.exports = require("path");
68
+ }
11
69
  };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var src_exports = {};
31
- __export(src_exports, {
32
- appTools: () => appTools,
33
- default: () => src_default,
34
- defineConfig: () => import_defineConfig.defineConfig,
35
- defineLegacyConfig: () => import_defineConfig.defineLegacyConfig,
36
- dev: () => import_dev.dev,
37
- generateWatchFiles: () => import_generateWatchFiles2.generateWatchFiles,
38
- initAppContext: () => import_initAppContext.initAppContext,
39
- mergeConfig: () => import_core.mergeConfig,
40
- serve: () => import_serve.serve
41
- });
42
- module.exports = __toCommonJS(src_exports);
43
- var import_path = __toESM(require("path"));
44
- var import_language_detector = require("@modern-js/plugin-i18n/language-detector");
45
- var import_plugin_v2 = require("@modern-js/plugin-v2");
46
- var import_uni_builder = require("@modern-js/uni-builder");
47
- var import_utils = require("@modern-js/utils");
48
- var import_commands = require("./commands");
49
- var import_compat = require("./compat");
50
- var import_constants = require("./constants");
51
- var import_locale = require("./locale");
52
- var import_analyze = __toESM(require("./plugins/analyze"));
53
- var import_deploy = __toESM(require("./plugins/deploy"));
54
- var import_initialize = __toESM(require("./plugins/initialize"));
55
- var import_serverBuild = __toESM(require("./plugins/serverBuild"));
56
- var import_serverRuntime = __toESM(require("./plugins/serverRuntime"));
57
- var import_generateWatchFiles = require("./utils/generateWatchFiles");
58
- var import_initAppContext = require("./utils/initAppContext");
59
- var import_restart = require("./utils/restart");
60
- __reExport(src_exports, require("./defineConfig"), module.exports);
61
- var import_defineConfig = require("./defineConfig");
62
- var import_core = require("@modern-js/core");
63
- var import_dev = require("./commands/dev");
64
- var import_serve = require("./commands/serve");
65
- var import_generateWatchFiles2 = require("./utils/generateWatchFiles");
66
- __reExport(src_exports, require("./types"), module.exports);
67
- const appTools = (options = {
68
- // default webpack to be compatible with original projects
69
- bundler: "webpack"
70
- }) => ({
71
- name: "@modern-js/app-tools",
72
- usePlugins: [
73
- (0, import_serverRuntime.default)(),
74
- (0, import_compat.compatPlugin)(),
75
- (0, import_initialize.default)({
76
- bundler: (options === null || options === void 0 ? void 0 : options.bundler) && [
77
- "rspack",
78
- "experimental-rspack"
79
- ].includes(options.bundler) ? "rspack" : "webpack"
80
- }),
81
- (0, import_analyze.default)({
82
- bundler: (options === null || options === void 0 ? void 0 : options.bundler) && [
83
- "rspack",
84
- "experimental-rspack"
85
- ].includes(options.bundler) ? "rspack" : "webpack"
86
- }),
87
- (0, import_serverBuild.default)(),
88
- (0, import_deploy.default)()
89
- ],
90
- post: [
91
- "@modern-js/plugin-initialize",
92
- "@modern-js/plugin-analyze",
93
- "@modern-js/plugin-ssr",
94
- "@modern-js/plugin-document",
95
- "@modern-js/plugin-state",
96
- "@modern-js/plugin-router",
97
- "@modern-js/plugin-router-v5",
98
- "@modern-js/plugin-polyfill"
99
- ],
100
- registryHooks: {
101
- onAfterPrepare: (0, import_plugin_v2.createAsyncHook)(),
102
- deploy: (0, import_plugin_v2.createAsyncHook)(),
103
- checkEntryPoint: (0, import_plugin_v2.createAsyncHook)(),
104
- modifyEntrypoints: (0, import_plugin_v2.createAsyncHook)(),
105
- modifyFileSystemRoutes: (0, import_plugin_v2.createAsyncHook)(),
106
- generateEntryCode: (0, import_plugin_v2.createAsyncHook)(),
107
- onBeforeGenerateRoutes: (0, import_plugin_v2.createAsyncHook)(),
108
- onBeforePrintInstructions: (0, import_plugin_v2.createAsyncHook)(),
109
- registerDev: (0, import_plugin_v2.createCollectAsyncHook)(),
110
- registerBuildPlatform: (0, import_plugin_v2.createCollectAsyncHook)(),
111
- addRuntimeExports: (0, import_plugin_v2.createAsyncHook)()
112
- },
113
- setup: (api) => {
114
- var _userConfig_output;
115
- const context = api.getAppContext();
116
- const userConfig = api.getConfig();
117
- const locale = (0, import_language_detector.getLocaleLanguage)();
118
- import_locale.i18n.changeLanguage({
119
- locale
120
- });
121
- api.updateAppContext((0, import_initAppContext.initAppContext)({
122
- metaName: context.metaName,
123
- appDirectory: context.appDirectory,
124
- serverConfigFile: import_constants.DEFAULT_SERVER_CONFIG_FILE,
125
- runtimeConfigFile: import_constants.DEFAULT_RUNTIME_CONFIG_FILE,
126
- tempDir: (_userConfig_output = userConfig.output) === null || _userConfig_output === void 0 ? void 0 : _userConfig_output.tempDir
127
- }));
128
- api.addCommand(async ({ program }) => {
129
- await (0, import_commands.devCommand)(program, api);
130
- await (0, import_commands.buildCommand)(program, api);
131
- (0, import_commands.serverCommand)(program, api);
132
- (0, import_commands.deployCommand)(program, api);
133
- (0, import_commands.newCommand)(program, locale);
134
- (0, import_commands.inspectCommand)(program, api);
135
- (0, import_commands.upgradeCommand)(program);
136
- (0, import_utils.deprecatedCommands)(program);
137
- });
138
- api.onPrepare(async () => {
139
- const command = (0, import_utils.getCommand)();
140
- if (command === "deploy") {
141
- const isSkipBuild = [
142
- "-s",
143
- "--skip-build"
144
- ].some((tag) => {
145
- return (0, import_utils.getArgv)().includes(tag);
70
+ var __webpack_module_cache__ = {};
71
+ function __webpack_require__(moduleId) {
72
+ var cachedModule = __webpack_module_cache__[moduleId];
73
+ if (void 0 !== cachedModule) return cachedModule.exports;
74
+ var module = __webpack_module_cache__[moduleId] = {
75
+ exports: {}
76
+ };
77
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
78
+ return module.exports;
79
+ }
80
+ (()=>{
81
+ __webpack_require__.n = (module)=>{
82
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
83
+ __webpack_require__.d(getter, {
84
+ a: getter
146
85
  });
147
- if (isSkipBuild) {
148
- return;
149
- }
150
- }
151
- if (command === "dev" || command === "start" || command === "build" || command === "deploy") {
152
- const resolvedConfig = api.getNormalizedConfig();
153
- if (resolvedConfig.output.cleanDistPath) {
154
- const appContext = api.getAppContext();
155
- await (0, import_utils.emptyDir)(appContext.distDirectory);
156
- }
157
- }
158
- });
159
- api.addWatchFiles(async () => {
160
- const appContext = api.getAppContext();
161
- const config = api.getNormalizedConfig();
162
- const files = await (0, import_generateWatchFiles.generateWatchFiles)(appContext, config.source.configDir);
163
- const watchFiles = (0, import_uni_builder.castArray)(config.dev.watchFiles);
164
- watchFiles.forEach(({ type, paths }) => {
165
- if (type === "reload-server") {
166
- files.push(...Array.isArray(paths) ? paths : [
167
- paths
168
- ]);
169
- }
170
- });
171
- return files;
172
- });
173
- api.onFileChanged(async (e) => {
174
- const { filename, eventType, isPrivate } = e;
175
- const { appDirectory, apiDirectory } = api.getAppContext();
176
- const relativeApiPath = import_path.default.relative(appDirectory, apiDirectory);
177
- const isApiProject = filename.startsWith(`${relativeApiPath}/`);
178
- if (!isPrivate && (eventType === "change" || eventType === "unlink") && !isApiProject) {
179
- const { closeServer } = await import("./utils/createServer.js");
180
- await closeServer();
181
- await (0, import_restart.restart)(api.getHooks(), filename);
182
- }
183
- });
184
- api.onBeforeRestart(() => {
185
- (0, import_utils.cleanRequireCache)([
186
- require.resolve("./plugins/analyze")
187
- ]);
86
+ return getter;
87
+ };
88
+ })();
89
+ (()=>{
90
+ __webpack_require__.d = (exports1, definition)=>{
91
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
92
+ enumerable: true,
93
+ get: definition[key]
94
+ });
95
+ };
96
+ })();
97
+ (()=>{
98
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
99
+ })();
100
+ (()=>{
101
+ __webpack_require__.r = (exports1)=>{
102
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
103
+ value: 'Module'
104
+ });
105
+ Object.defineProperty(exports1, '__esModule', {
106
+ value: true
107
+ });
108
+ };
109
+ })();
110
+ var __webpack_exports__ = {};
111
+ (()=>{
112
+ __webpack_require__.r(__webpack_exports__);
113
+ __webpack_require__.d(__webpack_exports__, {
114
+ appTools: ()=>appTools,
115
+ default: ()=>__rspack_default_export,
116
+ defineConfig: ()=>_defineConfig__rspack_import_17.defineConfig,
117
+ dev: ()=>_commands_dev__rspack_import_18.dev,
118
+ generateWatchFiles: ()=>_utils_generateWatchFiles__rspack_import_14.generateWatchFiles,
119
+ initAppContext: ()=>_utils_initAppContext__rspack_import_15.initAppContext,
120
+ mergeConfig: ()=>_modern_js_plugin_cli__rspack_import_21.mergeConfig,
121
+ serve: ()=>_commands_serve__rspack_import_19.serve
188
122
  });
189
- }
190
- });
191
- var src_default = appTools;
192
- // Annotate the CommonJS export names for ESM import in node:
193
- 0 && (module.exports = {
194
- appTools,
195
- defineConfig,
196
- defineLegacyConfig,
197
- dev,
198
- generateWatchFiles,
199
- initAppContext,
200
- mergeConfig,
201
- serve,
202
- ...require("./defineConfig"),
203
- ...require("./types")
123
+ var path__rspack_import_0 = __webpack_require__("path");
124
+ var path__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(path__rspack_import_0);
125
+ var _modern_js_builder__rspack_import_1 = __webpack_require__("@modern-js/builder");
126
+ var _modern_js_i18n_utils_language_detector__rspack_import_2 = __webpack_require__("@modern-js/i18n-utils/language-detector");
127
+ var _modern_js_plugin__rspack_import_3 = __webpack_require__("@modern-js/plugin");
128
+ var _modern_js_utils__rspack_import_4 = __webpack_require__("@modern-js/utils");
129
+ var _commands__rspack_import_5 = __webpack_require__("./commands");
130
+ var _compat__rspack_import_6 = __webpack_require__("./compat");
131
+ var _constants__rspack_import_7 = __webpack_require__("./constants");
132
+ var _locale__rspack_import_8 = __webpack_require__("./locale");
133
+ var _plugins_analyze__rspack_import_9 = __webpack_require__("./plugins/analyze");
134
+ var _plugins_analyze__rspack_import_9_default = /*#__PURE__*/ __webpack_require__.n(_plugins_analyze__rspack_import_9);
135
+ var _plugins_deploy__rspack_import_10 = __webpack_require__("./plugins/deploy");
136
+ var _plugins_deploy__rspack_import_10_default = /*#__PURE__*/ __webpack_require__.n(_plugins_deploy__rspack_import_10);
137
+ var _plugins_initialize__rspack_import_11 = __webpack_require__("./plugins/initialize");
138
+ var _plugins_initialize__rspack_import_11_default = /*#__PURE__*/ __webpack_require__.n(_plugins_initialize__rspack_import_11);
139
+ var _plugins_serverBuild__rspack_import_12 = __webpack_require__("./plugins/serverBuild");
140
+ var _plugins_serverBuild__rspack_import_12_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverBuild__rspack_import_12);
141
+ var _plugins_serverRuntime__rspack_import_13 = __webpack_require__("./plugins/serverRuntime");
142
+ var _plugins_serverRuntime__rspack_import_13_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverRuntime__rspack_import_13);
143
+ var _utils_generateWatchFiles__rspack_import_14 = __webpack_require__("./utils/generateWatchFiles");
144
+ var _utils_initAppContext__rspack_import_15 = __webpack_require__("./utils/initAppContext");
145
+ var _utils_restart__rspack_import_16 = __webpack_require__("./utils/restart");
146
+ var _defineConfig__rspack_import_17 = __webpack_require__("./defineConfig");
147
+ var __rspack_reexport = {};
148
+ for(const __rspack_import_key in _defineConfig__rspack_import_17)if ([
149
+ "dev",
150
+ "mergeConfig",
151
+ "appTools",
152
+ "default",
153
+ "serve",
154
+ "generateWatchFiles",
155
+ "initAppContext",
156
+ "defineConfig"
157
+ ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_17[__rspack_import_key];
158
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
159
+ var _commands_dev__rspack_import_18 = __webpack_require__("./commands/dev");
160
+ var _commands_serve__rspack_import_19 = __webpack_require__("./commands/serve");
161
+ var _types__rspack_import_20 = __webpack_require__("./types?6efa");
162
+ var __rspack_reexport = {};
163
+ for(const __rspack_import_key in _types__rspack_import_20)if ([
164
+ "dev",
165
+ "mergeConfig",
166
+ "appTools",
167
+ "default",
168
+ "serve",
169
+ "generateWatchFiles",
170
+ "initAppContext",
171
+ "defineConfig"
172
+ ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_20[__rspack_import_key];
173
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
174
+ var _modern_js_plugin_cli__rspack_import_21 = __webpack_require__("@modern-js/plugin/cli");
175
+ const appTools = ()=>({
176
+ name: '@modern-js/app-tools',
177
+ usePlugins: [
178
+ _plugins_serverRuntime__rspack_import_13_default()(),
179
+ (0, _compat__rspack_import_6.compatPlugin)(),
180
+ _plugins_initialize__rspack_import_11_default()(),
181
+ _plugins_analyze__rspack_import_9_default()(),
182
+ _plugins_serverBuild__rspack_import_12_default()(),
183
+ _plugins_deploy__rspack_import_10_default()()
184
+ ],
185
+ post: [
186
+ '@modern-js/plugin-initialize',
187
+ '@modern-js/plugin-analyze',
188
+ '@modern-js/plugin-ssr',
189
+ '@modern-js/plugin-document',
190
+ '@modern-js/plugin-router',
191
+ '@modern-js/plugin-polyfill'
192
+ ],
193
+ registryHooks: {
194
+ onAfterPrepare: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
195
+ deploy: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
196
+ checkEntryPoint: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
197
+ modifyEntrypoints: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
198
+ modifyFileSystemRoutes: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
199
+ generateEntryCode: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
200
+ onBeforeGenerateRoutes: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)(),
201
+ onBeforePrintInstructions: (0, _modern_js_plugin__rspack_import_3.createAsyncHook)()
202
+ },
203
+ setup: (api)=>{
204
+ const context = api.getAppContext();
205
+ const userConfig = api.getConfig();
206
+ const locale = (0, _modern_js_i18n_utils_language_detector__rspack_import_2.getLocaleLanguage)();
207
+ _locale__rspack_import_8.i18n.changeLanguage({
208
+ locale
209
+ });
210
+ api.updateAppContext((0, _utils_initAppContext__rspack_import_15.initAppContext)({
211
+ metaName: context.metaName,
212
+ appDirectory: context.appDirectory,
213
+ runtimeConfigFile: _constants__rspack_import_7.DEFAULT_RUNTIME_CONFIG_FILE,
214
+ tempDir: userConfig.output?.tempDir
215
+ }));
216
+ api.addCommand(async ({ program })=>{
217
+ await (0, _commands__rspack_import_5.devCommand)(program, api);
218
+ await (0, _commands__rspack_import_5.buildCommand)(program, api);
219
+ (0, _commands__rspack_import_5.serverCommand)(program, api);
220
+ (0, _commands__rspack_import_5.deployCommand)(program, api);
221
+ (0, _commands__rspack_import_5.inspectCommand)(program, api);
222
+ (0, _modern_js_utils__rspack_import_4.deprecatedCommands)(program);
223
+ });
224
+ api.onPrepare(async ()=>{
225
+ const command = (0, _modern_js_utils__rspack_import_4.getCommand)();
226
+ if ('deploy' === command) {
227
+ const isSkipBuild = [
228
+ '-s',
229
+ '--skip-build'
230
+ ].some((tag)=>(0, _modern_js_utils__rspack_import_4.getArgv)().includes(tag));
231
+ if (isSkipBuild) return;
232
+ }
233
+ if ('dev' === command || 'start' === command || 'build' === command || 'deploy' === command) {
234
+ const resolvedConfig = api.getNormalizedConfig();
235
+ if (resolvedConfig.output.cleanDistPath) {
236
+ const appContext = api.getAppContext();
237
+ await (0, _modern_js_utils__rspack_import_4.emptyDir)(appContext.distDirectory);
238
+ }
239
+ }
240
+ });
241
+ api.addWatchFiles(async ()=>{
242
+ const appContext = api.getAppContext();
243
+ const config = api.getNormalizedConfig();
244
+ const files = await (0, _utils_generateWatchFiles__rspack_import_14.generateWatchFiles)(appContext, config.source.configDir);
245
+ const watchFiles = (0, _modern_js_builder__rspack_import_1.castArray)(config.dev.watchFiles);
246
+ watchFiles.forEach(({ type, paths })=>{
247
+ if ('reload-server' === type) files.push(...Array.isArray(paths) ? paths : [
248
+ paths
249
+ ]);
250
+ });
251
+ return files;
252
+ });
253
+ api.onFileChanged(async (e)=>{
254
+ const { filename, eventType, isPrivate } = e;
255
+ const { appDirectory, apiDirectory } = api.getAppContext();
256
+ const relativeApiPath = path__rspack_import_0_default().relative(appDirectory, apiDirectory);
257
+ const isApiProject = filename.startsWith(`${relativeApiPath}/`);
258
+ if (!isPrivate && ('change' === eventType || 'unlink' === eventType) && !isApiProject) {
259
+ const { closeServer } = await import("./utils/createServer.js");
260
+ await closeServer();
261
+ await (0, _utils_restart__rspack_import_16.restart)(api.getHooks(), filename);
262
+ }
263
+ });
264
+ api.onBeforeRestart(()=>{
265
+ (0, _modern_js_utils__rspack_import_4.cleanRequireCache)([
266
+ require.resolve('./plugins/analyze')
267
+ ]);
268
+ });
269
+ }
270
+ });
271
+ const __rspack_default_export = appTools;
272
+ })();
273
+ exports.appTools = __webpack_exports__.appTools;
274
+ exports["default"] = __webpack_exports__["default"];
275
+ exports.defineConfig = __webpack_exports__.defineConfig;
276
+ exports.dev = __webpack_exports__.dev;
277
+ exports.generateWatchFiles = __webpack_exports__.generateWatchFiles;
278
+ exports.initAppContext = __webpack_exports__.initAppContext;
279
+ exports.mergeConfig = __webpack_exports__.mergeConfig;
280
+ exports.serve = __webpack_exports__.serve;
281
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
282
+ "appTools",
283
+ "default",
284
+ "defineConfig",
285
+ "dev",
286
+ "generateWatchFiles",
287
+ "initAppContext",
288
+ "mergeConfig",
289
+ "serve"
290
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
291
+ Object.defineProperty(exports, '__esModule', {
292
+ value: true
204
293
  });
@@ -1,68 +1,76 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var en_exports = {};
20
- __export(en_exports, {
21
- EN_LOCALE: () => EN_LOCALE
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ EN_LOCALE: ()=>EN_LOCALE
22
28
  });
23
- module.exports = __toCommonJS(en_exports);
24
29
  const EN_LOCALE = {
25
- command: {
26
- shared: {
27
- analyze: "analyze bundle size",
28
- config: "specify the configuration file, which can be a relative or absolute path",
29
- skipBuild: "skip the build phase",
30
- noNeedInstall: "not run install command"
31
- },
32
- dev: {
33
- describe: "starting the dev server",
34
- entry: "compiler by entry",
35
- apiOnly: "start api server only",
36
- webOnly: "start web server only",
37
- selectEntry: "Please select the entry that needs to be built",
38
- requireEntry: "You must choose at least one entry"
39
- },
40
- build: {
41
- describe: "build the app for production",
42
- watch: "turn on watch mode, watch for changes and rebuild"
43
- },
44
- serve: {
45
- describe: "preview the production build locally"
46
- },
47
- deploy: {
48
- describe: "deploy the application"
49
- },
50
- new: {
51
- describe: "enable optional features or add a new entry",
52
- debug: "using debug mode to log something",
53
- config: "set default generator config(json string)",
54
- distTag: `use specified tag version for it's generator`,
55
- registry: "set npm registry url to run npm command",
56
- lang: "set new command language(en or zh)"
57
- },
58
- inspect: {
59
- env: "specify env mode",
60
- output: "specify inspect content output path",
61
- verbose: "show full function definitions in output"
30
+ command: {
31
+ shared: {
32
+ analyze: 'analyze bundle size',
33
+ config: 'specify the configuration file, which can be a relative or absolute path',
34
+ skipBuild: 'skip the build phase',
35
+ noNeedInstall: 'not run install command'
36
+ },
37
+ dev: {
38
+ describe: 'starting the dev server',
39
+ entry: 'compiler by entry',
40
+ apiOnly: 'start api server only',
41
+ webOnly: 'start web server only',
42
+ selectEntry: 'Please select the entry that needs to be built',
43
+ requireEntry: 'You must choose at least one entry'
44
+ },
45
+ build: {
46
+ describe: 'build the app for production',
47
+ watch: 'turn on watch mode, watch for changes and rebuild'
48
+ },
49
+ serve: {
50
+ describe: 'preview the production build locally'
51
+ },
52
+ deploy: {
53
+ describe: 'deploy the application'
54
+ },
55
+ new: {
56
+ describe: 'enable optional features or add a new entry',
57
+ debug: 'using debug mode to log something',
58
+ config: 'set default generator config(json string)',
59
+ distTag: "use specified tag version for it's generator",
60
+ registry: 'set npm registry url to run npm command',
61
+ lang: 'set new command language(en or zh)'
62
+ },
63
+ inspect: {
64
+ env: 'specify env mode',
65
+ output: 'specify inspect content output path',
66
+ verbose: 'show full function definitions in output'
67
+ }
62
68
  }
63
- }
64
69
  };
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {
67
- EN_LOCALE
70
+ exports.EN_LOCALE = __webpack_exports__.EN_LOCALE;
71
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
72
+ "EN_LOCALE"
73
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
74
+ Object.defineProperty(exports, '__esModule', {
75
+ value: true
68
76
  });