@aws-sdk/client-s3 3.1075.0 → 3.1076.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/index.js +5186 -18
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -1
- package/package.json +13 -13
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -122
- package/dist-cjs/endpoint/bdd.js +0 -758
- package/dist-cjs/endpoint/endpointResolver.js +0 -29
- package/dist-cjs/models/S3ServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -257
- package/dist-cjs/runtimeConfig.browser.js +0 -39
- package/dist-cjs/runtimeConfig.js +0 -58
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -50
- package/dist-cjs/schemas/schemas_0.js +0 -3789
|
@@ -17,7 +17,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
17
17
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
18
18
|
sha1: import("@smithy/types").HashConstructor;
|
|
19
19
|
sha256: import("@smithy/types").HashConstructor;
|
|
20
|
-
streamCollector: import("
|
|
20
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
21
21
|
streamHasher: import("@smithy/types").StreamHasher<import("stream").Readable> | import("@smithy/types").StreamHasher<Blob>;
|
|
22
22
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
23
23
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
@@ -23,7 +23,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
23
23
|
sha1: __HashConstructor;
|
|
24
24
|
sha256: __HashConstructor;
|
|
25
25
|
sigv4aSigningRegionSet: string[] | import("@aws-sdk/types").Provider<string[] | undefined>;
|
|
26
|
-
streamCollector: import("
|
|
26
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
27
27
|
streamHasher: import("@aws-sdk/types").StreamHasher<import("stream").Readable> | import("@aws-sdk/types").StreamHasher<Blob>;
|
|
28
28
|
useArnRegion: boolean | import("@aws-sdk/types").Provider<boolean | undefined>;
|
|
29
29
|
useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
|
|
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
15
15
|
apiVersion: string;
|
|
16
16
|
urlParser: import("@smithy/types").UrlParser;
|
|
17
17
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
18
|
-
streamCollector: import("
|
|
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;
|
|
@@ -24,7 +24,13 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
24
24
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
25
25
|
sha1: import("@smithy/types").HashConstructor;
|
|
26
26
|
sha256: import("@smithy/types").HashConstructor;
|
|
27
|
-
streamCollector:
|
|
27
|
+
streamCollector: (
|
|
28
|
+
stream:
|
|
29
|
+
| import("stream").Readable
|
|
30
|
+
| import("stream/web").ReadableStream
|
|
31
|
+
| ReadableStream
|
|
32
|
+
| Blob
|
|
33
|
+
) => Promise<Uint8Array>;
|
|
28
34
|
streamHasher:
|
|
29
35
|
| import("@smithy/types").StreamHasher<import("stream").Readable>
|
|
30
36
|
| import("@smithy/types").StreamHasher<Blob>;
|
|
@@ -45,7 +45,13 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
45
45
|
sigv4aSigningRegionSet:
|
|
46
46
|
| string[]
|
|
47
47
|
| import("@aws-sdk/types").Provider<string[] | undefined>;
|
|
48
|
-
streamCollector:
|
|
48
|
+
streamCollector: (
|
|
49
|
+
stream:
|
|
50
|
+
| import("stream").Readable
|
|
51
|
+
| import("stream/web").ReadableStream
|
|
52
|
+
| ReadableStream
|
|
53
|
+
| Blob
|
|
54
|
+
) => Promise<Uint8Array>;
|
|
49
55
|
streamHasher:
|
|
50
56
|
| import("@aws-sdk/types").StreamHasher<import("stream").Readable>
|
|
51
57
|
| import("@aws-sdk/types").StreamHasher<Blob>;
|
|
@@ -20,7 +20,13 @@ export declare const getRuntimeConfig: (config: S3ClientConfig) => {
|
|
|
20
20
|
apiVersion: string;
|
|
21
21
|
urlParser: import("@smithy/types").UrlParser;
|
|
22
22
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
23
|
-
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;
|
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.
|
|
4
|
+
"version": "3.1076.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",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"@aws-crypto/sha1-browser": "5.2.0",
|
|
31
31
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
32
32
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
33
|
-
"@aws-sdk/core": "^3.974.
|
|
34
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
35
|
-
"@aws-sdk/middleware-flexible-checksums": "^3.974.
|
|
36
|
-
"@aws-sdk/middleware-sdk-s3": "^3.972.
|
|
37
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
38
|
-
"@aws-sdk/types": "^3.973.
|
|
39
|
-
"@smithy/core": "^3.
|
|
40
|
-
"@smithy/fetch-http-handler": "^5.
|
|
41
|
-
"@smithy/node-http-handler": "^4.
|
|
42
|
-
"@smithy/types": "^4.
|
|
33
|
+
"@aws-sdk/core": "^3.974.24",
|
|
34
|
+
"@aws-sdk/credential-provider-node": "^3.972.59",
|
|
35
|
+
"@aws-sdk/middleware-flexible-checksums": "^3.974.34",
|
|
36
|
+
"@aws-sdk/middleware-sdk-s3": "^3.972.55",
|
|
37
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.36",
|
|
38
|
+
"@aws-sdk/types": "^3.973.14",
|
|
39
|
+
"@smithy/core": "^3.27.0",
|
|
40
|
+
"@smithy/fetch-http-handler": "^5.6.0",
|
|
41
|
+
"@smithy/node-http-handler": "^4.9.0",
|
|
42
|
+
"@smithy/types": "^4.15.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@aws-sdk/signature-v4-crt": "3.
|
|
47
|
-
"@smithy/snapshot-testing": "^2.
|
|
46
|
+
"@aws-sdk/signature-v4-crt": "3.1076.0",
|
|
47
|
+
"@smithy/snapshot-testing": "^2.2.3",
|
|
48
48
|
"@tsconfig/node20": "20.1.8",
|
|
49
49
|
"@types/node": "^20.14.8",
|
|
50
50
|
"concurrently": "7.0.0",
|
|
@@ -1,122 +0,0 @@
|
|
|
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");
|
|
6
|
-
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
7
|
-
if (!input) {
|
|
8
|
-
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
9
|
-
}
|
|
10
|
-
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
11
|
-
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
|
|
12
|
-
?.getEndpointParameterInstructions;
|
|
13
|
-
if (!instructionsFn) {
|
|
14
|
-
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
15
|
-
}
|
|
16
|
-
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
17
|
-
return Object.assign(defaultParameters, endpointParameters);
|
|
18
|
-
};
|
|
19
|
-
const _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
20
|
-
return {
|
|
21
|
-
operation: getSmithyContext(context).operation,
|
|
22
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
23
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
24
|
-
})(),
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
exports.defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);
|
|
28
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
29
|
-
return {
|
|
30
|
-
schemeId: "aws.auth#sigv4",
|
|
31
|
-
signingProperties: {
|
|
32
|
-
name: "s3",
|
|
33
|
-
region: authParameters.region,
|
|
34
|
-
},
|
|
35
|
-
propertiesExtractor: (config, context) => ({
|
|
36
|
-
signingProperties: {
|
|
37
|
-
config,
|
|
38
|
-
context,
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
|
44
|
-
return {
|
|
45
|
-
schemeId: "aws.auth#sigv4a",
|
|
46
|
-
signingProperties: {
|
|
47
|
-
name: "s3",
|
|
48
|
-
region: authParameters.region,
|
|
49
|
-
},
|
|
50
|
-
propertiesExtractor: (config, context) => ({
|
|
51
|
-
signingProperties: {
|
|
52
|
-
config,
|
|
53
|
-
context,
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
59
|
-
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
60
|
-
const endpoint = defaultEndpointResolver(authParameters);
|
|
61
|
-
const authSchemes = endpoint.properties?.authSchemes;
|
|
62
|
-
if (!authSchemes) {
|
|
63
|
-
return defaultHttpAuthSchemeResolver(authParameters);
|
|
64
|
-
}
|
|
65
|
-
const options = [];
|
|
66
|
-
for (const scheme of authSchemes) {
|
|
67
|
-
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
|
68
|
-
const name = resolvedName.toLowerCase();
|
|
69
|
-
if (resolvedName !== name) {
|
|
70
|
-
console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
|
71
|
-
}
|
|
72
|
-
let schemeId;
|
|
73
|
-
if (name === "sigv4a") {
|
|
74
|
-
schemeId = "aws.auth#sigv4a";
|
|
75
|
-
const sigv4Present = authSchemes.find((s) => {
|
|
76
|
-
const name = s.name.toLowerCase();
|
|
77
|
-
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
78
|
-
});
|
|
79
|
-
if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else if (name.startsWith("sigv4")) {
|
|
84
|
-
schemeId = "aws.auth#sigv4";
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
|
88
|
-
}
|
|
89
|
-
const createOption = createHttpAuthOptionFunctions[schemeId];
|
|
90
|
-
if (!createOption) {
|
|
91
|
-
throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
|
92
|
-
}
|
|
93
|
-
const option = createOption(authParameters);
|
|
94
|
-
option.schemeId = schemeId;
|
|
95
|
-
option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
|
|
96
|
-
options.push(option);
|
|
97
|
-
}
|
|
98
|
-
return options;
|
|
99
|
-
};
|
|
100
|
-
return endpointRuleSetHttpAuthSchemeProvider;
|
|
101
|
-
};
|
|
102
|
-
const _defaultS3HttpAuthSchemeProvider = (authParameters) => {
|
|
103
|
-
const options = [];
|
|
104
|
-
switch (authParameters.operation) {
|
|
105
|
-
default: {
|
|
106
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
107
|
-
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return options;
|
|
111
|
-
};
|
|
112
|
-
exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
|
|
113
|
-
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
114
|
-
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
115
|
-
});
|
|
116
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
117
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
118
|
-
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
|
|
119
|
-
return Object.assign(config_1, {
|
|
120
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
121
|
-
});
|
|
122
|
-
};
|