serverless-reqvalidator-plugin
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "serverless-reqvalidator-plugin", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Serverless plugin for setting request validation", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "jest test" | ||
}, | ||
@@ -26,3 +26,8 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/RafPe/serverless-reqvalidator-plugin#readme" | ||
"homepage": "https://github.com/RafPe/serverless-reqvalidator-plugin#readme", | ||
"devDependencies": { | ||
"ajv": "^8.11.2", | ||
"jest": "^29.3.1", | ||
"js-yaml": "^4.1.0" | ||
} | ||
} |
@@ -36,2 +36,17 @@ 'use strict'; | ||
const ServerlessReqValidatorPluginConfigSchema = { | ||
properties: { | ||
reqValidatorName: { | ||
anyOf: [ | ||
{ type: 'string' }, | ||
{ type: 'object', | ||
properties: { | ||
'Fn::ImportValue': { type: 'string' } | ||
}, | ||
required: ['Fn::ImportValue'], | ||
}, | ||
] | ||
}, | ||
}, | ||
} | ||
class ServerlessReqValidatorPlugin { | ||
@@ -51,7 +66,3 @@ constructor(serverless, options) { | ||
// Create schema for your properties. For reference use https://github.com/ajv-validator/ajv | ||
serverless.configSchemaHandler.defineFunctionEventProperties('aws', 'http', { | ||
properties: { | ||
reqValidatorName: { type: 'string' }, | ||
}, | ||
}); | ||
serverless.configSchemaHandler.defineFunctionEventProperties('aws', 'http', ServerlessReqValidatorPluginConfigSchema); | ||
@@ -118,1 +129,2 @@ this.hooks = { | ||
module.exports = ServerlessReqValidatorPlugin; | ||
module.exports.ServerlessReqValidatorPluginConfigSchema = ServerlessReqValidatorPluginConfigSchema; |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
12705
9
138
0
3
1