elysia 2.0.0-exp.16 → 2.0.0-exp.17
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/adapter/bun/index.d.ts +1 -1
- package/dist/adapter/constants.d.ts +1 -1
- package/dist/adapter/index.d.ts +1 -1
- package/dist/adapter/web-standard/index.d.ts +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/type/elysia/file-type.d.ts +1 -1
- package/dist/type/validator/index.d.ts +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/utils.d.ts +1 -1
- package/dist/validator/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { AnyElysia } from "../../base.js";
|
|
|
6
6
|
declare function collectStaticRoutes(app: AnyElysia): readonly [Record<string, Record<string, Response>>, Promise<void>[]] | undefined;
|
|
7
7
|
declare const BunAdapter: {
|
|
8
8
|
parse: {
|
|
9
|
-
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<
|
|
9
|
+
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<Record<string, unknown>> | Promise<ArrayBuffer> | Promise<string> | Promise<unknown[] | Record<string | number | symbol, undefined>> | undefined;
|
|
10
10
|
json: (context: Context) => MaybePromise<Record<keyof any, undefined> | unknown[]>;
|
|
11
11
|
text: (context: Context) => MaybePromise<string>;
|
|
12
12
|
urlencoded: (context: Context) => MaybePromise<Record<string, string | string[]>>;
|
|
@@ -5,7 +5,7 @@ import { AnyElysia } from "../base.js";
|
|
|
5
5
|
//#region src/adapter/constants.d.ts
|
|
6
6
|
declare const defaultAdapter: {
|
|
7
7
|
parse: {
|
|
8
|
-
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<
|
|
8
|
+
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<Record<string, unknown>> | Promise<ArrayBuffer> | Promise<string> | Promise<unknown[] | Record<string | number | symbol, undefined>> | undefined;
|
|
9
9
|
json: (context: Context) => MaybePromise<Record<keyof any, undefined> | unknown[]>;
|
|
10
10
|
text: (context: Context) => MaybePromise<string>;
|
|
11
11
|
urlencoded: (context: Context) => MaybePromise<Record<string, string | string[]>>;
|
package/dist/adapter/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { AnyElysia } from "../base.js";
|
|
|
7
7
|
//#region src/adapter/index.d.ts
|
|
8
8
|
declare function createAdapter(adapter: ElysiaAdapterOptions): {
|
|
9
9
|
parse: {
|
|
10
|
-
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<
|
|
10
|
+
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<Record<string, unknown>> | Promise<ArrayBuffer> | Promise<string> | Promise<unknown[] | Record<string | number | symbol, undefined>> | undefined;
|
|
11
11
|
json: (context: Context) => MaybePromise<Record<keyof any, undefined> | unknown[]>;
|
|
12
12
|
text: (context: Context) => MaybePromise<string>;
|
|
13
13
|
urlencoded: (context: Context) => MaybePromise<Record<string, string | string[]>>;
|
|
@@ -5,7 +5,7 @@ import { AnyElysia } from "../../base.js";
|
|
|
5
5
|
//#region src/adapter/web-standard/index.d.ts
|
|
6
6
|
declare const WebStandardAdapter: {
|
|
7
7
|
parse: {
|
|
8
|
-
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<
|
|
8
|
+
default: (context: Context, contentType: string) => string | ArrayBuffer | unknown[] | Record<string, unknown> | Promise<Record<string, unknown>> | Promise<ArrayBuffer> | Promise<string> | Promise<unknown[] | Record<string | number | symbol, undefined>> | undefined;
|
|
9
9
|
json: (context: Context) => MaybePromise<Record<keyof any, undefined> | unknown[]>;
|
|
10
10
|
text: (context: Context) => MaybePromise<string>;
|
|
11
11
|
urlencoded: (context: Context) => MaybePromise<Record<string, string | string[]>>;
|
package/dist/base.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElysiaStatus } from "./error.js";
|
|
2
2
|
import { TraceHandler } from "./trace.js";
|
|
3
|
+
import { AnySchema } from "./type/types.js";
|
|
3
4
|
import { ListenCallback, Serve, Server } from "./universal/server.js";
|
|
4
5
|
import { AddRoute, AddWSRoute, AfterHandler, AfterResponseHandler, AnyErrorConstructor, AnyLocalHook, BodyHandler, CompiledHandler, CreateEden, DefaultEphemeral, DefaultMetadata, DefaultSingleton, DefinitionBase, DocumentDecoration, ElysiaConfig, ElysiaHandlerToResponseSchemaAmbiguous, EphemeralType, ErrorDefinitionEntry, ErrorHandler, EventScope, ExcludeElysiaResponse, ExtractErrorFromHandle, GracefulHandler, GuardLocalHook, HTTPMethod, InlineHandler, InlineHandlerNonMacro, InputSchema, InputSchemaKey, InternalRoute, IntersectIfObjectSchema, JoinPath, LocalHook, Macro, MacroSchemaChannel, MacroToContext, MacroToProperty, MapResponse, MaybeArray, MaybePromise, MergeElysiaInstances, MergeSchema, MergeScopedSchemas, MetadataBase, NonResolvableMacroKey, ObjectMacroDefs, OptionalHandler, PreHandler, Prettify, PublicRoute, ResolveRouteErrors, RouteBase, SingletonBase, TransformHandler, UnionResponseStatus, UnwrapRoute, WrapFn } from "./types.js";
|
|
5
|
-
import { AnySchema } from "./type/types.js";
|
|
6
6
|
import { ChainNode } from "./utils.js";
|
|
7
7
|
import { Context, ErrorContext, LifecycleContext } from "./context.js";
|
|
8
8
|
import { WSHandlerResponse, WSLocalHook, WSMessageHandler } from "./ws/types.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { StatusMap, StatusMapBack } from "./constants.js";
|
|
2
2
|
import { ElysiaError, ElysiaStatus, InternalServerError, InvalidCookieSignature, NotFound, ParseError, SelectiveStatus, ValidationError, status, validationDetail } from "./error.js";
|
|
3
|
+
import { ElysiaFile, file } from "./universal/file.js";
|
|
3
4
|
import { BaseCookie, CookieOptions } from "./cookie/types.js";
|
|
4
5
|
import { Cookie } from "./cookie/cookie.js";
|
|
5
|
-
import { ElysiaFile, file } from "./universal/file.js";
|
|
6
|
-
import { env } from "./universal/env.js";
|
|
7
|
-
import { Server } from "./universal/server.js";
|
|
8
|
-
import { HTTPHeaders, SSEPayload, UnwrapSchema } from "./types.js";
|
|
9
6
|
import { AnySchema, BaseSchema, StandardJSONSchemaV1Like, StandardSchemaV1Like } from "./type/types.js";
|
|
7
|
+
import { TCookieField, TCookieObject } from "./type/elysia/cookie.js";
|
|
10
8
|
import { FileTypeDetector, fileType, setFileTypeDetector } from "./type/elysia/file-type.js";
|
|
9
|
+
import { TFiles } from "./type/elysia/files.js";
|
|
11
10
|
import { setupTypebox } from "./type/compat.js";
|
|
12
11
|
import { Capture, Compiled } from "./compile/aot.js";
|
|
13
12
|
import { MultiValidator, StandardValidator, Validator } from "./validator/index.js";
|
|
14
13
|
import { TypeBoxValidator } from "./type/validator/index.js";
|
|
15
14
|
import { TypeSystem, t } from "./type/index.js";
|
|
15
|
+
import { env } from "./universal/env.js";
|
|
16
|
+
import { Server } from "./universal/server.js";
|
|
17
|
+
import { HTTPHeaders, InputSchema, Macro, MacroToContext, MacroToProperty, RouteSchema, SSEPayload, UnwrapRoute, UnwrapSchema } from "./types.js";
|
|
16
18
|
import { form, prefix, redirect, sse } from "./utils.js";
|
|
17
19
|
import { Context, ErrorContext, createBaseContext, createContext } from "./context.js";
|
|
18
20
|
import { Elysia } from "./base.js";
|
|
19
|
-
export { type AnySchema, type BaseCookie, type BaseSchema, Compiled, type Context, type Cookie, type CookieOptions, Elysia, Elysia as default, ElysiaError, ElysiaFile, ElysiaStatus, type ErrorContext, type FileTypeDetector, type HTTPHeaders, InternalServerError, InvalidCookieSignature, Capture as Manifest, MultiValidator, NotFound, ParseError, type SSEPayload, type SelectiveStatus, type Server, type StandardJSONSchemaV1Like, type StandardSchemaV1Like, StandardValidator, StatusMap, StatusMapBack, TypeBoxValidator, TypeSystem, type UnwrapSchema, ValidationError, Validator, createBaseContext, createContext, env, file, fileType, form, prefix, redirect, setFileTypeDetector, setupTypebox, sse, status, t, validationDetail };
|
|
21
|
+
export { type AnySchema, type BaseCookie, type BaseSchema, Compiled, type Context, type Cookie, type CookieOptions, Elysia, Elysia as default, ElysiaError, ElysiaFile, ElysiaStatus, type ErrorContext, type FileTypeDetector, type HTTPHeaders, type InputSchema, InternalServerError, InvalidCookieSignature, type Macro, type MacroToContext, type MacroToProperty, Capture as Manifest, MultiValidator, NotFound, ParseError, type RouteSchema, type SSEPayload, type SelectiveStatus, type Server, type StandardJSONSchemaV1Like, type StandardSchemaV1Like, StandardValidator, StatusMap, StatusMapBack, type TCookieField, type TCookieObject, type TFiles, TypeBoxValidator, TypeSystem, type UnwrapRoute, type UnwrapSchema, ValidationError, Validator, createBaseContext, createContext, env, file, fileType, form, prefix, redirect, setFileTypeDetector, setupTypebox, sse, status, t, validationDetail };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MaybeArray, MaybePromise } from "../../types.js";
|
|
2
1
|
import { FileType, FileUnit } from "../types.js";
|
|
2
|
+
import { MaybeArray, MaybePromise } from "../../types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/type/elysia/file-type.d.ts
|
|
5
5
|
type FileTypeDetector = (file: File) => MaybePromise<string | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MaybePromise } from "../../types.js";
|
|
2
1
|
import { Validator as Validator$1, ValidatorOptions } from "../../validator/index.js";
|
|
3
2
|
import { TypeBoxValidatorCache } from "./validator-cache.js";
|
|
3
|
+
import { MaybePromise } from "../../types.js";
|
|
4
4
|
import { Static, StaticDecode, StaticEncode, TAny, TSchema } from "typebox/type";
|
|
5
5
|
import { TLocalizedValidationError } from "typebox/error";
|
|
6
6
|
import { Validator } from "typebox/schema";
|
package/dist/types.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MethodMap, StatusMapBack } from "./constants.js";
|
|
2
2
|
import { ElysiaError, ElysiaStatus } from "./error.js";
|
|
3
|
-
import { CookieOptions } from "./cookie/types.js";
|
|
4
3
|
import { ElysiaFile } from "./universal/file.js";
|
|
5
4
|
import { TraceEvent, TraceListener } from "./trace.js";
|
|
5
|
+
import { CookieOptions } from "./cookie/types.js";
|
|
6
|
+
import { AnySchema, StandardSchemaV1Like, TypeBoxSchema } from "./type/types.js";
|
|
6
7
|
import { Serve } from "./universal/server.js";
|
|
7
8
|
import { ElysiaAdapter } from "./adapter/index.js";
|
|
8
|
-
import { AnySchema, StandardSchemaV1Like, TypeBoxSchema } from "./type/types.js";
|
|
9
9
|
import { ChainNode } from "./utils.js";
|
|
10
10
|
import { Context, ErrorContext, LifecycleContext, PreContext } from "./context.js";
|
|
11
11
|
import { WebSocketHandler } from "./ws/types.js";
|
|
12
12
|
import { AnyElysia, Elysia } from "./base.js";
|
|
13
|
-
import { Instruction } from "exact-mirror";
|
|
14
13
|
import { Static, StaticDecode, StaticEncode, TIntersect, TObject, TSchema } from "typebox";
|
|
14
|
+
import { Instruction } from "exact-mirror";
|
|
15
15
|
import { OpenAPIV3 } from "openapi-types";
|
|
16
16
|
|
|
17
17
|
//#region src/types.d.ts
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MethodMap } from "./constants.js";
|
|
2
|
-
import { AnyLocalHook, AppHook, ElysiaFormData, EventFn, EventScope, GuardSchemaType, InputSchema, Macro, MaybeArray, Prettify, SSEPayload } from "./types.js";
|
|
3
2
|
import { AnySchema, StandardSchemaV1Like } from "./type/types.js";
|
|
3
|
+
import { AnyLocalHook, AppHook, ElysiaFormData, EventFn, EventScope, GuardSchemaType, InputSchema, Macro, MaybeArray, Prettify, SSEPayload } from "./types.js";
|
|
4
4
|
import { Context } from "./context.js";
|
|
5
5
|
|
|
6
6
|
//#region src/utils.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ElysiaConfig, MaybePromise } from "../types.js";
|
|
2
1
|
import { AnySchema, StandardSchemaV1Like } from "../type/types.js";
|
|
3
2
|
import { CoerceOption } from "../type/coerce.js";
|
|
4
3
|
import { ValidatorSlot } from "../compile/aot.js";
|
|
5
4
|
import { TypeBoxValidator } from "../type/bridge.js";
|
|
5
|
+
import { ElysiaConfig, MaybePromise } from "../types.js";
|
|
6
6
|
import { TSchema } from "typebox/type";
|
|
7
7
|
import { TLocalizedValidationError } from "typebox/error";
|
|
8
8
|
|