@aws-sdk/client-sns 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.
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SNSServiceException = exports.__ServiceException = void 0;
4
- const client_1 = require("@smithy/core/client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
6
- class SNSServiceException extends client_1.ServiceException {
1
+ const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
+ exports.__ServiceException = __ServiceException;
3
+ exports.SNSServiceException = class SNSServiceException extends __ServiceException {
7
4
  constructor(options) {
8
5
  super(options);
9
6
  Object.setPrototypeOf(this, SNSServiceException.prototype);
10
7
  }
11
- }
12
- exports.SNSServiceException = SNSServiceException;
8
+ };
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VerificationException = exports.TooManyEntriesInBatchRequestException = exports.InvalidBatchEntryIdException = exports.EmptyBatchRequestException = exports.BatchRequestTooLongException = exports.BatchEntryIdsNotDistinctException = exports.PlatformApplicationDisabledException = exports.KMSThrottlingException = exports.KMSOptInRequired = exports.KMSNotFoundException = exports.KMSInvalidStateException = exports.KMSDisabledException = exports.KMSAccessDeniedException = exports.InvalidParameterValueException = exports.EndpointDisabledException = exports.ValidationException = exports.InvalidStateException = exports.ResourceNotFoundException = exports.TopicLimitExceededException = exports.TagPolicyException = exports.TagLimitExceededException = exports.StaleTagException = exports.InvalidSecurityException = exports.ConcurrentAccessException = exports.UserErrorException = exports.OptedOutException = exports.SubscriptionLimitExceededException = exports.ReplayLimitExceededException = exports.FilterPolicyLimitExceededException = exports.ThrottledException = exports.NotFoundException = exports.InvalidParameterException = exports.InternalErrorException = exports.AuthorizationErrorException = void 0;
4
- const SNSServiceException_1 = require("./SNSServiceException");
5
- class AuthorizationErrorException extends SNSServiceException_1.SNSServiceException {
1
+ const { SNSServiceException: __BaseException } = require("./SNSServiceException");
2
+ exports.AuthorizationErrorException = class AuthorizationErrorException extends __BaseException {
6
3
  name = "AuthorizationErrorException";
7
4
  $fault = "client";
8
5
  constructor(opts) {
@@ -13,9 +10,8 @@ class AuthorizationErrorException extends SNSServiceException_1.SNSServiceExcept
13
10
  });
14
11
  Object.setPrototypeOf(this, AuthorizationErrorException.prototype);
15
12
  }
16
- }
17
- exports.AuthorizationErrorException = AuthorizationErrorException;
18
- class InternalErrorException extends SNSServiceException_1.SNSServiceException {
13
+ };
14
+ exports.InternalErrorException = class InternalErrorException extends __BaseException {
19
15
  name = "InternalErrorException";
20
16
  $fault = "server";
21
17
  constructor(opts) {
@@ -26,9 +22,8 @@ class InternalErrorException extends SNSServiceException_1.SNSServiceException {
26
22
  });
27
23
  Object.setPrototypeOf(this, InternalErrorException.prototype);
28
24
  }
29
- }
30
- exports.InternalErrorException = InternalErrorException;
31
- class InvalidParameterException extends SNSServiceException_1.SNSServiceException {
25
+ };
26
+ exports.InvalidParameterException = class InvalidParameterException extends __BaseException {
32
27
  name = "InvalidParameterException";
33
28
  $fault = "client";
34
29
  constructor(opts) {
@@ -39,9 +34,8 @@ class InvalidParameterException extends SNSServiceException_1.SNSServiceExceptio
39
34
  });
40
35
  Object.setPrototypeOf(this, InvalidParameterException.prototype);
41
36
  }
42
- }
43
- exports.InvalidParameterException = InvalidParameterException;
44
- class NotFoundException extends SNSServiceException_1.SNSServiceException {
37
+ };
38
+ exports.NotFoundException = class NotFoundException extends __BaseException {
45
39
  name = "NotFoundException";
46
40
  $fault = "client";
47
41
  constructor(opts) {
@@ -52,9 +46,8 @@ class NotFoundException extends SNSServiceException_1.SNSServiceException {
52
46
  });
53
47
  Object.setPrototypeOf(this, NotFoundException.prototype);
54
48
  }
