@cdklabs/cdk-ecs-codedeploy 0.0.130 → 0.0.132

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.
Files changed (38) hide show
  1. package/.jsii +3 -3
  2. package/API.md +156 -0
  3. package/lib/api-canary/index.js +1 -1
  4. package/lib/ecs-appspec/index.js +1 -1
  5. package/lib/ecs-deployment/index.js +1 -1
  6. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/protocols/Aws_json1_1.js +561 -2630
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-es/protocols/Aws_json1_1.js +562 -2631
  9. package/node_modules/@aws-sdk/client-codedeploy/package.json +6 -6
  10. package/node_modules/@aws-sdk/client-sso/dist-cjs/protocols/Aws_restJson1.js +50 -94
  11. package/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js +36 -80
  12. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  13. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js +125 -172
  14. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +111 -158
  15. package/node_modules/@aws-sdk/client-sso-oidc/package.json +4 -4
  16. package/node_modules/@aws-sdk/client-sts/dist-cjs/protocols/Aws_query.js +17 -24
  17. package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +18 -25
  18. package/node_modules/@aws-sdk/client-sts/package.json +5 -5
  19. package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  20. package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  22. package/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js +7 -1
  23. package/node_modules/@aws-sdk/smithy-client/dist-cjs/index.js +1 -0
  24. package/node_modules/@aws-sdk/smithy-client/dist-cjs/serde-json.js +23 -0
  25. package/node_modules/@aws-sdk/smithy-client/dist-es/default-error-handler.js +5 -0
  26. package/node_modules/@aws-sdk/smithy-client/dist-es/index.js +1 -0
  27. package/node_modules/@aws-sdk/smithy-client/dist-es/serde-json.js +19 -0
  28. package/node_modules/@aws-sdk/smithy-client/dist-types/default-error-handler.d.ts +6 -0
  29. package/node_modules/@aws-sdk/smithy-client/dist-types/index.d.ts +1 -0
  30. package/node_modules/@aws-sdk/smithy-client/dist-types/serde-json.d.ts +10 -0
  31. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/default-error-handler.d.ts +3 -0
  32. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/index.d.ts +1 -0
  33. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/serde-json.d.ts +1 -0
  34. package/node_modules/@aws-sdk/smithy-client/package.json +1 -1
  35. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  36. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +2 -2
  37. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +2 -2
  38. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidClientMetadataException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from "../models/models_0";
4
4
  import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException";
5
5
  export const se_CreateTokenCommand = async (input, context) => {
@@ -9,16 +9,16 @@ export const se_CreateTokenCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/token";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.clientId != null && { clientId: input.clientId }),
14
- ...(input.clientSecret != null && { clientSecret: input.clientSecret }),
15
- ...(input.code != null && { code: input.code }),
16
- ...(input.deviceCode != null && { deviceCode: input.deviceCode }),
17
- ...(input.grantType != null && { grantType: input.grantType }),
18
- ...(input.redirectUri != null && { redirectUri: input.redirectUri }),
19
- ...(input.refreshToken != null && { refreshToken: input.refreshToken }),
20
- ...(input.scope != null && { scope: se_Scopes(input.scope, context) }),
21
- });
12
+ body = JSON.stringify(take(input, {
13
+ clientId: [],
14
+ clientSecret: [],
15
+ code: [],
16
+ deviceCode: [],
17
+ grantType: [],
18
+ redirectUri: [],
19
+ refreshToken: [],
20
+ scope: (_) => _json(_),
21
+ }));
22
22
  return new __HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -36,11 +36,11 @@ export const se_RegisterClientCommand = async (input, context) => {
36
36
  };
37
37
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/client/register";
38
38
  let body;
