lambda-serverless-api
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -15,2 +15,3 @@ import assert from 'assert'; | ||
this.limiter = Limiter({ | ||
S3: get(options, 'S3', null), | ||
bucket: get(options, 'bucket', null), | ||
@@ -27,2 +28,3 @@ globalLimit: get(options, 'globalLimit', 200), | ||
identifierPaths: Joi.array().items(Joi.string()).optional(), | ||
S3: Joi.function(), | ||
bucket: Joi.string().optional(), | ||
@@ -29,0 +31,0 @@ // eslint-disable-next-line |
@@ -11,5 +11,7 @@ import crypto from 'crypto'; | ||
export default ({ bucket, globalLimit, defaultRouteLimit }) => { | ||
export default ({ | ||
S3, bucket, globalLimit, defaultRouteLimit | ||
}) => { | ||
const memoryCache = new LRU({ maxAge: 60 * 1000 }); | ||
const storage = Storage(bucket); | ||
const storage = Storage(S3, bucket); | ||
@@ -16,0 +18,0 @@ return async ({ |
@@ -5,13 +5,4 @@ import assert from 'assert'; | ||
import AwsSdkWrap from 'aws-sdk-wrap'; | ||
import AWS from './aws.cjs'; | ||
const aws = AwsSdkWrap({ | ||
logger, | ||
services: { | ||
S3: AWS.S3 | ||
} | ||
}); | ||
const { s3 } = aws; | ||
export default (bucket) => { | ||
export default (S3, bucket) => { | ||
assert(bucket === null || typeof bucket === 'string'); | ||
@@ -21,2 +12,7 @@ const memoryStorage = new LRU({ maxAge: 60 * 1000 }); | ||
const { s3 } = AwsSdkWrap({ | ||
logger, | ||
services: { S3 } | ||
}); | ||
return { | ||
@@ -23,0 +19,0 @@ set: async (key, data) => { |
@@ -22,2 +22,3 @@ { | ||
"@blackflux/robo-config-plugin": "7.4.2", | ||
"aws-sdk": "2.1104.0", | ||
"c8": "7.11.0", | ||
@@ -42,3 +43,3 @@ "chai": "4.3.6", | ||
}, | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"scripts": { | ||
@@ -100,4 +101,3 @@ "clean": "rm -rf lib", | ||
"turf-polygon": "1.0.3" | ||
}, | ||
"peerDependencies": {} | ||
} | ||
} |
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
98876
24
69
2894