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,80 @@
1
+ import { CORE_UI_PLUGIN_KEY } from "../../ui/manifest/contract.mjs";
2
+ import { createUiRsbuildConfig } from "./rsbuild-config.mjs";
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+
6
+ //#region src/build/ui/factory.ts
7
+ /**
8
+ * The core ui's rsbuild factory — the workspace-form counterpart of
9
+ * `createUiRsbuildConfig` (folder-form plugin uis). The config object the
10
+ * generated `.every-plugin/ui.rsbuild.config.generated.mjs` materializes:
11
+ * the APP_NAME/APP_ACCOUNT defines come from the authored config through
12
+ * `readAuthoredConfigInput` (everything-dev/config), which the generated
13
+ * file loads in the workspace's own module graph.
14
+ */
15
+ /**
16
+ * The platform skill family ships inside the framework packages' npm tarballs
17
+ * (`files: ["skills"]`), so resolving them from `node_modules` gives the core
18
+ * ui the same copies in the parent workspace (pnpm symlinks) and every
19
+ * generated child repo (published tarball). Served at `/skills/<pkg>/<skill>`.
20
+ */
21
+ const SKILL_PACKAGES = [
22
+ "everything-dev",
23
+ "every-plugin",
24
+ "better-near-auth"
25
+ ];
26
+ function platformSkillCopies(workspaceRoot) {
27
+ return SKILL_PACKAGES.flatMap((name) => {
28
+ const from = path.join(workspaceRoot, "node_modules", name, "skills");
29
+ return fs.existsSync(from) ? [{
30
+ from,
31
+ to: `./skills/${name}`,
32
+ globOptions: { ignore: ["**/_artifacts/**"] }
33
+ }] : [];
34
+ });
35
+ }
36
+ /**
37
+ * The core ui's MF build surface — entry points and the declared exposes
38
+ * (ADR 0008 §2). Entries and the bootstrap exposes resolve to GENERATED
39
+ * stubs (ADR 0023); only surfaces with consumers are declared: the browser
40
+ * bootstrap, the shared component barrel, the SSR router module, the
41
+ * composition engine, and the generated route config.
42
+ */
43
+ const CORE_UI_WEB_ENTRY = "./src/entry.gen.ts";
44
+ const CORE_UI_WEB_EXPOSES = {
45
+ "./Hydrate": "./src/hydrate.gen.tsx",
46
+ "./components": "./src/components/index.ts"
47
+ };
48
+ const CORE_UI_NODE_ENTRY = "./src/router.server.gen.tsx";
49
+ const CORE_UI_NODE_EXPOSES = {
50
+ "./Router": "./src/router.server.gen.tsx",
51
+ "./compose": "./src/compose.gen.ts",
52
+ "./routeConfig": "./src/routeConfig.gen.ts"
53
+ };
54
+ function createCoreUiRsbuildConfig({ domain, account } = {}) {
55
+ const workspaceRoot = process.cwd();
56
+ const pkg = JSON.parse(fs.readFileSync(path.join(workspaceRoot, "package.json"), "utf-8"));
57
+ return createUiRsbuildConfig({
58
+ workspaceRoot,
59
+ pkg,
60
+ role: "provider",
61
+ manifestName: "ui",
62
+ devPort: 3003,
63
+ webEntry: CORE_UI_WEB_ENTRY,
64
+ webExposes: CORE_UI_WEB_EXPOSES,
65
+ nodeEntry: CORE_UI_NODE_ENTRY,
66
+ nodeExposes: CORE_UI_NODE_EXPOSES,
67
+ copy: [{
68
+ from: path.join(workspaceRoot, "public"),
69
+ to: "./"
70
+ }, ...platformSkillCopies(workspaceRoot)],
71
+ define: {
72
+ "import.meta.env.APP_NAME": JSON.stringify(domain),
73
+ "import.meta.env.APP_ACCOUNT": JSON.stringify(account)
74
+ }
75
+ });
76
+ }
77
+
78
+ //#endregion
79
+ export { CORE_UI_NODE_ENTRY, CORE_UI_NODE_EXPOSES, CORE_UI_WEB_ENTRY, CORE_UI_WEB_EXPOSES, createCoreUiRsbuildConfig, platformSkillCopies };
80
+ //# sourceMappingURL=factory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.mjs","names":[],"sources":["../../../src/build/ui/factory.ts"],"sourcesContent":["/**\n * The core ui's rsbuild factory — the workspace-form counterpart of\n * `createUiRsbuildConfig` (folder-form plugin uis). The config object the\n * generated `.every-plugin/ui.rsbuild.config.generated.mjs` materializes:\n * the APP_NAME/APP_ACCOUNT defines come from the authored config through\n * `readAuthoredConfigInput` (everything-dev/config), which the generated\n * file loads in the workspace's own module graph.\n */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { CORE_UI_PLUGIN_KEY } from \"../../ui/manifest/contract\";\nimport { createUiRsbuildConfig } from \"./rsbuild-config\";\n\n/**\n * The platform skill family ships inside the framework packages' npm tarballs\n * (`files: [\"skills\"]`), so resolving them from `node_modules` gives the core\n * ui the same copies in the parent workspace (pnpm symlinks) and every\n * generated child repo (published tarball). Served at `/skills/<pkg>/<skill>`.\n */\nconst SKILL_PACKAGES = [\"everything-dev\", \"every-plugin\", \"better-near-auth\"] as const;\n\nexport function platformSkillCopies(workspaceRoot: string): Array<{\n from: string;\n to: string;\n globOptions: { ignore: string[] };\n}> {\n return SKILL_PACKAGES.flatMap((name) => {\n const from = path.join(workspaceRoot, \"node_modules\", name, \"skills\");\n return fs.existsSync(from)\n ? [\n {\n from,\n to: `./skills/${name}`,\n globOptions: { ignore: [\"**/_artifacts/**\"] },\n },\n ]\n : [];\n });\n}\n\nexport interface CoreUiRsbuildConfigInput {\n /** Authored config domain — stamped as `import.meta.env.APP_NAME`. */\n domain?: string;\n /** Authored config account — stamped as `import.meta.env.APP_ACCOUNT`. */\n account?: string;\n}\n\n/**\n * The core ui's MF build surface — entry points and the declared exposes\n * (ADR 0008 §2). Entries and the bootstrap exposes resolve to GENERATED\n * stubs (ADR 0023); only surfaces with consumers are declared: the browser\n * bootstrap, the shared component barrel, the SSR router module, the\n * composition engine, and the generated route config.\n */\nexport const CORE_UI_WEB_ENTRY = \"./src/entry.gen.ts\";\n\nexport const CORE_UI_WEB_EXPOSES: Record<string, string> = {\n \"./Hydrate\": \"./src/hydrate.gen.tsx\",\n \"./components\": \"./src/components/index.ts\",\n};\n\nexport const CORE_UI_NODE_ENTRY = \"./src/router.server.gen.tsx\";\n\nexport const CORE_UI_NODE_EXPOSES: Record<string, string> = {\n \"./Router\": \"./src/router.server.gen.tsx\",\n \"./compose\": \"./src/compose.gen.ts\",\n \"./routeConfig\": \"./src/routeConfig.gen.ts\",\n};\n\nexport function createCoreUiRsbuildConfig({ domain, account }: CoreUiRsbuildConfigInput = {}) {\n const workspaceRoot = process.cwd();\n const pkg = JSON.parse(fs.readFileSync(path.join(workspaceRoot, \"package.json\"), \"utf-8\")) as {\n name: string;\n };\n\n return createUiRsbuildConfig({\n workspaceRoot,\n pkg,\n role: \"provider\",\n manifestName: CORE_UI_PLUGIN_KEY,\n devPort: 3003,\n webEntry: CORE_UI_WEB_ENTRY,\n webExposes: CORE_UI_WEB_EXPOSES,\n nodeEntry: CORE_UI_NODE_ENTRY,\n nodeExposes: CORE_UI_NODE_EXPOSES,\n copy: [\n { from: path.join(workspaceRoot, \"public\"), to: \"./\" },\n ...platformSkillCopies(workspaceRoot),\n ],\n define: {\n \"import.meta.env.APP_NAME\": JSON.stringify(domain),\n \"import.meta.env.APP_ACCOUNT\": JSON.stringify(account),\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,iBAAiB;CAAC;CAAkB;CAAgB;AAAkB;AAE5E,SAAgB,oBAAoB,eAIjC;CACD,OAAO,eAAe,SAAS,SAAS;EACtC,MAAM,OAAO,KAAK,KAAK,eAAe,gBAAgB,MAAM,QAAQ;EACpE,OAAO,GAAG,WAAW,IAAI,IACrB,CACE;GACE;GACA,IAAI,YAAY;GAChB,aAAa,EAAE,QAAQ,CAAC,kBAAkB,EAAE;EAC9C,CACF,IACA,CAAC;CACP,CAAC;AACH;;;;;;;;AAgBA,MAAa,oBAAoB;AAEjC,MAAa,sBAA8C;CACzD,aAAa;CACb,gBAAgB;AAClB;AAEA,MAAa,qBAAqB;AAElC,MAAa,uBAA+C;CAC1D,YAAY;CACZ,aAAa;CACb,iBAAiB;AACnB;AAEA,SAAgB,0BAA0B,EAAE,QAAQ,YAAsC,CAAC,GAAG;CAC5F,MAAM,gBAAgB,QAAQ,IAAI;CAClC,MAAM,MAAM,KAAK,MAAM,GAAG,aAAa,KAAK,KAAK,eAAe,cAAc,GAAG,OAAO,CAAC;CAIzF,OAAO,sBAAsB;EAC3B;EACA;EACA,MAAM;EACN;EACA,SAAS;EACT,UAAU;EACV,YAAY;EACZ,WAAW;EACX,aAAa;EACb,MAAM,CACJ;GAAE,MAAM,KAAK,KAAK,eAAe,QAAQ;GAAG,IAAI;EAAK,GACrD,GAAG,oBAAoB,aAAa,CACtC;EACA,QAAQ;GACN,4BAA4B,KAAK,UAAU,MAAM;GACjD,+BAA+B,KAAK,UAAU,OAAO;EACvD;CACF,CAAC;AACH"}
@@ -0,0 +1,118 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_compose = require('../rspack/compose.cjs');
3
+ let node_fs = require("node:fs");
4
+ node_fs = require_runtime.__toESM(node_fs, 1);
5
+ let node_path = require("node:path");
6
+ node_path = require_runtime.__toESM(node_path, 1);
7
+
8
+ //#region src/build/ui/generated-config.ts
9
+ const UI_DIR = "ui";
10
+ const GENERATED_CONFIG_DIR = ".every-plugin";
11
+ const GENERATED_UI_CONFIG = "ui.rsbuild.config.generated.mjs";
12
+ /**
13
+ * Folder-form UI source: a `ui/` directory with route files but no own
14
+ * package.json — the plugin workspace owns the build (single-workspace
15
+ * plugin, one dev process, one deploy train). Workspace-form ui sources
16
+ * (own package.json + scripts) are NOT managed here.
17
+ */
18
+ function hasFolderFormUi(cwd) {
19
+ const uiDir = node_path.default.join(cwd, UI_DIR);
20
+ return node_fs.default.existsSync(node_path.default.join(uiDir, "src", "routes")) && !node_fs.default.existsSync(node_path.default.join(uiDir, "package.json"));
21
+ }
22
+ function generatedUiConfig(pluginId) {
23
+ return `import path from "node:path";
24
+ import { createUiRsbuildConfig } from "every-plugin/build/ui";
25
+ import pkg from "../package.json";
26
+
27
+ const workspaceRoot = path.resolve(import.meta.dirname, "..", "ui");
28
+
29
+ export default createUiRsbuildConfig({
30
+ workspaceRoot,
31
+ pkg,
32
+ role: "consumer",
33
+ manifestName: ${JSON.stringify(pluginId)},
34
+ devPort: Number(process.env.BOS_UI_PORT) || 0,
35
+ webEntry: "./ui/src/routeConfig.gen.ts",
36
+ webExposes: { "./routeConfig": "./ui/src/routeConfig.gen.ts" },
37
+ nodeEntry: "./ui/src/routeConfig.gen.ts",
38
+ nodeExposes: { "./routeConfig": "./ui/src/routeConfig.gen.ts" },
39
+ routesDirectory: "./ui/src/routes",
40
+ });
41
+ `;
42
+ }
43
+ /**
44
+ * Canonical config-layout derivation: the composition key for a plugin
45
+ * workspace — the `<key>` of the `plugins/<key>` directory relative to the
46
+ * nearest `bos.config.json`. The dev server and the generated ui config
47
+ * both key off this; no consumer keeps a private copy.
48
+ */
49
+ function pluginLayoutKey(cwd) {
50
+ const bosConfigPath = require_compose.findBosConfigPath(cwd);
51
+ const [workspaceGroup, layoutKey] = (bosConfigPath ? node_path.default.relative(node_path.default.dirname(bosConfigPath), cwd) : void 0)?.split(node_path.default.sep) ?? [];
52
+ return workspaceGroup === "plugins" && layoutKey ? layoutKey : null;
53
+ }
54
+ /**
55
+ * Synthesize the rsbuild config for a folder-form ui source (the plugin
56
+ * build contract, not per-plugin config — mirrors the rspack generated
57
+ * config). Returns the config file path, or null when the workspace has no
58
+ * folder-form ui source.
59
+ */
60
+ function ensureGeneratedUiRsbuildConfig(cwd) {
61
+ if (!hasFolderFormUi(cwd)) return null;
62
+ const pluginId = pluginLayoutKey(cwd);
63
+ if (!pluginId) throw new Error(`[every-plugin] cannot derive the ui's composition key from ${cwd} — no authored config (bos.app.ts / bos.config.json) found above a plugins/<key> directory. The manifest name is the layout key; the container name is never a fallback.`);
64
+ const outDir = node_path.default.join(cwd, GENERATED_CONFIG_DIR);
65
+ node_fs.default.mkdirSync(outDir, { recursive: true });
66
+ const outPath = node_path.default.join(outDir, GENERATED_UI_CONFIG);
67
+ const next = generatedUiConfig(pluginId);
68
+ if (!node_fs.default.existsSync(outPath) || node_fs.default.readFileSync(outPath, "utf8") !== next) node_fs.default.writeFileSync(outPath, next);
69
+ return outPath;
70
+ }
71
+ const CORE_UI_MARKERS = {
72
+ routes: "src/routes",
73
+ contract: "src/contract.ts"
74
+ };
75
+ /**
76
+ * Workspace-form core ui: the workspace IS the ui (own package.json, route
77
+ * tree) and is not plugin-shaped — the /api counterpart of the plugin
78
+ * workspace form. The entry stub is NOT a marker: it is generated
79
+ * (ADR 0023), so a fresh clone has no bootstrap stubs until the first
80
+ * generation pass.
81
+ */
82
+ function hasCoreUiWorkspace(cwd = process.cwd()) {
83
+ return node_fs.default.existsSync(node_path.default.join(cwd, CORE_UI_MARKERS.routes)) && !node_fs.default.existsSync(node_path.default.join(cwd, CORE_UI_MARKERS.contract)) && !node_fs.default.existsSync(node_path.default.join(cwd, "plugin.dev.ts"));
84
+ }
85
+ function generatedCoreUiConfig() {
86
+ return `import { defineConfig } from "@rsbuild/core";
87
+ import { readAuthoredConfigInput } from "everything-dev/config";
88
+ import { createCoreUiRsbuildConfig } from "every-plugin/build/ui";
89
+
90
+ export default defineConfig(async () =>
91
+ createCoreUiRsbuildConfig(await readAuthoredConfigInput()),
92
+ );
93
+ `;
94
+ }
95
+ /**
96
+ * Synthesize the rsbuild config for a workspace-form core ui with no local
97
+ * `rsbuild.config.ts` — the /api generated-config model. A local file is an
98
+ * override and wins untouched. Returns the workspace-relative config path,
99
+ * or null when the workspace is not a core ui (or has a local config).
100
+ */
101
+ function ensureGeneratedCoreUiRsbuildConfig(cwd = process.cwd()) {
102
+ if (!hasCoreUiWorkspace(cwd)) return null;
103
+ if (node_fs.default.existsSync(node_path.default.join(cwd, "rsbuild.config.ts"))) return null;
104
+ const outDir = node_path.default.join(cwd, GENERATED_CONFIG_DIR);
105
+ node_fs.default.mkdirSync(outDir, { recursive: true });
106
+ const outPath = node_path.default.join(outDir, GENERATED_UI_CONFIG);
107
+ node_fs.default.writeFileSync(outPath, generatedCoreUiConfig());
108
+ console.log("[every-plugin] rsbuild.config.ts not found — using the core ui build factory.");
109
+ return node_path.default.join(GENERATED_CONFIG_DIR, GENERATED_UI_CONFIG);
110
+ }
111
+
112
+ //#endregion
113
+ exports.ensureGeneratedCoreUiRsbuildConfig = ensureGeneratedCoreUiRsbuildConfig;
114
+ exports.ensureGeneratedUiRsbuildConfig = ensureGeneratedUiRsbuildConfig;
115
+ exports.hasCoreUiWorkspace = hasCoreUiWorkspace;
116
+ exports.hasFolderFormUi = hasFolderFormUi;
117
+ exports.pluginLayoutKey = pluginLayoutKey;
118
+ //# sourceMappingURL=generated-config.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-config.cjs","names":["path","fs","findBosConfigPath"],"sources":["../../../src/build/ui/generated-config.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { findBosConfigPath } from \"../rspack/compose\";\n\nconst UI_DIR = \"ui\";\nconst GENERATED_CONFIG_DIR = \".every-plugin\";\nconst GENERATED_UI_CONFIG = \"ui.rsbuild.config.generated.mjs\";\n\n/**\n * Folder-form UI source: a `ui/` directory with route files but no own\n * package.json — the plugin workspace owns the build (single-workspace\n * plugin, one dev process, one deploy train). Workspace-form ui sources\n * (own package.json + scripts) are NOT managed here.\n */\nexport function hasFolderFormUi(cwd: string): boolean {\n const uiDir = path.join(cwd, UI_DIR);\n return (\n fs.existsSync(path.join(uiDir, \"src\", \"routes\")) &&\n !fs.existsSync(path.join(uiDir, \"package.json\"))\n );\n}\n\nfunction generatedUiConfig(pluginId: string): string {\n return `import path from \"node:path\";\nimport { createUiRsbuildConfig } from \"every-plugin/build/ui\";\nimport pkg from \"../package.json\";\n\nconst workspaceRoot = path.resolve(import.meta.dirname, \"..\", \"ui\");\n\nexport default createUiRsbuildConfig({\n workspaceRoot,\n pkg,\n role: \"consumer\",\n manifestName: ${JSON.stringify(pluginId)},\n devPort: Number(process.env.BOS_UI_PORT) || 0,\n webEntry: \"./ui/src/routeConfig.gen.ts\",\n webExposes: { \"./routeConfig\": \"./ui/src/routeConfig.gen.ts\" },\n nodeEntry: \"./ui/src/routeConfig.gen.ts\",\n nodeExposes: { \"./routeConfig\": \"./ui/src/routeConfig.gen.ts\" },\n routesDirectory: \"./ui/src/routes\",\n});\n`;\n}\n\n/**\n * Canonical config-layout derivation: the composition key for a plugin\n * workspace — the `<key>` of the `plugins/<key>` directory relative to the\n * nearest `bos.config.json`. The dev server and the generated ui config\n * both key off this; no consumer keeps a private copy.\n */\nexport function pluginLayoutKey(cwd: string): string | null {\n const bosConfigPath = findBosConfigPath(cwd);\n const relativeWorkspace = bosConfigPath\n ? path.relative(path.dirname(bosConfigPath), cwd)\n : undefined;\n const [workspaceGroup, layoutKey] = relativeWorkspace?.split(path.sep) ?? [];\n return workspaceGroup === \"plugins\" && layoutKey ? layoutKey : null;\n}\n\n/**\n * Synthesize the rsbuild config for a folder-form ui source (the plugin\n * build contract, not per-plugin config — mirrors the rspack generated\n * config). Returns the config file path, or null when the workspace has no\n * folder-form ui source.\n */\nexport function ensureGeneratedUiRsbuildConfig(cwd: string): string | null {\n if (!hasFolderFormUi(cwd)) return null;\n // The manifest's name derives ONLY from the plugins/<key> layout key\n // (ADR 0008 §2) — a non-derivable key fails the build loudly, never the\n // container-name fallback that mis-keyed manifests.\n const pluginId = pluginLayoutKey(cwd);\n if (!pluginId) {\n throw new Error(\n `[every-plugin] cannot derive the ui's composition key from ${cwd} — no authored config (bos.app.ts / bos.config.json) found above a plugins/<key> directory. The manifest name is the layout key; the container name is never a fallback.`,\n );\n }\n const outDir = path.join(cwd, GENERATED_CONFIG_DIR);\n fs.mkdirSync(outDir, { recursive: true });\n const outPath = path.join(outDir, GENERATED_UI_CONFIG);\n const next = generatedUiConfig(pluginId);\n if (!fs.existsSync(outPath) || fs.readFileSync(outPath, \"utf8\") !== next) {\n fs.writeFileSync(outPath, next);\n }\n return outPath;\n}\n\nconst CORE_UI_MARKERS = {\n routes: \"src/routes\",\n contract: \"src/contract.ts\",\n};\n\n/**\n * Workspace-form core ui: the workspace IS the ui (own package.json, route\n * tree) and is not plugin-shaped — the /api counterpart of the plugin\n * workspace form. The entry stub is NOT a marker: it is generated\n * (ADR 0023), so a fresh clone has no bootstrap stubs until the first\n * generation pass.\n */\nexport function hasCoreUiWorkspace(cwd: string = process.cwd()): boolean {\n return (\n fs.existsSync(path.join(cwd, CORE_UI_MARKERS.routes)) &&\n !fs.existsSync(path.join(cwd, CORE_UI_MARKERS.contract)) &&\n !fs.existsSync(path.join(cwd, \"plugin.dev.ts\"))\n );\n}\n\nfunction generatedCoreUiConfig(): string {\n return `import { defineConfig } from \"@rsbuild/core\";\nimport { readAuthoredConfigInput } from \"everything-dev/config\";\nimport { createCoreUiRsbuildConfig } from \"every-plugin/build/ui\";\n\nexport default defineConfig(async () =>\n createCoreUiRsbuildConfig(await readAuthoredConfigInput()),\n);\n`;\n}\n\n/**\n * Synthesize the rsbuild config for a workspace-form core ui with no local\n * `rsbuild.config.ts` — the /api generated-config model. A local file is an\n * override and wins untouched. Returns the workspace-relative config path,\n * or null when the workspace is not a core ui (or has a local config).\n */\nexport function ensureGeneratedCoreUiRsbuildConfig(cwd: string = process.cwd()): string | null {\n if (!hasCoreUiWorkspace(cwd)) return null;\n if (fs.existsSync(path.join(cwd, \"rsbuild.config.ts\"))) return null;\n const outDir = path.join(cwd, GENERATED_CONFIG_DIR);\n fs.mkdirSync(outDir, { recursive: true });\n const outPath = path.join(outDir, GENERATED_UI_CONFIG);\n fs.writeFileSync(outPath, generatedCoreUiConfig());\n console.log(\"[every-plugin] rsbuild.config.ts not found — using the core ui build factory.\");\n return path.join(GENERATED_CONFIG_DIR, GENERATED_UI_CONFIG);\n}\n"],"mappings":";;;;;;;;AAIA,MAAM,SAAS;AACf,MAAM,uBAAuB;AAC7B,MAAM,sBAAsB;;;;;;;AAQ5B,SAAgB,gBAAgB,KAAsB;CACpD,MAAM,QAAQA,kBAAK,KAAK,KAAK,MAAM;CACnC,OACEC,gBAAG,WAAWD,kBAAK,KAAK,OAAO,OAAO,QAAQ,CAAC,KAC/C,CAACC,gBAAG,WAAWD,kBAAK,KAAK,OAAO,cAAc,CAAC;AAEnD;AAEA,SAAS,kBAAkB,UAA0B;CACnD,OAAO;;;;;;;;;;kBAUS,KAAK,UAAU,QAAQ,EAAE;;;;;;;;;AAS3C;;;;;;;AAQA,SAAgB,gBAAgB,KAA4B;CAC1D,MAAM,gBAAgBE,kCAAkB,GAAG;CAI3C,MAAM,CAAC,gBAAgB,cAHG,gBACtBF,kBAAK,SAASA,kBAAK,QAAQ,aAAa,GAAG,GAAG,IAC9C,OACiD,EAAE,MAAMA,kBAAK,GAAG,KAAK,CAAC;CAC3E,OAAO,mBAAmB,aAAa,YAAY,YAAY;AACjE;;;;;;;AAQA,SAAgB,+BAA+B,KAA4B;CACzE,IAAI,CAAC,gBAAgB,GAAG,GAAG,OAAO;CAIlC,MAAM,WAAW,gBAAgB,GAAG;CACpC,IAAI,CAAC,UACH,MAAM,IAAI,MACR,8DAA8D,IAAI,yKACpE;CAEF,MAAM,SAASA,kBAAK,KAAK,KAAK,oBAAoB;CAClD,gBAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,MAAM,UAAUA,kBAAK,KAAK,QAAQ,mBAAmB;CACrD,MAAM,OAAO,kBAAkB,QAAQ;CACvC,IAAI,CAACC,gBAAG,WAAW,OAAO,KAAKA,gBAAG,aAAa,SAAS,MAAM,MAAM,MAClE,gBAAG,cAAc,SAAS,IAAI;CAEhC,OAAO;AACT;AAEA,MAAM,kBAAkB;CACtB,QAAQ;CACR,UAAU;AACZ;;;;;;;;AASA,SAAgB,mBAAmB,MAAc,QAAQ,IAAI,GAAY;CACvE,OACEA,gBAAG,WAAWD,kBAAK,KAAK,KAAK,gBAAgB,MAAM,CAAC,KACpD,CAACC,gBAAG,WAAWD,kBAAK,KAAK,KAAK,gBAAgB,QAAQ,CAAC,KACvD,CAACC,gBAAG,WAAWD,kBAAK,KAAK,KAAK,eAAe,CAAC;AAElD;AAEA,SAAS,wBAAgC;CACvC,OAAO;;;;;;;;AAQT;;;;;;;AAQA,SAAgB,mCAAmC,MAAc,QAAQ,IAAI,GAAkB;CAC7F,IAAI,CAAC,mBAAmB,GAAG,GAAG,OAAO;CACrC,IAAIC,gBAAG,WAAWD,kBAAK,KAAK,KAAK,mBAAmB,CAAC,GAAG,OAAO;CAC/D,MAAM,SAASA,kBAAK,KAAK,KAAK,oBAAoB;CAClD,gBAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,MAAM,UAAUA,kBAAK,KAAK,QAAQ,mBAAmB;CACrD,gBAAG,cAAc,SAAS,sBAAsB,CAAC;CACjD,QAAQ,IAAI,+EAA+E;CAC3F,OAAOA,kBAAK,KAAK,sBAAsB,mBAAmB;AAC5D"}
@@ -0,0 +1,33 @@
1
+ //#region src/build/ui/generated-config.d.ts
2
+ /**
3
+ * Folder-form UI source: a `ui/` directory with route files but no own
4
+ * package.json — the plugin workspace owns the build (single-workspace
5
+ * plugin, one dev process, one deploy train). Workspace-form ui sources
6
+ * (own package.json + scripts) are NOT managed here.
7
+ */
8
+ declare function hasFolderFormUi(cwd: string): boolean;
9
+ /**
10
+ * Synthesize the rsbuild config for a folder-form ui source (the plugin
11
+ * build contract, not per-plugin config — mirrors the rspack generated
12
+ * config). Returns the config file path, or null when the workspace has no
13
+ * folder-form ui source.
14
+ */
15
+ declare function ensureGeneratedUiRsbuildConfig(cwd: string): string | null;
16
+ /**
17
+ * Workspace-form core ui: the workspace IS the ui (own package.json, route
18
+ * tree) and is not plugin-shaped — the /api counterpart of the plugin
19
+ * workspace form. The entry stub is NOT a marker: it is generated
20
+ * (ADR 0023), so a fresh clone has no bootstrap stubs until the first
21
+ * generation pass.
22
+ */
23
+ declare function hasCoreUiWorkspace(cwd?: string): boolean;
24
+ /**
25
+ * Synthesize the rsbuild config for a workspace-form core ui with no local
26
+ * `rsbuild.config.ts` — the /api generated-config model. A local file is an
27
+ * override and wins untouched. Returns the workspace-relative config path,
28
+ * or null when the workspace is not a core ui (or has a local config).
29
+ */
30
+ declare function ensureGeneratedCoreUiRsbuildConfig(cwd?: string): string | null;
31
+ //#endregion
32
+ export { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi };
33
+ //# sourceMappingURL=generated-config.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-config.d.cts","names":[],"sources":["../../../src/build/ui/generated-config.ts"],"mappings":";;;;;;;iBAcgB,gBAAgB;;;;;;;iBAmDhB,+BAA+B;;;;;;;;iBAiC/B,mBAAmB;;;;;;;iBAyBnB,mCAAmC"}
@@ -0,0 +1,33 @@
1
+ //#region src/build/ui/generated-config.d.ts
2
+ /**
3
+ * Folder-form UI source: a `ui/` directory with route files but no own
4
+ * package.json — the plugin workspace owns the build (single-workspace
5
+ * plugin, one dev process, one deploy train). Workspace-form ui sources
6
+ * (own package.json + scripts) are NOT managed here.
7
+ */
8
+ declare function hasFolderFormUi(cwd: string): boolean;
9
+ /**
10
+ * Synthesize the rsbuild config for a folder-form ui source (the plugin
11
+ * build contract, not per-plugin config — mirrors the rspack generated
12
+ * config). Returns the config file path, or null when the workspace has no
13
+ * folder-form ui source.
14
+ */
15
+ declare function ensureGeneratedUiRsbuildConfig(cwd: string): string | null;
16
+ /**
17
+ * Workspace-form core ui: the workspace IS the ui (own package.json, route
18
+ * tree) and is not plugin-shaped — the /api counterpart of the plugin
19
+ * workspace form. The entry stub is NOT a marker: it is generated
20
+ * (ADR 0023), so a fresh clone has no bootstrap stubs until the first
21
+ * generation pass.
22
+ */
23
+ declare function hasCoreUiWorkspace(cwd?: string): boolean;
24
+ /**
25
+ * Synthesize the rsbuild config for a workspace-form core ui with no local
26
+ * `rsbuild.config.ts` — the /api generated-config model. A local file is an
27
+ * override and wins untouched. Returns the workspace-relative config path,
28
+ * or null when the workspace is not a core ui (or has a local config).
29
+ */
30
+ declare function ensureGeneratedCoreUiRsbuildConfig(cwd?: string): string | null;
31
+ //#endregion
32
+ export { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi };
33
+ //# sourceMappingURL=generated-config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-config.d.mts","names":[],"sources":["../../../src/build/ui/generated-config.ts"],"mappings":";;;;;;;iBAcgB,gBAAgB;;;;;;;iBAmDhB,+BAA+B;;;;;;;;iBAiC/B,mBAAmB;;;;;;;iBAyBnB,mCAAmC"}
@@ -0,0 +1,111 @@
1
+ import { findBosConfigPath } from "../rspack/compose.mjs";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+
5
+ //#region src/build/ui/generated-config.ts
6
+ const UI_DIR = "ui";
7
+ const GENERATED_CONFIG_DIR = ".every-plugin";
8
+ const GENERATED_UI_CONFIG = "ui.rsbuild.config.generated.mjs";
9
+ /**
10
+ * Folder-form UI source: a `ui/` directory with route files but no own
11
+ * package.json — the plugin workspace owns the build (single-workspace
12
+ * plugin, one dev process, one deploy train). Workspace-form ui sources
13
+ * (own package.json + scripts) are NOT managed here.
14
+ */
15
+ function hasFolderFormUi(cwd) {
16
+ const uiDir = path.join(cwd, UI_DIR);
17
+ return fs.existsSync(path.join(uiDir, "src", "routes")) && !fs.existsSync(path.join(uiDir, "package.json"));
18
+ }
19
+ function generatedUiConfig(pluginId) {
20
+ return `import path from "node:path";
21
+ import { createUiRsbuildConfig } from "every-plugin/build/ui";
22
+ import pkg from "../package.json";
23
+
24
+ const workspaceRoot = path.resolve(import.meta.dirname, "..", "ui");
25
+
26
+ export default createUiRsbuildConfig({
27
+ workspaceRoot,
28
+ pkg,
29
+ role: "consumer",
30
+ manifestName: ${JSON.stringify(pluginId)},
31
+ devPort: Number(process.env.BOS_UI_PORT) || 0,
32
+ webEntry: "./ui/src/routeConfig.gen.ts",
33
+ webExposes: { "./routeConfig": "./ui/src/routeConfig.gen.ts" },
34
+ nodeEntry: "./ui/src/routeConfig.gen.ts",
35
+ nodeExposes: { "./routeConfig": "./ui/src/routeConfig.gen.ts" },
36
+ routesDirectory: "./ui/src/routes",
37
+ });
38
+ `;
39
+ }
40
+ /**
41
+ * Canonical config-layout derivation: the composition key for a plugin
42
+ * workspace — the `<key>` of the `plugins/<key>` directory relative to the
43
+ * nearest `bos.config.json`. The dev server and the generated ui config
44
+ * both key off this; no consumer keeps a private copy.
45
+ */
46
+ function pluginLayoutKey(cwd) {
47
+ const bosConfigPath = findBosConfigPath(cwd);
48
+ const [workspaceGroup, layoutKey] = (bosConfigPath ? path.relative(path.dirname(bosConfigPath), cwd) : void 0)?.split(path.sep) ?? [];
49
+ return workspaceGroup === "plugins" && layoutKey ? layoutKey : null;
50
+ }
51
+ /**
52
+ * Synthesize the rsbuild config for a folder-form ui source (the plugin
53
+ * build contract, not per-plugin config — mirrors the rspack generated
54
+ * config). Returns the config file path, or null when the workspace has no
55
+ * folder-form ui source.
56
+ */
57
+ function ensureGeneratedUiRsbuildConfig(cwd) {
58
+ if (!hasFolderFormUi(cwd)) return null;
59
+ const pluginId = pluginLayoutKey(cwd);
60
+ if (!pluginId) throw new Error(`[every-plugin] cannot derive the ui's composition key from ${cwd} — no authored config (bos.app.ts / bos.config.json) found above a plugins/<key> directory. The manifest name is the layout key; the container name is never a fallback.`);
61
+ const outDir = path.join(cwd, GENERATED_CONFIG_DIR);
62
+ fs.mkdirSync(outDir, { recursive: true });
63
+ const outPath = path.join(outDir, GENERATED_UI_CONFIG);
64
+ const next = generatedUiConfig(pluginId);
65
+ if (!fs.existsSync(outPath) || fs.readFileSync(outPath, "utf8") !== next) fs.writeFileSync(outPath, next);
66
+ return outPath;
67
+ }
68
+ const CORE_UI_MARKERS = {
69
+ routes: "src/routes",
70
+ contract: "src/contract.ts"
71
+ };
72
+ /**
73
+ * Workspace-form core ui: the workspace IS the ui (own package.json, route
74
+ * tree) and is not plugin-shaped — the /api counterpart of the plugin
75
+ * workspace form. The entry stub is NOT a marker: it is generated
76
+ * (ADR 0023), so a fresh clone has no bootstrap stubs until the first
77
+ * generation pass.
78
+ */
79
+ function hasCoreUiWorkspace(cwd = process.cwd()) {
80
+ return fs.existsSync(path.join(cwd, CORE_UI_MARKERS.routes)) && !fs.existsSync(path.join(cwd, CORE_UI_MARKERS.contract)) && !fs.existsSync(path.join(cwd, "plugin.dev.ts"));
81
+ }
82
+ function generatedCoreUiConfig() {
83
+ return `import { defineConfig } from "@rsbuild/core";
84
+ import { readAuthoredConfigInput } from "everything-dev/config";
85
+ import { createCoreUiRsbuildConfig } from "every-plugin/build/ui";
86
+
87
+ export default defineConfig(async () =>
88
+ createCoreUiRsbuildConfig(await readAuthoredConfigInput()),
89
+ );
90
+ `;
91
+ }
92
+ /**
93
+ * Synthesize the rsbuild config for a workspace-form core ui with no local
94
+ * `rsbuild.config.ts` — the /api generated-config model. A local file is an
95
+ * override and wins untouched. Returns the workspace-relative config path,
96
+ * or null when the workspace is not a core ui (or has a local config).
97
+ */
98
+ function ensureGeneratedCoreUiRsbuildConfig(cwd = process.cwd()) {
99
+ if (!hasCoreUiWorkspace(cwd)) return null;
100
+ if (fs.existsSync(path.join(cwd, "rsbuild.config.ts"))) return null;
101
+ const outDir = path.join(cwd, GENERATED_CONFIG_DIR);
102
+ fs.mkdirSync(outDir, { recursive: true });
103
+ const outPath = path.join(outDir, GENERATED_UI_CONFIG);
104
+ fs.writeFileSync(outPath, generatedCoreUiConfig());
105
+ console.log("[every-plugin] rsbuild.config.ts not found — using the core ui build factory.");
106
+ return path.join(GENERATED_CONFIG_DIR, GENERATED_UI_CONFIG);
107
+ }
108
+
109
+ //#endregion
110
+ export { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi, pluginLayoutKey };
111
+ //# sourceMappingURL=generated-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-config.mjs","names":[],"sources":["../../../src/build/ui/generated-config.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { findBosConfigPath } from \"../rspack/compose\";\n\nconst UI_DIR = \"ui\";\nconst GENERATED_CONFIG_DIR = \".every-plugin\";\nconst GENERATED_UI_CONFIG = \"ui.rsbuild.config.generated.mjs\";\n\n/**\n * Folder-form UI source: a `ui/` directory with route files but no own\n * package.json — the plugin workspace owns the build (single-workspace\n * plugin, one dev process, one deploy train). Workspace-form ui sources\n * (own package.json + scripts) are NOT managed here.\n */\nexport function hasFolderFormUi(cwd: string): boolean {\n const uiDir = path.join(cwd, UI_DIR);\n return (\n fs.existsSync(path.join(uiDir, \"src\", \"routes\")) &&\n !fs.existsSync(path.join(uiDir, \"package.json\"))\n );\n}\n\nfunction generatedUiConfig(pluginId: string): string {\n return `import path from \"node:path\";\nimport { createUiRsbuildConfig } from \"every-plugin/build/ui\";\nimport pkg from \"../package.json\";\n\nconst workspaceRoot = path.resolve(import.meta.dirname, \"..\", \"ui\");\n\nexport default createUiRsbuildConfig({\n workspaceRoot,\n pkg,\n role: \"consumer\",\n manifestName: ${JSON.stringify(pluginId)},\n devPort: Number(process.env.BOS_UI_PORT) || 0,\n webEntry: \"./ui/src/routeConfig.gen.ts\",\n webExposes: { \"./routeConfig\": \"./ui/src/routeConfig.gen.ts\" },\n nodeEntry: \"./ui/src/routeConfig.gen.ts\",\n nodeExposes: { \"./routeConfig\": \"./ui/src/routeConfig.gen.ts\" },\n routesDirectory: \"./ui/src/routes\",\n});\n`;\n}\n\n/**\n * Canonical config-layout derivation: the composition key for a plugin\n * workspace — the `<key>` of the `plugins/<key>` directory relative to the\n * nearest `bos.config.json`. The dev server and the generated ui config\n * both key off this; no consumer keeps a private copy.\n */\nexport function pluginLayoutKey(cwd: string): string | null {\n const bosConfigPath = findBosConfigPath(cwd);\n const relativeWorkspace = bosConfigPath\n ? path.relative(path.dirname(bosConfigPath), cwd)\n : undefined;\n const [workspaceGroup, layoutKey] = relativeWorkspace?.split(path.sep) ?? [];\n return workspaceGroup === \"plugins\" && layoutKey ? layoutKey : null;\n}\n\n/**\n * Synthesize the rsbuild config for a folder-form ui source (the plugin\n * build contract, not per-plugin config — mirrors the rspack generated\n * config). Returns the config file path, or null when the workspace has no\n * folder-form ui source.\n */\nexport function ensureGeneratedUiRsbuildConfig(cwd: string): string | null {\n if (!hasFolderFormUi(cwd)) return null;\n // The manifest's name derives ONLY from the plugins/<key> layout key\n // (ADR 0008 §2) — a non-derivable key fails the build loudly, never the\n // container-name fallback that mis-keyed manifests.\n const pluginId = pluginLayoutKey(cwd);\n if (!pluginId) {\n throw new Error(\n `[every-plugin] cannot derive the ui's composition key from ${cwd} — no authored config (bos.app.ts / bos.config.json) found above a plugins/<key> directory. The manifest name is the layout key; the container name is never a fallback.`,\n );\n }\n const outDir = path.join(cwd, GENERATED_CONFIG_DIR);\n fs.mkdirSync(outDir, { recursive: true });\n const outPath = path.join(outDir, GENERATED_UI_CONFIG);\n const next = generatedUiConfig(pluginId);\n if (!fs.existsSync(outPath) || fs.readFileSync(outPath, \"utf8\") !== next) {\n fs.writeFileSync(outPath, next);\n }\n return outPath;\n}\n\nconst CORE_UI_MARKERS = {\n routes: \"src/routes\",\n contract: \"src/contract.ts\",\n};\n\n/**\n * Workspace-form core ui: the workspace IS the ui (own package.json, route\n * tree) and is not plugin-shaped — the /api counterpart of the plugin\n * workspace form. The entry stub is NOT a marker: it is generated\n * (ADR 0023), so a fresh clone has no bootstrap stubs until the first\n * generation pass.\n */\nexport function hasCoreUiWorkspace(cwd: string = process.cwd()): boolean {\n return (\n fs.existsSync(path.join(cwd, CORE_UI_MARKERS.routes)) &&\n !fs.existsSync(path.join(cwd, CORE_UI_MARKERS.contract)) &&\n !fs.existsSync(path.join(cwd, \"plugin.dev.ts\"))\n );\n}\n\nfunction generatedCoreUiConfig(): string {\n return `import { defineConfig } from \"@rsbuild/core\";\nimport { readAuthoredConfigInput } from \"everything-dev/config\";\nimport { createCoreUiRsbuildConfig } from \"every-plugin/build/ui\";\n\nexport default defineConfig(async () =>\n createCoreUiRsbuildConfig(await readAuthoredConfigInput()),\n);\n`;\n}\n\n/**\n * Synthesize the rsbuild config for a workspace-form core ui with no local\n * `rsbuild.config.ts` — the /api generated-config model. A local file is an\n * override and wins untouched. Returns the workspace-relative config path,\n * or null when the workspace is not a core ui (or has a local config).\n */\nexport function ensureGeneratedCoreUiRsbuildConfig(cwd: string = process.cwd()): string | null {\n if (!hasCoreUiWorkspace(cwd)) return null;\n if (fs.existsSync(path.join(cwd, \"rsbuild.config.ts\"))) return null;\n const outDir = path.join(cwd, GENERATED_CONFIG_DIR);\n fs.mkdirSync(outDir, { recursive: true });\n const outPath = path.join(outDir, GENERATED_UI_CONFIG);\n fs.writeFileSync(outPath, generatedCoreUiConfig());\n console.log(\"[every-plugin] rsbuild.config.ts not found — using the core ui build factory.\");\n return path.join(GENERATED_CONFIG_DIR, GENERATED_UI_CONFIG);\n}\n"],"mappings":";;;;;AAIA,MAAM,SAAS;AACf,MAAM,uBAAuB;AAC7B,MAAM,sBAAsB;;;;;;;AAQ5B,SAAgB,gBAAgB,KAAsB;CACpD,MAAM,QAAQ,KAAK,KAAK,KAAK,MAAM;CACnC,OACE,GAAG,WAAW,KAAK,KAAK,OAAO,OAAO,QAAQ,CAAC,KAC/C,CAAC,GAAG,WAAW,KAAK,KAAK,OAAO,cAAc,CAAC;AAEnD;AAEA,SAAS,kBAAkB,UAA0B;CACnD,OAAO;;;;;;;;;;kBAUS,KAAK,UAAU,QAAQ,EAAE;;;;;;;;;AAS3C;;;;;;;AAQA,SAAgB,gBAAgB,KAA4B;CAC1D,MAAM,gBAAgB,kBAAkB,GAAG;CAI3C,MAAM,CAAC,gBAAgB,cAHG,gBACtB,KAAK,SAAS,KAAK,QAAQ,aAAa,GAAG,GAAG,IAC9C,OACiD,EAAE,MAAM,KAAK,GAAG,KAAK,CAAC;CAC3E,OAAO,mBAAmB,aAAa,YAAY,YAAY;AACjE;;;;;;;AAQA,SAAgB,+BAA+B,KAA4B;CACzE,IAAI,CAAC,gBAAgB,GAAG,GAAG,OAAO;CAIlC,MAAM,WAAW,gBAAgB,GAAG;CACpC,IAAI,CAAC,UACH,MAAM,IAAI,MACR,8DAA8D,IAAI,yKACpE;CAEF,MAAM,SAAS,KAAK,KAAK,KAAK,oBAAoB;CAClD,GAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,MAAM,UAAU,KAAK,KAAK,QAAQ,mBAAmB;CACrD,MAAM,OAAO,kBAAkB,QAAQ;CACvC,IAAI,CAAC,GAAG,WAAW,OAAO,KAAK,GAAG,aAAa,SAAS,MAAM,MAAM,MAClE,GAAG,cAAc,SAAS,IAAI;CAEhC,OAAO;AACT;AAEA,MAAM,kBAAkB;CACtB,QAAQ;CACR,UAAU;AACZ;;;;;;;;AASA,SAAgB,mBAAmB,MAAc,QAAQ,IAAI,GAAY;CACvE,OACE,GAAG,WAAW,KAAK,KAAK,KAAK,gBAAgB,MAAM,CAAC,KACpD,CAAC,GAAG,WAAW,KAAK,KAAK,KAAK,gBAAgB,QAAQ,CAAC,KACvD,CAAC,GAAG,WAAW,KAAK,KAAK,KAAK,eAAe,CAAC;AAElD;AAEA,SAAS,wBAAgC;CACvC,OAAO;;;;;;;;AAQT;;;;;;;AAQA,SAAgB,mCAAmC,MAAc,QAAQ,IAAI,GAAkB;CAC7F,IAAI,CAAC,mBAAmB,GAAG,GAAG,OAAO;CACrC,IAAI,GAAG,WAAW,KAAK,KAAK,KAAK,mBAAmB,CAAC,GAAG,OAAO;CAC/D,MAAM,SAAS,KAAK,KAAK,KAAK,oBAAoB;CAClD,GAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,MAAM,UAAU,KAAK,KAAK,QAAQ,mBAAmB;CACrD,GAAG,cAAc,SAAS,sBAAsB,CAAC;CACjD,QAAQ,IAAI,+EAA+E;CAC3F,OAAO,KAAK,KAAK,sBAAsB,mBAAmB;AAC5D"}
@@ -0,0 +1,61 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_build_artifact_names = require('../artifact-names.cjs');
3
+ let node_fs = require("node:fs");
4
+ node_fs = require_runtime.__toESM(node_fs, 1);
5
+ let node_path = require("node:path");
6
+ node_path = require_runtime.__toESM(node_path, 1);
7
+
8
+ //#region src/build/ui/hash-artifacts-plugin.ts
9
+ function listFiles(dir, out = []) {
10
+ for (const entry of node_fs.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
11
+ const full = node_path.default.join(dir, entry.name);
12
+ if (entry.isDirectory()) listFiles(full, out);
13
+ else out.push(node_path.default.relative(dir, full).split(node_path.default.sep).join("/"));
14
+ }
15
+ return out;
16
+ }
17
+ /**
18
+ * Emits the additive hashed copies for one environment's dist root (ticket:
19
+ * atomic-deploys 01). The entry itself is hashed by the build (filename
20
+ * template); this plugin adds immutable hashed copies of the fixed-name
21
+ * browser artifacts (mf-manifest.json at the root, style.css under
22
+ * static/css), and `build-report.json` for the deploy leg. Idempotent under
23
+ * watch: same bytes → same hashed names.
24
+ */
25
+ function hashArtifactsPlugin(options) {
26
+ return {
27
+ name: "hash-artifacts",
28
+ setup(api) {
29
+ api.onAfterEnvironmentCompile(() => {
30
+ const distRoot = options.distRoot;
31
+ if (!node_fs.default.existsSync(distRoot)) return;
32
+ const resolveExisting = (name) => {
33
+ return [node_path.default.join(distRoot, name), node_path.default.join(distRoot, "static", "css", name)].find((candidate) => node_fs.default.existsSync(candidate)) ?? null;
34
+ };
35
+ const assetNames = listFiles(distRoot);
36
+ if (!require_build_artifact_names.findHashedEntry(assetNames, options.entryBase)) return;
37
+ const contents = {};
38
+ for (const fixedName of [require_build_artifact_names.MF_MANIFEST_FILENAME, require_build_artifact_names.STYLE_FILENAME]) {
39
+ const from = resolveExisting(fixedName);
40
+ if (from) contents[fixedName] = node_fs.default.readFileSync(from, "utf8");
41
+ }
42
+ const plan = require_build_artifact_names.planArtifactCopies({
43
+ assetNames,
44
+ entryBase: options.entryBase,
45
+ contents
46
+ });
47
+ if (!plan) return;
48
+ for (const copy of plan.copies) {
49
+ const from = resolveExisting(copy.from);
50
+ if (!from) throw new Error(`[hash-artifacts] planned copy source missing: ${copy.from}`);
51
+ node_fs.default.copyFileSync(from, node_path.default.join(distRoot, copy.to));
52
+ }
53
+ node_fs.default.writeFileSync(node_path.default.join(distRoot, "build-report.json"), `${JSON.stringify(require_build_artifact_names.BuildEntryReportSchema.parse(plan.report), null, 2)}\n`);
54
+ });
55
+ }
56
+ };
57
+ }
58
+
59
+ //#endregion
60
+ exports.hashArtifactsPlugin = hashArtifactsPlugin;
61
+ //# sourceMappingURL=hash-artifacts-plugin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-artifacts-plugin.cjs","names":["fs","path","findHashedEntry","MF_MANIFEST_FILENAME","STYLE_FILENAME","planArtifactCopies","BuildEntryReportSchema"],"sources":["../../../src/build/ui/hash-artifacts-plugin.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { RsbuildPlugin } from \"@rsbuild/core\";\nimport {\n BuildEntryReportSchema,\n findHashedEntry,\n MF_MANIFEST_FILENAME,\n planArtifactCopies,\n STYLE_FILENAME,\n} from \"../artifact-names\";\n\nexport interface HashArtifactsPluginOptions {\n /** The container entry's base name in this environment's dist root. */\n entryBase: string;\n /** Absolute dist root this environment wrote (web: `dist`, node: `dist/ssr`). */\n distRoot: string;\n}\n\nfunction listFiles(dir: string, out: string[] = []): string[] {\n for (const entry of fs\n .readdirSync(dir, { withFileTypes: true })\n .sort((a, b) => a.name.localeCompare(b.name))) {\n const full = path.join(dir, entry.name);\n if (entry.isDirectory()) listFiles(full, out);\n else out.push(path.relative(dir, full).split(path.sep).join(\"/\"));\n }\n return out;\n}\n\n/**\n * Emits the additive hashed copies for one environment's dist root (ticket:\n * atomic-deploys 01). The entry itself is hashed by the build (filename\n * template); this plugin adds immutable hashed copies of the fixed-name\n * browser artifacts (mf-manifest.json at the root, style.css under\n * static/css), and `build-report.json` for the deploy leg. Idempotent under\n * watch: same bytes → same hashed names.\n */\nexport function hashArtifactsPlugin(options: HashArtifactsPluginOptions): RsbuildPlugin {\n return {\n name: \"hash-artifacts\",\n setup(api) {\n api.onAfterEnvironmentCompile(() => {\n const distRoot = options.distRoot;\n if (!fs.existsSync(distRoot)) return;\n\n const resolveExisting = (name: string): string | null => {\n const candidates = [\n path.join(distRoot, name),\n path.join(distRoot, \"static\", \"css\", name),\n ];\n return candidates.find((candidate) => fs.existsSync(candidate)) ?? null;\n };\n\n const assetNames = listFiles(distRoot);\n const entry = findHashedEntry(assetNames, options.entryBase);\n if (!entry) return;\n\n const contents: Record<string, string> = {};\n for (const fixedName of [MF_MANIFEST_FILENAME, STYLE_FILENAME]) {\n const from = resolveExisting(fixedName);\n if (from) contents[fixedName] = fs.readFileSync(from, \"utf8\");\n }\n\n const plan = planArtifactCopies({ assetNames, entryBase: options.entryBase, contents });\n if (!plan) return;\n\n for (const copy of plan.copies) {\n const from = resolveExisting(copy.from);\n if (!from) throw new Error(`[hash-artifacts] planned copy source missing: ${copy.from}`);\n fs.copyFileSync(from, path.join(distRoot, copy.to));\n }\n fs.writeFileSync(\n path.join(distRoot, \"build-report.json\"),\n `${JSON.stringify(BuildEntryReportSchema.parse(plan.report), null, 2)}\\n`,\n );\n });\n },\n };\n}\n"],"mappings":";;;;;;;;AAkBA,SAAS,UAAU,KAAa,MAAgB,CAAC,GAAa;CAC5D,KAAK,MAAM,SAASA,gBACjB,YAAY,KAAK,EAAE,eAAe,KAAK,CAAC,CAAC,CACzC,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC,GAAG;EAC/C,MAAM,OAAOC,kBAAK,KAAK,KAAK,MAAM,IAAI;EACtC,IAAI,MAAM,YAAY,GAAG,UAAU,MAAM,GAAG;OACvC,IAAI,KAAKA,kBAAK,SAAS,KAAK,IAAI,CAAC,CAAC,MAAMA,kBAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;CAClE;CACA,OAAO;AACT;;;;;;;;;AAUA,SAAgB,oBAAoB,SAAoD;CACtF,OAAO;EACL,MAAM;EACN,MAAM,KAAK;GACT,IAAI,gCAAgC;IAClC,MAAM,WAAW,QAAQ;IACzB,IAAI,CAACD,gBAAG,WAAW,QAAQ,GAAG;IAE9B,MAAM,mBAAmB,SAAgC;KAKvD,OAAO,CAHLC,kBAAK,KAAK,UAAU,IAAI,GACxBA,kBAAK,KAAK,UAAU,UAAU,OAAO,IAAI,CAE3B,CAAC,CAAC,MAAM,cAAcD,gBAAG,WAAW,SAAS,CAAC,KAAK;IACrE;IAEA,MAAM,aAAa,UAAU,QAAQ;IAErC,IAAI,CADUE,6CAAgB,YAAY,QAAQ,SACzC,GAAG;IAEZ,MAAM,WAAmC,CAAC;IAC1C,KAAK,MAAM,aAAa,CAACC,mDAAsBC,2CAAc,GAAG;KAC9D,MAAM,OAAO,gBAAgB,SAAS;KACtC,IAAI,MAAM,SAAS,aAAaJ,gBAAG,aAAa,MAAM,MAAM;IAC9D;IAEA,MAAM,OAAOK,gDAAmB;KAAE;KAAY,WAAW,QAAQ;KAAW;IAAS,CAAC;IACtF,IAAI,CAAC,MAAM;IAEX,KAAK,MAAM,QAAQ,KAAK,QAAQ;KAC9B,MAAM,OAAO,gBAAgB,KAAK,IAAI;KACtC,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,iDAAiD,KAAK,MAAM;KACvF,gBAAG,aAAa,MAAMJ,kBAAK,KAAK,UAAU,KAAK,EAAE,CAAC;IACpD;IACA,gBAAG,cACDA,kBAAK,KAAK,UAAU,mBAAmB,GACvC,GAAG,KAAK,UAAUK,oDAAuB,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,EAAE,GACxE;GACF,CAAC;EACH;CACF;AACF"}
@@ -0,0 +1,20 @@
1
+ import { RsbuildPlugin } from "@rsbuild/core";
2
+ //#region src/build/ui/hash-artifacts-plugin.d.ts
3
+ interface HashArtifactsPluginOptions {
4
+ /** The container entry's base name in this environment's dist root. */
5
+ entryBase: string;
6
+ /** Absolute dist root this environment wrote (web: `dist`, node: `dist/ssr`). */
7
+ distRoot: string;
8
+ }
9
+ /**
10
+ * Emits the additive hashed copies for one environment's dist root (ticket:
11
+ * atomic-deploys 01). The entry itself is hashed by the build (filename
12
+ * template); this plugin adds immutable hashed copies of the fixed-name
13
+ * browser artifacts (mf-manifest.json at the root, style.css under
14
+ * static/css), and `build-report.json` for the deploy leg. Idempotent under
15
+ * watch: same bytes → same hashed names.
16
+ */
17
+ declare function hashArtifactsPlugin(options: HashArtifactsPluginOptions): RsbuildPlugin;
18
+ //#endregion
19
+ export { HashArtifactsPluginOptions, hashArtifactsPlugin };
20
+ //# sourceMappingURL=hash-artifacts-plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-artifacts-plugin.d.cts","names":[],"sources":["../../../src/build/ui/hash-artifacts-plugin.ts"],"mappings":";;UAWiB;;EAEf;;EAEA;;;;;;;;;;iBAsBc,oBAAoB,SAAS,6BAA6B"}
@@ -0,0 +1,20 @@
1
+ import { RsbuildPlugin } from "@rsbuild/core";
2
+ //#region src/build/ui/hash-artifacts-plugin.d.ts
3
+ interface HashArtifactsPluginOptions {
4
+ /** The container entry's base name in this environment's dist root. */
5
+ entryBase: string;
6
+ /** Absolute dist root this environment wrote (web: `dist`, node: `dist/ssr`). */
7
+ distRoot: string;
8
+ }
9
+ /**
10
+ * Emits the additive hashed copies for one environment's dist root (ticket:
11
+ * atomic-deploys 01). The entry itself is hashed by the build (filename
12
+ * template); this plugin adds immutable hashed copies of the fixed-name
13
+ * browser artifacts (mf-manifest.json at the root, style.css under
14
+ * static/css), and `build-report.json` for the deploy leg. Idempotent under
15
+ * watch: same bytes → same hashed names.
16
+ */
17
+ declare function hashArtifactsPlugin(options: HashArtifactsPluginOptions): RsbuildPlugin;
18
+ //#endregion
19
+ export { HashArtifactsPluginOptions, hashArtifactsPlugin };
20
+ //# sourceMappingURL=hash-artifacts-plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-artifacts-plugin.d.mts","names":[],"sources":["../../../src/build/ui/hash-artifacts-plugin.ts"],"mappings":";;UAWiB;;EAEf;;EAEA;;;;;;;;;;iBAsBc,oBAAoB,SAAS,6BAA6B"}
@@ -0,0 +1,58 @@
1
+ import { BuildEntryReportSchema, MF_MANIFEST_FILENAME, STYLE_FILENAME, findHashedEntry, planArtifactCopies } from "../artifact-names.mjs";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+
5
+ //#region src/build/ui/hash-artifacts-plugin.ts
6
+ function listFiles(dir, out = []) {
7
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
8
+ const full = path.join(dir, entry.name);
9
+ if (entry.isDirectory()) listFiles(full, out);
10
+ else out.push(path.relative(dir, full).split(path.sep).join("/"));
11
+ }
12
+ return out;
13
+ }
14
+ /**
15
+ * Emits the additive hashed copies for one environment's dist root (ticket:
16
+ * atomic-deploys 01). The entry itself is hashed by the build (filename
17
+ * template); this plugin adds immutable hashed copies of the fixed-name
18
+ * browser artifacts (mf-manifest.json at the root, style.css under
19
+ * static/css), and `build-report.json` for the deploy leg. Idempotent under
20
+ * watch: same bytes → same hashed names.
21
+ */
22
+ function hashArtifactsPlugin(options) {
23
+ return {
24
+ name: "hash-artifacts",
25
+ setup(api) {
26
+ api.onAfterEnvironmentCompile(() => {
27
+ const distRoot = options.distRoot;
28
+ if (!fs.existsSync(distRoot)) return;
29
+ const resolveExisting = (name) => {
30
+ return [path.join(distRoot, name), path.join(distRoot, "static", "css", name)].find((candidate) => fs.existsSync(candidate)) ?? null;
31
+ };
32
+ const assetNames = listFiles(distRoot);
33
+ if (!findHashedEntry(assetNames, options.entryBase)) return;
34
+ const contents = {};
35
+ for (const fixedName of [MF_MANIFEST_FILENAME, STYLE_FILENAME]) {
36
+ const from = resolveExisting(fixedName);
37
+ if (from) contents[fixedName] = fs.readFileSync(from, "utf8");
38
+ }
39
+ const plan = planArtifactCopies({
40
+ assetNames,
41
+ entryBase: options.entryBase,
42
+ contents
43
+ });
44
+ if (!plan) return;
45
+ for (const copy of plan.copies) {
46
+ const from = resolveExisting(copy.from);
47
+ if (!from) throw new Error(`[hash-artifacts] planned copy source missing: ${copy.from}`);
48
+ fs.copyFileSync(from, path.join(distRoot, copy.to));
49
+ }
50
+ fs.writeFileSync(path.join(distRoot, "build-report.json"), `${JSON.stringify(BuildEntryReportSchema.parse(plan.report), null, 2)}\n`);
51
+ });
52
+ }
53
+ };
54
+ }
55
+
56
+ //#endregion
57
+ export { hashArtifactsPlugin };
58
+ //# sourceMappingURL=hash-artifacts-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-artifacts-plugin.mjs","names":[],"sources":["../../../src/build/ui/hash-artifacts-plugin.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { RsbuildPlugin } from \"@rsbuild/core\";\nimport {\n BuildEntryReportSchema,\n findHashedEntry,\n MF_MANIFEST_FILENAME,\n planArtifactCopies,\n STYLE_FILENAME,\n} from \"../artifact-names\";\n\nexport interface HashArtifactsPluginOptions {\n /** The container entry's base name in this environment's dist root. */\n entryBase: string;\n /** Absolute dist root this environment wrote (web: `dist`, node: `dist/ssr`). */\n distRoot: string;\n}\n\nfunction listFiles(dir: string, out: string[] = []): string[] {\n for (const entry of fs\n .readdirSync(dir, { withFileTypes: true })\n .sort((a, b) => a.name.localeCompare(b.name))) {\n const full = path.join(dir, entry.name);\n if (entry.isDirectory()) listFiles(full, out);\n else out.push(path.relative(dir, full).split(path.sep).join(\"/\"));\n }\n return out;\n}\n\n/**\n * Emits the additive hashed copies for one environment's dist root (ticket:\n * atomic-deploys 01). The entry itself is hashed by the build (filename\n * template); this plugin adds immutable hashed copies of the fixed-name\n * browser artifacts (mf-manifest.json at the root, style.css under\n * static/css), and `build-report.json` for the deploy leg. Idempotent under\n * watch: same bytes → same hashed names.\n */\nexport function hashArtifactsPlugin(options: HashArtifactsPluginOptions): RsbuildPlugin {\n return {\n name: \"hash-artifacts\",\n setup(api) {\n api.onAfterEnvironmentCompile(() => {\n const distRoot = options.distRoot;\n if (!fs.existsSync(distRoot)) return;\n\n const resolveExisting = (name: string): string | null => {\n const candidates = [\n path.join(distRoot, name),\n path.join(distRoot, \"static\", \"css\", name),\n ];\n return candidates.find((candidate) => fs.existsSync(candidate)) ?? null;\n };\n\n const assetNames = listFiles(distRoot);\n const entry = findHashedEntry(assetNames, options.entryBase);\n if (!entry) return;\n\n const contents: Record<string, string> = {};\n for (const fixedName of [MF_MANIFEST_FILENAME, STYLE_FILENAME]) {\n const from = resolveExisting(fixedName);\n if (from) contents[fixedName] = fs.readFileSync(from, \"utf8\");\n }\n\n const plan = planArtifactCopies({ assetNames, entryBase: options.entryBase, contents });\n if (!plan) return;\n\n for (const copy of plan.copies) {\n const from = resolveExisting(copy.from);\n if (!from) throw new Error(`[hash-artifacts] planned copy source missing: ${copy.from}`);\n fs.copyFileSync(from, path.join(distRoot, copy.to));\n }\n fs.writeFileSync(\n path.join(distRoot, \"build-report.json\"),\n `${JSON.stringify(BuildEntryReportSchema.parse(plan.report), null, 2)}\\n`,\n );\n });\n },\n };\n}\n"],"mappings":";;;;;AAkBA,SAAS,UAAU,KAAa,MAAgB,CAAC,GAAa;CAC5D,KAAK,MAAM,SAAS,GACjB,YAAY,KAAK,EAAE,eAAe,KAAK,CAAC,CAAC,CACzC,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC,GAAG;EAC/C,MAAM,OAAO,KAAK,KAAK,KAAK,MAAM,IAAI;EACtC,IAAI,MAAM,YAAY,GAAG,UAAU,MAAM,GAAG;OACvC,IAAI,KAAK,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;CAClE;CACA,OAAO;AACT;;;;;;;;;AAUA,SAAgB,oBAAoB,SAAoD;CACtF,OAAO;EACL,MAAM;EACN,MAAM,KAAK;GACT,IAAI,gCAAgC;IAClC,MAAM,WAAW,QAAQ;IACzB,IAAI,CAAC,GAAG,WAAW,QAAQ,GAAG;IAE9B,MAAM,mBAAmB,SAAgC;KAKvD,OAAO,CAHL,KAAK,KAAK,UAAU,IAAI,GACxB,KAAK,KAAK,UAAU,UAAU,OAAO,IAAI,CAE3B,CAAC,CAAC,MAAM,cAAc,GAAG,WAAW,SAAS,CAAC,KAAK;IACrE;IAEA,MAAM,aAAa,UAAU,QAAQ;IAErC,IAAI,CADU,gBAAgB,YAAY,QAAQ,SACzC,GAAG;IAEZ,MAAM,WAAmC,CAAC;IAC1C,KAAK,MAAM,aAAa,CAAC,sBAAsB,cAAc,GAAG;KAC9D,MAAM,OAAO,gBAAgB,SAAS;KACtC,IAAI,MAAM,SAAS,aAAa,GAAG,aAAa,MAAM,MAAM;IAC9D;IAEA,MAAM,OAAO,mBAAmB;KAAE;KAAY,WAAW,QAAQ;KAAW;IAAS,CAAC;IACtF,IAAI,CAAC,MAAM;IAEX,KAAK,MAAM,QAAQ,KAAK,QAAQ;KAC9B,MAAM,OAAO,gBAAgB,KAAK,IAAI;KACtC,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,iDAAiD,KAAK,MAAM;KACvF,GAAG,aAAa,MAAM,KAAK,KAAK,UAAU,KAAK,EAAE,CAAC;IACpD;IACA,GAAG,cACD,KAAK,KAAK,UAAU,mBAAmB,GACvC,GAAG,KAAK,UAAU,uBAAuB,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,EAAE,GACxE;GACF,CAAC;EACH;CACF;AACF"}