node-red-contrib-tak-registration 0.11.6 → 0.12.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/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 -29
- 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 +101 -65
- 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 +18 -12
- package/node_modules/@types/node/fs.d.ts +45 -39
- 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/net.d.ts +58 -13
- package/node_modules/@types/node/os.d.ts +29 -12
- package/node_modules/@types/node/package.json +3 -15
- 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 +21 -20
- package/node_modules/@types/node/repl.d.ts +10 -10
- 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 +62 -56
- package/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +350 -97
- 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 +50 -6
- package/node_modules/@types/node/vm.d.ts +43 -22
- 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/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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* // Prints:
|
|
15
15
|
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
16
|
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module "crypto" {
|
|
20
20
|
import * as stream from "node:stream";
|
|
@@ -27,7 +27,7 @@ declare module "crypto" {
|
|
|
27
27
|
* should not use this element anymore.
|
|
28
28
|
*
|
|
29
29
|
* The `node:crypto` module provides the `Certificate` class for working with SPKAC
|
|
30
|
-
* data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
|
|
30
|
+
* data. The most common usage is handling output generated by the HTML5 `<keygen>` element. Node.js uses [OpenSSL's SPKAC
|
|
31
31
|
* implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
|
|
32
32
|
* @since v0.11.8
|
|
33
33
|
*/
|
|
@@ -106,7 +106,7 @@ declare module "crypto" {
|
|
|
106
106
|
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
|
107
107
|
/** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
|
|
108
108
|
const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
|
|
109
|
-
/** Instructs OpenSSL to use Cisco's
|
|
109
|
+
/** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */
|
|
110
110
|
const SSL_OP_CISCO_ANYCONNECT: number;
|
|
111
111
|
/** Instructs OpenSSL to turn on cookie exchange. */
|
|
112
112
|
const SSL_OP_COOKIE_EXCHANGE: number;
|
|
@@ -470,6 +470,7 @@ declare module "crypto" {
|
|
|
470
470
|
* // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
|
|
471
471
|
* ```
|
|
472
472
|
* @since v0.1.94
|
|
473
|
+
* @deprecated Since v20.13.0 Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is deprecated due to being internals, not intended for public use. Please use the {@link createHmac} method to create Hmac instances.
|
|
473
474
|
*/
|
|
474
475
|
class Hmac extends stream.Transform {
|
|
475
476
|
private constructor();
|
|
@@ -688,7 +689,7 @@ declare module "crypto" {
|
|
|
688
689
|
authTagLength: number;
|
|
689
690
|
}
|
|
690
691
|
/**
|
|
691
|
-
* Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
|
|
692
|
+
* Creates and returns a `Cipher` object that uses the given `algorithm` and `password`.
|
|
692
693
|
*
|
|
693
694
|
* The `options` argument controls stream behavior and is optional except when a
|
|
694
695
|
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
|
|
@@ -906,8 +907,8 @@ declare module "crypto" {
|
|
|
906
907
|
private constructor();
|
|
907
908
|
/**
|
|
908
909
|
* Updates the cipher with `data`. If the `inputEncoding` argument is given,
|
|
909
|
-
* the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
|
|
910
|
-
* `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
|
|
910
|
+
* the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`,
|
|
911
|
+
* `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
|
|
911
912
|
*
|
|
912
913
|
* The `outputEncoding` specifies the output format of the enciphered
|
|
913
914
|
* data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
|
|
@@ -977,10 +978,10 @@ declare module "crypto" {
|
|
|
977
978
|
getAuthTag(): Buffer;
|
|
978
979
|
}
|
|
979
980
|
/**
|
|
980
|
-
* Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
|
|
981
|
+
* Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key).
|
|
981
982
|
*
|
|
982
983
|
* The `options` argument controls stream behavior and is optional except when a
|
|
983
|
-
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
|
|
984
|
+
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
|
|
984
985
|
* authentication tag in bytes, see `CCM mode`.
|
|
985
986
|
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
986
987
|
*
|
|
@@ -1008,11 +1009,11 @@ declare module "crypto" {
|
|
|
1008
1009
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1009
1010
|
function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
|
|
1010
1011
|
/**
|
|
1011
|
-
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
|
|
1012
|
+
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
|
|
1012
1013
|
*
|
|
1013
1014
|
* The `options` argument controls stream behavior and is optional except when a
|
|
1014
|
-
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
|
|
1015
|
-
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
|
|
1015
|
+
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
|
|
1016
|
+
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags
|
|
1016
1017
|
* to those with the specified length.
|
|
1017
1018
|
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
1018
1019
|
*
|
|
@@ -1172,11 +1173,11 @@ declare module "crypto" {
|
|
|
1172
1173
|
private constructor();
|
|
1173
1174
|
/**
|
|
1174
1175
|
* Updates the decipher with `data`. If the `inputEncoding` argument is given,
|
|
1175
|
-
* the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
|
|
1176
|
+
* the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
|
|
1176
1177
|
* ignored.
|
|
1177
1178
|
*
|
|
1178
1179
|
* The `outputEncoding` specifies the output format of the enciphered
|
|
1179
|
-
* data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
|
|
1180
|
+
* data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned.
|
|
1180
1181
|
*
|
|
1181
1182
|
* The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
|
|
1182
1183
|
* being thrown.
|
|
@@ -1199,7 +1200,7 @@ declare module "crypto" {
|
|
|
1199
1200
|
final(): Buffer;
|
|
1200
1201
|
final(outputEncoding: BufferEncoding): string;
|
|
1201
1202
|
/**
|
|
1202
|
-
* When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
|
|
1203
|
+
* When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
|
|
1203
1204
|
* removing padding.
|
|
1204
1205
|
*
|
|
1205
1206
|
* Turning auto padding off will only work if the input data's length is a
|
|
@@ -1253,7 +1254,7 @@ declare module "crypto" {
|
|
|
1253
1254
|
encoding?: string | undefined;
|
|
1254
1255
|
}
|
|
1255
1256
|
/**
|
|
1256
|
-
* Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
|
1257
|
+
* Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
|
|
1257
1258
|
*
|
|
1258
1259
|
* ```js
|
|
1259
1260
|
* const {
|
|
@@ -1279,7 +1280,7 @@ declare module "crypto" {
|
|
|
1279
1280
|
callback: (err: Error | null, key: KeyObject) => void,
|
|
1280
1281
|
): void;
|
|
1281
1282
|
/**
|
|
1282
|
-
* Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
|
1283
|
+
* Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
|
|
1283
1284
|
*
|
|
1284
1285
|
* ```js
|
|
1285
1286
|
* const {
|
|
@@ -1307,7 +1308,7 @@ declare module "crypto" {
|
|
|
1307
1308
|
}
|
|
1308
1309
|
/**
|
|
1309
1310
|
* Creates and returns a new key object containing a private key. If `key` is a
|
|
1310
|
-
* string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
|
|
1311
|
+
* string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above.
|
|
1311
1312
|
*
|
|
1312
1313
|
* If the private key is encrypted, a `passphrase` must be specified. The length
|
|
1313
1314
|
* of the passphrase is limited to 1024 bytes.
|
|
@@ -1316,7 +1317,7 @@ declare module "crypto" {
|
|
|
1316
1317
|
function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
|
|
1317
1318
|
/**
|
|
1318
1319
|
* Creates and returns a new key object containing a public key. If `key` is a
|
|
1319
|
-
* string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
|
|
1320
|
+
* string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key;
|
|
1320
1321
|
* otherwise, `key` must be an object with the properties described above.
|
|
1321
1322
|
*
|
|
1322
1323
|
* If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
|
|
@@ -1324,7 +1325,7 @@ declare module "crypto" {
|
|
|
1324
1325
|
* Because public keys can be derived from private keys, a private key may be
|
|
1325
1326
|
* passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
|
|
1326
1327
|
* returned `KeyObject` will be `'public'` and that the private key cannot be
|
|
1327
|
-
* extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
|
|
1328
|
+
* extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned
|
|
1328
1329
|
* and it will be impossible to extract the private key from the returned object.
|
|
1329
1330
|
* @since v11.6.0
|
|
1330
1331
|
*/
|
|
@@ -1449,7 +1450,7 @@ declare module "crypto" {
|
|
|
1449
1450
|
/**
|
|
1450
1451
|
* Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
|
|
1451
1452
|
*
|
|
1452
|
-
* If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
1453
|
+
* If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
1453
1454
|
* object, the following additional properties can be passed:
|
|
1454
1455
|
*
|
|
1455
1456
|
* If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
|
|
@@ -1467,7 +1468,7 @@ declare module "crypto" {
|
|
|
1467
1468
|
/**
|
|
1468
1469
|
* Creates and returns a `Verify` object that uses the given algorithm.
|
|
1469
1470
|
* Use {@link getHashes} to obtain an array of names of the available
|
|
1470
|
-
* signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
|
|
1471
|
+
* signing algorithms. Optional `options` argument controls the `stream.Writable` behavior.
|
|
1471
1472
|
*
|
|
1472
1473
|
* In some cases, a `Verify` instance can be created using the name of a signature
|
|
1473
1474
|
* algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
|
|
@@ -1487,7 +1488,7 @@ declare module "crypto" {
|
|
|
1487
1488
|
* * Using the `verify.update()` and `verify.verify()` methods to verify
|
|
1488
1489
|
* the signature.
|
|
1489
1490
|
*
|
|
1490
|
-
* The {@link createVerify} method is used to create `Verify` instances
|
|
1491
|
+
* The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword.
|
|
1491
1492
|
*
|
|
1492
1493
|
* See `Sign` for examples.
|
|
1493
1494
|
* @since v0.1.92
|
|
@@ -1498,7 +1499,7 @@ declare module "crypto" {
|
|
|
1498
1499
|
* Updates the `Verify` content with the given `data`, the encoding of which
|
|
1499
1500
|
* is given in `inputEncoding`.
|
|
1500
1501
|
* If `inputEncoding` is not provided, and the `data` is a string, an
|
|
1501
|
-
* encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
|
|
1502
|
+
* encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
|
|
1502
1503
|
*
|
|
1503
1504
|
* This can be called many times with new data as it is streamed.
|
|
1504
1505
|
* @since v0.1.92
|
|
@@ -1509,13 +1510,13 @@ declare module "crypto" {
|
|
|
1509
1510
|
/**
|
|
1510
1511
|
* Verifies the provided data using the given `object` and `signature`.
|
|
1511
1512
|
*
|
|
1512
|
-
* If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
|
|
1513
|
+
* If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an
|
|
1513
1514
|
* object, the following additional properties can be passed:
|
|
1514
1515
|
*
|
|
1515
1516
|
* The `signature` argument is the previously calculated signature for the data, in
|
|
1516
1517
|
* the `signatureEncoding`.
|
|
1517
1518
|
* If a `signatureEncoding` is specified, the `signature` is expected to be a
|
|
1518
|
-
* string; otherwise `signature` is expected to be a `Buffer
|
|
1519
|
+
* string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
1519
1520
|
*
|
|
1520
1521
|
* The `verify` object can not be used again after `verify.verify()` has been
|
|
1521
1522
|
* called. Multiple calls to `verify.verify()` will result in an error being
|
|
@@ -1539,7 +1540,7 @@ declare module "crypto" {
|
|
|
1539
1540
|
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
|
|
1540
1541
|
* optional specific `generator`.
|
|
1541
1542
|
*
|
|
1542
|
-
* The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
|
|
1543
|
+
* The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used.
|
|
1543
1544
|
*
|
|
1544
1545
|
* If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
|
|
1545
1546
|
* a `Buffer`, `TypedArray`, or `DataView` is expected.
|
|
@@ -1625,7 +1626,7 @@ declare module "crypto" {
|
|
|
1625
1626
|
* key is interpreted using the specified `inputEncoding`, and secret is
|
|
1626
1627
|
* encoded using specified `outputEncoding`.
|
|
1627
1628
|
* If the `inputEncoding` is not
|
|
1628
|
-
* provided, `otherPublicKey` is expected to be a `Buffer
|
|
1629
|
+
* provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
1629
1630
|
*
|
|
1630
1631
|
* If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
|
|
1631
1632
|
* @since v0.5.0
|
|
@@ -1681,7 +1682,7 @@ declare module "crypto" {
|
|
|
1681
1682
|
getPrivateKey(): Buffer;
|
|
1682
1683
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
1683
1684
|
/**
|
|
1684
|
-
* Sets the Diffie-Hellman public key. If the `encoding` argument is provided
|
|
1685
|
+
* Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
|
|
1685
1686
|
* to be a string. If no `encoding` is provided, `publicKey` is expected
|
|
1686
1687
|
* to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
1687
1688
|
* @since v0.5.0
|
|
@@ -1784,10 +1785,10 @@ declare module "crypto" {
|
|
|
1784
1785
|
/**
|
|
1785
1786
|
* Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
|
|
1786
1787
|
* implementation. A selected HMAC digest algorithm specified by `digest` is
|
|
1787
|
-
* applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
|
|
1788
|
+
* applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
|
|
1788
1789
|
*
|
|
1789
|
-
* The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
|
|
1790
|
-
* otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
|
|
1790
|
+
* The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set;
|
|
1791
|
+
* otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be
|
|
1791
1792
|
* thrown if any of the input arguments specify invalid values or types.
|
|
1792
1793
|
*
|
|
1793
1794
|
* The `iterations` argument must be a number set as high as possible. The
|
|
@@ -1827,7 +1828,7 @@ declare module "crypto" {
|
|
|
1827
1828
|
/**
|
|
1828
1829
|
* Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
|
|
1829
1830
|
* implementation. A selected HMAC digest algorithm specified by `digest` is
|
|
1830
|
-
* applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
|
|
1831
|
+
* applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
|
|
1831
1832
|
*
|
|
1832
1833
|
* If an error occurs an `Error` will be thrown, otherwise the derived key will be
|
|
1833
1834
|
* returned as a `Buffer`.
|
|
@@ -1866,7 +1867,7 @@ declare module "crypto" {
|
|
|
1866
1867
|
*
|
|
1867
1868
|
* If a `callback` function is provided, the bytes are generated asynchronously
|
|
1868
1869
|
* and the `callback` function is invoked with two arguments: `err` and `buf`.
|
|
1869
|
-
* If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
|
|
1870
|
+
* If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes.
|
|
1870
1871
|
*
|
|
1871
1872
|
* ```js
|
|
1872
1873
|
* // Asynchronous
|
|
@@ -2037,7 +2038,7 @@ declare module "crypto" {
|
|
|
2037
2038
|
* });
|
|
2038
2039
|
* ```
|
|
2039
2040
|
*
|
|
2040
|
-
* Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
|
|
2041
|
+
* Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`.
|
|
2041
2042
|
*
|
|
2042
2043
|
* While this includes instances of `Float32Array` and `Float64Array`, this
|
|
2043
2044
|
* function should not be used to generate random floating-point numbers. The
|
|
@@ -2117,7 +2118,7 @@ declare module "crypto" {
|
|
|
2117
2118
|
*
|
|
2118
2119
|
* When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
|
|
2119
2120
|
*
|
|
2120
|
-
* The `callback` function is called with two arguments: `err` and `derivedKey
|
|
2121
|
+
* The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the
|
|
2121
2122
|
* callback as a `Buffer`.
|
|
2122
2123
|
*
|
|
2123
2124
|
* An exception is thrown when any of the input arguments specify invalid values
|
|
@@ -2203,8 +2204,8 @@ declare module "crypto" {
|
|
|
2203
2204
|
* Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
|
|
2204
2205
|
* the corresponding private key, for example using {@link privateDecrypt}.
|
|
2205
2206
|
*
|
|
2206
|
-
* If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
|
|
2207
|
-
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
|
|
2207
|
+
* If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
|
|
2208
|
+
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
|
|
2208
2209
|
*
|
|
2209
2210
|
* Because RSA public keys can be derived from private keys, a private key may
|
|
2210
2211
|
* be passed instead of a public key.
|
|
@@ -2215,8 +2216,8 @@ declare module "crypto" {
|
|
|
2215
2216
|
* Decrypts `buffer` with `key`.`buffer` was previously encrypted using
|
|
2216
2217
|
* the corresponding private key, for example using {@link privateEncrypt}.
|
|
2217
2218
|
*
|
|
2218
|
-
* If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
|
|
2219
|
-
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
|
|
2219
|
+
* If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
|
|
2220
|
+
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
|
|
2220
2221
|
*
|
|
2221
2222
|
* Because RSA public keys can be derived from private keys, a private key may
|
|
2222
2223
|
* be passed instead of a public key.
|
|
@@ -2227,8 +2228,8 @@ declare module "crypto" {
|
|
|
2227
2228
|
* Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
|
|
2228
2229
|
* the corresponding public key, for example using {@link publicEncrypt}.
|
|
2229
2230
|
*
|
|
2230
|
-
* If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
2231
|
-
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
|
|
2231
|
+
* If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
2232
|
+
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
|
|
2232
2233
|
* @since v0.11.14
|
|
2233
2234
|
*/
|
|
2234
2235
|
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
|
@@ -2236,8 +2237,8 @@ declare module "crypto" {
|
|
|
2236
2237
|
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
|
|
2237
2238
|
* the corresponding public key, for example using {@link publicDecrypt}.
|
|
2238
2239
|
*
|
|
2239
|
-
* If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
2240
|
-
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
|
|
2240
|
+
* If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
|
|
2241
|
+
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
|
|
2241
2242
|
* @since v1.1.0
|
|
2242
2243
|
*/
|
|
2243
2244
|
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
|
@@ -2332,9 +2333,9 @@ declare module "crypto" {
|
|
|
2332
2333
|
* On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
|
|
2333
2334
|
* the name and description of each available elliptic curve.
|
|
2334
2335
|
*
|
|
2335
|
-
* If `format` is not specified the point will be returned in `'uncompressed'`format.
|
|
2336
|
+
* If `format` is not specified the point will be returned in `'uncompressed'` format.
|
|
2336
2337
|
*
|
|
2337
|
-
* If the `inputEncoding` is not provided, `key` is expected to be a `Buffer
|
|
2338
|
+
* If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
2338
2339
|
*
|
|
2339
2340
|
* Example (uncompressing a key):
|
|
2340
2341
|
*
|
|
@@ -2375,7 +2376,7 @@ declare module "crypto" {
|
|
|
2375
2376
|
* the public key in the specified `format` and `encoding`. This key should be
|
|
2376
2377
|
* transferred to the other party.
|
|
2377
2378
|
*
|
|
2378
|
-
* The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
|
|
2379
|
+
* The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
|
|
2379
2380
|
*
|
|
2380
2381
|
* If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
|
|
2381
2382
|
* @since v0.11.14
|
|
@@ -2390,11 +2391,11 @@ declare module "crypto" {
|
|
|
2390
2391
|
* key is interpreted using specified `inputEncoding`, and the returned secret
|
|
2391
2392
|
* is encoded using the specified `outputEncoding`.
|
|
2392
2393
|
* If the `inputEncoding` is not
|
|
2393
|
-
* provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
|
|
2394
|
+
* provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
2394
2395
|
*
|
|
2395
2396
|
* If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
|
|
2396
2397
|
*
|
|
2397
|
-
* `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
|
|
2398
|
+
* `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is
|
|
2398
2399
|
* usually supplied from a remote user over an insecure network,
|
|
2399
2400
|
* be sure to handle this exception accordingly.
|
|
2400
2401
|
* @since v0.11.14
|
|
@@ -2419,7 +2420,7 @@ declare module "crypto" {
|
|
|
2419
2420
|
getPrivateKey(): Buffer;
|
|
2420
2421
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
2421
2422
|
/**
|
|
2422
|
-
* The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
|
|
2423
|
+
* The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
|
|
2423
2424
|
*
|
|
2424
2425
|
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
|
|
2425
2426
|
* returned.
|
|
@@ -2433,7 +2434,7 @@ declare module "crypto" {
|
|
|
2433
2434
|
/**
|
|
2434
2435
|
* Sets the EC Diffie-Hellman private key.
|
|
2435
2436
|
* If `encoding` is provided, `privateKey` is expected
|
|
2436
|
-
* to be a string; otherwise `privateKey` is expected to be a `Buffer
|
|
2437
|
+
* to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
2437
2438
|
*
|
|
2438
2439
|
* If `privateKey` is not valid for the curve specified when the `ECDH` object was
|
|
2439
2440
|
* created, an error is thrown. Upon setting the private key, the associated
|
|
@@ -2453,7 +2454,7 @@ declare module "crypto" {
|
|
|
2453
2454
|
*/
|
|
2454
2455
|
function createECDH(curveName: string): ECDH;
|
|
2455
2456
|
/**
|
|
2456
|
-
* This function compares the underlying bytes that represent the given`ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
|
|
2457
|
+
* This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
|
|
2457
2458
|
* algorithm.
|
|
2458
2459
|
*
|
|
2459
2460
|
* This function does not leak timing information that
|
|
@@ -2468,8 +2469,8 @@ declare module "crypto" {
|
|
|
2468
2469
|
* entry, such as `Uint16Array`, the result will be computed using the platform
|
|
2469
2470
|
* byte order.
|
|
2470
2471
|
*
|
|
2471
|
-
* **When both of the inputs are `Float32Array`s or`Float64Array`s, this function might return unexpected results due to IEEE 754**
|
|
2472
|
-
* **encoding of floating-point numbers. In particular, neither `x === y` nor`Object.is(x, y)` implies that the byte representations of two floating-point**
|
|
2472
|
+
* **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754**
|
|
2473
|
+
* **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point**
|
|
2473
2474
|
* **numbers `x` and `y` are equal.**
|
|
2474
2475
|
*
|
|
2475
2476
|
* Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
|
|
@@ -2846,7 +2847,7 @@ declare module "crypto" {
|
|
|
2846
2847
|
* behaves as if `keyObject.export()` had been called on its result. Otherwise,
|
|
2847
2848
|
* the respective part of the key is returned as a `KeyObject`.
|
|
2848
2849
|
*
|
|
2849
|
-
* It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
|
|
2850
|
+
* It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage:
|
|
2850
2851
|
*
|
|
2851
2852
|
* ```js
|
|
2852
2853
|
* const {
|
|
@@ -2870,7 +2871,7 @@ declare module "crypto" {
|
|
|
2870
2871
|
* });
|
|
2871
2872
|
* ```
|
|
2872
2873
|
*
|
|
2873
|
-
* On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
|
|
2874
|
+
* On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair.
|
|
2874
2875
|
*
|
|
2875
2876
|
* If this method is invoked as its `util.promisify()` ed version, it returns
|
|
2876
2877
|
* a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
|
|
@@ -3344,7 +3345,7 @@ declare module "crypto" {
|
|
|
3344
3345
|
callback: (error: Error | null, data: Buffer) => void,
|
|
3345
3346
|
): void;
|
|
3346
3347
|
/**
|
|
3347
|
-
* Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
|
|
3348
|
+
* Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
|
|
3348
3349
|
* key type (especially Ed25519 and Ed448).
|
|
3349
3350
|
*
|
|
3350
3351
|
* If `key` is not a `KeyObject`, this function behaves as if `key` had been
|
|
@@ -3374,10 +3375,45 @@ declare module "crypto" {
|
|
|
3374
3375
|
): void;
|
|
3375
3376
|
/**
|
|
3376
3377
|
* Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
|
|
3377
|
-
* Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
|
|
3378
|
+
* Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` (for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
|
|
3378
3379
|
* @since v13.9.0, v12.17.0
|
|
3379
3380
|
*/
|
|
3380
3381
|
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
|
|
3382
|
+
/**
|
|
3383
|
+
* A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data
|
|
3384
|
+
* (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm`
|
|
3385
|
+
* is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases
|
|
3386
|
+
* of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms.
|
|
3387
|
+
*
|
|
3388
|
+
* Example:
|
|
3389
|
+
*
|
|
3390
|
+
* ```js
|
|
3391
|
+
* const crypto = require('node:crypto');
|
|
3392
|
+
* const { Buffer } = require('node:buffer');
|
|
3393
|
+
*
|
|
3394
|
+
* // Hashing a string and return the result as a hex-encoded string.
|
|
3395
|
+
* const string = 'Node.js';
|
|
3396
|
+
* // 10b3493287f831e81a438811a1ffba01f8cec4b7
|
|
3397
|
+
* console.log(crypto.hash('sha1', string));
|
|
3398
|
+
*
|
|
3399
|
+
* // Encode a base64-encoded string into a Buffer, hash it and return
|
|
3400
|
+
* // the result as a buffer.
|
|
3401
|
+
* const base64 = 'Tm9kZS5qcw==';
|
|
3402
|
+
* // <Buffer 10 b3 49 32 87 f8 31 e8 1a 43 88 11 a1 ff ba 01 f8 ce c4 b7>
|
|
3403
|
+
* console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer'));
|
|
3404
|
+
* ```
|
|
3405
|
+
* @since v21.7.0, v20.12.0
|
|
3406
|
+
* @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user
|
|
3407
|
+
* could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead.
|
|
3408
|
+
* @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v20.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest.
|
|
3409
|
+
*/
|
|
3410
|
+
function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string;
|
|
3411
|
+
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): Buffer;
|
|
3412
|
+
function hash(
|
|
3413
|
+
algorithm: string,
|
|
3414
|
+
data: BinaryLike,
|
|
3415
|
+
outputEncoding?: BinaryToTextEncoding | "buffer",
|
|
3416
|
+
): string | Buffer;
|
|
3381
3417
|
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
3382
3418
|
interface CipherInfoOptions {
|
|
3383
3419
|
/**
|
|
@@ -3430,9 +3466,9 @@ declare module "crypto" {
|
|
|
3430
3466
|
*/
|
|
3431
3467
|
function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
|
|
3432
3468
|
/**
|
|
3433
|
-
* HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm
|
|
3469
|
+
* HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
|
|
3434
3470
|
*
|
|
3435
|
-
* The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
|
|
3471
|
+
* The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set;
|
|
3436
3472
|
* otherwise `err` will be `null`. The successfully generated `derivedKey` will
|
|
3437
3473
|
* be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
|
|
3438
3474
|
* of the input arguments specify invalid values or types.
|
|
@@ -3466,7 +3502,7 @@ declare module "crypto" {
|
|
|
3466
3502
|
): void;
|
|
3467
3503
|
/**
|
|
3468
3504
|
* Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
|
|
3469
|
-
* given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
|
|
3505
|
+
* given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
|
|
3470
3506
|
*
|
|
3471
3507
|
* The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
|
|
3472
3508
|
*
|
|
@@ -3795,7 +3831,7 @@ declare module "crypto" {
|
|
|
3795
3831
|
/**
|
|
3796
3832
|
* Generates a pseudorandom prime of `size` bits.
|
|
3797
3833
|
*
|
|
3798
|
-
* If `options.safe` is `true`, the prime will be a safe prime -- that is
|
|
3834
|
+
* If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
|
|
3799
3835
|
*
|
|
3800
3836
|
* The `options.add` and `options.rem` parameters can be used to enforce additional
|
|
3801
3837
|
* requirements, e.g., for Diffie-Hellman:
|
|
@@ -3811,7 +3847,7 @@ declare module "crypto" {
|
|
|
3811
3847
|
* * `options.rem` is ignored if `options.add` is not given.
|
|
3812
3848
|
*
|
|
3813
3849
|
* Both `options.add` and `options.rem` must be encoded as big-endian sequences
|
|
3814
|
-
* if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
|
|
3850
|
+
* if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
|
|
3815
3851
|
*
|
|
3816
3852
|
* By default, the prime is encoded as a big-endian sequence of octets
|
|
3817
3853
|
* in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
|
|
@@ -3838,7 +3874,7 @@ declare module "crypto" {
|
|
|
3838
3874
|
/**
|
|
3839
3875
|
* Generates a pseudorandom prime of `size` bits.
|
|
3840
3876
|
*
|
|
3841
|
-
* If `options.safe` is `true`, the prime will be a safe prime -- that is
|
|
3877
|
+
* If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
|
|
3842
3878
|
*
|
|
3843
3879
|
* The `options.add` and `options.rem` parameters can be used to enforce additional
|
|
3844
3880
|
* requirements, e.g., for Diffie-Hellman:
|
|
@@ -3854,7 +3890,7 @@ declare module "crypto" {
|
|
|
3854
3890
|
* * `options.rem` is ignored if `options.add` is not given.
|
|
3855
3891
|
*
|
|
3856
3892
|
* Both `options.add` and `options.rem` must be encoded as big-endian sequences
|
|
3857
|
-
* if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
|
|
3893
|
+
* if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
|
|
3858
3894
|
*
|
|
3859
3895
|
* By default, the prime is encoded as a big-endian sequence of octets
|
|
3860
3896
|
* in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
|
|
@@ -3900,7 +3936,7 @@ declare module "crypto" {
|
|
|
3900
3936
|
*
|
|
3901
3937
|
* `engine` could be either an id or a path to the engine's shared library.
|
|
3902
3938
|
*
|
|
3903
|
-
* The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags`is a bit field taking one of or a mix of the following flags (defined in`crypto.constants`):
|
|
3939
|
+
* The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
|
|
3904
3940
|
*
|
|
3905
3941
|
* * `crypto.constants.ENGINE_METHOD_RSA`
|
|
3906
3942
|
* * `crypto.constants.ENGINE_METHOD_DSA`
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* server.bind(41234);
|
|
24
24
|
* // Prints: server listening 0.0.0.0:41234
|
|
25
25
|
* ```
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
26
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dgram.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module "dgram" {
|
|
29
29
|
import { AddressInfo } from "node:net";
|
|
@@ -66,7 +66,7 @@ declare module "dgram" {
|
|
|
66
66
|
* (it does the right thing for both `udp4` and `udp6` sockets). The bound address
|
|
67
67
|
* and port can be retrieved using `socket.address().address` and `socket.address().port`.
|
|
68
68
|
*
|
|
69
|
-
* If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
|
|
69
|
+
* If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket:
|
|
70
70
|
*
|
|
71
71
|
* ```js
|
|
72
72
|
* const controller = new AbortController();
|
|
@@ -93,7 +93,7 @@ declare module "dgram" {
|
|
|
93
93
|
*/
|
|
94
94
|
class Socket extends EventEmitter {
|
|
95
95
|
/**
|
|
96
|
-
* Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
|
|
96
|
+
* Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not
|
|
97
97
|
* specified, the operating system will choose
|
|
98
98
|
* one interface and will add membership to it. To add membership to every
|
|
99
99
|
* available interface, call `addMembership` multiple times, once per interface.
|
|
@@ -122,7 +122,7 @@ declare module "dgram" {
|
|
|
122
122
|
addMembership(multicastAddress: string, multicastInterface?: string): void;
|
|
123
123
|
/**
|
|
124
124
|
* Returns an object containing the address information for a socket.
|
|
125
|
-
* For UDP sockets, this object will contain `address`, `family`, and `port`properties.
|
|
125
|
+
* For UDP sockets, this object will contain `address`, `family`, and `port` properties.
|
|
126
126
|
*
|
|
127
127
|
* This method throws `EBADF` if called on an unbound socket.
|
|
128
128
|
* @since v0.1.99
|
|
@@ -133,10 +133,10 @@ declare module "dgram" {
|
|
|
133
133
|
* messages on a named `port` and optional `address`. If `port` is not
|
|
134
134
|
* specified or is `0`, the operating system will attempt to bind to a
|
|
135
135
|
* random port. If `address` is not specified, the operating system will
|
|
136
|
-
* attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
|
|
136
|
+
* attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is
|
|
137
137
|
* called.
|
|
138
138
|
*
|
|
139
|
-
* Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
|
|
139
|
+
* Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very
|
|
140
140
|
* useful.
|
|
141
141
|
*
|
|
142
142
|
* A bound datagram socket keeps the Node.js process running to receive
|
|
@@ -206,7 +206,7 @@ declare module "dgram" {
|
|
|
206
206
|
*/
|
|
207
207
|
disconnect(): void;
|
|
208
208
|
/**
|
|
209
|
-
* Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
|
|
209
|
+
* Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
|
|
210
210
|
* kernel when the socket is closed or the process terminates, so most apps will
|
|
211
211
|
* never have reason to call this.
|
|
212
212
|
*
|
|
@@ -269,14 +269,14 @@ declare module "dgram" {
|
|
|
269
269
|
* any `TypedArray` or a `DataView`,
|
|
270
270
|
* the `offset` and `length` specify the offset within the `Buffer` where the
|
|
271
271
|
* message begins and the number of bytes in the message, respectively.
|
|
272
|
-
* If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
|
|
272
|
+
* If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that
|
|
273
273
|
* contain multi-byte characters, `offset` and `length` will be calculated with
|
|
274
274
|
* respect to `byte length` and not the character position.
|
|
275
275
|
* If `msg` is an array, `offset` and `length` must not be specified.
|
|
276
276
|
*
|
|
277
277
|
* The `address` argument is a string. If the value of `address` is a host name,
|
|
278
278
|
* DNS will be used to resolve the address of the host. If `address` is not
|
|
279
|
-
* provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
|
|
279
|
+
* provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default.
|
|
280
280
|
*
|
|
281
281
|
* If the socket has not been previously bound with a call to `bind`, the socket
|
|
282
282
|
* is assigned a random port number and is bound to the "all interfaces" address
|
|
@@ -287,7 +287,7 @@ declare module "dgram" {
|
|
|
287
287
|
* DNS lookups delay the time to send for at least one tick of the
|
|
288
288
|
* Node.js event loop.
|
|
289
289
|
*
|
|
290
|
-
* The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
|
|
290
|
+
* The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be
|
|
291
291
|
* passed as the first argument to the `callback`. If a `callback` is not given,
|
|
292
292
|
* the error is emitted as an `'error'` event on the `socket` object.
|
|
293
293
|
*
|
|
@@ -329,7 +329,7 @@ declare module "dgram" {
|
|
|
329
329
|
* determine the optimal strategy on a case-by-case basis. Generally speaking,
|
|
330
330
|
* however, sending multiple buffers is faster.
|
|
331
331
|
*
|
|
332
|
-
* Example of sending a UDP packet using a socket connected to a port on`localhost`:
|
|
332
|
+
* Example of sending a UDP packet using a socket connected to a port on `localhost`:
|
|
333
333
|
*
|
|
334
334
|
* ```js
|
|
335
335
|
* import dgram from 'node:dgram';
|
|
@@ -519,10 +519,10 @@ declare module "dgram" {
|
|
|
519
519
|
*/
|
|
520
520
|
unref(): this;
|
|
521
521
|
/**
|
|
522
|
-
* Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
|
|
522
|
+
* Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket
|
|
523
523
|
* option. If the `multicastInterface` argument
|
|
524
524
|
* is not specified, the operating system will choose one interface and will add
|
|
525
|
-
* membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
|
|
525
|
+
* membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface.
|
|
526
526
|
*
|
|
527
527
|
* When called on an unbound socket, this method will implicitly bind to a random
|
|
528
528
|
* port, listening on all interfaces.
|
|
@@ -530,7 +530,7 @@ declare module "dgram" {
|
|
|
530
530
|
*/
|
|
531
531
|
addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
|
|
532
532
|
/**
|
|
533
|
-
* Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
|
|
533
|
+
* Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is
|
|
534
534
|
* automatically called by the kernel when the
|
|
535
535
|
* socket is closed or the process terminates, so most apps will never have
|
|
536
536
|
* reason to call this.
|