feat: init

This commit is contained in:
2026-02-13 22:02:30 +01:00
commit 8f9ff830fb
16711 changed files with 3307340 additions and 0 deletions

41
node_modules/srvx/dist/tracing.d.mts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
import { Server, ServerMiddleware, ServerPlugin, ServerRequest } from "./types.mjs";
//#region src/tracing.d.ts
/**
* @experimental Channel names, event types and config options may change in future releases.
*/
type RequestEvent = {
server: Server;
request: ServerRequest;
middleware?: {
index: number;
handler: ServerMiddleware;
};
};
/**
*
* @experimental Channel names, event types and config options may change in future releases.
*
* Tracing plugin that adds diagnostics channel tracing to middleware and fetch handlers.
*
* This plugin wraps all middleware and the fetch handler with tracing instrumentation,
* allowing you to subscribe to `srvx.request` and `srvx.middleware` tracing channels.
*
* @example
* ```ts
* import { serve } from "srvx";
* import { tracingPlugin } from "srvx/tracing";
*
* const server = serve({
* fetch: (req) => new Response("OK"),
* middleware: [myMiddleware],
* plugins: [tracingPlugin()],
* });
* ```
*/
declare function tracingPlugin(opts?: {
middleware?: boolean;
fetch?: boolean;
}): ServerPlugin;
//#endregion
export { RequestEvent, tracingPlugin };