@bleedingdev/modern-js-app-tools 3.2.0-ultramodern.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.
- package/LICENSE +21 -0
- package/README.md +26 -0
- package/bin/modern.js +36 -0
- package/dist/cjs/baseline.js +83 -0
- package/dist/cjs/builder/builder-rspack/index.js +40 -0
- package/dist/cjs/builder/generator/adapterCopy.js +79 -0
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +100 -0
- package/dist/cjs/builder/generator/createCopyPattern.js +67 -0
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +90 -0
- package/dist/cjs/builder/generator/index.js +80 -0
- package/dist/cjs/builder/index.js +50 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterBasic.js +133 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterHtml.js +89 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +112 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +151 -0
- package/dist/cjs/builder/shared/builderPlugins/builderHooks.js +51 -0
- package/dist/cjs/builder/shared/builderPlugins/index.js +86 -0
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +71 -0
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +56 -0
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +191 -0
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +72 -0
- package/dist/cjs/builder/shared/createCopyInfo.js +59 -0
- package/dist/cjs/builder/shared/index.js +72 -0
- package/dist/cjs/builder/shared/loaders/serverModuleLoader.js +39 -0
- package/dist/cjs/builder/shared/types.js +18 -0
- package/dist/cjs/commands/build.js +107 -0
- package/dist/cjs/commands/deploy.js +44 -0
- package/dist/cjs/commands/dev.js +121 -0
- package/dist/cjs/commands/index.js +99 -0
- package/dist/cjs/commands/info.js +110 -0
- package/dist/cjs/commands/inspect.js +49 -0
- package/dist/cjs/commands/runtime.js +159 -0
- package/dist/cjs/commands/serve.js +92 -0
- package/dist/cjs/compat/hooks.js +104 -0
- package/dist/cjs/compat/index.js +62 -0
- package/dist/cjs/compat/utils.js +135 -0
- package/dist/cjs/config/default.js +125 -0
- package/dist/cjs/config/index.js +65 -0
- package/dist/cjs/config/initialize/index.js +41 -0
- package/dist/cjs/config/initialize/inits.js +101 -0
- package/dist/cjs/constants.js +40 -0
- package/dist/cjs/defineConfig.js +36 -0
- package/dist/cjs/esm/register-esm.js +48 -0
- package/dist/cjs/esm/register-esm.mjs +10 -0
- package/dist/cjs/esm/ts-paths-loader.js +73 -0
- package/dist/cjs/esm/ts-paths-loader.mjs +35 -0
- package/dist/cjs/exports/server.js +18 -0
- package/dist/cjs/index.js +358 -0
- package/dist/cjs/locale/en.js +79 -0
- package/dist/cjs/locale/index.js +46 -0
- package/dist/cjs/locale/zh.js +79 -0
- package/dist/cjs/plugins/analyze/constants.js +48 -0
- package/dist/cjs/plugins/analyze/getBundleEntry.js +97 -0
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +117 -0
- package/dist/cjs/plugins/analyze/getHtmlTemplate.js +144 -0
- package/dist/cjs/plugins/analyze/getServerRoutes.js +177 -0
- package/dist/cjs/plugins/analyze/index.js +237 -0
- package/dist/cjs/plugins/analyze/isDefaultExportFunction.js +86 -0
- package/dist/cjs/plugins/analyze/templates.js +56 -0
- package/dist/cjs/plugins/analyze/utils.js +126 -0
- package/dist/cjs/plugins/deploy/index.js +77 -0
- package/dist/cjs/plugins/deploy/platforms/gh-pages.js +87 -0
- package/dist/cjs/plugins/deploy/platforms/netlify.js +140 -0
- package/dist/cjs/plugins/deploy/platforms/node.js +100 -0
- package/dist/cjs/plugins/deploy/platforms/platform.js +18 -0
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.cjs +57 -0
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.mjs +59 -0
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.cjs +44 -0
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.mjs +46 -0
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.cjs +57 -0
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.mjs +58 -0
- package/dist/cjs/plugins/deploy/platforms/vercel.js +159 -0
- package/dist/cjs/plugins/deploy/types.js +18 -0
- package/dist/cjs/plugins/deploy/utils/generator.js +104 -0
- package/dist/cjs/plugins/deploy/utils/index.js +123 -0
- package/dist/cjs/plugins/initialize/index.js +93 -0
- package/dist/cjs/plugins/serverBuild.js +90 -0
- package/dist/cjs/plugins/serverRuntime.js +49 -0
- package/dist/cjs/presetUltramodern.js +41 -0
- package/dist/cjs/rsbuild.js +90 -0
- package/dist/cjs/run/index.js +98 -0
- package/dist/cjs/types/config/deploy.js +18 -0
- package/dist/cjs/types/config/dev.js +18 -0
- package/dist/cjs/types/config/experiments.js +18 -0
- package/dist/cjs/types/config/html.js +18 -0
- package/dist/cjs/types/config/index.js +58 -0
- package/dist/cjs/types/config/output.js +18 -0
- package/dist/cjs/types/config/performance.js +18 -0
- package/dist/cjs/types/config/resolve.js +18 -0
- package/dist/cjs/types/config/security.js +18 -0
- package/dist/cjs/types/config/source.js +18 -0
- package/dist/cjs/types/config/testing.js +18 -0
- package/dist/cjs/types/config/tools.js +18 -0
- package/dist/cjs/types/index.js +58 -0
- package/dist/cjs/types/plugin.js +18 -0
- package/dist/cjs/types/utils.js +18 -0
- package/dist/cjs/ultramodern/designSystem.js +119 -0
- package/dist/cjs/utils/config.js +45 -0
- package/dist/cjs/utils/createServer.js +52 -0
- package/dist/cjs/utils/env.js +46 -0
- package/dist/cjs/utils/generateWatchFiles.js +54 -0
- package/dist/cjs/utils/getConfigFile.js +49 -0
- package/dist/cjs/utils/getSelectedEntries.js +60 -0
- package/dist/cjs/utils/initAppContext.js +71 -0
- package/dist/cjs/utils/loadPlugins.js +85 -0
- package/dist/cjs/utils/printInstructions.js +43 -0
- package/dist/cjs/utils/register.js +128 -0
- package/dist/cjs/utils/restart.js +52 -0
- package/dist/cjs/utils/routes.js +65 -0
- package/dist/cjs/utils/types.js +18 -0
- package/dist/esm/baseline.mjs +46 -0
- package/dist/esm/builder/builder-rspack/index.mjs +6 -0
- package/dist/esm/builder/generator/adapterCopy.mjs +35 -0
- package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +66 -0
- package/dist/esm/builder/generator/createCopyPattern.mjs +30 -0
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +56 -0
- package/dist/esm/builder/generator/index.mjs +46 -0
- package/dist/esm/builder/index.mjs +7 -0
- package/dist/esm/builder/shared/builderPlugins/adapterBasic.mjs +89 -0
- package/dist/esm/builder/shared/builderPlugins/adapterHtml.mjs +55 -0
- package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +68 -0
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +117 -0
- package/dist/esm/builder/shared/builderPlugins/builderHooks.mjs +17 -0
- package/dist/esm/builder/shared/builderPlugins/index.mjs +5 -0
- package/dist/esm/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +37 -0
- package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +22 -0
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +157 -0
- package/dist/esm/builder/shared/bundlerPlugins/index.mjs +3 -0
- package/dist/esm/builder/shared/createCopyInfo.mjs +15 -0
- package/dist/esm/builder/shared/index.mjs +3 -0
- package/dist/esm/builder/shared/loaders/serverModuleLoader.mjs +5 -0
- package/dist/esm/builder/shared/types.mjs +0 -0
- package/dist/esm/commands/build.mjs +63 -0
- package/dist/esm/commands/deploy.mjs +10 -0
- package/dist/esm/commands/dev.mjs +77 -0
- package/dist/esm/commands/index.mjs +47 -0
- package/dist/esm/commands/info.mjs +76 -0
- package/dist/esm/commands/inspect.mjs +15 -0
- package/dist/esm/commands/runtime.mjs +116 -0
- package/dist/esm/commands/serve.mjs +48 -0
- package/dist/esm/compat/hooks.mjs +67 -0
- package/dist/esm/compat/index.mjs +28 -0
- package/dist/esm/compat/utils.mjs +95 -0
- package/dist/esm/config/default.mjs +91 -0
- package/dist/esm/config/index.mjs +2 -0
- package/dist/esm/config/initialize/index.mjs +7 -0
- package/dist/esm/config/initialize/inits.mjs +54 -0
- package/dist/esm/constants.mjs +3 -0
- package/dist/esm/defineConfig.mjs +2 -0
- package/dist/esm/esm/register-esm.mjs +11 -0
- package/dist/esm/esm/ts-paths-loader.mjs +36 -0
- package/dist/esm/exports/server.mjs +0 -0
- package/dist/esm/index.mjs +131 -0
- package/dist/esm/locale/en.mjs +45 -0
- package/dist/esm/locale/index.mjs +9 -0
- package/dist/esm/locale/zh.mjs +45 -0
- package/dist/esm/plugins/analyze/constants.mjs +8 -0
- package/dist/esm/plugins/analyze/getBundleEntry.mjs +53 -0
- package/dist/esm/plugins/analyze/getFileSystemEntry.mjs +66 -0
- package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +97 -0
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +130 -0
- package/dist/esm/plugins/analyze/index.mjs +203 -0
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +41 -0
- package/dist/esm/plugins/analyze/templates.mjs +22 -0
- package/dist/esm/plugins/analyze/utils.mjs +63 -0
- package/dist/esm/plugins/deploy/index.mjs +43 -0
- package/dist/esm/plugins/deploy/platforms/gh-pages.mjs +43 -0
- package/dist/esm/plugins/deploy/platforms/netlify.mjs +96 -0
- package/dist/esm/plugins/deploy/platforms/node.mjs +56 -0
- package/dist/esm/plugins/deploy/platforms/platform.mjs +0 -0
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.cjs +57 -0
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.mjs +59 -0
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.cjs +44 -0
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.mjs +46 -0
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.cjs +57 -0
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.mjs +58 -0
- package/dist/esm/plugins/deploy/platforms/vercel.mjs +115 -0
- package/dist/esm/plugins/deploy/types.mjs +0 -0
- package/dist/esm/plugins/deploy/utils/generator.mjs +48 -0
- package/dist/esm/plugins/deploy/utils/index.mjs +67 -0
- package/dist/esm/plugins/initialize/index.mjs +59 -0
- package/dist/esm/plugins/serverBuild.mjs +45 -0
- package/dist/esm/plugins/serverRuntime.mjs +15 -0
- package/dist/esm/presetUltramodern.mjs +4 -0
- package/dist/esm/rsbuild.mjs +47 -0
- package/dist/esm/rslib-runtime.mjs +18 -0
- package/dist/esm/run/index.mjs +61 -0
- package/dist/esm/types/config/deploy.mjs +0 -0
- package/dist/esm/types/config/dev.mjs +0 -0
- package/dist/esm/types/config/experiments.mjs +0 -0
- package/dist/esm/types/config/html.mjs +0 -0
- package/dist/esm/types/config/index.mjs +1 -0
- package/dist/esm/types/config/output.mjs +0 -0
- package/dist/esm/types/config/performance.mjs +0 -0
- package/dist/esm/types/config/resolve.mjs +0 -0
- package/dist/esm/types/config/security.mjs +0 -0
- package/dist/esm/types/config/source.mjs +0 -0
- package/dist/esm/types/config/testing.mjs +0 -0
- package/dist/esm/types/config/tools.mjs +0 -0
- package/dist/esm/types/index.mjs +1 -0
- package/dist/esm/types/plugin.mjs +0 -0
- package/dist/esm/types/utils.mjs +0 -0
- package/dist/esm/ultramodern/designSystem.mjs +73 -0
- package/dist/esm/utils/config.mjs +11 -0
- package/dist/esm/utils/createServer.mjs +12 -0
- package/dist/esm/utils/env.mjs +12 -0
- package/dist/esm/utils/generateWatchFiles.mjs +10 -0
- package/dist/esm/utils/getConfigFile.mjs +5 -0
- package/dist/esm/utils/getSelectedEntries.mjs +26 -0
- package/dist/esm/utils/initAppContext.mjs +27 -0
- package/dist/esm/utils/loadPlugins.mjs +45 -0
- package/dist/esm/utils/printInstructions.mjs +9 -0
- package/dist/esm/utils/register.mjs +81 -0
- package/dist/esm/utils/restart.mjs +18 -0
- package/dist/esm/utils/routes.mjs +15 -0
- package/dist/esm/utils/types.mjs +0 -0
- package/dist/esm-node/baseline.mjs +47 -0
- package/dist/esm-node/builder/builder-rspack/index.mjs +7 -0
- package/dist/esm-node/builder/generator/adapterCopy.mjs +36 -0
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +67 -0
- package/dist/esm-node/builder/generator/createCopyPattern.mjs +31 -0
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +57 -0
- package/dist/esm-node/builder/generator/index.mjs +47 -0
- package/dist/esm-node/builder/index.mjs +8 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +93 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.mjs +56 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +69 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +119 -0
- package/dist/esm-node/builder/shared/builderPlugins/builderHooks.mjs +18 -0
- package/dist/esm-node/builder/shared/builderPlugins/index.mjs +6 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +38 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +23 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +158 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +4 -0
- package/dist/esm-node/builder/shared/createCopyInfo.mjs +16 -0
- package/dist/esm-node/builder/shared/index.mjs +4 -0
- package/dist/esm-node/builder/shared/loaders/serverModuleLoader.mjs +6 -0
- package/dist/esm-node/builder/shared/types.mjs +1 -0
- package/dist/esm-node/commands/build.mjs +64 -0
- package/dist/esm-node/commands/deploy.mjs +11 -0
- package/dist/esm-node/commands/dev.mjs +78 -0
- package/dist/esm-node/commands/index.mjs +48 -0
- package/dist/esm-node/commands/info.mjs +77 -0
- package/dist/esm-node/commands/inspect.mjs +16 -0
- package/dist/esm-node/commands/runtime.mjs +117 -0
- package/dist/esm-node/commands/serve.mjs +49 -0
- package/dist/esm-node/compat/hooks.mjs +68 -0
- package/dist/esm-node/compat/index.mjs +29 -0
- package/dist/esm-node/compat/utils.mjs +96 -0
- package/dist/esm-node/config/default.mjs +92 -0
- package/dist/esm-node/config/index.mjs +3 -0
- package/dist/esm-node/config/initialize/index.mjs +8 -0
- package/dist/esm-node/config/initialize/inits.mjs +55 -0
- package/dist/esm-node/constants.mjs +4 -0
- package/dist/esm-node/defineConfig.mjs +3 -0
- package/dist/esm-node/esm/register-esm.mjs +12 -0
- package/dist/esm-node/esm/ts-paths-loader.mjs +37 -0
- package/dist/esm-node/exports/server.mjs +1 -0
- package/dist/esm-node/index.mjs +133 -0
- package/dist/esm-node/locale/en.mjs +46 -0
- package/dist/esm-node/locale/index.mjs +10 -0
- package/dist/esm-node/locale/zh.mjs +46 -0
- package/dist/esm-node/plugins/analyze/constants.mjs +9 -0
- package/dist/esm-node/plugins/analyze/getBundleEntry.mjs +54 -0
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.mjs +67 -0
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +98 -0
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +131 -0
- package/dist/esm-node/plugins/analyze/index.mjs +204 -0
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +42 -0
- package/dist/esm-node/plugins/analyze/templates.mjs +23 -0
- package/dist/esm-node/plugins/analyze/utils.mjs +64 -0
- package/dist/esm-node/plugins/deploy/index.mjs +44 -0
- package/dist/esm-node/plugins/deploy/platforms/gh-pages.mjs +44 -0
- package/dist/esm-node/plugins/deploy/platforms/netlify.mjs +98 -0
- package/dist/esm-node/plugins/deploy/platforms/node.mjs +58 -0
- package/dist/esm-node/plugins/deploy/platforms/platform.mjs +1 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.cjs +57 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.mjs +59 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.cjs +44 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.mjs +46 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.cjs +57 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.mjs +58 -0
- package/dist/esm-node/plugins/deploy/platforms/vercel.mjs +117 -0
- package/dist/esm-node/plugins/deploy/types.mjs +1 -0
- package/dist/esm-node/plugins/deploy/utils/generator.mjs +49 -0
- package/dist/esm-node/plugins/deploy/utils/index.mjs +71 -0
- package/dist/esm-node/plugins/initialize/index.mjs +60 -0
- package/dist/esm-node/plugins/serverBuild.mjs +46 -0
- package/dist/esm-node/plugins/serverRuntime.mjs +16 -0
- package/dist/esm-node/presetUltramodern.mjs +5 -0
- package/dist/esm-node/rsbuild.mjs +48 -0
- package/dist/esm-node/rslib-runtime.mjs +19 -0
- package/dist/esm-node/run/index.mjs +62 -0
- package/dist/esm-node/types/config/deploy.mjs +1 -0
- package/dist/esm-node/types/config/dev.mjs +1 -0
- package/dist/esm-node/types/config/experiments.mjs +1 -0
- package/dist/esm-node/types/config/html.mjs +1 -0
- package/dist/esm-node/types/config/index.mjs +2 -0
- package/dist/esm-node/types/config/output.mjs +1 -0
- package/dist/esm-node/types/config/performance.mjs +1 -0
- package/dist/esm-node/types/config/resolve.mjs +1 -0
- package/dist/esm-node/types/config/security.mjs +1 -0
- package/dist/esm-node/types/config/source.mjs +1 -0
- package/dist/esm-node/types/config/testing.mjs +1 -0
- package/dist/esm-node/types/config/tools.mjs +1 -0
- package/dist/esm-node/types/index.mjs +2 -0
- package/dist/esm-node/types/plugin.mjs +1 -0
- package/dist/esm-node/types/utils.mjs +1 -0
- package/dist/esm-node/ultramodern/designSystem.mjs +74 -0
- package/dist/esm-node/utils/config.mjs +12 -0
- package/dist/esm-node/utils/createServer.mjs +13 -0
- package/dist/esm-node/utils/env.mjs +13 -0
- package/dist/esm-node/utils/generateWatchFiles.mjs +11 -0
- package/dist/esm-node/utils/getConfigFile.mjs +6 -0
- package/dist/esm-node/utils/getSelectedEntries.mjs +27 -0
- package/dist/esm-node/utils/initAppContext.mjs +28 -0
- package/dist/esm-node/utils/loadPlugins.mjs +46 -0
- package/dist/esm-node/utils/printInstructions.mjs +10 -0
- package/dist/esm-node/utils/register.mjs +83 -0
- package/dist/esm-node/utils/restart.mjs +19 -0
- package/dist/esm-node/utils/routes.mjs +16 -0
- package/dist/esm-node/utils/types.mjs +1 -0
- package/dist/types/baseline.d.ts +46 -0
- package/dist/types/builder/builder-rspack/index.d.ts +2 -0
- package/dist/types/builder/generator/adapterCopy.d.ts +3 -0
- package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +3 -0
- package/dist/types/builder/generator/createCopyPattern.d.ts +16 -0
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +6 -0
- package/dist/types/builder/generator/index.d.ts +8 -0
- package/dist/types/builder/index.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterPrecompress.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/builderHooks.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/index.d.ts +5 -0
- package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +7 -0
- package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +9 -0
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +32 -0
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +3 -0
- package/dist/types/builder/shared/createCopyInfo.d.ts +8 -0
- package/dist/types/builder/shared/index.d.ts +3 -0
- package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +3 -0
- package/dist/types/builder/shared/types.d.ts +6 -0
- package/dist/types/commands/build.d.ts +4 -0
- package/dist/types/commands/deploy.d.ts +3 -0
- package/dist/types/commands/dev.d.ts +9 -0
- package/dist/types/commands/index.d.ts +10 -0
- package/dist/types/commands/info.d.ts +18 -0
- package/dist/types/commands/inspect.d.ts +4 -0
- package/dist/types/commands/runtime.d.ts +11 -0
- package/dist/types/commands/serve.d.ts +8 -0
- package/dist/types/compat/hooks.d.ts +7 -0
- package/dist/types/compat/index.d.ts +2 -0
- package/dist/types/compat/utils.d.ts +13 -0
- package/dist/types/config/default.d.ts +3 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/config/initialize/index.d.ts +3 -0
- package/dist/types/config/initialize/inits.d.ts +4 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/defineConfig.d.ts +11 -0
- package/dist/types/esm/register-esm.d.mts +11 -0
- package/dist/types/esm/ts-node-loader.d.mts +6 -0
- package/dist/types/esm/ts-paths-loader.d.mts +6 -0
- package/dist/types/exports/server.d.ts +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/locale/en.d.ts +44 -0
- package/dist/types/locale/index.d.ts +90 -0
- package/dist/types/locale/zh.d.ts +44 -0
- package/dist/types/plugins/analyze/constants.d.ts +3 -0
- package/dist/types/plugins/analyze/getBundleEntry.d.ts +4 -0
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +7 -0
- package/dist/types/plugins/analyze/getHtmlTemplate.d.ts +27 -0
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +8 -0
- package/dist/types/plugins/analyze/index.d.ts +3 -0
- package/dist/types/plugins/analyze/isDefaultExportFunction.d.ts +1 -0
- package/dist/types/plugins/analyze/templates.d.ts +5 -0
- package/dist/types/plugins/analyze/utils.d.ts +10 -0
- package/dist/types/plugins/deploy/index.d.ts +3 -0
- package/dist/types/plugins/deploy/platforms/gh-pages.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/netlify.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/node.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/platform.d.ts +17 -0
- package/dist/types/plugins/deploy/platforms/templates/netlify-entry.d.cts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/netlify-entry.d.mts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/node-entry.d.cts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/node-entry.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/vercel-entry.d.cts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/vercel-entry.d.mts +2 -0
- package/dist/types/plugins/deploy/platforms/vercel.d.ts +2 -0
- package/dist/types/plugins/deploy/types.d.ts +3 -0
- package/dist/types/plugins/deploy/utils/generator.d.ts +24 -0
- package/dist/types/plugins/deploy/utils/index.d.ts +16 -0
- package/dist/types/plugins/initialize/index.d.ts +3 -0
- package/dist/types/plugins/serverBuild.d.ts +3 -0
- package/dist/types/plugins/serverRuntime.d.ts +3 -0
- package/dist/types/presetUltramodern.d.ts +6 -0
- package/dist/types/rsbuild.d.ts +12 -0
- package/dist/types/run/index.d.ts +20 -0
- package/dist/types/types/config/deploy.d.ts +38 -0
- package/dist/types/types/config/dev.d.ts +55 -0
- package/dist/types/types/config/experiments.d.ts +3 -0
- package/dist/types/types/config/html.d.ts +3 -0
- package/dist/types/types/config/index.d.ts +48 -0
- package/dist/types/types/config/output.d.ts +61 -0
- package/dist/types/types/config/performance.d.ts +3 -0
- package/dist/types/types/config/resolve.d.ts +2 -0
- package/dist/types/types/config/security.d.ts +2 -0
- package/dist/types/types/config/source.d.ts +61 -0
- package/dist/types/types/config/testing.d.ts +8 -0
- package/dist/types/types/config/tools.d.ts +21 -0
- package/dist/types/types/index.d.ts +10 -0
- package/dist/types/types/plugin.d.ts +114 -0
- package/dist/types/types/utils.d.ts +1 -0
- package/dist/types/ultramodern/designSystem.d.ts +54 -0
- package/dist/types/utils/config.d.ts +2 -0
- package/dist/types/utils/createServer.d.ts +5 -0
- package/dist/types/utils/env.d.ts +2 -0
- package/dist/types/utils/generateWatchFiles.d.ts +2 -0
- package/dist/types/utils/getConfigFile.d.ts +1 -0
- package/dist/types/utils/getSelectedEntries.d.ts +5 -0
- package/dist/types/utils/initAppContext.d.ts +31 -0
- package/dist/types/utils/loadPlugins.d.ts +13 -0
- package/dist/types/utils/printInstructions.d.ts +3 -0
- package/dist/types/utils/register.d.ts +19 -0
- package/dist/types/utils/restart.d.ts +2 -0
- package/dist/types/utils/routes.d.ts +4 -0
- package/dist/types/utils/types.d.ts +49 -0
- package/lib/types.d.ts +252 -0
- package/package.json +138 -0
- package/rslib.config.mts +39 -0
- package/rstest.config.mts +20 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./baseline" (module) {
|
|
4
|
+
module.exports = require("./baseline.js");
|
|
5
|
+
},
|
|
6
|
+
"./commands/dev" (module) {
|
|
7
|
+
module.exports = require("./commands/dev.js");
|
|
8
|
+
},
|
|
9
|
+
"./commands" (module) {
|
|
10
|
+
module.exports = require("./commands/index.js");
|
|
11
|
+
},
|
|
12
|
+
"./commands/serve" (module) {
|
|
13
|
+
module.exports = require("./commands/serve.js");
|
|
14
|
+
},
|
|
15
|
+
"./compat" (module) {
|
|
16
|
+
module.exports = require("./compat/index.js");
|
|
17
|
+
},
|
|
18
|
+
"./constants" (module) {
|
|
19
|
+
module.exports = require("./constants.js");
|
|
20
|
+
},
|
|
21
|
+
"./defineConfig" (module) {
|
|
22
|
+
module.exports = require("./defineConfig.js");
|
|
23
|
+
},
|
|
24
|
+
"./locale" (module) {
|
|
25
|
+
module.exports = require("./locale/index.js");
|
|
26
|
+
},
|
|
27
|
+
"./plugins/analyze" (module) {
|
|
28
|
+
module.exports = require("./plugins/analyze/index.js");
|
|
29
|
+
},
|
|
30
|
+
"./plugins/deploy" (module) {
|
|
31
|
+
module.exports = require("./plugins/deploy/index.js");
|
|
32
|
+
},
|
|
33
|
+
"./plugins/initialize" (module) {
|
|
34
|
+
module.exports = require("./plugins/initialize/index.js");
|
|
35
|
+
},
|
|
36
|
+
"./plugins/serverBuild" (module) {
|
|
37
|
+
module.exports = require("./plugins/serverBuild.js");
|
|
38
|
+
},
|
|
39
|
+
"./plugins/serverRuntime" (module) {
|
|
40
|
+
module.exports = require("./plugins/serverRuntime.js");
|
|
41
|
+
},
|
|
42
|
+
"./presetUltramodern" (module) {
|
|
43
|
+
module.exports = require("./presetUltramodern.js");
|
|
44
|
+
},
|
|
45
|
+
"./rsbuild" (module) {
|
|
46
|
+
module.exports = require("./rsbuild.js");
|
|
47
|
+
},
|
|
48
|
+
"./types?6efa" (module) {
|
|
49
|
+
module.exports = require("./types/index.js");
|
|
50
|
+
},
|
|
51
|
+
"./ultramodern/designSystem" (module) {
|
|
52
|
+
module.exports = require("./ultramodern/designSystem.js");
|
|
53
|
+
},
|
|
54
|
+
"./utils/generateWatchFiles" (module) {
|
|
55
|
+
module.exports = require("./utils/generateWatchFiles.js");
|
|
56
|
+
},
|
|
57
|
+
"./utils/initAppContext" (module) {
|
|
58
|
+
module.exports = require("./utils/initAppContext.js");
|
|
59
|
+
},
|
|
60
|
+
"./utils/restart" (module) {
|
|
61
|
+
module.exports = require("./utils/restart.js");
|
|
62
|
+
},
|
|
63
|
+
"@modern-js/builder" (module) {
|
|
64
|
+
module.exports = require("@modern-js/builder");
|
|
65
|
+
},
|
|
66
|
+
"@modern-js/i18n-utils/language-detector" (module) {
|
|
67
|
+
module.exports = require("@modern-js/i18n-utils/language-detector");
|
|
68
|
+
},
|
|
69
|
+
"@modern-js/plugin" (module) {
|
|
70
|
+
module.exports = require("@modern-js/plugin");
|
|
71
|
+
},
|
|
72
|
+
"@modern-js/plugin/cli" (module) {
|
|
73
|
+
module.exports = require("@modern-js/plugin/cli");
|
|
74
|
+
},
|
|
75
|
+
"@modern-js/utils" (module) {
|
|
76
|
+
module.exports = require("@modern-js/utils");
|
|
77
|
+
},
|
|
78
|
+
path (module) {
|
|
79
|
+
module.exports = require("path");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
var __webpack_module_cache__ = {};
|
|
83
|
+
function __webpack_require__(moduleId) {
|
|
84
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
85
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
86
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
87
|
+
exports: {}
|
|
88
|
+
};
|
|
89
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
90
|
+
return module.exports;
|
|
91
|
+
}
|
|
92
|
+
(()=>{
|
|
93
|
+
__webpack_require__.n = (module)=>{
|
|
94
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
95
|
+
__webpack_require__.d(getter, {
|
|
96
|
+
a: getter
|
|
97
|
+
});
|
|
98
|
+
return getter;
|
|
99
|
+
};
|
|
100
|
+
})();
|
|
101
|
+
(()=>{
|
|
102
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
103
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: definition[key]
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
})();
|
|
109
|
+
(()=>{
|
|
110
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
111
|
+
})();
|
|
112
|
+
(()=>{
|
|
113
|
+
__webpack_require__.r = (exports1)=>{
|
|
114
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
115
|
+
value: 'Module'
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
118
|
+
value: true
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
})();
|
|
122
|
+
var __webpack_exports__ = {};
|
|
123
|
+
(()=>{
|
|
124
|
+
__webpack_require__.r(__webpack_exports__);
|
|
125
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
126
|
+
appTools: ()=>appTools,
|
|
127
|
+
default: ()=>__rspack_default_export,
|
|
128
|
+
defineConfig: ()=>_defineConfig__rspack_import_18.defineConfig,
|
|
129
|
+
dev: ()=>_commands_dev__rspack_import_21.dev,
|
|
130
|
+
generateWatchFiles: ()=>_utils_generateWatchFiles__rspack_import_14.generateWatchFiles,
|
|
131
|
+
initAppContext: ()=>_utils_initAppContext__rspack_import_15.initAppContext,
|
|
132
|
+
mergeConfig: ()=>_modern_js_plugin_cli__rspack_import_25.mergeConfig,
|
|
133
|
+
resolveModernRsbuildConfig: ()=>_rsbuild__rspack_import_23.resolveModernRsbuildConfig,
|
|
134
|
+
serve: ()=>_commands_serve__rspack_import_22.serve
|
|
135
|
+
});
|
|
136
|
+
var _modern_js_builder__rspack_import_0 = __webpack_require__("@modern-js/builder");
|
|
137
|
+
var _modern_js_i18n_utils_language_detector__rspack_import_1 = __webpack_require__("@modern-js/i18n-utils/language-detector");
|
|
138
|
+
var _modern_js_plugin__rspack_import_2 = __webpack_require__("@modern-js/plugin");
|
|
139
|
+
var _modern_js_utils__rspack_import_3 = __webpack_require__("@modern-js/utils");
|
|
140
|
+
var path__rspack_import_4 = __webpack_require__("path");
|
|
141
|
+
var path__rspack_import_4_default = /*#__PURE__*/ __webpack_require__.n(path__rspack_import_4);
|
|
142
|
+
var _commands__rspack_import_5 = __webpack_require__("./commands");
|
|
143
|
+
var _compat__rspack_import_6 = __webpack_require__("./compat");
|
|
144
|
+
var _constants__rspack_import_7 = __webpack_require__("./constants");
|
|
145
|
+
var _locale__rspack_import_8 = __webpack_require__("./locale");
|
|
146
|
+
var _plugins_analyze__rspack_import_9 = __webpack_require__("./plugins/analyze");
|
|
147
|
+
var _plugins_analyze__rspack_import_9_default = /*#__PURE__*/ __webpack_require__.n(_plugins_analyze__rspack_import_9);
|
|
148
|
+
var _plugins_deploy__rspack_import_10 = __webpack_require__("./plugins/deploy");
|
|
149
|
+
var _plugins_deploy__rspack_import_10_default = /*#__PURE__*/ __webpack_require__.n(_plugins_deploy__rspack_import_10);
|
|
150
|
+
var _plugins_initialize__rspack_import_11 = __webpack_require__("./plugins/initialize");
|
|
151
|
+
var _plugins_initialize__rspack_import_11_default = /*#__PURE__*/ __webpack_require__.n(_plugins_initialize__rspack_import_11);
|
|
152
|
+
var _plugins_serverBuild__rspack_import_12 = __webpack_require__("./plugins/serverBuild");
|
|
153
|
+
var _plugins_serverBuild__rspack_import_12_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverBuild__rspack_import_12);
|
|
154
|
+
var _plugins_serverRuntime__rspack_import_13 = __webpack_require__("./plugins/serverRuntime");
|
|
155
|
+
var _plugins_serverRuntime__rspack_import_13_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverRuntime__rspack_import_13);
|
|
156
|
+
var _utils_generateWatchFiles__rspack_import_14 = __webpack_require__("./utils/generateWatchFiles");
|
|
157
|
+
var _utils_initAppContext__rspack_import_15 = __webpack_require__("./utils/initAppContext");
|
|
158
|
+
var _utils_restart__rspack_import_16 = __webpack_require__("./utils/restart");
|
|
159
|
+
var _baseline__rspack_import_17 = __webpack_require__("./baseline");
|
|
160
|
+
var __rspack_reexport = {};
|
|
161
|
+
for(const __rspack_import_key in _baseline__rspack_import_17)if ([
|
|
162
|
+
"dev",
|
|
163
|
+
"resolveModernRsbuildConfig",
|
|
164
|
+
"mergeConfig",
|
|
165
|
+
"appTools",
|
|
166
|
+
"default",
|
|
167
|
+
"serve",
|
|
168
|
+
"generateWatchFiles",
|
|
169
|
+
"initAppContext",
|
|
170
|
+
"defineConfig"
|
|
171
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_baseline__rspack_import_17[__rspack_import_key];
|
|
172
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
173
|
+
var _defineConfig__rspack_import_18 = __webpack_require__("./defineConfig");
|
|
174
|
+
var __rspack_reexport = {};
|
|
175
|
+
for(const __rspack_import_key in _defineConfig__rspack_import_18)if ([
|
|
176
|
+
"dev",
|
|
177
|
+
"resolveModernRsbuildConfig",
|
|
178
|
+
"mergeConfig",
|
|
179
|
+
"appTools",
|
|
180
|
+
"default",
|
|
181
|
+
"serve",
|
|
182
|
+
"generateWatchFiles",
|
|
183
|
+
"initAppContext",
|
|
184
|
+
"defineConfig"
|
|
185
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_18[__rspack_import_key];
|
|
186
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
187
|
+
var _presetUltramodern__rspack_import_19 = __webpack_require__("./presetUltramodern");
|
|
188
|
+
var __rspack_reexport = {};
|
|
189
|
+
for(const __rspack_import_key in _presetUltramodern__rspack_import_19)if ([
|
|
190
|
+
"dev",
|
|
191
|
+
"resolveModernRsbuildConfig",
|
|
192
|
+
"mergeConfig",
|
|
193
|
+
"appTools",
|
|
194
|
+
"default",
|
|
195
|
+
"serve",
|
|
196
|
+
"generateWatchFiles",
|
|
197
|
+
"initAppContext",
|
|
198
|
+
"defineConfig"
|
|
199
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_presetUltramodern__rspack_import_19[__rspack_import_key];
|
|
200
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
201
|
+
var _ultramodern_designSystem__rspack_import_20 = __webpack_require__("./ultramodern/designSystem");
|
|
202
|
+
var __rspack_reexport = {};
|
|
203
|
+
for(const __rspack_import_key in _ultramodern_designSystem__rspack_import_20)if ([
|
|
204
|
+
"dev",
|
|
205
|
+
"resolveModernRsbuildConfig",
|
|
206
|
+
"mergeConfig",
|
|
207
|
+
"appTools",
|
|
208
|
+
"default",
|
|
209
|
+
"serve",
|
|
210
|
+
"generateWatchFiles",
|
|
211
|
+
"initAppContext",
|
|
212
|
+
"defineConfig"
|
|
213
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_ultramodern_designSystem__rspack_import_20[__rspack_import_key];
|
|
214
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
215
|
+
var _commands_dev__rspack_import_21 = __webpack_require__("./commands/dev");
|
|
216
|
+
var _commands_serve__rspack_import_22 = __webpack_require__("./commands/serve");
|
|
217
|
+
var _rsbuild__rspack_import_23 = __webpack_require__("./rsbuild");
|
|
218
|
+
var _types__rspack_import_24 = __webpack_require__("./types?6efa");
|
|
219
|
+
var __rspack_reexport = {};
|
|
220
|
+
for(const __rspack_import_key in _types__rspack_import_24)if ([
|
|
221
|
+
"dev",
|
|
222
|
+
"resolveModernRsbuildConfig",
|
|
223
|
+
"mergeConfig",
|
|
224
|
+
"appTools",
|
|
225
|
+
"default",
|
|
226
|
+
"serve",
|
|
227
|
+
"generateWatchFiles",
|
|
228
|
+
"initAppContext",
|
|
229
|
+
"defineConfig"
|
|
230
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_24[__rspack_import_key];
|
|
231
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
232
|
+
var _modern_js_plugin_cli__rspack_import_25 = __webpack_require__("@modern-js/plugin/cli");
|
|
233
|
+
const appTools = ()=>({
|
|
234
|
+
name: '@modern-js/app-tools',
|
|
235
|
+
usePlugins: [
|
|
236
|
+
_plugins_serverRuntime__rspack_import_13_default()(),
|
|
237
|
+
(0, _compat__rspack_import_6.compatPlugin)(),
|
|
238
|
+
_plugins_initialize__rspack_import_11_default()(),
|
|
239
|
+
_plugins_analyze__rspack_import_9_default()(),
|
|
240
|
+
_plugins_serverBuild__rspack_import_12_default()(),
|
|
241
|
+
_plugins_deploy__rspack_import_10_default()()
|
|
242
|
+
],
|
|
243
|
+
post: [
|
|
244
|
+
'@modern-js/plugin-initialize',
|
|
245
|
+
'@modern-js/plugin-analyze',
|
|
246
|
+
'@modern-js/plugin-ssr',
|
|
247
|
+
'@modern-js/plugin-document',
|
|
248
|
+
'@modern-js/plugin-router',
|
|
249
|
+
'@modern-js/plugin-polyfill'
|
|
250
|
+
],
|
|
251
|
+
registryHooks: {
|
|
252
|
+
onAfterPrepare: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
253
|
+
deploy: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
254
|
+
checkEntryPoint: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
255
|
+
modifyEntrypoints: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
256
|
+
modifyFileSystemRoutes: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
257
|
+
generateEntryCode: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
258
|
+
onBeforeGenerateRoutes: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)(),
|
|
259
|
+
onBeforePrintInstructions: (0, _modern_js_plugin__rspack_import_2.createAsyncHook)()
|
|
260
|
+
},
|
|
261
|
+
setup: (api)=>{
|
|
262
|
+
const context = api.getAppContext();
|
|
263
|
+
const userConfig = api.getConfig();
|
|
264
|
+
const locale = (0, _modern_js_i18n_utils_language_detector__rspack_import_1.getLocaleLanguage)();
|
|
265
|
+
_locale__rspack_import_8.i18n.changeLanguage({
|
|
266
|
+
locale
|
|
267
|
+
});
|
|
268
|
+
api.updateAppContext((0, _utils_initAppContext__rspack_import_15.initAppContext)({
|
|
269
|
+
metaName: context.metaName,
|
|
270
|
+
appDirectory: context.appDirectory,
|
|
271
|
+
runtimeConfigFile: _constants__rspack_import_7.DEFAULT_RUNTIME_CONFIG_FILE,
|
|
272
|
+
options: {
|
|
273
|
+
bffRuntimeFramework: userConfig.bff?.runtimeFramework
|
|
274
|
+
},
|
|
275
|
+
tempDir: userConfig.output?.tempDir
|
|
276
|
+
}));
|
|
277
|
+
api.addCommand(async ({ program })=>{
|
|
278
|
+
await (0, _commands__rspack_import_5.devCommand)(program, api);
|
|
279
|
+
await (0, _commands__rspack_import_5.buildCommand)(program, api);
|
|
280
|
+
(0, _commands__rspack_import_5.serverCommand)(program, api);
|
|
281
|
+
(0, _commands__rspack_import_5.deployCommand)(program, api);
|
|
282
|
+
(0, _commands__rspack_import_5.inspectCommand)(program, api);
|
|
283
|
+
(0, _commands__rspack_import_5.infoCommand)(program, api);
|
|
284
|
+
await (0, _commands__rspack_import_5.runtimeOperationsCommand)(program, api);
|
|
285
|
+
(0, _modern_js_utils__rspack_import_3.deprecatedCommands)(program);
|
|
286
|
+
});
|
|
287
|
+
api.onPrepare(async ()=>{
|
|
288
|
+
const command = (0, _modern_js_utils__rspack_import_3.getCommand)();
|
|
289
|
+
if ('deploy' === command) {
|
|
290
|
+
const isSkipBuild = [
|
|
291
|
+
'-s',
|
|
292
|
+
'--skip-build'
|
|
293
|
+
].some((tag)=>(0, _modern_js_utils__rspack_import_3.getArgv)().includes(tag));
|
|
294
|
+
if (isSkipBuild) return;
|
|
295
|
+
}
|
|
296
|
+
if ('dev' === command || 'start' === command || 'build' === command || 'deploy' === command) {
|
|
297
|
+
const resolvedConfig = api.getNormalizedConfig();
|
|
298
|
+
if (resolvedConfig.output.cleanDistPath) {
|
|
299
|
+
const appContext = api.getAppContext();
|
|
300
|
+
await (0, _modern_js_utils__rspack_import_3.emptyDir)(appContext.distDirectory);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
api.addWatchFiles(async ()=>{
|
|
305
|
+
const appContext = api.getAppContext();
|
|
306
|
+
const config = api.getNormalizedConfig();
|
|
307
|
+
const files = await (0, _utils_generateWatchFiles__rspack_import_14.generateWatchFiles)(appContext, config.source.configDir);
|
|
308
|
+
const watchFiles = (0, _modern_js_builder__rspack_import_0.castArray)(config.dev.watchFiles);
|
|
309
|
+
watchFiles.forEach(({ type, paths })=>{
|
|
310
|
+
if ('reload-server' === type) files.push(...Array.isArray(paths) ? paths : [
|
|
311
|
+
paths
|
|
312
|
+
]);
|
|
313
|
+
});
|
|
314
|
+
return files;
|
|
315
|
+
});
|
|
316
|
+
api.onFileChanged(async (e)=>{
|
|
317
|
+
const { filename, eventType, isPrivate } = e;
|
|
318
|
+
const { appDirectory, apiDirectory } = api.getAppContext();
|
|
319
|
+
const relativeApiPath = path__rspack_import_4_default().relative(appDirectory, apiDirectory);
|
|
320
|
+
const isApiProject = filename.startsWith(`${relativeApiPath}/`);
|
|
321
|
+
if (!isPrivate && ('change' === eventType || 'unlink' === eventType) && !isApiProject) {
|
|
322
|
+
const { closeServer } = await import("./utils/createServer.js");
|
|
323
|
+
await closeServer();
|
|
324
|
+
await (0, _utils_restart__rspack_import_16.restart)(api.getHooks(), filename);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
api.onBeforeRestart(()=>{
|
|
328
|
+
(0, _modern_js_utils__rspack_import_3.cleanRequireCache)([
|
|
329
|
+
require.resolve('./plugins/analyze')
|
|
330
|
+
]);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
const __rspack_default_export = appTools;
|
|
335
|
+
})();
|
|
336
|
+
exports.appTools = __webpack_exports__.appTools;
|
|
337
|
+
exports["default"] = __webpack_exports__["default"];
|
|
338
|
+
exports.defineConfig = __webpack_exports__.defineConfig;
|
|
339
|
+
exports.dev = __webpack_exports__.dev;
|
|
340
|
+
exports.generateWatchFiles = __webpack_exports__.generateWatchFiles;
|
|
341
|
+
exports.initAppContext = __webpack_exports__.initAppContext;
|
|
342
|
+
exports.mergeConfig = __webpack_exports__.mergeConfig;
|
|
343
|
+
exports.resolveModernRsbuildConfig = __webpack_exports__.resolveModernRsbuildConfig;
|
|
344
|
+
exports.serve = __webpack_exports__.serve;
|
|
345
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
346
|
+
"appTools",
|
|
347
|
+
"default",
|
|
348
|
+
"defineConfig",
|
|
349
|
+
"dev",
|
|
350
|
+
"generateWatchFiles",
|
|
351
|
+
"initAppContext",
|
|
352
|
+
"mergeConfig",
|
|
353
|
+
"resolveModernRsbuildConfig",
|
|
354
|
+
"serve"
|
|
355
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
356
|
+
Object.defineProperty(exports, '__esModule', {
|
|
357
|
+
value: true
|
|
358
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
|
28
|
+
});
|
|
29
|
+
const EN_LOCALE = {
|
|
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
|
+
},
|
|
68
|
+
info: {
|
|
69
|
+
describe: 'show project information'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.EN_LOCALE = __webpack_exports__.EN_LOCALE;
|
|
74
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
75
|
+
"EN_LOCALE"
|
|
76
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
77
|
+
Object.defineProperty(exports, '__esModule', {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
i18n: ()=>i18n,
|
|
28
|
+
localeKeys: ()=>localeKeys
|
|
29
|
+
});
|
|
30
|
+
const i18n_utils_namespaceObject = require("@modern-js/i18n-utils");
|
|
31
|
+
const external_en_js_namespaceObject = require("./en.js");
|
|
32
|
+
const external_zh_js_namespaceObject = require("./zh.js");
|
|
33
|
+
const i18n = new i18n_utils_namespaceObject.I18n();
|
|
34
|
+
const localeKeys = i18n.init('en', {
|
|
35
|
+
zh: external_zh_js_namespaceObject.ZH_LOCALE,
|
|
36
|
+
en: external_en_js_namespaceObject.EN_LOCALE
|
|
37
|
+
});
|
|
38
|
+
exports.i18n = __webpack_exports__.i18n;
|
|
39
|
+
exports.localeKeys = __webpack_exports__.localeKeys;
|
|
40
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
41
|
+
"i18n",
|
|
42
|
+
"localeKeys"
|
|
43
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
|
45
|
+
value: true
|
|
46
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
ZH_LOCALE: ()=>ZH_LOCALE
|
|
28
|
+
});
|
|
29
|
+
const ZH_LOCALE = {
|
|
30
|
+
command: {
|
|
31
|
+
shared: {
|
|
32
|
+
analyze: '分析构建产物体积,查看各个模块打包后的大小',
|
|
33
|
+
config: '指定配置文件路径,可以为相对路径或绝对路径',
|
|
34
|
+
skipBuild: '跳过构建阶段',
|
|
35
|
+
noNeedInstall: '无需安装依赖'
|
|
36
|
+
},
|
|
37
|
+
dev: {
|
|
38
|
+
describe: '启动开发服务器',
|
|
39
|
+
entry: '指定入口,编译特定的页面',
|
|
40
|
+
apiOnly: '仅启动 API 接口服务',
|
|
41
|
+
webOnly: '仅启动 Web 服务',
|
|
42
|
+
selectEntry: '请选择需要构建的入口',
|
|
43
|
+
requireEntry: '请至少选择一个入口'
|
|
44
|
+
},
|
|
45
|
+
build: {
|
|
46
|
+
describe: '构建生产环境产物',
|
|
47
|
+
watch: '开启 watch 模式, 监听文件变更并重新构建'
|
|
48
|
+
},
|
|
49
|
+
serve: {
|
|
50
|
+
describe: '启动生产环境服务'
|
|
51
|
+
},
|
|
52
|
+
deploy: {
|
|
53
|
+
describe: '部署应用'
|
|
54
|
+
},
|
|
55
|
+
new: {
|
|
56
|
+
describe: 'Web App 项目中执行生成器',
|
|
57
|
+
debug: '开启 Debug 模式,打印调试日志信息',
|
|
58
|
+
config: '生成器运行默认配置(JSON 字符串)',
|
|
59
|
+
distTag: '生成器使用特殊的 npm Tag 版本',
|
|
60
|
+
registry: '生成器运行过程中定制 npm Registry',
|
|
61
|
+
lang: '设置 new 命令执行语言(zh 或者 en)'
|
|
62
|
+
},
|
|
63
|
+
inspect: {
|
|
64
|
+
env: '查看指定环境下的配置',
|
|
65
|
+
output: '指定在 dist 目录下输出的路径',
|
|
66
|
+
verbose: '在结果中展示函数的完整内容'
|
|
67
|
+
},
|
|
68
|
+
info: {
|
|
69
|
+
describe: '展示项目信息'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.ZH_LOCALE = __webpack_exports__.ZH_LOCALE;
|
|
74
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
75
|
+
"ZH_LOCALE"
|
|
76
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
77
|
+
Object.defineProperty(exports, '__esModule', {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
ENTRY_FILE_NAME: ()=>ENTRY_FILE_NAME,
|
|
28
|
+
HTML_PARTIALS_EXTENSIONS: ()=>HTML_PARTIALS_EXTENSIONS,
|
|
29
|
+
HTML_PARTIALS_FOLDER: ()=>HTML_PARTIALS_FOLDER
|
|
30
|
+
});
|
|
31
|
+
const ENTRY_FILE_NAME = 'entry';
|
|
32
|
+
const HTML_PARTIALS_FOLDER = 'html';
|
|
33
|
+
const HTML_PARTIALS_EXTENSIONS = [
|
|
34
|
+
'.htm',
|
|
35
|
+
'.html',
|
|
36
|
+
'.ejs'
|
|
37
|
+
];
|
|
38
|
+
exports.ENTRY_FILE_NAME = __webpack_exports__.ENTRY_FILE_NAME;
|
|
39
|
+
exports.HTML_PARTIALS_EXTENSIONS = __webpack_exports__.HTML_PARTIALS_EXTENSIONS;
|
|
40
|
+
exports.HTML_PARTIALS_FOLDER = __webpack_exports__.HTML_PARTIALS_FOLDER;
|
|
41
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
42
|
+
"ENTRY_FILE_NAME",
|
|
43
|
+
"HTML_PARTIALS_EXTENSIONS",
|
|
44
|
+
"HTML_PARTIALS_FOLDER"
|
|
45
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
46
|
+
Object.defineProperty(exports, '__esModule', {
|
|
47
|
+
value: true
|
|
48
|
+
});
|