@aws-sdk/client-s3-control 3.1075.0 → 3.1077.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,7 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
- import { blobHasher as streamHasher, Md5 } from "@smithy/core/checksum";
3
+ import { blobHasher as streamHasher } from "@smithy/core/checksum";
5
4
  import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
6
5
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
7
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
@@ -21,11 +20,9 @@ export const getRuntimeConfig = (config) => {
21
20
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
22
21
  defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
22
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
24
- md5: config?.md5 ?? Md5,
25
23
  region: config?.region ?? invalidProvider("Region is missing"),
26
24
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
25
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
28
- sha256: config?.sha256 ?? Sha256,
29
26
  streamCollector: config?.streamCollector ?? streamCollector,
30
27
  streamHasher: config?.streamHasher ?? streamHasher,
31
28
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
@@ -7,7 +7,7 @@ import { fileStreamHasher as streamHasher } from "@smithy/core/checksum";
7
7
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
8
8
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
9
9
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
10
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
10
+ import { calculateBodyLength } from "@smithy/core/serde";
11
11
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
13
  export const getRuntimeConfig = (config) => {
@@ -30,7 +30,6 @@ export const getRuntimeConfig = (config) => {
30
30
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
31
31
  defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
32
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
33
- md5: config?.md5 ?? Hash.bind(null, "md5"),
34
33
  region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
35
34
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
36
35
  retryMode: config?.retryMode ??
@@ -38,7 +37,6 @@ export const getRuntimeConfig = (config) => {
38
37
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
38
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
40
39
  }, config),
41
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
40
  streamCollector: config?.streamCollector ?? streamCollector,
43
41
  streamHasher: config?.streamHasher ?? streamHasher,
44
42
  useArnRegion: config?.useArnRegion ?? loadNodeConfig(NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
2
  export const getRuntimeConfig = (config) => {
4
3
  const browserDefaults = getBrowserRuntimeConfig(config);
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
6
5
  ...browserDefaults,
7
6
  ...config,
8
7
  runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
8
  };
11
9
  };
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsRestXmlProtocol } from "@aws-sdk/core/protocols";
3
+ import { Md5, Sha256 } from "@smithy/core/checksum";
3
4
  import { NoOpLogger } from "@smithy/core/client";
4
5
  import { parseUrl } from "@smithy/core/protocols";
5
6
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -23,6 +24,7 @@ export const getRuntimeConfig = (config) => {
23
24
  },
24
25
  ],
25
26
  logger: config?.logger ?? new NoOpLogger(),
27
+ md5: config?.md5 ?? Md5,
26
28
  protocol: config?.protocol ?? AwsRestXmlProtocol,
