@bleedingdev/modern-js-create 3.5.0-ultramodern.3 → 3.5.0-ultramodern.30

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 (93) hide show
  1. package/README.md +21 -17
  2. package/dist/cjs/ultramodern-tooling/commands.cjs +772 -75
  3. package/dist/cjs/ultramodern-tooling/config.cjs +149 -8
  4. package/dist/cjs/ultramodern-workspace/add-vertical.cjs +25 -0
  5. package/dist/cjs/ultramodern-workspace/api.cjs +44 -0
  6. package/dist/cjs/ultramodern-workspace/app-files.cjs +8 -11
  7. package/dist/cjs/ultramodern-workspace/backend-federation.cjs +282 -0
  8. package/dist/cjs/ultramodern-workspace/contracts.cjs +24 -8
  9. package/dist/cjs/ultramodern-workspace/delivery-unit-sync.cjs +157 -0
  10. package/dist/cjs/ultramodern-workspace/delivery-unit.cjs +88 -0
  11. package/dist/cjs/ultramodern-workspace/descriptors.cjs +24 -0
  12. package/dist/cjs/ultramodern-workspace/module-federation.cjs +161 -50
  13. package/dist/cjs/ultramodern-workspace/package-json.cjs +26 -43
  14. package/dist/cjs/ultramodern-workspace/pnpm-workspace-policy-plan.cjs +166 -0
  15. package/dist/cjs/ultramodern-workspace/tooling-command-catalog.cjs +153 -0
  16. package/dist/cjs/ultramodern-workspace/versions.cjs +8 -3
  17. package/dist/cjs/ultramodern-workspace/workspace-script-plan.cjs +175 -0
  18. package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +104 -63
  19. package/dist/cjs/ultramodern-workspace/workspace-validation-contract.cjs +97 -0
  20. package/dist/cjs/ultramodern-workspace/write-workspace.cjs +11 -3
  21. package/dist/cjs/ultramodern-workspace/zerops.cjs +100 -0
  22. package/dist/esm/ultramodern-tooling/commands.js +775 -78
  23. package/dist/esm/ultramodern-tooling/config.js +144 -9
  24. package/dist/esm/ultramodern-workspace/add-vertical.js +26 -1
  25. package/dist/esm/ultramodern-workspace/api.js +43 -2
  26. package/dist/esm/ultramodern-workspace/app-files.js +8 -11
  27. package/dist/esm/ultramodern-workspace/backend-federation.js +217 -0
  28. package/dist/esm/ultramodern-workspace/contracts.js +24 -8
  29. package/dist/esm/ultramodern-workspace/delivery-unit-sync.js +108 -0
  30. package/dist/esm/ultramodern-workspace/delivery-unit.js +31 -0
  31. package/dist/esm/ultramodern-workspace/descriptors.js +13 -1
  32. package/dist/esm/ultramodern-workspace/module-federation.js +160 -42
  33. package/dist/esm/ultramodern-workspace/package-json.js +16 -40
  34. package/dist/esm/ultramodern-workspace/pnpm-workspace-policy-plan.js +113 -0
  35. package/dist/esm/ultramodern-workspace/tooling-command-catalog.js +100 -0
  36. package/dist/esm/ultramodern-workspace/versions.js +6 -4
  37. package/dist/esm/ultramodern-workspace/workspace-script-plan.js +110 -0
  38. package/dist/esm/ultramodern-workspace/workspace-scripts.js +88 -65
  39. package/dist/esm/ultramodern-workspace/workspace-validation-contract.js +59 -0
  40. package/dist/esm/ultramodern-workspace/write-workspace.js +14 -6
  41. package/dist/esm/ultramodern-workspace/zerops.js +62 -0
  42. package/dist/esm-node/ultramodern-tooling/commands.js +775 -78
  43. package/dist/esm-node/ultramodern-tooling/config.js +144 -9
  44. package/dist/esm-node/ultramodern-workspace/add-vertical.js +26 -1
  45. package/dist/esm-node/ultramodern-workspace/api.js +43 -2
  46. package/dist/esm-node/ultramodern-workspace/app-files.js +8 -11
  47. package/dist/esm-node/ultramodern-workspace/backend-federation.js +218 -0
  48. package/dist/esm-node/ultramodern-workspace/contracts.js +24 -8
  49. package/dist/esm-node/ultramodern-workspace/delivery-unit-sync.js +109 -0
  50. package/dist/esm-node/ultramodern-workspace/delivery-unit.js +32 -0
  51. package/dist/esm-node/ultramodern-workspace/descriptors.js +13 -1
  52. package/dist/esm-node/ultramodern-workspace/module-federation.js +160 -42
  53. package/dist/esm-node/ultramodern-workspace/package-json.js +16 -40
  54. package/dist/esm-node/ultramodern-workspace/pnpm-workspace-policy-plan.js +114 -0
  55. package/dist/esm-node/ultramodern-workspace/tooling-command-catalog.js +101 -0
  56. package/dist/esm-node/ultramodern-workspace/versions.js +6 -4
  57. package/dist/esm-node/ultramodern-workspace/workspace-script-plan.js +111 -0
  58. package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +88 -65
  59. package/dist/esm-node/ultramodern-workspace/workspace-validation-contract.js +60 -0
  60. package/dist/esm-node/ultramodern-workspace/write-workspace.js +14 -6
  61. package/dist/esm-node/ultramodern-workspace/zerops.js +63 -0
  62. package/dist/types/ultramodern-tooling/config.d.ts +6 -0
  63. package/dist/types/ultramodern-workspace/api.d.ts +1 -0
  64. package/dist/types/ultramodern-workspace/backend-federation.d.ts +11 -0
  65. package/dist/types/ultramodern-workspace/contracts.d.ts +1 -1
  66. package/dist/types/ultramodern-workspace/delivery-unit-sync.d.ts +6 -0
  67. package/dist/types/ultramodern-workspace/delivery-unit.d.ts +27 -0
  68. package/dist/types/ultramodern-workspace/descriptors.d.ts +4 -0
  69. package/dist/types/ultramodern-workspace/module-federation.d.ts +4 -9
  70. package/dist/types/ultramodern-workspace/package-json.d.ts +0 -1
  71. package/dist/types/ultramodern-workspace/pnpm-workspace-policy-plan.d.ts +39 -0
  72. package/dist/types/ultramodern-workspace/tooling-command-catalog.d.ts +18 -0
  73. package/dist/types/ultramodern-workspace/versions.d.ts +5 -3
  74. package/dist/types/ultramodern-workspace/workspace-script-plan.d.ts +72 -0
  75. package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +13 -0
  76. package/dist/types/ultramodern-workspace/workspace-validation-contract.d.ts +42 -0
  77. package/dist/types/ultramodern-workspace/zerops.d.ts +2 -0
  78. package/package.json +3 -3
  79. package/template-workspace/.gitignore.handlebars +4 -0
  80. package/template-workspace/README.md.handlebars +18 -15
  81. package/template-workspace/patches/@module-federation__bridge-react@2.6.0.patch +140 -0
  82. package/template-workspace/patches/@module-federation__modern-js-v3@2.6.0.patch +57 -0
  83. package/template-workspace/patches/drizzle-orm-ts7-strict-declarations.patch +452 -0
  84. package/template-workspace/patches/effect-schema-error-type-id.patch +18 -0
  85. package/template-workspace/pnpm-workspace.yaml.handlebars +8 -0
  86. package/template-workspace/scripts/bootstrap-agent-skills.mjs +11 -3
  87. package/templates/workspace-scripts/check-ultramodern-api-boundaries.mts +40 -2
  88. package/templates/workspace-scripts/generate-node-backend-federation.mjs +270 -0
  89. package/templates/workspace-scripts/materialize-zerops-runtime.mjs +448 -0
  90. package/templates/workspace-scripts/proof-cloudflare-version.mjs +237 -9
  91. package/templates/workspace-scripts/proof-node-backend-federation.mjs +729 -0
  92. package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +188 -2
  93. package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +434 -18
