cdk-comprehend-s3olap 2.0.120 → 2.0.122

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 (79) 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 +9 -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/marketplace-catalog-2018-09-17.min.json +82 -15
  11. package/node_modules/aws-sdk/apis/mediaconvert-2017-08-29.min.json +56 -32
  12. package/node_modules/aws-sdk/apis/rekognition-2016-06-27.min.json +224 -138
  13. package/node_modules/aws-sdk/clients/connect.d.ts +15 -4
  14. package/node_modules/aws-sdk/clients/ecs.d.ts +24 -24
  15. package/node_modules/aws-sdk/clients/marketplacecatalog.d.ts +67 -7
  16. package/node_modules/aws-sdk/clients/mediaconvert.d.ts +20 -1
  17. package/node_modules/aws-sdk/clients/omics.d.ts +2 -2
  18. package/node_modules/aws-sdk/clients/rekognition.d.ts +114 -16
  19. package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +1 -1
  20. package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +2532 -875
  21. package/node_modules/aws-sdk/dist/aws-sdk.js +505 -343
  22. package/node_modules/aws-sdk/dist/aws-sdk.min.js +79 -79
  23. package/node_modules/aws-sdk/dist/xml2js.js +2579 -922
  24. package/node_modules/aws-sdk/lib/core.js +1 -1
  25. package/node_modules/aws-sdk/package.json +2 -2
  26. package/node_modules/esbuild/bin/esbuild +1 -1
  27. package/node_modules/esbuild/lib/main.js +8 -8
  28. package/node_modules/esbuild/package.json +23 -23
  29. package/node_modules/xml2js/README.md +108 -7
  30. package/node_modules/xml2js/lib/parser.js +35 -7
  31. package/node_modules/xml2js/lib/xml2js.js +2 -0
  32. package/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md +47 -0
  33. package/node_modules/xml2js/node_modules/xmlbuilder/LICENSE +21 -21
  34. package/node_modules/xml2js/node_modules/xmlbuilder/README.md +86 -85
  35. package/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml +20 -0
  36. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js +10 -0
  37. package/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js +12 -0
  38. package/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js +23 -0
  39. package/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js +11 -0
  40. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js +11 -1
  41. package/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js +10 -0
  42. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js +86 -9
  43. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js +10 -6
  44. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js +79 -0
  45. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js +10 -6
  46. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +64 -0
  47. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +16 -0
  48. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js +32 -0
  49. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js +28 -0
  50. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js +16 -11
  51. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js +7 -4
  52. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js +49 -8
  53. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js +20 -5
  54. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js +5 -2
  55. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js +84 -5
  56. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js +199 -5
  57. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js +165 -39
  58. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js +24 -0
  59. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js +31 -0
  60. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js +207 -20
  61. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +58 -0
  62. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js +403 -50
  63. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js +48 -0
  64. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js +28 -0
  65. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +19 -5
  66. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js +6 -3
  67. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js +94 -197
  68. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js +6 -305
  69. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js +109 -32
  70. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js +43 -6
  71. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLTypeInfo.js +21 -0
  72. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js +16 -0
  73. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLWriterBase.js +397 -59
  74. package/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js +15 -3
  75. package/node_modules/xml2js/node_modules/xmlbuilder/package.json +5 -3
  76. package/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts +153 -0
  77. package/node_modules/xml2js/package.json +11 -5
  78. package/package.json +5 -5
  79. package/node_modules/xml2js/node_modules/xmlbuilder/.npmignore +0 -5