55
- }
56
- exports.NotFoundException = NotFoundException;
57
- class ThrottledException extends SNSServiceException_1.SNSServiceException {
49
+ };
50
+ exports.ThrottledException = class ThrottledException extends __BaseException {
58
51
  name = "ThrottledException";
59
52
  $fault = "client";
60
53
  constructor(opts) {
@@ -65,9 +58,8 @@ class ThrottledException extends SNSServiceException_1.SNSServiceException {
65
58
  });
66
59
  Object.setPrototypeOf(this, ThrottledException.prototype);
67
60
  }
68
- }
69
- exports.ThrottledException = ThrottledException;
70
- class FilterPolicyLimitExceededException extends SNSServiceException_1.SNSServiceException {
61
+ };
62
+ exports.FilterPolicyLimitExceededException = class FilterPolicyLimitExceededException extends __BaseException {
71
63
  name = "FilterPolicyLimitExceededException";
72
64
  $fault = "client";
73
65
  constructor(opts) {
@@ -78,9 +70,8 @@ class FilterPolicyLimitExceededException extends SNSServiceException_1.SNSServic
78
70
  });
79
71
  Object.setPrototypeOf(this, FilterPolicyLimitExceededException.prototype);
80
72
  }
81
- }
82
- exports.FilterPolicyLimitExceededException = FilterPolicyLimitExceededException;
83
- class ReplayLimitExceededException extends SNSServiceException_1.SNSServiceException {
73
+ };
74
+ exports.ReplayLimitExceededException = class ReplayLimitExceededException extends __BaseException {
84
75
  name = "ReplayLimitExceededException";
85
76
  $fault = "client";
86
77
  constructor(opts) {
@@ -91,9 +82,8 @@ class ReplayLimitExceededException extends SNSServiceException_1.SNSServiceExcep
91
82
  });
92
83
  Object.setPrototypeOf(this, ReplayLimitExceededException.prototype);
93
84
  }
94
- }
95
- exports.ReplayLimitExceededException = ReplayLimitExceededException;
96
- class SubscriptionLimitExceededException extends SNSServiceException_1.SNSServiceException {
85
+ };
86
+ exports.SubscriptionLimitExceededException = class SubscriptionLimitExceededException extends __BaseException {
97
87
  name = "SubscriptionLimitExceededException";
98
88
  $fault = "client";
99
89
  constructor(opts) {
@@ -104,9 +94,8 @@ class SubscriptionLimitExceededException extends SNSServiceException_1.SNSServic
104
94
  });
105
95
  Object.setPrototypeOf(this, SubscriptionLimitExceededException.prototype);
106
96
  }
107
- }
108
- exports.SubscriptionLimitExceededException = SubscriptionLimitExceededException;
109
- class OptedOutException extends SNSServiceException_1.SNSServiceException {
97
+ };
98
+ exports.OptedOutException = class OptedOutException extends __BaseException {
110
99
  name = "OptedOutException";
111
100
  $fault = "client";
112
101
  constructor(opts) {
@@ -117,9 +106,8 @@ class OptedOutException extends SNSServiceException_1.SNSServiceException {
117
106
  });
118
107
  Object.setPrototypeOf(this, OptedOutException.prototype);
119
108
  }
120
- }
121
- exports.OptedOutException = OptedOutException;
122
- class UserErrorException extends SNSServiceException_1.SNSServiceException {
109
+ };
110
+ exports.UserErrorException = class UserErrorException extends __BaseException {
123
111
  name = "UserErrorException";
124
112
  $fault = "client";
125
113
  constructor(opts) {
@@ -130,9 +118,8 @@ class UserErrorException extends SNSServiceException_1.SNSServiceException {
130
118
  });
131
119
  Object.setPrototypeOf(this, UserErrorException.prototype);
132
120
  }
133
- }
134
- exports.UserErrorException = UserErrorException;
135
- class ConcurrentAccessException extends SNSServiceException_1.SNSServiceException {
121
+ };
122
+ exports.ConcurrentAccessException = class ConcurrentAccessException extends __BaseException {
136
123
  name = "ConcurrentAccessException";
137
124
  $fault = "client";
138
125
  constructor(opts) {
@@ -143,9 +130,8 @@ class ConcurrentAccessException extends SNSServiceException_1.SNSServiceExceptio
143
130
  });
144
131
  Object.setPrototypeOf(this, ConcurrentAccessException.prototype);
145
132
  }
