@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
|
@@ -1,29 +0,0 @@
|
|
|
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({
|
|
5
|
-
size: 50,
|
|
6
|
-
params: [
|
|
7
|
-
"Accelerate",
|
|
8
|
-
"Bucket",
|
|
9
|
-
"DisableAccessPoints",
|
|
10
|
-
"DisableMultiRegionAccessPoints",
|
|
11
|
-
"DisableS3ExpressSessionAuth",
|
|
12
|
-
"Endpoint",
|
|
13
|
-
"ForcePathStyle",
|
|
14
|
-
"Region",
|
|
15
|
-
"UseArnRegion",
|
|
16
|
-
"UseDualStack",
|
|
17
|
-
"UseFIPS",
|
|
18
|
-
"UseGlobalEndpoint",
|
|
19
|
-
"UseObjectLambdaEndpoint",
|
|
20
|
-
"UseS3ExpressControlEndpoint",
|
|
21
|
-
],
|
|
22
|
-
});
|
|
23
|
-
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
24
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
25
|
-
endpointParams: endpointParams,
|
|
26
|
-
logger: context.logger,
|
|
27
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
-
exports.__ServiceException = __ServiceException;
|
|
3
|
-
exports.S3ServiceException = class S3ServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, S3ServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
const { S3ServiceException: __BaseException } = require("./S3ServiceException");
|
|
2
|
-
exports.NoSuchUpload = class NoSuchUpload extends __BaseException {
|
|
3
|
-
name = "NoSuchUpload";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "NoSuchUpload",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts,
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, NoSuchUpload.prototype);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.AccessDenied = class AccessDenied extends __BaseException {
|
|
15
|
-
name = "AccessDenied";
|
|
16
|
-
$fault = "client";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "AccessDenied",
|
|
20
|
-
$fault: "client",
|
|
21
|
-
...opts,
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, AccessDenied.prototype);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.ObjectNotInActiveTierError = class ObjectNotInActiveTierError extends __BaseException {
|
|
27
|
-
name = "ObjectNotInActiveTierError";
|
|
28
|
-
$fault = "client";
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "ObjectNotInActiveTierError",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.BucketAlreadyExists = class BucketAlreadyExists extends __BaseException {
|
|
39
|
-
name = "BucketAlreadyExists";
|
|
40
|
-
$fault = "client";
|
|
41
|
-
constructor(opts) {
|
|
42
|
-
super({
|
|
43
|
-
name: "BucketAlreadyExists",
|
|
44
|
-
$fault: "client",
|
|
45
|
-
...opts,
|
|
46
|
-
});
|
|
47
|
-
Object.setPrototypeOf(this, BucketAlreadyExists.prototype);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.BucketAlreadyOwnedByYou = class BucketAlreadyOwnedByYou extends __BaseException {
|
|
51
|
-
name = "BucketAlreadyOwnedByYou";
|
|
52
|
-
$fault = "client";
|
|
53
|
-
constructor(opts) {
|
|
54
|
-
super({
|
|
55
|
-
name: "BucketAlreadyOwnedByYou",
|
|
56
|
-
$fault: "client",
|
|
57
|
-
...opts,
|
|
58
|
-
});
|
|
59
|
-
Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.NoSuchBucket = class NoSuchBucket extends __BaseException {
|
|
63
|
-
name = "NoSuchBucket";
|
|
64
|
-
$fault = "client";
|
|
65
|
-
constructor(opts) {
|
|
66
|
-
super({
|
|
67
|
-
name: "NoSuchBucket",
|
|
68
|
-
$fault: "client",
|
|
69
|
-
...opts,
|
|
70
|
-
});
|
|
71
|
-
Object.setPrototypeOf(this, NoSuchBucket.prototype);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
exports.NoSuchKey = class NoSuchKey extends __BaseException {
|
|
75
|
-
name = "NoSuchKey";
|
|
76
|
-
$fault = "client";
|
|
77
|
-
constructor(opts) {
|
|
78
|
-
super({
|
|
79
|
-
name: "NoSuchKey",
|
|
80
|
-
$fault: "client",
|
|
81
|
-
...opts,
|
|
82
|
-
});
|
|
83
|
-
Object.setPrototypeOf(this, NoSuchKey.prototype);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
exports.InvalidObjectState = class InvalidObjectState extends __BaseException {
|
|
87
|
-
name = "InvalidObjectState";
|
|
88
|
-
$fault = "client";
|
|
89
|
-
StorageClass;
|
|
90
|
-
AccessTier;
|
|
91
|
-
constructor(opts) {
|
|
92
|
-
super({
|
|
93
|
-
name: "InvalidObjectState",
|
|
94
|
-
$fault: "client",
|
|
95
|
-
...opts,
|
|
96
|
-
});
|
|
97
|
-
Object.setPrototypeOf(this, InvalidObjectState.prototype);
|
|
98
|
-
this.StorageClass = opts.StorageClass;
|
|
99
|
-
this.AccessTier = opts.AccessTier;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
exports.NoSuchAnnotation = class NoSuchAnnotation extends __BaseException {
|
|
103
|
-
name = "NoSuchAnnotation";
|
|
104
|
-
$fault = "client";
|
|
105
|
-
constructor(opts) {
|
|
106
|
-
super({
|
|
107
|
-
name: "NoSuchAnnotation",
|
|
108
|
-
$fault: "client",
|
|
109
|
-
...opts,
|
|
110
|
-
});
|
|
111
|
-
Object.setPrototypeOf(this, NoSuchAnnotation.prototype);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
exports.NotFound = class NotFound extends __BaseException {
|
|
115
|
-
name = "NotFound";
|
|
116
|
-
$fault = "client";
|
|
117
|
-
constructor(opts) {
|
|
118
|
-
super({
|
|
119
|
-
name: "NotFound",
|
|
120
|
-
$fault: "client",
|
|
121
|
-
...opts,
|
|
122
|
-
});
|
|
123
|
-
Object.setPrototypeOf(this, NotFound.prototype);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.InvalidPrefix = class InvalidPrefix extends __BaseException {
|
|
127
|
-
name = "InvalidPrefix";
|
|
128
|
-
$fault = "client";
|
|
129
|
-
constructor(opts) {
|
|
130
|
-
super({
|
|
131
|
-
name: "InvalidPrefix",
|
|
132
|
-
$fault: "client",
|
|
133
|
-
...opts,
|
|
134
|
-
});
|
|
135
|
-
Object.setPrototypeOf(this, InvalidPrefix.prototype);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
exports.EncryptionTypeMismatch = class EncryptionTypeMismatch extends __BaseException {
|
|
139
|
-
name = "EncryptionTypeMismatch";
|
|
140
|
-
$fault = "client";
|
|
141
|
-
constructor(opts) {
|
|
142
|
-
super({
|
|
143
|
-
name: "EncryptionTypeMismatch",
|
|
144
|
-
$fault: "client",
|
|
145
|
-
...opts,
|
|
146
|
-
});
|
|
147
|
-
Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
exports.InvalidRequest = class InvalidRequest extends __BaseException {
|
|
151
|
-
name = "InvalidRequest";
|
|
152
|
-
$fault = "client";
|
|
153
|
-
constructor(opts) {
|
|
154
|
-
super({
|
|
155
|
-
name: "InvalidRequest",
|
|
156
|
-
$fault: "client",
|
|
157
|
-
...opts,
|
|
158
|
-
});
|
|
159
|
-
Object.setPrototypeOf(this, InvalidRequest.prototype);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
exports.InvalidWriteOffset = class InvalidWriteOffset extends __BaseException {
|
|
163
|
-
name = "InvalidWriteOffset";
|
|
164
|
-
$fault = "client";
|
|
165
|
-
constructor(opts) {
|
|
166
|
-
super({
|
|
167
|
-
name: "InvalidWriteOffset",
|
|
168
|
-
$fault: "client",
|
|
169
|
-
...opts,
|
|
170
|
-
});
|
|
171
|
-
Object.setPrototypeOf(this, InvalidWriteOffset.prototype);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
exports.TooManyParts = class TooManyParts extends __BaseException {
|
|
175
|
-
name = "TooManyParts";
|
|
176
|
-
$fault = "client";
|
|
177
|
-
constructor(opts) {
|
|
178
|
-
super({
|
|
179
|
-
name: "TooManyParts",
|
|
180
|
-
$fault: "client",
|
|
181
|
-
...opts,
|
|
182
|
-
});
|
|
183
|
-
Object.setPrototypeOf(this, TooManyParts.prototype);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
exports.AnnotationLimitExceeded = class AnnotationLimitExceeded extends __BaseException {
|
|
187
|
-
name = "AnnotationLimitExceeded";
|
|
188
|
-
$fault = "client";
|
|
189
|
-
constructor(opts) {
|
|
190
|
-
super({
|
|
191
|
-
name: "AnnotationLimitExceeded",
|
|
192
|
-
$fault: "client",
|
|
193
|
-
...opts,
|
|
194
|
-
});
|
|
195
|
-
Object.setPrototypeOf(this, AnnotationLimitExceeded.prototype);
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
exports.AnnotationNameTooLong = class AnnotationNameTooLong extends __BaseException {
|
|
199
|
-
name = "AnnotationNameTooLong";
|
|
200
|
-
$fault = "client";
|
|
201
|
-
constructor(opts) {
|
|
202
|
-
super({
|
|
203
|
-
name: "AnnotationNameTooLong",
|
|
204
|
-
$fault: "client",
|
|
205
|
-
...opts,
|
|
206
|
-
});
|
|
207
|
-
Object.setPrototypeOf(this, AnnotationNameTooLong.prototype);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
exports.InvalidAnnotationName = class InvalidAnnotationName extends __BaseException {
|
|
211
|
-
name = "InvalidAnnotationName";
|
|
212
|
-
$fault = "client";
|
|
213
|
-
constructor(opts) {
|
|
214
|
-
super({
|
|
215
|
-
name: "InvalidAnnotationName",
|
|
216
|
-
$fault: "client",
|
|
217
|
-
...opts,
|
|
218
|
-
});
|
|
219
|
-
Object.setPrototypeOf(this, InvalidAnnotationName.prototype);
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
exports.UnsupportedMediaType = class UnsupportedMediaType extends __BaseException {
|
|
223
|
-
name = "UnsupportedMediaType";
|
|
224
|
-
$fault = "client";
|
|
225
|
-
constructor(opts) {
|
|
226
|
-
super({
|
|
227
|
-
name: "UnsupportedMediaType",
|
|
228
|
-
$fault: "client",
|
|
229
|
-
...opts,
|
|
230
|
-
});
|
|
231
|
-
Object.setPrototypeOf(this, UnsupportedMediaType.prototype);
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
exports.IdempotencyParameterMismatch = class IdempotencyParameterMismatch extends __BaseException {
|
|
235
|
-
name = "IdempotencyParameterMismatch";
|
|
236
|
-
$fault = "client";
|
|
237
|
-
constructor(opts) {
|
|
238
|
-
super({
|
|
239
|
-
name: "IdempotencyParameterMismatch",
|
|
240
|
-
$fault: "client",
|
|
241
|
-
...opts,
|
|
242
|
-
});
|
|
243
|
-
Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
exports.ObjectAlreadyInActiveTierError = class ObjectAlreadyInActiveTierError extends __BaseException {
|
|
247
|
-
name = "ObjectAlreadyInActiveTierError";
|
|
248
|
-
$fault = "client";
|
|
249
|
-
constructor(opts) {
|
|
250
|
-
super({
|
|
251
|
-
name: "ObjectAlreadyInActiveTierError",
|
|
252
|
-
$fault: "client",
|
|
253
|
-
...opts,
|
|
254
|
-
});
|
|
255
|
-
Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);
|
|
256
|
-
}
|
|
257
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { Sha1 } = require("@aws-crypto/sha1-browser");
|
|
3
|
-
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
4
|
-
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
5
|
-
const { blobHasher: streamHasher, Md5 } = require("@smithy/core/checksum");
|
|
6
|
-
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
7
|
-
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
8
|
-
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
9
|
-
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
10
|
-
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
11
|
-
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
12
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
13
|
-
const getRuntimeConfig = (config) => {
|
|
14
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
17
|
-
return {
|
|
18
|
-
...clientSharedValues,
|
|
19
|
-
...config,
|
|
20
|
-
runtime: "browser",
|
|
21
|
-
defaultsMode,
|
|
22
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
23
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
26
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
27
|
-
md5: config?.md5 ?? Md5,
|
|
28
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
29
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
30
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
31
|
-
sha1: config?.sha1 ?? Sha1,
|
|
32
|
-
sha256: config?.sha256 ?? Sha256,
|
|
33
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
34
|
-
streamHasher: config?.streamHasher ?? streamHasher,
|
|
35
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
-
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
-
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
-
const { NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS } = require("@aws-sdk/middleware-flexible-checksums");
|
|
6
|
-
const { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, NODE_USE_ARN_REGION_CONFIG_OPTIONS } = require("@aws-sdk/middleware-sdk-s3/s3");
|
|
7
|
-
const { readableStreamHasher: streamHasher } = require("@smithy/core/checksum");
|
|
8
|
-
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
9
|
-
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
10
|
-
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
11
|
-
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
12
|
-
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
13
|
-
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
14
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
15
|
-
const getRuntimeConfig = (config) => {
|
|
16
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
17
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
19
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
awsCheckVersion(process.version);
|
|
21
|
-
const loaderConfig = {
|
|
22
|
-
profile: config?.profile,
|
|
23
|
-
logger: clientSharedValues.logger,
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
...clientSharedValues,
|
|
27
|
-
...config,
|
|
28
|
-
runtime: "node",
|
|
29
|
-
defaultsMode,
|
|
30
|
-
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
31
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
33
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
34
|
-
disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? loadNodeConfig(NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig),
|
|
35
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
36
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
37
|
-
md5: config?.md5 ?? Hash.bind(null, "md5"),
|
|
38
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
39
|
-
requestChecksumCalculation: config?.requestChecksumCalculation ?? loadNodeConfig(NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
41
|
-
responseChecksumValidation: config?.responseChecksumValidation ?? loadNodeConfig(NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
-
retryMode: config?.retryMode ??
|
|
43
|
-
loadNodeConfig({
|
|
44
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
45
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
46
|
-
}, config),
|
|
47
|
-
sha1: config?.sha1 ?? Hash.bind(null, "sha1"),
|
|
48
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
49
|
-
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
50
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
51
|
-
streamHasher: config?.streamHasher ?? streamHasher,
|
|
52
|
-
useArnRegion: config?.useArnRegion ?? loadNodeConfig(NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
|
|
53
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
54
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
55
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
3
|
-
const getRuntimeConfig = (config) => {
|
|
4
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
-
return {
|
|
6
|
-
...browserDefaults,
|
|
7
|
-
...config,
|
|
8
|
-
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { S3RestXmlProtocol } = require("@aws-sdk/middleware-sdk-s3/s3");
|
|
3
|
-
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
4
|
-
const { NoOpLogger } = require("@smithy/core/client");
|
|
5
|
-
const { parseUrl } = require("@smithy/core/protocols");
|
|
6
|
-
const { fromBase64, fromUtf8, getAwsChunkedEncodingStream, sdkStreamMixin, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
7
|
-
const { defaultS3HttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
8
|
-
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
9
|
-
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
10
|
-
exports.getRuntimeConfig = (config) => {
|
|
11
|
-
return {
|
|
12
|
-
apiVersion: "2006-03-01",
|
|
13
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
-
extensions: config?.extensions ?? [],
|
|
18
|
-
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,
|
|
19
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider,
|
|
20
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
21
|
-
{
|
|
22
|
-
schemeId: "aws.auth#sigv4",
|
|
23
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
|
-
signer: new AwsSdkSigV4Signer(),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
schemeId: "aws.auth#sigv4a",
|
|
28
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
29
|
-
signer: new AwsSdkSigV4ASigner(),
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
33
|
-
protocol: config?.protocol ?? S3RestXmlProtocol,
|
|
34
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
35
|
-
defaultNamespace: "com.amazonaws.s3",
|
|
36
|
-
errorTypeRegistries,
|
|
37
|
-
xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/",
|
|
38
|
-
version: "2006-03-01",
|
|
39
|
-
serviceTarget: "AmazonS3",
|
|
40
|
-
},
|
|
41
|
-
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
42
|
-
serviceId: config?.serviceId ?? "S3",
|
|
43
|
-
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
44
|
-
signingEscapePath: config?.signingEscapePath ?? false,
|
|
45
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
46
|
-
useArnRegion: config?.useArnRegion ?? undefined,
|
|
47
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
48
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
49
|
-
};
|
|
50
|
-
};
|