@vercel/fun
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -151,7 +151,9 @@ "use strict"; | ||
function getHandler() { | ||
const appParts = _HANDLER.split('.'); | ||
const segments = _HANDLER.split('/'); | ||
const appParts = segments[segments.length - 1].split('.'); | ||
if (appParts.length !== 2) { | ||
throw new Error(`Bad handler ${_HANDLER}`); | ||
} | ||
const [modulePath, handlerName] = appParts; | ||
const [moduleFile, handlerName] = appParts; | ||
const modulePath = [...segments.slice(0, -1), moduleFile].join('/'); | ||
let app; | ||
@@ -158,0 +160,0 @@ try { |
{ | ||
"name": "@vercel/fun", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Local Lambda development environment", | ||
@@ -13,3 +13,3 @@ "main": "dist/src/index", | ||
"postbuild": "cpy --parents src test '!**/*.ts' dist", | ||
"test": "echo \"Node.js version: $(node -v)\\n\" && yarn build && best --include dist/test/test.js --verbose", | ||
"test": "echo \"Node.js version: $(node -v)\\n\" && yarn build && jest --verbose test/test.js", | ||
"test-codecov": "nyc npm test", | ||
@@ -50,2 +50,3 @@ "report-codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov", | ||
"@types/generic-pool": "3.1.9", | ||
"@types/jest": "27.0.2", | ||
"@types/micro": "7.3.6", | ||
@@ -57,5 +58,5 @@ "@types/node": "10.12.29", | ||
"@types/yauzl-promise": "2.1.0", | ||
"@zeit/best": "0.5.1", | ||
"codecov": "3.7.1", | ||
"cpy-cli": "2.0.0", | ||
"jest": "27.3.1", | ||
"lint-staged": "9.2.5", | ||
@@ -68,5 +69,16 @@ "nyc": "14.1.1", | ||
"source-map-support": "0.5.10", | ||
"ts-jest": "27.0.7", | ||
"typescript": "4.4.4" | ||
}, | ||
"pre-commit": "lint:staged", | ||
"jest": { | ||
"preset": "ts-jest", | ||
"globals": { | ||
"ts-jest": { | ||
"diagnostics": false, | ||
"isolatedModules": true | ||
} | ||
}, | ||
"testEnvironment": "node" | ||
}, | ||
"lint-staged": { | ||
@@ -73,0 +85,0 @@ "*.ts": [ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
157784
22
1832
16