146
- }
147
- exports.ConcurrentAccessException = ConcurrentAccessException;
148
- class InvalidSecurityException extends SNSServiceException_1.SNSServiceException {
133
+ };
134
+ exports.InvalidSecurityException = class InvalidSecurityException extends __BaseException {
149
135
  name = "InvalidSecurityException";
150
136
  $fault = "client";
151
137
  constructor(opts) {
@@ -156,9 +142,8 @@ class InvalidSecurityException extends SNSServiceException_1.SNSServiceException
156
142
  });
157
143
  Object.setPrototypeOf(this, InvalidSecurityException.prototype);
158
144
  }
159
- }
160
- exports.InvalidSecurityException = InvalidSecurityException;
161
- class StaleTagException extends SNSServiceException_1.SNSServiceException {
145
+ };
146
+ exports.StaleTagException = class StaleTagException extends __BaseException {
162
147
  name = "StaleTagException";
163
148
  $fault = "client";
164
149
  constructor(opts) {
@@ -169,9 +154,8 @@ class StaleTagException extends SNSServiceException_1.SNSServiceException {
169
154
  });
170
155
  Object.setPrototypeOf(this, StaleTagException.prototype);
171
156
  }
172
- }
173
- exports.StaleTagException = StaleTagException;
174
- class TagLimitExceededException extends SNSServiceException_1.SNSServiceException {
157
+ };
158
+ exports.TagLimitExceededException = class TagLimitExceededException extends __BaseException {
175
159
  name = "TagLimitExceededException";
176
160
  $fault = "client";
177
161
  constructor(opts) {
@@ -182,9 +166,8 @@ class TagLimitExceededException extends SNSServiceException_1.SNSServiceExceptio
182
166
  });
183
167
  Object.setPrototypeOf(this, TagLimitExceededException.prototype);
184
168
  }
185
- }
186
- exports.TagLimitExceededException = TagLimitExceededException;
187
- class TagPolicyException extends SNSServiceException_1.SNSServiceException {
169
+ };
170
+ exports.TagPolicyException = class TagPolicyException extends __BaseException {
188
171
  name = "TagPolicyException";
189
172
  $fault = "client";
190
173
  constructor(opts) {
@@ -195,9 +178,8 @@ class TagPolicyException extends SNSServiceException_1.SNSServiceException {
195
178
  });
196
179
  Object.setPrototypeOf(this, TagPolicyException.prototype);
197
180
  }
198
- }
199
- exports.TagPolicyException = TagPolicyException;
200
- class TopicLimitExceededException extends SNSServiceException_1.SNSServiceException {
181
+ };
182
+ exports.TopicLimitExceededException = class TopicLimitExceededException extends __BaseException {
201
183
  name = "TopicLimitExceededException";
202
184
  $fault = "client";
203
185
  constructor(opts) {
@@ -208,9 +190,8 @@ class TopicLimitExceededException extends SNSServiceException_1.SNSServiceExcept
208
190
  });
209
191
  Object.setPrototypeOf(this, TopicLimitExceededException.prototype);
210
192
  }
211
- }
212
- exports.TopicLimitExceededException = TopicLimitExceededException;
213
- class ResourceNotFoundException extends SNSServiceException_1.SNSServiceException {
193
+ };
194
+ exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
214
195
  name = "ResourceNotFoundException";
215
196
  $fault = "client";
216
197
  constructor(opts) {
@@ -221,9 +202,8 @@ class ResourceNotFoundException extends SNSServiceException_1.SNSServiceExceptio
221
202
  });
222
203
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
223
204
  }
224
- }
225
- exports.ResourceNotFoundException = ResourceNotFoundException;
226
- class InvalidStateException extends SNSServiceException_1.SNSServiceException {
205
+ };
206
+ exports.InvalidStateException = class InvalidStateException extends __BaseException {
227
207
  name = "InvalidStateException";
228
208
  $fault = "client";
229
209
  constructor(opts) {
@@ -234,9 +214,8 @@ class InvalidStateException extends SNSServiceException_1.SNSServiceException {
234
214
  });
235
215
  Object.setPrototypeOf(this, InvalidStateException.prototype);
236
216
  }
