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'
3
3
const app = new Elysia ( { precompile : true } )
4
4
. get ( '/' , Bun . file ( 'test/kyuukurarin.mp4' ) )
5
5
. listen ( 3000 )
6
-
7
- console . log ( app . routes [ 0 ] . composed ?. toString ( ) )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " elysia" ,
3
3
"description" : " Ergonomic Framework for Human" ,
4
- "version" : " 1.0.0-rc.19 " ,
4
+ "version" : " 1.0.0" ,
5
5
"author" : {
6
6
"name" : " saltyAom" ,
7
7
"url" : " https://github.com/SaltyAom" ,
Original file line number Diff line number Diff line change @@ -344,7 +344,11 @@ export const composeHandler = ({
344
344
if ( ! isHandleFn ) handler = mapCompactResponse ( handler )
345
345
346
346
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 ) ) ||
348
352
hooks . error . length > 0 ||
349
353
app . event . error . length > 0 ||
350
354
typeof Bun === 'undefined' ||
Original file line number Diff line number Diff line change @@ -172,6 +172,14 @@ export default class Elysia<
172
172
resolve : { }
173
173
} as Singleton
174
174
175
+ get store ( ) : Singleton [ 'store' ] {
176
+ return this . singleton . store
177
+ }
178
+
179
+ get decorator ( ) : Singleton [ 'decorator' ] {
180
+ return this . singleton . decorator
181
+ }
182
+
175
183
protected definitions = {
176
184
type : { } as Record < string , TSchema > ,
177
185
error : { } as Record < string , Error >
You can’t perform that action at this time.
0 commit comments