@google-cloud/functions-framework
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -38,3 +38,2 @@ #!/usr/bin/env node | ||
SOURCE: 'source', | ||
DRY_RUN: 'dry-run', | ||
}; | ||
@@ -47,3 +46,2 @@ // Supported environment variables | ||
SOURCE: 'FUNCTION_SOURCE', | ||
DRY_RUN: 'DRY_RUN', | ||
}; | ||
@@ -55,3 +53,3 @@ var NodeEnv; | ||
const argv = minimist(process.argv, { | ||
string: [FLAG.PORT, FLAG.TARGET, FLAG.SIGNATURE_TYPE, FLAG.DRY_RUN], | ||
string: [FLAG.PORT, FLAG.TARGET, FLAG.SIGNATURE_TYPE], | ||
}); | ||
@@ -67,3 +65,2 @@ const CODE_LOCATION = path_1.resolve(argv[FLAG.SOURCE] || process.env[ENV.SOURCE] || ''); | ||
} | ||
const DRY_RUN = argv[FLAG.DRY_RUN] || process.env[ENV.DRY_RUN] || false; | ||
// CLI Help Flag | ||
@@ -84,8 +81,2 @@ if (process.argv[2] === '-h' || process.argv[2] === '--help') { | ||
const ERROR_HANDLER = new invoker_1.ErrorHandler(SERVER); | ||
if (DRY_RUN) { | ||
console.log(`Function: ${TARGET}`); | ||
console.log(`URL: http://localhost:${PORT}/`); | ||
console.log('Dry run successful, shutting down.'); | ||
process.exit(0); | ||
} | ||
SERVER.listen(PORT, () => { | ||
@@ -92,0 +83,0 @@ ERROR_HANDLER.register(); |
@@ -348,2 +348,5 @@ "use strict"; | ||
if (isHttpFunction(userFunction, functionSignatureType)) { | ||
app.use('/favicon.ico|/robots.txt', (req, res, next) => { | ||
res.sendStatus(404); | ||
}); | ||
app.use('/*', (req, res, next) => { | ||
@@ -350,0 +353,0 @@ onFinished(res, (err, res) => { |
@@ -7,2 +7,17 @@ # Changelog | ||
## v1.5.0 | ||
03-06-2020 08:15 PST | ||
### Implementation Changes | ||
- Adjust path handling ([#121](https://github.com/GoogleCloudPlatform/functions-framework-nodejs/pull/121)) | ||
### New Features | ||
### Dependencies | ||
### Documentation | ||
### Internal / Testing Changes | ||
## v1.4.0 | ||
@@ -9,0 +24,0 @@ |
{ | ||
"name": "@google-cloud/functions-framework", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "FaaS (Function as a service) framework for writing portable Node.js functions", | ||
@@ -5,0 +5,0 @@ "engines": { |
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
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
45906
9
631