@bleedingdev/modern-js-create 3.4.0-ultramodern.1 → 3.4.0-ultramodern.11

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 (48) hide show
  1. package/dist/cjs/ultramodern-workspace/add-vertical.cjs +24 -0
  2. package/dist/cjs/ultramodern-workspace/contracts.cjs +9 -4
  3. package/dist/cjs/ultramodern-workspace/demo-components.cjs +14 -21
  4. package/dist/cjs/ultramodern-workspace/descriptors.cjs +2 -2
  5. package/dist/cjs/ultramodern-workspace/effect-api.cjs +162 -31
  6. package/dist/cjs/ultramodern-workspace/module-federation.cjs +29 -10
  7. package/dist/cjs/ultramodern-workspace/package-json.cjs +102 -14
  8. package/dist/cjs/ultramodern-workspace/versions.cjs +6 -5
  9. package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +7 -0
  10. package/dist/cjs/ultramodern-workspace/write-workspace.cjs +7 -8
  11. package/dist/esm/ultramodern-workspace/add-vertical.js +25 -1
  12. package/dist/esm/ultramodern-workspace/contracts.js +10 -5
  13. package/dist/esm/ultramodern-workspace/demo-components.js +14 -21
  14. package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
  15. package/dist/esm/ultramodern-workspace/effect-api.js +162 -31
  16. package/dist/esm/ultramodern-workspace/module-federation.js +27 -11
  17. package/dist/esm/ultramodern-workspace/package-json.js +87 -11
  18. package/dist/esm/ultramodern-workspace/versions.js +4 -3
  19. package/dist/esm/ultramodern-workspace/workspace-scripts.js +5 -1
  20. package/dist/esm/ultramodern-workspace/write-workspace.js +11 -12
  21. package/dist/esm-node/ultramodern-workspace/add-vertical.js +25 -1
  22. package/dist/esm-node/ultramodern-workspace/contracts.js +10 -5
  23. package/dist/esm-node/ultramodern-workspace/demo-components.js +14 -21
  24. package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
  25. package/dist/esm-node/ultramodern-workspace/effect-api.js +162 -31
  26. package/dist/esm-node/ultramodern-workspace/module-federation.js +27 -11
  27. package/dist/esm-node/ultramodern-workspace/package-json.js +87 -11
  28. package/dist/esm-node/ultramodern-workspace/versions.js +4 -3
  29. package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +5 -1
  30. package/dist/esm-node/ultramodern-workspace/write-workspace.js +11 -12
  31. package/dist/types/ultramodern-workspace/module-federation.d.ts +1 -0
  32. package/dist/types/ultramodern-workspace/package-json.d.ts +12 -2
  33. package/dist/types/ultramodern-workspace/versions.d.ts +3 -2
  34. package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +1 -0
  35. package/package.json +4 -4
  36. package/template-workspace/AGENTS.md.handlebars +2 -1
  37. package/template-workspace/README.md.handlebars +7 -0
  38. package/template-workspace/oxfmt.config.ts +3 -1
  39. package/template-workspace/oxlint.config.ts +3 -1
  40. package/template-workspace/patches/@tanstack__router-core@1.171.13.patch +51 -0
  41. package/template-workspace/pnpm-workspace.yaml.handlebars +12 -0
  42. package/template-workspace/scripts/bootstrap-agent-skills.mjs +42 -10
  43. package/templates/app/shell-frame.tsx +1 -2
  44. package/templates/app/ultramodern-route-head.tsx.handlebars +22 -11
  45. package/templates/packages/shared-contracts-index.ts +206 -272
  46. package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +9 -0
  47. package/templates/workspace-scripts/ultramodern-typecheck.mjs +197 -0
  48. package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +234 -2
@@ -45,6 +45,7 @@ __webpack_require__.d(__webpack_exports__, {
45
45
  createSharedModuleFederationConfig: ()=>createSharedModuleFederationConfig,
46
46
  createShellModuleFederationConfig: ()=>createShellModuleFederationConfig,
47
47
  createUltramodernBuildModule: ()=>createUltramodernBuildModule,
48
+ createUltramodernBuildReexportModule: ()=>createUltramodernBuildReexportModule,
48
49
  formatTsObjectLiteral: ()=>formatTsObjectLiteral
49
50
  });
50
51
  const external_node_crypto_namespaceObject = require("node:crypto");
