@node-red/editor-client 3.1.8 → 4.0.0-beta.2
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/locales/de/editor.json +2 -0
- package/locales/en-US/editor.json +10 -1
- package/locales/fr/editor.json +8 -1
- package/locales/ja/editor.json +10 -3
- package/package.json +1 -1
- package/public/red/about +52 -0
- package/public/red/red.js +1433 -263
- package/public/red/red.min.js +3 -3
- package/public/red/style.min.css +2 -2
- package/public/red/tours/3.1/welcome.js +231 -0
- package/public/red/tours/images/nr4-auto-complete.png +0 -0
- package/public/red/tours/images/nr4-config-select.png +0 -0
- package/public/red/tours/images/nr4-multiplayer.png +0 -0
- package/public/red/tours/images/nr4-plugins.png +0 -0
- package/public/red/tours/images/nr4-sf-config.png +0 -0
- package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
- package/public/red/tours/welcome.js +105 -161
- package/public/types/node/assert/strict.d.ts +1 -1
- package/public/types/node/assert.d.ts +8 -9
- package/public/types/node/async_hooks.d.ts +9 -5
- package/public/types/node/buffer.d.ts +43 -18
- package/public/types/node/child_process.d.ts +8 -5
- package/public/types/node/cluster.d.ts +15 -19
- package/public/types/node/console.d.ts +2 -2
- package/public/types/node/crypto.d.ts +165 -70
- package/public/types/node/dgram.d.ts +4 -4
- package/public/types/node/diagnostics_channel.d.ts +8 -7
- package/public/types/node/dns/promises.d.ts +11 -9
- package/public/types/node/dns.d.ts +18 -13
- package/public/types/node/dom-events.d.ts +129 -0
- package/public/types/node/domain.d.ts +2 -2
- package/public/types/node/events.d.ts +49 -12
- package/public/types/node/fs/promises.d.ts +68 -24
- package/public/types/node/fs.d.ts +132 -59
- package/public/types/node/globals.d.ts +31 -17
- package/public/types/node/http.d.ts +138 -27
- package/public/types/node/http2.d.ts +38 -5
- package/public/types/node/https.d.ts +12 -3
- package/public/types/node/module.d.ts +1 -2
- package/public/types/node/net.d.ts +69 -28
- package/public/types/node/os.d.ts +16 -5
- package/public/types/node/path.d.ts +5 -5
- package/public/types/node/perf_hooks.d.ts +48 -9
- package/public/types/node/process.d.ts +18 -17
- package/public/types/node/querystring.d.ts +2 -2
- package/public/types/node/readline/promises.d.ts +146 -0
- package/public/types/node/readline.d.ts +141 -31
- package/public/types/node/stream/consumers.d.ts +2 -2
- package/public/types/node/stream/promises.d.ts +1 -1
- package/public/types/node/stream/web.d.ts +4 -66
- package/public/types/node/stream.d.ts +96 -118
- package/public/types/node/string_decoder.d.ts +2 -2
- package/public/types/node/test.d.ts +200 -16
- package/public/types/node/timers/promises.d.ts +1 -26
- package/public/types/node/timers.d.ts +2 -2
- package/public/types/node/tls.d.ts +21 -12
- package/public/types/node/trace_events.d.ts +12 -2
- package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
- package/public/types/node/ts4.8/assert.d.ts +964 -0
- package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
- package/public/types/node/ts4.8/buffer.d.ts +2262 -0
- package/public/types/node/ts4.8/child_process.d.ts +1372 -0
- package/public/types/node/ts4.8/cluster.d.ts +413 -0
- package/public/types/node/ts4.8/console.d.ts +415 -0
- package/public/types/node/ts4.8/crypto.d.ts +3967 -0
- package/public/types/node/ts4.8/dgram.d.ts +548 -0
- package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
- package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
- package/public/types/node/ts4.8/dns.d.ts +662 -0
- package/public/types/node/ts4.8/dom-events.d.ts +129 -0
- package/public/types/node/ts4.8/domain.d.ts +173 -0
- package/public/types/node/ts4.8/events.d.ts +681 -0
- package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
- package/public/types/node/ts4.8/fs.d.ts +3875 -0
- package/public/types/node/ts4.8/globals.d.ts +297 -0
- package/public/types/node/ts4.8/http.d.ts +1617 -0
- package/public/types/node/ts4.8/http2.d.ts +2137 -0
- package/public/types/node/ts4.8/https.d.ts +544 -0
- package/public/types/node/ts4.8/module.d.ts +117 -0
- package/public/types/node/ts4.8/net.d.ts +872 -0
- package/public/types/node/ts4.8/os.d.ts +469 -0
- package/public/types/node/ts4.8/path.d.ts +194 -0
- package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
- package/public/types/node/ts4.8/process.d.ts +1485 -0
- package/public/types/node/ts4.8/querystring.d.ts +134 -0
- package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
- package/public/types/node/ts4.8/readline.d.ts +656 -0
- package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
- package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
- package/public/types/node/ts4.8/stream/web.d.ts +333 -0
- package/public/types/node/ts4.8/stream.d.ts +1343 -0
- package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
- package/public/types/node/ts4.8/test.d.ts +377 -0
- package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
- package/public/types/node/ts4.8/timers.d.ts +97 -0
- package/public/types/node/ts4.8/tls.d.ts +1031 -0
- package/public/types/node/ts4.8/trace_events.d.ts +174 -0
- package/public/types/node/ts4.8/tty.d.ts +209 -0
- package/public/types/node/ts4.8/url.d.ts +900 -0
- package/public/types/node/ts4.8/util.d.ts +1853 -0
- package/public/types/node/ts4.8/v8.d.ts +399 -0
- package/public/types/node/ts4.8/vm.d.ts +512 -0
- package/public/types/node/ts4.8/wasi.d.ts +161 -0
- package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
- package/public/types/node/ts4.8/zlib.d.ts +520 -0
- package/public/types/node/tty.d.ts +5 -3
- package/public/types/node/url.d.ts +81 -39
- package/public/types/node/util.d.ts +269 -13
- package/public/types/node/v8.d.ts +22 -4
- package/public/types/node/vm.d.ts +7 -5
- package/public/types/node/wasi.d.ts +2 -2
- package/public/types/node/worker_threads.d.ts +51 -11
- package/public/types/node/zlib.d.ts +2 -2
- package/public/types/node-red/func.d.ts +26 -17
- package/public/vendor/ace/worker-jsonata.js +1 -1
- package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
- package/public/vendor/monaco/dist/css.worker.js +1 -1
- package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/editor.js +1 -29
- package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
- package/public/vendor/monaco/dist/editor.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/json.worker.js +1 -1
- package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/locale/cs.js +324 -106
- package/public/vendor/monaco/dist/locale/de.js +336 -118
- package/public/vendor/monaco/dist/locale/es.js +329 -111
- package/public/vendor/monaco/dist/locale/fr.js +334 -116
- package/public/vendor/monaco/dist/locale/it.js +327 -109
- package/public/vendor/monaco/dist/locale/ja.js +329 -111
- package/public/vendor/monaco/dist/locale/ko.js +330 -112
- package/public/vendor/monaco/dist/locale/pl.js +329 -111
- package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
- package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
- package/public/vendor/monaco/dist/locale/ru.js +331 -113
- package/public/vendor/monaco/dist/locale/tr.js +329 -111
- package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
- package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
- package/public/vendor/monaco/dist/ts.worker.js +2 -2
- package/public/vendor/vendor.js +1 -1
- package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
- /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `crypto` module provides cryptographic functionality that includes a set of
|
|
@@ -16,47 +16,73 @@
|
|
|
16
16
|
* // Prints:
|
|
17
17
|
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
18
18
|
* ```
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
19
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js)
|
|
20
20
|
*/
|
|
21
21
|
declare module 'crypto' {
|
|
22
22
|
import * as stream from 'node:stream';
|
|
23
23
|
import { PeerCertificate } from 'node:tls';
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* SPKAC is a Certificate Signing Request mechanism originally implemented by
|
|
26
|
+
* Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen).
|
|
27
|
+
*
|
|
28
|
+
* `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
|
|
29
|
+
* should not use this element anymore.
|
|
30
|
+
*
|
|
31
|
+
* The `crypto` module provides the `Certificate` class for working with SPKAC
|
|
32
|
+
* data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
|
|
33
|
+
* implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally.
|
|
34
|
+
* @since v0.11.8
|
|
35
|
+
*/
|
|
36
|
+
class Certificate {
|
|
25
37
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
38
|
+
* ```js
|
|
39
|
+
* const { Certificate } = await import('crypto');
|
|
40
|
+
* const spkac = getSpkacSomehow();
|
|
41
|
+
* const challenge = Certificate.exportChallenge(spkac);
|
|
42
|
+
* console.log(challenge.toString('utf8'));
|
|
43
|
+
* // Prints: the challenge as a UTF8 string
|
|
44
|
+
* ```
|
|
45
|
+
* @since v9.0.0
|
|
46
|
+
* @param encoding The `encoding` of the `spkac` string.
|
|
47
|
+
* @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
|
|
30
48
|
*/
|
|
31
|
-
exportChallenge(spkac: BinaryLike): Buffer;
|
|
49
|
+
static exportChallenge(spkac: BinaryLike): Buffer;
|
|
32
50
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
51
|
+
* ```js
|
|
52
|
+
* const { Certificate } = await import('crypto');
|
|
53
|
+
* const spkac = getSpkacSomehow();
|
|
54
|
+
* const publicKey = Certificate.exportPublicKey(spkac);
|
|
55
|
+
* console.log(publicKey);
|
|
56
|
+
* // Prints: the public key as <Buffer ...>
|
|
57
|
+
* ```
|
|
58
|
+
* @since v9.0.0
|
|
59
|
+
* @param encoding The `encoding` of the `spkac` string.
|
|
60
|
+
* @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
|
|
38
61
|
*/
|
|
39
|
-
exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
|
|
62
|
+
static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
|
|
40
63
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
64
|
+
* ```js
|
|
65
|
+
* import { Buffer } from 'buffer';
|
|
66
|
+
* const { Certificate } = await import('crypto');
|
|
67
|
+
*
|
|
68
|
+
* const spkac = getSpkacSomehow();
|
|
69
|
+
* console.log(Certificate.verifySpkac(Buffer.from(spkac)));
|
|
70
|
+
* // Prints: true or false
|
|
71
|
+
* ```
|
|
72
|
+
* @since v9.0.0
|
|
73
|
+
* @param encoding The `encoding` of the `spkac` string.
|
|
74
|
+
* @return `true` if the given `spkac` data structure is valid, `false` otherwise.
|
|
45
75
|
*/
|
|
46
|
-
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
|
47
|
-
}
|
|
48
|
-
const Certificate: Certificate & {
|
|
49
|
-
/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
|
|
50
|
-
new (): Certificate;
|
|
51
|
-
/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
|
|
52
|
-
(): Certificate;
|
|
76
|
+
static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
|
53
77
|
/**
|
|
78
|
+
* @deprecated
|
|
54
79
|
* @param spkac
|
|
55
80
|
* @returns The challenge component of the `spkac` data structure,
|
|
56
81
|
* which includes a public key and a challenge.
|
|
57
82
|
*/
|
|
58
83
|
exportChallenge(spkac: BinaryLike): Buffer;
|
|
59
84
|
/**
|
|
85
|
+
* @deprecated
|
|
60
86
|
* @param spkac
|
|
61
87
|
* @param encoding The encoding of the spkac string.
|
|
62
88
|
* @returns The public key component of the `spkac` data structure,
|
|
@@ -64,12 +90,13 @@ declare module 'crypto' {
|
|
|
64
90
|
*/
|
|
65
91
|
exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
|
|
66
92
|
/**
|
|
93
|
+
* @deprecated
|
|
67
94
|
* @param spkac
|
|
68
95
|
* @returns `true` if the given `spkac` data structure is valid,
|
|
69
96
|
* `false` otherwise.
|
|
70
97
|
*/
|
|
71
98
|
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
|
72
|
-
}
|
|
99
|
+
}
|
|
73
100
|
namespace constants {
|
|
74
101
|
// https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
|
|
75
102
|
const OPENSSL_VERSION_NUMBER: number;
|
|
@@ -175,7 +202,7 @@ declare module 'crypto' {
|
|
|
175
202
|
*
|
|
176
203
|
* The `algorithm` is dependent on the available algorithms supported by the
|
|
177
204
|
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
|
178
|
-
* On recent releases of OpenSSL, `openssl list -digest-algorithms`
|
|
205
|
+
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
|
179
206
|
* display the available digest algorithms.
|
|
180
207
|
*
|
|
181
208
|
* Example: generating the sha256 sum of a file
|
|
@@ -215,7 +242,7 @@ declare module 'crypto' {
|
|
|
215
242
|
*
|
|
216
243
|
* The `algorithm` is dependent on the available algorithms supported by the
|
|
217
244
|
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
|
218
|
-
* On recent releases of OpenSSL, `openssl list -digest-algorithms`
|
|
245
|
+
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
|
219
246
|
* display the available digest algorithms.
|
|
220
247
|
*
|
|
221
248
|
* The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
|
|
@@ -253,7 +280,7 @@ declare module 'crypto' {
|
|
|
253
280
|
*/
|
|
254
281
|
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
|
255
282
|
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
|
256
|
-
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
|
|
283
|
+
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
|
|
257
284
|
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
|
|
258
285
|
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
|
|
259
286
|
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
@@ -662,12 +689,13 @@ declare module 'crypto' {
|
|
|
662
689
|
* Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
|
|
663
690
|
*
|
|
664
691
|
* The `options` argument controls stream behavior and is optional except when a
|
|
665
|
-
* cipher in CCM or OCB mode
|
|
692
|
+
* 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
|
|
666
693
|
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
|
|
667
694
|
* tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
|
|
695
|
+
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
668
696
|
*
|
|
669
697
|
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
|
|
670
|
-
* recent OpenSSL releases, `openssl list -cipher-algorithms`
|
|
698
|
+
* recent OpenSSL releases, `openssl list -cipher-algorithms` will
|
|
671
699
|
* display the available cipher algorithms.
|
|
672
700
|
*
|
|
673
701
|
* The `password` is used to derive the cipher key and initialization vector (IV).
|
|
@@ -700,12 +728,13 @@ declare module 'crypto' {
|
|
|
700
728
|
* initialization vector (`iv`).
|
|
701
729
|
*
|
|
702
730
|
* The `options` argument controls stream behavior and is optional except when a
|
|
703
|
-
* cipher in CCM or OCB mode
|
|
731
|
+
* 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
|
|
704
732
|
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
|
|
705
733
|
* tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
|
|
734
|
+
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
706
735
|
*
|
|
707
736
|
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
|
|
708
|
-
* recent OpenSSL releases, `openssl list -cipher-algorithms`
|
|
737
|
+
* recent OpenSSL releases, `openssl list -cipher-algorithms` will
|
|
709
738
|
* display the available cipher algorithms.
|
|
710
739
|
*
|
|
711
740
|
* The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
|
|
@@ -925,8 +954,9 @@ declare module 'crypto' {
|
|
|
925
954
|
* Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
|
|
926
955
|
*
|
|
927
956
|
* The `options` argument controls stream behavior and is optional except when a
|
|
928
|
-
* cipher in CCM or OCB mode
|
|
957
|
+
* 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
|
|
929
958
|
* authentication tag in bytes, see `CCM mode`.
|
|
959
|
+
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
930
960
|
*
|
|
931
961
|
* The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
|
|
932
962
|
* function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
|
|
@@ -951,12 +981,13 @@ declare module 'crypto' {
|
|
|
951
981
|
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
|
|
952
982
|
*
|
|
953
983
|
* The `options` argument controls stream behavior and is optional except when a
|
|
954
|
-
* cipher in CCM or OCB mode
|
|
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
|
|
955
985
|
* 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
|
|
956
986
|
* to those with the specified length.
|
|
987
|
+
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
|
|
957
988
|
*
|
|
958
989
|
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
|
|
959
|
-
* recent OpenSSL releases, `openssl list -cipher-algorithms`
|
|
990
|
+
* recent OpenSSL releases, `openssl list -cipher-algorithms` will
|
|
960
991
|
* display the available cipher algorithms.
|
|
961
992
|
*
|
|
962
993
|
* The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
|
|
@@ -1162,13 +1193,11 @@ declare module 'crypto' {
|
|
|
1162
1193
|
format?: KeyFormat | undefined;
|
|
1163
1194
|
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
|
|
1164
1195
|
passphrase?: string | Buffer | undefined;
|
|
1165
|
-
encoding?: string | undefined;
|
|
1166
1196
|
}
|
|
1167
1197
|
interface PublicKeyInput {
|
|
1168
1198
|
key: string | Buffer;
|
|
1169
1199
|
format?: KeyFormat | undefined;
|
|
1170
1200
|
type?: 'pkcs1' | 'spki' | undefined;
|
|
1171
|
-
encoding?: string | undefined;
|
|
1172
1201
|
}
|
|
1173
1202
|
/**
|
|
1174
1203
|
* Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
|
@@ -1279,7 +1308,6 @@ declare module 'crypto' {
|
|
|
1279
1308
|
interface VerifyKeyObjectInput extends SigningOptions {
|
|
1280
1309
|
key: KeyObject;
|
|
1281
1310
|
}
|
|
1282
|
-
interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
|
1283
1311
|
type KeyLike = string | Buffer | KeyObject;
|
|
1284
1312
|
/**
|
|
1285
1313
|
* The `Sign` class is a utility for generating signatures. It can be used in one
|
|
@@ -1434,8 +1462,8 @@ declare module 'crypto' {
|
|
|
1434
1462
|
* be passed instead of a public key.
|
|
1435
1463
|
* @since v0.1.92
|
|
1436
1464
|
*/
|
|
1437
|
-
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput
|
|
1438
|
-
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput
|
|
1465
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
|
1466
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
|
|
1439
1467
|
}
|
|
1440
1468
|
/**
|
|
1441
1469
|
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
|
|
@@ -1453,10 +1481,10 @@ declare module 'crypto' {
|
|
|
1453
1481
|
* @param [generator=2]
|
|
1454
1482
|
* @param generatorEncoding The `encoding` of the `generator` string.
|
|
1455
1483
|
*/
|
|
1456
|
-
function createDiffieHellman(primeLength: number, generator?: number
|
|
1457
|
-
function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
|
|
1458
|
-
function createDiffieHellman(prime: string,
|
|
1459
|
-
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator
|
|
1484
|
+
function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
|
|
1485
|
+
function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
|
|
1486
|
+
function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
|
|
1487
|
+
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
|
|
1460
1488
|
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
|
|
1461
1489
|
/**
|
|
1462
1490
|
* The `DiffieHellman` class is a utility for creating Diffie-Hellman key
|
|
@@ -1805,7 +1833,7 @@ declare module 'crypto' {
|
|
|
1805
1833
|
* Return a random integer `n` such that `min <= n < max`. This
|
|
1806
1834
|
* implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
|
|
1807
1835
|
*
|
|
1808
|
-
* The range (`max - min`) must be less than
|
|
1836
|
+
* The range (`max - min`) must be less than 2^48. `min` and `max` must
|
|
1809
1837
|
* be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
|
|
1810
1838
|
*
|
|
1811
1839
|
* If the `callback` function is not provided, the random integer is
|
|
@@ -2281,11 +2309,11 @@ declare module 'crypto' {
|
|
|
2281
2309
|
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
|
|
2282
2310
|
* returned.
|
|
2283
2311
|
* @since v0.11.14
|
|
2284
|
-
* @param encoding The `encoding` of the return value.
|
|
2312
|
+
* @param [encoding] The `encoding` of the return value.
|
|
2285
2313
|
* @param [format='uncompressed']
|
|
2286
2314
|
* @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
|
|
2287
2315
|
*/
|
|
2288
|
-
getPublicKey(): Buffer;
|
|
2316
|
+
getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
|
|
2289
2317
|
getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
|
|
2290
2318
|
/**
|
|
2291
2319
|
* Sets the EC Diffie-Hellman private key.
|
|
@@ -2316,7 +2344,8 @@ declare module 'crypto' {
|
|
|
2316
2344
|
* comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
|
|
2317
2345
|
*
|
|
2318
2346
|
* `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
|
|
2319
|
-
* must have the same byte length.
|
|
2347
|
+
* must have the same byte length. An error is thrown if `a` and `b` have
|
|
2348
|
+
* different byte lengths.
|
|
2320
2349
|
*
|
|
2321
2350
|
* If at least one of `a` and `b` is a `TypedArray` with more than one byte per
|
|
2322
2351
|
* entry, such as `Uint16Array`, the result will be computed using the platform
|
|
@@ -2331,7 +2360,7 @@ declare module 'crypto' {
|
|
|
2331
2360
|
/** @deprecated since v10.0.0 */
|
|
2332
2361
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2333
2362
|
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2334
|
-
type KeyFormat = 'pem' | 'der'
|
|
2363
|
+
type KeyFormat = 'pem' | 'der';
|
|
2335
2364
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2336
2365
|
format: T;
|
|
2337
2366
|
cipher?: string | undefined;
|
|
@@ -2942,16 +2971,11 @@ declare module 'crypto' {
|
|
|
2942
2971
|
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
2943
2972
|
* @since v12.0.0
|
|
2944
2973
|
*/
|
|
2974
|
+
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
|
2945
2975
|
function verify(
|
|
2946
2976
|
algorithm: string | null | undefined,
|
|
2947
2977
|
data: NodeJS.ArrayBufferView,
|
|
2948
|
-
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput
|
|
2949
|
-
signature: NodeJS.ArrayBufferView
|
|
2950
|
-
): boolean;
|
|
2951
|
-
function verify(
|
|
2952
|
-
algorithm: string | null | undefined,
|
|
2953
|
-
data: NodeJS.ArrayBufferView,
|
|
2954
|
-
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
2978
|
+
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
|
|
2955
2979
|
signature: NodeJS.ArrayBufferView,
|
|
2956
2980
|
callback: (error: Error | null, result: boolean) => void
|
|
2957
2981
|
): void;
|
|
@@ -3100,34 +3124,33 @@ declare module 'crypto' {
|
|
|
3100
3124
|
*/
|
|
3101
3125
|
disableEntropyCache?: boolean | undefined;
|
|
3102
3126
|
}
|
|
3103
|
-
type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
|
3104
3127
|
/**
|
|
3105
3128
|
* Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
|
|
3106
3129
|
* cryptographic pseudorandom number generator.
|
|
3107
|
-
* @since v15.6.0
|
|
3130
|
+
* @since v15.6.0, v14.17.0
|
|
3108
3131
|
*/
|
|
3109
|
-
function randomUUID(options?: RandomUUIDOptions):
|
|
3132
|
+
function randomUUID(options?: RandomUUIDOptions): string;
|
|
3110
3133
|
interface X509CheckOptions {
|
|
3111
3134
|
/**
|
|
3112
3135
|
* @default 'always'
|
|
3113
3136
|
*/
|
|
3114
|
-
subject
|
|
3137
|
+
subject: 'always' | 'never';
|
|
3115
3138
|
/**
|
|
3116
3139
|
* @default true
|
|
3117
3140
|
*/
|
|
3118
|
-
wildcards
|
|
3141
|
+
wildcards: boolean;
|
|
3119
3142
|
/**
|
|
3120
3143
|
* @default true
|
|
3121
3144
|
*/
|
|
3122
|
-
partialWildcards
|
|
3145
|
+
partialWildcards: boolean;
|
|
3123
3146
|
/**
|
|
3124
3147
|
* @default false
|
|
3125
3148
|
*/
|
|
3126
|
-
multiLabelWildcards
|
|
3149
|
+
multiLabelWildcards: boolean;
|
|
3127
3150
|
/**
|
|
3128
3151
|
* @default false
|
|
3129
3152
|
*/
|
|
3130
|
-
singleLabelSubdomains
|
|
3153
|
+
singleLabelSubdomains: boolean;
|
|
3131
3154
|
}
|
|
3132
3155
|
/**
|
|
3133
3156
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -3144,12 +3167,16 @@ declare module 'crypto' {
|
|
|
3144
3167
|
*/
|
|
3145
3168
|
class X509Certificate {
|
|
3146
3169
|
/**
|
|
3147
|
-
* Will be \`true\` if this is a Certificate Authority (
|
|
3170
|
+
* Will be \`true\` if this is a Certificate Authority (CA) certificate.
|
|
3148
3171
|
* @since v15.6.0
|
|
3149
3172
|
*/
|
|
3150
3173
|
readonly ca: boolean;
|
|
3151
3174
|
/**
|
|
3152
3175
|
* The SHA-1 fingerprint of this certificate.
|
|
3176
|
+
*
|
|
3177
|
+
* Because SHA-1 is cryptographically broken and because the security of SHA-1 is
|
|
3178
|
+
* significantly worse than that of algorithms that are commonly used to sign
|
|
3179
|
+
* certificates, consider using `x509.fingerprint256` instead.
|
|
3153
3180
|
* @since v15.6.0
|
|
3154
3181
|
*/
|
|
3155
3182
|
readonly fingerprint: string;
|
|
@@ -3208,6 +3235,10 @@ declare module 'crypto' {
|
|
|
3208
3235
|
readonly raw: Buffer;
|
|
3209
3236
|
/**
|
|
3210
3237
|
* The serial number of this certificate.
|
|
3238
|
+
*
|
|
3239
|
+
* Serial numbers are assigned by certificate authorities and do not uniquely
|
|
3240
|
+
* identify certificates. Consider using `x509.fingerprint256` as a unique
|
|
3241
|
+
* identifier instead.
|
|
3211
3242
|
* @since v15.6.0
|
|
3212
3243
|
*/
|
|
3213
3244
|
readonly serialNumber: string;
|
|
@@ -3224,18 +3255,50 @@ declare module 'crypto' {
|
|
|
3224
3255
|
constructor(buffer: BinaryLike);
|
|
3225
3256
|
/**
|
|
3226
3257
|
* Checks whether the certificate matches the given email address.
|
|
3258
|
+
*
|
|
3259
|
+
* If the `'subject'` option is undefined or set to `'default'`, the certificate
|
|
3260
|
+
* subject is only considered if the subject alternative name extension either does
|
|
3261
|
+
* not exist or does not contain any email addresses.
|
|
3262
|
+
*
|
|
3263
|
+
* If the `'subject'` option is set to `'always'` and if the subject alternative
|
|
3264
|
+
* name extension either does not exist or does not contain a matching email
|
|
3265
|
+
* address, the certificate subject is considered.
|
|
3266
|
+
*
|
|
3267
|
+
* If the `'subject'` option is set to `'never'`, the certificate subject is never
|
|
3268
|
+
* considered, even if the certificate contains no subject alternative names.
|
|
3227
3269
|
* @since v15.6.0
|
|
3228
3270
|
* @return Returns `email` if the certificate matches, `undefined` if it does not.
|
|
3229
3271
|
*/
|
|
3230
3272
|
checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
|
|
3231
3273
|
/**
|
|
3232
3274
|
* Checks whether the certificate matches the given host name.
|
|
3275
|
+
*
|
|
3276
|
+
* If the certificate matches the given host name, the matching subject name is
|
|
3277
|
+
* returned. The returned name might be an exact match (e.g., `foo.example.com`)
|
|
3278
|
+
* or it might contain wildcards (e.g., `*.example.com`). Because host name
|
|
3279
|
+
* comparisons are case-insensitive, the returned subject name might also differ
|
|
3280
|
+
* from the given `name` in capitalization.
|
|
3281
|
+
*
|
|
3282
|
+
* If the `'subject'` option is undefined or set to `'default'`, the certificate
|
|
3283
|
+
* subject is only considered if the subject alternative name extension either does
|
|
3284
|
+
* not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
|
|
3285
|
+
*
|
|
3286
|
+
* If the `'subject'` option is set to `'always'` and if the subject alternative
|
|
3287
|
+
* name extension either does not exist or does not contain a matching DNS name,
|
|
3288
|
+
* the certificate subject is considered.
|
|
3289
|
+
*
|
|
3290
|
+
* If the `'subject'` option is set to `'never'`, the certificate subject is never
|
|
3291
|
+
* considered, even if the certificate contains no subject alternative names.
|
|
3233
3292
|
* @since v15.6.0
|
|
3234
|
-
* @return Returns
|
|
3293
|
+
* @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
|
|
3235
3294
|
*/
|
|
3236
3295
|
checkHost(name: string, options?: X509CheckOptions): string | undefined;
|
|
3237
3296
|
/**
|
|
3238
3297
|
* Checks whether the certificate matches the given IP address (IPv4 or IPv6).
|
|
3298
|
+
*
|
|
3299
|
+
* Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
|
|
3300
|
+
* must match the given `ip` address exactly. Other subject alternative names as
|
|
3301
|
+
* well as the subject field of the certificate are ignored.
|
|
3239
3302
|
* @since v15.6.0
|
|
3240
3303
|
* @return Returns `ip` if the certificate matches, `undefined` if it does not.
|
|
3241
3304
|
*/
|
|
@@ -3408,6 +3471,19 @@ declare module 'crypto' {
|
|
|
3408
3471
|
* @param [flags=crypto.constants.ENGINE_METHOD_ALL]
|
|
3409
3472
|
*/
|
|
3410
3473
|
function setEngine(engine: string, flags?: number): void;
|
|
3474
|
+
/**
|
|
3475
|
+
* A convenient alias for `crypto.webcrypto.getRandomValues()`.
|
|
3476
|
+
* This implementation is not compliant with the Web Crypto spec,
|
|
3477
|
+
* to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead.
|
|
3478
|
+
* @since v17.4.0
|
|
3479
|
+
* @returns Returns `typedArray`.
|
|
3480
|
+
*/
|
|
3481
|
+
function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
|
|
3482
|
+
/**
|
|
3483
|
+
* A convenient alias for `crypto.webcrypto.subtle`.
|
|
3484
|
+
* @since v17.4.0
|
|
3485
|
+
*/
|
|
3486
|
+
const subtle: webcrypto.SubtleCrypto;
|
|
3411
3487
|
/**
|
|
3412
3488
|
* An implementation of the Web Crypto API standard.
|
|
3413
3489
|
*
|
|
@@ -3565,7 +3641,7 @@ declare module 'crypto' {
|
|
|
3565
3641
|
* The UUID is generated using a cryptographic pseudorandom number generator.
|
|
3566
3642
|
* @since v16.7.0
|
|
3567
3643
|
*/
|
|
3568
|
-
randomUUID():
|
|
3644
|
+
randomUUID(): string;
|
|
3569
3645
|
CryptoKey: CryptoKeyConstructor;
|
|
3570
3646
|
}
|
|
3571
3647
|
// This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
|
|
@@ -3650,17 +3726,22 @@ declare module 'crypto' {
|
|
|
3650
3726
|
/**
|
|
3651
3727
|
* Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
|
|
3652
3728
|
* `subtle.deriveBits()` attempts to generate `length` bits.
|
|
3653
|
-
* The Node.js implementation requires that `length` is a multiple of `8`.
|
|
3729
|
+
* The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
|
|
3730
|
+
* When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
|
|
3731
|
+
* for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
|
|
3654
3732
|
* If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
|
|
3655
3733
|
*
|
|
3656
3734
|
* The algorithms currently supported include:
|
|
3657
3735
|
*
|
|
3658
3736
|
* - `'ECDH'`
|
|
3737
|
+
* - `'X25519'`
|
|
3738
|
+
* - `'X448'`
|
|
3659
3739
|
* - `'HKDF'`
|
|
3660
3740
|
* - `'PBKDF2'`
|
|
3661
3741
|
* @since v15.0.0
|
|
3662
3742
|
*/
|
|
3663
|
-
deriveBits(algorithm:
|
|
3743
|
+
deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise<ArrayBuffer>;
|
|
3744
|
+
deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
|
3664
3745
|
/**
|
|
3665
3746
|
* Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
|
|
3666
3747
|
* `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
|
|
@@ -3671,6 +3752,8 @@ declare module 'crypto' {
|
|
|
3671
3752
|
* The algorithms currently supported include:
|
|
3672
3753
|
*
|
|
3673
3754
|
* - `'ECDH'`
|
|
3755
|
+
* - `'X25519'`
|
|
3756
|
+
* - `'X448'`
|
|
3674
3757
|
* - `'HKDF'`
|
|
3675
3758
|
* - `'PBKDF2'`
|
|
3676
3759
|
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
@@ -3739,7 +3822,11 @@ declare module 'crypto' {
|
|
|
3739
3822
|
* - `'RSA-PSS'`
|
|
3740
3823
|
* - `'RSA-OAEP'`
|
|
3741
3824
|
* - `'ECDSA'`
|
|
3825
|
+
* - `'Ed25519'`
|
|
3826
|
+
* - `'Ed448'`
|
|
3742
3827
|
* - `'ECDH'`
|
|
3828
|
+
* - `'X25519'`
|
|
3829
|
+
* - `'X448'`
|
|
3743
3830
|
* The `<CryptoKey>` (secret key) generating algorithms supported include:
|
|
3744
3831
|
*
|
|
3745
3832
|
* - `'HMAC'`
|
|
@@ -3787,6 +3874,8 @@ declare module 'crypto' {
|
|
|
3787
3874
|
* - `'RSASSA-PKCS1-v1_5'`
|
|
3788
3875
|
* - `'RSA-PSS'`
|
|
3789
3876
|
* - `'ECDSA'`
|
|
3877
|
+
* - `'Ed25519'`
|
|
3878
|
+
* - `'Ed448'`
|
|
3790
3879
|
* - `'HMAC'`
|
|
3791
3880
|
* @since v15.0.0
|
|
3792
3881
|
*/
|
|
@@ -3812,7 +3901,11 @@ declare module 'crypto' {
|
|
|
3812
3901
|
* - `'RSA-PSS'`
|
|
3813
3902
|
* - `'RSA-OAEP'`
|
|
3814
3903
|
* - `'ECDSA'`
|
|
3904
|
+
* - `'Ed25519'`
|
|
3905
|
+
* - `'Ed448'`
|
|
3815
3906
|
* - `'ECDH'`
|
|
3907
|
+
* - `'X25519'`
|
|
3908
|
+
* - `'X448'`
|
|
3816
3909
|
* - `'HMAC'`
|
|
3817
3910
|
* - `'AES-CTR'`
|
|
3818
3911
|
* - `'AES-CBC'`
|
|
@@ -3841,6 +3934,8 @@ declare module 'crypto' {
|
|
|
3841
3934
|
* - `'RSASSA-PKCS1-v1_5'`
|
|
3842
3935
|
* - `'RSA-PSS'`
|
|
3843
3936
|
* - `'ECDSA'`
|
|
3937
|
+
* - `'Ed25519'`
|
|
3938
|
+
* - `'Ed448'`
|
|
3844
3939
|
* - `'HMAC'`
|
|
3845
3940
|
* @since v15.0.0
|
|
3846
3941
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `dgram` module provides an implementation of UDP datagram sockets.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* server.bind(41234);
|
|
27
27
|
* // Prints: server listening 0.0.0.0:41234
|
|
28
28
|
* ```
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'dgram' {
|
|
32
32
|
import { AddressInfo } from 'node:net';
|
|
@@ -263,7 +263,7 @@ declare module 'dgram' {
|
|
|
263
263
|
*
|
|
264
264
|
* The `address` argument is a string. If the value of `address` is a host name,
|
|
265
265
|
* DNS will be used to resolve the address of the host. If `address` is not
|
|
266
|
-
* provided or otherwise
|
|
266
|
+
* provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
|
|
267
267
|
*
|
|
268
268
|
* If the socket has not been previously bound with a call to `bind`, the socket
|
|
269
269
|
* is assigned a random port number and is bound to the "all interfaces" address
|
|
@@ -454,7 +454,7 @@ declare module 'dgram' {
|
|
|
454
454
|
* TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
|
|
455
455
|
* Changing TTL values is typically done for network probes or when multicasting.
|
|
456
456
|
*
|
|
457
|
-
* The `ttl` argument may be between
|
|
457
|
+
* The `ttl` argument may be between 1 and 255\. The default on most systems
|
|
458
458
|
* is 64.
|
|
459
459
|
*
|
|
460
460
|
* This method throws `EBADF` if called on an unbound socket.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `diagnostics_channel` module provides an API to create named channels
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* should generally include the module name to avoid collisions with data from
|
|
24
24
|
* other modules.
|
|
25
25
|
* @experimental
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
26
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module 'diagnostics_channel' {
|
|
29
29
|
/**
|
|
@@ -44,7 +44,7 @@ declare module 'diagnostics_channel' {
|
|
|
44
44
|
* @param name The channel name
|
|
45
45
|
* @return If there are active subscribers
|
|
46
46
|
*/
|
|
47
|
-
function hasSubscribers(name: string
|
|
47
|
+
function hasSubscribers(name: string): boolean;
|
|
48
48
|
/**
|
|
49
49
|
* This is the primary entry-point for anyone wanting to interact with a named
|
|
50
50
|
* channel. It produces a channel object which is optimized to reduce overhead at
|
|
@@ -59,8 +59,8 @@ declare module 'diagnostics_channel' {
|
|
|
59
59
|
* @param name The channel name
|
|
60
60
|
* @return The named channel object
|
|
61
61
|
*/
|
|
62
|
-
function channel(name: string
|
|
63
|
-
type ChannelListener = (message: unknown, name: string
|
|
62
|
+
function channel(name: string): Channel;
|
|
63
|
+
type ChannelListener = (message: unknown, name: string) => void;
|
|
64
64
|
/**
|
|
65
65
|
* The class `Channel` represents an individual named channel within the data
|
|
66
66
|
* pipeline. It is use to track subscribers and to publish messages when there
|
|
@@ -71,7 +71,7 @@ declare module 'diagnostics_channel' {
|
|
|
71
71
|
* @since v15.1.0, v14.17.0
|
|
72
72
|
*/
|
|
73
73
|
class Channel {
|
|
74
|
-
readonly name: string
|
|
74
|
+
readonly name: string;
|
|
75
75
|
/**
|
|
76
76
|
* Check if there are active subscribers to this channel. This is helpful if
|
|
77
77
|
* the message you want to send might be expensive to prepare.
|
|
@@ -91,7 +91,7 @@ declare module 'diagnostics_channel' {
|
|
|
91
91
|
* @since v15.1.0, v14.17.0
|
|
92
92
|
*/
|
|
93
93
|
readonly hasSubscribers: boolean;
|
|
94
|
-
private constructor(name: string
|
|
94
|
+
private constructor(name: string);
|
|
95
95
|
/**
|
|
96
96
|
* Publish a message to any subscribers to the channel. This will
|
|
97
97
|
* trigger message handlers synchronously so they will execute within
|
|
@@ -146,6 +146,7 @@ declare module 'diagnostics_channel' {
|
|
|
146
146
|
* ```
|
|
147
147
|
* @since v15.1.0, v14.17.0
|
|
148
148
|
* @param onMessage The previous subscribed handler to remove
|
|
149
|
+
* @return `true` if the handler was found, `false` otherwise.
|
|
149
150
|
*/
|
|
150
151
|
unsubscribe(onMessage: ChannelListener): void;
|
|
151
152
|
}
|