every-plugin 2.10.1 → 3.0.0-rc.0

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 (462) hide show
  1. package/bin/every-plugin-serve.mjs +12 -0
  2. package/bin/every-plugin.mjs +59 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -2
  4. package/dist/build/artifact-names.cjs +119 -0
  5. package/dist/build/artifact-names.cjs.map +1 -0
  6. package/dist/build/artifact-names.d.cts +68 -0
  7. package/dist/build/artifact-names.d.cts.map +1 -0
  8. package/dist/build/artifact-names.d.mts +68 -0
  9. package/dist/build/artifact-names.d.mts.map +1 -0
  10. package/dist/build/artifact-names.mjs +102 -0
  11. package/dist/build/artifact-names.mjs.map +1 -0
  12. package/dist/build/contract-types.cjs +89 -0
  13. package/dist/build/contract-types.cjs.map +1 -0
  14. package/dist/build/contract-types.mjs +81 -0
  15. package/dist/build/contract-types.mjs.map +1 -0
  16. package/dist/build/rspack/build-report-plugin.cjs +37 -0
  17. package/dist/build/rspack/build-report-plugin.cjs.map +1 -0
  18. package/dist/build/rspack/build-report-plugin.d.cts +18 -0
  19. package/dist/build/rspack/build-report-plugin.d.cts.map +1 -0
  20. package/dist/build/rspack/build-report-plugin.d.mts +18 -0
  21. package/dist/build/rspack/build-report-plugin.d.mts.map +1 -0
  22. package/dist/build/rspack/build-report-plugin.mjs +37 -0
  23. package/dist/build/rspack/build-report-plugin.mjs.map +1 -0
  24. package/dist/build/rspack/chunk-completeness-plugin.cjs +47 -0
  25. package/dist/build/rspack/chunk-completeness-plugin.cjs.map +1 -0
  26. package/dist/build/rspack/chunk-completeness-plugin.mjs +47 -0
  27. package/dist/build/rspack/chunk-completeness-plugin.mjs.map +1 -0
  28. package/dist/build/rspack/compose.cjs +69 -0
  29. package/dist/build/rspack/compose.cjs.map +1 -0
  30. package/dist/build/rspack/compose.d.cts +20 -0
  31. package/dist/build/rspack/compose.d.cts.map +1 -0
  32. package/dist/build/rspack/compose.d.mts +20 -0
  33. package/dist/build/rspack/compose.d.mts.map +1 -0
  34. package/dist/build/rspack/compose.mjs +65 -0
  35. package/dist/build/rspack/compose.mjs.map +1 -0
  36. package/dist/build/rspack/fix-mf-data-uri-plugin.cjs +11 -11
  37. package/dist/build/rspack/fix-mf-data-uri-plugin.cjs.map +1 -1
  38. package/dist/build/rspack/fix-mf-data-uri-plugin.d.cts +2 -0
  39. package/dist/build/rspack/fix-mf-data-uri-plugin.d.cts.map +1 -1
  40. package/dist/build/rspack/fix-mf-data-uri-plugin.d.mts +2 -0
  41. package/dist/build/rspack/fix-mf-data-uri-plugin.d.mts.map +1 -1
  42. package/dist/build/rspack/fix-mf-data-uri-plugin.mjs +11 -10
  43. package/dist/build/rspack/fix-mf-data-uri-plugin.mjs.map +1 -1
  44. package/dist/build/rspack/generated-config.cjs +35 -0
  45. package/dist/build/rspack/generated-config.cjs.map +1 -0
  46. package/dist/build/rspack/generated-config.mjs +32 -0
  47. package/dist/build/rspack/generated-config.mjs.map +1 -0
  48. package/dist/build/rspack/index.cjs +8 -5
  49. package/dist/build/rspack/index.d.cts +5 -3
  50. package/dist/build/rspack/index.d.mts +5 -3
  51. package/dist/build/rspack/index.mjs +5 -3
  52. package/dist/build/rspack/module-federation.cjs +2 -2
  53. package/dist/build/rspack/module-federation.cjs.map +1 -1
  54. package/dist/build/rspack/module-federation.mjs +1 -1
  55. package/dist/build/rspack/module-federation.mjs.map +1 -1
  56. package/dist/build/rspack/plugin.cjs +44 -69
  57. package/dist/build/rspack/plugin.cjs.map +1 -1
  58. package/dist/build/rspack/plugin.d.cts +4 -13
  59. package/dist/build/rspack/plugin.d.cts.map +1 -1
  60. package/dist/build/rspack/plugin.d.mts +4 -13
  61. package/dist/build/rspack/plugin.d.mts.map +1 -1
  62. package/dist/build/rspack/plugin.mjs +44 -69
  63. package/dist/build/rspack/plugin.mjs.map +1 -1
  64. package/dist/build/rspack/utils.cjs +7 -5
  65. package/dist/build/rspack/utils.cjs.map +1 -1
  66. package/dist/build/rspack/utils.mjs +7 -6
  67. package/dist/build/rspack/utils.mjs.map +1 -1
  68. package/dist/build/ui/factory.cjs +88 -0
  69. package/dist/build/ui/factory.cjs.map +1 -0
  70. package/dist/build/ui/factory.d.cts +11 -0
  71. package/dist/build/ui/factory.d.cts.map +1 -0
  72. package/dist/build/ui/factory.d.mts +11 -0
  73. package/dist/build/ui/factory.d.mts.map +1 -0
  74. package/dist/build/ui/factory.mjs +80 -0
  75. package/dist/build/ui/factory.mjs.map +1 -0
  76. package/dist/build/ui/generated-config.cjs +118 -0
  77. package/dist/build/ui/generated-config.cjs.map +1 -0
  78. package/dist/build/ui/generated-config.d.cts +33 -0
  79. package/dist/build/ui/generated-config.d.cts.map +1 -0
  80. package/dist/build/ui/generated-config.d.mts +33 -0
  81. package/dist/build/ui/generated-config.d.mts.map +1 -0
  82. package/dist/build/ui/generated-config.mjs +111 -0
  83. package/dist/build/ui/generated-config.mjs.map +1 -0
  84. package/dist/build/ui/hash-artifacts-plugin.cjs +61 -0
  85. package/dist/build/ui/hash-artifacts-plugin.cjs.map +1 -0
  86. package/dist/build/ui/hash-artifacts-plugin.d.cts +20 -0
  87. package/dist/build/ui/hash-artifacts-plugin.d.cts.map +1 -0
  88. package/dist/build/ui/hash-artifacts-plugin.d.mts +20 -0
  89. package/dist/build/ui/hash-artifacts-plugin.d.mts.map +1 -0
  90. package/dist/build/ui/hash-artifacts-plugin.mjs +58 -0
  91. package/dist/build/ui/hash-artifacts-plugin.mjs.map +1 -0
  92. package/dist/build/ui/index.cjs +90 -0
  93. package/dist/build/ui/index.cjs.map +1 -0
  94. package/dist/build/ui/index.d.cts +29 -0
  95. package/dist/build/ui/index.d.cts.map +1 -0
  96. package/dist/build/ui/index.d.mts +29 -0
  97. package/dist/build/ui/index.d.mts.map +1 -0
  98. package/dist/build/ui/index.mjs +68 -0
  99. package/dist/build/ui/index.mjs.map +1 -0
  100. package/dist/build/ui/manifest-plugin.cjs +37 -0
  101. package/dist/build/ui/manifest-plugin.cjs.map +1 -0
  102. package/dist/build/ui/manifest-plugin.d.cts +19 -0
  103. package/dist/build/ui/manifest-plugin.d.cts.map +1 -0
  104. package/dist/build/ui/manifest-plugin.d.mts +19 -0
  105. package/dist/build/ui/manifest-plugin.d.mts.map +1 -0
  106. package/dist/build/ui/manifest-plugin.mjs +37 -0
  107. package/dist/build/ui/manifest-plugin.mjs.map +1 -0
  108. package/dist/build/ui/rsbuild-config.cjs +203 -0
  109. package/dist/build/ui/rsbuild-config.cjs.map +1 -0
  110. package/dist/build/ui/rsbuild-config.d.cts +45 -0
  111. package/dist/build/ui/rsbuild-config.d.cts.map +1 -0
  112. package/dist/build/ui/rsbuild-config.d.mts +45 -0
  113. package/dist/build/ui/rsbuild-config.d.mts.map +1 -0
  114. package/dist/build/ui/rsbuild-config.mjs +200 -0
  115. package/dist/build/ui/rsbuild-config.mjs.map +1 -0
  116. package/dist/build/ui/stubs.cjs +107 -0
  117. package/dist/build/ui/stubs.cjs.map +1 -0
  118. package/dist/build/ui/stubs.d.cts +25 -0
  119. package/dist/build/ui/stubs.d.cts.map +1 -0
  120. package/dist/build/ui/stubs.d.mts +25 -0
  121. package/dist/build/ui/stubs.d.mts.map +1 -0
  122. package/dist/build/ui/stubs.mjs +106 -0
  123. package/dist/build/ui/stubs.mjs.map +1 -0
  124. package/dist/cli.cjs +83 -0
  125. package/dist/cli.cjs.map +1 -0
  126. package/dist/cli.d.cts +6 -0
  127. package/dist/cli.d.cts.map +1 -0
  128. package/dist/cli.d.mts +6 -0
  129. package/dist/cli.d.mts.map +1 -0
  130. package/dist/cli.mjs +82 -0
  131. package/dist/cli.mjs.map +1 -0
  132. package/dist/dev/serve.cjs +390 -0
  133. package/dist/dev/serve.cjs.map +1 -0
  134. package/dist/dev/serve.d.cts +23 -0
  135. package/dist/dev/serve.d.cts.map +1 -0
  136. package/dist/dev/serve.d.mts +23 -0
  137. package/dist/dev/serve.d.mts.map +1 -0
  138. package/dist/dev/serve.mjs +384 -0
  139. package/dist/dev/serve.mjs.map +1 -0
  140. package/dist/dev/watch-kill.cjs +39 -0
  141. package/dist/dev/watch-kill.cjs.map +1 -0
  142. package/dist/dev/watch-kill.mjs +38 -0
  143. package/dist/dev/watch-kill.mjs.map +1 -0
  144. package/dist/effect-helpers.cjs +23 -0
  145. package/dist/effect-helpers.cjs.map +1 -0
  146. package/dist/effect-helpers.d.cts +20 -0
  147. package/dist/effect-helpers.d.cts.map +1 -0
  148. package/dist/effect-helpers.d.mts +20 -0
  149. package/dist/effect-helpers.d.mts.map +1 -0
  150. package/dist/effect-helpers.mjs +22 -0
  151. package/dist/effect-helpers.mjs.map +1 -0
  152. package/dist/errors.cjs +49 -69
  153. package/dist/errors.cjs.map +1 -1
  154. package/dist/errors.d.cts +13 -96
  155. package/dist/errors.d.cts.map +1 -1
  156. package/dist/errors.d.mts +13 -96
  157. package/dist/errors.d.mts.map +1 -1
  158. package/dist/errors.mjs +16 -34
  159. package/dist/errors.mjs.map +1 -1
  160. package/dist/identity.cjs +19 -0
  161. package/dist/identity.cjs.map +1 -0
  162. package/dist/identity.d.cts +33 -0
  163. package/dist/identity.d.cts.map +1 -0
  164. package/dist/identity.d.mts +33 -0
  165. package/dist/identity.d.mts.map +1 -0
  166. package/dist/identity.mjs +16 -0
  167. package/dist/identity.mjs.map +1 -0
  168. package/dist/index.cjs +8 -5
  169. package/dist/index.d.cts +8 -6
  170. package/dist/index.d.mts +8 -6
  171. package/dist/index.mjs +6 -4
  172. package/dist/plugin.cjs +12 -26
  173. package/dist/plugin.cjs.map +1 -1
  174. package/dist/plugin.d.cts +44 -25
  175. package/dist/plugin.d.cts.map +1 -1
  176. package/dist/plugin.d.mts +45 -26
  177. package/dist/plugin.d.mts.map +1 -1
  178. package/dist/plugin.mjs +15 -29
  179. package/dist/plugin.mjs.map +1 -1
  180. package/dist/remote-entry.cjs +103 -0
  181. package/dist/remote-entry.cjs.map +1 -0
  182. package/dist/remote-entry.d.cts +53 -0
  183. package/dist/remote-entry.d.cts.map +1 -0
  184. package/dist/remote-entry.d.mts +53 -0
  185. package/dist/remote-entry.d.mts.map +1 -0
  186. package/dist/remote-entry.mjs +98 -0
  187. package/dist/remote-entry.mjs.map +1 -0
  188. package/dist/runtime/errors.cjs +140 -34
  189. package/dist/runtime/errors.cjs.map +1 -1
  190. package/dist/runtime/errors.d.cts +42 -7
  191. package/dist/runtime/errors.d.cts.map +1 -1
  192. package/dist/runtime/errors.d.mts +42 -7
  193. package/dist/runtime/errors.d.mts.map +1 -1
  194. package/dist/runtime/errors.mjs +136 -31
  195. package/dist/runtime/errors.mjs.map +1 -1
  196. package/dist/runtime/index.cjs +95 -23
  197. package/dist/runtime/index.cjs.map +1 -1
  198. package/dist/runtime/index.d.cts +16 -0
  199. package/dist/runtime/index.d.cts.map +1 -1
  200. package/dist/runtime/index.d.mts +16 -0
  201. package/dist/runtime/index.d.mts.map +1 -1
  202. package/dist/runtime/index.mjs +98 -26
  203. package/dist/runtime/index.mjs.map +1 -1
  204. package/dist/runtime/mf-config.cjs +3 -78
  205. package/dist/runtime/mf-config.cjs.map +1 -1
  206. package/dist/runtime/mf-config.d.cts +3 -49
  207. package/dist/runtime/mf-config.d.cts.map +1 -1
  208. package/dist/runtime/mf-config.d.mts +3 -49
  209. package/dist/runtime/mf-config.d.mts.map +1 -1
  210. package/dist/runtime/mf-config.mjs +5 -78
  211. package/dist/runtime/mf-config.mjs.map +1 -1
  212. package/dist/runtime/services/module-federation.service.cjs +63 -12
  213. package/dist/runtime/services/module-federation.service.cjs.map +1 -1
  214. package/dist/runtime/services/module-federation.service.d.cts +4 -13
  215. package/dist/runtime/services/module-federation.service.d.mts +4 -13
  216. package/dist/runtime/services/module-federation.service.mjs +63 -14
  217. package/dist/runtime/services/module-federation.service.mjs.map +1 -1
  218. package/dist/runtime/services/normalize.cjs +2 -22
  219. package/dist/runtime/services/normalize.d.cts +2 -21
  220. package/dist/runtime/services/normalize.d.mts +2 -21
  221. package/dist/runtime/services/normalize.mjs +2 -21
  222. package/dist/runtime/services/plugin-lifecycle.service.cjs +9 -11
  223. package/dist/runtime/services/plugin-lifecycle.service.cjs.map +1 -1
  224. package/dist/runtime/services/plugin-lifecycle.service.d.cts +3 -16
  225. package/dist/runtime/services/plugin-lifecycle.service.d.mts +3 -16
  226. package/dist/runtime/services/plugin-lifecycle.service.mjs +10 -13
  227. package/dist/runtime/services/plugin-lifecycle.service.mjs.map +1 -1
  228. package/dist/runtime/services/plugin-loader.service.cjs +30 -29
  229. package/dist/runtime/services/plugin-loader.service.cjs.map +1 -1
  230. package/dist/runtime/services/plugin-loader.service.d.cts +6 -53
  231. package/dist/runtime/services/plugin-loader.service.d.mts +6 -53
  232. package/dist/runtime/services/plugin-loader.service.mjs +29 -30
  233. package/dist/runtime/services/plugin-loader.service.mjs.map +1 -1
  234. package/dist/runtime/services/plugin.service.cjs +10 -12
  235. package/dist/runtime/services/plugin.service.cjs.map +1 -1
  236. package/dist/runtime/services/plugin.service.d.cts +14 -36
  237. package/dist/runtime/services/plugin.service.d.cts.map +1 -1
  238. package/dist/runtime/services/plugin.service.d.mts +14 -36
  239. package/dist/runtime/services/plugin.service.d.mts.map +1 -1
  240. package/dist/runtime/services/plugin.service.mjs +14 -18
  241. package/dist/runtime/services/plugin.service.mjs.map +1 -1
  242. package/dist/runtime/services/secrets.service.cjs +12 -12
  243. package/dist/runtime/services/secrets.service.cjs.map +1 -1
  244. package/dist/runtime/services/secrets.service.d.cts +3 -15
  245. package/dist/runtime/services/secrets.service.d.mts +3 -15
  246. package/dist/runtime/services/secrets.service.mjs +12 -13
  247. package/dist/runtime/services/secrets.service.mjs.map +1 -1
  248. package/dist/runtime/services/shared-identity.cjs +40 -0
  249. package/dist/runtime/services/shared-identity.cjs.map +1 -0
  250. package/dist/runtime/services/shared-identity.mjs +38 -0
  251. package/dist/runtime/services/shared-identity.mjs.map +1 -0
  252. package/dist/runtime/validation.cjs +2 -2
  253. package/dist/runtime/validation.cjs.map +1 -1
  254. package/dist/runtime/validation.mjs +2 -2
  255. package/dist/runtime/validation.mjs.map +1 -1
  256. package/dist/shared-deps-spec.cjs +384 -0
  257. package/dist/shared-deps-spec.cjs.map +1 -0
  258. package/dist/shared-deps-spec.d.cts +182 -0
  259. package/dist/shared-deps-spec.d.cts.map +1 -0
  260. package/dist/shared-deps-spec.d.mts +182 -0
  261. package/dist/shared-deps-spec.d.mts.map +1 -0
  262. package/dist/shared-deps-spec.mjs +368 -0
  263. package/dist/shared-deps-spec.mjs.map +1 -0
  264. package/dist/types.d.cts +22 -41
  265. package/dist/types.d.cts.map +1 -1
  266. package/dist/types.d.mts +22 -41
  267. package/dist/types.d.mts.map +1 -1
  268. package/dist/ui/manifest/construct.cjs +268 -0
  269. package/dist/ui/manifest/construct.cjs.map +1 -0
  270. package/dist/ui/manifest/construct.d.cts +48 -0
  271. package/dist/ui/manifest/construct.d.cts.map +1 -0
  272. package/dist/ui/manifest/construct.d.mts +48 -0
  273. package/dist/ui/manifest/construct.d.mts.map +1 -0
  274. package/dist/ui/manifest/construct.mjs +268 -0
  275. package/dist/ui/manifest/construct.mjs.map +1 -0
  276. package/dist/ui/manifest/contract.cjs +34 -0
  277. package/dist/ui/manifest/contract.cjs.map +1 -0
  278. package/dist/ui/manifest/contract.d.cts +26 -0
  279. package/dist/ui/manifest/contract.d.cts.map +1 -0
  280. package/dist/ui/manifest/contract.d.mts +26 -0
  281. package/dist/ui/manifest/contract.d.mts.map +1 -0
  282. package/dist/ui/manifest/contract.mjs +26 -0
  283. package/dist/ui/manifest/contract.mjs.map +1 -0
  284. package/dist/ui/manifest/descriptor.cjs +64 -0
  285. package/dist/ui/manifest/descriptor.cjs.map +1 -0
  286. package/dist/ui/manifest/descriptor.d.cts +60 -0
  287. package/dist/ui/manifest/descriptor.d.cts.map +1 -0
  288. package/dist/ui/manifest/descriptor.d.mts +60 -0
  289. package/dist/ui/manifest/descriptor.d.mts.map +1 -0
  290. package/dist/ui/manifest/descriptor.mjs +61 -0
  291. package/dist/ui/manifest/descriptor.mjs.map +1 -0
  292. package/dist/ui/manifest/generator.cjs +128 -0
  293. package/dist/ui/manifest/generator.cjs.map +1 -0
  294. package/dist/ui/manifest/generator.d.cts +41 -0
  295. package/dist/ui/manifest/generator.d.cts.map +1 -0
  296. package/dist/ui/manifest/generator.d.mts +41 -0
  297. package/dist/ui/manifest/generator.d.mts.map +1 -0
  298. package/dist/ui/manifest/generator.mjs +125 -0
  299. package/dist/ui/manifest/generator.mjs.map +1 -0
  300. package/dist/ui/manifest/index.cjs +35 -0
  301. package/dist/ui/manifest/index.d.cts +9 -0
  302. package/dist/ui/manifest/index.d.mts +9 -0
  303. package/dist/ui/manifest/index.mjs +9 -0
  304. package/dist/ui/manifest/manifest-schema.cjs +97 -0
  305. package/dist/ui/manifest/manifest-schema.cjs.map +1 -0
  306. package/dist/ui/manifest/manifest-schema.d.cts +132 -0
  307. package/dist/ui/manifest/manifest-schema.d.cts.map +1 -0
  308. package/dist/ui/manifest/manifest-schema.d.mts +132 -0
  309. package/dist/ui/manifest/manifest-schema.d.mts.map +1 -0
  310. package/dist/ui/manifest/manifest-schema.mjs +90 -0
  311. package/dist/ui/manifest/manifest-schema.mjs.map +1 -0
  312. package/dist/ui/manifest/mount-registry.cjs +52 -0
  313. package/dist/ui/manifest/mount-registry.cjs.map +1 -0
  314. package/dist/ui/manifest/mount-registry.d.cts +61 -0
  315. package/dist/ui/manifest/mount-registry.d.cts.map +1 -0
  316. package/dist/ui/manifest/mount-registry.d.mts +61 -0
  317. package/dist/ui/manifest/mount-registry.d.mts.map +1 -0
  318. package/dist/ui/manifest/mount-registry.mjs +48 -0
  319. package/dist/ui/manifest/mount-registry.mjs.map +1 -0
  320. package/dist/ui/manifest/nav.cjs +13 -0
  321. package/dist/ui/manifest/nav.cjs.map +1 -0
  322. package/dist/ui/manifest/nav.d.cts +34 -0
  323. package/dist/ui/manifest/nav.d.cts.map +1 -0
  324. package/dist/ui/manifest/nav.d.mts +34 -0
  325. package/dist/ui/manifest/nav.d.mts.map +1 -0
  326. package/dist/ui/manifest/nav.mjs +13 -0
  327. package/dist/ui/manifest/nav.mjs.map +1 -0
  328. package/dist/ui/manifest/route-config.cjs +33 -0
  329. package/dist/ui/manifest/route-config.cjs.map +1 -0
  330. package/dist/ui/manifest/route-config.d.cts +40 -0
  331. package/dist/ui/manifest/route-config.d.cts.map +1 -0
  332. package/dist/ui/manifest/route-config.d.mts +40 -0
  333. package/dist/ui/manifest/route-config.d.mts.map +1 -0
  334. package/dist/ui/manifest/route-config.mjs +33 -0
  335. package/dist/ui/manifest/route-config.mjs.map +1 -0
  336. package/dist/version-manifest.cjs +65 -0
  337. package/dist/version-manifest.cjs.map +1 -0
  338. package/dist/version-manifest.d.cts +52 -0
  339. package/dist/version-manifest.d.cts.map +1 -0
  340. package/dist/version-manifest.d.mts +52 -0
  341. package/dist/version-manifest.d.mts.map +1 -0
  342. package/dist/version-manifest.mjs +63 -0
  343. package/dist/version-manifest.mjs.map +1 -0
  344. package/package.json +165 -68
  345. package/skills/plugin-client/SKILL.md +24 -5
  346. package/skills/plugin-development/SKILL.md +79 -47
  347. package/skills/plugin-testing/SKILL.md +41 -12
  348. package/src/build/artifact-names.ts +117 -0
  349. package/src/build/contract-types.ts +101 -0
  350. package/src/build/rspack/build-report-plugin.ts +34 -0
  351. package/src/build/rspack/chunk-completeness-plugin.ts +57 -0
  352. package/src/build/rspack/compose.ts +87 -0
  353. package/src/build/rspack/fix-mf-data-uri-plugin.ts +23 -12
  354. package/src/build/rspack/generated-config.ts +35 -0
  355. package/src/build/rspack/index.ts +10 -5
  356. package/src/build/rspack/module-federation.ts +1 -1
  357. package/src/build/rspack/plugin.ts +103 -105
  358. package/src/build/rspack/utils.ts +8 -2
  359. package/src/build/ui/factory.ts +96 -0
  360. package/src/build/ui/generated-config.ts +133 -0
  361. package/src/build/ui/hash-artifacts-plugin.ts +79 -0
  362. package/src/build/ui/index.ts +98 -0
  363. package/src/build/ui/manifest-plugin.ts +54 -0
  364. package/src/build/ui/rsbuild-config.ts +256 -0
  365. package/src/build/ui/stubs.ts +103 -0
  366. package/src/cli.ts +100 -0
  367. package/src/dev/serve.ts +477 -0
  368. package/src/dev/watch-kill.ts +58 -0
  369. package/src/effect-helpers.ts +25 -0
  370. package/src/errors.ts +16 -18
  371. package/src/identity.ts +36 -0
  372. package/src/index.ts +4 -0
  373. package/src/plugin.ts +70 -92
  374. package/src/remote-entry.ts +171 -0
  375. package/src/runtime/errors.ts +186 -27
  376. package/src/runtime/index.ts +132 -43
  377. package/src/runtime/mf-config.ts +12 -107
  378. package/src/runtime/services/module-federation.service.ts +221 -117
  379. package/src/runtime/services/normalize.ts +1 -18
  380. package/src/runtime/services/plugin-lifecycle.service.ts +66 -75
  381. package/src/runtime/services/plugin-loader.service.ts +239 -212
  382. package/src/runtime/services/plugin.service.ts +61 -43
  383. package/src/runtime/services/secrets.service.ts +20 -15
  384. package/src/runtime/services/shared-identity.ts +68 -0
  385. package/src/runtime/validation.ts +5 -7
  386. package/src/shared-deps-spec.ts +478 -0
  387. package/src/types.ts +22 -48
  388. package/src/ui/manifest/construct.ts +403 -0
  389. package/src/ui/manifest/contract.ts +33 -0
  390. package/src/ui/manifest/descriptor.ts +96 -0
  391. package/src/ui/manifest/generator.ts +238 -0
  392. package/src/ui/manifest/index.ts +55 -0
  393. package/src/ui/manifest/manifest-schema.ts +107 -0
  394. package/src/ui/manifest/mount-registry.ts +50 -0
  395. package/src/ui/manifest/nav.ts +43 -0
  396. package/src/ui/manifest/route-config.ts +82 -0
  397. package/src/version-manifest.ts +88 -0
  398. package/dist/build/rspack/dev-server-middleware.cjs +0 -248
  399. package/dist/build/rspack/dev-server-middleware.cjs.map +0 -1
  400. package/dist/build/rspack/dev-server-middleware.mjs +0 -247
  401. package/dist/build/rspack/dev-server-middleware.mjs.map +0 -1
  402. package/dist/build/shared-deps.cjs +0 -83
  403. package/dist/build/shared-deps.cjs.map +0 -1
  404. package/dist/build/shared-deps.d.cts +0 -67
  405. package/dist/build/shared-deps.d.cts.map +0 -1
  406. package/dist/build/shared-deps.d.mts +0 -67
  407. package/dist/build/shared-deps.d.mts.map +0 -1
  408. package/dist/build/shared-deps.mjs +0 -79
  409. package/dist/build/shared-deps.mjs.map +0 -1
  410. package/dist/effect.cjs +0 -9
  411. package/dist/effect.d.cts +0 -1
  412. package/dist/effect.d.mts +0 -1
  413. package/dist/effect.mjs +0 -3
  414. package/dist/orpc-openapi.cjs +0 -17
  415. package/dist/orpc-openapi.d.cts +0 -2
  416. package/dist/orpc-openapi.d.mts +0 -2
  417. package/dist/orpc-openapi.mjs +0 -5
  418. package/dist/orpc.cjs +0 -46
  419. package/dist/orpc.d.cts +0 -7
  420. package/dist/orpc.d.mts +0 -7
  421. package/dist/orpc.mjs +0 -11
  422. package/dist/package.cjs +0 -23
  423. package/dist/package.cjs.map +0 -1
  424. package/dist/package.mjs +0 -17
  425. package/dist/package.mjs.map +0 -1
  426. package/dist/runtime/services/module-federation.service.d.cts.map +0 -1
  427. package/dist/runtime/services/module-federation.service.d.mts.map +0 -1
  428. package/dist/runtime/services/normalize.cjs.map +0 -1
  429. package/dist/runtime/services/normalize.d.cts.map +0 -1
  430. package/dist/runtime/services/normalize.d.mts.map +0 -1
  431. package/dist/runtime/services/normalize.mjs.map +0 -1
  432. package/dist/runtime/services/plugin-lifecycle.service.d.cts.map +0 -1
  433. package/dist/runtime/services/plugin-lifecycle.service.d.mts.map +0 -1
  434. package/dist/runtime/services/plugin-loader.service.d.cts.map +0 -1
  435. package/dist/runtime/services/plugin-loader.service.d.mts.map +0 -1
  436. package/dist/runtime/services/secrets.service.d.cts.map +0 -1
  437. package/dist/runtime/services/secrets.service.d.mts.map +0 -1
  438. package/dist/testing/index.cjs +0 -57
  439. package/dist/testing/index.cjs.map +0 -1
  440. package/dist/testing/index.d.cts +0 -54
  441. package/dist/testing/index.d.cts.map +0 -1
  442. package/dist/testing/index.d.mts +0 -54
  443. package/dist/testing/index.d.mts.map +0 -1
  444. package/dist/testing/index.mjs +0 -55
  445. package/dist/testing/index.mjs.map +0 -1
  446. package/dist/zod-core.cjs +0 -9
  447. package/dist/zod-core.d.cts +0 -1
  448. package/dist/zod-core.d.mts +0 -1
  449. package/dist/zod-core.mjs +0 -3
  450. package/dist/zod.cjs +0 -11
  451. package/dist/zod.d.cts +0 -2
  452. package/dist/zod.d.mts +0 -2
  453. package/dist/zod.mjs +0 -3
  454. package/src/build/rspack/dev-server-middleware.ts +0 -324
  455. package/src/build/shared-deps.ts +0 -102
  456. package/src/effect.ts +0 -1
  457. package/src/orpc-openapi.ts +0 -2
  458. package/src/orpc.ts +0 -9
  459. package/src/testing/index.ts +0 -87
  460. package/src/testing/mocks/module-federation.service.ts +0 -41
  461. package/src/zod-core.ts +0 -1
  462. package/src/zod.ts +0 -3