@@ -172,7 +173,7 @@ ${bffConfig} ...(cloudflareDeployEnabled
172
173
  },
173
174
  output: {
174
175
  assetPrefix,
175
- disableTsChecker: true,
176
+ disableTsChecker: false,
176
177
  distPath: {
177
178
  html: './',
178
179
  },
@@ -228,6 +229,10 @@ ${bffPluginEntry} moduleFederationPlugin(),
228
229
  },
229
230
  },
230
231
  source: {
232
+ alias: {
233
+ '@modern-js/plugin-i18n/runtime':
234
+ '@modern-js/plugin-i18n/runtime/no-react-i18next',
235
+ },
231
236
  globalVars: {
232
237
  ULTRAMODERN_SITE_URL: siteUrl,
233
238
  },
@@ -241,12 +246,6 @@ ${bffPluginEntry} moduleFederationPlugin(),
241
246
  chain.output
242
247
  .uniqueName('${(0, external_naming_cjs_namespaceObject.createRspackUniqueName)(app)}')
243
248
  .chunkLoadingGlobal('${(0, external_naming_cjs_namespaceObject.createRspackChunkLoadingGlobal)(app)}');
244
- chain.ignoreWarnings([
245
- {
246
- message: /the request of a dependency is an expression/u,
247
- module: /modern-js-plugin-i18n/u,
248
- },
249
- ]);
250
249
  },
251
250
  },
252
251
  },
@@ -263,7 +262,7 @@ ${bffPluginEntry} moduleFederationPlugin(),
263
262
  }
264
263
  function createSharedModuleFederationConfig() {
265
264
  return ` shared: {
266
- '@modern-js/plugin-i18n/runtime': {
265
+ '@modern-js/plugin-i18n/runtime/no-react-i18next': {
267
266
  requiredVersion: pluginI18nVersion,
268
267
  singleton: true,
269
268
  treeShaking: false,
@@ -383,7 +382,9 @@ const reactVersion = (require('react/package.json') as { version: string }).vers
383
382
  const reactDomVersion = (require('react-dom/package.json') as { version: string }).version;
384
383
 
385
384
  ${createModuleFederationRemoteUrlHelpers(shellHost, remotes)}
386
- export default createModuleFederationConfig({
385
+ const moduleFederationConfig: Parameters<
386
+ typeof createModuleFederationConfig
387
+ >[0] = createModuleFederationConfig({
387
388
  bridge: {
388
389
  enableBridgeRouter: false,
389
390
  },
@@ -395,12 +396,15 @@ export default createModuleFederationConfig({
395
396
  generateTypes: {
396
397
  compilerInstance: 'tsgo',
397
398
  },
399
+ tsConfigPath: './tsconfig.mf-types.json',
398
400
  },
399
401
  filename: 'remoteEntry.js',
400
402
  name: '${external_descriptors_cjs_namespaceObject.shellApp.mfName}',
401
403
  ${createModuleFederationRemotesConfig(scope, shellHost, remotes)}${createSharedModuleFederationConfig()},
402
404
  treeShakingSharedExcludePlugins: ['RspackModuleFederationPlugin'],
403
405
  });
406
+
407
+ export default moduleFederationConfig;
404
408
  `;
405
409
  }
