@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.
Files changed (149) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/en-US/editor.json +10 -1
  3. package/locales/fr/editor.json +8 -1
  4. package/locales/ja/editor.json +10 -3
  5. package/package.json +1 -1
  6. package/public/red/about +52 -0
  7. package/public/red/red.js +1433 -263
  8. package/public/red/red.min.js +3 -3
  9. package/public/red/style.min.css +2 -2
  10. package/public/red/tours/3.1/welcome.js +231 -0
  11. package/public/red/tours/images/nr4-auto-complete.png +0 -0
  12. package/public/red/tours/images/nr4-config-select.png +0 -0
  13. package/public/red/tours/images/nr4-multiplayer.png +0 -0
  14. package/public/red/tours/images/nr4-plugins.png +0 -0
  15. package/public/red/tours/images/nr4-sf-config.png +0 -0
  16. package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
  17. package/public/red/tours/welcome.js +105 -161
  18. package/public/types/node/assert/strict.d.ts +1 -1
  19. package/public/types/node/assert.d.ts +8 -9
  20. package/public/types/node/async_hooks.d.ts +9 -5
  21. package/public/types/node/buffer.d.ts +43 -18
  22. package/public/types/node/child_process.d.ts +8 -5
  23. package/public/types/node/cluster.d.ts +15 -19
  24. package/public/types/node/console.d.ts +2 -2
  25. package/public/types/node/crypto.d.ts +165 -70
  26. package/public/types/node/dgram.d.ts +4 -4
  27. package/public/types/node/diagnostics_channel.d.ts +8 -7
  28. package/public/types/node/dns/promises.d.ts +11 -9
  29. package/public/types/node/dns.d.ts +18 -13
  30. package/public/types/node/dom-events.d.ts +129 -0
  31. package/public/types/node/domain.d.ts +2 -2
  32. package/public/types/node/events.d.ts +49 -12
  33. package/public/types/node/fs/promises.d.ts +68 -24
  34. package/public/types/node/fs.d.ts +132 -59
  35. package/public/types/node/globals.d.ts +31 -17
  36. package/public/types/node/http.d.ts +138 -27
  37. package/public/types/node/http2.d.ts +38 -5
  38. package/public/types/node/https.d.ts +12 -3
  39. package/public/types/node/module.d.ts +1 -2
  40. package/public/types/node/net.d.ts +69 -28
  41. package/public/types/node/os.d.ts +16 -5
  42. package/public/types/node/path.d.ts +5 -5
  43. package/public/types/node/perf_hooks.d.ts +48 -9
  44. package/public/types/node/process.d.ts +18 -17
  45. package/public/types/node/querystring.d.ts +2 -2
  46. package/public/types/node/readline/promises.d.ts +146 -0
  47. package/public/types/node/readline.d.ts +141 -31
  48. package/public/types/node/stream/consumers.d.ts +2 -2
  49. package/public/types/node/stream/promises.d.ts +1 -1
  50. package/public/types/node/stream/web.d.ts +4 -66
  51. package/public/types/node/stream.d.ts +96 -118
  52. package/public/types/node/string_decoder.d.ts +2 -2
  53. package/public/types/node/test.d.ts +200 -16
  54. package/public/types/node/timers/promises.d.ts +1 -26
  55. package/public/types/node/timers.d.ts +2 -2
  56. package/public/types/node/tls.d.ts +21 -12
  57. package/public/types/node/trace_events.d.ts +12 -2
  58. package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
  59. package/public/types/node/ts4.8/assert.d.ts +964 -0
  60. package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
  61. package/public/types/node/ts4.8/buffer.d.ts +2262 -0
  62. package/public/types/node/ts4.8/child_process.d.ts +1372 -0
  63. package/public/types/node/ts4.8/cluster.d.ts +413 -0
  64. package/public/types/node/ts4.8/console.d.ts +415 -0
  65. package/public/types/node/ts4.8/crypto.d.ts +3967 -0
  66. package/public/types/node/ts4.8/dgram.d.ts +548 -0
  67. package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
  68. package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
  69. package/public/types/node/ts4.8/dns.d.ts +662 -0
  70. package/public/types/node/ts4.8/dom-events.d.ts +129 -0
  71. package/public/types/node/ts4.8/domain.d.ts +173 -0
  72. package/public/types/node/ts4.8/events.d.ts +681 -0
  73. package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
  74. package/public/types/node/ts4.8/fs.d.ts +3875 -0
  75. package/public/types/node/ts4.8/globals.d.ts +297 -0
  76. package/public/types/node/ts4.8/http.d.ts +1617 -0
  77. package/public/types/node/ts4.8/http2.d.ts +2137 -0
  78. package/public/types/node/ts4.8/https.d.ts +544 -0
  79. package/public/types/node/ts4.8/module.d.ts +117 -0
  80. package/public/types/node/ts4.8/net.d.ts +872 -0
  81. package/public/types/node/ts4.8/os.d.ts +469 -0
  82. package/public/types/node/ts4.8/path.d.ts +194 -0
  83. package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
  84. package/public/types/node/ts4.8/process.d.ts +1485 -0
  85. package/public/types/node/ts4.8/querystring.d.ts +134 -0
  86. package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
  87. package/public/types/node/ts4.8/readline.d.ts +656 -0
  88. package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
  89. package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
  90. package/public/types/node/ts4.8/stream/web.d.ts +333 -0
  91. package/public/types/node/ts4.8/stream.d.ts +1343 -0
  92. package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
  93. package/public/types/node/ts4.8/test.d.ts +377 -0
  94. package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
  95. package/public/types/node/ts4.8/timers.d.ts +97 -0
  96. package/public/types/node/ts4.8/tls.d.ts +1031 -0
  97. package/public/types/node/ts4.8/trace_events.d.ts +174 -0
  98. package/public/types/node/ts4.8/tty.d.ts +209 -0
  99. package/public/types/node/ts4.8/url.d.ts +900 -0
  100. package/public/types/node/ts4.8/util.d.ts +1853 -0
  101. package/public/types/node/ts4.8/v8.d.ts +399 -0
  102. package/public/types/node/ts4.8/vm.d.ts +512 -0
  103. package/public/types/node/ts4.8/wasi.d.ts +161 -0
  104. package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
  105. package/public/types/node/ts4.8/zlib.d.ts +520 -0
  106. package/public/types/node/tty.d.ts +5 -3
  107. package/public/types/node/url.d.ts +81 -39
  108. package/public/types/node/util.d.ts +269 -13
  109. package/public/types/node/v8.d.ts +22 -4
  110. package/public/types/node/vm.d.ts +7 -5
  111. package/public/types/node/wasi.d.ts +2 -2
  112. package/public/types/node/worker_threads.d.ts +51 -11
  113. package/public/types/node/zlib.d.ts +2 -2
  114. package/public/types/node-red/func.d.ts +26 -17
  115. package/public/vendor/ace/worker-jsonata.js +1 -1
  116. package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
  117. package/public/vendor/monaco/dist/css.worker.js +1 -1
  118. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  119. package/public/vendor/monaco/dist/editor.js +1 -29
  120. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
  121. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  122. package/public/vendor/monaco/dist/html.worker.js +1 -1
  123. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  124. package/public/vendor/monaco/dist/json.worker.js +1 -1
  125. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  126. package/public/vendor/monaco/dist/locale/cs.js +324 -106
  127. package/public/vendor/monaco/dist/locale/de.js +336 -118
  128. package/public/vendor/monaco/dist/locale/es.js +329 -111
  129. package/public/vendor/monaco/dist/locale/fr.js +334 -116
  130. package/public/vendor/monaco/dist/locale/it.js +327 -109
  131. package/public/vendor/monaco/dist/locale/ja.js +329 -111
  132. package/public/vendor/monaco/dist/locale/ko.js +330 -112
  133. package/public/vendor/monaco/dist/locale/pl.js +329 -111
  134. package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
  135. package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
  136. package/public/vendor/monaco/dist/locale/ru.js +331 -113
  137. package/public/vendor/monaco/dist/locale/tr.js +329 -111
  138. package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
  139. package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
  140. package/public/vendor/monaco/dist/ts.worker.js +2 -2
  141. package/public/vendor/vendor.js +1 -1
  142. package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
  143. /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
  144. /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
  145. /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
  146. /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
  147. /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
  148. /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
  149. /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/Steve-Mcl/monaco-editor-esm-i18n */
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
  * > Stability: 2 - Stable
