elysia 2.0.0-beta.18 → 2.0.0-beta.19

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/package.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region package.json
3
- var version = "2.0.0-beta.18";
3
+ var version = "2.0.0-beta.19";
4
4
 
5
5
  //#endregion
6
6
  Object.defineProperty(exports, 'version', {
package/dist/package.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "2.0.0-beta.18";
2
+ var version = "2.0.0-beta.19";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -5,8 +5,8 @@ import { TypeBoxValidatorCache, mayHaveFileType } from "./validator/validator-ca
5
5
  import { TypeBoxValidator } from "./validator/index.js";
6
6
  import { applyCoercions, coerceBody, coerceFormData, coerceQuery, coerceRoot, coerceStringToStructure } from "./coerce.js";
7
7
  import { Ref } from "typebox/type";
8
- import { Check, Clone, Create, Decode, HasCodec } from "typebox/value";
9
8
  import { Compile } from "typebox/compile";
9
+ import { Check, Clone, Create, Decode, HasCodec } from "typebox/value";
10
10
 
11
11
  //#region src/type/bridge-live.d.ts
12
12
  declare function useTypebox(_mod?: Parameters<typeof useTypebox$1>[0]): void;
@@ -6,9 +6,9 @@ const require_type_validator_validator_cache = require('./validator/validator-ca
6
6
  const require_type_validator_index = require('./validator/index.js');
7
7
  const require_type_elysia_intersect = require('./elysia/intersect.js');
8
8
  let typebox_type = require("typebox/type");
9
- let typebox_system = require("typebox/system");
10
- let typebox_value = require("typebox/value");
11
9
  let typebox_compile = require("typebox/compile");
10
+ let typebox_value = require("typebox/value");
11
+ let typebox_system = require("typebox/system");
12
12
 
13
13
  //#region src/type/bridge-live.ts
14
14
  typebox_system.Settings.Set({ unionPrioritySort: false });
@@ -4,9 +4,9 @@ import { TypeBoxValidatorCache, mayHaveFileType } from "./validator/validator-ca
4
4
  import { TypeBoxValidator } from "./validator/index.mjs";
5
5
  import { Intersect } from "./elysia/intersect.mjs";
6
6
  import { Ref } from "typebox/type";
7
- import { Settings } from "typebox/system";
8
- import { Check, Clone, Create, Decode, HasCodec } from "typebox/value";
9
7
  import { Compile } from "typebox/compile";
8
+ import { Check, Clone, Create, Decode, HasCodec } from "typebox/value";
9
+ import { Settings } from "typebox/system";
10
10
 
11
11
  //#region src/type/bridge-live.ts
12
12
  Settings.Set({ unionPrioritySort: false });
@@ -4,8 +4,8 @@ import { TypeBoxValidatorCache as TypeBoxValidatorCache$1, mayHaveFileType as ma
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
- import { Check as Check$1, Clone as Clone$1, Create as Create$1, Decode as Decode$2, HasCodec as HasCodec$1 } from "typebox/value";
8
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$2, HasCodec as HasCodec$1 } from "typebox/value";
9
9
 
10
10
  //#region src/type/bridge.d.ts
11
11
  interface TypeboxModule {
@@ -30,7 +30,7 @@ declare const coerceQuery: () => CoerceOption[];
30
30
  declare const coerceBody: () => CoerceOption[];
31
31
  declare const coerceFormData: () => CoerceOption[];
32
32
  declare const coerceStringToStructure: () => CoerceOption[];
33
- declare function applyCoercions(schema: BaseSchema | TSchema, coerces: CoerceOption[] | undefined): BaseSchema | TSchema;
33
+ declare function applyCoercions(schema: BaseSchema | TSchema, coerces: CoerceOption[] | undefined): TSchema | BaseSchema;
34
34
  declare function captureCoercePlan(original: any, coerced: any): CoerceNode | null;
35
35
  /** Full rebuild: scalar leaves + ObjectString/ArrayString sites (wired path). */
36
36
  declare const buildCoercedFromPlan: (original: any, plan: CoerceNode, seen?: Set<string>) => any;
@@ -16,6 +16,7 @@ const require_type_elysia_integer_string = require('./elysia/integer-string.js')
16
16
  const require_type_validator_index = require('./validator/index.js');
17
17
  const require_type_elysia_intersect = require('./elysia/intersect.js');
18
18
  const require_type_compat = require('./compat.js');
19
+ const require_type_typebox_system_require = require('./typebox-system-require.js');
19
20
  const require_type_elysia_accelerate = require('./elysia/accelerate.js');
20
21
  const require_type_elysia_array_buffer = require('./elysia/array-buffer.js');
21
22
  const require_type_elysia_cookie = require('./elysia/cookie.js');
@@ -53,6 +54,12 @@ const lazyNamespace = (resolve, overrides, onRead) => new Proxy(overrides, {
53
54
  if (Object.hasOwn(target, key)) return Reflect.getOwnPropertyDescriptor(target, key);
54
55
  const ns = resolve();
55
56
  if (!Object.hasOwn(ns, key)) return;
57
+ const get = Reflect.getOwnPropertyDescriptor(ns, key).get;
58
+ if (get) return {
59
+ get,
60
+ enumerable: true,
61
+ configurable: true
62
+ };
56
63
  return {
57
64
  value: ns[key],
58
65
  enumerable: true,
@@ -100,7 +107,7 @@ const t = lazyNamespace(() => require_type_typebox_type.loadTypeNamespace().type
100
107
  * handed out, keeping a user's explicit `TypeSystem.Settings.Set(...)` last —
101
108
  * the ordering the eager `setupTypebox()` used to provide
102
109
  */
103
- const TypeSystem = lazyNamespace(() => require_type_typebox_type.loadTypeNamespace().system.System, Object.create(null));
110
+ const TypeSystem = lazyNamespace(() => require_type_typebox_system_require.typeSystem(require_type_typebox_type.loadTypeNamespace().system), Object.create(null));
104
111
 
105
112
  //#endregion
106
113
  exports.TypeBoxValidator = require_type_validator_index.TypeBoxValidator;
@@ -15,6 +15,7 @@ import { IntegerString } from "./elysia/integer-string.mjs";
15
15
  import { TypeBoxValidator } from "./validator/index.mjs";
16
16
  import { Intersect } from "./elysia/intersect.mjs";
17
17
  import { setupTypebox } from "./compat.mjs";
18
+ import { typeSystem } from "./typebox-system-require.mjs";
18
19
  import { Accelerate } from "./elysia/accelerate.mjs";
19
20
  import { ArrayBufferType } from "./elysia/array-buffer.mjs";
20
21
  import { Cookie } from "./elysia/cookie.mjs";
@@ -52,6 +53,12 @@ const lazyNamespace = (resolve, overrides, onRead) => new Proxy(overrides, {
52
53
  if (Object.hasOwn(target, key)) return Reflect.getOwnPropertyDescriptor(target, key);
53
54
  const ns = resolve();
54
55
  if (!Object.hasOwn(ns, key)) return;
56
+ const get = Reflect.getOwnPropertyDescriptor(ns, key).get;
57
+ if (get) return {
58
+ get,
59
+ enumerable: true,
60
+ configurable: true
61
+ };
55
62
  return {
56
63
  value: ns[key],
57
64
  enumerable: true,
@@ -99,7 +106,7 @@ const t = lazyNamespace(() => loadTypeNamespace().type, {
99
106
  * handed out, keeping a user's explicit `TypeSystem.Settings.Set(...)` last —
100
107
  * the ordering the eager `setupTypebox()` used to provide
101
108
  */
102
- const TypeSystem = lazyNamespace(() => loadTypeNamespace().system.System, Object.create(null));
109
+ const TypeSystem = lazyNamespace(() => typeSystem(loadTypeNamespace().system), Object.create(null));
103
110
 
104
111
  //#endregion
105
112
  export { TypeBoxValidator, TypeSystem, fileType, setFileTypeDetector, setupTypebox, t };
@@ -0,0 +1,2 @@
1
+ import { Arguments, Environment, Hashing, Memory, Settings } from "typebox/system";
2
+ export { Arguments, Environment, Hashing, Memory, Settings };
@@ -0,0 +1,34 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
+ let typebox_system = require("typebox/system");
4
+
5
+ Object.defineProperty(exports, 'Arguments', {
6
+ enumerable: true,
7
+ get: function () {
8
+ return typebox_system.Arguments;
9
+ }
10
+ });
11
+ Object.defineProperty(exports, 'Environment', {
12
+ enumerable: true,
13
+ get: function () {
14
+ return typebox_system.Environment;
15
+ }
16
+ });
17
+ Object.defineProperty(exports, 'Hashing', {
18
+ enumerable: true,
19
+ get: function () {
20
+ return typebox_system.Hashing;
21
+ }
22
+ });
23
+ Object.defineProperty(exports, 'Memory', {
24
+ enumerable: true,
25
+ get: function () {
26
+ return typebox_system.Memory;
27
+ }
28
+ });
29
+ Object.defineProperty(exports, 'Settings', {
30
+ enumerable: true,
31
+ get: function () {
32
+ return typebox_system.Settings;
33
+ }
34
+ });
@@ -0,0 +1,3 @@
1
+ import { Arguments, Environment, Hashing, Memory, Settings } from "typebox/system";
2
+
3
+ export { Arguments, Environment, Hashing, Memory, Settings };
@@ -0,0 +1,7 @@
1
+ import { TypeboxTypeNamespaces } from "./typebox-type.js";
2
+ import { System } from "typebox/system";
3
+
4
+ //#region src/type/typebox-system-require.d.ts
5
+ declare const typeSystem: (system: TypeboxTypeNamespaces["system"]) => typeof System;
6
+ //#endregion
7
+ export { typeSystem };
@@ -0,0 +1,24 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_type_sync_require = require('./sync-require.js');
3
+
4
+ //#region src/type/typebox-system-require.ts
5
+ const requireLocale = () => {
6
+ try {
7
+ const req = require_type_sync_require.syncRequire({}, require("url").pathToFileURL(__filename).href);
8
+ if (req) return req("typebox/system").System.Locale;
9
+ } catch {}
10
+ throw new Error("TypeSystem.Locale isn't bundled: it carries every locale table. Register it with setupTypebox({ typebox: { type, system } }) using `import * as system from 'typebox/system'`, or build with the AOT plugin.");
11
+ };
12
+ const typeSystem = (system) => system.System ?? Object.defineProperty({
13
+ Arguments: system.Arguments,
14
+ Environment: system.Environment,
15
+ Hashing: system.Hashing,
16
+ Memory: system.Memory,
17
+ Settings: system.Settings
18
+ }, "Locale", {
19
+ get: requireLocale,
20
+ enumerable: true
21
+ });
22
+
23
+ //#endregion
24
+ exports.typeSystem = typeSystem;
@@ -0,0 +1,23 @@
1
+ import { syncRequire } from "./sync-require.mjs";
2
+
3
+ //#region src/type/typebox-system-require.ts
4
+ const requireLocale = () => {
5
+ try {
6
+ const req = syncRequire(import.meta, import.meta.url);
7
+ if (req) return req("typebox/system").System.Locale;
8
+ } catch {}
9
+ throw new Error("TypeSystem.Locale isn't bundled: it carries every locale table. Register it with setupTypebox({ typebox: { type, system } }) using `import * as system from 'typebox/system'`, or build with the AOT plugin.");
10
+ };
11
+ const typeSystem = (system) => system.System ?? Object.defineProperty({
12
+ Arguments: system.Arguments,
13
+ Environment: system.Environment,
14
+ Hashing: system.Hashing,
15
+ Memory: system.Memory,
16
+ Settings: system.Settings
17
+ }, "Locale", {
18
+ get: requireLocale,
19
+ enumerable: true
20
+ });
21
+
22
+ //#endregion
23
+ export { typeSystem };
@@ -5,7 +5,7 @@ import * as _$typebox_system0 from "typebox/system";
5
5
  //#region src/type/typebox-type.d.ts
6
6
  interface TypeboxTypeNamespaces {
7
7
  type: typeof _$typebox_type0;
8
- system: typeof _$typebox_system0;
8
+ system: Pick<typeof _$typebox_system0, 'Arguments' | 'Environment' | 'Hashing' | 'Memory' | 'Settings'> & Partial<Pick<typeof _$typebox_system0, 'System'>>;
9
9
  }
10
10
  declare const loadTypeNamespace: () => TypeboxTypeNamespaces;
11
11
  declare const markTypeUsed: () => void;
@@ -18,7 +18,7 @@ function resolveNamespaces() {
18
18
  if (typeof require === "function") try {
19
19
  return {
20
20
  type: require("typebox/type"),
21
- system: require("typebox/system")
21
+ system: require("./typebox-system-lite.mjs")
22
22
  };
23
23
  } catch {}
24
24
  const req = require_type_sync_require.syncRequire({}, require("url").pathToFileURL(__filename).href);
@@ -17,7 +17,7 @@ function resolveNamespaces() {
17
17
  if (typeof require === "function") try {
18
18
  return {
19
19
  type: require("typebox/type"),
20
- system: require("typebox/system")
20
+ system: require("./typebox-system-lite.mjs")
21
21
  };
22
22
  } catch {}
23
23
  const req = syncRequire(import.meta, import.meta.url);
@@ -1,7 +1,7 @@
1
1
  import { TypeboxNamespaces } from "./typebox-value.js";
2
+ import { Compile } from "typebox/compile";
2
3
  import { Check, Clean, Clone, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec } from "typebox/value";
3
4
  import { Build, Compile as SchemaCompile } from "typebox/schema";
4
- import { Compile } from "typebox/compile";
5
5
 
6
6
  //#region src/type/typebox-value-live.d.ts
7
7
  declare function injectTypebox(_typebox?: TypeboxNamespaces): void;
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
- let typebox_system = require("typebox/system");
3
+ let typebox_compile = require("typebox/compile");
4
4
  let typebox_value = require("typebox/value");
5
+ let typebox_system = require("typebox/system");
5
6
  let typebox_schema = require("typebox/schema");
6
- let typebox_compile = require("typebox/compile");
7
7
 
8
8
  //#region src/type/typebox-value-live.ts
9
9
  typebox_system.Settings.Set({ unionPrioritySort: false });
@@ -1,7 +1,7 @@
1
- import { Settings } from "typebox/system";
1
+ import { Compile } from "typebox/compile";
2
2
  import { Check, Clean, Clone, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec } from "typebox/value";
3
+ import { Settings } from "typebox/system";
3
4
  import { Build, Compile as SchemaCompile } from "typebox/schema";
4
- import { Compile } from "typebox/compile";
5
5
 
6
6
  //#region src/type/typebox-value-live.ts
7
7
  Settings.Set({ unionPrioritySort: false });
@@ -0,0 +1,4 @@
1
+ import { Compile } from "typebox/compile";
2
+ import { Check, Clean, Clone, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec } from "typebox/value";
3
+ import { Build, Compile as SchemaCompile } from "typebox/schema";
4
+ export { Build, Check, Clean, Clone, Compile, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec, SchemaCompile };
@@ -0,0 +1,90 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
+ let typebox_compile = require("typebox/compile");
4
+ let typebox_value = require("typebox/value");
5
+ let typebox_schema = require("typebox/schema");
6
+
7
+ Object.defineProperty(exports, 'Build', {
8
+ enumerable: true,
9
+ get: function () {
10
+ return typebox_schema.Build;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, 'Check', {
14
+ enumerable: true,
15
+ get: function () {
16
+ return typebox_value.Check;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, 'Clean', {
20
+ enumerable: true,
21
+ get: function () {
22
+ return typebox_value.Clean;
23
+ }
24
+ });
25
+ Object.defineProperty(exports, 'Clone', {
26
+ enumerable: true,
27
+ get: function () {
28
+ return typebox_value.Clone;
29
+ }
30
+ });
31
+ Object.defineProperty(exports, 'Compile', {
32
+ enumerable: true,
33
+ get: function () {
34
+ return typebox_compile.Compile;
35
+ }
36
+ });
37
+ Object.defineProperty(exports, 'Create', {
38
+ enumerable: true,
39
+ get: function () {
40
+ return typebox_value.Create;
41
+ }
42
+ });
43
+ Object.defineProperty(exports, 'Decode', {
44
+ enumerable: true,
45
+ get: function () {
46
+ return typebox_value.Decode;
47
+ }
48
+ });
49
+ Object.defineProperty(exports, 'DecodeUnsafe', {
50
+ enumerable: true,
51
+ get: function () {
52
+ return typebox_value.DecodeUnsafe;
53
+ }
54
+ });
55
+ Object.defineProperty(exports, 'Default', {
56
+ enumerable: true,
57
+ get: function () {
58
+ return typebox_value.Default;
59
+ }
60
+ });
61
+ Object.defineProperty(exports, 'Encode', {
62
+ enumerable: true,
63
+ get: function () {
64
+ return typebox_value.Encode;
65
+ }
66
+ });
67
+ Object.defineProperty(exports, 'EncodeUnsafe', {
68
+ enumerable: true,
69
+ get: function () {
70
+ return typebox_value.EncodeUnsafe;
71
+ }
72
+ });
73
+ Object.defineProperty(exports, 'Errors', {
74
+ enumerable: true,
75
+ get: function () {
76
+ return typebox_value.Errors;
77
+ }
78
+ });
79
+ Object.defineProperty(exports, 'HasCodec', {
80
+ enumerable: true,
81
+ get: function () {
82
+ return typebox_value.HasCodec;
83
+ }
84
+ });
85
+ Object.defineProperty(exports, 'SchemaCompile', {
86
+ enumerable: true,
87
+ get: function () {
88
+ return typebox_schema.Compile;
89
+ }
90
+ });
@@ -0,0 +1,5 @@
1
+ import { Compile } from "typebox/compile";
2
+ import { Check, Clean, Clone, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec } from "typebox/value";
3
+ import { Build, Compile as SchemaCompile } from "typebox/schema";
4
+
5
+ export { Build, Check, Clean, Clone, Compile, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec, SchemaCompile };
@@ -1,19 +1,8 @@
1
+ import { TypeboxTypeNamespaces } from "./typebox-type.js";
1
2
  import { TypeboxNamespaces } from "./typebox-value.js";
2
- import * as _$typebox_type0 from "typebox/type";
3
- import * as _$typebox_system0 from "typebox/system";
4
- import * as _$typebox_value0 from "typebox/value";
5
- import * as _$typebox_schema0 from "typebox/schema";
6
- import * as _$typebox_compile0 from "typebox/compile";
7
3
 
8
4
  //#region src/type/typebox-value-require.d.ts
9
- /**
10
- * Literal `require` / `import()` so bundlers embed TypeBox (still evaluated
11
- * lazily) and both resolve to that one embedded copy
12
- *
13
- * The AOT build plugin always stubs this module to `() => undefined`: sealed
14
- * builds must keep TypeBox out, other modes re-route `typebox-value` to `-live`
15
- */
16
5
  declare const requireTypebox: () => TypeboxNamespaces | undefined;
17
- declare const importTypebox: () => Promise<[typeof _$typebox_type0, typeof _$typebox_system0, typeof _$typebox_value0, typeof _$typebox_schema0, typeof _$typebox_compile0]>;
6
+ declare const importTypebox: () => Promise<[TypeboxTypeNamespaces, TypeboxNamespaces]> | undefined;
18
7
  //#endregion
19
8
  export { importTypebox, requireTypebox };
@@ -1,29 +1,27 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  //#region src/type/typebox-value-require.ts
4
- /**
5
- * Literal `require` / `import()` so bundlers embed TypeBox (still evaluated
6
- * lazily) and both resolve to that one embedded copy
7
- *
8
- * The AOT build plugin always stubs this module to `() => undefined`: sealed
9
- * builds must keep TypeBox out, other modes re-route `typebox-value` to `-live`
10
- */
4
+ const fromOps = (ops) => ({
5
+ value: ops,
6
+ schema: {
7
+ Compile: ops.SchemaCompile,
8
+ Build: ops.Build
9
+ },
10
+ compile: { Compile: ops.Compile }
11
+ });
11
12
  const requireTypebox = () => {
12
13
  if (typeof require === "function") try {
13
- return {
14
- value: require("typebox/value"),
15
- schema: require("typebox/schema"),
16
- compile: require("typebox/compile")
17
- };
14
+ return fromOps(require("./typebox-value-ops.mjs"));
18
15
  } catch {}
19
16
  };
20
17
  const importTypebox = () => Promise.all([
21
18
  import("typebox/type"),
22
- import("typebox/system"),
23
- import("typebox/value"),
24
- import("typebox/schema"),
25
- import("typebox/compile")
26
- ]);
19
+ import("./typebox-system-lite.mjs"),
20
+ import("./typebox-value-ops.mjs")
21
+ ]).then(([type, system, ops]) => [{
22
+ type,
23
+ system
24
+ }, fromOps(ops)]);
27
25
 
28
26
  //#endregion
29
27
  exports.importTypebox = importTypebox;
@@ -1,27 +1,25 @@
1
1
  //#region src/type/typebox-value-require.ts
2
- /**
3
- * Literal `require` / `import()` so bundlers embed TypeBox (still evaluated
4
- * lazily) and both resolve to that one embedded copy
5
- *
6
- * The AOT build plugin always stubs this module to `() => undefined`: sealed
7
- * builds must keep TypeBox out, other modes re-route `typebox-value` to `-live`
8
- */
2
+ const fromOps = (ops) => ({
3
+ value: ops,
4
+ schema: {
5
+ Compile: ops.SchemaCompile,
6
+ Build: ops.Build
7
+ },
8
+ compile: { Compile: ops.Compile }
9
+ });
9
10
  const requireTypebox = () => {
10
11
  if (typeof require === "function") try {
11
- return {
12
- value: require("typebox/value"),
13
- schema: require("typebox/schema"),
14
- compile: require("typebox/compile")
15
- };
12
+ return fromOps(require("./typebox-value-ops.mjs"));
16
13
  } catch {}
17
14
  };
18
15
  const importTypebox = () => Promise.all([
19
16
  import("typebox/type"),
20
- import("typebox/system"),
21
- import("typebox/value"),
22
- import("typebox/schema"),
23
- import("typebox/compile")
24
- ]);
17
+ import("./typebox-system-lite.mjs"),
18
+ import("./typebox-value-ops.mjs")
19
+ ]).then(([type, system, ops]) => [{
20
+ type,
21
+ system
22
+ }, fromOps(ops)]);
25
23
 
26
24
  //#endregion
27
25
  export { importTypebox, requireTypebox };
@@ -1,15 +1,15 @@
1
+ import * as _$typebox_compile0 from "typebox/compile";
2
+ import { Compile as Compile$1 } from "typebox/compile";
1
3
  import * as _$typebox_value0 from "typebox/value";
2
4
  import { Check as Check$1, Clean as Clean$1, Clone as Clone$1, Create as Create$1, Decode as Decode$1, DecodeUnsafe as DecodeUnsafe$1, Default as Default$1, Encode as Encode$1, EncodeUnsafe as EncodeUnsafe$1, Errors as Errors$1, HasCodec as HasCodec$1 } from "typebox/value";
3
5
  import * as _$typebox_schema0 from "typebox/schema";
4
- import { Build as Build$1, Compile as Compile$1 } from "typebox/schema";
5
- import * as _$typebox_compile0 from "typebox/compile";
6
- import { Compile as Compile$2 } from "typebox/compile";
6
+ import { Build as Build$1, Compile as Compile$2 } from "typebox/schema";
7
7
 
8
8
  //#region src/type/typebox-value.d.ts
9
9
  interface TypeboxNamespaces {
10
- value: typeof _$typebox_value0;
11
- schema: typeof _$typebox_schema0;
12
- compile: typeof _$typebox_compile0;
10
+ value: Pick<typeof _$typebox_value0, 'Check' | 'Clean' | 'Clone' | 'Create' | 'Decode' | 'DecodeUnsafe' | 'Default' | 'Encode' | 'EncodeUnsafe' | 'Errors' | 'HasCodec'>;
11
+ schema: Pick<typeof _$typebox_schema0, 'Compile' | 'Build'>;
12
+ compile: Pick<typeof _$typebox_compile0, 'Compile'>;
13
13
  }
14
14
  /**
15
15
  * Loads `typebox/value` + `typebox/schema` + `typebox/compile` on first use
@@ -27,9 +27,9 @@ declare let Encode: typeof Encode$1;
27
27
  declare let EncodeUnsafe: typeof EncodeUnsafe$1;
28
28
  declare let Errors: typeof Errors$1;
29
29
  declare let HasCodec: typeof HasCodec$1;
30
- declare let SchemaCompile: typeof Compile$1;
30
+ declare let SchemaCompile: typeof Compile$2;
31
31
  declare let Build: typeof Build$1;
32
- declare let Compile: typeof Compile$2;
32
+ declare let Compile: typeof Compile$1;
33
33
  declare function injectTypebox(typebox: TypeboxNamespaces): void;
34
34
  //#endregion
35
35
  export { Build, Check, Clean, Clone, Compile, Create, Decode, DecodeUnsafe, Default, Encode, EncodeUnsafe, Errors, HasCodec, SchemaCompile, TypeboxNamespaces, injectTypebox, preloadTypebox, load as warmTypebox };
@@ -15,17 +15,10 @@ function load() {
15
15
  }
16
16
  function preloadTypebox() {
17
17
  if (loaded || !require_type_typebox_type.isTypeUsed()) return;
18
- return require_type_typebox_value_require.importTypebox()?.then(([type, system, value, schema, compile]) => {
18
+ return require_type_typebox_value_require.importTypebox()?.then(([typeSide, valueSide]) => {
19
19
  if (loaded) return;
20
- if (!require_type_typebox_type.isTypeNamespaceLoaded()) require_type_typebox_type.injectTypeboxType({
21
- type,
22
- system
23
- });
24
- injectTypebox({
25
- value,
26
- schema,
27
- compile
28
- });
20
+ if (!require_type_typebox_type.isTypeNamespaceLoaded()) require_type_typebox_type.injectTypeboxType(typeSide);
21
+ injectTypebox(valueSide);
29
22
  }, () => {});
30
23
  }
31
24
  function resolveNamespaces() {
@@ -14,17 +14,10 @@ function load() {
14
14
  }
15
15
  function preloadTypebox() {
16
16
  if (loaded || !isTypeUsed()) return;
17
- return importTypebox()?.then(([type, system, value, schema, compile]) => {
17
+ return importTypebox()?.then(([typeSide, valueSide]) => {
18
18
  if (loaded) return;
19
- if (!isTypeNamespaceLoaded()) injectTypeboxType({
20
- type,
21
- system
22
- });
23
- injectTypebox({
24
- value,
25
- schema,
26
- compile
27
- });
19
+ if (!isTypeNamespaceLoaded()) injectTypeboxType(typeSide);
20
+ injectTypebox(valueSide);
28
21
  }, () => {});
29
22
  }
30
23
  function resolveNamespaces() {
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AnySchema, StandardSchemaV1Like } from "./type/types.js";
2
2
  import { Context } from "./context.js";
3
3
  import { AnyLocalHook, AppHook, BunHTMLBundlelike, ElysiaFormData, EventFn, EventScope, GuardSchemaType, InputSchema, Macro, MaybeArray, Prettify, SSEPayload } from "./types.js";
4
+
4
5
  //#region src/utils.d.ts
5
6
  type DeriveEntry = Function | readonly [Function, 'mapDerive'];
6
7
  declare const nullObject: () => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elysia",
3
3
  "description": "Ergonomic Framework for Human",
4
- "version": "2.0.0-beta.18",
4
+ "version": "2.0.0-beta.19",
5
5
  "author": {
6
6
  "name": "saltyAom",
7
7
  "url": "https://github.com/SaltyAom",