@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.98 → 3.8.1-ultramodern.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/modern-bundle-docs.js +7 -0
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +5 -1
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +80 -11
- package/dist/cjs/bundleDocs.js +114 -0
- package/dist/cjs/commands/build.js +2 -1
- package/dist/cjs/commands/deploy.js +4 -2
- package/dist/cjs/commands/index.js +0 -4
- package/dist/cjs/config/default.js +2 -0
- package/dist/cjs/index.js +56 -15
- package/dist/cjs/plugins/analyze/index.js +2 -2
- package/dist/cjs/plugins/analyze/utils.js +3 -2
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +1 -1
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +94 -18
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/cjs/plugins/initialize/index.js +4 -3
- package/dist/cjs/plugins/serverBuild.js +3 -2
- package/dist/cjs/ultramodern-release-envelope/framework-output.js +109 -57
- package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +70 -10
- package/dist/esm/bundleDocs.mjs +62 -0
- package/dist/esm/commands/build.mjs +2 -1
- package/dist/esm/commands/deploy.mjs +4 -2
- package/dist/esm/commands/index.mjs +0 -4
- package/dist/esm/config/default.mjs +2 -0
- package/dist/esm/index.mjs +15 -1
- package/dist/esm/plugins/analyze/index.mjs +2 -2
- package/dist/esm/plugins/analyze/utils.mjs +3 -2
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +93 -18
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/esm/plugins/initialize/index.mjs +4 -3
- package/dist/esm/plugins/serverBuild.mjs +3 -2
- package/dist/esm/ultramodern-release-envelope/framework-output.mjs +107 -58
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +70 -10
- package/dist/esm-node/bundleDocs.mjs +63 -0
- 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 -4
- package/dist/esm-node/config/default.mjs +2 -0
- package/dist/esm-node/index.mjs +15 -1
- package/dist/esm-node/plugins/analyze/index.mjs +2 -2
- package/dist/esm-node/plugins/analyze/utils.mjs +3 -2
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +93 -18
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/esm-node/plugins/initialize/index.mjs +4 -3
- package/dist/esm-node/plugins/serverBuild.mjs +3 -2
- package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +107 -58
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +29 -0
- package/dist/types/bundleDocs.d.ts +20 -0
- package/dist/types/commands/deploy.d.ts +2 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +1 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +1 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.d.mts +13 -0
- package/dist/types/types/config/dev.d.ts +6 -0
- package/dist/types/ultramodern-release-envelope/framework-output.d.ts +1 -0
- package/docs/apis/app/commands.md +231 -0
- package/docs/apis/app/hooks/api/lambda.md +9 -0
- package/docs/apis/app/hooks/config/favicon.md +24 -0
- package/docs/apis/app/hooks/config/html.md +5 -0
- package/docs/apis/app/hooks/config/icon.md +24 -0
- package/docs/apis/app/hooks/config/mock.md +6 -0
- package/docs/apis/app/hooks/config/public.md +26 -0
- package/docs/apis/app/hooks/config/upload.md +50 -0
- package/docs/apis/app/hooks/modern-config.md +5 -0
- package/docs/apis/app/hooks/server/server.md +5 -0
- package/docs/apis/app/hooks/shared.md +3 -0
- package/docs/apis/app/hooks/src/app.md +30 -0
- package/docs/apis/app/hooks/src/entry.md +34 -0
- package/docs/apis/app/hooks/src/entry.server.md +51 -0
- package/docs/apis/app/hooks/src/modern.runtime.md +5 -0
- package/docs/apis/app/hooks/src/routes.md +86 -0
- package/docs/apis/app/hooks/src/server.md +3 -0
- package/docs/apis/app/runtime/bff/use-backend-context.md +27 -0
- package/docs/apis/app/runtime/core/create-root.md +19 -0
- package/docs/apis/app/runtime/core/render.md +39 -0
- package/docs/apis/app/runtime/core/runtime-context.md +156 -0
- package/docs/apis/app/runtime/router/router.md +283 -0
- package/docs/apis/app/runtime/ssr/no-ssr.md +35 -0
- package/docs/apis/app/runtime/ssr/renderStreaming.md +67 -0
- package/docs/apis/app/runtime/ssr/renderString.md +60 -0
- package/docs/apis/app/runtime/ssr/requestHandler.md +44 -0
- package/docs/apis/app/runtime/utility/css-in-js.md +40 -0
- package/docs/apis/app/runtime/utility/head.md +35 -0
- package/docs/apis/app/runtime/utility/loadable.md +82 -0
- package/docs/community/blog/2022-0708-updates.md +91 -0
- package/docs/community/blog/2022-0910-updates.md +76 -0
- package/docs/community/blog/overview.md +63 -0
- package/docs/community/blog/v2-release-note.md +238 -0
- package/docs/community/blog/v3-release-note.md +622 -0
- package/docs/community/contributing-guide.md +252 -0
- package/docs/community/releases.md +23 -0
- package/docs/community/showcase.md +24 -0
- package/docs/community/team.md +14 -0
- package/docs/configure/app/bff/cross-project.md +20 -0
- package/docs/configure/app/bff/effect.md +313 -0
- package/docs/configure/app/bff/prefix.md +29 -0
- package/docs/configure/app/bff/runtime-framework.md +26 -0
- package/docs/configure/app/builder-plugins.md +66 -0
- package/docs/configure/app/dev/asset-prefix.md +13 -0
- package/docs/configure/app/dev/before-start-url.md +17 -0
- package/docs/configure/app/dev/client.md +41 -0
- package/docs/configure/app/dev/hmr.md +10 -0
- package/docs/configure/app/dev/host.md +18 -0
- package/docs/configure/app/dev/https.md +77 -0
- package/docs/configure/app/dev/lazy-compilation.md +39 -0
- package/docs/configure/app/dev/live-reload.md +10 -0
- package/docs/configure/app/dev/mock-dir.md +31 -0
- package/docs/configure/app/dev/progress-bar.md +19 -0
- package/docs/configure/app/dev/server.md +124 -0
- package/docs/configure/app/dev/setup-middlewares.md +32 -0
- package/docs/configure/app/dev/start-url.md +48 -0
- package/docs/configure/app/dev/watch-files.md +27 -0
- package/docs/configure/app/dev/write-to-disk.md +10 -0
- package/docs/configure/app/experiments/source-build.md +31 -0
- package/docs/configure/app/html/app-icon.md +28 -0
- package/docs/configure/app/html/crossorigin.md +10 -0
- package/docs/configure/app/html/favicon.md +16 -0
- package/docs/configure/app/html/inject.md +10 -0
- package/docs/configure/app/html/meta.md +24 -0
- package/docs/configure/app/html/mount-id.md +10 -0
- package/docs/configure/app/html/output-structure.md +10 -0
- package/docs/configure/app/html/script-loading.md +10 -0
- package/docs/configure/app/html/tags.md +15 -0
- package/docs/configure/app/html/template-parameters.md +33 -0
- package/docs/configure/app/html/template.md +10 -0
- package/docs/configure/app/html/title.md +18 -0
- package/docs/configure/app/output/asset-prefix.md +11 -0
- package/docs/configure/app/output/assets-retry.md +77 -0
- package/docs/configure/app/output/charset.md +10 -0
- package/docs/configure/app/output/clean-dist-path.md +16 -0
- package/docs/configure/app/output/convert-to-rem.md +79 -0
- package/docs/configure/app/output/copy.md +10 -0
- package/docs/configure/app/output/css-modules.md +48 -0
- package/docs/configure/app/output/data-uri-limit.md +26 -0
- package/docs/configure/app/output/disable-css-module-extension.md +55 -0
- package/docs/configure/app/output/disable-inline-runtime-chunk.md +41 -0
- package/docs/configure/app/output/disable-svgr.md +18 -0
- package/docs/configure/app/output/disable-ts-checker.md +49 -0
- package/docs/configure/app/output/dist-path.md +43 -0
- package/docs/configure/app/output/enable-asset-manifest.md +36 -0
- package/docs/configure/app/output/enable-css-module-tsdeclaration.md +28 -0
- package/docs/configure/app/output/enable-inline-route-manifests.md +16 -0
- package/docs/configure/app/output/externals.md +20 -0
- package/docs/configure/app/output/filename-hash.md +10 -0
- package/docs/configure/app/output/filename.md +55 -0
- package/docs/configure/app/output/inject-styles.md +10 -0
- package/docs/configure/app/output/inline-scripts.md +29 -0
- package/docs/configure/app/output/inline-styles.md +29 -0
- package/docs/configure/app/output/legal-comments.md +18 -0
- package/docs/configure/app/output/minify.md +22 -0
- package/docs/configure/app/output/override-browserslist.md +22 -0
- package/docs/configure/app/output/polyfill.md +12 -0
- package/docs/configure/app/output/source-map.md +30 -0
- package/docs/configure/app/output/split-route-chunks.md +16 -0
- package/docs/configure/app/output/ssg.md +81 -0
- package/docs/configure/app/output/ssgByEntries.md +90 -0
- package/docs/configure/app/output/svg-default-export.md +30 -0
- package/docs/configure/app/output/temp-dir.md +20 -0
- package/docs/configure/app/performance/build-cache.md +44 -0
- package/docs/configure/app/performance/chunk-split.md +40 -0
- package/docs/configure/app/performance/dns-prefetch.md +15 -0
- package/docs/configure/app/performance/preconnect.md +16 -0
- package/docs/configure/app/performance/prefetch.md +21 -0
- package/docs/configure/app/performance/preload.md +23 -0
- package/docs/configure/app/performance/print-file-size.md +40 -0
- package/docs/configure/app/performance/profile.md +10 -0
- package/docs/configure/app/performance/remove-console.md +10 -0
- package/docs/configure/app/performance/remove-moment-locale.md +10 -0
- package/docs/configure/app/performance/rsdoctor.md +38 -0
- package/docs/configure/app/plugins.md +59 -0
- package/docs/configure/app/resolve/alias-strategy.md +10 -0
- package/docs/configure/app/resolve/alias.md +9 -0
- package/docs/configure/app/resolve/condition-names.md +13 -0
- package/docs/configure/app/resolve/dedupe.md +9 -0
- package/docs/configure/app/resolve/extensions.md +13 -0
- package/docs/configure/app/runtime/0-intro.md +58 -0
- package/docs/configure/app/runtime/plugins.md +58 -0
- package/docs/configure/app/runtime/router.md +35 -0
- package/docs/configure/app/security/check-syntax.md +69 -0
- package/docs/configure/app/security/nonce.md +15 -0
- package/docs/configure/app/security/sri.md +20 -0
- package/docs/configure/app/server/base-url.md +26 -0
- package/docs/configure/app/server/port.md +18 -0
- package/docs/configure/app/server/public-routes.md +22 -0
- package/docs/configure/app/server/routes.md +86 -0
- package/docs/configure/app/server/rsc.md +22 -0
- package/docs/configure/app/server/ssr-by-entries.md +25 -0
- package/docs/configure/app/server/ssr.md +80 -0
- package/docs/configure/app/server/tsconfig-path.md +59 -0
- package/docs/configure/app/source/alias-strategy.md +14 -0
- package/docs/configure/app/source/alias.md +23 -0
- package/docs/configure/app/source/config-dir.md +20 -0
- package/docs/configure/app/source/decorators.md +25 -0
- package/docs/configure/app/source/define.md +16 -0
- package/docs/configure/app/source/disable-default-entries.md +28 -0
- package/docs/configure/app/source/enable-async-entry.md +54 -0
- package/docs/configure/app/source/enable-async-pre-entry.md +26 -0
- package/docs/configure/app/source/entries-dir.md +35 -0
- package/docs/configure/app/source/entries.md +179 -0
- package/docs/configure/app/source/exclude.md +10 -0
- package/docs/configure/app/source/global-vars.md +106 -0
- package/docs/configure/app/source/include.md +36 -0
- package/docs/configure/app/source/main-entry-name.md +24 -0
- package/docs/configure/app/source/pre-entry.md +10 -0
- package/docs/configure/app/source/react-compiler.md +68 -0
- package/docs/configure/app/source/transform-import.md +27 -0
- package/docs/configure/app/split-chunks.md +17 -0
- package/docs/configure/app/tools/autoprefixer.md +44 -0
- package/docs/configure/app/tools/bundler-chain.md +26 -0
- package/docs/configure/app/tools/css-extract.md +33 -0
- package/docs/configure/app/tools/css-loader.md +17 -0
- package/docs/configure/app/tools/dev-server.md +113 -0
- package/docs/configure/app/tools/html-plugin.md +41 -0
- package/docs/configure/app/tools/less.md +81 -0
- package/docs/configure/app/tools/lightningcss-loader.md +35 -0
- package/docs/configure/app/tools/minify-css.md +53 -0
- package/docs/configure/app/tools/postcss.md +34 -0
- package/docs/configure/app/tools/rspack.md +10 -0
- package/docs/configure/app/tools/sass.md +78 -0
- package/docs/configure/app/tools/style-loader.md +10 -0
- package/docs/configure/app/tools/swc.md +65 -0
- package/docs/configure/app/tools/ts-checker.md +116 -0
- package/docs/configure/app/usage.md +276 -0
- package/docs/guides/advanced-features/bff/cross-project.md +109 -0
- package/docs/guides/advanced-features/bff/data-platform.md +116 -0
- package/docs/guides/advanced-features/bff/extend-server.md +120 -0
- package/docs/guides/advanced-features/bff/frameworks.md +243 -0
- package/docs/guides/advanced-features/bff/function.md +318 -0
- package/docs/guides/advanced-features/bff/operators.md +554 -0
- package/docs/guides/advanced-features/bff/sdk.md +116 -0
- package/docs/guides/advanced-features/bff/upload.md +101 -0
- package/docs/guides/advanced-features/bff.md +18 -0
- package/docs/guides/advanced-features/build-performance.md +130 -0
- package/docs/guides/advanced-features/compatibility.md +120 -0
- package/docs/guides/advanced-features/international/advanced.md +128 -0
- package/docs/guides/advanced-features/international/api.md +267 -0
- package/docs/guides/advanced-features/international/best-practices.md +286 -0
- package/docs/guides/advanced-features/international/configuration.md +228 -0
- package/docs/guides/advanced-features/international/locale-detection.md +126 -0
- package/docs/guides/advanced-features/international/quick-start.md +128 -0
- package/docs/guides/advanced-features/international/resource-loading.md +154 -0
- package/docs/guides/advanced-features/international/routing.md +173 -0
- package/docs/guides/advanced-features/international.md +27 -0
- package/docs/guides/advanced-features/low-level.md +46 -0
- package/docs/guides/advanced-features/page-performance/code-split.md +77 -0
- package/docs/guides/advanced-features/page-performance/inline-assets.md +159 -0
- package/docs/guides/advanced-features/page-performance/optimize-bundle.md +97 -0
- package/docs/guides/advanced-features/page-performance/react-compiler.md +51 -0
- package/docs/guides/advanced-features/server-monitor/logger.md +41 -0
- package/docs/guides/advanced-features/server-monitor/metrics.md +58 -0
- package/docs/guides/advanced-features/server-monitor/monitors.md +242 -0
- package/docs/guides/advanced-features/source-build.md +164 -0
- package/docs/guides/advanced-features/web-server.md +288 -0
- package/docs/guides/basic-features/alias.md +102 -0
- package/docs/guides/basic-features/css/css-in-js.md +72 -0
- package/docs/guides/basic-features/css/css-modules.md +212 -0
- package/docs/guides/basic-features/css/css.md +27 -0
- package/docs/guides/basic-features/css/tailwindcss.md +27 -0
- package/docs/guides/basic-features/data/data-cache.md +510 -0
- package/docs/guides/basic-features/data/data-fetch.md +415 -0
- package/docs/guides/basic-features/data/data-write.md +227 -0
- package/docs/guides/basic-features/debug/mock.md +109 -0
- package/docs/guides/basic-features/debug/proxy.md +21 -0
- package/docs/guides/basic-features/debug/rsdoctor.md +47 -0
- package/docs/guides/basic-features/debug/using-storybook.md +112 -0
- package/docs/guides/basic-features/deploy.md +458 -0
- package/docs/guides/basic-features/env-vars.md +177 -0
- package/docs/guides/basic-features/html.md +255 -0
- package/docs/guides/basic-features/output-files.md +141 -0
- package/docs/guides/basic-features/render/before-render.md +108 -0
- package/docs/guides/basic-features/render/overview.md +47 -0
- package/docs/guides/basic-features/render/rsc.md +516 -0
- package/docs/guides/basic-features/render/ssg.md +228 -0
- package/docs/guides/basic-features/render/ssr-cache.md +201 -0
- package/docs/guides/basic-features/render/ssr.md +321 -0
- package/docs/guides/basic-features/render/streaming-ssr.md +264 -0
- package/docs/guides/basic-features/routes/config-routes.md +426 -0
- package/docs/guides/basic-features/routes/routes.md +524 -0
- package/docs/guides/basic-features/static-assets/json-files.md +120 -0
- package/docs/guides/basic-features/static-assets/svg-assets.md +168 -0
- package/docs/guides/basic-features/static-assets/wasm-assets.md +62 -0
- package/docs/guides/basic-features/static-assets.md +160 -0
- package/docs/guides/basic-features/testing/playwright.md +120 -0
- package/docs/guides/basic-features/testing/rstest.md +251 -0
- package/docs/guides/concept/builder.md +37 -0
- package/docs/guides/concept/entries.md +319 -0
- package/docs/guides/concept/server.md +35 -0
- package/docs/guides/get-started/ai-coding-agents.md +58 -0
- package/docs/guides/get-started/glossary.md +63 -0
- package/docs/guides/get-started/introduction.md +40 -0
- package/docs/guides/get-started/quick-start.md +269 -0
- package/docs/guides/get-started/tech-stack.md +91 -0
- package/docs/guides/get-started/ultramodern.md +440 -0
- package/docs/guides/get-started/upgrade.md +118 -0
- package/docs/guides/topic-detail/module-federation/application.md +116 -0
- package/docs/guides/topic-detail/module-federation/deploy.md +104 -0
- package/docs/guides/topic-detail/module-federation/i18n.md +670 -0
- package/docs/guides/topic-detail/module-federation/introduce.md +35 -0
- package/docs/guides/topic-detail/module-federation/ssr.md +182 -0
- package/docs/guides/topic-detail/module-federation/usage.md +219 -0
- package/docs/guides/troubleshooting/builder.md +110 -0
- package/docs/guides/troubleshooting/cli.md +35 -0
- package/docs/guides/troubleshooting/dependencies.md +119 -0
- package/docs/guides/troubleshooting/hmr.md +144 -0
- package/docs/guides/upgrade/config.md +954 -0
- package/docs/guides/upgrade/entry.md +463 -0
- package/docs/guides/upgrade/other.md +183 -0
- package/docs/guides/upgrade/overview.md +33 -0
- package/docs/guides/upgrade/tailwindcss.md +91 -0
- package/docs/guides/upgrade/web-server.md +109 -0
- package/docs/index.md +33 -0
- package/docs/llms.txt +290 -0
- package/docs/plugin/cli-plugins/api.md +573 -0
- package/docs/plugin/cli-plugins/life-cycle.md +2 -0
- package/docs/plugin/introduction.md +152 -0
- package/docs/plugin/official/cli-plugins/plugin-bff.md +5 -0
- package/docs/plugin/official/cli-plugins/plugin-ssg.md +5 -0
- package/docs/plugin/official/cli-plugins/plugin-styled-components.md +5 -0
- package/docs/plugin/official/cli-plugins.md +4 -0
- package/docs/plugin/plugin-system.md +238 -0
- package/docs/plugin/runtime-plugins/api.md +194 -0
- package/docs/plugin/runtime-plugins/life-cycle.md +2 -0
- package/docs/plugin/server-plugins/api.md +209 -0
- package/docs/plugin/server-plugins/life-cycle.md +13 -0
- package/docs/tutorials/examples/csr-auth.md +9 -0
- package/docs/tutorials/foundations/introduction.md +16 -0
- package/package.json +63 -22
|
@@ -49,7 +49,10 @@ var promises_default = /*#__PURE__*/ __webpack_require__.n(promises_namespaceObj
|
|
|
49
49
|
const external_node_path_namespaceObject = require("node:path");
|
|
50
50
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
51
51
|
const external_node_url_namespaceObject = require("node:url");
|
|
52
|
+
const external_node_util_namespaceObject = require("node:util");
|
|
52
53
|
const parser_namespaceObject = require("@babel/parser");
|
|
54
|
+
const traverse_namespaceObject = require("@babel/traverse");
|
|
55
|
+
var traverse_default = /*#__PURE__*/ __webpack_require__.n(traverse_namespaceObject);
|
|
53
56
|
const external_cloudflare_output_contract_js_namespaceObject = require("../cloudflare-output-contract.js");
|
|
54
57
|
const external_issues_js_namespaceObject = require("./issues.js");
|
|
55
58
|
const getReferencedRouteWorkers = (manifest)=>Array.isArray(manifest?.routeSpec?.routes) ? manifest.routeSpec.routes.map((route)=>'string' == typeof route?.worker && route.worker.length > 0 ? route.worker : void 0).filter((worker)=>'string' == typeof worker) : [];
|
|
@@ -93,6 +96,7 @@ const getNodeName = (node)=>{
|
|
|
93
96
|
if (!isAstNode(node)) return;
|
|
94
97
|
return 'Identifier' === node.type && 'string' == typeof node.name ? node.name : 'StringLiteral' === node.type && 'string' == typeof node.value ? node.value : void 0;
|
|
95
98
|
};
|
|
99
|
+
const getStringLiteralValue = (node)=>isAstNode(node) && 'StringLiteral' === node.type && 'string' == typeof node.value ? node.value : void 0;
|
|
96
100
|
const collectBindingNames = (node, names)=>{
|
|
97
101
|
if (!isAstNode(node)) return;
|
|
98
102
|
const name = getNodeName(node);
|
|
@@ -102,7 +106,11 @@ const collectBindingNames = (node, names)=>{
|
|
|
102
106
|
} else if ('ArrayPattern' === node.type && Array.isArray(node.elements)) for (const element of node.elements)collectBindingNames(element, names);
|
|
103
107
|
else if ('AssignmentPattern' === node.type || 'RestElement' === node.type) collectBindingNames('AssignmentPattern' === node.type ? node.left : node.argument, names);
|
|
104
108
|
};
|
|
105
|
-
const getMemberPropertyName = (node)=>
|
|
109
|
+
const getMemberPropertyName = (node)=>{
|
|
110
|
+
if ('MemberExpression' !== node.type) return;
|
|
111
|
+
return true === node.computed ? getStringLiteralValue(node.property) : getNodeName(node.property);
|
|
112
|
+
};
|
|
113
|
+
const isAmbientModuleRequire = (node, modulePath)=>isAstNode(node) && 'MemberExpression' === node.type && isAstNode(node.object) && 'Identifier' === node.object.type && 'module' === node.object.name && void 0 === modulePath.scope.getBinding('module') && 'require' === getMemberPropertyName(node);
|
|
106
114
|
const isModuleExports = (node)=>isAstNode(node) && 'MemberExpression' === node.type && isAstNode(node.object) && 'Identifier' === node.object.type && 'module' === node.object.name && 'exports' === getMemberPropertyName(node);
|
|
107
115
|
const collectCommonJsExports = (statement, exports1)=>{
|
|
108
116
|
if ('ExpressionStatement' !== statement.type || !isAstNode(statement.expression) || 'AssignmentExpression' !== statement.expression.type) return;
|
|
@@ -137,19 +145,31 @@ const collectEsmExports = (statement, exports1)=>{
|
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
};
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
const getStaticImport = (modulePath)=>{
|
|
149
|
+
const node = modulePath.node;
|
|
150
|
+
if (('ImportDeclaration' === node.type || 'ExportNamedDeclaration' === node.type || 'ExportAllDeclaration' === node.type) && isAstNode(node.source)) return getStringLiteralValue(node.source);
|
|
151
|
+
if ('ImportExpression' === node.type && isAstNode(node.source)) return getStringLiteralValue(node.source);
|
|
152
|
+
if ('CallExpression' === node.type && Array.isArray(node.arguments) && 1 === node.arguments.length && isAstNode(node.callee) && ('Identifier' === node.callee.type && 'require' === node.callee.name && void 0 === modulePath.scope.getBinding('require') || isAmbientModuleRequire(node.callee, modulePath) || 'Import' === node.callee.type)) return getStringLiteralValue(node.arguments[0]);
|
|
153
|
+
};
|
|
154
|
+
const isAmbientLoaderWrite = (modulePath)=>{
|
|
155
|
+
let targetPath = modulePath;
|
|
156
|
+
while(targetPath.parentPath){
|
|
157
|
+
const parentPath = targetPath.parentPath;
|
|
158
|
+
if (parentPath.isAssignmentExpression()) return 'left' === targetPath.key;
|
|
159
|
+
if (parentPath.isUpdateExpression()) return 'argument' === targetPath.key;
|
|
160
|
+
if (parentPath.isForInStatement() || parentPath.isForOfStatement()) return 'left' === targetPath.key;
|
|
161
|
+
if (parentPath.isObjectProperty()) {
|
|
162
|
+
if ('value' !== targetPath.key) return false;
|
|
163
|
+
targetPath = parentPath;
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isRestElement() || parentPath.isAssignmentPattern()) {
|
|
167
|
+
targetPath = parentPath;
|
|
168
|
+
continue;
|
|
146
169
|
}
|
|
170
|
+
break;
|
|
147
171
|
}
|
|
148
|
-
|
|
149
|
-
const getStaticImport = (node)=>{
|
|
150
|
-
if (('ImportDeclaration' === node.type || 'ExportNamedDeclaration' === node.type || 'ExportAllDeclaration' === node.type) && isAstNode(node.source)) return getNodeName(node.source);
|
|
151
|
-
if ('ImportExpression' === node.type && isAstNode(node.source)) return getNodeName(node.source);
|
|
152
|
-
if ('CallExpression' === node.type && Array.isArray(node.arguments) && 1 === node.arguments.length && isAstNode(node.callee) && ('Identifier' === node.callee.type && 'require' === node.callee.name || 'Import' === node.callee.type)) return getNodeName(node.arguments[0]);
|
|
172
|
+
return false;
|
|
153
173
|
};
|
|
154
174
|
const analyzeWorkerModule = (source)=>{
|
|
155
175
|
const ast = (0, parser_namespaceObject.parse)(source, {
|
|
@@ -157,17 +177,49 @@ const analyzeWorkerModule = (source)=>{
|
|
|
157
177
|
});
|
|
158
178
|
const exports1 = new Set();
|
|
159
179
|
const imports = new Set();
|
|
180
|
+
let unsafeCommonJsLoaderUsage = false;
|
|
181
|
+
let unsafeDynamicImport = false;
|
|
160
182
|
for (const statement of ast.program.body){
|
|
161
183
|
collectEsmExports(statement, exports1);
|
|
162
184
|
collectCommonJsExports(statement, exports1);
|
|
163
185
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
186
|
+
traverse_default()(ast, {
|
|
187
|
+
enter (modulePath) {
|
|
188
|
+
const node = modulePath.node;
|
|
189
|
+
if (('ImportExpression' === node.type || 'CallExpression' === node.type && isAstNode(node.callee) && 'Import' === node.callee.type) && void 0 === getStaticImport(modulePath)) unsafeDynamicImport = true;
|
|
190
|
+
if (modulePath.isReferencedIdentifier({
|
|
191
|
+
name: 'require'
|
|
192
|
+
}) && void 0 === modulePath.scope.getBinding('require')) {
|
|
193
|
+
const parentPath = modulePath.parentPath;
|
|
194
|
+
const isStaticRequireCall = parentPath?.isCallExpression() && 'callee' === modulePath.key && void 0 !== getStaticImport(parentPath);
|
|
195
|
+
const isAvailabilityCheck = parentPath?.isUnaryExpression({
|
|
196
|
+
operator: 'typeof'
|
|
197
|
+
});
|
|
198
|
+
if (!isStaticRequireCall && !isAvailabilityCheck) unsafeCommonJsLoaderUsage = true;
|
|
199
|
+
}
|
|
200
|
+
if ('Identifier' === node.type && isAmbientLoaderWrite(modulePath) && ('require' === node.name || 'module' === node.name) && void 0 === modulePath.scope.getBinding(node.name)) unsafeCommonJsLoaderUsage = true;
|
|
201
|
+
if (modulePath.isReferencedIdentifier({
|
|
202
|
+
name: 'module'
|
|
203
|
+
}) && void 0 === modulePath.scope.getBinding('module')) {
|
|
204
|
+
const parentPath = modulePath.parentPath;
|
|
205
|
+
const isExportsAccess = null !== parentPath && isModuleExports(parentPath.node);
|
|
206
|
+
const isStaticModuleRequireCall = null !== parentPath && isAmbientModuleRequire(parentPath.node, parentPath) && parentPath.parentPath?.isCallExpression() === true && 'callee' === parentPath.key && void 0 !== getStaticImport(parentPath.parentPath);
|
|
207
|
+
if (!isExportsAccess && !isStaticModuleRequireCall) unsafeCommonJsLoaderUsage = true;
|
|
208
|
+
}
|
|
209
|
+
if (isAmbientModuleRequire(node, modulePath)) {
|
|
210
|
+
const parentPath = modulePath.parentPath;
|
|
211
|
+
const isStaticRequireCall = parentPath?.isCallExpression() && 'callee' === modulePath.key && void 0 !== getStaticImport(parentPath);
|
|
212
|
+
if (!isStaticRequireCall) unsafeCommonJsLoaderUsage = true;
|
|
213
|
+
}
|
|
214
|
+
const specifier = getStaticImport(modulePath);
|
|
215
|
+
if (void 0 !== specifier) imports.add(specifier);
|
|
216
|
+
}
|
|
167
217
|
});
|
|
168
218
|
return {
|
|
169
219
|
exports: exports1,
|
|
170
|
-
imports
|
|
220
|
+
imports,
|
|
221
|
+
unsafeCommonJsLoaderUsage,
|
|
222
|
+
unsafeDynamicImport
|
|
171
223
|
};
|
|
172
224
|
};
|
|
173
225
|
const getPackageName = (specifier)=>specifier.startsWith('@') ? specifier.split('/').slice(0, 2).join('/') : specifier.split('/')[0];
|
|
@@ -218,7 +270,25 @@ const verifyWorkerModuleClosure = async (issues, entryPath, entrySource, contrac
|
|
|
218
270
|
return;
|
|
219
271
|
}
|
|
220
272
|
if (isEntry) entryAnalysis = analysis;
|
|
273
|
+
if (analysis.unsafeCommonJsLoaderUsage) (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
274
|
+
code: 'invalid-worker-bundle',
|
|
275
|
+
message: 'Cloudflare worker bundles must use exactly one string-literal specifier in ambient CommonJS loader calls and must not pass or alias the loader.',
|
|
276
|
+
path: modulePath
|
|
277
|
+
});
|
|
278
|
+
if (analysis.unsafeDynamicImport) (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
279
|
+
code: 'invalid-worker-bundle',
|
|
280
|
+
message: 'Cloudflare worker bundles must not contain non-static dynamic module imports.',
|
|
281
|
+
path: modulePath
|
|
282
|
+
});
|
|
221
283
|
for (const specifier of analysis.imports){
|
|
284
|
+
if (0 === specifier.length) {
|
|
285
|
+
(0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
286
|
+
code: 'invalid-worker-bundle',
|
|
287
|
+
message: 'Cloudflare worker bundle module specifiers must not be empty.',
|
|
288
|
+
path: modulePath
|
|
289
|
+
});
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
222
292
|
if (!specifier.startsWith('.') && !external_node_path_default().isAbsolute(specifier)) {
|
|
223
293
|
if (CLOUDFLARE_WORKER_NODE_BUILTIN_SPECIFIERS.has(specifier)) continue;
|
|
224
294
|
if (specifier.startsWith('node:')) {
|
|
@@ -267,14 +337,20 @@ const verifyWorkerBundleReferences = async (issues, worker, source, contract)=>{
|
|
|
267
337
|
path: worker.path
|
|
268
338
|
});
|
|
269
339
|
};
|
|
270
|
-
const verifyWorkerImport = async (issues, entryPath)=>{
|
|
340
|
+
const verifyWorkerImport = async (issues, entryPath, expectedManifest)=>{
|
|
271
341
|
try {
|
|
272
|
-
const
|
|
342
|
+
const workerModule = await import(`${(0, external_node_url_namespaceObject.pathToFileURL)(entryPath).href}?t=${Date.now()}`);
|
|
343
|
+
const worker = workerModule.default;
|
|
273
344
|
if (!worker || 'function' != typeof worker.fetch) (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
274
345
|
code: 'worker-import-failed',
|
|
275
346
|
message: 'Cloudflare server entry must default-export a Worker with fetch.',
|
|
276
347
|
path: entryPath
|
|
277
348
|
});
|
|
349
|
+
if (void 0 !== expectedManifest && !(0, external_node_util_namespaceObject.isDeepStrictEqual)(workerModule.modernWorkerManifest, expectedManifest)) (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
350
|
+
code: 'worker-import-failed',
|
|
351
|
+
message: 'Cloudflare server entry runtime manifest must exactly match modern-worker-manifest.json.',
|
|
352
|
+
path: entryPath
|
|
353
|
+
});
|
|
278
354
|
} catch (error) {
|
|
279
355
|
(0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
280
356
|
code: 'worker-import-failed',
|
package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const ASSETS_BINDING = 'ASSETS';
|
|
2
2
|
const MODERN_WORKER_MANIFEST = p_workerManifest;
|
|
3
|
+
export const modernWorkerManifest = MODERN_WORKER_MANIFEST;
|
|
3
4
|
const WORKER_MODULE_LOADERS = p_workerModuleLoaders;
|
|
4
5
|
const workerModulePromises = new Map();
|
|
5
6
|
const effectBffDispatcherPromises = new Map();
|
package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workerd cannot initialize Module Federation's Node-oriented SSR data-fetch
|
|
3
|
+
* runtime. Cloudflare workers do not load native MF remotes, so retain the
|
|
4
|
+
* runtime-plugin contract without installing its server data-fetch hooks.
|
|
5
|
+
*/
|
|
6
|
+
export const injectDataFetchFunctionPlugin = () => ({
|
|
7
|
+
name: '@module-federation/inject-data-fetch-function-plugin',
|
|
8
|
+
setup() {},
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const mfSSRDevPlugin = () => ({
|
|
12
|
+
name: '@module-federation/modern-js-v3',
|
|
13
|
+
setup() {},
|
|
14
|
+
});
|
|
@@ -57,7 +57,7 @@ const initialize = ()=>({
|
|
|
57
57
|
api.modifyResolvedConfig(async (resolved)=>{
|
|
58
58
|
let appContext = api.getAppContext();
|
|
59
59
|
const userConfig = api.getConfig();
|
|
60
|
-
const port = await getServerPort(resolved);
|
|
60
|
+
const port = await getServerPort(resolved, appContext.command);
|
|
61
61
|
appContext = {
|
|
62
62
|
...appContext,
|
|
63
63
|
port,
|
|
@@ -92,9 +92,10 @@ function stabilizeConfig(resolve, config, keys) {
|
|
|
92
92
|
resolve[key] = config[key] || {};
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
async function getServerPort(config) {
|
|
95
|
+
async function getServerPort(config, contextCommand) {
|
|
96
96
|
const prodPort = Number(process.env.PORT) || config.server.port || 8080;
|
|
97
|
-
|
|
97
|
+
const isProgrammaticDev = 'dev' === contextCommand || 'start' === contextCommand;
|
|
98
|
+
if ((0, utils_namespaceObject.isDev)() && ((0, utils_namespaceObject.isDevCommand)() || isProgrammaticDev)) return (0, utils_namespaceObject.getPort)(Number(process.env.PORT) || prodPort);
|
|
98
99
|
return prodPort;
|
|
99
100
|
}
|
|
100
101
|
exports["default"] = __webpack_exports__["default"];
|
|
@@ -60,7 +60,7 @@ const serverBuild = ()=>({
|
|
|
60
60
|
name: '@modern-js/server-build',
|
|
61
61
|
setup (api) {
|
|
62
62
|
api.onAfterBuild(async ()=>{
|
|
63
|
-
const { appDirectory, distDirectory, metaName } = api.getAppContext();
|
|
63
|
+
const { appDirectory, distDirectory, metaName, moduleType } = api.getAppContext();
|
|
64
64
|
if (!checkHasCache(appDirectory) && !checkHasConfig(appDirectory, metaName)) return;
|
|
65
65
|
const modernConfig = api.getNormalizedConfig();
|
|
66
66
|
const distDir = external_path_default().resolve(distDirectory);
|
|
@@ -80,7 +80,8 @@ const serverBuild = ()=>({
|
|
|
80
80
|
}, {
|
|
81
81
|
sourceDirs,
|
|
82
82
|
distDir,
|
|
83
|
-
tsconfigPath
|
|
83
|
+
tsconfigPath,
|
|
84
|
+
moduleType
|
|
84
85
|
});
|
|
85
86
|
});
|
|
86
87
|
}
|
|
@@ -38,6 +38,7 @@ var __webpack_exports__ = {};
|
|
|
38
38
|
__webpack_require__.r(__webpack_exports__);
|
|
39
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
40
|
MICROVERTICAL_RELEASE_ENVELOPE_PATH: ()=>MICROVERTICAL_RELEASE_ENVELOPE_PATH,
|
|
41
|
+
MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH: ()=>MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH,
|
|
41
42
|
emitCloudflareStagedReleaseEnvelope: ()=>emitCloudflareStagedReleaseEnvelope,
|
|
42
43
|
emitFrameworkMicroVerticalReleaseEnvelope: ()=>emitFrameworkMicroVerticalReleaseEnvelope,
|
|
43
44
|
emitNodeStagedReleaseEnvelope: ()=>emitNodeStagedReleaseEnvelope,
|
|
@@ -47,47 +48,20 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
47
48
|
verifyCloudflareReleaseEnvelopeStaging: ()=>verifyCloudflareReleaseEnvelopeStaging,
|
|
48
49
|
verifyNodeReleaseEnvelopeStaging: ()=>verifyNodeReleaseEnvelopeStaging
|
|
49
50
|
});
|
|
51
|
+
const external_node_crypto_namespaceObject = require("node:crypto");
|
|
50
52
|
const promises_namespaceObject = require("node:fs/promises");
|
|
51
53
|
var promises_default = /*#__PURE__*/ __webpack_require__.n(promises_namespaceObject);
|
|
52
54
|
const external_node_path_namespaceObject = require("node:path");
|
|
53
55
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
54
|
-
const parser_namespaceObject = require("@babel/parser");
|
|
55
56
|
const universal_namespaceObject = require("@modern-js/utils/universal");
|
|
56
57
|
const external_index_js_namespaceObject = require("./index.js");
|
|
57
58
|
const MICROVERTICAL_RELEASE_ENVELOPE_PATH = 'release/microvertical-release-envelope.json';
|
|
59
|
+
const MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH = 'release/microvertical-release-identity-carriers.json';
|
|
60
|
+
const MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_KIND = 'ultramodern-release-identity-carriers';
|
|
61
|
+
const MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_SCHEMA_VERSION = 1;
|
|
58
62
|
const COMPILED_MODULE_PATTERN = /\.(?:c|m)?js$/u;
|
|
59
63
|
const EFFECT_BFF_WORKER_PATTERN = /^worker\/__modern_bff_effect\.(?:c|m)?js$/u;
|
|
60
64
|
const isRecord = (value)=>'object' == typeof value && null !== value && !Array.isArray(value);
|
|
61
|
-
const isAstNode = (value)=>isRecord(value) && 'string' == typeof value.type;
|
|
62
|
-
const visitAst = (node, visitor)=>{
|
|
63
|
-
visitor(node);
|
|
64
|
-
for (const value of Object.values(node))if (isAstNode(value)) visitAst(value, visitor);
|
|
65
|
-
else if (Array.isArray(value)) {
|
|
66
|
-
for (const item of value)if (isAstNode(item)) visitAst(item, visitor);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const compiledModuleIdentityValues = (source)=>{
|
|
70
|
-
const values = new Set();
|
|
71
|
-
const ast = (0, parser_namespaceObject.parse)(source, {
|
|
72
|
-
sourceType: 'unambiguous'
|
|
73
|
-
});
|
|
74
|
-
visitAst(ast.program, (node)=>{
|
|
75
|
-
if ('StringLiteral' === node.type && 'string' == typeof node.value) values.add(node.value);
|
|
76
|
-
else if ('TemplateElement' === node.type && isRecord(node.value) && 'string' == typeof node.value.cooked) values.add(node.value.cooked);
|
|
77
|
-
});
|
|
78
|
-
return values;
|
|
79
|
-
};
|
|
80
|
-
const assertEveryCompiledIdentityCarrier = async (distDirectory, logicalPaths, identity, surface)=>{
|
|
81
|
-
const compiledLogicalPaths = logicalPaths.filter((pathname)=>COMPILED_MODULE_PATTERN.test(pathname));
|
|
82
|
-
if (0 === compiledLogicalPaths.length) throw new Error(`[ultramodern-release-envelope] ${surface} has no compiled execution module carrying release identity.`);
|
|
83
|
-
for (const logicalPath of compiledLogicalPaths){
|
|
84
|
-
const source = await promises_default().readFile(external_node_path_default().join(distDirectory, logicalPath), {
|
|
85
|
-
encoding: 'utf8'
|
|
86
|
-
});
|
|
87
|
-
const values = compiledModuleIdentityValues(source);
|
|
88
|
-
if (!values.has(identity.buildMarker) || !values.has(identity.sourceRevision) || !values.has(identity.releaseVersion)) throw new Error(`[ultramodern-release-envelope] ${surface} execution module ${logicalPath} does not carry exact buildMarker ${identity.buildMarker}, sourceRevision ${identity.sourceRevision}, and releaseVersion ${identity.releaseVersion}.`);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
65
|
const flattenStrings = (value)=>'string' == typeof value ? [
|
|
92
66
|
value
|
|
93
67
|
] : Array.isArray(value) ? value.flatMap(flattenStrings) : [];
|
|
@@ -230,6 +204,49 @@ const releaseArtifact = (logicalPath, runtime)=>({
|
|
|
230
204
|
logicalPath,
|
|
231
205
|
runtime
|
|
232
206
|
});
|
|
207
|
+
const writeReleaseIdentityCarrierMetadata = async (artifactRoot, identity, carrierPaths)=>{
|
|
208
|
+
const surfacesByPath = new Map();
|
|
209
|
+
for (const [surface, logicalPaths] of Object.entries(carrierPaths)){
|
|
210
|
+
if (0 === logicalPaths.length) throw new Error(`[ultramodern-release-envelope] ${surface} has no declared release-identity carrier artifact.`);
|
|
211
|
+
for (const logicalPath of logicalPaths){
|
|
212
|
+
const surfaces = surfacesByPath.get(logicalPath) ?? new Set();
|
|
213
|
+
surfaces.add(surface);
|
|
214
|
+
surfacesByPath.set(logicalPath, surfaces);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const carriers = await Promise.all([
|
|
218
|
+
...surfacesByPath
|
|
219
|
+
].sort(([left], [right])=>left.localeCompare(right)).map(async ([logicalPath, surfaces])=>{
|
|
220
|
+
const bytes = await promises_default().readFile(external_node_path_default().join(artifactRoot, logicalPath));
|
|
221
|
+
return {
|
|
222
|
+
logicalPath,
|
|
223
|
+
byteLength: bytes.byteLength,
|
|
224
|
+
sha256: (0, external_node_crypto_namespaceObject.createHash)('sha256').update(bytes).digest('hex'),
|
|
225
|
+
surfaces: [
|
|
226
|
+
...surfaces
|
|
227
|
+
].sort((left, right)=>left.localeCompare(right))
|
|
228
|
+
};
|
|
229
|
+
}));
|
|
230
|
+
const releaseEnvelopePath = await resolveSafeReleaseEnvelopePath({
|
|
231
|
+
artifactRoot,
|
|
232
|
+
createDirectory: true
|
|
233
|
+
});
|
|
234
|
+
if (!releaseEnvelopePath) throw new Error('[ultramodern-release-envelope] could not resolve private release metadata directory.');
|
|
235
|
+
const metadataPath = external_node_path_default().join(external_node_path_default().dirname(releaseEnvelopePath), external_node_path_default().basename(MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH));
|
|
236
|
+
try {
|
|
237
|
+
const metadataStat = await promises_default().lstat(metadataPath);
|
|
238
|
+
if (metadataStat.isSymbolicLink() || !metadataStat.isFile()) throw new Error('[ultramodern-release-envelope] release identity carrier metadata must be a real file inside artifactRoot.');
|
|
239
|
+
} catch (error) {
|
|
240
|
+
if (!isMissingPathError(error)) throw error;
|
|
241
|
+
}
|
|
242
|
+
await promises_default().writeFile(metadataPath, `${JSON.stringify({
|
|
243
|
+
schemaVersion: MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_SCHEMA_VERSION,
|
|
244
|
+
kind: MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_KIND,
|
|
245
|
+
identity,
|
|
246
|
+
carriers
|
|
247
|
+
}, null, 2)}\n`);
|
|
248
|
+
return releaseArtifact(MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH, 'release-identity-metadata');
|
|
249
|
+
};
|
|
233
250
|
const createReleaseArtifactInputs = async (distDirectory, identity, target)=>{
|
|
234
251
|
const files = await collectFiles(distDirectory);
|
|
235
252
|
if ('node' === target && files.some((logicalPath)=>EFFECT_BFF_WORKER_PATTERN.test(logicalPath))) throw new Error('[ultramodern-release-envelope] Node target conflicts with a Cloudflare Effect API/BFF worker artifact; resolve the canonical deploy target instead of emitting a Node envelope for Cloudflare output.');
|
|
@@ -253,13 +270,7 @@ const createReleaseArtifactInputs = async (distDirectory, identity, target)=>{
|
|
|
253
270
|
const clientExecutionPaths = await manifestReferencedClientModules(distDirectory, files);
|
|
254
271
|
if (0 === clientExecutionPaths.length) throw new Error('[ultramodern-release-envelope] UI/client manifest references no compiled execution module.');
|
|
255
272
|
const ssrExecutionPaths = await routeReferencedSsrModules(distDirectory, files, target);
|
|
256
|
-
|
|
257
|
-
await assertEveryCompiledIdentityCarrier(distDirectory, ssrExecutionPaths, identity, 'node' === target ? 'route-referenced Node SSR' : 'route-referenced Cloudflare SSR');
|
|
258
|
-
await assertEveryCompiledIdentityCarrier(distDirectory, ssrPaths, identity, 'node' === target ? 'compiled Node SSR closure' : 'compiled Cloudflare SSR/workerd closure');
|
|
259
|
-
await assertEveryCompiledIdentityCarrier(distDirectory, 'node' === target ? nodeApiEntryPaths : apiBackendPaths, identity, 'node' === target ? 'Node API/backend' : 'Cloudflare API/backend');
|
|
260
|
-
await assertEveryCompiledIdentityCarrier(distDirectory, [
|
|
261
|
-
universal_namespaceObject.BACKEND_FEDERATION_REMOTE_ENTRY_FILE
|
|
262
|
-
], identity, 'backend Module Federation container');
|
|
273
|
+
if (0 === ssrExecutionPaths.length) throw new Error(`[ultramodern-release-envelope] route manifest references no emitted ${'node' === target ? 'Node' : 'Cloudflare'} SSR execution module.`);
|
|
263
274
|
const runtimeByPath = new Map();
|
|
264
275
|
const add = (paths, runtime)=>{
|
|
265
276
|
for (const logicalPath of paths){
|
|
@@ -295,8 +306,25 @@ const createReleaseArtifactInputs = async (distDirectory, identity, target)=>{
|
|
|
295
306
|
const artifacts = [
|
|
296
307
|
...runtimeByPath
|
|
297
308
|
].map(([logicalPath, runtime])=>releaseArtifact(logicalPath, runtime)).sort((left, right)=>left.logicalPath.localeCompare(right.logicalPath));
|
|
309
|
+
const identityCarrierMetadata = await writeReleaseIdentityCarrierMetadata(distDirectory, identity, {
|
|
310
|
+
apiBackend: apiBackendPaths,
|
|
311
|
+
backendFederation: [
|
|
312
|
+
universal_namespaceObject.BACKEND_FEDERATION_MANIFEST_FILE,
|
|
313
|
+
universal_namespaceObject.BACKEND_FEDERATION_REMOTE_ENTRY_FILE
|
|
314
|
+
],
|
|
315
|
+
ssr: [
|
|
316
|
+
...new Set([
|
|
317
|
+
...ssrExecutionPaths,
|
|
318
|
+
...ssrPaths
|
|
319
|
+
])
|
|
320
|
+
],
|
|
321
|
+
uiClient: uiClientPaths.filter((logicalPath)=>COMPILED_MODULE_PATTERN.test(logicalPath))
|
|
322
|
+
});
|
|
298
323
|
return {
|
|
299
|
-
artifacts
|
|
324
|
+
artifacts: [
|
|
325
|
+
...artifacts,
|
|
326
|
+
identityCarrierMetadata
|
|
327
|
+
].sort((left, right)=>left.logicalPath.localeCompare(right.logicalPath)),
|
|
300
328
|
surfaces
|
|
301
329
|
};
|
|
302
330
|
};
|
|
@@ -418,13 +446,7 @@ const createNodeStagedReleaseArtifactInputs = async (outputDirectory, identity)=
|
|
|
418
446
|
])if (0 === paths.length) throw new Error(`[ultramodern-release-envelope] final Node staging has no ${surface} artifacts.`);
|
|
419
447
|
const clientExecutionPaths = await manifestReferencedClientModules(outputDirectory, files);
|
|
420
448
|
const ssrExecutionPaths = await routeReferencedSsrModules(outputDirectory, files, 'node');
|
|
421
|
-
|
|
422
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, ssrExecutionPaths, identity, 'final route-referenced Node SSR');
|
|
423
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, ssrPaths.filter((logicalPath)=>'index.js' !== logicalPath), identity, 'final compiled Node SSR closure');
|
|
424
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, apiBackendPaths.filter((logicalPath)=>logicalPath.startsWith('api/')), identity, 'final Node API/backend');
|
|
425
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, [
|
|
426
|
-
universal_namespaceObject.BACKEND_FEDERATION_REMOTE_ENTRY_FILE
|
|
427
|
-
], identity, 'final Node backend Module Federation container');
|
|
449
|
+
if (0 === clientExecutionPaths.length || 0 === ssrExecutionPaths.length) throw new Error('[ultramodern-release-envelope] final Node manifests must reference emitted UI/client and SSR execution modules.');
|
|
428
450
|
const runtimeByPath = new Map(files.filter((logicalPath)=>!backendFederationPaths.has(logicalPath)).map((logicalPath)=>[
|
|
429
451
|
logicalPath,
|
|
430
452
|
'nodejs-deployment'
|
|
@@ -434,10 +456,27 @@ const createNodeStagedReleaseArtifactInputs = async (outputDirectory, identity)=
|
|
|
434
456
|
for (const logicalPath of apiBackendPaths)runtimeByPath.set(logicalPath, 'nodejs');
|
|
435
457
|
runtimeByPath.set(universal_namespaceObject.BACKEND_FEDERATION_MANIFEST_FILE, 'module-federation-manifest');
|
|
436
458
|
runtimeByPath.set(universal_namespaceObject.BACKEND_FEDERATION_REMOTE_ENTRY_FILE, 'nodejs');
|
|
459
|
+
const identityCarrierMetadata = await writeReleaseIdentityCarrierMetadata(outputDirectory, identity, {
|
|
460
|
+
apiBackend: apiBackendPaths,
|
|
461
|
+
backendFederation: [
|
|
462
|
+
universal_namespaceObject.BACKEND_FEDERATION_MANIFEST_FILE,
|
|
463
|
+
universal_namespaceObject.BACKEND_FEDERATION_REMOTE_ENTRY_FILE
|
|
464
|
+
],
|
|
465
|
+
ssr: [
|
|
466
|
+
...new Set([
|
|
467
|
+
...ssrExecutionPaths,
|
|
468
|
+
...ssrPaths.filter((logicalPath)=>'index.js' !== logicalPath)
|
|
469
|
+
])
|
|
470
|
+
],
|
|
471
|
+
uiClient: uiClientPaths.filter((logicalPath)=>COMPILED_MODULE_PATTERN.test(logicalPath))
|
|
472
|
+
});
|
|
437
473
|
return {
|
|
438
474
|
artifacts: [
|
|
439
|
-
...
|
|
440
|
-
|
|
475
|
+
...[
|
|
476
|
+
...runtimeByPath
|
|
477
|
+
].map(([logicalPath, runtime])=>releaseArtifact(logicalPath, runtime)),
|
|
478
|
+
identityCarrierMetadata
|
|
479
|
+
].sort((left, right)=>left.logicalPath.localeCompare(right.logicalPath)),
|
|
441
480
|
surfaces: {
|
|
442
481
|
uiClient: [
|
|
443
482
|
...uiClientPaths
|
|
@@ -511,13 +550,7 @@ const createCloudflareStagedReleaseArtifactInputs = async (outputDirectory, iden
|
|
|
511
550
|
])if (!files.includes(logicalPath)) throw new Error(`[ultramodern-release-envelope] final Cloudflare staging is missing ${logicalPath}.`);
|
|
512
551
|
const clientExecutionPaths = await manifestReferencedClientModules(outputDirectory, files, 'public/mf-manifest.json');
|
|
513
552
|
const ssrExecutionPaths = await routeReferencedSsrModules(outputDirectory, files, 'cloudflare', 'server/route.json');
|
|
514
|
-
|
|
515
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, ssrExecutionPaths, identity, 'final route-referenced Cloudflare SSR');
|
|
516
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, ssrPaths.filter((logicalPath)=>logicalPath.startsWith('worker/')), identity, 'final compiled Cloudflare SSR/workerd closure');
|
|
517
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, apiBackendPaths, identity, 'final Cloudflare API/backend');
|
|
518
|
-
await assertEveryCompiledIdentityCarrier(outputDirectory, [
|
|
519
|
-
backendContainerPath
|
|
520
|
-
], identity, 'final Cloudflare backend Module Federation container');
|
|
553
|
+
if (0 === clientExecutionPaths.length || 0 === ssrExecutionPaths.length) throw new Error('[ultramodern-release-envelope] final Cloudflare manifests must reference emitted UI/client and SSR execution modules.');
|
|
521
554
|
const runtimeByPath = new Map();
|
|
522
555
|
for (const logicalPath of files)runtimeByPath.set(logicalPath, 'cloudflare-deployment');
|
|
523
556
|
const add = (paths, runtime)=>{
|
|
@@ -532,10 +565,27 @@ const createCloudflareStagedReleaseArtifactInputs = async (outputDirectory, iden
|
|
|
532
565
|
add([
|
|
533
566
|
backendContainerPath
|
|
534
567
|
], 'commonjs-module');
|
|
568
|
+
const identityCarrierMetadata = await writeReleaseIdentityCarrierMetadata(outputDirectory, identity, {
|
|
569
|
+
apiBackend: apiBackendPaths,
|
|
570
|
+
backendFederation: [
|
|
571
|
+
backendManifestPath,
|
|
572
|
+
backendContainerPath
|
|
573
|
+
],
|
|
574
|
+
ssr: [
|
|
575
|
+
...new Set([
|
|
576
|
+
...ssrExecutionPaths,
|
|
577
|
+
...ssrPaths.filter((logicalPath)=>logicalPath.startsWith('worker/'))
|
|
578
|
+
])
|
|
579
|
+
],
|
|
580
|
+
uiClient: uiClientPaths.filter((logicalPath)=>COMPILED_MODULE_PATTERN.test(logicalPath))
|
|
581
|
+
});
|
|
535
582
|
return {
|
|
536
583
|
artifacts: [
|
|
537
|
-
...
|
|
538
|
-
|
|
584
|
+
...[
|
|
585
|
+
...runtimeByPath
|
|
586
|
+
].map(([logicalPath, runtime])=>releaseArtifact(logicalPath, runtime)),
|
|
587
|
+
identityCarrierMetadata
|
|
588
|
+
].sort((left, right)=>left.logicalPath.localeCompare(right.logicalPath)),
|
|
539
589
|
surfaces: {
|
|
540
590
|
uiClient: [
|
|
541
591
|
...uiClientPaths
|
|
@@ -573,6 +623,7 @@ const verifyCloudflareReleaseEnvelopeStaging = async (outputDirectory)=>readFram
|
|
|
573
623
|
required: true
|
|
574
624
|
});
|
|
575
625
|
exports.MICROVERTICAL_RELEASE_ENVELOPE_PATH = __webpack_exports__.MICROVERTICAL_RELEASE_ENVELOPE_PATH;
|
|
626
|
+
exports.MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH = __webpack_exports__.MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH;
|
|
576
627
|
exports.emitCloudflareStagedReleaseEnvelope = __webpack_exports__.emitCloudflareStagedReleaseEnvelope;
|
|
577
628
|
exports.emitFrameworkMicroVerticalReleaseEnvelope = __webpack_exports__.emitFrameworkMicroVerticalReleaseEnvelope;
|
|
578
629
|
exports.emitNodeStagedReleaseEnvelope = __webpack_exports__.emitNodeStagedReleaseEnvelope;
|
|
@@ -583,6 +634,7 @@ exports.verifyCloudflareReleaseEnvelopeStaging = __webpack_exports__.verifyCloud
|
|
|
583
634
|
exports.verifyNodeReleaseEnvelopeStaging = __webpack_exports__.verifyNodeReleaseEnvelopeStaging;
|
|
584
635
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
585
636
|
"MICROVERTICAL_RELEASE_ENVELOPE_PATH",
|
|
637
|
+
"MICROVERTICAL_RELEASE_IDENTITY_CARRIERS_PATH",
|
|
586
638
|
"emitCloudflareStagedReleaseEnvelope",
|
|
587
639
|
"emitFrameworkMicroVerticalReleaseEnvelope",
|
|
588
640
|
"emitNodeStagedReleaseEnvelope",
|
|
@@ -14,6 +14,10 @@ function modifyOutputConfig(config, appContext) {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function createBuilderProviderConfig(resolveConfig, appContext) {
|
|
17
|
+
const builderDevConfig = {
|
|
18
|
+
...resolveConfig.dev
|
|
19
|
+
};
|
|
20
|
+
delete builderDevConfig.mockDir;
|
|
17
21
|
const htmlConfig = {
|
|
18
22
|
...resolveConfig.html
|
|
19
23
|
};
|
|
@@ -32,7 +36,7 @@ function createBuilderProviderConfig(resolveConfig, appContext) {
|
|
|
32
36
|
...resolveConfig.source
|
|
33
37
|
},
|
|
34
38
|
dev: {
|
|
35
|
-
...
|
|
39
|
+
...builderDevConfig,
|
|
36
40
|
port: appContext.port
|
|
37
41
|
},
|
|
38
42
|
server: serverConfig,
|
|
@@ -5,6 +5,8 @@ import { isProd, isSSR, isServiceWorker, isUseRsc, isUseSSRBundle } from "@moder
|
|
|
5
5
|
import { CLOUDFLARE_WORKER_NODE_BUILTINS } from "../../plugins/deploy/platforms/cloudflare-output-contract.mjs";
|
|
6
6
|
const BFF_EFFECT_WORKER_ENTRY_NAME = '__modern_bff_effect';
|
|
7
7
|
const BFF_EFFECT_WORKER_RUNTIME_QUERY = 'modern-bff-runtime';
|
|
8
|
+
const MF_SSR_DATA_FETCH_RUNTIME_PLUGIN = '@module-federation/modern-js-v3/ssr-inject-data-fetch-function-plugin';
|
|
9
|
+
const MF_SSR_DEV_RUNTIME_PLUGIN = '@module-federation/modern-js-v3/ssr-dev-plugin';
|
|
8
10
|
const JS_OR_TS_EXTS = [
|
|
9
11
|
'.js',
|
|
10
12
|
'.jsx',
|
|
@@ -39,6 +41,13 @@ function resolvePackageFile(packageName, filePath, paths) {
|
|
|
39
41
|
paths
|
|
40
42
|
}));
|
|
41
43
|
} catch {
|
|
44
|
+
try {
|
|
45
|
+
const packageJsonPath = require.resolve(`${packageName}/package.json`, {
|
|
46
|
+
paths
|
|
47
|
+
});
|
|
48
|
+
const packageFile = node_path.join(node_path.dirname(packageJsonPath), filePath);
|
|
49
|
+
if (node_fs.existsSync(packageFile)) return node_fs.realpathSync(packageFile);
|
|
50
|
+
} catch {}
|
|
42
51
|
const packageEntry = resolvePackageEntry(packageName, paths);
|
|
43
52
|
if (!packageEntry) return;
|
|
44
53
|
const packageRoot = findPackageRoot(packageEntry, packageName);
|
|
@@ -78,6 +87,64 @@ function getCloudflareWorkerNodeExternals() {
|
|
|
78
87
|
];
|
|
79
88
|
}));
|
|
80
89
|
}
|
|
90
|
+
const reserveWorkerChunkName = (baseName, reservedOutputNames)=>{
|
|
91
|
+
let name = baseName;
|
|
92
|
+
while(reservedOutputNames.has(normalizeWorkerOutputName(name)))name = `${name}_`;
|
|
93
|
+
return name;
|
|
94
|
+
};
|
|
95
|
+
const normalizeWorkerOutputName = (name)=>node_path.posix.normalize(name.replace(/\\/gu, '/')).toLowerCase();
|
|
96
|
+
function getCloudflareWorkerRspackConfig(workerEntryNames) {
|
|
97
|
+
const entryNames = [
|
|
98
|
+
...workerEntryNames
|
|
99
|
+
];
|
|
100
|
+
for (const entryName of entryNames){
|
|
101
|
+
const slashName = entryName.replace(/\\/gu, '/');
|
|
102
|
+
const normalizedName = node_path.posix.normalize(slashName);
|
|
103
|
+
if (entryName !== slashName || normalizedName !== slashName || '.' === normalizedName || normalizedName.startsWith('../') || node_path.posix.isAbsolute(normalizedName) || node_path.win32.isAbsolute(slashName) || /^[A-Za-z]:/u.test(slashName)) throw new Error(`Cloudflare worker entry name "${entryName}" must be a canonical relative output path without dot segments or backslashes.`);
|
|
104
|
+
}
|
|
105
|
+
const reservedNames = new Set(entryNames.map(normalizeWorkerOutputName));
|
|
106
|
+
const runtimeName = reserveWorkerChunkName('__modern_worker_runtime', reservedNames);
|
|
107
|
+
reservedNames.add(normalizeWorkerOutputName(runtimeName));
|
|
108
|
+
const sharedName = reserveWorkerChunkName('__modern_worker_shared', reservedNames);
|
|
109
|
+
return {
|
|
110
|
+
experiments: {
|
|
111
|
+
outputModule: true
|
|
112
|
+
},
|
|
113
|
+
externals: getCloudflareWorkerNodeExternals(),
|
|
114
|
+
externalsType: 'module-import',
|
|
115
|
+
module: {
|
|
116
|
+
parser: {
|
|
117
|
+
javascript: {
|
|
118
|
+
dynamicImportMode: 'eager'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
optimization: {
|
|
123
|
+
runtimeChunk: {
|
|
124
|
+
name: runtimeName
|
|
125
|
+
},
|
|
126
|
+
splitChunks: {
|
|
127
|
+
chunks: 'all',
|
|
128
|
+
minSize: 0,
|
|
129
|
+
name: sharedName
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function applyCloudflareWorkerRspackConfig(chain, workerEntryNames) {
|
|
135
|
+
const config = getCloudflareWorkerRspackConfig(workerEntryNames);
|
|
136
|
+
chain.experiments(config.experiments);
|
|
137
|
+
chain.externals(config.externals);
|
|
138
|
+
chain.externalsType(config.externalsType);
|
|
139
|
+
chain.module.parser.merge(config.module.parser);
|
|
140
|
+
chain.optimization.runtimeChunk(config.optimization.runtimeChunk);
|
|
141
|
+
chain.optimization.splitChunks(config.optimization.splitChunks);
|
|
142
|
+
}
|
|
143
|
+
function applyCloudflareWorkerMfRuntimeBoundary(chain) {
|
|
144
|
+
chain.plugins.delete('plugin-module-federation');
|
|
145
|
+
chain.resolve.alias.set(`${MF_SSR_DATA_FETCH_RUNTIME_PLUGIN}$`, getCloudflareWorkerCompatFile('cloudflare-worker-mf-ssr-runtime-plugin.mjs'));
|
|
146
|
+
chain.resolve.alias.set(`${MF_SSR_DEV_RUNTIME_PLUGIN}$`, getCloudflareWorkerCompatFile('cloudflare-worker-mf-ssr-runtime-plugin.mjs'));
|
|
147
|
+
}
|
|
81
148
|
function getEffectBffEntry(normalizedConfig, appContext) {
|
|
82
149
|
if (!normalizedConfig.bff || 'hono' === normalizedConfig.bff.runtimeFramework) return;
|
|
83
150
|
const configuredEntry = normalizedConfig.bff.effect?.entry;
|
|
@@ -236,17 +303,10 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
236
303
|
htmlPlugin: false,
|
|
237
304
|
...useCloudflareModuleWorker ? {
|
|
238
305
|
bundlerChain: (chain)=>{
|
|
239
|
-
chain.
|
|
240
|
-
experiments: {
|
|
241
|
-
outputModule: true
|
|
242
|
-
},
|
|
243
|
-
externals: getCloudflareWorkerNodeExternals(),
|
|
244
|
-
externalsType: 'module-import'
|
|
245
|
-
});
|
|
306
|
+
applyCloudflareWorkerRspackConfig(chain, Object.keys(workerEntries));
|
|
246
307
|
chain.output.module(true).library({
|
|
247
308
|
type: 'module'
|
|
248
309
|
}).publicPath('/').chunkFormat('module').chunkLoading('import').workerChunkLoading('import');
|
|
249
|
-
chain.optimization.usedExports(false).providedExports(true).innerGraph(false).sideEffects(false);
|
|
250
310
|
for (const condition of [
|
|
251
311
|
'workerd',
|
|
252
312
|
'worker',
|
|
@@ -256,7 +316,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
256
316
|
'require',
|
|
257
317
|
'module'
|
|
258
318
|
])chain.resolve.conditionNames.add(condition);
|
|
259
|
-
chain
|
|
319
|
+
applyCloudflareWorkerMfRuntimeBoundary(chain);
|
|
260
320
|
if (tanstackRouterSsrServerFile) {
|
|
261
321
|
chain.resolve.alias.set('@tanstack/router-core/ssr/server$', tanstackRouterSsrServerFile);
|
|
262
322
|
chain.resolve.alias.set('@tanstack/router-core/ssr/server', tanstackRouterSsrServerFile);
|
|
@@ -297,4 +357,4 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
297
357
|
builderConfig: tempBuilderConfig
|
|
298
358
|
};
|
|
299
359
|
}
|
|
300
|
-
export { getBuilderEnvironments };
|
|
360
|
+
export { applyCloudflareWorkerMfRuntimeBoundary, applyCloudflareWorkerRspackConfig, getBuilderEnvironments, getCloudflareWorkerRspackConfig };
|