elysia 2.0.0-exp.44 → 2.0.0-exp.45
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/compile/aot.js +5 -1
- package/dist/compile/aot.mjs +5 -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-live.d.ts +1 -1
- package/dist/type/bridge.d.ts +6 -6
- package/dist/type/constants.d.ts +1 -1
- package/dist/type/validator/index.d.ts +1 -1
- package/dist/utils.d.ts +0 -1
- package/package.json +1 -1
package/dist/compile/aot.js
CHANGED
|
@@ -219,7 +219,11 @@ function captureEntry({ method, path, slot }) {
|
|
|
219
219
|
const aotActivationError = /* @__PURE__ */ new Error("Elysia AOT capture module is not activated.");
|
|
220
220
|
function beginValidatorCapture() {
|
|
221
221
|
if (captureImpl === void 0) throw aotActivationError;
|
|
222
|
-
if (activeSession?.capture !== void 0)
|
|
222
|
+
if (activeSession?.capture !== void 0) {
|
|
223
|
+
if (activeSession.explicitCapture) throw new Error("[elysia-aot]: A capture session is already active.");
|
|
224
|
+
activeSession.explicitCapture = true;
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
223
227
|
if (activeSession && !activeSession.external) throw new Error("[elysia-aot]: A compiler session is already active.");
|
|
224
228
|
const session = activeSession ?? (activeSession = newCompilerSession());
|
|
225
229
|
session.external = true;
|
package/dist/compile/aot.mjs
CHANGED
|
@@ -218,7 +218,11 @@ function captureEntry({ method, path, slot }) {
|
|
|
218
218
|
const aotActivationError = /* @__PURE__ */ new Error("Elysia AOT capture module is not activated.");
|
|
219
219
|
function beginValidatorCapture() {
|
|
220
220
|
if (captureImpl === void 0) throw aotActivationError;
|
|
221
|
-
if (activeSession?.capture !== void 0)
|
|
221
|
+
if (activeSession?.capture !== void 0) {
|
|
222
|
+
if (activeSession.explicitCapture) throw new Error("[elysia-aot]: A capture session is already active.");
|
|
223
|
+
activeSession.explicitCapture = true;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
222
226
|
if (activeSession && !activeSession.external) throw new Error("[elysia-aot]: A compiler session is already active.");
|
|
223
227
|
const session = activeSession ?? (activeSession = newCompilerSession());
|
|
224
228
|
session.external = true;
|
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
|
@@ -5,8 +5,8 @@ import { hasTypes } from "./utils.js";
|
|
|
5
5
|
import { useTypebox as useTypebox$1 } from "./bridge.js";
|
|
6
6
|
import { applyCoercions, coerceBody, coerceFormData, coerceQuery, coerceRoot, coerceStringToStructure } from "./coerce.js";
|
|
7
7
|
import { Ref } from "typebox/type";
|
|
8
|
-
import { Compile } from "typebox/compile";
|
|
9
8
|
import { Clone, Create, Decode, Default, HasCodec } from "typebox/value";
|
|
9
|
+
import { Compile } from "typebox/compile";
|
|
10
10
|
|
|
11
11
|
//#region src/type/bridge-live.d.ts
|
|
12
12
|
declare function useTypebox(_mod?: Parameters<typeof useTypebox$1>[0]): void;
|
package/dist/type/bridge.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { TypeBoxValidatorCache as TypeBoxValidatorCache$1 } from "./validator/validator-cache.js";
|
|
2
2
|
import { TypeBoxValidator as TypeBoxValidator$1 } from "./validator/index.js";
|
|
3
|
-
import { Intersect as Intersect$
|
|
3
|
+
import { Intersect as Intersect$2 } from "./elysia/intersect.js";
|
|
4
4
|
import { hasTypes as hasTypes$1 } from "./utils.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
|
+
import { Clone as Clone$1, Create as Create$1, Decode as Decode$2, Default as Default$1, HasCodec as HasCodec$1 } from "typebox/value";
|
|
7
8
|
import { Compile as Compile$1 } from "typebox/compile";
|
|
8
|
-
import { 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$2;
|
|
15
15
|
applyCoercions: typeof applyCoercions$1;
|
|
16
16
|
TypeBoxValidator: TypeBoxValidator$1;
|
|
17
17
|
TypeBoxValidatorCache: TypeBoxValidatorCache$1;
|
|
@@ -22,14 +22,14 @@ interface TypeboxModule {
|
|
|
22
22
|
coerceBody: typeof coerceBody$1;
|
|
23
23
|
hasTypes: typeof hasTypes$1;
|
|
24
24
|
HasCodec: typeof HasCodec$1;
|
|
25
|
-
Intersect: typeof Intersect$
|
|
25
|
+
Intersect: typeof Intersect$2;
|
|
26
26
|
Default: typeof Default$1;
|
|
27
27
|
Ref: typeof Ref$1;
|
|
28
28
|
Clone: typeof Clone$1;
|
|
29
29
|
}
|
|
30
30
|
declare let Compile: typeof Compile$1;
|
|
31
31
|
declare let Create: typeof Create$1;
|
|
32
|
-
declare let Decode: typeof Decode$
|
|
32
|
+
declare let Decode: typeof Decode$2;
|
|
33
33
|
declare let applyCoercions: typeof applyCoercions$1;
|
|
34
34
|
declare let TypeBoxValidator: TypeBoxValidator$1;
|
|
35
35
|
type TypeBoxValidator<T extends TSchema = TAny> = TypeBoxValidator$1<T>;
|
|
@@ -42,7 +42,7 @@ declare let coerceStringToStructure: typeof coerceStringToStructure$1;
|
|
|
42
42
|
declare let coerceBody: typeof coerceBody$1;
|
|
43
43
|
declare let hasTypes: typeof hasTypes$1;
|
|
44
44
|
declare let HasCodec: typeof HasCodec$1;
|
|
45
|
-
declare let Intersect: typeof Intersect$
|
|
45
|
+
declare let Intersect: typeof Intersect$2;
|
|
46
46
|
declare let Default: typeof Default$1;
|
|
47
47
|
declare let Ref: typeof Ref$1;
|
|
48
48
|
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<
|
|
20
|
+
declare const primitiveElysiaTypes: Set<1 | 2 | 6 | 3 | 10 | 11 | 13 | 14>;
|
|
21
21
|
declare const noEnumerable: {
|
|
22
22
|
readonly enumerable: false;
|
|
23
23
|
};
|
|
@@ -2,8 +2,8 @@ import { TypeBoxValidatorCache } from "./validator-cache.js";
|
|
|
2
2
|
import { Validator as Validator$1, ValidatorOptions } from "../../validator/index.js";
|
|
3
3
|
import { MaybePromise } from "../../types.js";
|
|
4
4
|
import { Static, StaticDecode, StaticEncode, TAny, TSchema } from "typebox/type";
|
|
5
|
-
import { TLocalizedValidationError } from "typebox/error";
|
|
6
5
|
import { Validator } from "typebox/schema";
|
|
6
|
+
import { TLocalizedValidationError } from "typebox/error";
|
|
7
7
|
|
|
8
8
|
//#region src/type/validator/index.d.ts
|
|
9
9
|
declare function shallowMergeObjects(members: any[]): TSchema | null;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AnyLocalHook, AppHook, ElysiaFormData, EventFn, EventScope, GuardSchemaType, InputSchema, Macro, MaybeArray, Prettify, SSEPayload } from "./types.js";
|
|
2
2
|
import { Context } from "./context.js";
|
|
3
3
|
import { AnySchema, StandardSchemaV1Like } from "./type/types.js";
|
|
4
|
-
|
|
5
4
|
//#region src/utils.d.ts
|
|
6
5
|
declare const nullObject: () => any;
|
|
7
6
|
type DeriveEntry = Function | readonly [Function, 'mapDerive'];
|