Skip to content

Commit a20d6a6

Browse files
committed
🎉 release: Elysia 1.0
1 parent e84e16b commit a20d6a6

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

example/a.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ import { Elysia } from '../src'
33
const app = new Elysia({ precompile: true })
44
.get('/', Bun.file('test/kyuukurarin.mp4'))
55
.listen(3000)
6-
7-
console.log(app.routes[0].composed?.toString())

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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",

src/compose.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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' ||

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)