237
- }
238
- exports.InvalidStateException = InvalidStateException;
239
- class ValidationException extends SNSServiceException_1.SNSServiceException {
217
+ };
218
+ exports.ValidationException = class ValidationException extends __BaseException {
240
219
  name = "ValidationException";
241
220
  $fault = "client";
242
221
  Message;
@@ -249,9 +228,8 @@ class ValidationException extends SNSServiceException_1.SNSServiceException {
249
228
  Object.setPrototypeOf(this, ValidationException.prototype);
250
229
  this.Message = opts.Message;
251
230
  }
252
- }
253
- exports.ValidationException = ValidationException;
254
- class EndpointDisabledException extends SNSServiceException_1.SNSServiceException {
231
+ };
232
+ exports.EndpointDisabledException = class EndpointDisabledException extends __BaseException {
255
233
  name = "EndpointDisabledException";
256
234
  $fault = "client";
257
235
  constructor(opts) {
@@ -262,9 +240,8 @@ class EndpointDisabledException extends SNSServiceException_1.SNSServiceExceptio
262
240
  });
263
241
  Object.setPrototypeOf(this, EndpointDisabledException.prototype);
264
242
  }
265
- }
266
- exports.EndpointDisabledException = EndpointDisabledException;
267
- class InvalidParameterValueException extends SNSServiceException_1.SNSServiceException {
243
+ };
244
+ exports.InvalidParameterValueException = class InvalidParameterValueException extends __BaseException {
268
245
  name = "InvalidParameterValueException";
269
246
  $fault = "client";
270
247
  constructor(opts) {
@@ -275,9 +252,8 @@ class InvalidParameterValueException extends SNSServiceException_1.SNSServiceExc
275
252
  });
276
253
  Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
277
254
  }
278
- }
279
- exports.InvalidParameterValueException = InvalidParameterValueException;
280
- class KMSAccessDeniedException extends SNSServiceException_1.SNSServiceException {
255
+ };
256
+ exports.KMSAccessDeniedException = class KMSAccessDeniedException extends __BaseException {
281
257
  name = "KMSAccessDeniedException";
282
258
  $fault = "client";
283
259
  constructor(opts) {
@@ -288,9 +264,8 @@ class KMSAccessDeniedException extends SNSServiceException_1.SNSServiceException
288
264
  });
289
265
  Object.setPrototypeOf(this, KMSAccessDeniedException.prototype);
290
266
  }
291
- }
292
- exports.KMSAccessDeniedException = KMSAccessDeniedException;
293
- class KMSDisabledException extends SNSServiceException_1.SNSServiceException {
267
+ };
268
+ exports.KMSDisabledException = class KMSDisabledException extends __BaseException {
294
269
  name = "KMSDisabledException";
295
270
  $fault = "client";
296
271
  constructor(opts) {
@@ -301,9 +276,8 @@ class KMSDisabledException extends SNSServiceException_1.SNSServiceException {
301
276
  });
302
277
  Object.setPrototypeOf(this, KMSDisabledException.prototype);
303
278
  }
304
- }
305
- exports.KMSDisabledException = KMSDisabledException;
306
- class KMSInvalidStateException extends SNSServiceException_1.SNSServiceException {
279
+ };
280
+ exports.KMSInvalidStateException = class KMSInvalidStateException extends __BaseException {
307
281
  name = "KMSInvalidStateException";
308
282
  $fault = "client";
309
283
  constructor(opts) {
@@ -314,9 +288,8 @@ class KMSInvalidStateException extends SNSServiceException_1.SNSServiceException
314
288
  });
315
289
  Object.setPrototypeOf(this, KMSInvalidStateException.prototype);
316
290
  }
317
- }
318
- exports.KMSInvalidStateException = KMSInvalidStateException;
319
- class KMSNotFoundException extends SNSServiceException_1.SNSServiceException {
291
+ };
292
+ exports.KMSNotFoundException = class KMSNotFoundException extends __BaseException {
320
293
  name = "KMSNotFoundException";
321
294
  $fault = "client";
322
295
  constructor(opts) {
@@ -327,9 +300,8 @@ class KMSNotFoundException extends SNSServiceException_1.SNSServiceException {
327
300
  });
328
301
  Object.setPrototypeOf(this, KMSNotFoundException.prototype);
329
302
  }
330
- }
331
- exports.KMSNotFoundException = KMSNotFoundException;
332
- class KMSOptInRequired extends SNSServiceException_1.SNSServiceException {
303
+ };
304
+ exports.KMSOptInRequired = class KMSOptInRequired extends __BaseException {
333
305
  name = "KMSOptInRequired";
334
306
  $fault = "client";
335
307
  constructor(opts) {
@@ -340,9 +312,8 @@ class KMSOptInRequired extends SNSServiceException_1.SNSServiceException {
340
312
  });
341
313
  Object.setPrototypeOf(this, KMSOptInRequired.prototype);
342
314
  }