@@ -13,7 +13,7 @@
13
13
  * ```js
14
14
  * const net = require('net');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
17
17
  */
18
18
  declare module 'net' {
19
19
  import * as stream from 'node:stream';
@@ -134,6 +134,17 @@ declare module 'net' {
134
134
  * @return The socket itself.
135
135
  */
136
136
  pause(): this;
137
+ /**
138
+ * Close the TCP connection by sending an RST packet and destroy the stream.
139
+ * If this TCP socket is in connecting status, it will send an RST packet
140
+ * and destroy this TCP socket once it is connected. Otherwise, it will call
141
+ * `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket
142
+ * (for example, a pipe), calling this method will immediately throw
143
+ * an `ERR_INVALID_HANDLE_TYPE` Error.
144
+ * @since v18.3.0
145
+ * @return The socket itself.
146
+ */
147
+ resetAndDestroy(): this;
137
148
  /**
138
149
  * Resumes reading after a call to `socket.pause()`.
139
150
  * @return The socket itself.
@@ -211,7 +222,7 @@ declare module 'net' {
211
222
  */
212
223
  unref(): this;
213
224
  /**
214
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will_not_ let the program exit if it's the only socket left (the default behavior).
225
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
215
226
  * If the socket is `ref`ed calling `ref` again will have no effect.
216
227
  * @since v0.9.1
217
228
  * @return The socket itself.
@@ -271,15 +282,9 @@ declare module 'net' {
271
282
  readonly localPort?: number;
272
283
  /**
273
284
  * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
274
- * @since v18.8.0, v16.18.0
285
+ * @since v18.8.0
275
286
  */
