speexjs 0.3.0 → 0.4.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.
@@ -1,5 +1,6 @@
1
1
  import { Container } from './server/container/index.js';
2
2
  import { S as SuperRequest, a as SuperResponse } from './response-Ca8KWK5_.js';
3
+ import { S as Schema } from './types-aW38f63o.js';
3
4
 
4
5
  type RouteHandler = (ctx: RouteContext) => void | Promise<void>;
5
6
  interface RouteContext {
@@ -85,6 +86,8 @@ declare function staticFiles(root: string, options?: StaticOptions): Middleware;
85
86
  declare function csrf(): Middleware;
86
87
  declare function compress(): Middleware;
87
88
  declare function helmet(): Middleware;
89
+ declare function validate(schema: Schema<unknown>): Middleware;
90
+ declare function validateQuery(schema: Schema<unknown>): Middleware;
88
91
  declare class MiddlewarePipeline {
89
92
  private middlewares;
90
93
  use(middleware: Middleware): this;
@@ -94,4 +97,4 @@ declare class MiddlewarePipeline {
94
97
  getMiddlewares(): Middleware[];
95
98
  }
96
99
 
97
- export { type ControllerClass as C, type Middleware as M, type RouteContext as R, type StaticOptions as S, Router as a, type RouteHandler as b, type ResolvedRoute as c, type CorsOptions as d, MiddlewarePipeline as e, type SessionOptions as f, auth as g, bodyParser as h, compress as i, cors as j, csrf as k, helmet as l, logger as m, staticFiles as n, session as s, throttle as t };
100
+ export { type ControllerClass as C, type Middleware as M, type RouteContext as R, type StaticOptions as S, Router as a, type RouteHandler as b, type ResolvedRoute as c, type CorsOptions as d, MiddlewarePipeline as e, type SessionOptions as f, auth as g, bodyParser as h, compress as i, cors as j, csrf as k, helmet as l, logger as m, staticFiles as n, validateQuery as o, session as s, throttle as t, validate as v };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AnySchema, ArraySchema, BigIntSchema, BooleanSchema, CoerceBooleanSchema, CoerceDateSchema, CoerceNumberSchema, CoerceStringSchema, DateSchema, EnumSchema, IntersectionSchema, LiteralSchema, MapSchema, NaNSchema, NullSchema, NumberSchema, ObjectSchema, RecordSchema, SetSchema, StringSchema, SymbolSchema, TupleSchema, UndefinedSchema, UnionSchema, UnknownSchema, getLocale, s, schema, setLocale } from './schema/index.js';
2
- export { AppOptions, SuperApp, URLBuilder, ViewEngine, createControllerInstance, registerMacro, responseMacros, speexjs, url } from './server/index.js';
2
+ export { AppOptions, BadRequestException, ConflictException, ForbiddenException, HttpException, InternalServerErrorException, MethodNotAllowedException, NotFoundException, ServiceUnavailableException, SuperApp, TooManyRequestsException, URLBuilder, UnauthorizedException, UnprocessableEntityException, ValidationException, ViewEngine, createControllerInstance, normalizeError, registerExceptionHandler, registerMacro, responseMacros, speexjs, url } from './server/index.js';
3
3
  export { Computed, Effect, Signal, Subscribable, batch, computed, effect, isComputed, isSignal, mergeSignals, signal, toSignal, untracked } from './client/signals/index.js';
4
4
  export { Component, ComponentContext, VComponent, VElement, VFragment, VNode, VSignalNode, VText, createComponent, fragment, h, hydrate, normalizeChild, patch, render, renderToStream, renderToString, text } from './client/vdom/index.js';
5
5
  export { F as Fragment, c as createElement } from './jsx-DGrnv8QB.js';
@@ -14,5 +14,5 @@ import './server/container/index.js';
14
14
  import 'node:http';
15
15
  import './response-Ca8KWK5_.js';
16
16
  import 'node:stream';
17
- import './index-CMkhSDh7.js';
17
+ import './index-C4xilc_E.js';
18
18
  import 'node:fs';