@cdklabs/cdk-ecs-codedeploy 0.0.412 → 0.0.414

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 (161) hide show
  1. package/.jsii +4 -4
  2. package/.jsii.tabl.json +1 -1
  3. package/lib/api-canary/code-bundling.js +1 -1
  4. package/lib/api-canary/index.js +2 -2
  5. package/lib/ecs-appspec/index.js +2 -2
  6. package/lib/ecs-deployment/index.js +2 -2
  7. package/lib/ecs-deployment-provider/is-complete.lambda.js +3 -3
  8. package/lib/ecs-deployment-provider/on-event.lambda.js +2 -3
  9. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +2 -2
  10. package/node_modules/@aws-sdk/client-codedeploy/package.json +34 -34
  11. package/node_modules/@aws-sdk/client-sso/package.json +32 -32
  12. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1496 -14
  13. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
  14. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +13 -0
  15. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +14 -0
  16. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +14 -0
  17. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +84 -0
  18. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +118 -0
  19. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +20 -0
  20. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +105 -0
  21. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +106 -0
  22. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +46 -0
  23. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +18 -0
  24. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +17 -0
  25. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +147 -0
  26. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js +1 -0
  27. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +152 -0
  28. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +126 -0
  29. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +20 -0
  30. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +154 -0
  31. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +279 -0
  32. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/simpleFormatXml.js +27 -0
  33. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  34. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/common.d.ts +2 -2
  35. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +13 -0
  36. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +12 -0
  37. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +12 -0
  38. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +18 -0
  39. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +19 -0
  40. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +19 -0
  41. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -0
  42. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +15 -0
  43. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +21 -0
  44. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +15 -0
  45. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +3 -3
  46. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +20 -0
  47. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsQueryProtocol.d.ts +39 -0
  48. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +6 -0
  49. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -0
  50. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +21 -0
  51. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +14 -0
  52. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlShapeDeserializer.d.ts +20 -0
  53. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -0
  54. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/simpleFormatXml.d.ts +6 -0
  55. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +5 -0
  56. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -2
  57. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +13 -0
  58. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +6 -0
  59. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +6 -0
  60. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +33 -0
  61. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +34 -0
  62. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +16 -0
  63. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -0
  64. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +15 -0
  65. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +7 -0
  66. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +7 -0
  67. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +3 -3
  68. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +14 -0
  69. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +55 -0
  70. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +6 -0
  71. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -0
  72. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +39 -0
  73. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +17 -0
  74. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +15 -0
  75. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -0
  76. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +1 -0
  77. package/node_modules/@aws-sdk/core/package.json +14 -10
  78. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  79. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  80. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  81. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  82. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  83. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  84. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
  85. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  86. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  87. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  88. package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
  89. package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
  90. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  91. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  92. package/node_modules/@aws-sdk/types/package.json +2 -2
  93. package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
  94. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  95. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  96. package/node_modules/@aws-sdk/xml-builder/LICENSE +201 -0
  97. package/node_modules/@aws-sdk/xml-builder/README.md +10 -0
  98. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +173 -0
  99. package/node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js +88 -0
  100. package/node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js +10 -0
  101. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +3 -0
  102. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +12 -0
  103. package/node_modules/@aws-sdk/xml-builder/dist-es/index.js +2 -0
  104. package/node_modules/@aws-sdk/xml-builder/dist-es/stringable.js +1 -0
  105. package/node_modules/@aws-sdk/xml-builder/dist-types/XmlNode.d.ts +49 -0
  106. package/node_modules/@aws-sdk/xml-builder/dist-types/XmlText.d.ts +11 -0
  107. package/node_modules/@aws-sdk/xml-builder/dist-types/escape-attribute.d.ts +6 -0
  108. package/node_modules/@aws-sdk/xml-builder/dist-types/escape-element.d.ts +6 -0
  109. package/node_modules/@aws-sdk/xml-builder/dist-types/index.d.ts +8 -0
  110. package/node_modules/@aws-sdk/xml-builder/dist-types/stringable.d.ts +6 -0
  111. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/XmlNode.d.ts +29 -0
  112. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/XmlText.d.ts +6 -0
  113. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/escape-attribute.d.ts +1 -0
  114. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/escape-element.d.ts +1 -0
  115. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/index.d.ts +2 -0
  116. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/stringable.d.ts +3 -0
  117. package/node_modules/@aws-sdk/xml-builder/package.json +54 -0
  118. package/node_modules/@smithy/abort-controller/package.json +2 -2
  119. package/node_modules/@smithy/config-resolver/package.json +4 -4
  120. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +9 -8
  121. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +4 -1
  122. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -6
  123. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +9 -2
  124. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +1 -1
  125. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +3 -0
  126. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +4 -0
  127. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +4 -0
  128. package/node_modules/@smithy/core/package.json +6 -6
  129. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  130. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  131. package/node_modules/@smithy/hash-node/package.json +2 -2
  132. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  133. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  134. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  135. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  136. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  137. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  138. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  139. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  140. package/node_modules/@smithy/property-provider/package.json +2 -2
  141. package/node_modules/@smithy/protocol-http/package.json +2 -2
  142. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  143. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  144. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  145. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  146. package/node_modules/@smithy/signature-v4/package.json +4 -4
  147. package/node_modules/@smithy/smithy-client/package.json +7 -7
  148. package/node_modules/@smithy/types/dist-types/command.d.ts +5 -2
  149. package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +2 -4
  150. package/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +5 -2
  151. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +2 -4
  152. package/node_modules/@smithy/types/package.json +1 -1
  153. package/node_modules/@smithy/url-parser/package.json +3 -3
  154. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  155. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  156. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  157. package/node_modules/@smithy/util-middleware/package.json +2 -2
  158. package/node_modules/@smithy/util-retry/package.json +3 -3
  159. package/node_modules/@smithy/util-stream/package.json +4 -4
  160. package/node_modules/@smithy/util-waiter/package.json +3 -3
  161. package/package.json +12 -11
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ XmlNode: () => XmlNode,
25
+ XmlText: () => XmlText
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+
29
+ // src/escape-attribute.ts
30
+ function escapeAttribute(value) {
31
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
32
+ }
33
+ __name(escapeAttribute, "escapeAttribute");
34
+
35
+ // src/escape-element.ts
36
+ function escapeElement(value) {
37
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r/g, "&#x0D;").replace(/\n/g, "&#x0A;").replace(/\u0085/g, "&#x85;").replace(/\u2028/, "&#x2028;");
38
+ }
39
+ __name(escapeElement, "escapeElement");
40
+
41
+ // src/XmlText.ts
42
+ var XmlText = class {
43
+ constructor(value) {
44
+ this.value = value;
45
+ }
46
+ static {
47
+ __name(this, "XmlText");
48
+ }
49
+ toString() {
50
+ return escapeElement("" + this.value);
51
+ }
52
+ };
53
+
54
+ // src/XmlNode.ts
55
+ var XmlNode = class _XmlNode {
56
+ constructor(name, children = []) {
57
+ this.name = name;
58
+ this.children = children;
59
+ }
60
+ static {
61
+ __name(this, "XmlNode");
62
+ }
63
+ attributes = {};
64
+ static of(name, childText, withName) {
65
+ const node = new _XmlNode(name);
66
+ if (childText !== void 0) {
67
+ node.addChildNode(new XmlText(childText));
68
+ }
69
+ if (withName !== void 0) {
70
+ node.withName(withName);
71
+ }
72
+ return node;
73
+ }
74
+ withName(name) {
75
+ this.name = name;
76
+ return this;
77
+ }
78
+ addAttribute(name, value) {
79
+ this.attributes[name] = value;
80
+ return this;
81
+ }
82
+ addChildNode(child) {
83
+ this.children.push(child);
84
+ return this;
85
+ }
86
+ removeAttribute(name) {
87
+ delete this.attributes[name];
88
+ return this;
89
+ }
90
+ /**
91
+ * @internal
92
+ * Alias of {@link XmlNode#withName(string)} for codegen brevity.
93
+ */
94
+ n(name) {
95
+ this.name = name;
96
+ return this;
97
+ }
98
+ /**
99
+ * @internal
100
+ * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity.
101
+ */
102
+ c(child) {
103
+ this.children.push(child);
104
+ return this;
105
+ }
106
+ /**
107
+ * @internal
108
+ * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity.
109
+ */
110
+ a(name, value) {
111
+ if (value != null) {
112
+ this.attributes[name] = value;
113
+ }
114
+ return this;
115
+ }
116
+ /**
117
+ * Create a child node.
118
+ * Used in serialization of string fields.
119
+ * @internal
120
+ */
121
+ cc(input, field, withName = field) {
122
+ if (input[field] != null) {
123
+ const node = _XmlNode.of(field, input[field]).withName(withName);
124
+ this.c(node);
125
+ }
126
+ }
127
+ /**
128
+ * Creates list child nodes.
129
+ * @internal
130
+ */
131
+ l(input, listName, memberName, valueProvider) {
132
+ if (input[listName] != null) {
133
+ const nodes = valueProvider();
134
+ nodes.map((node) => {
135
+ node.withName(memberName);
136
+ this.c(node);
137
+ });
138
+ }
139
+ }
140
+ /**
141
+ * Creates list child nodes with container.
142
+ * @internal
143
+ */
144
+ lc(input, listName, memberName, valueProvider) {
145
+ if (input[listName] != null) {
146
+ const nodes = valueProvider();
147
+ const containerNode = new _XmlNode(memberName);
148
+ nodes.map((node) => {
149
+ containerNode.c(node);
150
+ });
151
+ this.c(containerNode);
152
+ }
153
+ }
154
+ toString() {
155
+ const hasChildren = Boolean(this.children.length);
156
+ let xmlText = `<${this.name}`;
157
+ const attributes = this.attributes;
158
+ for (const attributeName of Object.keys(attributes)) {
159
+ const attribute = attributes[attributeName];
160
+ if (attribute != null) {
161
+ xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
162
+ }
163
+ }
164
+ return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}</${this.name}>`;
165
+ }
166
+ };
167
+ // Annotate the CommonJS export names for ESM import in node:
168
+
169
+ 0 && (module.exports = {
170
+ XmlNode,
171
+ XmlText
172
+ });
173
+
@@ -0,0 +1,88 @@
1
+ import { escapeAttribute } from "./escape-attribute";
2
+ import { XmlText } from "./XmlText";
3
+ export class XmlNode {
4
+ name;
5
+ children;
6
+ attributes = {};
7
+ static of(name, childText, withName) {
8
+ const node = new XmlNode(name);
9
+ if (childText !== undefined) {
10
+ node.addChildNode(new XmlText(childText));
11
+ }
12
+ if (withName !== undefined) {
13
+ node.withName(withName);
14
+ }
15
+ return node;
16
+ }
17
+ constructor(name, children = []) {
18
+ this.name = name;
19
+ this.children = children;
20
+ }
21
+ withName(name) {
22
+ this.name = name;
23
+ return this;
24
+ }
25
+ addAttribute(name, value) {
26
+ this.attributes[name] = value;
27
+ return this;
28
+ }
29
+ addChildNode(child) {
30
+ this.children.push(child);
31
+ return this;
32
+ }
33
+ removeAttribute(name) {
34
+ delete this.attributes[name];
35
+ return this;
36
+ }
37
+ n(name) {
38
+ this.name = name;
39
+ return this;
40
+ }
41
+ c(child) {
42
+ this.children.push(child);
43
+ return this;
44
+ }
45
+ a(name, value) {
46
+ if (value != null) {
47
+ this.attributes[name] = value;
48
+ }
49
+ return this;
50
+ }
51
+ cc(input, field, withName = field) {
52
+ if (input[field] != null) {
53
+ const node = XmlNode.of(field, input[field]).withName(withName);
54
+ this.c(node);
55
+ }
56
+ }
57
+ l(input, listName, memberName, valueProvider) {
58
+ if (input[listName] != null) {
59
+ const nodes = valueProvider();
60
+ nodes.map((node) => {
61
+ node.withName(memberName);
62
+ this.c(node);
63
+ });
64
+ }
65
+ }
66
+ lc(input, listName, memberName, valueProvider) {
67
+ if (input[listName] != null) {
68
+ const nodes = valueProvider();
69
+ const containerNode = new XmlNode(memberName);
70
+ nodes.map((node) => {
71
+ containerNode.c(node);
72
+ });
73
+ this.c(containerNode);
74
+ }
75
+ }
76
+ toString() {
77
+ const hasChildren = Boolean(this.children.length);
78
+ let xmlText = `<${this.name}`;
79
+ const attributes = this.attributes;
80
+ for (const attributeName of Object.keys(attributes)) {
81
+ const attribute = attributes[attributeName];
82
+ if (attribute != null) {
83
+ xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
84
+ }
85
+ }
86
+ return (xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}</${this.name}>`);
87
+ }
88
+ }
@@ -0,0 +1,10 @@
1
+ import { escapeElement } from "./escape-element";
2
+ export class XmlText {
3
+ value;
4
+ constructor(value) {
5
+ this.value = value;
6
+ }
7
+ toString() {
8
+ return escapeElement("" + this.value);
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ export function escapeAttribute(value) {
2
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3
+ }
@@ -0,0 +1,12 @@
1
+ export function escapeElement(value) {
2
+ return value
3
+ .replace(/&/g, "&amp;")
4
+ .replace(/"/g, "&quot;")
5
+ .replace(/'/g, "&apos;")
6
+ .replace(/</g, "&lt;")
7
+ .replace(/>/g, "&gt;")
8
+ .replace(/\r/g, "&#x0D;")
9
+ .replace(/\n/g, "&#x0A;")
10
+ .replace(/\u0085/g, "&#x85;")
11
+ .replace(/\u2028/, "&#x2028;");
12
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./XmlNode";
2
+ export * from "./XmlText";
@@ -0,0 +1,49 @@
1
+ import { Stringable } from "./stringable";
2
+ /**
3
+ * @internal
4
+ *
5
+ * Represents an XML node.
6
+ */
7
+ export declare class XmlNode {
8
+ private name;
9
+ readonly children: Stringable[];
10
+ private attributes;
11
+ static of(name: string, childText?: string, withName?: string): XmlNode;
12
+ constructor(name: string, children?: Stringable[]);
13
+ withName(name: string): XmlNode;
14
+ addAttribute(name: string, value: any): XmlNode;
15
+ addChildNode(child: Stringable): XmlNode;
16
+ removeAttribute(name: string): XmlNode;
17
+ /**
18
+ * @internal
19
+ * Alias of {@link XmlNode#withName(string)} for codegen brevity.
20
+ */
21
+ n(name: string): XmlNode;
22
+ /**
23
+ * @internal
24
+ * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity.
25
+ */
26
+ c(child: Stringable): XmlNode;
27
+ /**
28
+ * @internal
29
+ * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity.
30
+ */
31
+ a(name: string, value: any): XmlNode;
32
+ /**
33
+ * Create a child node.
34
+ * Used in serialization of string fields.
35
+ * @internal
36
+ */
37
+ cc(input: any, field: string, withName?: string): void;
38
+ /**
39
+ * Creates list child nodes.
40
+ * @internal
41
+ */
42
+ l(input: any, listName: string, memberName: string, valueProvider: Function): void;
43
+ /**
44
+ * Creates list child nodes with container.
45
+ * @internal
46
+ */
47
+ lc(input: any, listName: string, memberName: string, valueProvider: Function): void;
48
+ toString(): string;
49
+ }
@@ -0,0 +1,11 @@
1
+ import { Stringable } from "./stringable";
2
+ /**
3
+ * @internal
4
+ *
5
+ * Represents an XML text value.
6
+ */
7
+ export declare class XmlText implements Stringable {
8
+ private value;
9
+ constructor(value: string);
10
+ toString(): string;
11
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * Escapes characters that can not be in an XML attribute.
5
+ */
6
+ export declare function escapeAttribute(value: string): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * Escapes characters that can not be in an XML element.
5
+ */
6
+ export declare function escapeElement(value: string): string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export * from "./XmlNode";
5
+ /**
6
+ * @internal
7
+ */
8
+ export * from "./XmlText";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export interface Stringable {
5
+ toString(): string;
6
+ }
@@ -0,0 +1,29 @@
1
+ import { Stringable } from "./stringable";
2
+ export declare class XmlNode {
3
+ private name;
4
+ readonly children: Stringable[];
5
+ private attributes;
6
+ static of(name: string, childText?: string, withName?: string): XmlNode;
7
+ constructor(name: string, children?: Stringable[]);
8
+ withName(name: string): XmlNode;
9
+ addAttribute(name: string, value: any): XmlNode;
10
+ addChildNode(child: Stringable): XmlNode;
11
+ removeAttribute(name: string): XmlNode;
12
+ n(name: string): XmlNode;
13
+ c(child: Stringable): XmlNode;
14
+ a(name: string, value: any): XmlNode;
15
+ cc(input: any, field: string, withName?: string): void;
16
+ l(
17
+ input: any,
18
+ listName: string,
19
+ memberName: string,
20
+ valueProvider: Function
21
+ ): void;
22
+ lc(
23
+ input: any,
24
+ listName: string,
25
+ memberName: string,
26
+ valueProvider: Function
27
+ ): void;
28
+ toString(): string;
29
+ }
@@ -0,0 +1,6 @@
1
+ import { Stringable } from "./stringable";
2
+ export declare class XmlText implements Stringable {
3
+ private value;
4
+ constructor(value: string);
5
+ toString(): string;
6
+ }
@@ -0,0 +1 @@
1
+ export declare function escapeAttribute(value: string): string;
@@ -0,0 +1 @@
1
+ export declare function escapeElement(value: string): string;
@@ -0,0 +1,2 @@
1
+ export * from "./XmlNode";
2
+ export * from "./XmlText";
@@ -0,0 +1,3 @@
1
+ export interface Stringable {
2
+ toString(): string;
3
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@aws-sdk/xml-builder",
3
+ "version": "3.821.0",
4
+ "description": "XML builder for the AWS SDK",
5
+ "dependencies": {
6
+ "@smithy/types": "^4.3.1",
7
+ "tslib": "^2.6.2"
8
+ },
9
+ "scripts": {
10
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
11
+ "build:cjs": "node ../../scripts/compilation/inline xml-builder",
12
+ "build:es": "tsc -p tsconfig.es.json",
13
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
14
+ "build:types": "tsc -p tsconfig.types.json",
15
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
16
+ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
17
+ "test": "yarn g:vitest run",
18
+ "test:watch": "yarn g:vitest watch"
19
+ },
20
+ "author": {
21
+ "name": "AWS SDK for JavaScript Team",
22
+ "url": "https://aws.amazon.com/javascript/"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "main": "./dist-cjs/index.js",
26
+ "module": "./dist-es/index.js",
27
+ "types": "./dist-types/index.d.ts",
28
+ "engines": {
29
+ "node": ">=18.0.0"
30
+ },
31
+ "typesVersions": {
32
+ "<4.0": {
33
+ "dist-types/*": [
34
+ "dist-types/ts3.4/*"
35
+ ]
36
+ }
37
+ },
38
+ "files": [
39
+ "dist-*/**"
40
+ ],
41
+ "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/xml-builder",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/aws/aws-sdk-js-v3.git",
45
+ "directory": "packages/xml-builder"
46
+ },
47
+ "devDependencies": {
48
+ "@tsconfig/recommended": "1.0.1",
49
+ "concurrently": "7.0.0",
50
+ "downlevel-dts": "0.10.1",
51
+ "rimraf": "3.0.2",
52
+ "typescript": "~5.8.3"
53
+ }
54
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/abort-controller",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "A simple abort controller library",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@smithy/types": "^4.3.0",
28
+ "@smithy/types": "^4.3.1",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/config-resolver",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline config-resolver",
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/node-config-provider": "^4.1.2",
28
- "@smithy/types": "^4.3.0",
27
+ "@smithy/node-config-provider": "^4.1.3",
28
+ "@smithy/types": "^4.3.1",
29
29
  "@smithy/util-config-provider": "^4.0.0",
30
- "@smithy/util-middleware": "^4.0.3",
30
+ "@smithy/util-middleware": "^4.0.4",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -136,7 +136,13 @@ var HttpProtocol = class {
136
136
  cfId: output.headers["x-amz-cf-id"]
137
137
  };
138
138
  }
139
- async deserializeHttpMessage(schema, context, response, headerBindings, dataObject) {
139
+ async deserializeHttpMessage(schema, context, response, arg4, arg5) {
140
+ let dataObject;
141
+ if (arg4 instanceof Set) {
142
+ dataObject = arg5;
143
+ } else {
144
+ dataObject = arg4;
145
+ }
140
146
  const deserializer = this.deserializer;
141
147
  const ns = import_schema.NormalizedSchema.of(schema);
142
148
  const nonHttpBindingMembers = [];
@@ -200,7 +206,7 @@ var HttpProtocol = class {
200
206
  } else if (memberTraits.httpPrefixHeaders !== void 0) {
201
207
  dataObject[memberName] = {};
202
208
  for (const [header, value] of Object.entries(response.headers)) {
203
- if (!headerBindings.has(header) && header.startsWith(memberTraits.httpPrefixHeaders)) {
209
+ if (header.startsWith(memberTraits.httpPrefixHeaders)) {
204
210
  dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(
205
211
  [memberSchema.getValueSchema(), { httpHeader: header }],
206
212
  value
@@ -373,12 +379,7 @@ var HttpBindingProtocol = class extends HttpProtocol {
373
379
  delete response.headers[header];
374
380
  response.headers[header.toLowerCase()] = value;
375
381
  }
376
- const headerBindings = new Set(
377
- Object.values(ns.getMemberSchemas()).map((schema) => {
378
- return schema.getMergedTraits().httpHeader;
379
- }).filter(Boolean)
380
- );
381
- const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, headerBindings, dataObject);
382
+ const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
382
383
  if (nonHttpBindingMembers.length) {
383
384
  const bytes = await collectBody(response.body, context);
384
385
  if (bytes.byteLength > 0) {
@@ -207,7 +207,7 @@ var TypeRegistry = class _TypeRegistry {
207
207
  */
208
208
  getBaseException() {
209
209
  for (const [id, schema] of this.schemas.entries()) {
210
- if (id.startsWith("smithyts.client.synthetic.") && id.endsWith("ServiceException")) {
210
+ if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
211
211
  return schema;
212
212
  }
213
213
  }
@@ -715,6 +715,9 @@ var NormalizedSchema = class _NormalizedSchema {
715
715
  * This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).
716
716
  */
717
717
  *structIterator() {
718
+ if (this.isUnitSchema()) {
719
+ return;
720
+ }
718
721
  if (!this.isStructSchema()) {
719
722
  throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");
720
723
  }
@@ -159,12 +159,7 @@ export class HttpBindingProtocol extends HttpProtocol {
159
159
  delete response.headers[header];
160
160
  response.headers[header.toLowerCase()] = value;
161
161
  }
162
- const headerBindings = new Set(Object.values(ns.getMemberSchemas())
163
- .map((schema) => {
164
- return schema.getMergedTraits().httpHeader;
165
- })
166
- .filter(Boolean));
167
- const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, headerBindings, dataObject);
162
+ const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
168
163
  if (nonHttpBindingMembers.length) {
169
164
  const bytes = await collectBody(response.body, context);
170
165
  if (bytes.byteLength > 0) {
@@ -75,7 +75,14 @@ export class HttpProtocol {
75
75
  cfId: output.headers["x-amz-cf-id"],
76
76
  };
77
77
  }
78
- async deserializeHttpMessage(schema, context, response, headerBindings, dataObject) {
78
+ async deserializeHttpMessage(schema, context, response, arg4, arg5) {
79
+ let dataObject;
80
+ if (arg4 instanceof Set) {
81
+ dataObject = arg5;
82
+ }
83
+ else {
84
+ dataObject = arg4;
85
+ }
79
86
  const deserializer = this.deserializer;
80
87
  const ns = NormalizedSchema.of(schema);
81
88
  const nonHttpBindingMembers = [];
@@ -147,7 +154,7 @@ export class HttpProtocol {
147
154
  else if (memberTraits.httpPrefixHeaders !== undefined) {
148
155
  dataObject[memberName] = {};
149
156
  for (const [header, value] of Object.entries(response.headers)) {
150
- if (!headerBindings.has(header) && header.startsWith(memberTraits.httpPrefixHeaders)) {
157
+ if (header.startsWith(memberTraits.httpPrefixHeaders)) {
151
158
  dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read([memberSchema.getValueSchema(), { httpHeader: header }], value);
152
159
  }
153
160
  }
@@ -23,7 +23,7 @@ export class TypeRegistry {
23
23
  }
24
24
  getBaseException() {
25
25
  for (const [id, schema] of this.schemas.entries()) {
26
- if (id.startsWith("smithyts.client.synthetic.") && id.endsWith("ServiceException")) {
26
+ if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
27
27
  return schema;
28
28
  }
29
29
  }
@@ -261,6 +261,9 @@ export class NormalizedSchema {
261
261
  return {};
262
262
  }
263
263
  *structIterator() {
264
+ if (this.isUnitSchema()) {
265
+ return;
266
+ }
264
267
  if (!this.isStructSchema()) {
265
268
  throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");
266
269
  }