@encore.dev/sdk 2.0.0-beta.7 → 2.0.0-beta.9

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 (424) hide show
  1. package/README.md +109 -0
  2. package/app_meta.test.ts +25 -5
  3. package/app_meta.ts +51 -12
  4. package/config/config.test.ts +18 -15
  5. package/config/config.ts +89 -31
  6. package/config/mod.ts +4 -3
  7. package/config/secrets.ts +79 -53
  8. package/config/value.ts +13 -17
  9. package/cron/mod.test.ts +52 -0
  10. package/cron/mod.ts +41 -2
  11. package/dist/app_meta.d.ts +44 -12
  12. package/dist/app_meta.d.ts.map +1 -0
  13. package/dist/app_meta.js +2 -0
  14. package/dist/app_meta.js.map +1 -1
  15. package/dist/config/config.d.ts +58 -28
  16. package/dist/config/config.d.ts.map +1 -0
  17. package/dist/config/config.js +46 -18
  18. package/dist/config/config.js.map +1 -1
  19. package/dist/config/mod.d.ts +5 -4
  20. package/dist/config/mod.d.ts.map +1 -0
  21. package/dist/config/mod.js +2 -2
  22. package/dist/config/mod.js.map +1 -1
  23. package/dist/config/secrets.d.ts +71 -39
  24. package/dist/config/secrets.d.ts.map +1 -0
  25. package/dist/config/secrets.js +31 -38
  26. package/dist/config/secrets.js.map +1 -1
  27. package/dist/config/value.d.ts +8 -5
  28. package/dist/config/value.d.ts.map +1 -0
  29. package/dist/config/value.js +10 -7
  30. package/dist/config/value.js.map +1 -1
  31. package/dist/cron/mod.d.ts +36 -1
  32. package/dist/cron/mod.d.ts.map +1 -0
  33. package/dist/cron/mod.js +31 -1
  34. package/dist/cron/mod.js.map +1 -1
  35. package/dist/frontends/mod.d.ts +39 -0
  36. package/dist/frontends/mod.d.ts.map +1 -0
  37. package/dist/frontends/mod.js +47 -0
  38. package/dist/frontends/mod.js.map +1 -0
  39. package/dist/gateway/errors.d.ts +101 -0
  40. package/dist/gateway/errors.d.ts.map +1 -0
  41. package/dist/gateway/errors.js +146 -0
  42. package/dist/gateway/errors.js.map +1 -0
  43. package/dist/gateway/match.d.ts +127 -0
  44. package/dist/gateway/match.d.ts.map +1 -0
  45. package/dist/gateway/match.js +206 -0
  46. package/dist/gateway/match.js.map +1 -0
  47. package/dist/gateway/middleware.d.ts +108 -0
  48. package/dist/gateway/middleware.d.ts.map +1 -0
  49. package/dist/gateway/middleware.js +9 -0
  50. package/dist/gateway/middleware.js.map +1 -0
  51. package/dist/gateway/mod.d.ts +130 -0
  52. package/dist/gateway/mod.d.ts.map +1 -0
  53. package/dist/gateway/mod.js +188 -0
  54. package/dist/gateway/mod.js.map +1 -0
  55. package/dist/gateway/request.d.ts +304 -0
  56. package/dist/gateway/request.d.ts.map +1 -0
  57. package/dist/gateway/request.js +403 -0
  58. package/dist/gateway/request.js.map +1 -0
  59. package/dist/gateway/serve.d.ts +114 -0
  60. package/dist/gateway/serve.d.ts.map +1 -0
  61. package/dist/gateway/serve.js +510 -0
  62. package/dist/gateway/serve.js.map +1 -0
  63. package/dist/gateways/mod.d.ts +42 -0
  64. package/dist/gateways/mod.d.ts.map +1 -0
  65. package/dist/gateways/mod.js +55 -0
  66. package/dist/gateways/mod.js.map +1 -0
  67. package/dist/internal/clients/call.d.ts +147 -0
  68. package/dist/internal/clients/call.d.ts.map +1 -0
  69. package/dist/internal/clients/call.js +274 -0
  70. package/dist/internal/clients/call.js.map +1 -0
  71. package/dist/internal/clients/grpc.d.ts +90 -0
  72. package/dist/internal/clients/grpc.d.ts.map +1 -0
  73. package/dist/internal/clients/grpc.js +355 -0
  74. package/dist/internal/clients/grpc.js.map +1 -0
  75. package/dist/internal/clients/mod.d.ts +81 -0
  76. package/dist/internal/clients/mod.d.ts.map +1 -0
  77. package/dist/internal/clients/mod.js +237 -0
  78. package/dist/internal/clients/mod.js.map +1 -0
  79. package/dist/internal/fetch.d.ts +58 -0
  80. package/dist/internal/fetch.d.ts.map +1 -0
  81. package/dist/internal/fetch.js +251 -0
  82. package/dist/internal/fetch.js.map +1 -0
  83. package/dist/internal/otel/backend.d.ts +2 -0
  84. package/dist/internal/otel/backend.d.ts.map +1 -0
  85. package/dist/internal/otel/context.d.ts +1 -0
  86. package/dist/internal/otel/context.d.ts.map +1 -0
  87. package/dist/internal/otel/context_manager.d.ts +1 -0
  88. package/dist/internal/otel/context_manager.d.ts.map +1 -0
  89. package/dist/internal/otel/encode.d.ts +2 -0
  90. package/dist/internal/otel/encode.d.ts.map +1 -0
  91. package/dist/internal/otel/http.d.ts +11 -0
  92. package/dist/internal/otel/http.d.ts.map +1 -0
  93. package/dist/internal/otel/http.js +64 -0
  94. package/dist/internal/otel/http.js.map +1 -0
  95. package/dist/internal/otel/index.d.ts +2 -2
  96. package/dist/internal/otel/index.d.ts.map +1 -0
  97. package/dist/internal/otel/index.js +1 -2
  98. package/dist/internal/otel/index.js.map +1 -1
  99. package/dist/internal/otel/meter.d.ts +1 -0
  100. package/dist/internal/otel/meter.d.ts.map +1 -0
  101. package/dist/internal/otel/propagator.d.ts +1 -0
  102. package/dist/internal/otel/propagator.d.ts.map +1 -0
  103. package/dist/internal/otel/provider.d.ts +4 -0
  104. package/dist/internal/otel/provider.d.ts.map +1 -0
  105. package/dist/internal/otel/provider.js +3 -0
  106. package/dist/internal/otel/provider.js.map +1 -1
  107. package/dist/internal/otel/span.d.ts +15 -1
  108. package/dist/internal/otel/span.d.ts.map +1 -0
  109. package/dist/internal/otel/span.js +30 -2
  110. package/dist/internal/otel/span.js.map +1 -1
  111. package/dist/internal/otel/tracer.d.ts +1 -0
  112. package/dist/internal/otel/tracer.d.ts.map +1 -0
  113. package/dist/internal/otel/tracer.js +11 -5
  114. package/dist/internal/otel/tracer.js.map +1 -1
  115. package/dist/internal/reqfields.d.ts +170 -0
  116. package/dist/internal/reqfields.d.ts.map +1 -0
  117. package/dist/internal/reqfields.js +349 -0
  118. package/dist/internal/reqfields.js.map +1 -0
  119. package/dist/internal/runtime/meter.d.ts +1 -0
  120. package/dist/internal/runtime/meter.d.ts.map +1 -0
  121. package/dist/internal/runtime/mod.d.ts +6 -0
  122. package/dist/internal/runtime/mod.d.ts.map +1 -0
  123. package/dist/internal/runtime/mod.js +32 -2
  124. package/dist/internal/runtime/mod.js.map +1 -1
  125. package/dist/internal/runtime/napi/napi.cjs +192 -16
  126. package/dist/internal/runtime/napi/napi.d.cts +573 -33
  127. package/dist/internal/runtime/shutdown.d.ts +5 -0
  128. package/dist/internal/runtime/shutdown.d.ts.map +1 -0
  129. package/dist/internal/runtime/shutdown.js +9 -1
  130. package/dist/internal/runtime/shutdown.js.map +1 -1
  131. package/dist/internal/testing/carry.d.ts +49 -0
  132. package/dist/internal/testing/carry.d.ts.map +1 -0
  133. package/dist/internal/testing/carry.js +77 -0
  134. package/dist/internal/testing/carry.js.map +1 -0
  135. package/dist/internal/testing/runner.d.ts +2 -0
  136. package/dist/internal/testing/runner.d.ts.map +1 -0
  137. package/dist/internal/testing/runner.js +10 -0
  138. package/dist/internal/testing/runner.js.map +1 -0
  139. package/dist/internal/testing/scope.d.ts +109 -0
  140. package/dist/internal/testing/scope.d.ts.map +1 -0
  141. package/dist/internal/testing/scope.js +335 -0
  142. package/dist/internal/testing/scope.js.map +1 -0
  143. package/dist/internal/testing/steps.d.ts +55 -0
  144. package/dist/internal/testing/steps.d.ts.map +1 -0
  145. package/dist/internal/testing/steps.js +295 -0
  146. package/dist/internal/testing/steps.js.map +1 -0
  147. package/dist/internal/testing/telemetry.d.ts +305 -0
  148. package/dist/internal/testing/telemetry.d.ts.map +1 -0
  149. package/dist/internal/testing/telemetry.js +188 -0
  150. package/dist/internal/testing/telemetry.js.map +1 -0
  151. package/dist/internal/utils/constraints.d.ts +1 -0
  152. package/dist/internal/utils/constraints.d.ts.map +1 -0
  153. package/dist/log/index.d.ts +1 -0
  154. package/dist/log/index.d.ts.map +1 -0
  155. package/dist/log/logger.d.ts +2 -0
  156. package/dist/log/logger.d.ts.map +1 -0
  157. package/dist/log/runtime.d.ts +2 -0
  158. package/dist/log/runtime.d.ts.map +1 -0
  159. package/dist/log/stderr.d.ts +1 -0
  160. package/dist/log/stderr.d.ts.map +1 -0
  161. package/dist/metrics/mod.d.ts +45 -118
  162. package/dist/metrics/mod.d.ts.map +1 -0
  163. package/dist/metrics/mod.js +44 -179
  164. package/dist/metrics/mod.js.map +1 -1
  165. package/dist/mod.d.ts +2 -3
  166. package/dist/mod.d.ts.map +1 -0
  167. package/dist/mod.js +0 -1
  168. package/dist/mod.js.map +1 -1
  169. package/dist/otel.d.ts +1 -0
  170. package/dist/otel.d.ts.map +1 -0
  171. package/dist/pubsub/encoding.d.ts +5 -0
  172. package/dist/pubsub/encoding.d.ts.map +1 -0
  173. package/dist/pubsub/encoding.js +10 -2
  174. package/dist/pubsub/encoding.js.map +1 -1
  175. package/dist/pubsub/mod.d.ts +5 -4
  176. package/dist/pubsub/mod.d.ts.map +1 -0
  177. package/dist/pubsub/mod.js +2 -2
  178. package/dist/pubsub/mod.js.map +1 -1
  179. package/dist/pubsub/refs.d.ts +8 -0
  180. package/dist/pubsub/refs.d.ts.map +1 -0
  181. package/dist/pubsub/refs.js.map +1 -1
  182. package/dist/pubsub/subscription.d.ts +110 -15
  183. package/dist/pubsub/subscription.d.ts.map +1 -0
  184. package/dist/pubsub/subscription.js +98 -16
  185. package/dist/pubsub/subscription.js.map +1 -1
  186. package/dist/pubsub/topic.d.ts +101 -31
  187. package/dist/pubsub/topic.d.ts.map +1 -0
  188. package/dist/pubsub/topic.js +168 -51
  189. package/dist/pubsub/topic.js.map +1 -1
  190. package/dist/reqctx/mod.d.ts +174 -0
  191. package/dist/reqctx/mod.d.ts.map +1 -0
  192. package/dist/reqctx/mod.js +144 -0
  193. package/dist/reqctx/mod.js.map +1 -0
  194. package/dist/services/index.d.ts +147 -5
  195. package/dist/services/index.d.ts.map +1 -0
  196. package/dist/services/index.js +157 -9
  197. package/dist/services/index.js.map +1 -1
  198. package/dist/shutdown/mod.d.ts +1 -0
  199. package/dist/shutdown/mod.d.ts.map +1 -0
  200. package/dist/storage/objects/bucket.d.ts +313 -7
  201. package/dist/storage/objects/bucket.d.ts.map +1 -0
  202. package/dist/storage/objects/bucket.js +306 -15
  203. package/dist/storage/objects/bucket.js.map +1 -1
  204. package/dist/storage/objects/error.d.ts +10 -0
  205. package/dist/storage/objects/error.d.ts.map +1 -0
  206. package/dist/storage/objects/error.js +25 -1
  207. package/dist/storage/objects/error.js.map +1 -1
  208. package/dist/storage/objects/mod.d.ts +4 -3
  209. package/dist/storage/objects/mod.d.ts.map +1 -0
  210. package/dist/storage/objects/mod.js +1 -1
  211. package/dist/storage/objects/mod.js.map +1 -1
  212. package/dist/storage/objects/refs.d.ts +20 -4
  213. package/dist/storage/objects/refs.d.ts.map +1 -0
  214. package/dist/storage/objects/refs.js +6 -0
  215. package/dist/storage/objects/refs.js.map +1 -1
  216. package/dist/storage/postgres/database.d.ts +85 -25
  217. package/dist/storage/postgres/database.d.ts.map +1 -0
  218. package/dist/storage/postgres/database.js +129 -37
  219. package/dist/storage/postgres/database.js.map +1 -1
  220. package/dist/storage/postgres/errors.d.ts +120 -0
  221. package/dist/storage/postgres/errors.d.ts.map +1 -0
  222. package/dist/storage/postgres/errors.js +162 -0
  223. package/dist/storage/postgres/errors.js.map +1 -0
  224. package/dist/storage/postgres/interval.d.ts +44 -0
  225. package/dist/storage/postgres/interval.d.ts.map +1 -0
  226. package/dist/storage/postgres/interval.js +153 -0
  227. package/dist/storage/postgres/interval.js.map +1 -0
  228. package/dist/storage/postgres/mod.d.ts +4 -1
  229. package/dist/storage/postgres/mod.d.ts.map +1 -0
  230. package/dist/storage/postgres/mod.js +2 -0
  231. package/dist/storage/postgres/mod.js.map +1 -1
  232. package/dist/storage/redis/bitfield.d.ts +67 -0
  233. package/dist/storage/redis/bitfield.d.ts.map +1 -0
  234. package/dist/storage/redis/bitfield.js +114 -0
  235. package/dist/storage/redis/bitfield.js.map +1 -0
  236. package/dist/storage/redis/command.d.ts +45 -0
  237. package/dist/storage/redis/command.d.ts.map +1 -0
  238. package/dist/storage/redis/command.js +78 -0
  239. package/dist/storage/redis/command.js.map +1 -0
  240. package/dist/storage/redis/commands.d.ts +223 -139
  241. package/dist/storage/redis/commands.d.ts.map +1 -0
  242. package/dist/storage/redis/commands.js +128 -6
  243. package/dist/storage/redis/commands.js.map +1 -1
  244. package/dist/storage/redis/database.d.ts +56 -22
  245. package/dist/storage/redis/database.d.ts.map +1 -0
  246. package/dist/storage/redis/database.js +62 -0
  247. package/dist/storage/redis/database.js.map +1 -1
  248. package/dist/storage/redis/mod.d.ts +31 -4
  249. package/dist/storage/redis/mod.d.ts.map +1 -0
  250. package/dist/storage/redis/mod.js +26 -1
  251. package/dist/storage/redis/mod.js.map +1 -1
  252. package/dist/storage/redis/native.d.ts +8 -0
  253. package/dist/storage/redis/native.d.ts.map +1 -0
  254. package/dist/storage/redis/native.js +10 -0
  255. package/dist/storage/redis/native.js.map +1 -1
  256. package/dist/storage/redis/options.d.ts +1 -0
  257. package/dist/storage/redis/options.d.ts.map +1 -0
  258. package/dist/storage/redis/pubsub.d.ts +2 -0
  259. package/dist/storage/redis/pubsub.d.ts.map +1 -0
  260. package/dist/storage/redis/reply.d.ts +34 -0
  261. package/dist/storage/redis/reply.d.ts.map +1 -0
  262. package/dist/storage/redis/reply.js +40 -1
  263. package/dist/storage/redis/reply.js.map +1 -1
  264. package/dist/storage/redis/scan.d.ts +1 -0
  265. package/dist/storage/redis/scan.d.ts.map +1 -0
  266. package/dist/storage/redis/script.d.ts +1 -0
  267. package/dist/storage/redis/script.d.ts.map +1 -0
  268. package/dist/storage/redis/target.d.ts +5 -3
  269. package/dist/storage/redis/target.d.ts.map +1 -0
  270. package/dist/storage/redis/target.js +39 -28
  271. package/dist/storage/redis/target.js.map +1 -1
  272. package/dist/storage/redis/wire.d.ts +7 -10
  273. package/dist/storage/redis/wire.d.ts.map +1 -0
  274. package/dist/storage/redis/wire.js +8 -32
  275. package/dist/storage/redis/wire.js.map +1 -1
  276. package/dist/testing/bun.d.ts +8 -0
  277. package/dist/testing/bun.d.ts.map +1 -0
  278. package/dist/testing/bun.js +13 -0
  279. package/dist/testing/bun.js.map +1 -0
  280. package/dist/testing/jest.d.ts +8 -0
  281. package/dist/testing/jest.d.ts.map +1 -0
  282. package/dist/testing/jest.js +11 -0
  283. package/dist/testing/jest.js.map +1 -0
  284. package/dist/testing/mod.d.ts +183 -0
  285. package/dist/testing/mod.d.ts.map +1 -0
  286. package/dist/testing/mod.js +271 -0
  287. package/dist/testing/mod.js.map +1 -0
  288. package/dist/testing/node.d.ts +9 -0
  289. package/dist/testing/node.d.ts.map +1 -0
  290. package/dist/testing/node.js +12 -0
  291. package/dist/testing/node.js.map +1 -0
  292. package/dist/testing/playwright.d.ts +93 -0
  293. package/dist/testing/playwright.d.ts.map +1 -0
  294. package/dist/testing/playwright.js +164 -0
  295. package/dist/testing/playwright.js.map +1 -0
  296. package/dist/testing/puppeteer.d.ts +36 -0
  297. package/dist/testing/puppeteer.d.ts.map +1 -0
  298. package/dist/testing/puppeteer.js +70 -0
  299. package/dist/testing/puppeteer.js.map +1 -0
  300. package/dist/testing/system.d.ts +181 -0
  301. package/dist/testing/system.d.ts.map +1 -0
  302. package/dist/testing/system.js +255 -0
  303. package/dist/testing/system.js.map +1 -0
  304. package/dist/testing/vitest.d.ts +8 -0
  305. package/dist/testing/vitest.d.ts.map +1 -0
  306. package/dist/testing/vitest.js +13 -0
  307. package/dist/testing/vitest.js.map +1 -0
  308. package/dist/tracing/http.d.ts +11 -0
  309. package/dist/tracing/http.d.ts.map +1 -0
  310. package/dist/tracing/http.js +34 -0
  311. package/dist/tracing/http.js.map +1 -0
  312. package/dist/tracing/mod.d.ts +20 -0
  313. package/dist/tracing/mod.d.ts.map +1 -0
  314. package/dist/tracing/mod.js +47 -0
  315. package/dist/tracing/mod.js.map +1 -0
  316. package/dist/tracing/node.d.ts +10 -0
  317. package/dist/tracing/node.d.ts.map +1 -0
  318. package/dist/tracing/node.js +142 -0
  319. package/dist/tracing/node.js.map +1 -0
  320. package/dist/tsconfig.build.tsbuildinfo +1 -1
  321. package/dist/types/mod.d.ts +1 -0
  322. package/dist/types/mod.d.ts.map +1 -0
  323. package/frontends/mod.test.ts +51 -0
  324. package/frontends/mod.ts +50 -0
  325. package/gateway/errors.ts +172 -0
  326. package/gateway/gateway.e2e.test.ts +297 -0
  327. package/gateway/gateway.test.ts +891 -0
  328. package/gateway/match.ts +239 -0
  329. package/gateway/middleware.ts +134 -0
  330. package/gateway/mod.ts +211 -0
  331. package/gateway/request.ts +578 -0
  332. package/gateway/serve.ts +738 -0
  333. package/gateways/mod.ts +60 -0
  334. package/internal/clients/call.ts +389 -0
  335. package/internal/clients/grpc.test.ts +368 -0
  336. package/internal/clients/grpc.ts +485 -0
  337. package/internal/clients/mod.test.ts +464 -0
  338. package/internal/clients/mod.ts +337 -0
  339. package/internal/fetch.ts +287 -0
  340. package/internal/otel/http.ts +91 -0
  341. package/internal/otel/index.ts +1 -7
  342. package/internal/otel/provider.ts +3 -0
  343. package/internal/otel/span.ts +31 -2
  344. package/internal/otel/tracer.test.ts +43 -15
  345. package/internal/otel/tracer.ts +12 -5
  346. package/internal/reqfields.ts +423 -0
  347. package/internal/runtime/mod.ts +41 -2
  348. package/internal/runtime/napi/napi.cjs +192 -16
  349. package/internal/runtime/napi/napi.d.cts +573 -33
  350. package/internal/runtime/shutdown.ts +11 -1
  351. package/internal/testing/carry.test.ts +242 -0
  352. package/internal/testing/carry.ts +101 -0
  353. package/internal/testing/runner.ts +10 -0
  354. package/internal/testing/scope.ts +372 -0
  355. package/internal/testing/steps.test.ts +152 -0
  356. package/internal/testing/steps.ts +342 -0
  357. package/internal/testing/telemetry.test.ts +210 -0
  358. package/internal/testing/telemetry.ts +466 -0
  359. package/metrics/mod.test.ts +13 -16
  360. package/metrics/mod.ts +57 -226
  361. package/mod.ts +1 -8
  362. package/otel.test.ts +13 -6
  363. package/package.json +92 -15
  364. package/pubsub/encoding.ts +11 -1
  365. package/pubsub/mod.ts +16 -4
  366. package/pubsub/pubsub.test.ts +233 -14
  367. package/pubsub/refs.ts +16 -0
  368. package/pubsub/subscription.ts +200 -21
  369. package/pubsub/topic.test.ts +26 -0
  370. package/pubsub/topic.ts +255 -36
  371. package/reqctx/mod.ts +267 -0
  372. package/reqctx/reqctx.test.ts +216 -0
  373. package/scripts/postprocess-docs.test.ts +58 -0
  374. package/services/index.test.ts +341 -1
  375. package/services/index.ts +185 -9
  376. package/storage/objects/bucket.test.ts +573 -0
  377. package/storage/objects/bucket.ts +650 -20
  378. package/storage/objects/error.ts +28 -1
  379. package/storage/objects/mod.ts +15 -0
  380. package/storage/objects/refs.ts +51 -3
  381. package/storage/postgres/database.integration.test.ts +275 -0
  382. package/storage/postgres/database.test.ts +193 -6
  383. package/storage/postgres/database.ts +206 -55
  384. package/storage/postgres/errors.ts +186 -0
  385. package/storage/postgres/interval.test.ts +72 -0
  386. package/storage/postgres/interval.ts +170 -0
  387. package/storage/postgres/mod.ts +4 -0
  388. package/storage/redis/bitfield.ts +162 -0
  389. package/storage/redis/command.ts +84 -0
  390. package/storage/redis/commands.ts +271 -21
  391. package/storage/redis/database.ts +77 -23
  392. package/storage/redis/mod.ts +38 -2
  393. package/storage/redis/native.ts +11 -0
  394. package/storage/redis/redis.test.ts +170 -10
  395. package/storage/redis/reply.ts +76 -1
  396. package/storage/redis/runtime.test.ts +15 -0
  397. package/storage/redis/target.ts +47 -44
  398. package/storage/redis/wire.ts +8 -32
  399. package/testing/bun.ts +13 -0
  400. package/testing/jest.ts +11 -0
  401. package/testing/mod.ts +393 -0
  402. package/testing/node.ts +12 -0
  403. package/testing/playwright.ts +247 -0
  404. package/testing/puppeteer.ts +101 -0
  405. package/testing/system.test.ts +108 -0
  406. package/testing/system.ts +373 -0
  407. package/testing/vitest.ts +13 -0
  408. package/tracing/http.ts +49 -0
  409. package/tracing/mod.ts +83 -0
  410. package/tracing/native.test.ts +267 -0
  411. package/tracing/node.ts +176 -0
  412. package/tracing/tracing.test.ts +953 -0
  413. package/dist/internal/otel/request_context.d.ts +0 -11
  414. package/dist/internal/otel/request_context.js +0 -20
  415. package/dist/internal/otel/request_context.js.map +0 -1
  416. package/dist/internal/reqtrack/mod.d.ts +0 -6
  417. package/dist/internal/reqtrack/mod.js +0 -28
  418. package/dist/internal/reqtrack/mod.js.map +0 -1
  419. package/dist/req_meta.d.ts +0 -47
  420. package/dist/req_meta.js +0 -26
  421. package/dist/req_meta.js.map +0 -1
  422. package/internal/otel/request_context.ts +0 -32
  423. package/internal/reqtrack/mod.ts +0 -39
  424. package/req_meta.ts +0 -75
