@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.10 → 3.5.0-ultramodern.100
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/bin/modern.js +0 -0
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +5 -1
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +20 -16
- package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +13 -4
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +14 -11
- package/dist/cjs/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.js +72 -0
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +28 -11
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +13 -6
- package/dist/cjs/builder/shared/lazyCompilation.js +2 -10
- package/dist/cjs/commands/build.js +2 -1
- package/dist/cjs/commands/deploy.js +4 -2
- package/dist/cjs/commands/index.js +0 -8
- package/dist/cjs/config/build-environment.js +268 -0
- package/dist/cjs/config/default.js +2 -0
- package/dist/cjs/config/index.js +11 -4
- package/dist/cjs/config/public.js +46 -0
- package/dist/cjs/index.js +93 -75
- package/dist/cjs/plugins/analyze/getServerRoutes.js +19 -0
- package/dist/cjs/plugins/analyze/index.js +22 -14
- package/dist/cjs/plugins/analyze/utils.js +3 -2
- package/dist/cjs/plugins/backend-federation/codegen.js +255 -0
- package/dist/cjs/plugins/backend-federation/config.js +204 -0
- package/dist/cjs/plugins/backend-federation/emit.js +148 -0
- package/dist/cjs/plugins/backendFederationBuild.js +53 -0
- package/dist/cjs/plugins/deploy/index.js +4 -4
- package/dist/cjs/plugins/deploy/platforms/cloudflare/artifacts.js +127 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/constants.js +141 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/delivery-unit.js +139 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/i18n-worker.js +135 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/index.js +150 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/security-policies.js +205 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/types.js +18 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/utils.js +66 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/worker-manifest.js +208 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/wrangler-config.js +204 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-contract.js +108 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-plan.js +93 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/identity.js +83 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +188 -0
- package/dist/cjs/{baseline.js → plugins/deploy/platforms/cloudflare-output-verifier/issues.js} +19 -10
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/manifest.js +89 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.js +151 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +302 -0
- package/dist/cjs/plugins/deploy/platforms/node.js +20 -2
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/cjs/plugins/deploy/utils/npmAliases.js +226 -0
- package/dist/cjs/plugins/initialize/index.js +4 -3
- package/dist/cjs/plugins/serverBuild.js +3 -2
- package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +100 -0
- package/dist/cjs/presetUltramodern.js +33 -2
- package/dist/cjs/ultramodern-release-envelope/canonical.js +68 -0
- package/dist/cjs/ultramodern-release-envelope/framework-output.js +597 -0
- package/dist/cjs/ultramodern-release-envelope/index.js +399 -0
- package/dist/cjs/ultramodern-release-envelope/types.js +51 -0
- package/dist/cjs/ultramodern-release-identity.js +110 -0
- package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +19 -15
- package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
- package/dist/esm/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +30 -0
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
- package/dist/esm/builder/shared/bundlerPlugins/index.mjs +1 -0
- package/dist/esm/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm/commands/build.mjs +2 -1
- package/dist/esm/commands/deploy.mjs +4 -2
- package/dist/esm/commands/index.mjs +0 -5
- package/dist/esm/config/build-environment.mjs +224 -0
- package/dist/esm/config/default.mjs +2 -0
- package/dist/esm/config/index.mjs +1 -0
- package/dist/esm/config/public.mjs +1 -0
- package/dist/esm/index.mjs +20 -5
- package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +17 -1
- package/dist/esm/plugins/analyze/index.mjs +22 -14
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm/plugins/analyze/utils.mjs +3 -2
- package/dist/esm/plugins/backend-federation/codegen.mjs +204 -0
- package/dist/esm/plugins/backend-federation/config.mjs +128 -0
- package/dist/esm/plugins/backend-federation/emit.mjs +97 -0
- package/dist/esm/plugins/backendFederationBuild.mjs +1 -0
- package/dist/esm/plugins/deploy/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare/artifacts.mjs +64 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/constants.mjs +34 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +88 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +97 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/index.mjs +102 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/security-policies.mjs +167 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/types.mjs +0 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/utils.mjs +12 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +148 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +150 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-contract.mjs +31 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-plan.mjs +45 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +45 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +133 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +10 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +51 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +99 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +238 -0
- package/dist/esm/plugins/deploy/platforms/node.mjs +20 -2
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/esm/plugins/deploy/utils/npmAliases.mjs +174 -0
- package/dist/esm/plugins/initialize/index.mjs +4 -3
- package/dist/esm/plugins/serverBuild.mjs +3 -2
- package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +52 -0
- package/dist/esm/presetUltramodern.mjs +33 -2
- package/dist/esm/ultramodern-release-envelope/canonical.mjs +21 -0
- package/dist/esm/ultramodern-release-envelope/framework-output.mjs +524 -0
- package/dist/esm/ultramodern-release-envelope/index.mjs +335 -0
- package/dist/esm/ultramodern-release-envelope/types.mjs +7 -0
- package/dist/esm/ultramodern-release-identity.mjs +66 -0
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +19 -15
- package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
- package/dist/esm-node/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +31 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
- package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +1 -0
- package/dist/esm-node/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm-node/commands/build.mjs +2 -1
- package/dist/esm-node/commands/deploy.mjs +4 -2
- package/dist/esm-node/commands/index.mjs +0 -5
- package/dist/esm-node/config/build-environment.mjs +225 -0
- package/dist/esm-node/config/default.mjs +2 -0
- package/dist/esm-node/config/index.mjs +1 -0
- package/dist/esm-node/config/public.mjs +2 -0
- package/dist/esm-node/index.mjs +20 -5
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +17 -1
- package/dist/esm-node/plugins/analyze/index.mjs +22 -14
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm-node/plugins/analyze/utils.mjs +3 -2
- package/dist/esm-node/plugins/backend-federation/codegen.mjs +205 -0
- package/dist/esm-node/plugins/backend-federation/config.mjs +129 -0
- package/dist/esm-node/plugins/backend-federation/emit.mjs +98 -0
- package/dist/esm-node/plugins/backendFederationBuild.mjs +2 -0
- package/dist/esm-node/plugins/deploy/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/artifacts.mjs +65 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/constants.mjs +35 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +89 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +98 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/index.mjs +103 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/security-policies.mjs +168 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/types.mjs +1 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/utils.mjs +13 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +149 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +151 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-contract.mjs +32 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-plan.mjs +46 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +46 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +134 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +11 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +52 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +100 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +239 -0
- package/dist/esm-node/plugins/deploy/platforms/node.mjs +20 -2
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/esm-node/plugins/deploy/utils/npmAliases.mjs +175 -0
- package/dist/esm-node/plugins/initialize/index.mjs +4 -3
- package/dist/esm-node/plugins/serverBuild.mjs +3 -2
- package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +53 -0
- package/dist/esm-node/presetUltramodern.mjs +33 -2
- package/dist/esm-node/ultramodern-release-envelope/canonical.mjs +22 -0
- package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +525 -0
- package/dist/esm-node/ultramodern-release-envelope/index.mjs +336 -0
- package/dist/esm-node/ultramodern-release-envelope/types.mjs +8 -0
- package/dist/esm-node/ultramodern-release-identity.mjs +67 -0
- package/dist/types/builder/generator/createCopyPattern.d.ts +7 -5
- package/dist/types/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.d.ts +6 -0
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +1 -0
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -0
- package/dist/types/builder/shared/lazyCompilation.d.ts +2 -4
- package/dist/types/commands/deploy.d.ts +2 -1
- package/dist/types/commands/index.d.ts +0 -1
- package/dist/types/config/build-environment.d.ts +22 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/config/public.d.ts +2 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +1 -0
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/dist/types/plugins/backend-federation/codegen.d.ts +83 -0
- package/dist/types/plugins/backend-federation/config.d.ts +103 -0
- package/dist/types/plugins/backend-federation/emit.d.ts +13 -0
- package/dist/types/plugins/backendFederationBuild.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/artifacts.d.ts +15 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/constants.d.ts +24 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/delivery-unit.d.ts +23 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/i18n-worker.d.ts +22 -0
- package/dist/types/plugins/deploy/platforms/{cloudflare.d.ts → cloudflare/index.d.ts} +1 -1
- package/dist/types/plugins/deploy/platforms/cloudflare/security-policies.d.ts +51 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/types.d.ts +5 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/utils.d.ts +6 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/worker-manifest.d.ts +122 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/wrangler-config.d.ts +46 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-contract.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-plan.d.ts +34 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/identity.d.ts +4 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +18 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/issues.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/manifest.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +20 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.d.mts +1 -0
- package/dist/types/plugins/deploy/utils/npmAliases.d.ts +14 -0
- package/dist/types/plugins/ultramodernReleaseEnvelope.d.ts +3 -0
- package/dist/types/presetUltramodern.d.ts +10 -0
- package/dist/types/run/index.d.ts +1 -1
- package/dist/types/types/config/cloudflareDeploy.d.ts +41 -0
- package/dist/types/types/config/deploy.d.ts +15 -2
- package/dist/types/types/config/dev.d.ts +6 -0
- package/dist/types/ultramodern-release-envelope/canonical.d.ts +5 -0
- package/dist/types/ultramodern-release-envelope/framework-output.d.ts +31 -0
- package/dist/types/ultramodern-release-envelope/index.d.ts +6 -0
- package/dist/types/ultramodern-release-envelope/types.d.ts +62 -0
- package/dist/types/ultramodern-release-identity.d.ts +16 -0
- package/docs/_nav.json +36 -0
- package/docs/apis/_meta.json +13 -0
- package/docs/apis/app/commands.mdx +205 -0
- package/docs/apis/app/hooks/_meta.json +28 -0
- package/docs/apis/app/hooks/api/lambda.mdx +13 -0
- package/docs/apis/app/hooks/config/_meta.json +1 -0
- package/docs/apis/app/hooks/config/favicon.mdx +29 -0
- package/docs/apis/app/hooks/config/html.mdx +9 -0
- package/docs/apis/app/hooks/config/icon.mdx +29 -0
- package/docs/apis/app/hooks/config/mock.mdx +10 -0
- package/docs/apis/app/hooks/config/public.mdx +30 -0
- package/docs/apis/app/hooks/config/upload.mdx +54 -0
- package/docs/apis/app/hooks/modern-config.mdx +9 -0
- package/docs/apis/app/hooks/server/server.mdx +10 -0
- package/docs/apis/app/hooks/shared.mdx +7 -0
- package/docs/apis/app/hooks/src/app.mdx +30 -0
- package/docs/apis/app/hooks/src/entry.mdx +39 -0
- package/docs/apis/app/hooks/src/entry.server.mdx +56 -0
- package/docs/apis/app/hooks/src/modern.runtime.mdx +9 -0
- package/docs/apis/app/hooks/src/routes.mdx +90 -0
- package/docs/apis/app/hooks/src/server.mdx +7 -0
- package/docs/apis/app/runtime/_meta.json +32 -0
- package/docs/apis/app/runtime/bff/use-backend-context.mdx +30 -0
- package/docs/apis/app/runtime/core/create-root.mdx +22 -0
- package/docs/apis/app/runtime/core/render.mdx +42 -0
- package/docs/apis/app/runtime/core/runtime-context.mdx +160 -0
- package/docs/apis/app/runtime/router/router.mdx +288 -0
- package/docs/apis/app/runtime/ssr/no-ssr.mdx +38 -0
- package/docs/apis/app/runtime/ssr/renderStreaming.mdx +71 -0
- package/docs/apis/app/runtime/ssr/renderString.mdx +64 -0
- package/docs/apis/app/runtime/ssr/requestHandler.mdx +48 -0
- package/docs/apis/app/runtime/utility/css-in-js.mdx +44 -0
- package/docs/apis/app/runtime/utility/head.mdx +38 -0
- package/docs/apis/app/runtime/utility/loadable.mdx +85 -0
- package/docs/components/auto-upgrade.mdx +0 -0
- package/docs/components/bff-upload.mdx +97 -0
- package/docs/components/build-output.mdx +45 -0
- package/docs/components/bundler.mdx +3 -0
- package/docs/components/convention-routing-motivation.mdx +0 -0
- package/docs/components/debug-app.mdx +15 -0
- package/docs/components/default-browserslist.mdx +7 -0
- package/docs/components/deploy-command.mdx +14 -0
- package/docs/components/deploy.mdx +1 -0
- package/docs/components/enable-bff-caution.mdx +3 -0
- package/docs/components/enable-bff.mdx +56 -0
- package/docs/components/enable-ssg.mdx +49 -0
- package/docs/components/entry-mode.mdx +0 -0
- package/docs/components/entry-scan-logic.mdx +7 -0
- package/docs/components/extend-bff-function.mdx +3 -0
- package/docs/components/hono.mdx +120 -0
- package/docs/components/init-app.mdx +93 -0
- package/docs/components/init-rspack-app.mdx +5 -0
- package/docs/components/internal-logger.mdx +25 -0
- package/docs/components/internal-metrics.mdx +20 -0
- package/docs/components/international/custom-instance-code.mdx +16 -0
- package/docs/components/international/init-options-desc.mdx +1 -0
- package/docs/components/international/install-command.mdx +10 -0
- package/docs/components/international/instance-code.mdx +16 -0
- package/docs/components/international/introduce.mdx +5 -0
- package/docs/components/international/platform-support.mdx +0 -0
- package/docs/components/language-config.mdx +9 -0
- package/docs/components/micro-frontend.mdx +6 -0
- package/docs/components/micro-master-manifest-config.mdx +15 -0
- package/docs/components/micro-runtime-config.mdx +17 -0
- package/docs/components/module-federation.mdx +7 -0
- package/docs/components/new-entry-tooltip.mdx +0 -0
- package/docs/components/nodeVersion.mdx +28 -0
- package/docs/components/other-plugins.mdx +0 -0
- package/docs/components/output-asset-prefix-extend.mdx +0 -0
- package/docs/components/output-distpath-warning.mdx +0 -0
- package/docs/components/output-polyfill-extend.mdx +1 -0
- package/docs/components/prerequisites.mdx +18 -0
- package/docs/components/release-note.mdx +1 -0
- package/docs/components/routes-practice.mdx +0 -0
- package/docs/components/rsbuild-config-tooltip.mdx +5 -0
- package/docs/components/rsbuild.mdx +3 -0
- package/docs/components/rsc-deploy-tip.mdx +1 -0
- package/docs/components/rspack.mdx +3 -0
- package/docs/components/rspackTip.mdx +7 -0
- package/docs/components/runtime-cli-config.mdx +0 -0
- package/docs/components/serve-command.mdx +22 -0
- package/docs/components/ssr-monitor.mdx +3 -0
- package/docs/components/stream-ssr-performance.mdx +0 -0
- package/docs/components/swc.mdx +3 -0
- package/docs/components/tech-stack-node-framework.mdx +1 -0
- package/docs/components/turtorials-example-list.mdx +2 -0
- package/docs/components/ua-polyfill.mdx +44 -0
- package/docs/components/upgrade-browserslist.mdx +0 -0
- package/docs/components/upgrade-config-deploy.mdx +0 -0
- package/docs/components/upgrade-faq.mdx +0 -0
- package/docs/configure/_meta.json +78 -0
- package/docs/configure/app/bff/cross-project.mdx +24 -0
- package/docs/configure/app/bff/effect.mdx +319 -0
- package/docs/configure/app/bff/prefix.mdx +33 -0
- package/docs/configure/app/bff/runtime-framework.mdx +30 -0
- package/docs/configure/app/builder-plugins.mdx +70 -0
- package/docs/configure/app/dev/asset-prefix.mdx +18 -0
- package/docs/configure/app/dev/before-start-url.mdx +21 -0
- package/docs/configure/app/dev/client.mdx +45 -0
- package/docs/configure/app/dev/hmr.mdx +14 -0
- package/docs/configure/app/dev/host.mdx +22 -0
- package/docs/configure/app/dev/https.mdx +81 -0
- package/docs/configure/app/dev/lazy-compilation.mdx +45 -0
- package/docs/configure/app/dev/live-reload.mdx +14 -0
- package/docs/configure/app/dev/mock-dir.mdx +35 -0
- package/docs/configure/app/dev/progress-bar.mdx +23 -0
- package/docs/configure/app/dev/server.mdx +128 -0
- package/docs/configure/app/dev/setup-middlewares.mdx +36 -0
- package/docs/configure/app/dev/start-url.mdx +53 -0
- package/docs/configure/app/dev/watch-files.mdx +31 -0
- package/docs/configure/app/dev/write-to-disk.mdx +14 -0
- package/docs/configure/app/experiments/source-build.mdx +33 -0
- package/docs/configure/app/html/app-icon.mdx +32 -0
- package/docs/configure/app/html/crossorigin.mdx +14 -0
- package/docs/configure/app/html/favicon.mdx +20 -0
- package/docs/configure/app/html/inject.mdx +14 -0
- package/docs/configure/app/html/meta.mdx +28 -0
- package/docs/configure/app/html/mount-id.mdx +14 -0
- package/docs/configure/app/html/output-structure.mdx +14 -0
- package/docs/configure/app/html/script-loading.mdx +14 -0
- package/docs/configure/app/html/tags.mdx +19 -0
- package/docs/configure/app/html/template-parameters.mdx +37 -0
- package/docs/configure/app/html/template.mdx +14 -0
- package/docs/configure/app/html/title.mdx +22 -0
- package/docs/configure/app/output/asset-prefix.mdx +18 -0
- package/docs/configure/app/output/assets-retry.mdx +81 -0
- package/docs/configure/app/output/charset.mdx +14 -0
- package/docs/configure/app/output/clean-dist-path.mdx +20 -0
- package/docs/configure/app/output/convert-to-rem.mdx +83 -0
- package/docs/configure/app/output/copy.mdx +14 -0
- package/docs/configure/app/output/css-modules.mdx +52 -0
- package/docs/configure/app/output/data-uri-limit.mdx +30 -0
- package/docs/configure/app/output/disable-css-module-extension.mdx +59 -0
- package/docs/configure/app/output/disable-inline-runtime-chunk.mdx +45 -0
- package/docs/configure/app/output/disable-svgr.mdx +22 -0
- package/docs/configure/app/output/disable-ts-checker.mdx +53 -0
- package/docs/configure/app/output/dist-path.mdx +51 -0
- package/docs/configure/app/output/enable-asset-manifest.mdx +40 -0
- package/docs/configure/app/output/enable-css-module-tsdeclaration.mdx +32 -0
- package/docs/configure/app/output/enable-inline-route-manifests.mdx +20 -0
- package/docs/configure/app/output/externals.mdx +24 -0
- package/docs/configure/app/output/filename-hash.mdx +14 -0
- package/docs/configure/app/output/filename.mdx +59 -0
- package/docs/configure/app/output/inject-styles.mdx +14 -0
- package/docs/configure/app/output/inline-scripts.mdx +33 -0
- package/docs/configure/app/output/inline-styles.mdx +33 -0
- package/docs/configure/app/output/legal-comments.mdx +22 -0
- package/docs/configure/app/output/minify.mdx +26 -0
- package/docs/configure/app/output/override-browserslist.mdx +26 -0
- package/docs/configure/app/output/polyfill.mdx +18 -0
- package/docs/configure/app/output/source-map.mdx +34 -0
- package/docs/configure/app/output/split-route-chunks.mdx +20 -0
- package/docs/configure/app/output/ssg.mdx +85 -0
- package/docs/configure/app/output/ssgByEntries.mdx +93 -0
- package/docs/configure/app/output/svg-default-export.mdx +34 -0
- package/docs/configure/app/output/temp-dir.mdx +24 -0
- package/docs/configure/app/performance/build-cache.mdx +48 -0
- package/docs/configure/app/performance/chunk-split.mdx +44 -0
- package/docs/configure/app/performance/dns-prefetch.mdx +19 -0
- package/docs/configure/app/performance/preconnect.mdx +20 -0
- package/docs/configure/app/performance/prefetch.mdx +25 -0
- package/docs/configure/app/performance/preload.mdx +27 -0
- package/docs/configure/app/performance/print-file-size.mdx +44 -0
- package/docs/configure/app/performance/profile.mdx +14 -0
- package/docs/configure/app/performance/remove-console.mdx +14 -0
- package/docs/configure/app/performance/remove-moment-locale.mdx +14 -0
- package/docs/configure/app/performance/rsdoctor.mdx +42 -0
- package/docs/configure/app/plugins.mdx +59 -0
- package/docs/configure/app/resolve/alias-strategy.mdx +14 -0
- package/docs/configure/app/resolve/alias.mdx +13 -0
- package/docs/configure/app/resolve/condition-names.mdx +18 -0
- package/docs/configure/app/resolve/dedupe.mdx +13 -0
- package/docs/configure/app/resolve/extensions.mdx +18 -0
- package/docs/configure/app/runtime/0-intro.mdx +61 -0
- package/docs/configure/app/runtime/plugins.mdx +58 -0
- package/docs/configure/app/runtime/router.mdx +39 -0
- package/docs/configure/app/security/check-syntax.mdx +73 -0
- package/docs/configure/app/security/nonce.mdx +19 -0
- package/docs/configure/app/security/sri.mdx +24 -0
- package/docs/configure/app/server/base-url.mdx +30 -0
- package/docs/configure/app/server/port.mdx +22 -0
- package/docs/configure/app/server/public-routes.mdx +26 -0
- package/docs/configure/app/server/routes.mdx +90 -0
- package/docs/configure/app/server/rsc.mdx +30 -0
- package/docs/configure/app/server/ssr-by-entries.mdx +29 -0
- package/docs/configure/app/server/ssr.mdx +85 -0
- package/docs/configure/app/server/tsconfig-path.mdx +63 -0
- package/docs/configure/app/source/alias-strategy.mdx +18 -0
- package/docs/configure/app/source/alias.mdx +27 -0
- package/docs/configure/app/source/config-dir.mdx +24 -0
- package/docs/configure/app/source/decorators.mdx +29 -0
- package/docs/configure/app/source/define.mdx +20 -0
- package/docs/configure/app/source/disable-default-entries.mdx +32 -0
- package/docs/configure/app/source/enable-async-entry.mdx +54 -0
- package/docs/configure/app/source/enable-async-pre-entry.mdx +30 -0
- package/docs/configure/app/source/entries-dir.mdx +39 -0
- package/docs/configure/app/source/entries.mdx +183 -0
- package/docs/configure/app/source/exclude.mdx +14 -0
- package/docs/configure/app/source/global-vars.mdx +110 -0
- package/docs/configure/app/source/include.mdx +40 -0
- package/docs/configure/app/source/main-entry-name.mdx +28 -0
- package/docs/configure/app/source/pre-entry.mdx +14 -0
- package/docs/configure/app/source/react-compiler.mdx +72 -0
- package/docs/configure/app/source/transform-import.mdx +31 -0
- package/docs/configure/app/split-chunks.mdx +17 -0
- package/docs/configure/app/tools/autoprefixer.mdx +48 -0
- package/docs/configure/app/tools/bundler-chain.mdx +30 -0
- package/docs/configure/app/tools/css-extract.mdx +37 -0
- package/docs/configure/app/tools/css-loader.mdx +21 -0
- package/docs/configure/app/tools/dev-server.mdx +117 -0
- package/docs/configure/app/tools/html-plugin.mdx +45 -0
- package/docs/configure/app/tools/less.mdx +85 -0
- package/docs/configure/app/tools/lightningcss-loader.mdx +39 -0
- package/docs/configure/app/tools/minify-css.mdx +57 -0
- package/docs/configure/app/tools/postcss.mdx +38 -0
- package/docs/configure/app/tools/rspack.mdx +14 -0
- package/docs/configure/app/tools/sass.mdx +82 -0
- package/docs/configure/app/tools/style-loader.mdx +14 -0
- package/docs/configure/app/tools/swc.mdx +69 -0
- package/docs/configure/app/tools/ts-checker.mdx +103 -0
- package/docs/configure/app/usage.mdx +276 -0
- package/docs/guides/_meta.json +37 -0
- package/docs/guides/advanced-features/_meta.json +32 -0
- package/docs/guides/advanced-features/bff/_meta.json +10 -0
- package/docs/guides/advanced-features/bff/cross-project.mdx +110 -0
- package/docs/guides/advanced-features/bff/data-platform.mdx +120 -0
- package/docs/guides/advanced-features/bff/extend-server.mdx +120 -0
- package/docs/guides/advanced-features/bff/frameworks.mdx +131 -0
- package/docs/guides/advanced-features/bff/function.mdx +265 -0
- package/docs/guides/advanced-features/bff/operators.mdx +629 -0
- package/docs/guides/advanced-features/bff/sdk.mdx +116 -0
- package/docs/guides/advanced-features/bff/upload.mdx +7 -0
- package/docs/guides/advanced-features/bff.mdx +22 -0
- package/docs/guides/advanced-features/build-performance.mdx +134 -0
- package/docs/guides/advanced-features/compatibility.mdx +81 -0
- package/docs/guides/advanced-features/international/_meta.json +10 -0
- package/docs/guides/advanced-features/international/advanced.mdx +132 -0
- package/docs/guides/advanced-features/international/api.mdx +271 -0
- package/docs/guides/advanced-features/international/best-practices.mdx +290 -0
- package/docs/guides/advanced-features/international/configuration.mdx +222 -0
- package/docs/guides/advanced-features/international/locale-detection.mdx +130 -0
- package/docs/guides/advanced-features/international/quick-start.mdx +112 -0
- package/docs/guides/advanced-features/international/resource-loading.mdx +158 -0
- package/docs/guides/advanced-features/international/routing.mdx +177 -0
- package/docs/guides/advanced-features/international.mdx +29 -0
- package/docs/guides/advanced-features/low-level.mdx +50 -0
- package/docs/guides/advanced-features/page-performance/_meta.json +1 -0
- package/docs/guides/advanced-features/page-performance/code-split.mdx +81 -0
- package/docs/guides/advanced-features/page-performance/inline-assets.mdx +163 -0
- package/docs/guides/advanced-features/page-performance/optimize-bundle.mdx +101 -0
- package/docs/guides/advanced-features/page-performance/react-compiler.mdx +51 -0
- package/docs/guides/advanced-features/server-monitor/_meta.json +1 -0
- package/docs/guides/advanced-features/server-monitor/logger.mdx +19 -0
- package/docs/guides/advanced-features/server-monitor/metrics.mdx +41 -0
- package/docs/guides/advanced-features/server-monitor/monitors.mdx +242 -0
- package/docs/guides/advanced-features/source-build.mdx +168 -0
- package/docs/guides/advanced-features/web-server.mdx +296 -0
- package/docs/guides/basic-features/_meta.json +49 -0
- package/docs/guides/basic-features/alias.mdx +106 -0
- package/docs/guides/basic-features/css/_meta.json +1 -0
- package/docs/guides/basic-features/css/css-in-js.mdx +69 -0
- package/docs/guides/basic-features/css/css-modules.mdx +212 -0
- package/docs/guides/basic-features/css/css.mdx +31 -0
- package/docs/guides/basic-features/css/tailwindcss.mdx +27 -0
- package/docs/guides/basic-features/data/_meta.json +1 -0
- package/docs/guides/basic-features/data/data-cache.mdx +515 -0
- package/docs/guides/basic-features/data/data-fetch.mdx +419 -0
- package/docs/guides/basic-features/data/data-write.mdx +230 -0
- package/docs/guides/basic-features/debug/_meta.json +1 -0
- package/docs/guides/basic-features/debug/mock.mdx +113 -0
- package/docs/guides/basic-features/debug/proxy.mdx +25 -0
- package/docs/guides/basic-features/debug/rsdoctor.mdx +47 -0
- package/docs/guides/basic-features/debug/using-storybook.mdx +100 -0
- package/docs/guides/basic-features/deploy.mdx +448 -0
- package/docs/guides/basic-features/env-vars.mdx +181 -0
- package/docs/guides/basic-features/html.mdx +259 -0
- package/docs/guides/basic-features/output-files.mdx +145 -0
- package/docs/guides/basic-features/render/_meta.json +1 -0
- package/docs/guides/basic-features/render/before-render.mdx +108 -0
- package/docs/guides/basic-features/render/overview.mdx +51 -0
- package/docs/guides/basic-features/render/rsc.mdx +533 -0
- package/docs/guides/basic-features/render/ssg.mdx +167 -0
- package/docs/guides/basic-features/render/ssr-cache.mdx +201 -0
- package/docs/guides/basic-features/render/ssr.mdx +323 -0
- package/docs/guides/basic-features/render/streaming-ssr.mdx +267 -0
- package/docs/guides/basic-features/routes/_meta.json +1 -0
- package/docs/guides/basic-features/routes/config-routes.mdx +427 -0
- package/docs/guides/basic-features/routes/routes.mdx +532 -0
- package/docs/guides/basic-features/static-assets/_meta.json +1 -0
- package/docs/guides/basic-features/static-assets/json-files.mdx +124 -0
- package/docs/guides/basic-features/static-assets/svg-assets.mdx +172 -0
- package/docs/guides/basic-features/static-assets/wasm-assets.mdx +66 -0
- package/docs/guides/basic-features/static-assets.mdx +164 -0
- package/docs/guides/basic-features/testing/_meta.json +1 -0
- package/docs/guides/basic-features/testing/playwright.mdx +111 -0
- package/docs/guides/basic-features/testing/rstest.mdx +192 -0
- package/docs/guides/concept/_meta.json +1 -0
- package/docs/guides/concept/builder.mdx +60 -0
- package/docs/guides/concept/entries.mdx +325 -0
- package/docs/guides/concept/server.mdx +35 -0
- package/docs/guides/get-started/_meta.json +9 -0
- package/docs/guides/get-started/ai-coding-agents.mdx +63 -0
- package/docs/guides/get-started/glossary.mdx +63 -0
- package/docs/guides/get-started/introduction.mdx +45 -0
- package/docs/guides/get-started/quick-start.mdx +92 -0
- package/docs/guides/get-started/tech-stack.mdx +97 -0
- package/docs/guides/get-started/ultramodern.mdx +433 -0
- package/docs/guides/get-started/upgrade.mdx +114 -0
- package/docs/guides/topic-detail/_meta.json +8 -0
- package/docs/guides/topic-detail/module-federation/_meta.json +1 -0
- package/docs/guides/topic-detail/module-federation/application.mdx +116 -0
- package/docs/guides/topic-detail/module-federation/deploy.mdx +104 -0
- package/docs/guides/topic-detail/module-federation/i18n.mdx +670 -0
- package/docs/guides/topic-detail/module-federation/introduce.mdx +36 -0
- package/docs/guides/topic-detail/module-federation/ssr.mdx +177 -0
- package/docs/guides/topic-detail/module-federation/usage.mdx +202 -0
- package/docs/guides/troubleshooting/_meta.json +1 -0
- package/docs/guides/troubleshooting/builder.mdx +114 -0
- package/docs/guides/troubleshooting/cli.mdx +39 -0
- package/docs/guides/troubleshooting/dependencies.mdx +123 -0
- package/docs/guides/troubleshooting/hmr.mdx +148 -0
- package/docs/guides/upgrade/_meta.json +1 -0
- package/docs/guides/upgrade/config.mdx +951 -0
- package/docs/guides/upgrade/entry.mdx +463 -0
- package/docs/guides/upgrade/other.mdx +183 -0
- package/docs/guides/upgrade/overview.mdx +33 -0
- package/docs/guides/upgrade/tailwindcss.mdx +92 -0
- package/docs/guides/upgrade/web-server.md +109 -0
- package/docs/index.md +4 -0
- package/lib/types.d.ts +2 -3
- package/package.json +69 -31
- package/rslib.config.mts +11 -12
- package/scripts/copy-main-doc.mjs +50 -0
- package/dist/cjs/commands/runtime.js +0 -196
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +0 -540
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/cjs/ultramodern/designSystem.js +0 -123
- package/dist/esm/baseline.mjs +0 -4
- package/dist/esm/commands/runtime.mjs +0 -146
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +0 -492
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/esm/ultramodern/designSystem.mjs +0 -73
- package/dist/esm-node/baseline.mjs +0 -5
- package/dist/esm-node/commands/runtime.mjs +0 -147
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +0 -493
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/esm-node/ultramodern/designSystem.mjs +0 -74
- package/dist/types/baseline.d.ts +0 -16
- package/dist/types/commands/runtime.d.ts +0 -12
- package/dist/types/ultramodern/designSystem.d.ts +0 -54
- /package/dist/types/plugins/deploy/platforms/templates/{cloudflare-entry.d.mts → cloudflare-entry.006-fetch-handler.d.mts} +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
getBuildConfigEnvironment: ()=>getBuildConfigEnvironment,
|
|
32
|
+
resolveEffectTsgoCompiler: ()=>resolveEffectTsgoCompiler,
|
|
33
|
+
withBuildConfigEnvironment: ()=>withBuildConfigEnvironment
|
|
34
|
+
});
|
|
35
|
+
const external_node_child_process_namespaceObject = require("node:child_process");
|
|
36
|
+
const external_node_crypto_namespaceObject = require("node:crypto");
|
|
37
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
38
|
+
const external_node_module_namespaceObject = require("node:module");
|
|
39
|
+
const external_node_os_namespaceObject = require("node:os");
|
|
40
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
41
|
+
const EFFECT_TSGO_PACKAGE = '@effect/tsgo';
|
|
42
|
+
const EFFECT_TSGO_BIN = 'effect-tsgo';
|
|
43
|
+
const EFFECT_TSGO_RESOLUTION_ERROR = 'Unable to resolve the Effect TS-Go compiler. Install "@effect/tsgo" and a native TypeScript backend for this build config, or set EFFECT_TSGO_BIN.';
|
|
44
|
+
const executableEffectTsgoCompilers = new Map();
|
|
45
|
+
const BUILD_CONFIG_ENVIRONMENT_PLUGIN = 'ModernJsBuildConfigEnvironmentLeasePlugin';
|
|
46
|
+
const ENVIRONMENT_LEASE_REGISTRY_KEY = Symbol.for('@modern-js/app-tools/build-config-environment-lease-registry/v1');
|
|
47
|
+
const ENVIRONMENT_LEASE_REGISTRY_BRAND = Symbol.for('@modern-js/app-tools/build-config-environment-lease-registry-brand/v1');
|
|
48
|
+
const LIFECYCLE_HOOK_NAMES = [
|
|
49
|
+
'run',
|
|
50
|
+
'watchRun',
|
|
51
|
+
'afterDone',
|
|
52
|
+
'failed',
|
|
53
|
+
'shutdown',
|
|
54
|
+
'watchClose'
|
|
55
|
+
];
|
|
56
|
+
function restoreEnvironment(name, value) {
|
|
57
|
+
if (void 0 === value) delete process.env[name];
|
|
58
|
+
else process.env[name] = value;
|
|
59
|
+
}
|
|
60
|
+
function createEnvironmentLeaseRegistry() {
|
|
61
|
+
const environmentLeases = new Map();
|
|
62
|
+
return Object.freeze({
|
|
63
|
+
acquire (name, value) {
|
|
64
|
+
let lease = environmentLeases.get(name);
|
|
65
|
+
if (lease) {
|
|
66
|
+
if (lease.value !== value) throw new Error(`Build config environment "${name}" already has an active lease for a different value.`);
|
|
67
|
+
if (process.env[name] !== lease.value) throw new Error(`Build config environment lease for "${name}" lost ownership before another lease was acquired.`);
|
|
68
|
+
} else {
|
|
69
|
+
lease = {
|
|
70
|
+
originalValue: process.env[name],
|
|
71
|
+
owners: new Set(),
|
|
72
|
+
value
|
|
73
|
+
};
|
|
74
|
+
process.env[name] = value;
|
|
75
|
+
environmentLeases.set(name, lease);
|
|
76
|
+
}
|
|
77
|
+
const owner = Symbol(name);
|
|
78
|
+
lease.owners.add(owner);
|
|
79
|
+
let released = false;
|
|
80
|
+
return ()=>{
|
|
81
|
+
if (released) return;
|
|
82
|
+
if (environmentLeases.get(name) !== lease || !lease.owners.has(owner)) throw new Error(`Build config environment lease for "${name}" cannot be restored because its ownership record was lost.`);
|
|
83
|
+
released = true;
|
|
84
|
+
const lostOwnership = process.env[name] !== lease.value;
|
|
85
|
+
lease.owners.delete(owner);
|
|
86
|
+
if (0 === lease.owners.size) {
|
|
87
|
+
environmentLeases.delete(name);
|
|
88
|
+
restoreEnvironment(name, lease.originalValue);
|
|
89
|
+
} else if (lostOwnership) process.env[name] = lease.value;
|
|
90
|
+
if (lostOwnership) throw new Error(`Build config environment lease for "${name}" lost ownership before restoration.`);
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
brand: ENVIRONMENT_LEASE_REGISTRY_BRAND
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function getEnvironmentLeaseRegistry() {
|
|
97
|
+
const descriptor = Object.getOwnPropertyDescriptor(process, ENVIRONMENT_LEASE_REGISTRY_KEY);
|
|
98
|
+
if (descriptor) {
|
|
99
|
+
const registry = descriptor.value;
|
|
100
|
+
if (descriptor.configurable || descriptor.enumerable || descriptor.writable || registry?.brand !== ENVIRONMENT_LEASE_REGISTRY_BRAND || 'function' != typeof registry.acquire) throw new Error('The process-global build config environment lease registry is occupied by an incompatible value.');
|
|
101
|
+
return registry;
|
|
102
|
+
}
|
|
103
|
+
const registry = createEnvironmentLeaseRegistry();
|
|
104
|
+
Object.defineProperty(process, ENVIRONMENT_LEASE_REGISTRY_KEY, {
|
|
105
|
+
configurable: false,
|
|
106
|
+
enumerable: false,
|
|
107
|
+
value: registry,
|
|
108
|
+
writable: false
|
|
109
|
+
});
|
|
110
|
+
return registry;
|
|
111
|
+
}
|
|
112
|
+
function acquireEnvironmentLease(name, value) {
|
|
113
|
+
return getEnvironmentLeaseRegistry().acquire(name, value);
|
|
114
|
+
}
|
|
115
|
+
function releaseAfterFailure(release, originalError) {
|
|
116
|
+
try {
|
|
117
|
+
release();
|
|
118
|
+
} catch (restorationError) {
|
|
119
|
+
throw new AggregateError([
|
|
120
|
+
originalError,
|
|
121
|
+
restorationError
|
|
122
|
+
], 'Build config environment setup and restoration both failed.');
|
|
123
|
+
}
|
|
124
|
+
throw originalError;
|
|
125
|
+
}
|
|
126
|
+
class BuildConfigEnvironmentLeasePlugin {
|
|
127
|
+
apply(compiler) {
|
|
128
|
+
const hooks = compiler.hooks;
|
|
129
|
+
try {
|
|
130
|
+
const lifecycleHooks = {};
|
|
131
|
+
for (const hookName of LIFECYCLE_HOOK_NAMES){
|
|
132
|
+
const hook = hooks[hookName];
|
|
133
|
+
if (!hook || 'function' != typeof hook.tap) throw new Error(`Rspack does not expose the "${hookName}" lifecycle hook required to restore build config environment leases.`);
|
|
134
|
+
lifecycleHooks[hookName] = hook;
|
|
135
|
+
}
|
|
136
|
+
let mode = 'pending';
|
|
137
|
+
const modeTap = {
|
|
138
|
+
name: BUILD_CONFIG_ENVIRONMENT_PLUGIN,
|
|
139
|
+
stage: Number.MIN_SAFE_INTEGER
|
|
140
|
+
};
|
|
141
|
+
const releaseTap = {
|
|
142
|
+
name: BUILD_CONFIG_ENVIRONMENT_PLUGIN,
|
|
143
|
+
stage: Number.MAX_SAFE_INTEGER
|
|
144
|
+
};
|
|
145
|
+
const releaseAfterOneShot = ()=>{
|
|
146
|
+
if ('watch' !== mode && true !== compiler.watchMode) this.release();
|
|
147
|
+
};
|
|
148
|
+
lifecycleHooks.run.tap(modeTap, ()=>{
|
|
149
|
+
mode = 'run';
|
|
150
|
+
});
|
|
151
|
+
lifecycleHooks.watchRun.tap(modeTap, ()=>{
|
|
152
|
+
mode = 'watch';
|
|
153
|
+
});
|
|
154
|
+
lifecycleHooks.afterDone.tap(releaseTap, releaseAfterOneShot);
|
|
155
|
+
lifecycleHooks.failed.tap(releaseTap, releaseAfterOneShot);
|
|
156
|
+
lifecycleHooks.shutdown.tap(releaseTap, this.release);
|
|
157
|
+
lifecycleHooks.watchClose.tap(releaseTap, this.release);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
releaseAfterFailure(this.release, error);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
constructor(release){
|
|
163
|
+
this.release = release;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function resolveEffectTsgoCli(from) {
|
|
167
|
+
const projectRequire = (0, external_node_module_namespaceObject.createRequire)(from);
|
|
168
|
+
const packageJsonPath = projectRequire.resolve(`${EFFECT_TSGO_PACKAGE}/package.json`);
|
|
169
|
+
const packageJson = JSON.parse((0, external_node_fs_namespaceObject.readFileSync)(packageJsonPath, 'utf-8'));
|
|
170
|
+
const bin = 'string' == typeof packageJson.bin ? packageJson.bin : packageJson.bin?.[EFFECT_TSGO_BIN];
|
|
171
|
+
if (!bin) throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
172
|
+
return (0, external_node_path_namespaceObject.resolve)((0, external_node_path_namespaceObject.dirname)(packageJsonPath), bin);
|
|
173
|
+
}
|
|
174
|
+
function resolveExecutableEffectTsgoCompiler(compilerPath) {
|
|
175
|
+
if ('win32' === process.platform) return compilerPath;
|
|
176
|
+
const sourcePath = (0, external_node_fs_namespaceObject.realpathSync)(compilerPath);
|
|
177
|
+
const source = (0, external_node_fs_namespaceObject.lstatSync)(sourcePath);
|
|
178
|
+
if (!source.isFile()) throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
179
|
+
try {
|
|
180
|
+
(0, external_node_fs_namespaceObject.accessSync)(sourcePath, external_node_fs_namespaceObject.constants.X_OK);
|
|
181
|
+
return compilerPath;
|
|
182
|
+
} catch {}
|
|
183
|
+
const cachedCompiler = executableEffectTsgoCompilers.get(sourcePath);
|
|
184
|
+
if (cachedCompiler) try {
|
|
185
|
+
(0, external_node_fs_namespaceObject.accessSync)(cachedCompiler, external_node_fs_namespaceObject.constants.X_OK);
|
|
186
|
+
return cachedCompiler;
|
|
187
|
+
} catch {
|
|
188
|
+
executableEffectTsgoCompilers.delete(sourcePath);
|
|
189
|
+
}
|
|
190
|
+
const compilerBytes = (0, external_node_fs_namespaceObject.readFileSync)(sourcePath);
|
|
191
|
+
const compilerDigest = (0, external_node_crypto_namespaceObject.createHash)('sha256').update(compilerBytes).digest('hex');
|
|
192
|
+
const compilerDirectory = (0, external_node_path_namespaceObject.join)((0, external_node_os_namespaceObject.tmpdir)(), 'modern-js', 'effect-tsgo', compilerDigest);
|
|
193
|
+
(0, external_node_fs_namespaceObject.mkdirSync)(compilerDirectory, {
|
|
194
|
+
recursive: true,
|
|
195
|
+
mode: 448
|
|
196
|
+
});
|
|
197
|
+
const executableCompiler = (0, external_node_path_namespaceObject.join)(compilerDirectory, (0, external_node_path_namespaceObject.basename)(sourcePath));
|
|
198
|
+
try {
|
|
199
|
+
(0, external_node_fs_namespaceObject.accessSync)(executableCompiler, external_node_fs_namespaceObject.constants.X_OK);
|
|
200
|
+
} catch {
|
|
201
|
+
const temporaryCompiler = (0, external_node_path_namespaceObject.join)(compilerDirectory, `.${(0, external_node_path_namespaceObject.basename)(sourcePath)}.${process.pid}.tmp`);
|
|
202
|
+
(0, external_node_fs_namespaceObject.rmSync)(temporaryCompiler, {
|
|
203
|
+
force: true
|
|
204
|
+
});
|
|
205
|
+
try {
|
|
206
|
+
(0, external_node_fs_namespaceObject.writeFileSync)(temporaryCompiler, compilerBytes, {
|
|
207
|
+
flag: 'wx',
|
|
208
|
+
mode: 448
|
|
209
|
+
});
|
|
210
|
+
(0, external_node_fs_namespaceObject.chmodSync)(temporaryCompiler, 448);
|
|
211
|
+
(0, external_node_fs_namespaceObject.renameSync)(temporaryCompiler, executableCompiler);
|
|
212
|
+
} finally{
|
|
213
|
+
(0, external_node_fs_namespaceObject.rmSync)(temporaryCompiler, {
|
|
214
|
+
force: true
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
(0, external_node_fs_namespaceObject.accessSync)(executableCompiler, external_node_fs_namespaceObject.constants.X_OK);
|
|
219
|
+
executableEffectTsgoCompilers.set(sourcePath, executableCompiler);
|
|
220
|
+
return executableCompiler;
|
|
221
|
+
}
|
|
222
|
+
function getBuildConfigEnvironment(name) {
|
|
223
|
+
return process.env[name];
|
|
224
|
+
}
|
|
225
|
+
function withBuildConfigEnvironment(name, value, setup) {
|
|
226
|
+
return async (config, ...args)=>{
|
|
227
|
+
const release = acquireEnvironmentLease(name, value);
|
|
228
|
+
try {
|
|
229
|
+
const configured = await setup(config, ...args) ?? config;
|
|
230
|
+
configured.plugins = [
|
|
231
|
+
...configured.plugins ?? [],
|
|
232
|
+
new BuildConfigEnvironmentLeasePlugin(release)
|
|
233
|
+
];
|
|
234
|
+
return configured;
|
|
235
|
+
} catch (error) {
|
|
236
|
+
releaseAfterFailure(release, error);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function resolveEffectTsgoCompiler(options) {
|
|
241
|
+
const configuredCompiler = getBuildConfigEnvironment('EFFECT_TSGO_BIN')?.trim();
|
|
242
|
+
if (configuredCompiler) try {
|
|
243
|
+
return resolveExecutableEffectTsgoCompiler(configuredCompiler);
|
|
244
|
+
} catch {
|
|
245
|
+
throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
const compiler = (0, external_node_child_process_namespaceObject.execFileSync)(process.execPath, [
|
|
249
|
+
resolveEffectTsgoCli(options.from),
|
|
250
|
+
'get-exe-path'
|
|
251
|
+
], {
|
|
252
|
+
encoding: 'utf-8'
|
|
253
|
+
}).trim();
|
|
254
|
+
if (compiler) return resolveExecutableEffectTsgoCompiler(compiler);
|
|
255
|
+
} catch {}
|
|
256
|
+
throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
257
|
+
}
|
|
258
|
+
exports.getBuildConfigEnvironment = __webpack_exports__.getBuildConfigEnvironment;
|
|
259
|
+
exports.resolveEffectTsgoCompiler = __webpack_exports__.resolveEffectTsgoCompiler;
|
|
260
|
+
exports.withBuildConfigEnvironment = __webpack_exports__.withBuildConfigEnvironment;
|
|
261
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
262
|
+
"getBuildConfigEnvironment",
|
|
263
|
+
"resolveEffectTsgoCompiler",
|
|
264
|
+
"withBuildConfigEnvironment"
|
|
265
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
266
|
+
Object.defineProperty(exports, '__esModule', {
|
|
267
|
+
value: true
|
|
268
|
+
});
|
|
@@ -31,10 +31,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
createDefaultConfig: ()=>createDefaultConfig,
|
|
32
32
|
isLazyCompilationSafeByDefault: ()=>isLazyCompilationSafeByDefault
|
|
33
33
|
});
|
|
34
|
+
const server_core_namespaceObject = require("@modern-js/server-core");
|
|
34
35
|
const utils_namespaceObject = require("@modern-js/utils");
|
|
35
36
|
const env_js_namespaceObject = require("../utils/env.js");
|
|
36
37
|
function createDefaultConfig(appContext) {
|
|
37
38
|
const dev = {
|
|
39
|
+
mockDir: `./${server_core_namespaceObject.AGGRED_DIR.mock}`,
|
|
38
40
|
cliShortcuts: {
|
|
39
41
|
help: false,
|
|
40
42
|
custom: (shortcuts = [])=>shortcuts.filter(({ key })=>'r' !== key && 'u' !== key && 'o' !== key)
|
package/dist/cjs/config/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
+
"./build-environment" (module) {
|
|
4
|
+
module.exports = require("./build-environment.js");
|
|
5
|
+
},
|
|
3
6
|
"./default" (module) {
|
|
4
7
|
module.exports = require("./default.js");
|
|
5
8
|
},
|
|
@@ -54,13 +57,17 @@ function __webpack_require__(moduleId) {
|
|
|
54
57
|
var __webpack_exports__ = {};
|
|
55
58
|
(()=>{
|
|
56
59
|
__webpack_require__.r(__webpack_exports__);
|
|
57
|
-
var
|
|
60
|
+
var _build_environment__rspack_import_0 = __webpack_require__("./build-environment");
|
|
61
|
+
var __rspack_reexport = {};
|
|
62
|
+
for(const __rspack_import_key in _build_environment__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_build_environment__rspack_import_0[__rspack_import_key];
|
|
63
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
64
|
+
var _default__rspack_import_1 = __webpack_require__("./default");
|
|
58
65
|
var __rspack_reexport = {};
|
|
59
|
-
for(const __rspack_import_key in
|
|
66
|
+
for(const __rspack_import_key in _default__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_default__rspack_import_1[__rspack_import_key];
|
|
60
67
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
61
|
-
var
|
|
68
|
+
var _initialize__rspack_import_2 = __webpack_require__("./initialize");
|
|
62
69
|
var __rspack_reexport = {};
|
|
63
|
-
for(const __rspack_import_key in
|
|
70
|
+
for(const __rspack_import_key in _initialize__rspack_import_2)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_initialize__rspack_import_2[__rspack_import_key];
|
|
64
71
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
65
72
|
})();
|
|
66
73
|
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
getBuildConfigEnvironment: ()=>external_build_environment_js_namespaceObject.getBuildConfigEnvironment,
|
|
32
|
+
resolveEffectTsgoCompiler: ()=>external_build_environment_js_namespaceObject.resolveEffectTsgoCompiler,
|
|
33
|
+
withBuildConfigEnvironment: ()=>external_build_environment_js_namespaceObject.withBuildConfigEnvironment
|
|
34
|
+
});
|
|
35
|
+
const external_build_environment_js_namespaceObject = require("./build-environment.js");
|
|
36
|
+
exports.getBuildConfigEnvironment = __webpack_exports__.getBuildConfigEnvironment;
|
|
37
|
+
exports.resolveEffectTsgoCompiler = __webpack_exports__.resolveEffectTsgoCompiler;
|
|
38
|
+
exports.withBuildConfigEnvironment = __webpack_exports__.withBuildConfigEnvironment;
|
|
39
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
40
|
+
"getBuildConfigEnvironment",
|
|
41
|
+
"resolveEffectTsgoCompiler",
|
|
42
|
+
"withBuildConfigEnvironment"
|
|
43
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
|
45
|
+
value: true
|
|
46
|
+
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"./
|
|
4
|
-
module.exports = require("./
|
|
3
|
+
"./commands/build" (module) {
|
|
4
|
+
module.exports = require("./commands/build.js");
|
|
5
|
+
},
|
|
6
|
+
"./commands/deploy" (module) {
|
|
7
|
+
module.exports = require("./commands/deploy.js");
|
|
5
8
|
},
|
|
6
9
|
"./commands/dev" (module) {
|
|
7
10
|
module.exports = require("./commands/dev.js");
|
|
@@ -27,6 +30,9 @@ var __webpack_modules__ = {
|
|
|
27
30
|
"./plugins/analyze" (module) {
|
|
28
31
|
module.exports = require("./plugins/analyze/index.js");
|
|
29
32
|
},
|
|
33
|
+
"./plugins/backendFederationBuild" (module) {
|
|
34
|
+
module.exports = require("./plugins/backendFederationBuild.js");
|
|
35
|
+
},
|
|
30
36
|
"./plugins/deploy" (module) {
|
|
31
37
|
module.exports = require("./plugins/deploy/index.js");
|
|
32
38
|
},
|
|
@@ -39,6 +45,9 @@ var __webpack_modules__ = {
|
|
|
39
45
|
"./plugins/serverRuntime" (module) {
|
|
40
46
|
module.exports = require("./plugins/serverRuntime.js");
|
|
41
47
|
},
|
|
48
|
+
"./plugins/ultramodernReleaseEnvelope" (module) {
|
|
49
|
+
module.exports = require("./plugins/ultramodernReleaseEnvelope.js");
|
|
50
|
+
},
|
|
42
51
|
"./presetUltramodern" (module) {
|
|
43
52
|
module.exports = require("./presetUltramodern.js");
|
|
44
53
|
},
|
|
@@ -48,8 +57,8 @@ var __webpack_modules__ = {
|
|
|
48
57
|
"./types?6efa" (module) {
|
|
49
58
|
module.exports = require("./types/index.js");
|
|
50
59
|
},
|
|
51
|
-
"./
|
|
52
|
-
module.exports = require("./
|
|
60
|
+
"./utils/createServer" (module) {
|
|
61
|
+
module.exports = require("./utils/createServer.js");
|
|
53
62
|
},
|
|
54
63
|
"./utils/generateWatchFiles" (module) {
|
|
55
64
|
module.exports = require("./utils/generateWatchFiles.js");
|
|
@@ -138,48 +147,24 @@ var __webpack_exports__ = {};
|
|
|
138
147
|
var _locale__rspack_import_8 = __webpack_require__("./locale");
|
|
139
148
|
var _plugins_analyze__rspack_import_9 = __webpack_require__("./plugins/analyze");
|
|
140
149
|
var _plugins_analyze__rspack_import_9_default = /*#__PURE__*/ __webpack_require__.n(_plugins_analyze__rspack_import_9);
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
var
|
|
147
|
-
var
|
|
148
|
-
var
|
|
149
|
-
var
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"mergeConfig",
|
|
158
|
-
"appTools",
|
|
159
|
-
"default",
|
|
160
|
-
"serve",
|
|
161
|
-
"generateWatchFiles",
|
|
162
|
-
"initAppContext",
|
|
163
|
-
"defineConfig"
|
|
164
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_baseline__rspack_import_17[__rspack_import_key];
|
|
165
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
166
|
-
var _defineConfig__rspack_import_18 = __webpack_require__("./defineConfig");
|
|
167
|
-
var __rspack_reexport = {};
|
|
168
|
-
for(const __rspack_import_key in _defineConfig__rspack_import_18)if ([
|
|
169
|
-
"dev",
|
|
170
|
-
"resolveModernRsbuildConfig",
|
|
171
|
-
"mergeConfig",
|
|
172
|
-
"appTools",
|
|
173
|
-
"default",
|
|
174
|
-
"serve",
|
|
175
|
-
"generateWatchFiles",
|
|
176
|
-
"initAppContext",
|
|
177
|
-
"defineConfig"
|
|
178
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_18[__rspack_import_key];
|
|
179
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
180
|
-
var _presetUltramodern__rspack_import_19 = __webpack_require__("./presetUltramodern");
|
|
150
|
+
var _plugins_backendFederationBuild__rspack_import_10 = __webpack_require__("./plugins/backendFederationBuild");
|
|
151
|
+
var _plugins_backendFederationBuild__rspack_import_10_default = /*#__PURE__*/ __webpack_require__.n(_plugins_backendFederationBuild__rspack_import_10);
|
|
152
|
+
var _plugins_deploy__rspack_import_11 = __webpack_require__("./plugins/deploy");
|
|
153
|
+
var _plugins_deploy__rspack_import_11_default = /*#__PURE__*/ __webpack_require__.n(_plugins_deploy__rspack_import_11);
|
|
154
|
+
var _plugins_initialize__rspack_import_12 = __webpack_require__("./plugins/initialize");
|
|
155
|
+
var _plugins_initialize__rspack_import_12_default = /*#__PURE__*/ __webpack_require__.n(_plugins_initialize__rspack_import_12);
|
|
156
|
+
var _plugins_serverBuild__rspack_import_13 = __webpack_require__("./plugins/serverBuild");
|
|
157
|
+
var _plugins_serverBuild__rspack_import_13_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverBuild__rspack_import_13);
|
|
158
|
+
var _plugins_serverRuntime__rspack_import_14 = __webpack_require__("./plugins/serverRuntime");
|
|
159
|
+
var _plugins_serverRuntime__rspack_import_14_default = /*#__PURE__*/ __webpack_require__.n(_plugins_serverRuntime__rspack_import_14);
|
|
160
|
+
var _plugins_ultramodernReleaseEnvelope__rspack_import_15 = __webpack_require__("./plugins/ultramodernReleaseEnvelope");
|
|
161
|
+
var _plugins_ultramodernReleaseEnvelope__rspack_import_15_default = /*#__PURE__*/ __webpack_require__.n(_plugins_ultramodernReleaseEnvelope__rspack_import_15);
|
|
162
|
+
var _utils_generateWatchFiles__rspack_import_16 = __webpack_require__("./utils/generateWatchFiles");
|
|
163
|
+
var _utils_initAppContext__rspack_import_17 = __webpack_require__("./utils/initAppContext");
|
|
164
|
+
var _utils_restart__rspack_import_18 = __webpack_require__("./utils/restart");
|
|
165
|
+
var _defineConfig__rspack_import_19 = __webpack_require__("./defineConfig");
|
|
181
166
|
var __rspack_reexport = {};
|
|
182
|
-
for(const __rspack_import_key in
|
|
167
|
+
for(const __rspack_import_key in _defineConfig__rspack_import_19)if ([
|
|
183
168
|
"dev",
|
|
184
169
|
"resolveModernRsbuildConfig",
|
|
185
170
|
"mergeConfig",
|
|
@@ -188,12 +173,15 @@ var __webpack_exports__ = {};
|
|
|
188
173
|
"serve",
|
|
189
174
|
"generateWatchFiles",
|
|
190
175
|
"initAppContext",
|
|
191
|
-
"
|
|
192
|
-
|
|
176
|
+
"deploy",
|
|
177
|
+
"defineConfig",
|
|
178
|
+
"build",
|
|
179
|
+
"closeServer"
|
|
180
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_19[__rspack_import_key];
|
|
193
181
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
194
|
-
var
|
|
182
|
+
var _presetUltramodern__rspack_import_20 = __webpack_require__("./presetUltramodern");
|
|
195
183
|
var __rspack_reexport = {};
|
|
196
|
-
for(const __rspack_import_key in
|
|
184
|
+
for(const __rspack_import_key in _presetUltramodern__rspack_import_20)if ([
|
|
197
185
|
"dev",
|
|
198
186
|
"resolveModernRsbuildConfig",
|
|
199
187
|
"mergeConfig",
|
|
@@ -202,15 +190,20 @@ var __webpack_exports__ = {};
|
|
|
202
190
|
"serve",
|
|
203
191
|
"generateWatchFiles",
|
|
204
192
|
"initAppContext",
|
|
205
|
-
"
|
|
206
|
-
|
|
193
|
+
"deploy",
|
|
194
|
+
"defineConfig",
|
|
195
|
+
"build",
|
|
196
|
+
"closeServer"
|
|
197
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_presetUltramodern__rspack_import_20[__rspack_import_key];
|
|
207
198
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
208
|
-
var
|
|
209
|
-
var
|
|
210
|
-
var
|
|
211
|
-
var
|
|
199
|
+
var _commands_build__rspack_import_21 = __webpack_require__("./commands/build");
|
|
200
|
+
var _commands_deploy__rspack_import_22 = __webpack_require__("./commands/deploy");
|
|
201
|
+
var _commands_dev__rspack_import_23 = __webpack_require__("./commands/dev");
|
|
202
|
+
var _commands_serve__rspack_import_24 = __webpack_require__("./commands/serve");
|
|
203
|
+
var _rsbuild__rspack_import_25 = __webpack_require__("./rsbuild");
|
|
204
|
+
var _types__rspack_import_26 = __webpack_require__("./types?6efa");
|
|
212
205
|
var __rspack_reexport = {};
|
|
213
|
-
for(const __rspack_import_key in
|
|
206
|
+
for(const __rspack_import_key in _types__rspack_import_26)if ([
|
|
214
207
|
"dev",
|
|
215
208
|
"resolveModernRsbuildConfig",
|
|
216
209
|
"mergeConfig",
|
|
@@ -219,19 +212,25 @@ var __webpack_exports__ = {};
|
|
|
219
212
|
"serve",
|
|
220
213
|
"generateWatchFiles",
|
|
221
214
|
"initAppContext",
|
|
222
|
-
"
|
|
223
|
-
|
|
215
|
+
"deploy",
|
|
216
|
+
"defineConfig",
|
|
217
|
+
"build",
|
|
218
|
+
"closeServer"
|
|
219
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_26[__rspack_import_key];
|
|
224
220
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
225
|
-
var
|
|
221
|
+
var _utils_createServer__rspack_import_27 = __webpack_require__("./utils/createServer");
|
|
222
|
+
var _modern_js_plugin_cli__rspack_import_28 = __webpack_require__("@modern-js/plugin/cli");
|
|
226
223
|
const appTools = ()=>({
|
|
227
224
|
name: '@modern-js/app-tools',
|
|
228
225
|
usePlugins: [
|
|
229
|
-
|
|
226
|
+
_plugins_serverRuntime__rspack_import_14_default()(),
|
|
230
227
|
(0, _compat__rspack_import_6.compatPlugin)(),
|
|
231
|
-
|
|
228
|
+
_plugins_initialize__rspack_import_12_default()(),
|
|
232
229
|
_plugins_analyze__rspack_import_9_default()(),
|
|
233
|
-
|
|
234
|
-
|
|
230
|
+
_plugins_serverBuild__rspack_import_13_default()(),
|
|
231
|
+
_plugins_backendFederationBuild__rspack_import_10_default()(),
|
|
232
|
+
_plugins_ultramodernReleaseEnvelope__rspack_import_15_default()(),
|
|
233
|
+
_plugins_deploy__rspack_import_11_default()()
|
|
235
234
|
],
|
|
236
235
|
post: [
|
|
237
236
|
'@modern-js/plugin-initialize',
|
|
@@ -259,7 +258,7 @@ var __webpack_exports__ = {};
|
|
|
259
258
|
_locale__rspack_import_8.i18n.changeLanguage({
|
|
260
259
|
locale
|
|
261
260
|
});
|
|
262
|
-
api.updateAppContext((0,
|
|
261
|
+
api.updateAppContext((0, _utils_initAppContext__rspack_import_17.initAppContext)({
|
|
263
262
|
metaName: context.metaName,
|
|
264
263
|
appDirectory: context.appDirectory,
|
|
265
264
|
runtimeConfigFile: _constants__rspack_import_7.DEFAULT_RUNTIME_CONFIG_FILE,
|
|
@@ -275,7 +274,6 @@ var __webpack_exports__ = {};
|
|
|
275
274
|
(0, _commands__rspack_import_5.deployCommand)(program, api);
|
|
276
275
|
(0, _commands__rspack_import_5.inspectCommand)(program, api);
|
|
277
276
|
(0, _commands__rspack_import_5.infoCommand)(program, api);
|
|
278
|
-
await (0, _commands__rspack_import_5.runtimeCommand)(program, api);
|
|
279
277
|
(0, _modern_js_utils__rspack_import_3.deprecatedCommands)(program);
|
|
280
278
|
});
|
|
281
279
|
api.onPrepare(async ()=>{
|
|
@@ -287,7 +285,18 @@ var __webpack_exports__ = {};
|
|
|
287
285
|
].some((tag)=>(0, _modern_js_utils__rspack_import_3.getArgv)().includes(tag));
|
|
288
286
|
if (isSkipBuild) return;
|
|
289
287
|
}
|
|
290
|
-
|
|
288
|
+
const { command: contextCommand } = api.getAppContext();
|
|
289
|
+
const shouldClean = [
|
|
290
|
+
'dev',
|
|
291
|
+
'start',
|
|
292
|
+
'build',
|
|
293
|
+
'deploy'
|
|
294
|
+
].includes(command) || [
|
|
295
|
+
'dev',
|
|
296
|
+
'start',
|
|
297
|
+
'build'
|
|
298
|
+
].includes(contextCommand);
|
|
299
|
+
if (shouldClean) {
|
|
291
300
|
const resolvedConfig = api.getNormalizedConfig();
|
|
292
301
|
if (resolvedConfig.output.cleanDistPath) {
|
|
293
302
|
const appContext = api.getAppContext();
|
|
@@ -298,7 +307,7 @@ var __webpack_exports__ = {};
|
|
|
298
307
|
api.addWatchFiles(async ()=>{
|
|
299
308
|
const appContext = api.getAppContext();
|
|
300
309
|
const config = api.getNormalizedConfig();
|
|
301
|
-
const files = await (0,
|
|
310
|
+
const files = await (0, _utils_generateWatchFiles__rspack_import_16.generateWatchFiles)(appContext, config.source.configDir);
|
|
302
311
|
const watchFiles = (0, _modern_js_builder__rspack_import_0.castArray)(config.dev.watchFiles);
|
|
303
312
|
watchFiles.forEach(({ type, paths })=>{
|
|
304
313
|
if ('reload-server' === type) files.push(...Array.isArray(paths) ? paths : [
|
|
@@ -315,7 +324,7 @@ var __webpack_exports__ = {};
|
|
|
315
324
|
if (!isPrivate && ('change' === eventType || 'unlink' === eventType) && !isApiProject) {
|
|
316
325
|
const { closeServer } = await import("./utils/createServer.js");
|
|
317
326
|
await closeServer();
|
|
318
|
-
await (0,
|
|
327
|
+
await (0, _utils_restart__rspack_import_18.restart)(api.getHooks(), filename);
|
|
319
328
|
}
|
|
320
329
|
});
|
|
321
330
|
api.onBeforeRestart(()=>{
|
|
@@ -327,21 +336,27 @@ var __webpack_exports__ = {};
|
|
|
327
336
|
});
|
|
328
337
|
const __rspack_default_export = appTools;
|
|
329
338
|
__webpack_require__.d(__webpack_exports__, {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
339
|
+
build: ()=>_commands_build__rspack_import_21.build,
|
|
340
|
+
closeServer: ()=>_utils_createServer__rspack_import_27.closeServer,
|
|
341
|
+
defineConfig: ()=>_defineConfig__rspack_import_19.defineConfig,
|
|
342
|
+
deploy: ()=>_commands_deploy__rspack_import_22.deploy,
|
|
343
|
+
dev: ()=>_commands_dev__rspack_import_23.dev,
|
|
344
|
+
generateWatchFiles: ()=>_utils_generateWatchFiles__rspack_import_16.generateWatchFiles,
|
|
345
|
+
initAppContext: ()=>_utils_initAppContext__rspack_import_17.initAppContext,
|
|
346
|
+
mergeConfig: ()=>_modern_js_plugin_cli__rspack_import_28.mergeConfig,
|
|
347
|
+
resolveModernRsbuildConfig: ()=>_rsbuild__rspack_import_25.resolveModernRsbuildConfig,
|
|
348
|
+
serve: ()=>_commands_serve__rspack_import_24.serve
|
|
337
349
|
}, {
|
|
338
350
|
appTools: appTools,
|
|
339
351
|
default: __rspack_default_export
|
|
340
352
|
});
|
|
341
353
|
})();
|
|
342
354
|
exports.appTools = __webpack_exports__.appTools;
|
|
355
|
+
exports.build = __webpack_exports__.build;
|
|
356
|
+
exports.closeServer = __webpack_exports__.closeServer;
|
|
343
357
|
exports["default"] = __webpack_exports__["default"];
|
|
344
358
|
exports.defineConfig = __webpack_exports__.defineConfig;
|
|
359
|
+
exports.deploy = __webpack_exports__.deploy;
|
|
345
360
|
exports.dev = __webpack_exports__.dev;
|
|
346
361
|
exports.generateWatchFiles = __webpack_exports__.generateWatchFiles;
|
|
347
362
|
exports.initAppContext = __webpack_exports__.initAppContext;
|
|
@@ -350,8 +365,11 @@ exports.resolveModernRsbuildConfig = __webpack_exports__.resolveModernRsbuildCon
|
|
|
350
365
|
exports.serve = __webpack_exports__.serve;
|
|
351
366
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
352
367
|
"appTools",
|
|
368
|
+
"build",
|
|
369
|
+
"closeServer",
|
|
353
370
|
"default",
|
|
354
371
|
"defineConfig",
|
|
372
|
+
"deploy",
|
|
355
373
|
"dev",
|
|
356
374
|
"generateWatchFiles",
|
|
357
375
|
"initAppContext",
|