276
287
  readonly localFamily?: string;
277
- /**
278
- * This is `true` if the socket is not connected yet, either because `.connect()`
279
- * has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
280
- * @since v10.16.0
281
- */
282
- readonly pending: boolean;
283
288
  /**
284
289
  * This property represents the state of the connection as a string.
285
290
  * @see {https://nodejs.org/api/net.html#socketreadystate}
@@ -329,7 +334,8 @@ declare module 'net' {
329
334
  * 5. end
330
335
  * 6. error
331
336
  * 7. lookup
332
- * 8. timeout
337
+ * 8. ready
338
+ * 9. timeout
333
339
  */
334
340
  addListener(event: string, listener: (...args: any[]) => void): this;
335
341
  addListener(event: 'close', listener: (hadError: boolean) => void): this;
@@ -436,6 +442,14 @@ declare module 'net' {
436
442
  */
437
443
  keepAliveInitialDelay?: number | undefined;
438
444
  }
445
+ interface DropArgument {
446
+ localAddress?: string;
447
+ localPort?: number;
448
+ localFamily?: string;
449
+ remoteAddress?: string;
450
+ remotePort?: number;
451
+ remoteFamily?: string;
452
+ }
439
453
  /**
440
454
  * This class is used to create a TCP or `IPC` server.
441
455
  * @since v0.1.90
@@ -540,7 +554,7 @@ declare module 'net' {
540
554
  */
541
555
  getConnections(cb: (error: Error | null, count: number) => void): void;
542
556
  /**
543
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will_not_ let the program exit if it's the only server left (the default behavior).
557
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
544
558
  * If the server is `ref`ed calling `ref()` again will have no effect.
545
559
  * @since v0.9.1
546
560
  */