@@ -0,0 +1,304 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { AsyncLocalStorage } from 'node:async_hooks';
4
+ import type { SpanContext } from '@opentelemetry/api';
5
+ import { Field } from '../reqctx/mod.js';
6
+ /**
7
+ * A request as the native runtime keeps it: its headers, query parameters
8
+ * and cookies are handed to JavaScript only as a hook reads them.
9
+ * @internal
10
+ */
11
+ export interface NativeView {
12
+ readonly gateway: string;
13
+ readonly service: string;
14
+ readonly route: string;
15
+ readonly method: string;
16
+ readonly path: string;
17
+ readonly host?: string | null;
18
+ readonly clientIp?: string | null;
19
+ readonly traceparent?: string | null;
20
+ readonly tracestate?: string | null;
21
+ /** The Request Context fields earlier Middleware set, encoded. */
22
+ readonly context?: readonly NativeField[] | null;
23
+ pathParam(name: string): string | null | undefined;
24
+ headerValues(name: string): string[];
25
+ queryValues(name: string): string[];
26
+ cookie(name: string): string | null | undefined;
27
+ }
28
+ /** A response's headers as the native runtime keeps them. @internal */
29
+ export interface NativeHeaders {
30
+ values(name: string): string[];
31
+ }
32
+ /**
33
+ * A set of a Middleware's later hooks, which {@link Request.skip} narrows,
34
+ * combined with `|`: `Hook.Response | Hook.Complete`. `onRequest` is not
35
+ * among them: it is the hook that skips.
36
+ */
37
+ export declare const Hook: {
38
+ /** `onRequestBody`. */
39
+ readonly RequestBody: number;
40
+ /** `onResponse`. */
41
+ readonly Response: number;
42
+ /** `onResponseBody`. */
43
+ readonly ResponseBody: number;
44
+ /** `onComplete`. */
45
+ readonly Complete: number;
46
+ };
47
+ /** A value of {@link Hook}, or several combined with `|`. */
48
+ export type Hooks = number;
49
+ /** The value of an attribute of a request's span. */
50
+ export type AttributeValue = string | boolean | number;
51
+ /** An edit to headers: op 0 sets, 1 adds, 2 removes. @internal */
52
+ export interface HeaderEdit {
53
+ op: number;
54
+ name: string;
55
+ value: string;
56
+ }
57
+ /** A Request Context field, encoded, as the native runtime shows and takes
58
+ * it: a null value clears it. @internal */
59
+ export interface NativeField {
60
+ name: string;
61
+ value?: string | null;
62
+ }
63
+ /** An attribute as the native runtime takes it. @internal */
64
+ export interface NativeAttribute {
65
+ key: string;
66
+ value: AttributeValue;
67
+ integer: boolean;
68
+ }
69
+ /**
70
+ * Whether a Middleware may not edit the header `name`, lowercase: Encore's
71
+ * headers, the trace context's, those framing the message, and CORS's. The
72
+ * gateway refuses the same edits.
73
+ * @internal
74
+ */
75
+ export declare function isProtected(name: string): boolean;
76
+ /** Header values edited by a Middleware, by lowercase name, as they read
77
+ * now. */
78
+ type Overrides = Map<string, string[]>;
79
+ /** One Middleware's state for one request, shared by the Requests its hooks
80
+ * are shown. @internal */
81
+ export interface Lane {
82
+ state: unknown;
83
+ }
84
+ /** One run of a timed hook, `onRequest` or `onResponse`: expired once it
85
+ * has timed out and the gateway went on without it. @internal */
86
+ export interface HookRun {
87
+ expired: boolean;
88
+ }
89
+ /** The timed hook the code running now is part of, following its `await`s,
90
+ * timers and callbacks: so that what a timed-out hook goes on doing cannot
91
+ * change the state its later hooks are shown. @internal */
92
+ export declare const hookRuns: AsyncLocalStorage<HookRun>;
93
+ /**
94
+ * A public request the gateway serves, as a Middleware is shown it. Made by
95
+ * Encore: the same object is passed to each of one Middleware's hooks for
96
+ * one request.
97
+ *
98
+ * It reads the request's headers, query parameters and cookies as the hook
99
+ * asks for them, as the Middleware before this one left them, and with this
100
+ * one's edits. Encore's own headers, `x-encore-*`, are never shown. Edits
101
+ * are only allowed in `onRequest`; elsewhere they throw.
102
+ */
103
+ export declare class Request {
104
+ /** Identifies the request among those in flight; unique while it is. */
105
+ readonly id: number;
106
+ /** @internal */ readonly middleware: string;
107
+ /** @internal */ readonly view: NativeView | undefined;
108
+ /** @internal */ readonly lane: Lane;
109
+ /** @internal */ overrides: Overrides | undefined;
110
+ /** @internal */ deciding: boolean;
111
+ /** @internal */ edits: HeaderEdit[];
112
+ /** @internal The request's Request Context fields, encoded, with this
113
+ * Middleware's changes: changed in place, as the context its hooks run in
114
+ * holds this record. */
115
+ readonly fields: Record<string, string>;
116
+ /** @internal The changes `set` and `unset` made, for the gateway. */
117
+ fieldEdits: NativeField[];
118
+ /** @internal */ attributes: NativeAttribute[];
119
+ /** @internal */ skipped: number;
120
+ /** @internal */ hookSignal: AbortSignal;
121
+ /** @internal Made by Encore. */
122
+ constructor(middleware: string, id: number, view: NativeView | undefined, lane: Lane);
123
+ /** The HTTP method, upper case. */
124
+ get method(): string;
125
+ /** The host the client addressed, from its Host header, if any. */
126
+ get host(): string | undefined;
127
+ /** The path, as the client sent it: not percent-decoded, without the
128
+ * query. */
129
+ get path(): string;
130
+ /** The service the gateway routes the request to. */
131
+ get service(): string;
132
+ /** The route template it matched, such as `/users/{id}`. */
133
+ get route(): string;
134
+ /** The address of the client the gateway took the request from, if
135
+ * known. */
136
+ get clientIp(): string | undefined;
137
+ /**
138
+ * Aborts when the hook running now runs out of time: `onRequest` and
139
+ * `onResponse` have their Middleware's timeout, and the gateway goes on
140
+ * without them then. Pass it to what the hook awaits, as `fetch`, so the
141
+ * work stops too. It never aborts in the other hooks.
142
+ */
143
+ get signal(): AbortSignal;
144
+ /** The value of the path parameter `name` of the matched route, as it was
145
+ * sent, not percent-decoded; undefined when the route has none of that
146
+ * name. */
147
+ pathParam(name: string): string | undefined;
148
+ /** The first value of the request header `name`, as earlier Middleware
149
+ * left it; undefined when it is not sent. Any case. */
150
+ header(name: string): string | undefined;
151
+ /** Every value of the request header `name`, in order. Any case. */
152
+ headerValues(name: string): string[];
153
+ /** The first value of the query parameter `name`, percent-decoded;
154
+ * undefined when it is not sent. */
155
+ query(name: string): string | undefined;
156
+ /** Every value of the query parameter `name`, percent-decoded, in
157
+ * order. */
158
+ queryValues(name: string): string[];
159
+ /** The value of the cookie `name`, from the `Cookie` headers as the
160
+ * Middleware before this one left them; undefined when it is not sent. */
161
+ cookie(name: string): string | undefined;
162
+ /** The context of the request's span at the gateway, which the spans its
163
+ * hooks start are children of; undefined when the request is not
164
+ * traced. */
165
+ get spanContext(): SpanContext | undefined;
166
+ private mustDecide;
167
+ private edit;
168
+ /**
169
+ * Sets the request header `name` to `value`, replacing any values, for the
170
+ * Middleware after this one and the service. Only in `onRequest`. Not for
171
+ * Encore's headers (`x-encore-*`, the trace context), those framing the
172
+ * message (`content-length` and the like) and CORS's: those throw.
173
+ */
174
+ setHeader(name: string, value: string): void;
175
+ /** Adds `value` to the request header `name`, keeping its values. As
176
+ * {@link Request.setHeader}. */
177
+ addHeader(name: string, value: string): void;
178
+ /** Removes the request header `name`. As {@link Request.setHeader}. */
179
+ delHeader(name: string): void;
180
+ /**
181
+ * Sets attributes of the request's span at the gateway, as a user or
182
+ * tenant id to find its trace by. Never secrets. Only in `onRequest`. An
183
+ * integer number is recorded as an integer, another as a float.
184
+ */
185
+ setAttributes(attributes: Record<string, AttributeValue>): void;
186
+ /** Skips this Middleware's later `hooks` for this request, as an
187
+ * `onResponse` a request without a session has no use for:
188
+ * `req.skip(Hook.Response | Hook.Complete)`. Only in `onRequest`. */
189
+ skip(hooks: Hooks): void;
190
+ /**
191
+ * The Request Context field's value for the request; undefined when it is
192
+ * not set: as the Middleware before this one set it, or this one did. In
193
+ * a hook, `field.get()` reads the same, as hooks run in their request's
194
+ * context; in `onComplete`, as the request was forwarded. A value that is
195
+ * not JSON reads as not set, as it does to `field.get()`.
196
+ */
197
+ get<T>(field: Field<T>): T | undefined;
198
+ /**
199
+ * Sets the Request Context field to `value` for the request. The
200
+ * Middleware after this one, the service the request reaches, and every
201
+ * service it calls in turn with the request's context read it, with
202
+ * `field.get()`; so do the calls this hook makes from then on. It is how a
203
+ * Middleware that authenticates says who the request is for:
204
+ *
205
+ * ```ts
206
+ * export const currentUser = new Field<User>('user');
207
+ *
208
+ * class Auth implements gateway.Middleware {
209
+ * async onRequest(req: gateway.Request) {
210
+ * const user = await verify(req.header('authorization'), req.signal);
211
+ * if (user === undefined) {
212
+ * return gateway.reject(ErrCode.Unauthenticated, 'invalid token');
213
+ * }
214
+ * req.set(currentUser, user);
215
+ * }
216
+ * }
217
+ * ```
218
+ *
219
+ * Only in `onRequest`. The request takes the fields once the hook
220
+ * returns: none when it fails or answers the request.
221
+ *
222
+ * @throws TypeError - The value has no JSON form, or `field` is not a
223
+ * {@link Field}.
224
+ * @throws RangeError - The value encodes to more than a field may: 4 KiB,
225
+ * or 1 KiB for a field declared with `pubsub`; or it makes the request's
226
+ * fields encode to more than 8 KiB.
227
+ */
228
+ set<T>(field: Field<T>, value: T): void;
229
+ /** Clears the Request Context field for the request, as one the
230
+ * Middleware before this one set. As {@link Request.set} sets it. */
231
+ unset(field: Field<unknown>): void;
232
+ /**
233
+ * What this Middleware kept for the request, for its later hooks: the
234
+ * user `onRequest` found, for `onComplete` to bill. Undefined until set.
235
+ * Encore drops it when the request is done.
236
+ *
237
+ * When `onRequest` or `onResponse` fails or times out, `state` goes back
238
+ * to the object it was before the hook; what the hook changed inside that
239
+ * object stays, since Encore does not copy it. A hook that may fail after
240
+ * changing it should set a new object, as `req.state = {...req.state,
241
+ * billed: true}`, rather than change the one it has. A hook that goes on
242
+ * after it timed out may no longer set it: that throws.
243
+ */
244
+ get state(): unknown;
245
+ set state(value: unknown);
246
+ }
247
+ /**
248
+ * A response to a request the gateway served, in `onResponse`. Made by
249
+ * Encore. It reads the response's headers as the hook asks for them, as the
250
+ * Middleware after this one left them, and with this one's edits.
251
+ */
252
+ export declare class Response {
253
+ /** The HTTP status. */
254
+ readonly status: number;
255
+ /** @internal */ readonly middleware: string;
256
+ /** @internal */ readonly headers: NativeHeaders | undefined;
257
+ /** @internal */ overrides: Overrides | undefined;
258
+ /** @internal */ editing: boolean;
259
+ /** @internal */ edits: HeaderEdit[];
260
+ /** @internal Made by Encore. */
261
+ constructor(middleware: string, status: number, headers: NativeHeaders | undefined);
262
+ /** The first value of the response header `name`, if any. Any case. */
263
+ header(name: string): string | undefined;
264
+ /** Every value of the response header `name`, in order. Any case. */
265
+ headerValues(name: string): string[];
266
+ private edit;
267
+ /** Sets the response header `name` to `value`, replacing any values,
268
+ * before it is written to the client. Not for the headers
269
+ * {@link Request.setHeader} may not set. */
270
+ setHeader(name: string, value: string): void;
271
+ /** Adds `value` to the response header `name`. */
272
+ addHeader(name: string, value: string): void;
273
+ /** Removes the response header `name`. */
274
+ delHeader(name: string): void;
275
+ }
276
+ /** A request the gateway is done with, for `onComplete`. */
277
+ export interface Completed {
278
+ /** The request, with the headers as they were forwarded, and the state
279
+ * its earlier hooks kept. */
280
+ readonly request: Request;
281
+ /** The status the client was answered with; undefined when it was never
282
+ * answered, as when it disconnected first. */
283
+ readonly status: number | undefined;
284
+ /** The name of the Middleware that answered the request, or `"gateway"`
285
+ * when the gateway did, as for a route it does not expose; undefined when
286
+ * the service answered. */
287
+ readonly rejectedBy: string | undefined;
288
+ /** Why the request failed, if it did: a hook that failed, or a service
289
+ * that could not be reached. */
290
+ readonly error: string | undefined;
291
+ /** When the gateway received the request. */
292
+ readonly received: Date;
293
+ /** How long the gateway took to answer it, in milliseconds. */
294
+ readonly durationMs: number;
295
+ /** How long the service took, in milliseconds, if the request was
296
+ * forwarded. */
297
+ readonly upstreamDurationMs: number | undefined;
298
+ /** The bytes of the request's body. */
299
+ readonly requestBodySize: number;
300
+ /** The bytes of the response's body. */
301
+ readonly responseBodySize: number;
302
+ }
303
+ export {};
304
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../gateway/request.ts"],"names":[],"mappings":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