@aws-sdk/client-s3 3.477.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDirectoryBuckets = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDirectoryBucketsCommand_1 = require("../commands/ListDirectoryBucketsCommand");
5
6
  const S3Client_1 = require("../S3Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDirectoryBucketsCommand_1.ListDirectoryBucketsCommand(input), ...args);
8
- };
9
- async function* paginateListDirectoryBuckets(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.ContinuationToken = token;
15
- input["MaxDirectoryBuckets"] = config.pageSize;
16
- if (config.client instanceof S3Client_1.S3Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected S3 | S3Client");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.ContinuationToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDirectoryBuckets = paginateListDirectoryBuckets;
7
+ exports.paginateListDirectoryBuckets = (0, core_1.createPaginator)(S3Client_1.S3Client, ListDirectoryBucketsCommand_1.ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListObjectsV2 = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListObjectsV2Command_1 = require("../commands/ListObjectsV2Command");
5
6
  const S3Client_1 = require("../S3Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListObjectsV2Command_1.ListObjectsV2Command(input), ...args);
8
- };
9
- async function* paginateListObjectsV2(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.ContinuationToken = token;
15
- input["MaxKeys"] = config.pageSize;
16
- if (config.client instanceof S3Client_1.S3Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected S3 | S3Client");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextContinuationToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListObjectsV2 = paginateListObjectsV2;
7
+ exports.paginateListObjectsV2 = (0, core_1.createPaginator)(S3Client_1.S3Client, ListObjectsV2Command_1.ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListParts = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPartsCommand_1 = require("../commands/ListPartsCommand");
5
6
  const S3Client_1 = require("../S3Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPartsCommand_1.ListPartsCommand(input), ...args);
8
- };
9
- async function* paginateListParts(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.PartNumberMarker = token;
15
- input["MaxParts"] = config.pageSize;
16
- if (config.client instanceof S3Client_1.S3Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected S3 | S3Client");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextPartNumberMarker;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListParts = paginateListParts;
7
+ exports.paginateListParts = (0, core_1.createPaginator)(S3Client_1.S3Client, ListPartsCommand_1.ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDirectoryBucketsCommand, } from "../commands/ListDirectoryBucketsCommand";
2
3
  import { S3Client } from "../S3Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDirectoryBucketsCommand(input), ...args);
5
- };
6
- export async function* paginateListDirectoryBuckets(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.ContinuationToken = token;
12
- input["MaxDirectoryBuckets"] = config.pageSize;
13
- if (config.client instanceof S3Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected S3 | S3Client");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.ContinuationToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListObjectsV2Command, } from "../commands/ListObjectsV2Command";
2
3
  import { S3Client } from "../S3Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListObjectsV2Command(input), ...args);
5
- };
6
- export async function* paginateListObjectsV2(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.ContinuationToken = token;
12
- input["MaxKeys"] = config.pageSize;
13
- if (config.client instanceof S3Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected S3 | S3Client");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextContinuationToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPartsCommand } from "../commands/ListPartsCommand";
2
3
  import { S3Client } from "../S3Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPartsCommand(input), ...args);
5
- };
6
- export async function* paginateListParts(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.PartNumberMarker = token;
12
- input["MaxParts"] = config.pageSize;
13
- if (config.client instanceof S3Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected S3 | S3Client");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextPartNumberMarker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
@@ -4,4 +4,4 @@ import { S3PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDirectoryBuckets(config: S3PaginationConfiguration, input: ListDirectoryBucketsCommandInput, ...additionalArguments: any): Paginator<ListDirectoryBucketsCommandOutput>;
7
+ export declare const paginateListDirectoryBuckets: (config: S3PaginationConfiguration, input: ListDirectoryBucketsCommandInput, ...rest: any[]) => Paginator<ListDirectoryBucketsCommandOutput>;
@@ -4,4 +4,4 @@ import { S3PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListObjectsV2(config: S3PaginationConfiguration, input: ListObjectsV2CommandInput, ...additionalArguments: any): Paginator<ListObjectsV2CommandOutput>;
7
+ export declare const paginateListObjectsV2: (config: S3PaginationConfiguration, input: ListObjectsV2CommandInput, ...rest: any[]) => Paginator<ListObjectsV2CommandOutput>;
@@ -4,4 +4,4 @@ import { S3PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListParts(config: S3PaginationConfiguration, input: ListPartsCommandInput, ...additionalArguments: any): Paginator<ListPartsCommandOutput>;
7
+ export declare const paginateListParts: (config: S3PaginationConfiguration, input: ListPartsCommandInput, ...rest: any[]) => Paginator<ListPartsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListDirectoryBucketsCommandOutput,
5
5
  } from "../commands/ListDirectoryBucketsCommand";
6
6
  import { S3PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListDirectoryBuckets(
7
+ export declare const paginateListDirectoryBuckets: (
8
8
  config: S3PaginationConfiguration,
9
9
  input: ListDirectoryBucketsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListDirectoryBucketsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListDirectoryBucketsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListObjectsV2CommandOutput,
5
5
  } from "../commands/ListObjectsV2Command";
6
6
  import { S3PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListObjectsV2(
7
+ export declare const paginateListObjectsV2: (
8
8
  config: S3PaginationConfiguration,
9
9
  input: ListObjectsV2CommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListObjectsV2CommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListObjectsV2CommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListPartsCommandOutput,
5
5
  } from "../commands/ListPartsCommand";
6
6
  import { S3PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListParts(
7
+ export declare const paginateListParts: (
8
8
  config: S3PaginationConfiguration,
9
9
  input: ListPartsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListPartsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListPartsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3",
3
3
  "description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
4
- "version": "3.477.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -26,9 +26,9 @@
26
26
  "@aws-crypto/sha1-browser": "3.0.0",
27
27
  "@aws-crypto/sha256-browser": "3.0.0",
28
28
  "@aws-crypto/sha256-js": "3.0.0",
29
- "@aws-sdk/client-sts": "3.477.0",
29
+ "@aws-sdk/client-sts": "3.478.0",
30
30
  "@aws-sdk/core": "3.477.0",
31
- "@aws-sdk/credential-provider-node": "3.477.0",
31
+ "@aws-sdk/credential-provider-node": "3.478.0",
32
32
  "@aws-sdk/middleware-bucket-endpoint": "3.470.0",
33
33
  "@aws-sdk/middleware-expect-continue": "3.468.0",
34
34
  "@aws-sdk/middleware-flexible-checksums": "3.468.0",
@@ -39,11 +39,11 @@
39
39
  "@aws-sdk/middleware-sdk-s3": "3.474.0",
40
40
  "@aws-sdk/middleware-signing": "3.468.0",
41
41
  "@aws-sdk/middleware-ssec": "3.468.0",
42
- "@aws-sdk/middleware-user-agent": "3.470.0",
42
+ "@aws-sdk/middleware-user-agent": "3.478.0",
43
43
  "@aws-sdk/region-config-resolver": "3.470.0",
44
44
  "@aws-sdk/signature-v4-multi-region": "3.474.0",
45
45
  "@aws-sdk/types": "3.468.0",
46
- "@aws-sdk/util-endpoints": "3.470.0",
46
+ "@aws-sdk/util-endpoints": "3.478.0",
47
47
  "@aws-sdk/util-user-agent-browser": "3.468.0",
48
48
  "@aws-sdk/util-user-agent-node": "3.470.0",
49
49
  "@aws-sdk/xml-builder": "3.472.0",