@aws-sdk/client-s3 3.1067.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.
@@ -1,28 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveHttpAuthSchemeConfig = exports.defaultS3HttpAuthSchemeProvider = exports.defaultS3HttpAuthSchemeParametersProvider = void 0;
4
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
5
- const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
6
- const client_1 = require("@smithy/core/client");
7
- const endpoints_1 = require("@smithy/core/endpoints");
8
- const endpointResolver_1 = require("../endpoint/endpointResolver");
1
+ const { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
+ const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
3
+ const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
4
+ const { resolveParams } = require("@smithy/core/endpoints");
5
+ const { defaultEndpointResolver } = require("../endpoint/endpointResolver");
9
6
  const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
10
7
  if (!input) {
11
8
  throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
12
9
  }
13
10
  const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
14
- const instructionsFn = (0, client_1.getSmithyContext)(context)?.commandInstance?.constructor
11
+ const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
15
12
  ?.getEndpointParameterInstructions;
16
13
  if (!instructionsFn) {
17
14
  throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
18
15
  }
19
- const endpointParameters = await (0, endpoints_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
16
+ const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
20
17
  return Object.assign(defaultParameters, endpointParameters);
21
18
  };
22
19
  const _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {
23
20
  return {
24
- operation: (0, client_1.getSmithyContext)(context).operation,
25
- region: await (0, client_1.normalizeProvider)(config.region)() || (() => {
21
+ operation: getSmithyContext(context).operation,
22
+ region: await normalizeProvider(config.region)() || (() => {
26
23
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
27
24
  })(),
28
25
  };
@@ -79,7 +76,7 @@ const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, de
79
76
  const name = s.name.toLowerCase();
80
77
  return name !== "sigv4a" && name.startsWith("sigv4");
81
78
  });
82
- if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
79
+ if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
83
80
  continue;
84
81
  }
85
82
  }
@@ -112,15 +109,14 @@ const _defaultS3HttpAuthSchemeProvider = (authParameters) => {
112
109
  }
113
110
  return options;
114
111
  };
115
- exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
112
+ exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
116
113
  "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
117
114
  "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
118
115
  });
119
- const resolveHttpAuthSchemeConfig = (config) => {
120
- const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
121
- const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_0);
116
+ exports.resolveHttpAuthSchemeConfig = (config) => {
117
+ const config_0 = resolveAwsSdkSigV4Config(config);
118
+ const config_1 = resolveAwsSdkSigV4AConfig(config_0);
122
119
  return Object.assign(config_1, {
123
- authSchemePreference: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []),
120
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
124
121
  });
125
122
  };
126
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bdd = void 0;
4
- const endpoints_1 = require("@smithy/core/endpoints");
1
+ const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
5
2
  const aw = "ref", ax = "argv", ay = "backend", az = "authSchemes", aA = "disableDoubleEncoding", aB = "signingName", aC = "signingRegion", aD = "signingRegionSet";
6
3
  const a = -1, b = true, c = false, d = "isSet", e = "booleanEquals", f = "stringEquals", g = "coalesce", h = "substring", i = "", j = "aws.partition", k = "partitionResult", l = "accessPointSuffix", m = "regionPrefix", n = (n) => "outpostId_ssa_" + n + i, o = "hardwareType", p = "ite", q = "isValidHostLabel", s = "sigv4", t = "aws.isVirtualHostableS3Bucket", u = "url", v = "getAttr", w = "bucketArn", x = "--", y = "arnType", z = "accesspoint", A = (n) => "accessPointName_ssa_" + n + i, B = "s3-object-lambda", C = "s3-outposts", D = "bucketPartition", E = "us-east-1", F = "outpostType", G = "name", H = "s3", I = "{url#scheme}://{Bucket}.{url#authority}{url#path}", J = "{url#scheme}://{url#authority}{url#path}", K = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", L = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", M = "https://{Bucket}.s3.{partitionResult#dnsSuffix}", N = (n) => "{url#scheme}://{accessPointName_ssa_" + n + "}-{bucketArn#accountId}.{url#authority}{url#path}", O = (n) => "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName_ssa_" + n + "}`", P = "sigv4a", Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", S = "https://s3.{partitionResult#dnsSuffix}", T = { [aw]: "UseFIPS" }, U = { [aw]: "UseDualStack" }, V = { [aw]: "Bucket" }, W = { "fn": v, [ax]: [{ [aw]: k }, G] }, X = { [aw]: u }, Y = { [aw]: "Region" }, Z = { [aw]: w }, aa = { [aw]: y }, ab = { [aw]: "accessPointName_ssa_1" }, ac = { "fn": v, [ax]: [Z, "region"] }, ad = { [aw]: o }, ae = { "fn": v, [ax]: [Z, "service"] }, af = { "fn": v, [ax]: [Z, "accountId"] }, ag = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: "{_s3e_auth}", [aB]: "s3express", [aC]: "{Region}" }] }, ah = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: s, [aB]: "s3express", [aC]: "{Region}" }] }, ai = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{Region}" }] }, aj = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: E }] }, ak = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{Region}" }] }, al = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{bucketArn#region}" }] }, am = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{bucketArn#region}" }] }, an = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{bucketArn#region}" }] }, ao = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{Region}" }] }, ap = [Y], aq = [{ [aw]: "Endpoint" }], as = [V], at = [V, 0, 7, true], au = [Z, "resourceId[1]"], av = ["*"];
7
4
  const _data = {
@@ -758,4 +755,4 @@ const nodes = new Int32Array([
758
755
  44, r + 15, 553,
759
756
  45, r + 15, r + 20,
760
757
  ]);
761
- exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
758
+ exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultEndpointResolver = void 0;
4
- const client_1 = require("@aws-sdk/core/client");
5
- const endpoints_1 = require("@smithy/core/endpoints");
6
- const bdd_1 = require("./bdd");
7
- const cache = new endpoints_1.EndpointCache({
1
+ const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
+ const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
+ const { bdd } = require("./bdd");
4
+ const cache = new EndpointCache({
8
5
  size: 50,
9
6
  params: [
10
7
  "Accelerate",
@@ -23,11 +20,10 @@ const cache = new endpoints_1.EndpointCache({
23
20
  "UseS3ExpressControlEndpoint",
24
21
  ],
25
22
  });
26
- const defaultEndpointResolver = (endpointParams, context = {}) => {
27
- return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
23
+ exports.defaultEndpointResolver = (endpointParams, context = {}) => {
24
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
28
25
  endpointParams: endpointParams,
29
26
  logger: context.logger,
30
27
  }));
31
28
  };
32
- exports.defaultEndpointResolver = defaultEndpointResolver;
33
- endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
29
+ customEndpointFunctions.aws = awsEndpointFunctions;