343
- }
344
- exports.KMSOptInRequired = KMSOptInRequired;
345
- class KMSThrottlingException extends SNSServiceException_1.SNSServiceException {
315
+ };
316
+ exports.KMSThrottlingException = class KMSThrottlingException extends __BaseException {
346
317
  name = "KMSThrottlingException";
347
318
  $fault = "client";
348
319
  constructor(opts) {
@@ -353,9 +324,8 @@ class KMSThrottlingException extends SNSServiceException_1.SNSServiceException {
353
324
  });
354
325
  Object.setPrototypeOf(this, KMSThrottlingException.prototype);
355
326
  }
356
- }
357
- exports.KMSThrottlingException = KMSThrottlingException;
358
- class PlatformApplicationDisabledException extends SNSServiceException_1.SNSServiceException {
327
+ };
328
+ exports.PlatformApplicationDisabledException = class PlatformApplicationDisabledException extends __BaseException {
359
329
  name = "PlatformApplicationDisabledException";
360
330
  $fault = "client";
361
331
  constructor(opts) {
@@ -366,9 +336,8 @@ class PlatformApplicationDisabledException extends SNSServiceException_1.SNSServ
366
336
  });
367
337
  Object.setPrototypeOf(this, PlatformApplicationDisabledException.prototype);
368
338
  }
369
- }
370
- exports.PlatformApplicationDisabledException = PlatformApplicationDisabledException;
371
- class BatchEntryIdsNotDistinctException extends SNSServiceException_1.SNSServiceException {
339
+ };
340
+ exports.BatchEntryIdsNotDistinctException = class BatchEntryIdsNotDistinctException extends __BaseException {
372
341
  name = "BatchEntryIdsNotDistinctException";
373
342
  $fault = "client";
374
343
  constructor(opts) {
@@ -379,9 +348,8 @@ class BatchEntryIdsNotDistinctException extends SNSServiceException_1.SNSService
379
348
  });
380
349
  Object.setPrototypeOf(this, BatchEntryIdsNotDistinctException.prototype);
381
350
  }
382
- }
383
- exports.BatchEntryIdsNotDistinctException = BatchEntryIdsNotDistinctException;
384
- class BatchRequestTooLongException extends SNSServiceException_1.SNSServiceException {
351
+ };
352
+ exports.BatchRequestTooLongException = class BatchRequestTooLongException extends __BaseException {
385
353
  name = "BatchRequestTooLongException";
386
354
  $fault = "client";
387
355
  constructor(opts) {
@@ -392,9 +360,8 @@ class BatchRequestTooLongException extends SNSServiceException_1.SNSServiceExcep
392
360
  });
393
361
  Object.setPrototypeOf(this, BatchRequestTooLongException.prototype);
394
362
  }
395
- }
396
- exports.BatchRequestTooLongException = BatchRequestTooLongException;
397
- class EmptyBatchRequestException extends SNSServiceException_1.SNSServiceException {
363
+ };
364
+ exports.EmptyBatchRequestException = class EmptyBatchRequestException extends __BaseException {
398
365
  name = "EmptyBatchRequestException";
399
366
  $fault = "client";
400
367
  constructor(opts) {
@@ -405,9 +372,8 @@ class EmptyBatchRequestException extends SNSServiceException_1.SNSServiceExcepti
405
372
  });
406
373
  Object.setPrototypeOf(this, EmptyBatchRequestException.prototype);
407
374
  }
408
- }
409
- exports.EmptyBatchRequestException = EmptyBatchRequestException;
410
- class InvalidBatchEntryIdException extends SNSServiceException_1.SNSServiceException {
375
+ };
376
+ exports.InvalidBatchEntryIdException = class InvalidBatchEntryIdException extends __BaseException {
411
377
  name = "InvalidBatchEntryIdException";
412
378
  $fault = "client";
413
379
  constructor(opts) {
@@ -418,9 +384,8 @@ class InvalidBatchEntryIdException extends SNSServiceException_1.SNSServiceExcep
418
384
  });
419
385
  Object.setPrototypeOf(this, InvalidBatchEntryIdException.prototype);
420
386
  }
421
- }
422
- exports.InvalidBatchEntryIdException = InvalidBatchEntryIdException;
423
- class TooManyEntriesInBatchRequestException extends SNSServiceException_1.SNSServiceException {
387
+ };
388
+ exports.TooManyEntriesInBatchRequestException = class TooManyEntriesInBatchRequestException extends __BaseException {
424
389
  name = "TooManyEntriesInBatchRequestException";
425
390
  $fault = "client";
426
391
  constructor(opts) {
@@ -431,9 +396,8 @@ class TooManyEntriesInBatchRequestException extends SNSServiceException_1.SNSSer
431
396
  });
