elysia 1.1.8 → 1.1.11
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/bun/index.d.ts +7 -4
- package/dist/bun/index.js +113 -113
- package/dist/bun/index.js.map +7 -7
- package/dist/cjs/compose.js +22 -4
- package/dist/cjs/dynamic-handle.js +18 -3
- package/dist/cjs/handler.d.ts +2 -0
- package/dist/cjs/handler.js +10 -0
- package/dist/cjs/index.d.ts +7 -4
- package/dist/cjs/index.js +109 -65
- package/dist/cjs/types.d.ts +8 -2
- package/dist/cjs/utils.js +12 -9
- package/dist/compose.mjs +22 -4
- package/dist/dynamic-handle.mjs +18 -3
- package/dist/handler.d.ts +2 -0
- package/dist/handler.mjs +9 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.mjs +108 -65
- package/dist/types.d.ts +8 -2
- package/dist/utils.mjs +12 -9
- package/package.json +2 -2
package/dist/bun/index.d.ts
CHANGED
|
@@ -88,10 +88,12 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
88
88
|
dynamic: Memoirist<DynamicHandler>;
|
|
89
89
|
static: {
|
|
90
90
|
http: {
|
|
91
|
+
static: Record<string, Response>;
|
|
91
92
|
handlers: ComposedHandler[];
|
|
92
93
|
map: Record<string, {
|
|
93
94
|
code: string;
|
|
94
95
|
all?: string;
|
|
96
|
+
static?: Function;
|
|
95
97
|
}>;
|
|
96
98
|
all: string;
|
|
97
99
|
};
|
|
@@ -131,8 +133,8 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
131
133
|
* @example
|
|
132
134
|
* ```typescript
|
|
133
135
|
* new Elysia()
|
|
134
|
-
* .onStart(({
|
|
135
|
-
* console.log("Running at ${url}:${port}")
|
|
136
|
+
* .onStart(({ server }) => {
|
|
137
|
+
* console.log("Running at ${server?.url}:${server?.port}")
|
|
136
138
|
* })
|
|
137
139
|
* .listen(3000)
|
|
138
140
|
* ```
|
|
@@ -803,8 +805,8 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
803
805
|
schema: {};
|
|
804
806
|
}>;
|
|
805
807
|
as(type: 'plugin'): Elysia<BasePath, Scoped, Singleton, Definitions, Metadata, Routes, {
|
|
806
|
-
derive:
|
|
807
|
-
resolve:
|
|
808
|
+
derive: Prettify<Ephemeral['derive'] & Volatile['derive']>;
|
|
809
|
+
resolve: Prettify<Ephemeral['resolve'] & Volatile['resolve']>;
|
|
808
810
|
schema: MergeSchema<Volatile['schema'], Ephemeral['schema']>;
|
|
809
811
|
}, {
|
|
810
812
|
derive: {};
|
|
@@ -1606,4 +1608,5 @@ export { ELYSIA_TRACE, type TraceEvent, type TraceListener, type TraceHandler, t
|
|
|
1606
1608
|
export { getSchemaValidator, mergeHook, mergeObjectArray, getResponseSchemaValidator, redirect, StatusMap, InvertedStatusMap, form, replaceSchemaType, replaceUrlPath, checksum, cloneInference, deduplicateChecksum, ELYSIA_FORM_DATA, ELYSIA_REQUEST_ID } from './utils';
|
|
1607
1609
|
export { error, mapValueError, ParseError, NotFoundError, ValidationError, InternalServerError, InvalidCookieSignature, ERROR_CODE, ELYSIA_RESPONSE } from './error';
|
|
1608
1610
|
export type { EphemeralType, CreateEden, ComposeElysiaResponse, ElysiaConfig, SingletonBase, DefinitionBase, RouteBase, Handler, ComposedHandler, InputSchema, LocalHook, MergeSchema, RouteSchema, UnwrapRoute, InternalRoute, HTTPMethod, SchemaValidator, VoidHandler, PreHandler, BodyHandler, OptionalHandler, AfterResponseHandler, ErrorHandler, AfterHandler, LifeCycleEvent, LifeCycleStore, LifeCycleType, MaybePromise, ListenCallback, UnwrapSchema, Checksum, DocumentDecoration, InferContext, InferHandler, ResolvePath, MapResponse, MacroQueue, BaseMacro, MacroManager, BaseMacroFn, MacroToProperty, ResolveMacroContext, MergeElysiaInstances, MaybeArray, ModelValidator, MetadataBase, UnwrapBodySchema, UnwrapGroupGuardRoute, ModelValidatorError, ExcludeElysiaResponse, CoExist } from './types';
|
|
1611
|
+
export { TypeSystemPolicy } from '@sinclair/typebox/system';
|
|
1609
1612
|
export type { Static, TSchema } from '@sinclair/typebox';
|