@@ -0,0 +1,113 @@
1
+ import { DRIZZLE_ORM_VERSION, EFFECT_VERSION, EFFECT_VITEST_VERSION, MODULE_FEDERATION_VERSION } from "./versions.js";
2
+ const strictEffectPackageVersionPolicyExclusions = [
3
+ `effect@${EFFECT_VERSION}`,
4
+ `@effect/opentelemetry@${EFFECT_VERSION}`
5
+ ];
6
+ const moduleFederationModernJsPatchPath = `patches/@module-federation__modern-js-v3@${MODULE_FEDERATION_VERSION}.patch`;
7
+ const moduleFederationBridgeReactPatchPath = `patches/@module-federation__bridge-react@${MODULE_FEDERATION_VERSION}.patch`;
8
+ const effectDeclarationPatchPath = 'patches/effect-schema-error-type-id.patch';
9
+ const drizzleOrmDeclarationPatchPath = 'patches/drizzle-orm-ts7-strict-declarations.patch';
10
+ function createPnpmWorkspacePolicyPlan(options) {
11
+ return {
12
+ yamlActions: [
13
+ {
14
+ kind: 'replace-line',
15
+ pattern: /^ {4}'@effect\/vitest>effect': .+$/mu,
16
+ replacement: ` '@effect/vitest>effect': '${EFFECT_VERSION}'`
17
+ },
18
+ {
19
+ kind: 'ensure-scalar-map-entry',
20
+ key: 'overrides',
21
+ entryKey: "'@effect/opentelemetry'",
22
+ value: EFFECT_VERSION
23
+ },
24
+ {
25
+ kind: 'ensure-scalar-map-entry',
26
+ key: 'overrides',
27
+ entryKey: "'@effect/vitest'",
28
+ value: EFFECT_VITEST_VERSION
29
+ },
30
+ {
31
+ kind: 'ensure-scalar-map-entry',
32
+ key: 'overrides',
33
+ entryKey: 'effect',
34
+ value: EFFECT_VERSION
35
+ },
36
+ {
37
+ kind: 'ensure-scalar-map-entry',
38
+ key: 'allowBuilds',
39
+ entryKey: "'@parcel/watcher'",
40
+ value: 'true'
41
+ },
42
+ ...strictEffectPackageVersionPolicyExclusions.flatMap((item)=>createStrictEffectPackageVersionPolicyActions(item)),
43
+ {
44
+ kind: 'ensure-map-entry',
45
+ key: 'patchedDependencies',
46
+ entryKey: `effect@${EFFECT_VERSION}`,
47
+ value: effectDeclarationPatchPath
48
+ },
49
+ {
50
+ kind: 'ensure-map-entry',
51
+ key: 'patchedDependencies',
52
+ entryKey: `@module-federation/modern-js-v3@${MODULE_FEDERATION_VERSION}`,
53
+ value: moduleFederationModernJsPatchPath
54
+ },
55
+ {
56
+ kind: 'ensure-map-entry',
57
+ key: 'patchedDependencies',
58
+ entryKey: `@module-federation/bridge-react@${MODULE_FEDERATION_VERSION}`,
59
+ value: moduleFederationBridgeReactPatchPath
60
+ },
61
+ options.usesDrizzleOrm ? {
62
+ kind: 'ensure-map-entry',
63
+ key: 'patchedDependencies',
64
+ entryKey: `drizzle-orm@${DRIZZLE_ORM_VERSION}`,
65
+ value: drizzleOrmDeclarationPatchPath
66
+ } : {
67
+ kind: 'remove-map-entry',
68
+ entryKey: `drizzle-orm@${DRIZZLE_ORM_VERSION}`
69
+ }
70
+ ],
71
+ declarationPatchActions: [
72
+ {
73
+ kind: 'ensure',
74
+ relativePatchPath: moduleFederationModernJsPatchPath
75
+ },
76
+ {
77
+ kind: 'ensure',
78
+ relativePatchPath: moduleFederationBridgeReactPatchPath
79
+ },
80
+ {
81
+ kind: 'ensure',
82
+ relativePatchPath: effectDeclarationPatchPath
83
+ },
84
+ {
85
+ kind: options.usesDrizzleOrm ? 'ensure' : 'remove-if-unchanged',
86
+ relativePatchPath: drizzleOrmDeclarationPatchPath
87
+ }
88
+ ],
89
+ requiresInstallOnChange: true
90
+ };
91
+ }
92
+ function createStrictEffectPackageVersionPolicyActions(item) {
93
+ const packageName = item.slice(0, item.lastIndexOf('@'));
94
+ const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
95
+ return [
96
+ {
97
+ kind: 'replace-line',
98
+ pattern: new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'gmu'),
99
+ replacement: ` - '${item}'`
100
+ },
101
+ {
102
+ kind: 'ensure-list-item',
103
+ key: 'minimumReleaseAgeExclude',
104
+ item
105
+ },
106
+ {
107
+ kind: 'ensure-list-item',
108
+ key: 'trustPolicyExclude',
109
+ item
110
+ }
111
+ ];
112
+ }
113
+ export { createPnpmWorkspacePolicyPlan, drizzleOrmDeclarationPatchPath, effectDeclarationPatchPath, moduleFederationBridgeReactPatchPath, moduleFederationModernJsPatchPath, strictEffectPackageVersionPolicyExclusions };
@@ -0,0 +1,100 @@
1
+ const defineToolingCommand = (command)=>({
2
+ ...command,
3
+ wrapperPath: `scripts/${command.wrapperName}.mts`
4
+ });
5
+ const generatedToolingCommands = [
6
+ defineToolingCommand({
7
+ id: 'validate',
8
+ command: 'validate',
9
+ wrapperName: 'validate-ultramodern-workspace',
10
+ contractKey: 'validate',
11
+ rootScript: 'contract:check'
12
+ }),
13
+ defineToolingCommand({
14
+ id: 'typecheck',
15
+ command: 'typecheck',
16
+ wrapperName: 'ultramodern-typecheck',
17
+ contractKey: 'typecheck',
18
+ rootScript: 'typecheck',
19
+ templatePath: "templates/workspace-scripts/ultramodern-typecheck.mjs",
20
+ cwd: 'invocation'
21
+ }),
22
+ defineToolingCommand({
23
+ id: 'mfTypes',
24
+ command: 'mf-types',
25
+ wrapperName: 'assert-mf-types',
26
+ contractKey: 'mfTypes',
27
+ rootScript: 'mf:types'
28
+ }),
29
+ defineToolingCommand({
30
+ id: 'publicSurface',
31
+ command: 'public-surface',
32
+ wrapperName: 'generate-public-surface-assets',
33
+ contractKey: 'publicSurface',
34
+ templatePath: "templates/workspace-scripts/generate-public-surface-assets.mjs"
35
+ }),
36
+ defineToolingCommand({
37
+ id: 'backendFederationGenerate',
38
+ command: 'backend-federation-generate',
39
+ wrapperName: 'generate-node-backend-federation',
40
+ contractKey: 'backendFederationGenerate',
41
+ rootScript: 'node:backend-federation:generate',
42
+ templatePath: "templates/workspace-scripts/generate-node-backend-federation.mjs"
43
+ }),
44
+ defineToolingCommand({
45
+ id: 'backendFederationProof',
46
+ command: 'backend-federation-proof',
47
+ wrapperName: 'proof-node-backend-federation',
48
+ contractKey: 'backendFederationProof',
49
+ rootScript: 'node:proof',
50
+ templatePath: "templates/workspace-scripts/proof-node-backend-federation.mjs"
51
+ }),
52
+ defineToolingCommand({
53
+ id: 'cloudflareProof',
54
+ command: 'cloudflare-proof',
55
+ wrapperName: 'proof-cloudflare-version',
56
+ contractKey: 'cloudflareProof',
57
+ rootScript: 'cloudflare:proof',
58
+ templatePath: "templates/workspace-scripts/proof-cloudflare-version.mjs"
59
+ }),
60
+ defineToolingCommand({
61
+ id: 'cloudflareOutputVerify',
62
+ command: 'cloudflare-output-verify',
63
+ wrapperName: 'verify-cloudflare-output',
64
+ contractKey: 'cloudflareOutputVerify',
65
+ rootScript: 'cloudflare-output:verify'
66
+ }),
67
+ defineToolingCommand({
68
+ id: 'performanceReadiness',
69
+ command: 'performance-readiness',
70
+ wrapperName: 'ultramodern-performance-readiness',
71
+ contractKey: 'performanceReadiness',
72
+ rootScript: 'performance:readiness',
73
+ templatePath: "templates/workspace-scripts/ultramodern-performance-readiness.mjs"
74
+ }),
75
+ defineToolingCommand({
76
+ id: 'migrateStrictEffect',
77
+ command: 'migrate-strict-effect',
78
+ wrapperName: 'migrate-strict-effect',
79
+ contractKey: 'migrateStrictEffect',
80
+ rootScript: 'migrate:strict-effect'
81
+ }),
82
+ defineToolingCommand({
83
+ id: 'routesGenerate',
84
+ command: 'routes-generate',
85
+ wrapperName: 'generate-tanstack-routes',
86
+ contractKey: 'routesGenerate'
87
+ })
88
+ ];
89
+ const toolingCommandById = Object.fromEntries(generatedToolingCommands.map((command)=>[
90
+ command.id,
91
+ command
92
+ ]));
93
+ const GENERATED_TOOLING_COMMANDS = toolingCommandById;
94
+ const generatedToolingCommandList = ()=>generatedToolingCommands.map((command)=>command.command);
95
+ const createToolingWrapperContract = ()=>Object.fromEntries(generatedToolingCommands.map((command)=>[
96
+ command.contractKey,
97
+ command.wrapperPath
98
+ ]));
99
+ const createGeneratedToolingWrapperMap = createToolingWrapperContract;
100
+ export { GENERATED_TOOLING_COMMANDS, createGeneratedToolingWrapperMap, createToolingWrapperContract, generatedToolingCommandList, generatedToolingCommands, toolingCommandById };
@@ -8,9 +8,10 @@ const CLOUDFLARE_COMPATIBILITY_DATE = '2026-06-02';
8
8
  const TAILWIND_VERSION = '4.3.1';
