@cdk8s/awscdk-resolver 0.0.536 → 0.0.538

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 (87) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
  4. package/node_modules/@aws-sdk/core/dist-cjs/index.js +52 -50
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +52 -50
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +11 -10
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +4 -1
  8. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +4 -5
  9. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -1
  10. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +9 -7
  11. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +17 -17
  12. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -8
  13. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -1
  14. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
  15. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +1 -1
  16. package/node_modules/@aws-sdk/core/package.json +11 -11
  17. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  18. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  19. package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
  20. package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
  21. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  22. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  23. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  24. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  25. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  26. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  27. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  28. package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
  29. package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
  30. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  31. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  32. package/node_modules/@aws-sdk/types/package.json +2 -2
  33. package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
  34. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  35. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  36. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  37. package/node_modules/@smithy/config-resolver/package.json +5 -5
  38. package/node_modules/@smithy/core/package.json +7 -7
  39. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  40. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  41. package/node_modules/@smithy/hash-node/package.json +2 -2
  42. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  43. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  44. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  45. package/node_modules/@smithy/middleware-retry/package.json +9 -9
  46. package/node_modules/@smithy/middleware-serde/package.json +4 -4
  47. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  48. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  49. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +6 -6
  50. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
  51. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +5 -5
  52. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +14 -1
  53. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  54. package/node_modules/@smithy/property-provider/package.json +2 -2
  55. package/node_modules/@smithy/protocol-http/package.json +2 -2
  56. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  57. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  58. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  59. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  60. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +11 -5
  61. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +11 -5
  62. package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +3 -3
  63. package/node_modules/@smithy/signature-v4/package.json +4 -4
  64. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +8 -1
  65. package/node_modules/@smithy/smithy-client/dist-es/command.js +8 -1
  66. package/node_modules/@smithy/smithy-client/package.json +7 -7
  67. package/node_modules/@smithy/types/dist-types/connection/config.d.ts +5 -0
  68. package/node_modules/@smithy/types/dist-types/signature.d.ts +20 -3
  69. package/node_modules/@smithy/types/package.json +1 -1
  70. package/node_modules/@smithy/url-parser/package.json +3 -3
  71. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  72. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  73. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +15 -19
  74. package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +4 -3
  75. package/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +2 -1
  76. package/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +8 -13
  77. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +1 -1
  78. package/node_modules/@smithy/util-endpoints/dist-types/bdd/BinaryDecisionDiagram.d.ts +2 -2
  79. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  80. package/node_modules/@smithy/util-middleware/package.json +2 -2
  81. package/node_modules/@smithy/util-retry/package.json +3 -3
  82. package/node_modules/@smithy/util-stream/package.json +4 -4
  83. package/node_modules/@smithy/util-waiter/package.json +3 -3
  84. package/node_modules/fast-xml-builder/package.json +1 -1
  85. package/node_modules/fast-xml-builder/src/fxb.js +6 -2
  86. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +16 -2
  87. package/package.json +4 -4
package/.jsii CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://aws.amazon.com"
8
8
  },
9
9
  "bundled": {
10
- "@aws-sdk/client-cloudformation": "^3.1030.0"
10
+ "@aws-sdk/client-cloudformation": "^3.1032.0"
11
11
  },
12
12
  "dependencies": {
13
13
  "aws-cdk-lib": "^2.195.0",
@@ -4082,6 +4082,6 @@
4082
4082
  "symbolId": "src/resolve:AwsCdkResolver"
4083
4083
  }
4084
4084
  },
4085
- "version": "0.0.536",
4086
- "fingerprint": "1ducMRHR8fOS7bsULQVYCZpPWGDTkm8O6BqfRKyKMZw="
4085
+ "version": "0.0.538",
4086
+ "fingerprint": "M9qFlp1B5MqncxLo7oUHsmp7ZTrF7ABeiM4IN27yQuk="
4087
4087
  }
