0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-22 11:17:33 +01:00
Commit Graph

25 Commits

Author SHA1 Message Date
Yusuke Wada
5f78e4e1b3
chore(lint): ESLint v9 (#3393)
* chore(lint): ESLint v9

* run prettier
2024-09-12 12:05:41 +09:00
Markus Wolf
a2a04a98a1
fix(aws-lambda): handle multiple cookies in streaming responses (#2926)
* fix: handle multiple cookies in streaming responses

This fix does address that cookies have to be handled
specially in lambda responses.

Fixes #2921

* test: check cookie handling
2024-06-12 19:25:37 +09:00
TATSUNO “Taz” Yasuhiro
ec3648d0c3
refactor(aws-lambda): merge custom-context into types (#2889)
* refactor(aws-lambda): merge custom-context into types so they are excluded from coverage

* refactor: custom-context.ts is not needed since it is hidden by reexport
2024-06-03 00:16:07 +09:00
TATSUNO “Taz” Yasuhiro
8cc8a05c89
ci: Report coverage with CodeCov (#2862)
* Output coverage per each test

* Collect coverage

* Exclude test-only files

* update comment

* exclude types

* Add config

* Update bun comment

* Generate coverage in Deno
2024-06-01 04:17:47 +09:00
Ilias YAHIA
a437161c2b
feat(aws-lambda): add support for alb multiValueQueryStringParameters (#2751) 2024-05-21 08:59:31 +09:00
Ilias YAHIA
e1257f14e6
feat(aws-lambda): add alb event processor (#2657)
* feat(aws-lambda): add alb event processor

* fix: formatting issue
2024-05-13 14:41:57 +09:00
TATSUNO “Taz” Yasuhiro
acb56b8d30
fix(adapter): handle multi value headers in AWS Lambda (#2494)
* Headers can be undefined on ALB

* Delegate headers from multiValueHeaders

* Add test

* Assert header values

* format

* Make multiValueHeaders optional so it can be omitted

* Avoid Object.entries when undefined

* Write tests in runtime_tests
2024-04-18 08:13:37 +09:00
Yusuke Wada
f616ed9abe
chore(lint): set curly rule as all (#2112)
* chore(lint): set `curly` rule as `all`

* denoify
2024-01-29 22:21:09 +09:00
ryu
45d612d641
refactor(test): change to not use env command (#2062)
* refactor(test): change to not use `env` command

* fix bun test
2024-01-23 17:07:31 +09:00
Yusuke Wada
19641d07c1 Merge branch 'main' into next 2023-11-28 18:00:14 +09:00
Yusuke Wada
7dc215577a
fix(helper/cookie): make default Path=/ for setCookie()/setSignedCookie() (#1742)
* fix(helper/cookie): make default `path` as `/` for `setCookie()`/`setSignedCookie()`

* denoify

* fixed test
2023-11-28 17:52:34 +09:00
watany
bea87a0429
feat(adaptor): Enhance AWS Lambda Event Handling and Interface (#1710) 2023-11-27 15:31:10 +09:00
watany
c7e4035700
fix(Adaptor): Lambda Response Streaming With Content Type (#1673)
* lambda 0.1

* ok stream setted content-type

* fix d.ts
2023-11-11 00:44:20 +09:00
watany
7adae90fd7
fix(helper): Stream SSE Helper Non-Closure (#1650)
* fix(helper): Stream SSE Helper Non-Closure

* denoify

* test fixed.
2023-11-08 20:54:02 +09:00
watany
8b4392fa36
feat(adaptor): Support AWS Function URL Streaming (#1625)
* 0.1

* lint

* stream

* type safe

* ignore

* lint

* test Node.writablestream

* 1.0

* fixed pipeline

* fixed
2023-11-07 07:05:23 +09:00
Ochirjav Jargalsaikhan
5f0237525c
fix(lambda): Aws lambda cookies fix (#1613)
* AWS Lambda adapter cookies issue fix implementation

* AWS Lambda adapter cookies issue - tests modified to handle multiple cookies
2023-10-27 06:13:02 +09:00
watany
43749a0efd
feat(adaptor): Accessable Lambda "Context" (#1523)
* adding lambda-context

* format

* type any

* ignore denoify

* export type
2023-09-30 21:55:35 +09:00
Derrick Farris
5b07146cf8
test(vitest): replace jest with vitest (#1404)
* test(vitest): replace `jest` with `vitest` for core tests

* test(fastly): `jest` -> `vitest`, correct env for fastly

* test(jest): remove `jest-environment-miniflare` as dep

* test(lagon): configure `lagon` tests to run on `vitest`

* test(lambda): `jest` -> `vitest`

* test(lambda-edge): `jest` -> `vitest`

* test(node): `jest` -> `vitest`

* test(wrangler): `jest` -> `vitest`

* chore(deps): remove `jest` and `ts-jest` from deps

* test(vitest): add `yarn coverage` for checking coverage

* test(fastly): fix check for `globalThis.crypto`

* test(handler): fix stray `.only`

* test(lagon): change env file back to original path

* test(fastly): go back to `jest` until `vitest` has support for fastly env

* test(fastly): remove hack for the `crypto` global from the test
2023-09-08 17:42:28 +09:00
watany
eefdb27e48
fix(adaptor): Access to custom request context on AWS Lambda Adaptor (#1305)
* v0.1

* lint

* test lint

* pritter

* prettier
2023-08-11 00:37:58 +09:00
watany
301e142163
fix: Safe modification of Buffer (#1238)
* refactor lambda-edge

* refactor lambda
2023-07-15 20:44:54 +09:00
Denis Washington
2a6d17551b
fix: AWS Lambda: Avoid text-encoding binary data (#1235)
So far, the AWS Lambda adapter has used `atob` to convert a Base64-encoded
request body to a binary. However, `atob` returns a string, and passing
that to the `Request` constructor (at least on Node.js, which Lambda
runs on) results in the binary string being encoded as UTF-8. This means
that if the request body contains bytes which are not in the ASCII
range, they are replaced with UTF-8 multi-byte encodings, which leads
to `c.req.blob()`, `c.req.formData()`, etc. returning the wrong binary
data!

This commit fixes the issue by replacing `atob(body)` with
`Buffer.from(body, 'base64')`, which does not have that problem. The
`Buffer` can be directly passed as body for `new Request()` because it
implements the `Uint8Array` interface. While this makes the AWS Lambda
adapter depend directly on the "node:buffer" module, this should be fine
because AWS Lambda functions always run on Node.
2023-07-15 09:35:32 +09:00
Yusuke Wada
821a4082a9
fix(lambda): don't encode text (#1091) 2023-05-12 16:06:41 +09:00
watany
e7c0a512a1
feat(adapter): AWS Lambda Adapter supports requests via Lambda Function URLs. (#1076)
* feat(adapter):  Lambda Adapter supports Fn URLs.

* add comment

* fix schema

* fix lint
2023-05-10 14:38:41 +09:00
Stefan Schonert
a2e6167478
feat(adapter): Added aws-handler support for APIGatewayProxyEventV2 (#1009)
* Added aws-handler support for APIGatewayProxyEventV2

* Ensure querystring from API Gateway and ELB

* remove log

* Minor refactor to follow conventions

* Missed function declaration

* Update handler and tests to use base64

* Revert disabling crypto
2023-05-03 21:34:36 +09:00
Yusuke Wada
f29761e16b
chore: move runtime tests into runtime_tests (#1062)
* chore: move runtime tests into `runtime_tests`

* fixed ci
2023-05-02 21:16:17 +09:00