9
9
  const TAILWIND_POSTCSS_VERSION = '4.3.1';
10
10
  const POSTCSS_VERSION = '8.5.15';
11
- const EFFECT_VERSION = '4.0.0-beta.91';
12
- const EFFECT_VITEST_VERSION = '4.0.0-beta.91';
11
+ const EFFECT_VERSION = '4.0.0-beta.92';
12
+ const EFFECT_VITEST_VERSION = '4.0.0-beta.92';
13
13
  const EFFECT_TSGO_VERSION = '0.14.6';
14
+ const DRIZZLE_ORM_VERSION = '1.0.0-rc.4';
14
15
  const TYPESCRIPT_STABLE_VERSION = '6.0.3';
15
16
  const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260628.1';
16
17
  const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
@@ -22,7 +23,7 @@ const I18NEXT_VERSION = '26.3.1';
22
23
  const NODE_FETCH_VERSION = '^3.3.2';
23
24
  const REACT_VERSION = '^19.2.7';
24
25
  const REACT_DOM_VERSION = '^19.2.7';
25
- const REACT_ROUTER_VERSION = '7.18.0';
26
+ const REACT_ROUTER_VERSION = '7.18.1';
26
27
  const TYPES_REACT_VERSION = '^19.2.17';
27
28
  const TYPES_REACT_DOM_VERSION = '^19.2.3';
