@bleedingdev/modern-js-ultramodern-create 3.9.0-ultramodern.19 → 3.9.0-ultramodern.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/ultramodern-tooling/commands/cloudflare-output-verify.cjs +19 -2
  3. package/dist/cjs/ultramodern-workspace/module-federation/config.cjs +5 -3
  4. package/dist/cjs/ultramodern-workspace/patch-inventory.cjs +33 -24
  5. package/dist/cjs/ultramodern-workspace/versions.cjs +3 -9
  6. package/dist/cjs/ultramodern-workspace/workspace-script-plan.cjs +15 -11
  7. package/dist/esm/ultramodern-tooling/commands/cloudflare-output-verify.js +19 -2
  8. package/dist/esm/ultramodern-workspace/module-federation/config.js +5 -3
  9. package/dist/esm/ultramodern-workspace/patch-inventory.js +33 -24
  10. package/dist/esm/ultramodern-workspace/versions.js +4 -7
  11. package/dist/esm/ultramodern-workspace/workspace-script-plan.js +15 -11
  12. package/dist/esm-node/ultramodern-tooling/commands/cloudflare-output-verify.js +19 -2
  13. package/dist/esm-node/ultramodern-workspace/module-federation/config.js +5 -3
  14. package/dist/esm-node/ultramodern-workspace/patch-inventory.js +33 -24
  15. package/dist/esm-node/ultramodern-workspace/versions.js +4 -7
  16. package/dist/esm-node/ultramodern-workspace/workspace-script-plan.js +15 -11
  17. package/dist/types/ultramodern-workspace/policy.d.ts +4 -6
  18. package/dist/types/ultramodern-workspace/versions.d.ts +7 -10
  19. package/package.json +9 -9
  20. package/release-cohort.json +48 -48
  21. package/template-workspace/README.md.handlebars +7 -1
  22. package/templates/workspace/apps/modern.config.ts.handlebars +1 -14
  23. package/templates/workspace-scripts/generate-public-surface-assets.mjs +1 -4
package/README.md CHANGED
@@ -58,8 +58,8 @@ on those values; do not reintroduce Corepack or older pnpm aliases.
58
58
 
59
59
  The current generated dependency cohort also pins `@effect/tsgo@0.45.0`,
60
60
  `@tanstack/react-router@1.170.39`, `@tanstack/router-core@1.171.32`,
61
- `@tanstack/history@1.162.4`, and the Module Federation integration `2.9.1`
62
- cohort, `@module-federation/node@2.7.51`. Move these only through the
61
+ `@tanstack/history@1.162.4`, and the Module Federation integration `2.9.2`
62
+ cohort, `@module-federation/node@2.7.52`. Move these only through the
63
63
  generator-owned version policy so templates, validation, and the published
64
64
  workspace contract stay aligned.
65
65
 
