@bleedingdev/modern-js-create 3.4.0-ultramodern.0 → 3.4.0-ultramodern.2

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 (38) hide show
  1. package/README.md +7 -7
  2. package/dist/cjs/ultramodern-workspace/add-vertical.cjs +18 -0
  3. package/dist/cjs/ultramodern-workspace/contracts.cjs +3 -3
  4. package/dist/cjs/ultramodern-workspace/descriptors.cjs +2 -2
  5. package/dist/cjs/ultramodern-workspace/module-federation.cjs +10 -1
  6. package/dist/cjs/ultramodern-workspace/package-json.cjs +74 -13
  7. package/dist/cjs/ultramodern-workspace/versions.cjs +1 -5
  8. package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +7 -0
  9. package/dist/cjs/ultramodern-workspace/write-workspace.cjs +3 -7
  10. package/dist/esm/ultramodern-workspace/add-vertical.js +19 -1
  11. package/dist/esm/ultramodern-workspace/contracts.js +4 -4
  12. package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
  13. package/dist/esm/ultramodern-workspace/module-federation.js +10 -1
  14. package/dist/esm/ultramodern-workspace/package-json.js +62 -10
  15. package/dist/esm/ultramodern-workspace/versions.js +2 -3
  16. package/dist/esm/ultramodern-workspace/workspace-scripts.js +5 -1
  17. package/dist/esm/ultramodern-workspace/write-workspace.js +5 -9
  18. package/dist/esm-node/ultramodern-workspace/add-vertical.js +19 -1
  19. package/dist/esm-node/ultramodern-workspace/contracts.js +4 -4
  20. package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
  21. package/dist/esm-node/ultramodern-workspace/module-federation.js +10 -1
  22. package/dist/esm-node/ultramodern-workspace/package-json.js +62 -10
  23. package/dist/esm-node/ultramodern-workspace/versions.js +2 -3
  24. package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +5 -1
  25. package/dist/esm-node/ultramodern-workspace/write-workspace.js +5 -9
  26. package/dist/types/ultramodern-workspace/package-json.d.ts +11 -2
  27. package/dist/types/ultramodern-workspace/versions.d.ts +1 -2
  28. package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +1 -0
  29. package/package.json +4 -4
  30. package/template-workspace/AGENTS.md.handlebars +2 -1
  31. package/template-workspace/README.md.handlebars +7 -0
  32. package/template-workspace/oxfmt.config.ts +3 -1
  33. package/template-workspace/oxlint.config.ts +3 -1
  34. package/template-workspace/scripts/bootstrap-agent-skills.mjs +23 -8
  35. package/templates/app/ultramodern-route-head.tsx.handlebars +20 -8
  36. package/templates/packages/shared-contracts-index.ts +206 -272
  37. package/templates/workspace-scripts/ultramodern-typecheck.mjs +197 -0
  38. package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +104 -2
package/README.md CHANGED
@@ -75,13 +75,13 @@ the repo `tsgo:dts` flow. Run `pnpm --filter @modern-js/create test` when
75
75
  changing generator behavior; it includes a boundary test that scans generator
76
76
  sources, templates, and generated workspace output for compiler API imports.
77
77
 
78
- Generated app packages install the TypeScript 7 RC package line and use
79
- `@effect/tsgo` plus `@typescript/native-preview` as tooling for
80
- `pnpm typecheck`, but generated app/package source must not depend on compiler
81
- API internals. Existing compiler API tests in this package use the stable
82
- TypeScript 6 package. If a future AST utility is needed, keep it behind a
83
- dedicated compatibility module and test it against stable `typescript`, not
84
- native-preview internals.
78
+ Generated app packages keep stable `typescript` for classic compiler consumers
79
+ such as Module Federation DTS generation, and use `@effect/tsgo` plus
80
+ `@typescript/native-preview` as tooling for `pnpm typecheck`. Generated
81
+ app/package source must not depend on compiler API internals. Existing compiler
82
+ API tests in this package use the stable TypeScript 6 package. If a future AST
83
+ utility is needed, keep it behind a dedicated compatibility module and test it
84
+ against stable `typescript`, not native-preview internals.
85
85
 
86
86
  Generated CI does not call the local aggregate. It runs format, lint,
87
87
  typecheck, skills, i18n boundary validation, contract validation, and build as