@@ -1,85 +1,86 @@
1
- # xmlbuilder-js
2
-
3
- An XML builder for [node.js](https://nodejs.org/) similar to
4
- [java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).
5
-
6
- [![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
7
- [![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
8
- [![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
9
-
10
- [![Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
11
- [![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
12
- [![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)
13
-
14
- ### Installation:
15
-
16
- ``` sh
17
- npm install xmlbuilder
18
- ```
19
-
20
- ### Usage:
21
-
22
- ``` js
23
- var builder = require('xmlbuilder');
24
- var xml = builder.create('root')
25
- .ele('xmlbuilder')
26
- .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
27
- .end({ pretty: true});
28
-
29
- console.log(xml);
30
- ```
31
-
32
- will result in:
33
-
34
- ``` xml
35
- <?xml version="1.0"?>
36
- <root>
37
- <xmlbuilder>
38
- <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
39
- </xmlbuilder>
40
- </root>
41
- ```
42
-
43
- It is also possible to convert objects into nodes:
44
-
45
- ``` js
46
- builder.create({
47
- root: {
48
- xmlbuilder: {
49
- repo: {
50
- '@type': 'git', // attributes start with @
51
- '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
52
- }
53
- }
54
- }
55
- });
56
- ```
57
-
58
- If you need to do some processing:
59
-
60
- ``` js
61
- var root = builder.create('squares');
62
- root.com('f(x) = x^2');
63
- for(var i = 1; i <= 5; i++)
64
- {
65
- var item = root.ele('data');
66
- item.att('x', i);
67
- item.att('y', i * i);
68
- }
69
- ```
70
-
71
- This will result in:
72
-
73
- ``` xml
74
- <?xml version="1.0"?>
75
- <squares>
76
- <!-- f(x) = x^2 -->
77
- <data x="1" y="1"/>
78
- <data x="2" y="4"/>
79
- <data x="3" y="9"/>
80
- <data x="4" y="16"/>
81
- <data x="5" y="25"/>
82
- </squares>
83
- ```
84
-
85
- See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.
1
+ # xmlbuilder-js
2
+
3
+ An XML builder for [node.js](https://nodejs.org/) similar to
4
+ [java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).
5
+
6
+ [![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
7
+ [![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
8
+ [![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
9
+
10
+ [![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
11
+ [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js)
12
+ [![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
13
+ [![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)
14
+
15
+ ### Installation:
16
+
17
+ ``` sh
18
+ npm install xmlbuilder
19
+ ```
20
+
21
+ ### Usage:
22
+
23
+ ``` js
24
+ var builder = require('xmlbuilder');
25
+ var xml = builder.create('root')
26
+ .ele('xmlbuilder')
27
+ .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
28
+ .end({ pretty: true});
29
+
30
+ console.log(xml);
31
+ ```
32
+
33
+ will result in:
34
+
35
+ ``` xml
36
+ <?xml version="1.0"?>
37
+ <root>
38
+ <xmlbuilder>
39
+ <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
40
+ </xmlbuilder>
41
+ </root>
42
+ ```
43
+
44
+ It is also possible to convert objects into nodes:
45
+
46
+ ``` js
47
+ builder.create({
48
+ root: {
49
+ xmlbuilder: {
50
+ repo: {
51
+ '@type': 'git', // attributes start with @
52
+ '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
53
+ }
54
+ }
55
+ }
56
+ });
57
+ ```
58
+
59
+ If you need to do some processing:
60
+
61
+ ``` js
62
+ var root = builder.create('squares');
63
+ root.com('f(x) = x^2');
64
+ for(var i = 1; i <= 5; i++)
65
+ {
66
+ var item = root.ele('data');
67
+ item.att('x', i);
68
+ item.att('y', i * i);
69
+ }
70
+ ```
71
+
72
+ This will result in:
73
+
74
+ ``` xml
75
+ <?xml version="1.0"?>
76
+ <squares>
77
+ <!-- f(x) = x^2 -->
78
+ <data x="1" y="1"/>
79
+ <data x="2" y="4"/>
80
+ <data x="3" y="9"/>
81
+ <data x="4" y="16"/>
82
+ <data x="5" y="25"/>
83
+ </squares>
84
+ ```
85
+
86
+ See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.
@@ -0,0 +1,20 @@
1
+ environment:
2
+ matrix:
3
+ - nodejs_version: "4"
4
+ - nodejs_version: "5"
5
+ - nodejs_version: "6"
6
+ - nodejs_version: "8"
7
+ - nodejs_version: "10"
8
+ - nodejs_version: "" # latest
9
+
10
+ install:
11
+ - ps: "Install-Product node $env:nodejs_version"
12
+ - "npm install"
13
+
14
+ test_script:
15
+ - "node --version"
16
+ - "npm --version"
17
+ - "npm test"
18
+
19
+ build: off
20
+
@@ -0,0 +1,10 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ module.exports = {
4
+ Restriction: 1,
5
+ Extension: 2,
6
+ Union: 4,
7
+ List: 8
8
+ };
9
+
10
+ }).call(this);
@@ -0,0 +1,12 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ module.exports = {
4
+ Disconnected: 1,
5
+ Preceding: 2,
6
+ Following: 4,
7
+ Contains: 8,
8
+ ContainedBy: 16,
9
+ ImplementationSpecific: 32
10
+ };
11
+
12
+ }).call(this);
@@ -0,0 +1,23 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ module.exports = {
4
+ Element: 1,
5
+ Attribute: 2,
6
+ Text: 3,
7
+ CData: 4,
8
+ EntityReference: 5,
9
+ EntityDeclaration: 6,
10
+ ProcessingInstruction: 7,
11
+ Comment: 8,
12
+ Document: 9,
13
+ DocType: 10,
14
+ DocumentFragment: 11,
15
+ NotationDeclaration: 12,
16
+ Declaration: 201,
17
+ Raw: 202,
18
+ AttributeDeclaration: 203,
19
+ ElementDeclaration: 204,
20
+ Dummy: 205
21
+ };
22
+
23
+ }).call(this);
@@ -0,0 +1,11 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ module.exports = {
4
+ Clones: 1,
5
+ Imported: 2,
6
+ Deleted: 3,
7
+ Renamed: 4,
8
+ Adopted: 5
9
+ };
10
+
11
+ }).call(this);
@@ -1,6 +1,6 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var assign, isArray, isEmpty, isFunction, isObject, isPlainObject,
3
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
4
4
  slice = [].slice,
5
5
  hasProp = {}.hasOwnProperty;
6
6
 
@@ -58,6 +58,14 @@
58
58
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
59
59
  };
60
60
 
61
+ getValue = function(obj) {
62
+ if (isFunction(obj.valueOf)) {
63
+ return obj.valueOf();
64
+ } else {
65
+ return obj;
66
+ }
67
+ };
68
+
61
69
  module.exports.assign = assign;
62
70
 
63
71
  module.exports.isFunction = isFunction;
@@ -70,4 +78,6 @@
70
78
 
71
79
  module.exports.isPlainObject = isPlainObject;
72
80
 
81
+ module.exports.getValue = getValue;
82
+
73
83
  }).call(this);
@@ -0,0 +1,10 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ module.exports = {
4
+ None: 0,
5
+ OpenTag: 1,
6
+ InsideTag: 2,
7
+ CloseTag: 3
8
+ };
9
+
10
+ }).call(this);
@@ -1,27 +1,104 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var XMLAttribute;
3
+ var NodeType, XMLAttribute, XMLNode;
4
+
5
+ NodeType = require('./NodeType');
6
+
7
+ XMLNode = require('./XMLNode');
4
8
 
5
9
  module.exports = XMLAttribute = (function() {
6
10
  function XMLAttribute(parent, name, value) {
7
- this.options = parent.options;
8
- this.stringify = parent.stringify;
9
- if (name == null) {
10
- throw new Error("Missing attribute name of element " + parent.name);
11
+ this.parent = parent;
12
+ if (this.parent) {
13
+ this.options = this.parent.options;
14
+ this.stringify = this.parent.stringify;
11
15
  }
12
- if (value == null) {
13
- throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name);
16
+ if (name == null) {
17
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
14
18
  }
15
- this.name = this.stringify.attName(name);
19
+ this.name = this.stringify.name(name);
16
20
  this.value = this.stringify.attValue(value);
21
+ this.type = NodeType.Attribute;
22
+ this.isId = false;
23
+ this.schemaTypeInfo = null;
17
24
  }
18
25
 
26
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
27
+ get: function() {
28
+ return this.type;
29
+ }
30
+ });
31
+
32
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
33
+ get: function() {
34
+ return this.parent;
35
+ }
36
+ });
37
+
38
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
39
+ get: function() {
40
+ return this.value;
41
+ },
42
+ set: function(value) {
43
+ return this.value = value || '';
44
+ }
45
+ });
46
+
47
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
48
+ get: function() {
49
+ return '';
50
+ }
51
+ });
52
+
53
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
54
+ get: function() {
55
+ return '';
56
+ }
57
+ });
58
+
59
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
60
+ get: function() {
61
+ return this.name;
62
+ }
63
+ });
64
+
65
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
66
+ get: function() {
67
+ return true;
68
+ }
69
+ });
70
+
19
71
  XMLAttribute.prototype.clone = function() {
20
72
  return Object.create(this);
21
73
  };
