elysia 0.7.16 → 0.7.18
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/0.7.7 +0 -0
- package/dist/bun/index.d.ts +5 -3
- package/dist/bun/index.js +65 -43
- package/dist/bun/index.js.map +8 -8
- package/dist/cjs/compose.js +35 -2
- package/dist/cjs/cookie.js +2 -1
- package/dist/cjs/handler.js +27 -0
- package/dist/cjs/index.d.ts +5 -3
- package/dist/cjs/index.js +36 -11
- package/dist/cjs/ws/index.d.ts +1 -0
- package/dist/cjs/ws/index.js +5 -0
- package/dist/compose.js +123 -99
- package/dist/cookie.js +1 -1
- package/dist/handler.js +10 -6
- package/dist/index.d.ts +5 -3
- package/dist/index.js +18 -17
- package/dist/ws/index.d.ts +1 -0
- package/dist/ws/index.js +1 -1
- package/package.json +6 -1
package/0.7.7
ADDED
|
File without changes
|
package/dist/bun/index.d.ts
CHANGED
|
@@ -38,8 +38,10 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
|
|
|
38
38
|
private getServer;
|
|
39
39
|
private validator;
|
|
40
40
|
private router;
|
|
41
|
+
private wsRouter;
|
|
41
42
|
routes: InternalRoute[];
|
|
42
43
|
private staticRouter;
|
|
44
|
+
private wsPaths;
|
|
43
45
|
private dynamicRouter;
|
|
44
46
|
private lazyLoadModules;
|
|
45
47
|
path: BasePath;
|
|
@@ -755,13 +757,13 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
|
|
|
755
757
|
* })
|
|
756
758
|
* ```
|
|
757
759
|
*/
|
|
758
|
-
route<const Method extends HTTPMethod, const
|
|
760
|
+
route<const Method extends HTTPMethod, const Path extends string, const LocalSchema extends InputSchema<Extract<keyof Definitions['type'], string>>, const Function extends Handler<Route, Decorators, `${BasePath}${Path}`>, const Route extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['type']>, ParentSchema>>(method: Method, path: Path, handler: Function, { config, ...hook }?: LocalHook<LocalSchema, Route, Decorators, Definitions['error'], `${BasePath}${Path}`> & {
|
|
759
761
|
config: {
|
|
760
762
|
allowMeta?: boolean;
|
|
761
763
|
};
|
|
762
764
|
}): Elysia<BasePath, Decorators, Definitions, ParentSchema, Prettify<Routes & {
|
|
763
|
-
[path in `${BasePath}${
|
|
764
|
-
[method in
|
|
765
|
+
[path in `${BasePath}${Path}`]: {
|
|
766
|
+
[method in Lowercase<Method>]: Route extends {
|
|
765
767
|
body: infer Body;
|
|
766
768
|
params: infer Params;
|
|
767
769
|
query: infer Query;
|