Yusuke Wada
1749f6a962
test(bun): JWT middleware works on Bun v0.2.2 ( #633 )
2022-10-29 00:09:09 +09:00
Yusuke Wada
ca52dd898e
fix(build): fix ESM support in Node.js / use esbuild
( #631 )
...
* fix(build): fix ESM support in Node.js / use `esbuild`
* add tsx
* denoify ignore
2022-10-28 08:46:02 +09:00
Yusuke Wada
d8da569299
v2.3.2
2022-10-25 00:02:29 +09:00
Yusuke Wada
d7a36b34fd
feat(validator): export Validator
from 'hono' ( #627 )
2022-10-24 23:59:46 +09:00
Yusuke Wada
5b3e7f8fd7
fix(deno): export static-router and smart-router ( #626 )
2022-10-24 23:22:05 +09:00
Yusuke Wada
b4d58eca64
test(validator): add test for custom rules ( #620 )
...
* test(validator): add test for custom rules
* fixed value
2022-10-23 10:11:18 +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
77b0815d22
docs(contribution): update about 3rd-party middleware ( #619 )
2022-10-23 07:01:04 +09:00
Yusuke Wada
852382016a
docs(migration): add v2.2.5 to v2.3.0
( #617 )
2022-10-22 21:34:52 +09:00
Yusuke Wada
c19028374d
fix(validator): make "isOptional" work correctly with "value" validation ( #613 )
2022-10-20 16:19:13 +09:00
Yusuke Wada
47b54781a8
v2.3.1
2022-10-20 15:50:10 +09:00
Yusuke Wada
7981b100de
fix(validator): show "type" error messages if does not have "value" errors ( #612 )
2022-10-20 15:46:04 +09:00
Yusuke Wada
0dc90e4be6
v2.3.0
2022-10-19 20:30:53 +09:00
Yusuke Wada
944dfc2e13
refactor(jwt): refactor code and add more tests ( #611 )
2022-10-19 20:24:43 +09:00
Yusuke Wada
33f1cbd604
chore: denoify
2022-10-19 20:01:43 +09:00
Yusuke Wada
6d0da56b11
fix(basic/bearer): support "nested" middleware ( #610 )
2022-10-19 20:00:06 +09:00
Shawn
dc82384000
fix(bearer-auth, basic-auth): handler should not be executed when unauthorized ( #608 )
...
* fix(bearer-auth): handler should not be executed when unauthorized
* fix(basic-auth): also fix basic auth
2022-10-19 19:40:42 +09:00
Yusuke Wada
0da78351e9
feat(validator): has the error message per rule ( #603 )
...
* feat(validator): has the error message per rule
* add test for checking result objects
* test(validator): add array results test (#609 )
* remove `console.log`
Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com>
2022-10-19 19:17:04 +09:00
Yusuke Wada
2776957bba
feat(validator): introduce nested validation ( #592 )
...
* feat(validator): introduce `v.array()` and `v.object` for nested validation
* copy objects
* remove unnecessary tests
* fix(object): make merge immutable to fix issues with missing fields (#598 )
Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com>
2022-10-13 06:48:59 +09:00
Yusuke Wada
c5672a6161
perf(serve-static): return immediately if c.finalized
( #596 )
2022-10-10 00:29:40 +09:00
Yusuke Wada
d86c8919bc
test(bun): add more tests for serve static middleware ( #595 )
2022-10-10 00:24:14 +09:00
Yusuke Wada
90da196193
fix(deno): fixed the bug calling next()
multiple time in Serve Static ( #594 )
2022-10-10 00:11:36 +09:00
Yusuke Wada
f5fc9103f1
chore: denoify
2022-10-09 23:33:00 +09:00
Jake Champion
4feab47937
perf: remove unrequired cloning of ctx.res ( #589 )
...
Response constructor's 2nd argument does not require a cloned response as all it does is read these fields and does not modify anything:
- status
- statusText
- headers
> https://fetch.spec.whatwg.org/#initialize-a-response
2022-10-08 19:40:21 +09:00
Yusuke Wada
f973fc134d
v2.2.5
2022-10-04 09:03:16 +09:00
Yusuke Wada
41245122b9
fix(compose): fix it for error handling with async
( #583 )
2022-10-04 09:01:31 +09:00
Yusuke Wada
03c3dec957
v2.2.4
2022-10-04 06:46:45 +09:00
Derrick Farris
1adc9264fc
fix(validator): return HTTP 400 on malformed JSON request ( #579 )
...
* fix(validator): return http 400 on malformed JSON request
* chore(deno): denoify malformed json changes
2022-10-04 06:16:25 +09:00
Taku Amano
e992c7b7f3
fix(reg-exp-router): Register path for all the methods if method === METHOD_NAME_ALL. ( #580 )
...
* fix(reg-exp-router): Register path for all the methods if method === METHOD_NAME_ALL.
* chore: denoify.
2022-10-03 07:50:57 +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
Derrick Farris
61e24b03a1
fix(cache): export cache middleware for Deno ( #573 )
...
* fix(cache): export cache middleware for Deno
* fix(test): update jwt test (test will be fail in 46 years)
2022-10-01 17:23:44 +09:00
Yusuke Wada
4ea7c99d41
refactor(bun/serve-static): don't check c.res
( #572 )
2022-10-01 02:19:47 +09:00
Nicholas Gates
af1de3574c
Fix Trie router multiple matching path parameters ( #571 )
...
* Failing test for prefix parameters
* Fix test by removing break
* Denoify
2022-09-30 22:25:24 +09:00
Derrick Farris
9a0389e723
feat(validator): add support for JSON array path validation ( #563 )
...
* refactor(JSONPath): improve typing of JSONPath
* chore(vscode-settings): add deno.enable=false
* fix(validator): add null to type Type def
* feat(JSON-Path): add support for array JSONPath-Plus syntax
* fix(validator): update isRequired to pass valid bool types
* test: update tests for isRequired validator
* feat(validator): add support for JSON array path validation
* chore(deno): denoify array support changes
* fix(validator): type check all vals in array
* chore(deno): denoify changes
* test(validator): add tests for array type checking
* fix(validator): change JSONPrimative to JSONPrimitive
* refactor(json): More compatible with https://jsonpath.com/ .
* implementation of `asArray`
* fix(validator): update JSONPath implementation and add isArray check in validation
* fix(validator): fix typing errors on SchemaToProp
* Revert "fix(validator): fix typing errors on SchemaToProp"
This reverts commit b8ddef85d0
.
* fix(validator): fix SchemaToProp error for VTypeArrays
* chore(deno): denoify
Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2022-09-30 21:56:39 +09:00
Yusuke Wada
13ce2eef95
v2.2.3
2022-09-30 19:54:01 +09:00
Yusuke Wada
e5b0ea8d33
chore: denoify
2022-09-30 19:50:59 +09:00
Yusuke Wada
0e78a7698c
fix(handleEvent): use dispatch
instead of fetch
( #568 )
2022-09-30 11:24:23 +09:00
Yusuke Wada
93b55bbf4a
v2.2.2
2022-09-27 21:55:03 +09:00
Yusuke Wada
2c3db370ce
chore: denoify
2022-09-27 21:43:55 +09:00
Yusuke Wada
03fc36f793
refactor(serve-static): use context/next instead of MiddlewareHandler ( #559 )
...
* fix(validator): make `isOptional` rule works correctly.
* refactor(serve-static): remove return type
* use context/next instead of MiddlewareHandler
2022-09-27 21:40:37 +09:00
Yusuke Wada
c0d88ff01c
fix(validator): make isOptional
rule works correctly. ( #555 )
2022-09-27 18:19:50 +09:00
Prabhakar Mishra
359c124e2c
use console.trace to improve error handler ( #556 )
2022-09-26 22:41:32 +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
c3c5f8ad24
v2.2.1
2022-09-21 23:09:24 +09:00
Yusuke Wada
7bb9cc1a19
fix: don't use defaultNotFoundMessage
variable ( #549 )
2022-09-21 23:05:26 +09:00
Yusuke Wada
e934bb2aec
v2.2.0
2022-09-21 11:46:23 +09:00
Yusuke Wada
fbd7ed7083
chore(benchmark): update benchmark scripts for Deno
2022-09-21 10:31:21 +09:00
Taku Amano
957a5a9ac9
feat(validator): Enable verification results to be retrieved as structured data. ( #547 )
...
* feat(validator): Enable verification results to be retrieved as structured data.
* chore: denoify
2022-09-21 09:40:17 +09:00
Yusuke Wada
594f30aa35
fix(validator): make "Types" work well ( #545 )
...
* fix(validator): make "Types" work well
* fix import statement
2022-09-21 07:55:29 +09:00