@node-red/editor-client 4.0.0-beta.1 → 4.0.0-beta.3
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 +9 -1
- package/locales/fr/editor.json +17 -3
- package/locales/ja/editor.json +18 -4
- package/package.json +1 -1
- package/public/red/about +70 -0
- package/public/red/red.js +1602 -425
- package/public/red/red.min.js +3 -3
- package/public/red/style.min.css +2 -2
- package/public/red/tours/3.1/welcome.js +8 -8
- package/public/red/tours/images/nr4-background-deploy.png +0 -0
- package/public/red/tours/images/nr4-config-select.png +0 -0
- package/public/red/tours/images/nr4-diff-update.png +0 -0
- package/public/red/tours/images/nr4-multiplayer-location.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/welcome.js +166 -11
- 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/types/node-red/util.d.ts +1 -1
- 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
|
@@ -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
|
}
|
|
@@ -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 `dns.promises` API provides an alternative set of asynchronous DNS methods
|
|
@@ -192,7 +192,7 @@ declare module 'dns/promises' {
|
|
|
192
192
|
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
|
|
193
193
|
* the `Promise` is resolved with an array of objects containing available
|
|
194
194
|
* certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
|
|
195
|
-
* @since v15.0.0
|
|
195
|
+
* @since v15.0.0, v14.17.0
|
|
196
196
|
*/
|
|
197
197
|
function resolveCaa(hostname: string): Promise<CaaRecord[]>;
|
|
198
198
|
/**
|
|
@@ -335,14 +335,16 @@ declare module 'dns/promises' {
|
|
|
335
335
|
*/
|
|
336
336
|
function setServers(servers: ReadonlyArray<string>): void;
|
|
337
337
|
/**
|
|
338
|
-
* Set the default value of `verbatim` in
|
|
339
|
-
* - `ipv4first`: sets default `verbatim` `false`.
|
|
340
|
-
* - `verbatim`: sets default `verbatim` `true`.
|
|
338
|
+
* Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
|
|
341
339
|
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
340
|
+
* * `ipv4first`: sets default `verbatim` `false`.
|
|
341
|
+
* * `verbatim`: sets default `verbatim` `true`.
|
|
342
|
+
*
|
|
343
|
+
* The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
|
|
344
|
+
* higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
|
|
345
|
+
* default dns orders in workers.
|
|
346
|
+
* @since v16.4.0, v14.18.0
|
|
347
|
+
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
346
348
|
*/
|
|
347
349
|
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
|
348
350
|
class Resolver {
|
|
@@ -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 `dns` module enables name resolution. For example, use it to look up IP
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
47
|
* See the `Implementation considerations section` for more information.
|
|
48
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
48
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
|
|
49
49
|
*/
|
|
50
50
|
declare module 'dns' {
|
|
51
51
|
import * as dnsPromises from 'node:dns/promises';
|
|
@@ -61,6 +61,9 @@ declare module 'dns' {
|
|
|
61
61
|
family?: number | undefined;
|
|
62
62
|
hints?: number | undefined;
|
|
63
63
|
all?: boolean | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
64
67
|
verbatim?: boolean | undefined;
|
|
65
68
|
}
|
|
66
69
|
export interface LookupOneOptions extends LookupOptions {
|
|
@@ -174,7 +177,7 @@ declare module 'dns' {
|
|
|
174
177
|
type: 'AAAA';
|
|
175
178
|
}
|
|
176
179
|
export interface CaaRecord {
|
|
177
|
-
|
|
180
|
+
critial: number;
|
|
178
181
|
issue?: string | undefined;
|
|
179
182
|
issuewild?: string | undefined;
|
|
180
183
|
iodef?: string | undefined;
|
|
@@ -317,7 +320,7 @@ declare module 'dns' {
|
|
|
317
320
|
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
|
|
318
321
|
* will contain an array of certification authority authorization records
|
|
319
322
|
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
|
320
|
-
* @since v15.0.0
|
|
323
|
+
* @since v15.0.0, v14.17.0
|
|
321
324
|
*/
|
|
322
325
|
export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
|
|
323
326
|
export namespace resolveCaa {
|
|
@@ -530,14 +533,16 @@ declare module 'dns' {
|
|
|
530
533
|
*/
|
|
531
534
|
export function getServers(): string[];
|
|
532
535
|
/**
|
|
533
|
-
* Set the default value of `verbatim` in {@link lookup}. The value could be:
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
* @
|
|
540
|
-
*
|
|
536
|
+
* Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
|
|
537
|
+
*
|
|
538
|
+
* * `ipv4first`: sets default `verbatim` `false`.
|
|
539
|
+
* * `verbatim`: sets default `verbatim` `true`.
|
|
540
|
+
*
|
|
541
|
+
* The default is `ipv4first` and {@link setDefaultResultOrder} have higher
|
|
542
|
+
* priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
|
|
543
|
+
* dns orders in workers.
|
|
544
|
+
* @since v16.4.0, v14.18.0
|
|
545
|
+
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
541
546
|
*/
|
|
542
547
|
export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
|
543
548
|
// Error codes
|
|
@@ -643,7 +648,7 @@ declare module 'dns' {
|
|
|
643
648
|
* The resolver will use the v4 local address when making requests to IPv4 DNS
|
|
644
649
|
* servers, and the v6 local address when making requests to IPv6 DNS servers.
|
|
645
650
|
* The `rrtype` of resolution requests has no impact on the local address used.
|
|
646
|
-
* @since v15.1.0
|
|
651
|
+
* @since v15.1.0, v14.17.0
|
|
647
652
|
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
|
|
648
653
|
* @param [ipv6='::0'] A string representation of an IPv6 address.
|
|
649
654
|
*/
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
|
|
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
|
+
|
|
4
|
+
export {}; // Don't export anything!
|
|
5
|
+
|
|
6
|
+
//// DOM-like Events
|
|
7
|
+
// NB: The Event / EventTarget / EventListener implementations below were copied
|
|
8
|
+
// from lib.dom.d.ts, then edited to reflect Node's documentation at
|
|
9
|
+
// https://nodejs.org/api/events.html#class-eventtarget.
|
|
10
|
+
// Please read that link to understand important implementation differences.
|
|
11
|
+
|
|
12
|
+
// This conditional type will be the existing global Event in a browser, or
|
|
13
|
+
// the copy below in a Node environment.
|
|
14
|
+
type __Event = typeof globalThis extends { onmessage: any, Event: any }
|
|
15
|
+
? {}
|
|
16
|
+
: {
|
|
17
|
+
/** This is not used in Node.js and is provided purely for completeness. */
|
|
18
|
+
readonly bubbles: boolean;
|
|
19
|
+
/** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
|
|
20
|
+
cancelBubble: () => void;
|
|
21
|
+
/** True if the event was created with the cancelable option */
|
|
22
|
+
readonly cancelable: boolean;
|
|
23
|
+
/** This is not used in Node.js and is provided purely for completeness. */
|
|
24
|
+
readonly composed: boolean;
|
|
25
|
+
/** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
|
|
26
|
+
composedPath(): [EventTarget?]
|
|
27
|
+
/** Alias for event.target. */
|
|
28
|
+
readonly currentTarget: EventTarget | null;
|
|
29
|
+
/** Is true if cancelable is true and event.preventDefault() has been called. */
|
|
30
|
+
readonly defaultPrevented: boolean;
|
|
31
|
+
/** This is not used in Node.js and is provided purely for completeness. */
|
|
32
|
+
readonly eventPhase: 0 | 2;
|
|
33
|
+
/** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
|
|
34
|
+
readonly isTrusted: boolean;
|
|
35
|
+
/** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
|
|
36
|
+
preventDefault(): void;
|
|
37
|
+
/** This is not used in Node.js and is provided purely for completeness. */
|
|
38
|
+
returnValue: boolean;
|
|
39
|
+
/** Alias for event.target. */
|
|
40
|
+
readonly srcElement: EventTarget | null;
|
|
41
|
+
/** Stops the invocation of event listeners after the current one completes. */
|
|
42
|
+
stopImmediatePropagation(): void;
|
|
43
|
+
/** This is not used in Node.js and is provided purely for completeness. */
|
|
44
|
+
stopPropagation(): void;
|
|
45
|
+
/** The `EventTarget` dispatching the event */
|
|
46
|
+
readonly target: EventTarget | null;
|
|
47
|
+
/** The millisecond timestamp when the Event object was created. */
|
|
48
|
+
readonly timeStamp: number;
|
|
49
|
+
/** Returns the type of event, e.g. "click", "hashchange", or "submit". */
|
|
50
|
+
readonly type: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// See comment above explaining conditional type
|
|
54
|
+
type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
|
|
55
|
+
? {}
|
|
56
|
+
: {
|
|
57
|
+
/**
|
|
58
|
+
* Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
|
|
59
|
+
*
|
|
60
|
+
* If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
|
|
61
|
+
*
|
|
62
|
+
* The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
|
|
63
|
+
* Specifically, the `capture` option is used as part of the key when registering a `listener`.
|
|
64
|
+
* Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
|
|
65
|
+
*/
|
|
66
|
+
addEventListener(
|
|
67
|
+
type: string,
|
|
68
|
+
listener: EventListener | EventListenerObject,
|
|
69
|
+
options?: AddEventListenerOptions | boolean,
|
|
70
|
+
): void;
|
|
71
|
+
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
|
|
72
|
+
dispatchEvent(event: Event): boolean;
|
|
73
|
+
/** Removes the event listener in target's event listener list with the same type, callback, and options. */
|
|
74
|
+
removeEventListener(
|
|
75
|
+
type: string,
|
|
76
|
+
listener: EventListener | EventListenerObject,
|
|
77
|
+
options?: EventListenerOptions | boolean,
|
|
78
|
+
): void;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
interface EventInit {
|
|
82
|
+
bubbles?: boolean;
|
|
83
|
+
cancelable?: boolean;
|
|
84
|
+
composed?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface EventListenerOptions {
|
|
88
|
+
/** Not directly used by Node.js. Added for API completeness. Default: `false`. */
|
|
89
|
+
capture?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface AddEventListenerOptions extends EventListenerOptions {
|
|
93
|
+
/** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
|
|
94
|
+
once?: boolean;
|
|
95
|
+
/** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
|
|
96
|
+
passive?: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface EventListener {
|
|
100
|
+
(evt: Event): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface EventListenerObject {
|
|
104
|
+
handleEvent(object: Event): void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
import {} from 'events'; // Make this an ambient declaration
|
|
108
|
+
declare global {
|
|
109
|
+
/** An event which takes place in the DOM. */
|
|
110
|
+
interface Event extends __Event {}
|
|
111
|
+
var Event: typeof globalThis extends { onmessage: any, Event: infer T }
|
|
112
|
+
? T
|
|
113
|
+
: {
|
|
114
|
+
prototype: __Event;
|
|
115
|
+
new (type: string, eventInitDict?: EventInit): __Event;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* EventTarget is a DOM interface implemented by objects that can
|
|
120
|
+
* receive events and may have listeners for them.
|
|
121
|
+
*/
|
|
122
|
+
interface EventTarget extends __EventTarget {}
|
|
123
|
+
var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
|
|
124
|
+
? T
|
|
125
|
+
: {
|
|
126
|
+
prototype: __EventTarget;
|
|
127
|
+
new (): __EventTarget;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
@@ -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
|
* **This module is pending deprecation.** Once a replacement API has been
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
|
|
16
16
|
* exit immediately with an error code.
|
|
17
17
|
* @deprecated Since v1.4.2 - Deprecated
|
|
18
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
18
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
|
|
19
19
|
*/
|
|
20
20
|
declare module 'domain' {
|
|
21
21
|
import EventEmitter = require('node:events');
|
|
@@ -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
|
* Much of the Node.js core API is built around an idiomatic asynchronous
|
|
@@ -35,19 +35,56 @@
|
|
|
35
35
|
* });
|
|
36
36
|
* myEmitter.emit('event');
|
|
37
37
|
* ```
|
|
38
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
38
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
|
|
39
39
|
*/
|
|
40
40
|
declare module 'events' {
|
|
41
|
+
// NOTE: This class is in the docs but is **not actually exported** by Node.
|
|
42
|
+
// If https://github.com/nodejs/node/issues/39903 gets resolved and Node
|
|
43
|
+
// actually starts exporting the class, uncomment below.
|
|
44
|
+
|
|
45
|
+
// import { EventListener, EventListenerObject } from '__dom-events';
|
|
46
|
+
// /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
|
|
47
|
+
// interface NodeEventTarget extends EventTarget {
|
|
48
|
+
// /**
|
|
49
|
+
// * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
|
|
50
|
+
// * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
|
|
51
|
+
// */
|
|
52
|
+
// addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
|
|
53
|
+
// /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
|
|
54
|
+
// eventNames(): string[];
|
|
55
|
+
// /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
|
|
56
|
+
// listenerCount(type: string): number;
|
|
57
|
+
// /** Node.js-specific alias for `eventTarget.removeListener()`. */
|
|
58
|
+
// off(type: string, listener: EventListener | EventListenerObject): this;
|
|
59
|
+
// /** Node.js-specific alias for `eventTarget.addListener()`. */
|
|
60
|
+
// on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
|
|
61
|
+
// /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
|
|
62
|
+
// once(type: string, listener: EventListener | EventListenerObject): this;
|
|
63
|
+
// /**
|
|
64
|
+
// * Node.js-specific extension to the `EventTarget` class.
|
|
65
|
+
// * If `type` is specified, removes all registered listeners for `type`,
|
|
66
|
+
// * otherwise removes all registered listeners.
|
|
67
|
+
// */
|
|
68
|
+
// removeAllListeners(type: string): this;
|
|
69
|
+
// /**
|
|
70
|
+
// * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
|
|
71
|
+
// * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
|
|
72
|
+
// */
|
|
73
|
+
// removeListener(type: string, listener: EventListener | EventListenerObject): this;
|
|
74
|
+
// }
|
|
75
|
+
|
|
41
76
|
interface EventEmitterOptions {
|
|
42
77
|
/**
|
|
43
78
|
* Enables automatic capturing of promise rejection.
|
|
44
79
|
*/
|
|
45
80
|
captureRejections?: boolean | undefined;
|
|
46
81
|
}
|
|
47
|
-
|
|
82
|
+
// Any EventTarget with a Node-style `once` function
|
|
83
|
+
interface _NodeEventTarget {
|
|
48
84
|
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
49
85
|
}
|
|
50
|
-
|
|
86
|
+
// Any EventTarget with a DOM-style `addEventListener`
|
|
87
|
+
interface _DOMEventTarget {
|
|
51
88
|
addEventListener(
|
|
52
89
|
eventName: string,
|
|
53
90
|
listener: (...args: any[]) => void,
|
|
@@ -157,8 +194,8 @@ declare module 'events' {
|
|
|
157
194
|
* ```
|
|
158
195
|
* @since v11.13.0, v10.16.0
|
|
159
196
|
*/
|
|
160
|
-
static once(emitter:
|
|
161
|
-
static once(emitter:
|
|
197
|
+
static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
|
|
198
|
+
static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
|
|
162
199
|
/**
|
|
163
200
|
* ```js
|
|
164
201
|
* const { on, EventEmitter } = require('events');
|
|
@@ -260,9 +297,9 @@ declare module 'events' {
|
|
|
260
297
|
* getEventListeners(et, 'foo'); // [listener]
|
|
261
298
|
* }
|
|
262
299
|
* ```
|
|
263
|
-
* @since v15.2.0
|
|
300
|
+
* @since v15.2.0, v14.17.0
|
|
264
301
|
*/
|
|
265
|
-
static getEventListeners(emitter:
|
|
302
|
+
static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
|
|
266
303
|
/**
|
|
267
304
|
* ```js
|
|
268
305
|
* const {
|
|
@@ -280,7 +317,7 @@ declare module 'events' {
|
|
|
280
317
|
* @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
|
|
281
318
|
* objects.
|
|
282
319
|
*/
|
|
283
|
-
static setMaxListeners(n?: number, ...eventTargets: Array<
|
|
320
|
+
static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
|
|
284
321
|
/**
|
|
285
322
|
* This symbol shall be used to install a listener for only monitoring `'error'`
|
|
286
323
|
* events. Listeners installed using this symbol are called before the regular
|
|
@@ -396,8 +433,8 @@ declare module 'events' {
|
|
|
396
433
|
* called multiple times to remove each instance.
|
|
397
434
|
*
|
|
398
435
|
* Once an event is emitted, all listeners attached to it at the
|
|
399
|
-
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting
|
|
400
|
-
* not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
436
|
+
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
|
|
437
|
+
* will not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
401
438
|
*
|
|
402
439
|
* ```js
|
|
403
440
|
* const myEmitter = new MyEmitter();
|
|
@@ -599,7 +636,7 @@ declare module 'events' {
|
|
|
599
636
|
*/
|
|
600
637
|
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
601
638
|
/**
|
|
602
|
-
* Adds a **one-time**`listener` function for the event named `eventName` to
|
|
639
|
+
* Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
|
603
640
|
* listener is removed, and then invoked.
|
|
604
641
|
*
|
|
605
642
|
* ```js
|