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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.2 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled wed, 14 may 2025 19:25:30 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1430,16 +1430,14 @@ function missing(field) {
|
|
|
1430
1430
|
*/
|
|
1431
1431
|
function decoder(mtype) {
|
|
1432
1432
|
/* eslint-disable no-unexpected-multiline */
|
|
1433
|
-
var gen = util.codegen(["r", "l"], mtype.name + "$decode")
|
|
1433
|
+
var gen = util.codegen(["r", "l", "e"], mtype.name + "$decode")
|
|
1434
1434
|
("if(!(r instanceof Reader))")
|
|
1435
1435
|
("r=Reader.create(r)")
|
|
1436
1436
|
("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : ""))
|
|
1437
1437
|
("while(r.pos<c){")
|
|
1438
|
-
("var t=r.uint32()")
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
("break");
|
|
1442
|
-
gen
|
|
1438
|
+
("var t=r.uint32()")
|
|
1439
|
+
("if(t===e)")
|
|
1440
|
+
("break")
|
|
1443
1441
|
("switch(t>>>3){");
|
|
1444
1442
|
|
|
1445
1443
|
var i = 0;
|
|
@@ -1505,15 +1503,15 @@ function decoder(mtype) {
|
|
|
1505
1503
|
("}else");
|
|
1506
1504
|
|
|
1507
1505
|
// Non-packed
|
|
1508
|
-
if (types.basic[type] === undefined) gen(field.
|
|
1509
|
-
? "%s.push(types[%i].decode(r))"
|
|
1506
|
+
if (types.basic[type] === undefined) gen(field.delimited
|
|
1507
|
+
? "%s.push(types[%i].decode(r,undefined,((t&~7)|4)))"
|
|
1510
1508
|
: "%s.push(types[%i].decode(r,r.uint32()))", ref, i);
|
|
1511
1509
|
else gen
|
|
1512
1510
|
("%s.push(r.%s())", ref, type);
|
|
1513
1511
|
|
|
1514
1512
|
// Non-repeated
|
|
1515
|
-
} else if (types.basic[type] === undefined) gen(field.
|
|
1516
|
-
? "%s=types[%i].decode(r)"
|
|
1513
|
+
} else if (types.basic[type] === undefined) gen(field.delimited
|
|
1514
|
+
? "%s=types[%i].decode(r,undefined,((t&~7)|4))"
|
|
1517
1515
|
: "%s=types[%i].decode(r,r.uint32())", ref, i);
|
|
1518
1516
|
else gen
|
|
1519
1517
|
("%s=r.%s()", ref, type);
|
|
@@ -1560,7 +1558,7 @@ var Enum = require(14),
|
|
|
1560
1558
|
* @ignore
|
|
1561
1559
|
*/
|
|
1562
1560
|
function genTypePartial(gen, field, fieldIndex, ref) {
|
|
1563
|
-
return field.
|
|
1561
|
+
return field.delimited
|
|
1564
1562
|
? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0)
|
|
1565
1563
|
: gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
|
|
1566
1564
|
}
|
|
@@ -1703,6 +1701,12 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
1703
1701
|
*/
|
|
1704
1702
|
this.valuesOptions = valuesOptions;
|
|
1705
1703
|
|
|
1704
|
+
/**
|
|
1705
|
+
* Resolved values features, if any
|
|
1706
|
+
* @type {Object<string, Object<string, *>>|undefined}
|
|
1707
|
+
*/
|
|
1708
|
+
this._valuesFeatures = {};
|
|
1709
|
+
|
|
1706
1710
|
/**
|
|
1707
1711
|
* Reserved ranges, if any.
|
|
1708
1712
|
* @type {Array.<number[]|string>}
|
|
@@ -1719,6 +1723,21 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
1719
1723
|
this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];
|
|
1720
1724
|
}
|
|
1721
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* @override
|
|
1728
|
+
*/
|
|
1729
|
+
Enum.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
1730
|
+
edition = this._edition || edition;
|
|
1731
|
+
ReflectionObject.prototype._resolveFeatures.call(this, edition);
|
|
1732
|
+
|
|
1733
|
+
Object.keys(this.values).forEach(key => {
|
|
1734
|
+
var parentFeaturesCopy = Object.assign({}, this._features);
|
|
1735
|
+
this._valuesFeatures[key] = Object.assign(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features);
|
|
1736
|
+
});
|
|
1737
|
+
|
|
1738
|
+
return this;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1722
1741
|
/**
|
|
1723
1742
|
* Enum descriptor.
|
|
1724
1743
|
* @interface IEnum
|
|
@@ -1736,6 +1755,9 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
1736
1755
|
Enum.fromJSON = function fromJSON(name, json) {
|
|
1737
1756
|
var enm = new Enum(name, json.values, json.options, json.comment, json.comments);
|
|
1738
1757
|
enm.reserved = json.reserved;
|
|
1758
|
+
if (json.edition)
|
|
1759
|
+
enm._edition = json.edition;
|
|
1760
|
+
enm._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
1739
1761
|
return enm;
|
|
1740
1762
|
};
|
|
1741
1763
|
|
|
@@ -1747,6 +1769,7 @@ Enum.fromJSON = function fromJSON(name, json) {
|
|
|
1747
1769
|
Enum.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
1748
1770
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
1749
1771
|
return util.toObject([
|
|
1772
|
+
"edition" , this._editionToJSON(),
|
|
1750
1773
|
"options" , this.options,
|
|
1751
1774
|
"valuesOptions" , this.valuesOptions,
|
|
1752
1775
|
"values" , this.values,
|
|
@@ -1882,7 +1905,11 @@ var ruleRe = /^required|optional|repeated$/;
|
|
|
1882
1905
|
* @throws {TypeError} If arguments are invalid
|
|
1883
1906
|
*/
|
|
1884
1907
|
Field.fromJSON = function fromJSON(name, json) {
|
|
1885
|
-
|
|
1908
|
+
var field = new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);
|
|
1909
|
+
if (json.edition)
|
|
1910
|
+
field._edition = json.edition;
|
|
1911
|
+
field._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
1912
|
+
return field;
|
|
1886
1913
|
};
|
|
1887
1914
|
|
|
1888
1915
|
/**
|
|
@@ -1952,18 +1979,6 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
1952
1979
|
*/
|
|
1953
1980
|
this.extend = extend || undefined; // toJSON
|
|
1954
1981
|
|
|
1955
|
-
/**
|
|
1956
|
-
* Whether this field is required.
|
|
1957
|
-
* @type {boolean}
|
|
1958
|
-
*/
|
|
1959
|
-
this.required = rule === "required";
|
|
1960
|
-
|
|
1961
|
-
/**
|
|
1962
|
-
* Whether this field is optional.
|
|
1963
|
-
* @type {boolean}
|
|
1964
|
-
*/
|
|
1965
|
-
this.optional = !this.required;
|
|
1966
|
-
|
|
1967
1982
|
/**
|
|
1968
1983
|
* Whether this field is repeated.
|
|
1969
1984
|
* @type {boolean}
|
|
@@ -2030,13 +2045,6 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
2030
2045
|
*/
|
|
2031
2046
|
this.declaringField = null;
|
|
2032
2047
|
|
|
2033
|
-
/**
|
|
2034
|
-
* Internally remembers whether this field is packed.
|
|
2035
|
-
* @type {boolean|null}
|
|
2036
|
-
* @private
|
|
2037
|
-
*/
|
|
2038
|
-
this._packed = null;
|
|
2039
|
-
|
|
2040
2048
|
/**
|
|
2041
2049
|
* Comment for this field.
|
|
2042
2050
|
* @type {string|null}
|
|
@@ -2045,17 +2053,69 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
2045
2053
|
}
|
|
2046
2054
|
|
|
2047
2055
|
/**
|
|
2048
|
-
* Determines whether this field is
|
|
2056
|
+
* Determines whether this field is required.
|
|
2057
|
+
* @name Field#required
|
|
2058
|
+
* @type {boolean}
|
|
2059
|
+
* @readonly
|
|
2060
|
+
*/
|
|
2061
|
+
Object.defineProperty(Field.prototype, "required", {
|
|
2062
|
+
get: function() {
|
|
2063
|
+
return this._features.field_presence === "LEGACY_REQUIRED";
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* Determines whether this field is not required.
|
|
2069
|
+
* @name Field#optional
|
|
2070
|
+
* @type {boolean}
|
|
2071
|
+
* @readonly
|
|
2072
|
+
*/
|
|
2073
|
+
Object.defineProperty(Field.prototype, "optional", {
|
|
2074
|
+
get: function() {
|
|
2075
|
+
return !this.required;
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* Determines whether this field uses tag-delimited encoding. In proto2 this
|
|
2081
|
+
* corresponded to group syntax.
|
|
2082
|
+
* @name Field#delimited
|
|
2083
|
+
* @type {boolean}
|
|
2084
|
+
* @readonly
|
|
2085
|
+
*/
|
|
2086
|
+
Object.defineProperty(Field.prototype, "delimited", {
|
|
2087
|
+
get: function() {
|
|
2088
|
+
return this.resolvedType instanceof Type &&
|
|
2089
|
+
this._features.message_encoding === "DELIMITED";
|
|
2090
|
+
}
|
|
2091
|
+
});
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Determines whether this field is packed. Only relevant when repeated.
|
|
2049
2095
|
* @name Field#packed
|
|
2050
2096
|
* @type {boolean}
|
|
2051
2097
|
* @readonly
|
|
2052
2098
|
*/
|
|
2053
2099
|
Object.defineProperty(Field.prototype, "packed", {
|
|
2054
2100
|
get: function() {
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2101
|
+
return this._features.repeated_field_encoding === "PACKED";
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* Determines whether this field tracks presence.
|
|
2107
|
+
* @name Field#hasPresence
|
|
2108
|
+
* @type {boolean}
|
|
2109
|
+
* @readonly
|
|
2110
|
+
*/
|
|
2111
|
+
Object.defineProperty(Field.prototype, "hasPresence", {
|
|
2112
|
+
get: function() {
|
|
2113
|
+
if (this.repeated || this.map) {
|
|
2114
|
+
return false;
|
|
2115
|
+
}
|
|
2116
|
+
return this.partOf || // oneofs
|
|
2117
|
+
this.declaringField || this.extensionField || // extensions
|
|
2118
|
+
this._features.field_presence !== "IMPLICIT";
|
|
2059
2119
|
}
|
|
2060
2120
|
});
|
|
2061
2121
|
|
|
@@ -2063,8 +2123,6 @@ Object.defineProperty(Field.prototype, "packed", {
|
|
|
2063
2123
|
* @override
|
|
2064
2124
|
*/
|
|
2065
2125
|
Field.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
2066
|
-
if (name === "packed") // clear cached before setting
|
|
2067
|
-
this._packed = null;
|
|
2068
2126
|
return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);
|
|
2069
2127
|
};
|
|
2070
2128
|
|
|
@@ -2092,6 +2150,7 @@ Field.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
|
2092
2150
|
Field.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
2093
2151
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
2094
2152
|
return util.toObject([
|
|
2153
|
+
"edition" , this._editionToJSON(),
|
|
2095
2154
|
"rule" , this.rule !== "optional" && this.rule || undefined,
|
|
2096
2155
|
"type" , this.type,
|
|
2097
2156
|
"id" , this.id,
|
|
@@ -2131,7 +2190,7 @@ Field.prototype.resolve = function resolve() {
|
|
|
2131
2190
|
|
|
2132
2191
|
// remove unnecessary options
|
|
2133
2192
|
if (this.options) {
|
|
2134
|
-
if (this.options.packed
|
|
2193
|
+
if (this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))
|
|
2135
2194
|
delete this.options.packed;
|
|
2136
2195
|
if (!Object.keys(this.options).length)
|
|
2137
2196
|
this.options = undefined;
|
|
@@ -2169,6 +2228,46 @@ Field.prototype.resolve = function resolve() {
|
|
|
2169
2228
|
return ReflectionObject.prototype.resolve.call(this);
|
|
2170
2229
|
};
|
|
2171
2230
|
|
|
2231
|
+
/**
|
|
2232
|
+
* Infers field features from legacy syntax that may have been specified differently.
|
|
2233
|
+
* in older editions.
|
|
2234
|
+
* @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions
|
|
2235
|
+
* @returns {object} The feature values to override
|
|
2236
|
+
*/
|
|
2237
|
+
Field.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(edition) {
|
|
2238
|
+
if (edition !== "proto2" && edition !== "proto3") {
|
|
2239
|
+
return {};
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
var features = {};
|
|
2243
|
+
|
|
2244
|
+
if (this.rule === "required") {
|
|
2245
|
+
features.field_presence = "LEGACY_REQUIRED";
|
|
2246
|
+
}
|
|
2247
|
+
if (this.parent && types.defaults[this.type] === undefined) {
|
|
2248
|
+
// We can't use resolvedType because types may not have been resolved yet. However,
|
|
2249
|
+
// legacy groups are always in the same scope as the field so we don't have to do a
|
|
2250
|
+
// full scan of the tree.
|
|
2251
|
+
var type = this.parent.get(this.type.split(".").pop());
|
|
2252
|
+
if (type && type instanceof Type && type.group) {
|
|
2253
|
+
features.message_encoding = "DELIMITED";
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
if (this.getOption("packed") === true) {
|
|
2257
|
+
features.repeated_field_encoding = "PACKED";
|
|
2258
|
+
} else if (this.getOption("packed") === false) {
|
|
2259
|
+
features.repeated_field_encoding = "EXPANDED";
|
|
2260
|
+
}
|
|
2261
|
+
return features;
|
|
2262
|
+
};
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* @override
|
|
2266
|
+
*/
|
|
2267
|
+
Field.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
2268
|
+
return ReflectionObject.prototype._resolveFeatures.call(this, this._edition || edition);
|
|
2269
|
+
};
|
|
2270
|
+
|
|
2172
2271
|
/**
|
|
2173
2272
|
* Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).
|
|
2174
2273
|
* @typedef FieldDecorator
|
|
@@ -2908,10 +3007,40 @@ function Namespace(name, options) {
|
|
|
2908
3007
|
* @private
|
|
2909
3008
|
*/
|
|
2910
3009
|
this._nestedArray = null;
|
|
3010
|
+
|
|
3011
|
+
/**
|
|
3012
|
+
* Cache lookup calls for any objects contains anywhere under this namespace.
|
|
3013
|
+
* This drastically speeds up resolve for large cross-linked protos where the same
|
|
3014
|
+
* types are looked up repeatedly.
|
|
3015
|
+
* @type {Object.<string,ReflectionObject|null>}
|
|
3016
|
+
* @private
|
|
3017
|
+
*/
|
|
3018
|
+
this._lookupCache = {};
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* Whether or not objects contained in this namespace need feature resolution.
|
|
3022
|
+
* @type {boolean}
|
|
3023
|
+
* @protected
|
|
3024
|
+
*/
|
|
3025
|
+
this._needsRecursiveFeatureResolution = true;
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Whether or not objects contained in this namespace need a resolve.
|
|
3029
|
+
* @type {boolean}
|
|
3030
|
+
* @protected
|
|
3031
|
+
*/
|
|
3032
|
+
this._needsRecursiveResolve = true;
|
|
2911
3033
|
}
|
|
2912
3034
|
|
|
2913
3035
|
function clearCache(namespace) {
|
|
2914
3036
|
namespace._nestedArray = null;
|
|
3037
|
+
namespace._lookupCache = {};
|
|
3038
|
+
|
|
3039
|
+
// Also clear parent caches, since they include nested lookups.
|
|
3040
|
+
var parent = namespace;
|
|
3041
|
+
while(parent = parent.parent) {
|
|
3042
|
+
parent._lookupCache = {};
|
|
3043
|
+
}
|
|
2915
3044
|
return namespace;
|
|
2916
3045
|
}
|
|
2917
3046
|
|
|
@@ -3040,6 +3169,25 @@ Namespace.prototype.add = function add(object) {
|
|
|
3040
3169
|
}
|
|
3041
3170
|
}
|
|
3042
3171
|
this.nested[object.name] = object;
|
|
3172
|
+
|
|
3173
|
+
if (!(this instanceof Type || this instanceof Service || this instanceof Enum || this instanceof Field)) {
|
|
3174
|
+
// This is a package or a root namespace.
|
|
3175
|
+
if (!object._edition) {
|
|
3176
|
+
// Make sure that some edition is set if it hasn't already been specified.
|
|
3177
|
+
object._edition = object._defaultEdition;
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
this._needsRecursiveFeatureResolution = true;
|
|
3182
|
+
this._needsRecursiveResolve = true;
|
|
3183
|
+
|
|
3184
|
+
// Also clear parent caches, since they need to recurse down.
|
|
3185
|
+
var parent = this;
|
|
3186
|
+
while(parent = parent.parent) {
|
|
3187
|
+
parent._needsRecursiveFeatureResolution = true;
|
|
3188
|
+
parent._needsRecursiveResolve = true;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3043
3191
|
object.onAdd(this);
|
|
3044
3192
|
return clearCache(this);
|
|
3045
3193
|
};
|
|
@@ -3101,13 +3249,33 @@ Namespace.prototype.define = function define(path, json) {
|
|
|
3101
3249
|
* @returns {Namespace} `this`
|
|
3102
3250
|
*/
|
|
3103
3251
|
Namespace.prototype.resolveAll = function resolveAll() {
|
|
3252
|
+
if (!this._needsRecursiveResolve) return this;
|
|
3253
|
+
|
|
3104
3254
|
var nested = this.nestedArray, i = 0;
|
|
3255
|
+
this.resolve();
|
|
3105
3256
|
while (i < nested.length)
|
|
3106
3257
|
if (nested[i] instanceof Namespace)
|
|
3107
3258
|
nested[i++].resolveAll();
|
|
3108
3259
|
else
|
|
3109
3260
|
nested[i++].resolve();
|
|
3110
|
-
|
|
3261
|
+
this._needsRecursiveResolve = false;
|
|
3262
|
+
return this;
|
|
3263
|
+
};
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* @override
|
|
3267
|
+
*/
|
|
3268
|
+
Namespace.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
3269
|
+
if (!this._needsRecursiveFeatureResolution) return this;
|
|
3270
|
+
this._needsRecursiveFeatureResolution = false;
|
|
3271
|
+
|
|
3272
|
+
edition = this._edition || edition;
|
|
3273
|
+
|
|
3274
|
+
ReflectionObject.prototype._resolveFeaturesRecursive.call(this, edition);
|
|
3275
|
+
this.nestedArray.forEach(nested => {
|
|
3276
|
+
nested._resolveFeaturesRecursive(edition);
|
|
3277
|
+
});
|
|
3278
|
+
return this;
|
|
3111
3279
|
};
|
|
3112
3280
|
|
|
3113
3281
|
/**
|
|
@@ -3118,7 +3286,6 @@ Namespace.prototype.resolveAll = function resolveAll() {
|
|
|
3118
3286
|
* @returns {ReflectionObject|null} Looked up object or `null` if none could be found
|
|
3119
3287
|
*/
|
|
3120
3288
|
Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {
|
|
3121
|
-
|
|
3122
3289
|
/* istanbul ignore next */
|
|
3123
3290
|
if (typeof filterTypes === "boolean") {
|
|
3124
3291
|
parentAlreadyChecked = filterTypes;
|
|
@@ -3133,29 +3300,72 @@ Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChe
|
|
|
3133
3300
|
} else if (!path.length)
|
|
3134
3301
|
return this;
|
|
3135
3302
|
|
|
3303
|
+
var flatPath = path.join(".");
|
|
3304
|
+
|
|
3136
3305
|
// Start at root if path is absolute
|
|
3137
3306
|
if (path[0] === "")
|
|
3138
3307
|
return this.root.lookup(path.slice(1), filterTypes);
|
|
3139
3308
|
|
|
3309
|
+
// Early bailout for objects with matching absolute paths
|
|
3310
|
+
var found = this.root._fullyQualifiedObjects["." + flatPath];
|
|
3311
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
3312
|
+
return found;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
// Do a regular lookup at this namespace and below
|
|
3316
|
+
found = this._lookupImpl(path, flatPath);
|
|
3317
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
3318
|
+
return found;
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
if (parentAlreadyChecked)
|
|
3322
|
+
return null;
|
|
3323
|
+
|
|
3324
|
+
// If there hasn't been a match, walk up the tree and look more broadly
|
|
3325
|
+
var current = this;
|
|
3326
|
+
while (current.parent) {
|
|
3327
|
+
found = current.parent._lookupImpl(path, flatPath);
|
|
3328
|
+
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
3329
|
+
return found;
|
|
3330
|
+
}
|
|
3331
|
+
current = current.parent;
|
|
3332
|
+
}
|
|
3333
|
+
return null;
|
|
3334
|
+
};
|
|
3335
|
+
|
|
3336
|
+
/**
|
|
3337
|
+
* Internal helper for lookup that handles searching just at this namespace and below along with caching.
|
|
3338
|
+
* @param {string[]} path Path to look up
|
|
3339
|
+
* @param {string} flatPath Flattened version of the path to use as a cache key
|
|
3340
|
+
* @returns {ReflectionObject|null} Looked up object or `null` if none could be found
|
|
3341
|
+
* @private
|
|
3342
|
+
*/
|
|
3343
|
+
Namespace.prototype._lookupImpl = function lookup(path, flatPath) {
|
|
3344
|
+
if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
3345
|
+
return this._lookupCache[flatPath];
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3140
3348
|
// Test if the first part matches any nested object, and if so, traverse if path contains more
|
|
3141
3349
|
var found = this.get(path[0]);
|
|
3350
|
+
var exact = null;
|
|
3142
3351
|
if (found) {
|
|
3143
3352
|
if (path.length === 1) {
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3353
|
+
exact = found;
|
|
3354
|
+
} else if (found instanceof Namespace) {
|
|
3355
|
+
path = path.slice(1);
|
|
3356
|
+
exact = found._lookupImpl(path, path.join("."));
|
|
3357
|
+
}
|
|
3148
3358
|
|
|
3149
3359
|
// Otherwise try each nested namespace
|
|
3150
|
-
} else
|
|
3360
|
+
} else {
|
|
3151
3361
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
3152
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].
|
|
3153
|
-
|
|
3362
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath)))
|
|
3363
|
+
exact = found;
|
|
3364
|
+
}
|
|
3154
3365
|
|
|
3155
|
-
//
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
return this.parent.lookup(path, filterTypes);
|
|
3366
|
+
// Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.
|
|
3367
|
+
this._lookupCache[flatPath] = exact;
|
|
3368
|
+
return exact;
|
|
3159
3369
|
};
|
|
3160
3370
|
|
|
3161
3371
|
/**
|
|
@@ -3238,10 +3448,17 @@ module.exports = ReflectionObject;
|
|
|
3238
3448
|
|
|
3239
3449
|
ReflectionObject.className = "ReflectionObject";
|
|
3240
3450
|
|
|
3451
|
+
const OneOf = require(23);
|
|
3241
3452
|
var util = require(33);
|
|
3242
3453
|
|
|
3243
3454
|
var Root; // cyclic
|
|
3244
3455
|
|
|
3456
|
+
/* eslint-disable no-warning-comments */
|
|
3457
|
+
// TODO: Replace with embedded proto.
|
|
3458
|
+
var editions2023Defaults = {enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"};
|
|
3459
|
+
var proto2Defaults = {enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE"};
|
|
3460
|
+
var proto3Defaults = {enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY"};
|
|
3461
|
+
|
|
3245
3462
|
/**
|
|
3246
3463
|
* Constructs a new reflection object instance.
|
|
3247
3464
|
* @classdesc Base class of all reflection objects.
|
|
@@ -3276,6 +3493,35 @@ function ReflectionObject(name, options) {
|
|
|
3276
3493
|
*/
|
|
3277
3494
|
this.name = name;
|
|
3278
3495
|
|
|
3496
|
+
/**
|
|
3497
|
+
* The edition specified for this object. Only relevant for top-level objects.
|
|
3498
|
+
* @type {string}
|
|
3499
|
+
* @private
|
|
3500
|
+
*/
|
|
3501
|
+
this._edition = null;
|
|
3502
|
+
|
|
3503
|
+
/**
|
|
3504
|
+
* The default edition to use for this object if none is specified. For legacy reasons,
|
|
3505
|
+
* this is proto2 except in the JSON parsing case where it was proto3.
|
|
3506
|
+
* @type {string}
|
|
3507
|
+
* @private
|
|
3508
|
+
*/
|
|
3509
|
+
this._defaultEdition = "proto2";
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* Resolved Features.
|
|
3513
|
+
* @type {object}
|
|
3514
|
+
* @private
|
|
3515
|
+
*/
|
|
3516
|
+
this._features = {};
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* Whether or not features have been resolved.
|
|
3520
|
+
* @type {boolean}
|
|
3521
|
+
* @private
|
|
3522
|
+
*/
|
|
3523
|
+
this._featuresResolved = false;
|
|
3524
|
+
|
|
3279
3525
|
/**
|
|
3280
3526
|
* Parent namespace.
|
|
3281
3527
|
* @type {Namespace|null}
|
|
@@ -3386,6 +3632,83 @@ ReflectionObject.prototype.resolve = function resolve() {
|
|
|
3386
3632
|
return this;
|
|
3387
3633
|
};
|
|
3388
3634
|
|
|
3635
|
+
/**
|
|
3636
|
+
* Resolves this objects editions features.
|
|
3637
|
+
* @param {string} edition The edition we're currently resolving for.
|
|
3638
|
+
* @returns {ReflectionObject} `this`
|
|
3639
|
+
*/
|
|
3640
|
+
ReflectionObject.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
3641
|
+
return this._resolveFeatures(this._edition || edition);
|
|
3642
|
+
};
|
|
3643
|
+
|
|
3644
|
+
/**
|
|
3645
|
+
* Resolves child features from parent features
|
|
3646
|
+
* @param {string} edition The edition we're currently resolving for.
|
|
3647
|
+
* @returns {undefined}
|
|
3648
|
+
*/
|
|
3649
|
+
ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
3650
|
+
if (this._featuresResolved) {
|
|
3651
|
+
return;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
var defaults = {};
|
|
3655
|
+
|
|
3656
|
+
/* istanbul ignore if */
|
|
3657
|
+
if (!edition) {
|
|
3658
|
+
throw new Error("Unknown edition for " + this.fullName);
|
|
3659
|
+
}
|
|
3660
|
+
|
|
3661
|
+
var protoFeatures = Object.assign(this.options ? Object.assign({}, this.options.features) : {},
|
|
3662
|
+
this._inferLegacyProtoFeatures(edition));
|
|
3663
|
+
|
|
3664
|
+
if (this._edition) {
|
|
3665
|
+
// For a namespace marked with a specific edition, reset defaults.
|
|
3666
|
+
/* istanbul ignore else */
|
|
3667
|
+
if (edition === "proto2") {
|
|
3668
|
+
defaults = Object.assign({}, proto2Defaults);
|
|
3669
|
+
} else if (edition === "proto3") {
|
|
3670
|
+
defaults = Object.assign({}, proto3Defaults);
|
|
3671
|
+
} else if (edition === "2023") {
|
|
3672
|
+
defaults = Object.assign({}, editions2023Defaults);
|
|
3673
|
+
} else {
|
|
3674
|
+
throw new Error("Unknown edition: " + edition);
|
|
3675
|
+
}
|
|
3676
|
+
this._features = Object.assign(defaults, protoFeatures || {});
|
|
3677
|
+
this._featuresResolved = true;
|
|
3678
|
+
return;
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
// fields in Oneofs aren't actually children of them, so we have to
|
|
3682
|
+
// special-case it
|
|
3683
|
+
/* istanbul ignore else */
|
|
3684
|
+
if (this.partOf instanceof OneOf) {
|
|
3685
|
+
var lexicalParentFeaturesCopy = Object.assign({}, this.partOf._features);
|
|
3686
|
+
this._features = Object.assign(lexicalParentFeaturesCopy, protoFeatures || {});
|
|
3687
|
+
} else if (this.declaringField) {
|
|
3688
|
+
// Skip feature resolution of sister fields.
|
|
3689
|
+
} else if (this.parent) {
|
|
3690
|
+
var parentFeaturesCopy = Object.assign({}, this.parent._features);
|
|
3691
|
+
this._features = Object.assign(parentFeaturesCopy, protoFeatures || {});
|
|
3692
|
+
} else {
|
|
3693
|
+
throw new Error("Unable to find a parent for " + this.fullName);
|
|
3694
|
+
}
|
|
3695
|
+
if (this.extensionField) {
|
|
3696
|
+
// Sister fields should have the same features as their extensions.
|
|
3697
|
+
this.extensionField._features = this._features;
|
|
3698
|
+
}
|
|
3699
|
+
this._featuresResolved = true;
|
|
3700
|
+
};
|
|
3701
|
+
|
|
3702
|
+
/**
|
|
3703
|
+
* Infers features from legacy syntax that may have been specified differently.
|
|
3704
|
+
* in older editions.
|
|
3705
|
+
* @param {string|undefined} edition The edition this proto is on, or undefined if pre-editions
|
|
3706
|
+
* @returns {object} The feature values to override
|
|
3707
|
+
*/
|
|
3708
|
+
ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures(/*edition*/) {
|
|
3709
|
+
return {};
|
|
3710
|
+
};
|
|
3711
|
+
|
|
3389
3712
|
/**
|
|
3390
3713
|
* Gets an option value.
|
|
3391
3714
|
* @param {string} name Option name
|
|
@@ -3401,12 +3724,19 @@ ReflectionObject.prototype.getOption = function getOption(name) {
|
|
|
3401
3724
|
* Sets an option.
|
|
3402
3725
|
* @param {string} name Option name
|
|
3403
3726
|
* @param {*} value Option value
|
|
3404
|
-
* @param {boolean} [ifNotSet] Sets the option only if it isn't currently set
|
|
3727
|
+
* @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set
|
|
3405
3728
|
* @returns {ReflectionObject} `this`
|
|
3406
3729
|
*/
|
|
3407
3730
|
ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {
|
|
3408
|
-
if (!
|
|
3409
|
-
|
|
3731
|
+
if (!this.options)
|
|
3732
|
+
this.options = {};
|
|
3733
|
+
if (/^features\./.test(name)) {
|
|
3734
|
+
util.setProperty(this.options, name, value, ifNotSet);
|
|
3735
|
+
} else if (!ifNotSet || this.options[name] === undefined) {
|
|
3736
|
+
if (this.getOption(name) !== value) this.resolved = false;
|
|
3737
|
+
this.options[name] = value;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3410
3740
|
return this;
|
|
3411
3741
|
};
|
|
3412
3742
|
|
|
@@ -3430,10 +3760,11 @@ ReflectionObject.prototype.setParsedOption = function setParsedOption(name, valu
|
|
|
3430
3760
|
});
|
|
3431
3761
|
if (opt) {
|
|
3432
3762
|
// If we found an existing option - just merge the property value
|
|
3763
|
+
// (If it's a feature, will just write over)
|
|
3433
3764
|
var newValue = opt[name];
|
|
3434
3765
|
util.setProperty(newValue, propName, value);
|
|
3435
3766
|
} else {
|
|
3436
|
-
// otherwise, create a new option, set
|
|
3767
|
+
// otherwise, create a new option, set its property and add it to the list
|
|
3437
3768
|
opt = {};
|
|
3438
3769
|
opt[name] = util.setProperty({}, propName, value);
|
|
3439
3770
|
parsedOptions.push(opt);
|
|
@@ -3444,6 +3775,7 @@ ReflectionObject.prototype.setParsedOption = function setParsedOption(name, valu
|
|
|
3444
3775
|
newOpt[name] = value;
|
|
3445
3776
|
parsedOptions.push(newOpt);
|
|
3446
3777
|
}
|
|
3778
|
+
|
|
3447
3779
|
return this;
|
|
3448
3780
|
};
|
|
3449
3781
|
|
|
@@ -3472,12 +3804,25 @@ ReflectionObject.prototype.toString = function toString() {
|
|
|
3472
3804
|
return className;
|
|
3473
3805
|
};
|
|
3474
3806
|
|
|
3807
|
+
/**
|
|
3808
|
+
* Converts the edition this object is pinned to for JSON format.
|
|
3809
|
+
* @returns {string|undefined} The edition string for JSON representation
|
|
3810
|
+
*/
|
|
3811
|
+
ReflectionObject.prototype._editionToJSON = function _editionToJSON() {
|
|
3812
|
+
if (!this._edition || this._edition === "proto3") {
|
|
3813
|
+
// Avoid emitting proto3 since we need to default to it for backwards
|
|
3814
|
+
// compatibility anyway.
|
|
3815
|
+
return undefined;
|
|
3816
|
+
}
|
|
3817
|
+
return this._edition;
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3475
3820
|
// Sets up cyclic dependencies (called in index-light)
|
|
3476
3821
|
ReflectionObject._configure = function(Root_) {
|
|
3477
3822
|
Root = Root_;
|
|
3478
3823
|
};
|
|
3479
3824
|
|
|
3480
|
-
},{"33":33}],23:[function(require,module,exports){
|
|
3825
|
+
},{"23":23,"33":33}],23:[function(require,module,exports){
|
|
3481
3826
|
"use strict";
|
|
3482
3827
|
module.exports = OneOf;
|
|
3483
3828
|
|
|
@@ -3651,6 +3996,25 @@ OneOf.prototype.onRemove = function onRemove(parent) {
|
|
|
3651
3996
|
ReflectionObject.prototype.onRemove.call(this, parent);
|
|
3652
3997
|
};
|
|
3653
3998
|
|
|
3999
|
+
/**
|
|
4000
|
+
* Determines whether this field corresponds to a synthetic oneof created for
|
|
4001
|
+
* a proto3 optional field. No behavioral logic should depend on this, but it
|
|
4002
|
+
* can be relevant for reflection.
|
|
4003
|
+
* @name OneOf#isProto3Optional
|
|
4004
|
+
* @type {boolean}
|
|
4005
|
+
* @readonly
|
|
4006
|
+
*/
|
|
4007
|
+
Object.defineProperty(OneOf.prototype, "isProto3Optional", {
|
|
4008
|
+
get: function() {
|
|
4009
|
+
if (this.fieldsArray == null || this.fieldsArray.length !== 1) {
|
|
4010
|
+
return false;
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
var field = this.fieldsArray[0];
|
|
4014
|
+
return field.options != null && field.options["proto3_optional"] === true;
|
|
4015
|
+
}
|
|
4016
|
+
});
|
|
4017
|
+
|
|
3654
4018
|
/**
|
|
3655
4019
|
* Decorator function as returned by {@link OneOf.d} (TypeScript).
|
|
3656
4020
|
* @typedef OneOfDecorator
|
|
@@ -4191,11 +4555,25 @@ function Root(options) {
|
|
|
4191
4555
|
* @type {string[]}
|
|
4192
4556
|
*/
|
|
4193
4557
|
this.files = [];
|
|
4558
|
+
|
|
4559
|
+
/**
|
|
4560
|
+
* Edition, defaults to proto2 if unspecified.
|
|
4561
|
+
* @type {string}
|
|
4562
|
+
* @private
|
|
4563
|
+
*/
|
|
4564
|
+
this._edition = "proto2";
|
|
4565
|
+
|
|
4566
|
+
/**
|
|
4567
|
+
* Global lookup cache of fully qualified names.
|
|
4568
|
+
* @type {Object.<string,ReflectionObject>}
|
|
4569
|
+
* @private
|
|
4570
|
+
*/
|
|
4571
|
+
this._fullyQualifiedObjects = {};
|
|
4194
4572
|
}
|
|
4195
4573
|
|
|
4196
4574
|
/**
|
|
4197
4575
|
* Loads a namespace descriptor into a root namespace.
|
|
4198
|
-
* @param {INamespace} json
|
|
4576
|
+
* @param {INamespace} json Namespace descriptor
|
|
4199
4577
|
* @param {Root} [root] Root namespace, defaults to create a new one if omitted
|
|
4200
4578
|
* @returns {Root} Root namespace
|
|
4201
4579
|
*/
|
|
@@ -4204,7 +4582,7 @@ Root.fromJSON = function fromJSON(json, root) {
|
|
|
4204
4582
|
root = new Root();
|
|
4205
4583
|
if (json.options)
|
|
4206
4584
|
root.setOptions(json.options);
|
|
4207
|
-
return root.addJSON(json.nested);
|
|
4585
|
+
return root.addJSON(json.nested).resolveAll();
|
|
4208
4586
|
};
|
|
4209
4587
|
|
|
4210
4588
|
/**
|
|
@@ -4244,18 +4622,24 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
4244
4622
|
options = undefined;
|
|
4245
4623
|
}
|
|
4246
4624
|
var self = this;
|
|
4247
|
-
if (!callback)
|
|
4625
|
+
if (!callback) {
|
|
4248
4626
|
return util.asPromise(load, self, filename, options);
|
|
4627
|
+
}
|
|
4249
4628
|
|
|
4250
4629
|
var sync = callback === SYNC; // undocumented
|
|
4251
4630
|
|
|
4252
4631
|
// Finishes loading by calling the callback (exactly once)
|
|
4253
4632
|
function finish(err, root) {
|
|
4633
|
+
if (root) {
|
|
4634
|
+
root.resolveAll();
|
|
4635
|
+
}
|
|
4254
4636
|
/* istanbul ignore if */
|
|
4255
|
-
if (!callback)
|
|
4637
|
+
if (!callback) {
|
|
4256
4638
|
return;
|
|
4257
|
-
|
|
4639
|
+
}
|
|
4640
|
+
if (sync) {
|
|
4258
4641
|
throw err;
|
|
4642
|
+
}
|
|
4259
4643
|
var cb = callback;
|
|
4260
4644
|
callback = null;
|
|
4261
4645
|
cb(err, root);
|
|
@@ -4295,8 +4679,9 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
4295
4679
|
} catch (err) {
|
|
4296
4680
|
finish(err);
|
|
4297
4681
|
}
|
|
4298
|
-
if (!sync && !queued)
|
|
4682
|
+
if (!sync && !queued) {
|
|
4299
4683
|
finish(null, self); // only once anyway
|
|
4684
|
+
}
|
|
4300
4685
|
}
|
|
4301
4686
|
|
|
4302
4687
|
// Fetches a single file
|
|
@@ -4304,15 +4689,16 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
4304
4689
|
filename = getBundledFileName(filename) || filename;
|
|
4305
4690
|
|
|
4306
4691
|
// Skip if already loaded / attempted
|
|
4307
|
-
if (self.files.indexOf(filename) > -1)
|
|
4692
|
+
if (self.files.indexOf(filename) > -1) {
|
|
4308
4693
|
return;
|
|
4694
|
+
}
|
|
4309
4695
|
self.files.push(filename);
|
|
4310
4696
|
|
|
4311
4697
|
// Shortcut bundled definitions
|
|
4312
4698
|
if (filename in common) {
|
|
4313
|
-
if (sync)
|
|
4699
|
+
if (sync) {
|
|
4314
4700
|
process(filename, common[filename]);
|
|
4315
|
-
else {
|
|
4701
|
+
} else {
|
|
4316
4702
|
++queued;
|
|
4317
4703
|
setTimeout(function() {
|
|
4318
4704
|
--queued;
|
|
@@ -4338,8 +4724,9 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
4338
4724
|
self.fetch(filename, function(err, source) {
|
|
4339
4725
|
--queued;
|
|
4340
4726
|
/* istanbul ignore if */
|
|
4341
|
-
if (!callback)
|
|
4727
|
+
if (!callback) {
|
|
4342
4728
|
return; // terminated meanwhile
|
|
4729
|
+
}
|
|
4343
4730
|
if (err) {
|
|
4344
4731
|
/* istanbul ignore else */
|
|
4345
4732
|
if (!weak)
|
|
@@ -4356,17 +4743,21 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
4356
4743
|
|
|
4357
4744
|
// Assembling the root namespace doesn't require working type
|
|
4358
4745
|
// references anymore, so we can load everything in parallel
|
|
4359
|
-
if (util.isString(filename))
|
|
4746
|
+
if (util.isString(filename)) {
|
|
4360
4747
|
filename = [ filename ];
|
|
4748
|
+
}
|
|
4361
4749
|
for (var i = 0, resolved; i < filename.length; ++i)
|
|
4362
4750
|
if (resolved = self.resolvePath("", filename[i]))
|
|
4363
4751
|
fetch(resolved);
|
|
4364
|
-
|
|
4365
|
-
|
|
4752
|
+
if (sync) {
|
|
4753
|
+
self.resolveAll();
|
|
4366
4754
|
return self;
|
|
4367
|
-
|
|
4755
|
+
}
|
|
4756
|
+
if (!queued) {
|
|
4368
4757
|
finish(null, self);
|
|
4369
|
-
|
|
4758
|
+
}
|
|
4759
|
+
|
|
4760
|
+
return self;
|
|
4370
4761
|
};
|
|
4371
4762
|
// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined
|
|
4372
4763
|
|
|
@@ -4408,10 +4799,13 @@ Root.prototype.loadSync = function loadSync(filename, options) {
|
|
|
4408
4799
|
* @override
|
|
4409
4800
|
*/
|
|
4410
4801
|
Root.prototype.resolveAll = function resolveAll() {
|
|
4802
|
+
if (!this._needsRecursiveResolve) return this;
|
|
4803
|
+
|
|
4411
4804
|
if (this.deferred.length)
|
|
4412
4805
|
throw Error("unresolvable extensions: " + this.deferred.map(function(field) {
|
|
4413
4806
|
return "'extend " + field.extend + "' in " + field.parent.fullName;
|
|
4414
4807
|
}).join(", "));
|
|
4808
|
+
this._resolveFeaturesRecursive(this._edition);
|
|
4415
4809
|
return Namespace.prototype.resolveAll.call(this);
|
|
4416
4810
|
};
|
|
4417
4811
|
|
|
@@ -4474,6 +4868,11 @@ Root.prototype._handleAdd = function _handleAdd(object) {
|
|
|
4474
4868
|
object.parent[object.name] = object; // expose namespace as property of its parent
|
|
4475
4869
|
}
|
|
4476
4870
|
|
|
4871
|
+
if (object instanceof Type || object instanceof Enum || object instanceof Field) {
|
|
4872
|
+
// Only store types and enums for quick lookup during resolve.
|
|
4873
|
+
this._fullyQualifiedObjects[object.fullName] = object;
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4477
4876
|
// The above also adds uppercased (and thus conflict-free) nested types, services and enums as
|
|
4478
4877
|
// properties of namespaces just like static code does. This allows using a .d.ts generated for
|
|
4479
4878
|
// a static module with reflection-based solutions where the condition is met.
|
|
@@ -4514,6 +4913,8 @@ Root.prototype._handleRemove = function _handleRemove(object) {
|
|
|
4514
4913
|
delete object.parent[object.name]; // unexpose namespaces
|
|
4515
4914
|
|
|
4516
4915
|
}
|
|
4916
|
+
|
|
4917
|
+
delete this._fullyQualifiedObjects[object.fullName];
|
|
4517
4918
|
};
|
|
4518
4919
|
|
|
4519
4920
|
// Sets up cyclic dependencies (called in index-light)
|
|
@@ -4785,7 +5186,10 @@ Service.fromJSON = function fromJSON(name, json) {
|
|
|
4785
5186
|
service.add(Method.fromJSON(names[i], json.methods[names[i]]));
|
|
4786
5187
|
if (json.nested)
|
|
4787
5188
|
service.addJSON(json.nested);
|
|
5189
|
+
if (json.edition)
|
|
5190
|
+
service._edition = json.edition;
|
|
4788
5191
|
service.comment = json.comment;
|
|
5192
|
+
service._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
4789
5193
|
return service;
|
|
4790
5194
|
};
|
|
4791
5195
|
|
|
@@ -4798,6 +5202,7 @@ Service.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
|
4798
5202
|
var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);
|
|
4799
5203
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
4800
5204
|
return util.toObject([
|
|
5205
|
+
"edition" , this._editionToJSON(),
|
|
4801
5206
|
"options" , inherited && inherited.options || undefined,
|
|
4802
5207
|
"methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},
|
|
4803
5208
|
"nested" , inherited && inherited.nested || undefined,
|
|
@@ -4834,10 +5239,28 @@ Service.prototype.get = function get(name) {
|
|
|
4834
5239
|
* @override
|
|
4835
5240
|
*/
|
|
4836
5241
|
Service.prototype.resolveAll = function resolveAll() {
|
|
5242
|
+
if (!this._needsRecursiveResolve) return this;
|
|
5243
|
+
|
|
5244
|
+
Namespace.prototype.resolve.call(this);
|
|
4837
5245
|
var methods = this.methodsArray;
|
|
4838
5246
|
for (var i = 0; i < methods.length; ++i)
|
|
4839
5247
|
methods[i].resolve();
|
|
4840
|
-
return
|
|
5248
|
+
return this;
|
|
5249
|
+
};
|
|
5250
|
+
|
|
5251
|
+
/**
|
|
5252
|
+
* @override
|
|
5253
|
+
*/
|
|
5254
|
+
Service.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
5255
|
+
if (!this._needsRecursiveFeatureResolution) return this;
|
|
5256
|
+
|
|
5257
|
+
edition = this._edition || edition;
|
|
5258
|
+
|
|
5259
|
+
Namespace.prototype._resolveFeaturesRecursive.call(this, edition);
|
|
5260
|
+
this.methodsArray.forEach(method => {
|
|
5261
|
+
method._resolveFeaturesRecursive(edition);
|
|
5262
|
+
});
|
|
5263
|
+
return this;
|
|
4841
5264
|
};
|
|
4842
5265
|
|
|
4843
5266
|
/**
|
|
@@ -5169,6 +5592,9 @@ Type.fromJSON = function fromJSON(name, json) {
|
|
|
5169
5592
|
type.group = true;
|
|
5170
5593
|
if (json.comment)
|
|
5171
5594
|
type.comment = json.comment;
|
|
5595
|
+
if (json.edition)
|
|
5596
|
+
type._edition = json.edition;
|
|
5597
|
+
type._defaultEdition = "proto3"; // For backwards-compatibility.
|
|
5172
5598
|
return type;
|
|
5173
5599
|
};
|
|
5174
5600
|
|
|
@@ -5181,6 +5607,7 @@ Type.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
|
5181
5607
|
var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);
|
|
5182
5608
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
5183
5609
|
return util.toObject([
|
|
5610
|
+
"edition" , this._editionToJSON(),
|
|
5184
5611
|
"options" , inherited && inherited.options || undefined,
|
|
5185
5612
|
"oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),
|
|
5186
5613
|
"fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},
|
|
@@ -5196,13 +5623,34 @@ Type.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
|
5196
5623
|
* @override
|
|
5197
5624
|
*/
|
|
5198
5625
|
Type.prototype.resolveAll = function resolveAll() {
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5626
|
+
if (!this._needsRecursiveResolve) return this;
|
|
5627
|
+
|
|
5628
|
+
Namespace.prototype.resolveAll.call(this);
|
|
5202
5629
|
var oneofs = this.oneofsArray; i = 0;
|
|
5203
5630
|
while (i < oneofs.length)
|
|
5204
5631
|
oneofs[i++].resolve();
|
|
5205
|
-
|
|
5632
|
+
var fields = this.fieldsArray, i = 0;
|
|
5633
|
+
while (i < fields.length)
|
|
5634
|
+
fields[i++].resolve();
|
|
5635
|
+
return this;
|
|
5636
|
+
};
|
|
5637
|
+
|
|
5638
|
+
/**
|
|
5639
|
+
* @override
|
|
5640
|
+
*/
|
|
5641
|
+
Type.prototype._resolveFeaturesRecursive = function _resolveFeaturesRecursive(edition) {
|
|
5642
|
+
if (!this._needsRecursiveFeatureResolution) return this;
|
|
5643
|
+
|
|
5644
|
+
edition = this._edition || edition;
|
|
5645
|
+
|
|
5646
|
+
Namespace.prototype._resolveFeaturesRecursive.call(this, edition);
|
|
5647
|
+
this.oneofsArray.forEach(oneof => {
|
|
5648
|
+
oneof._resolveFeatures(edition);
|
|
5649
|
+
});
|
|
5650
|
+
this.fieldsArray.forEach(field => {
|
|
5651
|
+
field._resolveFeatures(edition);
|
|
5652
|
+
});
|
|
5653
|
+
return this;
|
|
5206
5654
|
};
|
|
5207
5655
|
|
|
5208
5656
|
/**
|
|
@@ -5857,9 +6305,10 @@ util.decorateEnum = function decorateEnum(object) {
|
|
|
5857
6305
|
* @param {Object.<string,*>} dst Destination object
|
|
5858
6306
|
* @param {string} path dot '.' delimited path of the property to set
|
|
5859
6307
|
* @param {Object} value the value to set
|
|
6308
|
+
* @param {boolean|undefined} [ifNotSet] Sets the option only if it isn't currently set
|
|
5860
6309
|
* @returns {Object.<string,*>} Destination object
|
|
5861
6310
|
*/
|
|
5862
|
-
util.setProperty = function setProperty(dst, path, value) {
|
|
6311
|
+
util.setProperty = function setProperty(dst, path, value, ifNotSet) {
|
|
5863
6312
|
function setProp(dst, path, value) {
|
|
5864
6313
|
var part = path.shift();
|
|
5865
6314
|
if (part === "__proto__" || part === "prototype") {
|
|
@@ -5869,6 +6318,8 @@ util.setProperty = function setProperty(dst, path, value) {
|
|
|
5869
6318
|
dst[part] = setProp(dst[part] || {}, path, value);
|
|
5870
6319
|
} else {
|
|
5871
6320
|
var prevValue = dst[part];
|
|
6321
|
+
if (prevValue && ifNotSet)
|
|
6322
|
+
return dst;
|
|
5872
6323
|
if (prevValue)
|
|
5873
6324
|
value = [].concat(prevValue).concat(value);
|
|
5874
6325
|
dst[part] = value;
|