cdk-comprehend-s3olap 2.0.121 → 2.0.123

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 (89) hide show
  1. package/.jsii +4 -4
  2. package/lib/cdk-comprehend-s3olap.js +2 -2
  3. package/lib/comprehend-lambdas.js +2 -2
  4. package/lib/iam-roles.js +4 -4
  5. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  6. package/node_modules/@esbuild/linux-x64/package.json +1 -1
  7. package/node_modules/aws-sdk/CHANGELOG.md +25 -1
  8. package/node_modules/aws-sdk/README.md +1 -1
  9. package/node_modules/aws-sdk/apis/connect-2017-08-08.min.json +196 -187
  10. package/node_modules/aws-sdk/apis/ecr-public-2020-10-30.min.json +8 -8
  11. package/node_modules/aws-sdk/apis/emr-serverless-2021-07-13.min.json +3 -0
  12. package/node_modules/aws-sdk/apis/eventbridge-2015-10-07.min.json +18 -6
  13. package/node_modules/aws-sdk/apis/iot-data-2015-05-28.min.json +3 -0
  14. package/node_modules/aws-sdk/apis/marketplace-catalog-2018-09-17.min.json +82 -15
  15. package/node_modules/aws-sdk/apis/mediaconvert-2017-08-29.min.json +56 -32
  16. package/node_modules/aws-sdk/apis/rekognition-2016-06-27.min.json +224 -138
  17. package/node_modules/aws-sdk/apis/wafv2-2019-07-29.min.json +55 -28
  18. package/node_modules/aws-sdk/clients/connect.d.ts +15 -4
  19. package/node_modules/aws-sdk/clients/ecrpublic.d.ts +2 -2
  20. package/node_modules/aws-sdk/clients/ecs.d.ts +24 -24
  21. package/node_modules/aws-sdk/clients/emrserverless.d.ts +7 -3
  22. package/node_modules/aws-sdk/clients/eventbridge.d.ts +3 -1
  23. package/node_modules/aws-sdk/clients/iotdata.d.ts +5 -0
  24. package/node_modules/aws-sdk/clients/marketplacecatalog.d.ts +67 -7
  25. package/node_modules/aws-sdk/clients/mediaconvert.d.ts +20 -1
  26. package/node_modules/aws-sdk/clients/omics.d.ts +2 -2
  27. package/node_modules/aws-sdk/clients/rekognition.d.ts +114 -16
  28. package/node_modules/aws-sdk/clients/wafv2.d.ts +89 -62
  29. package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +1 -1
  30. package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +2537 -880
  31. package/node_modules/aws-sdk/dist/aws-sdk.js +508 -343
  32. package/node_modules/aws-sdk/dist/aws-sdk.min.js +79 -79
  33. package/node_modules/aws-sdk/dist/xml2js.js +2579 -922
  34. package/node_modules/aws-sdk/lib/core.js +1 -1
  35. package/node_modules/aws-sdk/package.json +2 -2
  36. package/node_modules/esbuild/bin/esbuild +1 -1
  37. package/node_modules/esbuild/lib/main.js +8 -8
  38. package/node_modules/esbuild/package.json +23 -23
  39. package/node_modules/xml2js/README.md +108 -7
  40. package/node_modules/xml2js/lib/parser.js +35 -7
  41. package/node_modules/xml2js/lib/xml2js.js +2 -0
  42. package/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md +47 -0
  43. package/node_modules/xml2js/node_modules/xmlbuilder/LICENSE +21 -21
  44. package/node_modules/xml2js/node_modules/xmlbuilder/README.md +86 -85
  45. package/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml +20 -0
  46. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js +10 -0
  47. package/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js +12 -0
  48. package/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js +23 -0
  49. package/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js +11 -0
  50. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js +11 -1
  51. package/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js +10 -0
  52. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js +86 -9
  53. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js +10 -6
  54. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js +79 -0
  55. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js +10 -6
  56. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +64 -0
  57. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +16 -0
  58. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js +32 -0
  59. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js +28 -0
  60. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js +16 -11
  61. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js +7 -4
  62. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js +49 -8
  63. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js +20 -5
  64. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js +5 -2
  65. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js +84 -5
  66. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js +199 -5
  67. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js +165 -39
  68. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js +24 -0
  69. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js +31 -0
  70. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js +207 -20
  71. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +58 -0
  72. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js +403 -50
  73. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js +48 -0
  74. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js +28 -0
  75. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +19 -5
  76. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js +6 -3
  77. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js +94 -197
  78. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js +6 -305
  79. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js +109 -32
  80. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js +43 -6
  81. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLTypeInfo.js +21 -0
  82. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js +16 -0
  83. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLWriterBase.js +397 -59
  84. package/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js +15 -3
  85. package/node_modules/xml2js/node_modules/xmlbuilder/package.json +5 -3
  86. package/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts +153 -0
  87. package/node_modules/xml2js/package.json +11 -5
  88. package/package.json +4 -4
  89. package/node_modules/xml2js/node_modules/xmlbuilder/.npmignore +0 -5
