@aws-sdk/client-s3 3.645.0 → 3.650.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.
@@ -4,11 +4,30 @@ exports.defaultEndpointResolver = void 0;
4
4
  const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
5
  const util_endpoints_2 = require("@smithy/util-endpoints");
6
6
  const ruleset_1 = require("./ruleset");
7
+ const cache = new util_endpoints_2.EndpointCache({
8
+ size: 50,
9
+ params: [
10
+ "Accelerate",
11
+ "Bucket",
12
+ "DisableAccessPoints",
13
+ "DisableMultiRegionAccessPoints",
14
+ "DisableS3ExpressSessionAuth",
15
+ "Endpoint",
16
+ "ForcePathStyle",
17
+ "Region",
18
+ "UseArnRegion",
19
+ "UseDualStack",
20
+ "UseFIPS",
21
+ "UseGlobalEndpoint",
22
+ "UseObjectLambdaEndpoint",
23
+ "UseS3ExpressControlEndpoint",
24
+ ],
25
+ });
7
26
  const defaultEndpointResolver = (endpointParams, context = {}) => {
8
- return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
27
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
9
28
  endpointParams: endpointParams,
10
29
  logger: context.logger,
11
- });
30
+ }));
12
31
  };
13
32
  exports.defaultEndpointResolver = defaultEndpointResolver;
14
33
  util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
package/dist-cjs/index.js CHANGED
@@ -9663,9 +9663,7 @@ var import_middleware_sdk_s345 = require("@aws-sdk/middleware-sdk-s3");
9663
9663
 
9664
9664
 
9665
9665
 
9666
- var _ListBucketsCommand = class _ListBucketsCommand extends import_smithy_client.Command.classBuilder().ep({
9667
- ...commonParams
9668
- }).m(function(Command, cs, config, o) {
9666
+ var _ListBucketsCommand = class _ListBucketsCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
9669
9667
  return [
9670
9668
  (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
9671
9669
  (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
@@ -7,9 +7,7 @@ import { de_ListBucketsCommand, se_ListBucketsCommand } from "../protocols/Aws_r
7
7
  export { $Command };
8
8
  export class ListBucketsCommand extends $Command
9
9
  .classBuilder()
10
- .ep({
11
- ...commonParams,
12
- })
10
+ .ep(commonParams)
13
11
  .m(function (Command, cs, config, o) {
14
12
  return [
15
13
  getSerdePlugin(config, this.serialize, this.deserialize),
@@ -1,10 +1,29 @@
1
1
  import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
- import { customEndpointFunctions, resolveEndpoint } from "@smithy/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
3
  import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: [
7
+ "Accelerate",
8
+ "Bucket",
9
+ "DisableAccessPoints",
10
+ "DisableMultiRegionAccessPoints",
11
+ "DisableS3ExpressSessionAuth",
12
+ "Endpoint",
13
+ "ForcePathStyle",
14
+ "Region",
15
+ "UseArnRegion",
16
+ "UseDualStack",
17
+ "UseFIPS",
18
+ "UseGlobalEndpoint",
19
+ "UseObjectLambdaEndpoint",
20
+ "UseS3ExpressControlEndpoint",
21
+ ],
22
+ });
4
23
  export const defaultEndpointResolver = (endpointParams, context = {}) => {
5
- return resolveEndpoint(ruleSet, {
24
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
6
25
  endpointParams: endpointParams,
7
26
  logger: context.logger,
8
- });
27
+ }));
9
28
  };
10
29
  customEndpointFunctions.aws = awsEndpointFunctions;
@@ -23,6 +23,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
23
23
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
24
24
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
25
25
  apiVersion: string;
26
+ cacheMiddleware?: boolean | undefined;
26
27
  urlParser: import("@smithy/types").UrlParser;
27
28
  base64Decoder: import("@smithy/types").Decoder;
28
29
  base64Encoder: (_input: string | Uint8Array) => string;
@@ -43,6 +44,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
43
44
  logger?: import("@smithy/types").Logger | undefined;
44
45
  }) => import("@smithy/types").EndpointV2;
45
46
  tls?: boolean | undefined;
47
+ serviceConfiguredEndpoint?: undefined;
46
48
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
47
49
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
48
50
  credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
27
27
  useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
28
28
  useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
29
29
  apiVersion: string;
30
+ cacheMiddleware?: boolean | undefined;
30
31
  urlParser: import("@aws-sdk/types").UrlParser;
31
32
  base64Decoder: import("@aws-sdk/types").Decoder;
32
33
  base64Encoder: (_input: string | Uint8Array) => string;
@@ -46,6 +47,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
46
47
  logger?: import("@aws-sdk/types").Logger | undefined;
47
48
  }) => import("@aws-sdk/types").EndpointV2;