27
29
  protocolSettings: config?.protocolSettings ?? {
28
30
  defaultNamespace: "com.amazonaws.s3control",
@@ -32,6 +34,7 @@ export const getRuntimeConfig = (config) => {
32
34
  serviceTarget: "AWSS3ControlServiceV20180820",
33
35
  },
34
36
  serviceId: config?.serviceId ?? "S3 Control",
37
+ sha256: config?.sha256 ?? Sha256,
35
38
  signingEscapePath: config?.signingEscapePath ?? false,
36
39
  urlParser: config?.urlParser ?? parseUrl,
37
40
  useArnRegion: config?.useArnRegion ?? undefined,
@@ -10,12 +10,10 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
10
10
  credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((_: unknown) => () => Promise<import("@smithy/types").AwsCredentialIdentity>);
11
11
  defaultUserAgentProvider: (config?: import("@aws-sdk/core/client").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
12
12
  maxAttempts: number | import("@smithy/types").Provider<number>;
13
- md5: import("@smithy/types").HashConstructor;
14
13
  region: string | import("@smithy/types").Provider<any>;
15
14
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
16
15
  retryMode: string | import("@smithy/types").Provider<string>;
17
- sha256: import("@smithy/types").HashConstructor;
18
- streamCollector: import("@smithy/types").StreamCollector;
16
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
17
  streamHasher: import("@smithy/types").StreamHasher<import("stream").Readable> | import("@smithy/types").StreamHasher<Blob>;
20
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
21
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
@@ -26,6 +24,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
26
24
  [setting: string]: unknown;
27
25
  };
28
26
  apiVersion: string;
27
+ sha256: import("@smithy/types").HashConstructor;
29
28
  urlParser: import("@smithy/types").UrlParser;
30
29
  base64Decoder: import("@smithy/types").Decoder;
31
30
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -37,6 +36,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
37
36
  useArnRegion: boolean | undefined | import("@smithy/types").Provider<boolean | undefined>;
38
37
  logger: import("@smithy/types").Logger;
39
38
  extensions: import("./runtimeExtensions").RuntimeExtension[];
39
+ md5: import("@smithy/types").HashConstructor;
40
40
  customUserAgent?: string | import("@smithy/types").UserAgent;
41
41
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
42
42
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
@@ -11,12 +11,10 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
11
11
  credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
12
12
  defaultUserAgentProvider: (config?: import("@aws-sdk/core/client").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
13
13
  maxAttempts: number | import("@smithy/types").Provider<number>;
14
- md5: import("@smithy/types").HashConstructor;
15
14
  region: string | import("@smithy/types").Provider<string>;
16
15
  requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
17
16
  retryMode: string | import("@smithy/types").Provider<string>;
18
- sha256: import("@smithy/types").HashConstructor;
19
- streamCollector: import("@smithy/types").StreamCollector;
17
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
20
18
  streamHasher: import("@smithy/types").StreamHasher<import("stream").Readable> | import("@smithy/types").StreamHasher<Blob>;
21
19
  useArnRegion: boolean | import("@smithy/types").Provider<boolean | undefined>;
22
20
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
@@ -29,6 +27,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
29
27
  [setting: string]: unknown;
30
28
  };
31
29
  apiVersion: string;
30
+ sha256: import("@smithy/types").HashConstructor;
32
31
  urlParser: import("@smithy/types").UrlParser;
33
32
  base64Decoder: import("@smithy/types").Decoder;
34
33
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -39,6 +38,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
39
38
  profile?: string;
40
39
  logger: import("@smithy/types").Logger;
41
40
  extensions: import("./runtimeExtensions").RuntimeExtension[];
41
+ md5: import("@smithy/types").HashConstructor;
42
42
  customUserAgent?: string | import("@smithy/types").UserAgent;
43
43
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
44
44
  endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
@@ -4,7 +4,6 @@ import type { S3ControlClientConfig } from "./S3ControlClient";
4
4
  */
5
5
  export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
6
6
  runtime: string;
7
- sha256: import("@smithy/types").HashConstructor;
8
7
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
9
8
  cacheMiddleware?: boolean;
10
9
  protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core/protocols").AwsRestXmlProtocol;
@@ -13,9 +12,10 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
13
12
  [setting: string]: unknown;
14
13
  };
15
14
  apiVersion: string;
15
+ sha256: import("@smithy/types").HashConstructor;
16
16
  urlParser: import("@smithy/types").UrlParser;
17
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  base64Decoder: import("@smithy/types").Decoder;
20
20
  base64Encoder: (_input: Uint8Array | string) => string;
21
21
  utf8Decoder: import("@smithy/types").Decoder;
@@ -15,12 +15,14 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
15
15
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3ControlHttpAuthSchemeProvider;
16
16
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
17
17
  logger: import("@smithy/types").Logger;
18
+ md5: import("@smithy/types").HashConstructor;
18
19
  protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof AwsRestXmlProtocol;
19
20
  protocolSettings: {
20
21
  [setting: string]: unknown;
21
22
  defaultNamespace?: string;
22
23
  };
23
24
  serviceId: string;
25
+ sha256: import("@smithy/types").HashConstructor;
24
26
  signingEscapePath: boolean;
25
27
  urlParser: import("@smithy/types").UrlParser;
26
28
  useArnRegion: boolean | import("@smithy/types").Provider<boolean | undefined> | undefined;
@@ -15,14 +15,18 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
15
15
  config?: import("@aws-sdk/core/client").PreviouslyResolved
16
16
  ) => Promise<import("@smithy/types").UserAgent>;
17
17
  maxAttempts: number | import("@smithy/types").Provider<number>;
18
- md5: import("@smithy/types").HashConstructor;
19
18
  region: string | import("@smithy/types").Provider<any>;
