@aws-sdk/client-ecr 3.44.0 → 3.47.1

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.
@@ -25,18 +25,6 @@ export var BatchCheckLayerAvailabilityResponse;
25
25
  (function (BatchCheckLayerAvailabilityResponse) {
26
26
  BatchCheckLayerAvailabilityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
27
27
  })(BatchCheckLayerAvailabilityResponse || (BatchCheckLayerAvailabilityResponse = {}));
28
- export var InvalidParameterException;
29
- (function (InvalidParameterException) {
30
- InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
31
- })(InvalidParameterException || (InvalidParameterException = {}));
32
- export var RepositoryNotFoundException;
33
- (function (RepositoryNotFoundException) {
34
- RepositoryNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
35
- })(RepositoryNotFoundException || (RepositoryNotFoundException = {}));
36
- export var ServerException;
37
- (function (ServerException) {
38
- ServerException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
39
- })(ServerException || (ServerException = {}));
40
28
  export var ImageIdentifier;
41
29
  (function (ImageIdentifier) {
42
30
  ImageIdentifier.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -109,10 +97,6 @@ export var BatchGetRepositoryScanningConfigurationResponse;
109
97
  (function (BatchGetRepositoryScanningConfigurationResponse) {
110
98
  BatchGetRepositoryScanningConfigurationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
99
  })(BatchGetRepositoryScanningConfigurationResponse || (BatchGetRepositoryScanningConfigurationResponse = {}));
112
- export var ValidationException;
113
- (function (ValidationException) {
114
- ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
115
- })(ValidationException || (ValidationException = {}));
116
100
  export var CompleteLayerUploadRequest;
117
101
  (function (CompleteLayerUploadRequest) {
118
102
  CompleteLayerUploadRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -121,30 +105,6 @@ export var CompleteLayerUploadResponse;
121
105
  (function (CompleteLayerUploadResponse) {
122
106
  CompleteLayerUploadResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
107
  })(CompleteLayerUploadResponse || (CompleteLayerUploadResponse = {}));
124
- export var EmptyUploadException;
125
- (function (EmptyUploadException) {
126
- EmptyUploadException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- })(EmptyUploadException || (EmptyUploadException = {}));
128
- export var InvalidLayerException;
129
- (function (InvalidLayerException) {
130
- InvalidLayerException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- })(InvalidLayerException || (InvalidLayerException = {}));
132
- export var KmsException;
133
- (function (KmsException) {
134
- KmsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- })(KmsException || (KmsException = {}));
136
- export var LayerAlreadyExistsException;
137
- (function (LayerAlreadyExistsException) {
138
- LayerAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
- })(LayerAlreadyExistsException || (LayerAlreadyExistsException = {}));
140
- export var LayerPartTooSmallException;
141
- (function (LayerPartTooSmallException) {
142
- LayerPartTooSmallException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
143
- })(LayerPartTooSmallException || (LayerPartTooSmallException = {}));
144
- export var UploadNotFoundException;
145
- (function (UploadNotFoundException) {
146
- UploadNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
- })(UploadNotFoundException || (UploadNotFoundException = {}));
148
108
  export var CreatePullThroughCacheRuleRequest;
149
109
  (function (CreatePullThroughCacheRuleRequest) {
150
110
  CreatePullThroughCacheRuleRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -153,18 +113,6 @@ export var CreatePullThroughCacheRuleResponse;
153
113
  (function (CreatePullThroughCacheRuleResponse) {
154
114
  CreatePullThroughCacheRuleResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
155
115
  })(CreatePullThroughCacheRuleResponse || (CreatePullThroughCacheRuleResponse = {}));
156
- export var LimitExceededException;
157
- (function (LimitExceededException) {
158
- LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
159
- })(LimitExceededException || (LimitExceededException = {}));
160
- export var PullThroughCacheRuleAlreadyExistsException;
161
- (function (PullThroughCacheRuleAlreadyExistsException) {
162
- PullThroughCacheRuleAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
163
- })(PullThroughCacheRuleAlreadyExistsException || (PullThroughCacheRuleAlreadyExistsException = {}));
164
- export var UnsupportedUpstreamRegistryException;
165
- (function (UnsupportedUpstreamRegistryException) {
166
- UnsupportedUpstreamRegistryException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
167
- })(UnsupportedUpstreamRegistryException || (UnsupportedUpstreamRegistryException = {}));
168
116
  export var EncryptionType;
169
117
  (function (EncryptionType) {
170
118
  EncryptionType["AES256"] = "AES256";
@@ -199,18 +147,6 @@ export var CreateRepositoryResponse;
199
147
  (function (CreateRepositoryResponse) {
200
148
  CreateRepositoryResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
201
149
  })(CreateRepositoryResponse || (CreateRepositoryResponse = {}));
202
- export var InvalidTagParameterException;
203
- (function (InvalidTagParameterException) {
204
- InvalidTagParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
205
- })(InvalidTagParameterException || (InvalidTagParameterException = {}));
206
- export var RepositoryAlreadyExistsException;
207
- (function (RepositoryAlreadyExistsException) {
208
- RepositoryAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
209
- })(RepositoryAlreadyExistsException || (RepositoryAlreadyExistsException = {}));
210
- export var TooManyTagsException;
211
- (function (TooManyTagsException) {
212
- TooManyTagsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
213
- })(TooManyTagsException || (TooManyTagsException = {}));
214
150
  export var DeleteLifecyclePolicyRequest;
215
151
  (function (DeleteLifecyclePolicyRequest) {
216
152
  DeleteLifecyclePolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -219,10 +155,6 @@ export var DeleteLifecyclePolicyResponse;
219
155
  (function (DeleteLifecyclePolicyResponse) {
220
156
  DeleteLifecyclePolicyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
221
157
  })(DeleteLifecyclePolicyResponse || (DeleteLifecyclePolicyResponse = {}));
222
- export var LifecyclePolicyNotFoundException;
223
- (function (LifecyclePolicyNotFoundException) {
224
- LifecyclePolicyNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
225
- })(LifecyclePolicyNotFoundException || (LifecyclePolicyNotFoundException = {}));
226
158
  export var DeletePullThroughCacheRuleRequest;
227
159
  (function (DeletePullThroughCacheRuleRequest) {
228
160
  DeletePullThroughCacheRuleRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -231,10 +163,6 @@ export var DeletePullThroughCacheRuleResponse;
231
163
  (function (DeletePullThroughCacheRuleResponse) {
232
164
  DeletePullThroughCacheRuleResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
233
165
  })(DeletePullThroughCacheRuleResponse || (DeletePullThroughCacheRuleResponse = {}));
234
- export var PullThroughCacheRuleNotFoundException;
235
- (function (PullThroughCacheRuleNotFoundException) {
236
- PullThroughCacheRuleNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
237
- })(PullThroughCacheRuleNotFoundException || (PullThroughCacheRuleNotFoundException = {}));
238
166
  export var DeleteRegistryPolicyRequest;
239
167
  (function (DeleteRegistryPolicyRequest) {
240
168
  DeleteRegistryPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -243,10 +171,6 @@ export var DeleteRegistryPolicyResponse;
243
171
  (function (DeleteRegistryPolicyResponse) {
244
172
  DeleteRegistryPolicyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
245
173
  })(DeleteRegistryPolicyResponse || (DeleteRegistryPolicyResponse = {}));
246
- export var RegistryPolicyNotFoundException;
247
- (function (RegistryPolicyNotFoundException) {
248
- RegistryPolicyNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
249
- })(RegistryPolicyNotFoundException || (RegistryPolicyNotFoundException = {}));
250
174
  export var DeleteRepositoryRequest;
251
175
  (function (DeleteRepositoryRequest) {
252
176
  DeleteRepositoryRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -255,10 +179,6 @@ export var DeleteRepositoryResponse;
255
179
  (function (DeleteRepositoryResponse) {
256
180
  DeleteRepositoryResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
257
181
  })(DeleteRepositoryResponse || (DeleteRepositoryResponse = {}));
258
- export var RepositoryNotEmptyException;
259
- (function (RepositoryNotEmptyException) {
260
- RepositoryNotEmptyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
261
- })(RepositoryNotEmptyException || (RepositoryNotEmptyException = {}));
262
182
  export var DeleteRepositoryPolicyRequest;
263
183
  (function (DeleteRepositoryPolicyRequest) {
264
184
  DeleteRepositoryPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -267,10 +187,6 @@ export var DeleteRepositoryPolicyResponse;
267
187
  (function (DeleteRepositoryPolicyResponse) {
268
188
  DeleteRepositoryPolicyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
269
189
  })(DeleteRepositoryPolicyResponse || (DeleteRepositoryPolicyResponse = {}));
270
- export var RepositoryPolicyNotFoundException;
271
- (function (RepositoryPolicyNotFoundException) {
272
- RepositoryPolicyNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
273
- })(RepositoryPolicyNotFoundException || (RepositoryPolicyNotFoundException = {}));
274
190
  export var DescribeImageReplicationStatusRequest;
275
191
  (function (DescribeImageReplicationStatusRequest) {
276
192
  DescribeImageReplicationStatusRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -289,10 +205,6 @@ export var DescribeImageReplicationStatusResponse;
289
205
  (function (DescribeImageReplicationStatusResponse) {
290
206
  DescribeImageReplicationStatusResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
291
207
  })(DescribeImageReplicationStatusResponse || (DescribeImageReplicationStatusResponse = {}));
292
- export var ImageNotFoundException;
293
- (function (ImageNotFoundException) {
294
- ImageNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
295
- })(ImageNotFoundException || (ImageNotFoundException = {}));
296
208
  export var TagStatus;
297
209
  (function (TagStatus) {
298
210
  TagStatus["ANY"] = "ANY";
@@ -411,10 +323,6 @@ export var DescribeImageScanFindingsResponse;
411
323
  (function (DescribeImageScanFindingsResponse) {
412
324
  DescribeImageScanFindingsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
413
325
  })(DescribeImageScanFindingsResponse || (DescribeImageScanFindingsResponse = {}));
414
- export var ScanNotFoundException;
415
- (function (ScanNotFoundException) {
416
- ScanNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
417
- })(ScanNotFoundException || (ScanNotFoundException = {}));
418
326
  export var DescribePullThroughCacheRulesRequest;
419
327
  (function (DescribePullThroughCacheRulesRequest) {
420
328
  DescribePullThroughCacheRulesRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -483,14 +391,6 @@ export var GetDownloadUrlForLayerResponse;
483
391
  (function (GetDownloadUrlForLayerResponse) {
484
392
  GetDownloadUrlForLayerResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
485
393
  })(GetDownloadUrlForLayerResponse || (GetDownloadUrlForLayerResponse = {}));
486
- export var LayerInaccessibleException;
487
- (function (LayerInaccessibleException) {
488
- LayerInaccessibleException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
489
- })(LayerInaccessibleException || (LayerInaccessibleException = {}));
490
- export var LayersNotFoundException;
491
- (function (LayersNotFoundException) {
492
- LayersNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
493
- })(LayersNotFoundException || (LayersNotFoundException = {}));
494
394
  export var GetLifecyclePolicyRequest;
495
395
  (function (GetLifecyclePolicyRequest) {
496
396
  GetLifecyclePolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -534,10 +434,6 @@ export var GetLifecyclePolicyPreviewResponse;
534
434
  (function (GetLifecyclePolicyPreviewResponse) {
535
435
  GetLifecyclePolicyPreviewResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
536
436
  })(GetLifecyclePolicyPreviewResponse || (GetLifecyclePolicyPreviewResponse = {}));
537
- export var LifecyclePolicyPreviewNotFoundException;
538
- (function (LifecyclePolicyPreviewNotFoundException) {
539
- LifecyclePolicyPreviewNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
540
- })(LifecyclePolicyPreviewNotFoundException || (LifecyclePolicyPreviewNotFoundException = {}));
541
437
  export var GetRegistryPolicyRequest;
542
438
  (function (GetRegistryPolicyRequest) {
543
439
  GetRegistryPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -603,18 +499,6 @@ export var ListTagsForResourceResponse;
603
499
  (function (ListTagsForResourceResponse) {
604
500
  ListTagsForResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
605
501
  })(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));
606
- export var ImageAlreadyExistsException;
607
- (function (ImageAlreadyExistsException) {
608
- ImageAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
609
- })(ImageAlreadyExistsException || (ImageAlreadyExistsException = {}));
610
- export var ImageDigestDoesNotMatchException;
611
- (function (ImageDigestDoesNotMatchException) {
612
- ImageDigestDoesNotMatchException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
613
- })(ImageDigestDoesNotMatchException || (ImageDigestDoesNotMatchException = {}));
614
- export var ImageTagAlreadyExistsException;
615
- (function (ImageTagAlreadyExistsException) {
616
- ImageTagAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
617
- })(ImageTagAlreadyExistsException || (ImageTagAlreadyExistsException = {}));
618
502
  export var PutImageRequest;
619
503
  (function (PutImageRequest) {
620
504
  PutImageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -623,10 +507,6 @@ export var PutImageResponse;
623
507
  (function (PutImageResponse) {
624
508
  PutImageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
625
509
  })(PutImageResponse || (PutImageResponse = {}));
626
- export var ReferencedImagesNotFoundException;
627
- (function (ReferencedImagesNotFoundException) {
628
- ReferencedImagesNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
629
- })(ReferencedImagesNotFoundException || (ReferencedImagesNotFoundException = {}));
630
510
  export var PutImageScanningConfigurationRequest;
631
511
  (function (PutImageScanningConfigurationRequest) {
632
512
  PutImageScanningConfigurationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -691,14 +571,6 @@ export var StartImageScanResponse;
691
571
  (function (StartImageScanResponse) {
692
572
  StartImageScanResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
693
573
  })(StartImageScanResponse || (StartImageScanResponse = {}));
694
- export var UnsupportedImageTypeException;
695
- (function (UnsupportedImageTypeException) {
696
- UnsupportedImageTypeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
697
- })(UnsupportedImageTypeException || (UnsupportedImageTypeException = {}));
698
- export var LifecyclePolicyPreviewInProgressException;
699
- (function (LifecyclePolicyPreviewInProgressException) {
700
- LifecyclePolicyPreviewInProgressException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
701
- })(LifecyclePolicyPreviewInProgressException || (LifecyclePolicyPreviewInProgressException = {}));
702
574
  export var StartLifecyclePolicyPreviewRequest;
703
575
  (function (StartLifecyclePolicyPreviewRequest) {
704
576
  StartLifecyclePolicyPreviewRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -723,10 +595,6 @@ export var UntagResourceResponse;
723
595
  (function (UntagResourceResponse) {
724
596
  UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
725
597
  })(UntagResourceResponse || (UntagResourceResponse = {}));
726
- export var InvalidLayerPartException;
727
- (function (InvalidLayerPartException) {
728
- InvalidLayerPartException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
729
- })(InvalidLayerPartException || (InvalidLayerPartException = {}));
730
598
  export var UploadLayerPartRequest;
731
599
  (function (UploadLayerPartRequest) {
732
600
  UploadLayerPartRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { BatchCheckLayerAvailabilityCommandInput, BatchCheckLayerAvailabilityCommandOutput } from "./commands/BatchCheckLayerAvailabilityCommand";
10
10
  import { BatchDeleteImageCommandInput, BatchDeleteImageCommandOutput } from "./commands/BatchDeleteImageCommand";
@@ -149,6 +149,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
149
149
  * @internal
150
150
  */
151
151
  defaultUserAgentProvider?: Provider<__UserAgent>;
152
+ /**
153
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
154
+ */
155
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
152
156
  }
153
157
  declare type ECRClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
154
158
  /**