* 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
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.
* 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