elysia 2.0.0-beta.5 → 2.0.0-beta.6
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/base.d.ts +25 -9
- package/dist/base.js +175 -200
- package/dist/base.mjs +175 -200
- package/dist/compile/aot.d.ts +5 -5
- package/dist/compile/handler/index.js +4 -0
- package/dist/compile/handler/index.mjs +4 -0
- package/dist/package.js +1 -1
- package/dist/package.mjs +1 -1
- package/dist/plugin/aot/core.d.ts +15 -36
- package/dist/plugin/aot/core.js +21 -39
- package/dist/plugin/aot/core.mjs +22 -41
- package/dist/type/coerce-plan.d.ts +1 -1
- package/dist/type/coerce-plan.js +1 -0
- package/dist/type/coerce-plan.mjs +1 -0
- package/dist/type/coerce.d.ts +2 -2
- package/dist/type/coerce.js +1 -1
- package/dist/type/coerce.mjs +2 -2
- package/dist/type/constants.d.ts +1 -1
- package/dist/type/validator/exact-mirror-live.d.ts +8 -0
- package/dist/type/validator/exact-mirror-live.js +22 -0
- package/dist/type/validator/exact-mirror-live.mjs +17 -0
- package/dist/type/validator/index.js +10 -1
- package/dist/type/validator/index.mjs +10 -1
- package/dist/types.d.ts +11 -7
- package/package.json +1 -1
package/dist/base.d.ts
CHANGED
|
@@ -28,6 +28,16 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
|
|
|
28
28
|
'~Ephemeral': Ephemeral;
|
|
29
29
|
'~Volatile': Volatile;
|
|
30
30
|
'~Routes': Routes;
|
|
31
|
+
private hasPlugin?;
|
|
32
|
+
private hasGlobal?;
|
|
33
|
+
private ready?;
|
|
34
|
+
private _pending;
|
|
35
|
+
private _error?;
|
|
36
|
+
private hash?;
|
|
37
|
+
private childrenHash?;
|
|
38
|
+
private scopeParent?;
|
|
39
|
+
private pluginMacros?;
|
|
40
|
+
private macroBaseline?;
|
|
31
41
|
'~ext'?: {
|
|
32
42
|
decorator?: Singleton['decorator'];
|
|
33
43
|
store?: Singleton['store'];
|
|
@@ -55,10 +65,18 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
|
|
|
55
65
|
};
|
|
56
66
|
'~hookChain'?: ChainNode;
|
|
57
67
|
'~wsConfig'?: WSOptions;
|
|
68
|
+
private declaredRoutes?;
|
|
69
|
+
private routeSources?;
|
|
58
70
|
server?: Server;
|
|
59
71
|
get history(): readonly HistoryEntry[];
|
|
60
72
|
get ['~routes'](): readonly InternalRoute[];
|
|
61
73
|
['~addRoute'](route: InternalRoute): this;
|
|
74
|
+
private compiled?;
|
|
75
|
+
private jitColdRemaining?;
|
|
76
|
+
private jitTable?;
|
|
77
|
+
private jitRoute?;
|
|
78
|
+
private jitStatic?;
|
|
79
|
+
private jitAliases?;
|
|
62
80
|
'~router'?: Memoirist<CompiledHandler>;
|
|
63
81
|
'~map'?: {
|
|
64
82
|
[method: string]: {
|
|
@@ -528,6 +546,7 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
|
|
|
528
546
|
parser: Metadata['parser'];
|
|
529
547
|
response: Metadata['response'] & MacroContext['response'] & ElysiaHandlerToResponseSchemaAmbiguous<BeforeHandle> & ElysiaHandlerToResponseSchemaAmbiguous<AfterHandle> & ElysiaHandlerToResponseSchemaAmbiguous<ErrorHandle>;
|
|
530
548
|
}, {}, Ephemeral, Volatile>) => NewElysia): Elysia<BasePath, Scope, Singleton, Definitions, Metadata, Routes & NewElysia['~Routes'], Ephemeral, Volatile>;
|
|
549
|
+
private get ext();
|
|
531
550
|
['~resolvedCapability'](kind: 'trace'): TraceCapability | undefined;
|
|
532
551
|
['~resolvedCapability'](kind: 'ws'): {
|
|
533
552
|
provider: WSCapability;
|
|
@@ -869,8 +888,11 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
|
|
|
869
888
|
*/
|
|
870
889
|
compile(): this;
|
|
871
890
|
handler(index: number, immediate?: boolean, route?: InternalRoute, precomputedStatic?: Response, aliases?: StaticMapAliases, table?: RouteTable): CompiledHandler;
|
|
891
|
+
private routerBuilt;
|
|
872
892
|
['~newGeneration'](): this;
|
|
893
|
+
private fetchFn?;
|
|
873
894
|
get fetch(): (request: Request, ...rest: any[]) => MaybePromise<Response>;
|
|
895
|
+
private _handle?;
|
|
874
896
|
get handle(): (url: string | Request, options?: RequestInit) => Promise<Response>;
|
|
875
897
|
listen(options: string | number | Partial<Serve>, callback?: ListenCallback): this;
|
|
876
898
|
/**
|
|
@@ -904,21 +926,15 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
|
|
|
904
926
|
*/
|
|
905
927
|
cleanup(handler: MaybeArray<GracefulHandler<this>>): this;
|
|
906
928
|
/**
|
|
907
|
-
* Stop the underlying server (if any), then run every `cleanup` handler
|
|
908
|
-
* Omitted and `false` are the same graceful stop: new requests are gated,
|
|
909
|
-
* tracked WebSockets are settled and active HTTP is drained, then cleanup
|
|
910
|
-
* runs and the epoch is released. `true` force-closes the transport
|
|
911
|
-
* instead of draining it, and escalates a graceful stop already in flight.
|
|
929
|
+
* Stop the underlying server (if any), then run every `cleanup` handler
|
|
912
930
|
*
|
|
913
931
|
* Awaiting `stop()` from inside a `setup`, `cleanup` or WebSocket lifecycle
|
|
914
|
-
* callback is only supported while that callback is still synchronous
|
|
915
|
-
* teardown is waiting on the callback, so after an `await` it can only be
|
|
916
|
-
* issued as `void app.stop()`.
|
|
932
|
+
* callback is only supported while that callback is still synchronous
|
|
917
933
|
*
|
|
918
934
|
* @param closeActiveConnections Pass `true` to terminate active
|
|
919
935
|
* transports. Omit (or pass `false`) to drain safely.
|
|
920
936
|
*/
|
|
921
|
-
stop(closeActiveConnections?: boolean): Promise<void> |
|
|
937
|
+
stop(closeActiveConnections?: boolean): Promise<void> | undefined;
|
|
922
938
|
}
|
|
923
939
|
//#endregion
|
|
924
940
|
export { AnyElysia, Elysia };
|