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
Yusuke Wada
00547ea84e
docs(readme): update!
2022-09-20 23:06:05 +09:00
Yusuke Wada
eb6601d24f
chore: update handle-event
bechmark scripts
2022-09-20 22:46:13 +09:00
Yusuke Wada
976b2c310e
feat: c.req.body
and c.req.json
accept generics ( #529 )
2022-09-20 22:01:03 +09:00
Yusuke Wada
5133a93925
feat: support appending values with c.header
( #539 )
2022-09-20 21:41:45 +09:00
Taku Amano
2a80b58161
feat(reg-exp-router): support optional parameter ( #542 )
...
* feat(reg-exp-router): support optional parameter
* chore: denoify
2022-09-20 21:26:59 +09:00
Yusuke Wada
24c17e340a
feat(trie-router): support optional parameter ( #540 )
2022-09-20 21:26:27 +09:00
Yusuke Wada
730453aeb0
fix(redirect): don't have to make relative url to absolute one ( #541 )
...
* fix(redirect): don't have to make relative url to absolute one
* remove `isAbsoluteURL`
2022-09-20 18:56:31 +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
5573c59cf6
fix(bun): serve static middleware returns 404 correctly ( #538 )
2022-09-19 12:25:04 +09:00
Yusuke Wada
ac1c01df4a
fix(deno): serve static middleware returns 404 correctly ( #537 )
2022-09-19 12:22:55 +09:00
Taku Amano
8eb20215a5
feat(cors): Enable to check origin header by a function. ( #533 )
2022-09-16 20:59:27 +09:00
Taku Amano
bbb95585d4
Check in Origin header instead of Referer ( #532 )
...
* refactor(cors): Check in Origin header instead of Referer.
* refactor(utils/url): Remove unused function getDomainFromURL.
* chore: denoify
2022-09-16 07:23:31 +09:00
Yusuke Wada
df64870f54
feat(cors): allow multiple origins ( #531 )
...
* feat(validator): add `isBoolean` and `isNumber`
* feat(cors): allow multiple origins
Close #503
2022-09-16 00:19:02 +09:00
Yusuke Wada
9c9e1c2356
feat(validator): add isBoolean
and isNumber
( #530 )
2022-09-16 00:10:37 +09:00
Yusuke Wada
8cb9eaf2fc
chore: tweak tsconfig
2022-09-15 10:04:45 +09:00
Yusuke Wada
a801674cf7
feat: support ES modules!! ( #526 )
...
* feat: support ES modules!!
* fix typo
2022-09-15 09:56:46 +09:00
Onur Güvenç
1f15ec01c9
docs(readme): update discord invite url ( #527 )
2022-09-15 09:53:03 +09:00
Yusuke Wada
b546fd6984
refactor: update buffer version on Deno
2022-09-14 08:44:42 +09:00
Yusuke Wada
719ce857ec
chore: bump up libraries version
2022-09-14 08:42:04 +09:00
Yusuke Wada
62e3292460
feat(validator): add isFalsy
and isNotFalsy
( #523 )
2022-09-14 08:30:46 +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
Yusuke Wada
46c6a8de5e
feat(middleware): introduce "built-in" Validator Middleware ( #505 )
...
* feat(middleware): introduce built-in Validator Middleware
* fixed type of `req.json()`
* Feat/builtin validator middleware another idea (#508 )
* Enable overwriting of query/header data.
* Returns only verified data.
* rename `index.test.ts` to `middleware.test.ts`
* add `removeAdditional` option
* handling error that the JSON body is null
* tidy
* check is it string or not
* implement `isIn`
* enable validation the valies are duplicate
Co-authored-by: Taku Amano <taku@taaas.jp>
2022-09-13 07:54:06 +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
3697e156ed
fix(middleware): support multiple middleware on bearer/basic auth middleware ( #513 )
...
Fix #509
2022-09-10 18:02:36 +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
Yusuke Wada
5a642ed5d3
chore(package.json
): update homepage url
2022-09-08 20:16:55 +09:00
Yusuke Wada
e2f46cb746
v2.1.4
2022-09-05 22:00:12 +09:00
Taku Amano
ab14da6af7
fix: regexp ambigous route ( #499 )
...
* refactor(reg-exp-router): Add existence check instead of "ts-ignore".
* fix(reg-exp-router): Rebuild all matchers as "hasAmbiguous" if some methods are ambiguous.
* Run `yarn denoify`.
2022-09-05 19:17:11 +09:00