elysia 0.8.15 → 0.8.16

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,6 +1,6 @@
1
1
  import { Serve, WebSocketHandler, Server, ServerWebSocket } from 'bun';
2
2
  import * as _sinclair_typebox from '@sinclair/typebox';
3
- import { TSchema, Static, TAnySchema, TObject, NumberOptions, SchemaOptions, TNumber, TProperties, ObjectOptions, TUnion, TNull, TUndefined } from '@sinclair/typebox';
3
+ import { TSchema, Static, TAnySchema, TObject, NumberOptions, SchemaOptions, TNumber, TBoolean, TProperties, ObjectOptions, TUnion, TNull, TUndefined } from '@sinclair/typebox';
4
4
  import { TypeCheck } from '@sinclair/typebox/compiler';
5
5
  import '@sinclair/typebox/system';
6
6
  import { OpenAPIV3 } from 'openapi-types';
@@ -128,8 +128,8 @@ declare class Cookie<T = unknown> implements CookieOptions {
128
128
  set path(value: string | undefined);
129
129
  get priority(): "low" | "medium" | "high" | undefined;
130
130
  set priority(value: "low" | "medium" | "high" | undefined);
131
- get sameSite(): boolean | "none" | "lax" | "strict" | undefined;
132
- set sameSite(value: boolean | "none" | "lax" | "strict" | undefined);
131
+ get sameSite(): boolean | "lax" | "strict" | "none" | undefined;
132
+ set sameSite(value: boolean | "lax" | "strict" | "none" | undefined);
133
133
  get secure(): boolean | undefined;
134
134
  set secure(value: boolean | undefined);
135
135
  toString(): string;
@@ -930,6 +930,7 @@ declare namespace ElysiaTypeOptions {
930
930
  }
931
931
  declare const ElysiaType: {
932
932
  readonly Numeric: (property?: NumberOptions) => TNumber;
933
+ readonly BooleanString: (property?: SchemaOptions) => TBoolean;
933
934
  readonly ObjectString: <T extends TProperties>(properties: T, options?: ObjectOptions) => TObject<T>;
934
935
  readonly File: (options?: Partial<ElysiaTypeOptions.File> | undefined) => _sinclair_typebox.TUnsafe<File>;
935
936
  readonly Files: (options?: ElysiaTypeOptions.Files) => _sinclair_typebox.TTransform<_sinclair_typebox.TUnsafe<File[]>, File[]>;
@@ -957,6 +958,7 @@ declare const ElysiaType: {
957
958
  type TCookie = (typeof ElysiaType)['Cookie'];
958
959
  declare module '@sinclair/typebox' {
959
960
  interface JavaScriptTypeBuilder {
961
+ BooleanString: typeof ElysiaType.BooleanString;
960
962
  ObjectString: typeof ElysiaType.ObjectString;
961
963
  Numeric: typeof ElysiaType.Numeric;
962
964
  File: typeof ElysiaType.File;
@@ -2028,7 +2030,7 @@ declare class Elysia<BasePath extends string = '', Decorators extends DecoratorB
2028
2030
  resolve: Type extends "all" | "decorator" ? Word extends `${string} ` | `${string}_` | `${string}-` ? AddPrefix<Word, Decorators["resolve"]> : AddPrefixCapitalize<Word, Decorators["resolve"]> : Decorators["resolve"];
2029
2031
  }, {
2030
2032
  type: Type extends "all" | "model" ? Word extends `${string} ` | `${string}_` | `${string}-` ? AddPrefix<Word, Definitions["type"]> : AddPrefixCapitalize<Word, Definitions["type"]> : Definitions["type"];
2031
- error: Type extends "error" | "all" ? Word extends `${string} ` | `${string}_` | `${string}-` ? AddPrefix<Word, Definitions["error"]> : AddPrefixCapitalize<Word, Definitions["error"]> : Definitions["error"];
2033
+ error: Type extends "all" | "error" ? Word extends `${string} ` | `${string}_` | `${string}-` ? AddPrefix<Word, Definitions["error"]> : AddPrefixCapitalize<Word, Definitions["error"]> : Definitions["error"];
2032
2034
  }, ParentSchema, Macro, Routes, Scoped>;
2033
2035
  suffix<const Type extends 'all' | 'decorator' | 'state' | 'model' | 'error', const Word extends string>(type: Type, word: Word): Elysia<BasePath, {
2034
2036
  request: Type extends "all" | "decorator" ? AddSuffixCapitalize<Word, Decorators["request"]> : Decorators["request"];
@@ -2037,7 +2039,7 @@ declare class Elysia<BasePath extends string = '', Decorators extends DecoratorB
2037
2039
  resolve: Type extends "all" | "decorator" ? AddSuffixCapitalize<Word, Decorators["resolve"]> : Decorators["resolve"];
2038
2040
  }, {
2039
2041
  type: Type extends "all" | "model" ? AddSuffixCapitalize<Word, Definitions["type"]> : Definitions["type"];
2040
- error: Type extends "error" | "all" ? AddSuffixCapitalize<Word, Definitions["error"]> : Definitions["error"];
2042
+ error: Type extends "all" | "error" ? AddSuffixCapitalize<Word, Definitions["error"]> : Definitions["error"];
2041
2043
  }, ParentSchema, Macro, Routes, Scoped>;
2042
2044
  compile(): this;
2043
2045
  handle: (request: Request) => Promise<Response>;
@@ -1,6 +1,6 @@
1
1
  import 'bun';
2
2
  export { Static, TSchema } from '@sinclair/typebox';
3
- export { J as AfterHandler, _ as BodyHandler, a9 as Checksum, c as ComposedHandler, C as Context, g as Cookie, f as CookieOptions, D as DecoratorBase, s as DefinitionBase, E as Elysia, b as ElysiaConfig, a0 as ErrorHandler, z as HTTPMethod, H as Handler, A as InputSchema, a3 as InternalRoute, I as InternalServerError, n as InvalidCookieSignature, x as LifeCycleEvent, L as LifeCycleStore, a4 as ListenCallback, a2 as LocalHook, q as MaybePromise, B as MergeSchema, N as NotFoundError, F as OptionalHandler, m as ParseError, aw as PreContext, P as PreHandler, t as RouteBase, u as RouteSchema, S as SchemaValidator, X as TraceEvent, d as TraceHandler, Y as TraceProcess, T as TraceReporter, e as TraceStream, v as UnwrapRoute, U as UnwrapSchema, V as ValidationError, Q as VoidHandler, E as default, l as error, ak as getResponseSchemaValidator, aj as getSchemaValidator, aJ as mapCompactResponse, aI as mapEarlyResponse, aH as mapResponse, ae as mergeDeep, ai as mergeHook, ag as mergeObjectArray, aA as t } from './index-3yRrZCrW.js';
3
+ export { J as AfterHandler, _ as BodyHandler, a9 as Checksum, c as ComposedHandler, C as Context, g as Cookie, f as CookieOptions, D as DecoratorBase, s as DefinitionBase, E as Elysia, b as ElysiaConfig, a0 as ErrorHandler, z as HTTPMethod, H as Handler, A as InputSchema, a3 as InternalRoute, I as InternalServerError, n as InvalidCookieSignature, x as LifeCycleEvent, L as LifeCycleStore, a4 as ListenCallback, a2 as LocalHook, q as MaybePromise, B as MergeSchema, N as NotFoundError, F as OptionalHandler, m as ParseError, aw as PreContext, P as PreHandler, t as RouteBase, u as RouteSchema, S as SchemaValidator, X as TraceEvent, d as TraceHandler, Y as TraceProcess, T as TraceReporter, e as TraceStream, v as UnwrapRoute, U as UnwrapSchema, V as ValidationError, Q as VoidHandler, E as default, l as error, ak as getResponseSchemaValidator, aj as getSchemaValidator, aJ as mapCompactResponse, aI as mapEarlyResponse, aH as mapResponse, ae as mergeDeep, ai as mergeHook, ag as mergeObjectArray, aA as t } from './index-59i0HOI0.js';
4
4
  import '@sinclair/typebox/compiler';
5
5
  import '@sinclair/typebox/system';
6
6
  import 'openapi-types';