vercel-deno-dev
Advanced tools
Comparing version 0.1.0-4d74fbd9a5f6e5dc1f59563e295a2af280298594 to 0.1.0-7b646479eba56e16ae746f5032130b9c9947174c
@@ -6,3 +6,3 @@ import * as base64 from 'https://deno.land/x/base64/mod.ts'; | ||
import { Context, APIGatewayProxyEvent } from 'https://deno.land/x/lambda/mod.ts'; | ||
import { NowApiHandler, NowRequest, NowResponse, NowRequestCookies, NowRequestQuery } from './NowHandler.ts'; | ||
import { NowApiHandler, NowRequest, NowResponse, NowRequestCookies, NowRequestQuery } from './nowHandler.ts'; | ||
@@ -24,3 +24,4 @@ import { setLazyProp, getCookieParser, getQueryParser } from './helpers.ts'; | ||
AWS_LAMBDA_LOG_STREAM_NAME, | ||
_HANDLER, | ||
_HANDLER, | ||
LAMBDA_TASK_ROOT, | ||
AWS_LAMBDA_RUNTIME_API | ||
@@ -31,2 +32,3 @@ } = Deno.env.toObject(); | ||
const RUNTIME_PATH = '2018-06-01/runtime'; | ||
const [HANDLER_FILE,HANDLER_NAME] = _HANDLER.split('.'); | ||
@@ -74,3 +76,3 @@ async function initialize() { | ||
if (!handler) { | ||
const module = await import(`./${_HANDLER}`); | ||
const module = await import(`${LAMBDA_TASK_ROOT}/${_HANDLER}`); | ||
handler = module.default; | ||
@@ -239,3 +241,3 @@ if (!handler) { | ||
chunk = ''; | ||
} else if (Buffer.isBuffer(chunk)) { | ||
} else if (chunk instanceof Uint8Array) { | ||
if (!res.headers?.get('content-type')) { | ||
@@ -242,0 +244,0 @@ res.headers?.set('content-type', 'application/octet-stream'); |
{ | ||
"name": "vercel-deno-dev", | ||
"version": "0.1.0-4d74fbd9a5f6e5dc1f59563e295a2af280298594", | ||
"version": "0.1.0-7b646479eba56e16ae746f5032130b9c9947174c", | ||
"description": "run deno on vercel", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
Sorry, the diff of this file is not supported yet
32293
637