@@ -572,49 +586,56 @@ declare module 'net' {
572
586
  * 2. connection
573
587
  * 3. error
574
588
  * 4. listening
589
+ * 5. drop
575
590
  */
576
591
  addListener(event: string, listener: (...args: any[]) => void): this;
577
592
  addListener(event: 'close', listener: () => void): this;
578
593
  addListener(event: 'connection', listener: (socket: Socket) => void): this;
579
594
  addListener(event: 'error', listener: (err: Error) => void): this;
580
595
  addListener(event: 'listening', listener: () => void): this;
596
+ addListener(event: 'drop', listener: (data?: DropArgument) => void): this;
581
597
  emit(event: string | symbol, ...args: any[]): boolean;
582
598
  emit(event: 'close'): boolean;
583
599
  emit(event: 'connection', socket: Socket): boolean;
584
600
  emit(event: 'error', err: Error): boolean;
585
601
  emit(event: 'listening'): boolean;
602
+ emit(event: 'drop', data?: DropArgument): boolean;
586
603
  on(event: string, listener: (...args: any[]) => void): this;
587
604
  on(event: 'close', listener: () => void): this;
588
605
  on(event: 'connection', listener: (socket: Socket) => void): this;
589
606
  on(event: 'error', listener: (err: Error) => void): this;
590
607
  on(event: 'listening', listener: () => void): this;
608
+ on(event: 'drop', listener: (data?: DropArgument) => void): this;
591
609
  once(event: string, listener: (...args: any[]) => void): this;
592
610
  once(event: 'close', listener: () => void): this;
593
611
  once(event: 'connection', listener: (socket: Socket) => void): this;
594
612
  once(event: 'error', listener: (err: Error) => void): this;
595
613
  once(event: 'listening', listener: () => void): this;
614
+ once(event: 'drop', listener: (data?: DropArgument) => void): this;
596
615
  prependListener(event: string, listener: (...args: any[]) => void): this;
597
616
  prependListener(event: 'close', listener: () => void): this;
598
617
  prependListener(event: 'connection', listener: (socket: Socket) => void): this;
599
618
  prependListener(event: 'error', listener: (err: Error) => void): this;
600
619
  prependListener(event: 'listening', listener: () => void): this;
620
+ prependListener(event: 'drop', listener: (data?: DropArgument) => void): this;
601
621
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
602
622
  prependOnceListener(event: 'close', listener: () => void): this;
603
623
  prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
604
624
  prependOnceListener(event: 'error', listener: (err: Error) => void): this;
605
625
  prependOnceListener(event: 'listening', listener: () => void): this;
626
+ prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this;
606
627
  }
607
628
  type IPVersion = 'ipv4' | 'ipv6';
608
629
  /**
609
630
  * The `BlockList` object can be used with some network APIs to specify rules for
610
631
  * disabling inbound or outbound access to specific IP addresses, IP ranges, or
611
632
  * IP subnets.
612
- * @since v15.0.0
633
+ * @since v15.0.0, v14.18.0
613
634
  */
