elysia 2.0.0-exp.15 → 2.0.0-exp.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/adapter/utils.d.ts +1 -2
- package/dist/base.d.ts +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/plugin/bun.d.ts +10 -0
- package/dist/plugin/bun.js +10 -0
- package/dist/plugin/bun.mjs +10 -0
- package/dist/plugin/esbuild.d.ts +10 -0
- package/dist/plugin/esbuild.js +10 -0
- package/dist/plugin/esbuild.mjs +10 -0
- package/dist/plugin/vite.d.ts +7 -0
- package/dist/plugin/vite.js +7 -0
- package/dist/plugin/vite.mjs +7 -0
- package/dist/type/bridge.d.ts +7 -7
- package/dist/type/elysia/file-type.d.ts +1 -1
- package/dist/type/types.d.ts +1 -1
- package/dist/type/validator/index.d.ts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/validator/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/adapter/utils.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { StatusMap } from "../constants.js";
|
|
|
2
2
|
import { BaseCookie } from "../cookie/types.js";
|
|
3
3
|
import { HTTPHeaders } from "../types.js";
|
|
4
4
|
import { Context } from "../context.js";
|
|
5
|
-
|
|
6
5
|
//#region src/adapter/utils.d.ts
|
|
7
6
|
declare function handleFile(response: File | Blob, set?: Context['set'], request?: Request): Response;
|
|
8
7
|
declare function parseSetCookies(headers: Headers, setCookie: string[]): Headers;
|
|
@@ -12,7 +11,7 @@ declare function responseToSetHeaders(response: Response, set?: Context['set']):
|
|
|
12
11
|
cookie?: Record<string, BaseCookie>;
|
|
13
12
|
} | {
|
|
14
13
|
headers: any;
|
|
15
|
-
status: number | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "
|
|
14
|
+
status: number | "Bad Request" | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required";
|
|
16
15
|
};
|
|
17
16
|
interface CreateHandlerParameter {
|
|
18
17
|
mapResponse(response: unknown, set: Context['set'], request?: Request): Response;
|
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";
|
|
4
3
|
import { ListenCallback, Serve, Server } from "./universal/server.js";
|
|
5
4
|
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/error.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ declare class ElysiaStatus<const in out Code extends number | keyof StatusMap, T
|
|
|
85
85
|
constructor(code: Code, res: T);
|
|
86
86
|
get status(): number;
|
|
87
87
|
}
|
|
88
|
-
declare const status: <const Code extends number | keyof StatusMap, const T = (Code extends keyof StatusMapBack ? StatusMapBack[Code] : Code)>(code: Code, response?: T) => ElysiaStatus<Code, T, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "
|
|
88
|
+
declare const status: <const Code extends number | keyof StatusMap, const T = (Code extends keyof StatusMapBack ? StatusMapBack[Code] : Code)>(code: Code, response?: T) => ElysiaStatus<Code, T, Code extends "Bad Request" | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
89
89
|
readonly Continue: 100;
|
|
90
90
|
readonly 'Switching Protocols': 101;
|
|
91
91
|
readonly Processing: 102;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { StatusMap, StatusMapBack } from "./constants.js";
|
|
2
|
-
import { ElysiaError, ElysiaStatus, InternalServerError, InvalidCookieSignature, NotFound, ParseError, ValidationError, status, validationDetail } from "./error.js";
|
|
2
|
+
import { ElysiaError, ElysiaStatus, InternalServerError, InvalidCookieSignature, NotFound, ParseError, SelectiveStatus, ValidationError, status, validationDetail } from "./error.js";
|
|
3
|
+
import { BaseCookie, CookieOptions } from "./cookie/types.js";
|
|
4
|
+
import { Cookie } from "./cookie/cookie.js";
|
|
3
5
|
import { ElysiaFile, file } from "./universal/file.js";
|
|
4
|
-
import {
|
|
6
|
+
import { env } from "./universal/env.js";
|
|
7
|
+
import { Server } from "./universal/server.js";
|
|
8
|
+
import { HTTPHeaders, SSEPayload, UnwrapSchema } from "./types.js";
|
|
5
9
|
import { AnySchema, BaseSchema, StandardJSONSchemaV1Like, StandardSchemaV1Like } from "./type/types.js";
|
|
6
10
|
import { FileTypeDetector, fileType, setFileTypeDetector } from "./type/elysia/file-type.js";
|
|
7
11
|
import { setupTypebox } from "./type/compat.js";
|
|
@@ -9,9 +13,7 @@ import { Capture, Compiled } from "./compile/aot.js";
|
|
|
9
13
|
import { MultiValidator, StandardValidator, Validator } from "./validator/index.js";
|
|
10
14
|
import { TypeBoxValidator } from "./type/validator/index.js";
|
|
11
15
|
import { TypeSystem, t } from "./type/index.js";
|
|
12
|
-
import { env } from "./universal/env.js";
|
|
13
|
-
import { SSEPayload } from "./types.js";
|
|
14
16
|
import { form, prefix, redirect, sse } from "./utils.js";
|
|
15
17
|
import { Context, ErrorContext, createBaseContext, createContext } from "./context.js";
|
|
16
18
|
import { Elysia } from "./base.js";
|
|
17
|
-
export { type AnySchema, type BaseSchema, Compiled, type Context, Elysia, Elysia as default, ElysiaError, ElysiaFile, ElysiaStatus, type ErrorContext, type FileTypeDetector, InternalServerError, InvalidCookieSignature, Capture as Manifest, MultiValidator, NotFound, ParseError, type SSEPayload, type
|
|
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 };
|
package/dist/plugin/bun.d.ts
CHANGED
|
@@ -17,7 +17,17 @@ import { BunPlugin } from "bun";
|
|
|
17
17
|
* outdir: 'dist',
|
|
18
18
|
* plugins: [aot('src/index.ts')]
|
|
19
19
|
* })
|
|
20
|
+
*
|
|
21
|
+
* process.exit(0)
|
|
20
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
25
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
26
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
27
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
28
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
29
|
+
* already on disk), or gate the side effect with
|
|
30
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
21
31
|
*/
|
|
22
32
|
declare const aot: (entry: string, options?: ElysiaAotOptions) => BunPlugin;
|
|
23
33
|
//#endregion
|
package/dist/plugin/bun.js
CHANGED
|
@@ -28,7 +28,17 @@ const realPath = (path) => {
|
|
|
28
28
|
* outdir: 'dist',
|
|
29
29
|
* plugins: [aot('src/index.ts')]
|
|
30
30
|
* })
|
|
31
|
+
*
|
|
32
|
+
* process.exit(0)
|
|
31
33
|
* ```
|
|
34
|
+
*
|
|
35
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
36
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
37
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
38
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
39
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
40
|
+
* already on disk), or gate the side effect with
|
|
41
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
32
42
|
*/
|
|
33
43
|
const aot = (entry, options) => ({
|
|
34
44
|
name: "elysia-aot",
|
package/dist/plugin/bun.mjs
CHANGED
|
@@ -26,7 +26,17 @@ const realPath = (path) => {
|
|
|
26
26
|
* outdir: 'dist',
|
|
27
27
|
* plugins: [aot('src/index.ts')]
|
|
28
28
|
* })
|
|
29
|
+
*
|
|
30
|
+
* process.exit(0)
|
|
29
31
|
* ```
|
|
32
|
+
*
|
|
33
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
34
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
35
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
36
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
37
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
38
|
+
* already on disk), or gate the side effect with
|
|
39
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
30
40
|
*/
|
|
31
41
|
const aot = (entry, options) => ({
|
|
32
42
|
name: "elysia-aot",
|
package/dist/plugin/esbuild.d.ts
CHANGED
|
@@ -16,7 +16,17 @@ import { ElysiaAotOptions } from "./core.js";
|
|
|
16
16
|
* outfile: 'dist/index.js',
|
|
17
17
|
* plugins: [elysiaAot('src/index.ts')]
|
|
18
18
|
* })
|
|
19
|
+
*
|
|
20
|
+
* process.exit(0)
|
|
19
21
|
* ```
|
|
22
|
+
*
|
|
23
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
24
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
25
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
26
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
27
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
28
|
+
* already on disk), or gate the side effect with
|
|
29
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
20
30
|
*/
|
|
21
31
|
declare const aot: (entry: string, options?: ElysiaAotOptions) => {
|
|
22
32
|
name: string;
|
package/dist/plugin/esbuild.js
CHANGED
|
@@ -30,7 +30,17 @@ const realPath = (path) => {
|
|
|
30
30
|
* outfile: 'dist/index.js',
|
|
31
31
|
* plugins: [elysiaAot('src/index.ts')]
|
|
32
32
|
* })
|
|
33
|
+
*
|
|
34
|
+
* process.exit(0)
|
|
33
35
|
* ```
|
|
36
|
+
*
|
|
37
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
38
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
39
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
40
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
41
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
42
|
+
* already on disk), or gate the side effect with
|
|
43
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
34
44
|
*/
|
|
35
45
|
const aot = (entry, options) => ({
|
|
36
46
|
name: "elysia-aot",
|
package/dist/plugin/esbuild.mjs
CHANGED
|
@@ -28,7 +28,17 @@ const realPath = (path) => {
|
|
|
28
28
|
* outfile: 'dist/index.js',
|
|
29
29
|
* plugins: [elysiaAot('src/index.ts')]
|
|
30
30
|
* })
|
|
31
|
+
*
|
|
32
|
+
* process.exit(0)
|
|
31
33
|
* ```
|
|
34
|
+
*
|
|
35
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
36
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
37
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
38
|
+
* `setInterval`, a queue consumer — keeps the process alive after the bundle
|
|
39
|
+
* is written. End the build script with `process.exit(0)` (the bundle is
|
|
40
|
+
* already on disk), or gate the side effect with
|
|
41
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
32
42
|
*/
|
|
33
43
|
const aot = (entry, options) => ({
|
|
34
44
|
name: "elysia-aot",
|
package/dist/plugin/vite.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ interface ElysiaAotVitePlugin {
|
|
|
23
23
|
* plugins: [aot('src/index.ts')]
|
|
24
24
|
* })
|
|
25
25
|
* ```
|
|
26
|
+
*
|
|
27
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
28
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
29
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
30
|
+
* `setInterval`, a queue consumer — can keep the build process alive after
|
|
31
|
+
* the bundle is written. Gate the side effect with
|
|
32
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
26
33
|
*/
|
|
27
34
|
declare const aot: (entry: string, options?: ElysiaAotOptions) => ElysiaAotVitePlugin;
|
|
28
35
|
//#endregion
|
package/dist/plugin/vite.js
CHANGED
|
@@ -18,6 +18,13 @@ const VIRTUAL = "\0elysia/compiled";
|
|
|
18
18
|
* plugins: [aot('src/index.ts')]
|
|
19
19
|
* })
|
|
20
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
23
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
24
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
25
|
+
* `setInterval`, a queue consumer — can keep the build process alive after
|
|
26
|
+
* the bundle is written. Gate the side effect with
|
|
27
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
21
28
|
*/
|
|
22
29
|
const aot = (entry, options) => {
|
|
23
30
|
const entryPath = require_plugin_core.resolveEntry(entry);
|
package/dist/plugin/vite.mjs
CHANGED
|
@@ -17,6 +17,13 @@ const VIRTUAL = "\0elysia/compiled";
|
|
|
17
17
|
* plugins: [aot('src/index.ts')]
|
|
18
18
|
* })
|
|
19
19
|
* ```
|
|
20
|
+
*
|
|
21
|
+
* The plugin imports your entry to capture the compiled app, running its
|
|
22
|
+
* top-level code. `.listen()` is auto-skipped during build (gated on
|
|
23
|
+
* `ELYSIA_AOT_BUILD`), but any other import-time handle — a DB pool,
|
|
24
|
+
* `setInterval`, a queue consumer — can keep the build process alive after
|
|
25
|
+
* the bundle is written. Gate the side effect with
|
|
26
|
+
* `if (!process.env.ELYSIA_AOT_BUILD)`.
|
|
20
27
|
*/
|
|
21
28
|
const aot = (entry, options) => {
|
|
22
29
|
const entryPath = resolveEntry(entry);
|
package/dist/type/bridge.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Intersect as Intersect$
|
|
1
|
+
import { Intersect as Intersect$1 } from "./elysia/intersect.js";
|
|
2
2
|
import { applyCoercions as applyCoercions$1, coerceBody as coerceBody$1, coerceFormData as coerceFormData$1, coerceQuery as coerceQuery$1, coerceRoot as coerceRoot$1, coerceStringToStructure as coerceStringToStructure$1 } from "./coerce.js";
|
|
3
3
|
import { hasTypes as hasTypes$1 } from "./utils.js";
|
|
4
4
|
import { TypeBoxValidatorCache as TypeBoxValidatorCache$1 } from "./validator/validator-cache.js";
|
|
5
5
|
import { TypeBoxValidator as TypeBoxValidator$1 } from "./validator/index.js";
|
|
6
|
-
import { Compile as Compile$1 } from "typebox/compile";
|
|
7
6
|
import { Ref as Ref$1, TAny, TSchema } from "typebox/type";
|
|
8
|
-
import {
|
|
7
|
+
import { Compile as Compile$1 } from "typebox/compile";
|
|
8
|
+
import { Decode as Decode$1, Default as Default$1, HasCodec as HasCodec$1 } from "typebox/value";
|
|
9
9
|
|
|
10
10
|
//#region src/type/bridge.d.ts
|
|
11
11
|
interface TypeboxModule {
|
|
12
12
|
Compile: typeof Compile$1;
|
|
13
|
-
Decode: typeof Decode$
|
|
13
|
+
Decode: typeof Decode$1;
|
|
14
14
|
applyCoercions: typeof applyCoercions$1;
|
|
15
15
|
TypeBoxValidator: TypeBoxValidator$1;
|
|
16
16
|
TypeBoxValidatorCache: TypeBoxValidatorCache$1;
|
|
@@ -21,12 +21,12 @@ interface TypeboxModule {
|
|
|
21
21
|
coerceBody: typeof coerceBody$1;
|
|
22
22
|
hasTypes: typeof hasTypes$1;
|
|
23
23
|
HasCodec: typeof HasCodec$1;
|
|
24
|
-
Intersect: typeof Intersect$
|
|
24
|
+
Intersect: typeof Intersect$1;
|
|
25
25
|
Default: typeof Default$1;
|
|
26
26
|
Ref: typeof Ref$1;
|
|
27
27
|
}
|
|
28
28
|
declare let Compile: typeof Compile$1;
|
|
29
|
-
declare let Decode: typeof Decode$
|
|
29
|
+
declare let Decode: typeof Decode$1;
|
|
30
30
|
declare let applyCoercions: typeof applyCoercions$1;
|
|
31
31
|
declare let TypeBoxValidator: TypeBoxValidator$1;
|
|
32
32
|
type TypeBoxValidator<T extends TSchema = TAny> = TypeBoxValidator$1<T>;
|
|
@@ -39,7 +39,7 @@ declare let coerceStringToStructure: typeof coerceStringToStructure$1;
|
|
|
39
39
|
declare let coerceBody: typeof coerceBody$1;
|
|
40
40
|
declare let hasTypes: typeof hasTypes$1;
|
|
41
41
|
declare let HasCodec: typeof HasCodec$1;
|
|
42
|
-
declare let Intersect: typeof Intersect$
|
|
42
|
+
declare let Intersect: typeof Intersect$1;
|
|
43
43
|
declare let Default: typeof Default$1;
|
|
44
44
|
declare let Ref: typeof Ref$1;
|
|
45
45
|
declare function useTypebox(mod: TypeboxModule): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FileType, FileUnit } from "../types.js";
|
|
2
1
|
import { MaybeArray, MaybePromise } from "../../types.js";
|
|
2
|
+
import { FileType, FileUnit } from "../types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/type/elysia/file-type.d.ts
|
|
5
5
|
type FileTypeDetector = (file: File) => MaybePromise<string | {
|
package/dist/type/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ELYSIA_TYPES } from "./constants.js";
|
|
2
2
|
import { CookieOptions } from "../cookie/types.js";
|
|
3
3
|
import { MaybeArray } from "../types.js";
|
|
4
|
-
import { Validator } from "typebox/schema";
|
|
5
4
|
import { TObjectOptions, TSchemaOptions } from "typebox";
|
|
6
5
|
import { TLocalizedValidationError } from "typebox/error";
|
|
6
|
+
import { Validator } from "typebox/schema";
|
|
7
7
|
|
|
8
8
|
//#region src/type/types.d.ts
|
|
9
9
|
type FileUnit = number | `${number}${'k' | 'm'}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { MaybePromise } from "../../types.js";
|
|
1
2
|
import { Validator as Validator$1, ValidatorOptions } from "../../validator/index.js";
|
|
2
3
|
import { TypeBoxValidatorCache } from "./validator-cache.js";
|
|
3
|
-
import { MaybePromise } from "../../types.js";
|
|
4
4
|
import { Static, StaticDecode, StaticEncode, TAny, TSchema } from "typebox/type";
|
|
5
|
-
import { Validator } from "typebox/schema";
|
|
6
5
|
import { TLocalizedValidationError } from "typebox/error";
|
|
6
|
+
import { Validator } from "typebox/schema";
|
|
7
7
|
|
|
8
8
|
//#region src/type/validator/index.d.ts
|
|
9
9
|
declare function shallowMergeObjects(members: any[]): TSchema | null;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MethodMap, StatusMapBack } from "./constants.js";
|
|
2
2
|
import { ElysiaError, ElysiaStatus } from "./error.js";
|
|
3
|
+
import { CookieOptions } from "./cookie/types.js";
|
|
3
4
|
import { ElysiaFile } from "./universal/file.js";
|
|
4
5
|
import { TraceEvent, TraceListener } from "./trace.js";
|
|
5
|
-
import { CookieOptions } from "./cookie/types.js";
|
|
6
|
-
import { AnySchema, StandardSchemaV1Like, TypeBoxSchema } from "./type/types.js";
|
|
7
6
|
import { Serve } from "./universal/server.js";
|
|
8
7
|
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";
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MethodMap } from "./constants.js";
|
|
2
|
-
import { AnySchema, StandardSchemaV1Like } from "./type/types.js";
|
|
3
2
|
import { AnyLocalHook, AppHook, ElysiaFormData, EventFn, EventScope, GuardSchemaType, InputSchema, Macro, MaybeArray, Prettify, SSEPayload } from "./types.js";
|
|
3
|
+
import { AnySchema, StandardSchemaV1Like } from "./type/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";
|
|
1
2
|
import { AnySchema, StandardSchemaV1Like } from "../type/types.js";
|
|
2
3
|
import { CoerceOption } from "../type/coerce.js";
|
|
3
4
|
import { ValidatorSlot } from "../compile/aot.js";
|
|
4
5
|
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
|
|