48
49
  tls?: boolean | undefined;
50
+ serviceConfiguredEndpoint?: undefined;
49
51
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
50
52
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
51
53
  credentials?: import("@aws-sdk/types").AwsCredentialIdentity | import("@aws-sdk/types").AwsCredentialIdentityProvider | undefined;
@@ -8,6 +8,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
8
8
  sha256: import("@smithy/types").HashConstructor;
9
9
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
10
10
  apiVersion: string;
11
+ cacheMiddleware?: boolean | undefined;
11
12
  urlParser: import("@smithy/types").UrlParser;
12
13
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
13
14
  streamCollector: import("@smithy/types").StreamCollector;
@@ -42,6 +43,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
42
43
  logger?: import("@smithy/types").Logger | undefined;
43
44
  }) => import("@smithy/types").EndpointV2;
44
45
  tls?: boolean | undefined;
46
+ serviceConfiguredEndpoint?: undefined;
45
47
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
46
48
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
47
49
  credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
29
29
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
30
30
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
31
31
  apiVersion: string;
32
+ cacheMiddleware?: boolean | undefined;
32
33
  urlParser: import("@smithy/types").UrlParser;
33
34
  base64Decoder: import("@smithy/types").Decoder;
34
35
  base64Encoder: (_input: string | Uint8Array) => string;
@@ -75,6 +76,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
75
76
  }
76
77
  ) => import("@smithy/types").EndpointV2;
77
78
  tls?: boolean | undefined;
79
+ serviceConfiguredEndpoint?: undefined;
78
80
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
79
81
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
80
82
  credentials?:
@@ -41,6 +41,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
41
41
  useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
42
42
  useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
43
43
  apiVersion: string;
44
+ cacheMiddleware?: boolean | undefined;
44
45
  urlParser: import("@aws-sdk/types").UrlParser;
45
46
  base64Decoder: import("@aws-sdk/types").Decoder;
46
47
  base64Encoder: (_input: string | Uint8Array) => string;
@@ -88,6 +89,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
88
89
  }
89
90
  ) => import("@aws-sdk/types").EndpointV2;
90
91
  tls?: boolean | undefined;
92
+ serviceConfiguredEndpoint?: undefined;
91
93
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
92
94
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
93
95
  credentials?:
@@ -9,6 +9,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
9
9
  | import("@smithy/protocol-http").HttpHandler<any>
10
10
  | import("@smithy/fetch-http-handler").FetchHttpHandler;
11
11
  apiVersion: string;
12
+ cacheMiddleware?: boolean | undefined;
12
13
  urlParser: import("@smithy/types").UrlParser;
13
14
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
14
15
  streamCollector: import("@smithy/types").StreamCollector;
@@ -69,6 +70,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
69
70
  }
70
71
  ) => import("@smithy/types").EndpointV2;
71
72
  tls?: boolean | undefined;
73
+ serviceConfiguredEndpoint?: undefined;
72
74
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
73
75
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3HttpAuthSchemeProvider;
74
76
  credentials?:
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.645.0",
4
+ "version": "3.650.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-s3",
@@ -26,64 +26,64 @@
26
26
  "@aws-crypto/sha1-browser": "5.2.0",
27
27
  "@aws-crypto/sha256-browser": "5.2.0",
28
28
  "@aws-crypto/sha256-js": "5.2.0",
29
- "@aws-sdk/client-sso-oidc": "3.645.0",
30
- "@aws-sdk/client-sts": "3.645.0",
31
- "@aws-sdk/core": "3.635.0",
32
- "@aws-sdk/credential-provider-node": "3.645.0",
33
- "@aws-sdk/middleware-bucket-endpoint": "3.620.0",
34
- "@aws-sdk/middleware-expect-continue": "3.620.0",
35
- "@aws-sdk/middleware-flexible-checksums": "3.620.0",
36
- "@aws-sdk/middleware-host-header": "3.620.0",
37
- "@aws-sdk/middleware-location-constraint": "3.609.0",
38
- "@aws-sdk/middleware-logger": "3.609.0",
39
- "@aws-sdk/middleware-recursion-detection": "3.620.0",
40
- "@aws-sdk/middleware-sdk-s3": "3.635.0",
41
- "@aws-sdk/middleware-ssec": "3.609.0",
42
- "@aws-sdk/middleware-user-agent": "3.645.0",
43
- "@aws-sdk/region-config-resolver": "3.614.0",
44
- "@aws-sdk/signature-v4-multi-region": "3.635.0",
45
- "@aws-sdk/types": "3.609.0",
46
- "@aws-sdk/util-endpoints": "3.645.0",
47
- "@aws-sdk/util-user-agent-browser": "3.609.0",
48
- "@aws-sdk/util-user-agent-node": "3.614.0",
49
- "@aws-sdk/xml-builder": "3.609.0",
50
- "@smithy/config-resolver": "^3.0.5",
51
- "@smithy/core": "^2.4.0",
52
- "@smithy/eventstream-serde-browser": "^3.0.6",
53
- "@smithy/eventstream-serde-config-resolver": "^3.0.3",
54
- "@smithy/eventstream-serde-node": "^3.0.5",
55
- "@smithy/fetch-http-handler": "^3.2.4",
56
- "@smithy/hash-blob-browser": "^3.1.2",
57
- "@smithy/hash-node": "^3.0.3",
58
- "@smithy/hash-stream-node": "^3.1.2",
59
- "@smithy/invalid-dependency": "^3.0.3",
60
- "@smithy/md5-js": "^3.0.3",
61
- "@smithy/middleware-content-length": "^3.0.5",
62
- "@smithy/middleware-endpoint": "^3.1.0",
63
- "@smithy/middleware-retry": "^3.0.15",
64
- "@smithy/middleware-serde": "^3.0.3",
65
- "@smithy/middleware-stack": "^3.0.3",
66
- "@smithy/node-config-provider": "^3.1.4",
67
- "@smithy/node-http-handler": "^3.1.4",
68
- "@smithy/protocol-http": "^4.1.0",
69
- "@smithy/smithy-client": "^3.2.0",
70
- "@smithy/types": "^3.3.0",
71
- "@smithy/url-parser": "^3.0.3",
29
+ "@aws-sdk/client-sso-oidc": "3.650.0",
30
+ "@aws-sdk/client-sts": "3.650.0",
31
+ "@aws-sdk/core": "3.649.0",
32
+ "@aws-sdk/credential-provider-node": "3.650.0",
33
+ "@aws-sdk/middleware-bucket-endpoint": "3.649.0",
34
+ "@aws-sdk/middleware-expect-continue": "3.649.0",
35
+ "@aws-sdk/middleware-flexible-checksums": "3.649.0",
36
+ "@aws-sdk/middleware-host-header": "3.649.0",
37
+ "@aws-sdk/middleware-location-constraint": "3.649.0",
38
+ "@aws-sdk/middleware-logger": "3.649.0",
39
+ "@aws-sdk/middleware-recursion-detection": "3.649.0",
40
+ "@aws-sdk/middleware-sdk-s3": "3.649.0",
41
+ "@aws-sdk/middleware-ssec": "3.649.0",
42
+ "@aws-sdk/middleware-user-agent": "3.649.0",
43
+ "@aws-sdk/region-config-resolver": "3.649.0",
44
+ "@aws-sdk/signature-v4-multi-region": "3.649.0",
45
+ "@aws-sdk/types": "3.649.0",
46
+ "@aws-sdk/util-endpoints": "3.649.0",
47
+ "@aws-sdk/util-user-agent-browser": "3.649.0",
48
+ "@aws-sdk/util-user-agent-node": "3.649.0",
49
+ "@aws-sdk/xml-builder": "3.649.0",
50
+ "@smithy/config-resolver": "^3.0.6",
51
+ "@smithy/core": "^2.4.1",
52
+ "@smithy/eventstream-serde-browser": "^3.0.7",
53
+ "@smithy/eventstream-serde-config-resolver": "^3.0.4",
54
+ "@smithy/eventstream-serde-node": "^3.0.6",
55
+ "@smithy/fetch-http-handler": "^3.2.5",
56
+ "@smithy/hash-blob-browser": "^3.1.3",
57
+ "@smithy/hash-node": "^3.0.4",
58
+ "@smithy/hash-stream-node": "^3.1.3",
59
+ "@smithy/invalid-dependency": "^3.0.4",
60
+ "@smithy/md5-js": "^3.0.4",
61
+ "@smithy/middleware-content-length": "^3.0.6",
62
+ "@smithy/middleware-endpoint": "^3.1.1",
63
+ "@smithy/middleware-retry": "^3.0.16",
64
+ "@smithy/middleware-serde": "^3.0.4",
65
+ "@smithy/middleware-stack": "^3.0.4",
66
+ "@smithy/node-config-provider": "^3.1.5",
67
+ "@smithy/node-http-handler": "^3.2.0",
68
+ "@smithy/protocol-http": "^4.1.1",
69
+ "@smithy/smithy-client": "^3.3.0",
70
+ "@smithy/types": "^3.4.0",
71
+ "@smithy/url-parser": "^3.0.4",
72
72
  "@smithy/util-base64": "^3.0.0",