39
- body = JSON.stringify({
40
- ...(input.clientName != null && { clientName: input.clientName }),
41
- ...(input.clientType != null && { clientType: input.clientType }),
42
- ...(input.scopes != null && { scopes: se_Scopes(input.scopes, context) }),
43
- });
39
+ body = JSON.stringify(take(input, {
40
+ clientName: [],
41
+ clientType: [],
42
+ scopes: (_) => _json(_),
43
+ }));
44
44
  return new __HttpRequest({
45
45
  protocol,
46
46
  hostname,
@@ -58,11 +58,11 @@ export const se_StartDeviceAuthorizationCommand = async (input, context) => {
58
58
  };
59
59
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device_authorization";
60
60
  let body;
61
- body = JSON.stringify({
62
- ...(input.clientId != null && { clientId: input.clientId }),
63
- ...(input.clientSecret != null && { clientSecret: input.clientSecret }),
64
- ...(input.startUrl != null && { startUrl: input.startUrl }),
65
- });
61
+ body = JSON.stringify(take(input, {
62
+ clientId: [],
63
+ clientSecret: [],
64
+ startUrl: [],
65
+ }));
66
66
  return new __HttpRequest({
67
67
  protocol,
68
68
  hostname,
@@ -81,21 +81,14 @@ export const de_CreateTokenCommand = async (output, context) => {
81
81
  $metadata: deserializeMetadata(output),
82
82
  });
83
83
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
84
- if (data.accessToken != null) {
85
- contents.accessToken = __expectString(data.accessToken);
86
- }
87
- if (data.expiresIn != null) {
88
- contents.expiresIn = __expectInt32(data.expiresIn);
89
- }
90
- if (data.idToken != null) {
91
- contents.idToken = __expectString(data.idToken);
92
- }
93
- if (data.refreshToken != null) {
94
- contents.refreshToken = __expectString(data.refreshToken);
95
- }
96
- if (data.tokenType != null) {
97
- contents.tokenType = __expectString(data.tokenType);
98
- }
84
+ const doc = take(data, {
85
+ accessToken: __expectString,
86
+ expiresIn: __expectInt32,
87
+ idToken: __expectString,
88
+ refreshToken: __expectString,
89
+ tokenType: __expectString,
90
+ });
91
+ Object.assign(contents, doc);
99
92
  return contents;
100
93
  };
101
94
  const de_CreateTokenCommandError = async (output, context) => {
@@ -140,10 +133,9 @@ const de_CreateTokenCommandError = async (output, context) => {
140
133
  throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
141
134
  default:
142
135
  const parsedBody = parsedOutput.body;
143
- throwDefaultError({
136
+ return throwDefaultError({
144
137
  output,
145
138
  parsedBody,
146
- exceptionCtor: __BaseException,
147
139
  errorCode,
148
140
  });
149
141
  }
@@ -156,24 +148,15 @@ export const de_RegisterClientCommand = async (output, context) => {
156
148
  $metadata: deserializeMetadata(output),
157
149
  });
158
150
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
159
- if (data.authorizationEndpoint != null) {
160
- contents.authorizationEndpoint = __expectString(data.authorizationEndpoint);
161
- }
162
- if (data.clientId != null) {
163
- contents.clientId = __expectString(data.clientId);
164
- }
165
- if (data.clientIdIssuedAt != null) {
166
- contents.clientIdIssuedAt = __expectLong(data.clientIdIssuedAt);
167
- }
168
- if (data.clientSecret != null) {
169
- contents.clientSecret = __expectString(data.clientSecret);
170
- }
171
- if (data.clientSecretExpiresAt != null) {
172
- contents.clientSecretExpiresAt = __expectLong(data.clientSecretExpiresAt);
173
- }
174
- if (data.tokenEndpoint != null) {
175
- contents.tokenEndpoint = __expectString(data.tokenEndpoint);
176
- }
151
+ const doc = take(data, {
152
+ authorizationEndpoint: __expectString,
153
+ clientId: __expectString,
154
+ clientIdIssuedAt: __expectLong,
155
+ clientSecret: __expectString,
156
+ clientSecretExpiresAt: __expectLong,
157
+ tokenEndpoint: __expectString,
158
+ });
159
+ Object.assign(contents, doc);
177
160
  return contents;
178
161
  };
179
162
  const de_RegisterClientCommandError = async (output, context) => {
@@ -197,10 +180,9 @@ const de_RegisterClientCommandError = async (output, context) => {
197
180
  throw await de_InvalidScopeExceptionRes(parsedOutput, context);
198
181
  default:
199
182
  const parsedBody = parsedOutput.body;
200
- throwDefaultError({
183
+ return throwDefaultError({
201
184
  output,
202
185
  parsedBody,
203
- exceptionCtor: __BaseException,
204
186
  errorCode,
205
187
  });
206
188
  }
@@ -213,24 +195,15 @@ export const de_StartDeviceAuthorizationCommand = async (output, context) => {
213
195
  $metadata: deserializeMetadata(output),
214
196
  });
215
197
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
216
- if (data.deviceCode != null) {
217
- contents.deviceCode = __expectString(data.deviceCode);
218
- }
219
- if (data.expiresIn != null) {
220
- contents.expiresIn = __expectInt32(data.expiresIn);
221
- }
222
- if (data.interval != null) {
223
- contents.interval = __expectInt32(data.interval);
224
- }
225
- if (data.userCode != null) {
226
- contents.userCode = __expectString(data.userCode);
227
- }
228
- if (data.verificationUri != null) {
229
- contents.verificationUri = __expectString(data.verificationUri);
230
- }
231
- if (data.verificationUriComplete != null) {
232
- contents.verificationUriComplete = __expectString(data.verificationUriComplete);
233
- }
198
+ const doc = take(data, {
199
+ deviceCode: __expectString,
200
+ expiresIn: __expectInt32,
201
+ interval: __expectInt32,
202
+ userCode: __expectString,
203
+ verificationUri: __expectString,
204
+ verificationUriComplete: __expectString,
205
+ });
206
+ Object.assign(contents, doc);
234
207
  return contents;
235
208
  };
236
209
  const de_StartDeviceAuthorizationCommandError = async (output, context) => {
@@ -257,24 +230,22 @@ const de_StartDeviceAuthorizationCommandError = async (output, context) => {
257
230
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
258
231
  default:
259
232
  const parsedBody = parsedOutput.body;
260
- throwDefaultError({
233
+ return throwDefaultError({
261
234
  output,
262
235
  parsedBody,
263
- exceptionCtor: __BaseException,
264
236
  errorCode,
265
237
  });
266
238
  }
267
239
  };
268
- const map = __map;
240
+ const throwDefaultError = withBaseException(__BaseException);
269
241
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
270
242
  const contents = map({});
271
243
  const data = parsedOutput.body;
272
- if (data.error != null) {
273
- contents.error = __expectString(data.error);
274
- }
275
- if (data.error_description != null) {
276
- contents.error_description = __expectString(data.error_description);
277
- }
244
+ const doc = take(data, {
245
+ error: __expectString,
246
+ error_description: __expectString,
247
+ });
248
+ Object.assign(contents, doc);
278
249
  const exception = new AccessDeniedException({
279
250
  $metadata: deserializeMetadata(parsedOutput),
280
251
  ...contents,
@@ -284,12 +255,11 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
284
255
  const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
285
256
  const contents = map({});
286
257
  const data = parsedOutput.body;
287
- if (data.error != null) {
288
- contents.error = __expectString(data.error);
289
- }
290
- if (data.error_description != null) {
291
- contents.error_description = __expectString(data.error_description);
292
- }
258
+ const doc = take(data, {
259
+ error: __expectString,
260
+ error_description: __expectString,
261
+ });
262
+ Object.assign(contents, doc);
293
263
  const exception = new AuthorizationPendingException({
294
264
  $metadata: deserializeMetadata(parsedOutput),
295
265
  ...contents,
@@ -299,12 +269,11 @@ const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
299
269
  const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
300
270
  const contents = map({});
301
271
  const data = parsedOutput.body;
302
- if (data.error != null) {
303
- contents.error = __expectString(data.error);
304
- }
305
- if (data.error_description != null) {
306
- contents.error_description = __expectString(data.error_description);
307
- }
272
+ const doc = take(data, {
273
+ error: __expectString,
274
+ error_description: __expectString,
275
+ });
276
+ Object.assign(contents, doc);
308
277
  const exception = new ExpiredTokenException({
309
278
  $metadata: deserializeMetadata(parsedOutput),
310
279
  ...contents,
@@ -314,12 +283,11 @@ const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
314
283
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
315
284
  const contents = map({});
316
285
  const data = parsedOutput.body;
317
- if (data.error != null) {
318
- contents.error = __expectString(data.error);
319
- }
320
- if (data.error_description != null) {
321
- contents.error_description = __expectString(data.error_description);
322
- }
286
+ const doc = take(data, {
287
+ error: __expectString,
288
+ error_description: __expectString,
289
+ });
290
+ Object.assign(contents, doc);
323
291
  const exception = new InternalServerException({
324
292
  $metadata: deserializeMetadata(parsedOutput),
325
293
  ...contents,
@@ -329,12 +297,11 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
329
297
  const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
330
298
  const contents = map({});
331
299
  const data = parsedOutput.body;
332
- if (data.error != null) {
333
- contents.error = __expectString(data.error);
334
- }
335
- if (data.error_description != null) {
336
- contents.error_description = __expectString(data.error_description);
337
- }
300
+ const doc = take(data, {
301
+ error: __expectString,
302
+ error_description: __expectString,
303
+ });
304
+ Object.assign(contents, doc);
338
305
  const exception = new InvalidClientException({
339
306
  $metadata: deserializeMetadata(parsedOutput),
340
307
  ...contents,
@@ -344,12 +311,11 @@ const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
344
311
  const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
345
312
  const contents = map({});
346
313
  const data = parsedOutput.body;
347
- if (data.error != null) {
348
- contents.error = __expectString(data.error);
349
- }
350
- if (data.error_description != null) {
351
- contents.error_description = __expectString(data.error_description);
352
- }
314
+ const doc = take(data, {
315
+ error: __expectString,
316
+ error_description: __expectString,
317
+ });
318
+ Object.assign(contents, doc);
353
319
  const exception = new InvalidClientMetadataException({
354
320
  $metadata: deserializeMetadata(parsedOutput),
355
321
  ...contents,
@@ -359,12 +325,11 @@ const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
359
325
  const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
360
326
  const contents = map({});
361
327
  const data = parsedOutput.body;
362
- if (data.error != null) {
363
- contents.error = __expectString(data.error);
364
- }
365
- if (data.error_description != null) {
366
- contents.error_description = __expectString(data.error_description);
367
- }
328
+ const doc = take(data, {
329
+ error: __expectString,
330
+ error_description: __expectString,
331
+ });
332
+ Object.assign(contents, doc);
368
333
  const exception = new InvalidGrantException({
369
334
  $metadata: deserializeMetadata(parsedOutput),
370
335
  ...contents,
@@ -374,12 +339,11 @@ const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
374
339
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
375
340
  const contents = map({});
376
341
  const data = parsedOutput.body;
377
- if (data.error != null) {
378
- contents.error = __expectString(data.error);
379
- }
380
- if (data.error_description != null) {
381
- contents.error_description = __expectString(data.error_description);
382
- }
342
+ const doc = take(data, {
343
+ error: __expectString,
344
+ error_description: __expectString,
345
+ });
346
+ Object.assign(contents, doc);
383
347
  const exception = new InvalidRequestException({
384
348
  $metadata: deserializeMetadata(parsedOutput),
385
349
  ...contents,
@@ -389,12 +353,11 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
389
353
  const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
390
354
  const contents = map({});
391
355
  const data = parsedOutput.body;
392
- if (data.error != null) {
393
- contents.error = __expectString(data.error);
394
- }
395
- if (data.error_description != null) {
396
- contents.error_description = __expectString(data.error_description);
397
- }
356
+ const doc = take(data, {
357
+ error: __expectString,
358
+ error_description: __expectString,
359
+ });
360
+ Object.assign(contents, doc);
398
361
  const exception = new InvalidScopeException({
399
362
  $metadata: deserializeMetadata(parsedOutput),
400
363
  ...contents,
@@ -404,12 +367,11 @@ const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
404
367
  const de_SlowDownExceptionRes = async (parsedOutput, context) => {
405
368
  const contents = map({});
406
369
  const data = parsedOutput.body;
407
- if (data.error != null) {
408
- contents.error = __expectString(data.error);
409
- }
410
- if (data.error_description != null) {
411
- contents.error_description = __expectString(data.error_description);
412
- }
370
+ const doc = take(data, {
371
+ error: __expectString,
372
+ error_description: __expectString,
373
+ });
374
+ Object.assign(contents, doc);
413
375
  const exception = new SlowDownException({
414
376
  $metadata: deserializeMetadata(parsedOutput),
415
377
  ...contents,
@@ -419,12 +381,11 @@ const de_SlowDownExceptionRes = async (parsedOutput, context) => {
419
381
  const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
420
382
  const contents = map({});
421
383
  const data = parsedOutput.body;
422
- if (data.error != null) {
423
- contents.error = __expectString(data.error);
424
- }
425
- if (data.error_description != null) {
426
- contents.error_description = __expectString(data.error_description);
427
- }
384
+ const doc = take(data, {
385
+ error: __expectString,
386
+ error_description: __expectString,
387
+ });
388
+ Object.assign(contents, doc);
428
389
  const exception = new UnauthorizedClientException({
429
390
  $metadata: deserializeMetadata(parsedOutput),
430
391
  ...contents,
@@ -434,25 +395,17 @@ const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
434
395
  const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
435
396
  const contents = map({});
436
397
  const data = parsedOutput.body;
437
- if (data.error != null) {
438
- contents.error = __expectString(data.error);
439
- }
440
- if (data.error_description != null) {
441
- contents.error_description = __expectString(data.error_description);
442
- }
398
+ const doc = take(data, {
399
+ error: __expectString,
400
+ error_description: __expectString,
401
+ });
402
+ Object.assign(contents, doc);
443
403
  const exception = new UnsupportedGrantTypeException({
444
404
  $metadata: deserializeMetadata(parsedOutput),
445
405
  ...contents,
446
406
  });
447
407
  return __decorateServiceException(exception, parsedOutput.body);
448
408
  };
449
- const se_Scopes = (input, context) => {
450
- return input
451
- .filter((e) => e != null)
452
- .map((entry) => {
453
- return entry;
454
- });
455
- };
456
409
  const deserializeMetadata = (output) => ({
457
410
  httpStatusCode: output.statusCode,
458
411
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sso-oidc",
3
3
  "description": "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -37,14 +37,14 @@
37
37
  "@aws-sdk/node-config-provider": "3.310.0",
38
38
  "@aws-sdk/node-http-handler": "3.310.0",
39
39
  "@aws-sdk/protocol-http": "3.310.0",
40
- "@aws-sdk/smithy-client": "3.310.0",
40
+ "@aws-sdk/smithy-client": "3.315.0",
41
41
  "@aws-sdk/types": "3.310.0",
42
42
  "@aws-sdk/url-parser": "3.310.0",
43
43
  "@aws-sdk/util-base64": "3.310.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.310.0",
45
45
  "@aws-sdk/util-body-length-node": "3.310.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
48
48
  "@aws-sdk/util-endpoints": "3.310.0",
49
49
  "@aws-sdk/util-retry": "3.310.0",
50
50
  "@aws-sdk/util-user-agent-browser": "3.310.0",
@@ -105,7 +105,7 @@ const de_AssumeRoleCommand = async (output, context) => {
105
105
  $metadata: deserializeMetadata(output),
106
106
  ...contents,
107
107
  };
108
- return Promise.resolve(response);
108
+ return response;
109
109
  };
110
110
  exports.de_AssumeRoleCommand = de_AssumeRoleCommand;
111
111
  const de_AssumeRoleCommandError = async (output, context) => {
@@ -129,10 +129,9 @@ const de_AssumeRoleCommandError = async (output, context) => {
129
129
  throw await de_RegionDisabledExceptionRes(parsedOutput, context);
130
130
  default:
131
131
  const parsedBody = parsedOutput.body;
132
- (0, smithy_client_1.throwDefaultError)({
132
+ return throwDefaultError({
133
133
  output,
134
134
  parsedBody: parsedBody.Error,
135
- exceptionCtor: STSServiceException_1.STSServiceException,
136
135
  errorCode,
137
136
  });
138
137
  }
@@ -148,7 +147,7 @@ const de_AssumeRoleWithSAMLCommand = async (output, context) => {
148
147
  $metadata: deserializeMetadata(output),
149
148
  ...contents,
150
149
  };
151
- return Promise.resolve(response);
150
+ return response;
152
151
  };
153
152
  exports.de_AssumeRoleWithSAMLCommand = de_AssumeRoleWithSAMLCommand;
154
153
  const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
@@ -178,10 +177,9 @@ const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
178
177
  throw await de_RegionDisabledExceptionRes(parsedOutput, context);
179
178
  default:
180
179
  const parsedBody = parsedOutput.body;
181
- (0, smithy_client_1.throwDefaultError)({
180
+ return throwDefaultError({
182
181
  output,
183
182
  parsedBody: parsedBody.Error,
184
- exceptionCtor: STSServiceException_1.STSServiceException,
185
183
  errorCode,
186
184
  });
187
185
  }
@@ -197,7 +195,7 @@ const de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
197
195
  $metadata: deserializeMetadata(output),
198
196
  ...contents,
199
197
  };
200
- return Promise.resolve(response);
198
+ return response;
201
199
  };
202
200
  exports.de_AssumeRoleWithWebIdentityCommand = de_AssumeRoleWithWebIdentityCommand;
203
201
  const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
@@ -230,10 +228,9 @@ const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
230
228
  throw await de_RegionDisabledExceptionRes(parsedOutput, context);
231
229
  default:
232
230
  const parsedBody = parsedOutput.body;
233
- (0, smithy_client_1.throwDefaultError)({
231
+ return throwDefaultError({
234
232
  output,
235
233
  parsedBody: parsedBody.Error,
236
- exceptionCtor: STSServiceException_1.STSServiceException,
237
234
  errorCode,
238
235
  });
239
236
  }
@@ -249,7 +246,7 @@ const de_DecodeAuthorizationMessageCommand = async (output, context) => {
249
246
  $metadata: deserializeMetadata(output),
250
247
  ...contents,
251
248
  };
252
- return Promise.resolve(response);
249
+ return response;
253
250
  };
254
251
  exports.de_DecodeAuthorizationMessageCommand = de_DecodeAuthorizationMessageCommand;
255
252
  const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
@@ -264,10 +261,9 @@ const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
264
261
  throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
265
262
  default:
266
263
  const parsedBody = parsedOutput.body;
267
- (0, smithy_client_1.throwDefaultError)({
264
+ return throwDefaultError({
268
265
  output,
269
266
  parsedBody: parsedBody.Error,
270
- exceptionCtor: STSServiceException_1.STSServiceException,
271
267
  errorCode,
272
268
  });
273
269
  }
@@ -283,7 +279,7 @@ const de_GetAccessKeyInfoCommand = async (output, context) => {
283
279
  $metadata: deserializeMetadata(output),
284
280
  ...contents,
285
281
  };
286
- return Promise.resolve(response);
282
+ return response;
287
283
  };
288
284
  exports.de_GetAccessKeyInfoCommand = de_GetAccessKeyInfoCommand;
289
285
  const de_GetAccessKeyInfoCommandError = async (output, context) => {
@@ -293,10 +289,9 @@ const de_GetAccessKeyInfoCommandError = async (output, context) => {
293
289
  };
294
290
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
295
291
  const parsedBody = parsedOutput.body;
296
- (0, smithy_client_1.throwDefaultError)({
292
+ return throwDefaultError({
297
293
  output,
298
294
  parsedBody: parsedBody.Error,
299
- exceptionCtor: STSServiceException_1.STSServiceException,
300
295
  errorCode,
301
296
  });
302
297
  };
@@ -311,7 +306,7 @@ const de_GetCallerIdentityCommand = async (output, context) => {
311
306
  $metadata: deserializeMetadata(output),
312
307
  ...contents,
313
308
  };
314
- return Promise.resolve(response);
309
+ return response;
315
310
  };
316
311
  exports.de_GetCallerIdentityCommand = de_GetCallerIdentityCommand;
317
312
  const de_GetCallerIdentityCommandError = async (output, context) => {
@@ -321,10 +316,9 @@ const de_GetCallerIdentityCommandError = async (output, context) => {
321
316
  };
322
317
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
323
318
  const parsedBody = parsedOutput.body;
324
- (0, smithy_client_1.throwDefaultError)({
319
+ return throwDefaultError({
325
320
  output,
326
321
  parsedBody: parsedBody.Error,
327
- exceptionCtor: STSServiceException_1.STSServiceException,
328
322
  errorCode,
329
323
  });
330
324
  };
@@ -339,7 +333,7 @@ const de_GetFederationTokenCommand = async (output, context) => {
339
333
  $metadata: deserializeMetadata(output),
340
334
  ...contents,
341
335
  };
342
- return Promise.resolve(response);
336
+ return response;
343
337
  };
344
338
  exports.de_GetFederationTokenCommand = de_GetFederationTokenCommand;
345
339
  const de_GetFederationTokenCommandError = async (output, context) => {
@@ -360,10 +354,9 @@ const de_GetFederationTokenCommandError = async (output, context) => {
360
354
  throw await de_RegionDisabledExceptionRes(parsedOutput, context);
361
355
  default:
362
356
  const parsedBody = parsedOutput.body;
363
- (0, smithy_client_1.throwDefaultError)({
357
+ return throwDefaultError({
364
358
  output,
365
359
  parsedBody: parsedBody.Error,
366
- exceptionCtor: STSServiceException_1.STSServiceException,
367
360
  errorCode,
368
361
  });
369
362
  }
@@ -379,7 +372,7 @@ const de_GetSessionTokenCommand = async (output, context) => {
379
372
  $metadata: deserializeMetadata(output),
380
373
  ...contents,
381
374
  };
382
- return Promise.resolve(response);
375
+ return response;
383
376
  };
384
377
  exports.de_GetSessionTokenCommand = de_GetSessionTokenCommand;
385
378
  const de_GetSessionTokenCommandError = async (output, context) => {
@@ -394,10 +387,9 @@ const de_GetSessionTokenCommandError = async (output, context) => {
394
387
  throw await de_RegionDisabledExceptionRes(parsedOutput, context);
395
388
  default:
396
389
  const parsedBody = parsedOutput.body;
397
- (0, smithy_client_1.throwDefaultError)({
390
+ return throwDefaultError({
398
391
  output,
399
392
  parsedBody: parsedBody.Error,
400
- exceptionCtor: STSServiceException_1.STSServiceException,
401
393
  errorCode,
402
394
  });
403
395
  }
@@ -940,6 +932,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
940
932
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
941
933
  };
942
934
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
935
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(STSServiceException_1.STSServiceException);
943
936
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
944
937
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
945
938
  const contents = {