serverless-log-forwarding
Advanced tools
Comparing version 1.4.0 to 2.0.0
@@ -10,3 +10,11 @@ # Changelog | ||
## [2.0.0] - 2022-02-03 | ||
### Added | ||
- Added support of Serverless Framework 3. | ||
- Moved from Travis CI to Github Actions. | ||
- Added integration tests. | ||
- Updated npm dev dependencies. | ||
## [1.4.0] - 2019-03-17 | ||
@@ -13,0 +21,0 @@ |
12
index.js
@@ -22,8 +22,8 @@ 'use strict'; | ||
// check if stage is specified in config | ||
const service = this.serverless.service; | ||
const { service } = this.serverless; | ||
const stage = this.options.stage && this.options.stage.length > 0 | ||
? this.options.stage | ||
: service.provider.stage; | ||
if (service.custom.logForwarding.stages && | ||
service.custom.logForwarding.stages.indexOf(stage) === -1) { | ||
if (service.custom.logForwarding.stages | ||
&& service.custom.logForwarding.stages.indexOf(stage) === -1) { | ||
this.serverless.cli.log(`Log Forwarding is ignored for ${stage} stage`); | ||
@@ -51,3 +51,3 @@ return; | ||
createResourcesObj() { | ||
const service = this.serverless.service; | ||
const { service } = this.serverless; | ||
// Checks if the serverless file is setup correctly | ||
@@ -122,4 +122,4 @@ if (service.custom.logForwarding.destinationARN == null) { | ||
const logGroupName = this.provider.naming.getLogGroupName(functionObject.name); | ||
const filterName = options.normalizedFilterID ? | ||
this.provider.naming.getNormalizedFunctionName(functionName) | ||
const filterName = options.normalizedFilterID | ||
? this.provider.naming.getNormalizedFunctionName(functionName) | ||
: functionName; | ||
@@ -126,0 +126,0 @@ const filterLogicalId = `SubscriptionFilter${filterName}`; |
{ | ||
"name": "serverless-log-forwarding", | ||
"version": "1.4.0", | ||
"version": "2.0.0", | ||
"description": "a serverless plugin to forward logs to given lambda function", | ||
@@ -13,14 +13,18 @@ "main": "index.js", | ||
"devDependencies": { | ||
"aws-sdk": "^2.1061.0", | ||
"chai": "^3.5.0", | ||
"eslint": "^3.18.0", | ||
"eslint-config-airbnb": "^14.1.0", | ||
"eslint": "^8.7.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eslint-plugin-jsx-a11y": "^3.0.2", | ||
"eslint-plugin-react": "^6.10.3", | ||
"eslint-plugin-jsx-a11y": "^6.5.1", | ||
"eslint-plugin-react": "^7.28.0", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^5.2.0", | ||
"serverless": "^1.32.0" | ||
"mocha": "^9.1.4", | ||
"randomstring": "^1.2.2", | ||
"serverless": "^3.1.0", | ||
"shelljs": "^0.8.5" | ||
}, | ||
"scripts": { | ||
"test": "node ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec && node ./node_modules/istanbul/lib/cli.js check-coverage --line 70 coverage/coverage.json", | ||
"test": "node ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --recusrive ./test/unit-tests/ -- -R spec && node ./node_modules/istanbul/lib/cli.js check-coverage --line 70 coverage/coverage.json", | ||
"integration-test": "node ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --recusrive ./test/integration-tests/ -- -R spec && node ./node_modules/istanbul/lib/cli.js check-coverage --line 70 coverage/coverage.json", | ||
"lint": "eslint ." | ||
@@ -27,0 +31,0 @@ }, |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
28
49889
12
942
4
1