@kamilio/wire 0.1.21 → 0.1.23

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 (72) hide show
  1. package/README.md +15 -0
  2. package/dist/adapters/root.d.ts +12 -1
  3. package/dist/adapters/root.d.ts.map +1 -1
  4. package/dist/adapters/root.js +61 -1
  5. package/dist/adapters/root.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +5 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/executable.d.ts.map +1 -1
  10. package/dist/executable.js +5 -1
  11. package/dist/executable.js.map +1 -1
  12. package/node_modules/@xmldom/xmldom/CHANGELOG.md +1132 -0
  13. package/node_modules/@xmldom/xmldom/LICENSE +8 -0
  14. package/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
  15. package/node_modules/@xmldom/xmldom/index.d.ts +1843 -0
  16. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +3 -0
  17. package/node_modules/@xmldom/xmldom/lib/conventions.js +429 -0
  18. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +591 -0
  19. package/node_modules/@xmldom/xmldom/lib/dom.js +3759 -0
  20. package/node_modules/@xmldom/xmldom/lib/entities.js +2171 -0
  21. package/node_modules/@xmldom/xmldom/lib/errors.js +205 -0
  22. package/node_modules/@xmldom/xmldom/lib/grammar.js +559 -0
  23. package/node_modules/@xmldom/xmldom/lib/index.js +41 -0
  24. package/node_modules/@xmldom/xmldom/lib/sax.js +983 -0
  25. package/node_modules/@xmldom/xmldom/package.json +77 -0
  26. package/node_modules/@xmldom/xmldom/readme.md +366 -0
  27. package/node_modules/marked/LICENSE.md +44 -0
  28. package/node_modules/marked/README.md +107 -0
  29. package/node_modules/marked/bin/main.js +284 -0
  30. package/node_modules/marked/bin/marked.js +16 -0
  31. package/node_modules/marked/lib/marked.d.ts +759 -0
  32. package/node_modules/marked/lib/marked.esm.js +72 -0
  33. package/node_modules/marked/lib/marked.esm.js.map +7 -0
  34. package/node_modules/marked/lib/marked.umd.js +74 -0
  35. package/node_modules/marked/lib/marked.umd.js.map +7 -0
  36. package/node_modules/marked/man/marked.1 +113 -0
  37. package/node_modules/marked/man/marked.1.md +93 -0
  38. package/node_modules/marked/package.json +103 -0
  39. package/node_modules/provider-asana/dist/asana-explore.d.ts +23 -0
  40. package/node_modules/provider-asana/dist/asana-explore.d.ts.map +1 -0
  41. package/node_modules/provider-asana/dist/asana-explore.js +26 -0
  42. package/node_modules/provider-asana/dist/asana-explore.js.map +1 -0
  43. package/node_modules/provider-asana/dist/asana-http.d.ts +3 -1
  44. package/node_modules/provider-asana/dist/asana-http.d.ts.map +1 -1
  45. package/node_modules/provider-asana/dist/asana-http.js +38 -0
  46. package/node_modules/provider-asana/dist/asana-http.js.map +1 -1
  47. package/node_modules/provider-asana/dist/asana-markdown.d.ts +5 -0
  48. package/node_modules/provider-asana/dist/asana-markdown.d.ts.map +1 -0
  49. package/node_modules/provider-asana/dist/asana-markdown.js +127 -0
  50. package/node_modules/provider-asana/dist/asana-markdown.js.map +1 -0
  51. package/node_modules/provider-asana/dist/asana-project.d.ts.map +1 -1
  52. package/node_modules/provider-asana/dist/asana-project.js +1 -39
  53. package/node_modules/provider-asana/dist/asana-project.js.map +1 -1
  54. package/node_modules/provider-asana/dist/asana-task.d.ts +17 -1
  55. package/node_modules/provider-asana/dist/asana-task.d.ts.map +1 -1
  56. package/node_modules/provider-asana/dist/asana-task.js +104 -21
  57. package/node_modules/provider-asana/dist/asana-task.js.map +1 -1
  58. package/node_modules/provider-asana/dist/index.d.ts +2 -1
  59. package/node_modules/provider-asana/dist/index.d.ts.map +1 -1
  60. package/node_modules/provider-asana/dist/index.js +2 -1
  61. package/node_modules/provider-asana/dist/index.js.map +1 -1
  62. package/node_modules/provider-asana/package.json +2 -0
  63. package/node_modules/provider-asana/src/asana-explore.ts +29 -0
  64. package/node_modules/provider-asana/src/asana-http.ts +37 -1
  65. package/node_modules/provider-asana/src/asana-markdown.ts +113 -0
  66. package/node_modules/provider-asana/src/asana-project.ts +1 -37
  67. package/node_modules/provider-asana/src/asana-task.ts +91 -20
  68. package/node_modules/provider-asana/src/index.ts +2 -1
  69. package/package.json +12 -6
  70. package/src/adapters/root.ts +70 -1
  71. package/src/cli.ts +3 -1
  72. package/src/executable.ts +5 -1
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@xmldom/xmldom",
3
+ "version": "0.9.12",
4
+ "description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
5
+ "keywords": [
6
+ "w3c",
7
+ "dom",
8
+ "xml",
9
+ "parser",
10
+ "javascript",
11
+ "DOMParser",
12
+ "XMLSerializer",
13
+ "ponyfill"
14
+ ],
15
+ "homepage": "https://github.com/xmldom/xmldom",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git://github.com/xmldom/xmldom.git"
19
+ },
20
+ "main": "lib/index.js",
21
+ "types": "index.d.ts",
22
+ "files": [
23
+ "CHANGELOG.md",
24
+ "LICENSE",
25
+ "readme.md",
26
+ "SECURITY.md",
27
+ "index.d.ts",
28
+ "lib"
29
+ ],
30
+ "config": {
31
+ "test_stack_size": 256
32
+ },
33
+ "scripts": {
34
+ "lint": "eslint examples lib test",
35
+ "format": "prettier --write examples lib test index.d.ts",
36
+ "format:check": "prettier --check examples lib test index.d.ts",
37
+ "changelog": "auto-changelog --unreleased-only",
38
+ "start": "nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test && npm --silent run lint'",
39
+ "test": "node --stack-size=$npm_package_config_test_stack_size ./node_modules/.bin/jest",
40
+ "fuzz": "jest --config=./jest.fuzz.config.js",
41
+ "test:types": "cd examples/typescript-node-es6 && ./pretest.sh 3 && ./pretest.sh 4 && ./pretest.sh 5 && node dist/index.js",
42
+ "testrelease": "npm test && eslint lib",
43
+ "version": "./changelog-has-version.sh",
44
+ "release": "np --no-yarn --test-script testrelease"
45
+ },
46
+ "engines": {
47
+ "node": ">=14.6"
48
+ },
49
+ "devDependencies": {
50
+ "@homer0/prettier-plugin-jsdoc": "10.0.1",
51
+ "auto-changelog": "2.5.1",
52
+ "eslint": "8.57.1",
53
+ "eslint-config-prettier": "10.1.8",
54
+ "eslint-plugin-anti-trojan-source": "1.1.7",
55
+ "eslint-plugin-es5": "1.5.0",
56
+ "eslint-plugin-n": "17.24.0",
57
+ "eslint-plugin-prettier": "5.5.6",
58
+ "get-stream": "6.0.1",
59
+ "jest": "29.7.0",
60
+ "nodemon": "3.1.14",
61
+ "np": "9.2.0",
62
+ "prettier": "3.8.3",
63
+ "xmltest": "2.0.3",
64
+ "yauzl": "3.4.0"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/xmldom/xmldom/issues"
68
+ },
69
+ "license": "MIT",
70
+ "auto-changelog": {
71
+ "prepend": true,
72
+ "remote": "origin",
73
+ "tagPrefix": "",
74
+ "template": "./auto-changelog.hbs"
75
+ },
76
+ "packageManager": "npm@11.19.0+sha512.48377f8478372aa1c4e47b763475b135836da82436a5700f2e5e8eb5084fc840f93c7b117eb3ad3b5f7d3194c81b6710a10d59448f6ddbcb21ac3fb672bdc003"
77
+ }
@@ -0,0 +1,366 @@
1
+ # @xmldom/xmldom
2
+
3
+ ***Since version 0.7.0 this package is published to npm as [`@xmldom/xmldom`](https://www.npmjs.com/package/@xmldom/xmldom) and no longer as [`xmldom`](https://www.npmjs.com/package/xmldom), because [we are no longer able to publish `xmldom`](https://github.com/xmldom/xmldom/issues/271).***
4
+ *For better readability in the docs, we will continue to talk about this library as "xmldom".*
5
+
6
+ [![license(MIT)](https://img.shields.io/npm/l/@xmldom/xmldom?color=blue&style=flat-square)](https://github.com/xmldom/xmldom/blob/master/LICENSE)
7
+ [![no dependencies](https://img.shields.io/badge/dependencies-0-lightgreen)](https://socket.dev/npm/package/@xmldom/xmldom)
8
+ [![codecov](https://codecov.io/gh/xmldom/xmldom/branch/master/graph/badge.svg?token=NisDcchEOV)](https://codecov.io/gh/xmldom/xmldom)
9
+ [![install size](https://packagephobia.com/badge?p=@xmldom/xmldom)](https://packagephobia.com/result?p=@xmldom/xmldom)
10
+
11
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7879/badge)](https://www.bestpractices.dev/projects/7879)
12
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/xmldom/xmldom/badge)](https://securityscorecards.dev/viewer/?uri=github.com/xmldom/xmldom)
13
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/@xmldom/xmldom)](https://socket.dev/npm/package/@xmldom/xmldom)
14
+
15
+ [![npm:latest](https://img.shields.io/npm/v/@xmldom/xmldom/latest?style=flat-square)](https://www.npmjs.com/package/@xmldom/xmldom)
16
+ [![npm:next](https://img.shields.io/npm/v/@xmldom/xmldom/next?style=flat-square)](https://www.npmjs.com/package/@xmldom/xmldom?activeTab=versions)
17
+ [![npm:lts](https://img.shields.io/npm/v/@xmldom/xmldom/lts?style=flat-square)](https://www.npmjs.com/package/@xmldom/xmldom?activeTab=versions)
18
+
19
+ [![bug issues](https://img.shields.io/github/issues/xmldom/xmldom/bug?color=red&style=flat-square)](https://github.com/xmldom/xmldom/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
20
+ [![help-wanted issues](https://img.shields.io/github/issues/xmldom/xmldom/help-wanted?color=darkgreen&style=flat-square)](https://github.com/xmldom/xmldom/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted)
21
+
22
+ xmldom is a javascript [ponyfill](https://ponyfill.com/) to provide the following APIs [that are present in modern browsers](https://caniuse.com/xml-serializer) to other runtimes:
23
+ - convert an XML string into a DOM tree
24
+ ```
25
+ new DOMParser().parseFromString(xml, mimeType) => Document
26
+ ```
27
+ - create, access and modify a DOM tree
28
+ ```
29
+ new DOMImplementation().createDocument(...) => Document
30
+ ```
31
+ - serialize a DOM tree back into an XML string
32
+ ```
33
+ new XMLSerializer().serializeToString(node) => string
34
+ ```
35
+
36
+ The target runtimes `xmldom` supports are currently Node >= v14.6 (and very likely any other [ES5 compatible runtime](https://compat-table.github.io/compat-table/es5/)).
37
+
38
+ When deciding how to fix bugs or implement features, `xmldom` tries to stay as close as possible to the various [related specifications/standards](#specs).
39
+ As indicated by the version starting with `0.`, this implementation is not feature complete and some implemented features differ from what the specifications describe.
40
+ **Issues and PRs for such differences are always welcome, even when they only provide a failing test case.**
41
+
42
+ This project was forked from it's [original source](https://github.com/jindw/xmldom) in 2019, more details about that transition can be found in the [CHANGELOG](CHANGELOG.md#maintainer-changes).
43
+
44
+ ## Usage
45
+
46
+ ### Install:
47
+
48
+ ```
49
+ npm install @xmldom/xmldom
50
+ ```
51
+
52
+ ### Example:
53
+
54
+ [In NodeJS](examples/nodejs/src/index.js)
55
+ ```javascript
56
+ const { DOMParser, XMLSerializer } = require('@xmldom/xmldom')
57
+
58
+ const source = `<xml xmlns="a">
59
+ <child>test</child>
60
+ <child/>
61
+ </xml>`
62
+
63
+ const doc = new DOMParser().parseFromString(source, 'text/xml')
64
+
65
+ const serialized = new XMLSerializer().serializeToString(doc)
66
+ ```
67
+
68
+ Note: in Typescript ~~and ES6~~ (see [#316](https://github.com/xmldom/xmldom/issues/316)) you can use the `import` approach, as follows:
69
+
70
+ ```typescript
71
+ import { DOMParser } from '@xmldom/xmldom'
72
+ ```
73
+
74
+ ## API Reference
75
+
76
+ * [DOMParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser):
77
+
78
+ ```javascript
79
+ parseFromString(xmlsource, mimeType)
80
+ ```
81
+ * **options extension** _by xmldom_ (not DOM standard!!)
82
+
83
+ ```javascript
84
+ // the options argument can be used to modify behavior
85
+ // for more details check the documentation on the code or type definition
86
+ new DOMParser(options)
87
+ ```
88
+
89
+ * [XMLSerializer](https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer)
90
+
91
+ ```javascript
92
+ serializeToString(node)
93
+ ```
94
+ ### DOM level2 method and attribute:
95
+
96
+ All DOM node types listed below are exported for use with `instanceof` (e.g. `node instanceof Text`).
97
+ They cannot be constructed directly — use the `Document` factory methods (`createTextNode`, `createComment`, `createDocumentFragment`, …) instead.
98
+
99
+ * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)
100
+
101
+ readonly class properties (aka `NodeType`),
102
+ these can be accessed from any `Node` instance `node`:
103
+ `if (node.nodeType === node.ELEMENT_NODE) {...`
104
+
105
+ 1. `ELEMENT_NODE` (`1`)
106
+ 2. `ATTRIBUTE_NODE` (`2`)
107
+ 3. `TEXT_NODE` (`3`)
108
+ 4. `CDATA_SECTION_NODE` (`4`)
109
+ 5. `ENTITY_REFERENCE_NODE` (`5`)
110
+ 6. `ENTITY_NODE` (`6`)
111
+ 7. `PROCESSING_INSTRUCTION_NODE` (`7`)
112
+ 8. `COMMENT_NODE` (`8`)
113
+ 9. `DOCUMENT_NODE` (`9`)
114
+ 10. `DOCUMENT_TYPE_NODE` (`10`)
115
+ 11. `DOCUMENT_FRAGMENT_NODE` (`11`)
116
+ 12. `NOTATION_NODE` (`12`)
117
+
118
+ attribute:
119
+ - `nodeValue` | `prefix` | `textContent`
120
+
121
+ readonly attribute:
122
+ - `nodeName` | `nodeType` | `parentNode` | `parentElement` | `childNodes` | `firstChild` | `lastChild` | `previousSibling` | `nextSibling` | `attributes` | `ownerDocument` | `namespaceURI` | `localName` | `isConnected` | `baseURI`
123
+
124
+ method:
125
+ * `insertBefore(newChild, refChild)`
126
+ * `replaceChild(newChild, oldChild)`
127
+ * `removeChild(oldChild)`
128
+ * `appendChild(newChild)`
129
+ * `hasChildNodes()`
130
+ * `cloneNode(deep)`
131
+ * `normalize()`
132
+ * `contains(otherNode)`
133
+ * `getRootNode()`
134
+ * `isEqualNode(otherNode)`
135
+ * `isSameNode(otherNode)`
136
+ * `isSupported(feature, version)`
137
+ * `hasAttributes()`
138
+ * [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)
139
+
140
+ extends the Error type thrown as part of DOM API.
141
+
142
+ readonly class properties:
143
+ - `INDEX_SIZE_ERR` (`1`)
144
+ - `DOMSTRING_SIZE_ERR` (`2`)
145
+ - `HIERARCHY_REQUEST_ERR` (`3`)
146
+ - `WRONG_DOCUMENT_ERR` (`4`)
147
+ - `INVALID_CHARACTER_ERR` (`5`)
148
+ - `NO_DATA_ALLOWED_ERR` (`6`)
149
+ - `NO_MODIFICATION_ALLOWED_ERR` (`7`)
150
+ - `NOT_FOUND_ERR` (`8`)
151
+ - `NOT_SUPPORTED_ERR` (`9`)
152
+ - `INUSE_ATTRIBUTE_ERR` (`10`)
153
+ - `INVALID_STATE_ERR` (`11`)
154
+ - `SYNTAX_ERR` (`12`)
155
+ - `INVALID_MODIFICATION_ERR` (`13`)
156
+ - `NAMESPACE_ERR` (`14`)
157
+ - `INVALID_ACCESS_ERR` (`15`)
158
+
159
+ attributes:
160
+ - `code` with a value matching one of the above constants.
161
+
162
+ * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)
163
+
164
+ method:
165
+ - `hasFeature(feature, version)` (deprecated)
166
+ - `createDocumentType(qualifiedName, publicId, systemId)`
167
+ - `createDocument(namespaceURI, qualifiedName, doctype)`
168
+
169
+ * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node
170
+
171
+ readonly attribute:
172
+ - `doctype` | `implementation` | `documentElement`
173
+
174
+ method:
175
+ - `createElement(tagName)`
176
+ - `createDocumentFragment()`
177
+ - `createTextNode(data)`
178
+ - `createComment(data)`
179
+ - `createCDATASection(data)`
180
+ - `createProcessingInstruction(target, data)`
181
+ - `createAttribute(name)`
182
+ - `createEntityReference(name)`
183
+ - `getElementsByTagName(tagname)`
184
+ - `importNode(importedNode, deep)`
185
+ - `createElementNS(namespaceURI, qualifiedName)`
186
+ - `createAttributeNS(namespaceURI, qualifiedName)`
187
+ - `getElementsByTagNameNS(namespaceURI, localName)`
188
+ - `getElementById(elementId)`
189
+
190
+ * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node
191
+ * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node
192
+
193
+ readonly attribute:
194
+ - `tagName`
195
+
196
+ method:
197
+ - `getAttribute(name)`
198
+ - `setAttribute(name, value)`
199
+ - `removeAttribute(name)`
200
+ - `getAttributeNode(name)`
201
+ - `setAttributeNode(newAttr)`
202
+ - `removeAttributeNode(oldAttr)`
203
+ - `getElementsByTagName(name)`
204
+ - `getAttributeNS(namespaceURI, localName)`
205
+ - `setAttributeNS(namespaceURI, qualifiedName, value)`
206
+ - `removeAttributeNS(namespaceURI, localName)`
207
+ - `getAttributeNodeNS(namespaceURI, localName)`
208
+ - `setAttributeNodeNS(newAttr)`
209
+ - `getElementsByTagNameNS(namespaceURI, localName)`
210
+ - `hasAttribute(name)`
211
+ - `hasAttributeNS(namespaceURI, localName)`
212
+
213
+ * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node
214
+
215
+ attribute:
216
+ - `value`
217
+
218
+ readonly attribute:
219
+ - `name` | `specified` | `ownerElement`
220
+
221
+ * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)
222
+
223
+ readonly attribute:
224
+ - `length`
225
+
226
+ method:
227
+ - `item(index)`
228
+
229
+ * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)
230
+
231
+ readonly attribute:
232
+ - `length`
233
+
234
+ method:
235
+ - `getNamedItem(name)`
236
+ - `setNamedItem(arg)`
237
+ - `removeNamedItem(name)`
238
+ - `item(index)`
239
+ - `getNamedItemNS(namespaceURI, localName)`
240
+ - `setNamedItemNS(arg)`
241
+ - `removeNamedItemNS(namespaceURI, localName)`
242
+
243
+ * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node
244
+
245
+ method:
246
+ - `substringData(offset, count)`
247
+ - `appendData(arg)`
248
+ - `insertData(offset, arg)`
249
+ - `deleteData(offset, count)`
250
+ - `replaceData(offset, count, arg)`
251
+
252
+ * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData
253
+
254
+ method:
255
+ - `splitText(offset)`
256
+
257
+ * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)
258
+ * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData
259
+
260
+ * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)
261
+
262
+ readonly attribute:
263
+ - `name` | `entities` | `notations` | `publicId` | `systemId` | `internalSubset`
264
+
265
+ * Notation : Node
266
+
267
+ readonly attribute:
268
+ - `publicId` | `systemId`
269
+
270
+ * Entity : Node
271
+
272
+ readonly attribute:
273
+ - `publicId` | `systemId` | `notationName`
274
+
275
+ * EntityReference : Node
276
+ * ProcessingInstruction : Node
277
+
278
+ attribute:
279
+ - `data`
280
+ readonly attribute:
281
+ - `target`
282
+
283
+ ### DOM level 3 support:
284
+
285
+ * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)
286
+
287
+ attribute:
288
+ - `textContent`
289
+
290
+ method:
291
+ - `isDefaultNamespace(namespaceURI)`
292
+ - `lookupNamespaceURI(prefix)`
293
+
294
+ ### DOM Living Standard support:
295
+
296
+ * [ParentNode](https://dom.spec.whatwg.org/#interface-parentnode) mixin (on `Document`, `DocumentFragment`, `Element`)
297
+
298
+ readonly attribute:
299
+ - `children`
300
+
301
+ ### DOM extension by xmldom
302
+
303
+ * [Node] Source position extension;
304
+
305
+ attribute:
306
+ - `lineNumber` //number starting from `1`
307
+ - `columnNumber` //number starting from `1`
308
+
309
+ ## Specs
310
+
311
+ The implementation is based on several specifications:
312
+
313
+ <!-- Should open in new tab and the links in the SVG should be clickable there! -->
314
+ <a href="https://raw.githubusercontent.com/xmldom/xmldom/master/docs/specs.svg" target="_blank" rel="noopener noreferrer nofollow" >![Overview of related specifications and their relations](docs/specs.svg)</a>
315
+
316
+ ### DOM Parsing and Serialization
317
+
318
+ From the [W3C DOM Parsing and Serialization (WD 2016)](https://www.w3.org/TR/2016/WD-DOM-Parsing-20160517/) `xmldom` provides an implementation for the interfaces:
319
+ - `DOMParser`
320
+ - `XMLSerializer`
321
+
322
+ Note that there are some known deviations between this implementation and the W3 specifications.
323
+
324
+ Note: [The latest version of this spec](https://w3c.github.io/DOM-Parsing/) has the status "Editors Draft", since it is under active development. One major change is that [the definition of the `DOMParser` interface has been moved to the HTML spec](https://w3c.github.io/DOM-Parsing/#the-domparser-interface)
325
+
326
+
327
+ ### DOM
328
+
329
+ The original author claims that xmldom implements [DOM Level 2] in a "fully compatible" way and some parts of [DOM Level 3], but there are not enough tests to prove this. Both Specifications are now superseded by the [DOM Level 4 aka Living standard] wich has a much broader scope than xmldom.
330
+ In the past, there have been multiple (even breaking) changes to align xmldom with the living standard,
331
+ so if you find a difference that is not documented, any contribution to resolve the difference is very welcome (even just reporting it as an issue).
332
+
333
+ xmldom implements the following interfaces:
334
+ - `Attr`
335
+ - `CDATASection`
336
+ - `CharacterData`
337
+ - `Comment`
338
+ - `Document`
339
+ - `DocumentFragment`
340
+ - `DocumentType`
341
+ - `DOMException`
342
+ - `DOMImplementation`
343
+ - `Element`
344
+ - `Entity`
345
+ - `EntityReference`
346
+ - `LiveNodeList`
347
+ - `NamedNodeMap`
348
+ - `Node`
349
+ - `NodeList`
350
+ - `Notation`
351
+ - `ProcessingInstruction`
352
+ - `Text`
353
+
354
+ more details are available in the (incomplete) [API Reference](#api-reference) section.
355
+
356
+ ### HTML
357
+
358
+ xmldom does not have any goal of supporting the full spec, but it has some capability to parse, report and serialize things differently when it is told to parse HTML (by passing the HTML namespace).
359
+
360
+ ### SAX, XML, XMLNS
361
+
362
+ xmldom has an own SAX parser implementation to do the actual parsing, which implements some interfaces in alignment with the Java interfaces SAX defines:
363
+ - `XMLReader`
364
+ - `DOMHandler`
365
+
366
+ There is an idea/proposal to make it possible to replace it with something else in <https://github.com/xmldom/xmldom/issues/55>
@@ -0,0 +1,44 @@
1
+ # License information
2
+
3
+ ## Contribution License Agreement
4
+
5
+ If you contribute code to this project, you are implicitly allowing your code
6
+ to be distributed under the MIT license. You are also implicitly verifying that
7
+ all code is your original work. `</legalese>`
8
+
9
+ ## Marked
10
+
11
+ Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
12
+ Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in
22
+ all copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30
+ THE SOFTWARE.
31
+
32
+ ## Markdown
33
+
34
+ Copyright © 2004, John Gruber
35
+ http://daringfireball.net/
36
+ All rights reserved.
37
+
38
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
39
+
40
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
41
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
42
+ * Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
43
+
44
+ This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
@@ -0,0 +1,107 @@
1
+ <a href="https://marked.js.org">
2
+ <img width="60px" height="60px" src="https://marked.js.org/img/logo-black.svg" align="right" />
3
+ </a>
4
+
5
+ # Marked
6
+
7
+ [![npm](https://badgen.net/npm/v/marked)](https://www.npmjs.com/package/marked)
8
+ [![install size](https://badgen.net/packagephobia/install/marked)](https://packagephobia.now.sh/result?p=marked)
9
+ [![downloads](https://badgen.net/npm/dt/marked)](https://www.npmjs.com/package/marked)
10
+ [![github actions](https://github.com/markedjs/marked/workflows/Tests/badge.svg)](https://github.com/markedjs/marked/actions)
11
+ [![snyk](https://snyk.io/test/npm/marked/badge.svg)](https://snyk.io/test/npm/marked)
12
+
13
+ - ⚡ built for speed
14
+ - ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time
15
+ - ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
16
+ - 🌐 works in a browser, on a server, or from a command line interface (CLI)
17
+
18
+ ## Demo
19
+
20
+ Check out the [demo page](https://marked.js.org/demo/) to see Marked in action ⛹️
21
+
22
+ ## Docs
23
+
24
+ Our [documentation pages](https://marked.js.org) are also rendered using marked 💯
25
+
26
+ Also read about:
27
+
28
+ * [Options](https://marked.js.org/using_advanced)
29
+ * [Extensibility](https://marked.js.org/using_pro)
30
+
31
+ ## Compatibility
32
+
33
+ **Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.
34
+
35
+ **Browser:** [Baseline Widely Available](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility)
36
+
37
+ ## Installation
38
+
39
+ **CLI:**
40
+
41
+ ```sh
42
+ npm install -g marked
43
+ ```
44
+
45
+ **In-browser:**
46
+
47
+ ```sh
48
+ npm install marked
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ### Warning: 🚨 Marked does not [sanitize](https://marked.js.org/using_advanced#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨
54
+
55
+ ```
56
+ DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));
57
+ ```
58
+
59
+ **CLI**
60
+
61
+ ``` bash
62
+ # Example with stdin input
63
+ $ marked -o hello.html
64
+ hello world
65
+ ^D
66
+ $ cat hello.html
67
+ <p>hello world</p>
68
+ ```
69
+
70
+ ```bash
71
+ # Print all options
72
+ $ marked --help
73
+ ```
74
+
75
+ **Browser**
76
+
77
+ ```html
78
+ <!doctype html>
79
+ <html>
80
+ <head>
81
+ <meta charset="utf-8"/>
82
+ <title>Marked in the browser</title>
83
+ </head>
84
+ <body>
85
+ <div id="content"></div>
86
+ <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
87
+ <script>
88
+ document.getElementById('content').innerHTML =
89
+ marked.parse('# Marked in the browser\n\nRendered by **marked**.');
90
+ </script>
91
+ </body>
92
+ </html>
93
+ ```
94
+ or import esm module
95
+
96
+ ```html
97
+ <script type="module">
98
+ import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";
99
+ document.getElementById('content').innerHTML =
100
+ marked.parse('# Marked in the browser\n\nRendered by **marked**.');
101
+ </script>
102
+ ```
103
+
104
+ ## License
105
+
106
+ Copyright (c) 2018+, MarkedJS. (MIT License)
107
+ Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)