22
74
 
23
75
  XMLAttribute.prototype.toString = function(options) {
24
- return this.options.writer.set(options).attribute(this);
76
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
77
+ };
78
+
79
+ XMLAttribute.prototype.debugInfo = function(name) {
80
+ name = name || this.name;
81
+ if (name == null) {
82
+ return "parent: <" + this.parent.name + ">";
83
+ } else {
84
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
85
+ }
86
+ };
87
+
88
+ XMLAttribute.prototype.isEqualNode = function(node) {
89
+ if (node.namespaceURI !== this.namespaceURI) {
90
+ return false;
91
+ }
92
+ if (node.prefix !== this.prefix) {
93
+ return false;
94
+ }
95
+ if (node.localName !== this.localName) {
96
+ return false;
97
+ }
98
+ if (node.value !== this.value) {
99
+ return false;
100
+ }
101
+ return true;
25
102
  };
26
103
 
27
104
  return XMLAttribute;
@@ -1,10 +1,12 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var XMLCData, XMLNode,
3
+ var NodeType, XMLCData, XMLCharacterData,
4
4
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
5
5
  hasProp = {}.hasOwnProperty;
6
6
 
7
- XMLNode = require('./XMLNode');
7
+ NodeType = require('./NodeType');
8
+
9
+ XMLCharacterData = require('./XMLCharacterData');
8
10
 
