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.
- package/dist/bun/{index-3yRrZCrW.d.ts → index-59i0HOI0.d.ts} +7 -5
- package/dist/bun/index.d.ts +1 -1
- package/dist/bun/index.js +102 -102
- package/dist/bun/index.js.map +7 -7
- package/dist/cjs/compose.d.ts +1 -1
- package/dist/cjs/context.d.ts +1 -1
- package/dist/cjs/cookie.d.ts +1 -1
- package/dist/cjs/dynamic-handle.d.ts +1 -1
- package/dist/cjs/error.d.ts +1 -1
- package/dist/cjs/handler.d.ts +1 -1
- package/dist/cjs/{index-3yRrZCrW.d.ts → index-59i0HOI0.d.ts} +7 -5
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +71 -28
- package/dist/cjs/trace.d.ts +1 -1
- package/dist/cjs/type-system.d.ts +1 -1
- package/dist/cjs/type-system.js +23 -0
- package/dist/cjs/types.d.ts +1 -1
- package/dist/cjs/utils.d.ts +1 -1
- package/dist/cjs/ws/index.d.ts +1 -1
- package/dist/cjs/ws/types.d.ts +1 -1
- package/dist/compose.d.ts +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/cookie.d.ts +1 -1
- package/dist/dynamic-handle.d.ts +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/handler.d.ts +1 -1
- package/dist/{index-3yRrZCrW.d.ts → index-59i0HOI0.d.ts} +7 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +71 -28
- package/dist/trace.d.ts +1 -1
- package/dist/type-system.d.ts +1 -1
- package/dist/type-system.mjs +23 -0
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/ws/index.d.ts +1 -1
- package/dist/ws/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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 | "
|
|
132
|
-
set sameSite(value: boolean | "
|
|
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 "
|
|
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 "
|
|
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>;
|
package/dist/bun/index.d.ts
CHANGED
|
@@ -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-
|
|
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';
|