614
635
  class BlockList {
615
636
  /**
616
637
  * Adds a rule to block the given IP address.
617
- * @since v15.0.0
638
+ * @since v15.0.0, v14.18.0
618
639
  * @param address An IPv4 or IPv6 address.
619
640
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
620
641
  */
@@ -622,7 +643,7 @@ declare module 'net' {
622
643
  addAddress(address: SocketAddress): void;
623
644
  /**
624
645
  * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
625
- * @since v15.0.0
646
+ * @since v15.0.0, v14.18.0
626
647
  * @param start The starting IPv4 or IPv6 address in the range.
627
648
  * @param end The ending IPv4 or IPv6 address in the range.
628
649
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -631,7 +652,7 @@ declare module 'net' {
631
652
  addRange(start: SocketAddress, end: SocketAddress): void;
632
653
  /**
633
654
  * Adds a rule to block a range of IP addresses specified as a subnet mask.
634
- * @since v15.0.0
655
+ * @since v15.0.0, v14.18.0
635
656
  * @param net The network IPv4 or IPv6 address.
636
657
  * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
637
658
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -655,7 +676,7 @@ declare module 'net' {
655
676
  * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
656
677
  * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
657
678
  * ```
658
- * @since v15.0.0
679
+ * @since v15.0.0, v14.18.0
659
680
  * @param address The IP address to check
660
681
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
661
682
  */
@@ -686,7 +707,7 @@ declare module 'net' {
686
707
  *
687
708
  * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
688
709
  *
689
- * Here is an example of an TCP echo server which listens for connections
710
+ * Here is an example of a TCP echo server which listens for connections
690
711
  * on port 8124:
691
712
  *
692
713
  * ```js
@@ -765,19 +786,39 @@ declare module 'net' {
765
786
  function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
766
787
  function createConnection(path: string, connectionListener?: () => void): Socket;
767
788
  /**
768
- * Tests if input is an IP address. Returns `0` for invalid strings,
769
- * returns `4` for IP version 4 addresses, and returns `6` for IP version 6
770
- * addresses.
789
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
790
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
791
+ *
792
+ * ```js
793
+ * net.isIP('::1'); // returns 6
794
+ * net.isIP('127.0.0.1'); // returns 4
795
+ * net.isIP('127.000.000.001'); // returns 0
796
+ * net.isIP('127.0.0.1/24'); // returns 0
797
+ * net.isIP('fhqwhgads'); // returns 0
798
+ * ```
771
799
  * @since v0.3.0
772
800
  */
773
801
  function isIP(input: string): number;
774
802
  /**
775
- * Returns `true` if input is a version 4 IP address, otherwise returns `false`.
803
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
804
+ * leading zeroes. Otherwise, returns `false`.
805
+ *
806
+ * ```js
807
+ * net.isIPv4('127.0.0.1'); // returns true
808
+ * net.isIPv4('127.000.000.001'); // returns false
809
+ * net.isIPv4('127.0.0.1/24'); // returns false
810
+ * net.isIPv4('fhqwhgads'); // returns false
811
+ * ```
776
812
  * @since v0.3.0
777
813
  */
778
814
  function isIPv4(input: string): boolean;
779
815
  /**
780
- * Returns `true` if input is a version 6 IP address, otherwise returns `false`.
816
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
817
+ *
818
+ * ```js
819
+ * net.isIPv6('::1'); // returns true
820
+ * net.isIPv6('fhqwhgads'); // returns false
821
+ * ```
781
822
  * @since v0.3.0
782
823
  */
783
824
  function isIPv6(input: string): boolean;
@@ -803,25 +844,25 @@ declare module 'net' {
803
844
  port?: number | undefined;
804
845
  }
805
846
  /**
806
- * @since v15.14.0
847
+ * @since v15.14.0, v14.18.0
807
848
  */
808
849
  class SocketAddress {
809
850
  constructor(options: SocketAddressInitOptions);
810
851
  /**
811
- * @since v15.14.0
852
+ * @since v15.14.0, v14.18.0
812
853
  */
813
854
  readonly address: string;
814
855
  /**
815
856
  * Either \`'ipv4'\` or \`'ipv6'\`.
816
- * @since v15.14.0
857
+ * @since v15.14.0, v14.18.0
817
858
  */
818
859
  readonly family: IPVersion;
819
860
  /**
820
- * @since v15.14.0
861
+ * @since v15.14.0, v14.18.0
821
862
  */
822
863
  readonly port: number;
823
864
  /**
824
- * @since v15.14.0
865
+ * @since v15.14.0, v14.18.0
825
866
  */
826
867
  readonly flowlabel: number;
827
868
  }
@@ -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/Steve-Mcl/monaco-editor-esm-i18n */
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 `os` module provides operating system-related utility methods and
@@ -8,7 +8,7 @@
8
8
  * ```js
9
9
  * const os = require('os');
10
10
  * ```
11
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
11
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
12
12
  */
13
13
  declare module 'os' {
14
14
  interface CpuInfo {
@@ -31,6 +31,7 @@ declare module 'os' {
31
31
  }
32
32
  interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
33
33
  family: 'IPv4';
34
+ scopeid?: undefined;
34
35
  }
35
36
  interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
36
37
  family: 'IPv6';
@@ -390,7 +391,7 @@ declare module 'os' {
390
391
  const EOL: string;
391
392
  /**
392
393
  * Returns the operating system CPU architecture for which the Node.js binary was
393
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
394
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
394
395
  *
395
396
  * The return value is equivalent to `process.arch`.
396
397
  * @since v0.5.0
@@ -405,8 +406,9 @@ declare module 'os' {
405
406
  */
406
407
  function version(): string;
407
408
  /**
408
- * Returns a string identifying the operating system platform. The value is set
409
- * at compile time. Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
409
+ * Returns a string identifying the operating system platform for which
410
+ * the Node.js binary was compiled. The value is set at compile time.
411
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
410
412
  *
411
413
  * The return value is equivalent to `process.platform`.
412
414
  *
@@ -415,6 +417,15 @@ declare module 'os' {
415
417
  * @since v0.5.0
416
418
  */
417
419
  function platform(): NodeJS.Platform;
420
+ /**
421
+ * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
422
+ *
423
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
424
+ * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
425
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
426
+ * @since v18.9.0
427
+ */
428
+ function machine(): string;
418
429
  /**
419
430
  * Returns the operating system's default directory for temporary files as a
420
431
  * string.
@@ -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/Steve-Mcl/monaco-editor-esm-i18n */
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
  declare module 'path/posix' {
5
5
  import path = require('path');
@@ -16,7 +16,7 @@ declare module 'path/win32' {
16
16
  * ```js
17
17
  * const path = require('path');
18
18
  * ```
19
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
19
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
20
20
  */
21
21
  declare module 'path' {
22
22
  namespace path {
@@ -93,7 +93,7 @@ declare module 'path' {
93
93
  * the current working directory is used as well. The resulting path is normalized,
94
94
  * and trailing slashes are removed unless the path gets resolved to the root directory.
95
95
  *
96
- * @param paths string paths to join.
96
+ * @param paths A sequence of paths or path segments.
97
97
  * @throws {TypeError} if any of the arguments is not a string.
98
98
  */
99
99
  resolve(...paths: string[]): string;
@@ -125,10 +125,10 @@ declare module 'path' {
125
125
  * Often used to extract the file name from a fully qualified path.
126
126
  *
127
127
  * @param path the path to evaluate.
128
- * @param ext optionally, an extension to remove from the result.
128
+ * @param suffix optionally, an extension to remove from the result.
129
129
  * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
130
130
  */
131
- basename(path: string, ext?: string): string;
131
+ basename(path: string, suffix?: string): string;
132
132
  /**
133
133
  * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
134
134
  * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
@@ -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/Steve-Mcl/monaco-editor-esm-i18n */
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 provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
@@ -29,7 +29,7 @@
29
29
  * performance.measure('A to B', 'A', 'B');
30
30
  * });
31
31
  * ```
32
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
32
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
33
33
  */
34
34
  declare module 'perf_hooks' {
35
35
  import { AsyncResource } from 'node:async_hooks';
@@ -88,6 +88,14 @@ declare module 'perf_hooks' {
88
88
  * @since v16.0.0
89
89
  */
90
90
  readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
91
+ toJSON(): any;
92
+ }
93
+ class PerformanceMark extends PerformanceEntry {
94
+ readonly duration: 0;
95
+ readonly entryType: 'mark';
96
+ }
97
+ class PerformanceMeasure extends PerformanceEntry {
98
+ readonly entryType: 'measure';
91
99
  }
92
100
  /**
93
101
  * _This property is an extension by Node.js. It is not available in Web browsers._
@@ -229,8 +237,9 @@ declare module 'perf_hooks' {
229
237
  * and whose performanceEntry.duration is always 0.
230
238
  * Performance marks are used to mark specific significant moments in the Performance Timeline.
231
239
  * @param name
240
+ * @return The PerformanceMark entry that was created
232
241
  */
233
- mark(name?: string, options?: MarkOptions): void;
242
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
234
243
  /**
235
244
  * Creates a new PerformanceMeasure entry in the Performance Timeline.
236
245
  * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -245,9 +254,10 @@ declare module 'perf_hooks' {
245
254
  * @param name
246
255
  * @param startMark
247
256
  * @param endMark
257
+ * @return The PerformanceMeasure entry that was created
248
258
  */
249
- measure(name: string, startMark?: string, endMark?: string): void;
250
- measure(name: string, options: MeasureOptions): void;
259
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
260
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
251
261
  /**
252
262
  * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
253
263
  */
@@ -302,6 +312,9 @@ declare module 'perf_hooks' {
302
312
  * * }
303
313
  * * ]
304
314
  *
315
+ *
316
+ * performance.clearMarks();
317
+ * performance.clearMeasures();
305
318
  * observer.disconnect();
306
319
  * });
307
320
  * obs.observe({ type: 'mark' });
@@ -349,6 +362,9 @@ declare module 'perf_hooks' {
349
362
  * * ]
350
363
  *
351
364
  * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
365
+ *
366
+ * performance.clearMarks();
367
+ * performance.clearMeasures();
352
368
  * observer.disconnect();
353
369
  * });
