blaizejs 0.5.3 → 0.6.0

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 (25) hide show
  1. package/dist/{chunk-VVEKNV22.js → chunk-5C4WI3A7.js} +3 -3
  2. package/dist/{chunk-JMYOXYX4.js → chunk-EOCNAQ76.js} +2 -2
  3. package/dist/{chunk-ZBJU7ZOM.js → chunk-GNLJMVOB.js} +3 -3
  4. package/dist/{chunk-NXPSLUP5.js → chunk-WTCIDURS.js} +3 -3
  5. package/dist/{chunk-BOFAGA5B.js → chunk-YE7LYWE6.js} +3 -3
  6. package/dist/index.cjs +9 -9
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +248 -26
  9. package/dist/index.d.ts +248 -26
  10. package/dist/index.js +11 -11
  11. package/dist/index.js.map +1 -1
  12. package/dist/{internal-server-error-MIWZOL6G.js → internal-server-error-MFDGHZTW.js} +3 -3
  13. package/dist/{payload-too-large-error-INCZ2WM7.js → payload-too-large-error-JESAYGED.js} +3 -3
  14. package/dist/{unsupported-media-type-error-BVGBPGOM.js → unsupported-media-type-error-ZDQCGXCO.js} +3 -3
  15. package/dist/{validation-error-BQK2BTX6.js → validation-error-KGPRZ5X7.js} +3 -3
  16. package/package.json +2 -2
  17. /package/dist/{chunk-VVEKNV22.js.map → chunk-5C4WI3A7.js.map} +0 -0
  18. /package/dist/{chunk-JMYOXYX4.js.map → chunk-EOCNAQ76.js.map} +0 -0
  19. /package/dist/{chunk-ZBJU7ZOM.js.map → chunk-GNLJMVOB.js.map} +0 -0
  20. /package/dist/{chunk-NXPSLUP5.js.map → chunk-WTCIDURS.js.map} +0 -0
  21. /package/dist/{chunk-BOFAGA5B.js.map → chunk-YE7LYWE6.js.map} +0 -0
  22. /package/dist/{internal-server-error-MIWZOL6G.js.map → internal-server-error-MFDGHZTW.js.map} +0 -0
  23. /package/dist/{payload-too-large-error-INCZ2WM7.js.map → payload-too-large-error-JESAYGED.js.map} +0 -0
  24. /package/dist/{unsupported-media-type-error-BVGBPGOM.js.map → unsupported-media-type-error-ZDQCGXCO.js.map} +0 -0
  25. /package/dist/{validation-error-BQK2BTX6.js.map → validation-error-KGPRZ5X7.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
- import http, { IncomingMessage, ServerResponse } from 'node:http';
4
- import http2, { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
3
+ import http, { IncomingMessage, ServerResponse, Server as Server$1 } from 'node:http';
4
+ import http2, { Http2ServerRequest, Http2ServerResponse, Http2Server } from 'node:http2';
5
5
  import { WriteStream } from 'node:fs';
6
6
  import { Readable } from 'node:stream';
7
7
  import { AsyncLocalStorage } from 'node:async_hooks';
@@ -1058,7 +1058,7 @@ declare function cors(userOptions?: CorsOptions | boolean): Middleware;
1058
1058
  /**
1059
1059
  * Create a middleware
1060
1060
  */
1061
- declare function create$2<TState = {}, TServices = {}>(handlerOrOptions: MiddlewareFunction | MiddlewareOptions): Middleware<TState, TServices>;
1061
+ declare function create$1<TState = {}, TServices = {}>(handlerOrOptions: MiddlewareFunction | MiddlewareOptions): Middleware<TState, TServices>;
1062
1062
  /**
1063
1063
  * Create a middleware that only contributes state (no services)
1064
1064
  * Convenience helper for state-only middleware
@@ -2470,28 +2470,179 @@ interface PluginOptions<_T = any> {
2470
2470
  [key: string]: any;
2471
2471
  }
2472
2472
  /**
2473
- * Plugin lifecycle hooks
2473
+ * Plugin lifecycle hooks with full type safety
2474
+ *
2475
+ * Plugins execute in this order:
2476
+ * 1. register() - Add middleware, routes
2477
+ * 2. initialize() - Create resources
2478
+ * 3. onServerStart() - Start background work
2479
+ * 4. onServerStop() - Stop background work
2480
+ * 5. terminate() - Cleanup resources
2481
+ */
2482
+ interface PluginHooks<TState = {}, TServices = {}> {
2483
+ /**
2484
+ * Called when plugin is registered to server
2485
+ *
2486
+ * Use this hook to:
2487
+ * - Add middleware via server.use()
2488
+ * - Add routes via server.router.addRoute()
2489
+ * - Subscribe to server events
2490
+ *
2491
+ * @param server - BlaizeJS server instance
2492
+ * @example
2493
+ * ```typescript
2494
+ * register: async (server) => {
2495
+ * server.use(createMiddleware({
2496
+ * handler: async (ctx, next) => {
2497
+ * ctx.services.db = db;
2498
+ * await next();
2499
+ * },
2500
+ * }));
2501
+ * }
2502
+ * ```
2503
+ */
2504
+ register?: (server: Server<TState, TServices>) => void | Promise<void>;
2505
+ /**
2506
+ * Called during server initialization
2507
+ *
2508
+ * Use this hook to:
2509
+ * - Create database connections
2510
+ * - Initialize services
2511
+ * - Allocate resources
2512
+ *
2513
+ * @example
2514
+ * ```typescript
2515
+ * initialize: async () => {
2516
+ * db = await Database.connect(config);
2517
+ * }
2518
+ * ```
2519
+ */
2520
+ initialize?: (server: Server<TState, TServices>) => void | Promise<void>;
2521
+ /**
2522
+ * Called when server starts listening
2523
+ *
2524
+ * Use this hook to:
2525
+ * - Start background workers
2526
+ * - Start cron jobs
2527
+ * - Begin health checks
2528
+ *
2529
+ * @example
2530
+ * ```typescript
2531
+ * onServerStart: async () => {
2532
+ * worker = new BackgroundWorker();
2533
+ * await worker.start();
2534
+ * }
2535
+ * ```
2536
+ */
2537
+ onServerStart?: (server: Http2Server | Server$1) => void | Promise<void>;
2538
+ /**
2539
+ * Called when server stops listening
2540
+ *
2541
+ * Use this hook to:
2542
+ * - Stop background workers
2543
+ * - Flush buffers
2544
+ * - Complete in-flight work
2545
+ *
2546
+ * @example
2547
+ * ```typescript
2548
+ * onServerStop: async () => {
2549
+ * await worker.stop({ graceful: true });
2550
+ * }
2551
+ * ```
2552
+ */
2553
+ onServerStop?: (server: Http2Server | Server$1) => void | Promise<void>;
2554
+ /**
2555
+ * Called during server termination
2556
+ *
2557
+ * Use this hook to:
2558
+ * - Close database connections
2559
+ * - Release file handles
2560
+ * - Free memory
2561
+ *
2562
+ * @example
2563
+ * ```typescript
2564
+ * terminate: async () => {
2565
+ * await db?.close();
2566
+ * }
2567
+ * ```
2568
+ */
2569
+ terminate?: (server: Server<TState, TServices>) => void | Promise<void>;
2570
+ }
2571
+ /**
2572
+ * Options for creating a plugin with createPlugin()
2573
+ *
2574
+ * @template TConfig - Plugin configuration shape
2575
+ * @template TState - State added to context
2576
+ * @template TServices - Services added to context
2474
2577
  */
2475
- interface PluginHooks {
2476
- /** Called when the plugin is registered */
2477
- register: (app: Server<any, any>) => void | Promise<void>;
2478
- /** Called when the server is initialized */
2479
- initialize?: (app?: Server<any, any>) => void | Promise<void>;
2480
- /** Called when the server is terminated */
2481
- terminate?: (app?: Server<any, any>) => void | Promise<void>;
2482
- /** Called when the server starts */
2483
- onServerStart?: (server: any) => void | Promise<void>;
2484
- /** Called when the server stops */
2485
- onServerStop?: (server: any) => void | Promise<void>;
2578
+ interface CreatePluginOptions<TConfig, TState = {}, TServices = {}> {
2579
+ /**
2580
+ * Plugin name (e.g., '@blaizejs/metrics')
2581
+ * Must be unique within a server instance
2582
+ */
2583
+ name: string;
2584
+ /**
2585
+ * Semantic version (e.g., '1.0.0')
2586
+ * Used for compatibility checks
2587
+ */
2588
+ version: string;
2589
+ /**
2590
+ * Default configuration values
2591
+ * Merged with user config when plugin is created
2592
+ *
2593
+ * @example
2594
+ * ```typescript
2595
+ * defaultConfig: {
2596
+ * enabled: true,
2597
+ * timeout: 30000,
2598
+ * }
2599
+ * ```
2600
+ */
2601
+ defaultConfig?: TConfig;
2602
+ /**
2603
+ * Setup function that returns lifecycle hooks
2604
+ *
2605
+ * Receives merged config (defaultConfig + userConfig).
2606
+ * Returns partial hook object - all hooks optional.
2607
+ *
2608
+ * @param config - Merged configuration
2609
+ * @returns Partial plugin hooks
2610
+ *
2611
+ * @example
2612
+ * ```typescript
2613
+ * setup: (config) => {
2614
+ * let db: Database;
2615
+ *
2616
+ * return {
2617
+ * initialize: async () => {
2618
+ * db = await Database.connect(config);
2619
+ * },
2620
+ * terminate: async () => {
2621
+ * await db?.close();
2622
+ * },
2623
+ * };
2624
+ * }
2625
+ * ```
2626
+ */
2627
+ setup: (config: TConfig) => Partial<PluginHooks<TState, TServices>>;
2486
2628
  }
2487
2629
  /**
2488
2630
  * Plugin interface
2489
2631
  */
2490
- interface Plugin<TState = {}, TServices = {}> extends PluginHooks {
2632
+ interface Plugin<TState = {}, TServices = {}> extends PluginHooks<TState, TServices> {
2491
2633
  /** Plugin name */
2492
2634
  name: string;
2493
2635
  /** Plugin version */
2494
2636
  version: string;
2637
+ /**
2638
+ * Called when plugin is registered to server
2639
+ *
2640
+ * This hook is always present - createPlugin provides a default empty async function
2641
+ * if not specified by the plugin author.
2642
+ *
2643
+ * @override Makes register required (not optional like in PluginHooks)
2644
+ */
2645
+ register: (server: Server<TState, TServices>) => void | Promise<void>;
2495
2646
  /**
2496
2647
  * Type carriers for compile-time type information
2497
2648
  * These are never used at runtime but allow TypeScript to track types
@@ -2502,7 +2653,7 @@ interface Plugin<TState = {}, TServices = {}> extends PluginHooks {
2502
2653
  /**
2503
2654
  * Plugin factory function
2504
2655
  */
2505
- type PluginFactory<TConfig = any, TState = {}, TServices = {}> = (options?: TConfig) => Plugin<TState, TServices>;
2656
+ type PluginFactory<TConfig = any, TState = {}, TServices = {}> = (options?: Partial<TConfig>) => Plugin<TState, TServices>;
2506
2657
  interface PluginLifecycleManager {
2507
2658
  initializePlugins(server: Server<any, any>): Promise<void>;
2508
2659
  terminatePlugins(server: Server<any, any>): Promise<void>;
@@ -2762,9 +2913,80 @@ declare function createMiddlewareArray<T extends ReadonlyArray<Middleware>>(...m
2762
2913
  declare function createPluginArray<T extends ReadonlyArray<Plugin<any, any>>>(...plugins: T): T;
2763
2914
 
2764
2915
  /**
2765
- * Create a plugin with the given name, version, and setup function
2916
+ * Create a type-safe plugin with full IntelliSense support
2917
+ *
2918
+ * This is the primary way to create plugins in BlaizeJS. It provides:
2919
+ * - IntelliSense for all lifecycle hooks
2920
+ * - Automatic config merging with defaults
2921
+ * - Full type safety for state and services
2922
+ * - Consistent DX with createMiddleware
2923
+ *
2924
+ * @template TConfig - Plugin configuration shape
2925
+ * @template TState - State added to context (default: {})
2926
+ * @template TServices - Services added to context (default: {})
2927
+ *
2928
+ * @param options - Plugin creation options
2929
+ * @returns Plugin factory function
2930
+ *
2931
+ * @example Basic plugin with config
2932
+ * ```typescript
2933
+ * const createDbPlugin = createPlugin<
2934
+ * { host: string; port: number },
2935
+ * {},
2936
+ * { db: Database }
2937
+ * >({
2938
+ * name: '@my-app/database',
2939
+ * version: '1.0.0',
2940
+ * defaultConfig: {
2941
+ * host: 'localhost',
2942
+ * port: 5432,
2943
+ * },
2944
+ * setup: (config) => {
2945
+ * let db: Database;
2946
+ *
2947
+ * return {
2948
+ * register: async (server) => {
2949
+ * // Add typed middleware
2950
+ * server.use(createMiddleware<{}, { db: Database }>({
2951
+ * handler: async (ctx, next) => {
2952
+ * ctx.services.db = db;
2953
+ * await next();
2954
+ * },
2955
+ * }));
2956
+ * },
2957
+ *
2958
+ * initialize: async () => {
2959
+ * db = await Database.connect(config);
2960
+ * },
2961
+ *
2962
+ * terminate: async () => {
2963
+ * await db?.close();
2964
+ * },
2965
+ * };
2966
+ * },
2967
+ * });
2968
+ *
2969
+ * // Usage
2970
+ * const plugin = createDbPlugin({ host: 'prod.db.com' });
2971
+ * ```
2972
+ *
2973
+ * @example Simple plugin without config
2974
+ * ```typescript
2975
+ * const loggerPlugin = createPlugin<{}, {}, { logger: Logger }>({
2976
+ * name: '@my-app/logger',
2977
+ * version: '1.0.0',
2978
+ * setup: () => ({
2979
+ * initialize: async () => {
2980
+ * console.log('Logger initialized');
2981
+ * },
2982
+ * }),
2983
+ * });
2984
+ *
2985
+ * // Usage (no config needed)
2986
+ * const plugin = loggerPlugin();
2987
+ * ```
2766
2988
  */
2767
- declare function create$1<TConfig = any, TState = {}, TServices = {}>(name: string, version: string, setup: (app: UnknownServer, options: TConfig) => void | Partial<PluginHooks> | Promise<void> | Promise<Partial<PluginHooks>>, defaultOptions?: Partial<TConfig>): PluginFactory<TConfig, TState, TServices>;
2989
+ declare function createPlugin<TConfig = {}, TState = {}, TServices = {}>(options: CreatePluginOptions<TConfig, TState, TServices>): PluginFactory<TConfig, TState, TServices>;
2768
2990
 
2769
2991
  /**
2770
2992
  * Create a GET route
@@ -3355,22 +3577,22 @@ declare const RouterAPI: {
3355
3577
  buildUrl: typeof buildUrl;
3356
3578
  };
3357
3579
  declare const MiddlewareAPI: {
3358
- createMiddleware: typeof create$2;
3580
+ createMiddleware: typeof create$1;
3359
3581
  createServiceMiddleware: typeof serviceMiddleware;
3360
3582
  createStateMiddleware: typeof stateMiddleware;
3361
3583
  compose: typeof compose;
3362
3584
  cors: typeof cors;
3363
3585
  };
3364
3586
  declare const PluginsAPI: {
3365
- createPlugin: typeof create$1;
3587
+ createPlugin: typeof createPlugin;
3366
3588
  };
3367
3589
 
3368
3590
  declare const Blaize: {
3369
3591
  createServer: typeof create;
3370
- createMiddleware: typeof create$2;
3592
+ createMiddleware: typeof create$1;
3371
3593
  createServiceMiddleware: typeof serviceMiddleware;
3372
3594
  createStateMiddleware: typeof stateMiddleware;
3373
- createPlugin: typeof create$1;
3595
+ createPlugin: typeof createPlugin;
3374
3596
  getCorrelationId: typeof getCorrelationId;
3375
3597
  Server: {
3376
3598
  createServer: typeof create;
@@ -3392,16 +3614,16 @@ declare const Blaize: {
3392
3614
  buildUrl: typeof buildUrl;
3393
3615
  };
3394
3616
  Middleware: {
3395
- createMiddleware: typeof create$2;
3617
+ createMiddleware: typeof create$1;
3396
3618
  createServiceMiddleware: typeof serviceMiddleware;
3397
3619
  createStateMiddleware: typeof stateMiddleware;
3398
3620
  compose: typeof compose;
3399
3621
  cors: typeof cors;
3400
3622
  };
3401
3623
  Plugins: {
3402
- createPlugin: typeof create$1;
3624
+ createPlugin: typeof createPlugin;
3403
3625
  };
3404
3626
  VERSION: string;
3405
3627
  };
3406
3628
 
3407
- export { Blaize, BlaizeError, type BlaizeErrorResponse, type BodyLimits, type BufferedEvent, type BuildRoutesRegistry, type BuildSSEArgs, type CacheConfig, type CacheEntry, type ClientConfig, type CloseEvent, type ComposeMiddlewareServices, type ComposeMiddlewareStates, type ComposeMiddlewareTypes, type ComposePluginServices, type ComposePluginStates, type ComposePluginTypes, ConflictError, type ConflictErrorDetails, type ConnectionEntry, type ConnectionRegistry, type Context, type ContextOptions, type ContextRequest, type ContextResponse, type CorrelationOptions, type CorsHttpMethod, type CorsOptions, type CorsOrigin, type CorsOriginCacheConfig, type CorsOriginCacheEntry, type CorsPreflightInfo, type CorsStats, type CorsValidationResult, type CreateClient, type CreateContextFn, type CreateDeleteRoute, type CreateEnhancedClient, type CreateGetRoute, type CreateHeadRoute, type CreateOptionsRoute, type CreatePatchRoute, type CreatePostRoute, type CreatePutRoute, type CreateSSEMethod, type CreateSSERoute, type ErrorHandlerOptions, ErrorSeverity, type ErrorTransformContext, ErrorType, type EventHandlers, type ExtractMethod, type ExtractMiddlewareServices, type ExtractMiddlewareState, type ExtractMiddlewareTypes, type ExtractPluginServices, type ExtractPluginState, type ExtractPluginTypes, type ExtractSSEEvents, type ExtractSSEParams, type ExtractSSEQuery, type ExtractSSERoutes, type FileCache, type FindRouteFilesOptions, ForbiddenError, type ForbiddenErrorDetails, type GetContextFn, type HasSSEMethod, type Http2Options, type HttpMethod, type Infer, type InferContext, type InternalRequestArgs, InternalServerError, type InternalServerErrorDetails, type Matcher, type MergeServices, type MergeStates, type Middleware, MiddlewareAPI, type MiddlewareFunction, type MiddlewareOptions, type MultipartData, type MultipartError, type MultipartLimits, type NetworkErrorContext, type NextFunction, NotFoundError, type NotFoundErrorDetails, type ParseErrorContext, type ParseOptions, type ParseResult, type ParsedRoute, type ParserState, PayloadTooLargeError, type PayloadTooLargeErrorDetails, type Plugin, type PluginFactory, type PluginHooks, type PluginLifecycleManager, type PluginLifecycleOptions, type PluginOptions, PluginsAPI, type ProcessResponseOptions, type ProcessingConfig, type QueryParams, RateLimitError, type RateLimitErrorDetails, type ReconnectStrategy, type RegistryResult, type ReloadMetrics, type RequestHandler, type RequestOptions, type RequestParams, RequestTimeoutError, type Result, type Route, type RouteDefinition, type RouteEntry, type RouteHandler, type RouteMatch, type RouteMethodOptions, type RouteNode, type RouteOptions, type RouteRegistry, type RouteSchema, type Router, RouterAPI, type RouterOptions, type SSEBufferOverflowErrorDetails, type SSEBufferStrategy, type SSEClient, type SSEClientMetrics, type SSEClientOptions, type SSEConnectionErrorContext, type SSEConnectionErrorDetails, type SSEConnectionFactory, type SSEConnectionState, type SSEEvent, type SSEEventHandler, type SSEEventListener, type SSEHeartbeatErrorContext, type SSEMetrics, type SSEOptions, type SSERouteHandler, type SSERouteSchema, type SSESerializedEvent, type SSEStream, type SSEStreamClosedErrorDetails, type SSEStreamErrorContext, type SSEStreamExtended, type SSEStreamManager, type SafeComposeMiddlewareServices, type SafeComposeMiddlewareStates, type SafeComposePluginServices, type SafeComposePluginStates, type SafeExtractMiddlewareServices, type SafeExtractMiddlewareState, type SafeExtractPluginServices, type SafeExtractPluginState, type Server, ServerAPI, type ServerOptions, type ServerOptionsInput, type ServiceNotAvailableDetails, ServiceNotAvailableError, type Services, type StandardErrorResponse, type StartOptions, type State, type StopOptions, type StreamMetrics, type StreamOptions, type TimeoutErrorContext, type TypedSSEStream, UnauthorizedError, type UnauthorizedErrorDetails, type UnifiedRequest, type UnifiedResponse, type UnionToIntersection, type UnknownFunction, type UnknownServer, UnprocessableEntityError, UnsupportedMediaTypeError, type UnsupportedMediaTypeErrorDetails, type UploadProgress, type UploadedFile, VERSION, type ValidationConfig, ValidationError, type ValidationErrorDetails, type ValidationFieldError, type WatchOptions, asMiddlewareArray, asPluginArray, buildUrl, compilePathPattern, compose, cors, createDeleteRoute, createGetRoute, createHeadRoute, createMatcher, create$2 as createMiddleware, createMiddlewareArray, createOptionsRoute, createPatchRoute, create$1 as createPlugin, createPluginArray, createPostRoute, createPutRoute, createRouteFactory, create as createServer, serviceMiddleware as createServiceMiddleware, stateMiddleware as createStateMiddleware, extractParams, getCorrelationId, inferContext, isMiddleware, isPlugin, paramsToQuery };
3629
+ export { Blaize, BlaizeError, type BlaizeErrorResponse, type BodyLimits, type BufferedEvent, type BuildRoutesRegistry, type BuildSSEArgs, type CacheConfig, type CacheEntry, type ClientConfig, type CloseEvent, type ComposeMiddlewareServices, type ComposeMiddlewareStates, type ComposeMiddlewareTypes, type ComposePluginServices, type ComposePluginStates, type ComposePluginTypes, ConflictError, type ConflictErrorDetails, type ConnectionEntry, type ConnectionRegistry, type Context, type ContextOptions, type ContextRequest, type ContextResponse, type CorrelationOptions, type CorsHttpMethod, type CorsOptions, type CorsOrigin, type CorsOriginCacheConfig, type CorsOriginCacheEntry, type CorsPreflightInfo, type CorsStats, type CorsValidationResult, type CreateClient, type CreateContextFn, type CreateDeleteRoute, type CreateEnhancedClient, type CreateGetRoute, type CreateHeadRoute, type CreateOptionsRoute, type CreatePatchRoute, type CreatePluginOptions, type CreatePostRoute, type CreatePutRoute, type CreateSSEMethod, type CreateSSERoute, type ErrorHandlerOptions, ErrorSeverity, type ErrorTransformContext, ErrorType, type EventHandlers, type ExtractMethod, type ExtractMiddlewareServices, type ExtractMiddlewareState, type ExtractMiddlewareTypes, type ExtractPluginServices, type ExtractPluginState, type ExtractPluginTypes, type ExtractSSEEvents, type ExtractSSEParams, type ExtractSSEQuery, type ExtractSSERoutes, type FileCache, type FindRouteFilesOptions, ForbiddenError, type ForbiddenErrorDetails, type GetContextFn, type HasSSEMethod, type Http2Options, type HttpMethod, type Infer, type InferContext, type InternalRequestArgs, InternalServerError, type InternalServerErrorDetails, type Matcher, type MergeServices, type MergeStates, type Middleware, MiddlewareAPI, type MiddlewareFunction, type MiddlewareOptions, type MultipartData, type MultipartError, type MultipartLimits, type NetworkErrorContext, type NextFunction, NotFoundError, type NotFoundErrorDetails, type ParseErrorContext, type ParseOptions, type ParseResult, type ParsedRoute, type ParserState, PayloadTooLargeError, type PayloadTooLargeErrorDetails, type Plugin, type PluginFactory, type PluginHooks, type PluginLifecycleManager, type PluginLifecycleOptions, type PluginOptions, PluginsAPI, type ProcessResponseOptions, type ProcessingConfig, type QueryParams, RateLimitError, type RateLimitErrorDetails, type ReconnectStrategy, type RegistryResult, type ReloadMetrics, type RequestHandler, type RequestOptions, type RequestParams, RequestTimeoutError, type Result, type Route, type RouteDefinition, type RouteEntry, type RouteHandler, type RouteMatch, type RouteMethodOptions, type RouteNode, type RouteOptions, type RouteRegistry, type RouteSchema, type Router, RouterAPI, type RouterOptions, type SSEBufferOverflowErrorDetails, type SSEBufferStrategy, type SSEClient, type SSEClientMetrics, type SSEClientOptions, type SSEConnectionErrorContext, type SSEConnectionErrorDetails, type SSEConnectionFactory, type SSEConnectionState, type SSEEvent, type SSEEventHandler, type SSEEventListener, type SSEHeartbeatErrorContext, type SSEMetrics, type SSEOptions, type SSERouteHandler, type SSERouteSchema, type SSESerializedEvent, type SSEStream, type SSEStreamClosedErrorDetails, type SSEStreamErrorContext, type SSEStreamExtended, type SSEStreamManager, type SafeComposeMiddlewareServices, type SafeComposeMiddlewareStates, type SafeComposePluginServices, type SafeComposePluginStates, type SafeExtractMiddlewareServices, type SafeExtractMiddlewareState, type SafeExtractPluginServices, type SafeExtractPluginState, type Server, ServerAPI, type ServerOptions, type ServerOptionsInput, type ServiceNotAvailableDetails, ServiceNotAvailableError, type Services, type StandardErrorResponse, type StartOptions, type State, type StopOptions, type StreamMetrics, type StreamOptions, type TimeoutErrorContext, type TypedSSEStream, UnauthorizedError, type UnauthorizedErrorDetails, type UnifiedRequest, type UnifiedResponse, type UnionToIntersection, type UnknownFunction, type UnknownServer, UnprocessableEntityError, UnsupportedMediaTypeError, type UnsupportedMediaTypeErrorDetails, type UploadProgress, type UploadedFile, VERSION, type ValidationConfig, ValidationError, type ValidationErrorDetails, type ValidationFieldError, type WatchOptions, asMiddlewareArray, asPluginArray, buildUrl, compilePathPattern, compose, cors, createDeleteRoute, createGetRoute, createHeadRoute, createMatcher, create$1 as createMiddleware, createMiddlewareArray, createOptionsRoute, createPatchRoute, createPlugin, createPluginArray, createPostRoute, createPutRoute, createRouteFactory, create as createServer, serviceMiddleware as createServiceMiddleware, stateMiddleware as createStateMiddleware, extractParams, getCorrelationId, inferContext, isMiddleware, isPlugin, paramsToQuery };