@bleedingdev/modern-js-plugin-bff 3.8.2-ultramodern.9 → 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 (348) 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 +11 -8
  14. package/dist/cjs/utils/client-generator/index.js +0 -3
  15. package/dist/cjs/utils/client-generator/type-facade.js +16 -10
  16. package/dist/cjs/utils/crossProjectApiPlugin.js +5 -1
  17. package/dist/cjs/utils/pluginGenerator.js +4 -4
  18. package/dist/cjs/utils/runtimeGenerator.js +4 -16
  19. package/dist/esm/cli/generator.mjs +45 -53
  20. package/dist/esm/cli/serverGlobalVars.mjs +1 -1
  21. package/dist/esm/cli.mjs +1 -0
  22. package/dist/esm/loader.mjs +5 -16
  23. package/dist/esm/runtime/data-platform/index.mjs +1 -7
  24. package/dist/esm/runtime/effect/edge-dispatcher.mjs +1 -38
  25. package/dist/esm/runtime/effect/edge.mjs +2 -2
  26. package/dist/esm/runtime/effect/index.mjs +16 -8
  27. package/dist/esm/runtime/effect-client/index.mjs +1 -98
  28. package/dist/esm/runtime/effect-client/runtime.mjs +1 -62
  29. package/dist/esm/runtime/hono/adapter.mjs +13 -54
  30. package/dist/esm/server.mjs +2 -2
  31. package/dist/esm/utils/client-generator/generate.mjs +11 -8
  32. package/dist/esm/utils/client-generator/index.mjs +1 -1
  33. package/dist/esm/utils/client-generator/type-facade.mjs +9 -6
  34. package/dist/esm/utils/crossProjectApiPlugin.mjs +3 -2
  35. package/dist/esm/utils/pluginGenerator.mjs +5 -5
  36. package/dist/esm/utils/runtimeGenerator.mjs +4 -16
  37. package/dist/esm-node/cli/generator.mjs +45 -53
  38. package/dist/esm-node/cli/serverGlobalVars.mjs +1 -1
  39. package/dist/esm-node/cli.mjs +1 -0
  40. package/dist/esm-node/loader.mjs +5 -16
  41. package/dist/esm-node/runtime/data-platform/index.mjs +1 -7
  42. package/dist/esm-node/runtime/effect/edge-dispatcher.mjs +1 -38
  43. package/dist/esm-node/runtime/effect/edge.mjs +2 -2
  44. package/dist/esm-node/runtime/effect/index.mjs +16 -8
  45. package/dist/esm-node/runtime/effect-client/index.mjs +1 -98
  46. package/dist/esm-node/runtime/effect-client/runtime.mjs +1 -62
  47. package/dist/esm-node/runtime/hono/adapter.mjs +13 -54
  48. package/dist/esm-node/server.mjs +2 -2
  49. package/dist/esm-node/utils/client-generator/generate.mjs +11 -8
  50. package/dist/esm-node/utils/client-generator/index.mjs +1 -1
  51. package/dist/esm-node/utils/client-generator/type-facade.mjs +9 -6
  52. package/dist/esm-node/utils/crossProjectApiPlugin.mjs +3 -2
  53. package/dist/esm-node/utils/pluginGenerator.mjs +5 -5
  54. package/dist/esm-node/utils/runtimeGenerator.mjs +4 -16
  55. package/dist/types/loader.d.ts +1 -0
  56. package/dist/types/runtime/data-platform/index.d.ts +1 -8
  57. package/dist/types/runtime/effect/edge-dispatcher.d.ts +1 -26
  58. package/dist/types/runtime/effect/edge.d.ts +2 -2
  59. package/dist/types/runtime/effect/index.d.ts +15 -7
  60. package/dist/types/runtime/effect-client/index.d.ts +1 -58
  61. package/dist/types/runtime/effect-client/runtime.d.ts +1 -5
  62. package/dist/types/runtime/hono/adapter.d.ts +1 -11
  63. package/dist/types/utils/client-generator/generate.d.ts +2 -1
  64. package/dist/types/utils/client-generator/index.d.ts +1 -1
  65. package/dist/types/utils/client-generator/type-facade.d.ts +2 -12
  66. package/dist/types/utils/crossProjectApiPlugin.d.ts +1 -0
  67. package/dist/types/utils/pluginGenerator.d.ts +2 -1
  68. package/package.json +34 -33
  69. package/dist/cjs/runtime/data-platform/batch/queue.js +0 -284
  70. package/dist/cjs/runtime/data-platform/batch/request.js +0 -98
  71. package/dist/cjs/runtime/data-platform/batch/response.js +0 -64
  72. package/dist/cjs/runtime/data-platform/batch/telemetry.js +0 -67
  73. package/dist/cjs/runtime/data-platform/batch/url.js +0 -69
  74. package/dist/cjs/runtime/data-platform/batch-transport.js +0 -59
  75. package/dist/cjs/runtime/data-platform/codec.js +0 -155
  76. package/dist/cjs/runtime/data-platform/invalidation.js +0 -61
  77. package/dist/cjs/runtime/data-platform/trace.js +0 -73
  78. package/dist/cjs/runtime/data-platform/types.js +0 -48
  79. package/dist/cjs/runtime/data-platform/validation.js +0 -178
  80. package/dist/cjs/runtime/effect/adapter/constants.js +0 -44
  81. package/dist/cjs/runtime/effect/adapter/cross-project-policy.js +0 -66
  82. package/dist/cjs/runtime/effect/adapter/entry.js +0 -100
  83. package/dist/cjs/runtime/effect/adapter/error-response.js +0 -81
  84. package/dist/cjs/runtime/effect/adapter/handler.js +0 -53
  85. package/dist/cjs/runtime/effect/adapter.js +0 -155
  86. package/dist/cjs/runtime/effect/backend-federation/entry.js +0 -99
  87. package/dist/cjs/runtime/effect/backend-federation/identity.js +0 -82
  88. package/dist/cjs/runtime/effect/backend-federation/load.js +0 -75
  89. package/dist/cjs/runtime/effect/backend-federation/plugin.js +0 -63
  90. package/dist/cjs/runtime/effect/backend-federation/remotes.js +0 -51
  91. package/dist/cjs/runtime/effect/backend-federation/runtime.js +0 -128
  92. package/dist/cjs/runtime/effect/backend-federation/types.js +0 -18
  93. package/dist/cjs/runtime/effect/backend-federation/utils.js +0 -48
  94. package/dist/cjs/runtime/effect/backend-federation-manifest/errors.js +0 -83
  95. package/dist/cjs/runtime/effect/backend-federation-manifest/index.js +0 -55
  96. package/dist/cjs/runtime/effect/backend-federation-manifest/load.js +0 -94
  97. package/dist/cjs/runtime/effect/backend-federation-manifest/metadata.js +0 -101
  98. package/dist/cjs/runtime/effect/backend-federation-manifest/reference.js +0 -120
  99. package/dist/cjs/runtime/effect/backend-federation-manifest/remote.js +0 -68
  100. package/dist/cjs/runtime/effect/backend-federation-manifest/types.js +0 -18
  101. package/dist/cjs/runtime/effect/backend-federation-manifest/validation.js +0 -109
  102. package/dist/cjs/runtime/effect/backend-federation-manifest.js +0 -62
  103. package/dist/cjs/runtime/effect/backend-federation.js +0 -65
  104. package/dist/cjs/runtime/effect/context.js +0 -60
  105. package/dist/cjs/runtime/effect/dispatch.js +0 -101
  106. package/dist/cjs/runtime/effect/edge-context.js +0 -81
  107. package/dist/cjs/runtime/effect/endpoint-contracts.js +0 -121
  108. package/dist/cjs/runtime/effect/entry-shape.js +0 -84
  109. package/dist/cjs/runtime/effect/handler/batch-handler.js +0 -161
  110. package/dist/cjs/runtime/effect/handler/batch.js +0 -159
  111. package/dist/cjs/runtime/effect/handler/definition.js +0 -102
  112. package/dist/cjs/runtime/effect/handler/envelope.js +0 -104
  113. package/dist/cjs/runtime/effect/handler/http.js +0 -107
  114. package/dist/cjs/runtime/effect/handler/openapi.js +0 -57
  115. package/dist/cjs/runtime/effect/handler/routing.js +0 -100
  116. package/dist/cjs/runtime/effect/handler/rpc.js +0 -63
  117. package/dist/cjs/runtime/effect/handler/types.js +0 -43
  118. package/dist/cjs/runtime/effect/handler.js +0 -189
  119. package/dist/cjs/runtime/effect/module.js +0 -113
  120. package/dist/cjs/runtime/effect/operation-context.js +0 -103
  121. package/dist/cjs/runtime/effect/rpcSerialization.js +0 -54
  122. package/dist/cjs/runtime/effect-client/batch.js +0 -73
  123. package/dist/cjs/runtime/effect-client/envelope.js +0 -145
  124. package/dist/cjs/runtime/effect-client/guards.js +0 -44
  125. package/dist/cjs/runtime/effect-client/request-context.js +0 -64
  126. package/dist/cjs/runtime/effect-client/request.js +0 -66
  127. package/dist/cjs/runtime/effect-client/types.js +0 -18
  128. package/dist/cjs/runtime/safe-failure.js +0 -84
  129. package/dist/cjs/utils/crossProjectServerPolicy.js +0 -98
  130. package/dist/cjs/utils/effect-client-generator/generator.js +0 -69
  131. package/dist/cjs/utils/effect-client-generator/index.js +0 -51
  132. package/dist/cjs/utils/effect-client-generator/paths.js +0 -62
  133. package/dist/cjs/utils/effect-client-generator/rendering.js +0 -220
  134. package/dist/cjs/utils/effect-client-generator/runtime.js +0 -68
  135. package/dist/cjs/utils/effect-client-generator/types.js +0 -18
  136. package/dist/cjs/utils/effectClientGenerator.js +0 -49
  137. package/dist/cjs/utils/effectSourceLoader.js +0 -312
  138. package/dist/cjs/utils/headers.js +0 -46
  139. package/dist/esm/runtime/data-platform/batch/queue.mjs +0 -246
  140. package/dist/esm/runtime/data-platform/batch/request.mjs +0 -45
  141. package/dist/esm/runtime/data-platform/batch/response.mjs +0 -23
  142. package/dist/esm/runtime/data-platform/batch/telemetry.mjs +0 -23
  143. package/dist/esm/runtime/data-platform/batch/url.mjs +0 -25
  144. package/dist/esm/runtime/data-platform/batch-transport.mjs +0 -12
  145. package/dist/esm/runtime/data-platform/codec.mjs +0 -90
  146. package/dist/esm/runtime/data-platform/invalidation.mjs +0 -20
  147. package/dist/esm/runtime/data-platform/trace.mjs +0 -29
  148. package/dist/esm/runtime/data-platform/types.mjs +0 -4
  149. package/dist/esm/runtime/data-platform/validation.mjs +0 -128
  150. package/dist/esm/runtime/effect/adapter/constants.mjs +0 -6
  151. package/dist/esm/runtime/effect/adapter/cross-project-policy.mjs +0 -28
  152. package/dist/esm/runtime/effect/adapter/entry.mjs +0 -52
  153. package/dist/esm/runtime/effect/adapter/error-response.mjs +0 -43
  154. package/dist/esm/runtime/effect/adapter/handler.mjs +0 -15
  155. package/dist/esm/runtime/effect/adapter.mjs +0 -107
  156. package/dist/esm/runtime/effect/backend-federation/entry.mjs +0 -61
  157. package/dist/esm/runtime/effect/backend-federation/identity.mjs +0 -41
  158. package/dist/esm/runtime/effect/backend-federation/load.mjs +0 -37
  159. package/dist/esm/runtime/effect/backend-federation/plugin.mjs +0 -25
  160. package/dist/esm/runtime/effect/backend-federation/remotes.mjs +0 -13
  161. package/dist/esm/runtime/effect/backend-federation/runtime.mjs +0 -90
  162. package/dist/esm/runtime/effect/backend-federation/types.mjs +0 -0
  163. package/dist/esm/runtime/effect/backend-federation/utils.mjs +0 -7
  164. package/dist/esm/runtime/effect/backend-federation-manifest/errors.mjs +0 -32
  165. package/dist/esm/runtime/effect/backend-federation-manifest/index.mjs +0 -4
  166. package/dist/esm/runtime/effect/backend-federation-manifest/load.mjs +0 -56
  167. package/dist/esm/runtime/effect/backend-federation-manifest/metadata.mjs +0 -42
  168. package/dist/esm/runtime/effect/backend-federation-manifest/reference.mjs +0 -76
  169. package/dist/esm/runtime/effect/backend-federation-manifest/remote.mjs +0 -30
  170. package/dist/esm/runtime/effect/backend-federation-manifest/types.mjs +0 -0
  171. package/dist/esm/runtime/effect/backend-federation-manifest/validation.mjs +0 -65
  172. package/dist/esm/runtime/effect/backend-federation-manifest.mjs +0 -1
  173. package/dist/esm/runtime/effect/backend-federation.mjs +0 -5
  174. package/dist/esm/runtime/effect/context.mjs +0 -13
  175. package/dist/esm/runtime/effect/dispatch.mjs +0 -63
  176. package/dist/esm/runtime/effect/edge-context.mjs +0 -34
  177. package/dist/esm/runtime/effect/endpoint-contracts.mjs +0 -68
  178. package/dist/esm/runtime/effect/entry-shape.mjs +0 -36
  179. package/dist/esm/runtime/effect/handler/batch-handler.mjs +0 -123
  180. package/dist/esm/runtime/effect/handler/batch.mjs +0 -97
  181. package/dist/esm/runtime/effect/handler/definition.mjs +0 -61
  182. package/dist/esm/runtime/effect/handler/envelope.mjs +0 -63
  183. package/dist/esm/runtime/effect/handler/http.mjs +0 -69
  184. package/dist/esm/runtime/effect/handler/openapi.mjs +0 -19
  185. package/dist/esm/runtime/effect/handler/routing.mjs +0 -50
  186. package/dist/esm/runtime/effect/handler/rpc.mjs +0 -22
  187. package/dist/esm/runtime/effect/handler/types.mjs +0 -5
  188. package/dist/esm/runtime/effect/handler.mjs +0 -14
  189. package/dist/esm/runtime/effect/module.mjs +0 -75
  190. package/dist/esm/runtime/effect/operation-context.mjs +0 -65
  191. package/dist/esm/runtime/effect/rpcSerialization.mjs +0 -16
  192. package/dist/esm/runtime/effect-client/batch.mjs +0 -35
  193. package/dist/esm/runtime/effect-client/envelope.mjs +0 -104
  194. package/dist/esm/runtime/effect-client/guards.mjs +0 -3
  195. package/dist/esm/runtime/effect-client/request-context.mjs +0 -23
  196. package/dist/esm/runtime/effect-client/request.mjs +0 -28
  197. package/dist/esm/runtime/effect-client/types.mjs +0 -0
  198. package/dist/esm/runtime/safe-failure.mjs +0 -46
  199. package/dist/esm/utils/crossProjectServerPolicy.mjs +0 -44
  200. package/dist/esm/utils/effect-client-generator/generator.mjs +0 -28
  201. package/dist/esm/utils/effect-client-generator/index.mjs +0 -3
  202. package/dist/esm/utils/effect-client-generator/paths.mjs +0 -24
  203. package/dist/esm/utils/effect-client-generator/rendering.mjs +0 -179
  204. package/dist/esm/utils/effect-client-generator/runtime.mjs +0 -27
  205. package/dist/esm/utils/effect-client-generator/types.mjs +0 -0
  206. package/dist/esm/utils/effectClientGenerator.mjs +0 -1
  207. package/dist/esm/utils/effectSourceLoader.mjs +0 -256
  208. package/dist/esm/utils/headers.mjs +0 -8
  209. package/dist/esm-node/runtime/data-platform/batch/queue.mjs +0 -247
  210. package/dist/esm-node/runtime/data-platform/batch/request.mjs +0 -46
  211. package/dist/esm-node/runtime/data-platform/batch/response.mjs +0 -24
  212. package/dist/esm-node/runtime/data-platform/batch/telemetry.mjs +0 -24
  213. package/dist/esm-node/runtime/data-platform/batch/url.mjs +0 -26
  214. package/dist/esm-node/runtime/data-platform/batch-transport.mjs +0 -13
  215. package/dist/esm-node/runtime/data-platform/codec.mjs +0 -91
  216. package/dist/esm-node/runtime/data-platform/invalidation.mjs +0 -21
  217. package/dist/esm-node/runtime/data-platform/trace.mjs +0 -30
  218. package/dist/esm-node/runtime/data-platform/types.mjs +0 -5
  219. package/dist/esm-node/runtime/data-platform/validation.mjs +0 -129
  220. package/dist/esm-node/runtime/effect/adapter/constants.mjs +0 -7
  221. package/dist/esm-node/runtime/effect/adapter/cross-project-policy.mjs +0 -29
  222. package/dist/esm-node/runtime/effect/adapter/entry.mjs +0 -53
  223. package/dist/esm-node/runtime/effect/adapter/error-response.mjs +0 -44
  224. package/dist/esm-node/runtime/effect/adapter/handler.mjs +0 -16
  225. package/dist/esm-node/runtime/effect/adapter.mjs +0 -108
  226. package/dist/esm-node/runtime/effect/backend-federation/entry.mjs +0 -62
  227. package/dist/esm-node/runtime/effect/backend-federation/identity.mjs +0 -42
  228. package/dist/esm-node/runtime/effect/backend-federation/load.mjs +0 -38
  229. package/dist/esm-node/runtime/effect/backend-federation/plugin.mjs +0 -26
  230. package/dist/esm-node/runtime/effect/backend-federation/remotes.mjs +0 -14
  231. package/dist/esm-node/runtime/effect/backend-federation/runtime.mjs +0 -91
  232. package/dist/esm-node/runtime/effect/backend-federation/types.mjs +0 -1
  233. package/dist/esm-node/runtime/effect/backend-federation/utils.mjs +0 -8
  234. package/dist/esm-node/runtime/effect/backend-federation-manifest/errors.mjs +0 -33
  235. package/dist/esm-node/runtime/effect/backend-federation-manifest/index.mjs +0 -5
  236. package/dist/esm-node/runtime/effect/backend-federation-manifest/load.mjs +0 -57
  237. package/dist/esm-node/runtime/effect/backend-federation-manifest/metadata.mjs +0 -43
  238. package/dist/esm-node/runtime/effect/backend-federation-manifest/reference.mjs +0 -77
  239. package/dist/esm-node/runtime/effect/backend-federation-manifest/remote.mjs +0 -31
  240. package/dist/esm-node/runtime/effect/backend-federation-manifest/types.mjs +0 -1
  241. package/dist/esm-node/runtime/effect/backend-federation-manifest/validation.mjs +0 -66
  242. package/dist/esm-node/runtime/effect/backend-federation-manifest.mjs +0 -2
  243. package/dist/esm-node/runtime/effect/backend-federation.mjs +0 -6
  244. package/dist/esm-node/runtime/effect/context.mjs +0 -14
  245. package/dist/esm-node/runtime/effect/dispatch.mjs +0 -64
  246. package/dist/esm-node/runtime/effect/edge-context.mjs +0 -35
  247. package/dist/esm-node/runtime/effect/endpoint-contracts.mjs +0 -69
  248. package/dist/esm-node/runtime/effect/entry-shape.mjs +0 -37
  249. package/dist/esm-node/runtime/effect/handler/batch-handler.mjs +0 -124
  250. package/dist/esm-node/runtime/effect/handler/batch.mjs +0 -98
  251. package/dist/esm-node/runtime/effect/handler/definition.mjs +0 -62
  252. package/dist/esm-node/runtime/effect/handler/envelope.mjs +0 -64
  253. package/dist/esm-node/runtime/effect/handler/http.mjs +0 -70
  254. package/dist/esm-node/runtime/effect/handler/openapi.mjs +0 -20
  255. package/dist/esm-node/runtime/effect/handler/routing.mjs +0 -51
  256. package/dist/esm-node/runtime/effect/handler/rpc.mjs +0 -23
  257. package/dist/esm-node/runtime/effect/handler/types.mjs +0 -6
  258. package/dist/esm-node/runtime/effect/handler.mjs +0 -15
  259. package/dist/esm-node/runtime/effect/module.mjs +0 -76
  260. package/dist/esm-node/runtime/effect/operation-context.mjs +0 -66
  261. package/dist/esm-node/runtime/effect/rpcSerialization.mjs +0 -17
  262. package/dist/esm-node/runtime/effect-client/batch.mjs +0 -36
  263. package/dist/esm-node/runtime/effect-client/envelope.mjs +0 -105
  264. package/dist/esm-node/runtime/effect-client/guards.mjs +0 -4
  265. package/dist/esm-node/runtime/effect-client/request-context.mjs +0 -24
  266. package/dist/esm-node/runtime/effect-client/request.mjs +0 -29
  267. package/dist/esm-node/runtime/effect-client/types.mjs +0 -1
  268. package/dist/esm-node/runtime/safe-failure.mjs +0 -47
  269. package/dist/esm-node/utils/crossProjectServerPolicy.mjs +0 -46
  270. package/dist/esm-node/utils/effect-client-generator/generator.mjs +0 -29
  271. package/dist/esm-node/utils/effect-client-generator/index.mjs +0 -4
  272. package/dist/esm-node/utils/effect-client-generator/paths.mjs +0 -25
  273. package/dist/esm-node/utils/effect-client-generator/rendering.mjs +0 -180
  274. package/dist/esm-node/utils/effect-client-generator/runtime.mjs +0 -29
  275. package/dist/esm-node/utils/effect-client-generator/types.mjs +0 -1
  276. package/dist/esm-node/utils/effectClientGenerator.mjs +0 -2
  277. package/dist/esm-node/utils/effectSourceLoader.mjs +0 -257
  278. package/dist/esm-node/utils/headers.mjs +0 -9
  279. package/dist/types/runtime/data-platform/batch/queue.d.ts +0 -8
  280. package/dist/types/runtime/data-platform/batch/request.d.ts +0 -13
  281. package/dist/types/runtime/data-platform/batch/response.d.ts +0 -3
  282. package/dist/types/runtime/data-platform/batch/telemetry.d.ts +0 -4
  283. package/dist/types/runtime/data-platform/batch/url.d.ts +0 -4
  284. package/dist/types/runtime/data-platform/batch-transport.d.ts +0 -3
  285. package/dist/types/runtime/data-platform/codec.d.ts +0 -17
  286. package/dist/types/runtime/data-platform/invalidation.d.ts +0 -8
  287. package/dist/types/runtime/data-platform/trace.d.ts +0 -4
  288. package/dist/types/runtime/data-platform/types.d.ts +0 -146
  289. package/dist/types/runtime/data-platform/validation.d.ts +0 -29
  290. package/dist/types/runtime/effect/adapter/constants.d.ts +0 -1
  291. package/dist/types/runtime/effect/adapter/cross-project-policy.d.ts +0 -4
  292. package/dist/types/runtime/effect/adapter/entry.d.ts +0 -2
  293. package/dist/types/runtime/effect/adapter/error-response.d.ts +0 -2
  294. package/dist/types/runtime/effect/adapter/handler.d.ts +0 -7
  295. package/dist/types/runtime/effect/adapter.d.ts +0 -22
  296. package/dist/types/runtime/effect/backend-federation/entry.d.ts +0 -2
  297. package/dist/types/runtime/effect/backend-federation/identity.d.ts +0 -30
  298. package/dist/types/runtime/effect/backend-federation/load.d.ts +0 -13
  299. package/dist/types/runtime/effect/backend-federation/plugin.d.ts +0 -3
  300. package/dist/types/runtime/effect/backend-federation/remotes.d.ts +0 -2
  301. package/dist/types/runtime/effect/backend-federation/runtime.d.ts +0 -3
  302. package/dist/types/runtime/effect/backend-federation/types.d.ts +0 -73
  303. package/dist/types/runtime/effect/backend-federation/utils.d.ts +0 -2
  304. package/dist/types/runtime/effect/backend-federation-manifest/errors.d.ts +0 -11
  305. package/dist/types/runtime/effect/backend-federation-manifest/index.d.ts +0 -6
  306. package/dist/types/runtime/effect/backend-federation-manifest/load.d.ts +0 -3
  307. package/dist/types/runtime/effect/backend-federation-manifest/metadata.d.ts +0 -18
  308. package/dist/types/runtime/effect/backend-federation-manifest/reference.d.ts +0 -4
  309. package/dist/types/runtime/effect/backend-federation-manifest/remote.d.ts +0 -3
  310. package/dist/types/runtime/effect/backend-federation-manifest/types.d.ts +0 -51
  311. package/dist/types/runtime/effect/backend-federation-manifest/validation.d.ts +0 -5
  312. package/dist/types/runtime/effect/backend-federation-manifest.d.ts +0 -1
  313. package/dist/types/runtime/effect/backend-federation.d.ts +0 -7
  314. package/dist/types/runtime/effect/context.d.ts +0 -5
  315. package/dist/types/runtime/effect/dispatch.d.ts +0 -13
  316. package/dist/types/runtime/effect/edge-context.d.ts +0 -5
  317. package/dist/types/runtime/effect/endpoint-contracts.d.ts +0 -66
  318. package/dist/types/runtime/effect/entry-shape.d.ts +0 -31
  319. package/dist/types/runtime/effect/handler/batch-handler.d.ts +0 -11
  320. package/dist/types/runtime/effect/handler/batch.d.ts +0 -13
  321. package/dist/types/runtime/effect/handler/definition.d.ts +0 -7
  322. package/dist/types/runtime/effect/handler/envelope.d.ts +0 -13
  323. package/dist/types/runtime/effect/handler/http.d.ts +0 -15
  324. package/dist/types/runtime/effect/handler/openapi.d.ts +0 -4
  325. package/dist/types/runtime/effect/handler/routing.d.ts +0 -5
  326. package/dist/types/runtime/effect/handler/rpc.d.ts +0 -7
  327. package/dist/types/runtime/effect/handler/types.d.ts +0 -153
  328. package/dist/types/runtime/effect/handler.d.ts +0 -14
  329. package/dist/types/runtime/effect/module.d.ts +0 -36
  330. package/dist/types/runtime/effect/operation-context.d.ts +0 -10
  331. package/dist/types/runtime/effect/rpcSerialization.d.ts +0 -3
  332. package/dist/types/runtime/effect-client/batch.d.ts +0 -2
  333. package/dist/types/runtime/effect-client/envelope.d.ts +0 -15
  334. package/dist/types/runtime/effect-client/guards.d.ts +0 -2
  335. package/dist/types/runtime/effect-client/request-context.d.ts +0 -3
  336. package/dist/types/runtime/effect-client/request.d.ts +0 -1
  337. package/dist/types/runtime/effect-client/types.d.ts +0 -68
  338. package/dist/types/runtime/safe-failure.d.ts +0 -1
  339. package/dist/types/utils/crossProjectServerPolicy.d.ts +0 -36
  340. package/dist/types/utils/effect-client-generator/generator.d.ts +0 -10
  341. package/dist/types/utils/effect-client-generator/index.d.ts +0 -4
  342. package/dist/types/utils/effect-client-generator/paths.d.ts +0 -5
  343. package/dist/types/utils/effect-client-generator/rendering.d.ts +0 -4
  344. package/dist/types/utils/effect-client-generator/runtime.d.ts +0 -12
  345. package/dist/types/utils/effect-client-generator/types.d.ts +0 -27
  346. package/dist/types/utils/effectClientGenerator.d.ts +0 -2
  347. package/dist/types/utils/effectSourceLoader.d.ts +0 -25
  348. package/dist/types/utils/headers.d.ts +0 -1