package/lib/resolve.js CHANGED
@@ -61,5 +61,5 @@ class AwsCdkResolver {
61
61
  }
62
62
  exports.AwsCdkResolver = AwsCdkResolver;
63
63
  _a = JSII_RTTI_SYMBOL_1;
64
- AwsCdkResolver[_a] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.536" };
64
+ AwsCdkResolver[_a] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.538" };
65
65
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yZXNvbHZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsaURBQTZDO0FBQzdDLDZCQUE2QjtBQUM3Qiw2Q0F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5vbmUgb2YgdGhlIHRva2VucyBjb21wcmlzaW5nIHRoZSB2YWx1ZSBhcmUgYSBSZWZlcmVuY2UuXG4gICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gZmluZCBvdXRwdXQgZGVmaW5lZCBmb3IgJHt2YWx1ZX0gKEluc3BlY3RlZCBzdGFja3M6ICR7aW5zcGVjdGVkU3RhY2tzLm1hcChzID0+IHMuc3RhY2tOYW1lKS5qb2luKCcsJyl9KWApO1xuXG4gIH1cblxuICBwcml2YXRlIGZldGNoT3V0cHV0VmFsdWUob3V0cHV0OiBDZm5PdXRwdXQpIHtcblxuICAgIGNvbnN0IHNjcmlwdCA9IHBhdGguam9pbihfX2Rpcm5hbWUsICcuLicsICdsaWInLCAnZmV0Y2gtb3V0cHV0LXZhbHVlLmpzJyk7XG4gICAgcmV0dXJuIEpTT04ucGFyc2UoZXhlY0ZpbGVTeW5jKHByb2Nlc3MuZXhlY1BhdGgsIFtcbiAgICAgIHNjcmlwdCxcbiAgICAgIFN0YWNrLm9mKG91dHB1dCkuc3RhY2tOYW1lLFxuICAgICAgb3V0cHV0Lm5vZGUuaWQsXG4gICAgXSwgeyBlbmNvZGluZzogJ3V0Zi04Jywgc3RkaW86IFsncGlwZSddIH0pLnRvU3RyaW5nKCkudHJpbSgpKTtcblxuICB9XG5cbn1cbiJdfQ==
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudformation",
3
3
  "description": "AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native",
4
- "version": "3.1030.0",
4
+ "version": "3.1032.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-cloudformation",
@@ -23,43 +23,43 @@
23
23
  "dependencies": {
24
24
  "@aws-crypto/sha256-browser": "5.2.0",
25
25
  "@aws-crypto/sha256-js": "5.2.0",
26
- "@aws-sdk/core": "^3.973.27",
27
- "@aws-sdk/credential-provider-node": "^3.972.30",
28
- "@aws-sdk/middleware-host-header": "^3.972.9",
29
- "@aws-sdk/middleware-logger": "^3.972.9",
30
- "@aws-sdk/middleware-recursion-detection": "^3.972.10",
31
- "@aws-sdk/middleware-user-agent": "^3.972.29",
32
- "@aws-sdk/region-config-resolver": "^3.972.11",
33
- "@aws-sdk/types": "^3.973.7",
34
- "@aws-sdk/util-endpoints": "^3.996.6",
35
- "@aws-sdk/util-user-agent-browser": "^3.972.9",
36
- "@aws-sdk/util-user-agent-node": "^3.973.15",
37
- "@smithy/config-resolver": "^4.4.14",
38
- "@smithy/core": "^3.23.14",
39
- "@smithy/fetch-http-handler": "^5.3.16",
40
- "@smithy/hash-node": "^4.2.13",
41
- "@smithy/invalid-dependency": "^4.2.13",
42
- "@smithy/middleware-content-length": "^4.2.13",
43
- "@smithy/middleware-endpoint": "^4.4.29",
44
- "@smithy/middleware-retry": "^4.5.0",
45
- "@smithy/middleware-serde": "^4.2.17",
46
- "@smithy/middleware-stack": "^4.2.13",
47
- "@smithy/node-config-provider": "^4.3.13",
48
- "@smithy/node-http-handler": "^4.5.2",
49
- "@smithy/protocol-http": "^5.3.13",
50
- "@smithy/smithy-client": "^4.12.9",
51
- "@smithy/types": "^4.14.0",
52
- "@smithy/url-parser": "^4.2.13",
26
+ "@aws-sdk/core": "^3.974.1",
27
+ "@aws-sdk/credential-provider-node": "^3.972.32",
28
+ "@aws-sdk/middleware-host-header": "^3.972.10",
29
+ "@aws-sdk/middleware-logger": "^3.972.10",
30
+ "@aws-sdk/middleware-recursion-detection": "^3.972.11",
31
+ "@aws-sdk/middleware-user-agent": "^3.972.31",
32
+ "@aws-sdk/region-config-resolver": "^3.972.12",
33
+ "@aws-sdk/types": "^3.973.8",
34
+ "@aws-sdk/util-endpoints": "^3.996.7",
35
+ "@aws-sdk/util-user-agent-browser": "^3.972.10",
36
+ "@aws-sdk/util-user-agent-node": "^3.973.17",
37
+ "@smithy/config-resolver": "^4.4.16",
38
+ "@smithy/core": "^3.23.15",
39
+ "@smithy/fetch-http-handler": "^5.3.17",
40
+ "@smithy/hash-node": "^4.2.14",
41
+ "@smithy/invalid-dependency": "^4.2.14",
42
+ "@smithy/middleware-content-length": "^4.2.14",
43
+ "@smithy/middleware-endpoint": "^4.4.30",
44
+ "@smithy/middleware-retry": "^4.5.3",
45
+ "@smithy/middleware-serde": "^4.2.18",
46
+ "@smithy/middleware-stack": "^4.2.14",
47
+ "@smithy/node-config-provider": "^4.3.14",
48
+ "@smithy/node-http-handler": "^4.5.3",
49
+ "@smithy/protocol-http": "^5.3.14",
50
+ "@smithy/smithy-client": "^4.12.11",
51
+ "@smithy/types": "^4.14.1",
52
+ "@smithy/url-parser": "^4.2.14",
53
53
  "@smithy/util-base64": "^4.3.2",
54
54
  "@smithy/util-body-length-browser": "^4.2.2",
55
55
  "@smithy/util-body-length-node": "^4.2.3",
56
- "@smithy/util-defaults-mode-browser": "^4.3.45",
57
- "@smithy/util-defaults-mode-node": "^4.2.49",
58
- "@smithy/util-endpoints": "^3.3.4",
59
- "@smithy/util-middleware": "^4.2.13",
60
- "@smithy/util-retry": "^4.3.0",
56
+ "@smithy/util-defaults-mode-browser": "^4.3.47",
57
+ "@smithy/util-defaults-mode-node": "^4.2.52",
58
+ "@smithy/util-endpoints": "^3.4.1",
59
+ "@smithy/util-middleware": "^4.2.14",
60
+ "@smithy/util-retry": "^4.3.2",
61
61
  "@smithy/util-utf8": "^4.2.2",
62
- "@smithy/util-waiter": "^4.2.15",
62
+ "@smithy/util-waiter": "^4.2.16",
63
63
  "tslib": "^2.6.2"
64
64
  },