406
410
  function createBuildMarker(scope, app) {
@@ -426,6 +430,14 @@ export const ultramodernApiMarker = {
426
430
  } as const;
427
431
  `;
428
432
  }
433
+ function createUltramodernBuildReexportModule() {
434
+ return `export {
435
+ ultramodernApiMarker,
436
+ ultramodernUiMarker,
437
+ ultramodernVerticalIdentity,
438
+ } from '../shared/ultramodern-build';
439
+ `;
440
+ }
429
441
  function createRemoteModuleFederationConfig(scope, app, remotes = []) {
430
442
  const exposes = formatTsObjectLiteral(app.exposes ?? {});
431
443
  return `// @effect-diagnostics nodeBuiltinImport:off
@@ -441,7 +453,9 @@ const reactVersion = (require('react/package.json') as { version: string }).vers
441
453
  const reactDomVersion = (require('react-dom/package.json') as { version: string }).version;
442
454
 
443
455
  ${createModuleFederationRemoteUrlHelpers(app, remotes)}
444
- export default createModuleFederationConfig({
456
+ const moduleFederationConfig: Parameters<
457
+ typeof createModuleFederationConfig
458
+ >[0] = createModuleFederationConfig({
445
459
  bridge: {
446
460
  enableBridgeRouter: false,
447
461
  },
@@ -453,6 +467,7 @@ export default createModuleFederationConfig({
453
467
  generateTypes: {
454
468
  compilerInstance: 'tsgo',
455
469
  },
470
+ tsConfigPath: './tsconfig.mf-types.json',
456
471
  },
457
472
  exposes: ${exposes},
458
473
  filename: 'remoteEntry.js',
@@ -460,6 +475,8 @@ export default createModuleFederationConfig({
460
475
  ${createModuleFederationRemotesConfig(scope, app, remotes)}${createSharedModuleFederationConfig()},
461
476
  treeShakingSharedExcludePlugins: ['RspackModuleFederationPlugin'],
462
477
  });
478
+
479
+ export default moduleFederationConfig;
463
480
  `;
464
481
  }
465
482
  exports.createAppModernConfig = __webpack_exports__.createAppModernConfig;
@@ -470,6 +487,7 @@ exports.createRemoteModuleFederationConfig = __webpack_exports__.createRemoteMod
470
487
  exports.createSharedModuleFederationConfig = __webpack_exports__.createSharedModuleFederationConfig;
471
488
  exports.createShellModuleFederationConfig = __webpack_exports__.createShellModuleFederationConfig;
472
489
  exports.createUltramodernBuildModule = __webpack_exports__.createUltramodernBuildModule;
490
+ exports.createUltramodernBuildReexportModule = __webpack_exports__.createUltramodernBuildReexportModule;
473
491
  exports.formatTsObjectLiteral = __webpack_exports__.formatTsObjectLiteral;
474
492
  for(var __rspack_i in __webpack_exports__)if (-1 === [
475
493
  "createAppModernConfig",
@@ -480,6 +498,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
480
498
  "createSharedModuleFederationConfig",
481
499
  "createShellModuleFederationConfig",
482
500
  "createUltramodernBuildModule",
501
+ "createUltramodernBuildReexportModule",
483
502
  "formatTsObjectLiteral"
484
503
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
485
504
  Object.defineProperty(exports, '__esModule', {
@@ -30,15 +30,19 @@ __webpack_require__.r(__webpack_exports__);
30
30
  __webpack_require__.d(__webpack_exports__, {
31
31
  appDependencies: ()=>appDependencies,
32
32
  appDevDependencies: ()=>appDevDependencies,
33
+ createAppMfTypesTsConfig: ()=>createAppMfTypesTsConfig,
33
34
  createAppPackage: ()=>createAppPackage,
35
+ createAppTsConfig: ()=>createAppTsConfig,
36
+ createEffectTsgoTypecheckCommand: ()=>createEffectTsgoTypecheckCommand,
34
37
  createPackageTsConfig: ()=>createPackageTsConfig,
35
38
  createRootPackageJson: ()=>createRootPackageJson,
39
+ createRootTsConfig: ()=>createRootTsConfig,
36
40
  createSharedContractsIndex: ()=>createSharedContractsIndex,
37
41
  createSharedPackage: ()=>createSharedPackage,
42
+ createSharedPackageTsConfig: ()=>createSharedPackageTsConfig,
38
43
  createTsConfigBase: ()=>createTsConfigBase,
39
44
  createZephyrDependencies: ()=>createZephyrDependencies,
40
- effectDiagnostics: ()=>effectDiagnostics,
41
- effectTsgoTypecheckCommand: ()=>effectTsgoTypecheckCommand
45
+ effectDiagnostics: ()=>effectDiagnostics
42
46
  });
43
47
  const external_ultramodern_package_source_cjs_namespaceObject = require("../ultramodern-package-source.cjs");
44
48
  const external_descriptors_cjs_namespaceObject = require("./descriptors.cjs");
@@ -46,7 +50,7 @@ const external_fs_io_cjs_namespaceObject = require("./fs-io.cjs");
46
50
  const external_naming_cjs_namespaceObject = require("./naming.cjs");
47
51
  const external_public_surface_cjs_namespaceObject = require("./public-surface.cjs");
48
52
  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);\"";
53
+ const createEffectTsgoTypecheckCommand = (packageDir)=>`node ${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/scripts/ultramodern-typecheck.mjs --project tsconfig.json`;
50
54
  const effectDiagnostics = [
51
55
  'anyUnknownInErrorContext',
52
56
  'classSelfMismatch',
@@ -192,7 +196,7 @@ function createRootPackageJson(scope, packageSource, remotes = []) {
192
196
  'format:check': "oxfmt --check . '!repos/**'",
193
197
  lint: 'oxlint apps verticals packages',
194
198
  'lint:fix': 'oxlint apps verticals packages --fix',
195
- typecheck: `pnpm -r --filter "@${scope}/*" typecheck`,
199
+ typecheck: "node ./scripts/ultramodern-typecheck.mjs --build tsconfig.json",
196
200
  'cloudflare:build': `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types`,
197
201
  'cloudflare:deploy': `${remoteCloudflareDeployPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:deploy`,
198
202
  'cloudflare:proof': "node ./scripts/proof-cloudflare-version.mjs --out .codex/reports/cloudflare-version-proof/public-url-proof.json",
@@ -293,17 +297,93 @@ function createTsConfigBase() {
293
297
  }
294
298
  };
295
299
  }
296
- function createPackageTsConfig(packageDir, includeApi = false) {
297
- const include = [
300
+ function createTsBuildInfoFile(packageDir) {
301
+ const cacheKey = packageDir.replace(/[^a-zA-Z0-9._-]+/gu, '__');
302
+ return `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/node_modules/.cache/tsgo/${cacheKey}.tsbuildinfo`;
303
+ }
304
+ function createTsDeclarationOutDir(packageDir) {
305
+ const cacheKey = packageDir.replace(/[^a-zA-Z0-9._-]+/gu, '__');
306
+ return `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/node_modules/.cache/tsgo/declarations/${cacheKey}`;
307
+ }
308
+ function createReferences(packageDir, references) {
309
+ return [
310
+ ...new Set(references)
311
+ ].filter((reference)=>reference !== packageDir).map((reference)=>({
312
+ path: `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/${reference}`
313
+ }));
314
+ }
315
+ function createPackageTsConfig(packageDir, options = {}) {
316
+ const resolvedOptions = 'boolean' == typeof options ? {
317
+ includeApi: options
318
+ } : options;
319
+ const include = resolvedOptions.include ?? [
298
320
  'src',
321
+ 'locales/**/*.json',
299
322
  'modern.config.ts',
300
- 'module-federation.config.ts'
323
+ 'module-federation.config.ts',
324
+ 'package.json',
325
+ 'shared'
301
326
  ];
302
- if (includeApi) include.push('api', 'shared');
303
- return {
327
+ if (resolvedOptions.includeApi) include.push('api');
328
+ const references = createReferences(packageDir, resolvedOptions.references ?? []);
329
+ const tsconfig = {
304
330
  extends: `${(0, external_naming_cjs_namespaceObject.relativeRootFor)(packageDir)}/tsconfig.base.json`,
331
+ compilerOptions: {
332
+ composite: true,
333
+ declaration: true,
334
+ declarationMap: false,
335
+ emitDeclarationOnly: true,
336
+ incremental: true,
337
+ noEmit: false,
338
+ outDir: createTsDeclarationOutDir(packageDir),
339
+ tsBuildInfoFile: createTsBuildInfoFile(packageDir)
340
+ },
305
341
  include
306
342
  };
343
+ if (references.length > 0) tsconfig.references = references;
344
+ return tsconfig;
345
+ }
346
+ function createAppTsConfig(app, remotes = []) {
347
+ const references = [
348
+ ...external_descriptors_cjs_namespaceObject.sharedPackages.map((sharedPackage)=>sharedPackage.directory),
349
+ ...'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)
350
+ ];
351
+ return createPackageTsConfig(app.directory, {
352
+ includeApi: (0, external_descriptors_cjs_namespaceObject.appHasEffectApi)(app),
353
+ references
354
+ });
355
+ }
356
+ function createAppMfTypesTsConfig(app) {
357
+ const exposedFiles = Object.values(app.exposes ?? {}).map((exposePath)=>exposePath.replace(/^\.\//u, ''));
358
+ return {
359
+ extends: './tsconfig.json',
360
+ include: [
361
+ ...new Set([
362
+ ...exposedFiles,
363
+ 'src/modern-app-env.d.ts'
364
+ ])
365
+ ]
366
+ };
367
+ }
368
+ function createSharedPackageTsConfig(packageDir) {
369
+ return createPackageTsConfig(packageDir, {
370
+ include: [
371
+ 'src'
372
+ ]
373
+ });
374
+ }
375
+ function createRootTsConfig(apps = []) {
376
+ return {
377
+ files: [],
378
+ references: [
379
+ ...external_descriptors_cjs_namespaceObject.sharedPackages.map((sharedPackage)=>({
380
+ path: sharedPackage.directory
381
+ })),
382
+ ...apps.map((app)=>({
383
+ path: app.directory
384
+ }))
385
+ ]
386
+ };
307
387
  }
308
388
  function createAppPackage(scope, app, packageSource, enableTailwind, remotes = []) {
309
389
  const publicSurfaceBuildCommand = (0, external_public_surface_cjs_namespaceObject.createPublicSurfaceGenerationCommand)(app, 'dist');
@@ -325,7 +405,7 @@ function createAppPackage(scope, app, packageSource, enableTailwind, remotes = [
325
405
  'cloudflare:preview': 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
326
406
  'cloudflare:proof': `node ${(0, external_naming_cjs_namespaceObject.relativeRootFor)(app.directory)}/scripts/proof-cloudflare-version.mjs --app ${app.id}`,
327
407
  serve: 'modern serve',
328
- typecheck: effectTsgoTypecheckCommand
408
+ typecheck: createEffectTsgoTypecheckCommand(app.directory)
329
409
  },
330
410
  modernjs: {
331
411
  preset: 'presetUltramodern',
@@ -361,7 +441,7 @@ function createSharedPackage(scope, id, description) {
361
441
  '.': './src/index.ts'
362
442
  },
363
443
  scripts: {
364
- typecheck: effectTsgoTypecheckCommand
444
+ typecheck: createEffectTsgoTypecheckCommand(`packages/${id}`)
365
445
  },
366
446
  devDependencies: {
367
447
  '@effect/tsgo': external_versions_cjs_namespaceObject.EFFECT_TSGO_VERSION,
@@ -379,27 +459,35 @@ function createSharedContractsIndex() {
379
459
  }
380
460
  exports.appDependencies = __webpack_exports__.appDependencies;
381
461
  exports.appDevDependencies = __webpack_exports__.appDevDependencies;
462
+ exports.createAppMfTypesTsConfig = __webpack_exports__.createAppMfTypesTsConfig;
382
463
  exports.createAppPackage = __webpack_exports__.createAppPackage;
464
+ exports.createAppTsConfig = __webpack_exports__.createAppTsConfig;
465
+ exports.createEffectTsgoTypecheckCommand = __webpack_exports__.createEffectTsgoTypecheckCommand;
383
466
  exports.createPackageTsConfig = __webpack_exports__.createPackageTsConfig;
384
467
  exports.createRootPackageJson = __webpack_exports__.createRootPackageJson;
468
+ exports.createRootTsConfig = __webpack_exports__.createRootTsConfig;
385
469
  exports.createSharedContractsIndex = __webpack_exports__.createSharedContractsIndex;
386
470
  exports.createSharedPackage = __webpack_exports__.createSharedPackage;
471
+ exports.createSharedPackageTsConfig = __webpack_exports__.createSharedPackageTsConfig;
387
472
  exports.createTsConfigBase = __webpack_exports__.createTsConfigBase;
388
473
  exports.createZephyrDependencies = __webpack_exports__.createZephyrDependencies;
389
474
  exports.effectDiagnostics = __webpack_exports__.effectDiagnostics;
390
- exports.effectTsgoTypecheckCommand = __webpack_exports__.effectTsgoTypecheckCommand;
391
475
  for(var __rspack_i in __webpack_exports__)if (-1 === [
392
476
  "appDependencies",
393
477
  "appDevDependencies",
478
+ "createAppMfTypesTsConfig",
394
479
  "createAppPackage",
480
+ "createAppTsConfig",
481
+ "createEffectTsgoTypecheckCommand",
395
482
  "createPackageTsConfig",
396
483
  "createRootPackageJson",
484
+ "createRootTsConfig",
397
485
  "createSharedContractsIndex",
398
486
  "createSharedPackage",
487
+ "createSharedPackageTsConfig",
399
488
  "createTsConfigBase",
400
489
  "createZephyrDependencies",
401
- "effectDiagnostics",
402
- "effectTsgoTypecheckCommand"
490
+ "effectDiagnostics"
403
491
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
404
492
  Object.defineProperty(exports, '__esModule', {
405
493
  value: true
@@ -28,6 +28,7 @@ var __webpack_require__ = {};
28
28
  var __webpack_exports__ = {};
29
29
  __webpack_require__.r(__webpack_exports__);
30
30
  const TANSTACK_ROUTER_VERSION = '1.170.16';
31
+ const TANSTACK_ROUTER_CORE_VERSION = '1.171.13';
31
32
  const MODULE_FEDERATION_VERSION = '2.6.0';
32
33
  const ZEPHYR_RSPACK_PLUGIN_VERSION = '1.1.1';
33
34
  const ZEPHYR_AGENT_VERSION = '1.1.1';
@@ -38,9 +39,8 @@ const TAILWIND_POSTCSS_VERSION = '4.3.1';
38
39
  const POSTCSS_VERSION = '8.5.15';
39
40
  const EFFECT_TSGO_VERSION = '0.14.6';
40
41
  const TYPESCRIPT_STABLE_VERSION = '6.0.3';
41
- const TYPESCRIPT_7_VERSION = '7.0.1-rc';
42
- const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
43
42
  const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260624.1';
43
+ const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
44
44
  const OXLINT_VERSION = '1.71.0';
45
45
  const OXFMT_VERSION = '0.55.0';
46
46
  const ULTRACITE_VERSION = '7.8.3';
@@ -58,6 +58,7 @@ const RSTACK_AGENT_SKILLS_COMMIT = '61c948b42512e223bad44b83af4080eba48b2677';
58
58
  const MODULE_FEDERATION_AGENT_SKILLS_COMMIT = '07bb5b6c43ad457609e00c081b72d4c42508ec76';
59
59
  const ultramodernWorkspaceVersions = {
60
60
  tanstackRouter: TANSTACK_ROUTER_VERSION,
61
+ tanstackRouterCore: TANSTACK_ROUTER_CORE_VERSION,
61
62
  moduleFederation: MODULE_FEDERATION_VERSION,
62
63
  tailwind: TAILWIND_VERSION,
63
64
  tailwindPostcss: TAILWIND_POSTCSS_VERSION
@@ -81,8 +82,8 @@ __webpack_require__.d(__webpack_exports__, {}, {
81
82
  RSTACK_AGENT_SKILLS_COMMIT: RSTACK_AGENT_SKILLS_COMMIT,
82
83
  TAILWIND_POSTCSS_VERSION: TAILWIND_POSTCSS_VERSION,
83
84
  TAILWIND_VERSION: TAILWIND_VERSION,
85
+ TANSTACK_ROUTER_CORE_VERSION: TANSTACK_ROUTER_CORE_VERSION,
84
86
  TANSTACK_ROUTER_VERSION: TANSTACK_ROUTER_VERSION,
85
- TYPESCRIPT_7_VERSION: TYPESCRIPT_7_VERSION,
86
87
  TYPESCRIPT_NATIVE_PREVIEW_VERSION: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
87
88
  TYPESCRIPT_STABLE_VERSION: TYPESCRIPT_STABLE_VERSION,
88
89
  TYPESCRIPT_VERSION: TYPESCRIPT_VERSION,
@@ -112,8 +113,8 @@ exports.REACT_VERSION = __webpack_exports__.REACT_VERSION;
112
113
  exports.RSTACK_AGENT_SKILLS_COMMIT = __webpack_exports__.RSTACK_AGENT_SKILLS_COMMIT;
113
114
  exports.TAILWIND_POSTCSS_VERSION = __webpack_exports__.TAILWIND_POSTCSS_VERSION;
114
115
  exports.TAILWIND_VERSION = __webpack_exports__.TAILWIND_VERSION;
116
+ exports.TANSTACK_ROUTER_CORE_VERSION = __webpack_exports__.TANSTACK_ROUTER_CORE_VERSION;
115
117
  exports.TANSTACK_ROUTER_VERSION = __webpack_exports__.TANSTACK_ROUTER_VERSION;
116
- exports.TYPESCRIPT_7_VERSION = __webpack_exports__.TYPESCRIPT_7_VERSION;
117
118
  exports.TYPESCRIPT_NATIVE_PREVIEW_VERSION = __webpack_exports__.TYPESCRIPT_NATIVE_PREVIEW_VERSION;
118
119
  exports.TYPESCRIPT_STABLE_VERSION = __webpack_exports__.TYPESCRIPT_STABLE_VERSION;
119
120
  exports.TYPESCRIPT_VERSION = __webpack_exports__.TYPESCRIPT_VERSION;
@@ -143,8 +144,8 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
143
144
  "RSTACK_AGENT_SKILLS_COMMIT",
144
145
  "TAILWIND_POSTCSS_VERSION",
145
146
  "TAILWIND_VERSION",
147
+ "TANSTACK_ROUTER_CORE_VERSION",
146
148
  "TANSTACK_ROUTER_VERSION",
147
- "TYPESCRIPT_7_VERSION",
148
149
  "TYPESCRIPT_NATIVE_PREVIEW_VERSION",
149
150
  "TYPESCRIPT_STABLE_VERSION",
150
151
  "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,9 +66,11 @@ 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
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${resolvedApp.directory}/tsconfig.mf-types.json`, (0, external_package_json_cjs_namespaceObject.createAppMfTypesTsConfig)(resolvedApp));
70
71
  (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
- (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, (0, external_module_federation_cjs_namespaceObject.createUltramodernBuildModule)(scope, resolvedApp));
72
+ (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, (0, external_module_federation_cjs_namespaceObject.createUltramodernBuildReexportModule)());
73
+ (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, `${resolvedApp.directory}/shared/ultramodern-build.ts`, (0, external_module_federation_cjs_namespaceObject.createUltramodernBuildModule)(scope, resolvedApp));
72
74
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
73
75
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
74
76
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, publicWeb.routeHeadFile.path, publicWeb.routeHeadFile.content);
@@ -109,12 +111,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
109
111
  function writeSharedPackages(targetDir, scope) {
110
112
  for (const sharedPackage of external_descriptors_cjs_namespaceObject.sharedPackages){
111
113
  (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
- });
114
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(targetDir, `${sharedPackage.directory}/tsconfig.json`, (0, external_package_json_cjs_namespaceObject.createSharedPackageTsConfig)(sharedPackage.directory));
118
115
  }
119
116
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, 'packages/shared-contracts/src/index.ts', (0, external_package_json_cjs_namespaceObject.createSharedContractsIndex)());
120
117
  (0, external_fs_io_cjs_namespaceObject.writeFile)(targetDir, 'packages/shared-design-tokens/src/index.ts', `export const sharedDesignTokens = {
@@ -150,12 +147,14 @@ function generateUltramodernWorkspace(options) {
150
147
  nodeVersion: external_versions_cjs_namespaceObject.NODE_VERSION,
151
148
  pnpmVersion: external_versions_cjs_namespaceObject.PNPM_VERSION,
152
149
  nodeFetchVersion: external_versions_cjs_namespaceObject.NODE_FETCH_VERSION,
150
+ tanstackRouterCoreVersion: external_versions_cjs_namespaceObject.TANSTACK_ROUTER_CORE_VERSION,
153
151
  tanstackRouterVersion: external_versions_cjs_namespaceObject.TANSTACK_ROUTER_VERSION,
154
152
  typescriptVersion: external_versions_cjs_namespaceObject.TYPESCRIPT_VERSION,
155
153
  tailwindEnabled: String(enableTailwind)
156
154
  });
157
155
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'package.json', (0, external_package_json_cjs_namespaceObject.createRootPackageJson)(scope, packageSource, initialVerticals));
158
156
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'tsconfig.base.json', (0, external_package_json_cjs_namespaceObject.createTsConfigBase)());
157
+ (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'tsconfig.json', (0, external_package_json_cjs_namespaceObject.createRootTsConfig)(createdApps));
159
158
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'topology/reference-topology.json', (0, external_contracts_cjs_namespaceObject.createTopology)(scope, initialVerticals));
160
159
  (0, external_fs_io_cjs_namespaceObject.writeJson)(options.targetDir, 'topology/ownership.json', (0, external_contracts_cjs_namespaceObject.createOwnership)(scope, initialVerticals));
161
160
  (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 { createAppMfTypesTsConfig, 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,8 @@ 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));
89
+ writeJsonFile(node_path.join(workspaceRoot, `${shellApp.directory}/tsconfig.mf-types.json`), createAppMfTypesTsConfig(shellHost));
88
90
  writeFileReplacing(workspaceRoot, `${shellApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(shellHost, remotes));
89
91
  writeFileReplacing(workspaceRoot, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
90
92
  writeFileReplacing(workspaceRoot, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
@@ -425,6 +427,21 @@ function createDryRunJsonMutations(preflight, manifestUrl) {
425
427
  pointer: '/dependencies',
426
428
  description: `Wire shell dependencies for ${vertical.id}`
427
429
  },
430
+ {
431
+ path: 'tsconfig.json',
432
+ pointer: '/references',
433
+ description: `Add ${vertical.id} to the root TS-Go build graph`
434
+ },
435
+ {
436
+ path: `${shellApp.directory}/tsconfig.json`,
437
+ pointer: '/references',
438
+ description: `Add ${vertical.id} to the shell TS-Go project references`
439
+ },
440
+ {
441
+ path: `${shellApp.directory}/tsconfig.mf-types.json`,
442
+ pointer: '/include',
443
+ description: 'Keep shell Module Federation DTS compilation scoped'
444
+ },
428
445
  {
429
446
  path: GENERATED_CONTRACT_PATH,
430
447
  pointer: '/apps',
@@ -488,6 +505,13 @@ function addUltramodernVertical(options) {
488
505
  addShellZephyrDependency(options.workspaceRoot, scope, vertical);
489
506
  addShellWorkspaceDependency(options.workspaceRoot, scope, vertical);
490
507
  updateRootWorkspaceScripts(options.workspaceRoot, scope, packageSource, updatedVerticals);
508
+ writeJsonFile(node_path.join(options.workspaceRoot, 'tsconfig.json'), createRootTsConfig([
509
+ {
510
+ ...shellApp,
511
+ verticalRefs: updatedVerticals.map((vertical)=>vertical.id)
512
+ },
513
+ ...updatedVerticals
514
+ ]));
491
515
  const afterFiles = createFileSnapshot(options.workspaceRoot);
492
516
  const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
493
517
  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_CORE_VERSION, 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
  },
@@ -544,8 +544,9 @@ function createAppGeneratedContract(scope, app, apps, enableTailwind) {
544
544
  } : {},
545
545
  exposes: Object.keys(app.exposes ?? {}),
546
546
  dts: {
547
+ compilerInstance: 'tsgo',
547
548
  displayErrorInTerminal: true,
548
- compilerInstance: 'tsgo'
549
+ tsConfigPath: './tsconfig.mf-types.json'
549
550
  },
550
551
  browserSafeExposesOnly: true,
551
552
  zephyrRspackPlugin: ZEPHYR_RSPACK_PLUGIN_VERSION
@@ -597,11 +598,12 @@ function createGeneratedContract(scope, apps = [
597
598
  toolchain: 'mise'
598
599
  },
599
600
  versions: {
600
- typescript: TYPESCRIPT_VERSION,
601
- typescript7Rc: TYPESCRIPT_7_VERSION,
601
+ typescript: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
602
+ typescriptCompatibility: TYPESCRIPT_VERSION,
602
603
  typescriptNativePreview: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
603
604
  moduleFederation: MODULE_FEDERATION_VERSION,
604
605
  tanstackRouter: TANSTACK_ROUTER_VERSION,
606
+ tanstackRouterCore: TANSTACK_ROUTER_CORE_VERSION,
605
607
  i18next: I18NEXT_VERSION,
606
608
  zephyrRspackPlugin: ZEPHYR_RSPACK_PLUGIN_VERSION,
607
609
  zephyrAgent: ZEPHYR_AGENT_VERSION,
@@ -665,9 +667,11 @@ function createTemplateManifest(modernVersion, packageSource) {
665
667
  'package.json',
666
668
  'oxfmt.config.ts',
667
669
  'oxlint.config.ts',
670
+ 'patches/**',
668
671
  'pnpm-workspace.yaml',
669
672
  "scripts/**",
670
673
  'topology/**',
674
+ 'tsconfig.json',
671
675
  'tsconfig.base.json'
672
676
  ],
673
677
  deniedPaths: [
@@ -732,6 +736,7 @@ function createTemplateManifest(modernVersion, packageSource) {
732
736
  expectedCommands: [
733
737
  'mise install',
734
738
  'pnpm install',
739
+ 'pnpm run typecheck',
735
740
  'pnpm run i18n:boundaries',
736
741
  'pnpm run contract:check',
737
742
  'pnpm run performance:readiness'