@google-cloud/functions-framework
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -80,3 +80,5 @@ "use strict"; | ||
if (functionModulePath === null) { | ||
console.error('Provided code is not a loadable module.'); | ||
console.error(`Provided code location '${codeLocation}' is not a loadable module.` + | ||
'\nDid you specify the correct location for the module defining ' + | ||
'your function?'); | ||
return null; | ||
@@ -152,17 +154,16 @@ } | ||
function getFunctionModulePath(codeLocation) { | ||
let path = null; | ||
try { | ||
path = require.resolve(codeLocation); | ||
return require.resolve(codeLocation); | ||
} | ||
catch (ex) { | ||
try { | ||
// TODO: Decide if we want to keep this fallback. | ||
path = require.resolve(codeLocation + '/function.js'); | ||
} | ||
catch (ex) { | ||
return path; | ||
} | ||
// Ignore exception, this means the function was not found here. | ||
} | ||
return path; | ||
try { | ||
return require.resolve(codeLocation + '/function.js'); | ||
} | ||
catch (ex) { | ||
// Ignore exception, this means the function was not found here. | ||
} | ||
return null; | ||
} | ||
//# sourceMappingURL=loader.js.map |
{ | ||
"name": "@google-cloud/functions-framework", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "FaaS (Function as a service) framework for writing portable Node.js functions", | ||
@@ -24,3 +24,3 @@ "engines": { | ||
"body-parser": "^1.18.3", | ||
"cloudevents": "^6.0.0", | ||
"cloudevents": "^7.0.0", | ||
"express": "^4.16.4", | ||
@@ -60,3 +60,3 @@ "minimist": "^1.2.7", | ||
"@types/mocha": "9.1.1", | ||
"@types/node": "14.18.37", | ||
"@types/node": "14.18.43", | ||
"@types/on-finished": "2.3.1", | ||
@@ -71,4 +71,4 @@ "@types/semver": "^7.3.6", | ||
"supertest": "6.3.3", | ||
"typescript": "4.9.5" | ||
"typescript": "5.0.4" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # Functions Framework for Node.js | ||
[![Node unit CI][ff_node_unit_img]][ff_node_unit_link] [![Node lint CI][ff_node_lint_img]][ff_node_lint_link] [![Node conformace CI][ff_node_conformance_img]][ff_node_conformance_link] | ||
[![Node unit CI][ff_node_unit_img]][ff_node_unit_link] [![Node lint CI][ff_node_lint_img]][ff_node_lint_link] [![Node conformace CI][ff_node_conformance_img]][ff_node_conformance_link] ![Security Scorecard](https://api.securityscorecards.dev/projects/github.com/GoogleCloudPlatform/functions-framework-nodejs/badge) | ||
@@ -8,0 +8,0 @@ An open source FaaS (Function as a Service) framework based on [Express](https://expressjs.com/) |
102124
1971
+ Added@types/express-serve-static-core@4.19.5(transitive)
+ Added@types/node@20.14.8(transitive)
+ Added@types/range-parser@1.2.7(transitive)
+ Addedbignumber.js@9.1.2(transitive)
+ Addedcloudevents@7.0.2(transitive)
+ Addedis-core-module@2.14.0(transitive)
+ Addedjson-bigint@1.0.0(transitive)
+ Addedobject-inspect@1.13.2(transitive)
- Removed@types/node@20.14.6(transitive)
- Removedcloudevents@6.0.4(transitive)
- Removedis-core-module@2.13.1(transitive)
- Removedobject-inspect@1.13.1(transitive)
Updatedcloudevents@^7.0.0