Skip to content

Commit 7d73e04

Browse files
committed
Switch deprecated Now types to Vercel types
1 parent 0a60be6 commit 7d73e04

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/fastify-lambda.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { NowApiHandler, NowRequest, NowResponse } from "@vercel/node"
1+
import { VercelApiHandler, VercelRequest, VercelResponse } from "@vercel/node"
22
import { FastifyInstance } from "fastify"
33

44
//
55
// https://www.fastify.io/docs/latest/Serverless/#vercel
66
// https://vercel.com/docs/serverless-functions/supported-languages#using-typescript
77
//
8-
export const createLambdaHandler: (server: FastifyInstance) => NowApiHandler = (
8+
export const createLambdaHandler: (server: FastifyInstance) => VercelApiHandler = (
99
server,
1010
) => {
11-
return async (req: NowRequest, res: NowResponse) => {
11+
return async (req: VercelRequest, res: VercelResponse) => {
1212
await server.ready()
1313
server.server.emit("request", req, res)
1414
}

lib/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NowApiHandler } from "@vercel/node"
1+
import { VercelApiHandler } from "@vercel/node"
22
import fastify from "fastify"
33
import assert from "ow"
44

@@ -8,7 +8,7 @@ import { registerServeStatic } from "./fastify-static"
88
import { registerGitHubOAuth } from "./github-oauth"
99
import { Config } from "./types"
1010

11-
export const createLambdaProxyAuthHandler: (config: Config) => NowApiHandler = (
11+
export const createLambdaProxyAuthHandler: (config: Config) => VercelApiHandler = (
1212
config,
1313
) => {
1414
assert(config.cryptoSecret, "config.cryptoSecret", assert.string.nonEmpty)

0 commit comments

Comments
 (0)