@jupiterone/dynamodb-dao
Advanced tools
Comparing version 1.7.6 to 1.8.0
@@ -241,7 +241,2 @@ "use strict"; | ||
async queryUntilLimitReached(params) { | ||
if (!params.filterExpression) { | ||
// Since there are no filter expressions, DynamoDB will automatically | ||
// fulfill the `limit` property. | ||
return this.query(params); | ||
} | ||
// create a shallow copy of params since we mutate the top level properties | ||
@@ -458,2 +453,2 @@ params = { | ||
exports.default = DynamoDbDao; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsK0NBQTBDO0FBRTFDLGdFQUFpQztBQUNqQyxrREFBeUI7QUFDekIsMkNBSXFCO0FBQ3JCLHFGQUFrRjtBQUNsRiwyQ0FHd0I7QUFDeEIsOENBR3lCO0FBQ3pCLDZDQUFtRDtBQWlCbkQsd0VBR3VDO0FBRXZDLDhDQUE0QjtBQUM1QiwwQ0FBd0I7QUEwQ3hCOztHQUVHO0FBQ0gsTUFBcUIsV0FBVztJQU05QixZQUFZLE9BQW9DO1FBQzlDLElBQUksQ0FBQyxTQUFTLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQztRQUNuQyxJQUFJLENBQUMsY0FBYyxHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUM7UUFDN0Msa0RBQWtEO1FBQ2xELHlEQUF5RDtRQUN6RCxJQUFJLENBQUMsNEJBQTRCO1lBQy9CLE9BQU8sQ0FBQyw0QkFBNEIsS0FBSyxTQUFTO2dCQUNoRCxDQUFDLENBQUMsSUFBSTtnQkFDTixDQUFDLENBQUMsT0FBTyxDQUFDLDRCQUE0QixDQUFDO1FBQzNDLElBQUksQ0FBQywwQkFBMEIsR0FBRyxPQUFPLENBQUMsMEJBQTBCLENBQUM7SUFDdkUsQ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YXRhTW9kZWwsIEtleVNjaGVtYT4+IHtcbiAgICBpZiAob3BlcmF0aW9ucy5sZW5ndGggPiBNQVhfQkFUQ0hfT1BFUkFUSU9OUykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICBgQ2Fubm90IHNlbmQgbW9yZSB0aGFuICR7TUFYX0JBVENIX09QRVJBVElPTlN9IG9wZXJhdGlvbnMgaW4gYSBzaW5nbGUgY2FsbC5gXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRoaXMuZG9jdW1lbnRDbGllbnRcbiAgICAgIC5iYXRjaFdyaXRlKHtcbiAgICAgICAgUmVxdWVzdEl0ZW1zOiB7XG4gICAgICAgICAgW3RoaXMudGFibGVOYW1lXTogb3BlcmF0aW9ucy5tYXAoKG9wZXJhdGlvbikgPT4ge1xuICAgICAgICAgICAgaWYgKGlzQmF0Y2hQdXRPcGVyYXRpb24ob3BlcmF0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIFB1dFJlcXVlc3Q6IHtcbiAgICAgICAgICAgICAgICAgIEl0ZW06IG9wZXJhdGlvbi5wdXQsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgRGVsZXRlUmVxdWVzdDoge1xuICAgICAgICAgICAgICAgICAgS2V5OiBvcGVyYXRpb24uZGVsZXRlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgLnByb21pc2UoKTtcblxuICAgIGNvbnN0IHVucHJvY2Vzc2VkSXRlbXMgPVxuICAgICAgcmVzdWx0LlVucHJvY2Vzc2VkSXRlbXMgJiYgcmVzdWx0LlVucHJvY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Y2FsbC5gXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRoaXMuZG9jdW1lbnRDbGllbnRcbiAgICAgIC5iYXRjaFdyaXRlKHtcbiAgICAgICAgUmVxdWVzdEl0ZW1zOiB7XG4gICAgICAgICAgW3RoaXMudGFibGVOYW1lXTogb3BlcmF0aW9ucy5tYXAoKG9wZXJhdGlvbikgPT4ge1xuICAgICAgICAgICAgaWYgKGlzQmF0Y2hQdXRPcGVyYXRpb24ob3BlcmF0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIFB1dFJlcXVlc3Q6IHtcbiAgICAgICAgICAgICAgICAgIEl0ZW06IG9wZXJhdGlvbi5wdXQsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgRGVsZXRlUmVxdWVzdDoge1xuICAgICAgICAgICAgICAgICAgS2V5OiBvcGVyYXRpb24uZGVsZXRlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgLnByb21pc2UoKTtcblxuICAgIGNvbnN0IHVucHJvY2Vzc2VkSXRlbXMgPVxuICAgICAgcmVzdWx0LlVucHJvY2Vzc2VkSXRlbXMgJiYgcmVzdWx0LlVucHJvY2Vzc2VkSXRlbXNbdGhpcy50YWJsZU5hbWVdO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIHVucHJvY2Vzc2VkSXRlbXM6IHVucHJvY2Vzc2VkSXRlbXNcbiAgICAgICAgPyB1bnByb2Nlc3NlZEl0ZW1zLm1hcCgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgaWYgKGl0ZW0uUHV0UmVxdWVzdCkge1xuICAgICAgICAg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1hdGgucG93KGRlbGF5LCAxLjIpKSxcbiAgICAgICAgYXR0ZW1wdHM6IGF0dGVtcHRzICsgMSxcbiAgICAgICAgbWF4UmV0cmllcyxcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIGxvZ2dlci5pbmZvKCdTdWNjZXNzZnVsbHkgd3JvdGUgYWxsIGJhdGNoZXMhJyk7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "@jupiterone/dynamodb-dao", | ||
"version": "1.7.6", | ||
"version": "1.8.0", | ||
"description": "DynamoDB Data Access Object (DAO) helper library", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/JupiterOne/dynamodb-dao" | ||
}, | ||
"license": "MIT", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"repository": "git@github.com:jupiterone/dynamodb-dao.git", | ||
"author": "JupiterOne <dev@jupiterone.io>", | ||
"license": "MIT", | ||
"publishConfig": { | ||
@@ -11,0 +14,0 @@ "access": "public" |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
104678
817