cloudstructs 0.9.19 → 0.9.21
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.
- package/.jsii +4 -4
- package/assets/slack-textract/detect.lambda/index.js +21 -10
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/dmarc/index.js +1 -1
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/mjml-template/index.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +2 -2
- package/node_modules/@babel/runtime/helpers/superPropGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/superPropSet.js +2 -2
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +4 -3
- package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +36 -5
- package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.d.ts +36 -4
- package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +23 -10
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +4 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +36 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@slack/web-api/package.json +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +36 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +36 -5
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +36 -5
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/cross-spawn/README.md +3 -10
- package/node_modules/cross-spawn/lib/enoent.js +1 -1
- package/node_modules/cross-spawn/lib/util/escape.js +4 -2
- package/node_modules/cross-spawn/package.json +1 -1
- package/node_modules/form-data/Readme.md +4 -4
- package/node_modules/form-data/lib/form_data.js +1 -1
- package/node_modules/form-data/package.json +9 -6
- package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/doctype.js +2 -4
- package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/error-codes.js +1 -2
- package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/foreign-content.js +7 -9
- package/node_modules/parse5/dist/cjs/common/html.d.ts +32 -31
- package/node_modules/parse5/dist/cjs/common/html.js +41 -42
- package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/token.js +3 -4
- package/node_modules/parse5/dist/cjs/common/unicode.d.ts +1 -8
- package/node_modules/parse5/dist/cjs/common/unicode.js +7 -14
- package/node_modules/parse5/dist/cjs/index.d.ts +15 -4
- package/node_modules/parse5/dist/cjs/index.js +3 -6
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +1 -2
- package/node_modules/parse5/dist/cjs/parser/index.d.ts +72 -8
- package/node_modules/parse5/dist/cjs/parser/index.js +81 -9
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +2 -2
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +95 -87
- package/node_modules/parse5/dist/cjs/serializer/index.d.ts +1 -2
- package/node_modules/parse5/dist/cjs/serializer/index.js +8 -9
- package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +130 -131
- package/node_modules/parse5/dist/cjs/tokenizer/index.js +87 -281
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +3 -4
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +8 -7
- package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/tree-adapters/default.js +9 -10
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +7 -2
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -1
- package/node_modules/parse5/dist/common/doctype.d.ts +0 -1
- package/node_modules/parse5/dist/common/doctype.js +0 -1
- package/node_modules/parse5/dist/common/error-codes.d.ts +0 -1
- package/node_modules/parse5/dist/common/error-codes.js +1 -2
- package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -1
- package/node_modules/parse5/dist/common/foreign-content.js +0 -2
- package/node_modules/parse5/dist/common/html.d.ts +32 -31
- package/node_modules/parse5/dist/common/html.js +38 -38
- package/node_modules/parse5/dist/common/token.d.ts +0 -1
- package/node_modules/parse5/dist/common/token.js +1 -2
- package/node_modules/parse5/dist/common/unicode.d.ts +1 -8
- package/node_modules/parse5/dist/common/unicode.js +1 -8
- package/node_modules/parse5/dist/index.d.ts +15 -4
- package/node_modules/parse5/dist/index.js +0 -3
- package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -1
- package/node_modules/parse5/dist/parser/formatting-element-list.js +1 -2
- package/node_modules/parse5/dist/parser/index.d.ts +72 -8
- package/node_modules/parse5/dist/parser/index.js +82 -10
- package/node_modules/parse5/dist/parser/open-element-stack.d.ts +2 -2
- package/node_modules/parse5/dist/parser/open-element-stack.js +96 -88
- package/node_modules/parse5/dist/serializer/index.d.ts +1 -2
- package/node_modules/parse5/dist/serializer/index.js +6 -6
- package/node_modules/parse5/dist/tokenizer/index.d.ts +130 -131
- package/node_modules/parse5/dist/tokenizer/index.js +88 -282
- package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +3 -4
- package/node_modules/parse5/dist/tokenizer/preprocessor.js +8 -7
- package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -1
- package/node_modules/parse5/dist/tree-adapters/default.js +9 -10
- package/node_modules/parse5/dist/tree-adapters/interface.d.ts +7 -2
- package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
- package/node_modules/parse5/package.json +4 -4
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +1 -2
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +11 -12
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +1 -2
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +9 -10
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +7 -6
- package/package.json +21 -20
- package/node_modules/@slack/logger/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/form-data/README.md.bak +0 -358
|
@@ -61,7 +61,7 @@ FormData.prototype.append = function(field, value, options) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// https://github.com/felixge/node-form-data/issues/38
|
|
64
|
-
if (
|
|
64
|
+
if (Array.isArray(value)) {
|
|
65
65
|
// Please convert your array into string
|
|
66
66
|
// the way web server expects it
|
|
67
67
|
this._error(new Error('Arrays are not supported.'));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
|
|
3
3
|
"name": "form-data",
|
|
4
4
|
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git://github.com/form-data/form-data.git"
|
|
@@ -11,13 +11,16 @@
|
|
|
11
11
|
"browser": "./lib/browser",
|
|
12
12
|
"typings": "./index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"pretest": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"pretest": "npm run lint",
|
|
15
|
+
"pretests-only": "rimraf coverage test/tmp",
|
|
16
|
+
"tests-only": "istanbul cover test/run.js",
|
|
17
|
+
"posttests-only": "istanbul report lcov text",
|
|
18
|
+
"test": "npm run tests-only",
|
|
19
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
20
|
+
"lint": "eslint --ext=js,mjs .",
|
|
18
21
|
"report": "istanbul report lcov text",
|
|
19
22
|
"ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8",
|
|
20
|
-
"ci-test": "npm run
|
|
23
|
+
"ci-test": "npm run tests-only && npm run browser && npm run report",
|
|
21
24
|
"predebug": "rimraf coverage test/tmp",
|
|
22
25
|
"debug": "verbose=1 ./test/run.js",
|
|
23
26
|
"browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
|
|
@@ -2,4 +2,3 @@ import { DOCUMENT_MODE } from './html.js';
|
|
|
2
2
|
import type { DoctypeToken } from './token.js';
|
|
3
3
|
export declare function isConforming(token: DoctypeToken): boolean;
|
|
4
4
|
export declare function getDocumentMode(token: DoctypeToken): DOCUMENT_MODE;
|
|
5
|
-
//# sourceMappingURL=doctype.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isConforming = isConforming;
|
|
4
|
+
exports.getDocumentMode = getDocumentMode;
|
|
4
5
|
const html_js_1 = require("./html.js");
|
|
5
6
|
//Const
|
|
6
7
|
const VALID_DOCTYPE_NAME = 'html';
|
|
@@ -89,7 +90,6 @@ function isConforming(token) {
|
|
|
89
90
|
token.publicId === null &&
|
|
90
91
|
(token.systemId === null || token.systemId === VALID_SYSTEM_ID));
|
|
91
92
|
}
|
|
92
|
-
exports.isConforming = isConforming;
|
|
93
93
|
function getDocumentMode(token) {
|
|
94
94
|
if (token.name !== VALID_DOCTYPE_NAME) {
|
|
95
95
|
return html_js_1.DOCUMENT_MODE.QUIRKS;
|
|
@@ -116,5 +116,3 @@ function getDocumentMode(token) {
|
|
|
116
116
|
}
|
|
117
117
|
return html_js_1.DOCUMENT_MODE.NO_QUIRKS;
|
|
118
118
|
}
|
|
119
|
-
exports.getDocumentMode = getDocumentMode;
|
|
120
|
-
//# sourceMappingURL=doctype.js.map
|
|
@@ -63,5 +63,4 @@ var ERR;
|
|
|
63
63
|
ERR["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element";
|
|
64
64
|
ERR["nestedNoscriptInHead"] = "nested-noscript-in-head";
|
|
65
65
|
ERR["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text";
|
|
66
|
-
})(ERR
|
|
67
|
-
//# sourceMappingURL=error-codes.js.map
|
|
66
|
+
})(ERR || (exports.ERR = ERR = {}));
|
|
@@ -7,4 +7,3 @@ export declare function adjustTokenSVGAttrs(token: TagToken): void;
|
|
|
7
7
|
export declare function adjustTokenXMLAttrs(token: TagToken): void;
|
|
8
8
|
export declare function adjustTokenSVGTagName(token: TagToken): void;
|
|
9
9
|
export declare function isIntegrationPoint(tn: $, ns: NS, attrs: Attribute[], foreignNS?: NS): boolean;
|
|
10
|
-
//# sourceMappingURL=foreign-content.d.ts.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = void 0;
|
|
4
|
+
exports.causesExit = causesExit;
|
|
5
|
+
exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs;
|
|
6
|
+
exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs;
|
|
7
|
+
exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs;
|
|
8
|
+
exports.adjustTokenSVGTagName = adjustTokenSVGTagName;
|
|
9
|
+
exports.isIntegrationPoint = isIntegrationPoint;
|
|
4
10
|
const html_js_1 = require("./html.js");
|
|
5
11
|
//MIME types
|
|
6
12
|
const MIME_TYPES = {
|
|
@@ -78,7 +84,6 @@ const XML_ATTRS_ADJUSTMENT_MAP = new Map([
|
|
|
78
84
|
['xlink:show', { prefix: 'xlink', name: 'show', namespace: html_js_1.NS.XLINK }],
|
|
79
85
|
['xlink:title', { prefix: 'xlink', name: 'title', namespace: html_js_1.NS.XLINK }],
|
|
80
86
|
['xlink:type', { prefix: 'xlink', name: 'type', namespace: html_js_1.NS.XLINK }],
|
|
81
|
-
['xml:base', { prefix: 'xml', name: 'base', namespace: html_js_1.NS.XML }],
|
|
82
87
|
['xml:lang', { prefix: 'xml', name: 'lang', namespace: html_js_1.NS.XML }],
|
|
83
88
|
['xml:space', { prefix: 'xml', name: 'space', namespace: html_js_1.NS.XML }],
|
|
84
89
|
['xmlns', { prefix: '', name: 'xmlns', namespace: html_js_1.NS.XMLNS }],
|
|
@@ -177,7 +182,6 @@ function causesExit(startTagToken) {
|
|
|
177
182
|
startTagToken.attrs.some(({ name }) => name === html_js_1.ATTRS.COLOR || name === html_js_1.ATTRS.SIZE || name === html_js_1.ATTRS.FACE);
|
|
178
183
|
return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
|
|
179
184
|
}
|
|
180
|
-
exports.causesExit = causesExit;
|
|
181
185
|
//Token adjustments
|
|
182
186
|
function adjustTokenMathMLAttrs(token) {
|
|
183
187
|
for (let i = 0; i < token.attrs.length; i++) {
|
|
@@ -187,7 +191,6 @@ function adjustTokenMathMLAttrs(token) {
|
|
|
187
191
|
}
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
|
-
exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs;
|
|
191
194
|
function adjustTokenSVGAttrs(token) {
|
|
192
195
|
for (let i = 0; i < token.attrs.length; i++) {
|
|
193
196
|
const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
|
@@ -196,7 +199,6 @@ function adjustTokenSVGAttrs(token) {
|
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
|
-
exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs;
|
|
200
202
|
function adjustTokenXMLAttrs(token) {
|
|
201
203
|
for (let i = 0; i < token.attrs.length; i++) {
|
|
202
204
|
const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
|
@@ -207,7 +209,6 @@ function adjustTokenXMLAttrs(token) {
|
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
}
|
|
210
|
-
exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs;
|
|
211
212
|
function adjustTokenSVGTagName(token) {
|
|
212
213
|
const adjustedTagName = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);
|
|
213
214
|
if (adjustedTagName != null) {
|
|
@@ -215,7 +216,6 @@ function adjustTokenSVGTagName(token) {
|
|
|
215
216
|
token.tagID = (0, html_js_1.getTagID)(token.tagName);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
exports.adjustTokenSVGTagName = adjustTokenSVGTagName;
|
|
219
219
|
//Integration points
|
|
220
220
|
function isMathMLTextIntegrationPoint(tn, ns) {
|
|
221
221
|
return ns === html_js_1.NS.MATHML && (tn === html_js_1.TAG_ID.MI || tn === html_js_1.TAG_ID.MO || tn === html_js_1.TAG_ID.MN || tn === html_js_1.TAG_ID.MS || tn === html_js_1.TAG_ID.MTEXT);
|
|
@@ -235,5 +235,3 @@ function isIntegrationPoint(tn, ns, attrs, foreignNS) {
|
|
|
235
235
|
return (((!foreignNS || foreignNS === html_js_1.NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||
|
|
236
236
|
((!foreignNS || foreignNS === html_js_1.NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));
|
|
237
237
|
}
|
|
238
|
-
exports.isIntegrationPoint = isIntegrationPoint;
|
|
239
|
-
//# sourceMappingURL=foreign-content.js.map
|
|
@@ -121,6 +121,7 @@ export declare enum TAG_NAMES {
|
|
|
121
121
|
RUBY = "ruby",
|
|
122
122
|
S = "s",
|
|
123
123
|
SCRIPT = "script",
|
|
124
|
+
SEARCH = "search",
|
|
124
125
|
SECTION = "section",
|
|
125
126
|
SELECT = "select",
|
|
126
127
|
SOURCE = "source",
|
|
@@ -251,38 +252,38 @@ export declare enum TAG_ID {
|
|
|
251
252
|
RUBY = 91,
|
|
252
253
|
S = 92,
|
|
253
254
|
SCRIPT = 93,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
255
|
+
SEARCH = 94,
|
|
256
|
+
SECTION = 95,
|
|
257
|
+
SELECT = 96,
|
|
258
|
+
SOURCE = 97,
|
|
259
|
+
SMALL = 98,
|
|
260
|
+
SPAN = 99,
|
|
261
|
+
STRIKE = 100,
|
|
262
|
+
STRONG = 101,
|
|
263
|
+
STYLE = 102,
|
|
264
|
+
SUB = 103,
|
|
265
|
+
SUMMARY = 104,
|
|
266
|
+
SUP = 105,
|
|
267
|
+
TABLE = 106,
|
|
268
|
+
TBODY = 107,
|
|
269
|
+
TEMPLATE = 108,
|
|
270
|
+
TEXTAREA = 109,
|
|
271
|
+
TFOOT = 110,
|
|
272
|
+
TD = 111,
|
|
273
|
+
TH = 112,
|
|
274
|
+
THEAD = 113,
|
|
275
|
+
TITLE = 114,
|
|
276
|
+
TR = 115,
|
|
277
|
+
TRACK = 116,
|
|
278
|
+
TT = 117,
|
|
279
|
+
U = 118,
|
|
280
|
+
UL = 119,
|
|
281
|
+
SVG = 120,
|
|
282
|
+
VAR = 121,
|
|
283
|
+
WBR = 122,
|
|
284
|
+
XMP = 123
|
|
283
285
|
}
|
|
284
286
|
export declare function getTagID(tagName: string): TAG_ID;
|
|
285
287
|
export declare const SPECIAL_ELEMENTS: Record<NS, Set<TAG_ID>>;
|
|
286
|
-
export declare
|
|
288
|
+
export declare const NUMBERED_HEADERS: Set<TAG_ID>;
|
|
287
289
|
export declare function hasUnescapedText(tn: string, scriptingEnabled: boolean): boolean;
|
|
288
|
-
//# sourceMappingURL=html.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NUMBERED_HEADERS = exports.SPECIAL_ELEMENTS = exports.TAG_ID = exports.TAG_NAMES = exports.DOCUMENT_MODE = exports.ATTRS = exports.NS = void 0;
|
|
4
|
+
exports.getTagID = getTagID;
|
|
5
|
+
exports.hasUnescapedText = hasUnescapedText;
|
|
4
6
|
/** All valid namespaces in HTML. */
|
|
5
7
|
var NS;
|
|
6
8
|
(function (NS) {
|
|
@@ -10,7 +12,7 @@ var NS;
|
|
|
10
12
|
NS["XLINK"] = "http://www.w3.org/1999/xlink";
|
|
11
13
|
NS["XML"] = "http://www.w3.org/XML/1998/namespace";
|
|
12
14
|
NS["XMLNS"] = "http://www.w3.org/2000/xmlns/";
|
|
13
|
-
})(NS
|
|
15
|
+
})(NS || (exports.NS = NS = {}));
|
|
14
16
|
var ATTRS;
|
|
15
17
|
(function (ATTRS) {
|
|
16
18
|
ATTRS["TYPE"] = "type";
|
|
@@ -21,7 +23,7 @@ var ATTRS;
|
|
|
21
23
|
ATTRS["COLOR"] = "color";
|
|
22
24
|
ATTRS["FACE"] = "face";
|
|
23
25
|
ATTRS["SIZE"] = "size";
|
|
24
|
-
})(ATTRS
|
|
26
|
+
})(ATTRS || (exports.ATTRS = ATTRS = {}));
|
|
25
27
|
/**
|
|
26
28
|
* The mode of the document.
|
|
27
29
|
*
|
|
@@ -32,7 +34,7 @@ var DOCUMENT_MODE;
|
|
|
32
34
|
DOCUMENT_MODE["NO_QUIRKS"] = "no-quirks";
|
|
33
35
|
DOCUMENT_MODE["QUIRKS"] = "quirks";
|
|
34
36
|
DOCUMENT_MODE["LIMITED_QUIRKS"] = "limited-quirks";
|
|
35
|
-
})(DOCUMENT_MODE
|
|
37
|
+
})(DOCUMENT_MODE || (exports.DOCUMENT_MODE = DOCUMENT_MODE = {}));
|
|
36
38
|
var TAG_NAMES;
|
|
37
39
|
(function (TAG_NAMES) {
|
|
38
40
|
TAG_NAMES["A"] = "a";
|
|
@@ -128,6 +130,7 @@ var TAG_NAMES;
|
|
|
128
130
|
TAG_NAMES["RUBY"] = "ruby";
|
|
129
131
|
TAG_NAMES["S"] = "s";
|
|
130
132
|
TAG_NAMES["SCRIPT"] = "script";
|
|
133
|
+
TAG_NAMES["SEARCH"] = "search";
|
|
131
134
|
TAG_NAMES["SECTION"] = "section";
|
|
132
135
|
TAG_NAMES["SELECT"] = "select";
|
|
133
136
|
TAG_NAMES["SOURCE"] = "source";
|
|
@@ -157,7 +160,7 @@ var TAG_NAMES;
|
|
|
157
160
|
TAG_NAMES["VAR"] = "var";
|
|
158
161
|
TAG_NAMES["WBR"] = "wbr";
|
|
159
162
|
TAG_NAMES["XMP"] = "xmp";
|
|
160
|
-
})(TAG_NAMES
|
|
163
|
+
})(TAG_NAMES || (exports.TAG_NAMES = TAG_NAMES = {}));
|
|
161
164
|
/**
|
|
162
165
|
* Tag IDs are numeric IDs for known tag names.
|
|
163
166
|
*
|
|
@@ -259,36 +262,37 @@ var TAG_ID;
|
|
|
259
262
|
TAG_ID[TAG_ID["RUBY"] = 91] = "RUBY";
|
|
260
263
|
TAG_ID[TAG_ID["S"] = 92] = "S";
|
|
261
264
|
TAG_ID[TAG_ID["SCRIPT"] = 93] = "SCRIPT";
|
|
262
|
-
TAG_ID[TAG_ID["
|
|
263
|
-
TAG_ID[TAG_ID["
|
|
264
|
-
TAG_ID[TAG_ID["
|
|
265
|
-
TAG_ID[TAG_ID["
|
|
266
|
-
TAG_ID[TAG_ID["
|
|
267
|
-
TAG_ID[TAG_ID["
|
|
268
|
-
TAG_ID[TAG_ID["
|
|
269
|
-
TAG_ID[TAG_ID["
|
|
270
|
-
TAG_ID[TAG_ID["
|
|
271
|
-
TAG_ID[TAG_ID["
|
|
272
|
-
TAG_ID[TAG_ID["
|
|
273
|
-
TAG_ID[TAG_ID["
|
|
274
|
-
TAG_ID[TAG_ID["
|
|
275
|
-
TAG_ID[TAG_ID["
|
|
276
|
-
TAG_ID[TAG_ID["
|
|
277
|
-
TAG_ID[TAG_ID["
|
|
278
|
-
TAG_ID[TAG_ID["
|
|
279
|
-
TAG_ID[TAG_ID["
|
|
280
|
-
TAG_ID[TAG_ID["
|
|
281
|
-
TAG_ID[TAG_ID["
|
|
282
|
-
TAG_ID[TAG_ID["
|
|
283
|
-
TAG_ID[TAG_ID["
|
|
284
|
-
TAG_ID[TAG_ID["
|
|
285
|
-
TAG_ID[TAG_ID["
|
|
286
|
-
TAG_ID[TAG_ID["
|
|
287
|
-
TAG_ID[TAG_ID["
|
|
288
|
-
TAG_ID[TAG_ID["
|
|
289
|
-
TAG_ID[TAG_ID["
|
|
290
|
-
TAG_ID[TAG_ID["
|
|
291
|
-
|
|
265
|
+
TAG_ID[TAG_ID["SEARCH"] = 94] = "SEARCH";
|
|
266
|
+
TAG_ID[TAG_ID["SECTION"] = 95] = "SECTION";
|
|
267
|
+
TAG_ID[TAG_ID["SELECT"] = 96] = "SELECT";
|
|
268
|
+
TAG_ID[TAG_ID["SOURCE"] = 97] = "SOURCE";
|
|
269
|
+
TAG_ID[TAG_ID["SMALL"] = 98] = "SMALL";
|
|
270
|
+
TAG_ID[TAG_ID["SPAN"] = 99] = "SPAN";
|
|
271
|
+
TAG_ID[TAG_ID["STRIKE"] = 100] = "STRIKE";
|
|
272
|
+
TAG_ID[TAG_ID["STRONG"] = 101] = "STRONG";
|
|
273
|
+
TAG_ID[TAG_ID["STYLE"] = 102] = "STYLE";
|
|
274
|
+
TAG_ID[TAG_ID["SUB"] = 103] = "SUB";
|
|
275
|
+
TAG_ID[TAG_ID["SUMMARY"] = 104] = "SUMMARY";
|
|
276
|
+
TAG_ID[TAG_ID["SUP"] = 105] = "SUP";
|
|
277
|
+
TAG_ID[TAG_ID["TABLE"] = 106] = "TABLE";
|
|
278
|
+
TAG_ID[TAG_ID["TBODY"] = 107] = "TBODY";
|
|
279
|
+
TAG_ID[TAG_ID["TEMPLATE"] = 108] = "TEMPLATE";
|
|
280
|
+
TAG_ID[TAG_ID["TEXTAREA"] = 109] = "TEXTAREA";
|
|
281
|
+
TAG_ID[TAG_ID["TFOOT"] = 110] = "TFOOT";
|
|
282
|
+
TAG_ID[TAG_ID["TD"] = 111] = "TD";
|
|
283
|
+
TAG_ID[TAG_ID["TH"] = 112] = "TH";
|
|
284
|
+
TAG_ID[TAG_ID["THEAD"] = 113] = "THEAD";
|
|
285
|
+
TAG_ID[TAG_ID["TITLE"] = 114] = "TITLE";
|
|
286
|
+
TAG_ID[TAG_ID["TR"] = 115] = "TR";
|
|
287
|
+
TAG_ID[TAG_ID["TRACK"] = 116] = "TRACK";
|
|
288
|
+
TAG_ID[TAG_ID["TT"] = 117] = "TT";
|
|
289
|
+
TAG_ID[TAG_ID["U"] = 118] = "U";
|
|
290
|
+
TAG_ID[TAG_ID["UL"] = 119] = "UL";
|
|
291
|
+
TAG_ID[TAG_ID["SVG"] = 120] = "SVG";
|
|
292
|
+
TAG_ID[TAG_ID["VAR"] = 121] = "VAR";
|
|
293
|
+
TAG_ID[TAG_ID["WBR"] = 122] = "WBR";
|
|
294
|
+
TAG_ID[TAG_ID["XMP"] = 123] = "XMP";
|
|
295
|
+
})(TAG_ID || (exports.TAG_ID = TAG_ID = {}));
|
|
292
296
|
const TAG_NAME_TO_ID = new Map([
|
|
293
297
|
[TAG_NAMES.A, TAG_ID.A],
|
|
294
298
|
[TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],
|
|
@@ -383,6 +387,7 @@ const TAG_NAME_TO_ID = new Map([
|
|
|
383
387
|
[TAG_NAMES.RUBY, TAG_ID.RUBY],
|
|
384
388
|
[TAG_NAMES.S, TAG_ID.S],
|
|
385
389
|
[TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],
|
|
390
|
+
[TAG_NAMES.SEARCH, TAG_ID.SEARCH],
|
|
386
391
|
[TAG_NAMES.SECTION, TAG_ID.SECTION],
|
|
387
392
|
[TAG_NAMES.SELECT, TAG_ID.SELECT],
|
|
388
393
|
[TAG_NAMES.SOURCE, TAG_ID.SOURCE],
|
|
@@ -417,7 +422,6 @@ function getTagID(tagName) {
|
|
|
417
422
|
var _a;
|
|
418
423
|
return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;
|
|
419
424
|
}
|
|
420
|
-
exports.getTagID = getTagID;
|
|
421
425
|
const $ = TAG_ID;
|
|
422
426
|
exports.SPECIAL_ELEMENTS = {
|
|
423
427
|
[NS.HTML]: new Set([
|
|
@@ -509,10 +513,7 @@ exports.SPECIAL_ELEMENTS = {
|
|
|
509
513
|
[NS.XML]: new Set(),
|
|
510
514
|
[NS.XMLNS]: new Set(),
|
|
511
515
|
};
|
|
512
|
-
|
|
513
|
-
return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;
|
|
514
|
-
}
|
|
515
|
-
exports.isNumberedHeader = isNumberedHeader;
|
|
516
|
+
exports.NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]);
|
|
516
517
|
const UNESCAPED_TEXT = new Set([
|
|
517
518
|
TAG_NAMES.STYLE,
|
|
518
519
|
TAG_NAMES.SCRIPT,
|
|
@@ -525,5 +526,3 @@ const UNESCAPED_TEXT = new Set([
|
|
|
525
526
|
function hasUnescapedText(tn, scriptingEnabled) {
|
|
526
527
|
return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);
|
|
527
528
|
}
|
|
528
|
-
exports.hasUnescapedText = hasUnescapedText;
|
|
529
|
-
//# sourceMappingURL=html.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TokenType = void 0;
|
|
4
|
+
exports.getTokenAttr = getTokenAttr;
|
|
4
5
|
var TokenType;
|
|
5
6
|
(function (TokenType) {
|
|
6
7
|
TokenType[TokenType["CHARACTER"] = 0] = "CHARACTER";
|
|
@@ -12,7 +13,7 @@ var TokenType;
|
|
|
12
13
|
TokenType[TokenType["DOCTYPE"] = 6] = "DOCTYPE";
|
|
13
14
|
TokenType[TokenType["EOF"] = 7] = "EOF";
|
|
14
15
|
TokenType[TokenType["HIBERNATION"] = 8] = "HIBERNATION";
|
|
15
|
-
})(TokenType
|
|
16
|
+
})(TokenType || (exports.TokenType = TokenType = {}));
|
|
16
17
|
function getTokenAttr(token, attrName) {
|
|
17
18
|
for (let i = token.attrs.length - 1; i >= 0; i--) {
|
|
18
19
|
if (token.attrs[i].name === attrName) {
|
|
@@ -21,5 +22,3 @@ function getTokenAttr(token, attrName) {
|
|
|
21
22
|
}
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
|
-
exports.getTokenAttr = getTokenAttr;
|
|
25
|
-
//# sourceMappingURL=token.js.map
|
|
@@ -9,7 +9,6 @@ export declare enum CODE_POINTS {
|
|
|
9
9
|
SPACE = 32,
|
|
10
10
|
EXCLAMATION_MARK = 33,
|
|
11
11
|
QUOTATION_MARK = 34,
|
|
12
|
-
NUMBER_SIGN = 35,
|
|
13
12
|
AMPERSAND = 38,
|
|
14
13
|
APOSTROPHE = 39,
|
|
15
14
|
HYPHEN_MINUS = 45,
|
|
@@ -22,16 +21,11 @@ export declare enum CODE_POINTS {
|
|
|
22
21
|
GREATER_THAN_SIGN = 62,
|
|
23
22
|
QUESTION_MARK = 63,
|
|
24
23
|
LATIN_CAPITAL_A = 65,
|
|
25
|
-
LATIN_CAPITAL_F = 70,
|
|
26
|
-
LATIN_CAPITAL_X = 88,
|
|
27
24
|
LATIN_CAPITAL_Z = 90,
|
|
28
25
|
RIGHT_SQUARE_BRACKET = 93,
|
|
29
26
|
GRAVE_ACCENT = 96,
|
|
30
27
|
LATIN_SMALL_A = 97,
|
|
31
|
-
|
|
32
|
-
LATIN_SMALL_X = 120,
|
|
33
|
-
LATIN_SMALL_Z = 122,
|
|
34
|
-
REPLACEMENT_CHARACTER = 65533
|
|
28
|
+
LATIN_SMALL_Z = 122
|
|
35
29
|
}
|
|
36
30
|
export declare const SEQUENCES: {
|
|
37
31
|
DASH_DASH: string;
|
|
@@ -46,4 +40,3 @@ export declare function isSurrogatePair(cp: number): boolean;
|
|
|
46
40
|
export declare function getSurrogatePairCodePoint(cp1: number, cp2: number): number;
|
|
47
41
|
export declare function isControlCodePoint(cp: number): boolean;
|
|
48
42
|
export declare function isUndefinedCodePoint(cp: number): boolean;
|
|
49
|
-
//# sourceMappingURL=unicode.d.ts.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SEQUENCES = exports.CODE_POINTS = exports.REPLACEMENT_CHARACTER = void 0;
|
|
4
|
+
exports.isSurrogate = isSurrogate;
|
|
5
|
+
exports.isSurrogatePair = isSurrogatePair;
|
|
6
|
+
exports.getSurrogatePairCodePoint = getSurrogatePairCodePoint;
|
|
7
|
+
exports.isControlCodePoint = isControlCodePoint;
|
|
8
|
+
exports.isUndefinedCodePoint = isUndefinedCodePoint;
|
|
4
9
|
const UNDEFINED_CODE_POINTS = new Set([
|
|
5
10
|
65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,
|
|
6
11
|
393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,
|
|
@@ -19,7 +24,6 @@ var CODE_POINTS;
|
|
|
19
24
|
CODE_POINTS[CODE_POINTS["SPACE"] = 32] = "SPACE";
|
|
20
25
|
CODE_POINTS[CODE_POINTS["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
|
|
21
26
|
CODE_POINTS[CODE_POINTS["QUOTATION_MARK"] = 34] = "QUOTATION_MARK";
|
|
22
|
-
CODE_POINTS[CODE_POINTS["NUMBER_SIGN"] = 35] = "NUMBER_SIGN";
|
|
23
27
|
CODE_POINTS[CODE_POINTS["AMPERSAND"] = 38] = "AMPERSAND";
|
|
24
28
|
CODE_POINTS[CODE_POINTS["APOSTROPHE"] = 39] = "APOSTROPHE";
|
|
25
29
|
CODE_POINTS[CODE_POINTS["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS";
|
|
@@ -32,17 +36,12 @@ var CODE_POINTS;
|
|
|
32
36
|
CODE_POINTS[CODE_POINTS["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN";
|
|
33
37
|
CODE_POINTS[CODE_POINTS["QUESTION_MARK"] = 63] = "QUESTION_MARK";
|
|
34
38
|
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A";
|
|
35
|
-
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_F"] = 70] = "LATIN_CAPITAL_F";
|
|
36
|
-
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_X"] = 88] = "LATIN_CAPITAL_X";
|
|
37
39
|
CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z";
|
|
38
40
|
CODE_POINTS[CODE_POINTS["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET";
|
|
39
41
|
CODE_POINTS[CODE_POINTS["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT";
|
|
40
42
|
CODE_POINTS[CODE_POINTS["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A";
|
|
41
|
-
CODE_POINTS[CODE_POINTS["LATIN_SMALL_F"] = 102] = "LATIN_SMALL_F";
|
|
42
|
-
CODE_POINTS[CODE_POINTS["LATIN_SMALL_X"] = 120] = "LATIN_SMALL_X";
|
|
43
43
|
CODE_POINTS[CODE_POINTS["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z";
|
|
44
|
-
|
|
45
|
-
})(CODE_POINTS = exports.CODE_POINTS || (exports.CODE_POINTS = {}));
|
|
44
|
+
})(CODE_POINTS || (exports.CODE_POINTS = CODE_POINTS = {}));
|
|
46
45
|
exports.SEQUENCES = {
|
|
47
46
|
DASH_DASH: '--',
|
|
48
47
|
CDATA_START: '[CDATA[',
|
|
@@ -55,23 +54,17 @@ exports.SEQUENCES = {
|
|
|
55
54
|
function isSurrogate(cp) {
|
|
56
55
|
return cp >= 55296 && cp <= 57343;
|
|
57
56
|
}
|
|
58
|
-
exports.isSurrogate = isSurrogate;
|
|
59
57
|
function isSurrogatePair(cp) {
|
|
60
58
|
return cp >= 56320 && cp <= 57343;
|
|
61
59
|
}
|
|
62
|
-
exports.isSurrogatePair = isSurrogatePair;
|
|
63
60
|
function getSurrogatePairCodePoint(cp1, cp2) {
|
|
64
61
|
return (cp1 - 55296) * 1024 + 9216 + cp2;
|
|
65
62
|
}
|
|
66
|
-
exports.getSurrogatePairCodePoint = getSurrogatePairCodePoint;
|
|
67
63
|
//NOTE: excluding NULL and ASCII whitespace
|
|
68
64
|
function isControlCodePoint(cp) {
|
|
69
65
|
return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||
|
|
70
66
|
(cp >= 0x7f && cp <= 0x9f));
|
|
71
67
|
}
|
|
72
|
-
exports.isControlCodePoint = isControlCodePoint;
|
|
73
68
|
function isUndefinedCodePoint(cp) {
|
|
74
69
|
return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);
|
|
75
70
|
}
|
|
76
|
-
exports.isUndefinedCodePoint = isUndefinedCodePoint;
|
|
77
|
-
//# sourceMappingURL=unicode.js.map
|
|
@@ -2,15 +2,27 @@ import { type ParserOptions } from './parser/index.js';
|
|
|
2
2
|
import type { DefaultTreeAdapterMap } from './tree-adapters/default.js';
|
|
3
3
|
import type { TreeAdapterTypeMap } from './tree-adapters/interface.js';
|
|
4
4
|
export { type DefaultTreeAdapterMap, defaultTreeAdapter } from './tree-adapters/default.js';
|
|
5
|
+
import type * as DefaultTreeAdapter from './tree-adapters/default.js';
|
|
6
|
+
export declare namespace DefaultTreeAdapterTypes {
|
|
7
|
+
type Document = DefaultTreeAdapter.Document;
|
|
8
|
+
type DocumentFragment = DefaultTreeAdapter.DocumentFragment;
|
|
9
|
+
type Element = DefaultTreeAdapter.Element;
|
|
10
|
+
type CommentNode = DefaultTreeAdapter.CommentNode;
|
|
11
|
+
type TextNode = DefaultTreeAdapter.TextNode;
|
|
12
|
+
type Template = DefaultTreeAdapter.Template;
|
|
13
|
+
type DocumentType = DefaultTreeAdapter.DocumentType;
|
|
14
|
+
type ParentNode = DefaultTreeAdapter.ParentNode;
|
|
15
|
+
type ChildNode = DefaultTreeAdapter.ChildNode;
|
|
16
|
+
type Node = DefaultTreeAdapter.Node;
|
|
17
|
+
type DefaultTreeAdapterMap = DefaultTreeAdapter.DefaultTreeAdapterMap;
|
|
18
|
+
}
|
|
5
19
|
export type { TreeAdapter, TreeAdapterTypeMap } from './tree-adapters/interface.js';
|
|
6
20
|
export { type ParserOptions, /** @internal */ Parser } from './parser/index.js';
|
|
7
21
|
export { serialize, serializeOuter, type SerializerOptions } from './serializer/index.js';
|
|
8
|
-
export { ERR as ErrorCodes, type ParserError } from './common/error-codes.js';
|
|
22
|
+
export { ERR as ErrorCodes, type ParserError, type ParserErrorHandler } from './common/error-codes.js';
|
|
9
23
|
/** @internal */
|
|
10
24
|
export * as foreignContent from './common/foreign-content.js';
|
|
11
|
-
/** @internal */
|
|
12
25
|
export * as html from './common/html.js';
|
|
13
|
-
/** @internal */
|
|
14
26
|
export * as Token from './common/token.js';
|
|
15
27
|
/** @internal */
|
|
16
28
|
export { Tokenizer, type TokenizerOptions, TokenizerMode, type TokenHandler } from './tokenizer/index.js';
|
|
@@ -57,4 +69,3 @@ export declare function parse<T extends TreeAdapterTypeMap = DefaultTreeAdapterM
|
|
|
57
69
|
*/
|
|
58
70
|
export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(fragmentContext: T['parentNode'] | null, html: string, options: ParserOptions<T>): T['documentFragment'];
|
|
59
71
|
export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['documentFragment'];
|
|
60
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TokenizerMode = exports.Tokenizer = exports.Token = exports.html = exports.foreignContent = exports.ErrorCodes = exports.serializeOuter = exports.serialize = exports.Parser = exports.defaultTreeAdapter = void 0;
|
|
4
|
+
exports.parse = parse;
|
|
5
|
+
exports.parseFragment = parseFragment;
|
|
4
6
|
const index_js_1 = require("./parser/index.js");
|
|
5
7
|
var default_js_1 = require("./tree-adapters/default.js");
|
|
6
8
|
Object.defineProperty(exports, "defaultTreeAdapter", { enumerable: true, get: function () { return default_js_1.defaultTreeAdapter; } });
|
|
@@ -13,9 +15,7 @@ var error_codes_js_1 = require("./common/error-codes.js");
|
|
|
13
15
|
Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return error_codes_js_1.ERR; } });
|
|
14
16
|
/** @internal */
|
|
15
17
|
exports.foreignContent = require("./common/foreign-content.js");
|
|
16
|
-
/** @internal */
|
|
17
18
|
exports.html = require("./common/html.js");
|
|
18
|
-
/** @internal */
|
|
19
19
|
exports.Token = require("./common/token.js");
|
|
20
20
|
/** @internal */
|
|
21
21
|
var index_js_4 = require("./tokenizer/index.js");
|
|
@@ -42,7 +42,6 @@ Object.defineProperty(exports, "TokenizerMode", { enumerable: true, get: functio
|
|
|
42
42
|
function parse(html, options) {
|
|
43
43
|
return index_js_1.Parser.parse(html, options);
|
|
44
44
|
}
|
|
45
|
-
exports.parse = parse;
|
|
46
45
|
function parseFragment(fragmentContext, html, options) {
|
|
47
46
|
if (typeof fragmentContext === 'string') {
|
|
48
47
|
options = html;
|
|
@@ -53,5 +52,3 @@ function parseFragment(fragmentContext, html, options) {
|
|
|
53
52
|
parser.tokenizer.write(html, true);
|
|
54
53
|
return parser.getFragment();
|
|
55
54
|
}
|
|
56
|
-
exports.parseFragment = parseFragment;
|
|
57
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -7,7 +7,7 @@ var EntryType;
|
|
|
7
7
|
(function (EntryType) {
|
|
8
8
|
EntryType[EntryType["Marker"] = 0] = "Marker";
|
|
9
9
|
EntryType[EntryType["Element"] = 1] = "Element";
|
|
10
|
-
})(EntryType
|
|
10
|
+
})(EntryType || (exports.EntryType = EntryType = {}));
|
|
11
11
|
const MARKER = { type: EntryType.Marker };
|
|
12
12
|
//List of formatting elements
|
|
13
13
|
class FormattingElementList {
|
|
@@ -112,4 +112,3 @@ class FormattingElementList {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
exports.FormattingElementList = FormattingElementList;
|
|
115
|
-
//# sourceMappingURL=formatting-element-list.js.map
|