9
11
  module.exports = XMLCData = (function(superClass) {
10
12
  extend(XMLCData, superClass);
@@ -12,9 +14,11 @@
12
14
  function XMLCData(parent, text) {
13
15
  XMLCData.__super__.constructor.call(this, parent);
14
16
  if (text == null) {
15
- throw new Error("Missing CDATA text");
17
+ throw new Error("Missing CDATA text. " + this.debugInfo());
16
18
  }
17
- this.text = this.stringify.cdata(text);
19
+ this.name = "#cdata-section";
20
+ this.type = NodeType.CData;
21
+ this.value = this.stringify.cdata(text);
18
22
  }
19
23
 
20
24
  XMLCData.prototype.clone = function() {
@@ -22,11 +26,11 @@
22
26
  };
23
27
 
24
28
  XMLCData.prototype.toString = function(options) {
25
- return this.options.writer.set(options).cdata(this);
29
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
26
30
  };
27
31
 
28
32
  return XMLCData;
29
33
 
30
- })(XMLNode);
34
+ })(XMLCharacterData);
31
35
 
32
36
  }).call(this);
@@ -0,0 +1,79 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ var XMLCharacterData, XMLNode,
4
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
5
+ hasProp = {}.hasOwnProperty;
6
+
7
+ XMLNode = require('./XMLNode');
8
+
9
+ module.exports = XMLCharacterData = (function(superClass) {
10
+ extend(XMLCharacterData, superClass);
11
+
12
+ function XMLCharacterData(parent) {
13
+ XMLCharacterData.__super__.constructor.call(this, parent);
14
+ this.value = '';
15
+ }
16
+
17
+ Object.defineProperty(XMLCharacterData.prototype, 'data', {
18
+ get: function() {
19
+ return this.value;
20
+ },
21
+ set: function(value) {
22
+ return this.value = value || '';
23
+ }
24
+ });
25
+
26
+ Object.defineProperty(XMLCharacterData.prototype, 'length', {
27
+ get: function() {
28
+ return this.value.length;
29
+ }
30
+ });
31
+
32
+ Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
33
+ get: function() {
34
+ return this.value;
35
+ },
36
+ set: function(value) {
37
+ return this.value = value || '';
38
+ }
39
+ });
40
+
41
+ XMLCharacterData.prototype.clone = function() {
42
+ return Object.create(this);
43
+ };
44
+
45
+ XMLCharacterData.prototype.substringData = function(offset, count) {
46
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
47
+ };
48
+
49
+ XMLCharacterData.prototype.appendData = function(arg) {
50
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
51
+ };
52
+
53
+ XMLCharacterData.prototype.insertData = function(offset, arg) {
54
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
55
+ };
56
+
57
+ XMLCharacterData.prototype.deleteData = function(offset, count) {
58
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
59
+ };
60
+
61
+ XMLCharacterData.prototype.replaceData = function(offset, count, arg) {
62
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
63
+ };
64
+
65
+ XMLCharacterData.prototype.isEqualNode = function(node) {
66
+ if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
67
+ return false;
68
+ }
69
+ if (node.data !== this.data) {
70
+ return false;
71
+ }
72
+ return true;
73
+ };
74
+
75
+ return XMLCharacterData;
76
+
77
+ })(XMLNode);
78
+
79
+ }).call(this);
@@ -1,10 +1,12 @@
1
1
  // Generated by CoffeeScript 1.12.7
