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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Clusters of Node.js processes can be used to run multiple instances of Node.js
|
|
3
|
-
* that can distribute workloads among their application threads. When process
|
|
4
|
-
*
|
|
5
|
-
* allows running multiple application threads within a single Node.js instance.
|
|
3
|
+
* that can distribute workloads among their application threads. When process isolation
|
|
4
|
+
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html)
|
|
5
|
+
* module instead, which allows running multiple application threads within a single Node.js instance.
|
|
6
6
|
*
|
|
7
7
|
* The cluster module allows easy creation of child processes that all share
|
|
8
8
|
* server ports.
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
53
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js)
|
|
54
54
|
*/
|
|
55
55
|
declare module "cluster" {
|
|
56
56
|
import * as child from "node:child_process";
|
|
@@ -58,22 +58,74 @@ declare module "cluster" {
|
|
|
58
58
|
import * as net from "node:net";
|
|
59
59
|
type SerializationType = "json" | "advanced";
|
|
60
60
|
export interface ClusterSettings {
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* List of string arguments passed to the Node.js executable.
|
|
63
|
+
* @default process.execArgv
|
|
64
|
+
*/
|
|
65
|
+
execArgv?: string[] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* File path to worker file.
|
|
68
|
+
* @default process.argv[1]
|
|
69
|
+
*/
|
|
62
70
|
exec?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* String arguments passed to worker.
|
|
73
|
+
* @default process.argv.slice(2)
|
|
74
|
+
*/
|
|
63
75
|
args?: string[] | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Whether or not to send output to parent's stdio.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
64
80
|
silent?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
|
|
83
|
+
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processspawncommand-args-options)'s
|
|
84
|
+
* [`stdio`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#optionsstdio).
|
|
85
|
+
*/
|
|
65
86
|
stdio?: any[] | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
|
|
89
|
+
*/
|
|
66
90
|
uid?: number | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
|
|
93
|
+
*/
|
|
67
94
|
gid?: number | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
|
|
97
|
+
* By default each worker gets its own port, incremented from the primary's `process.debugPort`.
|
|
98
|
+
*/
|
|
68
99
|
inspectPort?: number | (() => number) | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
|
|
102
|
+
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#advanced-serialization) for more details.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
69
105
|
serialization?: SerializationType | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Current working directory of the worker process.
|
|
108
|
+
* @default undefined (inherits from parent process)
|
|
109
|
+
*/
|
|
70
110
|
cwd?: string | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Hide the forked processes console window that would normally be created on Windows systems.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
71
115
|
windowsHide?: boolean | undefined;
|
|
72
116
|
}
|
|
73
117
|
export interface Address {
|
|
74
118
|
address: string;
|
|
75
119
|
port: number;
|
|
76
|
-
|
|
120
|
+
/**
|
|
121
|
+
* The `addressType` is one of:
|
|
122
|
+
*
|
|
123
|
+
* * `4` (TCPv4)
|
|
124
|
+
* * `6` (TCPv6)
|
|
125
|
+
* * `-1` (Unix domain socket)
|
|
126
|
+
* * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
|
|
127
|
+
*/
|
|
128
|
+
addressType: 4 | 6 | -1 | "udp4" | "udp6";
|
|
77
129
|
}
|
|
78
130
|
/**
|
|
79
131
|
* A `Worker` object contains all public information and method about a worker.
|
|
@@ -83,17 +135,17 @@ declare module "cluster" {
|
|
|
83
135
|
*/
|
|
84
136
|
export class Worker extends EventEmitter {
|
|
85
137
|
/**
|
|
86
|
-
* Each new worker is given its own unique id, this id is stored in the`id`.
|
|
138
|
+
* Each new worker is given its own unique id, this id is stored in the `id`.
|
|
87
139
|
*
|
|
88
|
-
* While a worker is alive, this is the key that indexes it in`cluster.workers`.
|
|
140
|
+
* While a worker is alive, this is the key that indexes it in `cluster.workers`.
|
|
89
141
|
* @since v0.8.0
|
|
90
142
|
*/
|
|
91
143
|
id: number;
|
|
92
144
|
/**
|
|
93
|
-
* All workers are created using `child_process.fork()
|
|
94
|
-
* from this function is stored as `.process`. In a worker, the global `process`is stored.
|
|
145
|
+
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
|
|
146
|
+
* from this function is stored as `.process`. In a worker, the global `process` is stored.
|
|
95
147
|
*
|
|
96
|
-
* See:
|
|
148
|
+
* See: [Child Process module](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options).
|
|
97
149
|
*
|
|
98
150
|
* Workers will call `process.exit(0)` if the `'disconnect'` event occurs
|
|
99
151
|
* on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
|
|
@@ -104,9 +156,9 @@ declare module "cluster" {
|
|
|
104
156
|
/**
|
|
105
157
|
* Send a message to a worker or primary, optionally with a handle.
|
|
106
158
|
*
|
|
107
|
-
* In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()
|
|
159
|
+
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
|
|
108
160
|
*
|
|
109
|
-
* In a worker, this sends a message to the primary. It is identical to`process.send()`.
|
|
161
|
+
* In a worker, this sends a message to the primary. It is identical to `process.send()`.
|
|
110
162
|
*
|
|
111
163
|
* This example will echo back all messages from the primary:
|
|
112
164
|
*
|
|
@@ -122,7 +174,7 @@ declare module "cluster" {
|
|
|
122
174
|
* }
|
|
123
175
|
* ```
|
|
124
176
|
* @since v0.7.0
|
|
125
|
-
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
|
|
177
|
+
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
|
|
126
178
|
*/
|
|
127
179
|
send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
|
|
128
180
|
send(
|
|
@@ -138,7 +190,7 @@ declare module "cluster" {
|
|
|
138
190
|
): boolean;
|
|
139
191
|
/**
|
|
140
192
|
* This function will kill the worker. In the primary worker, it does this by
|
|
141
|
-
* disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
|
|
193
|
+
* disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`.
|
|
142
194
|
*
|
|
143
195
|
* The `kill()` function kills the worker process without waiting for a graceful
|
|
144
196
|
* disconnect, it has the same behavior as `worker.process.kill()`.
|
|
@@ -146,7 +198,7 @@ declare module "cluster" {
|
|
|
146
198
|
* This method is aliased as `worker.destroy()` for backwards compatibility.
|
|
147
199
|
*
|
|
148
200
|
* In a worker, `process.kill()` exists, but it is not this function;
|
|
149
|
-
* it is `kill()
|
|
201
|
+
* it is [`kill()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processkillpid-signal).
|
|
150
202
|
* @since v0.9.12
|
|
151
203
|
* @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
|
|
152
204
|
*/
|
|
@@ -156,7 +208,7 @@ declare module "cluster" {
|
|
|
156
208
|
* In a worker, this function will close all servers, wait for the `'close'` event
|
|
157
209
|
* on those servers, and then disconnect the IPC channel.
|
|
158
210
|
*
|
|
159
|
-
* In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
|
|
211
|
+
* In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself.
|
|
160
212
|
*
|
|
161
213
|
* Causes `.exitedAfterDisconnect` to be set.
|
|
162
214
|
*
|
|
@@ -336,20 +388,114 @@ declare module "cluster" {
|
|
|
336
388
|
}
|
|
337
389
|
export interface Cluster extends EventEmitter {
|
|
338
390
|
disconnect(callback?: () => void): void;
|
|
391
|
+
/**
|
|
392
|
+
* Spawn a new worker process.
|
|
393
|
+
*
|
|
394
|
+
* This can only be called from the primary process.
|
|
395
|
+
* @param env Key/value pairs to add to worker process environment.
|
|
396
|
+
* @since v0.6.0
|
|
397
|
+
*/
|
|
339
398
|
fork(env?: any): Worker;
|
|
340
399
|
/** @deprecated since v16.0.0 - use isPrimary. */
|
|
341
400
|
readonly isMaster: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
|
|
403
|
+
* is undefined, then `isPrimary` is `true`.
|
|
404
|
+
* @since v16.0.0
|
|
405
|
+
*/
|
|
342
406
|
readonly isPrimary: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* True if the process is not a primary (it is the negation of `cluster.isPrimary`).
|
|
409
|
+
* @since v0.6.0
|
|
410
|
+
*/
|
|
343
411
|
readonly isWorker: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
|
|
414
|
+
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings)
|
|
415
|
+
* is called, whichever comes first.
|
|
416
|
+
*
|
|
417
|
+
* `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
|
|
418
|
+
* IOCP handles without incurring a large performance hit.
|
|
419
|
+
*
|
|
420
|
+
* `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
|
|
421
|
+
* @since v0.11.2
|
|
422
|
+
*/
|
|
344
423
|
schedulingPolicy: number;
|
|
424
|
+
/**
|
|
425
|
+
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings)
|
|
426
|
+
* (or [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)) this settings object will contain
|
|
427
|
+
* the settings, including the default values.
|
|
428
|
+
*
|
|
429
|
+
* This object is not intended to be changed or set manually.
|
|
430
|
+
* @since v0.7.1
|
|
431
|
+
*/
|
|
345
432
|
readonly settings: ClusterSettings;
|
|
346
|
-
/** @deprecated since v16.0.0 - use setupPrimary. */
|
|
433
|
+
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) instead. */
|
|
347
434
|
setupMaster(settings?: ClusterSettings): void;
|
|
348
435
|
/**
|
|
349
|
-
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings
|
|
436
|
+
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
|
|
437
|
+
*
|
|
438
|
+
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)
|
|
439
|
+
* and have no effect on workers that are already running.
|
|
440
|
+
*
|
|
441
|
+
* The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
|
|
442
|
+
* [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv).
|
|
443
|
+
*
|
|
444
|
+
* The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
|
|
445
|
+
* `cluster.setupPrimary()` is called.
|
|
446
|
+
*
|
|
447
|
+
* ```js
|
|
448
|
+
* import cluster from 'node:cluster';
|
|
449
|
+
*
|
|
450
|
+
* cluster.setupPrimary({
|
|
451
|
+
* exec: 'worker.js',
|
|
452
|
+
* args: ['--use', 'https'],
|
|
453
|
+
* silent: true,
|
|
454
|
+
* });
|
|
455
|
+
* cluster.fork(); // https worker
|
|
456
|
+
* cluster.setupPrimary({
|
|
457
|
+
* exec: 'worker.js',
|
|
458
|
+
* args: ['--use', 'http'],
|
|
459
|
+
* });
|
|
460
|
+
* cluster.fork(); // http worker
|
|
461
|
+
* ```
|
|
462
|
+
*
|
|
463
|
+
* This can only be called from the primary process.
|
|
464
|
+
* @since v16.0.0
|
|
350
465
|
*/
|
|
351
466
|
setupPrimary(settings?: ClusterSettings): void;
|
|
467
|
+
/**
|
|
468
|
+
* A reference to the current worker object. Not available in the primary process.
|
|
469
|
+
*
|
|
470
|
+
* ```js
|
|
471
|
+
* import cluster from 'node:cluster';
|
|
472
|
+
*
|
|
473
|
+
* if (cluster.isPrimary) {
|
|
474
|
+
* console.log('I am primary');
|
|
475
|
+
* cluster.fork();
|
|
476
|
+
* cluster.fork();
|
|
477
|
+
* } else if (cluster.isWorker) {
|
|
478
|
+
* console.log(`I am worker #${cluster.worker.id}`);
|
|
479
|
+
* }
|
|
480
|
+
* ```
|
|
481
|
+
* @since v0.7.0
|
|
482
|
+
*/
|
|
352
483
|
readonly worker?: Worker | undefined;
|
|
484
|
+
/**
|
|
485
|
+
* A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
|
|
486
|
+
*
|
|
487
|
+
* A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
|
|
488
|
+
* is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
|
|
489
|
+
*
|
|
490
|
+
* ```js
|
|
491
|
+
* import cluster from 'node:cluster';
|
|
492
|
+
*
|
|
493
|
+
* for (const worker of Object.values(cluster.workers)) {
|
|
494
|
+
* worker.send('big announcement to all workers');
|
|
495
|
+
* }
|
|
496
|
+
* ```
|
|
497
|
+
* @since v0.7.0
|
|
498
|
+
*/
|
|
353
499
|
readonly workers?: NodeJS.Dict<Worker> | undefined;
|
|
354
500
|
readonly SCHED_NONE: number;
|
|
355
501
|
readonly SCHED_RR: number;
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The module exports two specific components:
|
|
6
6
|
*
|
|
7
|
-
* * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
|
|
8
|
-
* * A global `console` instance configured to write to `process.stdout`
|
|
7
|
+
* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
|
|
8
|
+
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
|
|
9
|
+
* [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('node:console')`.
|
|
9
10
|
*
|
|
10
11
|
* _**Warning**_: The global console object's methods are neither consistently
|
|
11
12
|
* synchronous like the browser APIs they resemble, nor are they consistently
|
|
12
|
-
* asynchronous like all other Node.js streams. See the `note on process I/O` for
|
|
13
|
+
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
|
|
13
14
|
* more information.
|
|
14
15
|
*
|
|
15
16
|
* Example using the global `console`:
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
54
55
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
55
56
|
* ```
|
|
56
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
57
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js)
|
|
57
58
|
*/
|
|
58
59
|
declare module "console" {
|
|
59
60
|
import console = require("node:console");
|
|
@@ -68,7 +69,8 @@ declare module "node:console" {
|
|
|
68
69
|
/**
|
|
69
70
|
* `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
|
|
70
71
|
* writes a message and does not otherwise affect execution. The output always
|
|
71
|
-
* starts with `"Assertion failed"`. If provided, `message` is formatted using
|
|
72
|
+
* starts with `"Assertion failed"`. If provided, `message` is formatted using
|
|
73
|
+
* [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args).
|
|
72
74
|
*
|
|
73
75
|
* If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
|
|
74
76
|
*
|
|
@@ -91,7 +93,7 @@ declare module "node:console" {
|
|
|
91
93
|
* TTY. When `stdout` is not a TTY, this method does nothing.
|
|
92
94
|
*
|
|
93
95
|
* The specific operation of `console.clear()` can vary across operating systems
|
|
94
|
-
* and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
|
|
96
|
+
* and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the
|
|
95
97
|
* current terminal viewport for the Node.js
|
|
96
98
|
* binary.
|
|
97
99
|
* @since v8.3.0
|
|
@@ -150,7 +152,7 @@ declare module "node:console" {
|
|
|
150
152
|
*/
|
|
151
153
|
debug(message?: any, ...optionalParams: any[]): void;
|
|
152
154
|
/**
|
|
153
|
-
* Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
|
|
155
|
+
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
|
|
154
156
|
* This function bypasses any custom `inspect()` function defined on `obj`.
|
|
155
157
|
* @since v0.1.101
|
|
156
158
|
*/
|
|
@@ -164,7 +166,8 @@ declare module "node:console" {
|
|
|
164
166
|
/**
|
|
165
167
|
* Prints to `stderr` with newline. Multiple arguments can be passed, with the
|
|
166
168
|
* first used as the primary message and all additional used as substitution
|
|
167
|
-
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
169
|
+
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
170
|
+
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
|
|
168
171
|
*
|
|
169
172
|
* ```js
|
|
170
173
|
* const code = 5;
|
|
@@ -174,13 +177,15 @@ declare module "node:console" {
|
|
|
174
177
|
* // Prints: error 5, to stderr
|
|
175
178
|
* ```
|
|
176
179
|
*
|
|
177
|
-
* If formatting elements (e.g. `%d`) are not found in the first string then
|
|
178
|
-
*
|
|
180
|
+
* If formatting elements (e.g. `%d`) are not found in the first string then
|
|
181
|
+
* [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the
|
|
182
|
+
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
|
|
183
|
+
* for more information.
|
|
179
184
|
* @since v0.1.100
|
|
180
185
|
*/
|
|
181
186
|
error(message?: any, ...optionalParams: any[]): void;
|
|
182
187
|
/**
|
|
183
|
-
* Increases indentation of subsequent lines by spaces for `groupIndentation`length.
|
|
188
|
+
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
|
|
184
189
|
*
|
|
185
190
|
* If one or more `label`s are provided, those are printed first without the
|
|
186
191
|
* additional indentation.
|
|
@@ -193,7 +198,7 @@ declare module "node:console" {
|
|
|
193
198
|
*/
|
|
194
199
|
groupCollapsed(...label: any[]): void;
|
|
195
200
|
/**
|
|
196
|
-
* Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
|
|
201
|
+
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
|
|
197
202
|
* @since v8.5.0
|
|
198
203
|
*/
|
|
199
204
|
groupEnd(): void;
|
|
@@ -205,7 +210,8 @@ declare module "node:console" {
|
|
|
205
210
|
/**
|
|
206
211
|
* Prints to `stdout` with newline. Multiple arguments can be passed, with the
|
|
207
212
|
* first used as the primary message and all additional used as substitution
|
|
208
|
-
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
213
|
+
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
214
|
+
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
|
|
209
215
|
*
|
|
210
216
|
* ```js
|
|
211
217
|
* const count = 5;
|
|
@@ -215,12 +221,12 @@ declare module "node:console" {
|
|
|
215
221
|
* // Prints: count: 5, to stdout
|
|
216
222
|
* ```
|
|
217
223
|
*
|
|
218
|
-
* See `util.format()` for more information.
|
|
224
|
+
* See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information.
|
|
219
225
|
* @since v0.1.100
|
|
220
226
|
*/
|
|
221
227
|
log(message?: any, ...optionalParams: any[]): void;
|
|
222
228
|
/**
|
|
223
|
-
* Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
|
|
229
|
+
* Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
|
|
224
230
|
* logging the argument if it can't be parsed as tabular.
|
|
225
231
|
*
|
|
226
232
|
* ```js
|
|
@@ -291,7 +297,8 @@ declare module "node:console" {
|
|
|
291
297
|
*/
|
|
292
298
|
timeLog(label?: string, ...data: any[]): void;
|
|
293
299
|
/**
|
|
294
|
-
* Prints to `stderr` the string `'Trace: '`, followed by the `util.format()`
|
|
300
|
+
* Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
|
|
301
|
+
* formatted message and stack trace to the current position in the code.
|
|
295
302
|
*
|
|
296
303
|
* ```js
|
|
297
304
|
* console.trace('Show me');
|
|
@@ -318,18 +325,32 @@ declare module "node:console" {
|
|
|
318
325
|
warn(message?: any, ...optionalParams: any[]): void;
|
|
319
326
|
// --- Inspector mode only ---
|
|
320
327
|
/**
|
|
321
|
-
* This method does not display anything unless used in the inspector.
|
|
322
|
-
*
|
|
328
|
+
* This method does not display anything unless used in the inspector. The `console.profile()`
|
|
329
|
+
* method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
|
|
330
|
+
* is called. The profile is then added to the Profile panel of the inspector.
|
|
331
|
+
*
|
|
332
|
+
* ```js
|
|
333
|
+
* console.profile('MyLabel');
|
|
334
|
+
* // Some code
|
|
335
|
+
* console.profileEnd('MyLabel');
|
|
336
|
+
* // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
|
|
337
|
+
* ```
|
|
338
|
+
* @since v8.0.0
|
|
323
339
|
*/
|
|
324
340
|
profile(label?: string): void;
|
|
325
341
|
/**
|
|
326
|
-
* This method does not display anything unless used in the inspector.
|
|
327
|
-
*
|
|
342
|
+
* This method does not display anything unless used in the inspector. Stops the current
|
|
343
|
+
* JavaScript CPU profiling session if one has been started and prints the report to the
|
|
344
|
+
* Profiles panel of the inspector. See {@link profile} for an example.
|
|
345
|
+
*
|
|
346
|
+
* If this method is called without a label, the most recently started profile is stopped.
|
|
347
|
+
* @since v8.0.0
|
|
328
348
|
*/
|
|
329
349
|
profileEnd(label?: string): void;
|
|
330
350
|
/**
|
|
331
|
-
* This method does not display anything unless used in the inspector.
|
|
332
|
-
*
|
|
351
|
+
* This method does not display anything unless used in the inspector. The `console.timeStamp()`
|
|
352
|
+
* method adds an event with the label `'label'` to the Timeline panel of the inspector.
|
|
353
|
+
* @since v8.0.0
|
|
333
354
|
*/
|
|
334
355
|
timeStamp(label?: string): void;
|
|
335
356
|
}
|
|
@@ -339,12 +360,13 @@ declare module "node:console" {
|
|
|
339
360
|
*
|
|
340
361
|
* The module exports two specific components:
|
|
341
362
|
*
|
|
342
|
-
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
|
|
343
|
-
* * A global `console` instance configured to write to `process.stdout`
|
|
363
|
+
* * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
|
|
364
|
+
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
|
|
365
|
+
* [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('console')`.
|
|
344
366
|
*
|
|
345
367
|
* _**Warning**_: The global console object's methods are neither consistently
|
|
346
368
|
* synchronous like the browser APIs they resemble, nor are they consistently
|
|
347
|
-
* asynchronous like all other Node.js streams. See the `note on process I/O` for
|
|
369
|
+
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
|
|
348
370
|
* more information.
|
|
349
371
|
*
|
|
350
372
|
* Example using the global `console`:
|
|
@@ -388,17 +410,32 @@ declare module "node:console" {
|
|
|
388
410
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
389
411
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
390
412
|
* ```
|
|
391
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
413
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js)
|
|
392
414
|
*/
|
|
393
415
|
namespace console {
|
|
394
416
|
interface ConsoleConstructorOptions {
|
|
395
417
|
stdout: NodeJS.WritableStream;
|
|
396
418
|
stderr?: NodeJS.WritableStream | undefined;
|
|
419
|
+
/**
|
|
420
|
+
* Ignore errors when writing to the underlying streams.
|
|
421
|
+
* @default true
|
|
422
|
+
*/
|
|
397
423
|
ignoreErrors?: boolean | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
|
|
426
|
+
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
|
|
427
|
+
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
|
|
428
|
+
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
|
|
429
|
+
* @default auto
|
|
430
|
+
*/
|
|
398
431
|
colorMode?: boolean | "auto" | undefined;
|
|
432
|
+
/**
|
|
433
|
+
* Specifies options that are passed along to
|
|
434
|
+
* [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options).
|
|
435
|
+
*/
|
|
399
436
|
inspectOptions?: InspectOptions | undefined;
|
|
400
437
|
/**
|
|
401
|
-
* Set group indentation
|
|
438
|
+
* Set group indentation.
|
|
402
439
|
* @default 2
|
|
403
440
|
*/
|
|
404
441
|
groupIndentation?: number | undefined;
|