@node-red/editor-client 3.1.8 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/locales/de/editor.json +2 -0
- package/locales/en-US/editor.json +10 -1
- package/locales/fr/editor.json +8 -1
- package/locales/ja/editor.json +10 -3
- package/package.json +1 -1
- package/public/red/about +52 -0
- package/public/red/red.js +1433 -263
- package/public/red/red.min.js +3 -3
- package/public/red/style.min.css +2 -2
- package/public/red/tours/3.1/welcome.js +231 -0
- package/public/red/tours/images/nr4-auto-complete.png +0 -0
- package/public/red/tours/images/nr4-config-select.png +0 -0
- package/public/red/tours/images/nr4-multiplayer.png +0 -0
- package/public/red/tours/images/nr4-plugins.png +0 -0
- package/public/red/tours/images/nr4-sf-config.png +0 -0
- package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
- package/public/red/tours/welcome.js +105 -161
- package/public/types/node/assert/strict.d.ts +1 -1
- package/public/types/node/assert.d.ts +8 -9
- package/public/types/node/async_hooks.d.ts +9 -5
- package/public/types/node/buffer.d.ts +43 -18
- package/public/types/node/child_process.d.ts +8 -5
- package/public/types/node/cluster.d.ts +15 -19
- package/public/types/node/console.d.ts +2 -2
- package/public/types/node/crypto.d.ts +165 -70
- package/public/types/node/dgram.d.ts +4 -4
- package/public/types/node/diagnostics_channel.d.ts +8 -7
- package/public/types/node/dns/promises.d.ts +11 -9
- package/public/types/node/dns.d.ts +18 -13
- package/public/types/node/dom-events.d.ts +129 -0
- package/public/types/node/domain.d.ts +2 -2
- package/public/types/node/events.d.ts +49 -12
- package/public/types/node/fs/promises.d.ts +68 -24
- package/public/types/node/fs.d.ts +132 -59
- package/public/types/node/globals.d.ts +31 -17
- package/public/types/node/http.d.ts +138 -27
- package/public/types/node/http2.d.ts +38 -5
- package/public/types/node/https.d.ts +12 -3
- package/public/types/node/module.d.ts +1 -2
- package/public/types/node/net.d.ts +69 -28
- package/public/types/node/os.d.ts +16 -5
- package/public/types/node/path.d.ts +5 -5
- package/public/types/node/perf_hooks.d.ts +48 -9
- package/public/types/node/process.d.ts +18 -17
- package/public/types/node/querystring.d.ts +2 -2
- package/public/types/node/readline/promises.d.ts +146 -0
- package/public/types/node/readline.d.ts +141 -31
- package/public/types/node/stream/consumers.d.ts +2 -2
- package/public/types/node/stream/promises.d.ts +1 -1
- package/public/types/node/stream/web.d.ts +4 -66
- package/public/types/node/stream.d.ts +96 -118
- package/public/types/node/string_decoder.d.ts +2 -2
- package/public/types/node/test.d.ts +200 -16
- package/public/types/node/timers/promises.d.ts +1 -26
- package/public/types/node/timers.d.ts +2 -2
- package/public/types/node/tls.d.ts +21 -12
- package/public/types/node/trace_events.d.ts +12 -2
- package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
- package/public/types/node/ts4.8/assert.d.ts +964 -0
- package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
- package/public/types/node/ts4.8/buffer.d.ts +2262 -0
- package/public/types/node/ts4.8/child_process.d.ts +1372 -0
- package/public/types/node/ts4.8/cluster.d.ts +413 -0
- package/public/types/node/ts4.8/console.d.ts +415 -0
- package/public/types/node/ts4.8/crypto.d.ts +3967 -0
- package/public/types/node/ts4.8/dgram.d.ts +548 -0
- package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
- package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
- package/public/types/node/ts4.8/dns.d.ts +662 -0
- package/public/types/node/ts4.8/dom-events.d.ts +129 -0
- package/public/types/node/ts4.8/domain.d.ts +173 -0
- package/public/types/node/ts4.8/events.d.ts +681 -0
- package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
- package/public/types/node/ts4.8/fs.d.ts +3875 -0
- package/public/types/node/ts4.8/globals.d.ts +297 -0
- package/public/types/node/ts4.8/http.d.ts +1617 -0
- package/public/types/node/ts4.8/http2.d.ts +2137 -0
- package/public/types/node/ts4.8/https.d.ts +544 -0
- package/public/types/node/ts4.8/module.d.ts +117 -0
- package/public/types/node/ts4.8/net.d.ts +872 -0
- package/public/types/node/ts4.8/os.d.ts +469 -0
- package/public/types/node/ts4.8/path.d.ts +194 -0
- package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
- package/public/types/node/ts4.8/process.d.ts +1485 -0
- package/public/types/node/ts4.8/querystring.d.ts +134 -0
- package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
- package/public/types/node/ts4.8/readline.d.ts +656 -0
- package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
- package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
- package/public/types/node/ts4.8/stream/web.d.ts +333 -0
- package/public/types/node/ts4.8/stream.d.ts +1343 -0
- package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
- package/public/types/node/ts4.8/test.d.ts +377 -0
- package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
- package/public/types/node/ts4.8/timers.d.ts +97 -0
- package/public/types/node/ts4.8/tls.d.ts +1031 -0
- package/public/types/node/ts4.8/trace_events.d.ts +174 -0
- package/public/types/node/ts4.8/tty.d.ts +209 -0
- package/public/types/node/ts4.8/url.d.ts +900 -0
- package/public/types/node/ts4.8/util.d.ts +1853 -0
- package/public/types/node/ts4.8/v8.d.ts +399 -0
- package/public/types/node/ts4.8/vm.d.ts +512 -0
- package/public/types/node/ts4.8/wasi.d.ts +161 -0
- package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
- package/public/types/node/ts4.8/zlib.d.ts +520 -0
- package/public/types/node/tty.d.ts +5 -3
- package/public/types/node/url.d.ts +81 -39
- package/public/types/node/util.d.ts +269 -13
- package/public/types/node/v8.d.ts +22 -4
- package/public/types/node/vm.d.ts +7 -5
- package/public/types/node/wasi.d.ts +2 -2
- package/public/types/node/worker_threads.d.ts +51 -11
- package/public/types/node/zlib.d.ts +2 -2
- package/public/types/node-red/func.d.ts +26 -17
- package/public/vendor/ace/worker-jsonata.js +1 -1
- package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
- package/public/vendor/monaco/dist/css.worker.js +1 -1
- package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/editor.js +1 -29
- package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
- package/public/vendor/monaco/dist/editor.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/json.worker.js +1 -1
- package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/locale/cs.js +324 -106
- package/public/vendor/monaco/dist/locale/de.js +336 -118
- package/public/vendor/monaco/dist/locale/es.js +329 -111
- package/public/vendor/monaco/dist/locale/fr.js +334 -116
- package/public/vendor/monaco/dist/locale/it.js +327 -109
- package/public/vendor/monaco/dist/locale/ja.js +329 -111
- package/public/vendor/monaco/dist/locale/ko.js +330 -112
- package/public/vendor/monaco/dist/locale/pl.js +329 -111
- package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
- package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
- package/public/vendor/monaco/dist/locale/ru.js +331 -113
- package/public/vendor/monaco/dist/locale/tr.js +329 -111
- package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
- package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
- package/public/vendor/monaco/dist/ts.worker.js +2 -2
- package/public/vendor/vendor.js +1 -1
- package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
- /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
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 `assert` module provides a set of assertion functions for verifying
|
|
6
6
|
* invariants.
|
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module 'assert' {
|
|
10
10
|
/**
|
|
@@ -290,8 +290,8 @@ declare module 'assert' {
|
|
|
290
290
|
* > Stability: 3 - Legacy: Use {@link strictEqual} instead.
|
|
291
291
|
*
|
|
292
292
|
* Tests shallow, coercive equality between the `actual` and `expected` parameters
|
|
293
|
-
* using the [
|
|
294
|
-
* and treated as being identical
|
|
293
|
+
* using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
|
|
294
|
+
* and treated as being identical if both sides are `NaN`.
|
|
295
295
|
*
|
|
296
296
|
* ```js
|
|
297
297
|
* import assert from 'assert';
|
|
@@ -323,9 +323,8 @@ declare module 'assert' {
|
|
|
323
323
|
*
|
|
324
324
|
* > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
|
|
325
325
|
*
|
|
326
|
-
* Tests shallow, coercive inequality with the [
|
|
327
|
-
* being identical
|
|
328
|
-
* sides are `NaN`.
|
|
326
|
+
* Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
|
|
327
|
+
* specially handled and treated as being identical if both sides are `NaN`.
|
|
329
328
|
*
|
|
330
329
|
* ```js
|
|
331
330
|
* import assert from 'assert';
|
|
@@ -415,7 +414,7 @@ declare module 'assert' {
|
|
|
415
414
|
function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
416
415
|
/**
|
|
417
416
|
* Tests strict equality between the `actual` and `expected` parameters as
|
|
418
|
-
* determined by
|
|
417
|
+
* determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
|
|
419
418
|
*
|
|
420
419
|
* ```js
|
|
421
420
|
* import assert from 'assert/strict';
|
|
@@ -453,7 +452,7 @@ declare module 'assert' {
|
|
|
453
452
|
function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
|
|
454
453
|
/**
|
|
455
454
|
* Tests strict inequality between the `actual` and `expected` parameters as
|
|
456
|
-
* determined by
|
|
455
|
+
* determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
|
|
457
456
|
*
|
|
458
457
|
* ```js
|
|
459
458
|
* import assert from 'assert/strict';
|
|
@@ -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 `async_hooks` module provides an API to track asynchronous resources. It
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import async_hooks from 'async_hooks';
|
|
10
10
|
* ```
|
|
11
11
|
* @experimental
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'async_hooks' {
|
|
15
15
|
/**
|
|
@@ -367,7 +367,7 @@ declare module 'async_hooks' {
|
|
|
367
367
|
*
|
|
368
368
|
* Each instance of `AsyncLocalStorage` maintains an independent storage context.
|
|
369
369
|
* Multiple instances can safely exist simultaneously without risk of interfering
|
|
370
|
-
* with each other data.
|
|
370
|
+
* with each other's data.
|
|
371
371
|
* @since v13.10.0, v12.17.0
|
|
372
372
|
*/
|
|
373
373
|
class AsyncLocalStorage<T> {
|
|
@@ -398,8 +398,9 @@ declare module 'async_hooks' {
|
|
|
398
398
|
getStore(): T | undefined;
|
|
399
399
|
/**
|
|
400
400
|
* Runs a function synchronously within a context and returns its
|
|
401
|
-
* return value. The store is not accessible outside of the callback function
|
|
402
|
-
*
|
|
401
|
+
* return value. The store is not accessible outside of the callback function.
|
|
402
|
+
* The store is accessible to any asynchronous operations created within the
|
|
403
|
+
* callback.
|
|
403
404
|
*
|
|
404
405
|
* The optional `args` are passed to the callback function.
|
|
405
406
|
*
|
|
@@ -413,6 +414,9 @@ declare module 'async_hooks' {
|
|
|
413
414
|
* try {
|
|
414
415
|
* asyncLocalStorage.run(store, () => {
|
|
415
416
|
* asyncLocalStorage.getStore(); // Returns the store object
|
|
417
|
+
* setTimeout(() => {
|
|
418
|
+
* asyncLocalStorage.getStore(); // Returns the store object
|
|
419
|
+
* }, 200);
|
|
416
420
|
* throw new Error();
|
|
417
421
|
* });
|
|
418
422
|
* } catch (e) {
|
|
@@ -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
|
* `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
|
45
45
|
* const buf7 = Buffer.from('tést', 'latin1');
|
|
46
46
|
* ```
|
|
47
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
47
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
|
|
48
48
|
*/
|
|
49
49
|
declare module 'buffer' {
|
|
50
50
|
import { BinaryLike } from 'node:crypto';
|
|
@@ -117,18 +117,17 @@ declare module 'buffer' {
|
|
|
117
117
|
/**
|
|
118
118
|
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
|
|
119
119
|
* multiple worker threads.
|
|
120
|
-
* @since v15.7.0
|
|
121
|
-
* @experimental
|
|
120
|
+
* @since v15.7.0, v14.18.0
|
|
122
121
|
*/
|
|
123
122
|
export class Blob {
|
|
124
123
|
/**
|
|
125
124
|
* The total size of the `Blob` in bytes.
|
|
126
|
-
* @since v15.7.0
|
|
125
|
+
* @since v15.7.0, v14.18.0
|
|
127
126
|
*/
|
|
128
127
|
readonly size: number;
|
|
129
128
|
/**
|
|
130
129
|
* The content-type of the `Blob`.
|
|
131
|
-
* @since v15.7.0
|
|
130
|
+
* @since v15.7.0, v14.18.0
|
|
132
131
|
*/
|
|
133
132
|
readonly type: string;
|
|
134
133
|
/**
|
|
@@ -143,13 +142,13 @@ declare module 'buffer' {
|
|
|
143
142
|
/**
|
|
144
143
|
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
145
144
|
* the `Blob` data.
|
|
146
|
-
* @since v15.7.0
|
|
145
|
+
* @since v15.7.0, v14.18.0
|
|
147
146
|
*/
|
|
148
147
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
149
148
|
/**
|
|
150
149
|
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
|
151
150
|
* data. The original `Blob` is not altered.
|
|
152
|
-
* @since v15.7.0
|
|
151
|
+
* @since v15.7.0, v14.18.0
|
|
153
152
|
* @param start The starting index.
|
|
154
153
|
* @param end The ending index.
|
|
155
154
|
* @param type The content-type for the new `Blob`
|
|
@@ -158,7 +157,7 @@ declare module 'buffer' {
|
|
|
158
157
|
/**
|
|
159
158
|
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
|
160
159
|
* UTF-8 string.
|
|
161
|
-
* @since v15.7.0
|
|
160
|
+
* @since v15.7.0, v14.18.0
|
|
162
161
|
*/
|
|
163
162
|
text(): Promise<string>;
|
|
164
163
|
/**
|
|
@@ -169,6 +168,12 @@ declare module 'buffer' {
|
|
|
169
168
|
}
|
|
170
169
|
export import atob = globalThis.atob;
|
|
171
170
|
export import btoa = globalThis.btoa;
|
|
171
|
+
|
|
172
|
+
import { Blob as NodeBlob } from 'buffer';
|
|
173
|
+
// This conditional type will be the existing global Blob in a browser, or
|
|
174
|
+
// the copy below in a Node environment.
|
|
175
|
+
type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
|
|
176
|
+
? T : NodeBlob;
|
|
172
177
|
global {
|
|
173
178
|
// Buffer class
|
|
174
179
|
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
@@ -394,7 +399,7 @@ declare module 'buffer' {
|
|
|
394
399
|
* @since v0.11.13
|
|
395
400
|
* @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
|
|
396
401
|
*/
|
|
397
|
-
compare(buf1: Uint8Array, buf2: Uint8Array):
|
|
402
|
+
compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
|
|
398
403
|
/**
|
|
399
404
|
* Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
|
|
400
405
|
*
|
|
@@ -447,7 +452,7 @@ declare module 'buffer' {
|
|
|
447
452
|
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
|
|
448
453
|
*
|
|
449
454
|
* The underlying memory for `Buffer` instances created in this way is _not_
|
|
450
|
-
* _initialized_. The contents of the newly created `Buffer` are unknown
|
|
455
|
+
* _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
|
|
451
456
|
*
|
|
452
457
|
* ```js
|
|
453
458
|
* import { Buffer } from 'buffer';
|
|
@@ -485,7 +490,7 @@ declare module 'buffer' {
|
|
|
485
490
|
* if `size` is 0.
|
|
486
491
|
*
|
|
487
492
|
* The underlying memory for `Buffer` instances created in this way is _not_
|
|
488
|
-
* _initialized_. The contents of the newly created `Buffer` are unknown
|
|
493
|
+
* _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
|
|
489
494
|
* such `Buffer` instances with zeroes.
|
|
490
495
|
*
|
|
491
496
|
* When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
|
|
@@ -708,7 +713,7 @@ declare module 'buffer' {
|
|
|
708
713
|
* @param [sourceStart=0] The offset within `buf` at which to begin comparison.
|
|
709
714
|
* @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
|
|
710
715
|
*/
|
|
711
|
-
compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number):
|
|
716
|
+
compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
|
|
712
717
|
/**
|
|
713
718
|
* Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
|
|
714
719
|
*
|
|
@@ -767,8 +772,6 @@ declare module 'buffer' {
|
|
|
767
772
|
* Returns a new `Buffer` that references the same memory as the original, but
|
|
768
773
|
* offset and cropped by the `start` and `end` indices.
|
|
769
774
|
*
|
|
770
|
-
* This is the same behavior as `buf.subarray()`.
|
|
771
|
-
*
|
|
772
775
|
* This method is not compatible with the `Uint8Array.prototype.slice()`,
|
|
773
776
|
* which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
|
|
774
777
|
*
|
|
@@ -784,8 +787,17 @@ declare module 'buffer' {
|
|
|
784
787
|
*
|
|
785
788
|
* console.log(buf.toString());
|
|
786
789
|
* // Prints: buffer
|
|
790
|
+
*
|
|
791
|
+
* // With buf.slice(), the original buffer is modified.
|
|
792
|
+
* const notReallyCopiedBuf = buf.slice();
|
|
793
|
+
* notReallyCopiedBuf[0]++;
|
|
794
|
+
* console.log(notReallyCopiedBuf.toString());
|
|
795
|
+
* // Prints: cuffer
|
|
796
|
+
* console.log(buf.toString());
|
|
797
|
+
* // Also prints: cuffer (!)
|
|
787
798
|
* ```
|
|
788
799
|
* @since v0.3.0
|
|
800
|
+
* @deprecated Use `subarray` instead.
|
|
789
801
|
* @param [start=0] Where the new `Buffer` will start.
|
|
790
802
|
* @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
|
|
791
803
|
*/
|
|
@@ -1952,7 +1964,7 @@ declare module 'buffer' {
|
|
|
1952
1964
|
*
|
|
1953
1965
|
* * a string, `value` is interpreted according to the character encoding in`encoding`.
|
|
1954
1966
|
* * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
|
|
1955
|
-
* To compare a partial `Buffer`, use `buf.
|
|
1967
|
+
* To compare a partial `Buffer`, use `buf.subarray`.
|
|
1956
1968
|
* * a number, `value` will be interpreted as an unsigned 8-bit integer
|
|
1957
1969
|
* value between `0` and `255`.
|
|
1958
1970
|
*
|
|
@@ -2208,7 +2220,7 @@ declare module 'buffer' {
|
|
|
2208
2220
|
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
|
2209
2221
|
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
|
2210
2222
|
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
|
|
2211
|
-
* @since v15.13.0
|
|
2223
|
+
* @since v15.13.0, v14.17.0
|
|
2212
2224
|
* @deprecated Use `Buffer.from(data, 'base64')` instead.
|
|
2213
2225
|
* @param data The Base64-encoded input string.
|
|
2214
2226
|
*/
|
|
@@ -2224,11 +2236,24 @@ declare module 'buffer' {
|
|
|
2224
2236
|
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
|
2225
2237
|
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
|
2226
2238
|
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
|
|
2227
|
-
* @since v15.13.0
|
|
2239
|
+
* @since v15.13.0, v14.17.0
|
|
2228
2240
|
* @deprecated Use `buf.toString('base64')` instead.
|
|
2229
2241
|
* @param data An ASCII (Latin1) string.
|
|
2230
2242
|
*/
|
|
2231
2243
|
function btoa(data: string): string;
|
|
2244
|
+
|
|
2245
|
+
interface Blob extends __Blob {}
|
|
2246
|
+
/**
|
|
2247
|
+
* `Blob` class is a global reference for `require('node:buffer').Blob`
|
|
2248
|
+
* https://nodejs.org/api/buffer.html#class-blob
|
|
2249
|
+
* @since v18.0.0
|
|
2250
|
+
*/
|
|
2251
|
+
var Blob: typeof globalThis extends {
|
|
2252
|
+
onmessage: any;
|
|
2253
|
+
Blob: infer T;
|
|
2254
|
+
}
|
|
2255
|
+
? T
|
|
2256
|
+
: typeof NodeBlob;
|
|
2232
2257
|
}
|
|
2233
2258
|
}
|
|
2234
2259
|
declare module 'node:buffer' {
|
|
@@ -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 `child_process` module provides the ability to spawn subprocesses in
|
|
@@ -31,8 +31,11 @@
|
|
|
31
31
|
* identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
|
|
32
32
|
*
|
|
33
33
|
* The command lookup is performed using the `options.env.PATH` environment
|
|
34
|
-
* variable if
|
|
35
|
-
* used.
|
|
34
|
+
* variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
|
|
35
|
+
* used. If `options.env` is set without `PATH`, lookup on Unix is performed
|
|
36
|
+
* on a default search path search of `/usr/bin:/bin` (see your operating system's
|
|
37
|
+
* manual for execvpe/execvp), on Windows the current processes environment
|
|
38
|
+
* variable `PATH` is used.
|
|
36
39
|
*
|
|
37
40
|
* On Windows, environment variables are case-insensitive. Node.js
|
|
38
41
|
* lexicographically sorts the `env` keys and uses the first one that
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
64
67
|
* the synchronous methods can have significant impact on performance due to
|
|
65
68
|
* stalling the event loop while spawned processes complete.
|
|
66
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
69
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js)
|
|
67
70
|
*/
|
|
68
71
|
declare module 'child_process' {
|
|
69
72
|
import { ObjectEncodingOptions } from 'node:fs';
|
|
@@ -624,7 +627,7 @@ declare module 'child_process' {
|
|
|
624
627
|
}
|
|
625
628
|
interface CommonOptions extends ProcessEnvOptions {
|
|
626
629
|
/**
|
|
627
|
-
* @default
|
|
630
|
+
* @default true
|
|
628
631
|
*/
|
|
629
632
|
windowsHide?: boolean | undefined;
|
|
630
633
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Clusters of Node.js processes can be used to run multiple instances of Node.js
|
|
6
|
+
* that can distribute workloads among their application threads. When process
|
|
7
|
+
* isolation is not needed, use the `worker_threads` module instead, which
|
|
8
|
+
* allows running multiple application threads within a single Node.js instance.
|
|
8
9
|
*
|
|
9
10
|
* The cluster module allows easy creation of child processes that all share
|
|
10
11
|
* server ports.
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
* ```
|
|
53
54
|
*
|
|
54
55
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
55
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js)
|
|
56
57
|
*/
|
|
57
58
|
declare module 'cluster' {
|
|
58
59
|
import * as child from 'node:child_process';
|
|
@@ -102,9 +103,9 @@ declare module 'cluster' {
|
|
|
102
103
|
/**
|
|
103
104
|
* Send a message to a worker or primary, optionally with a handle.
|
|
104
105
|
*
|
|
105
|
-
* In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
|
|
106
|
+
* In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
|
|
106
107
|
*
|
|
107
|
-
* In a worker this sends a message to the primary. It is identical to`process.send()`.
|
|
108
|
+
* In a worker, this sends a message to the primary. It is identical to`process.send()`.
|
|
108
109
|
*
|
|
109
110
|
* This example will echo back all messages from the primary:
|
|
110
111
|
*
|
|
@@ -126,19 +127,13 @@ declare module 'cluster' {
|
|
|
126
127
|
send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
|
|
127
128
|
send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
|
|
128
129
|
/**
|
|
129
|
-
* This function will kill the worker. In the primary, it does this
|
|
130
|
-
*
|
|
131
|
-
* with `signal`. In the worker, it does it by disconnecting the channel,
|
|
132
|
-
* and then exiting with code `0`.
|
|
130
|
+
* This function will kill the worker. In the primary worker, it does this by
|
|
131
|
+
* disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
|
|
133
132
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* if the worker enters an infinite loop, a graceful disconnect will never occur.
|
|
137
|
-
* If the graceful disconnect behavior is not needed, use `worker.process.kill()`.
|
|
133
|
+
* The `kill()` function kills the worker process without waiting for a graceful
|
|
134
|
+
* disconnect, it has the same behavior as `worker.process.kill()`.
|
|
138
135
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* This method is aliased as `worker.destroy()` for backward compatibility.
|
|
136
|
+
* This method is aliased as `worker.destroy()` for backwards compatibility.
|
|
142
137
|
*
|
|
143
138
|
* In a worker, `process.kill()` exists, but it is not this function;
|
|
144
139
|
* it is `kill()`.
|
|
@@ -256,7 +251,8 @@ declare module 'cluster' {
|
|
|
256
251
|
*/
|
|
257
252
|
isDead(): boolean;
|
|
258
253
|
/**
|
|
259
|
-
* This property is `true` if the worker exited due to `.
|
|
254
|
+
* This property is `true` if the worker exited due to `.disconnect()`.
|
|
255
|
+
* If the worker exited any other way, it is `false`. If the
|
|
260
256
|
* worker has not exited, it is `undefined`.
|
|
261
257
|
*
|
|
262
258
|
* The boolean `worker.exitedAfterDisconnect` allows distinguishing between
|
|
@@ -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 `console` module provides a simple debugging console that is similar to the
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
57
57
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
58
58
|
* ```
|
|
59
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
59
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
|
|
60
60
|
*/
|
|
61
61
|
declare module 'console' {
|
|
62
62
|
import console = require('node:console');
|