0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 02:07:30 +01:00
Commit Graph

2117 Commits

Author SHA1 Message Date
Clément
66fc63d134
feat(bearer-auth): Allow empty bearer-auth middleware prefixes (#3161) 2024-07-20 18:53:02 +09:00
JulesVerner
09f1d20aff
fix(middleware/jwt): Changed the jwt-secret type to SignatureKey (#3167)
* Changed the jwt-secret type to SignatureKey

* Changed import to type-import
2024-07-20 18:39:05 +09:00
Ame_x
84424ad3a5
chore: moving the setup file of vitest (#3157) 2024-07-20 00:02:35 +09:00
Shotaro Nakamura
f23a416f75
chore: remove rimraf and use bun shell (#3146) 2024-07-18 18:34:33 +09:00
Yusuke Wada
801e1b9027 v4.5.0 2024-07-16 23:02:21 +09:00
Yusuke Wada
2f4bb3e382
Merge pull request #3144 from honojs/next 2024-07-16 22:57:37 +09:00
Yusuke Wada
c63251172c
fix(types): remove slow types (#3147) 2024-07-16 22:53:33 +09:00
yasuaki640
20d877167c
feat(jsx): add global attributes to interface definition (#3142) 2024-07-16 22:38:05 +09:00
Yusuke Wada
024ec0ff8d
fix(types): use ContextVariableMap in Context<any> (#3134)
* fix(types): use `ContextVariableMap` in `Context<any>`

* use `any`
2024-07-16 21:57:33 +09:00
Yusuke Wada
1afecac402
chore: update comments in codes (#3145) 2024-07-16 21:50:27 +09:00
ottomated
1cee728193
feat(types): allow passing interfaces as Bindings / Variables (#3136)
* feat(types): allow passing `interface`s as Bindings / Variables

* test(context): add test for c.var

* fix lint warning

* test(types): add test for Bindings types
2024-07-16 21:41:38 +09:00
Yusuke Wada
9987b5908f Merge branch 'main' into next 2024-07-16 21:15:11 +09:00
Taku Amano
9a6e52d734
feat(middleware/combine): Introduce combine middleware (#2941)
* feat(middleware/predicate): Introduce predicate middleware

* fix: apply `bun run format:fix`

* refactor: rename middleware predicate -> combine
2024-07-13 18:49:10 +09:00
ryu
e6d253d96f
feat(middleware): introduce Request ID middleware (#3082)
* feat(middleware): introduce Request ID middleware

* fix not to accept empty string in header

* rename requestID to requestId

* pass the context to the generator option

* add typesVersions

* fix typo

Co-Authored-By: Taku Amano <taku@taaas.jp>

* change to generate id if validation fails

Co-Authored-By: Taku Amano <taku@taaas.jp>

* fix limit length test

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2024-07-13 14:02:36 +09:00
Yusuke Wada
2d0135956c v4.4.13 2024-07-11 18:24:23 +09:00
Yusuke Wada
642dd29666
fix(types): app.use(path, mw) return correct schema type (#3128)
Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
2024-07-11 18:20:53 +09:00
Shotaro Nakamura
c2698fa2e0
feat: Introduce Service Worker Adapter (#3062)
* feat: Intoroduce service worker adapter

* test: add test

* chore: format code

* refactor: handler.ts

* chore: remove unused import

* fix: add webworker to jsr.json

* fix: triple slash directives to tsconfig.json

* feat: add types.ts to define worker types
2024-07-11 17:16:52 +09:00
yasuaki640
4a4e851d50
feat(lambda-edge): add getConnInfo helper for Lambda@Edge (#3099)
* add conninfo helper for lambda@edge

* export getConnInfo
2024-07-11 17:08:36 +09:00
Ame_x
f1c7d312a8
fix(validator-types): type Alignment with Web Standards (#3120)
* fix(validator-types): type Alignment with Web Standards

* fix
2024-07-11 16:34:36 +09:00
Yusuke Wada
ec58511247
fix(types): allow string[] | File[] for RPC form value (#3117) 2024-07-10 10:23:07 +09:00
yasuaki640
4c401fd661
fix(jsx): redefine scope attribute as enum type (#3118) 2024-07-10 10:11:04 +09:00
ryu
74310f469b
fix(vercel): remove deprecated address type (#3115) 2024-07-09 06:57:42 +09:00
promer94
ce1c8172d9
feat(vercel): add getConnInfo for vercel adapter (#3085) 2024-07-08 23:46:56 +09:00
Yusuke Wada
fbae337190
fix(ip-restriction): return the named function (#3113) 2024-07-08 23:32:04 +09:00
Shotaro Nakamura
71cdcf40d8
feat: Introduce IP Restriction Middleware (#2813)
* feat: Introduce IP Limit Middleware

* chore(jsr): add return types

* chore: format code

* fix: eslint

* feat: if allow is empty, set allow at * by default (#3)

* feat: if allow is empty, set allow at * by default

* fix

* feat: remove wildcard

* chore: fix spelling

* chore: format

* chore: sort imports

* fix: test

* chore: sort imports

* feat: renamed `ipLimit` to `ipRestriction`

* feat: accept `(c: Context) => string)`

* chore: format code

* feat: allow/deny -> allowList/denyList

* feat: suport function rule

* chore: format code

* fix: test code

* feat: suport custom errors

* fix: test code

* fix: name in test code

* feat: allow function to named function

* perf(ip-restriction): optimize ip-restriction middleware by prepare matcher function in advance

* feat: don't use random ip in test

* chore: ipVn to ipvn

* fix: test code

* fix: fix type error in ip-restriction middleware test

* chore: rename `IPRestrictRule` to `IPRestrictionRule`

* docs(ip-restriction): add a comment to explain the normalization of IPv6 address

* docs(ip-restriction): fix typo in comment

* refactor(ip-restriction): rename convertIPv6ToString to convertIPv6BinaryToString

* feat: support to receive `Context` in `onError`

* fix: https://github.com/honojs/hono/pull/2813#discussion_r1667327721

* fix: format code

* feat: use `Forbidden`

* tracking the `next`

* remove importing `HonoRequest`

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-07-08 23:26:01 +09:00
Yusuke Wada
fa5b742b7d
fix(helper/conninfo): add undefined for AddressType (#3112) 2024-07-08 23:02:25 +09:00
Yusuke Wada
58f421fa27 Merge branch 'main' into next 2024-07-08 22:10:10 +09:00
Ame_x
5126449226
refactor(http-status): remove unnecessary line of types and use common types (#3110)
* refactor(http-status): remove unnecessary line of types

* refactor
2024-07-08 21:53:39 +09:00
Shotaro Nakamura
97ec6521a7
chore: replace tsx with Bun (#3103) 2024-07-07 15:55:19 +09:00
Yusuke Wada
bee3ade123
chore: update benchmark (#3102) 2024-07-06 19:25:28 +09:00
Yusuke Wada
cff2768de0 v4.4.12 2024-07-06 16:13:29 +09:00
Yusuke Wada
a90ff2d4fd
chore(utils/jwt): add @module docs (#3101) 2024-07-06 16:10:49 +09:00
Yusuke Wada
e513fe7c46
fix(helper/streaming): remove slow types (#3100) 2024-07-06 15:59:06 +09:00
m-shaka
2a4f257f36
feat(types): improve JSONParsed (#3074)
* feat: improve JSONParsed

* refactor: make things simple
2024-07-06 15:42:33 +09:00
Miguel Tavares
6c1b2a7c01
chore: add the triage label (#3092)
* Update 1-bug-report.yml

* only triage label
2024-07-06 15:38:45 +09:00
oon00b
72ee8084a1
fix(jsx): changes behavior when download attribute is set to a boolean value (#3094) 2024-07-06 07:34:32 +09:00
ryu
28de9b32a8
chore: update outdated links in JSDoc (#3089) 2024-07-05 12:21:35 +09:00
Yusuke Wada
7ba58664e7
fix(types): infer path when chaining after use (#3087) 2024-07-04 16:38:40 +09:00
Trung Dang
1e3e58bb45
fix(aws-lambda): set cookies with comma is bugged (#3084)
* fix(aws-lambda): setting cookies with comma is bugged

* style: apply lint & format fixes
2024-07-04 14:54:49 +09:00
Yusuke Wada
75c314c279 v4.4.11 2024-07-03 10:53:44 +09:00
Taku Amano
ada10e5bf0
fix(stream): Fixed a problem that onAbort() is called even if request is normally closed in deno (#3079)
* Fix(stream): Fixed a problem that onAbort() is called even if request is normally closed in deno

* test: fix stream abort test for Node.js
2024-07-03 10:50:44 +09:00
yasuaki640
ba8fb48551
test(helper/dev): fix typo of test case name (#3073) 2024-07-01 23:33:21 +09:00
Trung Dang
d038d82e66
refactor(types): move HandlerInterface's (path, handler)s overloads down (#3072)
* refactor(types): move `HandlerInterface`'s `(path, handler)` overloads down one level

* test: add tests for validator as first middleware - #3027

Fixes #3027
2024-07-01 21:29:46 +09:00
naporitan
ddc1de8394
fix(client): Add Query Parameter Support to WebSocket Client in hono/client (#3066)
* chore(client): fix url with query parameter websocket client

* chore(client): remove log
2024-07-01 17:05:45 +09:00
Yusuke Wada
2d452f2bd2
fix(validator): don't return a FormData if formData is cached (#3067)
* fix(validator): don't return a FormData if formData is cached

* fixed typo

* test the value
2024-07-01 16:29:34 +09:00
Jonathan Haines
f393730d44
fix(cloudflare-pages): Expose Cloudflare Pages type parameters (#3065) 2024-07-01 16:23:22 +09:00
K-tecchan
94f47ec2e6
test(router): remove unnecessary async keyword from router tests (#3061) 2024-07-01 09:52:33 +09:00
Yusuke Wada
c095dfac4e v4.4.10 2024-06-30 07:55:36 +09:00
m-shaka
1d16b84b62
fix(client): set Path as the default of Original (#3058) 2024-06-30 07:50:45 +09:00
Yusuke Wada
f2908d62fb v4.5.0-rc.2 2024-06-29 17:39:50 +09:00