@expo/server
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -53,2 +53,3 @@ "use strict"; | ||
class ExpoRequest extends node_1.Request { | ||
[exports.NON_STANDARD_SYMBOL]; | ||
constructor(info, init) { | ||
@@ -55,0 +56,0 @@ super(info, init); |
@@ -54,3 +54,3 @@ "use strict"; | ||
}, getApiRoute = async (route) => { | ||
const filePath = path_1.default.join(distFolder, '_expo/functions', route.page + '.js'); | ||
const filePath = path_1.default.join(distFolder, route.file); | ||
debug(`Handling API route: ${route.page}: ${filePath}`); | ||
@@ -61,3 +61,6 @@ // TODO: What's the standard behavior for malformed projects? | ||
} | ||
return require(filePath); | ||
if (/\.[cj]s$/.test(filePath)) { | ||
return require(filePath); | ||
} | ||
return import(filePath); | ||
}, logApiRouteExecutionError = (error) => { | ||
@@ -64,0 +67,0 @@ console.error(error); |
{ | ||
"name": "@expo/server", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Server API for Expo Router projects", | ||
@@ -28,2 +28,3 @@ "main": "build/index.js", | ||
"build", | ||
"adapter", | ||
"install.js" | ||
@@ -38,3 +39,4 @@ ], | ||
"devDependencies": { | ||
"@types/express": "^4.17.17" | ||
"@types/express": "^4.17.17", | ||
"@netlify/functions": "^1.4.0" | ||
}, | ||
@@ -44,3 +46,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "2bd82552d004cba40601572c8f141f063150620c" | ||
"gitHead": "ee7897097f5f946ad7fcb94447eed789b984dd02" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
43397
25
692
2
3
1