🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@aws/dynamodb-expressions

Package Overview
Dependencies
Maintainers
12
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws/dynamodb-expressions - npm Package Compare versions

Comparing version

to
0.6.0

0

build/AttributeBearingExpression.d.ts

@@ -0,0 +0,0 @@ import { ExpressionAttributes } from "./ExpressionAttributes";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=AttributeBearingExpression.js.map

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { AttributeValue as BaseAttributeValue } from 'aws-sdk/clients/dynamodb';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { AttributePath } from "./AttributePath";

8

build/ConditionExpression.js

@@ -104,2 +104,3 @@ "use strict";

function isConditionExpression(arg) {
var e_1, _a;
if (FunctionExpression_1.FunctionExpression.isFunctionExpression(arg)) {

@@ -116,4 +117,4 @@ return true;

try {
for (var _a = tslib_1.__values(arg.conditions), _b = _a.next(); !_b.done; _b = _a.next()) {
var condition = _b.value;
for (var _b = tslib_1.__values(arg.conditions), _c = _b.next(); !_c.done; _c = _b.next()) {
var condition = _c.value;
if (!isConditionExpression(condition)) {

@@ -127,3 +128,3 @@ return false;

try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}

@@ -141,3 +142,2 @@ finally { if (e_1) throw e_1.error; }

return false;
var e_1, _c;
}

@@ -144,0 +144,0 @@ exports.isConditionExpression = isConditionExpression;

@@ -27,3 +27,3 @@ import { AttributePath } from "./AttributePath";

addValue(value: any): string;
private addAttributeName(attributeName);
private addAttributeName;
}

@@ -26,7 +26,8 @@ "use strict";

ExpressionAttributes.prototype.addName = function (path) {
var e_1, _a;
if (AttributePath_1.AttributePath.isAttributePath(path)) {
var escapedPath = '';
try {
for (var _a = tslib_1.__values(path.elements), _b = _a.next(); !_b.done; _b = _a.next()) {
var element = _b.value;
for (var _b = tslib_1.__values(path.elements), _c = _b.next(); !_c.done; _c = _b.next()) {
var element = _c.value;
if (element.type === 'AttributeName') {

@@ -43,3 +44,3 @@ escapedPath += "." + this.addAttributeName(element.name);

try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}

@@ -51,3 +52,2 @@ finally { if (e_1) throw e_1.error; }

return this.addName(new AttributePath_1.AttributePath(path));
var e_1, _c;
};

@@ -54,0 +54,0 @@ /**

@@ -0,0 +0,0 @@ import { AttributeBearingExpression } from "./AttributeBearingExpression";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export * from './AttributePath';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { AttributeBearingExpression } from "./AttributeBearingExpression";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { AttributePath } from "./AttributePath";

@@ -10,2 +10,3 @@ "use strict";

function serializeProjectionExpression(projection, attributes) {
var e_1, _a;
var serialized = [];

@@ -26,5 +27,4 @@ try {

return serialized.join(', ');
var e_1, _a;
}
exports.serializeProjectionExpression = serializeProjectionExpression;
//# sourceMappingURL=ProjectionExpression.js.map

@@ -0,0 +0,0 @@ import { AttributeBearingExpression } from "./AttributeBearingExpression";

@@ -42,22 +42,23 @@ "use strict";

UpdateExpression.prototype.serialize = function (attributes) {
var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
var clauses = [];
var phrases = [];
try {
for (var _a = tslib_1.__values([
for (var _e = tslib_1.__values([
[this.toAdd, 'ADD'],
[this.toDelete, 'DELETE'],
]), _b = _a.next(); !_b.done; _b = _a.next()) {
var _c = tslib_1.__read(_b.value, 2), mapping = _c[0], verb = _c[1];
]), _f = _e.next(); !_f.done; _f = _e.next()) {
var _g = tslib_1.__read(_f.value, 2), mapping = _g[0], verb = _g[1];
try {
for (var _d = tslib_1.__values(mapping.entries()), _e = _d.next(); !_e.done; _e = _d.next()) {
var _f = tslib_1.__read(_e.value, 2), key = _f[0], value = _f[1];
for (var _h = tslib_1.__values(mapping.entries()), _j = _h.next(); !_j.done; _j = _h.next()) {
var _k = tslib_1.__read(_j.value, 2), key = _k[0], value = _k[1];
phrases.push(attributes.addName(key) + " " + attributes.addValue(value));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_e && !_e.done && (_g = _d.return)) _g.call(_d);
if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
}
finally { if (e_1) throw e_1.error; }
finally { if (e_2) throw e_2.error; }
}

@@ -70,12 +71,12 @@ if (phrases.length > 0) {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_h = _a.return)) _h.call(_a);
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_2) throw e_2.error; }
finally { if (e_1) throw e_1.error; }
}
try {
for (var _j = tslib_1.__values(this.toSet.entries()), _k = _j.next(); !_k.done; _k = _j.next()) {
var _l = tslib_1.__read(_k.value, 2), key = _l[0], value = _l[1];
for (var _l = tslib_1.__values(this.toSet.entries()), _m = _l.next(); !_m.done; _m = _l.next()) {
var _o = tslib_1.__read(_m.value, 2), key = _o[0], value = _o[1];
phrases.push(attributes.addName(key) + " = " + (FunctionExpression_1.FunctionExpression.isFunctionExpression(value) || MathematicalExpression_1.MathematicalExpression.isMathematicalExpression(value)

@@ -88,3 +89,3 @@ ? value.serialize(attributes) : attributes.addValue(value)));

try {
if (_k && !_k.done && (_m = _j.return)) _m.call(_j);
if (_m && !_m.done && (_c = _l.return)) _c.call(_l);
}

@@ -98,4 +99,4 @@ finally { if (e_3) throw e_3.error; }

try {
for (var _o = tslib_1.__values(this.toRemove), _p = _o.next(); !_p.done; _p = _o.next()) {
var keyToRemove = _p.value;
for (var _p = tslib_1.__values(this.toRemove), _q = _p.next(); !_q.done; _q = _p.next()) {
var keyToRemove = _q.value;
phrases.push(attributes.addName(keyToRemove));

@@ -107,3 +108,3 @@ }

try {
if (_p && !_p.done && (_q = _o.return)) _q.call(_o);
if (_q && !_q.done && (_d = _p.return)) _d.call(_p);
}

@@ -117,3 +118,2 @@ finally { if (e_4) throw e_4.error; }

return clauses.join(' ');
var e_2, _h, e_1, _g, e_3, _m, e_4, _q;
};

@@ -120,0 +120,0 @@ return UpdateExpression;

{
"name": "@aws/dynamodb-expressions",
"version": "0.5.0",
"version": "0.6.0",
"description": "Composable expression objects for Amazon DynamoDB",

@@ -31,6 +31,6 @@ "keywords": [

"devDependencies": {
"@types/jest": "^22",
"@types/jest": "^23",
"@types/node": "^8.0.4",
"aws-sdk": "^2.7.0",
"jest": "^22",
"jest": "^23",
"typedoc": "^0.11.0",

@@ -43,5 +43,5 @@ "typescript": "^2.7"

"dependencies": {
"@aws/dynamodb-auto-marshaller": "^0.5.0",
"@aws/dynamodb-auto-marshaller": "^0.6.0",
"tslib": "^1.8.1"
}
}

@@ -0,0 +0,0 @@ # Amazon DynamoDB Expressions

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet