node-red-contrib-tak-registration 0.14.1 → 0.16.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 +165 -0
- package/node_modules/axios/README.md +55 -33
- package/node_modules/axios/dist/axios.js +85 -43
- 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 +92 -47
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +92 -47
- 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 +123 -51
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +17 -5
- package/node_modules/axios/index.d.ts +6 -3
- package/node_modules/axios/lib/adapters/fetch.js +2 -2
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/core/Axios.js +13 -4
- 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/core/mergeConfig.js +1 -1
- 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/helpers/throttle.js +1 -1
- package/node_modules/axios/lib/helpers/toFormData.js +4 -0
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +4 -3
- package/node_modules/axios/lib/platform/node/index.js +26 -0
- package/node_modules/axios/lib/utils.js +48 -28
- package/node_modules/axios/package.json +14 -5
- 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 +70 -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 -19
- package/node_modules/fast-xml-parser/src/cli/cli.js +16 -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 +33 -6
- 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/CHANGELOG.md +601 -0
- package/node_modules/form-data/{Readme.md → README.md} +34 -37
- package/node_modules/form-data/lib/browser.js +3 -1
- package/node_modules/form-data/lib/form_data.js +140 -147
- package/node_modules/form-data/lib/populate.js +5 -5
- package/node_modules/form-data/package.json +34 -23
- 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 +532 -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 +672 -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/ext/descriptor/index.js +179 -69
- package/node_modules/protobufjs/google/protobuf/descriptor.json +659 -16
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +254 -6
- 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 +126 -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 +51 -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 +19 -10
- package/node_modules/axios/SECURITY.md +0 -6
- /package/node_modules/fast-xml-parser/src/{v5 → v6}/Report.js +0 -0
|
@@ -56,6 +56,12 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
56
56
|
*/
|
|
57
57
|
this.valuesOptions = valuesOptions;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Resolved values features, if any
|
|
61
|
+
* @type {Object<string, Object<string, *>>|undefined}
|
|
62
|
+
*/
|
|
63
|
+
this._valuesFeatures = {};
|
|
64
|
+
|
|
59
65
|
/**
|
|
60
66
|
* Reserved ranges, if any.
|
|
61
67
|
* @type {Array.<number[]|string>}
|
|
@@ -72,6 +78,21 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
72
78
|
this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];
|
|
73
79
|
}
|
|
74
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @override
|
|
83
|
+
*/
|
|
84
|
+
Enum.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
85
|
+
edition = this._edition || edition;
|
|
86
|
+
ReflectionObject.prototype._resolveFeatures.call(this, edition);
|
|
87
|
+
|
|
88
|
+
Object.keys(this.values).forEach(key => {
|
|
89
|
+
var parentFeaturesCopy = Object.assign({}, this._features);
|
|
90
|
+
this._valuesFeatures[key] = Object.assign(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
return this;
|
|
94
|
+
};
|
|
95
|
+
|
|
75
96
|
/**
|
|
76
97
|
* Enum descriptor.
|
|
77
98
|
* @interface IEnum
|
|
@@ -89,6 +110,9 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
89
110
|
Enum.fromJSON = function fromJSON(name, json) {
|
|
90
111
|
var enm = new Enum(name, json.values, json.options, json.comment, json.comments);
|
|
91
112
|
enm.reserved = json.reserved;
|
|
113
|
+
if (json.edition)
|
|
114
|
+
enm._edition = json.edition;
|
|
115
|
+
enm._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
92
116
|
return enm;
|
|
93
117
|
};
|
|
94
118
|
|
|
@@ -100,6 +124,7 @@ Enum.fromJSON = function fromJSON(name, json) {
|
|
|
100
124
|
Enum.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
101
125
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
102
126
|
return util.toObject([
|
|
127
|
+
"edition" , this._editionToJSON(),
|
|
103
128
|
"options" , this.options,
|
|
104
129
|
"valuesOptions" , this.valuesOptions,
|
|
105
130
|
"values" , this.values,
|
|
@@ -35,7 +35,11 @@ var ruleRe = /^required|optional|repeated$/;
|
|
|
35
35
|
* @throws {TypeError} If arguments are invalid
|
|
36
36
|
*/
|
|
37
37
|
Field.fromJSON = function fromJSON(name, json) {
|
|
38
|
-
|
|
38
|
+
var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);
|
|
39
|
+
if (json.edition)
|
|
40
|
+
field._edition = json.edition;
|
|
41
|
+
field._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
42
|
+
return field;
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -105,18 +109,6 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
105
109
|
*/
|
|
106
110
|
this.extend = extend || undefined; // toJSON
|
|
107
111
|
|
|
108
|
-
/**
|
|
109
|
-
* Whether this field is required.
|
|
110
|
-
* @type {boolean}
|
|
111
|
-
*/
|
|
112
|
-
this.required = rule === "required";
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Whether this field is optional.
|
|
116
|
-
* @type {boolean}
|
|
117
|
-
*/
|
|
118
|
-
this.optional = !this.required;
|
|
119
|
-
|
|
120
112
|
/**
|
|
121
113
|
* Whether this field is repeated.
|
|
122
114
|
* @type {boolean}
|
|
@@ -183,13 +175,6 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
183
175
|
*/
|
|
184
176
|
this.declaringField = null;
|
|
185
177
|
|
|
186
|
-
/**
|
|
187
|
-
* Internally remembers whether this field is packed.
|
|
188
|
-
* @type {boolean|null}
|
|
189
|
-
* @private
|
|
190
|
-
*/
|
|
191
|
-
this._packed = null;
|
|
192
|
-
|
|
193
178
|
/**
|
|
194
179
|
* Comment for this field.
|
|
195
180
|
* @type {string|null}
|
|
@@ -198,17 +183,69 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
198
183
|
}
|
|
199
184
|
|
|
200
185
|
/**
|
|
201
|
-
* Determines whether this field is
|
|
186
|
+
* Determines whether this field is required.
|
|
187
|
+
* @name Field#required
|
|
188
|
+
* @type {boolean}
|
|
189
|
+
* @readonly
|
|
190
|
+
*/
|
|
191
|
+
Object.defineProperty(Field.prototype, "required", {
|
|
192
|
+
get: function() {
|
|
193
|
+
return this._features.field_presence === "LEGACY_REQUIRED";
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Determines whether this field is not required.
|
|
199
|
+
* @name Field#optional
|
|
200
|
+
* @type {boolean}
|
|
201
|
+
* @readonly
|
|
202
|
+
*/
|
|
203
|
+
Object.defineProperty(Field.prototype, "optional", {
|
|
204
|
+
get: function() {
|
|
205
|
+
return !this.required;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Determines whether this field uses tag-delimited encoding. In proto2 this
|
|
211
|
+
* corresponded to group syntax.
|
|
212
|
+
* @name Field#delimited
|
|
213
|
+
* @type {boolean}
|
|
214
|
+
* @readonly
|
|
215
|
+
*/
|
|
216
|
+
Object.defineProperty(Field.prototype, "delimited", {
|
|
217
|
+
get: function() {
|
|
218
|
+
return this.resolvedType instanceof Type &&
|
|
219
|
+
this._features.message_encoding === "DELIMITED";
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Determines whether this field is packed. Only relevant when repeated.
|
|
202
225
|
* @name Field#packed
|
|
203
226
|
* @type {boolean}
|
|
204
227
|
* @readonly
|
|
205
228
|
*/
|
|
206
229
|
Object.defineProperty(Field.prototype, "packed", {
|
|
207
230
|
get: function() {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
231
|
+
return this._features.repeated_field_encoding === "PACKED";
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Determines whether this field tracks presence.
|
|
237
|
+
* @name Field#hasPresence
|
|
238
|
+
* @type {boolean}
|
|
239
|
+
* @readonly
|
|
240
|
+
*/
|
|
241
|
+
Object.defineProperty(Field.prototype, "hasPresence", {
|
|
242
|
+
get: function() {
|
|
243
|
+
if (this.repeated || this.map) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
return this.partOf || // oneofs
|
|
247
|
+
this.declaringField || this.extensionField || // extensions
|
|
248
|
+
this._features.field_presence !== "IMPLICIT";
|
|
212
249
|
}
|
|
213
250
|
});
|
|
214
251
|
|
|
@@ -216,8 +253,6 @@ Object.defineProperty(Field.prototype, "packed", {
|
|
|
216
253
|
* @override
|
|
217
254
|
*/
|
|
218
255
|
Field.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
219
|
-
if (name === "packed") // clear cached before setting
|
|
220
|
-
this._packed = null;
|
|
221
256
|
return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);
|
|
222
257
|
};
|
|
223
258
|
|
|
@@ -245,6 +280,7 @@ Field.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
|
245
280
|
Field.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
246
281
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
247
282
|
return util.toObject([
|
|
283
|
+
"edition" , this._editionToJSON(),
|
|
248
284
|
"rule" , this.rule !== "optional" && this.rule || undefined,
|
|
249
285
|
"type" , this.type,
|
|
250
286
|
"id" , this.id,
|
|
@@ -284,7 +320,7 @@ Field.prototype.resolve = function resolve() {
|
|
|
284
320
|
|
|
285
321
|
// remove unnecessary options
|
|
286
322
|
if (this.options) {
|
|
287
|
-
if (this.options.packed
|
|
323
|
+
if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))
|
|
288
324
|
delete this.options.packed;
|
|
289
325
|
if (!Object.keys(this.options).length)
|
|
290
326
|
this.options = undefined;
|
|
@@ -322,6 +358,46 @@ Field.prototype.resolve = function resolve() {
|
|
|
322
358
|
return ReflectionObject.prototype.resolve.call(this);
|
|
323
359
|
};
|
|
324
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Infers field features from legacy syntax that may have been specified differently.
|
|
363
|
+
* in older editions.
|
|
364
|
+
* @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions
|
|
365
|
+
* @returns {object} The feature values to override
|
|
366
|
+
*/
|
|
367
|
+
Field.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {
|
|
368
|
+
if (edition !== "proto2" && edition !== "proto3") {
|
|
369
|
+
return {};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
var features = {};
|
|
373
|
+
|
|
374
|
+
if (this.rule === "required") {
|
|
375
|
+
features.field_presence = "LEGACY_REQUIRED";
|
|
376
|
+
}
|
|
377
|
+
if (this.parent && types.defaults[this.type] === undefined) {
|
|
378
|
+
// We can't use resolvedType because types may not have been resolved yet. However,
|
|
379
|
+
// legacy groups are always in the same scope as the field so we don't have to do a
|
|
380
|
+
// full scan of the tree.
|
|
381
|
+
var type = this.parent.get(this.type.split(".").pop());
|
|
382
|
+
if (type && type instanceof Type && type.group) {
|
|
383
|
+
features.message_encoding = "DELIMITED";
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (this.getOption("packed") === true) {
|
|
387
|
+
features.repeated_field_encoding = "PACKED";
|
|
388
|
+
} else if (this.getOption("packed") === false) {
|
|
389
|
+
features.repeated_field_encoding = "EXPANDED";
|
|
390
|
+
}
|
|
391
|
+
return features;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* @override
|
|
396
|
+
*/
|
|
397
|
+
Field.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
398
|
+
return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);
|
|
399
|
+
};
|
|
400
|
+
|
|
325
401
|
/**
|
|
326
402
|
* Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).
|
|
327
403
|
* @typedef FieldDecorator
|
|
@@ -108,10 +108,40 @@ function Namespace(name, options) {
|
|
|
108
108
|
* @private
|
|
109
109
|
*/
|
|
110
110
|
this._nestedArray = null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Cache lookup calls for any objects contains anywhere under this namespace.
|
|
114
|
+
* This drastically speeds up resolve for large cross-linked protos where the same
|
|
115
|
+
* types are looked up repeatedly.
|
|
116
|
+
* @type {Object.<string,ReflectionObject|null>}
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
this._lookupCache = {};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Whether or not objects contained in this namespace need feature resolution.
|
|
123
|
+
* @type {boolean}
|
|
124
|
+
* @protected
|
|
125
|
+
*/
|
|
126
|
+
this._needsRecursiveFeatureResolution = true;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Whether or not objects contained in this namespace need a resolve.
|
|
130
|
+
* @type {boolean}
|
|
131
|
+
* @protected
|
|
132
|
+
*/
|
|
133
|
+
this._needsRecursiveResolve = true;
|
|
111
134
|
}
|
|
112
135
|
|
|
113
136
|
function clearCache(namespace) {
|
|
114
137
|
namespace._nestedArray = null;
|
|
138
|
+
namespace._lookupCache = {};
|
|
139
|
+
|
|
140
|
+
// Also clear parent caches, since they include nested lookups.
|
|
141
|
+
var parent = namespace;
|
|
142
|
+
while(parent = parent.parent) {
|
|
143
|
+
parent._lookupCache = {};
|
|
144
|
+
}
|
|
115
145
|
return namespace;
|
|
116
146
|
}
|
|
117
147
|
|
|
@@ -240,6 +270,25 @@ Namespace.prototype.add = function add(object) {
|
|
|
240
270
|
}
|
|
241
271
|
}
|
|
242
272
|
this.nested[object.name] = object;
|
|
273
|
+
|
|
274
|
+
if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {
|
|
275
|
+
// This is a package or a root namespace.
|
|
276
|
+
if (!object._edition) {
|
|
277
|
+
// Make sure that some edition is set if it hasn't already been specified.
|
|
278
|
+
object._edition = object._defaultEdition;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
this._needsRecursiveFeatureResolution = true;
|
|
283
|
+
this._needsRecursiveResolve = true;
|
|
284
|
+
|
|
285
|
+
// Also clear parent caches, since they need to recurse down.
|
|
286
|
+
var parent = this;
|
|
287
|
+
while(parent = parent.parent) {
|
|
288
|
+
parent._needsRecursiveFeatureResolution = true;
|
|
289
|
+
parent._needsRecursiveResolve = true;
|
|
290
|
+
}
|
|
291
|
+
|
|
243
292
|
object.onAdd(this);
|
|
244
293
|
return clearCache(this);
|
|
245
294
|
};
|
|
@@ -301,13 +350,35 @@ Namespace.prototype.define = function define(path, json) {
|
|
|
301
350
|
* @returns {Namespace} `this`
|
|
302
351
|
*/
|
|
303
352
|
Namespace.prototype.resolveAll = function resolveAll() {
|
|
353
|
+
if (!this._needsRecursiveResolve) return this;
|
|
354
|
+
|
|
355
|
+
this._resolveFeaturesRecursive(this._edition);
|
|
356
|
+
|
|
304
357
|
var nested = this.nestedArray, i = 0;
|
|
358
|
+
this.resolve();
|
|
305
359
|
while (i < nested.length)
|
|
306
360
|
if (nested[i] instanceof Namespace)
|
|
307
361
|
nested[i++].resolveAll();
|
|
308
362
|
else
|
|
309
363
|
nested[i++].resolve();
|
|
310
|
-
|
|
364
|
+
this._needsRecursiveResolve = false;
|
|
365
|
+
return this;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @override
|
|
370
|
+
*/
|
|
371
|
+
Namespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
372
|
+
if (!this._needsRecursiveFeatureResolution) return this;
|
|
373
|
+
this._needsRecursiveFeatureResolution = false;
|
|
374
|
+
|
|
375
|
+
edition = this._edition || edition;
|
|
376
|
+
|
|
377
|
+
ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);
|
|
378
|
+
this.nestedArray.forEach(nested => {
|
|
379
|
+
nested._resolveFeaturesRecursive(edition);
|
|
380
|
+
});
|
|
381
|
+
return this;
|
|
311
382
|
};
|
|
312
383
|
|
|
313
384
|
/**
|
|
@@ -318,7 +389,6 @@ Namespace.prototype.resolveAll = function resolveAll() {
|
|
|
318
389
|
* @returns {ReflectionObject|null} Looked up object or `null` if none could be found
|
|
319
390
|
*/
|
|
320
391
|
Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {
|
|
321
|
-
|
|
322
392
|
/* istanbul ignore next */
|
|
323
393
|
if (typeof filterTypes === "boolean") {
|
|
324
394
|
parentAlreadyChecked = filterTypes;
|
|
@@ -333,29 +403,72 @@ Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChe
|
|
|
333
403
|
} else if (!path.length)
|
|
334
404
|
return this;
|
|
335
405
|
|
|
406
|
+
var flatPath = path.join(".");
|
|
407
|
+
|
|
336
408
|
// Start at root if path is absolute
|
|
337
409
|
if (path[0] === "")
|
|
338
410
|
return this.root.lookup(path.slice(1), filterTypes);
|
|
339
411
|
|
|
412
|
+
// Early bailout for objects with matching absolute paths
|
|
413
|
+
var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
|
|
414
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
415
|
+
return found;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Do a regular lookup at this namespace and below
|
|
419
|
+
found = this._lookupImpl(path, flatPath);
|
|
420
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
421
|
+
return found;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (parentAlreadyChecked)
|
|
425
|
+
return null;
|
|
426
|
+
|
|
427
|
+
// If there hasn't been a match, walk up the tree and look more broadly
|
|
428
|
+
var current = this;
|
|
429
|
+
while (current.parent) {
|
|
430
|
+
found = current.parent._lookupImpl(path, flatPath);
|
|
431
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
432
|
+
return found;
|
|
433
|
+
}
|
|
434
|
+
current = current.parent;
|
|
435
|
+
}
|
|
436
|
+
return null;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Internal helper for lookup that handles searching just at this namespace and below along with caching.
|
|
441
|
+
* @param {string[]} path Path to look up
|
|
442
|
+
* @param {string} flatPath Flattened version of the path to use as a cache key
|
|
443
|
+
* @returns {ReflectionObject|null} Looked up object or `null` if none could be found
|
|
444
|
+
* @private
|
|
445
|
+
*/
|
|
446
|
+
Namespace.prototype._lookupImpl = function lookup(path, flatPath) {
|
|
447
|
+
if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
448
|
+
return this._lookupCache[flatPath];
|
|
449
|
+
}
|
|
450
|
+
|
|
340
451
|
// Test if the first part matches any nested object, and if so, traverse if path contains more
|
|
341
452
|
var found = this.get(path[0]);
|
|
453
|
+
var exact = null;
|
|
342
454
|
if (found) {
|
|
343
455
|
if (path.length === 1) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
456
|
+
exact = found;
|
|
457
|
+
} else if (found instanceof Namespace) {
|
|
458
|
+
path = path.slice(1);
|
|
459
|
+
exact = found._lookupImpl(path, path.join("."));
|
|
460
|
+
}
|
|
348
461
|
|
|
349
462
|
// Otherwise try each nested namespace
|
|
350
|
-
} else
|
|
463
|
+
} else {
|
|
351
464
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
352
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].
|
|
353
|
-
|
|
465
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath)))
|
|
466
|
+
exact = found;
|
|
467
|
+
}
|
|
354
468
|
|
|
355
|
-
//
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
return this.parent.lookup(path, filterTypes);
|
|
469
|
+
// Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.
|
|
470
|
+
this._lookupCache[flatPath] = exact;
|
|
471
|
+
return exact;
|
|
359
472
|
};
|
|
360
473
|
|
|
361
474
|
/**
|
|
@@ -3,10 +3,17 @@ module.exports = ReflectionObject;
|
|
|
3
3
|
|
|
4
4
|
ReflectionObject.className = "ReflectionObject";
|
|
5
5
|
|
|
6
|
+
const OneOf = require("./oneof");
|
|
6
7
|
var util = require("./util");
|
|
7
8
|
|
|
8
9
|
var Root; // cyclic
|
|
9
10
|
|
|
11
|
+
/* eslint-disable no-warning-comments */
|
|
12
|
+
// TODO: Replace with embedded proto.
|
|
13
|
+
var editions2023Defaults = {enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"};
|
|
14
|
+
var proto2Defaults = {enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE"};
|
|
15
|
+
var proto3Defaults = {enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"};
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* Constructs a new reflection object instance.
|
|
12
19
|
* @classdesc Base class of all reflection objects.
|
|
@@ -41,6 +48,35 @@ function ReflectionObject(name, options) {
|
|
|
41
48
|
*/
|
|
42
49
|
this.name = name;
|
|
43
50
|
|
|
51
|
+
/**
|
|
52
|
+
* The edition specified for this object. Only relevant for top-level objects.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
this._edition = null;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The default edition to use for this object if none is specified. For legacy reasons,
|
|
60
|
+
* this is proto2 except in the JSON parsing case where it was proto3.
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
this._defaultEdition = "proto2";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Resolved Features.
|
|
68
|
+
* @type {object}
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
this._features = {};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Whether or not features have been resolved.
|
|
75
|
+
* @type {boolean}
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
this._featuresResolved = false;
|
|
79
|
+
|
|
44
80
|
/**
|
|
45
81
|
* Parent namespace.
|
|
46
82
|
* @type {Namespace|null}
|
|
@@ -151,6 +187,83 @@ ReflectionObject.prototype.resolve = function resolve() {
|
|
|
151
187
|
return this;
|
|
152
188
|
};
|
|
153
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Resolves this objects editions features.
|
|
192
|
+
* @param {string} edition The edition we're currently resolving for.
|
|
193
|
+
* @returns {ReflectionObject} `this`
|
|
194
|
+
*/
|
|
195
|
+
ReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
196
|
+
return this._resolveFeatures(this._edition || edition);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Resolves child features from parent features
|
|
201
|
+
* @param {string} edition The edition we're currently resolving for.
|
|
202
|
+
* @returns {undefined}
|
|
203
|
+
*/
|
|
204
|
+
ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
205
|
+
if (this._featuresResolved) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
var defaults = {};
|
|
210
|
+
|
|
211
|
+
/* istanbul ignore if */
|
|
212
|
+
if (!edition) {
|
|
213
|
+
throw new Error("Unknown edition for " + this.fullName);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
var protoFeatures = Object.assign(this.options ? Object.assign({}, this.options.features) : {},
|
|
217
|
+
this._inferLegacyProtoFeatures(edition));
|
|
218
|
+
|
|
219
|
+
if (this._edition) {
|
|
220
|
+
// For a namespace marked with a specific edition, reset defaults.
|
|
221
|
+
/* istanbul ignore else */
|
|
222
|
+
if (edition === "proto2") {
|
|
223
|
+
defaults = Object.assign({}, proto2Defaults);
|
|
224
|
+
} else if (edition === "proto3") {
|
|
225
|
+
defaults = Object.assign({}, proto3Defaults);
|
|
226
|
+
} else if (edition === "2023") {
|
|
227
|
+
defaults = Object.assign({}, editions2023Defaults);
|
|
228
|
+
} else {
|
|
229
|
+
throw new Error("Unknown edition: " + edition);
|
|
230
|
+
}
|
|
231
|
+
this._features = Object.assign(defaults, protoFeatures || {});
|
|
232
|
+
this._featuresResolved = true;
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// fields in Oneofs aren't actually children of them, so we have to
|
|
237
|
+
// special-case it
|
|
238
|
+
/* istanbul ignore else */
|
|
239
|
+
if (this.partOf instanceof OneOf) {
|
|
240
|
+
var lexicalParentFeaturesCopy = Object.assign({}, this.partOf._features);
|
|
241
|
+
this._features = Object.assign(lexicalParentFeaturesCopy, protoFeatures || {});
|
|
242
|
+
} else if (this.declaringField) {
|
|
243
|
+
// Skip feature resolution of sister fields.
|
|
244
|
+
} else if (this.parent) {
|
|
245
|
+
var parentFeaturesCopy = Object.assign({}, this.parent._features);
|
|
246
|
+
this._features = Object.assign(parentFeaturesCopy, protoFeatures || {});
|
|
247
|
+
} else {
|
|
248
|
+
throw new Error("Unable to find a parent for " + this.fullName);
|
|
249
|
+
}
|
|
250
|
+
if (this.extensionField) {
|
|
251
|
+
// Sister fields should have the same features as their extensions.
|
|
252
|
+
this.extensionField._features = this._features;
|
|
253
|
+
}
|
|
254
|
+
this._featuresResolved = true;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Infers features from legacy syntax that may have been specified differently.
|
|
259
|
+
* in older editions.
|
|
260
|
+
* @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions
|
|
261
|
+
* @returns {object} The feature values to override
|
|
262
|
+
*/
|
|
263
|
+
ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {
|
|
264
|
+
return {};
|
|
265
|
+
};
|
|
266
|
+
|
|
154
267
|
/**
|
|
155
268
|
* Gets an option value.
|
|
156
269
|
* @param {string} name Option name
|
|
@@ -166,12 +279,19 @@ ReflectionObject.prototype.getOption = function getOption(name) {
|
|
|
166
279
|
* Sets an option.
|
|
167
280
|
* @param {string} name Option name
|
|
168
281
|
* @param {*} value Option value
|
|
169
|
-
* @param {boolean} [ifNotSet] Sets the option only if it isn't currently set
|
|
282
|
+
* @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set
|
|
170
283
|
* @returns {ReflectionObject} `this`
|
|
171
284
|
*/
|
|
172
285
|
ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
173
|
-
if (!
|
|
174
|
-
|
|
286
|
+
if (!this.options)
|
|
287
|
+
this.options = {};
|
|
288
|
+
if (/^features\./.test(name)) {
|
|
289
|
+
util.setProperty(this.options, name, value, ifNotSet);
|
|
290
|
+
} else if (!ifNotSet || this.options[name] === undefined) {
|
|
291
|
+
if (this.getOption(name) !== value) this.resolved = false;
|
|
292
|
+
this.options[name] = value;
|
|
293
|
+
}
|
|
294
|
+
|
|
175
295
|
return this;
|
|
176
296
|
};
|
|
177
297
|
|
|
@@ -195,10 +315,11 @@ ReflectionObject.prototype.setParsedOption = function setParsedOption(name, valu
|
|
|
195
315
|
});
|
|
196
316
|
if (opt) {
|
|
197
317
|
// If we found an existing option - just merge the property value
|
|
318
|
+
// (If it's a feature, will just write over)
|
|
198
319
|
var newValue = opt[name];
|
|
199
320
|
util.setProperty(newValue, propName, value);
|
|
200
321
|
} else {
|
|
201
|
-
// otherwise, create a new option, set
|
|
322
|
+
// otherwise, create a new option, set its property and add it to the list
|
|
202
323
|
opt = {};
|
|
203
324
|
opt[name] = util.setProperty({}, propName, value);
|
|
204
325
|
parsedOptions.push(opt);
|
|
@@ -209,6 +330,7 @@ ReflectionObject.prototype.setParsedOption = function setParsedOption(name, valu
|
|
|
209
330
|
newOpt[name] = value;
|
|
210
331
|
parsedOptions.push(newOpt);
|
|
211
332
|
}
|
|
333
|
+
|
|
212
334
|
return this;
|
|
213
335
|
};
|
|
214
336
|
|
|
@@ -237,6 +359,19 @@ ReflectionObject.prototype.toString = function toString() {
|
|
|
237
359
|
return className;
|
|
238
360
|
};
|
|
239
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Converts the edition this object is pinned to for JSON format.
|
|
364
|
+
* @returns {string|undefined} The edition string for JSON representation
|
|
365
|
+
*/
|
|
366
|
+
ReflectionObject.prototype._editionToJSON = function _editionToJSON() {
|
|
367
|
+
if (!this._edition || this._edition === "proto3") {
|
|
368
|
+
// Avoid emitting proto3 since we need to default to it for backwards
|
|
369
|
+
// compatibility anyway.
|
|
370
|
+
return undefined;
|
|
371
|
+
}
|
|
372
|
+
return this._edition;
|
|
373
|
+
};
|
|
374
|
+
|
|
240
375
|
// Sets up cyclic dependencies (called in index-light)
|
|
241
376
|
ReflectionObject._configure = function(Root_) {
|
|
242
377
|
Root = Root_;
|
|
@@ -171,6 +171,25 @@ OneOf.prototype.onRemove = function onRemove(parent) {
|
|
|
171
171
|
ReflectionObject.prototype.onRemove.call(this, parent);
|
|
172
172
|
};
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Determines whether this field corresponds to a synthetic oneof created for
|
|
176
|
+
* a proto3 optional field. No behavioral logic should depend on this, but it
|
|
177
|
+
* can be relevant for reflection.
|
|
178
|
+
* @name OneOf#isProto3Optional
|
|
179
|
+
* @type {boolean}
|
|
180
|
+
* @readonly
|
|
181
|
+
*/
|
|
182
|
+
Object.defineProperty(OneOf.prototype, "isProto3Optional", {
|
|
183
|
+
get: function() {
|
|
184
|
+
if (this.fieldsArray == null || this.fieldsArray.length !== 1) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
var field = this.fieldsArray[0];
|
|
189
|
+
return field.options != null && field.options["proto3_optional"] === true;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
|
|
174
193
|
/**
|
|
175
194
|
* Decorator function as returned by {@link OneOf.d} (TypeScript).
|
|
176
195
|
* @typedef OneOfDecorator
|