354
370
  * obs.observe({ entryTypes: ['mark', 'measure'] });
@@ -387,6 +403,8 @@ declare module 'perf_hooks' {
387
403
  * * }
388
404
  * * ]
389
405
  *
406
+ * performance.clearMarks();
407
+ * performance.clearMeasures();
390
408
  * observer.disconnect();
391
409
  * });
392
410
  * obs.observe({ type: 'mark' });
@@ -416,7 +434,7 @@ declare module 'perf_hooks' {
416
434
  * } = require('perf_hooks');
417
435
  *
418
436
  * const obs = new PerformanceObserver((list, observer) => {
419
- * // Called three times synchronously. `list` contains one item.
437
+ * // Called once asynchronously. `list` contains three items.
420
438
  * });
421
439
  * obs.observe({ type: 'mark' });
422
440
  *
@@ -519,7 +537,7 @@ declare module 'perf_hooks' {
519
537
  }
520
538
  interface RecordableHistogram extends Histogram {
521
539
  /**
522
- * @since v15.9.0
540
+ * @since v15.9.0, v14.18.0
523
541
  * @param val The amount to record in the histogram.
524
542
  */
525
543
  record(val: number | bigint): void;
@@ -528,9 +546,15 @@ declare module 'perf_hooks' {
528
546
  * previous call to `recordDelta()` and records that amount in the histogram.
529
547
  *
530
548
  * ## Examples
531
- * @since v15.9.0
549
+ * @since v15.9.0, v14.18.0
532
550
  */
533
551
  recordDelta(): void;
552
+ /**
553
+ * Adds the values from other to this histogram.
554
+ * @since v17.4.0, v16.14.0
555
+ * @param other Recordable Histogram to combine with
556
+ */
557
+ add(other: RecordableHistogram): void;
534
558
  }
535
559
  /**
536
560
  * _This property is an extension by Node.js. It is not available in Web browsers._
@@ -580,9 +604,24 @@ declare module 'perf_hooks' {
580
604
  }
581
605
  /**
582
606
  * Returns a `RecordableHistogram`.
583
- * @since v15.9.0
607
+ * @since v15.9.0, v14.18.0
584
608
  */
585
609
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
610
+
611
+ import { performance as _performance } from 'perf_hooks';
612
+ global {
613
+ /**
614
+ * `performance` is a global reference for `require('perf_hooks').performance`
615
+ * https://nodejs.org/api/globals.html#performance
616
+ * @since v16.0.0
617
+ */
618
+ var performance: typeof globalThis extends {
619
+ onmessage: any;
620
+ performance: infer T;
621
+ }
622
+ ? T
623
+ : typeof _performance;
624
+ }
586
625
  }
