@aws-sdk/lib-dynamodb 3.477.0 → 3.481.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.
@@ -2,14 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateQuery = void 0;
4
4
  const QueryCommand_1 = require("../commands/QueryCommand");
5
- const DynamoDBDocument_1 = require("../DynamoDBDocument");
6
5
  const DynamoDBDocumentClient_1 = require("../DynamoDBDocumentClient");
7
6
  const makePagedClientRequest = async (client, input, ...args) => {
8
7
  return await client.send(new QueryCommand_1.QueryCommand(input), ...args);
9
8
  };
10
- const makePagedRequest = async (client, input, ...args) => {
11
- return await client.query(input, ...args);
12
- };
13
9
  async function* paginateQuery(config, input, ...additionalArguments) {
14
10
  let token = config.startingToken || undefined;
15
11
  let hasNext = true;
@@ -17,10 +13,7 @@ async function* paginateQuery(config, input, ...additionalArguments) {
17
13
  while (hasNext) {
18
14
  input.ExclusiveStartKey = token;
19
15
  input["Limit"] = config.pageSize;
20
- if (config.client instanceof DynamoDBDocument_1.DynamoDBDocument) {
21
- page = await makePagedRequest(config.client, input, ...additionalArguments);
22
- }
23
- else if (config.client instanceof DynamoDBDocumentClient_1.DynamoDBDocumentClient) {
16
+ if (config.client instanceof DynamoDBDocumentClient_1.DynamoDBDocumentClient) {
24
17
  page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
18
  }
26
19
  else {
@@ -2,14 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateScan = void 0;
4
4
  const ScanCommand_1 = require("../commands/ScanCommand");
5
- const DynamoDBDocument_1 = require("../DynamoDBDocument");
6
5
  const DynamoDBDocumentClient_1 = require("../DynamoDBDocumentClient");
7
6
  const makePagedClientRequest = async (client, input, ...args) => {
8
7
  return await client.send(new ScanCommand_1.ScanCommand(input), ...args);
9
8
  };
10
- const makePagedRequest = async (client, input, ...args) => {
11
- return await client.scan(input, ...args);
12
- };
13
9
  async function* paginateScan(config, input, ...additionalArguments) {
14
10
  let token = config.startingToken || undefined;
15
11
  let hasNext = true;
@@ -17,10 +13,7 @@ async function* paginateScan(config, input, ...additionalArguments) {
17
13
  while (hasNext) {
18
14
  input.ExclusiveStartKey = token;
19
15
  input["Limit"] = config.pageSize;
20
- if (config.client instanceof DynamoDBDocument_1.DynamoDBDocument) {
21
- page = await makePagedRequest(config.client, input, ...additionalArguments);
22
- }
23
- else if (config.client instanceof DynamoDBDocumentClient_1.DynamoDBDocumentClient) {
16
+ if (config.client instanceof DynamoDBDocumentClient_1.DynamoDBDocumentClient) {
24
17
  page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
18
  }
26
19
  else {
@@ -1,12 +1,8 @@
1
1
  import { QueryCommand } from "../commands/QueryCommand";
2
- import { DynamoDBDocument } from "../DynamoDBDocument";
3
2
  import { DynamoDBDocumentClient } from "../DynamoDBDocumentClient";
4
3
  const makePagedClientRequest = async (client, input, ...args) => {
5
4
  return await client.send(new QueryCommand(input), ...args);
6
5
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.query(input, ...args);
9
- };
10
6
  export async function* paginateQuery(config, input, ...additionalArguments) {
11
7
  let token = config.startingToken || undefined;
12
8
  let hasNext = true;
@@ -14,10 +10,7 @@ export async function* paginateQuery(config, input, ...additionalArguments) {
14
10
  while (hasNext) {
15
11
  input.ExclusiveStartKey = token;
16
12
  input["Limit"] = config.pageSize;
17
- if (config.client instanceof DynamoDBDocument) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof DynamoDBDocumentClient) {
13
+ if (config.client instanceof DynamoDBDocumentClient) {
21
14
  page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
15
  }
23
16
  else {
@@ -1,12 +1,8 @@
1
1
  import { ScanCommand } from "../commands/ScanCommand";
2
- import { DynamoDBDocument } from "../DynamoDBDocument";
3
2
  import { DynamoDBDocumentClient } from "../DynamoDBDocumentClient";
4
3
  const makePagedClientRequest = async (client, input, ...args) => {
5
4
  return await client.send(new ScanCommand(input), ...args);
6
5
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.scan(input, ...args);
9
- };
10
6
  export async function* paginateScan(config, input, ...additionalArguments) {
11
7
  let token = config.startingToken || undefined;
12
8
  let hasNext = true;
@@ -14,10 +10,7 @@ export async function* paginateScan(config, input, ...additionalArguments) {
14
10
  while (hasNext) {
15
11
  input.ExclusiveStartKey = token;
16
12
  input["Limit"] = config.pageSize;
17
- if (config.client instanceof DynamoDBDocument) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof DynamoDBDocumentClient) {
13
+ if (config.client instanceof DynamoDBDocumentClient) {
21
14
  page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
15
  }
23
16
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/lib-dynamodb",
3
- "version": "3.477.0",
3
+ "version": "3.481.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",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/util-dynamodb": "3.477.0",
30
- "@smithy/smithy-client": "^2.1.18",
29
+ "@aws-sdk/util-dynamodb": "3.481.0",
30
+ "@smithy/smithy-client": "^2.2.0",
31
31
  "@smithy/types": "^2.7.0",
32
32
  "tslib": "^2.5.0"
33
33
  },
@@ -35,7 +35,7 @@
35
35
  "@aws-sdk/client-dynamodb": "^3.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@aws-sdk/client-dynamodb": "3.477.0",
38
+ "@aws-sdk/client-dynamodb": "3.481.0",
39
39
  "@tsconfig/recommended": "1.0.1",
40
40
  "@types/node": "^14.14.31",
41
41
  "concurrently": "7.0.0",