@bleedingdev/modern-js-plugin-bff 3.8.3-ultramodern.1 → 3.8.3-ultramodern.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/dist/cjs/cli/generator.js +45 -53
  2. package/dist/cjs/cli/serverGlobalVars.js +1 -1
  3. package/dist/cjs/cli.js +1 -0
  4. package/dist/cjs/loader.js +7 -18
  5. package/dist/cjs/runtime/data-platform/index.js +32 -94
  6. package/dist/cjs/runtime/effect/edge-dispatcher.js +5 -91
  7. package/dist/cjs/runtime/effect/edge.js +11 -45
  8. package/dist/cjs/runtime/effect/index.js +173 -55
  9. package/dist/cjs/runtime/effect-client/index.js +32 -166
  10. package/dist/cjs/runtime/effect-client/runtime.js +32 -70
  11. package/dist/cjs/runtime/hono/adapter.js +13 -54
  12. package/dist/cjs/server.js +2 -2
  13. package/dist/cjs/utils/client-generator/generate.js +9 -6
  14. package/dist/cjs/utils/crossProjectApiPlugin.js +5 -1
  15. package/dist/cjs/utils/pluginGenerator.js +4 -4
  16. package/dist/cjs/utils/runtimeGenerator.js +4 -16
  17. package/dist/esm/cli/generator.mjs +45 -53
  18. package/dist/esm/cli/serverGlobalVars.mjs +1 -1
  19. package/dist/esm/cli.mjs +1 -0
  20. package/dist/esm/loader.mjs +5 -16
  21. package/dist/esm/runtime/data-platform/index.mjs +1 -7
  22. package/dist/esm/runtime/effect/edge-dispatcher.mjs +1 -38
  23. package/dist/esm/runtime/effect/edge.mjs +2 -2
  24. package/dist/esm/runtime/effect/index.mjs +16 -8
  25. package/dist/esm/runtime/effect-client/index.mjs +1 -98
  26. package/dist/esm/runtime/effect-client/runtime.mjs +1 -62
  27. package/dist/esm/runtime/hono/adapter.mjs +13 -54
  28. package/dist/esm/server.mjs +2 -2
  29. package/dist/esm/utils/client-generator/generate.mjs +8 -5
  30. package/dist/esm/utils/crossProjectApiPlugin.mjs +3 -2
  31. package/dist/esm/utils/pluginGenerator.mjs +5 -5
  32. package/dist/esm/utils/runtimeGenerator.mjs +4 -16
  33. package/dist/esm-node/cli/generator.mjs +45 -53
  34. package/dist/esm-node/cli/serverGlobalVars.mjs +1 -1
  35. package/dist/esm-node/cli.mjs +1 -0
  36. package/dist/esm-node/loader.mjs +5 -16
  37. package/dist/esm-node/runtime/data-platform/index.mjs +1 -7
  38. package/dist/esm-node/runtime/effect/edge-dispatcher.mjs +1 -38
  39. package/dist/esm-node/runtime/effect/edge.mjs +2 -2
  40. package/dist/esm-node/runtime/effect/index.mjs +16 -8
  41. package/dist/esm-node/runtime/effect-client/index.mjs +1 -98
  42. package/dist/esm-node/runtime/effect-client/runtime.mjs +1 -62
  43. package/dist/esm-node/runtime/hono/adapter.mjs +13 -54
  44. package/dist/esm-node/server.mjs +2 -2
  45. package/dist/esm-node/utils/client-generator/generate.mjs +8 -5
  46. package/dist/esm-node/utils/crossProjectApiPlugin.mjs +3 -2
  47. package/dist/esm-node/utils/pluginGenerator.mjs +5 -5
  48. package/dist/esm-node/utils/runtimeGenerator.mjs +4 -16
  49. package/dist/types/loader.d.ts +1 -0
  50. package/dist/types/runtime/data-platform/index.d.ts +1 -8
  51. package/dist/types/runtime/effect/edge-dispatcher.d.ts +1 -26
  52. package/dist/types/runtime/effect/edge.d.ts +2 -2
  53. package/dist/types/runtime/effect/index.d.ts +15 -7
  54. package/dist/types/runtime/effect-client/index.d.ts +1 -58
  55. package/dist/types/runtime/effect-client/runtime.d.ts +1 -5
  56. package/dist/types/runtime/hono/adapter.d.ts +1 -11
  57. package/dist/types/utils/client-generator/generate.d.ts +2 -1
  58. package/dist/types/utils/crossProjectApiPlugin.d.ts +1 -0
  59. package/dist/types/utils/pluginGenerator.d.ts +2 -1
  60. package/package.json +29 -28
  61. package/dist/cjs/runtime/data-platform/batch/queue.js +0 -284
  62. package/dist/cjs/runtime/data-platform/batch/request.js +0 -98
  63. package/dist/cjs/runtime/data-platform/batch/response.js +0 -64
  64. package/dist/cjs/runtime/data-platform/batch/telemetry.js +0 -67
  65. package/dist/cjs/runtime/data-platform/batch/url.js +0 -69
  66. package/dist/cjs/runtime/data-platform/batch-transport.js +0 -59
  67. package/dist/cjs/runtime/data-platform/codec.js +0 -155
  68. package/dist/cjs/runtime/data-platform/invalidation.js +0 -61
  69. package/dist/cjs/runtime/data-platform/trace.js +0 -73
  70. package/dist/cjs/runtime/data-platform/types.js +0 -48
  71. package/dist/cjs/runtime/data-platform/validation.js +0 -178
  72. package/dist/cjs/runtime/effect/adapter/constants.js +0 -44
  73. package/dist/cjs/runtime/effect/adapter/cross-project-policy.js +0 -66
  74. package/dist/cjs/runtime/effect/adapter/entry.js +0 -100
  75. package/dist/cjs/runtime/effect/adapter/error-response.js +0 -81
  76. package/dist/cjs/runtime/effect/adapter/handler.js +0 -53
  77. package/dist/cjs/runtime/effect/adapter.js +0 -155
  78. package/dist/cjs/runtime/effect/backend-federation/entry.js +0 -99
  79. package/dist/cjs/runtime/effect/backend-federation/identity.js +0 -82
  80. package/dist/cjs/runtime/effect/backend-federation/load.js +0 -75
  81. package/dist/cjs/runtime/effect/backend-federation/plugin.js +0 -63
  82. package/dist/cjs/runtime/effect/backend-federation/remotes.js +0 -51
  83. package/dist/cjs/runtime/effect/backend-federation/runtime.js +0 -128
  84. package/dist/cjs/runtime/effect/backend-federation/types.js +0 -18
  85. package/dist/cjs/runtime/effect/backend-federation/utils.js +0 -48
  86. package/dist/cjs/runtime/effect/backend-federation-manifest/errors.js +0 -83
  87. package/dist/cjs/runtime/effect/backend-federation-manifest/index.js +0 -55
  88. package/dist/cjs/runtime/effect/backend-federation-manifest/load.js +0 -94
  89. package/dist/cjs/runtime/effect/backend-federation-manifest/metadata.js +0 -101
  90. package/dist/cjs/runtime/effect/backend-federation-manifest/reference.js +0 -120
  91. package/dist/cjs/runtime/effect/backend-federation-manifest/remote.js +0 -68
  92. package/dist/cjs/runtime/effect/backend-federation-manifest/types.js +0 -18
  93. package/dist/cjs/runtime/effect/backend-federation-manifest/validation.js +0 -109
  94. package/dist/cjs/runtime/effect/backend-federation-manifest.js +0 -62
  95. package/dist/cjs/runtime/effect/backend-federation.js +0 -65
  96. package/dist/cjs/runtime/effect/context.js +0 -60
  97. package/dist/cjs/runtime/effect/dispatch.js +0 -101
  98. package/dist/cjs/runtime/effect/edge-context.js +0 -81
  99. package/dist/cjs/runtime/effect/endpoint-contracts.js +0 -121
  100. package/dist/cjs/runtime/effect/entry-shape.js +0 -84
  101. package/dist/cjs/runtime/effect/handler/batch-handler.js +0 -161
  102. package/dist/cjs/runtime/effect/handler/batch.js +0 -159
  103. package/dist/cjs/runtime/effect/handler/definition.js +0 -102
  104. package/dist/cjs/runtime/effect/handler/envelope.js +0 -104
  105. package/dist/cjs/runtime/effect/handler/http.js +0 -107
  106. package/dist/cjs/runtime/effect/handler/openapi.js +0 -57
  107. package/dist/cjs/runtime/effect/handler/routing.js +0 -100
  108. package/dist/cjs/runtime/effect/handler/rpc.js +0 -63
  109. package/dist/cjs/runtime/effect/handler/types.js +0 -43
  110. package/dist/cjs/runtime/effect/handler.js +0 -189
  111. package/dist/cjs/runtime/effect/module.js +0 -113
  112. package/dist/cjs/runtime/effect/operation-context.js +0 -103
  113. package/dist/cjs/runtime/effect/rpcSerialization.js +0 -54
  114. package/dist/cjs/runtime/effect-client/batch.js +0 -73
  115. package/dist/cjs/runtime/effect-client/envelope.js +0 -145
  116. package/dist/cjs/runtime/effect-client/guards.js +0 -44
  117. package/dist/cjs/runtime/effect-client/request-context.js +0 -64
  118. package/dist/cjs/runtime/effect-client/request.js +0 -66
  119. package/dist/cjs/runtime/effect-client/types.js +0 -18
  120. package/dist/cjs/runtime/safe-failure.js +0 -84
  121. package/dist/cjs/utils/crossProjectServerPolicy.js +0 -98
  122. package/dist/cjs/utils/effect-client-generator/generator.js +0 -69
  123. package/dist/cjs/utils/effect-client-generator/index.js +0 -51
  124. package/dist/cjs/utils/effect-client-generator/paths.js +0 -62
  125. package/dist/cjs/utils/effect-client-generator/rendering.js +0 -220
  126. package/dist/cjs/utils/effect-client-generator/runtime.js +0 -68
  127. package/dist/cjs/utils/effect-client-generator/types.js +0 -18
  128. package/dist/cjs/utils/effectClientGenerator.js +0 -49
  129. package/dist/cjs/utils/effectSourceLoader.js +0 -312
  130. package/dist/cjs/utils/headers.js +0 -46
  131. package/dist/esm/runtime/data-platform/batch/queue.mjs +0 -246
  132. package/dist/esm/runtime/data-platform/batch/request.mjs +0 -45
  133. package/dist/esm/runtime/data-platform/batch/response.mjs +0 -23
  134. package/dist/esm/runtime/data-platform/batch/telemetry.mjs +0 -23
  135. package/dist/esm/runtime/data-platform/batch/url.mjs +0 -25
  136. package/dist/esm/runtime/data-platform/batch-transport.mjs +0 -12
  137. package/dist/esm/runtime/data-platform/codec.mjs +0 -90
  138. package/dist/esm/runtime/data-platform/invalidation.mjs +0 -20
  139. package/dist/esm/runtime/data-platform/trace.mjs +0 -29
  140. package/dist/esm/runtime/data-platform/types.mjs +0 -4
  141. package/dist/esm/runtime/data-platform/validation.mjs +0 -128
  142. package/dist/esm/runtime/effect/adapter/constants.mjs +0 -6
  143. package/dist/esm/runtime/effect/adapter/cross-project-policy.mjs +0 -28
  144. package/dist/esm/runtime/effect/adapter/entry.mjs +0 -52
  145. package/dist/esm/runtime/effect/adapter/error-response.mjs +0 -43
  146. package/dist/esm/runtime/effect/adapter/handler.mjs +0 -15
  147. package/dist/esm/runtime/effect/adapter.mjs +0 -107
  148. package/dist/esm/runtime/effect/backend-federation/entry.mjs +0 -61
  149. package/dist/esm/runtime/effect/backend-federation/identity.mjs +0 -41
  150. package/dist/esm/runtime/effect/backend-federation/load.mjs +0 -37
  151. package/dist/esm/runtime/effect/backend-federation/plugin.mjs +0 -25
  152. package/dist/esm/runtime/effect/backend-federation/remotes.mjs +0 -13
  153. package/dist/esm/runtime/effect/backend-federation/runtime.mjs +0 -90
  154. package/dist/esm/runtime/effect/backend-federation/types.mjs +0 -0
  155. package/dist/esm/runtime/effect/backend-federation/utils.mjs +0 -7
  156. package/dist/esm/runtime/effect/backend-federation-manifest/errors.mjs +0 -32
  157. package/dist/esm/runtime/effect/backend-federation-manifest/index.mjs +0 -4
  158. package/dist/esm/runtime/effect/backend-federation-manifest/load.mjs +0 -56
  159. package/dist/esm/runtime/effect/backend-federation-manifest/metadata.mjs +0 -42
  160. package/dist/esm/runtime/effect/backend-federation-manifest/reference.mjs +0 -76
  161. package/dist/esm/runtime/effect/backend-federation-manifest/remote.mjs +0 -30
  162. package/dist/esm/runtime/effect/backend-federation-manifest/types.mjs +0 -0
  163. package/dist/esm/runtime/effect/backend-federation-manifest/validation.mjs +0 -65
  164. package/dist/esm/runtime/effect/backend-federation-manifest.mjs +0 -1
  165. package/dist/esm/runtime/effect/backend-federation.mjs +0 -5
  166. package/dist/esm/runtime/effect/context.mjs +0 -13
  167. package/dist/esm/runtime/effect/dispatch.mjs +0 -63
  168. package/dist/esm/runtime/effect/edge-context.mjs +0 -34
  169. package/dist/esm/runtime/effect/endpoint-contracts.mjs +0 -68
  170. package/dist/esm/runtime/effect/entry-shape.mjs +0 -36
  171. package/dist/esm/runtime/effect/handler/batch-handler.mjs +0 -123
  172. package/dist/esm/runtime/effect/handler/batch.mjs +0 -97
  173. package/dist/esm/runtime/effect/handler/definition.mjs +0 -61
  174. package/dist/esm/runtime/effect/handler/envelope.mjs +0 -63
  175. package/dist/esm/runtime/effect/handler/http.mjs +0 -69
  176. package/dist/esm/runtime/effect/handler/openapi.mjs +0 -19
  177. package/dist/esm/runtime/effect/handler/routing.mjs +0 -50
  178. package/dist/esm/runtime/effect/handler/rpc.mjs +0 -22
  179. package/dist/esm/runtime/effect/handler/types.mjs +0 -5
  180. package/dist/esm/runtime/effect/handler.mjs +0 -14
  181. package/dist/esm/runtime/effect/module.mjs +0 -75
  182. package/dist/esm/runtime/effect/operation-context.mjs +0 -65
  183. package/dist/esm/runtime/effect/rpcSerialization.mjs +0 -16
  184. package/dist/esm/runtime/effect-client/batch.mjs +0 -35
  185. package/dist/esm/runtime/effect-client/envelope.mjs +0 -104
  186. package/dist/esm/runtime/effect-client/guards.mjs +0 -3
  187. package/dist/esm/runtime/effect-client/request-context.mjs +0 -23
  188. package/dist/esm/runtime/effect-client/request.mjs +0 -28
  189. package/dist/esm/runtime/effect-client/types.mjs +0 -0
  190. package/dist/esm/runtime/safe-failure.mjs +0 -46
  191. package/dist/esm/utils/crossProjectServerPolicy.mjs +0 -44
  192. package/dist/esm/utils/effect-client-generator/generator.mjs +0 -28
  193. package/dist/esm/utils/effect-client-generator/index.mjs +0 -3
  194. package/dist/esm/utils/effect-client-generator/paths.mjs +0 -24
  195. package/dist/esm/utils/effect-client-generator/rendering.mjs +0 -179
  196. package/dist/esm/utils/effect-client-generator/runtime.mjs +0 -27
  197. package/dist/esm/utils/effect-client-generator/types.mjs +0 -0
  198. package/dist/esm/utils/effectClientGenerator.mjs +0 -1
  199. package/dist/esm/utils/effectSourceLoader.mjs +0 -256
  200. package/dist/esm/utils/headers.mjs +0 -8
  201. package/dist/esm-node/runtime/data-platform/batch/queue.mjs +0 -247
  202. package/dist/esm-node/runtime/data-platform/batch/request.mjs +0 -46
  203. package/dist/esm-node/runtime/data-platform/batch/response.mjs +0 -24
  204. package/dist/esm-node/runtime/data-platform/batch/telemetry.mjs +0 -24
  205. package/dist/esm-node/runtime/data-platform/batch/url.mjs +0 -26
  206. package/dist/esm-node/runtime/data-platform/batch-transport.mjs +0 -13
  207. package/dist/esm-node/runtime/data-platform/codec.mjs +0 -91
  208. package/dist/esm-node/runtime/data-platform/invalidation.mjs +0 -21
  209. package/dist/esm-node/runtime/data-platform/trace.mjs +0 -30
  210. package/dist/esm-node/runtime/data-platform/types.mjs +0 -5
  211. package/dist/esm-node/runtime/data-platform/validation.mjs +0 -129
  212. package/dist/esm-node/runtime/effect/adapter/constants.mjs +0 -7
  213. package/dist/esm-node/runtime/effect/adapter/cross-project-policy.mjs +0 -29
  214. package/dist/esm-node/runtime/effect/adapter/entry.mjs +0 -53
  215. package/dist/esm-node/runtime/effect/adapter/error-response.mjs +0 -44
  216. package/dist/esm-node/runtime/effect/adapter/handler.mjs +0 -16
  217. package/dist/esm-node/runtime/effect/adapter.mjs +0 -108
  218. package/dist/esm-node/runtime/effect/backend-federation/entry.mjs +0 -62
  219. package/dist/esm-node/runtime/effect/backend-federation/identity.mjs +0 -42
  220. package/dist/esm-node/runtime/effect/backend-federation/load.mjs +0 -38
  221. package/dist/esm-node/runtime/effect/backend-federation/plugin.mjs +0 -26
  222. package/dist/esm-node/runtime/effect/backend-federation/remotes.mjs +0 -14
  223. package/dist/esm-node/runtime/effect/backend-federation/runtime.mjs +0 -91
  224. package/dist/esm-node/runtime/effect/backend-federation/types.mjs +0 -1
  225. package/dist/esm-node/runtime/effect/backend-federation/utils.mjs +0 -8
  226. package/dist/esm-node/runtime/effect/backend-federation-manifest/errors.mjs +0 -33
  227. package/dist/esm-node/runtime/effect/backend-federation-manifest/index.mjs +0 -5
  228. package/dist/esm-node/runtime/effect/backend-federation-manifest/load.mjs +0 -57
  229. package/dist/esm-node/runtime/effect/backend-federation-manifest/metadata.mjs +0 -43
  230. package/dist/esm-node/runtime/effect/backend-federation-manifest/reference.mjs +0 -77
  231. package/dist/esm-node/runtime/effect/backend-federation-manifest/remote.mjs +0 -31
  232. package/dist/esm-node/runtime/effect/backend-federation-manifest/types.mjs +0 -1
  233. package/dist/esm-node/runtime/effect/backend-federation-manifest/validation.mjs +0 -66
  234. package/dist/esm-node/runtime/effect/backend-federation-manifest.mjs +0 -2
  235. package/dist/esm-node/runtime/effect/backend-federation.mjs +0 -6
  236. package/dist/esm-node/runtime/effect/context.mjs +0 -14
  237. package/dist/esm-node/runtime/effect/dispatch.mjs +0 -64
  238. package/dist/esm-node/runtime/effect/edge-context.mjs +0 -35
  239. package/dist/esm-node/runtime/effect/endpoint-contracts.mjs +0 -69
  240. package/dist/esm-node/runtime/effect/entry-shape.mjs +0 -37
  241. package/dist/esm-node/runtime/effect/handler/batch-handler.mjs +0 -124
  242. package/dist/esm-node/runtime/effect/handler/batch.mjs +0 -98
  243. package/dist/esm-node/runtime/effect/handler/definition.mjs +0 -62
  244. package/dist/esm-node/runtime/effect/handler/envelope.mjs +0 -64
  245. package/dist/esm-node/runtime/effect/handler/http.mjs +0 -70
  246. package/dist/esm-node/runtime/effect/handler/openapi.mjs +0 -20
  247. package/dist/esm-node/runtime/effect/handler/routing.mjs +0 -51
  248. package/dist/esm-node/runtime/effect/handler/rpc.mjs +0 -23
  249. package/dist/esm-node/runtime/effect/handler/types.mjs +0 -6
  250. package/dist/esm-node/runtime/effect/handler.mjs +0 -15
  251. package/dist/esm-node/runtime/effect/module.mjs +0 -76
  252. package/dist/esm-node/runtime/effect/operation-context.mjs +0 -66
  253. package/dist/esm-node/runtime/effect/rpcSerialization.mjs +0 -17
  254. package/dist/esm-node/runtime/effect-client/batch.mjs +0 -36
  255. package/dist/esm-node/runtime/effect-client/envelope.mjs +0 -105
  256. package/dist/esm-node/runtime/effect-client/guards.mjs +0 -4
  257. package/dist/esm-node/runtime/effect-client/request-context.mjs +0 -24
  258. package/dist/esm-node/runtime/effect-client/request.mjs +0 -29
  259. package/dist/esm-node/runtime/effect-client/types.mjs +0 -1
  260. package/dist/esm-node/runtime/safe-failure.mjs +0 -47
  261. package/dist/esm-node/utils/crossProjectServerPolicy.mjs +0 -46
  262. package/dist/esm-node/utils/effect-client-generator/generator.mjs +0 -29
  263. package/dist/esm-node/utils/effect-client-generator/index.mjs +0 -4
  264. package/dist/esm-node/utils/effect-client-generator/paths.mjs +0 -25
  265. package/dist/esm-node/utils/effect-client-generator/rendering.mjs +0 -180
  266. package/dist/esm-node/utils/effect-client-generator/runtime.mjs +0 -29
  267. package/dist/esm-node/utils/effect-client-generator/types.mjs +0 -1
  268. package/dist/esm-node/utils/effectClientGenerator.mjs +0 -2
  269. package/dist/esm-node/utils/effectSourceLoader.mjs +0 -257
  270. package/dist/esm-node/utils/headers.mjs +0 -9
  271. package/dist/types/runtime/data-platform/batch/queue.d.ts +0 -8
  272. package/dist/types/runtime/data-platform/batch/request.d.ts +0 -13
  273. package/dist/types/runtime/data-platform/batch/response.d.ts +0 -3
  274. package/dist/types/runtime/data-platform/batch/telemetry.d.ts +0 -4
  275. package/dist/types/runtime/data-platform/batch/url.d.ts +0 -4
  276. package/dist/types/runtime/data-platform/batch-transport.d.ts +0 -3
  277. package/dist/types/runtime/data-platform/codec.d.ts +0 -17
  278. package/dist/types/runtime/data-platform/invalidation.d.ts +0 -8
  279. package/dist/types/runtime/data-platform/trace.d.ts +0 -4
  280. package/dist/types/runtime/data-platform/types.d.ts +0 -146
  281. package/dist/types/runtime/data-platform/validation.d.ts +0 -29
  282. package/dist/types/runtime/effect/adapter/constants.d.ts +0 -1
  283. package/dist/types/runtime/effect/adapter/cross-project-policy.d.ts +0 -4
  284. package/dist/types/runtime/effect/adapter/entry.d.ts +0 -2
  285. package/dist/types/runtime/effect/adapter/error-response.d.ts +0 -2
  286. package/dist/types/runtime/effect/adapter/handler.d.ts +0 -7
  287. package/dist/types/runtime/effect/adapter.d.ts +0 -22
  288. package/dist/types/runtime/effect/backend-federation/entry.d.ts +0 -2
  289. package/dist/types/runtime/effect/backend-federation/identity.d.ts +0 -30
  290. package/dist/types/runtime/effect/backend-federation/load.d.ts +0 -13
  291. package/dist/types/runtime/effect/backend-federation/plugin.d.ts +0 -3
  292. package/dist/types/runtime/effect/backend-federation/remotes.d.ts +0 -2
  293. package/dist/types/runtime/effect/backend-federation/runtime.d.ts +0 -3
  294. package/dist/types/runtime/effect/backend-federation/types.d.ts +0 -73
  295. package/dist/types/runtime/effect/backend-federation/utils.d.ts +0 -2
  296. package/dist/types/runtime/effect/backend-federation-manifest/errors.d.ts +0 -11
  297. package/dist/types/runtime/effect/backend-federation-manifest/index.d.ts +0 -6
  298. package/dist/types/runtime/effect/backend-federation-manifest/load.d.ts +0 -3
  299. package/dist/types/runtime/effect/backend-federation-manifest/metadata.d.ts +0 -18
  300. package/dist/types/runtime/effect/backend-federation-manifest/reference.d.ts +0 -4
  301. package/dist/types/runtime/effect/backend-federation-manifest/remote.d.ts +0 -3
  302. package/dist/types/runtime/effect/backend-federation-manifest/types.d.ts +0 -51
  303. package/dist/types/runtime/effect/backend-federation-manifest/validation.d.ts +0 -5
  304. package/dist/types/runtime/effect/backend-federation-manifest.d.ts +0 -1
  305. package/dist/types/runtime/effect/backend-federation.d.ts +0 -7
  306. package/dist/types/runtime/effect/context.d.ts +0 -5
  307. package/dist/types/runtime/effect/dispatch.d.ts +0 -13
  308. package/dist/types/runtime/effect/edge-context.d.ts +0 -5
  309. package/dist/types/runtime/effect/endpoint-contracts.d.ts +0 -66
  310. package/dist/types/runtime/effect/entry-shape.d.ts +0 -31
  311. package/dist/types/runtime/effect/handler/batch-handler.d.ts +0 -11
  312. package/dist/types/runtime/effect/handler/batch.d.ts +0 -13
  313. package/dist/types/runtime/effect/handler/definition.d.ts +0 -7
  314. package/dist/types/runtime/effect/handler/envelope.d.ts +0 -13
  315. package/dist/types/runtime/effect/handler/http.d.ts +0 -15
  316. package/dist/types/runtime/effect/handler/openapi.d.ts +0 -4
  317. package/dist/types/runtime/effect/handler/routing.d.ts +0 -5
  318. package/dist/types/runtime/effect/handler/rpc.d.ts +0 -7
  319. package/dist/types/runtime/effect/handler/types.d.ts +0 -153
  320. package/dist/types/runtime/effect/handler.d.ts +0 -14
  321. package/dist/types/runtime/effect/module.d.ts +0 -36
  322. package/dist/types/runtime/effect/operation-context.d.ts +0 -10
  323. package/dist/types/runtime/effect/rpcSerialization.d.ts +0 -3
  324. package/dist/types/runtime/effect-client/batch.d.ts +0 -2
  325. package/dist/types/runtime/effect-client/envelope.d.ts +0 -15
  326. package/dist/types/runtime/effect-client/guards.d.ts +0 -2
  327. package/dist/types/runtime/effect-client/request-context.d.ts +0 -3
  328. package/dist/types/runtime/effect-client/request.d.ts +0 -1
  329. package/dist/types/runtime/effect-client/types.d.ts +0 -68
  330. package/dist/types/runtime/safe-failure.d.ts +0 -1
  331. package/dist/types/utils/crossProjectServerPolicy.d.ts +0 -36
  332. package/dist/types/utils/effect-client-generator/generator.d.ts +0 -10
  333. package/dist/types/utils/effect-client-generator/index.d.ts +0 -4
  334. package/dist/types/utils/effect-client-generator/paths.d.ts +0 -5
  335. package/dist/types/utils/effect-client-generator/rendering.d.ts +0 -4
  336. package/dist/types/utils/effect-client-generator/runtime.d.ts +0 -12
  337. package/dist/types/utils/effect-client-generator/types.d.ts +0 -27
  338. package/dist/types/utils/effectClientGenerator.d.ts +0 -2
  339. package/dist/types/utils/effectSourceLoader.d.ts +0 -25
  340. package/dist/types/utils/headers.d.ts +0 -1