@@ -42,8 +42,19 @@ __webpack_require__.d(__webpack_exports__, {
42
42
  const external_node_module_namespaceObject = require("node:module");
43
43
  const external_node_path_namespaceObject = require("node:path");
44
44
  var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
45
+ const descriptors_cjs_namespaceObject = require("../../ultramodern-workspace/descriptors.cjs");
45
46
  const external_config_cjs_namespaceObject = require("../config.cjs");
46
47
  const external_options_cjs_namespaceObject = require("./options.cjs");
48
+ const REQUIRE_PUBLIC_URLS_FLAG = '--require-public-urls';
49
+ const missingPublicUrl = ({ label, publicUrlEnv })=>{
50
+ if (!publicUrlEnv) return `${REQUIRE_PUBLIC_URLS_FLAG} needs --app, not --output (${label}).`;
51
+ const names = [
52
+ publicUrlEnv,
53
+ 'MODERN_PUBLIC_SITE_URL',
54
+ 'ULTRAMODERN_CLOUDFLARE_WORKERS_DEV_SUBDOMAIN'
55
+ ];
56
+ return names.some((name)=>process.env[name]?.trim()) ? void 0 : `Cloudflare deploy for ${label} needs ${names.join(', ')}.`;
57
+ };
47
58
  const resolveCloudflareOutputVerifyTargets = (args, context)=>{
48
59
  const outputDirectory = (0, external_options_cjs_namespaceObject.readOption)(args, '--output');
49
60
  const appId = (0, external_options_cjs_namespaceObject.readOption)(args, '--app');
@@ -55,7 +66,8 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
55
66
  }
56
67
  ] : (0, external_config_cjs_namespaceObject.workspaceAppsFromToolingConfig)((0, external_config_cjs_namespaceObject.readUltramodernConfig)(context.workspaceRoot), context.workspaceRoot).filter((app)=>!appId || app.id === appId).map((app)=>({
57
68
  label: app.id,
58
- outputDirectory: external_node_path_default().join(context.workspaceRoot, app.directory, '.output')
69
+ outputDirectory: external_node_path_default().join(context.workspaceRoot, app.directory, '.output'),
70
+ publicUrlEnv: (0, descriptors_cjs_namespaceObject.createCloudflarePublicUrlEnv)(app)
59
71
  }));
60
72
  if (0 === targets.length) throw new Error(`No generated UltraModern app matched ${appId}.`);
61
73
  return targets;
@@ -63,14 +75,19 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
63
75
  async function runCloudflareOutputVerify(args, context) {
64
76
  if (args.includes('--help') || args.includes('-h')) {
65
77
  process.stdout.write(`Usage:
66
- ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>]
78
+ ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>] [--require-public-urls]
67
79
 
68
80
  Verifies generated Cloudflare output against the UltraModern worker contract.
69
81
  Without --app or --output, every generated workspace app is verified.
82
+ --require-public-urls also fails an app that has no public URL to deploy to.
70
83
  `);
71
84
  return 0;
72
85
  }
73
86
  const targets = resolveCloudflareOutputVerifyTargets(args, context);
87
+ if (args.includes(REQUIRE_PUBLIC_URLS_FLAG)) {
88
+ const missing = targets.map(missingPublicUrl).filter((message)=>Boolean(message));
89
+ if (missing.length > 0) throw new Error(missing.join('\n'));
90
+ }
74
91
  const verifierRequire = (0, external_node_module_namespaceObject.createRequire)(external_node_path_default().join(context.workspaceRoot, 'package.json'));
75
92
  const { verifyCloudflareOutput, verifyCloudflareOutputMutationPolicy } = verifierRequire('@modern-js/app-tools-extensions/cloudflare-output-verifier');
76
93
  let failed = false;
@@ -47,11 +47,14 @@ function createAppModernConfig(scope, app, remotes = [], enableTailwind = true,
47
47
  const deliveryUnit = (0, external_delivery_unit_cjs_namespaceObject.createDeliveryUnitRecord)(scope, app);
48
48
  const emitsUi = (0, external_descriptors_cjs_namespaceObject.appEmitsBrowserUi)(app);
49
49
  const bffImport = (0, external_descriptors_cjs_namespaceObject.appHasApi)(app) ? "import { bffPlugin } from '@modern-js/plugin-bff-build-extensions';\n" : '';
50
- const uiImports = emitsUi ? `import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';
50
+ const uiImports = emitsUi ? `import {
51
+ getBuildConfigEnvironment,
52
+ resolveDeployTarget,
53
+ } from '@modern-js/app-tools-extensions/config';
51
54
  import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
52
55
  import { withZephyr as withZephyrRspack } from 'zephyr-rspack-plugin';
53
56
  import { ultramodernLocalisedUrls } from './src/routes/ultramodern-route-metadata';
54
- ` : "import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';\n";
57
+ ` : "import {\n getBuildConfigEnvironment,\n resolveDeployTarget,\n} from '@modern-js/app-tools-extensions/config';\n";
55
58
  const zephyrPluginSource = emitsUi ? `const zephyrRspackPlugin = () => ({
56
59
  name: 'ultramodern-zephyr-rspack-plugin',
57
60
  pre: ['@modern-js/plugin-module-federation-config'],
@@ -156,7 +159,6 @@ const defaultAssetPrefix = defaultRemoteAssetPrefix;`;
156
159
  value5: (0, external_descriptors_cjs_namespaceObject.createCloudflarePublicUrlEnv)(app),
157
160
  value6: String(external_descriptors_cjs_namespaceObject.shellApp.port),
158
161
  value7: defaultAssetPrefixSource,
159
- value8: (0, external_descriptors_cjs_namespaceObject.createCloudflarePublicUrlEnv)(app),
160
162
  value9: bffConfig,
161
163
  value10: external_versions_cjs_namespaceObject.CLOUDFLARE_COMPATIBILITY_DATE,
162
164
  value11: (0, external_policy_cjs_namespaceObject.formatTsJsonValue)((0, external_types_cjs_namespaceObject.sortJsonValue)((0, external_policy_cjs_namespaceObject.createCloudflareSecurityContract)()), 16),
@@ -30,57 +30,66 @@ __webpack_require__.r(__webpack_exports__);
30
30
  const __rspack_default_export = [
31
31
  {
32
32
  packageName: '@module-federation/bridge-react',
33
- version: '2.9.1',
34
- path: 'patches/@module-federation__bridge-react@2.9.1.patch',
35
- sha256: '8c084f41790295af8fd015b897c6298bbc13d927b796c624ac96cb2bdb4bc87c',
33
+ version: '2.9.2',
34
+ path: 'patches/@module-federation__bridge-react@2.9.2.patch',
35
+ sha256: '2d8a06e2ef045f877d6b0c5f741053dc8183cb6194f42b704357f426f315d0db',
36
36
  repository: true,
37
37
  workspace: null,
38
- reason: 'Portable React declaration specifiers.'
38
+ reason: 'Portable React declaration specifiers ([#5130](https://github.com/module-federation/core/pull/5130)).'
39
39
  },
40
40
  {
41
41
  packageName: '@module-federation/dts-plugin',
42
- version: '2.9.1',
43
- path: 'patches/@module-federation__dts-plugin@2.9.1.patch',
44
- sha256: 'c52b86d551da354492cf255cfb8c0e56e51cb6b4452319b47295ac969704819d',
42
+ version: '2.9.2',
43
+ path: 'patches/@module-federation__dts-plugin@2.9.2.patch',
44
+ sha256: 'feb8052c1549593cba0c0885b8fd0143e1d8f3f0ff68acbbeb3287063e6808d6',
45
45
  repository: true,
46
46
  workspace: null,
47
- reason: 'Bind the type server before publishing its port (upstream PR pending); execute absolute compilerInstance paths without a shell ([#5131](https://github.com/module-federation/core/pull/5131)); preserve declaration rootDir ([#4947](https://github.com/module-federation/core/pull/4947)).'
47
+ reason: 'Bind the type server to port 0 and yield a busy broker port ([#5159](https://github.com/module-federation/core/pull/5159)); execute absolute compilerInstance paths without a shell ([#5131](https://github.com/module-federation/core/pull/5131)); pass the inferred rootDir to the list-files config (the rootDir hunk of [#4947](https://github.com/module-federation/core/pull/4947)).'
48
48
  },
49
49
  {
50
50
  packageName: '@module-federation/manifest',
51
- version: '2.9.1',
52
- path: 'patches/@module-federation__manifest@2.9.1.patch',
53
- sha256: 'a31d4d30913ffb579faf42be4f1c03a0f330d3f09348e9eedc00059d6e8d123f',
51
+ version: '2.9.2',
52
+ path: 'patches/@module-federation__manifest@2.9.2.patch',
53
+ sha256: 'bbb5b50645aa4f67570bf2a361f92cd24c15a90e471f81057b28e01abbd80f03',
54
54
  repository: true,
55
55
  workspace: null,
56
- reason: 'Defer DTS loading when DTS is disabled.'
56
+ reason: 'Load dts-plugin lazily when DTS is disabled ([#5132](https://github.com/module-federation/core/pull/5132)).'
57
57
  },
58
58
  {
59
59
  packageName: '@module-federation/modern-js-v3',
60
- version: '2.9.1',
61
- path: 'patches/@module-federation__modern-js-v3@2.9.1.patch',
62
- sha256: '3d000f33015d32b14dcf9e46672e7d6867317ad9f43e95b2c392c3d5a7c052ab',
60
+ version: '2.9.2',
61
+ path: 'patches/@module-federation__modern-js-v3@2.9.2.patch',
62
+ sha256: 'a2290f00a31ae2890697520df938b2ae812998a502554840e778289057f6599b',
63
63
  repository: true,
64
64
  workspace: null,
65
- reason: "Preserve lazy compilation, framework CSS ownership, SSR manifest recovery, valid async splitting and native ESM CLI package resolution; keep the SSR dev reload script out of client renders ([#5158](https://github.com/module-federation/core/pull/5158))."
65
+ reason: 'Resolve CLI runtime plugins through createRequire in the ESM builds ([#5133](https://github.com/module-federation/core/pull/5133)); constrain stream SSR splitChunks filters ([#4851](https://github.com/module-federation/core/pull/4851)); reset the federation runtime on server repack ([#5152](https://github.com/module-federation/core/pull/5152)); keep SSR runtime plugins out of web-worker builds ([#5155](https://github.com/module-federation/core/pull/5155)); disable server splitChunks for SSR builds ([#5156](https://github.com/module-federation/core/pull/5156)); reload SSR dev pages through the dev-server socket instead of SSRLiveReload ([#5158](https://github.com/module-federation/core/pull/5158)).'
66
+ },
67
+ {
68
+ packageName: '@module-federation/node',
69
+ version: '2.7.52',
70
+ path: 'patches/@module-federation__node@2.7.52.patch',
71
+ sha256: 'f54e44940ed53ee3ffd11428734c58a27c96d27374ea00596c746a2ab738a1a5',
72
+ repository: true,
73
+ workspace: null,
74
+ reason: 'Reset the federation runtime in performReload ([#5152](https://github.com/module-federation/core/pull/5152)) and guard the bundle-only module cache when called from plain Node ([#5158](https://github.com/module-federation/core/pull/5158)).'
66
75
  },
67
76
  {
68
77
  packageName: '@module-federation/rspack',
69
- version: '2.9.1',
70
- path: 'patches/@module-federation__rspack@2.9.1.patch',
71
- sha256: '7beed0f736d66f78abeba9ed9b5537e571eff92f49aa03bd30a6b674f32f4eae',
78
+ version: '2.9.2',
79
+ path: 'patches/@module-federation__rspack@2.9.2.patch',
80
+ sha256: '06641dcd38197ccc8831f0dca7f6ff37b05ee2e771686816cc3d3f3c57c0e8af',
72
81
  repository: true,
73
82
  workspace: null,
74
- reason: 'Defer DTS plugin loading when DTS is disabled.'
83
+ reason: 'Load dts-plugin lazily when DTS is disabled ([#5132](https://github.com/module-federation/core/pull/5132)).'
75
84
  },
76
85
  {
77
86
  packageName: '@module-federation/runtime-core',
78
- version: '2.9.1',
79
- path: 'patches/@module-federation__runtime-core@2.9.1.patch',
80
- sha256: 'b241be221397f0e07dbe6c515725e12eaf3b418469bb7dd21750e6e4b215dd8d',
87
+ version: '2.9.2',
88
+ path: 'patches/@module-federation__runtime-core@2.9.2.patch',
89
+ sha256: 'f7b9f3dcdb48ee9a00b2dfc858f2b403e00355b154142f876ac71648e27a9867',
81
90
  repository: true,
82
91
  workspace: null,
83
- reason: 'Import ResourceLoadContext used by public remote hooks.'
92
+ reason: 'Add helpers.global.resetFederationRuntime() for rebuilt server bundles ([#5152](https://github.com/module-federation/core/pull/5152)).'
84
93
  }
85
94
  ];
86
95
  __webpack_require__.d(__webpack_exports__, {}, {
@@ -30,8 +30,8 @@ __webpack_require__.r(__webpack_exports__);
30
30
  const TANSTACK_ROUTER_VERSION = '1.170.39';
31
31
  const TANSTACK_ROUTER_CORE_VERSION = '1.171.32';
32
32
  const TANSTACK_HISTORY_VERSION = '1.162.4';
33
- const MODULE_FEDERATION_VERSION = '2.9.1';
34
- const MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION = '2.9.2';
33
+ const MODULE_FEDERATION_VERSION = '2.9.2';
34
+ const MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION = '2.9.3';
35
35
  const ZEPHYR_RSPACK_PLUGIN_VERSION = '1.4.0';
36
36
  const ZEPHYR_AGENT_VERSION = '1.4.0';
37
37
  const WRANGLER_VERSION = '4.137.0';
@@ -46,10 +46,9 @@ const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260707.2';
46
46
  const OXLINT_VERSION = '1.85.0';
47
47
  const OXFMT_VERSION = '0.70.0';
48
48
  const ULTRACITE_VERSION = '7.12.0';
49
- const CROSS_ENV_VERSION = '10.1.0';
50
49
  const LEFTHOOK_VERSION = '^2.1.14';
51
50
  const I18NEXT_VERSION = '26.4.2';
52
- const MODULE_FEDERATION_NODE_VERSION = '2.7.51';
51
+ const MODULE_FEDERATION_NODE_VERSION = '2.7.52';
53
52
  const MINIFLARE_VERSION = '5.20260921.0-alpha';
54
53
  const WORKERD_VERSION = '1.20260921.1';
55
54
  const CLOUDFLARE_WORKERS_TYPES_VERSION = '5.20260923.1';
@@ -83,7 +82,6 @@ const ULTRAMODERN_PACKAGE_PINS = {
83
82
  '@types/node': TYPES_NODE_VERSION,
84
83
  '@types/react': TYPES_REACT_VERSION,
85
84
  '@types/react-dom': TYPES_REACT_DOM_VERSION,
86
- 'cross-env': CROSS_ENV_VERSION,
87
85
  tailwindcss: `^${TAILWIND_VERSION}`,
88
86
  typescript: TYPESCRIPT_VERSION,
89
87
  wrangler: WRANGLER_VERSION,
@@ -93,7 +91,6 @@ const ULTRAMODERN_PACKAGE_PINS = {
93
91
  '@effect/tsgo': EFFECT_TSGO_VERSION,
94
92
  "@typescript/native": `npm:typescript@${TYPESCRIPT_VERSION}`,
95
93
  '@types/node': TYPES_NODE_VERSION,
96
- 'cross-env': CROSS_ENV_VERSION,
97
94
  lefthook: LEFTHOOK_VERSION,
98
95
  miniflare: MINIFLARE_VERSION,
99
96
  oxlint: OXLINT_VERSION,
@@ -115,7 +112,6 @@ const ULTRAMODERN_PACKAGE_PINS = {
115
112
  __webpack_require__.d(__webpack_exports__, {}, {
116
113
  CLOUDFLARE_COMPATIBILITY_DATE: CLOUDFLARE_COMPATIBILITY_DATE,
117
114
  CLOUDFLARE_WORKERS_TYPES_VERSION: CLOUDFLARE_WORKERS_TYPES_VERSION,
118
- CROSS_ENV_VERSION: CROSS_ENV_VERSION,
119
115
  EFFECT_TSGO_VERSION: EFFECT_TSGO_VERSION,
120
116
  EFFECT_VERSION: EFFECT_VERSION,
121
117
  I18NEXT_VERSION: I18NEXT_VERSION,
@@ -151,7 +147,6 @@ __webpack_require__.d(__webpack_exports__, {}, {
151
147
  });
152
148
  exports.CLOUDFLARE_COMPATIBILITY_DATE = __webpack_exports__.CLOUDFLARE_COMPATIBILITY_DATE;
153
149
  exports.CLOUDFLARE_WORKERS_TYPES_VERSION = __webpack_exports__.CLOUDFLARE_WORKERS_TYPES_VERSION;
154
- exports.CROSS_ENV_VERSION = __webpack_exports__.CROSS_ENV_VERSION;
155
150
  exports.EFFECT_TSGO_VERSION = __webpack_exports__.EFFECT_TSGO_VERSION;
156
151
  exports.EFFECT_VERSION = __webpack_exports__.EFFECT_VERSION;
157
152
  exports.I18NEXT_VERSION = __webpack_exports__.I18NEXT_VERSION;
@@ -187,7 +182,6 @@ exports.ZEPHYR_RSPACK_PLUGIN_VERSION = __webpack_exports__.ZEPHYR_RSPACK_PLUGIN_
187
182
  for(var __rspack_i in __webpack_exports__)if (-1 === [
188
183
  "CLOUDFLARE_COMPATIBILITY_DATE",
189
184
  "CLOUDFLARE_WORKERS_TYPES_VERSION",
190
- "CROSS_ENV_VERSION",
191
185
  "EFFECT_TSGO_VERSION",
192
186
  "EFFECT_VERSION",
193
187
  "I18NEXT_VERSION",
@@ -89,25 +89,29 @@ function createWorkspaceAppScriptPlan(app) {
89
89
  const routesGenerate = createRoutesGenerateCommand(app);
90
90
  const buildSteps = [
91
91
  routesGenerate,
92
- 'modern build',
92
+ 'modern build --deploy-target node',
93
93
  (0, external_public_surface_cjs_namespaceObject.createPublicSurfaceGenerationCommand)(app, 'dist'),
94
- 'cross-env MODERNJS_DEPLOY=node modern deploy --skip-build'
95
- ].filter((step)=>Boolean(step));
96
- const cloudflareBuildSteps = [
97
- routesGenerate,
98
- 'cross-env MODERNJS_DEPLOY=cloudflare modern build',
99
- (0, external_public_surface_cjs_namespaceObject.createPublicSurfaceGenerationCommand)(app, 'cloudflare-dist'),
100
- 'cross-env MODERNJS_DEPLOY=cloudflare modern deploy --skip-build',
101
- `${packageToolingWrapperCommand(app.directory, 'cloudflareOutputVerify')} --app ${app.id}`
94
+ 'modern deploy --skip-build --deploy-target node'
102
95
  ].filter((step)=>Boolean(step));
96
+ const cloudflareOutputVerify = `${packageToolingWrapperCommand(app.directory, 'cloudflareOutputVerify')} --app ${app.id}`;
97
+ const cloudflareBuildSteps = (requirePublicUrls)=>[
98
+ routesGenerate,
99
+ 'modern build --deploy-target cloudflare',
100
+ (0, external_public_surface_cjs_namespaceObject.createPublicSurfaceGenerationCommand)(app, 'cloudflare-dist', requirePublicUrls),
101
+ 'modern deploy --skip-build --deploy-target cloudflare',
102
+ requirePublicUrls ? `${cloudflareOutputVerify} --require-public-urls` : cloudflareOutputVerify
103
+ ].filter((step)=>Boolean(step));
103
104
  return {
104
105
  dev: [
105
106
  routesGenerate,
106
107
  'modern dev'
107
108
  ].filter((step)=>Boolean(step)).join(' && '),
108
109
  build: buildSteps.join(' && '),
109
- cloudflareBuild: cloudflareBuildSteps.join(' && '),
110
- cloudflareDeploy: 'cross-env ULTRAMODERN_CLOUDFLARE_REQUIRE_PUBLIC_URLS=true ZE_FAIL_BUILD=true pnpm run cloudflare:build && wrangler deploy --config .output/wrangler.json',
110
+ cloudflareBuild: cloudflareBuildSteps(false).join(' && '),
111
+ cloudflareDeploy: [
112
+ ...cloudflareBuildSteps(true),
113
+ 'wrangler deploy --config .output/wrangler.json'
114
+ ].join(' && '),
111
115
  cloudflarePreview: 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
112
116
  cloudflareProof: `${packageToolingWrapperCommand(app.directory, 'cloudflareProof')} --app ${app.id}`,
113
117
  serve: 'modern serve',
@@ -1,7 +1,18 @@
1
1
  import { createRequire } from "node:module";
2
2
  import node_path from "node:path";
3
+ import { createCloudflarePublicUrlEnv } from "../../ultramodern-workspace/descriptors.js";
3
4
  import { readUltramodernConfig, workspaceAppsFromToolingConfig } from "../config.js";
4
5
  import { readOption } from "./options.js";
6
+ const REQUIRE_PUBLIC_URLS_FLAG = '--require-public-urls';
7
+ const missingPublicUrl = ({ label, publicUrlEnv })=>{
8
+ if (!publicUrlEnv) return `${REQUIRE_PUBLIC_URLS_FLAG} needs --app, not --output (${label}).`;
9
+ const names = [
10
+ publicUrlEnv,
11
+ 'MODERN_PUBLIC_SITE_URL',
12
+ 'ULTRAMODERN_CLOUDFLARE_WORKERS_DEV_SUBDOMAIN'
13
+ ];
14
+ return names.some((name)=>process.env[name]?.trim()) ? void 0 : `Cloudflare deploy for ${label} needs ${names.join(', ')}.`;
15
+ };
5
16
  const resolveCloudflareOutputVerifyTargets = (args, context)=>{
6
17
  const outputDirectory = readOption(args, '--output');
7
18
  const appId = readOption(args, '--app');
@@ -13,7 +24,8 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
13
24
  }
14
25
  ] : workspaceAppsFromToolingConfig(readUltramodernConfig(context.workspaceRoot), context.workspaceRoot).filter((app)=>!appId || app.id === appId).map((app)=>({
15
26
  label: app.id,
16
- outputDirectory: node_path.join(context.workspaceRoot, app.directory, '.output')
27
+ outputDirectory: node_path.join(context.workspaceRoot, app.directory, '.output'),
28
+ publicUrlEnv: createCloudflarePublicUrlEnv(app)
17
29
  }));
18
30
  if (0 === targets.length) throw new Error(`No generated UltraModern app matched ${appId}.`);
19
31
  return targets;
@@ -21,14 +33,19 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
21
33
  async function runCloudflareOutputVerify(args, context) {
22
34
  if (args.includes('--help') || args.includes('-h')) {
23
35
  process.stdout.write(`Usage:
24
- ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>]
36
+ ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>] [--require-public-urls]
25
37
 
26
38
  Verifies generated Cloudflare output against the UltraModern worker contract.
27
39
  Without --app or --output, every generated workspace app is verified.
40
+ --require-public-urls also fails an app that has no public URL to deploy to.
28
41
  `);
29
42
  return 0;
30
43
  }
31
44
  const targets = resolveCloudflareOutputVerifyTargets(args, context);
45
+ if (args.includes(REQUIRE_PUBLIC_URLS_FLAG)) {
46
+ const missing = targets.map(missingPublicUrl).filter((message)=>Boolean(message));
47
+ if (missing.length > 0) throw new Error(missing.join('\n'));
48
+ }
32
49
  const verifierRequire = createRequire(node_path.join(context.workspaceRoot, 'package.json'));
33
50
  const { verifyCloudflareOutput, verifyCloudflareOutputMutationPolicy } = verifierRequire('@modern-js/app-tools-extensions/cloudflare-output-verifier');
34
51
  let failed = false;
@@ -12,11 +12,14 @@ function createAppModernConfig(scope, app, remotes = [], enableTailwind = true,
12
12
  const deliveryUnit = createDeliveryUnitRecord(scope, app);
13
13
  const emitsUi = appEmitsBrowserUi(app);
14
14
  const bffImport = appHasApi(app) ? "import { bffPlugin } from '@modern-js/plugin-bff-build-extensions';\n" : '';
15
- const uiImports = emitsUi ? `import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';
15
+ const uiImports = emitsUi ? `import {
16
+ getBuildConfigEnvironment,
17
+ resolveDeployTarget,
18
+ } from '@modern-js/app-tools-extensions/config';
16
19
  import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
17
20
  import { withZephyr as withZephyrRspack } from 'zephyr-rspack-plugin';
18
21
  import { ultramodernLocalisedUrls } from './src/routes/ultramodern-route-metadata';
19
- ` : "import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';\n";
22
+ ` : "import {\n getBuildConfigEnvironment,\n resolveDeployTarget,\n} from '@modern-js/app-tools-extensions/config';\n";
20
23
  const zephyrPluginSource = emitsUi ? `const zephyrRspackPlugin = () => ({
21
24
  name: 'ultramodern-zephyr-rspack-plugin',
22
25
  pre: ['@modern-js/plugin-module-federation-config'],
@@ -121,7 +124,6 @@ const defaultAssetPrefix = defaultRemoteAssetPrefix;`;
121
124
  value5: createCloudflarePublicUrlEnv(app),
122
125
  value6: String(shellApp.port),
123
126
  value7: defaultAssetPrefixSource,
124
- value8: createCloudflarePublicUrlEnv(app),
125
127
  value9: bffConfig,
126
128
  value10: CLOUDFLARE_COMPATIBILITY_DATE,
127
129
  value11: formatTsJsonValue(sortJsonValue(createCloudflareSecurityContract()), 16),
@@ -1,57 +1,66 @@
1
1
  const patch_inventory = [
2
2
  {
3
3
  packageName: '@module-federation/bridge-react',
4
- version: '2.9.1',
5
- path: 'patches/@module-federation__bridge-react@2.9.1.patch',
6
- sha256: '8c084f41790295af8fd015b897c6298bbc13d927b796c624ac96cb2bdb4bc87c',
4
+ version: '2.9.2',
5
+ path: 'patches/@module-federation__bridge-react@2.9.2.patch',
6
+ sha256: '2d8a06e2ef045f877d6b0c5f741053dc8183cb6194f42b704357f426f315d0db',
7
7
  repository: true,
8
8
  workspace: null,
9
- reason: 'Portable React declaration specifiers.'
9
+ reason: 'Portable React declaration specifiers ([#5130](https://github.com/module-federation/core/pull/5130)).'
10
10
  },
11
11
  {
12
12
  packageName: '@module-federation/dts-plugin',
13
- version: '2.9.1',
14
- path: 'patches/@module-federation__dts-plugin@2.9.1.patch',
15
- sha256: 'c52b86d551da354492cf255cfb8c0e56e51cb6b4452319b47295ac969704819d',
13
+ version: '2.9.2',
14
+ path: 'patches/@module-federation__dts-plugin@2.9.2.patch',
15
+ sha256: 'feb8052c1549593cba0c0885b8fd0143e1d8f3f0ff68acbbeb3287063e6808d6',
16
16
  repository: true,
17
17
  workspace: null,
18
- reason: 'Bind the type server before publishing its port (upstream PR pending); execute absolute compilerInstance paths without a shell ([#5131](https://github.com/module-federation/core/pull/5131)); preserve declaration rootDir ([#4947](https://github.com/module-federation/core/pull/4947)).'
18
+ reason: 'Bind the type server to port 0 and yield a busy broker port ([#5159](https://github.com/module-federation/core/pull/5159)); execute absolute compilerInstance paths without a shell ([#5131](https://github.com/module-federation/core/pull/5131)); pass the inferred rootDir to the list-files config (the rootDir hunk of [#4947](https://github.com/module-federation/core/pull/4947)).'
19
19
  },
20
20
  {
21
21
  packageName: '@module-federation/manifest',
22
- version: '2.9.1',
23
- path: 'patches/@module-federation__manifest@2.9.1.patch',
24
- sha256: 'a31d4d30913ffb579faf42be4f1c03a0f330d3f09348e9eedc00059d6e8d123f',
22
+ version: '2.9.2',
23
+ path: 'patches/@module-federation__manifest@2.9.2.patch',
24
+ sha256: 'bbb5b50645aa4f67570bf2a361f92cd24c15a90e471f81057b28e01abbd80f03',
25
25
  repository: true,
26
26
  workspace: null,
27
- reason: 'Defer DTS loading when DTS is disabled.'
27
+ reason: 'Load dts-plugin lazily when DTS is disabled ([#5132](https://github.com/module-federation/core/pull/5132)).'
28
28
  },
29
29
  {
30
30
  packageName: '@module-federation/modern-js-v3',
31
- version: '2.9.1',
32
- path: 'patches/@module-federation__modern-js-v3@2.9.1.patch',
33
- sha256: '3d000f33015d32b14dcf9e46672e7d6867317ad9f43e95b2c392c3d5a7c052ab',
31
+ version: '2.9.2',
32
+ path: 'patches/@module-federation__modern-js-v3@2.9.2.patch',
33
+ sha256: 'a2290f00a31ae2890697520df938b2ae812998a502554840e778289057f6599b',
34
34
  repository: true,
35
35
  workspace: null,
36
- reason: "Preserve lazy compilation, framework CSS ownership, SSR manifest recovery, valid async splitting and native ESM CLI package resolution; keep the SSR dev reload script out of client renders ([#5158](https://github.com/module-federation/core/pull/5158))."
36
+ reason: 'Resolve CLI runtime plugins through createRequire in the ESM builds ([#5133](https://github.com/module-federation/core/pull/5133)); constrain stream SSR splitChunks filters ([#4851](https://github.com/module-federation/core/pull/4851)); reset the federation runtime on server repack ([#5152](https://github.com/module-federation/core/pull/5152)); keep SSR runtime plugins out of web-worker builds ([#5155](https://github.com/module-federation/core/pull/5155)); disable server splitChunks for SSR builds ([#5156](https://github.com/module-federation/core/pull/5156)); reload SSR dev pages through the dev-server socket instead of SSRLiveReload ([#5158](https://github.com/module-federation/core/pull/5158)).'
37
+ },
38
+ {
39
+ packageName: '@module-federation/node',
40
+ version: '2.7.52',
41
+ path: 'patches/@module-federation__node@2.7.52.patch',
42
+ sha256: 'f54e44940ed53ee3ffd11428734c58a27c96d27374ea00596c746a2ab738a1a5',
43
+ repository: true,
44
+ workspace: null,
45
+ reason: 'Reset the federation runtime in performReload ([#5152](https://github.com/module-federation/core/pull/5152)) and guard the bundle-only module cache when called from plain Node ([#5158](https://github.com/module-federation/core/pull/5158)).'
37
46
  },
38
47
  {
39
48
  packageName: '@module-federation/rspack',
40
- version: '2.9.1',
41
- path: 'patches/@module-federation__rspack@2.9.1.patch',
42
- sha256: '7beed0f736d66f78abeba9ed9b5537e571eff92f49aa03bd30a6b674f32f4eae',
49
+ version: '2.9.2',
50
+ path: 'patches/@module-federation__rspack@2.9.2.patch',
51
+ sha256: '06641dcd38197ccc8831f0dca7f6ff37b05ee2e771686816cc3d3f3c57c0e8af',
43
52
  repository: true,
44
53
  workspace: null,
45
- reason: 'Defer DTS plugin loading when DTS is disabled.'
54
+ reason: 'Load dts-plugin lazily when DTS is disabled ([#5132](https://github.com/module-federation/core/pull/5132)).'
46
55
  },
47
56
  {
48
57
  packageName: '@module-federation/runtime-core',
49
- version: '2.9.1',
50
- path: 'patches/@module-federation__runtime-core@2.9.1.patch',
51
- sha256: 'b241be221397f0e07dbe6c515725e12eaf3b418469bb7dd21750e6e4b215dd8d',
58
+ version: '2.9.2',
59
+ path: 'patches/@module-federation__runtime-core@2.9.2.patch',
60
+ sha256: 'f7b9f3dcdb48ee9a00b2dfc858f2b403e00355b154142f876ac71648e27a9867',
52
61
  repository: true,
53
62
  workspace: null,
54
- reason: 'Import ResourceLoadContext used by public remote hooks.'
63
+ reason: 'Add helpers.global.resetFederationRuntime() for rebuilt server bundles ([#5152](https://github.com/module-federation/core/pull/5152)).'
55
64
  }
56
65
  ];
57
66
  export default patch_inventory;
@@ -1,8 +1,8 @@
1
1
  const TANSTACK_ROUTER_VERSION = '1.170.39';
2
2
  const TANSTACK_ROUTER_CORE_VERSION = '1.171.32';
3
3
  const TANSTACK_HISTORY_VERSION = '1.162.4';
4
- const MODULE_FEDERATION_VERSION = '2.9.1';
5
- const MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION = '2.9.2';
4
+ const MODULE_FEDERATION_VERSION = '2.9.2';
5
+ const MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION = '2.9.3';
6
6
  const ZEPHYR_RSPACK_PLUGIN_VERSION = '1.4.0';
7
7
  const ZEPHYR_AGENT_VERSION = '1.4.0';
8
8
  const WRANGLER_VERSION = '4.137.0';
@@ -17,10 +17,9 @@ const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260707.2';
17
17
  const OXLINT_VERSION = '1.85.0';
18
18
  const OXFMT_VERSION = '0.70.0';
19
19
  const ULTRACITE_VERSION = '7.12.0';
20
- const CROSS_ENV_VERSION = '10.1.0';
21
20
  const LEFTHOOK_VERSION = '^2.1.14';
22
21
  const I18NEXT_VERSION = '26.4.2';
23
- const MODULE_FEDERATION_NODE_VERSION = '2.7.51';
22
+ const MODULE_FEDERATION_NODE_VERSION = '2.7.52';
24
23
  const MINIFLARE_VERSION = '5.20260921.0-alpha';
25
24
  const WORKERD_VERSION = '1.20260921.1';
26
25
  const CLOUDFLARE_WORKERS_TYPES_VERSION = '5.20260923.1';
@@ -54,7 +53,6 @@ const ULTRAMODERN_PACKAGE_PINS = {
54
53
  '@types/node': TYPES_NODE_VERSION,
55
54
  '@types/react': TYPES_REACT_VERSION,
56
55
  '@types/react-dom': TYPES_REACT_DOM_VERSION,
57
- 'cross-env': CROSS_ENV_VERSION,
58
56
  tailwindcss: `^${TAILWIND_VERSION}`,
59
57
  typescript: TYPESCRIPT_VERSION,
60
58
  wrangler: WRANGLER_VERSION,
@@ -64,7 +62,6 @@ const ULTRAMODERN_PACKAGE_PINS = {
64
62
  '@effect/tsgo': EFFECT_TSGO_VERSION,
65
63
  "@typescript/native": `npm:typescript@${TYPESCRIPT_VERSION}`,
66
64
  '@types/node': TYPES_NODE_VERSION,
67
- 'cross-env': CROSS_ENV_VERSION,
68
65
  lefthook: LEFTHOOK_VERSION,
69
66
  miniflare: MINIFLARE_VERSION,
70
67
  oxlint: OXLINT_VERSION,
@@ -83,4 +80,4 @@ const ULTRAMODERN_PACKAGE_PINS = {
83
80
  workerd: WORKERD_VERSION
84
81
  }
85
82
  };
86
- export { CLOUDFLARE_COMPATIBILITY_DATE, CLOUDFLARE_WORKERS_TYPES_VERSION, CROSS_ENV_VERSION, EFFECT_TSGO_VERSION, EFFECT_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MINIFLARE_VERSION, MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION, MODULE_FEDERATION_NODE_VERSION, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, REACT_DOM_VERSION, REACT_VERSION, RSBUILD_PLUGIN_TAILWINDCSS_VERSION, TAILWIND_VERSION, TANSTACK_HISTORY_VERSION, TANSTACK_ROUTER_CORE_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_NODE_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, ULTRAMODERN_PACKAGE_PINS, WORKERD_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION };
83
+ export { CLOUDFLARE_COMPATIBILITY_DATE, CLOUDFLARE_WORKERS_TYPES_VERSION, EFFECT_TSGO_VERSION, EFFECT_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MINIFLARE_VERSION, MODULE_FEDERATION_MODERN_JS_V3_FORK_VERSION, MODULE_FEDERATION_NODE_VERSION, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, REACT_DOM_VERSION, REACT_VERSION, RSBUILD_PLUGIN_TAILWINDCSS_VERSION, TAILWIND_VERSION, TANSTACK_HISTORY_VERSION, TANSTACK_ROUTER_CORE_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_NODE_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, ULTRAMODERN_PACKAGE_PINS, WORKERD_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION };
@@ -52,25 +52,29 @@ function createWorkspaceAppScriptPlan(app) {
52
52
  const routesGenerate = createRoutesGenerateCommand(app);
53
53
  const buildSteps = [
54
54
  routesGenerate,
55
- 'modern build',
55
+ 'modern build --deploy-target node',
56
56
  createPublicSurfaceGenerationCommand(app, 'dist'),
57
- 'cross-env MODERNJS_DEPLOY=node modern deploy --skip-build'
58
- ].filter((step)=>Boolean(step));
59
- const cloudflareBuildSteps = [
60
- routesGenerate,
61
- 'cross-env MODERNJS_DEPLOY=cloudflare modern build',
62
- createPublicSurfaceGenerationCommand(app, 'cloudflare-dist'),
63
- 'cross-env MODERNJS_DEPLOY=cloudflare modern deploy --skip-build',
64
- `${packageToolingWrapperCommand(app.directory, 'cloudflareOutputVerify')} --app ${app.id}`
57
+ 'modern deploy --skip-build --deploy-target node'
65
58
  ].filter((step)=>Boolean(step));
59
+ const cloudflareOutputVerify = `${packageToolingWrapperCommand(app.directory, 'cloudflareOutputVerify')} --app ${app.id}`;
60
+ const cloudflareBuildSteps = (requirePublicUrls)=>[
61
+ routesGenerate,
62
+ 'modern build --deploy-target cloudflare',
63
+ createPublicSurfaceGenerationCommand(app, 'cloudflare-dist', requirePublicUrls),
64
+ 'modern deploy --skip-build --deploy-target cloudflare',
65
+ requirePublicUrls ? `${cloudflareOutputVerify} --require-public-urls` : cloudflareOutputVerify
66
+ ].filter((step)=>Boolean(step));
66
67
  return {
67
68
  dev: [
68
69
  routesGenerate,
69
70
  'modern dev'
70
71
  ].filter((step)=>Boolean(step)).join(' && '),
71
72
  build: buildSteps.join(' && '),
72
- cloudflareBuild: cloudflareBuildSteps.join(' && '),
73
- cloudflareDeploy: 'cross-env ULTRAMODERN_CLOUDFLARE_REQUIRE_PUBLIC_URLS=true ZE_FAIL_BUILD=true pnpm run cloudflare:build && wrangler deploy --config .output/wrangler.json',
73
+ cloudflareBuild: cloudflareBuildSteps(false).join(' && '),
74
+ cloudflareDeploy: [
75
+ ...cloudflareBuildSteps(true),
76
+ 'wrangler deploy --config .output/wrangler.json'
77
+ ].join(' && '),
74
78
  cloudflarePreview: 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
75
79
  cloudflareProof: `${packageToolingWrapperCommand(app.directory, 'cloudflareProof')} --app ${app.id}`,
76
80
  serve: 'modern serve',
@@ -1,8 +1,19 @@
1
1
  import "node:module";
2
2
  import { createRequire } from "node:module";
3
3
  import node_path from "node:path";
4
+ import { createCloudflarePublicUrlEnv } from "../../ultramodern-workspace/descriptors.js";
4
5
  import { readUltramodernConfig, workspaceAppsFromToolingConfig } from "../config.js";
5
6
  import { readOption } from "./options.js";
7
+ const REQUIRE_PUBLIC_URLS_FLAG = '--require-public-urls';
8
+ const missingPublicUrl = ({ label, publicUrlEnv })=>{
9
+ if (!publicUrlEnv) return `${REQUIRE_PUBLIC_URLS_FLAG} needs --app, not --output (${label}).`;
10
+ const names = [
11
+ publicUrlEnv,
12
+ 'MODERN_PUBLIC_SITE_URL',
13
+ 'ULTRAMODERN_CLOUDFLARE_WORKERS_DEV_SUBDOMAIN'
14
+ ];
15
+ return names.some((name)=>process.env[name]?.trim()) ? void 0 : `Cloudflare deploy for ${label} needs ${names.join(', ')}.`;
16
+ };
6
17
  const resolveCloudflareOutputVerifyTargets = (args, context)=>{
7
18
  const outputDirectory = readOption(args, '--output');
8
19
  const appId = readOption(args, '--app');
@@ -14,7 +25,8 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
14
25
  }
15
26
  ] : workspaceAppsFromToolingConfig(readUltramodernConfig(context.workspaceRoot), context.workspaceRoot).filter((app)=>!appId || app.id === appId).map((app)=>({
16
27
  label: app.id,
17
- outputDirectory: node_path.join(context.workspaceRoot, app.directory, '.output')
28
+ outputDirectory: node_path.join(context.workspaceRoot, app.directory, '.output'),
29
+ publicUrlEnv: createCloudflarePublicUrlEnv(app)
18
30
  }));
19
31
  if (0 === targets.length) throw new Error(`No generated UltraModern app matched ${appId}.`);
20
32
  return targets;
@@ -22,14 +34,19 @@ const resolveCloudflareOutputVerifyTargets = (args, context)=>{
22
34
  async function runCloudflareOutputVerify(args, context) {
23
35
  if (args.includes('--help') || args.includes('-h')) {
24
36
  process.stdout.write(`Usage:
25
- ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>]
37
+ ultramodern-create ultramodern cloudflare-output-verify [--app <id> | --output <dir>] [--require-public-urls]
26
38
 
27
39
  Verifies generated Cloudflare output against the UltraModern worker contract.
28
40
  Without --app or --output, every generated workspace app is verified.
41
+ --require-public-urls also fails an app that has no public URL to deploy to.
29
42
  `);
30
43
  return 0;
31
44
  }
32
45
  const targets = resolveCloudflareOutputVerifyTargets(args, context);
46
+ if (args.includes(REQUIRE_PUBLIC_URLS_FLAG)) {
47
+ const missing = targets.map(missingPublicUrl).filter((message)=>Boolean(message));
48
+ if (missing.length > 0) throw new Error(missing.join('\n'));
49
+ }
33
50
  const verifierRequire = createRequire(node_path.join(context.workspaceRoot, 'package.json'));
34
51
  const { verifyCloudflareOutput, verifyCloudflareOutputMutationPolicy } = verifierRequire('@modern-js/app-tools-extensions/cloudflare-output-verifier');
35
52
  let failed = false;
@@ -13,11 +13,14 @@ function createAppModernConfig(scope, app, remotes = [], enableTailwind = true,
13
13
  const deliveryUnit = createDeliveryUnitRecord(scope, app);
14
14
  const emitsUi = appEmitsBrowserUi(app);
15
15
  const bffImport = appHasApi(app) ? "import { bffPlugin } from '@modern-js/plugin-bff-build-extensions';\n" : '';
16
- const uiImports = emitsUi ? `import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';
16
+ const uiImports = emitsUi ? `import {
17
+ getBuildConfigEnvironment,
18
+ resolveDeployTarget,
19
+ } from '@modern-js/app-tools-extensions/config';
17
20
  import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
18
21
  import { withZephyr as withZephyrRspack } from 'zephyr-rspack-plugin';
19
22
  import { ultramodernLocalisedUrls } from './src/routes/ultramodern-route-metadata';
20
- ` : "import { getBuildConfigEnvironment } from '@modern-js/app-tools-extensions/config';\n";
23
+ ` : "import {\n getBuildConfigEnvironment,\n resolveDeployTarget,\n} from '@modern-js/app-tools-extensions/config';\n";
21
24
  const zephyrPluginSource = emitsUi ? `const zephyrRspackPlugin = () => ({
22
25
  name: 'ultramodern-zephyr-rspack-plugin',
23
26
  pre: ['@modern-js/plugin-module-federation-config'],
@@ -122,7 +125,6 @@ const defaultAssetPrefix = defaultRemoteAssetPrefix;`;
122
125
  value5: createCloudflarePublicUrlEnv(app),
123
126
  value6: String(shellApp.port),
124
127
  value7: defaultAssetPrefixSource,
125
- value8: createCloudflarePublicUrlEnv(app),
126
128
  value9: bffConfig,
127
129
  value10: CLOUDFLARE_COMPATIBILITY_DATE,
128
130
  value11: formatTsJsonValue(sortJsonValue(createCloudflareSecurityContract()), 16),