@vercel/express 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -681,7 +681,9 @@ var invokeFunction = async (args, options) => {
|
|
|
681
681
|
});
|
|
682
682
|
};
|
|
683
683
|
var expressShimSource = (args) => {
|
|
684
|
-
const pathToExpress = require_3.resolve("express"
|
|
684
|
+
const pathToExpress = require_3.resolve("express", {
|
|
685
|
+
paths: [args.outputDir]
|
|
686
|
+
});
|
|
685
687
|
const introspectionPath = getIntrospectionPath(args);
|
|
686
688
|
return `
|
|
687
689
|
const fs = require('fs');
|
|
@@ -721,10 +723,11 @@ const extractRoutes = () => {
|
|
|
721
723
|
routesExtracted = true;
|
|
722
724
|
|
|
723
725
|
const methods = ["all", "get", "post", "put", "delete", "patch", "options", "head"]
|
|
724
|
-
if (!app
|
|
726
|
+
if (!app) {
|
|
725
727
|
return;
|
|
726
728
|
}
|
|
727
|
-
|
|
729
|
+
const router = app._router || app.router
|
|
730
|
+
for (const route of router.stack) {
|
|
728
731
|
if(route.route) {
|
|
729
732
|
const m = [];
|
|
730
733
|
for (const method of methods) {
|