28
29
  const NODE_VERSION = '26.3.0';
@@ -35,7 +36,8 @@ const ultramodernWorkspaceVersions = {
35
36
  moduleFederation: MODULE_FEDERATION_VERSION,
36
37
  effect: EFFECT_VERSION,
37
38
  effectVitest: EFFECT_VITEST_VERSION,
39
+ drizzleOrm: DRIZZLE_ORM_VERSION,
38
40
  tailwind: TAILWIND_VERSION,
39
41
  tailwindPostcss: TAILWIND_POSTCSS_VERSION
40
42
  };
41
- export { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_TSGO_VERSION, EFFECT_VERSION, EFFECT_VITEST_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_CORE_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION, ultramodernWorkspaceVersions };
43
+ export { CLOUDFLARE_COMPATIBILITY_DATE, DRIZZLE_ORM_VERSION, EFFECT_TSGO_VERSION, EFFECT_VERSION, EFFECT_VITEST_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_CORE_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION, ultramodernWorkspaceVersions };
@@ -0,0 +1,110 @@
1
+ import { appHasApi } from "./descriptors.js";
2
+ import { relativeRootFor } from "./naming.js";
3
+ import { createPublicSurfaceGenerationCommand } from "./public-surface.js";
4
+ import { GENERATED_TOOLING_COMMANDS } from "./tooling-command-catalog.js";
5
+ const toolingWrapperPath = (key)=>GENERATED_TOOLING_COMMANDS[key].wrapperPath;
6
+ const rootToolingScriptName = (key)=>{
7
+ const rootScript = GENERATED_TOOLING_COMMANDS[key].rootScript;
8
+ if (!rootScript) throw new Error(`Generated tooling command ${key} does not define a root package script.`);
9
+ return rootScript;
10
+ };
11
+ const rootToolingWrapperCommand = (key)=>`node ./${toolingWrapperPath(key)}`;
12
+ const relativeToolingWrapperPath = (packageDir, key)=>`${relativeRootFor(packageDir)}/${toolingWrapperPath(key)}`;
13
+ const packageToolingWrapperCommand = (packageDir, key)=>`node ${relativeToolingWrapperPath(packageDir, key)}`;
14
+ const workspaceRootPackageScriptNames = {
15
+ build: 'build',
16
+ cloudflareBuild: 'cloudflare:build',
17
+ cloudflareDeploy: 'cloudflare:deploy',
18
+ cloudflareProof: rootToolingScriptName('cloudflareProof'),
19
+ cloudflareOutputVerify: rootToolingScriptName('cloudflareOutputVerify'),
20
+ backendFederationGenerate: rootToolingScriptName('backendFederationGenerate'),
21
+ nodeProof: rootToolingScriptName('backendFederationProof'),
22
+ mfTypes: rootToolingScriptName('mfTypes'),
23
+ performanceReadiness: rootToolingScriptName('performanceReadiness'),
24
+ migrateStrictEffect: rootToolingScriptName('migrateStrictEffect'),
25
+ zeropsMaterialize: 'zerops:materialize',
26
+ contractCheck: rootToolingScriptName('validate'),
27
+ typecheck: 'typecheck',
28
+ check: 'check'
29
+ };
30
+ const workspaceAppPackageScriptNames = {
31
+ dev: 'dev',
32
+ build: 'build',
33
+ cloudflareBuild: 'cloudflare:build',
34
+ cloudflareDeploy: 'cloudflare:deploy',
35
+ cloudflarePreview: 'cloudflare:preview',
36
+ cloudflareProof: 'cloudflare:proof',
37
+ serve: 'serve',
38
+ typecheck: 'typecheck'
39
+ };
40
+ const createStrictTsgoTypecheckCommand = (packageDir)=>`${packageToolingWrapperCommand(packageDir, 'typecheck')} --project tsconfig.json`;
41
+ function createWorkspaceAppScriptPlan(app) {
42
+ const backendFederationBuildCommand = appHasApi(app) ? `${packageToolingWrapperCommand(app.directory, 'backendFederationGenerate')} --app ${app.id}` : void 0;
43
+ const backendFederationCloudflareBuildCommand = backendFederationBuildCommand ? `${backendFederationBuildCommand} --target dist-cloudflare` : void 0;
44
+ const buildSteps = [
45
+ 'ULTRAMODERN_ZEPHYR=false modern build',
46
+ backendFederationBuildCommand,
47
+ createPublicSurfaceGenerationCommand(app, 'dist'),
48
+ app.exposes ? packageToolingWrapperCommand(app.directory, 'mfTypes') : void 0
49
+ ].filter((step)=>Boolean(step));
50
+ const cloudflareBuildSteps = [
51
+ 'ULTRAMODERN_ZEPHYR=false MODERNJS_DEPLOY=cloudflare modern build',
52
+ backendFederationCloudflareBuildCommand,
53
+ 'ULTRAMODERN_ZEPHYR=false MODERNJS_DEPLOY=cloudflare modern deploy --skip-build',
54
+ createPublicSurfaceGenerationCommand(app, 'cloudflare'),
55
+ `${packageToolingWrapperCommand(app.directory, 'cloudflareOutputVerify')} --app ${app.id}`
56
+ ].filter((step)=>Boolean(step));
57
+ return {
58
+ dev: 'modern dev',
59
+ build: buildSteps.join(' && '),
60
+ cloudflareBuild: cloudflareBuildSteps.join(' && '),
61
+ cloudflareDeploy: 'ULTRAMODERN_CLOUDFLARE_REQUIRE_PUBLIC_URLS=true pnpm run cloudflare:build && wrangler deploy --config .output/wrangler.json',
62
+ cloudflarePreview: 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
63
+ cloudflareProof: `${packageToolingWrapperCommand(app.directory, 'cloudflareProof')} --app ${app.id}`,
64
+ serve: 'modern serve',
65
+ typecheck: createStrictTsgoTypecheckCommand(app.directory)
66
+ };
67
+ }
68
+ function createWorkspaceAppPackageScripts(app) {
69
+ const plan = createWorkspaceAppScriptPlan(app);
70
+ return Object.fromEntries(Object.entries(workspaceAppPackageScriptNames).map(([planKey, packageScriptName])=>[
71
+ packageScriptName,
72
+ plan[planKey]
73
+ ]));
74
+ }
75
+ function createWorkspaceRootScriptPlan(remotes = [], options = {}) {
76
+ const hasRemotes = remotes.length > 0;
77
+ const mfTypesScript = rootToolingScriptName('mfTypes');
78
+ const performanceReadinessScript = rootToolingScriptName('performanceReadiness');
79
+ const cloudflareOutputVerifyScript = rootToolingScriptName('cloudflareOutputVerify');
80
+ const backendFederationGenerateScript = rootToolingScriptName('backendFederationGenerate');
81
+ const nodeProofScript = rootToolingScriptName('backendFederationProof');
82
+ const bridgeCheck = options.bridgeCheck ?? '';
83
+ const remoteBuildPrefix = hasRemotes ? 'ULTRAMODERN_ZEPHYR=false pnpm -r --filter "./verticals/*" run build && ' : '';
84
+ const remoteCloudflareBuildPrefix = hasRemotes ? 'pnpm -r --filter "./verticals/*" run cloudflare:build && ' : '';
85
+ const remoteCloudflareDeployPrefix = hasRemotes ? 'pnpm -r --filter "./verticals/*" run cloudflare:deploy && ' : '';
86
+ return {
87
+ build: `${remoteBuildPrefix}ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm ${mfTypesScript} && pnpm ${performanceReadinessScript}`,
88
+ cloudflareBuild: `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm ${mfTypesScript} && pnpm ${cloudflareOutputVerifyScript}`,
89
+ cloudflareDeploy: `${remoteCloudflareDeployPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:deploy`,
90
+ cloudflareProof: `${rootToolingWrapperCommand('cloudflareProof')} --out .codex/reports/cloudflare-version-proof/public-url-proof.json`,
91
+ cloudflareOutputVerify: rootToolingWrapperCommand('cloudflareOutputVerify'),
92
+ backendFederationGenerate: rootToolingWrapperCommand('backendFederationGenerate'),
93
+ nodeProof: rootToolingWrapperCommand('backendFederationProof'),
94
+ mfTypes: rootToolingWrapperCommand('mfTypes'),
95
+ performanceReadiness: rootToolingWrapperCommand('performanceReadiness'),
96
+ migrateStrictEffect: rootToolingWrapperCommand('migrateStrictEffect'),
97
+ zeropsMaterialize: "node ./scripts/materialize-zerops-runtime.mjs",
98
+ contractCheck: rootToolingWrapperCommand('validate'),
99
+ typecheck: options.typecheck ?? `${rootToolingWrapperCommand('typecheck')} --project tsconfig.json`,
100
+ check: `pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && pnpm i18n:boundaries && pnpm api:check && pnpm contract:check${hasRemotes ? ` && pnpm ${backendFederationGenerateScript} && pnpm ${nodeProofScript}` : ''} && pnpm performance:readiness${bridgeCheck}`
101
+ };
102
+ }
103
+ function createWorkspaceRootPackageScripts(remotes = [], options = {}) {
104
+ const plan = createWorkspaceRootScriptPlan(remotes, options);
105
+ return Object.fromEntries(Object.entries(workspaceRootPackageScriptNames).map(([planKey, packageScriptName])=>[
106
+ packageScriptName,
107
+ plan[planKey]
108
+ ]));
109
+ }
110
+ export { createStrictTsgoTypecheckCommand, createWorkspaceAppPackageScripts, createWorkspaceAppScriptPlan, createWorkspaceRootPackageScripts, createWorkspaceRootScriptPlan, packageToolingWrapperCommand, rootToolingScriptName, rootToolingWrapperCommand, workspaceAppPackageScriptNames, workspaceRootPackageScriptNames };
@@ -1,17 +1,12 @@
1
1
  import node_fs from "node:fs";