@@ -1,257 +0,0 @@
1
- import "node:module";
2
- import node_crypto from "node:crypto";
3
- import node_fs from "node:fs";
4
- import { builtinModules, createRequire } from "node:module";
5
- import node_path from "node:path";
6
- import { pathToFileURL } from "node:url";
7
- import { build, transform } from "esbuild";
8
- const dynamicImport = new Function('specifier', 'return import(specifier)');
9
- const SOURCE_LOADERS = new Map([
10
- [
11
- '.js',
12
- 'js'
13
- ],
14
- [
15
- '.jsx',
16
- 'jsx'
17
- ],
18
- [
19
- '.mjs',
20
- 'js'
21
- ],
22
- [
23
- '.cjs',
24
- 'js'
25
- ],
26
- [
27
- '.ts',
28
- 'ts'
29
- ],
30
- [
31
- '.tsx',
32
- 'tsx'
33
- ],
34
- [
35
- '.mts',
36
- 'ts'
37
- ],
38
- [
39
- '.cts',
40
- 'ts'
41
- ]
42
- ]);
43
- function sourceLoader(args) {
44
- return SOURCE_LOADERS.get(node_path.extname(args.path).toLowerCase());
45
- }
46
- function preserveSourceModuleSemantics() {
47
- return {
48
- name: 'modern-js-effect-source-semantics',
49
- setup (buildApi) {
50
- buildApi.onLoad({
51
- filter: /\.[cm]?[jt]sx?$/
52
- }, async (args)=>{
53
- const loader = sourceLoader(args);
54
- if (!loader) return;
55
- const source = await node_fs.promises.readFile(args.path, 'utf8');
56
- const compiled = await transform(source, {
57
- define: {
58
- 'import.meta.url': JSON.stringify(pathToFileURL(args.path).href)
59
- },
60
- jsx: 'automatic',
61
- loader,
62
- sourcefile: args.path,
63
- target: 'node20'
64
- });
65
- return {
66
- contents: compiled.code,
67
- loader: 'js',
68
- resolveDir: node_path.dirname(args.path)
69
- };
70
- });
71
- }
72
- };
73
- }
74
- const nodeBuiltins = new Set([
75
- ...builtinModules,
76
- ...builtinModules.map((name)=>`node:${name}`)
77
- ]);
78
- const dependencyResolutionMarker = 'modern-js-effect-dependency-resolution';
79
- async function isEsmOnlyFile(filename) {
80
- const extension = node_path.extname(filename).toLowerCase();
81
- if ('.mjs' === extension || '.mts' === extension) return true;
82
- if ('.cjs' === extension || '.cts' === extension) return false;
83
- let directory = node_path.dirname(filename);
84
- while(true){
85
- const packagePath = node_path.join(directory, 'package.json');
86
- try {
87
- const packageJson = JSON.parse(await node_fs.promises.readFile(packagePath, 'utf8'));
88
- return 'module' === packageJson.type;
89
- } catch (error) {
90
- if (!error || 'object' != typeof error || !('code' in error) || 'ENOENT' !== error.code) throw error;
91
- }
92
- const parent = node_path.dirname(directory);
93
- if (parent === directory) return false;
94
- directory = parent;
95
- }
96
- }
97
- function isBareSpecifier(specifier) {
98
- return !specifier.startsWith('.') && !specifier.startsWith('/') && !node_path.isAbsolute(specifier);
99
- }
100
- function externalizeInstalledDependencies(options) {
101
- const runtimeRequire = createRequire(node_path.join(options.runtimeResolveDir, '__modern_effect_entry.cjs'));
102
- return {
103
- name: 'modern-js-effect-installed-dependencies',
104
- setup (buildApi) {
105
- buildApi.onResolve({
106
- filter: /.*/
107
- }, async (args)=>{
108
- if (!isBareSpecifier(args.path) || nodeBuiltins.has(args.path) || args.pluginData?.[dependencyResolutionMarker] === true) return nodeBuiltins.has(args.path) ? {
109
- external: true,
110
- path: args.path
111
- } : void 0;
112
- const resolution = await buildApi.resolve(args.path, {
113
- importer: args.importer,
114
- kind: args.kind,
115
- namespace: args.namespace,
116
- pluginData: {
117
- ...args.pluginData,
118
- [dependencyResolutionMarker]: true
119
- },
120
- resolveDir: args.resolveDir
121
- });
122
- if (resolution.errors.length > 0) return {
123
- external: true,
124
- path: args.path
125
- };
126
- if (resolution.external || !resolution.path) return {
127
- external: true,
128
- path: args.path
129
- };
130
- const realPath = await node_fs.promises.realpath(resolution.path).catch(()=>resolution.path);
131
- if (realPath.includes(`${node_path.sep}node_modules${node_path.sep}`)) {
132
- const runtimeResolution = await buildApi.resolve(args.path, {
133
- importer: '',
134
- kind: args.kind,
135
- namespace: 'file',
136
- pluginData: {
137
- [dependencyResolutionMarker]: true
138
- },
139
- resolveDir: options.runtimeResolveDir
140
- });
141
- if (0 === runtimeResolution.errors.length && runtimeResolution.path) {
142
- if ('cjs' === options.format) {
143
- let requiredPath;
144
- try {
145
- requiredPath = runtimeRequire.resolve(args.path);
146
- } catch {
147
- requiredPath = runtimeResolution.path;
148
- }
149
- if (await isEsmOnlyFile(requiredPath)) return {
150
- namespace: resolution.namespace,
151
- path: resolution.path,
152
- pluginData: resolution.pluginData,
153
- sideEffects: resolution.sideEffects,
154
- suffix: resolution.suffix,
155
- warnings: resolution.warnings
156
- };
157
- }
158
- return {
159
- external: true,
160
- path: args.path
161
- };
162
- }
163
- }
164
- return {
165
- namespace: resolution.namespace,
166
- path: resolution.path,
167
- pluginData: resolution.pluginData,
168
- sideEffects: resolution.sideEffects,
169
- suffix: resolution.suffix,
170
- warnings: resolution.warnings
171
- };
172
- });
173
- }
174
- };
175
- }
176
- async function bundleEffectEntryForNode(options) {
177
- await build({
178
- absWorkingDir: options.appDir,
179
- allowOverwrite: true,
180
- bundle: true,
181
- entryPoints: [
182
- options.entryPath
183
- ],
184
- format: options.format,
185
- logLevel: 'silent',
186
- outfile: options.entryPath,
187
- platform: 'node',
188
- plugins: [
189
- externalizeInstalledDependencies({
190
- format: options.format,
191
- runtimeResolveDir: options.appDir
192
- }),
193
- preserveSourceModuleSemantics()
194
- ],
195
- target: 'node20'
196
- });
197
- }
198
- function isWatchableInput(filename) {
199
- return !filename.includes(`${node_path.sep}node_modules${node_path.sep}`) && (SOURCE_LOADERS.has(node_path.extname(filename).toLowerCase()) || '.json' === node_path.extname(filename).toLowerCase());
200
- }
201
- function normalizeImportedModule(module) {
202
- if (!module || 'object' != typeof module) return module;
203
- const namespace = module;
204
- const commonJsModule = namespace.default;
205
- if (1 === Object.keys(namespace).length && null !== commonJsModule && 'object' == typeof commonJsModule && true === commonJsModule.__esModule) return commonJsModule;
206
- return module;
207
- }
208
- async function loadEffectBuiltModule(resourcePath) {
209
- const canonicalPath = await node_fs.promises.realpath(node_path.resolve(resourcePath));
210
- if (!await isEsmOnlyFile(canonicalPath)) return createRequire(canonicalPath)(canonicalPath);
211
- return normalizeImportedModule(await dynamicImport(pathToFileURL(canonicalPath).href));
212
- }
213
- async function loadEffectSourceModule(options) {
214
- const resourcePath = node_path.resolve(options.resourcePath);
215
- const appDir = node_path.resolve(options.appDir ?? node_path.dirname(resourcePath));
216
- const tsconfigPath = node_path.join(appDir, 'tsconfig.json');
217
- const cacheDirectory = node_path.join(appDir, 'node_modules', '.cache', 'modern-js', 'effect-source-loader');
218
- const outputName = node_crypto.createHash('sha256').update(resourcePath).digest('hex').slice(0, 24);
219
- const outputPath = node_path.join(cacheDirectory, `${outputName}.mjs`);
220
- await node_fs.promises.mkdir(cacheDirectory, {
221
- recursive: true
222
- });
223
- const result = await build({
224
- absWorkingDir: appDir,
225
- banner: {
226
- js: `import { createRequire as __modernCreateEffectRequire } from 'node:module'; const require = __modernCreateEffectRequire(${JSON.stringify(pathToFileURL(resourcePath).href)});`
227
- },
228
- bundle: true,
229
- entryPoints: [
230
- resourcePath
231
- ],
232
- format: 'esm',
233
- jsx: 'automatic',
234
- logLevel: 'silent',
235
- metafile: true,
236
- outfile: outputPath,
237
- platform: 'node',
238
- plugins: [
239
- externalizeInstalledDependencies({
240
- format: 'esm',
241
- runtimeResolveDir: appDir
242
- }),
243
- preserveSourceModuleSemantics()
244
- ],
245
- sourcemap: 'inline',
246
- target: 'node20',
247
- tsconfig: node_fs.existsSync(tsconfigPath) ? tsconfigPath : void 0
248
- });
249
- for (const input of Object.keys(result.metafile.inputs)){
250
- const dependency = node_path.isAbsolute(input) ? node_path.normalize(input) : node_path.resolve(appDir, input);
251
- if (isWatchableInput(dependency)) options.onDependency?.(dependency);
252
- }
253
- const output = await node_fs.promises.readFile(outputPath);
254
- const revision = node_crypto.createHash('sha256').update(output).digest('hex');
255
- return normalizeImportedModule(await dynamicImport(`${pathToFileURL(outputPath).href}?v=${revision}`));
256
- }
257
- export { bundleEffectEntryForNode, loadEffectBuiltModule, loadEffectSourceModule };
@@ -1,9 +0,0 @@
1
- import "node:module";
2
- function toHeaderRecord(headers) {
3
- const record = {};
4
- headers.forEach((value, key)=>{
5
- record[key] = value;
6
- });
7
- return record;
8
- }
9
- export { toHeaderRecord };
@@ -1,8 +0,0 @@
1
- import type { DataBatchTransportOptions, DataTransportRequestInfo } from '../types';
2
- type DataBatchFetch = NonNullable<DataBatchTransportOptions['fetch']>;
3
- type CreateBatchTransportQueueOptions = {
4
- options: DataBatchTransportOptions;
5
- baseFetch: DataBatchFetch;
6
- };
7
- export declare function createBatchTransportQueue({ options, baseFetch, }: CreateBatchTransportQueueOptions): (input: DataTransportRequestInfo, init?: RequestInit) => Promise<any>;
8
- export {};
@@ -1,13 +0,0 @@
1
- export declare function toHeaderRecord(headers: HeadersInit | undefined): Record<string, string>;
2
- export declare function measureTextBytes(value: string): number;
3
- export declare function createBatchId(): string;
4
- export declare function normalizeMethod(method: string | undefined): string;
5
- export declare function toRequestBody(initBody: BodyInit | null | undefined): string | undefined;
6
- export declare function shouldBatchRequest(input: {
7
- method: string;
8
- body: string | undefined;
9
- headers: Record<string, string>;
10
- allowedMethods: Set<string>;
11
- batchEndpoint: string;
12
- requestUrl: URL;
13
- }): boolean;
@@ -1,3 +0,0 @@
1
- import type { DataBatchResponsePayload } from '../types';
2
- export declare function isBatchResponsePayload(value: unknown): value is DataBatchResponsePayload;
3
- export declare function parseResponseLikeCreateRequest(response: Response): Promise<any>;
@@ -1,4 +0,0 @@
1
- import type { DataBatchTransportEvent, DataBatchTransportTelemetryAttributes } from '../types';
2
- export declare const DATA_BATCH_TRANSPORT_OTEL_EVENT = "modernjs.data.batch";
3
- export declare function createDataBatchTransportTelemetryAttributes(event: DataBatchTransportEvent): DataBatchTransportTelemetryAttributes;
4
- export declare function emitDataBatchTransportEvent(onEvent: ((event: DataBatchTransportEvent) => void) | undefined, event: DataBatchTransportEvent): void;
@@ -1,4 +0,0 @@
1
- import type { DataTransportRequestInfo } from '../types';
2
- export declare function resolveRuntimeOrigin(): string;
3
- export declare function toAbsoluteUrl(input: DataTransportRequestInfo): URL;
4
- export declare function normalizeBatchEndpoint(requestUrl: URL, endpoint: string | undefined): URL;
@@ -1,3 +0,0 @@
1
- import type { DataBatchTransportOptions } from './types';
2
- export { createDataBatchTransportTelemetryAttributes, DATA_BATCH_TRANSPORT_OTEL_EVENT, emitDataBatchTransportEvent, } from './batch/telemetry';
3
- export declare function createDataBatchTransport(options?: DataBatchTransportOptions): (input: import("./types").DataTransportRequestInfo, init?: RequestInit) => Promise<any>;
@@ -1,17 +0,0 @@
1
- import type { CacheScope, DataRequestMode, OperationDescriptor, RequestEnvelope, SelectionPlan } from './types';
2
- export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
3
- export declare function stableStringify(value: unknown): string;
4
- export declare function encodeRequestEnvelopeHeader(envelope: RequestEnvelope): string;
5
- export declare function decodeRequestEnvelopeHeader(value: string): RequestEnvelope | null;
6
- export declare function hashString(value: string): string;
7
- export declare function sanitizeSegment(segment: string): string;
8
- export declare function normalizeOrigin(origin: string): string;
9
- export declare function createOperationId(input: OperationDescriptor): string;
10
- export declare function buildScopeKey(scope: CacheScope): string;
11
- export declare function buildQueryKey(input: {
12
- operationId: string;
13
- scopeKey: string;
14
- requestMode?: DataRequestMode;
15
- requestInput?: unknown;
16
- selectionPlan?: SelectionPlan;
17
- }): string;
@@ -1,8 +0,0 @@
1
- import type { CacheScope, InvalidationEvent, InvalidationSubscriber, OperationDescriptor } from './types';
2
- export declare function createInvalidationEvent(input: {
3
- sourceOperation: OperationDescriptor;
4
- sourceScope: CacheScope;
5
- targetNamespaces?: string[];
6
- targetOperations?: OperationDescriptor[];
7
- }): InvalidationEvent;
8
- export declare function shouldApplyInvalidation(event: InvalidationEvent, subscriber: InvalidationSubscriber): boolean;
@@ -1,4 +0,0 @@
1
- import type { TraceContext } from './types';
2
- export declare function parseTraceparentHeader(header: string): TraceContext | null;
3
- export declare function formatTraceparentHeader(trace: TraceContext): string;
4
- export declare function deriveChildTraceContext(parent: TraceContext, childSpanId: string): TraceContext;
@@ -1,146 +0,0 @@
1
- /**
2
- * Data-platform envelope (`x-modernjs-data-envelope`): the TRANSPORT/CACHE
3
- * contract of the effect lane — protocol versioning, cache scope keys,
4
- * selection plans, batching and hydration checksums.
5
- *
6
- * Boundary note (one envelope system per concern): cross-project
7
- * AUTHORIZATION is the bff-core policy's job (`x-modernjs-bff-envelope` +
8
- * operation contracts, evaluated server-side in both the hono and effect
9
- * lanes). Nothing in this module is a trust boundary; treat every value
10
- * here as client-asserted cache metadata.
11
- */
12
- export type DataRequestMode = 'cache-first' | 'stale-while-revalidate' | 'network-only';
13
- export type DataMutationMode = 'optimistic' | 'pessimistic' | 'fire-and-forget';
14
- export type SelectionPlan = {
15
- [field: string]: true | SelectionPlan;
16
- };
17
- export interface OperationDescriptor {
18
- appNamespace: string;
19
- apiId: string;
20
- group: string;
21
- endpoint: string;
22
- schemaHash?: string;
23
- version?: number;
24
- }
25
- export interface CacheScope {
26
- appNamespace: string;
27
- origin: string;
28
- tenantId?: string;
29
- userId?: string;
30
- sessionId?: string;
31
- }
32
- export interface TraceContext {
33
- traceId: string;
34
- spanId: string;
35
- sampled: boolean;
36
- parentSpanId?: string;
37
- }
38
- export interface RequestEnvelope<Input = unknown> {
39
- protocolVersion: 1;
40
- operationId: string;
41
- appNamespace: string;
42
- origin: string;
43
- requestMode: DataRequestMode;
44
- mutationMode?: DataMutationMode;
45
- scopeKey: string;
46
- input: Input;
47
- inputHash: string;
48
- selectionPlan?: SelectionPlan;
49
- selectionHash?: string;
50
- traceparent?: string;
51
- timestamp: number;
52
- }
53
- export interface HydrationEnvelope<Payload = unknown> {
54
- protocolVersion: 1;
55
- runtimeVersion: string;
56
- appNamespace: string;
57
- origin: string;
58
- createdAt: number;
59
- payload: Payload;
60
- checksum: string;
61
- }
62
- export interface InvalidationEvent {
63
- sourceNamespace: string;
64
- sourceOperationId: string;
65
- scopeKey: string;
66
- targetNamespaces?: string[];
67
- targetOperationIds?: string[];
68
- }
69
- export interface InvalidationSubscriber {
70
- namespace: string;
71
- operationIds?: string[];
72
- scopeKey?: string;
73
- acceptCrossNamespace?: boolean;
74
- }
75
- export interface DataBatchRequestItem {
76
- id: string;
77
- path: string;
78
- method: string;
79
- headers?: Record<string, string>;
80
- body?: string;
81
- }
82
- export interface DataBatchRequestPayload {
83
- protocolVersion: 1;
84
- batchId: string;
85
- sentAt: number;
86
- items: DataBatchRequestItem[];
87
- }
88
- export interface DataBatchResponseItem {
89
- id: string;
90
- status: number;
91
- headers?: Record<string, string>;
92
- body?: string;
93
- }
94
- export interface DataBatchResponsePayload {
95
- protocolVersion: 1;
96
- batchId: string;
97
- receivedAt: number;
98
- items: DataBatchResponseItem[];
99
- }
100
- export interface DataBatchTransportEvent {
101
- type: 'enqueue' | 'flush' | 'fallback' | 'disable';
102
- endpoint: string;
103
- batchId?: string;
104
- size?: number;
105
- reason?: string;
106
- }
107
- export type DataBatchTransportTelemetryAttributes = Record<string, string | number | boolean>;
108
- export interface DataBatchTransportOptions {
109
- endpoint?: string;
110
- fetch?: (input: DataTransportRequestInfo, init?: RequestInit) => Promise<Response>;
111
- flushIntervalMs?: number;
112
- maxBatchSize?: number;
113
- maxBatchBytes?: number;
114
- requestTimeoutMs?: number;
115
- allowedMethods?: string[];
116
- onEvent?: (event: DataBatchTransportEvent) => void;
117
- }
118
- export interface SelectionPlanValidationOptions {
119
- maxDepth?: number;
120
- maxFields?: number;
121
- allowedLeafPaths?: ReadonlyArray<string>;
122
- }
123
- export interface SelectionPlanValidationResult {
124
- ok: boolean;
125
- errors: string[];
126
- stats: {
127
- maxDepth: number;
128
- fieldCount: number;
129
- };
130
- }
131
- export interface RequestEnvelopeValidationOptions {
132
- expectedProtocolVersion?: number;
133
- expectedNamespace?: string;
134
- expectedOrigin?: string;
135
- requireTraceContext?: boolean;
136
- }
137
- export interface HydrationEnvelopeValidationOptions {
138
- expectedProtocolVersion?: number;
139
- expectedNamespace?: string;
140
- expectedOrigin?: string;
141
- expectedRuntimeVersion?: string;
142
- }
143
- export declare const DEFAULT_DATA_ENVELOPE_HEADER = "x-modernjs-data-envelope";
144
- export declare const DEFAULT_DATA_BATCH_ENDPOINT = "/_data/batch";
145
- export declare const DEFAULT_DATA_BATCH_HEADER = "x-modernjs-data-batch";
146
- export type DataTransportRequestInfo = string | URL | Request;
@@ -1,29 +0,0 @@
1
- import type { CacheScope, DataMutationMode, DataRequestMode, HydrationEnvelope, HydrationEnvelopeValidationOptions, OperationDescriptor, RequestEnvelope, RequestEnvelopeValidationOptions, SelectionPlan, SelectionPlanValidationOptions, SelectionPlanValidationResult, TraceContext } from './types';
2
- export declare function validateSelectionPlan(plan: SelectionPlan, options?: SelectionPlanValidationOptions): SelectionPlanValidationResult;
3
- export declare function createRequestEnvelope<Input>(input: {
4
- operation: OperationDescriptor;
5
- scope: CacheScope;
6
- requestInput: Input;
7
- selectionPlan?: SelectionPlan;
8
- requestMode?: DataRequestMode;
9
- mutationMode?: DataMutationMode;
10
- traceContext?: TraceContext;
11
- requireTraceContext?: boolean;
12
- timestamp?: number;
13
- protocolVersion?: 1;
14
- }): RequestEnvelope<Input>;
15
- export declare function validateRequestEnvelope(envelope: RequestEnvelope, options?: RequestEnvelopeValidationOptions): {
16
- ok: boolean;
17
- errors: string[];
18
- };
19
- export declare function createHydrationEnvelope<Payload>(input: {
20
- runtimeVersion: string;
21
- scope: Pick<CacheScope, 'appNamespace' | 'origin'>;
22
- payload: Payload;
23
- createdAt?: number;
24
- protocolVersion?: 1;
25
- }): HydrationEnvelope<Payload>;
26
- export declare function validateHydrationEnvelope(envelope: HydrationEnvelope, options?: HydrationEnvelopeValidationOptions): {
27
- ok: boolean;
28
- errors: string[];
29
- };
@@ -1 +0,0 @@
1
- export declare const before: string[];
@@ -1,4 +0,0 @@
1
- import type { ServerPluginAPI } from '@modern-js/server-core';
2
- import { type ResolvedCrossProjectPolicy } from '../../../utils/crossProjectServerPolicy';
3
- import type { EffectApiModule } from '../module';
4
- export declare function resolveEffectAdapterCrossProjectPolicy(api: ServerPluginAPI, prefix: string, mod: EffectApiModule | null): Promise<ResolvedCrossProjectPolicy | undefined>;
@@ -1,2 +0,0 @@
1
- import type { ServerPluginAPI } from '@modern-js/server-core';
2
- export declare function resolveEffectAdapterEntryFile(api: ServerPluginAPI): string | undefined;
@@ -1,2 +0,0 @@
1
- import type { Context, ServerPluginAPI } from '@modern-js/server-core';
2
- export declare function createEffectAdapterRuntimeErrorResponse(api: ServerPluginAPI, error: unknown, c: Context): Promise<Response>;
@@ -1,7 +0,0 @@
1
- import type { ServerPluginAPI } from '@modern-js/server-core';
2
- import { type ResolvedCrossProjectPolicy } from '../../../utils/crossProjectServerPolicy';
3
- import { type EffectApiModule } from '../module';
4
- export declare function loadEffectAdapterHandlerFromModule(api: ServerPluginAPI, mod: EffectApiModule, crossProjectPolicy: ResolvedCrossProjectPolicy | undefined): Promise<{
5
- handler: import("../module").EffectBffRequestHandler;
6
- dispose?: () => Promise<void>;
7
- } | null>;
@@ -1,22 +0,0 @@
1
- import type { ServerMiddleware, ServerPluginAPI } from '@modern-js/server-core';
2
- import type { ResolvedCrossProjectPolicy } from '../../utils/crossProjectServerPolicy';
3
- interface MiddlewareOptions {
4
- prefix: string;
5
- enableHandleWeb?: boolean;
6
- }
7
- export declare class EffectAdapter {
8
- private api;
9
- isEffect: boolean;
10
- effectMiddleware?: ServerMiddleware;
11
- crossProjectPolicy?: ResolvedCrossProjectPolicy;
12
- private handler;
13
- private dispose;
14
- private prefix;
15
- constructor(api: ServerPluginAPI);
16
- registerMiddleware: (options: MiddlewareOptions) => Promise<void>;
17
- onApiHandlersUpdated: () => Promise<void>;
18
- private resolveEntryFile;
19
- private reloadHandler;
20
- private disposeCurrentHandler;
21
- }
22
- export {};
@@ -1,2 +0,0 @@
1
- import type { BackendFederationRemote, BackendFederationRuntimeOptions } from './types';
2
- export declare function loadBackendFederationExpose(remote: BackendFederationRemote, expose: string, options: BackendFederationRuntimeOptions): Promise<unknown>;
@@ -1,30 +0,0 @@
1
- /**
2
- * Mandatory delivery-unit identity for public backend federation loads
3
- * (MV-G23, ADR-0019 / RESOLUTION-0001 §2.3): consumers pass the record's
4
- * `unitId` + `buildMarker` through to identity validation.
5
- */
6
- export type BackendFederationExpectedIdentity = {
7
- unitId: string;
8
- buildMarker: string;
9
- };
10
- export type BackendFederationIdentityIssue = {
11
- path: string;
12
- message: string;
13
- };
14
- /**
15
- * Shared expected-identity validation for loaded backend federation modules.
16
- * Compares the expose's `backendFederationContract.compatibility` identity
17
- * (`unitId`, `build`) against the consumer's expected delivery-unit identity.
18
- * Missing identity metadata is an error: with an expectation present there is
19
- * no legacy escape hatch.
20
- */
21
- export declare function validateExpectedBackendFederationIdentity(loaded: unknown, expected: BackendFederationExpectedIdentity, options?: {
22
- /**
23
- * Tolerate exposes that declare no identity metadata (legacy modules).
24
- * Mismatching declared values still fail. Used by the manifest adapter,
25
- * whose manifest-side identity is already validated against `expected`;
26
- * the raw identity-aware loader is strict.
27
- */
28
- allowMissingIdentityMetadata?: boolean;
29
- }): BackendFederationIdentityIssue[];
30
- export declare function formatBackendFederationIdentityIssues(issues: BackendFederationIdentityIssue[]): string;
@@ -1,13 +0,0 @@
1
- import type { BackendFederatedEffectApiModule, BackendFederationIdentityLoadOptions, BackendFederationLoadOptions } from './types';
2
- /**
3
- * Load a federated Effect API with mandatory delivery-unit identity
4
- * validation (MV-G23): the loaded expose's compatibility metadata must match
5
- * `expected.unitId` + `expected.buildMarker`.
6
- */
7
- export declare function loadBackendFederatedEffectApi(options: BackendFederationIdentityLoadOptions): Promise<BackendFederatedEffectApiModule>;
8
- /**
9
- * @deprecated Pass `expected` (delivery-unit `unitId` + `buildMarker`).
10
- * Loads without an expected identity cannot be validated against a resolved
11
- * delivery-unit record and emit a runtime warning.
12
- */
13
- export declare function loadBackendFederatedEffectApi(options: BackendFederationLoadOptions): Promise<BackendFederatedEffectApiModule>;
@@ -1,3 +0,0 @@
1
- import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
2
- import type { BackendFederationLoadEntryPluginOptions } from './types';
3
- export declare function createBackendFederationLoadEntryPlugin(options: BackendFederationLoadEntryPluginOptions): ModuleFederationRuntimePlugin;
@@ -1,2 +0,0 @@
1
- import type { BackendFederationRuntimeOptions } from './types';
2
- export declare function collectRemotes(options: BackendFederationRuntimeOptions): import("./types").BackendFederationRemote[];
@@ -1,3 +0,0 @@
1
- import { ModuleFederation } from '@module-federation/runtime';
2
- import type { BackendFederationRuntimeOptions } from './types';
3
- export declare function createBackendFederationRuntime(options: BackendFederationRuntimeOptions): ModuleFederation;