20
19
  requestHandler:
21
20
  | import("@smithy/core/protocols").HttpHandler<any>
22
21
  | RequestHandler;
23
22
  retryMode: string | import("@smithy/types").Provider<string>;
24
- sha256: import("@smithy/types").HashConstructor;
25
- streamCollector: import("@smithy/types").StreamCollector;
23
+ streamCollector: (
24
+ stream:
25
+ | import("stream").Readable
26
+ | import("stream/web").ReadableStream
27
+ | ReadableStream
28
+ | Blob
29
+ ) => Promise<Uint8Array>;
26
30
  streamHasher:
27
31
  | import("@smithy/types").StreamHasher<import("stream").Readable>
28
32
  | import("@smithy/types").StreamHasher<Blob>;
@@ -40,6 +44,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
40
44
  [setting: string]: unknown;
41
45
  };
42
46
  apiVersion: string;
47
+ sha256: import("@smithy/types").HashConstructor;
43
48
  urlParser: import("@smithy/types").UrlParser;
44
49
  base64Decoder: import("@smithy/types").Decoder;
45
50
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -54,6 +59,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
54
59
  | import("@smithy/types").Provider<boolean | undefined>;
55
60
  logger: import("@smithy/types").Logger;
56
61
  extensions: import("./runtimeExtensions").RuntimeExtension[];
62
+ md5: import("@smithy/types").HashConstructor;
57
63
  customUserAgent?: string | import("@smithy/types").UserAgent;
58
64
  userAgentAppId?:
59
65
  | string
@@ -16,14 +16,18 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
16
16
  config?: import("@aws-sdk/core/client").PreviouslyResolved
17
17
  ) => Promise<import("@smithy/types").UserAgent>;
18
18
  maxAttempts: number | import("@smithy/types").Provider<number>;
19
- md5: import("@smithy/types").HashConstructor;
20
19
  region: string | import("@smithy/types").Provider<string>;
21
20
  requestHandler:
22
21
  | RequestHandler
23
22
  | import("@smithy/core/protocols").HttpHandler<any>;
24
23
  retryMode: string | import("@smithy/types").Provider<string>;
25
- sha256: import("@smithy/types").HashConstructor;
26
- streamCollector: import("@smithy/types").StreamCollector;
24
+ streamCollector: (
25
+ stream:
26
+ | import("stream").Readable
27
+ | import("stream/web").ReadableStream
28
+ | ReadableStream
29
+ | Blob
30
+ ) => Promise<Uint8Array>;
27
31
  streamHasher:
28
32
  | import("@smithy/types").StreamHasher<import("stream").Readable>
29
33
  | import("@smithy/types").StreamHasher<Blob>;
@@ -41,6 +45,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
41
45
  [setting: string]: unknown;
42
46
  };
43
47
  apiVersion: string;
48
+ sha256: import("@smithy/types").HashConstructor;
44
49
  urlParser: import("@smithy/types").UrlParser;
45
50
  base64Decoder: import("@smithy/types").Decoder;
46
51
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -51,6 +56,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
51
56
  profile?: string;
52
57
  logger: import("@smithy/types").Logger;
53
58
  extensions: import("./runtimeExtensions").RuntimeExtension[];
59
+ md5: import("@smithy/types").HashConstructor;
54
60
  customUserAgent?: string | import("@smithy/types").UserAgent;
55
61
  retryStrategy?:
56
62
  | import("@smithy/types").RetryStrategy
@@ -1,7 +1,6 @@
1
1
  import { S3ControlClientConfig } from "./S3ControlClient";
2
2
  export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
3
3
  runtime: string;
4
- sha256: import("@smithy/types").HashConstructor;
5
4
  requestHandler:
6
5
  | import("@smithy/types").NodeHttpHandlerOptions
7
6
  | import("@smithy/types").FetchHttpHandlerOptions
@@ -18,9 +17,16 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
18
17
  [setting: string]: unknown;
19
18
  };
20
19
  apiVersion: string;
20
+ sha256: import("@smithy/types").HashConstructor;
21
21
  urlParser: import("@smithy/types").UrlParser;
