0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 03:40:50 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Yusuke Wada
c123d5f78d
feat: add option for no strict routing (#103)
default is `strict`
2022-02-15 16:52:06 +09:00
Yusuke Wada
60df36b294
refactor: remove not used files (#98) 2022-02-09 22:51:59 +09:00
Yusuke Wada
d77d890a73
feat: check response type (#94)
* feat: check response type

* refactor

* refactor: add types
2022-02-05 23:30:43 +09:00
Yusuke Wada
a72660bd66
feat: auto set statusText (#93)
* refactor: context

* tweak

* feat: auto set status text
2022-02-05 22:20:34 +09:00
Yusuke Wada
05747404e8
refactor: remove default middleware (#91)
Fixed some bugs about handling req/res object on middleware.
2022-02-05 00:28:24 +09:00
Yusuke Wada
c8184b7fb8
fix: default content-type (#88)
* fix: default content-type

* fixed for tests
2022-02-04 06:36:27 +09:00
Yusuke Wada
7dd486ad7b
feat: builtin middleware as sub module (#81)
# BREAKING CHANGES!!

Now, builtin middleware are not in main package. You can't use `Middleware.logger()` method. Call sub modules if needed:

```js
import { Hono } from 'hono'
import { poweredBy } from 'hono/powered-by'
import { logger } from 'hono/logger'

const app = new Hono()

app.use('*', poweredBy())
app.use('*', logger())
```

Closes: #80

---

* feat: builtin middleware as sub module

* fixed middleware

* Update readme

* Add types

* New gif
2022-02-01 22:15:00 +09:00
Yusuke Wada
29f67c5b72
feat: Mustache Middleware (#72)
* [WIP] feat: Mustache Middleware

Dirty code.
A Big problem is tests for Workers Site KV does not work well...

* feat: mustache middleware

* Add readme
2022-01-29 09:09:37 +09:00
Yusuke Wada
3017a4a7ff
fix: Fixed context headers (#69) 2022-01-27 09:42:27 +09:00
Yusuke Wada
ff5a83b38b
perf: Speed up to calculate content-length (#67)
* perf: Speed up to calculate content-length
2022-01-27 09:09:54 +09:00
Yusuke Wada
336afc812d
refactor: refactor something (#65)
* chmod

* declare `parsedBody` in middleware

* Dont use any

* Rename

* rename and fixed benchmarks, update score
2022-01-26 22:11:11 +09:00
Yusuke Wada
68444b6932 feat: Add new shortcuts for request/response (#62)
* Add new shortcuts for request/response

* We have only `param`, we can not use `params`

* Update readme

* tweak
2022-01-26 13:10:05 +09:00
Minghe
c522636662
refactor(utils): better management for utils modules to avoid kitchen sink issue (#59) 2022-01-21 16:03:48 +09:00
Yusuke Wada
280c1481e3
Add content-length header (#57) 2022-01-19 21:28:17 +09:00
Yusuke Wada
9f91d09814
fix: Content-Length middleware not as default (#55)
* fix: miniflare error `ReadableStream is locked`

* Remove Content-Length middleware from default
2022-01-19 18:45:42 +09:00
Yusuke Wada
b6c3eef686
feat: default route with wildcard (#52)
* Default wildcard route

* Update example

* Add test
2022-01-19 01:44:21 +09:00
Yusuke Wada
1b54eb0fac
feat: Add content-length (#49) 2022-01-16 21:52:49 +09:00
Yusuke Wada
7c92d55a25
feat: Error handling (#48) 2022-01-16 21:34:06 +09:00
Yusuke Wada
fceed7465a
Support module workers syntax for Cloudflare Workers (#43)
* add fetch method and modify context

* Add example of Durable Objects

* Fixed export/import style

* Update readme

* Fixed script
2022-01-12 09:20:16 +09:00
Minghe
52b56e6ddb
feat(miniflare): repalce service-worker-mock with miniflare (#41)
* feat(miniflare): repalce service-worker-mock with miniflare

* feat(ci): add build step
2022-01-12 02:14:53 +09:00
Yusuke Wada
4a795dab88
Fix redirect method (#37) 2022-01-10 00:03:48 +09:00
Yusuke Wada
4741fd3c4b Feature/redirect (#36)
* Add redirect method

* Make Headers type

* Typecheck
2022-01-09 22:51:58 +09:00
Yusuke Wada
7920f9aadc
status and headers args on context text/json/html method (#34) 2022-01-09 06:53:26 +09:00
Yusuke Wada
7d4f10d995
Refactor (#32)
* Remove package-lock.json

* Fixed for warnings

* Disable lint the line

* Update jsx-ssr example
2022-01-09 05:30:50 +09:00
Yusuke Wada
74bab8b795
Feature/html method (#31)
* Add c.html() method

* Use c.html() method
2022-01-08 13:46:49 +09:00
Minghe
cb4f3d6282
feat(basic-auth): basic-auth middleware (#28)
* feat(basic-auth): basic-auth middleware

* fix(dep): update yarn.lock

* refactor(review): resolove some comments
2022-01-07 17:44:08 +09:00
Yusuke Wada
cb7120cec8
Chaind route without route method (#29)
fixed #25
2022-01-07 17:19:04 +09:00
Minghe
7c87ac68cd
Setup lint to enable code styles check (#27)
* feat(ci): setup github action to enable ci

* feat(ci): enable lint

* fix(lint): fix critical code style issues
2022-01-07 07:03:54 +09:00
Yusuke Wada
ee80ae3ae4
json method in Context (#23)
* Create context.ts and test

* Handling TypeError

* Implemented c.json()

* Update readme and example
2022-01-06 03:22:53 +09:00
Yusuke Wada
e6039f69f9
Migrate to TypeScript (#21)
* Migrate to TypeScript

* ready for publish
2022-01-05 18:41:29 +09:00
Yusuke Wada
ce6bd99118
Use test directory (#19) 2022-01-04 07:43:46 +09:00