File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed
Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ import { Elysia } from '../src'
33const app = new Elysia ( { precompile : true } )
44 . get ( '/' , Bun . file ( 'test/kyuukurarin.mp4' ) )
55 . listen ( 3000 )
6-
7- console . log ( app . routes [ 0 ] . composed ?. toString ( ) )
Original file line number Diff line number Diff line change 11{
22 "name" : " elysia" ,
33 "description" : " Ergonomic Framework for Human" ,
4- "version" : " 1.0.0-rc.19 " ,
4+ "version" : " 1.0.0" ,
55 "author" : {
66 "name" : " saltyAom" ,
77 "url" : " https://github.com/SaltyAom" ,
Original file line number Diff line number Diff line change @@ -344,7 +344,11 @@ export const composeHandler = ({
344344 if ( ! isHandleFn ) handler = mapCompactResponse ( handler )
345345
346346 const hasErrorHandler =
347- ( app . config . forceErrorEncapsulation && isHandleFn ) ||
347+ ( app . config . forceErrorEncapsulation &&
348+ ( isHandleFn ||
349+ hooks . afterHandle . length > 0 ||
350+ hooks . beforeHandle . length > 0 ||
351+ hooks . transform . length > 0 ) ) ||
348352 hooks . error . length > 0 ||
349353 app . event . error . length > 0 ||
350354 typeof Bun === 'undefined' ||
Original file line number Diff line number Diff line change @@ -172,6 +172,14 @@ export default class Elysia<
172172 resolve : { }
173173 } as Singleton
174174
175+ get store ( ) : Singleton [ 'store' ] {
176+ return this . singleton . store
177+ }
178+
179+ get decorator ( ) : Singleton [ 'decorator' ] {
180+ return this . singleton . decorator
181+ }
182+
175183 protected definitions = {
176184 type : { } as Record < string , TSchema > ,
177185 error : { } as Record < string , Error >
You can’t perform that action at this time.
0 commit comments