node-red-contrib-tak-registration 0.11.6 → 0.12.1
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/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +88 -44
- package/node_modules/@types/node/async_hooks.d.ts +17 -15
- package/node_modules/@types/node/buffer.d.ts +29 -110
- package/node_modules/@types/node/child_process.d.ts +38 -34
- package/node_modules/@types/node/cluster.d.ts +165 -19
- package/node_modules/@types/node/console.d.ts +64 -27
- package/node_modules/@types/node/crypto.d.ts +106 -142
- package/node_modules/@types/node/dgram.d.ts +14 -14
- package/node_modules/@types/node/diagnostics_channel.d.ts +12 -3
- package/node_modules/@types/node/dns/promises.d.ts +79 -28
- package/node_modules/@types/node/dns.d.ts +124 -69
- package/node_modules/@types/node/dom-events.d.ts +2 -0
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +115 -63
- package/node_modules/@types/node/fs/promises.d.ts +34 -12
- package/node_modules/@types/node/fs.d.ts +104 -40
- package/node_modules/@types/node/globals.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +69 -48
- package/node_modules/@types/node/http2.d.ts +83 -47
- package/node_modules/@types/node/https.d.ts +3 -3
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +5 -6
- package/node_modules/@types/node/module.d.ts +0 -14
- package/node_modules/@types/node/net.d.ts +58 -13
- package/node_modules/@types/node/os.d.ts +29 -12
- package/node_modules/@types/node/package.json +4 -16
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +308 -48
- package/node_modules/@types/node/process.d.ts +241 -48
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +18 -6
- package/node_modules/@types/node/readline/promises.d.ts +9 -9
- package/node_modules/@types/node/readline.d.ts +23 -22
- package/node_modules/@types/node/repl.d.ts +21 -21
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/stream/web.d.ts +3 -2
- package/node_modules/@types/node/stream.d.ts +63 -57
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +363 -98
- package/node_modules/@types/node/timers/promises.d.ts +10 -6
- package/node_modules/@types/node/timers.d.ts +5 -5
- package/node_modules/@types/node/tls.d.ts +39 -32
- package/node_modules/@types/node/trace_events.d.ts +40 -25
- package/node_modules/@types/node/tty.d.ts +8 -8
- package/node_modules/@types/node/url.d.ts +15 -7
- package/node_modules/@types/node/util.d.ts +131 -22
- package/node_modules/@types/node/v8.d.ts +51 -7
- package/node_modules/@types/node/vm.d.ts +43 -24
- package/node_modules/@types/node/wasi.d.ts +12 -10
- package/node_modules/@types/node/worker_threads.d.ts +19 -16
- package/node_modules/@types/node/zlib.d.ts +16 -3
- package/node_modules/adm-zip/README.md +2 -1
- package/node_modules/adm-zip/adm-zip.js +46 -45
- package/node_modules/adm-zip/headers/entryHeader.js +14 -12
- package/node_modules/adm-zip/headers/mainHeader.js +1 -1
- package/node_modules/adm-zip/methods/inflater.js +6 -3
- package/node_modules/adm-zip/methods/zipcrypto.js +6 -2
- package/node_modules/adm-zip/package.json +2 -2
- package/node_modules/adm-zip/util/errors.js +1 -0
- package/node_modules/adm-zip/zipEntry.js +64 -43
- package/node_modules/adm-zip/zipFile.js +35 -35
- package/node_modules/axios/CHANGELOG.md +868 -759
- package/node_modules/axios/README.md +65 -17
- package/node_modules/axios/dist/axios.js +1330 -583
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +696 -316
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +696 -316
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +607 -257
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/adapters.js +3 -1
- package/node_modules/axios/lib/adapters/fetch.js +227 -0
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/adapters/xhr.js +31 -101
- package/node_modules/axios/lib/core/Axios.js +17 -11
- package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
- package/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +7 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
- package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
- package/node_modules/axios/lib/helpers/throttle.js +5 -3
- package/node_modules/axios/lib/helpers/trackStream.js +55 -0
- package/node_modules/axios/lib/platform/common/utils.js +4 -1
- package/node_modules/axios/lib/utils.js +7 -2
- package/node_modules/axios/package.json +27 -26
- package/node_modules/fast-xml-parser/CHANGELOG.md +14 -0
- package/node_modules/fast-xml-parser/README.md +7 -14
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +4 -4
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +96 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +31 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/validator.js +2 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +13 -4
- package/node_modules/follow-redirects/index.js +1 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/hasown/CHANGELOG.md +12 -0
- package/node_modules/hasown/index.d.ts +2 -2
- package/node_modules/hasown/package.json +5 -2
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/protobufjs/LICENSE +39 -39
- package/node_modules/protobufjs/README.md +727 -740
- package/node_modules/protobufjs/dist/light/protobuf.js +6264 -6264
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +1928 -1928
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +7978 -7961
- 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/debug/README.md +4 -4
- package/node_modules/protobufjs/ext/debug/index.js +71 -71
- package/node_modules/protobufjs/ext/descriptor/README.md +72 -72
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -191
- package/node_modules/protobufjs/ext/descriptor/index.js +1052 -1052
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -54
- package/node_modules/protobufjs/google/LICENSE +27 -27
- package/node_modules/protobufjs/google/README.md +1 -1
- package/node_modules/protobufjs/google/api/annotations.json +82 -82
- package/node_modules/protobufjs/google/api/annotations.proto +10 -10
- package/node_modules/protobufjs/google/api/http.json +85 -85
- package/node_modules/protobufjs/google/api/http.proto +30 -30
- package/node_modules/protobufjs/google/protobuf/api.json +117 -117
- package/node_modules/protobufjs/google/protobuf/api.proto +33 -33
- package/node_modules/protobufjs/google/protobuf/descriptor.json +738 -738
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -286
- package/node_modules/protobufjs/google/protobuf/source_context.json +19 -19
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -7
- package/node_modules/protobufjs/google/protobuf/type.json +201 -201
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -89
- package/node_modules/protobufjs/index.d.ts +2741 -2741
- package/node_modules/protobufjs/index.js +4 -4
- package/node_modules/protobufjs/light.d.ts +2 -2
- package/node_modules/protobufjs/light.js +3 -3
- package/node_modules/protobufjs/minimal.d.ts +2 -2
- package/node_modules/protobufjs/minimal.js +4 -4
- package/node_modules/protobufjs/package.json +111 -111
- package/node_modules/protobufjs/scripts/postinstall.js +32 -32
- package/node_modules/protobufjs/src/common.js +399 -399
- package/node_modules/protobufjs/src/converter.js +301 -301
- package/node_modules/protobufjs/src/decoder.js +129 -129
- package/node_modules/protobufjs/src/encoder.js +100 -100
- package/node_modules/protobufjs/src/enum.js +198 -198
- package/node_modules/protobufjs/src/field.js +377 -377
- package/node_modules/protobufjs/src/index-light.js +104 -104
- package/node_modules/protobufjs/src/index-minimal.js +36 -36
- package/node_modules/protobufjs/src/index.js +12 -12
- package/node_modules/protobufjs/src/mapfield.js +126 -126
- package/node_modules/protobufjs/src/message.js +138 -138
- package/node_modules/protobufjs/src/method.js +160 -160
- package/node_modules/protobufjs/src/namespace.js +433 -433
- package/node_modules/protobufjs/src/object.js +243 -243
- package/node_modules/protobufjs/src/oneof.js +203 -203
- package/node_modules/protobufjs/src/parse.js +889 -872
- package/node_modules/protobufjs/src/reader.js +416 -416
- package/node_modules/protobufjs/src/reader_buffer.js +51 -51
- package/node_modules/protobufjs/src/root.js +368 -368
- package/node_modules/protobufjs/src/roots.js +18 -18
- package/node_modules/protobufjs/src/rpc/service.js +142 -142
- package/node_modules/protobufjs/src/rpc.js +36 -36
- package/node_modules/protobufjs/src/service.js +167 -167
- package/node_modules/protobufjs/src/tokenize.js +416 -416
- package/node_modules/protobufjs/src/type.js +589 -589
- package/node_modules/protobufjs/src/types.js +196 -196
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -15
- package/node_modules/protobufjs/src/util/longbits.js +200 -200
- package/node_modules/protobufjs/src/util/minimal.js +438 -438
- package/node_modules/protobufjs/src/util.js +212 -212
- package/node_modules/protobufjs/src/verifier.js +176 -176
- package/node_modules/protobufjs/src/wrappers.js +102 -102
- package/node_modules/protobufjs/src/writer.js +465 -465
- package/node_modules/protobufjs/src/writer_buffer.js +85 -85
- package/node_modules/protobufjs/tsconfig.json +7 -7
- package/node_modules/set-function-length/CHANGELOG.md +11 -0
- package/node_modules/set-function-length/env.d.ts +9 -6
- package/node_modules/set-function-length/env.js +1 -0
- package/node_modules/set-function-length/index.d.ts +6 -6
- package/node_modules/set-function-length/index.js +1 -3
- package/node_modules/set-function-length/package.json +11 -13
- package/node_modules/set-function-length/tsconfig.json +7 -57
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/balanced-pool.d.ts +11 -0
- package/node_modules/undici-types/client.d.ts +12 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +1 -2
- package/node_modules/undici-types/dispatcher.d.ts +17 -3
- package/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/undici-types/fetch.d.ts +22 -23
- package/node_modules/undici-types/handlers.d.ts +10 -4
- package/node_modules/undici-types/index.d.ts +6 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +11 -0
- package/node_modules/undici-types/proxy-agent.d.ts +0 -2
- package/node_modules/undici-types/readable.d.ts +2 -3
- package/node_modules/undici-types/retry-agent.d.ts +11 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +31 -0
- package/node_modules/undici-types/webidl.d.ts +6 -1
- package/node_modules/undici-types/websocket.d.ts +22 -1
- package/node_modules/uuid/CHANGELOG.md +18 -0
- package/node_modules/uuid/README.md +134 -16
- package/node_modules/uuid/dist/commonjs-browser/index.js +40 -15
- package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +30 -53
- package/node_modules/uuid/dist/commonjs-browser/native.js +3 -4
- package/node_modules/uuid/dist/commonjs-browser/nil.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/parse.js +14 -15
- package/node_modules/uuid/dist/commonjs-browser/regex.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/rng.js +2 -4
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +27 -49
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +10 -16
- package/node_modules/uuid/dist/commonjs-browser/v1.js +73 -49
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v35.js +15 -32
- package/node_modules/uuid/dist/commonjs-browser/v4.js +7 -18
- package/node_modules/uuid/dist/commonjs-browser/v5.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +2 -7
- package/node_modules/uuid/dist/commonjs-browser/version.js +2 -8
- package/node_modules/uuid/dist/esm-browser/index.js +9 -4
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +29 -50
- package/node_modules/uuid/dist/esm-browser/native.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +12 -10
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +3 -4
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -46
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -11
- package/node_modules/uuid/dist/esm-browser/v1.js +74 -44
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +14 -25
- package/node_modules/uuid/dist/esm-browser/v4.js +5 -9
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -2
- package/node_modules/uuid/dist/esm-browser/version.js +0 -3
- package/node_modules/uuid/dist/esm-node/index.js +9 -4
- package/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/node_modules/uuid/dist/esm-node/md5.js +1 -4
- package/node_modules/uuid/dist/esm-node/native.js +1 -1
- package/node_modules/uuid/dist/esm-node/parse.js +11 -9
- package/node_modules/uuid/dist/esm-node/regex.js +1 -1
- package/node_modules/uuid/dist/esm-node/rng.js +1 -3
- package/node_modules/uuid/dist/esm-node/sha1.js +1 -4
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -9
- package/node_modules/uuid/dist/esm-node/v1.js +66 -36
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-node/v35.js +8 -19
- package/node_modules/uuid/dist/esm-node/v4.js +4 -8
- package/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/node_modules/uuid/dist/esm-node/validate.js +0 -2
- package/node_modules/uuid/dist/esm-node/version.js +0 -3
- package/node_modules/uuid/dist/index.js +40 -15
- package/node_modules/uuid/dist/max.js +7 -0
- package/node_modules/uuid/dist/md5-browser.js +8 -31
- package/node_modules/uuid/dist/md5.js +4 -10
- package/node_modules/uuid/dist/native-browser.js +2 -3
- package/node_modules/uuid/dist/native.js +5 -9
- package/node_modules/uuid/dist/nil.js +1 -2
- package/node_modules/uuid/dist/parse.js +13 -14
- package/node_modules/uuid/dist/regex.js +1 -2
- package/node_modules/uuid/dist/rng-browser.js +1 -3
- package/node_modules/uuid/dist/rng.js +3 -10
- package/node_modules/uuid/dist/sha1-browser.js +1 -23
- package/node_modules/uuid/dist/sha1.js +4 -10
- package/node_modules/uuid/dist/stringify.js +8 -14
- package/node_modules/uuid/dist/uuid-bin.js +12 -22
- package/node_modules/uuid/dist/v1.js +66 -42
- package/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/v3.js +2 -7
- package/node_modules/uuid/dist/v35.js +11 -28
- package/node_modules/uuid/dist/v4.js +6 -17
- package/node_modules/uuid/dist/v5.js +2 -7
- package/node_modules/uuid/dist/v6.js +38 -0
- package/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/v7.js +152 -0
- package/node_modules/uuid/dist/validate.js +2 -7
- package/node_modules/uuid/dist/version.js +2 -8
- package/node_modules/uuid/package.json +41 -34
- package/node_modules/uuid/wrapper.mjs +5 -0
- package/package.json +6 -6
- package/tak-ingest.js +1 -1
- package/tak-registration.js +8 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -954
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -944
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/set-function-length/env.d.ts.map +0 -1
- package/node_modules/set-function-length/index.d.ts.map +0 -1
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = BufferWriter;
|
|
3
|
-
|
|
4
|
-
// extends Writer
|
|
5
|
-
var Writer = require("./writer");
|
|
6
|
-
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
|
7
|
-
|
|
8
|
-
var util = require("./util/minimal");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new buffer writer instance.
|
|
12
|
-
* @classdesc Wire format writer using node buffers.
|
|
13
|
-
* @extends Writer
|
|
14
|
-
* @constructor
|
|
15
|
-
*/
|
|
16
|
-
function BufferWriter() {
|
|
17
|
-
Writer.call(this);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
BufferWriter._configure = function () {
|
|
21
|
-
/**
|
|
22
|
-
* Allocates a buffer of the specified size.
|
|
23
|
-
* @function
|
|
24
|
-
* @param {number} size Buffer size
|
|
25
|
-
* @returns {Buffer} Buffer
|
|
26
|
-
*/
|
|
27
|
-
BufferWriter.alloc = util._Buffer_allocUnsafe;
|
|
28
|
-
|
|
29
|
-
BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set"
|
|
30
|
-
? function writeBytesBuffer_set(val, buf, pos) {
|
|
31
|
-
buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
|
|
32
|
-
// also works for plain array values
|
|
33
|
-
}
|
|
34
|
-
/* istanbul ignore next */
|
|
35
|
-
: function writeBytesBuffer_copy(val, buf, pos) {
|
|
36
|
-
if (val.copy) // Buffer values
|
|
37
|
-
val.copy(buf, pos, 0, val.length);
|
|
38
|
-
else for (var i = 0; i < val.length;) // plain array values
|
|
39
|
-
buf[pos++] = val[i++];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @override
|
|
46
|
-
*/
|
|
47
|
-
BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
|
|
48
|
-
if (util.isString(value))
|
|
49
|
-
value = util._Buffer_from(value, "base64");
|
|
50
|
-
var len = value.length >>> 0;
|
|
51
|
-
this.uint32(len);
|
|
52
|
-
if (len)
|
|
53
|
-
this._push(BufferWriter.writeBytesBuffer, len, value);
|
|
54
|
-
return this;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
function writeStringBuffer(val, buf, pos) {
|
|
58
|
-
if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
|
|
59
|
-
util.utf8.write(val, buf, pos);
|
|
60
|
-
else if (buf.utf8Write)
|
|
61
|
-
buf.utf8Write(val, pos);
|
|
62
|
-
else
|
|
63
|
-
buf.write(val, pos);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @override
|
|
68
|
-
*/
|
|
69
|
-
BufferWriter.prototype.string = function write_string_buffer(value) {
|
|
70
|
-
var len = util.Buffer.byteLength(value);
|
|
71
|
-
this.uint32(len);
|
|
72
|
-
if (len)
|
|
73
|
-
this._push(writeStringBuffer, len, value);
|
|
74
|
-
return this;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Finishes the write operation.
|
|
80
|
-
* @name BufferWriter#finish
|
|
81
|
-
* @function
|
|
82
|
-
* @returns {Buffer} Finished buffer
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
BufferWriter._configure();
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = BufferWriter;
|
|
3
|
+
|
|
4
|
+
// extends Writer
|
|
5
|
+
var Writer = require("./writer");
|
|
6
|
+
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
|
7
|
+
|
|
8
|
+
var util = require("./util/minimal");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Constructs a new buffer writer instance.
|
|
12
|
+
* @classdesc Wire format writer using node buffers.
|
|
13
|
+
* @extends Writer
|
|
14
|
+
* @constructor
|
|
15
|
+
*/
|
|
16
|
+
function BufferWriter() {
|
|
17
|
+
Writer.call(this);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
BufferWriter._configure = function () {
|
|
21
|
+
/**
|
|
22
|
+
* Allocates a buffer of the specified size.
|
|
23
|
+
* @function
|
|
24
|
+
* @param {number} size Buffer size
|
|
25
|
+
* @returns {Buffer} Buffer
|
|
26
|
+
*/
|
|
27
|
+
BufferWriter.alloc = util._Buffer_allocUnsafe;
|
|
28
|
+
|
|
29
|
+
BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set"
|
|
30
|
+
? function writeBytesBuffer_set(val, buf, pos) {
|
|
31
|
+
buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
|
|
32
|
+
// also works for plain array values
|
|
33
|
+
}
|
|
34
|
+
/* istanbul ignore next */
|
|
35
|
+
: function writeBytesBuffer_copy(val, buf, pos) {
|
|
36
|
+
if (val.copy) // Buffer values
|
|
37
|
+
val.copy(buf, pos, 0, val.length);
|
|
38
|
+
else for (var i = 0; i < val.length;) // plain array values
|
|
39
|
+
buf[pos++] = val[i++];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @override
|
|
46
|
+
*/
|
|
47
|
+
BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
|
|
48
|
+
if (util.isString(value))
|
|
49
|
+
value = util._Buffer_from(value, "base64");
|
|
50
|
+
var len = value.length >>> 0;
|
|
51
|
+
this.uint32(len);
|
|
52
|
+
if (len)
|
|
53
|
+
this._push(BufferWriter.writeBytesBuffer, len, value);
|
|
54
|
+
return this;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function writeStringBuffer(val, buf, pos) {
|
|
58
|
+
if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
|
|
59
|
+
util.utf8.write(val, buf, pos);
|
|
60
|
+
else if (buf.utf8Write)
|
|
61
|
+
buf.utf8Write(val, pos);
|
|
62
|
+
else
|
|
63
|
+
buf.write(val, pos);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @override
|
|
68
|
+
*/
|
|
69
|
+
BufferWriter.prototype.string = function write_string_buffer(value) {
|
|
70
|
+
var len = util.Buffer.byteLength(value);
|
|
71
|
+
this.uint32(len);
|
|
72
|
+
if (len)
|
|
73
|
+
this._push(writeStringBuffer, len, value);
|
|
74
|
+
return this;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Finishes the write operation.
|
|
80
|
+
* @name BufferWriter#finish
|
|
81
|
+
* @function
|
|
82
|
+
* @returns {Buffer} Finished buffer
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
BufferWriter._configure();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES5",
|
|
4
|
-
"experimentalDecorators": true,
|
|
5
|
-
"emitDecoratorMetadata": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES5",
|
|
4
|
+
"experimentalDecorators": true,
|
|
5
|
+
"emitDecoratorMetadata": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
}
|
|
8
8
|
}
|
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.2.2](https://github.com/ljharb/set-function-length/compare/v1.2.1...v1.2.2) - 2024-03-09
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [types] use shared config [`027032f`](https://github.com/ljharb/set-function-length/commit/027032fe9cc439644a07248ea6a8d813fcc767cb)
|
|
13
|
+
- [actions] remove redundant finisher; use reusable workflow [`1fd4fb1`](https://github.com/ljharb/set-function-length/commit/1fd4fb1c58bd5170f0dcff7e320077c0aa2ffdeb)
|
|
14
|
+
- [types] use a handwritten d.ts file instead of emit [`01b9761`](https://github.com/ljharb/set-function-length/commit/01b9761742c95e1118e8c2d153ce2ae43d9731aa)
|
|
15
|
+
- [Deps] update `define-data-property`, `get-intrinsic`, `has-property-descriptors` [`bee8eaf`](https://github.com/ljharb/set-function-length/commit/bee8eaf7749f325357ade85cffeaeef679e513d4)
|
|
16
|
+
- [Dev Deps] update `call-bind`, `tape` [`5dae579`](https://github.com/ljharb/set-function-length/commit/5dae579fdc3aab91b14ebb58f9c19ee3f509d434)
|
|
17
|
+
- [Tests] use `@arethetypeswrong/cli` [`7e22425`](https://github.com/ljharb/set-function-length/commit/7e22425d15957fd3d6da0b6bca4afc0c8d255d2d)
|
|
18
|
+
|
|
8
19
|
## [v1.2.1](https://github.com/ljharb/set-function-length/compare/v1.2.0...v1.2.1) - 2024-02-06
|
|
9
20
|
|
|
10
21
|
### Commits
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const env: {
|
|
2
|
+
__proto__: null,
|
|
3
|
+
boundFnsHaveConfigurableLengths: boolean;
|
|
4
|
+
boundFnsHaveWritableLengths: boolean;
|
|
5
|
+
functionsHaveConfigurableLengths: boolean;
|
|
6
|
+
functionsHaveWritableLengths: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export = env;
|
|
@@ -15,6 +15,7 @@ var boundFnsHaveConfigurableLengths = !!(bound && bound.configurable);
|
|
|
15
15
|
|
|
16
16
|
var boundFnsHaveWritableLengths = !!(bound && bound.writable);
|
|
17
17
|
|
|
18
|
+
/** @type {import('./env')} */
|
|
18
19
|
module.exports = {
|
|
19
20
|
__proto__: null,
|
|
20
21
|
boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare namespace
|
|
2
|
-
|
|
1
|
+
declare namespace setFunctionLength {
|
|
2
|
+
type Func = (...args: unknown[]) => unknown;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
declare function setFunctionLength<T extends setFunctionLength.Func = setFunctionLength.Func>(fn: T, length: number, loose?: boolean): T;
|
|
6
|
+
|
|
7
|
+
export = setFunctionLength;
|
|
@@ -8,9 +8,7 @@ var gOPD = require('gopd');
|
|
|
8
8
|
var $TypeError = require('es-errors/type');
|
|
9
9
|
var $floor = GetIntrinsic('%Math.floor%');
|
|
10
10
|
|
|
11
|
-
/** @
|
|
12
|
-
|
|
13
|
-
/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
|
|
11
|
+
/** @type {import('.')} */
|
|
14
12
|
module.exports = function setFunctionLength(fn, length) {
|
|
15
13
|
if (typeof fn !== 'function') {
|
|
16
14
|
throw new $TypeError('`fn` is not a function');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "set-function-length",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Set a function's length property",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
"test": "test"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"prepack": "npmignore --auto --commentLines=autogenerated
|
|
16
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
17
17
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
18
18
|
"prepublishOnly": "safe-publish-latest",
|
|
19
19
|
"tsc": "tsc -p .",
|
|
20
|
-
"
|
|
21
|
-
"emit": "npm run tsc -- --noEmit false --emitDeclarationOnly",
|
|
22
|
-
"postemit": "rm test/*.ts test/*.ts.map",
|
|
20
|
+
"posttsc": "attw -P",
|
|
23
21
|
"prelint": "evalmd README.md",
|
|
24
22
|
"lint": "eslint --ext=js,mjs .",
|
|
25
23
|
"postlint": "npm run tsc",
|
|
@@ -49,15 +47,17 @@
|
|
|
49
47
|
},
|
|
50
48
|
"homepage": "https://github.com/ljharb/set-function-length#readme",
|
|
51
49
|
"dependencies": {
|
|
52
|
-
"define-data-property": "^1.1.
|
|
50
|
+
"define-data-property": "^1.1.4",
|
|
53
51
|
"es-errors": "^1.3.0",
|
|
54
52
|
"function-bind": "^1.1.2",
|
|
55
|
-
"get-intrinsic": "^1.2.
|
|
53
|
+
"get-intrinsic": "^1.2.4",
|
|
56
54
|
"gopd": "^1.0.1",
|
|
57
|
-
"has-property-descriptors": "^1.0.
|
|
55
|
+
"has-property-descriptors": "^1.0.2"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
58
|
+
"@arethetypeswrong/cli": "^0.15.1",
|
|
60
59
|
"@ljharb/eslint-config": "^21.1.0",
|
|
60
|
+
"@ljharb/tsconfig": "^0.1.1",
|
|
61
61
|
"@types/call-bind": "^1.0.5",
|
|
62
62
|
"@types/define-properties": "^1.1.5",
|
|
63
63
|
"@types/es-value-fixtures": "^1.4.4",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@types/tape": "^5.6.4",
|
|
70
70
|
"aud": "^2.0.4",
|
|
71
71
|
"auto-changelog": "^2.4.0",
|
|
72
|
-
"call-bind": "^1.0.
|
|
72
|
+
"call-bind": "^1.0.7",
|
|
73
73
|
"es-value-fixtures": "^1.4.2",
|
|
74
74
|
"eslint": "=8.8.0",
|
|
75
75
|
"evalmd": "^0.0.19",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"nyc": "^10.3.2",
|
|
80
80
|
"object-inspect": "^1.13.1",
|
|
81
81
|
"safe-publish-latest": "^2.0.0",
|
|
82
|
-
"tape": "^5.7.
|
|
82
|
+
"tape": "^5.7.5",
|
|
83
83
|
"typescript": "next"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|
|
@@ -96,9 +96,7 @@
|
|
|
96
96
|
"publishConfig": {
|
|
97
97
|
"ignore": [
|
|
98
98
|
".github/workflows",
|
|
99
|
-
"test"
|
|
100
|
-
"!*.d.ts",
|
|
101
|
-
"!*.d.ts.map"
|
|
99
|
+
"test"
|
|
102
100
|
]
|
|
103
101
|
}
|
|
104
102
|
}
|
|
@@ -1,59 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
10
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
11
|
-
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
12
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
13
|
-
|
|
14
|
-
/* Modules */
|
|
15
|
-
"module": "commonjs", /* Specify what module code is generated. */
|
|
16
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
17
|
-
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
18
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
19
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
20
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
21
|
-
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
22
|
-
"resolveJsonModule": true, /* Enable importing .json files. */
|
|
23
|
-
|
|
24
|
-
/* JavaScript Support */
|
|
25
|
-
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
26
|
-
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
27
|
-
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
28
|
-
|
|
29
|
-
/* Emit */
|
|
30
|
-
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
31
|
-
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
32
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
33
|
-
"noEmit": true, /* Disable emitting files from a compilation. */
|
|
34
|
-
|
|
35
|
-
/* Interop Constraints */
|
|
36
|
-
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
37
|
-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
38
|
-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
39
|
-
|
|
40
|
-
/* Type Checking */
|
|
41
|
-
"strict": true, /* Enable all strict type-checking options. */
|
|
42
|
-
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
43
|
-
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
44
|
-
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
45
|
-
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
46
|
-
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
47
|
-
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
48
|
-
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
49
|
-
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
50
|
-
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
51
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
52
|
-
|
|
53
|
-
/* Completeness */
|
|
54
|
-
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
55
|
-
},
|
|
56
|
-
"exclude": [
|
|
57
|
-
"coverage"
|
|
58
|
-
]
|
|
2
|
+
"extends": "@ljharb/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "es2021",
|
|
5
|
+
},
|
|
6
|
+
"exclude": [
|
|
7
|
+
"coverage",
|
|
8
|
+
],
|
|
59
9
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Matteo Collina and Undici contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -4,6 +4,8 @@ import { URL } from 'url'
|
|
|
4
4
|
|
|
5
5
|
export default BalancedPool
|
|
6
6
|
|
|
7
|
+
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
|
8
|
+
|
|
7
9
|
declare class BalancedPool extends Dispatcher {
|
|
8
10
|
constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
|
|
9
11
|
|
|
@@ -15,4 +17,13 @@ declare class BalancedPool extends Dispatcher {
|
|
|
15
17
|
closed: boolean;
|
|
16
18
|
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
17
19
|
destroyed: boolean;
|
|
20
|
+
|
|
21
|
+
// Override dispatcher APIs.
|
|
22
|
+
override connect(
|
|
23
|
+
options: BalancedPoolConnectOptions
|
|
24
|
+
): Promise<Dispatcher.ConnectData>;
|
|
25
|
+
override connect(
|
|
26
|
+
options: BalancedPoolConnectOptions,
|
|
27
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
28
|
+
): void;
|
|
18
29
|
}
|
|
@@ -3,6 +3,8 @@ import { TlsOptions } from 'tls'
|
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
4
|
import buildConnector from "./connector";
|
|
5
5
|
|
|
6
|
+
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
8
10
|
*/
|
|
@@ -14,6 +16,15 @@ export class Client extends Dispatcher {
|
|
|
14
16
|
closed: boolean;
|
|
15
17
|
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
16
18
|
destroyed: boolean;
|
|
19
|
+
|
|
20
|
+
// Override dispatcher APIs.
|
|
21
|
+
override connect(
|
|
22
|
+
options: ClientConnectOptions
|
|
23
|
+
): Promise<Dispatcher.ConnectData>;
|
|
24
|
+
override connect(
|
|
25
|
+
options: ClientConnectOptions,
|
|
26
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
27
|
+
): void;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
export declare namespace Client {
|
|
@@ -77,7 +88,7 @@ export declare namespace Client {
|
|
|
77
88
|
*/
|
|
78
89
|
allowH2?: boolean;
|
|
79
90
|
/**
|
|
80
|
-
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be
|
|
91
|
+
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
81
92
|
* @default 100
|
|
82
93
|
*/
|
|
83
94
|
maxConcurrentStreams?: number
|
|
@@ -18,6 +18,9 @@ declare class Dispatcher extends EventEmitter {
|
|
|
18
18
|
/** Starts two-way communications with the requested resource. */
|
|
19
19
|
connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>;
|
|
20
20
|
connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
21
|
+
/** Compose a chain of dispatchers */
|
|
22
|
+
compose(dispatchers: Dispatcher.DispatcherInterceptor[]): Dispatcher.ComposedDispatcher;
|
|
23
|
+
compose(...dispatchers: Dispatcher.DispatcherInterceptor[]): Dispatcher.ComposedDispatcher;
|
|
21
24
|
/** Performs an HTTP request. */
|
|
22
25
|
request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>;
|
|
23
26
|
request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void;
|
|
@@ -93,6 +96,8 @@ declare class Dispatcher extends EventEmitter {
|
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
declare namespace Dispatcher {
|
|
99
|
+
export interface ComposedDispatcher extends Dispatcher {}
|
|
100
|
+
export type DispatcherInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
|
|
96
101
|
export interface DispatchOptions {
|
|
97
102
|
origin?: string | URL;
|
|
98
103
|
path: string;
|
|
@@ -100,7 +105,7 @@ declare namespace Dispatcher {
|
|
|
100
105
|
/** Default: `null` */
|
|
101
106
|
body?: string | Buffer | Uint8Array | Readable | null | FormData;
|
|
102
107
|
/** Default: `null` */
|
|
103
|
-
headers?: IncomingHttpHeaders | string[] | null;
|
|
108
|
+
headers?: IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
|
|
104
109
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
105
110
|
query?: Record<string, any>;
|
|
106
111
|
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
|
|
@@ -121,6 +126,7 @@ declare namespace Dispatcher {
|
|
|
121
126
|
expectContinue?: boolean;
|
|
122
127
|
}
|
|
123
128
|
export interface ConnectOptions {
|
|
129
|
+
origin: string | URL;
|
|
124
130
|
path: string;
|
|
125
131
|
/** Default: `null` */
|
|
126
132
|
headers?: IncomingHttpHeaders | string[] | null;
|
|
@@ -130,6 +136,8 @@ declare namespace Dispatcher {
|
|
|
130
136
|
opaque?: unknown;
|
|
131
137
|
/** Default: 0 */
|
|
132
138
|
maxRedirections?: number;
|
|
139
|
+
/** Default: false */
|
|
140
|
+
redirectionLimitReached?: boolean;
|
|
133
141
|
/** Default: `null` */
|
|
134
142
|
responseHeader?: 'raw' | null;
|
|
135
143
|
}
|
|
@@ -140,6 +148,8 @@ declare namespace Dispatcher {
|
|
|
140
148
|
signal?: AbortSignal | EventEmitter | null;
|
|
141
149
|
/** Default: 0 */
|
|
142
150
|
maxRedirections?: number;
|
|
151
|
+
/** Default: false */
|
|
152
|
+
redirectionLimitReached?: boolean;
|
|
143
153
|
/** Default: `null` */
|
|
144
154
|
onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
|
|
145
155
|
/** Default: `null` */
|
|
@@ -163,6 +173,8 @@ declare namespace Dispatcher {
|
|
|
163
173
|
signal?: AbortSignal | EventEmitter | null;
|
|
164
174
|
/** Default: 0 */
|
|
165
175
|
maxRedirections?: number;
|
|
176
|
+
/** Default: false */
|
|
177
|
+
redirectionLimitReached?: boolean;
|
|
166
178
|
/** Default: `null` */
|
|
167
179
|
responseHeader?: 'raw' | null;
|
|
168
180
|
}
|
|
@@ -210,8 +222,10 @@ declare namespace Dispatcher {
|
|
|
210
222
|
onError?(err: Error): void;
|
|
211
223
|
/** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
|
|
212
224
|
onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
|
|
225
|
+
/** Invoked when response is received, before headers have been read. **/
|
|
226
|
+
onResponseStarted?(): void;
|
|
213
227
|
/** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
|
|
214
|
-
onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void): boolean;
|
|
228
|
+
onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void, statusText: string): boolean;
|
|
215
229
|
/** Invoked when response payload data is received. */
|
|
216
230
|
onData?(chunk: Buffer): boolean;
|
|
217
231
|
/** Invoked when response payload and trailers have been received and the request has completed. */
|
|
@@ -226,7 +240,7 @@ declare namespace Dispatcher {
|
|
|
226
240
|
* @link https://fetch.spec.whatwg.org/#body-mixin
|
|
227
241
|
*/
|
|
228
242
|
interface BodyMixin {
|
|
229
|
-
readonly body?: never;
|
|
243
|
+
readonly body?: never;
|
|
230
244
|
readonly bodyUsed: boolean;
|
|
231
245
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
232
246
|
blob(): Promise<Blob>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { MessageEvent, ErrorEvent } from './websocket'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
EventTarget,
|
|
5
|
+
Event,
|
|
6
|
+
EventListenerOptions,
|
|
7
|
+
AddEventListenerOptions,
|
|
8
|
+
EventListenerOrEventListenerObject
|
|
9
|
+
} from './patch'
|
|
10
|
+
|
|
11
|
+
interface EventSourceEventMap {
|
|
12
|
+
error: ErrorEvent
|
|
13
|
+
message: MessageEvent
|
|
14
|
+
open: Event
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface EventSource extends EventTarget {
|
|
18
|
+
close(): void
|
|
19
|
+
readonly CLOSED: 2
|
|
20
|
+
readonly CONNECTING: 0
|
|
21
|
+
readonly OPEN: 1
|
|
22
|
+
onerror: (this: EventSource, ev: ErrorEvent) => any
|
|
23
|
+
onmessage: (this: EventSource, ev: MessageEvent) => any
|
|
24
|
+
onopen: (this: EventSource, ev: Event) => any
|
|
25
|
+
readonly readyState: 0 | 1 | 2
|
|
26
|
+
readonly url: string
|
|
27
|
+
readonly withCredentials: boolean
|
|
28
|
+
|
|
29
|
+
addEventListener<K extends keyof EventSourceEventMap>(
|
|
30
|
+
type: K,
|
|
31
|
+
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
|
|
32
|
+
options?: boolean | AddEventListenerOptions
|
|
33
|
+
): void
|
|
34
|
+
addEventListener(
|
|
35
|
+
type: string,
|
|
36
|
+
listener: EventListenerOrEventListenerObject,
|
|
37
|
+
options?: boolean | AddEventListenerOptions
|
|
38
|
+
): void
|
|
39
|
+
removeEventListener<K extends keyof EventSourceEventMap>(
|
|
40
|
+
type: K,
|
|
41
|
+
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
|
|
42
|
+
options?: boolean | EventListenerOptions
|
|
43
|
+
): void
|
|
44
|
+
removeEventListener(
|
|
45
|
+
type: string,
|
|
46
|
+
listener: EventListenerOrEventListenerObject,
|
|
47
|
+
options?: boolean | EventListenerOptions
|
|
48
|
+
): void
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare const EventSource: {
|
|
52
|
+
prototype: EventSource
|
|
53
|
+
new (url: string | URL, init: EventSourceInit): EventSource
|
|
54
|
+
readonly CLOSED: 2
|
|
55
|
+
readonly CONNECTING: 0
|
|
56
|
+
readonly OPEN: 1
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface EventSourceInit {
|
|
60
|
+
withCredentials?: boolean
|
|
61
|
+
}
|