@aws-sdk/client-s3 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.
- package/README.md +35 -0
- 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 +646 -535
- package/dist-cjs/models/S3ServiceException.js +4 -8
- package/dist-cjs/models/errors.js +106 -52
- 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 +1256 -740
- package/dist-es/S3.js +12 -0
- package/dist-es/commands/DeleteObjectAnnotationCommand.js +23 -0
- package/dist-es/commands/GetObjectAnnotationCommand.js +28 -0
- package/dist-es/commands/ListObjectAnnotationsCommand.js +23 -0
- package/dist-es/commands/PutObjectAnnotationCommand.js +29 -0
- package/dist-es/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.js +27 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/enums.js +12 -1
- package/dist-es/models/errors.js +76 -4
- package/dist-es/pagination/ListObjectAnnotationsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/schemas/schemas_0.js +260 -100
- package/dist-types/S3.d.ts +42 -0
- package/dist-types/S3Client.d.ts +7 -2
- package/dist-types/commands/CopyObjectCommand.d.ts +1 -0
- package/dist-types/commands/CreateBucketMetadataConfigurationCommand.d.ts +27 -0
- package/dist-types/commands/DeleteObjectAnnotationCommand.d.ts +119 -0
- package/dist-types/commands/GetBucketMetadataConfigurationCommand.d.ts +11 -0
- package/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
- package/dist-types/commands/GetObjectAnnotationCommand.d.ts +141 -0
- package/dist-types/commands/ListObjectAnnotationsCommand.d.ts +138 -0
- package/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
- package/dist-types/commands/PutObjectAnnotationCommand.d.ts +166 -0
- package/dist-types/commands/RenameObjectCommand.d.ts +1 -1
- package/dist-types/commands/RestoreObjectCommand.d.ts +1 -2
- package/dist-types/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.d.ts +110 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/enums.d.ts +29 -2
- package/dist-types/models/errors.d.ts +76 -4
- package/dist-types/models/models_0.d.ts +925 -549
- package/dist-types/models/models_1.d.ts +380 -2
- package/dist-types/pagination/ListObjectAnnotationsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +24 -0
- package/dist-types/ts3.4/S3.d.ts +98 -0
- package/dist-types/ts3.4/S3Client.d.ts +30 -0
- package/dist-types/ts3.4/commands/DeleteObjectAnnotationCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/GetObjectAnnotationCommand.d.ts +61 -0
- package/dist-types/ts3.4/commands/ListObjectAnnotationsCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/PutObjectAnnotationCommand.d.ts +61 -0
- package/dist-types/ts3.4/commands/RenameObjectCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/RestoreObjectCommand.d.ts +1 -2
- package/dist-types/ts3.4/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.d.ts +49 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/enums.d.ts +18 -3
- package/dist-types/ts3.4/models/errors.d.ts +41 -3
- package/dist-types/ts3.4/models/models_0.d.ts +138 -64
- package/dist-types/ts3.4/models/models_1.d.ts +75 -5
- package/dist-types/ts3.4/pagination/ListObjectAnnotationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
- package/package.json +20 -20
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.S3ServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class S3ServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.S3ServiceException = class S3ServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, S3ServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.S3ServiceException = S3ServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ObjectAlreadyInActiveTierError = exports.IdempotencyParameterMismatch = exports.TooManyParts = exports.InvalidWriteOffset = exports.InvalidRequest = exports.EncryptionTypeMismatch = exports.NotFound = exports.NoSuchKey = exports.InvalidObjectState = exports.NoSuchBucket = exports.BucketAlreadyOwnedByYou = exports.BucketAlreadyExists = exports.ObjectNotInActiveTierError = exports.AccessDenied = exports.NoSuchUpload = void 0;
|
|
4
|
-
const S3ServiceException_1 = require("./S3ServiceException");
|
|
5
|
-
class NoSuchUpload extends S3ServiceException_1.S3ServiceException {
|
|
1
|
+
const { S3ServiceException: __BaseException } = require("./S3ServiceException");
|
|
2
|
+
exports.NoSuchUpload = class NoSuchUpload extends __BaseException {
|
|
6
3
|
name = "NoSuchUpload";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
constructor(opts) {
|
|
@@ -13,9 +10,8 @@ class NoSuchUpload extends S3ServiceException_1.S3ServiceException {
|
|
|
13
10
|
});
|
|
14
11
|
Object.setPrototypeOf(this, NoSuchUpload.prototype);
|
|
15
12
|
}
|
|
16
|
-
}
|
|
17
|
-
exports.
|
|
18
|
-
class AccessDenied extends S3ServiceException_1.S3ServiceException {
|
|
13
|
+
};
|
|
14
|
+
exports.AccessDenied = class AccessDenied extends __BaseException {
|
|
19
15
|
name = "AccessDenied";
|
|
20
16
|
$fault = "client";
|
|
21
17
|
constructor(opts) {
|
|
@@ -26,9 +22,8 @@ class AccessDenied extends S3ServiceException_1.S3ServiceException {
|
|
|
26
22
|
});
|
|
27
23
|
Object.setPrototypeOf(this, AccessDenied.prototype);
|
|
28
24
|
}
|
|
29
|
-
}
|
|
30
|
-
exports.
|
|
31
|
-
class ObjectNotInActiveTierError extends S3ServiceException_1.S3ServiceException {
|
|
25
|
+
};
|
|
26
|
+
exports.ObjectNotInActiveTierError = class ObjectNotInActiveTierError extends __BaseException {
|
|
32
27
|
name = "ObjectNotInActiveTierError";
|
|
33
28
|
$fault = "client";
|
|
34
29
|
constructor(opts) {
|
|
@@ -39,9 +34,8 @@ class ObjectNotInActiveTierError extends S3ServiceException_1.S3ServiceException
|
|
|
39
34
|
});
|
|
40
35
|
Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
exports.
|
|
44
|
-
class BucketAlreadyExists extends S3ServiceException_1.S3ServiceException {
|
|
37
|
+
};
|
|
38
|
+
exports.BucketAlreadyExists = class BucketAlreadyExists extends __BaseException {
|
|
45
39
|
name = "BucketAlreadyExists";
|
|
46
40
|
$fault = "client";
|
|
47
41
|
constructor(opts) {
|
|
@@ -52,9 +46,8 @@ class BucketAlreadyExists extends S3ServiceException_1.S3ServiceException {
|
|
|
52
46
|
});
|
|
53
47
|
Object.setPrototypeOf(this, BucketAlreadyExists.prototype);
|
|
54
48
|
}
|
|
55
|
-
}
|
|
56
|
-
exports.
|
|
57
|
-
class BucketAlreadyOwnedByYou extends S3ServiceException_1.S3ServiceException {
|
|
49
|
+
};
|
|
50
|
+
exports.BucketAlreadyOwnedByYou = class BucketAlreadyOwnedByYou extends __BaseException {
|
|
58
51
|
name = "BucketAlreadyOwnedByYou";
|
|
59
52
|
$fault = "client";
|
|
60
53
|
constructor(opts) {
|
|
@@ -65,9 +58,8 @@ class BucketAlreadyOwnedByYou extends S3ServiceException_1.S3ServiceException {
|
|
|
65
58
|
});
|
|
66
59
|
Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);
|
|
67
60
|
}
|
|
68
|
-
}
|
|
69
|
-
exports.
|
|
70
|
-
class NoSuchBucket extends S3ServiceException_1.S3ServiceException {
|
|
61
|
+
};
|
|
62
|
+
exports.NoSuchBucket = class NoSuchBucket extends __BaseException {
|
|
71
63
|
name = "NoSuchBucket";
|
|
72
64
|
$fault = "client";
|
|
73
65
|
constructor(opts) {
|
|
@@ -78,9 +70,20 @@ class NoSuchBucket extends S3ServiceException_1.S3ServiceException {
|
|
|
78
70
|
});
|
|
79
71
|
Object.setPrototypeOf(this, NoSuchBucket.prototype);
|
|
80
72
|
}
|
|
81
|
-
}
|
|
82
|
-
exports.
|
|
83
|
-
|
|
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 {
|
|
84
87
|
name = "InvalidObjectState";
|
|
85
88
|
$fault = "client";
|
|
86
89
|
StorageClass;
|
|
@@ -95,22 +98,20 @@ class InvalidObjectState extends S3ServiceException_1.S3ServiceException {
|
|
|
95
98
|
this.StorageClass = opts.StorageClass;
|
|
96
99
|
this.AccessTier = opts.AccessTier;
|
|
97
100
|
}
|
|
98
|
-
}
|
|
99
|
-
exports.
|
|
100
|
-
|
|
101
|
-
name = "NoSuchKey";
|
|
101
|
+
};
|
|
102
|
+
exports.NoSuchAnnotation = class NoSuchAnnotation extends __BaseException {
|
|
103
|
+
name = "NoSuchAnnotation";
|
|
102
104
|
$fault = "client";
|
|
103
105
|
constructor(opts) {
|
|
104
106
|
super({
|
|
105
|
-
name: "
|
|
107
|
+
name: "NoSuchAnnotation",
|
|
106
108
|
$fault: "client",
|
|
107
109
|
...opts,
|
|
108
110
|
});
|
|
109
|
-
Object.setPrototypeOf(this,
|
|
111
|
+
Object.setPrototypeOf(this, NoSuchAnnotation.prototype);
|
|
110
112
|
}
|
|
111
|
-
}
|
|
112
|
-
exports.
|
|
113
|
-
class NotFound extends S3ServiceException_1.S3ServiceException {
|
|
113
|
+
};
|
|
114
|
+
exports.NotFound = class NotFound extends __BaseException {
|
|
114
115
|
name = "NotFound";
|
|
115
116
|
$fault = "client";
|
|
116
117
|
constructor(opts) {
|
|
@@ -121,9 +122,20 @@ class NotFound extends S3ServiceException_1.S3ServiceException {
|
|
|
121
122
|
});
|
|
122
123
|
Object.setPrototypeOf(this, NotFound.prototype);
|
|
123
124
|
}
|
|
124
|
-
}
|
|
125
|
-
exports.
|
|
126
|
-
|
|
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 {
|
|
127
139
|
name = "EncryptionTypeMismatch";
|
|
128
140
|
$fault = "client";
|
|
129
141
|
constructor(opts) {
|
|
@@ -134,9 +146,8 @@ class EncryptionTypeMismatch extends S3ServiceException_1.S3ServiceException {
|
|
|
134
146
|
});
|
|
135
147
|
Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);
|
|
136
148
|
}
|
|
137
|
-
}
|
|
138
|
-
exports.
|
|
139
|
-
class InvalidRequest extends S3ServiceException_1.S3ServiceException {
|
|
149
|
+
};
|
|
150
|
+
exports.InvalidRequest = class InvalidRequest extends __BaseException {
|
|
140
151
|
name = "InvalidRequest";
|
|
141
152
|
$fault = "client";
|
|
142
153
|
constructor(opts) {
|
|
@@ -147,9 +158,8 @@ class InvalidRequest extends S3ServiceException_1.S3ServiceException {
|
|
|
147
158
|
});
|
|
148
159
|
Object.setPrototypeOf(this, InvalidRequest.prototype);
|
|
149
160
|
}
|
|
150
|
-
}
|
|
151
|
-
exports.
|
|
152
|
-
class InvalidWriteOffset extends S3ServiceException_1.S3ServiceException {
|
|
161
|
+
};
|
|
162
|
+
exports.InvalidWriteOffset = class InvalidWriteOffset extends __BaseException {
|
|
153
163
|
name = "InvalidWriteOffset";
|
|
154
164
|
$fault = "client";
|
|
155
165
|
constructor(opts) {
|
|
@@ -160,9 +170,8 @@ class InvalidWriteOffset extends S3ServiceException_1.S3ServiceException {
|
|
|
160
170
|
});
|
|
161
171
|
Object.setPrototypeOf(this, InvalidWriteOffset.prototype);
|
|
162
172
|
}
|
|
163
|
-
}
|
|
164
|
-
exports.
|
|
165
|
-
class TooManyParts extends S3ServiceException_1.S3ServiceException {
|
|
173
|
+
};
|
|
174
|
+
exports.TooManyParts = class TooManyParts extends __BaseException {
|
|
166
175
|
name = "TooManyParts";
|
|
167
176
|
$fault = "client";
|
|
168
177
|
constructor(opts) {
|
|
@@ -173,9 +182,56 @@ class TooManyParts extends S3ServiceException_1.S3ServiceException {
|
|
|
173
182
|
});
|
|
174
183
|
Object.setPrototypeOf(this, TooManyParts.prototype);
|
|
175
184
|
}
|
|
176
|
-
}
|
|
177
|
-
exports.
|
|
178
|
-
|
|
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 {
|
|
179
235
|
name = "IdempotencyParameterMismatch";
|
|
180
236
|
$fault = "client";
|
|
181
237
|
constructor(opts) {
|
|
@@ -186,9 +242,8 @@ class IdempotencyParameterMismatch extends S3ServiceException_1.S3ServiceExcepti
|
|
|
186
242
|
});
|
|
187
243
|
Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);
|
|
188
244
|
}
|
|
189
|
-
}
|
|
190
|
-
exports.
|
|
191
|
-
class ObjectAlreadyInActiveTierError extends S3ServiceException_1.S3ServiceException {
|
|
245
|
+
};
|
|
246
|
+
exports.ObjectAlreadyInActiveTierError = class ObjectAlreadyInActiveTierError extends __BaseException {
|
|
192
247
|
name = "ObjectAlreadyInActiveTierError";
|
|
193
248
|
$fault = "client";
|
|
194
249
|
constructor(opts) {
|
|
@@ -199,5 +254,4 @@ class ObjectAlreadyInActiveTierError extends S3ServiceException_1.S3ServiceExcep
|
|
|
199
254
|
});
|
|
200
255
|
Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);
|
|
201
256
|
}
|
|
202
|
-
}
|
|
203
|
-
exports.ObjectAlreadyInActiveTierError = ObjectAlreadyInActiveTierError;
|
|
257
|
+
};
|
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const retry_1 = require("@smithy/core/retry");
|
|
14
|
-
const serde_1 = require("@smithy/core/serde");
|
|
15
|
-
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
16
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
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");
|
|
17
13
|
const getRuntimeConfig = (config) => {
|
|
18
|
-
const defaultsMode =
|
|
19
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
20
|
-
const clientSharedValues = (
|
|
14
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
17
|
return {
|
|
22
18
|
...clientSharedValues,
|
|
23
19
|
...config,
|
|
24
20
|
runtime: "browser",
|
|
25
21
|
defaultsMode,
|
|
26
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
22
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
27
23
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
28
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
29
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
30
|
-
maxAttempts: config?.maxAttempts ??
|
|
31
|
-
md5: config?.md5 ??
|
|
32
|
-
region: config?.region ??
|
|
33
|
-
requestHandler:
|
|
34
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
35
|
-
sha1: config?.sha1 ??
|
|
36
|
-
sha256: config?.sha256 ??
|
|
37
|
-
streamCollector: config?.streamCollector ??
|
|
38
|
-
streamHasher: config?.streamHasher ??
|
|
39
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
40
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
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)),
|
|
41
37
|
};
|
|
42
38
|
};
|
|
43
39
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const retry_1 = require("@smithy/core/retry");
|
|
16
|
-
const serde_1 = require("@smithy/core/serde");
|
|
17
|
-
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
18
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
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");
|
|
19
15
|
const getRuntimeConfig = (config) => {
|
|
20
|
-
|
|
21
|
-
const defaultsMode =
|
|
22
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
23
|
-
const clientSharedValues = (
|
|
24
|
-
(
|
|
16
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
17
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
+
awsCheckVersion(process.version);
|
|
25
21
|
const loaderConfig = {
|
|
26
22
|
profile: config?.profile,
|
|
27
23
|
logger: clientSharedValues.logger,
|
|
@@ -31,32 +27,32 @@ const getRuntimeConfig = (config) => {
|
|
|
31
27
|
...config,
|
|
32
28
|
runtime: "node",
|
|
33
29
|
defaultsMode,
|
|
34
|
-
authSchemePreference: config?.authSchemePreference ?? (
|
|
35
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
36
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
37
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
38
|
-
disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? (
|
|
39
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
40
|
-
maxAttempts: config?.maxAttempts ?? (
|
|
41
|
-
md5: config?.md5 ??
|
|
42
|
-
region: config?.region ?? (
|
|
43
|
-
requestChecksumCalculation: config?.requestChecksumCalculation ?? (
|
|
44
|
-
requestHandler:
|
|
45
|
-
responseChecksumValidation: config?.responseChecksumValidation ?? (
|
|
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),
|
|
46
42
|
retryMode: config?.retryMode ??
|
|
47
|
-
(
|
|
48
|
-
...
|
|
49
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
43
|
+
loadNodeConfig({
|
|
44
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
45
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
50
46
|
}, config),
|
|
51
|
-
sha1: config?.sha1 ??
|
|
52
|
-
sha256: config?.sha256 ??
|
|
53
|
-
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (
|
|
54
|
-
streamCollector: config?.streamCollector ??
|
|
55
|
-
streamHasher: config?.streamHasher ??
|
|
56
|
-
useArnRegion: config?.useArnRegion ?? (
|
|
57
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (
|
|
58
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (
|
|
59
|
-
userAgentAppId: config?.userAgentAppId ?? (
|
|
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),
|
|
60
56
|
};
|
|
61
57
|
};
|
|
62
58
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getRuntimeConfig = void 0;
|
|
4
|
-
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
-
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
1
|
+
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
+
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
6
3
|
const getRuntimeConfig = (config) => {
|
|
7
|
-
const browserDefaults = (
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
8
5
|
return {
|
|
9
6
|
...browserDefaults,
|
|
10
7
|
...config,
|
|
11
8
|
runtime: "react-native",
|
|
12
|
-
sha256: config?.sha256 ??
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,54 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
12
|
-
const schemas_0_1 = require("./schemas/schemas_0");
|
|
13
|
-
const getRuntimeConfig = (config) => {
|
|
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) => {
|
|
14
11
|
return {
|
|
15
12
|
apiVersion: "2006-03-01",
|
|
16
|
-
base64Decoder: config?.base64Decoder ??
|
|
17
|
-
base64Encoder: config?.base64Encoder ??
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
18
15
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
19
|
-
endpointProvider: config?.endpointProvider ??
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
20
17
|
extensions: config?.extensions ?? [],
|
|
21
|
-
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ??
|
|
22
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ??
|
|
18
|
+
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,
|
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider,
|
|
23
20
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
24
21
|
{
|
|
25
22
|
schemeId: "aws.auth#sigv4",
|
|
26
23
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
27
|
-
signer: new
|
|
24
|
+
signer: new AwsSdkSigV4Signer(),
|
|
28
25
|
},
|
|
29
26
|
{
|
|
30
27
|
schemeId: "aws.auth#sigv4a",
|
|
31
28
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
32
|
-
signer: new
|
|
29
|
+
signer: new AwsSdkSigV4ASigner(),
|
|
33
30
|
},
|
|
34
31
|
],
|
|
35
|
-
logger: config?.logger ?? new
|
|
36
|
-
protocol: config?.protocol ??
|
|
32
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
33
|
+
protocol: config?.protocol ?? S3RestXmlProtocol,
|
|
37
34
|
protocolSettings: config?.protocolSettings ?? {
|
|
38
35
|
defaultNamespace: "com.amazonaws.s3",
|
|
39
|
-
errorTypeRegistries
|
|
36
|
+
errorTypeRegistries,
|
|
40
37
|
xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/",
|
|
41
38
|
version: "2006-03-01",
|
|
42
39
|
serviceTarget: "AmazonS3",
|
|
43
40
|
},
|
|
44
|
-
sdkStreamMixin: config?.sdkStreamMixin ??
|
|
41
|
+
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
45
42
|
serviceId: config?.serviceId ?? "S3",
|
|
46
|
-
signerConstructor: config?.signerConstructor ??
|
|
43
|
+
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
47
44
|
signingEscapePath: config?.signingEscapePath ?? false,
|
|
48
|
-
urlParser: config?.urlParser ??
|
|
45
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
49
46
|
useArnRegion: config?.useArnRegion ?? undefined,
|
|
50
|
-
utf8Decoder: config?.utf8Decoder ??
|
|
51
|
-
utf8Encoder: config?.utf8Encoder ??
|
|
47
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
48
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
52
49
|
};
|
|
53
50
|
};
|
|
54
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|