@aws-sdk/client-sesv2 3.1068.0 → 3.1070.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.defaultSESv2HttpAuthSchemeProvider = exports.defaultSESv2HttpAuthSchemeParametersProvider = 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 _defaultSESv2HttpAuthSchemeParametersProvider = 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 _defaultSESv2HttpAuthSchemeProvider = (authParameters) => {
112
109
  }
113
110
  return options;
114
111
  };
115
- exports.defaultSESv2HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultSESv2HttpAuthSchemeProvider, {
112
+ exports.defaultSESv2HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSESv2HttpAuthSchemeProvider, {
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 m = "ref";
6
3
  const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [m]: "EndpointId" }, h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "authSchemes": [{ "name": "sigv4a", "signingName": "ses", "signingRegionSet": ["*"] }] }, k = {}, l = [{ [m]: "Region" }];
7
4
  const _data = {
@@ -61,4 +58,4 @@ const nodes = new Int32Array([
61
58
  7, r + 2, r + 3,
62
59
  5, r + 5, r + 1,
63
60
  ]);
64
- exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
61
+ exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,18 +1,14 @@
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: ["Endpoint", "EndpointId", "Region", "UseDualStack", "UseFIPS"],
10
7
  });
11
- const defaultEndpointResolver = (endpointParams, context = {}) => {
12
- return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
8
+ exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
13
10
  endpointParams: endpointParams,
14
11
  logger: context.logger,
15
12
  }));
16
13
  };
17
- exports.defaultEndpointResolver = defaultEndpointResolver;
18
- endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
14
+ customEndpointFunctions.aws = awsEndpointFunctions;