@@ -0,0 +1,16 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ var OperationType, XMLUserDataHandler;
4
+
5
+ OperationType = require('./OperationType');
6
+
7
+ module.exports = XMLUserDataHandler = (function() {
8
+ function XMLUserDataHandler() {}
9
+
10
+ XMLUserDataHandler.prototype.handle = function(operation, key, data, src, dst) {};
11
+
12
+ return XMLUserDataHandler;
13
+
14
+ })();
15
+
16
+ }).call(this);
@@ -1,88 +1,426 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var XMLWriterBase,
3
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
4
4
  hasProp = {}.hasOwnProperty;
5
5
 
6
+ assign = require('./Utility').assign;
7
+
8
+ NodeType = require('./NodeType');
9
+
10
+ XMLDeclaration = require('./XMLDeclaration');
11
+
12
+ XMLDocType = require('./XMLDocType');
13
+
14
+ XMLCData = require('./XMLCData');
15
+
16
+ XMLComment = require('./XMLComment');
17
+
18
+ XMLElement = require('./XMLElement');
19
+
20
+ XMLRaw = require('./XMLRaw');
21
+
22
+ XMLText = require('./XMLText');
23
+
24
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
25
+
26
+ XMLDummy = require('./XMLDummy');
27
+
28
+ XMLDTDAttList = require('./XMLDTDAttList');
29
+
30
+ XMLDTDElement = require('./XMLDTDElement');
31
+
32
+ XMLDTDEntity = require('./XMLDTDEntity');
33
+
34
+ XMLDTDNotation = require('./XMLDTDNotation');
35
+
36
+ WriterState = require('./WriterState');
37
+
6
38
  module.exports = XMLWriterBase = (function() {
7
39
  function XMLWriterBase(options) {
8
- var key, ref, ref1, ref2, ref3, ref4, ref5, ref6, value;
40
+ var key, ref, value;
9
41
  options || (options = {});
10
- this.pretty = options.pretty || false;
11
- this.allowEmpty = (ref = options.allowEmpty) != null ? ref : false;
12
- if (this.pretty) {
13
- this.indent = (ref1 = options.indent) != null ? ref1 : ' ';
14
- this.newline = (ref2 = options.newline) != null ? ref2 : '\n';
15
- this.offset = (ref3 = options.offset) != null ? ref3 : 0;
16
- this.dontprettytextnodes = (ref4 = options.dontprettytextnodes) != null ? ref4 : 0;
17
- } else {
18
- this.indent = '';
19
- this.newline = '';
20
- this.offset = 0;
21
- this.dontprettytextnodes = 0;
22
- }
23
- this.spacebeforeslash = (ref5 = options.spacebeforeslash) != null ? ref5 : '';
24
- if (this.spacebeforeslash === true) {
25
- this.spacebeforeslash = ' ';
26
- }
27
- this.newlinedefault = this.newline;
28
- this.prettydefault = this.pretty;
29
- ref6 = options.writer || {};
30
- for (key in ref6) {
31
- if (!hasProp.call(ref6, key)) continue;
32
- value = ref6[key];
42
+ this.options = options;
43
+ ref = options.writer || {};
44
+ for (key in ref) {
45
+ if (!hasProp.call(ref, key)) continue;
46
+ value = ref[key];
47
+ this["_" + key] = this[key];
33
48
  this[key] = value;
34
49
  }
35
50
  }
36
51
 
37
- XMLWriterBase.prototype.set = function(options) {
38
- var key, ref, value;
52
+ XMLWriterBase.prototype.filterOptions = function(options) {
53
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6;
39
54
  options || (options = {});
40
- if ("pretty" in options) {
41
- this.pretty = options.pretty;
55
+ options = assign({}, this.options, options);
56
+ filteredOptions = {
57
+ writer: this
58
+ };
59
+ filteredOptions.pretty = options.pretty || false;
60
+ filteredOptions.allowEmpty = options.allowEmpty || false;
61
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
62
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
63
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
64
+ filteredOptions.dontPrettyTextNodes = (ref3 = (ref4 = options.dontPrettyTextNodes) != null ? ref4 : options.dontprettytextnodes) != null ? ref3 : 0;
65
+ filteredOptions.spaceBeforeSlash = (ref5 = (ref6 = options.spaceBeforeSlash) != null ? ref6 : options.spacebeforeslash) != null ? ref5 : '';
66
+ if (filteredOptions.spaceBeforeSlash === true) {
67
+ filteredOptions.spaceBeforeSlash = ' ';
42
68
  }
43
- if ("allowEmpty" in options) {
44
- this.allowEmpty = options.allowEmpty;
69
+ filteredOptions.suppressPrettyCount = 0;
70
+ filteredOptions.user = {};
71
+ filteredOptions.state = WriterState.None;
72
+ return filteredOptions;
73
+ };
74
+
75
+ XMLWriterBase.prototype.indent = function(node, options, level) {
76
+ var indentLevel;
77
+ if (!options.pretty || options.suppressPrettyCount) {
78
+ return '';
79
+ } else if (options.pretty) {
80
+ indentLevel = (level || 0) + options.offset + 1;
81
+ if (indentLevel > 0) {
82
+ return new Array(indentLevel).join(options.indent);
83
+ }
45
84
  }
46
- if (this.pretty) {
47
- this.indent = "indent" in options ? options.indent : ' ';
48
- this.newline = "newline" in options ? options.newline : '\n';
49
- this.offset = "offset" in options ? options.offset : 0;
50
- this.dontprettytextnodes = "dontprettytextnodes" in options ? options.dontprettytextnodes : 0;
85
+ return '';
86
+ };
87
+
88
+ XMLWriterBase.prototype.endline = function(node, options, level) {
89
+ if (!options.pretty || options.suppressPrettyCount) {
90
+ return '';
51
91
  } else {
52
- this.indent = '';
53
- this.newline = '';
54
- this.offset = 0;
55
- this.dontprettytextnodes = 0;
92
+ return options.newline;
56
93
  }
57
- this.spacebeforeslash = "spacebeforeslash" in options ? options.spacebeforeslash : '';
58
- if (this.spacebeforeslash === true) {
59
- this.spacebeforeslash = ' ';
94
+ };
95
+
96
+ XMLWriterBase.prototype.attribute = function(att, options, level) {
97
+ var r;
98
+ this.openAttribute(att, options, level);
99
+ r = ' ' + att.name + '="' + att.value + '"';
100
+ this.closeAttribute(att, options, level);
101
+ return r;
102
+ };
103
+
104
+ XMLWriterBase.prototype.cdata = function(node, options, level) {
105
+ var r;
106
+ this.openNode(node, options, level);
107
+ options.state = WriterState.OpenTag;
108
+ r = this.indent(node, options, level) + '<![CDATA[';
109
+ options.state = WriterState.InsideTag;
110
+ r += node.value;
111
+ options.state = WriterState.CloseTag;
112
+ r += ']]>' + this.endline(node, options, level);
113
+ options.state = WriterState.None;
114
+ this.closeNode(node, options, level);
115
+ return r;
116
+ };
117
+
118
+ XMLWriterBase.prototype.comment = function(node, options, level) {
119
+ var r;
120
+ this.openNode(node, options, level);
121
+ options.state = WriterState.OpenTag;
122
+ r = this.indent(node, options, level) + '<!-- ';
123
+ options.state = WriterState.InsideTag;
124
+ r += node.value;
125
+ options.state = WriterState.CloseTag;
126
+ r += ' -->' + this.endline(node, options, level);
127
+ options.state = WriterState.None;
128
+ this.closeNode(node, options, level);
129
+ return r;
130
+ };
131
+
132
+ XMLWriterBase.prototype.declaration = function(node, options, level) {
133
+ var r;
134
+ this.openNode(node, options, level);
135
+ options.state = WriterState.OpenTag;
136
+ r = this.indent(node, options, level) + '<?xml';
137
+ options.state = WriterState.InsideTag;
138
+ r += ' version="' + node.version + '"';
139
+ if (node.encoding != null) {
140
+ r += ' encoding="' + node.encoding + '"';
60
141
  }
61
- this.newlinedefault = this.newline;
62
- this.prettydefault = this.pretty;
63
- ref = options.writer || {};
64
- for (key in ref) {
65
- if (!hasProp.call(ref, key)) continue;
66
- value = ref[key];
67
- this[key] = value;
142
+ if (node.standalone != null) {
143
+ r += ' standalone="' + node.standalone + '"';
68
144
  }
69
- return this;
145
+ options.state = WriterState.CloseTag;
146
+ r += options.spaceBeforeSlash + '?>';
147
+ r += this.endline(node, options, level);
148
+ options.state = WriterState.None;
149
+ this.closeNode(node, options, level);
150
+ return r;
70
151
  };
71
152
 
72
- XMLWriterBase.prototype.space = function(level) {
73
- var indent;
74
- if (this.pretty) {
75
- indent = (level || 0) + this.offset + 1;
76
- if (indent > 0) {
77
- return new Array(indent).join(this.indent);
153
+ XMLWriterBase.prototype.docType = function(node, options, level) {
154
+ var child, i, len, r, ref;
155
+ level || (level = 0);
156
+ this.openNode(node, options, level);
157
+ options.state = WriterState.OpenTag;
158
+ r = this.indent(node, options, level);
159
+ r += '<!DOCTYPE ' + node.root().name;
160
+ if (node.pubID && node.sysID) {
161
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
162
+ } else if (node.sysID) {
163
+ r += ' SYSTEM "' + node.sysID + '"';
164
+ }
165
+ if (node.children.length > 0) {
166
+ r += ' [';
167
+ r += this.endline(node, options, level);
168
+ options.state = WriterState.InsideTag;
169
+ ref = node.children;
170
+ for (i = 0, len = ref.length; i < len; i++) {
171
+ child = ref[i];
172
+ r += this.writeChildNode(child, options, level + 1);
173
+ }
174
+ options.state = WriterState.CloseTag;
175
+ r += ']';
176
+ }
177
+ options.state = WriterState.CloseTag;
178
+ r += options.spaceBeforeSlash + '>';
179
+ r += this.endline(node, options, level);
180
+ options.state = WriterState.None;
181
+ this.closeNode(node, options, level);
182
+ return r;
183
+ };
184
+
185
+ XMLWriterBase.prototype.element = function(node, options, level) {
186
+ var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;
187
+ level || (level = 0);
188
+ prettySuppressed = false;
189
+ r = '';
190
+ this.openNode(node, options, level);
191
+ options.state = WriterState.OpenTag;
192
+ r += this.indent(node, options, level) + '<' + node.name;
193
+ ref = node.attribs;
194
+ for (name in ref) {
195
+ if (!hasProp.call(ref, name)) continue;
196
+ att = ref[name];
197
+ r += this.attribute(att, options, level);
198
+ }
199
+ childNodeCount = node.children.length;
200
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
201
+ if (childNodeCount === 0 || node.children.every(function(e) {
202
+ return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';
203
+ })) {
204
+ if (options.allowEmpty) {
205
+ r += '>';
206
+ options.state = WriterState.CloseTag;
207
+ r += '</' + node.name + '>' + this.endline(node, options, level);
78
208
  } else {
79
- return '';
209
+ options.state = WriterState.CloseTag;
210
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
80
211
  }
212
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {
213
+ r += '>';
214
+ options.state = WriterState.InsideTag;
215
+ options.suppressPrettyCount++;
216
+ prettySuppressed = true;
217
+ r += this.writeChildNode(firstChildNode, options, level + 1);
218
+ options.suppressPrettyCount--;
219
+ prettySuppressed = false;
220
+ options.state = WriterState.CloseTag;
221
+ r += '</' + node.name + '>' + this.endline(node, options, level);
81
222
  } else {
82
- return '';
223
+ if (options.dontPrettyTextNodes) {
224
+ ref1 = node.children;
225
+ for (i = 0, len = ref1.length; i < len; i++) {
226
+ child = ref1[i];
227
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {
228
+ options.suppressPrettyCount++;
229
+ prettySuppressed = true;
230
+ break;
231
+ }
232
+ }
233
+ }
234
+ r += '>' + this.endline(node, options, level);
235
+ options.state = WriterState.InsideTag;
236
+ ref2 = node.children;
237
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
238
+ child = ref2[j];
239
+ r += this.writeChildNode(child, options, level + 1);
240
+ }
241
+ options.state = WriterState.CloseTag;
242
+ r += this.indent(node, options, level) + '</' + node.name + '>';
243
+ if (prettySuppressed) {
244
+ options.suppressPrettyCount--;
245
+ }
246
+ r += this.endline(node, options, level);
247
+ options.state = WriterState.None;
248
+ }
249
+ this.closeNode(node, options, level);
250
+ return r;
251
+ };
252
+
253
+ XMLWriterBase.prototype.writeChildNode = function(node, options, level) {
254
+ switch (node.type) {
255
+ case NodeType.CData:
256
+ return this.cdata(node, options, level);
257
+ case NodeType.Comment:
258
+ return this.comment(node, options, level);
259
+ case NodeType.Element:
260
+ return this.element(node, options, level);
261
+ case NodeType.Raw:
262
+ return this.raw(node, options, level);
263
+ case NodeType.Text:
264
+ return this.text(node, options, level);
265
+ case NodeType.ProcessingInstruction:
266
+ return this.processingInstruction(node, options, level);
267
+ case NodeType.Dummy:
268
+ return '';
269
+ case NodeType.Declaration:
270
+ return this.declaration(node, options, level);
271
+ case NodeType.DocType:
272
+ return this.docType(node, options, level);
273
+ case NodeType.AttributeDeclaration:
274
+ return this.dtdAttList(node, options, level);
275
+ case NodeType.ElementDeclaration:
276
+ return this.dtdElement(node, options, level);
277
+ case NodeType.EntityDeclaration:
278
+ return this.dtdEntity(node, options, level);
279
+ case NodeType.NotationDeclaration:
280
+ return this.dtdNotation(node, options, level);
281
+ default:
282
+ throw new Error("Unknown XML node type: " + node.constructor.name);
283
+ }
284
+ };
285
+
286
+ XMLWriterBase.prototype.processingInstruction = function(node, options, level) {
287
+ var r;
288
+ this.openNode(node, options, level);
289
+ options.state = WriterState.OpenTag;
290
+ r = this.indent(node, options, level) + '<?';
291
+ options.state = WriterState.InsideTag;
292
+ r += node.target;
293
+ if (node.value) {
294
+ r += ' ' + node.value;
295
+ }
296
+ options.state = WriterState.CloseTag;
297
+ r += options.spaceBeforeSlash + '?>';
298
+ r += this.endline(node, options, level);
299
+ options.state = WriterState.None;
300
+ this.closeNode(node, options, level);
301
+ return r;
302
+ };
303
+
304
+ XMLWriterBase.prototype.raw = function(node, options, level) {
305
+ var r;
306
+ this.openNode(node, options, level);
307
+ options.state = WriterState.OpenTag;
308
+ r = this.indent(node, options, level);
309
+ options.state = WriterState.InsideTag;
310
+ r += node.value;
311
+ options.state = WriterState.CloseTag;
312
+ r += this.endline(node, options, level);
313
+ options.state = WriterState.None;
314
+ this.closeNode(node, options, level);
315
+ return r;
316
+ };
317
+
318
+ XMLWriterBase.prototype.text = function(node, options, level) {
319
+ var r;
320
+ this.openNode(node, options, level);
321
+ options.state = WriterState.OpenTag;
322
+ r = this.indent(node, options, level);
323
+ options.state = WriterState.InsideTag;
324
+ r += node.value;
325
+ options.state = WriterState.CloseTag;
326
+ r += this.endline(node, options, level);
327
+ options.state = WriterState.None;
328
+ this.closeNode(node, options, level);
329
+ return r;
330
+ };
331
+
332
+ XMLWriterBase.prototype.dtdAttList = function(node, options, level) {
333
+ var r;
334
+ this.openNode(node, options, level);
335
+ options.state = WriterState.OpenTag;
336
+ r = this.indent(node, options, level) + '<!ATTLIST';
337
+ options.state = WriterState.InsideTag;
338
+ r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;
339
+ if (node.defaultValueType !== '#DEFAULT') {
340
+ r += ' ' + node.defaultValueType;
341
+ }
342
+ if (node.defaultValue) {
343
+ r += ' "' + node.defaultValue + '"';
83
344
  }
345
+ options.state = WriterState.CloseTag;
346
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
347
+ options.state = WriterState.None;
348
+ this.closeNode(node, options, level);
349
+ return r;
84
350
  };
85
351
 
352
+ XMLWriterBase.prototype.dtdElement = function(node, options, level) {
353
+ var r;
354
+ this.openNode(node, options, level);
355
+ options.state = WriterState.OpenTag;
356
+ r = this.indent(node, options, level) + '<!ELEMENT';
357
+ options.state = WriterState.InsideTag;
358
+ r += ' ' + node.name + ' ' + node.value;
359
+ options.state = WriterState.CloseTag;
360
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
361
+ options.state = WriterState.None;
362
+ this.closeNode(node, options, level);
363
+ return r;
364
+ };
365
+
366
+ XMLWriterBase.prototype.dtdEntity = function(node, options, level) {
367
+ var r;
368
+ this.openNode(node, options, level);
369
+ options.state = WriterState.OpenTag;
370
+ r = this.indent(node, options, level) + '<!ENTITY';
371
+ options.state = WriterState.InsideTag;
372
+ if (node.pe) {
373
+ r += ' %';
374
+ }
375
+ r += ' ' + node.name;
376
+ if (node.value) {
377
+ r += ' "' + node.value + '"';
378
+ } else {
379
+ if (node.pubID && node.sysID) {
380
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
381
+ } else if (node.sysID) {
382
+ r += ' SYSTEM "' + node.sysID + '"';
383
+ }
384
+ if (node.nData) {
385
+ r += ' NDATA ' + node.nData;
386
+ }
387
+ }
388
+ options.state = WriterState.CloseTag;
389
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
390
+ options.state = WriterState.None;
391
+ this.closeNode(node, options, level);
392
+ return r;
393
+ };
394
+
395
+ XMLWriterBase.prototype.dtdNotation = function(node, options, level) {
396
+ var r;
397
+ this.openNode(node, options, level);
398
+ options.state = WriterState.OpenTag;
399
+ r = this.indent(node, options, level) + '<!NOTATION';
400
+ options.state = WriterState.InsideTag;
401
+ r += ' ' + node.name;
402
+ if (node.pubID && node.sysID) {
403
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
404
+ } else if (node.pubID) {
405
+ r += ' PUBLIC "' + node.pubID + '"';
406
+ } else if (node.sysID) {
407
+ r += ' SYSTEM "' + node.sysID + '"';
408
+ }
409
+ options.state = WriterState.CloseTag;
410
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
411
+ options.state = WriterState.None;
412
+ this.closeNode(node, options, level);
413
+ return r;
414
+ };
415
+
416
+ XMLWriterBase.prototype.openNode = function(node, options, level) {};
417
+
418
+ XMLWriterBase.prototype.closeNode = function(node, options, level) {};
419
+
420
+ XMLWriterBase.prototype.openAttribute = function(att, options, level) {};
421
+
422
+ XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};
423
+
86
424
  return XMLWriterBase;
87
425
 
88
426
  })();
@@ -1,9 +1,11 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;
3
+ var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;
4
4
 
5
5
  ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction;
6
6
 
7
+ XMLDOMImplementation = require('./XMLDOMImplementation');
8
+
7
9
  XMLDocument = require('./XMLDocument');
8
10
 
9
11
  XMLDocumentCB = require('./XMLDocumentCB');
@@ -12,10 +14,14 @@
12
14
 
13
15
  XMLStreamWriter = require('./XMLStreamWriter');
14
16
 
17
+ NodeType = require('./NodeType');
18
+
19
+ WriterState = require('./WriterState');
20
+
15
21
  module.exports.create = function(name, xmldec, doctype, options) {
16
22
  var doc, root;
17
23
  if (name == null) {
18
- throw new Error("Root element needs a name");
24
+ throw new Error("Root element needs a name.");
19
25
  }
20
26
  options = assign({}, xmldec, doctype, options);
21
27
  doc = new XMLDocument(options);
@@ -23,7 +29,7 @@
23
29
  if (!options.headless) {
24
30
  doc.declaration(options);
25
31
  if ((options.pubID != null) || (options.sysID != null)) {
26
- doc.doctype(options);
32
+ doc.dtd(options);
27
33
  }
28
34
  }
29
35
  return root;
@@ -50,4 +56,10 @@
50
56
  return new XMLStreamWriter(stream, options);
51
57
  };
52
58
 
59
+ module.exports.implementation = new XMLDOMImplementation();
60
+
61
+ module.exports.nodeType = NodeType;
62
+
63
+ module.exports.writerState = WriterState;
64
+
53
65
  }).call(this);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlbuilder",
3
- "version": "9.0.7",
3
+ "version": "11.0.1",
4
4
  "keywords": [
5
5
  "xml",
6
6
  "xmlbuilder"
@@ -18,6 +18,7 @@
18
18
  "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
19
19
  },
20
20
  "main": "./lib/index",
21
+ "typings": "./typings/index.d.ts",
21
22
  "engines": {
22
23
  "node": ">=4.0"
23
24
  },
@@ -27,10 +28,11 @@
27
28
  "mocha": "*",
28
29
  "coffee-coverage": "2.*",
29
30
  "istanbul": "*",
30
- "coveralls": "*"
31
+ "coveralls": "*",
32
+ "xpath": "*"
31
33
  },
32
34
  "scripts": {
33
- "prepublish": "coffee -co lib src",
35
+ "prepublishOnly": "coffee -co lib src",
34
36
  "postpublish": "rm -rf lib",
35
37
  "test": "mocha \"test/**/*.coffee\" && istanbul report text lcov"
36
38
  }