Socket
Socket
Sign inDemoInstall

vercel-deno-dev

Package Overview
Dependencies
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vercel-deno-dev - npm Package Compare versions

Comparing version 0.1.0-7b646479eba56e16ae746f5032130b9c9947174c to 0.1.0-885c1f9192c6dea8b235a3469ea2509e3711d928

dist/boot/test.ts

2

dist/boot/runtime.ts

@@ -73,3 +73,3 @@ import * as base64 from 'https://deno.land/x/base64/mod.ts';

if (!handler) {
const module = await import(`${LAMBDA_TASK_ROOT}/${_HANDLER}`);
const module = await import(`./${_HANDLER}`);
handler = module.default;

@@ -76,0 +76,0 @@ if (!handler) {

@@ -15,3 +15,2 @@ "use strict";

const version_1 = require("../version");
const execa_1 = __importDefault(require("execa"));
async function build(opts) {

@@ -42,3 +41,3 @@ const { files, entrypoint, workPath: wp, config, meta = {} } = opts;

// Booleans
const unstable = !!process.env.DENO_UNSTABLE;
//const unstable = !!process.env.DENO_UNSTABLE;
let tsconfig = "";

@@ -55,31 +54,37 @@ try {

}
console.log({ tsconfig });
console.log("building single file");
const entrypointPath = downloadedFiles[entrypoint].fsPath;
const entrypointDirname = path_1.default.dirname(entrypointPath);
const extname = path_1.default.extname(entrypointPath);
const binName = path_1.default.basename(entrypointPath).replace(extname, "");
const binPath = path_1.default.join(workPath, binName) + ".bundle.js";
// const entrypointPath = downloadedFiles[entrypoint].fsPath;
// const entrypointDirname = path.dirname(entrypointPath);
// const extname = path.extname(entrypointPath);
// const binName = path.basename(entrypointPath).replace(extname, "");
// const binPath = path.join(workPath, binName) + ".bundle.js";
const denoDir = path_1.default.join(workPath, "layer", ".deno_dir");
const denoVer = util_1.parseDenoVersion(process.env.DENO_VERSION || "latest");
console.log("running `deno bundle`...");
try {
const denoBin = layerFiles["bin/deno"].fsPath;
await execa_1.default(denoBin, [
"bundle",
entrypointPath,
binPath,
...(tsconfig && (denoVer.major >= 1) ? ["-c", tsconfig] : []),
...(unstable ? ["--unstable"] : []),
], {
env: {
DENO_DIR: denoDir,
},
cwd: entrypointDirname,
stdio: "pipe",
});
}
catch (err) {
build_utils_1.debug("failed to `deno bundle`");
throw new Error("Failed to run `deno bundle`: " + err.stdout + " " + err.stderr);
}
// const denoVer = parseDenoVersion(process.env.DENO_VERSION || "latest");
// console.log("running `deno bundle`...");
// try {
// const denoBin = layerFiles["bin/deno"].fsPath as string;
// await execa(
// denoBin,
// [
// "bundle",
// entrypointPath,
// binPath,
// ...(tsconfig && (denoVer.major >= 1) ? ["-c", tsconfig] : []),
// ...(unstable ? ["--unstable"] : []),
// ],
// {
// env: {
// DENO_DIR: denoDir,
// },
// cwd: entrypointDirname,
// stdio: "pipe",
// },
// );
// } catch (err) {
// debug("failed to `deno bundle`");
// throw new Error(
// "Failed to run `deno bundle`: " + err.stdout + " " + err.stderr,
// );
// }
const denoDirFiles = await grabDenoDirFiles_1.default(denoDir);

@@ -91,13 +96,5 @@ const lambda = await build_utils_1.createLambda({

...denoDirFiles,
[binName + ".bundle.js"]: new build_utils_1.FileFsRef({
mode: 0o755,
fsPath: binPath,
}),
},
handler: binName + ".handler",
runtime: "provided",
environment: {
HANDLER_EXT: "bundle.js",
PATH: process.env.PATH + ":./bin",
},
handler: entrypoint,
runtime: "provided"
});

@@ -108,4 +105,4 @@ if (version_1.version === 3) {

return {
[entrypoint]: lambda,
output: lambda,
};
}
{
"name": "vercel-deno-dev",
"version": "0.1.0-7b646479eba56e16ae746f5032130b9c9947174c",
"version": "0.1.0-885c1f9192c6dea8b235a3469ea2509e3711d928",
"description": "run deno on vercel",

@@ -5,0 +5,0 @@ "main": "./dist/index",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc