Yusuke Wada
2de2ef3279
feat(validator): support multiple handlers w/ complex patterns. ( #831 )
2023-01-22 21:21:37 +09:00
Yusuke Wada
698a783573
Merge branch 'main' into next
2023-01-22 14:28:13 +09:00
Yusuke Wada
e404319824
perf: use substring
and //.test
... ( #829 )
...
* v3.0.0-rc.8
* perf: use `substring` and `//.test` ...
2023-01-22 13:59:31 +09:00
Yusuke Wada
a60e46ae53
fix(request): make optional param type correct ( #826 )
...
* fix(request): make optional param type correct
* `ts-ignore`
* `denoify`
2023-01-22 13:32:33 +09:00
Yusuke Wada
eb6f1fdb0d
perf: optimize parsing queries and headers / 19% faster than 2.7.2 ( #811 )
2023-01-19 22:45:25 +09:00
Yusuke Wada
7beb64956c
feat: [BREAKING] introduce adapters ( #807 )
...
* feat: [BREAKING] introduce adapters
* added Next.js adapter
* denoify
2023-01-19 22:45:25 +09:00
Yusuke Wada
733f05c21c
refactor(types): more robust and flexible ( #806 )
...
* chore: denoify
* v3.0.0-rc.5
* refactor(types): more robust and flexible
* fixed some
2023-01-19 22:45:25 +09:00
Yusuke Wada
d00a47ef70
feat: introduce HTTPException
( #796 )
...
* feat: introduce `HTTPException`
* denoify and fixed tests for Lagon
2023-01-19 22:45:25 +09:00
Yusuke Wada
e989a93d01
refactor: tweak types ( #795 )
2023-01-19 22:45:25 +09:00
Yusuke Wada
d2dd42b35e
fix: fixed bugs handling TypeResponse
( #791 )
2023-01-19 22:45:25 +09:00
Yusuke Wada
b49e557e5b
refactor(types): shorten name, make it safer ( #774 )
...
* refactor(types): shorten name, make it safer
* remove not used
2023-01-19 22:44:38 +09:00
Yusuke Wada
397c12e181
refactor: refactor and fix Types ( #748 )
...
* wip
* refactor: refactor and fix Types
2023-01-19 22:44:34 +09:00
Yusuke Wada
85e3c6a275
feat: new validator middleware using 3rd-party & current middleware obsolete ( #745 )
...
* feat: introduce HonoRequest with "wrapper pattern" (#733 )
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
* feat: types for "RPC" support & build-in validator obsolete
* feat: introduce HonoRequest with "wrapper pattern" (#733 )
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
* create generic middleare for 3rd-party validator
* indent
* support multiple validators and refactor
* remove unsed lines
* denoify
2023-01-19 22:40:13 +09:00
Yusuke Wada
a6d54dbff3
feat: introduce HonoRequest with "wrapper pattern" ( #733 )
...
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
2023-01-19 22:40:13 +09:00
Yusuke Wada
e6635e9997
chore: denoify
2022-12-12 22:10:14 +09:00
Yusuke Wada
3def9b12c0
fix(type): fix the type mismatch if using Handler
as middleware ( #714 )
...
* fix(type): fix the type mismatch if using `Handler` as middleware
* remove a line
2022-12-10 23:11:27 +09:00
Yusuke Wada
59bb0b1a40
feat(handler): "schema" allow normal types ( #700 )
...
* feat(handler): "schema" allow normal types
* check types for handler+validator+handler pattern
* denoify
* improve type definitions
2022-12-10 16:37:14 +09:00
Yusuke Wada
1eb49b8d96
refactor: support new @cloudflare/worker-types
( #673 )
...
* refactor: support new `@cloudflare/worker-types`
* do not attach crypto to global
* denoify ignore serve-static for cloudlfare
* ignore the utility for cloudflare
* import types
2022-11-23 07:27:42 +09:00
Yusuke Wada
05f2f6eb10
fix(types): app.use
return correct types
...
Fix #666
2022-11-19 15:49:22 +09:00
Yusuke Wada
d3a6f80d7c
fix(type): change the type definition of req
in Context ( #658 )
2022-11-11 15:23:05 +09:00
Yusuke Wada
b963d6e7cb
feat(app): introduce app.on(method, path, handler)
( #653 )
...
* feat(app): introduce `app.on(method, path, handler)`
* Refactoring of feat/on branche (#655 )
* refactor(reg-exp-router): Use `includes` instead of `find` to check if an element is in an array.
* fix(static-router): Copy middleware from METHOD_NAME_ALL for new method.
* chore: denoify
Co-authored-by: Taku Amano <taku@taaas.jp>
2022-11-08 03:17:34 +09:00
Yusuke Wada
15a5119bac
feat(app): introduce app.showRoutes()
( #650 )
2022-11-05 19:04:01 +09:00
Yusuke Wada
edfb31ee94
fix(error): make notFound()
enables to catch errors correctly ( #652 )
2022-11-05 19:02:19 +09:00
Yusuke Wada
4a9cd272f8
refactor(types): reduce type definitions ( #649 )
...
* refactor(types): reduce type definitions
* fixed tests for Deno and Bun
2022-11-03 15:53:41 +09:00
Yusuke Wada
8e9b1c8099
fix(type): make compatibility with @cloudflare/workers-types
( #645 )
2022-11-03 15:39:25 +09:00
Yusuke Wada
6a96ace96a
feat(types): introduce CustomHandler
interface ( #637 )
2022-11-01 00:07:56 +09:00
Yusuke Wada
8627010094
refactor(types): refactor and add tests for checking Types ( #615 )
...
* refactor(types): refactor and add tests for checking Types
* remove unused
* uncomment
* use `Handler` in validator middleware
* remove unused
* create `src/validator` dir and move some files into it
* add the case that the context is in `validator`
* rename `D` to `S`
2022-10-23 08:10:00 +09:00
Yusuke Wada
33f1cbd604
chore: denoify
2022-10-19 20:01:43 +09:00
Yusuke Wada
39f896a576
fix(compose): don't throw Error; set error response into c.res
( #576 )
2022-10-02 15:44:54 +09:00
Yusuke Wada
0e78a7698c
fix(handleEvent): use dispatch
instead of fetch
( #568 )
2022-09-30 11:24:23 +09:00
Yusuke Wada
2c3db370ce
chore: denoify
2022-09-27 21:43:55 +09:00
Yusuke Wada
84451d61e1
fix(types): enable types for c.env
when using validator ( #553 )
2022-09-26 21:18:48 +09:00
Yusuke Wada
e4c8a6f467
perf: remove async
from dispatch; will be 16% faster ( #550 )
2022-09-26 21:12:53 +09:00
Yusuke Wada
7bb9cc1a19
fix: don't use defaultNotFoundMessage
variable ( #549 )
2022-09-21 23:05:26 +09:00
Yusuke Wada
a2cc1a01c2
feat: another idea of Validator Middleware ( #535 )
...
* feat: Another idea of validator middleware
* denoify
* set property value in constructor
* rename `option` to `options`
* add test for handling type error
* use `test` instead of `match`
2022-09-20 10:11:34 +09:00
Yusuke Wada
e2d704fd4f
fix(types): add types to middleware correctly ( #521 )
2022-09-14 08:17:20 +09:00
Taku Amano
d12a11937b
feat: Lightweight RegExpRouter reborn ( #519 )
...
* Introduce RegExpLiteRouter.
* Replace RegExpRouter with RegExpLiteRouter.
* chore: denoify
* Remove old RegExpRouter and rename RegExpLiteRouter to RegExpRouter.
* chore: Update benchmarks/handle-event.
2022-09-14 08:01:14 +09:00
Taku Amano
a149dddfdc
Introduce StaticRouter and SmartRouter ( #501 )
...
* refactor(router): Export supported HTTP methods.
* refactor(router): Introduce UnsupportedPathError.
* feat(static-router): Introduce StaticRouter.
* feat(reg-exp-router): Add "allowAmbiguous" option to RegExpRouter.
* feat(smart-router): Introduce SmartRouter.
* feat(hono): Make SmartRouter the default router.
* chore: denoify
* refactor(smart-router): routers is never undefined.
* chore: denoify
* refactor: Fix test for SmartRouter.
2022-09-12 20:49:18 +09:00
Yusuke Wada
058e3113b3
fix(types): correct types for app.notFound
/ app.onError
( #512 )
...
Fix #511
2022-09-10 18:00:00 +09:00
Taku Amano
f3087c94e1
perf(compose): Remove await composed()
from hono.ts. ( #495 )
2022-09-02 22:55:01 +09:00
Yusuke Wada
24a28942de
fix: fixed the issue logger called twice ( #494 )
...
* fix: fixed the issue logger called twice
* add handling the error and shorten code
2022-09-02 21:13:47 +09:00
Yusuke Wada
bb9a95471e
perf: do not compose
if it has only one handler ( #493 )
2022-09-01 22:39:50 +09:00
Yusuke Wada
dec5651c2f
chore: denoify
2022-08-31 18:01:33 +09:00
Yusuke Wada
d3ff952599
fix(compose): do not handle the error in compose
( #491 )
...
* fix(compose): do not handle the error in `compose`
* tweak
2022-08-31 17:49:01 +09:00
Yusuke Wada
c091517947
fix(context): fix type error ( #489 )
2022-08-28 18:16:51 +09:00
Yusuke Wada
1c3c9f1200
fix(type): fix type errors for Bindings and Variables ( #488 )
2022-08-27 23:57:33 +09:00
Yusuke Wada
ddfe07ecec
feat(types): enable adding Types for variables used in c.set
/c.get
( #478 )
...
* feat(types): enable adding Types for variables used in `c.set`/`c.get`
* fix typo
2022-08-23 20:53:25 +09:00
Yusuke Wada
3c371d0d07
chore: denoify
2022-07-31 22:19:28 +09:00
Yusuke Wada
2a24b98e55
refactor: remove useless async
for a better performance on Bun ( #397 )
...
* fix(compress): add type for enconding name
* refactor: remove useless `async` for a better performance on Bun
2022-07-17 09:13:44 +09:00
Yusuke Wada
0d48c9f338
feat: [WIP] new structure for support Deno and third-party middleware
...
[skip ci]
2022-07-15 08:40:15 +09:00