@@ -0,0 +1,45 @@
1
+ import { containerName } from "../../identity.cjs";
2
+ import { RsbuildConfig } from "@rsbuild/core";
3
+ //#region src/build/ui/rsbuild-config.d.ts
4
+ /**
5
+ * The full dual-environment rsbuild config for a manifest-composed ui source
6
+ * (ADR 0008 §7 — the plugin build contract, not per-plugin config). The core
7
+ * ui and every plugin ui source build from this one factory: `web` emits the
8
+ * browser remote, `node` the commonjs SSR container; shared deps are strict
9
+ * singletons in the given role.
10
+ */
11
+ interface UiRsbuildConfigOptions {
12
+ /** the ui source root — contains package.json, src/, and the routes dir */
13
+ workspaceRoot: string;
14
+ /** the ui workspace's package.json (shared-dep version resolution) */
15
+ pkg: {
16
+ name: string;
17
+ version?: string;
18
+ dependencies?: Record<string, string>;
19
+ devDependencies?: Record<string, string>;
20
+ };
21
+ /** core provides the shared singletons; plugin remotes consume (`import: false`) */
22
+ role: "provider" | "consumer";
23
+ /** the composition key written into manifest.gen.json (the config-side key) */
24
+ manifestName: string;
25
+ devPort: number;
26
+ webEntry: string;
27
+ webExposes: Record<string, string>;
28
+ nodeEntry: string;
29
+ nodeExposes: Record<string, string>;
30
+ copy?: Array<{
31
+ from: string;
32
+ to: string;
33
+ globOptions?: {
34
+ ignore?: string[];
35
+ };
36
+ }>;
37
+ define?: Record<string, string>;
38
+ /** routes dir relative to the rsbuild cwd — folder-form ui sources live at
39
+ * `ui/src/routes` while the build runs from the plugin root */
40
+ routesDirectory?: string;
41
+ }
42
+ declare function createUiRsbuildConfig(options: UiRsbuildConfigOptions): RsbuildConfig;
43
+ //#endregion
44
+ export { UiRsbuildConfigOptions, createUiRsbuildConfig, containerName as sanitizeContainerName };
45
+ //# sourceMappingURL=rsbuild-config.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsbuild-config.d.cts","names":[],"sources":["../../../src/build/ui/rsbuild-config.ts"],"mappings":";;;;;;;;;;UAoBiB;;EAEf;;EAEA;IACE;IACA;IACA,eAAe;IACf,kBAAkB;;;EAGpB;;EAEA;EACA;EACA;EACA,YAAY;EACZ;EACA,aAAa;EACb,OAAO;IACL;IACA;IACA;MAAgB;;;EAElB,SAAS;;;EAGT;;iBAcc,sBAAsB,SAAS,yBAAyB"}
@@ -0,0 +1,45 @@
1
+ import { containerName } from "../../identity.mjs";
2
+ import { RsbuildConfig } from "@rsbuild/core";
3
+ //#region src/build/ui/rsbuild-config.d.ts
4
+ /**
5
+ * The full dual-environment rsbuild config for a manifest-composed ui source
6
+ * (ADR 0008 §7 — the plugin build contract, not per-plugin config). The core
7
+ * ui and every plugin ui source build from this one factory: `web` emits the
8
+ * browser remote, `node` the commonjs SSR container; shared deps are strict
9
+ * singletons in the given role.
10
+ */
11
+ interface UiRsbuildConfigOptions {
12
+ /** the ui source root — contains package.json, src/, and the routes dir */
13
+ workspaceRoot: string;
14
+ /** the ui workspace's package.json (shared-dep version resolution) */
15
+ pkg: {
16
+ name: string;
17
+ version?: string;
18
+ dependencies?: Record<string, string>;
19
+ devDependencies?: Record<string, string>;
20
+ };
21
+ /** core provides the shared singletons; plugin remotes consume (`import: false`) */
22
+ role: "provider" | "consumer";
23
+ /** the composition key written into manifest.gen.json (the config-side key) */
24
+ manifestName: string;
25
+ devPort: number;
26
+ webEntry: string;
27
+ webExposes: Record<string, string>;
28
+ nodeEntry: string;
29
+ nodeExposes: Record<string, string>;
30
+ copy?: Array<{
31
+ from: string;
32
+ to: string;
33
+ globOptions?: {
34
+ ignore?: string[];
35
+ };
36
+ }>;
37
+ define?: Record<string, string>;
38
+ /** routes dir relative to the rsbuild cwd — folder-form ui sources live at
39
+ * `ui/src/routes` while the build runs from the plugin root */
40
+ routesDirectory?: string;
41
+ }
42
+ declare function createUiRsbuildConfig(options: UiRsbuildConfigOptions): RsbuildConfig;
43
+ //#endregion
44
+ export { UiRsbuildConfigOptions, createUiRsbuildConfig, containerName as sanitizeContainerName };
45
+ //# sourceMappingURL=rsbuild-config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsbuild-config.d.mts","names":[],"sources":["../../../src/build/ui/rsbuild-config.ts"],"mappings":";;;;;;;;;;UAoBiB;;EAEf;;EAEA;IACE;IACA;IACA,eAAe;IACf,kBAAkB;;;EAGpB;;EAEA;EACA;EACA;EACA,YAAY;EACZ;EACA,aAAa;EACb,OAAO;IACL;IACA;IACA;MAAgB;;;EAElB,SAAS;;;EAGT;;iBAcc,sBAAsB,SAAS,yBAAyB"}
@@ -0,0 +1,200 @@
1
+ import { isBuildInvocation, uiEntryFilename } from "../artifact-names.mjs";
2
+ import { createUiSharedDeps } from "../../shared-deps-spec.mjs";
3
+ import { containerName } from "../../identity.mjs";
4
+ import { FixMfDataUriPlugin } from "../rspack/fix-mf-data-uri-plugin.mjs";
5
+ import "../rspack/index.mjs";
6
+ import { MANIFEST_FILENAME } from "../../ui/manifest/contract.mjs";
7
+ import { uiManifestGenPlugin } from "./manifest-plugin.mjs";
8
+ import { hashArtifactsPlugin } from "./hash-artifacts-plugin.mjs";
9
+ import { restoreManifestPublicPath } from "./index.mjs";
10
+ import path from "node:path";
11
+ import { pluginModuleFederation } from "@module-federation/rsbuild-plugin";
12
+ import { defineConfig, rspack } from "@rsbuild/core";
13
+ import { pluginReact } from "@rsbuild/plugin-react";
14
+ import { TanStackRouterRspack } from "@tanstack/router-plugin/rspack";
15
+
16
+ //#region src/build/ui/rsbuild-config.ts
17
+ /**
18
+ * The node environment never owns the routeTree write: the web env's
19
+ * generator produces identical content, and both environments resolve the
20
+ * same on-disk tree. Redirecting the node write to scratch removes the
21
+ * concurrent-writers race on src/routeTree.gen.ts (the generator's
22
+ * "Cannot overwrite" retry noise).
23
+ */
24
+ const NODE_ROUTE_TREE_SCRATCH = "./node_modules/.cache/manifest-compose/routeTree.node.gen.ts";
25
+ function createUiRsbuildConfig(options) {
26
+ const { workspaceRoot, pkg, role, manifestName, devPort, webEntry, webExposes, nodeEntry, nodeExposes, copy = [], define, routesDirectory } = options;
27
+ const workspaceRootAbsolute = path.resolve(workspaceRoot);
28
+ const normalizedName = containerName(pkg.name);
29
+ const manifestGen = () => uiManifestGenPlugin({
30
+ workspaceRoot: workspaceRootAbsolute,
31
+ pluginName: manifestName
32
+ });
33
+ const uiSharedDeps = createUiSharedDeps({
34
+ role,
35
+ workspaceRoot: workspaceRootAbsolute
36
+ });
37
+ const isBuild = isBuildInvocation();
38
+ const webEnvironment = {
39
+ plugins: [
40
+ pluginReact(),
41
+ manifestGen(),
42
+ pluginModuleFederation({
43
+ name: normalizedName,
44
+ filename: uiEntryFilename({ isBuild }),
45
+ dts: false,
46
+ exposes: webExposes,
47
+ shared: uiSharedDeps
48
+ }, { environment: "web" }),
49
+ ...isBuild ? [hashArtifactsPlugin({
50
+ entryBase: "remoteEntry",
51
+ distRoot: path.join(workspaceRootAbsolute, "dist")
52
+ })] : []
53
+ ],
54
+ source: {
55
+ entry: { index: webEntry },
56
+ ...define ? { define } : {}
57
+ },
58
+ resolve: { alias: { "@": path.join(workspaceRootAbsolute, "src") } },
59
+ tools: { rspack: (config) => {
60
+ const cssPlugin = config.plugins?.find((p) => p instanceof rspack.CssExtractRspackPlugin);
61
+ if (cssPlugin) {
62
+ cssPlugin.options ??= {};
63
+ cssPlugin.options.chunkFilename = "static/css/async/[name].[contenthash].css";
64
+ }
65
+ Object.assign(config, {
66
+ target: "web",
67
+ output: {
68
+ ...config.output,
69
+ publicPath: "auto",
70
+ uniqueName: normalizedName,
71
+ chunkFilename: "static/js/async/[name].[contenthash].js",
72
+ crossOriginLoading: "anonymous"
73
+ },
74
+ resolve: {
75
+ ...config.resolve,
76
+ fallback: {
77
+ bufferutil: false,
78
+ "utf-8-validate": false
79
+ }
80
+ },
81
+ infrastructureLogging: { level: "error" },
82
+ stats: "errors-warnings",
83
+ plugins: [
84
+ ...config.plugins ?? [],
85
+ TanStackRouterRspack({
86
+ target: "react",
87
+ autoCodeSplitting: true,
88
+ routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
89
+ ...routesDirectory ? { routesDirectory } : {}
90
+ }),
91
+ new FixMfDataUriPlugin()
92
+ ]
93
+ });
94
+ return config;
95
+ } },
96
+ output: {
97
+ distPath: {
98
+ root: path.join(workspaceRootAbsolute, "dist"),
99
+ css: "static/css",
100
+ js: "static/js"
101
+ },
102
+ assetPrefix: "auto",
103
+ filename: {
104
+ js: "[name].js",
105
+ css: "style.css"
106
+ },
107
+ copy: [...copy, {
108
+ from: path.join(workspaceRootAbsolute, "src", MANIFEST_FILENAME),
109
+ to: "./"
110
+ }]
111
+ }
112
+ };
113
+ const includeNodeEnv = process.env.BOS_SSR === "1" || process.env.DEPLOY === "true" || process.env.NODE_ENV !== "development";
114
+ const nodeEnvironment = {
115
+ plugins: [
116
+ pluginReact(),
117
+ manifestGen(),
118
+ pluginModuleFederation({
119
+ name: normalizedName,
120
+ filename: uiEntryFilename({
121
+ isBuild,
122
+ server: true
123
+ }),
124
+ dts: false,
125
+ exposes: nodeExposes,
126
+ shared: uiSharedDeps
127
+ }, {
128
+ target: "node",
129
+ environment: "node"
130
+ }),
131
+ restoreManifestPublicPath(path.resolve(workspaceRootAbsolute, "dist", "ssr")),
132
+ ...isBuild ? [hashArtifactsPlugin({
133
+ entryBase: "remoteEntry.server",
134
+ distRoot: path.resolve(workspaceRootAbsolute, "dist", "ssr")
135
+ })] : []
136
+ ],
137
+ source: { entry: { index: nodeEntry } },
138
+ resolve: { alias: {
139
+ "@": path.join(workspaceRootAbsolute, "src"),
140
+ "@tanstack/react-devtools": false,
141
+ "@tanstack/react-router-devtools": false
142
+ } },
143
+ tools: { rspack: (config) => {
144
+ Object.assign(config, {
145
+ output: {
146
+ ...config.output,
147
+ uniqueName: `${normalizedName}_server`
148
+ },
149
+ resolve: {
150
+ ...config.resolve,
151
+ fallback: {
152
+ bufferutil: false,
153
+ "utf-8-validate": false
154
+ }
155
+ },
156
+ externals: [/^node:/],
157
+ infrastructureLogging: { level: "error" },
158
+ stats: "errors-warnings",
159
+ plugins: [
160
+ ...config.plugins ?? [],
161
+ TanStackRouterRspack({
162
+ target: "react",
163
+ autoCodeSplitting: false,
164
+ routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
165
+ generatedRouteTree: NODE_ROUTE_TREE_SCRATCH,
166
+ ...routesDirectory ? { routesDirectory } : {}
167
+ }),
168
+ new FixMfDataUriPlugin()
169
+ ]
170
+ });
171
+ return config;
172
+ } },
173
+ output: { distPath: { root: path.join(workspaceRootAbsolute, "dist", "ssr") } }
174
+ };
175
+ return defineConfig({
176
+ environments: {
177
+ web: webEnvironment,
178
+ ...includeNodeEnv ? { node: nodeEnvironment } : {}
179
+ },
180
+ dev: {
181
+ lazyCompilation: false,
182
+ progressBar: false,
183
+ writeToDisk: true,
184
+ client: { overlay: false }
185
+ },
186
+ server: {
187
+ port: Number(process.env.PORT) || devPort,
188
+ printUrls: ({ urls }) => urls.filter((url) => url.includes("localhost")),
189
+ headers: {
190
+ "Access-Control-Allow-Origin": "*",
191
+ "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
192
+ "Access-Control-Allow-Headers": "Content-Type"
193
+ }
194
+ }
195
+ });
196
+ }
197
+
198
+ //#endregion
199
+ export { createUiRsbuildConfig, containerName as sanitizeContainerName };
200
+ //# sourceMappingURL=rsbuild-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsbuild-config.mjs","names":["sanitizeContainerName"],"sources":["../../../src/build/ui/rsbuild-config.ts"],"sourcesContent":["import path from \"node:path\";\nimport { pluginModuleFederation } from \"@module-federation/rsbuild-plugin\";\nimport { defineConfig, type EnvironmentConfig, type RsbuildConfig, rspack } from \"@rsbuild/core\";\nimport { pluginReact } from \"@rsbuild/plugin-react\";\nimport { TanStackRouterRspack } from \"@tanstack/router-plugin/rspack\";\nimport { FixMfDataUriPlugin } from \"../../build/rspack\";\nimport { createUiSharedDeps } from \"../../shared-deps-spec\";\nimport { sanitizeContainerName } from \"../../ui/manifest/contract\";\nimport { isBuildInvocation, uiEntryFilename } from \"../artifact-names\";\nimport { hashArtifactsPlugin } from \"./hash-artifacts-plugin\";\nimport { MANIFEST_FILENAME, restoreManifestPublicPath } from \"./index\";\nimport { uiManifestGenPlugin } from \"./manifest-plugin\";\n\n/**\n * The full dual-environment rsbuild config for a manifest-composed ui source\n * (ADR 0008 §7 — the plugin build contract, not per-plugin config). The core\n * ui and every plugin ui source build from this one factory: `web` emits the\n * browser remote, `node` the commonjs SSR container; shared deps are strict\n * singletons in the given role.\n */\nexport interface UiRsbuildConfigOptions {\n /** the ui source root — contains package.json, src/, and the routes dir */\n workspaceRoot: string;\n /** the ui workspace's package.json (shared-dep version resolution) */\n pkg: {\n name: string;\n version?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n /** core provides the shared singletons; plugin remotes consume (`import: false`) */\n role: \"provider\" | \"consumer\";\n /** the composition key written into manifest.gen.json (the config-side key) */\n manifestName: string;\n devPort: number;\n webEntry: string;\n webExposes: Record<string, string>;\n nodeEntry: string;\n nodeExposes: Record<string, string>;\n copy?: Array<{\n from: string;\n to: string;\n globOptions?: { ignore?: string[] };\n }>;\n define?: Record<string, string>;\n /** routes dir relative to the rsbuild cwd — folder-form ui sources live at\n * `ui/src/routes` while the build runs from the plugin root */\n routesDirectory?: string;\n}\n\nexport { sanitizeContainerName };\n\n/**\n * The node environment never owns the routeTree write: the web env's\n * generator produces identical content, and both environments resolve the\n * same on-disk tree. Redirecting the node write to scratch removes the\n * concurrent-writers race on src/routeTree.gen.ts (the generator's\n * \"Cannot overwrite\" retry noise).\n */\nconst NODE_ROUTE_TREE_SCRATCH = \"./node_modules/.cache/manifest-compose/routeTree.node.gen.ts\";\n\nexport function createUiRsbuildConfig(options: UiRsbuildConfigOptions): RsbuildConfig {\n const {\n workspaceRoot,\n pkg,\n role,\n manifestName,\n devPort,\n webEntry,\n webExposes,\n nodeEntry,\n nodeExposes,\n copy = [],\n define,\n routesDirectory,\n } = options;\n const workspaceRootAbsolute = path.resolve(workspaceRoot);\n const normalizedName = sanitizeContainerName(pkg.name);\n const manifestGen = () =>\n uiManifestGenPlugin({ workspaceRoot: workspaceRootAbsolute, pluginName: manifestName });\n const uiSharedDeps = createUiSharedDeps({ role, workspaceRoot: workspaceRootAbsolute });\n\n const isBuild = isBuildInvocation();\n\n const webEnvironment: EnvironmentConfig = {\n plugins: [\n pluginReact(),\n manifestGen(),\n pluginModuleFederation(\n {\n name: normalizedName,\n filename: uiEntryFilename({ isBuild }),\n dts: false,\n exposes: webExposes,\n shared: uiSharedDeps,\n },\n { environment: \"web\" },\n ),\n ...(isBuild\n ? [\n hashArtifactsPlugin({\n entryBase: \"remoteEntry\",\n distRoot: path.join(workspaceRootAbsolute, \"dist\"),\n }),\n ]\n : []),\n ],\n source: { entry: { index: webEntry }, ...(define ? { define } : {}) },\n resolve: { alias: { \"@\": path.join(workspaceRootAbsolute, \"src\") } },\n tools: {\n rspack: (config) => {\n const cssPlugin = config.plugins?.find((p) => p instanceof rspack.CssExtractRspackPlugin) as\n | { options?: Record<string, string> }\n | undefined;\n if (cssPlugin) {\n cssPlugin.options ??= {};\n cssPlugin.options.chunkFilename = \"static/css/async/[name].[contenthash].css\";\n }\n Object.assign(config, {\n target: \"web\",\n output: {\n ...config.output,\n publicPath: \"auto\",\n uniqueName: normalizedName,\n chunkFilename: \"static/js/async/[name].[contenthash].js\",\n crossOriginLoading: \"anonymous\",\n },\n resolve: {\n ...config.resolve,\n fallback: { bufferutil: false, \"utf-8-validate\": false },\n },\n infrastructureLogging: { level: \"error\" },\n stats: \"errors-warnings\",\n plugins: [\n ...(config.plugins ?? []),\n TanStackRouterRspack({\n target: \"react\",\n autoCodeSplitting: true,\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n ...(routesDirectory ? { routesDirectory } : {}),\n }),\n new FixMfDataUriPlugin(),\n ],\n });\n return config;\n },\n },\n output: {\n // Absolute: the ui source root owns dist even when the build cwd is the\n // parent plugin workspace (folder-form ui sources).\n distPath: {\n root: path.join(workspaceRootAbsolute, \"dist\"),\n css: \"static/css\",\n js: \"static/js\",\n },\n assetPrefix: \"auto\",\n filename: { js: \"[name].js\", css: \"style.css\" },\n copy: [\n ...copy,\n { from: path.join(workspaceRootAbsolute, \"src\", MANIFEST_FILENAME), to: \"./\" },\n ],\n },\n };\n\n // Dev without SSR skips the node environment: it exists for the host's dev\n // SSR container and nothing else. Builds always emit both.\n const includeNodeEnv =\n process.env.BOS_SSR === \"1\" ||\n process.env.DEPLOY === \"true\" ||\n process.env.NODE_ENV !== \"development\";\n\n const nodeEnvironment: EnvironmentConfig = {\n plugins: [\n pluginReact(),\n manifestGen(),\n pluginModuleFederation(\n {\n name: normalizedName,\n filename: uiEntryFilename({ isBuild, server: true }),\n dts: false,\n exposes: nodeExposes,\n shared: uiSharedDeps,\n },\n { target: \"node\", environment: \"node\" },\n ),\n restoreManifestPublicPath(path.resolve(workspaceRootAbsolute, \"dist\", \"ssr\")),\n ...(isBuild\n ? [\n hashArtifactsPlugin({\n entryBase: \"remoteEntry.server\",\n distRoot: path.resolve(workspaceRootAbsolute, \"dist\", \"ssr\"),\n }),\n ]\n : []),\n ],\n source: { entry: { index: nodeEntry } },\n resolve: {\n alias: {\n \"@\": path.join(workspaceRootAbsolute, \"src\"),\n \"@tanstack/react-devtools\": false,\n \"@tanstack/react-router-devtools\": false,\n },\n },\n tools: {\n rspack: (config) => {\n Object.assign(config, {\n output: { ...config.output, uniqueName: `${normalizedName}_server` },\n resolve: {\n ...config.resolve,\n fallback: { bufferutil: false, \"utf-8-validate\": false },\n },\n externals: [/^node:/],\n infrastructureLogging: { level: \"error\" },\n stats: \"errors-warnings\",\n plugins: [\n ...(config.plugins ?? []),\n TanStackRouterRspack({\n target: \"react\",\n autoCodeSplitting: false,\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n generatedRouteTree: NODE_ROUTE_TREE_SCRATCH,\n ...(routesDirectory ? { routesDirectory } : {}),\n }),\n new FixMfDataUriPlugin(),\n ],\n });\n return config;\n },\n },\n // Absolute, like the web dist above — the node container must land in the\n // ui source root's dist/ssr where the host's local container server looks.\n output: { distPath: { root: path.join(workspaceRootAbsolute, \"dist\", \"ssr\") } },\n };\n\n return defineConfig({\n environments: {\n web: webEnvironment,\n ...(includeNodeEnv ? { node: nodeEnvironment } : {}),\n },\n dev: {\n lazyCompilation: false,\n progressBar: false,\n writeToDisk: true,\n client: { overlay: false },\n },\n server: {\n port: Number(process.env.PORT) || devPort,\n printUrls: ({ urls }) => urls.filter((url) => url.includes(\"localhost\")),\n headers: {\n \"Access-Control-Allow-Origin\": \"*\",\n \"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n \"Access-Control-Allow-Headers\": \"Content-Type\",\n },\n },\n });\n}\n"],"mappings":"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"}
@@ -0,0 +1,107 @@
1
+ let node_fs = require("node:fs");
2
+ let node_path = require("node:path");
3
+
4
+ //#region src/build/ui/stubs.ts
5
+ /**
6
+ * The core ui's generated bootstrap stubs — the mechanical files an app must
7
+ * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`
8
+ * bootstrap, the SSR router module, the `./compose` expose, and the ambient
9
+ * globals. Emitted into the ui source root by the framework's code-artifact
10
+ * generation pass, regenerated from the installed package version, and
11
+ * gitignored (`*.gen.*`) — never synced, never hand-maintained.
12
+ *
13
+ * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the
14
+ * framework machinery: the router policy factory (`src/router.tsx`) and the
15
+ * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).
16
+ * The seam files are scaffolded once by `bos init` and owned by the app; the
17
+ * stubs themselves carry zero app-specific content.
18
+ */
19
+ const CORE_UI_STUBS = {
20
+ "src/entry.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
21
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
22
+ import "./styles.css";
23
+ import { runEntry } from "everything-dev/ui/entry";
24
+
25
+ runEntry(() => import("./hydrate.gen"));
26
+ `,
27
+ "src/hydrate.gen.tsx": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
28
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
29
+ import "./styles.css";
30
+ import { hydrate as coreHydrate } from "everything-dev/ui/hydrate";
31
+ import { apiConnectionError } from "./app";
32
+ import { createQueryClient, createRouter } from "./router";
33
+
34
+ export function hydrate() {
35
+ return coreHydrate({
36
+ routeConfig: () => import("./routeConfig.gen"),
37
+ manifest: () => import("./manifest.gen.json"),
38
+ createRouter,
39
+ createQueryClient,
40
+ apiConnectionError,
41
+ });
42
+ }
43
+
44
+ export default hydrate;
45
+ `,
46
+ "src/router.server.gen.tsx": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
47
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
48
+ import { createServerRouterModule } from "everything-dev/ui/router-server";
49
+ import { appLocale } from "./app";
50
+ import { createQueryClient, createRouter } from "./router";
51
+ import { routeTree } from "./routeTree.gen";
52
+
53
+ const routerModule = createServerRouterModule({
54
+ defaultRouteTree: routeTree,
55
+ createRouter,
56
+ createQueryClient,
57
+ locale: appLocale,
58
+ });
59
+
60
+ export default routerModule;
61
+ `,
62
+ "src/compose.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
63
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
64
+ export type {
65
+ ConstructedTree,
66
+ ConstructInput,
67
+ ConstructPluginRef,
68
+ GateUser,
69
+ HostContext,
70
+ NavManifest,
71
+ PluginManifest,
72
+ ResolvedPlugin,
73
+ RouteConfigModule,
74
+ RouteOptionsBundle,
75
+ } from "everything-dev/ui/manifest";
76
+ export {
77
+ CORE_UI_PLUGIN_KEY,
78
+ ComposePayloadSchema,
79
+ constructTree,
80
+ } from "everything-dev/ui/manifest";
81
+ `,
82
+ "src/globals.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
83
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
84
+ /// <reference types="@rsbuild/core/types" />
85
+ `
86
+ };
87
+ /**
88
+ * Emits the stub set into the ui source root. Returns the stub paths whose
89
+ * content actually changed (empty when everything is already current) — the
90
+ * same-content suppression keeps dev watchers from regen loops.
91
+ */
92
+ function emitCoreUiStubs(uiRoot) {
93
+ const written = [];
94
+ for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {
95
+ const fullPath = (0, node_path.join)(uiRoot, relPath);
96
+ if ((0, node_fs.existsSync)(fullPath) && (0, node_fs.readFileSync)(fullPath, "utf-8") === content) continue;
97
+ (0, node_fs.mkdirSync)((0, node_path.dirname)(fullPath), { recursive: true });
98
+ (0, node_fs.writeFileSync)(fullPath, content);
99
+ written.push(relPath);
100
+ }
101
+ return written;
102
+ }
103
+
104
+ //#endregion
105
+ exports.CORE_UI_STUBS = CORE_UI_STUBS;
106
+ exports.emitCoreUiStubs = emitCoreUiStubs;
107
+ //# sourceMappingURL=stubs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stubs.cjs","names":["join","existsSync","readFileSync","dirname"],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n GateUser,\n HostContext,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport {\n CORE_UI_PLUGIN_KEY,\n ComposePayloadSchema,\n constructTree,\n} from \"everything-dev/ui/manifest\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;;;;;;CAoBtB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,eAAWA,gBAAK,QAAQ,OAAO;EACrC,QAAIC,oBAAW,QAAQ,SAAKC,sBAAa,UAAU,OAAO,MAAM,SAAS;EACzE,2BAAUC,mBAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,2BAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}
@@ -0,0 +1,25 @@
1
+ //#region src/build/ui/stubs.d.ts
2
+ /**
3
+ * The core ui's generated bootstrap stubs — the mechanical files an app must
4
+ * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`
5
+ * bootstrap, the SSR router module, the `./compose` expose, and the ambient
6
+ * globals. Emitted into the ui source root by the framework's code-artifact
7
+ * generation pass, regenerated from the installed package version, and
8
+ * gitignored (`*.gen.*`) — never synced, never hand-maintained.
9
+ *
10
+ * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the
11
+ * framework machinery: the router policy factory (`src/router.tsx`) and the
12
+ * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).
13
+ * The seam files are scaffolded once by `bos init` and owned by the app; the
14
+ * stubs themselves carry zero app-specific content.
15
+ */
16
+ declare const CORE_UI_STUBS: Record<string, string>;
17
+ /**
18
+ * Emits the stub set into the ui source root. Returns the stub paths whose
19
+ * content actually changed (empty when everything is already current) — the
20
+ * same-content suppression keeps dev watchers from regen loops.
21
+ */
22
+ declare function emitCoreUiStubs(uiRoot: string): string[];
23
+ //#endregion
24
+ export { CORE_UI_STUBS, emitCoreUiStubs };
25
+ //# sourceMappingURL=stubs.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stubs.d.cts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBA0EZ,gBAAgB"}
@@ -0,0 +1,25 @@
1
+ //#region src/build/ui/stubs.d.ts
2
+ /**
3
+ * The core ui's generated bootstrap stubs — the mechanical files an app must
4
+ * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`
5
+ * bootstrap, the SSR router module, the `./compose` expose, and the ambient
6
+ * globals. Emitted into the ui source root by the framework's code-artifact
7
+ * generation pass, regenerated from the installed package version, and
8
+ * gitignored (`*.gen.*`) — never synced, never hand-maintained.
9
+ *
10
+ * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the
11
+ * framework machinery: the router policy factory (`src/router.tsx`) and the
12
+ * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).
13
+ * The seam files are scaffolded once by `bos init` and owned by the app; the
14
+ * stubs themselves carry zero app-specific content.
15
+ */
16
+ declare const CORE_UI_STUBS: Record<string, string>;
17
+ /**
18
+ * Emits the stub set into the ui source root. Returns the stub paths whose
19
+ * content actually changed (empty when everything is already current) — the
20
+ * same-content suppression keeps dev watchers from regen loops.
21
+ */
22
+ declare function emitCoreUiStubs(uiRoot: string): string[];
23
+ //#endregion
24
+ export { CORE_UI_STUBS, emitCoreUiStubs };
25
+ //# sourceMappingURL=stubs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stubs.d.mts","names":[],"sources":["../../../src/build/ui/stubs.ts"],"mappings":";;;;;;;;;;;;;;;cAkBa,eAAe;;;;;;iBA0EZ,gBAAgB"}
@@ -0,0 +1,106 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+
4
+ //#region src/build/ui/stubs.ts
5
+ /**
6
+ * The core ui's generated bootstrap stubs — the mechanical files an app must
7
+ * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`
8
+ * bootstrap, the SSR router module, the `./compose` expose, and the ambient
9
+ * globals. Emitted into the ui source root by the framework's code-artifact
10
+ * generation pass, regenerated from the installed package version, and
11
+ * gitignored (`*.gen.*`) — never synced, never hand-maintained.
12
+ *
13
+ * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the
14
+ * framework machinery: the router policy factory (`src/router.tsx`) and the
15
+ * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).
16
+ * The seam files are scaffolded once by `bos init` and owned by the app; the
17
+ * stubs themselves carry zero app-specific content.
18
+ */
19
+ const CORE_UI_STUBS = {
20
+ "src/entry.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
21
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
22
+ import "./styles.css";
23
+ import { runEntry } from "everything-dev/ui/entry";
24
+
25
+ runEntry(() => import("./hydrate.gen"));
26
+ `,
27
+ "src/hydrate.gen.tsx": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
28
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
29
+ import "./styles.css";
30
+ import { hydrate as coreHydrate } from "everything-dev/ui/hydrate";
31
+ import { apiConnectionError } from "./app";
32
+ import { createQueryClient, createRouter } from "./router";
33
+
34
+ export function hydrate() {
35
+ return coreHydrate({
36
+ routeConfig: () => import("./routeConfig.gen"),
37
+ manifest: () => import("./manifest.gen.json"),
38
+ createRouter,
39
+ createQueryClient,
40
+ apiConnectionError,
41
+ });
42
+ }
43
+
44
+ export default hydrate;
45
+ `,
46
+ "src/router.server.gen.tsx": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
47
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
48
+ import { createServerRouterModule } from "everything-dev/ui/router-server";
49
+ import { appLocale } from "./app";
50
+ import { createQueryClient, createRouter } from "./router";
51
+ import { routeTree } from "./routeTree.gen";
52
+
53
+ const routerModule = createServerRouterModule({
54
+ defaultRouteTree: routeTree,
55
+ createRouter,
56
+ createQueryClient,
57
+ locale: appLocale,
58
+ });
59
+
60
+ export default routerModule;
61
+ `,
62
+ "src/compose.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
63
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
64
+ export type {
65
+ ConstructedTree,
66
+ ConstructInput,
67
+ ConstructPluginRef,
68
+ GateUser,
69
+ HostContext,
70
+ NavManifest,
71
+ PluginManifest,
72
+ ResolvedPlugin,
73
+ RouteConfigModule,
74
+ RouteOptionsBundle,
75
+ } from "everything-dev/ui/manifest";
76
+ export {
77
+ CORE_UI_PLUGIN_KEY,
78
+ ComposePayloadSchema,
79
+ constructTree,
80
+ } from "everything-dev/ui/manifest";
81
+ `,
82
+ "src/globals.gen.ts": `// GENERATED FILE — do not edit. Regenerated from the installed framework version
83
+ // by \`bos dev\` / \`bos build\` / \`bos typecheck\` (gitignored).
84
+ /// <reference types="@rsbuild/core/types" />
85
+ `
86
+ };
87
+ /**
88
+ * Emits the stub set into the ui source root. Returns the stub paths whose
89
+ * content actually changed (empty when everything is already current) — the
90
+ * same-content suppression keeps dev watchers from regen loops.
91
+ */
92
+ function emitCoreUiStubs(uiRoot) {
93
+ const written = [];
94
+ for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {
95
+ const fullPath = join(uiRoot, relPath);
96
+ if (existsSync(fullPath) && readFileSync(fullPath, "utf-8") === content) continue;
97
+ mkdirSync(dirname(fullPath), { recursive: true });
98
+ writeFileSync(fullPath, content);
99
+ written.push(relPath);
100
+ }
101
+ return written;
102
+ }
103
+
104
+ //#endregion
105
+ export { CORE_UI_STUBS, emitCoreUiStubs };
106
+ //# sourceMappingURL=stubs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stubs.mjs","names":[],"sources":["../../../src/build/ui/stubs.ts"],"sourcesContent":["/**\n * The core ui's generated bootstrap stubs — the mechanical files an app must\n * never author or edit (ADR 0023): the web MF entry, the `./Hydrate`\n * bootstrap, the SSR router module, the `./compose` expose, and the ambient\n * globals. Emitted into the ui source root by the framework's code-artifact\n * generation pass, regenerated from the installed package version, and\n * gitignored (`*.gen.*`) — never synced, never hand-maintained.\n *\n * The generated hydrate/SSR stubs wire the app's AUTHORED seams into the\n * framework machinery: the router policy factory (`src/router.tsx`) and the\n * app override exports from `src/app.ts` (`apiConnectionError`, `appLocale`).\n * The seam files are scaffolded once by `bos init` and owned by the app; the\n * stubs themselves carry zero app-specific content.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\nexport const CORE_UI_STUBS: Record<string, string> = {\n \"src/entry.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { runEntry } from \"everything-dev/ui/entry\";\n\nrunEntry(() => import(\"./hydrate.gen\"));\n`,\n \"src/hydrate.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport \"./styles.css\";\nimport { hydrate as coreHydrate } from \"everything-dev/ui/hydrate\";\nimport { apiConnectionError } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\n\nexport function hydrate() {\n return coreHydrate({\n routeConfig: () => import(\"./routeConfig.gen\"),\n manifest: () => import(\"./manifest.gen.json\"),\n createRouter,\n createQueryClient,\n apiConnectionError,\n });\n}\n\nexport default hydrate;\n`,\n \"src/router.server.gen.tsx\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nimport { createServerRouterModule } from \"everything-dev/ui/router-server\";\nimport { appLocale } from \"./app\";\nimport { createQueryClient, createRouter } from \"./router\";\nimport { routeTree } from \"./routeTree.gen\";\n\nconst routerModule = createServerRouterModule({\n defaultRouteTree: routeTree,\n createRouter,\n createQueryClient,\n locale: appLocale,\n});\n\nexport default routerModule;\n`,\n \"src/compose.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\nexport type {\n ConstructedTree,\n ConstructInput,\n ConstructPluginRef,\n GateUser,\n HostContext,\n NavManifest,\n PluginManifest,\n ResolvedPlugin,\n RouteConfigModule,\n RouteOptionsBundle,\n} from \"everything-dev/ui/manifest\";\nexport {\n CORE_UI_PLUGIN_KEY,\n ComposePayloadSchema,\n constructTree,\n} from \"everything-dev/ui/manifest\";\n`,\n \"src/globals.gen.ts\": `// GENERATED FILE — do not edit. Regenerated from the installed framework version\n// by \\`bos dev\\` / \\`bos build\\` / \\`bos typecheck\\` (gitignored).\n/// <reference types=\"@rsbuild/core/types\" />\n`,\n};\n\n/**\n * Emits the stub set into the ui source root. Returns the stub paths whose\n * content actually changed (empty when everything is already current) — the\n * same-content suppression keeps dev watchers from regen loops.\n */\nexport function emitCoreUiStubs(uiRoot: string): string[] {\n const written: string[] = [];\n for (const [relPath, content] of Object.entries(CORE_UI_STUBS)) {\n const fullPath = join(uiRoot, relPath);\n if (existsSync(fullPath) && readFileSync(fullPath, \"utf-8\") === content) continue;\n mkdirSync(dirname(fullPath), { recursive: true });\n writeFileSync(fullPath, content);\n written.push(relPath);\n }\n return written;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,gBAAwC;CACnD,oBAAoB;;;;;;;CAOpB,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBvB,6BAA6B;;;;;;;;;;;;;;;;CAgB7B,sBAAsB;;;;;;;;;;;;;;;;;;;;CAoBtB,sBAAsB;;;;AAIxB;;;;;;AAOA,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,aAAa,GAAG;EAC9D,MAAM,WAAW,KAAK,QAAQ,OAAO;EACrC,IAAI,WAAW,QAAQ,KAAK,aAAa,UAAU,OAAO,MAAM,SAAS;EACzE,UAAU,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EAChD,cAAc,UAAU,OAAO;EAC/B,QAAQ,KAAK,OAAO;CACtB;CACA,OAAO;AACT"}