@aws-sdk/client-s3 3.1068.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.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +15 -19
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +514 -534
- package/dist-cjs/models/S3ServiceException.js +4 -8
- package/dist-cjs/models/errors.js +31 -49
- package/dist-cjs/runtimeConfig.browser.js +29 -33
- package/dist-cjs/runtimeConfig.js +43 -47
- package/dist-cjs/runtimeConfig.native.js +4 -7
- package/dist-cjs/runtimeConfig.shared.js +25 -29
- package/dist-cjs/schemas/schemas_0.js +983 -646
- package/package.json +20 -20
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
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 =
|
|
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
|
|
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:
|
|
25
|
-
region: await
|
|
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 (
|
|
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(
|
|
112
|
+
exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
|
|
116
113
|
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
117
114
|
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
118
115
|
});
|
|
119
|
-
|
|
120
|
-
const config_0 =
|
|
121
|
-
const config_1 =
|
|
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:
|
|
120
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
124
121
|
});
|
|
125
122
|
};
|
|
126
|
-
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
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 =
|
|
758
|
+
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
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
|
-
|
|
27
|
-
return cache.get(endpointParams, () =>
|
|
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
|
-
|
|
33
|
-
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
|
29
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|