@jupiterone/dynamodb-dao
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -1,3 +0,2 @@ | ||
export declare const DEFAULT_QUERY_LIMIT = 50; | ||
export declare const MAX_BATCH_OPERATIONS = 25; | ||
export declare const DEFAULT_LOCK_INCREMENT = 1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DEFAULT_LOCK_INCREMENT = exports.MAX_BATCH_OPERATIONS = exports.DEFAULT_QUERY_LIMIT = void 0; | ||
exports.DEFAULT_QUERY_LIMIT = 50; | ||
exports.DEFAULT_LOCK_INCREMENT = exports.MAX_BATCH_OPERATIONS = void 0; | ||
exports.MAX_BATCH_OPERATIONS = 25; | ||
exports.DEFAULT_LOCK_INCREMENT = 1; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLG1CQUFtQixHQUFHLEVBQUUsQ0FBQztBQUN6QixRQUFBLG9CQUFvQixHQUFHLEVBQUUsQ0FBQztBQUMxQixRQUFBLHNCQUFzQixHQUFHLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBERUZBVUxUX1FVRVJZX0xJTUlUID0gNTA7XG5leHBvcnQgY29uc3QgTUFYX0JBVENIX09QRVJBVElPTlMgPSAyNTtcbmV4cG9ydCBjb25zdCBERUZBVUxUX0xPQ0tfSU5DUkVNRU5UID0gMTtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLG9CQUFvQixHQUFHLEVBQUUsQ0FBQztBQUMxQixRQUFBLHNCQUFzQixHQUFHLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBNQVhfQkFUQ0hfT1BFUkFUSU9OUyA9IDI1O1xuZXhwb3J0IGNvbnN0IERFRkFVTFRfTE9DS19JTkNSRU1FTlQgPSAxO1xuIl19 |
@@ -107,3 +107,4 @@ "use strict"; | ||
// set the default if directed to do so | ||
if (versionAttribute in data && !isNaN(dataAsMap[versionAttribute])) { | ||
if (versionAttribute in dataAsMap && | ||
!isNaN(dataAsMap[versionAttribute])) { | ||
dataAsMap[versionAttribute] += constants_1.DEFAULT_LOCK_INCREMENT; | ||
@@ -215,3 +216,3 @@ } | ||
async query(input) { | ||
const { index, startAt, attributeNames, attributeValues, scanIndexForward, keyConditionExpression, filterExpression, limit = constants_1.DEFAULT_QUERY_LIMIT, consistentRead, } = input; | ||
const { index, startAt, attributeNames, attributeValues, scanIndexForward, keyConditionExpression, filterExpression, limit, consistentRead, } = input; | ||
let startKey; | ||
@@ -308,3 +309,3 @@ if (startAt) { | ||
async scan(input = {}) { | ||
const { index, startAt, attributeNames, attributeValues, filterExpression, segment, totalSegments, limit = constants_1.DEFAULT_QUERY_LIMIT, consistentRead, } = input; | ||
const { index, startAt, attributeNames, attributeValues, filterExpression, segment, totalSegments, limit, consistentRead, } = input; | ||
if (segment !== undefined && totalSegments === undefined) { | ||
@@ -455,2 +456,2 @@ throw new Error('If segment is defined, totalSegments must also be defined.'); | ||
exports.default = DynamoDbDao; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsK0NBQTBDO0FBRTFDLGd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ZCxcbiAgICB9O1xuICB9XG5cbiAgYXN5bmMgYmF0Y2hXcml0ZShcbiAgICBvcGVyYXRpb25zOiBCYXRjaFdyaXRlT3BlcmF0aW9uPERhdGFNb2RlbCwgS2V5U2NoZW1hPltdXG4gICk6IFByb21pc2U8QmF0Y2hXcml0ZVJlc3VsdDxEYXRhTW9kZWwsIEtleVNjaGVtYT4+IHtcbiAgICBpZiAob3BlcmF0aW9ucy5sZW5ndGggPiBNQVhfQkFUQ0hfT1BFUkFUSU9OUykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICBgQ2Fubm90IHNlbmQgbW9yZSB0aGFuICR7TUFYX0JBVENIX09QRVJBVElPTlN9IG9wZXJhdGlvbnMgaW4gYSBzaW5nbGUgY2FsbC5gXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRoaXMuZG9jdW1lbnRDbGllbnRcbiAgICAgIC5iYXRjaFdyaXRlKHtcbiAgICAgICAgUmVxdWVzdEl0ZW1zOiB7XG4gICAgICAgICAgW3RoaXMudGFibGVOYW1lXTogb3BlcmF0aW9ucy5tYXAoKG9wZXJhdGlvbikgPT4ge1xuICAgICAgICAgICAgaWYgKGlzQmF0Y2hQdXRPcGVyYXRpb24ob3BlcmF0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIFB1dFJlcXVlc3Q6IHtcbiAgICAgICAgICAgICAgICAgIEl0ZW06IG9wZXJhdGlvbi5wdXQsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgRGVsZXRlUmVxdWVzdDoge1xuICAgICAgICAgICAgICAgICAgS2V5OiBvcGVyYXRpb24uZGVsZXRlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICA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5kIG1vcmUgdGhhbiAke01BWF9CQVRDSF9PUEVSQVRJT05TfSBvcGVyYXRpb25zIGluIGEgc2luZ2xlIGNhbGwuYFxuICAgICAgKTtcbiAgICB9XG5cbiAgICBjb25zdCByZXN1bHQgPSBhd2FpdCB0aGlzLmRvY3VtZW50Q2xpZW50XG4gICAgICAuYmF0Y2hXcml0ZSh7XG4gICAgICAgIFJlcXVlc3RJdGVtczoge1xuICAgICAgICAgIFt0aGlzLnRhYmxlTmFtZV06IG9wZXJhdGlvbnMubWFwKChvcGVyYXRpb24pID0+IHtcbiAgICAgICAgICAgIGlmIChpc0JhdGNoUHV0T3BlcmF0aW9uKG9wZXJhdGlvbikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBQdXRSZXF1ZXN0OiB7XG4gICAgICAgICAgICAgICAgICBJdGVtOiBvcGVyYXRpb24ucHV0LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIERlbGV0ZVJlcXVlc3Q6IHtcbiAgICAgICAgICAgICAgICAgIEtleTogb3BlcmF0aW9uLmRlbGV0ZSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLFxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgIC5wcm9taXNlKCk7XG5cbiAgICBjb25zdCB1bnByb2Nlc3NlZEl0ZW1zID1cbiAgICAgIHJlc3VsdC5VbnByb2Nlc3NlZEl0ZW1zICYmIHJlc3VsdC5VbnByb2Nlc3NlZEl0ZW1zW3RoaXMudGFibGVOYW1lXTtcblxuICAgIHJldHVybiB7XG4gICAgICB1bnByb2Nlc3NlZEl0ZW1zOiB1bnByb2Nlc3NlZEl0ZW1zXG4gICAgICAgID8gdW5wcm9jZXNzZWRJdGVtcy5tYXAoKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIGlmIChpdGVtLlB1dFJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBwdXQ6IGl0ZW0uUHV0UmVxdWVzdC5JdGVtLFxuICAgICAgICAgICAgICB9IGFzIEJhdGNoUHV0T3BlcmF0aW9uPERhdGFNb2RlbD47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGRlbGV0ZTogaXRlbS5EZWxldGVSZXF1ZXN0Py5LZXksXG4gICAgICAgICAgICAgIH0gYXMgQmF0Y2hEZWxldGVPcGVyYXRpb248S2V5U2NoZW1hPjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICA6IHVuZGVmaW5lZCxcbiAgICB9O1xuICB9XG5cbiAgYXN5bmMgYmF0Y2hHZXQoXG4gICAga2V5czogS2V5U2NoZW1hW11cbiAgKTogUHJvbWlzZTxCYXRjaEdldFJlc3VsdDxEYXRhTW9kZWwsIEtleVNjaGVtYT4+IHtcbiAgICBpZiAoa2V5cy5sZW5ndGggPiBNQVhfQkFUQ0hfT1BFUkFUSU9OUykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICBgQ2Fubm90IGZldGNoIG1vcmUgdGhhbiAke01BWF9CQVRDSF9PUEVSQVRJT05TfSBpdGVtcyBpbiBhIHNpbmdsZSBjYWxsLmBcbiAgICAgICk7XG4gICAgfVxuXG4gICAgY29uc3QgcmVzdWx0ID0gYXdhaXQgdGhpcy5kb2N1bWVudENsaWVudFxuICAgICAgLmJhdGNoR2V0KHtcbiAgICAgICAgUmVxdWVzdEl0ZW1zOiB7XG4gICAgICAgICAgW3RoaXMudGFibGVOYW1lXToge1xuICAgICAgICAgICAgS2V5czoga2V5cyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgIC5wcm9taXNlK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oaXRlbSkgPT4gaXRlbS5wdXQpLFxuICAgICAgICBkZWxheTogTWF0aC5yb3VuZChNYXRoLnBvdyhkZWxheSwgMS4yKSksXG4gICAgICAgIGF0dGVtcHRzOiBhdHRlbXB0cyArIDEsXG4gICAgICAgIG1heFJldHJpZXMsXG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBsb2dnZXIuaW5mbygnU3VjY2Vzc2Z1bGx5IHdyb3RlIGFsbCBiYXRjaGVzIScpO1xuICB9XG59XG4iXX0= |
{ | ||
"name": "@jupiterone/dynamodb-dao", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "DynamoDB Data Access Object (DAO) helper library", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
104328
816