2
2
  (function() {
3
- var XMLComment, XMLNode,
3
+ var NodeType, XMLCharacterData, XMLComment,
4
4
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
5
5
  hasProp = {}.hasOwnProperty;
6
6
 
7
- XMLNode = require('./XMLNode');
7
+ NodeType = require('./NodeType');
8
+
9
+ XMLCharacterData = require('./XMLCharacterData');
8
10
 
9
11
  module.exports = XMLComment = (function(superClass) {
10
12
  extend(XMLComment, superClass);
@@ -12,9 +14,11 @@
12
14
  function XMLComment(parent, text) {
13
15
  XMLComment.__super__.constructor.call(this, parent);
14
16
  if (text == null) {
15
- throw new Error("Missing comment text");
17
+ throw new Error("Missing comment text. " + this.debugInfo());
16
18
  }
17
- this.text = this.stringify.comment(text);
19
+ this.name = "#comment";
20
+ this.type = NodeType.Comment;
21
+ this.value = this.stringify.comment(text);
18
22
  }
19
23
 
20
24
  XMLComment.prototype.clone = function() {
@@ -22,11 +26,11 @@
22
26
  };
23
27
 
24
28
  XMLComment.prototype.toString = function(options) {
25
- return this.options.writer.set(options).comment(this);
29
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
26
30
  };
27
31
 
28
32
  return XMLComment;
29
33
 
30
- })(XMLNode);
34
+ })(XMLCharacterData);
31
35
 
32
36
  }).call(this);
@@ -0,0 +1,64 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
4
+
5
+ XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
6
+
7
+ XMLDOMStringList = require('./XMLDOMStringList');
8
+
9
+ module.exports = XMLDOMConfiguration = (function() {
10
+ function XMLDOMConfiguration() {
11
+ var clonedSelf;
12
+ this.defaultParams = {
13
+ "canonical-form": false,
14
+ "cdata-sections": false,
15
+ "comments": false,
16
+ "datatype-normalization": false,
17
+ "element-content-whitespace": true,
18
+ "entities": true,
19
+ "error-handler": new XMLDOMErrorHandler(),
20
+ "infoset": true,
21
+ "validate-if-schema": false,
22
+ "namespaces": true,
23
+ "namespace-declarations": true,
24
+ "normalize-characters": false,
25
+ "schema-location": '',
26
+ "schema-type": '',
27
+ "split-cdata-sections": true,
28
+ "validate": false,
29
+ "well-formed": true
30
+ };
31
+ this.params = clonedSelf = Object.create(this.defaultParams);
32
+ }
33
+
34
+ Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
35
+ get: function() {
36
+ return new XMLDOMStringList(Object.keys(this.defaultParams));
37
+ }
38
+ });
39
+
40
+ XMLDOMConfiguration.prototype.getParameter = function(name) {
41
+ if (this.params.hasOwnProperty(name)) {
42
+ return this.params[name];
43
+ } else {
44
+ return null;
45
+ }
46
+ };
47
+
48
+ XMLDOMConfiguration.prototype.canSetParameter = function(name, value) {
49
+ return true;
50
+ };
51
+
52
+ XMLDOMConfiguration.prototype.setParameter = function(name, value) {
53
+ if (value != null) {
54
+ return this.params[name] = value;
55
+ } else {
56
+ return delete this.params[name];
57
+ }
58
+ };
59
+
60
+ return XMLDOMConfiguration;
61
+
62
+ })();
63
+
64
+ }).call(this);
@@ -0,0 +1,16 @@
1
+ // Generated by CoffeeScript 1.12.7
2
+ (function() {
3
+ var XMLDOMErrorHandler;
4
+
5
+ module.exports = XMLDOMErrorHandler = (function() {
6
+ function XMLDOMErrorHandler() {}
7
+
8
+ XMLDOMErrorHandler.prototype.handleError = function(error) {
9
+ throw new Error(error);
10
+ };
11
+
12
+ return XMLDOMErrorHandler;
13
+
14
+ })();
15
+
16
+ }).call(this);