every-plugin 2.10.0 → 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 -194
  399. package/dist/build/rspack/dev-server-middleware.cjs.map +0 -1
  400. package/dist/build/rspack/dev-server-middleware.mjs +0 -193
  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 -250
  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,63 @@
1
+ import { z } from "zod";
2
+ import { createHash } from "node:crypto";
3
+
4
+ //#region src/version-manifest.ts
5
+ /**
6
+ * WorkspaceVersionManifest — the immutable per-deploy document at
7
+ * `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`
8
+ * (ADR 0020, as amended; atomic-deploys MAP decision 1). The published
9
+ * config's slot pins this document via its `pin` (`manifest` + the
10
+ * manifest's own SRI); every artifact coordinate lives here, so the config
11
+ * stops growing with artifact kinds and old versions stay fully servable.
12
+ */
13
+ const SRI = z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);
14
+ const WorkspaceVersionManifestSchema = z.object({
15
+ version: z.string().regex(/^[0-9a-f]{16}$/),
16
+ builtAt: z.string().optional(),
17
+ gitSha: z.string().optional(),
18
+ entry: z.string().min(1),
19
+ entryIntegrity: SRI,
20
+ ssr: z.object({
21
+ entry: z.string().min(1),
22
+ integrity: SRI
23
+ }).optional(),
24
+ browserManifest: z.object({
25
+ file: z.string().min(1),
26
+ integrity: SRI
27
+ }).optional(),
28
+ /** extra assets (css, icons) — logical name → served-object SRI */
29
+ assets: z.record(z.string(), SRI).optional(),
30
+ /** shared-dependency versions this build was built against */
31
+ shared: z.record(z.string(), z.string()).optional(),
32
+ /**
33
+ * Full per-file digest map of the dist (object path → served-object SRI).
34
+ * Written by `every-plugin`-based deploys so the next deploy can diff against
35
+ * it and skip re-uploading unchanged files; readers that predate the field
36
+ * ignore it (zod strips unknown keys). Participates in the version hash.
37
+ */
38
+ files: z.record(z.string(), SRI).optional()
39
+ });
40
+ /**
41
+ * Compose the manifest with its `version` derived from the canonical content
42
+ * of the artifact coordinates alone (key-sorted, `builtAt` excluded) —
43
+ * identical bytes → identical version id regardless of when they were built,
44
+ * so republishing unchanged content is a pointer no-op. Any changed
45
+ * coordinate → a new version (and a new file).
46
+ */
47
+ function composeVersionManifest(input) {
48
+ const { builtAt, ...hashedInputs } = input;
49
+ const version = createHash("sha256").update(stableStringify(hashedInputs)).digest("hex").slice(0, 16);
50
+ return WorkspaceVersionManifestSchema.parse({
51
+ ...input,
52
+ version
53
+ });
54
+ }
55
+ function stableStringify(value) {
56
+ if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
57
+ if (value && typeof value === "object") return `{${Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`).sort().join(",")}}`;
58
+ return JSON.stringify(value) ?? "null";
59
+ }
60
+
61
+ //#endregion
62
+ export { WorkspaceVersionManifestSchema, composeVersionManifest };
63
+ //# sourceMappingURL=version-manifest.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-manifest.mjs","names":[],"sources":["../src/version-manifest.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { z } from \"zod\";\n\n/**\n * WorkspaceVersionManifest — the immutable per-deploy document at\n * `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`\n * (ADR 0020, as amended; atomic-deploys MAP decision 1). The published\n * config's slot pins this document via its `pin` (`manifest` + the\n * manifest's own SRI); every artifact coordinate lives here, so the config\n * stops growing with artifact kinds and old versions stay fully servable.\n */\n\nconst SRI = z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);\n\nexport const WorkspaceVersionManifestSchema = z.object({\n version: z.string().regex(/^[0-9a-f]{16}$/),\n builtAt: z.string().optional(),\n gitSha: z.string().optional(),\n entry: z.string().min(1),\n entryIntegrity: SRI,\n ssr: z\n .object({\n entry: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n browserManifest: z\n .object({\n file: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n /** extra assets (css, icons) — logical name → served-object SRI */\n assets: z.record(z.string(), SRI).optional(),\n /** shared-dependency versions this build was built against */\n shared: z.record(z.string(), z.string()).optional(),\n /**\n * Full per-file digest map of the dist (object path → served-object SRI).\n * Written by `every-plugin`-based deploys so the next deploy can diff against\n * it and skip re-uploading unchanged files; readers that predate the field\n * ignore it (zod strips unknown keys). Participates in the version hash.\n */\n files: z.record(z.string(), SRI).optional(),\n});\nexport type WorkspaceVersionManifest = z.infer<typeof WorkspaceVersionManifestSchema>;\n\nexport interface VersionManifestInput {\n /** Omit: a per-build timestamp makes the same version id map to different\n * manifest bytes per machine, breaking the pin's SRI against the image's\n * staged copy and the CDN's immutability for republished versions. */\n builtAt?: string;\n gitSha?: string;\n entry: string;\n entryIntegrity: string;\n ssr?: { entry: string; integrity: string };\n browserManifest?: { file: string; integrity: string };\n assets?: Record<string, string>;\n shared?: Record<string, string>;\n files?: Record<string, string>;\n}\n\n/**\n * Compose the manifest with its `version` derived from the canonical content\n * of the artifact coordinates alone (key-sorted, `builtAt` excluded) —\n * identical bytes → identical version id regardless of when they were built,\n * so republishing unchanged content is a pointer no-op. Any changed\n * coordinate → a new version (and a new file).\n */\nexport function composeVersionManifest(input: VersionManifestInput): WorkspaceVersionManifest {\n const { builtAt, ...hashedInputs } = input;\n const version = createHash(\"sha256\")\n .update(stableStringify(hashedInputs))\n .digest(\"hex\")\n .slice(0, 16);\n return WorkspaceVersionManifestSchema.parse({ ...input, version });\n}\n\nfunction stableStringify(value: unknown): string {\n if (Array.isArray(value)) return `[${value.map(stableStringify).join(\",\")}]`;\n if (value && typeof value === \"object\") {\n return `{${Object.entries(value)\n .filter(([, v]) => v !== undefined)\n .map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`)\n .sort()\n .join(\",\")}}`;\n }\n return JSON.stringify(value) ?? \"null\";\n}\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,0BAA0B;AAEvD,MAAa,iCAAiC,EAAE,OAAO;CACrD,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,gBAAgB;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,gBAAgB;CAChB,KAAK,EACF,OAAO;EACN,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACvB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;CACZ,iBAAiB,EACd,OAAO;EACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACtB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;;CAEZ,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;;CAE3C,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;;;;;;;CAOlD,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;AAC5C,CAAC;;;;;;;;AAyBD,SAAgB,uBAAuB,OAAuD;CAC5F,MAAM,EAAE,SAAS,GAAG,iBAAiB;CACrC,MAAM,UAAU,WAAW,QAAQ,CAAC,CACjC,OAAO,gBAAgB,YAAY,CAAC,CAAC,CACrC,OAAO,KAAK,CAAC,CACb,MAAM,GAAG,EAAE;CACd,OAAO,+BAA+B,MAAM;EAAE,GAAG;EAAO;CAAQ,CAAC;AACnE;AAEA,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,IAAI,eAAe,CAAC,CAAC,KAAK,GAAG,EAAE;CAC1E,IAAI,SAAS,OAAO,UAAU,UAC5B,OAAO,IAAI,OAAO,QAAQ,KAAK,CAAC,CAC7B,QAAQ,GAAG,OAAO,MAAM,MAAS,CAAC,CAClC,KAAK,CAAC,GAAG,OAAO,GAAG,KAAK,UAAU,CAAC,EAAE,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAC7D,KAAK,CAAC,CACN,KAAK,GAAG,EAAE;CAEf,OAAO,KAAK,UAAU,KAAK,KAAK;AAClC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "every-plugin",
3
- "version": "2.10.0",
3
+ "version": "3.0.0-rc.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,122 +10,219 @@
10
10
  "types": "./dist/index.d.mts",
11
11
  "exports": {
12
12
  ".": {
13
+ "bun": {
14
+ "types": "./src/index.ts",
15
+ "import": "./src/index.ts"
16
+ },
13
17
  "types": "./dist/index.d.mts",
14
18
  "import": "./dist/index.mjs",
15
19
  "require": "./dist/index.cjs"
16
20
  },
21
+ "./identity": {
22
+ "bun": {
23
+ "types": "./src/identity.ts",
24
+ "import": "./src/identity.ts"
25
+ },
26
+ "types": "./dist/identity.d.mts",
27
+ "import": "./dist/identity.mjs",
28
+ "require": "./dist/identity.cjs"
29
+ },
30
+ "./types": {
31
+ "bun": {
32
+ "types": "./src/types.ts",
33
+ "import": "./src/types.ts"
34
+ },
35
+ "types": "./dist/types.d.mts",
36
+ "import": "./dist/types.mjs",
37
+ "require": "./dist/types.cjs"
38
+ },
39
+ "./errors": {
40
+ "bun": {
41
+ "types": "./src/errors.ts",
42
+ "import": "./src/errors.ts"
43
+ },
44
+ "types": "./dist/errors.d.mts",
45
+ "import": "./dist/errors.mjs",
46
+ "require": "./dist/errors.cjs"
47
+ },
48
+ "./remote-entry": {
49
+ "bun": {
50
+ "types": "./src/remote-entry.ts",
51
+ "import": "./src/remote-entry.ts"
52
+ },
53
+ "types": "./dist/remote-entry.d.mts",
54
+ "import": "./dist/remote-entry.mjs",
55
+ "require": "./dist/remote-entry.cjs"
56
+ },
17
57
  "./runtime": {
58
+ "bun": {
59
+ "types": "./src/runtime/index.ts",
60
+ "import": "./src/runtime/index.ts"
61
+ },
18
62
  "types": "./dist/runtime/index.d.mts",
19
63
  "import": "./dist/runtime/index.mjs",
20
64
  "require": "./dist/runtime/index.cjs"
21
65
  },
22
- "./testing": {
23
- "types": "./dist/testing/index.d.mts",
24
- "import": "./dist/testing/index.mjs",
25
- "require": "./dist/testing/index.cjs"
26
- },
27
66
  "./normalize": {
67
+ "bun": {
68
+ "types": "./src/runtime/services/normalize.ts",
69
+ "import": "./src/runtime/services/normalize.ts"
70
+ },
28
71
  "types": "./dist/runtime/services/normalize.d.mts",
29
72
  "import": "./dist/runtime/services/normalize.mjs",
30
73
  "require": "./dist/runtime/services/normalize.cjs"
31
74
  },
32
- "./effect": {
33
- "types": "./dist/effect.d.mts",
34
- "import": "./dist/effect.mjs",
35
- "require": "./dist/effect.cjs"
75
+ "./shared-deps-spec": {
76
+ "bun": {
77
+ "types": "./src/shared-deps-spec.ts",
78
+ "import": "./src/shared-deps-spec.ts"
79
+ },
80
+ "types": "./dist/shared-deps-spec.d.mts",
81
+ "import": "./dist/shared-deps-spec.mjs",
82
+ "require": "./dist/shared-deps-spec.cjs"
83
+ },
84
+ "./build/rspack": {
85
+ "bun": {
86
+ "types": "./src/build/rspack/index.ts",
87
+ "import": "./src/build/rspack/index.ts"
88
+ },
89
+ "types": "./dist/build/rspack/index.d.mts",
90
+ "import": "./dist/build/rspack/index.mjs",
91
+ "require": "./dist/build/rspack/index.cjs"
36
92
  },
37
- "./zod": {
38
- "types": "./dist/zod.d.mts",
39
- "import": "./dist/zod.mjs",
40
- "require": "./dist/zod.cjs"
93
+ "./build/artifact-names": {
94
+ "bun": {
95
+ "types": "./src/build/artifact-names.ts",
96
+ "import": "./src/build/artifact-names.ts"
97
+ },
98
+ "types": "./dist/build/artifact-names.d.mts",
99
+ "import": "./dist/build/artifact-names.mjs",
100
+ "require": "./dist/build/artifact-names.cjs"
41
101
  },
42
- "./zod/v4/core": {
43
- "types": "./dist/zod-core.d.mts",
44
- "import": "./dist/zod-core.mjs",
45
- "require": "./dist/zod-core.cjs"
102
+ "./version-manifest": {
103
+ "bun": {
104
+ "types": "./src/version-manifest.ts",
105
+ "import": "./src/version-manifest.ts"
106
+ },
107
+ "types": "./dist/version-manifest.d.mts",
108
+ "import": "./dist/version-manifest.mjs",
109
+ "require": "./dist/version-manifest.cjs"
46
110
  },
47
- "./orpc": {
48
- "types": "./dist/orpc.d.mts",
49
- "import": "./dist/orpc.mjs",
50
- "require": "./dist/orpc.cjs"
111
+ "./ui/manifest": {
112
+ "bun": {
113
+ "types": "./src/ui/manifest/index.ts",
114
+ "import": "./src/ui/manifest/index.ts"
115
+ },
116
+ "types": "./dist/ui/manifest/index.d.mts",
117
+ "import": "./dist/ui/manifest/index.mjs",
118
+ "require": "./dist/ui/manifest/index.cjs"
51
119
  },
52
- "./orpc/openapi": {
53
- "types": "./dist/orpc-openapi.d.mts",
54
- "import": "./dist/orpc-openapi.mjs",
55
- "require": "./dist/orpc-openapi.cjs"
120
+ "./ui/manifest-generator": {
121
+ "bun": {
122
+ "types": "./src/ui/manifest/generator.ts",
123
+ "import": "./src/ui/manifest/generator.ts"
124
+ },
125
+ "types": "./dist/ui/manifest/generator.d.mts",
126
+ "import": "./dist/ui/manifest/generator.mjs",
127
+ "require": "./dist/ui/manifest/generator.cjs"
56
128
  },
57
- "./errors": {
58
- "types": "./dist/errors.d.mts",
59
- "import": "./dist/errors.mjs",
60
- "require": "./dist/errors.cjs"
129
+ "./ui/manifest/contract": {
130
+ "bun": {
131
+ "types": "./src/ui/manifest/contract.ts",
132
+ "import": "./src/ui/manifest/contract.ts"
133
+ },
134
+ "types": "./dist/ui/manifest/contract.d.mts",
135
+ "import": "./dist/ui/manifest/contract.mjs",
136
+ "require": "./dist/ui/manifest/contract.cjs"
61
137
  },
62
- "./types": {
63
- "types": "./dist/types.d.mts",
64
- "import": "./dist/types.mjs",
65
- "require": "./dist/types.cjs"
138
+ "./build/ui": {
139
+ "bun": {
140
+ "types": "./src/build/ui/index.ts",
141
+ "import": "./src/build/ui/index.ts"
142
+ },
143
+ "types": "./dist/build/ui/index.d.mts",
144
+ "import": "./dist/build/ui/index.mjs",
145
+ "require": "./dist/build/ui/index.cjs"
66
146
  },
67
- "./build/rspack": {
68
- "types": {
69
- "import": "./dist/build/rspack/index.d.mts",
70
- "require": "./dist/build/rspack/index.d.cts"
147
+ "./dev-serve": {
148
+ "bun": {
149
+ "types": "./src/dev/serve.ts",
150
+ "import": "./src/dev/serve.ts"
71
151
  },
72
- "import": "./dist/build/rspack/index.mjs",
73
- "require": "./dist/build/rspack/index.cjs"
152
+ "types": "./dist/dev/serve.d.mts",
153
+ "import": "./dist/dev/serve.mjs"
74
154
  },
75
155
  "./package.json": "./package.json"
76
156
  },
157
+ "bin": {
158
+ "every-plugin": "./bin/every-plugin.mjs",
159
+ "every-plugin-serve": "./bin/every-plugin-serve.mjs"
160
+ },
77
161
  "files": [
78
162
  "dist",
79
163
  "src",
164
+ "bin",
80
165
  "skills",
81
166
  "!skills/_artifacts"
82
167
  ],
83
168
  "scripts": {
84
169
  "build": "tsdown",
85
- "build:test": "cd tests/fixtures/test-plugin && bun run build",
170
+ "exports:sync": "node --import tsx scripts/sync-exports.ts",
171
+ "exports:check": "node --import tsx scripts/sync-exports.ts --check",
172
+ "build:test": "cd tests/fixtures/test-plugin && pnpm run build",
86
173
  "test": "vitest run --config vitest.config.ts",
87
174
  "test:unit": "vitest run --config vitest.config.ts",
88
- "test:integration": "bun run build:test && vitest run --config vitest.integration.config.ts",
89
- "test:all": "bun run test:unit && bun run test:integration",
175
+ "test:integration": "pnpm run build:test && vitest run --config vitest.integration.config.ts",
176
+ "test:all": "pnpm run test:unit && pnpm run test:integration",
90
177
  "test:watch": "vitest --config vitest.config.ts --watch",
91
178
  "typecheck": "tsc --noEmit"
92
179
  },
93
180
  "peerDependencies": {
94
- "@rspack/core": "1.7.11",
95
- "typescript": "^5.9.3",
96
- "effect": "3.21.2",
97
- "zod": "4.3.6",
98
- "@orpc/contract": "1.14.3",
99
- "@orpc/server": "1.14.3",
100
- "@orpc/client": "1.14.3",
101
- "@orpc/openapi": "1.14.3",
102
- "@orpc/zod": "1.14.3",
103
- "@orpc/tanstack-query": "1.14.3"
181
+ "@orpc/contract": "2.0.0-beta.35",
182
+ "@orpc/server": "2.0.0-beta.35",
183
+ "@orpc/tanstack-query": "2.0.0-beta.35",
184
+ "@orpc/zod": "2.0.0-beta.35",
185
+ "@proj-airi/unplugin-drizzle-orm-migrations": "*",
186
+ "@rspack/core": "2.2.8",
187
+ "@tanstack/react-router": "1.170.32",
188
+ "@tanstack/router-generator": "1.167.33",
189
+ "effect": "4.0.0-rc.117",
190
+ "react": "19.2.4",
191
+ "typescript": "^7.0.2",
192
+ "zod": "4.6.5"
104
193
  },
105
194
  "devDependencies": {
106
- "@effect/language-service": "^0.85.1",
107
- "@effect/vitest": "^0.29.0",
108
- "@orpc/client": "^1.13.4",
109
- "@orpc/openapi": "^1.13.4",
110
- "@rspack/cli": "1.7.11",
195
+ "@effect/vitest": "4.0.0-rc.117",
196
+ "@orpc/client": "2.0.0-beta.35",
197
+ "@orpc/openapi": "2.0.0-beta.35",
198
+ "@rspack/cli": "2.2.6",
111
199
  "@tanstack/intent": "^0.3.5",
112
- "@types/bun": "^1.3.7",
113
200
  "@types/node": "^25.1.0",
201
+ "@types/react": "^19.2.7",
202
+ "@types/react-dom": "^19.2.3",
114
203
  "@vitest/ui": "4.1.5",
115
- "bun-types": "^1.3.7",
116
- "sirv": "^3.0.2",
117
204
  "tsdown": "^0.22.0",
118
205
  "vite-tsconfig-paths": "^6.0.5",
119
206
  "vitest": "^4.1.8"
120
207
  },
121
208
  "dependencies": {
122
- "@module-federation/enhanced": "^2.4.0",
123
- "@module-federation/node": "^2.7.42",
124
- "@module-federation/runtime-core": "^2.4.0",
125
- "@orpc/contract": "1.14.3",
126
- "@orpc/experimental-publisher": "1.14.2",
127
- "@orpc/server": "1.14.3",
128
- "@orpc/tanstack-query": "1.14.3"
209
+ "@module-federation/enhanced": "^2.9.0",
210
+ "@module-federation/node": "^2.7.50",
211
+ "@module-federation/rsbuild-plugin": "^2.9.0",
212
+ "@module-federation/runtime-core": "^2.9.0",
213
+ "@module-federation/runtime-tools": "^2.9.0",
214
+ "@orpc/client": "2.0.0-beta.35",
215
+ "@orpc/contract": "2.0.0-beta.35",
216
+ "@orpc/experimental-effect": "2.0.0-beta.35",
217
+ "@orpc/openapi": "2.0.0-beta.35",
218
+ "@orpc/publisher": "2.0.0-beta.35",
219
+ "@orpc/server": "2.0.0-beta.35",
220
+ "@orpc/tanstack-query": "2.0.0-beta.35",
221
+ "@rsbuild/core": "2.2.8",
222
+ "@rsbuild/plugin-react": "2.1.0",
223
+ "@tanstack/router-generator": "1.167.33",
224
+ "@tanstack/router-plugin": "1.168.35",
225
+ "sirv": "3.0.2"
129
226
  },
130
227
  "keywords": [
131
228
  "plugin",
@@ -2,7 +2,7 @@
2
2
  name: plugin-client
3
3
  description: Connect to and consume deployed everything.dev plugins from an external app, child project, or script. Use when creating API/auth clients, reading runtime config, authenticating with API keys or sessions, or calling plugin routes programmatically.
4
4
  metadata:
5
- sources: "ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/app.ts,everything-dev/src/ui/runtime.ts,everything-dev/src/types.ts,host/src/program.ts,host/src/services/auth.ts,api/src/lib/auth.ts"
5
+ sources: "ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/app.ts,everything-dev/src/ui/runtime.ts,everything-dev/src/types.ts,host/src/program.ts,host/src/services/auth.ts,packages/everything-dev/src/api/auth-middleware.ts"
6
6
  ---
7
7
 
8
8
  # Plugin Client — Consuming everything.dev APIs
@@ -313,7 +313,7 @@ builder.createThing
313
313
  });
314
314
  ```
315
315
 
316
- See `references/api-keys.md` for the full API key route table, permission schema, and management examples.
316
+ See [api-keys](references/api-keys.md) for the full API key route table, permission schema, and management examples.
317
317
 
318
318
  ## OpenAPI / REST
319
319
 
@@ -392,7 +392,6 @@ export type ApiContract = BaseApiContract & {
392
392
  ### Regeneration Triggers
393
393
 
394
394
  Generated files are gitignored and auto-regenerated on:
395
- - `bun install` (via postinstall `bos types gen`)
396
395
  - `bun typecheck`
397
396
  - `bos dev` / `bos build`
398
397
  - `bos plugin add` / `bos plugin remove`
@@ -433,11 +432,11 @@ bos init myapp.everything.dev \
433
432
  --plugins apps,template
434
433
  ```
435
434
 
436
- This writes `bos.config.json` with `extends`, scaffolds the project, and generates types. The child's `postinstall` hook runs `bos types gen` automatically.
435
+ This writes `bos.config.json` with `extends`, scaffolds the project, and generates types. Afterward, `bun typecheck`, `bos dev`, and `bos build` regenerate types on demand.
437
436
 
438
437
  ### What Can Be Overridden
439
438
 
440
- Child configs can override `app.ui` (custom UI CDN) and `plugins.<key>` (custom plugin URLs). The host's `ALLOW_OVERRIDE` env var controls which sections tenants can customize (`ui`, `plugins`, `plugins.<key>`).
439
+ Child configs can override `app.ui` (custom UI CDN) and `plugins.<key>` (custom plugin URLs). Which sections a tenant can customize is controlled per-tenant by the `allow_ui_overrides` and `allow_backend_overrides` flags on the tenant record, resolved by the host from the API's `GET /tenants/bindings` endpoint (cached for 30s).
441
440
 
442
441
  See the `extends-config` skill for deep merge semantics, per-environment extends, and canonical field ordering.
443
442
 
@@ -448,3 +447,23 @@ See the `extends-config` skill for deep merge semantics, per-environment extends
448
447
  - **Not saving the API key secret** — `authClient.apiKey.create()` returns the full key string (`edk_...`) only once. Subsequent calls to `list` or `update` return only the prefix and metadata.
449
448
  - **Plugin key vs plugin name confusion** — the client namespace is the `bos.config.json` `plugins` key (e.g., `"apps"`), not the Module Federation `name` field. They often match but are not guaranteed to.
450
449
  - **Forgetting to regenerate types** — after adding/removing plugins in `bos.config.json`, run `bos types gen` or restart `bos dev`. Stale `api-types.gen.ts` will have missing or wrong namespace keys.
450
+
451
+ ## The tasks you will actually be given
452
+
453
+ **"Call a plugin route from a script"** — create a key in the UI under `/settings/api-keys` (the full `edk_...` secret is shown once — copy it), then use the external `RPCLink` + `x-api-key` snippet from the External / Standalone API Client section above. The procedure path is `POST {hostUrl}/api/rpc/{pluginKey}/{procedure}` — e.g. `client.registry.listRegistryApps({ limit: 24 })`.
454
+
455
+ **"Wire a typed API call into a UI route"** — import `useApiClient` from `@/app`, call `apiClient.<pluginKey>.<procedure>()`. If the namespace key is missing in the types, the plugin was added/removed without regenerating: run `bos types gen` (or restart `pnpm run dev`), never hand-edit `ui/src/lib/api-types.gen.ts`.
456
+
457
+ **"Set up a typed client for another language"** — pull the spec from `GET {hostUrl}/api/spec.json` and run the openapi codegen commands in the OpenAPI / REST section above.
458
+
459
+ ## What comes back when it refuses
460
+
461
+ | Error word / shape you see | Meaning | Action |
462
+ |---|---|---|
463
+ | 401 `UNAUTHORIZED` "Authentication required" with `data: { hint: "Sign in or provide an API key" }` | no session cookie and no API key reached the middleware | sign in, or attach `x-api-key: edk_...` |
464
+ | 401 `UNAUTHORIZED` "API key required" with `data: { authType: "apiKey", hint: "Provide a valid API key via x-api-key header" }` | the route is `requireApiKey(...)`-protected and your key was absent — usually `Authorization: Bearer` was used instead | switch to the `x-api-key` header |
465
+ | 403 `FORBIDDEN` "API key lacks permission: <resource>:<action>" with `data: { requiredPermissions, keyPermissions }` | the key's `permissions` map does not cover every required resource/action — partial matches are rejected | re-create (server-side) or update the key with the needed permissions |
466
+ | 403 `FORBIDDEN` "Requires role: ..." / "Requires organization role: ..." | session role gate | sign in with an account holding the role; a key cannot satisfy these |
467
+ | 403 `FORBIDDEN` "Organization requires platform-admin approval" | the org's `status` is not `"active"` | stop — needs platform-admin approval, no client-side fix |
468
+ | `authClient.apiKey.list` / `update` return only `prefix` and metadata | expected — the full secret is returned once at `create` | create a new key; the old secret is unrecoverable |
469
+ | Browser request blocked by CORS despite a valid key | session cookies not sent (`credentials: "include"` missing) or origin not allowed by `CORS_ORIGIN` | add `credentials: "include"` to the fetch wrapper, or fix `CORS_ORIGIN` |