65
65
  "devDependencies": {
@@ -450,12 +450,11 @@ class ProtocolLib {
450
450
  if (msg) {
451
451
  error.message = msg;
452
452
  }
453
- error.Error = {
454
- ...error.Error,
455
- Type: error.Error?.Type,
456
- Code: error.Error?.Code,
457
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
458
- };
453
+ const errorObj = error.Error ?? {};
454
+ errorObj.Type = error.Error?.Type;
455
+ errorObj.Code = error.Error?.Code;
456
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
457
+ error.Error = errorObj;
459
458
  const reqId = error.$metadata.requestId;
460
459
  if (reqId) {
461
460
  error.RequestId = reqId;
@@ -468,14 +467,16 @@ class ProtocolLib {
468
467
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
469
468
  if (output !== undefined && queryErrorHeader != null) {
470
469
  const [Code, Type] = queryErrorHeader.split(";");
471
- const entries = Object.entries(output);
470
+ const keys = Object.keys(output);
472
471
  const Error = {
473
472
  Code,
474
473
  Type,
475
474
  };
476
- Object.assign(output, Error);
477
- for (const [k, v] of entries) {
478
- Error[k === "message" ? "Message" : k] = v;
475
+ output.Code = Code;
476
+ output.Type = Type;
477
+ for (let i = 0; i < keys.length; i++) {
478
+ const k = keys[i];
479
+ Error[k === "message" ? "Message" : k] = output[k];
479
480
  }
480
481
  delete Error.__type;
481
482
  output.Error = Error;
@@ -614,7 +615,10 @@ class UnionSerde {
614
615
  constructor(from, to) {
615
616
  this.from = from;
616
617
  this.to = to;
617
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
618
+ const keys = Object.keys(this.from);
619
+ const set = new Set(keys);
620
+ set.delete("__type");
621
+ this.keys = set;
618
622
  }
619
623
  mark(key) {
620
624
  this.keys.delete(key);
@@ -672,24 +676,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
672
676
  value.message = value.message ?? value.Message;
673
677
  return value;
674
678
  };
679
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
680
+ const sanitizeErrorCode = (rawValue) => {
681
+ let cleanValue = rawValue;
682
+ if (typeof cleanValue === "number") {
683
+ cleanValue = cleanValue.toString();
684
+ }
685
+ if (cleanValue.indexOf(",") >= 0) {
686
+ cleanValue = cleanValue.split(",")[0];
687
+ }
688
+ if (cleanValue.indexOf(":") >= 0) {
689
+ cleanValue = cleanValue.split(":")[0];
690
+ }
691
+ if (cleanValue.indexOf("#") >= 0) {
692
+ cleanValue = cleanValue.split("#")[1];
693
+ }
694
+ return cleanValue;
695
+ };
675
696
  const loadRestJsonErrorCode = (output, data) => {
676
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
677
- const sanitizeErrorCode = (rawValue) => {
678
- let cleanValue = rawValue;
679
- if (typeof cleanValue === "number") {
680
- cleanValue = cleanValue.toString();
681
- }
682
- if (cleanValue.indexOf(",") >= 0) {
683
- cleanValue = cleanValue.split(",")[0];
684
- }
685
- if (cleanValue.indexOf(":") >= 0) {
686
- cleanValue = cleanValue.split(":")[0];
687
- }
688
- if (cleanValue.indexOf("#") >= 0) {
689
- cleanValue = cleanValue.split("#")[1];
690
- }
691
- return cleanValue;
692
- };
693
697
  const headerKey = findKey(output.headers, "x-amzn-errortype");
694
698
  if (headerKey !== undefined) {
695
699
  return sanitizeErrorCode(output.headers[headerKey]);
@@ -906,12 +910,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
906
910
  this.rootSchema = schema.NormalizedSchema.of(schema$1);
907
911
  this.buffer = this._write(this.rootSchema, value);
908
912
  }
909
- writeDiscriminatedDocument(schema$1, value) {
910
- this.write(schema$1, value);
911
- if (typeof this.buffer === "object") {
912
- this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
913
- }
914
- }
915
913
  flush() {
916
914
  const { rootSchema, useReplacer } = this;
917
915
  this.rootSchema = undefined;
@@ -925,6 +923,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
925
923
  }
926
924
  return this.buffer;
927
925
  }
926
+ writeDiscriminatedDocument(schema$1, value) {
927
+ this.write(schema$1, value);
928
+ if (typeof this.buffer === "object") {
929
+ this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
930
+ }
931
+ }
928
932
  _write(schema$1, value, container) {
929
933
  const isObject = value !== null && typeof value === "object";
930
934
  const ns = schema.NormalizedSchema.of(schema$1);
@@ -937,6 +941,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
937
941
  if (jsonName) {
938
942
  nameMap = {};
939
943
  }
944
+ let outCount = 0;
940
945
  for (const [memberName, memberSchema] of ns.structIterator()) {
941
946
  const serializableValue = this._write(memberSchema, record[memberName], ns);
942
947
  if (serializableValue !== undefined) {
@@ -946,9 +951,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
946
951
  nameMap[memberName] = targetKey;
947
952
  }
948
953
  out[targetKey] = serializableValue;
954
+ outCount++;
949
955
  }
950
956
  }
951
- if (ns.isUnionSchema() && Object.keys(out).length === 0) {
957
+ if (ns.isUnionSchema() && outCount === 0) {
952
958
  const { $unknown } = record;
953
959
  if (Array.isArray($unknown)) {
954
960
  const [k, v] = $unknown;
@@ -1114,10 +1120,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
1114
1120
  if (!request.path.endsWith("/")) {
1115
1121
  request.path += "/";
1116
1122
  }
1117
- Object.assign(request.headers, {
1118
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
1119
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
1120
- });
1123
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
1124
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
1121
1125
  if (this.awsQueryCompatible) {
1122
1126
  request.headers["x-amzn-query-mode"] = "true";
1123
1127
  }
@@ -1141,9 +1145,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
1141
1145
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
1142
1146
  const exception = new ErrorCtor(message);
1143
1147
  const output = {};
1148
+ const errorDeserializer = this.codec.createDeserializer();
1144
1149
  for (const [name, member] of ns.structIterator()) {
1145
1150
  if (dataObject[name] != null) {
1146
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
1151
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
1147
1152
  }
1148
1153
  }
1149
1154
  if (this.awsQueryCompatible) {
@@ -1264,9 +1269,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
1264
1269
  const exception = new ErrorCtor(message);
1265
1270
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
1266
1271
  const output = {};
1272
+ const errorDeserializer = this.codec.createDeserializer();
1267
1273
  for (const [name, member] of ns.structIterator()) {
1268
1274
  const target = member.getMergedTraits().jsonName ?? name;
1269
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
1275
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
1270
1276
  }
1271
1277
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
1272
1278
  $fault: ns.getMergedTraits().error,
@@ -1657,9 +1663,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1657
1663
  if (!request.path.endsWith("/")) {
1658
1664
  request.path += "/";
1659
1665
  }
1660
- Object.assign(request.headers, {
1661
- "content-type": `application/x-www-form-urlencoded`,
1662
- });
1666
+ request.headers["content-type"] = "application/x-www-form-urlencoded";
1663
1667
  if (schema.deref(operationSchema.input) === "unit" || !request.body) {
1664
1668
  request.body = "";
1665
1669
  }
@@ -1692,11 +1696,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1692
1696
  if (bytes.byteLength > 0) {
1693
1697
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
1694
1698
  }
1695
- const output = {
1696
- $metadata: this.deserializeMetadata(response),
1697
- ...dataObject,
1698
- };
1699
- return output;
1699
+ dataObject.$metadata = this.deserializeMetadata(response);
1700
+ return dataObject;
1700
1701
  }
1701
1702
  useNestedResult() {
1702
1703
  return true;
@@ -2196,10 +2197,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
2196
2197
  const exception = new ErrorCtor(message);
2197
2198
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
2198
2199
  const output = {};
2200
+ const errorDeserializer = this.codec.createDeserializer();
2199
2201
  for (const [name, member] of ns.structIterator()) {
2200
2202
  const target = member.getMergedTraits().xmlName ?? name;
2201
2203
  const value = dataObject.Error?.[target] ?? dataObject[target];
2202
- output[name] = this.codec.createDeserializer().readSchema(member, value);
2204
+ output[name] = errorDeserializer.readSchema(member, value);
2203
2205
  }
2204
2206
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
2205
2207
  $fault: ns.getMergedTraits().error,
@@ -96,12 +96,11 @@ class ProtocolLib {
96
96
  if (msg) {
97
97
  error.message = msg;
98
98
  }
99
- error.Error = {
100
- ...error.Error,
101
- Type: error.Error?.Type,
102
- Code: error.Error?.Code,
103
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
104
- };
99
+ const errorObj = error.Error ?? {};
100
+ errorObj.Type = error.Error?.Type;
101
+ errorObj.Code = error.Error?.Code;
102
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
103
+ error.Error = errorObj;
105
104
  const reqId = error.$metadata.requestId;
106
105
  if (reqId) {
107
106
  error.RequestId = reqId;
@@ -114,14 +113,16 @@ class ProtocolLib {
114
113
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
115
114
  if (output !== undefined && queryErrorHeader != null) {
116
115
  const [Code, Type] = queryErrorHeader.split(";");
117
- const entries = Object.entries(output);
116
+ const keys = Object.keys(output);
118
117
  const Error = {
119
118
  Code,
120
119
  Type,
121
120
  };
122
- Object.assign(output, Error);
123
- for (const [k, v] of entries) {
124
- Error[k === "message" ? "Message" : k] = v;
121
+ output.Code = Code;
122
+ output.Type = Type;
123
+ for (let i = 0; i < keys.length; i++) {
124
+ const k = keys[i];
125
+ Error[k === "message" ? "Message" : k] = output[k];
125
126
  }
126
127
  delete Error.__type;
127
128
  output.Error = Error;
@@ -260,7 +261,10 @@ class UnionSerde {
260
261
  constructor(from, to) {
261
262
  this.from = from;
262
263
  this.to = to;
263
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
264
+ const keys = Object.keys(this.from);
265
+ const set = new Set(keys);
266
+ set.delete("__type");
267
+ this.keys = set;
264
268
  }
265
269
  mark(key) {
266
270
  this.keys.delete(key);
@@ -318,24 +322,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
318
322
  value.message = value.message ?? value.Message;
319
323
  return value;
320
324
  };
325
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
326
+ const sanitizeErrorCode = (rawValue) => {
327
+ let cleanValue = rawValue;
328
+ if (typeof cleanValue === "number") {
329
+ cleanValue = cleanValue.toString();
330
+ }
331
+ if (cleanValue.indexOf(",") >= 0) {
332
+ cleanValue = cleanValue.split(",")[0];
333
+ }
334
+ if (cleanValue.indexOf(":") >= 0) {
335
+ cleanValue = cleanValue.split(":")[0];
336
+ }
337
+ if (cleanValue.indexOf("#") >= 0) {
338
+ cleanValue = cleanValue.split("#")[1];
339
+ }
340
+ return cleanValue;
341
+ };
321
342
  const loadRestJsonErrorCode = (output, data) => {
322
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
323
- const sanitizeErrorCode = (rawValue) => {
324
- let cleanValue = rawValue;
325
- if (typeof cleanValue === "number") {
326
- cleanValue = cleanValue.toString();
327
- }
328
- if (cleanValue.indexOf(",") >= 0) {
329
- cleanValue = cleanValue.split(",")[0];
330
- }
331
- if (cleanValue.indexOf(":") >= 0) {
332
- cleanValue = cleanValue.split(":")[0];
333
- }
334
- if (cleanValue.indexOf("#") >= 0) {
335
- cleanValue = cleanValue.split("#")[1];
336
- }
337
- return cleanValue;
338
- };
339
343
  const headerKey = findKey(output.headers, "x-amzn-errortype");
340
344
  if (headerKey !== undefined) {
341
345
  return sanitizeErrorCode(output.headers[headerKey]);
@@ -552,12 +556,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
552
556
  this.rootSchema = schema.NormalizedSchema.of(schema$1);
553
557
  this.buffer = this._write(this.rootSchema, value);
554
558
  }
555
- writeDiscriminatedDocument(schema$1, value) {
556
- this.write(schema$1, value);
557
- if (typeof this.buffer === "object") {
558
- this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
559
- }
560
- }
561
559
  flush() {
562
560
  const { rootSchema, useReplacer } = this;
563
561
  this.rootSchema = undefined;
@@ -571,6 +569,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
571
569
  }
572
570
  return this.buffer;
573
571
  }
572
+ writeDiscriminatedDocument(schema$1, value) {
573
+ this.write(schema$1, value);
574
+ if (typeof this.buffer === "object") {
575
+ this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
576
+ }
577
+ }
574
578
  _write(schema$1, value, container) {
575
579
  const isObject = value !== null && typeof value === "object";
576
580
  const ns = schema.NormalizedSchema.of(schema$1);
@@ -583,6 +587,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
583
587
  if (jsonName) {
584
588
  nameMap = {};
585
589
  }
590
+ let outCount = 0;
586
591
  for (const [memberName, memberSchema] of ns.structIterator()) {
587
592
  const serializableValue = this._write(memberSchema, record[memberName], ns);
588
593
  if (serializableValue !== undefined) {
@@ -592,9 +597,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
592
597
  nameMap[memberName] = targetKey;
593
598
  }
594
599
  out[targetKey] = serializableValue;
600
+ outCount++;
595
601
  }
596
602
  }
597
- if (ns.isUnionSchema() && Object.keys(out).length === 0) {
603
+ if (ns.isUnionSchema() && outCount === 0) {
598
604
  const { $unknown } = record;
599
605
  if (Array.isArray($unknown)) {
600
606
  const [k, v] = $unknown;
@@ -760,10 +766,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
760
766
  if (!request.path.endsWith("/")) {
761
767
  request.path += "/";
762
768
  }
763
- Object.assign(request.headers, {
764
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
765
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
766
- });
769
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
770
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
767
771
  if (this.awsQueryCompatible) {
768
772
  request.headers["x-amzn-query-mode"] = "true";
769
773
  }
@@ -787,9 +791,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
787
791
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
788
792
  const exception = new ErrorCtor(message);
789
793
  const output = {};
794
+ const errorDeserializer = this.codec.createDeserializer();
790
795
  for (const [name, member] of ns.structIterator()) {
791
796
  if (dataObject[name] != null) {
792
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
797
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
793
798
  }
794
799
  }
795
800
  if (this.awsQueryCompatible) {
@@ -910,9 +915,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
910
915
  const exception = new ErrorCtor(message);
911
916
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
912
917
  const output = {};
918
+ const errorDeserializer = this.codec.createDeserializer();
913
919
  for (const [name, member] of ns.structIterator()) {
914
920
  const target = member.getMergedTraits().jsonName ?? name;
915
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
921
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
916
922
  }
917
923
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
918
924
  $fault: ns.getMergedTraits().error,
@@ -1303,9 +1309,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1303
1309
  if (!request.path.endsWith("/")) {
1304
1310
  request.path += "/";
1305
1311
  }
1306
- Object.assign(request.headers, {
1307
- "content-type": `application/x-www-form-urlencoded`,
1308
- });
1312
+ request.headers["content-type"] = "application/x-www-form-urlencoded";
1309
1313
  if (schema.deref(operationSchema.input) === "unit" || !request.body) {
1310
1314
  request.body = "";
1311
1315
  }
@@ -1338,11 +1342,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1338
1342
  if (bytes.byteLength > 0) {
1339
1343
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
1340
1344
  }
1341
- const output = {
1342
- $metadata: this.deserializeMetadata(response),
1343
- ...dataObject,
1344
- };
1345
- return output;
1345
+ dataObject.$metadata = this.deserializeMetadata(response);
1346
+ return dataObject;
1346
1347
  }
1347
1348
  useNestedResult() {
1348
1349
  return true;
@@ -1842,10 +1843,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
1842
1843
  const exception = new ErrorCtor(message);
1843
1844
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
1844
1845
  const output = {};
1846
+ const errorDeserializer = this.codec.createDeserializer();
1845
1847
  for (const [name, member] of ns.structIterator()) {
1846
1848
  const target = member.getMergedTraits().xmlName ?? name;
1847
1849
  const value = dataObject.Error?.[target] ?? dataObject[target];
1848
- output[name] = this.codec.createDeserializer().readSchema(member, value);
1850
+ output[name] = errorDeserializer.readSchema(member, value);
1849
1851
  }
1850
1852
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
1851
1853
  $fault: ns.getMergedTraits().error,
@@ -87,12 +87,11 @@ export class ProtocolLib {
87
87
  if (msg) {
88
88
  error.message = msg;
89
89
  }
90
- error.Error = {
91
- ...error.Error,
92
- Type: error.Error?.Type,
93
- Code: error.Error?.Code,
94
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
95
- };
90
+ const errorObj = error.Error ?? {};
91
+ errorObj.Type = error.Error?.Type;
92
+ errorObj.Code = error.Error?.Code;
93
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
94
+ error.Error = errorObj;
96
95
  const reqId = error.$metadata.requestId;
97
96
  if (reqId) {
98
97
  error.RequestId = reqId;
@@ -105,14 +104,16 @@ export class ProtocolLib {
105
104
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
106
105
  if (output !== undefined && queryErrorHeader != null) {
107
106
  const [Code, Type] = queryErrorHeader.split(";");
108
- const entries = Object.entries(output);
107
+ const keys = Object.keys(output);
109
108
  const Error = {
110
109
  Code,
111
110
  Type,
112
111
  };
113
- Object.assign(output, Error);
114
- for (const [k, v] of entries) {
115
- Error[k === "message" ? "Message" : k] = v;
112
+ output.Code = Code;
113
+ output.Type = Type;
114
+ for (let i = 0; i < keys.length; i++) {
115
+ const k = keys[i];
116
+ Error[k === "message" ? "Message" : k] = output[k];
116
117
  }
117
118
  delete Error.__type;
118
119
  output.Error = Error;
@@ -5,7 +5,10 @@ export class UnionSerde {
5
5
  constructor(from, to) {
6
6
  this.from = from;
7
7
  this.to = to;
8
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
8
+ const keys = Object.keys(this.from);
9
+ const set = new Set(keys);
10
+ set.delete("__type");
11
+ this.keys = set;
9
12
  }
10
13
  mark(key) {
11
14
  this.keys.delete(key);
@@ -35,10 +35,8 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
35
35
  if (!request.path.endsWith("/")) {
36
36
  request.path += "/";
37
37
  }
38
- Object.assign(request.headers, {
39
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
40
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
41
- });
38
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
39
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
42
40
  if (this.awsQueryCompatible) {
43
41
  request.headers["x-amzn-query-mode"] = "true";
44
42
  }
@@ -62,9 +60,10 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
62
60
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
63
61
  const exception = new ErrorCtor(message);
64
62
  const output = {};
63
+ const errorDeserializer = this.codec.createDeserializer();
65
64
  for (const [name, member] of ns.structIterator()) {
66
65
  if (dataObject[name] != null) {
67
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
66
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
68
67
  }
69
68
  }
70
69
  if (this.awsQueryCompatible) {
@@ -69,9 +69,10 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
69
69
  const exception = new ErrorCtor(message);
70
70
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
71
71
  const output = {};
72
+ const errorDeserializer = this.codec.createDeserializer();
72
73
  for (const [name, member] of ns.structIterator()) {
73
74
  const target = member.getMergedTraits().jsonName ?? name;
74
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
75
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
75
76
  }
76
77
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
77
78
  $fault: ns.getMergedTraits().error,