elysia 2.0.0-exp.59 → 2.0.0-exp.60
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/web-standard/handler.js +1 -0
- package/dist/adapter/web-standard/handler.mjs +2 -1
- package/dist/compile/lexer.d.ts +1 -1
- package/dist/package.js +1 -1
- package/dist/package.mjs +1 -1
- package/dist/type/bridge.d.ts +6 -6
- package/dist/type/constants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -125,6 +125,7 @@ function mapFallback(response, set, request, owned = false) {
|
|
|
125
125
|
status: response.code,
|
|
126
126
|
headers: response.headers ? { ...response.headers } : {}
|
|
127
127
|
}, request, owned);
|
|
128
|
+
if (response instanceof require_universal_file.ElysiaFile) return handleElysiaFile(response, void 0, request);
|
|
128
129
|
if (typeof response?.next === "function" || response instanceof ReadableStream) return handleStream(response, set, request, void 0, owned);
|
|
129
130
|
if (typeof response?.then === "function") return response.then((x) => set ? mapResponse(x, set, request, owned) : mapCompactResponse(x, request, owned));
|
|
130
131
|
if (Array.isArray(response)) return Response.json(response);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isBun } from "../../universal/constants.mjs";
|
|
2
|
-
import { mime } from "../../universal/file.mjs";
|
|
2
|
+
import { ElysiaFile, mime } from "../../universal/file.mjs";
|
|
3
3
|
import { formToFormData, isNotEmpty, nullObject } from "../../utils.mjs";
|
|
4
4
|
import { ElysiaStatus, PROBLEM_JSON, internalServerErrorBody } from "../../error.mjs";
|
|
5
5
|
import { defaultHeaders } from "../default-headers.mjs";
|
|
@@ -124,6 +124,7 @@ function mapFallback(response, set, request, owned = false) {
|
|
|
124
124
|
status: response.code,
|
|
125
125
|
headers: response.headers ? { ...response.headers } : {}
|
|
126
126
|
}, request, owned);
|
|
127
|
+
if (response instanceof ElysiaFile) return handleElysiaFile(response, void 0, request);
|
|
127
128
|
if (typeof response?.next === "function" || response instanceof ReadableStream) return handleStream(response, set, request, void 0, owned);
|
|
128
129
|
if (typeof response?.then === "function") return response.then((x) => set ? mapResponse(x, set, request, owned) : mapCompactResponse(x, request, owned));
|
|
129
130
|
if (Array.isArray(response)) return Response.json(response);
|
package/dist/compile/lexer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/compile/lexer.d.ts
|
|
2
|
-
declare const isSpace: (ch: string) => ch is "
|
|
2
|
+
declare const isSpace: (ch: string) => ch is " " | "\n" | "\t" | "\r";
|
|
3
3
|
declare const isIdentChar: (ch: string) => boolean;
|
|
4
4
|
declare const isIdentCharCode: (code: number) => boolean;
|
|
5
5
|
declare function skipString(src: string, start: number): number;
|
package/dist/package.js
CHANGED
package/dist/package.mjs
CHANGED
package/dist/type/bridge.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Intersect as Intersect$
|
|
1
|
+
import { Intersect as Intersect$1 } from "./elysia/intersect.js";
|
|
2
2
|
import { hasTypes as hasTypes$1 } from "./utils.js";
|
|
3
3
|
import { TypeBoxValidatorCache as TypeBoxValidatorCache$1, mayHaveFileType as mayHaveFileType$1 } from "./validator/validator-cache.js";
|
|
4
4
|
import { TypeBoxValidator as TypeBoxValidator$1 } from "./validator/index.js";
|
|
5
5
|
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";
|
|
6
6
|
import { Ref as Ref$1, TAny, TSchema } from "typebox/type";
|
|
7
7
|
import { Compile as Compile$1 } from "typebox/compile";
|
|
8
|
-
import { Check as Check$1, Clone as Clone$1, Create as Create$1, Decode as Decode$
|
|
8
|
+
import { Check as Check$1, Clone as Clone$1, Create as Create$1, 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
13
|
Create: typeof Create$1;
|
|
14
|
-
Decode: typeof Decode$
|
|
14
|
+
Decode: typeof Decode$1;
|
|
15
15
|
applyCoercions: typeof applyCoercions$1;
|
|
16
16
|
TypeBoxValidator: TypeBoxValidator$1;
|
|
17
17
|
TypeBoxValidatorCache: TypeBoxValidatorCache$1;
|
|
@@ -23,7 +23,7 @@ interface TypeboxModule {
|
|
|
23
23
|
hasTypes: typeof hasTypes$1;
|
|
24
24
|
mayHaveFileType: typeof mayHaveFileType$1;
|
|
25
25
|
HasCodec: typeof HasCodec$1;
|
|
26
|
-
Intersect: typeof Intersect$
|
|
26
|
+
Intersect: typeof Intersect$1;
|
|
27
27
|
Default: typeof Default$1;
|
|
28
28
|
Ref: typeof Ref$1;
|
|
29
29
|
Clone: typeof Clone$1;
|
|
@@ -31,7 +31,7 @@ interface TypeboxModule {
|
|
|
31
31
|
}
|
|
32
32
|
declare let Compile: typeof Compile$1;
|
|
33
33
|
declare let Create: typeof Create$1;
|
|
34
|
-
declare let Decode: typeof Decode$
|
|
34
|
+
declare let Decode: typeof Decode$1;
|
|
35
35
|
declare let applyCoercions: typeof applyCoercions$1;
|
|
36
36
|
declare let TypeBoxValidator: TypeBoxValidator$1;
|
|
37
37
|
type TypeBoxValidator<T extends TSchema = TAny> = TypeBoxValidator$1<T>;
|
|
@@ -45,7 +45,7 @@ declare let coerceBody: typeof coerceBody$1;
|
|
|
45
45
|
declare let hasTypes: typeof hasTypes$1;
|
|
46
46
|
declare let mayHaveFileType: typeof mayHaveFileType$1;
|
|
47
47
|
declare let HasCodec: typeof HasCodec$1;
|
|
48
|
-
declare let Intersect: typeof Intersect$
|
|
48
|
+
declare let Intersect: typeof Intersect$1;
|
|
49
49
|
declare let Default: typeof Default$1;
|
|
50
50
|
declare let Ref: typeof Ref$1;
|
|
51
51
|
declare let Clone: typeof Clone$1;
|
package/dist/type/constants.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const ELYSIA_TYPES: {
|
|
|
17
17
|
readonly NoValidate: 15;
|
|
18
18
|
};
|
|
19
19
|
type ELYSIA_TYPES = typeof ELYSIA_TYPES;
|
|
20
|
-
declare const primitiveElysiaTypes: Set<1 | 2 | 3 |
|
|
20
|
+
declare const primitiveElysiaTypes: Set<6 | 1 | 2 | 3 | 10 | 11 | 13 | 14>;
|
|
21
21
|
declare const noEnumerable: {
|
|
22
22
|
readonly enumerable: false;
|
|
23
23
|
};
|