@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
  * The `url` module provides utilities for URL resolution and parsing. It can be
@@ -8,10 +8,10 @@
8
8
  * ```js
9
9
  * import url from 'url';
10
10
  * ```
11
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/url.js)
11
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
12
12
  */
13
13
  declare module 'url' {
14
- import { Blob } from 'node:buffer';
14
+ import { Blob as NodeBlob } from 'node:buffer';
15
15
  import { ClientRequestArgs } from 'node:http';
16
16
  import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
17
17
  // Input to `url.format`
@@ -79,27 +79,67 @@ declare module 'url' {
79
79
  function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
80
80
  function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
81
81
  /**
82
- * The URL object has both a `toString()` method and `href` property that return string serializations of the URL.
83
- * These are not, however, customizable in any way. The `url.format(URL[, options])` method allows for basic
84
- * customization of the output.
85
- * Returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object.
82
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
86
83
  *
87
84
  * ```js
88
- * import url from 'url';
89
- * const myURL = new URL('https://a:b@測試?abc#foo');
85
+ * const url = require('url');
86
+ * url.format({
87
+ * protocol: 'https',
88
+ * hostname: 'example.com',
89
+ * pathname: '/some/path',
90
+ * query: {
91
+ * page: 1,
92
+ * format: 'json'
93
+ * }
94
+ * });
90
95
  *
91
- * console.log(myURL.href);
92
- * // Prints https://a:b@xn--g6w251d/?abc#foo
96
+ * // => 'https://example.com/some/path?page=1&format=json'
97
+ * ```
93
98
  *
94
- * console.log(myURL.toString());
95
- * // Prints https://a:b@xn--g6w251d/?abc#foo
99
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
96
100
  *
97
- * console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
98
- * // Prints 'https://測試/?abc'
99
- * ```
100
- * @since v7.6.0
101
- * @param urlObject A `WHATWG URL` object
102
- * @param options
101
+ * The formatting process operates as follows:
102
+ *
103
+ * * A new empty string `result` is created.
104
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
105
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
106
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
107
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
108
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
109
+ * * `urlObject.slashes` property is true;
110
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
111
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
112
+ * and appended to `result`followed by the literal string `@`.
113
+ * * If the `urlObject.host` property is `undefined` then:
114
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
115
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
116
+ * an `Error` is thrown.
117
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
118
+ * * The literal string `:` is appended to `result`, and
119
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
120
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
121
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
122
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
123
+ * (`/`), then the literal string `'/'` is appended to `result`.
124
+ * * The value of `urlObject.pathname` is appended to `result`.
125
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
126
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
127
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
128
+ * * Otherwise, if `urlObject.search` is a string:
129
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
130
+ * mark (`?`) character, the literal string `?` is appended to `result`.
131
+ * * The value of `urlObject.search` is appended to `result`.
132
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
133
+ * * If the `urlObject.hash` property is a string:
134
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
135
+ * character, the literal string `#` is appended to `result`.
136
+ * * The value of `urlObject.hash` is appended to `result`.
137
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
138
+ * string, an `Error` is thrown.
139
+ * * `result` is returned.
140
+ * @since v0.1.25
141
+ * @deprecated Legacy: Use the WHATWG URL API instead.
142
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
103
143
  */
104
144
  function format(urlObject: URL, options?: URLFormatOptions): string;
105
145
  /**
@@ -168,7 +208,7 @@ declare module 'url' {
168
208
  function format(urlObject: UrlObject | string): string;
169
209
  /**
170
210
  * The `url.resolve()` method resolves a target URL relative to a base URL in a
171
- * manner similar to that of a Web browser resolving an anchor tag HREF.
211
+ * manner similar to that of a web browser resolving an anchor tag.
172
212
  *
173
213
  * ```js
174
214
  * const url = require('url');
@@ -177,7 +217,7 @@ declare module 'url' {
177
217
  * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
178
218
  * ```
179
219
  *
180
- * You can achieve the same result using the WHATWG URL API:
220
+ * To achieve the same result using the WHATWG URL API:
181
221
  *
182
222
  * ```js
183
223
  * function resolve(from, to) {
@@ -196,8 +236,8 @@ declare module 'url' {
196
236
  * ```
197
237
  * @since v0.1.25
198
238
  * @deprecated Legacy: Use the WHATWG URL API instead.
199
- * @param from The Base URL being resolved against.
200
- * @param to The HREF URL being resolved.
239
+ * @param from The base URL to use if `to` is a relative URL.
240
+ * @param to The target URL to resolve.
201
241
  */
202
242
  function resolve(from: string, to: string): string;
203
243
  /**
@@ -295,7 +335,7 @@ declare module 'url' {
295
335
  * const myURL = new URL('https://a:b@測試?abc#foo');
296
336
  *
297
337
  * console.log(urlToHttpOptions(myURL));
298
- *
338
+ * /*
299
339
  * {
300
340
  * protocol: 'https:',
301
341
  * hostname: 'xn--g6w251d',
@@ -308,7 +348,7 @@ declare module 'url' {
308
348
  * }
309
349
  *
310
350
  * ```
311
- * @since v15.7.0
351
+ * @since v15.7.0, v14.18.0
312
352
  * @param url The `WHATWG URL` object to convert to an options object.
313
353
  * @return Options object
314
354
  */
@@ -358,9 +398,10 @@ declare module 'url' {
358
398
  * @since v16.7.0
359
399
  * @experimental
360
400
  */
361
- static createObjectURL(blob: Blob): string;
401
+ static createObjectURL(blob: NodeBlob): string;
362
402
  /**
363
- * Removes the stored `Blob` identified by the given ID.
403
+ * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
404
+ * ID that isn’t registered will silently fail.
364
405
  * @since v16.7.0
365
406
  * @experimental
366
407
  * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
@@ -822,7 +863,6 @@ declare module 'url' {
822
863
  values(): IterableIterator<string>;
823
864
  [Symbol.iterator](): IterableIterator<[string, string]>;
824
865
  }
825
-
826
866
  import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
827
867
  global {
828
868
  interface URLSearchParams extends _URLSearchParams {}
@@ -836,21 +876,23 @@ declare module 'url' {
836
876
  * https://nodejs.org/api/url.html#the-whatwg-url-api
837
877
  * @since v10.0.0
838
878
  */
839
- var URL:
840
- // For compatibility with "dom" and "webworker" URL declarations
841
- typeof globalThis extends { onmessage: any, URL: infer URL }
842
- ? URL
843
- : typeof _URL;
879
+ var URL: typeof globalThis extends {
880
+ onmessage: any;
881
+ URL: infer T;
882
+ }
883
+ ? T
884
+ : typeof _URL;
844
885
  /**
845
- * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
886
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
846
887
  * https://nodejs.org/api/url.html#class-urlsearchparams
847
888
  * @since v10.0.0
848
889
  */
849
- var URLSearchParams:
850
- // For compatibility with "dom" and "webworker" URLSearchParams declarations
851
- typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
852
- ? URLSearchParams
853
- : typeof _URLSearchParams;
890
+ var URLSearchParams: typeof globalThis extends {
891
+ onmessage: any;
892
+ URLSearchParams: infer T;
893
+ }
894
+ ? T
895
+ : typeof _URLSearchParams;
854
896
  }
855
897
  }
856
898
  declare module 'node:url' {
@@ -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 `util` module supports the needs of Node.js internal APIs. Many of the
@@ -9,7 +9,7 @@
9
9
  * ```js
10
10
  * const util = require('util');
11
11
  * ```
12
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/util.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/util.js)
13
13
  */
14
14
  declare module 'util' {
15
15
  import * as types from 'node:util/types';
@@ -142,7 +142,7 @@ declare module 'util' {
142
142
  * console.error(name); // ENOENT
143
143
  * });
144
144
  * ```
145
- * @since v16.0.0
145
+ * @since v16.0.0, v14.17.0
146
146
  */
147
147
  export function getSystemErrorMap(): Map<number, [string, string]>;
148
148
  /**
@@ -162,9 +162,30 @@ declare module 'util' {
162
162
  * Returns the `string` after replacing any surrogate code points
163
163
  * (or equivalently, any unpaired surrogate code units) with the
164
164
  * Unicode "replacement character" U+FFFD.
165
- * @since v16.8.0
165
+ * @since v16.8.0, v14.18.0
166
166
  */
167
167
  export function toUSVString(string: string): string;
168
+ /**
169
+ * Creates and returns an `AbortController` instance whose `AbortSignal` is marked
170
+ * as transferable and can be used with `structuredClone()` or `postMessage()`.
171
+ * @since v18.11.0
172
+ * @returns A transferable AbortController
173
+ */
174
+ export function transferableAbortController(): AbortController;
175
+ /**
176
+ * Marks the given {AbortSignal} as transferable so that it can be used with
177
+ * `structuredClone()` and `postMessage()`.
178
+ *
179
+ * ```js
180
+ * const signal = transferableAbortSignal(AbortSignal.timeout(100));
181
+ * const channel = new MessageChannel();
182
+ * channel.port2.postMessage(signal, [signal]);
183
+ * ```
184
+ * @since v18.11.0
185
+ * @param signal The AbortSignal
186
+ * @returns The same AbortSignal
187
+ */
188
+ export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
168
189
  /**
169
190
  * The `util.inspect()` method returns a string representation of `object` that is
170
191
  * intended for debugging. The output of `util.inspect` may change at any time
@@ -312,6 +333,21 @@ declare module 'util' {
312
333
  * );
313
334
  * ```
314
335
  *
336
+ * The `numericSeparator` option adds an underscore every three digits to all
337
+ * numbers.
338
+ *
339
+ * ```js
340
+ * const { inspect } = require('util');
341
+ *
342
+ * const thousand = 1_000;
343
+ * const million = 1_000_000;
344
+ * const bigNumber = 123_456_789n;
345
+ * const bigDecimal = 1_234.123_45;
346
+ *
347
+ * console.log(thousand, million, bigNumber, bigDecimal);
348
+ * // 1_000 1_000_000 123_456_789n 1_234.123_45
349
+ * ```
350
+ *
315
351
  * `util.inspect()` is a synchronous method intended for debugging. Its maximum
316
352
  * output length is approximately 128 MB. Inputs that result in longer output will
317
353
  * be truncated.
@@ -320,7 +356,7 @@ declare module 'util' {
320
356
  * @return The representation of `object`.
321
357
  */
322
358
  export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
323
- export function inspect(object: any, options: InspectOptions): string;
359
+ export function inspect(object: any, options?: InspectOptions): string;
324
360
  export namespace inspect {
325
361
  let colors: NodeJS.Dict<[number, number]>;
326
362
  let styles: {
@@ -862,7 +898,7 @@ declare module 'util' {
862
898
  * callbackFunction((err, ret) => {
863
899
  * // When the Promise was rejected with `null` it is wrapped with an Error and
864
900
  * // the original value is stored in `reason`.
865
- * err &#x26;&#x26; err.hasOwnProperty('reason') &#x26;&#x26; err.reason === null; // true
901
+ * err &#x26;&#x26; Object.hasOwn(err, 'reason') &#x26;&#x26; err.reason === null; // true
866
902
  * });
867
903
  * ```
868
904
  * @since v8.2.0
@@ -1001,13 +1037,9 @@ declare module 'util' {
1001
1037
  * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
1002
1038
  *
1003
1039
  * ```js
1004
- * const decoder = new TextDecoder('shift_jis');
1005
- * let string = '';
1006
- * let buffer;
1007
- * while (buffer = getNextChunkSomehow()) {
1008
- * string += decoder.decode(buffer, { stream: true });
1009
- * }
1010
- * string += decoder.decode(); // end-of-stream
1040
+ * const decoder = new TextDecoder();
1041
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
1042
+ * console.log(decoder.decode(u8arr)); // Hello
1011
1043
  * ```
1012
1044
  * @since v8.3.0
1013
1045
  */
@@ -1059,6 +1091,8 @@ declare module 'util' {
1059
1091
  written: number;
1060
1092
  }
1061
1093
  export { types };
1094
+
1095
+ //// TextEncoder/Decoder
1062
1096
  /**
1063
1097
  * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
1064
1098
  * instances of `TextEncoder` only support UTF-8 encoding.
@@ -1097,6 +1131,228 @@ declare module 'util' {
1097
1131
  */
1098
1132
  encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
1099
1133
  }
1134
+
1135
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
1136
+ global {
1137
+ /**
1138
+ * `TextDecoder` class is a global reference for `require('util').TextDecoder`
1139
+ * https://nodejs.org/api/globals.html#textdecoder
1140
+ * @since v11.0.0
1141
+ */
1142
+ var TextDecoder: typeof globalThis extends {
1143
+ onmessage: any;
1144
+ TextDecoder: infer TextDecoder;
1145
+ }
1146
+ ? TextDecoder
1147
+ : typeof _TextDecoder;
1148
+
1149
+ /**
1150
+ * `TextEncoder` class is a global reference for `require('util').TextEncoder`
1151
+ * https://nodejs.org/api/globals.html#textencoder
1152
+ * @since v11.0.0
1153
+ */
1154
+ var TextEncoder: typeof globalThis extends {
1155
+ onmessage: any;
1156
+ TextEncoder: infer TextEncoder;
1157
+ }
1158
+ ? TextEncoder
1159
+ : typeof _TextEncoder;
1160
+ }
1161
+
1162
+ //// parseArgs
1163
+ /**
1164
+ * Provides a high-level API for command-line argument parsing. Takes a
1165
+ * specification for the expected arguments and returns a structured object
1166
+ * with the parsed values and positionals.
1167
+ *
1168
+ * `config` provides arguments for parsing and configures the parser. It
1169
+ * supports the following properties:
1170
+ *
1171
+ * - `args` The array of argument strings. **Default:** `process.argv` with
1172
+ * `execPath` and `filename` removed.
1173
+ * - `options` Arguments known to the parser. Keys of `options` are the long
1174
+ * names of options and values are objects accepting the following properties:
1175
+ *
1176
+ * - `type` Type of argument, which must be either `boolean` (for options
1177
+ * which do not take values) or `string` (for options which do).
1178
+ * - `multiple` Whether this option can be provided multiple
1179
+ * times. If `true`, all values will be collected in an array. If
1180
+ * `false`, values for the option are last-wins. **Default:** `false`.
1181
+ * - `short` A single character alias for the option.
1182
+ * - `default` The default option value when it is not set by args. It
1183
+ * must be of the same type as the `type` property. When `multiple`
1184
+ * is `true`, it must be an array.
1185
+ *
1186
+ * - `strict`: Whether an error should be thrown when unknown arguments
1187
+ * are encountered, or when arguments are passed that do not match the
1188
+ * `type` configured in `options`. **Default:** `true`.
1189
+ * - `allowPositionals`: Whether this command accepts positional arguments.
1190
+ * **Default:** `false` if `strict` is `true`, otherwise `true`.
1191
+ * - `tokens`: Whether tokens {boolean} Return the parsed tokens. This is useful
1192
+ * for extending the built-in behavior, from adding additional checks through
1193
+ * to reprocessing the tokens in different ways.
1194
+ * **Default:** `false`.
1195
+ *
1196
+ * @returns The parsed command line arguments:
1197
+ *
1198
+ * - `values` A mapping of parsed option names with their string
1199
+ * or boolean values.
1200
+ * - `positionals` Positional arguments.
1201
+ * - `tokens` Detailed parse information (only if `tokens` was specified).
1202
+ *
1203
+ */
1204
+ export function parseArgs<T extends ParseArgsConfig>(config: T): ParsedResults<T>;
1205
+
1206
+ interface ParseArgsOptionConfig {
1207
+ type: 'string' | 'boolean';
1208
+ short?: string;
1209
+ multiple?: boolean;
1210
+ /**
1211
+ * @since v18.11.0
1212
+ */
1213
+ default?: string | boolean | string[] | boolean[];
1214
+ }
1215
+
1216
+ interface ParseArgsOptionsConfig {
1217
+ [longOption: string]: ParseArgsOptionConfig;
1218
+ }
1219
+
1220
+ export interface ParseArgsConfig {
1221
+ strict?: boolean;
1222
+ allowPositionals?: boolean;
1223
+ tokens?: boolean;
1224
+ options?: ParseArgsOptionsConfig;
1225
+ args?: string[];
1226
+ }
1227
+
1228
+ /*
1229
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
1230
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
1231
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
1232
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
1233
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
1234
+ This is technically incorrect but is a much nicer UX for the common case.
1235
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
1236
+ */
1237
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
1238
+ ? IfTrue
1239
+ : T extends false
1240
+ ? IfFalse
1241
+ : IfTrue;
1242
+
1243
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
1244
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
1245
+ ? IfFalse
1246
+ : T extends true
1247
+ ? IfTrue
1248
+ : IfFalse;
1249
+
1250
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
1251
+ T['strict'],
1252
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
1253
+ string | boolean
1254
+ >;
1255
+
1256
+ type ParsedValues<T extends ParseArgsConfig> =
1257
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
1258
+ & (T['options'] extends ParseArgsOptionsConfig
1259
+ ? {
1260
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
1261
+ T['options'][LongOption]['multiple'],
1262
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
1263
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
1264
+ >;
1265
+ }
1266
+ : {});
1267
+
1268
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
1269
+ T['strict'],
1270
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
1271
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
1272
+ >;
1273
+
1274
+ type PreciseTokenForOptions<
1275
+ K extends string,
1276
+ O extends ParseArgsOptionConfig,
1277
+ > = O['type'] extends 'string'
1278
+ ? {
1279
+ kind: 'option';
1280
+ index: number;
1281
+ name: K;
1282
+ rawName: string;
1283
+ value: string;
1284
+ inlineValue: boolean;
1285
+ }
1286
+ : O['type'] extends 'boolean'
1287
+ ? {
1288
+ kind: 'option';
1289
+ index: number;
1290
+ name: K;
1291
+ rawName: string;
1292
+ value: undefined;
1293
+ inlineValue: undefined;
1294
+ }
1295
+ : OptionToken & { name: K };
1296
+
1297
+ type TokenForOptions<
1298
+ T extends ParseArgsConfig,
1299
+ K extends keyof T['options'] = keyof T['options'],
1300
+ > = K extends unknown
1301
+ ? T['options'] extends ParseArgsOptionsConfig
1302
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
1303
+ : OptionToken
1304
+ : never;
1305
+
1306
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
1307
+
1308
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
1309
+ T['strict'],
1310
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
1311
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
1312
+ >;
1313
+
1314
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
1315
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
1316
+ >;
1317
+
1318
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
1319
+ T['tokens'],
1320
+ {
1321
+ values: ParsedValues<T>;
1322
+ positionals: ParsedPositionals<T>;
1323
+ tokens: ParsedTokens<T>;
1324
+ },
1325
+ {
1326
+ values: ParsedValues<T>;
1327
+ positionals: ParsedPositionals<T>;
1328
+ }
1329
+ >;
1330
+
1331
+ type OptionToken =
1332
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1333
+ | {
1334
+ kind: 'option';
1335
+ index: number;
1336
+ name: string;
1337
+ rawName: string;
1338
+ value: undefined;
1339
+ inlineValue: undefined;
1340
+ };
1341
+
1342
+ type Token =
1343
+ | OptionToken
1344
+ | { kind: 'positional'; index: number; value: string }
1345
+ | { kind: 'option-terminator'; index: number };
1346
+
1347
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
1348
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
1349
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
1350
+ ? {
1351
+ values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
1352
+ positionals: string[];
1353
+ tokens?: Token[];
1354
+ }
1355
+ : PreciseParsedResults<T>;
1100
1356
  }
1101
1357
  declare module 'util/types' {
1102
1358
  export * from 'util/types';
@@ -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 `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
@@ -7,7 +7,7 @@
7
7
  * ```js
8
8
  * const v8 = require('v8');
9
9
  * ```
10
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js)
10
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
11
11
  */
12
12
  declare module 'v8' {
13
13
  import { Readable } from 'node:stream';
@@ -166,6 +166,13 @@ declare module 'v8' {
166
166
  * Chrome DevTools. The JSON schema is undocumented and specific to the
167
167
  * V8 engine. Therefore, the schema may change from one version of V8 to the next.
168
168
  *
169
+ * Creating a heap snapshot requires memory about twice the size of the heap at
170
+ * the time the snapshot is created. This results in the risk of OOM killers
171
+ * terminating the process.
172
+ *
173
+ * Generating a snapshot is a synchronous operation which blocks the event loop
174
+ * for a duration depending on the heap size.
175
+ *
169
176
  * ```js
170
177
  * // Print heap snapshot to the console
171
178
  * const v8 = require('v8');
@@ -185,6 +192,13 @@ declare module 'v8' {
185
192
  * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
186
193
  * not contain any information about the workers, and vice versa.
187
194
  *
195
+ * Creating a heap snapshot requires memory about twice the size of the heap at
196
+ * the time the snapshot is created. This results in the risk of OOM killers
197
+ * terminating the process.
198
+ *
199
+ * Generating a snapshot is a synchronous operation which blocks the event loop
200
+ * for a duration depending on the heap size.
201
+ *
188
202
  * ```js
189
203
  * const { writeHeapSnapshot } = require('v8');
190
204
  * const {
@@ -347,6 +361,10 @@ declare module 'v8' {
347
361
  class DefaultDeserializer extends Deserializer {}
348
362
  /**
349
363
  * Uses a `DefaultSerializer` to serialize `value` into a buffer.
364
+ *
365
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
366
+ * serialize a huge object which requires buffer
367
+ * larger than `buffer.constants.MAX_LENGTH`.
350
368
  * @since v8.0.0
351
369
  */
352
370
  function serialize(value: any): Buffer;
@@ -365,14 +383,14 @@ declare module 'v8' {
365
383
  *
366
384
  * When the process is about to exit, one last coverage will still be written to
367
385
  * disk unless {@link stopCoverage} is invoked before the process exits.
368
- * @since v15.1.0, v12.22.0
386
+ * @since v15.1.0, v14.18.0, v12.22.0
369
387
  */
370
388
  function takeCoverage(): void;
371
389
  /**
372
390
  * The `v8.stopCoverage()` method allows the user to stop the coverage collection
373
391
  * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
374
392
  * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
375
- * @since v15.1.0, v12.22.0
393
+ * @since v15.1.0, v14.18.0, v12.22.0
376
394
  */
377
395
  function stopCoverage(): void;
378
396
  }
@@ -1,10 +1,12 @@
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 `vm` module enables compiling and running code within V8 Virtual
6
- * Machine contexts. **The `vm` module is not a security mechanism. Do**
7
- * **not use it to run untrusted code.**
6
+ * Machine contexts.
7
+ *
8
+ * **The `vm` module is not a security**
9
+ * **mechanism. Do not use it to run untrusted code.**
8
10
  *
9
11
  * JavaScript code can be compiled and run immediately or
10
12
  * compiled, saved, and run later.
@@ -35,7 +37,7 @@
35
37
  *
36
38
  * console.log(x); // 1; y is not defined.
37
39
  * ```
38
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js)
40
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js)
39
41
  */
40
42
  declare module 'vm' {
41
43
  interface Context extends NodeJS.Dict<any> {}
@@ -224,7 +226,7 @@ declare module 'vm' {
224
226
  runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
225
227
  /**
226
228
  * Runs the compiled code contained by the `vm.Script` within the context of the
227
- * current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object.
229
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
228
230
  *
229
231
  * The following example compiles code that increments a `global` variable then
230
232
  * executes that code multiple times:
@@ -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 WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
@@ -71,7 +71,7 @@
71
71
  * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
72
72
  * example to run.
73
73
  * @experimental
74
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/wasi.js)
74
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/wasi.js)
75
75
  */
76
76
  declare module 'wasi' {
77
77
  interface WASIOptions {