0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-27 16:06:24 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
EdamAmex
a6ccfa29ca
chore(build): validate if exporting is correct in package.json and jsr.json (#3638)
* feat(build): for both exports to be the same

* some fix

* fix exclude of coverage

* update

* stylish error message and add comment

* revert auto lint

* chore: format
2024-11-07 17:37:53 +09:00
EdamAmex
4598d7a20f
fix(jsr): fix missing exports (#3636) 2024-11-07 10:55:02 +09:00
EdamAmex
e7732a5f23
feat(header): suggest name of header and combine in one file (#3577)
* feat(header):ssuggest name of header and combine in one file

* chore: format and fix jsr path

* fix: fix types error of testing
2024-10-29 13:37:06 +09:00
Thomas Cruveilher
27961dcf31
feat(request): Make request.ts available throught JSR for frameworks that need to instantiate HonoRequest (#3425)
* Update jsr.json

* Update jsr.json
2024-09-24 12:09:54 +09:00
Marcel Overdijk
fdf77862ac
feat(contextStorage): added Context Storage Middleware (#3373) 2024-09-08 15:53:01 +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
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
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
ebbaea982c Merge branch 'main' into next 2024-06-29 17:13:45 +09:00
ryu
a6ad42d03b
chore(jsr): export JWT utils (#3056) 2024-06-28 05:49:45 +09:00
Taku Amano
c910923aea
feat(jsx/server): introduce jsx/dom/server module for compatibility with react-dom/server (#2930)
* feat(jsx/server): introduce `jsx/dom/server` module for compatibility with `react-dom/server`

* refactor: tweaks signature of onError callback in renderToReadableStream for compatibility

* Add jsx/dom/server to jsr.json

* fix: relative import path error in `deno publish`
2024-06-12 11:59:51 +09:00
Yusuke Wada
692c32165f
docs(readme): update readme and jsr.json (#2803) 2024-05-26 23:12:21 +09:00
Taku Amano
593cb7a89d
feat(jsx/dom): introduce react-dom/client APIs and React.version (#2795)
* feat(jsx): export version string from jsx

* feat(jsx/dom): introduce react-dom/client APIs

* docs(jsx/dom/client): add module description

* chore: add jsx/dom/client to jsr.json

* refactor(jsx/dom): declare types explicitly.
2024-05-26 22:55:30 +09:00
Yusuke Wada
1b2a4c0800
feat(jsr): support JSR (#2662)
* feat(jsr): reduce slow types (#2369)

* feat(jsr): reduce slow types

* fix: use allow function

* chore: format code

* chore: denoify

* add `deno.json`

* add `jsr-dry-run` command for CI

* don't put `JSX` on `global`

* fix test settings for deno

* don't use `dynamicClass`

* don't declare `ExecutionContext` in `global`

* goodbye denoify

* exports `./middleware`

* exports `./helper`

* exports each helper and middleware

* remove the `awslambda` implementation which is not enough

* feat(jsr): remove helper.ts and middleware.ts (#2667)

* feat(jsr): remove helper.ts and middleware.ts

* fix: fix test

* dont' use `SuperClass`

Co-authored-by: Taku Amano <taku@taaas.jp>

* feat(jsr): delete `mod.ts` (#2669)

* rename `deno.json` to `jsr.json`

* lint

* remove slow type in lambda adapter

* fixed runtime test for deno

* export all utils

* add a GitHub action to publish the package to JSR

* fixed declaring `ContextVariableMap`

* fixed the type error

* include `jsr.json` in `jsr.json`

* update `jsr.json`

---------

Co-authored-by: Shotaro Nakamura <79000684+nakasyou@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
2024-05-24 17:47:28 +09:00