@aws-sdk/lib-dynamodb 3.1068.0 → 3.1069.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +29 -30
- package/package.json +8 -8
package/dist-cjs/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const { Command, Client } = require("@smithy/core/client");
|
|
2
|
+
exports.$Command = Command;
|
|
3
|
+
exports.__Client = Client;
|
|
4
|
+
const { setFeature } = require("@aws-sdk/core/client");
|
|
5
|
+
const { marshall, unmarshall } = require("@aws-sdk/util-dynamodb");
|
|
6
|
+
const { NumberValueImpl: NumberValue } = require("@aws-sdk/util-dynamodb");
|
|
7
|
+
exports.NumberValue = NumberValue;
|
|
8
|
+
const { BatchExecuteStatementCommand: BatchExecuteStatementCommand$1, BatchGetItemCommand, BatchWriteItemCommand, DeleteItemCommand, ExecuteStatementCommand: ExecuteStatementCommand$1, ExecuteTransactionCommand: ExecuteTransactionCommand$1, GetItemCommand, PutItemCommand, QueryCommand: QueryCommand$1, ScanCommand: ScanCommand$1, TransactGetItemsCommand, TransactWriteItemsCommand, UpdateItemCommand } = require("@aws-sdk/client-dynamodb");
|
|
9
|
+
const { createPaginator } = require("@smithy/core");
|
|
8
10
|
|
|
9
11
|
const SELF = null;
|
|
10
12
|
const ALL_VALUES = {};
|
|
@@ -78,21 +80,21 @@ const processAllKeysInObj = (obj, processFunc, keyNodes) => {
|
|
|
78
80
|
}, {});
|
|
79
81
|
};
|
|
80
82
|
const marshallInput = (obj, keyNodes, options) => {
|
|
81
|
-
const marshallFunc = (toMarshall) =>
|
|
83
|
+
const marshallFunc = (toMarshall) => marshall(toMarshall, options);
|
|
82
84
|
return processKeysInObj(obj, marshallFunc, keyNodes);
|
|
83
85
|
};
|
|
84
86
|
const unmarshallOutput = (obj, keyNodes, options) => {
|
|
85
|
-
const unmarshallFunc = (toMarshall) =>
|
|
87
|
+
const unmarshallFunc = (toMarshall) => unmarshall(toMarshall, options);
|
|
86
88
|
return processKeysInObj(obj, unmarshallFunc, keyNodes);
|
|
87
89
|
};
|
|
88
90
|
|
|
89
|
-
class DynamoDBDocumentClientCommand extends
|
|
91
|
+
class DynamoDBDocumentClientCommand extends Command {
|
|
90
92
|
addMarshallingMiddleware(configuration) {
|
|
91
93
|
const { marshallOptions = {}, unmarshallOptions = {} } = configuration.translateConfig || {};
|
|
92
94
|
marshallOptions.convertTopLevelContainer = marshallOptions.convertTopLevelContainer ?? true;
|
|
93
95
|
unmarshallOptions.convertWithoutMapWrapper = unmarshallOptions.convertWithoutMapWrapper ?? true;
|
|
94
96
|
this.clientCommand.middlewareStack.addRelativeTo((next, context) => async (args) => {
|
|
95
|
-
|
|
97
|
+
setFeature(context, "DDB_MAPPER", "d");
|
|
96
98
|
return next({
|
|
97
99
|
...args,
|
|
98
100
|
input: marshallInput(args.input, this.inputKeyNodes, marshallOptions),
|
|
@@ -140,7 +142,7 @@ class BatchExecuteStatementCommand extends DynamoDBDocumentClientCommand {
|
|
|
140
142
|
constructor(input) {
|
|
141
143
|
super();
|
|
142
144
|
this.input = input;
|
|
143
|
-
this.clientCommand = new
|
|
145
|
+
this.clientCommand = new BatchExecuteStatementCommand$1(this.input);
|
|
144
146
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
145
147
|
}
|
|
146
148
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -181,7 +183,7 @@ class BatchGetCommand extends DynamoDBDocumentClientCommand {
|
|
|
181
183
|
constructor(input) {
|
|
182
184
|
super();
|
|
183
185
|
this.input = input;
|
|
184
|
-
this.clientCommand = new
|
|
186
|
+
this.clientCommand = new BatchGetItemCommand(this.input);
|
|
185
187
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
186
188
|
}
|
|
187
189
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -234,7 +236,7 @@ class BatchWriteCommand extends DynamoDBDocumentClientCommand {
|
|
|
234
236
|
constructor(input) {
|
|
235
237
|
super();
|
|
236
238
|
this.input = input;
|
|
237
|
-
this.clientCommand = new
|
|
239
|
+
this.clientCommand = new BatchWriteItemCommand(this.input);
|
|
238
240
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
239
241
|
}
|
|
240
242
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -268,7 +270,7 @@ class DeleteCommand extends DynamoDBDocumentClientCommand {
|
|
|
268
270
|
constructor(input) {
|
|
269
271
|
super();
|
|
270
272
|
this.input = input;
|
|
271
|
-
this.clientCommand = new
|
|
273
|
+
this.clientCommand = new DeleteItemCommand(this.input);
|
|
272
274
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
273
275
|
}
|
|
274
276
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -295,7 +297,7 @@ class ExecuteStatementCommand extends DynamoDBDocumentClientCommand {
|
|
|
295
297
|
constructor(input) {
|
|
296
298
|
super();
|
|
297
299
|
this.input = input;
|
|
298
|
-
this.clientCommand = new
|
|
300
|
+
this.clientCommand = new ExecuteStatementCommand$1(this.input);
|
|
299
301
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
300
302
|
}
|
|
301
303
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -327,7 +329,7 @@ class ExecuteTransactionCommand extends DynamoDBDocumentClientCommand {
|
|
|
327
329
|
constructor(input) {
|
|
328
330
|
super();
|
|
329
331
|
this.input = input;
|
|
330
|
-
this.clientCommand = new
|
|
332
|
+
this.clientCommand = new ExecuteTransactionCommand$1(this.input);
|
|
331
333
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
332
334
|
}
|
|
333
335
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -351,7 +353,7 @@ class GetCommand extends DynamoDBDocumentClientCommand {
|
|
|
351
353
|
constructor(input) {
|
|
352
354
|
super();
|
|
353
355
|
this.input = input;
|
|
354
|
-
this.clientCommand = new
|
|
356
|
+
this.clientCommand = new GetItemCommand(this.input);
|
|
355
357
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
356
358
|
}
|
|
357
359
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -385,7 +387,7 @@ class PutCommand extends DynamoDBDocumentClientCommand {
|
|
|
385
387
|
constructor(input) {
|
|
386
388
|
super();
|
|
387
389
|
this.input = input;
|
|
388
|
-
this.clientCommand = new
|
|
390
|
+
this.clientCommand = new PutItemCommand(this.input);
|
|
389
391
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
390
392
|
}
|
|
391
393
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -423,7 +425,7 @@ class QueryCommand extends DynamoDBDocumentClientCommand {
|
|
|
423
425
|
constructor(input) {
|
|
424
426
|
super();
|
|
425
427
|
this.input = input;
|
|
426
|
-
this.clientCommand = new
|
|
428
|
+
this.clientCommand = new QueryCommand$1(this.input);
|
|
427
429
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
428
430
|
}
|
|
429
431
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -456,7 +458,7 @@ class ScanCommand extends DynamoDBDocumentClientCommand {
|
|
|
456
458
|
constructor(input) {
|
|
457
459
|
super();
|
|
458
460
|
this.input = input;
|
|
459
|
-
this.clientCommand = new
|
|
461
|
+
this.clientCommand = new ScanCommand$1(this.input);
|
|
460
462
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
461
463
|
}
|
|
462
464
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -490,7 +492,7 @@ class TransactGetCommand extends DynamoDBDocumentClientCommand {
|
|
|
490
492
|
constructor(input) {
|
|
491
493
|
super();
|
|
492
494
|
this.input = input;
|
|
493
|
-
this.clientCommand = new
|
|
495
|
+
this.clientCommand = new TransactGetItemsCommand(this.input);
|
|
494
496
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
495
497
|
}
|
|
496
498
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -539,7 +541,7 @@ class TransactWriteCommand extends DynamoDBDocumentClientCommand {
|
|
|
539
541
|
constructor(input) {
|
|
540
542
|
super();
|
|
541
543
|
this.input = input;
|
|
542
|
-
this.clientCommand = new
|
|
544
|
+
this.clientCommand = new TransactWriteItemsCommand(this.input);
|
|
543
545
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
544
546
|
}
|
|
545
547
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -578,7 +580,7 @@ class UpdateCommand extends DynamoDBDocumentClientCommand {
|
|
|
578
580
|
constructor(input) {
|
|
579
581
|
super();
|
|
580
582
|
this.input = input;
|
|
581
|
-
this.clientCommand = new
|
|
583
|
+
this.clientCommand = new UpdateItemCommand(this.input);
|
|
582
584
|
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
583
585
|
}
|
|
584
586
|
resolveMiddleware(clientStack, configuration, options) {
|
|
@@ -589,7 +591,7 @@ class UpdateCommand extends DynamoDBDocumentClientCommand {
|
|
|
589
591
|
}
|
|
590
592
|
}
|
|
591
593
|
|
|
592
|
-
class DynamoDBDocumentClient extends
|
|
594
|
+
class DynamoDBDocumentClient extends Client {
|
|
593
595
|
config;
|
|
594
596
|
constructor(client, translateConfig) {
|
|
595
597
|
super(client.config);
|
|
@@ -608,9 +610,9 @@ class DynamoDBDocumentClient extends client.Client {
|
|
|
608
610
|
}
|
|
609
611
|
}
|
|
610
612
|
|
|
611
|
-
const paginateQuery =
|
|
613
|
+
const paginateQuery = createPaginator(DynamoDBDocumentClient, QueryCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
|
|
612
614
|
|
|
613
|
-
const paginateScan =
|
|
615
|
+
const paginateScan = createPaginator(DynamoDBDocumentClient, ScanCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
|
|
614
616
|
|
|
615
617
|
class DynamoDBDocument extends DynamoDBDocumentClient {
|
|
616
618
|
static from(client, translateConfig) {
|
|
@@ -813,9 +815,6 @@ class DynamoDBDocument extends DynamoDBDocumentClient {
|
|
|
813
815
|
}
|
|
814
816
|
}
|
|
815
817
|
|
|
816
|
-
exports.$Command = client.Command;
|
|
817
|
-
exports.__Client = client.Client;
|
|
818
|
-
exports.NumberValue = utilDynamodb.NumberValueImpl;
|
|
819
818
|
exports.BatchExecuteStatementCommand = BatchExecuteStatementCommand;
|
|
820
819
|
exports.BatchGetCommand = BatchGetCommand;
|
|
821
820
|
exports.BatchWriteCommand = BatchWriteCommand;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/lib-dynamodb",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1069.0",
|
|
4
4
|
"description": "The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values.",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
10
10
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
11
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
11
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
12
12
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
13
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
13
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
14
14
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
15
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
15
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
16
16
|
"extract:docs": "api-extractor run --local",
|
|
17
17
|
"test": "yarn g:vitest run",
|
|
18
18
|
"test:watch": "yarn g:vitest watch",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@aws-sdk/core": "^3.974.
|
|
34
|
-
"@aws-sdk/util-dynamodb": "^3.996.
|
|
33
|
+
"@aws-sdk/core": "^3.974.21",
|
|
34
|
+
"@aws-sdk/util-dynamodb": "^3.996.5",
|
|
35
35
|
"@smithy/core": "^3.24.6",
|
|
36
36
|
"@smithy/types": "^4.14.3",
|
|
37
37
|
"tslib": "^2.6.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
40
|
+
"@aws-sdk/client-dynamodb": "^3.1069.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@aws-sdk/client-dynamodb": "3.
|
|
43
|
+
"@aws-sdk/client-dynamodb": "3.1069.0",
|
|
44
44
|
"@tsconfig/recommended": "1.0.1",
|
|
45
45
|
"@types/node": "^20.14.8",
|
|
46
46
|
"concurrently": "7.0.0",
|