22
22
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
23
- streamCollector: import("@smithy/types").StreamCollector;
23
+ streamCollector: (
24
+ stream:
25
+ | import("stream").Readable
26
+ | import("stream/web").ReadableStream
27
+ | ReadableStream
28
+ | Blob
29
+ ) => Promise<Uint8Array>;
24
30
  base64Decoder: import("@smithy/types").Decoder;
25
31
  base64Encoder: (_input: Uint8Array | string) => string;
26
32
  utf8Decoder: import("@smithy/types").Decoder;
@@ -15,6 +15,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
15
15
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").S3ControlHttpAuthSchemeProvider;
16
16
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
17
17
  logger: import("@smithy/types").Logger;
18
+ md5: import("@smithy/types").HashConstructor;
18
19
  protocol:
19
20
  | import("@smithy/types").ClientProtocol<any, any>
20
21
  | import("@smithy/types").ClientProtocolCtor<any, any>
@@ -24,6 +25,7 @@ export declare const getRuntimeConfig: (config: S3ControlClientConfig) => {
24
25
  defaultNamespace?: string;
25
26
  };
26
27
  serviceId: string;
28
+ sha256: import("@smithy/types").HashConstructor;
27
29
  signingEscapePath: boolean;
28
30
  urlParser: import("@smithy/types").UrlParser;
29
31
  useArnRegion:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3-control",
3
3
  "description": "AWS SDK for JavaScript S3 Control Client for Node.js, Browser and React Native",
4
- "version": "3.1075.0",
4
+ "version": "3.1077.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -25,21 +25,19 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@aws-crypto/sha256-browser": "5.2.0",
29
- "@aws-crypto/sha256-js": "5.2.0",
30
- "@aws-sdk/core": "^3.974.23",
31
- "@aws-sdk/credential-provider-node": "^3.972.58",
32
- "@aws-sdk/middleware-sdk-s3": "^3.972.54",
33
- "@aws-sdk/types": "^3.973.13",
34
- "@smithy/core": "^3.24.6",
35
- "@smithy/fetch-http-handler": "^5.4.6",
36
- "@smithy/middleware-apply-body-checksum": "^4.4.6",
37
- "@smithy/node-http-handler": "^4.7.6",
38
- "@smithy/types": "^4.14.3",
28
+ "@aws-sdk/core": "^3.974.25",
29
+ "@aws-sdk/credential-provider-node": "^3.972.60",
30
+ "@aws-sdk/middleware-sdk-s3": "^3.972.56",
31
+ "@aws-sdk/types": "^3.973.14",
32
+ "@smithy/core": "^3.28.0",
33
+ "@smithy/fetch-http-handler": "^5.6.1",
34
+ "@smithy/middleware-apply-body-checksum": "^4.5.4",
35
+ "@smithy/node-http-handler": "^4.9.1",
36
+ "@smithy/types": "^4.15.0",
39
37
  "tslib": "^2.6.2"
40
38
  },
41
39
  "devDependencies": {
42
- "@smithy/snapshot-testing": "^2.1.7",
40
+ "@smithy/snapshot-testing": "^2.2.4",
43
41
  "@tsconfig/node20": "20.1.8",
44
42
  "@types/node": "^20.14.8",
45
43
  "concurrently": "7.0.0",
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.defaultS3ControlHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
- return {
5
- operation: getSmithyContext(context).operation,
6
- region: await normalizeProvider(config.region)() || (() => {
7
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
- })(),
9
- };
10
- };
11
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
- return {
13
- schemeId: "aws.auth#sigv4",
14
- signingProperties: {
15
- name: "s3",
16
- region: authParameters.region,
17
- },
18
- propertiesExtractor: (config, context) => ({
19
- signingProperties: {
20
- config,
21
- context,
22
- },
23
- }),
24
- };
25
- }
26
- exports.defaultS3ControlHttpAuthSchemeProvider = (authParameters) => {
27
- const options = [];
28
- switch (authParameters.operation) {
29
- default: {
30
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
- }
32
- }
33
- return options;
34
- };
35
- exports.resolveHttpAuthSchemeConfig = (config) => {
36
- const config_0 = resolveAwsSdkSigV4Config(config);
37
- return Object.assign(config_0, {
38
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
- });
40
- };