node-red-contrib-tak-registration 0.14.1 → 0.15.0
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/README.md +1 -1
- package/node_modules/@types/geojson/README.md +1 -1
- package/node_modules/@types/geojson/index.d.ts +36 -2
- package/node_modules/@types/geojson/package.json +2 -2
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +14 -0
- package/node_modules/@types/node/async_hooks.d.ts +64 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +117 -39
- package/node_modules/@types/node/buffer.d.ts +6 -13
- package/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/node/crypto.d.ts +44 -10
- package/node_modules/@types/node/dgram.d.ts +10 -7
- package/node_modules/@types/node/diagnostics_channel.d.ts +20 -1
- package/node_modules/@types/node/fs/promises.d.ts +23 -26
- package/node_modules/@types/node/fs.d.ts +166 -125
- package/node_modules/@types/node/globals.d.ts +141 -338
- package/node_modules/@types/node/http.d.ts +25 -3
- package/node_modules/@types/node/http2.d.ts +3 -4
- package/node_modules/@types/node/https.d.ts +3 -1
- package/node_modules/@types/node/inspector.d.ts +36 -0
- package/node_modules/@types/node/module.d.ts +599 -236
- package/node_modules/@types/node/net.d.ts +44 -13
- package/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/node/perf_hooks.d.ts +5 -0
- package/node_modules/@types/node/process.d.ts +69 -2
- package/node_modules/@types/node/querystring.d.ts +2 -3
- package/node_modules/@types/node/readline.d.ts +6 -1
- package/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/node/sqlite.d.ts +291 -17
- package/node_modules/@types/node/stream/consumers.d.ts +32 -6
- package/node_modules/@types/node/stream/web.d.ts +9 -4
- package/node_modules/@types/node/stream.d.ts +936 -1000
- package/node_modules/@types/node/test.d.ts +169 -137
- package/node_modules/@types/node/timers/promises.d.ts +24 -13
- package/node_modules/@types/node/timers.d.ts +159 -112
- package/node_modules/@types/node/tls.d.ts +34 -1
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +110 -35
- package/node_modules/@types/node/util.d.ts +323 -110
- package/node_modules/@types/node/v8.d.ts +81 -0
- package/node_modules/@types/node/vm.d.ts +21 -6
- package/node_modules/@types/node/worker_threads.d.ts +1 -0
- package/node_modules/@types/node/zlib.d.ts +167 -36
- package/node_modules/axios/CHANGELOG.md +124 -0
- package/node_modules/axios/README.md +38 -16
- package/node_modules/axios/dist/axios.js +44 -39
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +43 -39
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +43 -39
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +74 -43
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +3 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/core/Axios.js +11 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +15 -3
- package/node_modules/axios/lib/core/buildFullPath.js +3 -2
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +4 -3
- package/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
- package/node_modules/axios/lib/platform/node/index.js +26 -0
- package/node_modules/axios/lib/utils.js +12 -28
- package/node_modules/axios/package.json +3 -3
- package/node_modules/bignumber.js/CHANGELOG.md +82 -1
- package/node_modules/bignumber.js/LICENCE.md +1 -1
- package/node_modules/bignumber.js/README.md +6 -4
- package/node_modules/bignumber.js/bignumber.d.mts +6 -0
- package/node_modules/bignumber.js/bignumber.d.ts +3 -1829
- package/node_modules/bignumber.js/bignumber.js +3 -3
- package/node_modules/bignumber.js/bignumber.mjs +3 -3
- package/node_modules/bignumber.js/package.json +17 -7
- package/node_modules/bignumber.js/types.d.ts +1821 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +63 -0
- package/node_modules/fast-xml-parser/README.md +37 -51
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +458 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
- package/node_modules/fast-xml-parser/package.json +36 -18
- package/node_modules/fast-xml-parser/src/cli/cli.js +12 -12
- package/node_modules/fast-xml-parser/src/cli/man.js +6 -1
- package/node_modules/fast-xml-parser/src/cli/read.js +30 -79
- package/node_modules/fast-xml-parser/src/fxp.d.ts +28 -1
- package/node_modules/fast-xml-parser/src/fxp.js +11 -8
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +2 -4
- package/node_modules/fast-xml-parser/src/util.js +14 -18
- package/node_modules/fast-xml-parser/src/{v5 → v6}/CharsSymbol.js +1 -1
- package/node_modules/fast-xml-parser/src/{v5 → v6}/EntitiesParser.js +3 -6
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OptionsBuilder.js +3 -6
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/BaseOutputBuilder.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsArrBuilder.js +3 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsMinArrBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsObjBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/ParserOptionsBuilder.js +6 -11
- package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPath.js +1 -1
- package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPathMatcher.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XMLParser.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/Xml2JsParser.js +8 -10
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlPartReader.js +4 -10
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlSpecialTagsReader.js +5 -12
- package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/BufferSource.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/StringSource.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/EntitiesParser.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParser.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParserExt.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/currency.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/join.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/number.js +2 -4
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/trim.js +1 -3
- package/node_modules/fast-xml-parser/src/validator.js +5 -5
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +5 -4
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +1 -2
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +287 -71
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +23 -23
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +21 -8
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +8 -2
- package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +22 -7
- package/node_modules/form-data/lib/form_data.js +24 -22
- package/node_modules/form-data/package.json +17 -14
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/long/README.md +93 -87
- package/node_modules/long/index.d.ts +2 -2
- package/node_modules/long/index.js +360 -246
- package/node_modules/long/package.json +12 -4
- package/node_modules/long/types.d.ts +474 -0
- package/node_modules/long/umd/index.d.ts +2 -456
- package/node_modules/long/umd/index.js +1585 -1395
- package/node_modules/long/umd/types.d.ts +474 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +531 -80
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +671 -144
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/index.d.ts +71 -13
- package/node_modules/protobufjs/package.json +4 -2
- package/node_modules/protobufjs/src/decoder.js +8 -10
- package/node_modules/protobufjs/src/encoder.js +1 -1
- package/node_modules/protobufjs/src/enum.js +25 -0
- package/node_modules/protobufjs/src/field.js +104 -28
- package/node_modules/protobufjs/src/namespace.js +124 -13
- package/node_modules/protobufjs/src/object.js +139 -4
- package/node_modules/protobufjs/src/oneof.js +19 -0
- package/node_modules/protobufjs/src/parse.js +139 -63
- package/node_modules/protobufjs/src/root.js +52 -15
- package/node_modules/protobufjs/src/service.js +23 -1
- package/node_modules/protobufjs/src/type.js +29 -4
- package/node_modules/protobufjs/src/util.js +4 -1
- package/node_modules/strnum/.github/SECURITY.md +5 -0
- package/node_modules/strnum/CHANGELOG.md +33 -0
- package/node_modules/strnum/README.md +14 -3
- package/node_modules/strnum/algo.stflow +84 -0
- package/node_modules/strnum/package.json +9 -2
- package/node_modules/strnum/strnum.js +72 -67
- package/node_modules/strnum/strnum.test.js +29 -6
- package/node_modules/strnum/test.js +9 -0
- package/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/readable.d.ts +5 -0
- package/node_modules/undici-types/webidl.d.ts +6 -0
- package/node_modules/uuid/README.md +12 -12
- package/node_modules/uuid/dist/cjs/types.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v1.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v1.js +1 -1
- package/node_modules/uuid/dist/cjs/v3.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v35.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v4.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v5.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v6.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v7.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v7.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v1.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v7.js +1 -1
- package/node_modules/uuid/dist/esm/types.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v1.js +1 -1
- package/node_modules/uuid/dist/esm/v3.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v35.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v4.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v5.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v6.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v7.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v7.js +1 -1
- package/node_modules/uuid/dist/esm-browser/types.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v1.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v7.js +1 -1
- package/node_modules/uuid/package.json +1 -1
- package/package.json +7 -7
- package/tak-registration.html +4 -4
- package/tak-registration.js +13 -6
- package/node_modules/axios/SECURITY.md +0 -6
- /package/node_modules/fast-xml-parser/src/{v5 → v6}/Report.js +0 -0
|
@@ -13,11 +13,11 @@ const htmlEntities = {
|
|
|
13
13
|
"copyright" : { regex: /&(copy|#169);/g, val: "©" },
|
|
14
14
|
"reg" : { regex: /&(reg|#174);/g, val: "®" },
|
|
15
15
|
"inr" : { regex: /&(inr|#8377);/g, val: "₹" },
|
|
16
|
-
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.
|
|
17
|
-
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.
|
|
16
|
+
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 10)) },
|
|
17
|
+
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 16)) },
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
class EntitiesParser{
|
|
20
|
+
export default class EntitiesParser{
|
|
21
21
|
constructor(replaceHtmlEntities) {
|
|
22
22
|
this.replaceHtmlEntities = replaceHtmlEntities;
|
|
23
23
|
this.docTypeEntities = {};
|
|
@@ -103,5 +103,3 @@ function validateEntityName(name){
|
|
|
103
103
|
}
|
|
104
104
|
return name;
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
module.exports = EntitiesParser;
|
|
@@ -16,7 +16,7 @@ const symbol = "(?:\$|€|¥|₹)?";
|
|
|
16
16
|
|
|
17
17
|
const currencyCheckRegex = /^\s*(?:-|\+)?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d{1,2})?\s*(?:\$|€|¥|₹)?\s*$/u;
|
|
18
18
|
|
|
19
|
-
class CurrencyParser{
|
|
19
|
+
export default class CurrencyParser{
|
|
20
20
|
constructor(options){
|
|
21
21
|
this.options = options || defaultOptions;
|
|
22
22
|
}
|
|
@@ -36,5 +36,3 @@ class CurrencyParser{
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
CurrencyParser.defaultOptions = defaultOptions;
|
|
39
|
-
|
|
40
|
-
module.exports = CurrencyParser;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import toNumber from "strnum";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class numParser{
|
|
4
|
+
export default class numParser{
|
|
5
5
|
constructor(options){
|
|
6
6
|
this.options = options;
|
|
7
7
|
}
|
|
@@ -12,5 +12,3 @@ class numParser{
|
|
|
12
12
|
return val;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
module.exports = numParser;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import {getAllMatches, isName} from './util.js';
|
|
4
4
|
|
|
5
5
|
const defaultOptions = {
|
|
6
6
|
allowBooleanAttributes: false, //A tag can have attributes without any value
|
|
@@ -8,7 +8,7 @@ const defaultOptions = {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g");
|
|
11
|
-
|
|
11
|
+
export function validate(xmlData, options) {
|
|
12
12
|
options = Object.assign({}, defaultOptions, options);
|
|
13
13
|
|
|
14
14
|
//xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line
|
|
@@ -321,7 +321,7 @@ function validateAttributeString(attrStr, options) {
|
|
|
321
321
|
|
|
322
322
|
//if(attrStr.trim().length === 0) return true; //empty string
|
|
323
323
|
|
|
324
|
-
const matches =
|
|
324
|
+
const matches = getAllMatches(attrStr, validAttrStrRegxp);
|
|
325
325
|
const attrNames = {};
|
|
326
326
|
|
|
327
327
|
for (let i = 0; i < matches.length; i++) {
|
|
@@ -399,13 +399,13 @@ function getErrorObject(code, message, lineNumber) {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
function validateAttrName(attrName) {
|
|
402
|
-
return
|
|
402
|
+
return isName(attrName);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
// const startsWithXML = /^xml/i;
|
|
406
406
|
|
|
407
407
|
function validateTagName(tagname) {
|
|
408
|
-
return
|
|
408
|
+
return isName(tagname) /* && !tagname.match(startsWithXML) */;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
//this function returns the line number for the character at the given index
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
//parse Empty Node as self closing node
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import buildFromOrderedJs from './orderedJs2Xml.js';
|
|
4
|
+
import getIgnoreAttributesFn from "../ignoreAttributes.js";
|
|
5
5
|
|
|
6
6
|
const defaultOptions = {
|
|
7
7
|
attributeNamePrefix: '@_',
|
|
@@ -37,7 +37,7 @@ const defaultOptions = {
|
|
|
37
37
|
oneListGroup: false
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
function Builder(options) {
|
|
40
|
+
export default function Builder(options) {
|
|
41
41
|
this.options = Object.assign({}, defaultOptions, options);
|
|
42
42
|
if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
|
|
43
43
|
this.isAttribute = function(/*a*/) {
|
|
@@ -92,6 +92,8 @@ Builder.prototype.j2x = function(jObj, level, ajPath) {
|
|
|
92
92
|
// null attribute should be ignored by the attribute list, but should not cause the tag closing
|
|
93
93
|
if (this.isAttribute(key)) {
|
|
94
94
|
val += '';
|
|
95
|
+
} else if (key === this.options.cdataPropName) {
|
|
96
|
+
val += '';
|
|
95
97
|
} else if (key[0] === '?') {
|
|
96
98
|
val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;
|
|
97
99
|
} else {
|
|
@@ -281,4 +283,3 @@ function isAttribute(name /*, options*/) {
|
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
285
|
|
|
284
|
-
module.exports = Builder;
|
|
@@ -6,7 +6,7 @@ const EOL = "\n";
|
|
|
6
6
|
* @param {any} options
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
function toXml(jArray, options) {
|
|
9
|
+
export default function toXml(jArray, options) {
|
|
10
10
|
let indentation = "";
|
|
11
11
|
if (options.format && options.indentBy.length > 0) {
|
|
12
12
|
indentation = EOL;
|
|
@@ -132,4 +132,3 @@ function replaceEntitiesValue(textValue, options) {
|
|
|
132
132
|
}
|
|
133
133
|
return textValue;
|
|
134
134
|
}
|
|
135
|
-
module.exports = toXml;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import {isName} from '../util.js';
|
|
2
2
|
|
|
3
3
|
//TODO: handle comments
|
|
4
|
-
function readDocType(xmlData, i){
|
|
4
|
+
export default function readDocType(xmlData, i){
|
|
5
5
|
|
|
6
6
|
const entities = {};
|
|
7
7
|
if( xmlData[i + 3] === 'O' &&
|
|
@@ -17,21 +17,30 @@ function readDocType(xmlData, i){
|
|
|
17
17
|
let exp = "";
|
|
18
18
|
for(;i<xmlData.length;i++){
|
|
19
19
|
if (xmlData[i] === '<' && !comment) { //Determine the tag type
|
|
20
|
-
if( hasBody &&
|
|
20
|
+
if( hasBody && hasSeq(xmlData, "!ENTITY",i)){
|
|
21
21
|
i += 7;
|
|
22
22
|
let entityName, val;
|
|
23
23
|
[entityName, val,i] = readEntityExp(xmlData,i+1);
|
|
24
24
|
if(val.indexOf("&") === -1) //Parameter entities are not supported
|
|
25
|
-
entities[
|
|
25
|
+
entities[ entityName ] = {
|
|
26
26
|
regx : RegExp( `&${entityName};`,"g"),
|
|
27
27
|
val: val
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
else if( hasBody &&
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
else
|
|
30
|
+
else if( hasBody && hasSeq(xmlData, "!ELEMENT",i)) {
|
|
31
|
+
i += 8;//Not supported
|
|
32
|
+
const {index} = readElementExp(xmlData,i+1);
|
|
33
|
+
i = index;
|
|
34
|
+
}else if( hasBody && hasSeq(xmlData, "!ATTLIST",i)){
|
|
35
|
+
i += 8;//Not supported
|
|
36
|
+
// const {index} = readAttlistExp(xmlData,i+1);
|
|
37
|
+
// i = index;
|
|
38
|
+
}else if( hasBody && hasSeq(xmlData, "!NOTATION",i)) {
|
|
39
|
+
i += 9;//Not supported
|
|
40
|
+
const {index} = readNotationExp(xmlData,i+1);
|
|
41
|
+
i = index;
|
|
42
|
+
}else if( hasSeq(xmlData, "!--",i) ) comment = true;
|
|
43
|
+
else throw new Error("Invalid DOCTYPE");
|
|
35
44
|
|
|
36
45
|
angleBracketsCount++;
|
|
37
46
|
exp = "";
|
|
@@ -62,7 +71,14 @@ function readDocType(xmlData, i){
|
|
|
62
71
|
return {entities, i};
|
|
63
72
|
}
|
|
64
73
|
|
|
65
|
-
|
|
74
|
+
const skipWhitespace = (data, index) => {
|
|
75
|
+
while (index < data.length && /\s/.test(data[index])) {
|
|
76
|
+
index++;
|
|
77
|
+
}
|
|
78
|
+
return index;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
function readEntityExp(xmlData, i) {
|
|
66
82
|
//External entities are not supported
|
|
67
83
|
// <!ENTITY ext SYSTEM "http://normal-website.com" >
|
|
68
84
|
|
|
@@ -71,83 +87,283 @@ function readEntityExp(xmlData,i){
|
|
|
71
87
|
|
|
72
88
|
//Internal entities are supported
|
|
73
89
|
// <!ENTITY entityname "replacement text">
|
|
74
|
-
|
|
75
|
-
//
|
|
90
|
+
|
|
91
|
+
// Skip leading whitespace after <!ENTITY
|
|
92
|
+
i = skipWhitespace(xmlData, i);
|
|
93
|
+
|
|
94
|
+
// Read entity name
|
|
76
95
|
let entityName = "";
|
|
77
|
-
|
|
78
|
-
// if(xmlData[i] === " ") continue;
|
|
79
|
-
// else
|
|
96
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i]) && xmlData[i] !== '"' && xmlData[i] !== "'") {
|
|
80
97
|
entityName += xmlData[i];
|
|
98
|
+
i++;
|
|
81
99
|
}
|
|
82
|
-
entityName
|
|
83
|
-
if(entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
100
|
+
validateEntityName(entityName);
|
|
84
101
|
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
102
|
+
// Skip whitespace after entity name
|
|
103
|
+
i = skipWhitespace(xmlData, i);
|
|
104
|
+
|
|
105
|
+
// Check for unsupported constructs (external entities or parameter entities)
|
|
106
|
+
if (xmlData.substring(i, i + 6).toUpperCase() === "SYSTEM") {
|
|
107
|
+
throw new Error("External entities are not supported");
|
|
108
|
+
}else if (xmlData[i] === "%") {
|
|
109
|
+
throw new Error("Parameter entities are not supported");
|
|
90
110
|
}
|
|
91
|
-
|
|
111
|
+
|
|
112
|
+
// Read entity value (internal entity)
|
|
113
|
+
let entityValue = "";
|
|
114
|
+
[i, entityValue] = readIdentifierVal(xmlData, i, "entity");
|
|
115
|
+
i--;
|
|
116
|
+
return [entityName, entityValue, i ];
|
|
92
117
|
}
|
|
93
118
|
|
|
94
|
-
function
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
function readNotationExp(xmlData, i) {
|
|
120
|
+
// Skip leading whitespace after <!NOTATION
|
|
121
|
+
i = skipWhitespace(xmlData, i);
|
|
122
|
+
|
|
123
|
+
// Read notation name
|
|
124
|
+
let notationName = "";
|
|
125
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
126
|
+
notationName += xmlData[i];
|
|
127
|
+
i++;
|
|
128
|
+
}
|
|
129
|
+
validateEntityName(notationName);
|
|
130
|
+
|
|
131
|
+
// Skip whitespace after notation name
|
|
132
|
+
i = skipWhitespace(xmlData, i);
|
|
133
|
+
|
|
134
|
+
// Check identifier type (SYSTEM or PUBLIC)
|
|
135
|
+
const identifierType = xmlData.substring(i, i + 6).toUpperCase();
|
|
136
|
+
if (identifierType !== "SYSTEM" && identifierType !== "PUBLIC") {
|
|
137
|
+
throw new Error(`Expected SYSTEM or PUBLIC, found "${identifierType}"`);
|
|
138
|
+
}
|
|
139
|
+
i += identifierType.length;
|
|
140
|
+
|
|
141
|
+
// Skip whitespace after identifier type
|
|
142
|
+
i = skipWhitespace(xmlData, i);
|
|
143
|
+
|
|
144
|
+
// Read public identifier (if PUBLIC)
|
|
145
|
+
let publicIdentifier = null;
|
|
146
|
+
let systemIdentifier = null;
|
|
147
|
+
|
|
148
|
+
if (identifierType === "PUBLIC") {
|
|
149
|
+
[i, publicIdentifier ] = readIdentifierVal(xmlData, i, "publicIdentifier");
|
|
150
|
+
|
|
151
|
+
// Skip whitespace after public identifier
|
|
152
|
+
i = skipWhitespace(xmlData, i);
|
|
153
|
+
|
|
154
|
+
// Optionally read system identifier
|
|
155
|
+
if (xmlData[i] === '"' || xmlData[i] === "'") {
|
|
156
|
+
[i, systemIdentifier ] = readIdentifierVal(xmlData, i,"systemIdentifier");
|
|
157
|
+
}
|
|
158
|
+
} else if (identifierType === "SYSTEM") {
|
|
159
|
+
// Read system identifier (mandatory for SYSTEM)
|
|
160
|
+
[i, systemIdentifier ] = readIdentifierVal(xmlData, i, "systemIdentifier");
|
|
161
|
+
|
|
162
|
+
if (!systemIdentifier) {
|
|
163
|
+
throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return {notationName, publicIdentifier, systemIdentifier, index: --i};
|
|
99
168
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
xmlData[i
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
169
|
+
|
|
170
|
+
function readIdentifierVal(xmlData, i, type) {
|
|
171
|
+
let identifierVal = "";
|
|
172
|
+
const startChar = xmlData[i];
|
|
173
|
+
if (startChar !== '"' && startChar !== "'") {
|
|
174
|
+
throw new Error(`Expected quoted string, found "${startChar}"`);
|
|
175
|
+
}
|
|
176
|
+
i++;
|
|
177
|
+
|
|
178
|
+
while (i < xmlData.length && xmlData[i] !== startChar) {
|
|
179
|
+
identifierVal += xmlData[i];
|
|
180
|
+
i++;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (xmlData[i] !== startChar) {
|
|
184
|
+
throw new Error(`Unterminated ${type} value`);
|
|
185
|
+
}
|
|
186
|
+
i++;
|
|
187
|
+
return [i, identifierVal];
|
|
109
188
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
189
|
+
|
|
190
|
+
function readElementExp(xmlData, i) {
|
|
191
|
+
// <!ELEMENT br EMPTY>
|
|
192
|
+
// <!ELEMENT div ANY>
|
|
193
|
+
// <!ELEMENT title (#PCDATA)>
|
|
194
|
+
// <!ELEMENT book (title, author+)>
|
|
195
|
+
// <!ELEMENT name (content-model)>
|
|
196
|
+
|
|
197
|
+
// Skip leading whitespace after <!ELEMENT
|
|
198
|
+
i = skipWhitespace(xmlData, i);
|
|
199
|
+
|
|
200
|
+
// Read element name
|
|
201
|
+
let elementName = "";
|
|
202
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
203
|
+
elementName += xmlData[i];
|
|
204
|
+
i++;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Validate element name
|
|
208
|
+
if (!validateEntityName(elementName)) {
|
|
209
|
+
throw new Error(`Invalid element name: "${elementName}"`);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Skip whitespace after element name
|
|
213
|
+
i = skipWhitespace(xmlData, i);
|
|
214
|
+
let contentModel = "";
|
|
215
|
+
// Expect '(' to start content model
|
|
216
|
+
if(xmlData[i] === "E" && hasSeq(xmlData, "MPTY",i)) i+=6;
|
|
217
|
+
else if(xmlData[i] === "A" && hasSeq(xmlData, "NY",i)) i+=4;
|
|
218
|
+
else if (xmlData[i] === "(") {
|
|
219
|
+
i++; // Move past '('
|
|
220
|
+
|
|
221
|
+
// Read content model
|
|
222
|
+
while (i < xmlData.length && xmlData[i] !== ")") {
|
|
223
|
+
contentModel += xmlData[i];
|
|
224
|
+
i++;
|
|
225
|
+
}
|
|
226
|
+
if (xmlData[i] !== ")") {
|
|
227
|
+
throw new Error("Unterminated content model");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
}else{
|
|
231
|
+
throw new Error(`Invalid Element Expression, found "${xmlData[i]}"`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
elementName,
|
|
236
|
+
contentModel: contentModel.trim(),
|
|
237
|
+
index: i
|
|
238
|
+
};
|
|
120
239
|
}
|
|
121
240
|
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
xmlData[i
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
241
|
+
function readAttlistExp(xmlData, i) {
|
|
242
|
+
// Skip leading whitespace after <!ATTLIST
|
|
243
|
+
i = skipWhitespace(xmlData, i);
|
|
244
|
+
|
|
245
|
+
// Read element name
|
|
246
|
+
let elementName = "";
|
|
247
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
248
|
+
elementName += xmlData[i];
|
|
249
|
+
i++;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Validate element name
|
|
253
|
+
validateEntityName(elementName)
|
|
254
|
+
|
|
255
|
+
// Skip whitespace after element name
|
|
256
|
+
i = skipWhitespace(xmlData, i);
|
|
257
|
+
|
|
258
|
+
// Read attribute name
|
|
259
|
+
let attributeName = "";
|
|
260
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
261
|
+
attributeName += xmlData[i];
|
|
262
|
+
i++;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Validate attribute name
|
|
266
|
+
if (!validateEntityName(attributeName)) {
|
|
267
|
+
throw new Error(`Invalid attribute name: "${attributeName}"`);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Skip whitespace after attribute name
|
|
271
|
+
i = skipWhitespace(xmlData, i);
|
|
272
|
+
|
|
273
|
+
// Read attribute type
|
|
274
|
+
let attributeType = "";
|
|
275
|
+
if (xmlData.substring(i, i + 8).toUpperCase() === "NOTATION") {
|
|
276
|
+
attributeType = "NOTATION";
|
|
277
|
+
i += 8; // Move past "NOTATION"
|
|
278
|
+
|
|
279
|
+
// Skip whitespace after "NOTATION"
|
|
280
|
+
i = skipWhitespace(xmlData, i);
|
|
281
|
+
|
|
282
|
+
// Expect '(' to start the list of notations
|
|
283
|
+
if (xmlData[i] !== "(") {
|
|
284
|
+
throw new Error(`Expected '(', found "${xmlData[i]}"`);
|
|
285
|
+
}
|
|
286
|
+
i++; // Move past '('
|
|
287
|
+
|
|
288
|
+
// Read the list of allowed notations
|
|
289
|
+
let allowedNotations = [];
|
|
290
|
+
while (i < xmlData.length && xmlData[i] !== ")") {
|
|
291
|
+
let notation = "";
|
|
292
|
+
while (i < xmlData.length && xmlData[i] !== "|" && xmlData[i] !== ")") {
|
|
293
|
+
notation += xmlData[i];
|
|
294
|
+
i++;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Validate notation name
|
|
298
|
+
notation = notation.trim();
|
|
299
|
+
if (!validateEntityName(notation)) {
|
|
300
|
+
throw new Error(`Invalid notation name: "${notation}"`);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
allowedNotations.push(notation);
|
|
304
|
+
|
|
305
|
+
// Skip '|' separator or exit loop
|
|
306
|
+
if (xmlData[i] === "|") {
|
|
307
|
+
i++; // Move past '|'
|
|
308
|
+
i = skipWhitespace(xmlData, i); // Skip optional whitespace after '|'
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if (xmlData[i] !== ")") {
|
|
313
|
+
throw new Error("Unterminated list of notations");
|
|
314
|
+
}
|
|
315
|
+
i++; // Move past ')'
|
|
316
|
+
|
|
317
|
+
// Store the allowed notations as part of the attribute type
|
|
318
|
+
attributeType += " (" + allowedNotations.join("|") + ")";
|
|
319
|
+
} else {
|
|
320
|
+
// Handle simple types (e.g., CDATA, ID, IDREF, etc.)
|
|
321
|
+
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
322
|
+
attributeType += xmlData[i];
|
|
323
|
+
i++;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Validate simple attribute type
|
|
327
|
+
const validTypes = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
|
328
|
+
if (!validTypes.includes(attributeType.toUpperCase())) {
|
|
329
|
+
throw new Error(`Invalid attribute type: "${attributeType}"`);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Skip whitespace after attribute type
|
|
334
|
+
i = skipWhitespace(xmlData, i);
|
|
335
|
+
|
|
336
|
+
// Read default value
|
|
337
|
+
let defaultValue = "";
|
|
338
|
+
if (xmlData.substring(i, i + 8).toUpperCase() === "#REQUIRED") {
|
|
339
|
+
defaultValue = "#REQUIRED";
|
|
340
|
+
i += 8;
|
|
341
|
+
} else if (xmlData.substring(i, i + 7).toUpperCase() === "#IMPLIED") {
|
|
342
|
+
defaultValue = "#IMPLIED";
|
|
343
|
+
i += 7;
|
|
344
|
+
} else {
|
|
345
|
+
[i, defaultValue] = readIdentifierVal(xmlData, i, "ATTLIST");
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return {
|
|
349
|
+
elementName,
|
|
350
|
+
attributeName,
|
|
351
|
+
attributeType,
|
|
352
|
+
defaultValue,
|
|
353
|
+
index: i
|
|
354
|
+
}
|
|
132
355
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
xmlData[i+6] === 'T' &&
|
|
140
|
-
xmlData[i+7] === 'I' &&
|
|
141
|
-
xmlData[i+8] === 'O' &&
|
|
142
|
-
xmlData[i+9] === 'N') return true
|
|
143
|
-
return false
|
|
356
|
+
|
|
357
|
+
function hasSeq(data, seq,i){
|
|
358
|
+
for(let j=0;j<seq.length;j++){
|
|
359
|
+
if(seq[j]!==data[i+j+1]) return false;
|
|
360
|
+
}
|
|
361
|
+
return true;
|
|
144
362
|
}
|
|
145
363
|
|
|
146
364
|
function validateEntityName(name){
|
|
147
|
-
if (
|
|
365
|
+
if (isName(name))
|
|
148
366
|
return name;
|
|
149
367
|
else
|
|
150
368
|
throw new Error(`Invalid entity name ${name}`);
|
|
151
369
|
}
|
|
152
|
-
|
|
153
|
-
module.exports = readDocType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
const defaultOptions = {
|
|
2
|
+
export const defaultOptions = {
|
|
3
3
|
preserveOrder: false,
|
|
4
4
|
attributeNamePrefix: '@_',
|
|
5
5
|
attributesGroupName: false,
|
|
@@ -38,11 +38,9 @@ const defaultOptions = {
|
|
|
38
38
|
return tagName
|
|
39
39
|
},
|
|
40
40
|
// skipEmptyListItem: false
|
|
41
|
+
captureMetaData: false,
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
const buildOptions = function(options) {
|
|
44
|
+
export const buildOptions = function(options) {
|
|
44
45
|
return Object.assign({}, defaultOptions, options);
|
|
45
46
|
};
|
|
46
|
-
|
|
47
|
-
exports.buildOptions = buildOptions;
|
|
48
|
-
exports.defaultOptions = defaultOptions;
|