587
626
  declare module 'node:perf_hooks' {
588
627
  export * from 'perf_hooks';
@@ -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/Steve-Mcl/monaco-editor-esm-i18n */
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
  declare module 'process' {
5
5
  import * as tty from 'node:tty';
@@ -52,6 +52,7 @@ declare module 'process' {
52
52
  openssl: string;
53
53
  }
54
54
  type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
55
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
55
56
  type Signals =
56
57
  | 'SIGABRT'
57
58
  | 'SIGALRM'
@@ -99,7 +100,7 @@ declare module 'process' {
99
100
  type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
100
101
  /**
101
102
  * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
102
- * as *anything* can be thrown/rejected, it is therefore unsafe to assume the the value is an Error.
103
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
103
104
  */
104
105
  type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
105
106
  type WarningListener = (warning: Error) => void;
@@ -592,7 +593,7 @@ declare module 'process' {
592
593
  *
593
594
  * The reason this is problematic is because writes to `process.stdout` in Node.js
594
595
  * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
595
- * event loop. Calling `process.exit()`, however, forces the process to exit_before_ those additional writes to `stdout` can be performed.
596
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
596
597
  *
597
598
  * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
598
599
  * scheduling any additional work for the event loop:
@@ -644,7 +645,7 @@ declare module 'process' {
644
645
  * Android).
645
646
  * @since v0.1.31
646
647
  */
647
- getgid(): number;
648
+ getgid?: () => number;
648
649
  /**
649
650
  * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
650
651
  * numeric ID or a group name
@@ -671,7 +672,7 @@ declare module 'process' {
671
672
  * @since v0.1.31
672
673
  * @param id The group name or ID
673
674
  */
674
- setgid(id: number | string): void;
675
+ setgid?: (id: number | string) => void;
675
676
  /**
676
677
  * The `process.getuid()` method returns the numeric user identity of the process.
677
678
  * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
@@ -688,7 +689,7 @@ declare module 'process' {
688
689
  * Android).
689
690
  * @since v0.1.28
690
691
  */
691
- getuid(): number;
692
+ getuid?: () => number;
692
693
  /**
693
694
  * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
694
695
  * numeric ID or a username string.
@@ -714,7 +715,7 @@ declare module 'process' {
714
715
  * This feature is not available in `Worker` threads.
715
716
  * @since v0.1.28
716
717
  */
717
- setuid(id: number | string): void;
718
+ setuid?: (id: number | string) => void;
718
719
  /**
719
720
  * The `process.geteuid()` method returns the numerical effective user identity of
720
721
  * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
@@ -731,7 +732,7 @@ declare module 'process' {
731
732
  * Android).
732
733
  * @since v2.0.0
733
734
  */
734
- geteuid(): number;
735
+ geteuid?: () => number;
735
736
  /**
736
737
  * The `process.seteuid()` method sets the effective user identity of the process.
737
738
  * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
@@ -758,7 +759,7 @@ declare module 'process' {
758
759
  * @since v2.0.0
759
760
  * @param id A user name or ID
760
761
  */
761
- seteuid(id: number | string): void;
762
+ seteuid?: (id: number | string) => void;
762
763
  /**
763
764
  * The `process.getegid()` method returns the numerical effective group identity
764
765
  * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
@@ -775,7 +776,7 @@ declare module 'process' {
775
776
  * Android).
776
777
  * @since v2.0.0
777
778
  */
778
- getegid(): number;
779
+ getegid?: () => number;
779
780
  /**
780
781
  * The `process.setegid()` method sets the effective group identity of the process.
781
782
  * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
@@ -802,7 +803,7 @@ declare module 'process' {
802
803
  * @since v2.0.0
803
804
  * @param id A group name or ID
804
805
  */
805
- setegid(id: number | string): void;
806
+ setegid?: (id: number | string) => void;
806
807
  /**
807
808
  * The `process.getgroups()` method returns an array with the supplementary group
808
809
  * IDs. POSIX leaves it unspecified if the effective group ID is included but
@@ -820,7 +821,7 @@ declare module 'process' {
820
821
  * Android).
821
822
  * @since v0.9.4
822
823
  */
823
- getgroups(): number[];
824
+ getgroups?: () => number[];
824
825
  /**
825
826
  * The `process.setgroups()` method sets the supplementary group IDs for the
826
827
  * Node.js process. This is a privileged operation that requires the Node.js
@@ -846,7 +847,7 @@ declare module 'process' {
846
847
  * This feature is not available in `Worker` threads.
847
848
  * @since v0.9.4
848
849
  */
849
- setgroups(groups: ReadonlyArray<string | number>): void;
850
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
850
851
  /**
851
852
  * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
852
853
  * that will be invoked when an uncaught exception occurs, which will receive the
@@ -1043,7 +1044,7 @@ declare module 'process' {
1043
1044
  title: string;
1044
1045
  /**
1045
1046
  * The operating system CPU architecture for which the Node.js binary was compiled.
1046
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
1047
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
1047
1048
  *
1048
1049
  * ```js
1049
1050
  * import { arch } from 'process';
@@ -1052,10 +1053,10 @@ declare module 'process' {
1052
1053
  * ```
1053
1054
  * @since v0.5.0
1054
1055
  */
1055
- readonly arch: string;
1056
+ readonly arch: Architecture;
1056
1057
  /**
1057
1058
  * The `process.platform` property returns a string identifying the operating
1058
- * system platform on which the Node.js process is running.
1059
+ * system platform for which the Node.js binary was compiled.
1059
1060
  *
1060
1061
  * Currently possible values are:
1061
1062
  *
@@ -1408,7 +1409,7 @@ declare module 'process' {
1408
1409
  emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
1409
1410
  emit(event: 'warning', warning: Error): boolean;
1410
1411
  emit(event: 'message', message: unknown, sendHandle: unknown): this;
1411
- emit(event: Signals, signal: Signals): boolean;
1412
+ emit(event: Signals, signal?: Signals): boolean;
1412
1413
  emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
1413
1414
  emit(event: 'worker', listener: WorkerListener): this;
1414
1415
  on(event: 'beforeExit', listener: BeforeExitListener): this;