@@ -1,180 +0,0 @@
1
- import "node:module";
2
- import { deriveOperationVersion } from "@modern-js/bff-core";
3
- import { fs, upath } from "@modern-js/utils";
4
- import { createEffectEndpointContractHash, ensureLeadingSlash, normalizeEffectPrefix } from "../../runtime/effect/endpoint-contracts.mjs";
5
- const DEFAULT_REQUEST_CREATOR = '@modern-js/plugin-bff/client';
6
- const EFFECT_CLIENT_RUNTIME_IMPORT = '@modern-js/plugin-bff/effect-client-runtime';
7
- function isAbsoluteUrl(value) {
8
- try {
9
- new URL(value);
10
- return true;
11
- } catch {
12
- return false;
13
- }
14
- }
15
- function resolveBatchEndpoint(prefix, endpoint) {
16
- const value = void 0 === endpoint || '' === endpoint ? '/_data/batch' : endpoint;
17
- if (isAbsoluteUrl(value)) return value;
18
- const normalizedPrefix = normalizeEffectPrefix(prefix);
19
- const normalizedEndpoint = ensureLeadingSlash(value);
20
- if ('' === normalizedPrefix) return normalizedEndpoint;
21
- if (normalizedEndpoint === normalizedPrefix || normalizedEndpoint.startsWith(`${normalizedPrefix}/`)) return normalizedEndpoint;
22
- return `${normalizedPrefix}${'/' === normalizedEndpoint ? '' : normalizedEndpoint}`;
23
- }
24
- function getPackageInfo(appDir) {
25
- try {
26
- const packageJsonPath = upath.resolve(appDir, './package.json');
27
- const packageJson = fs.readJSONSync(packageJsonPath);
28
- return {
29
- name: packageJson.name,
30
- version: packageJson.version
31
- };
32
- } catch {
33
- return {};
34
- }
35
- }
36
- function renderEffectClientCode(endpoints, options) {
37
- const requestCreator = options.requestCreator || DEFAULT_REQUEST_CREATOR;
38
- const httpMethodDecider = options.httpMethodDecider || 'functionName';
39
- const packageInfo = getPackageInfo(options.appDir);
40
- const packageName = packageInfo.name;
41
- const dataPlatformAppNamespace = void 0 === packageName || '' === packageName ? 'unknown-app' : packageName;
42
- const requestId = 'bundle' === options.target ? void 0 !== packageName && '' !== packageName ? packageName : void 0 : void 0;
43
- const normalizedRequestId = void 0 === requestId || '' === requestId ? 'default' : requestId;
44
- const operationVersion = deriveOperationVersion(packageInfo.version);
45
- const batchConfig = options.dataPlatformBatch;
46
- const batchEndpoint = resolveBatchEndpoint(options.prefix, batchConfig?.endpoint);
47
- const manifest = {
48
- endpoints: endpoints.map((endpoint)=>({
49
- apiId: endpoint.apiId,
50
- group: endpoint.groupName,
51
- endpoint: endpoint.endpointName,
52
- method: endpoint.method,
53
- routePath: endpoint.routePath,
54
- schemaHash: createEffectEndpointContractHash(endpoint, normalizedRequestId),
55
- operationVersion
56
- }))
57
- };
58
- const config = {
59
- appNamespace: dataPlatformAppNamespace,
60
- ...void 0 !== requestId && '' !== requestId ? {
61
- requestId
62
- } : {},
63
- port: options.port,
64
- useEnvPort: 'server' === options.target,
65
- defaultOrigin: `http://localhost:${String(options.port)}`,
66
- httpMethodDecider,
67
- batch: {
68
- enabled: batchConfig?.enabled ?? true,
69
- endpoint: batchEndpoint,
70
- flushIntervalMs: batchConfig?.flushIntervalMs ?? 8,
71
- maxBatchSize: batchConfig?.maxBatchSize ?? 16,
72
- maxBatchBytes: batchConfig?.maxBatchBytes ?? 65536,
73
- requestTimeoutMs: batchConfig?.requestTimeoutMs ?? 10000,
74
- allowedMethods: batchConfig?.allowedMethods !== void 0 && batchConfig.allowedMethods.length > 0 ? batchConfig.allowedMethods : [
75
- 'GET'
76
- ]
77
- }
78
- };
79
- return `import * as __requestRuntime from ${JSON.stringify(requestCreator)};
80
- import { createGeneratedEffectClient } from ${JSON.stringify(EFFECT_CLIENT_RUNTIME_IMPORT)};
81
-
82
- const __manifest = ${JSON.stringify(manifest, null, 2)};
83
-
84
- const __config = ${JSON.stringify(config, null, 2)};
85
-
86
- const __generated = createGeneratedEffectClient(__manifest, __config, __requestRuntime);
87
-
88
- const client = __generated.client;
89
- const operationManifest = __generated.operationManifest;
90
- const createEffectRequestContext = __generated.createEffectRequestContext;
91
- const apiModule = {
92
- client,
93
- operationManifest,
94
- createEffectRequestContext,
95
- };
96
-
97
- export { client, createEffectRequestContext, operationManifest };
98
- export default apiModule;
99
- `;
100
- }
101
- function renderClientShape(endpoints, valueType) {
102
- if (0 === endpoints.length) return `Record<string, Record<string, ${valueType}>>`;
103
- const groups = new Map();
104
- for (const endpoint of endpoints){
105
- const group = groups.get(endpoint.groupName) || [];
106
- group.push(endpoint.endpointName);
107
- groups.set(endpoint.groupName, group);
108
- }
109
- const groupEntries = [
110
- ...groups.entries()
111
- ].map(([groupName, names])=>{
112
- const endpointEntries = names.map((name)=>` ${JSON.stringify(name)}: ${valueType};`).join('\n');
113
- return ` ${JSON.stringify(groupName)}: {\n${endpointEntries}\n };`;
114
- });
115
- return `{\n${groupEntries.join('\n')}\n}`;
116
- }
117
- function renderEffectClientDeclaration(endpoints = []) {
118
- return `export type EffectClientOperation = (
119
- request?: unknown,
120
- ) => Promise<unknown>;
121
- export type EffectClientGroup = Record<string, EffectClientOperation>;
122
- export type EffectClient = Record<string, EffectClientGroup>;
123
- export type EffectOperationDescriptor = {
124
- appNamespace: string;
125
- apiId: string;
126
- group: string;
127
- endpoint: string;
128
- operationId: string;
129
- routePath: string;
130
- method: string;
131
- operationVersion: number;
132
- schemaHash: string;
133
- version: number;
134
- };
135
- export type EffectOperationManifest = Record<
136
- string,
137
- Record<string, EffectOperationDescriptor>
138
- >;
139
- export type EffectOperationContext = {
140
- requestId?: string;
141
- operationId?: string;
142
- routePath?: string;
143
- method?: string;
144
- schemaHash?: string;
145
- operationVersion?: number;
146
- locale?: string;
147
- traceparent?: string;
148
- traceId?: string;
149
- spanId?: string;
150
- source?: string;
151
- scope?: Record<string, unknown>;
152
- sessionClaims?: Record<string, unknown>;
153
- attributes?: Record<string, unknown>;
154
- };
155
- export type EffectRequestContext = {
156
- headers?: Record<string, string>;
157
- locale?: string;
158
- operationContext?: EffectOperationContext;
159
- traceparent?: string;
160
- traceId?: string;
161
- spanId?: string;
162
- };
163
- export type GeneratedEffectClient = ${renderClientShape(endpoints, 'EffectClientOperation')};
164
- export type GeneratedEffectOperationManifest = ${renderClientShape(endpoints, "EffectOperationDescriptor")};
165
-
166
- export declare const client: GeneratedEffectClient;
167
- export declare const createEffectRequestContext: (
168
- requestContext: Record<string, unknown>,
169
- ) => EffectRequestContext;
170
- export declare const operationManifest: GeneratedEffectOperationManifest;
171
- declare const apiModule: {
172
- client: GeneratedEffectClient;
173
- createEffectRequestContext: typeof createEffectRequestContext;
174
- operationManifest: GeneratedEffectOperationManifest;
175
- };
176
-
177
- export default apiModule;
178
- `;
179
- }
180
- export { renderEffectClientCode, renderEffectClientDeclaration };
@@ -1,29 +0,0 @@
1
- import __rslib_shim_module__ from "node:module";
2
- const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
3
- import { compatibleRequire, upath } from "@modern-js/utils";
4
- import { extractHttpApiFromModule } from "../../runtime/effect/endpoint-contracts.mjs";
5
- import { loadEffectSourceModule } from "../effectSourceLoader.mjs";
6
- let httpApiRuntimePromise;
7
- function isRecord(value) {
8
- return 'object' == typeof value && null !== value;
9
- }
10
- function isHttpApiRuntime(value) {
11
- return isRecord(value) && 'function' == typeof value.isHttpApi && 'function' == typeof value.reflect;
12
- }
13
- function getHttpApiRuntime() {
14
- if (void 0 === httpApiRuntimePromise) httpApiRuntimePromise = compatibleRequire('effect/unstable/httpapi', false).catch((error)=>{
15
- const message = error instanceof Error ? error.message : String(error);
16
- if (!message.includes("Cannot find module 'effect/unstable/httpapi'")) throw error;
17
- const effectPackageJson = require.resolve('effect/package.json');
18
- const effectHttpApiRuntimePath = upath.join(upath.dirname(effectPackageJson), 'dist', 'unstable', 'httpapi', 'index.js');
19
- return compatibleRequire(effectHttpApiRuntimePath, false);
20
- }).then((mod)=>{
21
- if (isRecord(mod) && isHttpApiRuntime(mod.HttpApi)) return mod.HttpApi;
22
- throw new Error('[BFF][Effect] Unable to resolve HttpApi runtime from effect/unstable/httpapi.');
23
- });
24
- return httpApiRuntimePromise;
25
- }
26
- function loadEffectApi(options) {
27
- return getHttpApiRuntime().then((httpApiRuntime)=>loadEffectSourceModule(options).then((mod)=>extractHttpApiFromModule(mod, httpApiRuntime.isHttpApi)));
28
- }
29
- export { getHttpApiRuntime, loadEffectApi };
@@ -1 +0,0 @@
1
- import "node:module";
@@ -1,2 +0,0 @@
1
- import "node:module";
2
- export { generateEffectClient, generateEffectClientCode, renderEffectClientDeclaration, resolveEffectEntryFile } from "./effect-client-generator/index.mjs";
@@ -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;