@@ -143,6 +143,7 @@ function rewriteShellAppFiles(workspaceRoot, scope, packageSource, enableTailwin
143
143
  const shellHost = (0, external_descriptors_cjs_namespaceObject.createShellHost)(remotes);
144
144
  const publicWeb = (0, external_public_surface_cjs_namespaceObject.createPublicWebAppArtifacts)(shellHost);
145
145
  (0, external_fs_io_cjs_namespaceObject.writeJsonFile)(external_node_path_default().join(workspaceRoot, `${external_descriptors_cjs_namespaceObject.shellApp.directory}/package.json`), (0, external_package_json_cjs_namespaceObject.createAppPackage)(scope, shellHost, packageSource, enableTailwind, remotes));
146
+ (0, external_fs_io_cjs_namespaceObject.writeJsonFile)(external_node_path_default().join(workspaceRoot, `${external_descriptors_cjs_namespaceObject.shellApp.directory}/tsconfig.json`), (0, external_package_json_cjs_namespaceObject.createAppTsConfig)(shellHost, remotes));
146
147
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(workspaceRoot, `${external_descriptors_cjs_namespaceObject.shellApp.directory}/src/modern-app-env.d.ts`, (0, external_app_files_cjs_namespaceObject.createAppEnvDts)(shellHost, remotes));
147
148
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(workspaceRoot, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
148
149
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(workspaceRoot, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
@@ -483,6 +484,16 @@ function createDryRunJsonMutations(preflight, manifestUrl) {
483
484
  pointer: '/dependencies',
484
485
  description: `Wire shell dependencies for ${vertical.id}`
485
486
  },
487
+ {
488
+ path: 'tsconfig.json',
489
+ pointer: '/references',
490
+ description: `Add ${vertical.id} to the root TS-Go build graph`
491
+ },
492
+ {
493
+ path: `${external_descriptors_cjs_namespaceObject.shellApp.directory}/tsconfig.json`,
494
+ pointer: '/references',
495
+ description: `Add ${vertical.id} to the shell TS-Go project references`
496
+ },
486
497
  {
487
498
  path: external_descriptors_cjs_namespaceObject.GENERATED_CONTRACT_PATH,
488
499
  pointer: '/apps',
@@ -546,6 +557,13 @@ function addUltramodernVertical(options) {
546
557
  addShellZephyrDependency(options.workspaceRoot, scope, vertical);
547
558
  addShellWorkspaceDependency(options.workspaceRoot, scope, vertical);
548
559
  updateRootWorkspaceScripts(options.workspaceRoot, scope, packageSource, updatedVerticals);
560
+ (0, external_fs_io_cjs_namespaceObject.writeJsonFile)(external_node_path_default().join(options.workspaceRoot, 'tsconfig.json'), (0, external_package_json_cjs_namespaceObject.createRootTsConfig)([
561
+ {
562
+ ...external_descriptors_cjs_namespaceObject.shellApp,
563
+ verticalRefs: updatedVerticals.map((vertical)=>vertical.id)
564
+ },
565
+ ...updatedVerticals
566
+ ]));
549
567
  const afterFiles = (0, external_generation_result_cjs_namespaceObject.createFileSnapshot)(options.workspaceRoot);
550
568
  const { createdPaths, rewrittenPaths } = (0, external_generation_result_cjs_namespaceObject.diffFileSnapshots)(beforeFiles, afterFiles);
551
569
  const result = (0, external_generation_result_cjs_namespaceObject.createGenerationResult)({
@@ -236,7 +236,7 @@ function createAppConfigContract(app) {
236
236
  ],
237
237
  default: '/'
238
238
  },
239
- disableTsChecker: true,
239
+ disableTsChecker: false,
240
240
  distPath: {
241
241
  html: './'
242
242
  },
@@ -648,8 +648,8 @@ function createGeneratedContract(scope, apps = [
648
648
  toolchain: 'mise'
649
649
  },
650
650
  versions: {
651
- typescript: external_versions_cjs_namespaceObject.TYPESCRIPT_VERSION,
652
- typescript7Rc: external_versions_cjs_namespaceObject.TYPESCRIPT_7_VERSION,
651
+ typescript: external_versions_cjs_namespaceObject.TYPESCRIPT_NATIVE_PREVIEW_VERSION,
652
+ typescriptCompatibility: external_versions_cjs_namespaceObject.TYPESCRIPT_VERSION,
653
653
  typescriptNativePreview: external_versions_cjs_namespaceObject.TYPESCRIPT_NATIVE_PREVIEW_VERSION,
654
654
  moduleFederation: external_versions_cjs_namespaceObject.MODULE_FEDERATION_VERSION,
655
655
  tanstackRouter: external_versions_cjs_namespaceObject.TANSTACK_ROUTER_VERSION,
@@ -84,12 +84,12 @@ const sharedPackages = [
84
84
  {
85
85
  id: 'shared-contracts',
86
86
  directory: 'packages/shared-contracts',
87
- description: 'Route, ownership, and topology contract placeholders.'
87
+ description: 'Generated route, ownership, and topology contracts.'
88
88
  },
89
89
  {
90
90
  id: 'shared-design-tokens',
91
91
  directory: 'packages/shared-design-tokens',
92
- description: 'Design token placeholders consumed by shell and verticals.'
92
+ description: 'Generated design tokens consumed by shell and verticals.'
93
93
  }
94
94
  ];
95
95
  function createNeutralOwnership(id, tier = 'tier-2-vertical') {
@@ -172,7 +172,7 @@ ${bffConfig} ...(cloudflareDeployEnabled
172
172
  },
173
173
  output: {
174
174
  assetPrefix,
175
- disableTsChecker: true,
175
+ disableTsChecker: false,
176
176
  distPath: {
177
177
  html: './',
178
178
  },
@@ -228,6 +228,10 @@ ${bffPluginEntry} moduleFederationPlugin(),
228
228
  },
229
229
  },
230
230
  source: {
231
+ alias: {
232
+ '@modern-js/plugin-i18n/runtime':
233
+ '@modern-js/plugin-i18n/runtime/no-react-i18next',
234
+ },
231
235
  globalVars: {
232
236
  ULTRAMODERN_SITE_URL: siteUrl,
233
237
  },
@@ -263,6 +267,11 @@ ${bffPluginEntry} moduleFederationPlugin(),
263
267
  }
264
268
  function createSharedModuleFederationConfig() {
265
269
  return ` shared: {
270
+ '@modern-js/plugin-i18n/runtime/no-react-i18next': {
271
+ requiredVersion: pluginI18nVersion,
272
+ singleton: true,
273
+ treeShaking: false,
274
+ },
266
275
  '@modern-js/plugin-i18n/runtime': {
267
276
  requiredVersion: pluginI18nVersion,
268
277
  singleton: true,
@@ -31,14 +31,17 @@ __webpack_require__.d(__webpack_exports__, {
31
31
  appDependencies: ()=>appDependencies,
32
32
  appDevDependencies: ()=>appDevDependencies,
33
33
  createAppPackage: ()=>createAppPackage,
34
+ createAppTsConfig: ()=>createAppTsConfig,
35
+ createEffectTsgoTypecheckCommand: ()=>createEffectTsgoTypecheckCommand,
34
36
  createPackageTsConfig: ()=>createPackageTsConfig,
35
37
  createRootPackageJson: ()=>createRootPackageJson,
38
+ createRootTsConfig: ()=>createRootTsConfig,
36
39
  createSharedContractsIndex: ()=>createSharedContractsIndex,
37
40
  createSharedPackage: ()=>createSharedPackage,
41
+ createSharedPackageTsConfig: ()=>createSharedPackageTsConfig,
38
42
  createTsConfigBase: ()=>createTsConfigBase,
39
43
  createZephyrDependencies: ()=>createZephyrDependencies,
40
- effectDiagnostics: ()=>effectDiagnostics,
41
- effectTsgoTypecheckCommand: ()=>effectTsgoTypecheckCommand
44
+ effectDiagnostics: ()=>effectDiagnostics
42
45
  });
43
46
  const external_ultramodern_package_source_cjs_namespaceObject = require("../ultramodern-package-source.cjs");
44
47
  const external_descriptors_cjs_namespaceObject = require("./descriptors.cjs");
@@ -46,7 +49,7 @@ const external_fs_io_cjs_namespaceObject = require("./fs-io.cjs");
46
49
  const external_naming_cjs_namespaceObject = require("./naming.cjs");
47
50
  const external_public_surface_cjs_namespaceObject = require("./public-surface.cjs");
48
51
  const external_versions_cjs_namespaceObject = require("./versions.cjs");
49
- const effectTsgoTypecheckCommand = "node -e \"const fs = require('node:fs'); const { execFileSync, spawnSync } = require('node:child_process'); const bin = execFileSync('effect-tsgo', ['get-exe-path'], { encoding: 'utf8' }).trim(); if (process.platform !== 'win32') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, ['--noEmit', '-p', 'tsconfig.json'], { stdio: 'inherit' }); process.exit(result.status ?? 1);\"";
52
+ const createEffectTsgoTypecheckCommand = (packageDir)=>`node ${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/scripts/ultramodern-typecheck.mjs --project tsconfig.json`;
50
53
  const effectDiagnostics = [
51
54
  'anyUnknownInErrorContext',
52
55
  'classSelfMismatch',
@@ -192,7 +195,7 @@ function createRootPackageJson(scope, packageSource, remotes = []) {
192
195
  'format:check': "oxfmt --check . '!repos/**'",
193
196
  lint: 'oxlint apps verticals packages',
194
197
  'lint:fix': 'oxlint apps verticals packages --fix',
195
- typecheck: `pnpm -r --filter "@${scope}/*" typecheck`,
198
+ typecheck: "node ./scripts/ultramodern-typecheck.mjs --build tsconfig.json",
196
199
  'cloudflare:build': `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types`,
197
200
  'cloudflare:deploy': `${remoteCloudflareDeployPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:deploy`,
198
201
  'cloudflare:proof': "node ./scripts/proof-cloudflare-version.mjs --out .codex/reports/cloudflare-version-proof/public-url-proof.json",
@@ -293,17 +296,69 @@ function createTsConfigBase() {
293
296
  }
294
297
  };
295
298
  }
296
- function createPackageTsConfig(packageDir, includeApi = false) {
297
- const include = [
299
+ function createTsBuildInfoFile(packageDir) {
300
+ const cacheKey = packageDir.replace(/[^a-zA-Z0-9._-]+/gu, '__');
301
+ return `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/node_modules/.cache/tsgo/${cacheKey}.tsbuildinfo`;
302
+ }
303
+ function createReferences(packageDir, references) {
304
+ return [
305
+ ...new Set(references)
306
+ ].filter((reference)=>reference !== packageDir).map((reference)=>({
307
+ path: `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/${reference}`
308
+ }));
309
+ }
310
+ function createPackageTsConfig(packageDir, options = {}) {
311
+ const resolvedOptions = 'boolean' == typeof options ? {
312
+ includeApi: options
313
+ } : options;
314
+ const include = resolvedOptions.include ?? [
298
315
  'src',
299
316
  'modern.config.ts',
300
317
  'module-federation.config.ts'
301
318
  ];
302
- if (includeApi) include.push('api', 'shared');
303
- return {
319
+ if (resolvedOptions.includeApi) include.push('api', 'shared');
320
+ const references = createReferences(packageDir, resolvedOptions.references ?? []);
321
+ const tsconfig = {
304
322
  extends: `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/tsconfig.base.json`,
323
+ compilerOptions: {
324
+ composite: true,
325
+ incremental: true,
326
+ tsBuildInfoFile: createTsBuildInfoFile(packageDir)
327
+ },
305
328
  include
306
329
  };
330
+ if (references.length > 0) tsconfig.references = references;
331
+ return tsconfig;
332
+ }
333
+ function createAppTsConfig(app, remotes = []) {
334
+ const references = [
335
+ ...external_descriptors_cjs_namespaceObject.sharedPackages.map((sharedPackage)=>sharedPackage.directory),
336
+ ...'shell' === app.kind ? (0, external_descriptors_cjs_namespaceObject.verticalEffectApps)(remotes).map((remote)=>remote.directory) : (0, external_descriptors_cjs_namespaceObject.resolveRemoteRefs)(app, remotes).map((remote)=>remote.directory)
337
+ ];
338
+ return createPackageTsConfig(app.directory, {
339
+ includeApi: (0, external_descriptors_cjs_namespaceObject.appHasEffectApi)(app),
340
+ references
341
+ });
342
+ }
343
+ function createSharedPackageTsConfig(packageDir) {
344
+ return createPackageTsConfig(packageDir, {
345
+ include: [
346
+ 'src'
347
+ ]
348
+ });
349
+ }
350
+ function createRootTsConfig(apps = []) {
351
+ return {
352
+ files: [],
353
+ references: [
354
+ ...external_descriptors_cjs_namespaceObject.sharedPackages.map((sharedPackage)=>({
355
+ path: sharedPackage.directory
356
+ })),
357
+ ...apps.map((app)=>({
358
+ path: app.directory
359
+ }))
360
+ ]
361
+ };
307
362
  }
308
363
  function createAppPackage(scope, app, packageSource, enableTailwind, remotes = []) {
309
364
  const publicSurfaceBuildCommand = (0, external_public_surface_cjs_namespaceObject.createPublicSurfaceGenerationCommand)(app, 'dist');
@@ -325,7 +380,7 @@ function createAppPackage(scope, app, packageSource, enableTailwind, remotes = [
325
380
  'cloudflare:preview': 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
326
381
  'cloudflare:proof': `node ${(0, external_naming_cjs_namespaceObject.relativeRootFor)(app.directory)}/scripts/proof-cloudflare-version.mjs --app ${app.id}`,
327
382
  serve: 'modern serve',
328
- typecheck: effectTsgoTypecheckCommand
383
+ typecheck: createEffectTsgoTypecheckCommand(app.directory)
329
384
  },
330
385
  modernjs: {
331
386
  preset: 'presetUltramodern',
@@ -361,7 +416,7 @@ function createSharedPackage(scope, id, description) {
361
416
  '.': './src/index.ts'
362
417
  },
363
418
  scripts: {
364
- typecheck: effectTsgoTypecheckCommand
419
+ typecheck: createEffectTsgoTypecheckCommand(`packages/${id}`)
365
420
  },
366
421
  devDependencies: {
367
422
  '@effect/tsgo': external_versions_cjs_namespaceObject.EFFECT_TSGO_VERSION,
@@ -380,26 +435,32 @@ function createSharedContractsIndex() {
380
435
  exports.appDependencies = __webpack_exports__.appDependencies;
381
436
  exports.appDevDependencies = __webpack_exports__.appDevDependencies;
382
437
  exports.createAppPackage = __webpack_exports__.createAppPackage;
438
+ exports.createAppTsConfig = __webpack_exports__.createAppTsConfig;
439
+ exports.createEffectTsgoTypecheckCommand = __webpack_exports__.createEffectTsgoTypecheckCommand;
383
440
  exports.createPackageTsConfig = __webpack_exports__.createPackageTsConfig;
384
441
  exports.createRootPackageJson = __webpack_exports__.createRootPackageJson;
442
+ exports.createRootTsConfig = __webpack_exports__.createRootTsConfig;
385
443
  exports.createSharedContractsIndex = __webpack_exports__.createSharedContractsIndex;
386
444
  exports.createSharedPackage = __webpack_exports__.createSharedPackage;
445
+ exports.createSharedPackageTsConfig = __webpack_exports__.createSharedPackageTsConfig;
387
446
  exports.createTsConfigBase = __webpack_exports__.createTsConfigBase;
388
447
  exports.createZephyrDependencies = __webpack_exports__.createZephyrDependencies;
389
448
  exports.effectDiagnostics = __webpack_exports__.effectDiagnostics;
390
- exports.effectTsgoTypecheckCommand = __webpack_exports__.effectTsgoTypecheckCommand;
391
449
  for(var __rspack_i in __webpack_exports__)if (-1 === [
392
450
  "appDependencies",
393
451
  "appDevDependencies",
394
452
  "createAppPackage",
453
+ "createAppTsConfig",
454
+ "createEffectTsgoTypecheckCommand",
395
455
  "createPackageTsConfig",
396
456
  "createRootPackageJson",
457
+ "createRootTsConfig",
397
458
  "createSharedContractsIndex",
398
459
  "createSharedPackage",
460
+ "createSharedPackageTsConfig",
399
461
  "createTsConfigBase",
400
462
  "createZephyrDependencies",
401
- "effectDiagnostics",
402
- "effectTsgoTypecheckCommand"
463
+ "effectDiagnostics"
403
464
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
404
465
  Object.defineProperty(exports, '__esModule', {
405
466
  value: true
@@ -38,9 +38,8 @@ const TAILWIND_POSTCSS_VERSION = '4.3.1';
38
38
  const POSTCSS_VERSION = '8.5.15';
39
39
  const EFFECT_TSGO_VERSION = '0.14.6';
40
40
  const TYPESCRIPT_STABLE_VERSION = '6.0.3';
41
- const TYPESCRIPT_7_VERSION = '7.0.1-rc';
42
- const TYPESCRIPT_VERSION = TYPESCRIPT_7_VERSION;
43
41
  const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260624.1';
42
+ const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
44
43
  const OXLINT_VERSION = '1.71.0';
45
44
  const OXFMT_VERSION = '0.55.0';
46
45
  const ULTRACITE_VERSION = '7.8.3';
@@ -82,7 +81,6 @@ __webpack_require__.d(__webpack_exports__, {}, {
82
81
  TAILWIND_POSTCSS_VERSION: TAILWIND_POSTCSS_VERSION,
83
82
  TAILWIND_VERSION: TAILWIND_VERSION,
84
83
  TANSTACK_ROUTER_VERSION: TANSTACK_ROUTER_VERSION,
85
- TYPESCRIPT_7_VERSION: TYPESCRIPT_7_VERSION,
86
84
  TYPESCRIPT_NATIVE_PREVIEW_VERSION: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
87
85
  TYPESCRIPT_STABLE_VERSION: TYPESCRIPT_STABLE_VERSION,
88
86
  TYPESCRIPT_VERSION: TYPESCRIPT_VERSION,
@@ -113,7 +111,6 @@ exports.RSTACK_AGENT_SKILLS_COMMIT = __webpack_exports__.RSTACK_AGENT_SKILLS_COM
113
111
  exports.TAILWIND_POSTCSS_VERSION = __webpack_exports__.TAILWIND_POSTCSS_VERSION;
114
112
  exports.TAILWIND_VERSION = __webpack_exports__.TAILWIND_VERSION;
115
113
  exports.TANSTACK_ROUTER_VERSION = __webpack_exports__.TANSTACK_ROUTER_VERSION;
116
- exports.TYPESCRIPT_7_VERSION = __webpack_exports__.TYPESCRIPT_7_VERSION;
117
114
  exports.TYPESCRIPT_NATIVE_PREVIEW_VERSION = __webpack_exports__.TYPESCRIPT_NATIVE_PREVIEW_VERSION;
118
115
  exports.TYPESCRIPT_STABLE_VERSION = __webpack_exports__.TYPESCRIPT_STABLE_VERSION;
119
116
  exports.TYPESCRIPT_VERSION = __webpack_exports__.TYPESCRIPT_VERSION;
@@ -144,7 +141,6 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
144
141
  "TAILWIND_POSTCSS_VERSION",
145
142
  "TAILWIND_VERSION",
146
143
  "TANSTACK_ROUTER_VERSION",
147
- "TYPESCRIPT_7_VERSION",
148
144
  "TYPESCRIPT_NATIVE_PREVIEW_VERSION",
149
145
  "TYPESCRIPT_STABLE_VERSION",
150
146
  "TYPESCRIPT_VERSION",
@@ -34,6 +34,7 @@ __webpack_require__.d(__webpack_exports__, {
34
34
  createPerformanceReadinessConfigScript: ()=>createPerformanceReadinessConfigScript,
35
35
  createPerformanceReadinessScript: ()=>createPerformanceReadinessScript,
36
36
  createPublicSurfaceAssetsScript: ()=>createPublicSurfaceAssetsScript,
37
+ createUltramodernTypecheckScript: ()=>createUltramodernTypecheckScript,
37
38
  createWorkspaceI18nBoundaryValidationScript: ()=>createWorkspaceI18nBoundaryValidationScript,
38
39
  createWorkspaceValidationScript: ()=>createWorkspaceValidationScript,
39
40
  writeGeneratedWorkspaceScripts: ()=>writeGeneratedWorkspaceScripts
@@ -119,6 +120,9 @@ function createPerformanceReadinessConfigScript() {
119
120
  function createPerformanceReadinessScript() {
120
121
  return (0, external_fs_io_cjs_namespaceObject.readFileTemplate)("workspace-scripts/ultramodern-performance-readiness.mjs");
121
122
  }
123
+ function createUltramodernTypecheckScript() {
124
+ return (0, external_fs_io_cjs_namespaceObject.readFileTemplate)("workspace-scripts/ultramodern-typecheck.mjs");
125
+ }
122
126
  function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remotes = []) {
123
127
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/assert-mf-types.mjs", createAssertMfTypesScript(remotes));
124
128
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/validate-ultramodern-workspace.mjs", createWorkspaceValidationScript(scope, enableTailwind, remotes));
@@ -128,6 +132,7 @@ function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remote
128
132
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/proof-cloudflare-version.mjs", createCloudflareVersionProofScript());
129
133
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/ultramodern-performance-readiness.config.mjs", createPerformanceReadinessConfigScript());
130
134
  (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/ultramodern-performance-readiness.mjs", createPerformanceReadinessScript());
135
+ (0, external_fs_io_cjs_namespaceObject.writeFileReplacing)(targetDir, "scripts/ultramodern-typecheck.mjs", createUltramodernTypecheckScript());
131
136
  }
132
137
  exports.createAssertMfTypesScript = __webpack_exports__.createAssertMfTypesScript;
133
138
  exports.createCloudflareProofHelperScript = __webpack_exports__.createCloudflareProofHelperScript;
@@ -135,6 +140,7 @@ exports.createCloudflareVersionProofScript = __webpack_exports__.createCloudflar
135
140
  exports.createPerformanceReadinessConfigScript = __webpack_exports__.createPerformanceReadinessConfigScript;
136
141
  exports.createPerformanceReadinessScript = __webpack_exports__.createPerformanceReadinessScript;
137
142
  exports.createPublicSurfaceAssetsScript = __webpack_exports__.createPublicSurfaceAssetsScript;
143
+ exports.createUltramodernTypecheckScript = __webpack_exports__.createUltramodernTypecheckScript;
138
144
  exports.createWorkspaceI18nBoundaryValidationScript = __webpack_exports__.createWorkspaceI18nBoundaryValidationScript;
139
145
  exports.createWorkspaceValidationScript = __webpack_exports__.createWorkspaceValidationScript;
140
146
  exports.writeGeneratedWorkspaceScripts = __webpack_exports__.writeGeneratedWorkspaceScripts;
@@ -145,6 +151,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
145
151
  "createPerformanceReadinessConfigScript",
146
152
  "createPerformanceReadinessScript",
147
153
  "createPublicSurfaceAssetsScript",
154
+ "createUltramodernTypecheckScript",
148
155
  "createWorkspaceI18nBoundaryValidationScript",
149
156
  "createWorkspaceValidationScript",
150
157
  "writeGeneratedWorkspaceScripts"
@@ -66,7 +66,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
66
66
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/${relativePath}`, content);
67
67
  };
68
68
  (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${resolvedApp.directory}/package.json`, (0, external_package_json_cjs_namespaceObject.createAppPackage)(scope, resolvedApp, packageSource, enableTailwind, remotes));
69
- (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${resolvedApp.directory}/tsconfig.json`, (0, external_package_json_cjs_namespaceObject.createPackageTsConfig)(resolvedApp.directory, (0, external_descriptors_cjs_namespaceObject.appHasEffectApi)(resolvedApp)));
69
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${resolvedApp.directory}/tsconfig.json`, (0, external_package_json_cjs_namespaceObject.createAppTsConfig)(resolvedApp, remotes));
70
70
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, (0, external_app_files_cjs_namespaceObject.createAppEnvDts)(resolvedApp, remotes));
71
71
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, (0, external_module_federation_cjs_namespaceObject.createUltramodernBuildModule)(scope, resolvedApp));
72
72
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
@@ -109,12 +109,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
109
109
  function writeSharedPackages(targetDir, scope) {
110
110
  for (const sharedPackage of external_descriptors_cjs_namespaceObject.sharedPackages){
111
111
  (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${sharedPackage.directory}/package.json`, (0, external_package_json_cjs_namespaceObject.createSharedPackage)(scope, sharedPackage.id, sharedPackage.description));
112
- (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${sharedPackage.directory}/tsconfig.json`, {
113
- extends: `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(sharedPackage.directory)}/tsconfig.base.json`,
114
- include: [
115
- 'src'
116
- ]
117
- });
112
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${sharedPackage.directory}/tsconfig.json`, (0, external_package_json_cjs_namespaceObject.createSharedPackageTsConfig)(sharedPackage.directory));
118
113
  }
119
114
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, 'packages/shared-contracts/src/index.ts', (0, external_package_json_cjs_namespaceObject.createSharedContractsIndex)());
120
115
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, 'packages/shared-design-tokens/src/index.ts', `export const sharedDesignTokens = {
@@ -156,6 +151,7 @@ function generateUltramodernWorkspace(options) {
156
151
  });
157
152
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'package.json', (0, external_package_json_cjs_namespaceObject.createRootPackageJson)(scope, packageSource, initialVerticals));
158
153
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'tsconfig.base.json', (0, external_package_json_cjs_namespaceObject.createTsConfigBase)());
154
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'tsconfig.json', (0, external_package_json_cjs_namespaceObject.createRootTsConfig)(createdApps));
159
155
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'topology/reference-topology.json', (0, external_contracts_cjs_namespaceObject.createTopology)(scope, initialVerticals));
160
156
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'topology/ownership.json', (0, external_contracts_cjs_namespaceObject.createOwnership)(scope, initialVerticals));
161
157
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'topology/local-overlays/development.json', (0, external_contracts_cjs_namespaceObject.createDevelopmentOverlay)(initialVerticals));
@@ -13,7 +13,7 @@ import { createAppPublicLocaleMessages } from "./locales.js";
13
13
  import { createShellModuleFederationConfig } from "./module-federation.js";
14
14
  import { assertUniqueTailwindPrefixes, normalizePath, packageName, toEnvSegment, toKebabCase, toPackageScope, toPascalCase } from "./naming.js";
15
15
  import { runCodeSmithOverlays } from "./overlays.js";
16
- import { createAppPackage, createRootPackageJson } from "./package-json.js";
16
+ import { createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig } from "./package-json.js";
17
17
  import { resolvePackageSource } from "./package-source.js";
18
18
  import { createCloudflareDeployContract } from "./policy.js";
19
19
  import { createPublicWebAppArtifacts, rewriteWorkspaceAssetsForApp } from "./public-surface.js";
@@ -85,6 +85,7 @@ function rewriteShellAppFiles(workspaceRoot, scope, packageSource, enableTailwin
85
85
  const shellHost = createShellHost(remotes);
86
86
  const publicWeb = createPublicWebAppArtifacts(shellHost);
87
87
  writeJsonFile(node_path.join(workspaceRoot, `${shellApp.directory}/package.json`), createAppPackage(scope, shellHost, packageSource, enableTailwind, remotes));
88
+ writeJsonFile(node_path.join(workspaceRoot, `${shellApp.directory}/tsconfig.json`), createAppTsConfig(shellHost, remotes));
88
89
  writeFileReplacing(workspaceRoot, `${shellApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(shellHost, remotes));
89
90
  writeFileReplacing(workspaceRoot, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
90
91
  writeFileReplacing(workspaceRoot, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
@@ -425,6 +426,16 @@ function createDryRunJsonMutations(preflight, manifestUrl) {
425
426
  pointer: '/dependencies',
426
427
  description: `Wire shell dependencies for ${vertical.id}`
427
428
  },
429
+ {
430
+ path: 'tsconfig.json',
431
+ pointer: '/references',
432
+ description: `Add ${vertical.id} to the root TS-Go build graph`
433
+ },
434
+ {
435
+ path: `${shellApp.directory}/tsconfig.json`,
436
+ pointer: '/references',
437
+ description: `Add ${vertical.id} to the shell TS-Go project references`
438
+ },
428
439
  {
429
440
  path: GENERATED_CONTRACT_PATH,
430
441
  pointer: '/apps',
@@ -488,6 +499,13 @@ function addUltramodernVertical(options) {
488
499
  addShellZephyrDependency(options.workspaceRoot, scope, vertical);
489
500
  addShellWorkspaceDependency(options.workspaceRoot, scope, vertical);
490
501
  updateRootWorkspaceScripts(options.workspaceRoot, scope, packageSource, updatedVerticals);
502
+ writeJsonFile(node_path.join(options.workspaceRoot, 'tsconfig.json'), createRootTsConfig([
503
+ {
504
+ ...shellApp,
505
+ verticalRefs: updatedVerticals.map((vertical)=>vertical.id)
506
+ },
507
+ ...updatedVerticals
508
+ ]));
491
509
  const afterFiles = createFileSnapshot(options.workspaceRoot);
492
510
  const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
493
511
  const result = createGenerationResult({
@@ -7,7 +7,7 @@ import { createRspackChunkLoadingGlobal, createRspackUniqueName, packageName, ta
7
7
  import { createCloudflareDeployContract, createCloudflareSecurityContract } from "./policy.js";
8
8
  import { createPublicWebAppArtifacts } from "./public-surface.js";
9
9
  import { createLocalisedUrlsMap, createPublicRouteMetadata, createRouteOwnedI18nPaths } from "./routes.js";
10
- import { CLOUDFLARE_COMPATIBILITY_DATE, I18NEXT_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TANSTACK_ROUTER_VERSION, TYPESCRIPT_7_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION } from "./versions.js";
10
+ import { CLOUDFLARE_COMPATIBILITY_DATE, I18NEXT_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION } from "./versions.js";
11
11
  const baselineAgentSkills = [
12
12
  'rsbuild-best-practices',
13
13
  'rspack-best-practices',
@@ -185,7 +185,7 @@ function createAppConfigContract(app) {
185
185
  ],
186
186
  default: '/'
187
187
  },
188
- disableTsChecker: true,
188
+ disableTsChecker: false,
189
189
  distPath: {
190
190
  html: './'
191
191
  },
@@ -597,8 +597,8 @@ function createGeneratedContract(scope, apps = [
597
597
  toolchain: 'mise'
598
598
  },
599
599
  versions: {
600
- typescript: TYPESCRIPT_VERSION,
601
- typescript7Rc: TYPESCRIPT_7_VERSION,
600
+ typescript: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
601
+ typescriptCompatibility: TYPESCRIPT_VERSION,
602
602
  typescriptNativePreview: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
603
603
  moduleFederation: MODULE_FEDERATION_VERSION,
604
604
  tanstackRouter: TANSTACK_ROUTER_VERSION,
@@ -35,12 +35,12 @@ const sharedPackages = [
35
35
  {
36
36
  id: 'shared-contracts',
37
37
  directory: 'packages/shared-contracts',
38
- description: 'Route, ownership, and topology contract placeholders.'
38
+ description: 'Generated route, ownership, and topology contracts.'
39
39
  },
40
40
  {
41
41
  id: 'shared-design-tokens',
42
42
  directory: 'packages/shared-design-tokens',
43
- description: 'Design token placeholders consumed by shell and verticals.'
43
+ description: 'Generated design tokens consumed by shell and verticals.'
44
44
  }
45
45
  ];
46
46
  function createNeutralOwnership(id, tier = 'tier-2-vertical') {
@@ -122,7 +122,7 @@ ${bffConfig} ...(cloudflareDeployEnabled
122
122
  },
123
123
  output: {
124
124
  assetPrefix,
125
- disableTsChecker: true,
125
+ disableTsChecker: false,
126
126
  distPath: {
127
127
  html: './',
128
128
  },
@@ -178,6 +178,10 @@ ${bffPluginEntry} moduleFederationPlugin(),
178
178
  },
179
179
  },
180
180
  source: {
181
+ alias: {
182
+ '@modern-js/plugin-i18n/runtime':
183
+ '@modern-js/plugin-i18n/runtime/no-react-i18next',
184
+ },
181
185
  globalVars: {
182
186
  ULTRAMODERN_SITE_URL: siteUrl,
183
187
  },
@@ -213,6 +217,11 @@ ${bffPluginEntry} moduleFederationPlugin(),
213
217
  }
214
218
  function createSharedModuleFederationConfig() {
215
219
  return ` shared: {
220
+ '@modern-js/plugin-i18n/runtime/no-react-i18next': {
221
+ requiredVersion: pluginI18nVersion,
222
+ singleton: true,
223
+ treeShaking: false,
224
+ },
216
225
  '@modern-js/plugin-i18n/runtime': {
217
226
  requiredVersion: pluginI18nVersion,
218
227
  singleton: true,