432
397
  Object.setPrototypeOf(this, TooManyEntriesInBatchRequestException.prototype);
433
398
  }
434
- }
435
- exports.TooManyEntriesInBatchRequestException = TooManyEntriesInBatchRequestException;
436
- class VerificationException extends SNSServiceException_1.SNSServiceException {
399
+ };
400
+ exports.VerificationException = class VerificationException extends __BaseException {
437
401
  name = "VerificationException";
438
402
  $fault = "client";
439
403
  Message;
@@ -448,5 +412,4 @@ class VerificationException extends SNSServiceException_1.SNSServiceException {
448
412
  this.Message = opts.Message;
449
413
  this.Status = opts.Status;
450
414
  }
451
- }
452
- exports.VerificationException = VerificationException;
415
+ };
@@ -1,36 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
- const client_1 = require("@aws-sdk/core/client");
8
- const client_2 = require("@smithy/core/client");
9
- const config_1 = require("@smithy/core/config");
10
- const retry_1 = require("@smithy/core/retry");
11
- const serde_1 = require("@smithy/core/serde");
12
- const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
13
- const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
1
+ const packageInfo = require("../package.json");
2
+ const { Sha256 } = require("@aws-crypto/sha256-browser");
3
+ const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
+ const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
+ const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
+ const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
+ const { calculateBodyLength } = require("@smithy/core/serde");
8
+ const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
+ const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
14
10
  const getRuntimeConfig = (config) => {
15
- const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
16
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
17
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
11
+ const defaultsMode = resolveDefaultsModeConfig(config);
12
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
+ const clientSharedValues = getSharedRuntimeConfig(config);
18
14
  return {
19
15
  ...clientSharedValues,
20
16
  ...config,
21
17
  runtime: "browser",
22
18
  defaultsMode,
23
- bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
19
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
20
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
25
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
26
- maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
27
- region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
28
- requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
29
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
30
- sha256: config?.sha256 ?? sha256_browser_1.Sha256,
31
- streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
32
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
33
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
21
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
+ region: config?.region ?? invalidProvider("Region is missing"),
24
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
+ sha256: config?.sha256 ?? Sha256,
27
+ streamCollector: config?.streamCollector ?? streamCollector,
28
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
34
30
  };
35
31
  };
36
32
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,23 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const client_1 = require("@aws-sdk/core/client");
7
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
8
- const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
- const client_2 = require("@smithy/core/client");
10
- const config_1 = require("@smithy/core/config");
11
- const retry_1 = require("@smithy/core/retry");
12
- const serde_1 = require("@smithy/core/serde");
13
- const node_http_handler_1 = require("@smithy/node-http-handler");
14
- 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 } = require("@aws-sdk/core/httpAuthSchemes");
4
+ const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
+ const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
+ 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");
7
+ const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
+ const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
+ const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
+ const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
15
11
  const getRuntimeConfig = (config) => {
16
- (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
17
- const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
18
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
19
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
- (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
12
+ emitWarningIfUnsupportedVersion(process.version);
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ awsCheckVersion(process.version);
21
17
  const loaderConfig = {
22
18
  profile: config?.profile,
23
19
  logger: clientSharedValues.logger,
@@ -27,23 +23,23 @@ const getRuntimeConfig = (config) => {
27
23
  ...config,
28
24
  runtime: "node",
29
25
  defaultsMode,
30
- authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
31
- bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
32
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
33
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
34
- maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
- region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
26
+ authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
37
33
  retryMode: config?.retryMode ??
38
- (0, config_1.loadConfig)({
39
- ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
- default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
34
+ loadNodeConfig({
35
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
41
37
  }, config),
42
- sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
43
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
44
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
45
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
- userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
38
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
+ streamCollector: config?.streamCollector ?? streamCollector,
40
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
47
43
  };
48
44
  };
49
45
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
8
5
  return {
9
6
  ...browserDefaults,
10
7
  ...config,
11
8
  runtime: "react-native",
12
- sha256: config?.sha256 ?? sha256_js_1.Sha256,
9
+ sha256: config?.sha256 ?? Sha256,
13
10
  };
14
11
  };
15
12
  exports.getRuntimeConfig = getRuntimeConfig;