vercel-deno-dev
Advanced tools
Comparing version 0.1.0-885c1f9192c6dea8b235a3469ea2509e3711d928 to 0.1.0-a0d8b777ef30c94a15765be279457a4a8b09f739
@@ -128,3 +128,2 @@ import * as base64 from 'https://deno.land/x/base64/mod.ts'; | ||
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(); | ||
@@ -156,2 +155,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`, { | ||
@@ -168,3 +169,3 @@ method: 'POST', | ||
); | ||
} | ||
} | ||
} | ||
@@ -221,3 +222,3 @@ | ||
body | ||
}; | ||
}; | ||
} | ||
@@ -224,0 +225,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 @@ } |
@@ -9,11 +9,9 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const util_1 = require("./util"); | ||
const gatherExtraFiles_1 = __importDefault(require("./gatherExtraFiles")); | ||
const runUserScripts_1 = __importDefault(require("./runUserScripts")); | ||
const grabDenoDirFiles_1 = __importDefault(require("./grabDenoDirFiles")); | ||
//import grabDenoDirFiles from "./grabDenoDirFiles"; | ||
const getDenoLambdaLayer_1 = __importDefault(require("./getDenoLambdaLayer")); | ||
const version_1 = require("../version"); | ||
async function build(opts) { | ||
const { files, entrypoint, workPath: wp, config, meta = {} } = opts; | ||
const workPath = util_1.getWorkPath(wp, entrypoint); | ||
const { files, entrypoint, workPath, config, meta = {} } = opts; | ||
await fs_extra_1.default.mkdirp(workPath); | ||
@@ -42,2 +40,3 @@ // if (meta.isDev) { | ||
//const unstable = !!process.env.DENO_UNSTABLE; | ||
console.log({ workPath }); | ||
let tsconfig = ""; | ||
@@ -61,3 +60,3 @@ try { | ||
// const binPath = path.join(workPath, binName) + ".bundle.js"; | ||
const denoDir = path_1.default.join(workPath, "layer", ".deno_dir"); | ||
// const denoDir = path.join(workPath, "layer", ".deno_dir"); | ||
// const denoVer = parseDenoVersion(process.env.DENO_VERSION || "latest"); | ||
@@ -90,8 +89,8 @@ // console.log("running `deno bundle`..."); | ||
// } | ||
const denoDirFiles = await grabDenoDirFiles_1.default(denoDir); | ||
// const denoDirFiles = await grabDenoDirFiles(denoDir); | ||
const lambda = await build_utils_1.createLambda({ | ||
files: { | ||
...downloadedFiles, | ||
...extraFiles, | ||
...layerFiles, | ||
...denoDirFiles, | ||
}, | ||
@@ -98,0 +97,0 @@ handler: entrypoint, |
@@ -6,4 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getWorkPath = exports.parseDenoVersion = exports.getDeno = exports.DENO_VERSION = exports.DENO_LATEST = void 0; | ||
const path_1 = __importDefault(require("path")); | ||
exports.parseDenoVersion = exports.getDeno = exports.DENO_VERSION = exports.DENO_LATEST = void 0; | ||
const execa_1 = __importDefault(require("execa")); | ||
@@ -43,2 +42,1 @@ exports.DENO_LATEST = "latest"; | ||
exports.parseDenoVersion = parseDenoVersion; | ||
exports.getWorkPath = (workPath, entrypoint) => path_1.default.join(workPath, ".now", "builders", "now-denolis", entrypoint); |
{ | ||
"name": "vercel-deno-dev", | ||
"version": "0.1.0-885c1f9192c6dea8b235a3469ea2509e3711d928", | ||
"version": "0.1.0-a0d8b777ef30c94a15765be279457a4a8b09f739", | ||
"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
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
31814
633