2
2
  import node_path from "node:path";
3
- import { verticalApiGroupName } from "./api.js";
4
- import { remoteComponentOutputPath } from "./demo-components.js";
5
- import { appHasApi, appI18nNamespace, remoteDependencyAlias, shellApp } from "./descriptors.js";
6
- import { readFileTemplate, renderFileTemplate, writeFileReplacing } from "./fs-io.js";
7
- import { packageName, tailwindPrefixForApp } from "./naming.js";
8
- import { createCloudflareSecurityContract } from "./policy.js";
9
- import { publicSurfaceManagedSourceAssetPaths } from "./public-surface.js";
10
- import { createLocalisedUrlsMap, createRouteMetaFilePath, createRouteOwnedI18nPaths, createRoutePageFilePath } from "./routes.js";
11
- import { CLOUDFLARE_COMPATIBILITY_DATE, NODE_VERSION, PNPM_VERSION } from "./versions.js";
3
+ import { readFileTemplate, renderFileTemplate, workspaceTemplateDir, writeFileReplacing } from "./fs-io.js";
4
+ import { GENERATED_TOOLING_COMMANDS, generatedToolingCommands } from "./tooling-command-catalog.js";
5
+ import { createWorkspaceValidationContract } from "./workspace-validation-contract.js";
6
+ const singleQuoted = (value)=>`'${value.replace(/'/gu, "\\'")}'`;
12
7
  function createToolWrapperScript(command, extraArgs = []) {
13
- const commandJson = JSON.stringify(command);
14
- const extraArgsJson = JSON.stringify(extraArgs);
8
+ const commandLiteral = singleQuoted(command);
9
+ const extraArgsLiteral = `[${extraArgs.map(singleQuoted).join(', ')}]`;
15
10
  return `#!/usr/bin/env node
16
11
  import { spawnSync } from 'node:child_process';
17
12
  import path from 'node:path';
@@ -22,7 +17,7 @@ const forwardedArgs = process.argv.slice(2);
22
17
  const workspaceRoot =
23
18
  process.env.ULTRAMODERN_WORKSPACE_ROOT ??
24
19
  path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
25
- const ultramodernArgs = ['ultramodern', ${commandJson}, ...${extraArgsJson}, ...forwardedArgs];
20
+ const ultramodernArgs = ['ultramodern', ${commandLiteral}, ...${extraArgsLiteral}, ...forwardedArgs];
26
21
  const result = createBin
27
22
  ? spawnSync(process.execPath, [createBin, ...ultramodernArgs], {
28
23
  env: { ...process.env, ULTRAMODERN_WORKSPACE_ROOT: workspaceRoot },
@@ -42,6 +37,13 @@ if (result.error) {
42
37
  process.exit(result.status ?? 1);
43
38
  `;
44
39
  }
40
+ function writeGeneratedToolWrapperScript(targetDir, key) {
41
+ const command = GENERATED_TOOLING_COMMANDS[key];
42
+ writeWorkspaceOwnedMtsScript(targetDir, command.wrapperName, createToolWrapperScript(command.command));
43
+ }
44
+ function writeGeneratedToolWrapperScripts(targetDir) {
45
+ for (const command of generatedToolingCommands)writeGeneratedToolWrapperScript(targetDir, command.id);
46
+ }
45
47
  function createSkillsToolWrapperScript() {
46
48
  return `#!/usr/bin/env node
47
49
  import { spawnSync } from 'node:child_process';
@@ -96,52 +98,24 @@ function migrateCopiedWorkspaceScriptToMts(targetDir, name) {
96
98
  node_fs.renameSync(legacyPath, migratedPath);
97
99
  }
98
100
  function createWorkspaceValidationScript(scope, enableTailwind, remotes = []) {
99
- const verticals = remotes.filter(appHasApi).map((remote)=>({
100
- id: remote.id,
101
- domain: remote.domain,
102
- stem: remote.api.stem,
103
- group: verticalApiGroupName(remote),
104
- path: remote.directory,
105
- port: remote.port,
106
- mfName: remote.mfName,
107
- apiPrefix: remote.api.prefix,
108
- tailwindPrefix: tailwindPrefixForApp(remote),
109
- zephyrAlias: remoteDependencyAlias(remote),
110
- packageName: packageName(scope, remote.packageSuffix),
111
- exposes: Object.keys(remote.exposes ?? {}),
112
- componentPaths: Object.keys(remote.exposes ?? {}).map((expose)=>remoteComponentOutputPath(remote, expose)).filter((componentPath)=>Boolean(componentPath)),
113
- namespace: appI18nNamespace(remote),
114
- routePagePaths: createRouteOwnedI18nPaths(remote).filter((route)=>'/' !== route.canonicalPath).map((route)=>createRoutePageFilePath(remote, route.canonicalPath)),
115
- routeMetaPaths: createRouteOwnedI18nPaths(remote).map((route)=>createRouteMetaFilePath(remote, route.canonicalPath)),
116
- localisedUrls: createLocalisedUrlsMap(remote),
117
- verticalRefs: remote.verticalRefs ?? []
118
- }));
119
- const shellRouteMetaPaths = createRouteOwnedI18nPaths(shellApp).map((route)=>createRouteMetaFilePath(shellApp, route.canonicalPath));
120
- const shellNamespace = appI18nNamespace(shellApp);
121
- const oldRemotePaths = [
122
- 'apps/remotes'
123
- ];
124
- const expectedBuildScript = remotes.length > 0 ? 'ULTRAMODERN_ZEPHYR=false pnpm -r --filter "./verticals/*" run build && ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm mf:types && pnpm performance:readiness' : 'ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm mf:types && pnpm performance:readiness';
125
- const expectedCloudflareBuildScript = remotes.length > 0 ? 'pnpm -r --filter "./verticals/*" run cloudflare:build && pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types' : 'pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types';
126
- const expectedCloudflareDeployScript = remotes.length > 0 ? 'pnpm -r --filter "./verticals/*" run cloudflare:deploy && pnpm --filter "./apps/shell-super-app" run cloudflare:deploy' : 'pnpm --filter "./apps/shell-super-app" run cloudflare:deploy';
127
- const expectedCloudflareSecurity = createCloudflareSecurityContract();
101
+ const contract = createWorkspaceValidationContract(scope, enableTailwind, remotes);
128
102
  return renderFileTemplate("workspace-scripts/validate-ultramodern-workspace.mjs", {
129
- packageScope: scope,
130
- nodeVersion: NODE_VERSION,
131
- pnpmVersion: PNPM_VERSION,
132
- tailwindEnabledJson: JSON.stringify(enableTailwind),
133
- fullStackVerticalsJson: JSON.stringify(verticals, null, 2),
134
- shellNamespaceJson: JSON.stringify(shellNamespace),
135
- oldRemotePathsJson: JSON.stringify(oldRemotePaths, null, 2),
136
- expectedBuildScriptJson: JSON.stringify(expectedBuildScript),
137
- expectedCloudflareBuildScriptJson: JSON.stringify(expectedCloudflareBuildScript),
138
- expectedCloudflareDeployScriptJson: JSON.stringify(expectedCloudflareDeployScript),
139
- expectedCloudflareSecurityJson: JSON.stringify(expectedCloudflareSecurity, null, 2),
140
- publicSurfaceManagedSourceAssetPathsJson: JSON.stringify([
141
- ...publicSurfaceManagedSourceAssetPaths
142
- ], null, 2),
143
- shellRouteMetaPathsJson: JSON.stringify(shellRouteMetaPaths, null, 2),
144
- cloudflareCompatibilityDate: CLOUDFLARE_COMPATIBILITY_DATE
103
+ packageScope: contract.packageScope,
104
+ nodeVersion: contract.versions.node,
105
+ tailwindEnabledJson: JSON.stringify(contract.tailwindEnabled),
106
+ fullStackVerticalsJson: JSON.stringify(contract.fullStackVerticals, null, 2),
107
+ shellNamespaceJson: JSON.stringify(contract.shellNamespace),
108
+ oldRemotePathsJson: JSON.stringify(contract.oldRemotePaths),
109
+ expectedBuildScriptJson: JSON.stringify(contract.scripts.build),
110
+ expectedCloudflareBuildScriptJson: JSON.stringify(contract.scripts.cloudflareBuild),
111
+ expectedCloudflareDeployScriptJson: JSON.stringify(contract.scripts.cloudflareDeploy),
112
+ expectedCloudflareSecurityJson: JSON.stringify(contract.cloudflareSecurity, null, 2),
113
+ workspaceValidationContractJson: JSON.stringify(contract, null, 2),
114
+ publicSurfaceManagedSourceAssetPathsJson: JSON.stringify(contract.publicSurfaceManagedSourceAssetPaths, null, 2),
115
+ shellRouteMetaPathsJson: JSON.stringify(contract.shellRouteMetaPaths, null, 2),
116
+ effectVersion: contract.versions.effect,
117
+ moduleFederationVersion: contract.versions.moduleFederation,
118
+ cloudflareCompatibilityDate: contract.versions.cloudflareCompatibilityDate
145
119
  });
146
120
  }
147
121
  function createWorkspaceI18nBoundaryValidationScript() {
@@ -153,18 +127,67 @@ function createWorkspaceApiBoundaryValidationScript() {
153
127
  function createPerformanceReadinessConfigScript() {
154
128
  return readFileTemplate("workspace-scripts/ultramodern-performance-readiness.config.mjs");
155
129
  }
130
+ function createNodeBackendFederationProofScript() {
131
+ return readFileTemplate("workspace-scripts/proof-node-backend-federation.mjs");
132
+ }
133
+ function createZeropsRuntimeMaterializationScript() {
134
+ return readFileTemplate("workspace-scripts/materialize-zerops-runtime.mjs");
135
+ }
156
136
  function writeGeneratedWorkspaceScripts(targetDir, _scope, _enableTailwind, _remotes = []) {
157
- writeWorkspaceOwnedMtsScript(targetDir, 'assert-mf-types', createToolWrapperScript('mf-types'));
158
- writeWorkspaceOwnedMtsScript(targetDir, 'validate-ultramodern-workspace', createToolWrapperScript('validate'));
159
137
  writeWorkspaceOwnedMtsScript(targetDir, 'check-ultramodern-i18n-boundaries', createWorkspaceI18nBoundaryValidationScript());
160
138
  writeWorkspaceOwnedMtsScript(targetDir, 'check-ultramodern-api-boundaries', createWorkspaceApiBoundaryValidationScript());
161
- writeWorkspaceOwnedMtsScript(targetDir, 'generate-public-surface-assets', createToolWrapperScript('public-surface'));
162
- writeWorkspaceOwnedMtsScript(targetDir, 'proof-cloudflare-version', createToolWrapperScript('cloudflare-proof'));
139
+ writeFileReplacing(targetDir, "scripts/materialize-zerops-runtime.mjs", createZeropsRuntimeMaterializationScript());
163
140
  writeFileReplacing(targetDir, "scripts/ultramodern-performance-readiness.config.mjs", createPerformanceReadinessConfigScript());
164
- writeWorkspaceOwnedMtsScript(targetDir, 'ultramodern-performance-readiness', createToolWrapperScript('performance-readiness'));
165
- writeWorkspaceOwnedMtsScript(targetDir, 'migrate-strict-effect', createToolWrapperScript('migrate-strict-effect'));
166
- writeWorkspaceOwnedMtsScript(targetDir, 'ultramodern-typecheck', createToolWrapperScript('typecheck'));
141
+ writeGeneratedToolWrapperScripts(targetDir);
167
142
  writeWorkspaceOwnedMtsScript(targetDir, 'bootstrap-agent-skills', createSkillsToolWrapperScript());
168
143
  migrateCopiedWorkspaceScriptToMts(targetDir, 'setup-agent-reference-repos');
169
144
  }
170
- export { createPerformanceReadinessConfigScript, createWorkspaceApiBoundaryValidationScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, writeGeneratedWorkspaceScripts };
145
+ function createAgentReferenceReposSetupScript() {
146
+ return node_fs.readFileSync(node_path.join(workspaceTemplateDir, "scripts/setup-agent-reference-repos.mjs"), 'utf-8');
147
+ }
148
+ const BACKEND_FEDERATION_WRAPPER_IDS = new Set([
149
+ 'backendFederationGenerate',
150
+ 'backendFederationProof'
151
+ ]);
152
+ function migratedWorkspaceScriptArtifacts(options) {
153
+ const artifacts = [
154
+ {
155
+ relativePath: "scripts/check-ultramodern-i18n-boundaries.mts",
156
+ content: createWorkspaceI18nBoundaryValidationScript(),
157
+ legacyPath: "scripts/check-ultramodern-i18n-boundaries.mjs"
158
+ },
159
+ {
160
+ relativePath: "scripts/check-ultramodern-api-boundaries.mts",
161
+ content: createWorkspaceApiBoundaryValidationScript(),
162
+ legacyPath: "scripts/check-ultramodern-api-boundaries.mjs"
163
+ },
164
+ {
165
+ relativePath: "scripts/ultramodern-performance-readiness.config.mjs",
166
+ content: createPerformanceReadinessConfigScript()
167
+ },
168
+ {
169
+ relativePath: "scripts/bootstrap-agent-skills.mts",
170
+ content: createSkillsToolWrapperScript(),
171
+ legacyPath: "scripts/bootstrap-agent-skills.mjs"
172
+ },
173
+ {
174
+ relativePath: "scripts/setup-agent-reference-repos.mts",
175
+ content: createAgentReferenceReposSetupScript(),
176
+ legacyPath: "scripts/setup-agent-reference-repos.mjs"
177
+ }
178
+ ];
179
+ for (const command of generatedToolingCommands)if (!(options.shellOnly && BACKEND_FEDERATION_WRAPPER_IDS.has(command.id))) artifacts.push({
180
+ relativePath: command.wrapperPath,
181
+ content: createToolWrapperScript(command.command),
182
+ legacyPath: command.wrapperPath.replace(/\.mts$/u, '.mjs')
183
+ });
184
+ return artifacts;
185
+ }
186
+ const migratedWorkspaceScriptBasenames = [
187
+ 'check-ultramodern-i18n-boundaries',
188
+ 'check-ultramodern-api-boundaries',
189
+ 'bootstrap-agent-skills',
190
+ 'setup-agent-reference-repos',
191
+ ...generatedToolingCommands.map((command)=>command.wrapperName)
192
+ ];
193
+ export { createAgentReferenceReposSetupScript, createNodeBackendFederationProofScript, createPerformanceReadinessConfigScript, createWorkspaceApiBoundaryValidationScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, createZeropsRuntimeMaterializationScript, migratedWorkspaceScriptArtifacts, migratedWorkspaceScriptBasenames, writeGeneratedToolWrapperScripts, writeGeneratedWorkspaceScripts };
@@ -0,0 +1,59 @@
1
+ import { verticalApiGroupName } from "./api.js";
2
+ import { createBackendFederationMetadata } from "./backend-federation.js";
3
+ import { createDeliveryUnitRecord } from "./delivery-unit.js";
4
+ import { remoteComponentOutputPath } from "./demo-components.js";
5
+ import { appHasApi, appI18nNamespace, remoteDependencyAlias, shellApp } from "./descriptors.js";
6
+ import { packageName, tailwindPrefixForApp } from "./naming.js";
7
+ import { createCloudflareSecurityContract } from "./policy.js";
8
+ import { publicSurfaceManagedSourceAssetPaths } from "./public-surface.js";
9
+ import { createLocalisedUrlsMap, createRouteMetaFilePath, createRouteOwnedI18nPaths, createRoutePageFilePath } from "./routes.js";
10
+ import { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_VERSION, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION } from "./versions.js";
11
+ import { createWorkspaceRootPackageScripts, createWorkspaceRootScriptPlan } from "./workspace-script-plan.js";
12
+ function createWorkspaceValidationContract(scope, enableTailwind, remotes = []) {
13
+ const fullStackVerticals = remotes.filter(appHasApi).map((remote)=>({
14
+ id: remote.id,
15
+ domain: remote.domain,
16
+ stem: remote.api.stem,
17
+ group: verticalApiGroupName(remote),
18
+ path: remote.directory,
19
+ port: remote.port,
20
+ mfName: remote.mfName,
21
+ apiPrefix: remote.api.prefix,
22
+ tailwindPrefix: tailwindPrefixForApp(remote),
23
+ zephyrAlias: remoteDependencyAlias(remote),
24
+ packageName: packageName(scope, remote.packageSuffix),
25
+ backendFederation: createBackendFederationMetadata(scope, remote),
26
+ deliveryUnit: createDeliveryUnitRecord(scope, remote),
27
+ exposes: Object.keys(remote.exposes ?? {}),
28
+ componentPaths: Object.keys(remote.exposes ?? {}).map((expose)=>remoteComponentOutputPath(remote, expose)).filter((componentPath)=>Boolean(componentPath)),
29
+ namespace: appI18nNamespace(remote),
30
+ routePagePaths: createRouteOwnedI18nPaths(remote).filter((route)=>'/' !== route.canonicalPath).map((route)=>createRoutePageFilePath(remote, route.canonicalPath)),
31
+ routeMetaPaths: createRouteOwnedI18nPaths(remote).map((route)=>createRouteMetaFilePath(remote, route.canonicalPath)),
32
+ localisedUrls: createLocalisedUrlsMap(remote),
33
+ verticalRefs: remote.verticalRefs ?? []
34
+ }));
35
+ return {
36
+ packageScope: scope,
37
+ versions: {
38
+ cloudflareCompatibilityDate: CLOUDFLARE_COMPATIBILITY_DATE,
39
+ effect: EFFECT_VERSION,
40
+ moduleFederation: MODULE_FEDERATION_VERSION,
41
+ node: NODE_VERSION,
42
+ pnpm: PNPM_VERSION
43
+ },
44
+ tailwindEnabled: enableTailwind,
45
+ fullStackVerticals,
46
+ shellNamespace: appI18nNamespace(shellApp),
47
+ oldRemotePaths: [
48
+ 'apps/remotes'
49
+ ],
50
+ scripts: createWorkspaceRootScriptPlan(remotes),
51
+ packageScripts: createWorkspaceRootPackageScripts(remotes),
52
+ cloudflareSecurity: createCloudflareSecurityContract(),
53
+ publicSurfaceManagedSourceAssetPaths: [
54
+ ...publicSurfaceManagedSourceAssetPaths
55
+ ],
56
+ shellRouteMetaPaths: createRouteOwnedI18nPaths(shellApp).map((route)=>createRouteMetaFilePath(shellApp, route.canonicalPath))
57
+ };
58
+ }
59
+ export { createWorkspaceValidationContract };