vercel-deno-dev
Advanced tools
Comparing version 0.1.0-1048fbfc706ac0bba8dc42f8ce9ec41baedb8204 to 0.1.0-125b21ab5fe3c91cf621facfb51b53393058d3c5
@@ -89,5 +89,5 @@ import * as base64 from 'https://deno.land/x/base64/mod.ts'; | ||
req.url = data.path; | ||
req.proto = 'HTTP/2.0'; | ||
req.protoMinor = 0; | ||
req.protoMajor = 2; | ||
req.proto = 'HTTP/1.1'; | ||
req.protoMinor = 1; | ||
req.protoMajor = 1; | ||
@@ -112,3 +112,2 @@ for (const [name, value] of Object.entries(data.headers)) { | ||
await handler(req,res); | ||
console.log({res}); | ||
@@ -131,3 +130,2 @@ // execute respond if client had not implement it. | ||
const statuscode = res ? res.status || 200 : parseInt(firstLine.split(' ', 2)[1], 10); // get statuscode either from res or req. | ||
const headers = await tp.readMIMEHeader() || new Headers(); | ||
@@ -159,2 +157,4 @@ const headersObj: { [name: string]: string } = {}; | ||
async function invocationResponse(result:any,context:LambdaContext) { | ||
console.log("invoke Response") | ||
console.log({result,context}) | ||
const res = await LambdaFetch(`invocation/${context.awsRequestId}/response`, { | ||
@@ -171,3 +171,3 @@ method: 'POST', | ||
); | ||
} | ||
} | ||
} | ||
@@ -224,3 +224,3 @@ | ||
body | ||
}; | ||
}; | ||
} | ||
@@ -227,0 +227,0 @@ |
@@ -20,3 +20,3 @@ "use strict"; | ||
if (!DenoExists()) { | ||
build_utils_1.debug("download and extract ", DOWNLOAD_URL); | ||
console.log("download and extract ", DOWNLOAD_URL); | ||
try { | ||
@@ -29,3 +29,3 @@ if (!(await fs_extra_1.pathExists(zipPath))) | ||
catch (err) { | ||
build_utils_1.debug("operation failed"); | ||
console.log("operation failed"); | ||
throw new Error(`Failed: ${err.stdout} ${err.stderr}`); | ||
@@ -32,0 +32,0 @@ } |
@@ -87,2 +87,3 @@ "use strict"; | ||
// const denoDirFiles = await grabDenoDirFiles(denoDir); | ||
console.log({ downloadedFiles, extraFiles, layerFiles }); | ||
const lambda = await build_utils_1.createLambda({ | ||
@@ -94,2 +95,6 @@ files: { | ||
}, | ||
environment: { | ||
DENO_CONFIG: process.env.DENO_CONFIG || '', | ||
PATH: process.env.PATH + ':./bin', | ||
}, | ||
handler: entrypoint, | ||
@@ -96,0 +101,0 @@ runtime: "provided" |
{ | ||
"name": "vercel-deno-dev", | ||
"version": "0.1.0-1048fbfc706ac0bba8dc42f8ce9ec41baedb8204", | ||
"version": "0.1.0-125b21ab5fe3c91cf621facfb51b53393058d3c5", | ||
"description": "run deno on vercel", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32013
638
13