@dunx/http 0.6.0 → 0.6.1

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.
package/dist/client.js CHANGED
@@ -272,15 +272,11 @@ class HttpService extends UrlHelper {
272
272
  if (!response.ok || response.body === null) {
273
273
  throw new FetchError(response.status, response.statusText, await readBody(response), { method, url: url.href, headers: response.headers });
274
274
  }
275
- const reader = response.body.getReader();
276
275
  const decoder = new TextDecoder;
277
276
  let buffer = "";
278
277
  try {
279
- for (;; ) {
280
- const { done, value } = await reader.read();
281
- if (done)
282
- break;
283
- buffer += decoder.decode(value, { stream: true });
278
+ for await (const chunk of response.body) {
279
+ buffer += decoder.decode(chunk, { stream: true });
284
280
  let newline = buffer.indexOf(`
285
281
  `);
286
282
  while (newline !== -1) {
@@ -297,7 +293,6 @@ class HttpService extends UrlHelper {
297
293
  }
298
294
  }
299
295
  } finally {
300
- reader.releaseLock();
301
296
  this.logger.debug(`SSE ${method} ${url.href} closed`, {
302
297
  elapsedMs: Date.now() - startedAt
303
298
  });
@@ -463,5 +458,5 @@ export {
463
458
  DEFAULT_REQUEST_ID_HEADER
464
459
  };
465
460
 
466
- //# debugId=0C4797DE3172C46E64756E2164756E21
461
+ //# debugId=4FED9F52C0748CFA64756E2164756E21
467
462
  //# sourceMappingURL=client.js.map
@@ -7,9 +7,9 @@
7
7
  "import type { RetryOptions } from './retry.js';\n\n/**\n * Named `HttpClientOptions`, not `HttpOptions`: the server half already exports\n * that from `@dunx/http` for `HttpFactory.create`, and two things called\n * `HttpOptions` meaning opposite directions of traffic is the confusion this\n * subpath exists to avoid.\n */\nexport interface HttpClientOptionsInit {\n /**\n * Prefixed to a relative `path`. With it, calls name a path; without it, every\n * call passes a whole url.\n */\n readonly baseUrl?: string | URL;\n /** Per-request budget, enforced with `AbortSignal.timeout`. @default 30000 */\n readonly timeoutMs?: number;\n /** Sent on every request, under anything a call sets itself. */\n readonly headers?: Readonly<Record<string, string>>;\n readonly retry?: RetryOptions<unknown>;\n /**\n * Forward the inbound request id to the upstream, so one trace spans both\n * services. `true` uses `x-request-id`; a string names the header. Read from\n * `RequestContext`, so it only carries when there is a request in scope.\n *\n * @default true\n */\n readonly propagateRequestId?: boolean | string;\n /** Bound as its own token, so a second client can be injected by name. */\n readonly name?: string;\n /**\n * Bun-only `fetch` extensions, passed straight through. None of these exist on\n * Node's fetch, and they are the reason an outbound client on Bun can do things a\n * ported one cannot: talk through a proxy, pin a certificate, or reach a unix\n * socket, with no dependency.\n */\n readonly proxy?: string;\n readonly tls?: Bun.TLSOptions;\n readonly unix?: string;\n /** @default true - Bun decompresses by default. */\n readonly decompress?: boolean;\n /** Bun's own request/response tracing on stderr. Never on in production. */\n readonly verbose?: boolean;\n}\n\nexport const DEFAULT_REQUEST_ID_HEADER = 'x-request-id';\n\n/**\n * The resolved options, as a class so it is both the injection token and the type\n * a factory annotates - the same trick `RedisOptions` and `ConfigService` use.\n */\nexport class HttpClientOptions {\n readonly baseUrl: string | undefined;\n readonly timeoutMs: number;\n readonly headers: Readonly<Record<string, string>>;\n readonly retry: RetryOptions<unknown>;\n readonly requestIdHeader: string | undefined;\n readonly name: string | undefined;\n readonly fetchOptions: Readonly<Record<string, unknown>>;\n\n constructor(init: HttpClientOptionsInit = {}) {\n this.baseUrl =\n init.baseUrl === undefined ? undefined : String(init.baseUrl);\n this.timeoutMs = init.timeoutMs ?? 30_000;\n this.headers = init.headers ?? {};\n this.retry = init.retry ?? {};\n this.name = init.name;\n\n const propagate = init.propagateRequestId ?? true;\n this.requestIdHeader =\n propagate === false\n ? undefined\n : propagate === true\n ? DEFAULT_REQUEST_ID_HEADER\n : propagate;\n\n // Only the keys actually set: `exactOptionalPropertyTypes` means passing\n // `proxy: undefined` is not the same as omitting it, and Bun reads presence.\n this.fetchOptions = Object.fromEntries(\n (\n [\n ['proxy', init.proxy],\n ['tls', init.tls],\n ['unix', init.unix],\n ['decompress', init.decompress],\n ['verbose', init.verbose],\n ] as const\n ).filter(([, value]) => value !== undefined),\n );\n }\n}\nObject.defineProperty(HttpClientOptions, Symbol.for('dunx.deps'), {\n value: () => [{ unresolved: \"init: HttpClientOptionsInit = {}\" }],\n});\n",
8
8
  "import { HttpStatusCode } from '../server/status.js';\nimport { FetchError, FetchTransportError } from './errors.js';\n\n/**\n * Retry, backoff and `Retry-After`, with no dependency.\n *\n * `crypto.getRandomValues` supplies the jitter. `Math.random` is what the source\n * this was ported from used and is banned repo-wide for anything that matters -\n * jitter matters, because decorrelating retries is the whole reason it exists. The\n * alternative, `@arkv/rng`, is a 64 KB WebAssembly PRNG, which is a lot of weight\n * to put in every deployment of the most-imported package to choose a number of\n * milliseconds. `crypto.getRandomValues` is a Web standard Bun implements natively,\n * is a CSPRNG, and costs nothing.\n */\nconst uniform = (): number => {\n const buffer = new Uint32Array(1);\n crypto.getRandomValues(buffer);\n // 2**32 rather than 0xffffffff, so the result is [0, 1) and never exactly 1.\n return (buffer[0] ?? 0) / 2 ** 32;\n};\n\nexport interface BackoffOptions {\n /** Base delay, doubled each attempt. */\n readonly baseMs: number;\n /** @default 2 */\n readonly power?: number;\n /** Upper bound of the random component added to each delay. @default 1000 */\n readonly jitterMs?: number;\n /** @default 30000 */\n readonly maxMs?: number;\n}\n\n/** `base * power^attempt + jitter`, capped. `attempt` is 0 for the first retry. */\nexport const backoffDelay = (\n attempt: number,\n { baseMs, power = 2, jitterMs = 1000, maxMs = 30_000 }: BackoffOptions,\n): number => Math.min(baseMs * power ** attempt + uniform() * jitterMs, maxMs);\n\n/**\n * The wait an upstream asked for, in ms, or undefined.\n *\n * RFC 9110 allows either a delay in seconds or an HTTP date, and both appear in\n * the wild - GitHub sends seconds, some CDNs send a date. Ignoring the header, as\n * the reference did, means retrying straight back into a rate limit that had just\n * told you exactly how long to wait.\n */\nexport const retryAfterMs = (\n headers: Headers,\n now: number = Date.now(),\n): number | undefined => {\n const header = headers.get('retry-after');\n if (header === null) return undefined;\n\n const seconds = Number(header);\n if (Number.isFinite(seconds)) return Math.max(0, seconds * 1000);\n\n const at = Date.parse(header);\n return Number.isNaN(at) ? undefined : Math.max(0, at - now);\n};\n\n/**\n * Statuses worth trying again: a server that failed, one that is overloaded, and\n * one that timed out. Deliberately narrower than the source, which also retried\n * 409 and 422 - both of those are the server rejecting the *request*, and sending\n * it again unchanged gets the same answer.\n */\nexport const isRetryableStatus = (status: number): boolean =>\n status >= HttpStatusCode.INTERNAL_SERVER_ERROR ||\n status === HttpStatusCode.REQUEST_TIMEOUT ||\n status === HttpStatusCode.TOO_MANY_REQUESTS;\n\nexport interface RetryOptions<T> {\n /** Retries *after* the first attempt, so 3 means up to 4 calls. @default 3 */\n readonly maxRetries?: number;\n /** @default 1000 */\n readonly retryDelayMs?: number;\n readonly backoff?: Omit<BackoffOptions, 'baseMs'>;\n /** @default isRetryableStatus */\n readonly shouldRetryOnStatus?: (status: number) => boolean;\n /** Honour a `Retry-After` header over the computed backoff. @default true */\n readonly respectRetryAfter?: boolean;\n readonly onAttempt?: (attempt: number, isRetry: boolean) => void;\n readonly onError?: (\n error: unknown,\n attempt: number,\n willRetry: boolean,\n ) => void;\n readonly onSuccess?: (result: T, attempt: number) => void;\n}\n\n/**\n * Whether an error is worth another attempt, and how long to wait first.\n *\n * An abort is never retried: the caller's signal fired or the timeout expired, and\n * both mean the budget for this call is spent. A transport failure is retried,\n * because a refused connection is the case retrying exists for.\n */\nconst decide = <T>(\n error: unknown,\n attempt: number,\n options: RetryOptions<T>,\n): { readonly retry: boolean; readonly delayMs: number } => {\n const {\n retryDelayMs = 1000,\n backoff,\n shouldRetryOnStatus = isRetryableStatus,\n respectRetryAfter = true,\n } = options;\n const computed = backoffDelay(attempt, { baseMs: retryDelayMs, ...backoff });\n\n if (error instanceof FetchTransportError) {\n return { retry: !error.aborted, delayMs: computed };\n }\n\n if (error instanceof FetchError) {\n if (!shouldRetryOnStatus(error.status)) return { retry: false, delayMs: 0 };\n const asked = respectRetryAfter\n ? retryAfterMs(error.response.headers)\n : undefined;\n // Still capped by the backoff ceiling: an upstream asking for an hour should\n // not park a request handler for an hour.\n const maxMs = backoff?.maxMs ?? 30_000;\n return {\n retry: true,\n delayMs: asked === undefined ? computed : Math.min(asked, maxMs),\n };\n }\n\n // Something other than a fetch failure - a JSON parse, a callback throwing.\n // Retried, matching the source, because a non-HTTP error carries no verdict.\n return { retry: true, delayMs: computed };\n};\n\n/**\n * Runs `operation`, retrying per `options`.\n *\n * `Bun.sleep` rather than a `setTimeout` promise: it is the runtime's own timer and\n * needs no wrapper.\n */\nexport const executeWithRetry = async <T>(\n operation: () => Promise<T> | T,\n options: RetryOptions<T> = {},\n): Promise<T> => {\n const { maxRetries = 3, onAttempt, onError, onSuccess } = options;\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetries; attempt += 1) {\n onAttempt?.(attempt + 1, attempt > 0);\n try {\n const result = await operation();\n onSuccess?.(result, attempt + 1);\n return result;\n } catch (error) {\n lastError = error;\n const { retry, delayMs } = decide(error, attempt, options);\n const willRetry = retry && attempt < maxRetries;\n onError?.(error, attempt + 1, willRetry);\n\n if (!willRetry) throw error;\n await Bun.sleep(delayMs);\n }\n }\n\n // Unreachable: the loop either returns or throws. Kept so the signature does not\n // need `T | undefined`.\n throw lastError;\n};\n",
9
9
  "import {\n Logger,\n provide,\n RequestContext,\n token,\n type Deps,\n type DynamicModule,\n type FactoryProvider,\n type Token,\n} from '@dunx/core';\nimport { HttpClientOptions, type HttpClientOptionsInit } from './options.js';\nimport { HttpService } from './service.js';\n\nconst tokens = new Map<string, Token<HttpService>>();\n\n/**\n * The token a named client is bound to.\n *\n * Memoised, because `token()` returns a fresh object every call - without this the\n * module and the consumer would hold different tokens for `'stripe'` and the lookup\n * would miss. Same name in, same token out.\n *\n * A `Token` is not a constructor type, so a named client cannot be a constructor\n * parameter. Reach it with `inject()` in a field initialiser:\n *\n * ```ts\n * class Payments {\n * readonly stripe = inject(httpClient('stripe'));\n * }\n * ```\n */\nexport const httpClient = (name: string): Token<HttpService> => {\n const existing = tokens.get(name);\n if (existing) return existing;\n const created = token<HttpService>(`HttpService(${name})`);\n tokens.set(name, created);\n return created;\n};\n\nconst serviceFrom = (\n target: Token<HttpService> | typeof HttpService,\n optionsToken: Token<HttpClientOptions> | typeof HttpClientOptions,\n) =>\n provide(target, {\n useFactory: (\n options: HttpClientOptions,\n logger: Logger,\n context: RequestContext,\n ) => new HttpService(options, logger, context),\n inject: [optionsToken, Logger, RequestContext] as const,\n });\n\n/**\n * A named client binds its own options token, so two of them do not collide on\n * `HttpClientOptions` - the flat container reports that as a duplicate binding.\n */\nconst namedModule = (\n name: string,\n options: HttpClientOptions | FactoryProvider<HttpClientOptions, Deps>,\n): DynamicModule => {\n const optionsToken = token<HttpClientOptions>(`HttpClientOptions(${name})`);\n const optionsProvider =\n options instanceof HttpClientOptions\n ? provide(optionsToken, { useValue: options })\n : provide(optionsToken, options);\n\n return {\n module: HttpModule,\n providers: [optionsProvider, serviceFrom(httpClient(name), optionsToken)],\n };\n};\n\n/**\n * The outbound half of `@dunx/http`.\n *\n * Named `HttpModule` and `HttpService` under the `./client` subpath rather than in\n * the root barrel, where `HttpFactory` already means the inbound direction. The\n * subpath is what keeps the name unambiguous at the import site:\n *\n * ```ts\n * import { HttpFactory } from '@dunx/http'; // serving\n * import { HttpModule } from '@dunx/http/client'; // calling out\n * ```\n *\n * It depends on `Logger` and `RequestContext`, both of which core always binds, so\n * it works in an app that imported no logging module at all.\n */\nexport class HttpModule {\n /**\n * Binds `HttpService` and `HttpClientOptions`, or `httpClient(init.name)` alone\n * when `name` is set - a named registration deliberately does not also claim\n * `HttpService`, so several upstreams can coexist alongside one default.\n */\n static forRoot(init: HttpClientOptionsInit = {}): DynamicModule {\n const options = new HttpClientOptions(init);\n if (options.name !== undefined) return namedModule(options.name, options);\n\n return {\n module: HttpModule,\n providers: [\n provide(HttpClientOptions, { useValue: options }),\n serviceFrom(HttpService, HttpClientOptions),\n ],\n };\n }\n\n /**\n * `forRoot` with the options behind a factory, which is the one thing a\n * zero-argument `forRoot` cannot do: read the base url or the timeout off\n * `ConfigService`.\n *\n * There is no separate async machinery - the container resolves eagerly and\n * awaits factories before any constructor runs, so awaited config is settled by\n * the time anything is built.\n *\n * ```ts\n * HttpModule.forRootAsync({\n * useFactory: (config: AppConfigService) => ({\n * baseUrl: config.get('upstream').url,\n * }),\n * inject: [AppConfigService],\n * });\n * ```\n *\n * `name` is a parameter rather than a field of the awaited init, because the\n * token has to exist before the factory runs.\n */\n static forRootAsync(\n load: () => HttpClientOptionsInit | Promise<HttpClientOptionsInit>,\n name?: string,\n ): DynamicModule;\n static forRootAsync<const D extends Deps>(\n config: FactoryProvider<HttpClientOptionsInit, D>,\n name?: string,\n ): DynamicModule;\n static forRootAsync(\n source:\n | (() => HttpClientOptionsInit | Promise<HttpClientOptionsInit>)\n | FactoryProvider<HttpClientOptionsInit, Deps>,\n name?: string,\n ): DynamicModule {\n const load = typeof source === 'function' ? source : source.useFactory;\n const inject = typeof source === 'function' ? [] : (source.inject ?? []);\n const useFactory = async (\n ...deps: readonly unknown[]\n ): Promise<HttpClientOptions> => new HttpClientOptions(await load(...deps));\n\n if (name !== undefined) {\n return namedModule(name, { useFactory, inject } as FactoryProvider<\n HttpClientOptions,\n Deps\n >);\n }\n\n return {\n module: HttpModule,\n providers: [\n provide(HttpClientOptions, { useFactory, inject } as FactoryProvider<\n HttpClientOptions,\n Deps\n >),\n serviceFrom(HttpService, HttpClientOptions),\n ],\n };\n }\n}\n",
10
- "import { Logger, RequestContext } from '@dunx/core';\nimport { UrlHelper, type ParamsType } from '@arkv/shared';\nimport type { HttpMethod } from '../route/marker.js';\nimport { FetchError, FetchTransportError } from './errors.js';\nimport { isJsonBody, safeStringify } from './json.js';\nimport { HttpClientOptions } from './options.js';\nimport { executeWithRetry, type RetryOptions } from './retry.js';\n\n/** The client speaks two more verbs than a route can declare. */\nexport type RequestMethod = HttpMethod | 'HEAD' | 'OPTIONS';\n\n/**\n * `@arkv/shared`'s own param type, imported rather than restated - a local copy\n * would drift from what `buildUrl` actually accepts, which is how `null` ended up\n * in the first draft of this file and `interpolate` would never have seen it.\n */\ntype Params = ParamsType;\n\n/**\n * `fetch`'s own body type, derived from its signature. `BodyInit` is not a global\n * here: the root tsconfig sets `lib: [\"ESNext\"]` with no DOM, so the name does not\n * exist even though the value does. Reading it off `typeof fetch` needs no lib and\n * cannot disagree with the runtime.\n */\ntype FetchBody = NonNullable<NonNullable<Parameters<typeof fetch>[1]>['body']>;\n\nexport type HeaderFactory = (params: {\n /** Unix seconds, which is what every HMAC scheme signs. */\n readonly timestamp: number;\n readonly method: RequestMethod;\n /** `pathname + search`, the part such schemes sign. */\n readonly requestPath: string;\n /** The serialised body, or `''`. */\n readonly body: string;\n}) => Record<string, string>;\n\nexport interface RequestConfig<TRequest = unknown, TResponse = unknown> {\n readonly method: RequestMethod;\n /** Absolute, or relative to `baseUrl`. Omit when `baseUrl` plus `path` is enough. */\n readonly url?: string | URL;\n readonly payload?: TRequest;\n readonly headers?: Readonly<Record<string, string>>;\n /** Appended to the base, with `{param}` interpolated from `pathParams`. */\n readonly path?: string;\n readonly pathParams?: Params;\n readonly queryParams?: Params;\n /** Overrides the client's default budget. */\n readonly timeoutMs?: number;\n /** Called once per attempt, so a signature covers the body it is sent with. */\n readonly headerFactory?: HeaderFactory;\n /** Merged into the async context for this call, so its logs carry it. */\n readonly flow?: string;\n readonly retry?: RetryOptions<TResponse>;\n /** Cancels the call. Combined with the timeout, whichever fires first. */\n readonly signal?: AbortSignal;\n}\n\ntype BaseOptions<TRequest, TResponse> = Omit<\n RequestConfig<TRequest, TResponse>,\n 'method' | 'url' | 'payload'\n>;\n\n/**\n * What `send` reads. Narrower than `RequestConfig` on purpose: `RetryOptions<T>` is\n * invariant in `T` - its `onSuccess` takes a `T` and its callbacks return one - so a\n * `RequestConfig<_, TResponse>` is not assignable to a `RequestConfig<_, unknown>`.\n * `send` never touches `retry`, so leaving it out is both true and assignable.\n */\ninterface SendConfig {\n readonly method: RequestMethod;\n readonly headers?: Readonly<Record<string, string>>;\n readonly timeoutMs?: number;\n readonly headerFactory?: HeaderFactory;\n readonly signal?: AbortSignal;\n}\n\n/**\n * A `fetch` client with a per-request timeout, retry with backoff, request-id\n * propagation and one log line per call.\n *\n * `fetch` and nothing else: it is a Web standard Bun implements natively, so there\n * is no client dependency to justify - which is also why `axios` and `node-fetch`\n * are banned repo-wide. What this adds over calling `fetch` yourself is the parts\n * every caller otherwise reimplements slightly differently: the timeout, the\n * retry policy, `Retry-After`, url building, and a failure that says which call\n * failed.\n *\n * Extends `UrlHelper` from `@arkv/shared`, so `buildUrl` and `interpolate` are\n * available on the service, and there is one implementation of them across the\n * owner's projects rather than a fork per repo.\n */\nexport class HttpService extends UrlHelper {\n constructor(\n private readonly options: HttpClientOptions,\n private readonly logger: Logger,\n private readonly requestContext: RequestContext,\n ) {\n super();\n }\n\n async request<TRequest = unknown, TResponse = unknown>(\n config: RequestConfig<TRequest, TResponse>,\n ): Promise<TResponse> {\n const url = this.urlFor(config);\n const startedAt = Date.now();\n let attempts = 0;\n let status: number | undefined;\n\n /**\n * Serialised **once**, outside the retry loop. A body does not change between\n * attempts - only the signature over it does, and `headerFactory` gets a fresh\n * timestamp per attempt from `send`.\n *\n * Doing it inside meant a caller's own `JSON.stringify` failure, a circular\n * payload, was treated as a retryable error: three attempts and eight seconds of\n * backoff before surfacing a bug that no amount of retrying could fix. It also\n * re-serialised a large body on every attempt.\n */\n const { body, serialised } = this.bodyFor(config.payload);\n\n /**\n * A stream body is consumed by the first attempt, so a second would send an\n * empty one. Retrying is switched off rather than left to fail as a confusing\n * \"body already used\" on the retry.\n */\n const replayable = !(config.payload instanceof ReadableStream);\n\n const attempt = async (): Promise<TResponse> => {\n attempts += 1;\n const response = await this.send(config, url, body, serialised);\n status = response.status;\n\n if (!response.ok) {\n throw new FetchError(\n response.status,\n response.statusText,\n await readBody(response),\n {\n method: config.method,\n url: url.href,\n headers: response.headers,\n },\n );\n }\n\n return (await readBody(response)) as TResponse;\n };\n\n const describe = (): string => `${config.method} ${url.href}`;\n\n try {\n const result = await this.requestContext.runWithContext(\n {\n ...(config.flow === undefined ? {} : { flow: config.flow }),\n event: config.path ?? url.pathname,\n },\n () =>\n executeWithRetry(attempt, {\n ...this.options.retry,\n ...config.retry,\n ...(replayable ? {} : { maxRetries: 0 }),\n } as RetryOptions<TResponse>),\n );\n\n this.logger.debug(`${describe()} succeeded`, {\n status,\n attempts,\n elapsedMs: Date.now() - startedAt,\n });\n return result;\n } catch (error) {\n this.logger.error(`${describe()} failed`, {\n // `safeStringify`, not the error object: an upstream body can carry a cycle\n // and this is the one place that must not throw while reporting a throw.\n err: safeStringify(describeError(error)),\n attempts,\n elapsedMs: Date.now() - startedAt,\n });\n throw error;\n }\n }\n\n get<TResponse = unknown>(\n url?: string | URL,\n options?: BaseOptions<never, TResponse>,\n ): Promise<TResponse> {\n return this.request<never, TResponse>({\n method: 'GET',\n ...options,\n ...urlOf(url),\n });\n }\n\n post<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'POST',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n put<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'PUT',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n patch<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'PATCH',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n delete<TResponse = unknown>(\n url?: string | URL,\n options?: BaseOptions<never, TResponse>,\n ): Promise<TResponse> {\n return this.request<never, TResponse>({\n method: 'DELETE',\n ...options,\n ...urlOf(url),\n });\n }\n\n /**\n * Yields each `data:` payload of a Server-Sent-Events response, consuming the\n * terminating `[DONE]` sentinel rather than yielding it.\n *\n * **No retry**, deliberately: a partially consumed stream cannot be replayed, so\n * retrying would re-deliver events the caller has already seen. The timeout\n * covers the connect only - it is dropped once headers arrive, or a long-lived\n * stream would be cut off mid-flight.\n *\n * Hand-rolled rather than delegated: Bun exposes no `EventSource` global and no\n * SSE parser, which was measured rather than assumed.\n */\n async *streamSse<TRequest = unknown>(\n config: Omit<RequestConfig<TRequest>, 'method' | 'retry'> & {\n readonly method?: 'GET' | 'POST';\n },\n ): AsyncGenerator<string> {\n const url = this.urlFor(config);\n const method = config.method ?? 'POST';\n const startedAt = Date.now();\n const { body, serialised } = this.bodyFor(config.payload);\n\n const response = await this.send(\n { ...config, method },\n url,\n body,\n serialised,\n 'text/event-stream',\n );\n\n if (!response.ok || response.body === null) {\n throw new FetchError(\n response.status,\n response.statusText,\n await readBody(response),\n { method, url: url.href, headers: response.headers },\n );\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n\n let newline = buffer.indexOf('\\n');\n while (newline !== -1) {\n const line = buffer.slice(0, newline).trim();\n buffer = buffer.slice(newline + 1);\n newline = buffer.indexOf('\\n');\n\n if (!line.startsWith('data:')) continue;\n const data = line.slice(5).trim();\n if (data === '[DONE]') return;\n yield data;\n }\n }\n } finally {\n reader.releaseLock();\n this.logger.debug(`SSE ${method} ${url.href} closed`, {\n elapsedMs: Date.now() - startedAt,\n });\n }\n }\n\n /**\n * Resolves the target, accepting the three forms a caller actually reaches for:\n * an absolute url, a path relative to `baseUrl`, or `baseUrl` plus an explicit\n * `path`.\n *\n * `get('/users')` is the one worth calling out. A relative first argument is what\n * every HTTP client takes once a base url exists, and passing it straight to\n * `buildUrl` throws `ERR_INVALID_URL` from inside `new URL()` - a message naming\n * neither the call nor the missing base. So a first argument that is not an\n * absolute url is treated as the path, which is what it reads as.\n *\n * `URL.canParse` decides, rather than a regex over `//` or `:` - it is the same\n * parser `new URL` uses, so the two cannot disagree.\n */\n private urlFor(config: {\n readonly url?: string | URL;\n readonly path?: string;\n readonly pathParams?: Params;\n readonly queryParams?: Params;\n }): URL {\n const given = config.url === undefined ? undefined : String(config.url);\n const absolute =\n given !== undefined && given !== '' && URL.canParse(given)\n ? given\n : undefined;\n const relative = given === '' || absolute !== undefined ? undefined : given;\n const base = absolute ?? this.options.baseUrl;\n\n if (base === undefined) {\n throw new FetchTransportError(\n { method: 'GET', url: given ?? config.path ?? '(none)' },\n false,\n {\n cause: new Error(\n 'No url to call. Pass an absolute url, or set baseUrl on ' +\n 'HttpModule.forRoot and pass a path.',\n ),\n },\n );\n }\n\n // An explicit `path` wins over a relative first argument, so a call cannot\n // silently request two different paths.\n const path = config.path ?? relative;\n\n return this.buildUrl({\n base,\n ...(path === undefined ? {} : { path }),\n ...(config.pathParams === undefined\n ? {}\n : { pathParams: config.pathParams }),\n ...(config.queryParams === undefined\n ? {}\n : { queryParams: config.queryParams }),\n });\n }\n\n /** `serialised` is what a `headerFactory` signs, and is `''` for no body. */\n private bodyFor(payload: unknown): {\n body: FetchBody | undefined;\n serialised: string;\n json: boolean;\n } {\n if (payload === undefined || payload === null) {\n return { body: undefined, serialised: '', json: false };\n }\n if (!isJsonBody(payload)) {\n return { body: payload as FetchBody, serialised: '', json: false };\n }\n // Plain `JSON.stringify`, deliberately not `safeStringify`: a cycle here must\n // throw rather than be sent upstream as \"[Circular]\".\n const serialised = JSON.stringify(payload);\n return { body: serialised, serialised, json: true };\n }\n\n private async send(\n config: SendConfig,\n url: URL,\n body: FetchBody | undefined,\n serialised: string,\n accept = 'application/json',\n ): Promise<Response> {\n const requestId =\n this.options.requestIdHeader === undefined\n ? undefined\n : this.requestContext.getContext().requestId;\n\n const headers: Record<string, string> = {\n accept,\n ...(serialised === '' ? {} : { 'content-type': 'application/json' }),\n ...this.options.headers,\n ...(requestId === undefined || this.options.requestIdHeader === undefined\n ? {}\n : { [this.options.requestIdHeader]: requestId }),\n ...config.headerFactory?.({\n timestamp: Math.floor(Date.now() / 1000),\n method: config.method,\n requestPath: url.pathname + url.search,\n body: serialised,\n }),\n ...config.headers,\n };\n\n /**\n * `AbortSignal.timeout` plus `AbortSignal.any`, rather than an\n * `AbortController` with a `setTimeout` and a `clearTimeout` in a `finally`.\n * Both are Web standards Bun implements, the timer is the runtime's to cancel,\n * and combining the caller's signal with the budget is one call instead of a\n * second listener that has to be removed.\n */\n const timeoutMs = config.timeoutMs ?? this.options.timeoutMs;\n const signals = [\n ...(timeoutMs > 0 ? [AbortSignal.timeout(timeoutMs)] : []),\n ...(config.signal === undefined ? [] : [config.signal]),\n ];\n\n try {\n return await fetch(url.href, {\n method: config.method,\n headers,\n ...(body === undefined ? {} : { body }),\n ...(signals.length === 0 ? {} : { signal: AbortSignal.any(signals) }),\n ...this.options.fetchOptions,\n });\n } catch (error) {\n // `fetch` reports a refused connection, a DNS failure and an abort all as\n // exceptions with nothing naming the call. Wrapped so the message does.\n const aborted =\n error instanceof Error &&\n (error.name === 'AbortError' || error.name === 'TimeoutError');\n throw new FetchTransportError(\n { method: config.method, url: url.href },\n aborted,\n { cause: error },\n );\n }\n }\n}\nObject.defineProperty(HttpService, Symbol.for('dunx.deps'), {\n value: () => [HttpClientOptions, Logger, RequestContext],\n});\n\nconst urlOf = (url?: string | URL): { url?: string | URL } =>\n url === undefined ? {} : { url };\n\n/** JSON when the upstream said so or the body parses; text otherwise; undefined for empty. */\nconst readBody = async (response: Response): Promise<unknown> => {\n const text = await response.text().catch(() => '');\n if (text === '') return undefined;\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return text;\n }\n};\n\nconst describeError = (error: unknown): Record<string, unknown> => {\n if (error instanceof FetchError) {\n return {\n name: error.name,\n message: error.message,\n status: error.status,\n body: error.body,\n };\n }\n if (error instanceof Error) {\n return { name: error.name, message: error.message };\n }\n return { message: String(error) };\n};\n"
10
+ "import { Logger, RequestContext } from '@dunx/core';\nimport { UrlHelper, type ParamsType } from '@arkv/shared';\nimport type { HttpMethod } from '../route/marker.js';\nimport { FetchError, FetchTransportError } from './errors.js';\nimport { isJsonBody, safeStringify } from './json.js';\nimport { HttpClientOptions } from './options.js';\nimport { executeWithRetry, type RetryOptions } from './retry.js';\n\n/** The client speaks two more verbs than a route can declare. */\nexport type RequestMethod = HttpMethod | 'HEAD' | 'OPTIONS';\n\n/**\n * `@arkv/shared`'s own param type, imported rather than restated - a local copy\n * would drift from what `buildUrl` actually accepts, which is how `null` ended up\n * in the first draft of this file and `interpolate` would never have seen it.\n */\ntype Params = ParamsType;\n\n/**\n * `fetch`'s own body type, derived from its signature. `BodyInit` is not a global\n * here: the root tsconfig sets `lib: [\"ESNext\"]` with no DOM, so the name does not\n * exist even though the value does. Reading it off `typeof fetch` needs no lib and\n * cannot disagree with the runtime.\n */\ntype FetchBody = NonNullable<NonNullable<Parameters<typeof fetch>[1]>['body']>;\n\nexport type HeaderFactory = (params: {\n /** Unix seconds, which is what every HMAC scheme signs. */\n readonly timestamp: number;\n readonly method: RequestMethod;\n /** `pathname + search`, the part such schemes sign. */\n readonly requestPath: string;\n /** The serialised body, or `''`. */\n readonly body: string;\n}) => Record<string, string>;\n\nexport interface RequestConfig<TRequest = unknown, TResponse = unknown> {\n readonly method: RequestMethod;\n /** Absolute, or relative to `baseUrl`. Omit when `baseUrl` plus `path` is enough. */\n readonly url?: string | URL;\n readonly payload?: TRequest;\n readonly headers?: Readonly<Record<string, string>>;\n /** Appended to the base, with `{param}` interpolated from `pathParams`. */\n readonly path?: string;\n readonly pathParams?: Params;\n readonly queryParams?: Params;\n /** Overrides the client's default budget. */\n readonly timeoutMs?: number;\n /** Called once per attempt, so a signature covers the body it is sent with. */\n readonly headerFactory?: HeaderFactory;\n /** Merged into the async context for this call, so its logs carry it. */\n readonly flow?: string;\n readonly retry?: RetryOptions<TResponse>;\n /** Cancels the call. Combined with the timeout, whichever fires first. */\n readonly signal?: AbortSignal;\n}\n\ntype BaseOptions<TRequest, TResponse> = Omit<\n RequestConfig<TRequest, TResponse>,\n 'method' | 'url' | 'payload'\n>;\n\n/**\n * What `send` reads. Narrower than `RequestConfig` on purpose: `RetryOptions<T>` is\n * invariant in `T` - its `onSuccess` takes a `T` and its callbacks return one - so a\n * `RequestConfig<_, TResponse>` is not assignable to a `RequestConfig<_, unknown>`.\n * `send` never touches `retry`, so leaving it out is both true and assignable.\n */\ninterface SendConfig {\n readonly method: RequestMethod;\n readonly headers?: Readonly<Record<string, string>>;\n readonly timeoutMs?: number;\n readonly headerFactory?: HeaderFactory;\n readonly signal?: AbortSignal;\n}\n\n/**\n * A `fetch` client with a per-request timeout, retry with backoff, request-id\n * propagation and one log line per call.\n *\n * `fetch` and nothing else: it is a Web standard Bun implements natively, so there\n * is no client dependency to justify - which is also why `axios` and `node-fetch`\n * are banned repo-wide. What this adds over calling `fetch` yourself is the parts\n * every caller otherwise reimplements slightly differently: the timeout, the\n * retry policy, `Retry-After`, url building, and a failure that says which call\n * failed.\n *\n * Extends `UrlHelper` from `@arkv/shared`, so `buildUrl` and `interpolate` are\n * available on the service, and there is one implementation of them across the\n * owner's projects rather than a fork per repo.\n */\nexport class HttpService extends UrlHelper {\n constructor(\n private readonly options: HttpClientOptions,\n private readonly logger: Logger,\n private readonly requestContext: RequestContext,\n ) {\n super();\n }\n\n async request<TRequest = unknown, TResponse = unknown>(\n config: RequestConfig<TRequest, TResponse>,\n ): Promise<TResponse> {\n const url = this.urlFor(config);\n const startedAt = Date.now();\n let attempts = 0;\n let status: number | undefined;\n\n /**\n * Serialised **once**, outside the retry loop. A body does not change between\n * attempts - only the signature over it does, and `headerFactory` gets a fresh\n * timestamp per attempt from `send`.\n *\n * Doing it inside meant a caller's own `JSON.stringify` failure, a circular\n * payload, was treated as a retryable error: three attempts and eight seconds of\n * backoff before surfacing a bug that no amount of retrying could fix. It also\n * re-serialised a large body on every attempt.\n */\n const { body, serialised } = this.bodyFor(config.payload);\n\n /**\n * A stream body is consumed by the first attempt, so a second would send an\n * empty one. Retrying is switched off rather than left to fail as a confusing\n * \"body already used\" on the retry.\n */\n const replayable = !(config.payload instanceof ReadableStream);\n\n const attempt = async (): Promise<TResponse> => {\n attempts += 1;\n const response = await this.send(config, url, body, serialised);\n status = response.status;\n\n if (!response.ok) {\n throw new FetchError(\n response.status,\n response.statusText,\n await readBody(response),\n {\n method: config.method,\n url: url.href,\n headers: response.headers,\n },\n );\n }\n\n return (await readBody(response)) as TResponse;\n };\n\n const describe = (): string => `${config.method} ${url.href}`;\n\n try {\n const result = await this.requestContext.runWithContext(\n {\n ...(config.flow === undefined ? {} : { flow: config.flow }),\n event: config.path ?? url.pathname,\n },\n () =>\n executeWithRetry(attempt, {\n ...this.options.retry,\n ...config.retry,\n ...(replayable ? {} : { maxRetries: 0 }),\n } as RetryOptions<TResponse>),\n );\n\n this.logger.debug(`${describe()} succeeded`, {\n status,\n attempts,\n elapsedMs: Date.now() - startedAt,\n });\n return result;\n } catch (error) {\n this.logger.error(`${describe()} failed`, {\n // `safeStringify`, not the error object: an upstream body can carry a cycle\n // and this is the one place that must not throw while reporting a throw.\n err: safeStringify(describeError(error)),\n attempts,\n elapsedMs: Date.now() - startedAt,\n });\n throw error;\n }\n }\n\n get<TResponse = unknown>(\n url?: string | URL,\n options?: BaseOptions<never, TResponse>,\n ): Promise<TResponse> {\n return this.request<never, TResponse>({\n method: 'GET',\n ...options,\n ...urlOf(url),\n });\n }\n\n post<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'POST',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n put<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'PUT',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n patch<TRequest = unknown, TResponse = unknown>(\n url?: string | URL,\n payload?: TRequest,\n options?: BaseOptions<TRequest, TResponse>,\n ): Promise<TResponse> {\n return this.request<TRequest, TResponse>({\n method: 'PATCH',\n ...options,\n ...urlOf(url),\n ...(payload === undefined ? {} : { payload }),\n });\n }\n\n delete<TResponse = unknown>(\n url?: string | URL,\n options?: BaseOptions<never, TResponse>,\n ): Promise<TResponse> {\n return this.request<never, TResponse>({\n method: 'DELETE',\n ...options,\n ...urlOf(url),\n });\n }\n\n /**\n * Yields each `data:` payload of a Server-Sent-Events response, consuming the\n * terminating `[DONE]` sentinel rather than yielding it.\n *\n * **No retry**, deliberately: a partially consumed stream cannot be replayed, so\n * retrying would re-deliver events the caller has already seen. The timeout\n * covers the connect only - it is dropped once headers arrive, or a long-lived\n * stream would be cut off mid-flight.\n *\n * Hand-rolled rather than delegated: Bun exposes no `EventSource` global and no\n * SSE parser, which was measured rather than assumed.\n */\n async *streamSse<TRequest = unknown>(\n config: Omit<RequestConfig<TRequest>, 'method' | 'retry'> & {\n readonly method?: 'GET' | 'POST';\n },\n ): AsyncGenerator<string> {\n const url = this.urlFor(config);\n const method = config.method ?? 'POST';\n const startedAt = Date.now();\n const { body, serialised } = this.bodyFor(config.payload);\n\n const response = await this.send(\n { ...config, method },\n url,\n body,\n serialised,\n 'text/event-stream',\n );\n\n if (!response.ok || response.body === null) {\n throw new FetchError(\n response.status,\n response.statusText,\n await readBody(response),\n { method, url: url.href, headers: response.headers },\n );\n }\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n try {\n // Async iteration, not `getReader()`: it acquires the reader and releases it\n // on completion, on `break`, and on the `return` below when `[DONE]` arrives -\n // which is the case the manual form needed `releaseLock()` in a `finally` for.\n for await (const chunk of response.body) {\n buffer += decoder.decode(chunk, { stream: true });\n\n let newline = buffer.indexOf('\\n');\n while (newline !== -1) {\n const line = buffer.slice(0, newline).trim();\n buffer = buffer.slice(newline + 1);\n newline = buffer.indexOf('\\n');\n\n if (!line.startsWith('data:')) continue;\n const data = line.slice(5).trim();\n if (data === '[DONE]') return;\n yield data;\n }\n }\n } finally {\n this.logger.debug(`SSE ${method} ${url.href} closed`, {\n elapsedMs: Date.now() - startedAt,\n });\n }\n }\n\n /**\n * Resolves the target, accepting the three forms a caller actually reaches for:\n * an absolute url, a path relative to `baseUrl`, or `baseUrl` plus an explicit\n * `path`.\n *\n * `get('/users')` is the one worth calling out. A relative first argument is what\n * every HTTP client takes once a base url exists, and passing it straight to\n * `buildUrl` throws `ERR_INVALID_URL` from inside `new URL()` - a message naming\n * neither the call nor the missing base. So a first argument that is not an\n * absolute url is treated as the path, which is what it reads as.\n *\n * `URL.canParse` decides, rather than a regex over `//` or `:` - it is the same\n * parser `new URL` uses, so the two cannot disagree.\n */\n private urlFor(config: {\n readonly url?: string | URL;\n readonly path?: string;\n readonly pathParams?: Params;\n readonly queryParams?: Params;\n }): URL {\n const given = config.url === undefined ? undefined : String(config.url);\n const absolute =\n given !== undefined && given !== '' && URL.canParse(given)\n ? given\n : undefined;\n const relative = given === '' || absolute !== undefined ? undefined : given;\n const base = absolute ?? this.options.baseUrl;\n\n if (base === undefined) {\n throw new FetchTransportError(\n { method: 'GET', url: given ?? config.path ?? '(none)' },\n false,\n {\n cause: new Error(\n 'No url to call. Pass an absolute url, or set baseUrl on ' +\n 'HttpModule.forRoot and pass a path.',\n ),\n },\n );\n }\n\n // An explicit `path` wins over a relative first argument, so a call cannot\n // silently request two different paths.\n const path = config.path ?? relative;\n\n return this.buildUrl({\n base,\n ...(path === undefined ? {} : { path }),\n ...(config.pathParams === undefined\n ? {}\n : { pathParams: config.pathParams }),\n ...(config.queryParams === undefined\n ? {}\n : { queryParams: config.queryParams }),\n });\n }\n\n /** `serialised` is what a `headerFactory` signs, and is `''` for no body. */\n private bodyFor(payload: unknown): {\n body: FetchBody | undefined;\n serialised: string;\n json: boolean;\n } {\n if (payload === undefined || payload === null) {\n return { body: undefined, serialised: '', json: false };\n }\n if (!isJsonBody(payload)) {\n return { body: payload as FetchBody, serialised: '', json: false };\n }\n // Plain `JSON.stringify`, deliberately not `safeStringify`: a cycle here must\n // throw rather than be sent upstream as \"[Circular]\".\n const serialised = JSON.stringify(payload);\n return { body: serialised, serialised, json: true };\n }\n\n private async send(\n config: SendConfig,\n url: URL,\n body: FetchBody | undefined,\n serialised: string,\n accept = 'application/json',\n ): Promise<Response> {\n const requestId =\n this.options.requestIdHeader === undefined\n ? undefined\n : this.requestContext.getContext().requestId;\n\n const headers: Record<string, string> = {\n accept,\n ...(serialised === '' ? {} : { 'content-type': 'application/json' }),\n ...this.options.headers,\n ...(requestId === undefined || this.options.requestIdHeader === undefined\n ? {}\n : { [this.options.requestIdHeader]: requestId }),\n ...config.headerFactory?.({\n timestamp: Math.floor(Date.now() / 1000),\n method: config.method,\n requestPath: url.pathname + url.search,\n body: serialised,\n }),\n ...config.headers,\n };\n\n /**\n * `AbortSignal.timeout` plus `AbortSignal.any`, rather than an\n * `AbortController` with a `setTimeout` and a `clearTimeout` in a `finally`.\n * Both are Web standards Bun implements, the timer is the runtime's to cancel,\n * and combining the caller's signal with the budget is one call instead of a\n * second listener that has to be removed.\n */\n const timeoutMs = config.timeoutMs ?? this.options.timeoutMs;\n const signals = [\n ...(timeoutMs > 0 ? [AbortSignal.timeout(timeoutMs)] : []),\n ...(config.signal === undefined ? [] : [config.signal]),\n ];\n\n try {\n return await fetch(url.href, {\n method: config.method,\n headers,\n ...(body === undefined ? {} : { body }),\n ...(signals.length === 0 ? {} : { signal: AbortSignal.any(signals) }),\n ...this.options.fetchOptions,\n });\n } catch (error) {\n // `fetch` reports a refused connection, a DNS failure and an abort all as\n // exceptions with nothing naming the call. Wrapped so the message does.\n const aborted =\n error instanceof Error &&\n (error.name === 'AbortError' || error.name === 'TimeoutError');\n throw new FetchTransportError(\n { method: config.method, url: url.href },\n aborted,\n { cause: error },\n );\n }\n }\n}\nObject.defineProperty(HttpService, Symbol.for('dunx.deps'), {\n value: () => [HttpClientOptions, Logger, RequestContext],\n});\n\nconst urlOf = (url?: string | URL): { url?: string | URL } =>\n url === undefined ? {} : { url };\n\n/** JSON when the upstream said so or the body parses; text otherwise; undefined for empty. */\nconst readBody = async (response: Response): Promise<unknown> => {\n const text = await response.text().catch(() => '');\n if (text === '') return undefined;\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return text;\n }\n};\n\nconst describeError = (error: unknown): Record<string, unknown> => {\n if (error instanceof FetchError) {\n return {\n name: error.name,\n message: error.message,\n status: error.status,\n body: error.body,\n };\n }\n if (error instanceof Error) {\n return { name: error.name, message: error.message };\n }\n return { message: String(error) };\n};\n"
11
11
  ],
12
- "mappings": ";;;;;;AAAA;AAAA;AAsBO,MAAM,mBAAmB,SAAS;AAAA,EAI5B;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAPO,OAAO;AAAA,EAEzB,WAAW,CACA,QACA,YAEA,MACA,UAKT;AAAA,IACA,MACE,QAAQ,UAAU,mBAAmB,SAAS,UAAU,SAAS,KACnE;AAAA,IAZS;AAAA,IACA;AAAA,IAEA;AAAA,IACA;AAAA;AAUb;AACA,OAAO,eAAe,YAAY,OAAO,IAAI,WAAW,GAAG;AAAA,EACzD,OAAO,MAAM,CAAC,EAAE,YAAY,0BAA0B,GAAG,EAAE,YAAY,8BAA8B,GAAG,EAAE,YAAY,yBAAyB,GAAG,EAAE,YAAY;AAAA;AAAA;AAAA;AAAA,OAA6H,CAAC;AAChS,CAAC;AAAA;AAWM,MAAM,4BAA4B,SAAS;AAAA,EAIrC;AAAA,EAEA;AAAA,EALO,OAAO;AAAA,EAEzB,WAAW,CACA,UAEA,SACT,SACA;AAAA,IACA,MACE,GAAG,SAAS,UAAU,SAAS,eAC7B,UAAU,YAAY,qBAExB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,EAEnC,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,WAAW,CAAC,iBAAiB,YAAY,WAAW,IAAI,GAAG,YAAY,CAAC;AAAA,EAC1E;AAAA;AAAA;AAkBK,MAAM,WAAW;AAAA,SAMf,OAAO,CAAC,OAA8B,CAAC,GAAkB;AAAA,IAC9D,MAAM,UAAU,IAAI,kBAAkB,IAAI;AAAA,IAC1C,IAAI,QAAQ,SAAS;AAAA,MAAW,OAAO,YAAY,QAAQ,MAAM,OAAO;AAAA,IAExE,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,QACT,QAAQ,mBAAmB,EAAE,UAAU,QAAQ,CAAC;AAAA,QAChD,YAAY,aAAa,iBAAiB;AAAA,MAC5C;AAAA,IACF;AAAA;AAAA,SAgCK,YAAY,CACjB,QAGA,MACe;AAAA,IACf,MAAM,OAAO,OAAO,WAAW,aAAa,SAAS,OAAO;AAAA,IAC5D,MAAM,SAAS,OAAO,WAAW,aAAa,CAAC,IAAK,OAAO,UAAU,CAAC;AAAA,IACtE,MAAM,aAAa,UACd,SAC4B,IAAI,kBAAkB,MAAM,KAAK,GAAG,IAAI,CAAC;AAAA,IAE1E,IAAI,SAAS,WAAW;AAAA,MACtB,OAAO,YAAY,MAAM,EAAE,YAAY,OAAO,CAG7C;AAAA,IACH;AAAA,IAEA,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,QACT,QAAQ,mBAAmB,EAAE,YAAY,OAAO,CAG/C;AAAA,QACD,YAAY,aAAa,iBAAiB;AAAA,MAC5C;AAAA,IACF;AAAA;AAEJ;",
13
+ "debugId": "4FED9F52C0748CFA64756E2164756E21",
14
14
  "names": []
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunx/http",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Bun.serve adapter for the dunx framework: controllers, middleware and WebSocket gateways",
5
5
  "keywords": [
6
6
  "bun",
@@ -58,7 +58,7 @@
58
58
  "@dunx/core": "workspace:*"
59
59
  },
60
60
  "peerDependencies": {
61
- "@dunx/core": "^0.6.0",
61
+ "@dunx/core": "^0.6.1",
62
62
  "@types/bun": ">=1.3.0"
63
63
  },
64
64
  "peerDependenciesMeta": {