73
73
  "@smithy/util-body-length-browser": "^3.0.0",
74
74
  "@smithy/util-body-length-node": "^3.0.0",
75
- "@smithy/util-defaults-mode-browser": "^3.0.15",
76
- "@smithy/util-defaults-mode-node": "^3.0.15",
77
- "@smithy/util-endpoints": "^2.0.5",
78
- "@smithy/util-middleware": "^3.0.3",
79
- "@smithy/util-retry": "^3.0.3",
80
- "@smithy/util-stream": "^3.1.3",
75
+ "@smithy/util-defaults-mode-browser": "^3.0.16",
76
+ "@smithy/util-defaults-mode-node": "^3.0.16",
77
+ "@smithy/util-endpoints": "^2.1.0",
78
+ "@smithy/util-middleware": "^3.0.4",
79
+ "@smithy/util-retry": "^3.0.4",
80
+ "@smithy/util-stream": "^3.1.4",
81
81
  "@smithy/util-utf8": "^3.0.0",
82
- "@smithy/util-waiter": "^3.1.2",
82
+ "@smithy/util-waiter": "^3.1.3",
83
83
  "tslib": "^2.6.2"
84
84
  },
85
85
  "devDependencies": {
86
- "@aws-sdk/signature-v4-crt": "3.635.0",
86
+ "@aws-sdk/signature-v4-crt": "3.649.0",
87
87
  "@tsconfig/node16": "16.1.3",
88
88
  "@types/chai": "^4.2.11",
89
89
  "@types/mocha": "^8.0.4",