@node-red/editor-client 3.1.8 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/locales/de/editor.json +2 -0
- package/locales/en-US/editor.json +10 -1
- package/locales/fr/editor.json +8 -1
- package/locales/ja/editor.json +10 -3
- package/package.json +1 -1
- package/public/red/about +52 -0
- package/public/red/red.js +1433 -263
- package/public/red/red.min.js +3 -3
- package/public/red/style.min.css +2 -2
- package/public/red/tours/3.1/welcome.js +231 -0
- package/public/red/tours/images/nr4-auto-complete.png +0 -0
- package/public/red/tours/images/nr4-config-select.png +0 -0
- package/public/red/tours/images/nr4-multiplayer.png +0 -0
- package/public/red/tours/images/nr4-plugins.png +0 -0
- package/public/red/tours/images/nr4-sf-config.png +0 -0
- package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
- package/public/red/tours/welcome.js +105 -161
- package/public/types/node/assert/strict.d.ts +1 -1
- package/public/types/node/assert.d.ts +8 -9
- package/public/types/node/async_hooks.d.ts +9 -5
- package/public/types/node/buffer.d.ts +43 -18
- package/public/types/node/child_process.d.ts +8 -5
- package/public/types/node/cluster.d.ts +15 -19
- package/public/types/node/console.d.ts +2 -2
- package/public/types/node/crypto.d.ts +165 -70
- package/public/types/node/dgram.d.ts +4 -4
- package/public/types/node/diagnostics_channel.d.ts +8 -7
- package/public/types/node/dns/promises.d.ts +11 -9
- package/public/types/node/dns.d.ts +18 -13
- package/public/types/node/dom-events.d.ts +129 -0
- package/public/types/node/domain.d.ts +2 -2
- package/public/types/node/events.d.ts +49 -12
- package/public/types/node/fs/promises.d.ts +68 -24
- package/public/types/node/fs.d.ts +132 -59
- package/public/types/node/globals.d.ts +31 -17
- package/public/types/node/http.d.ts +138 -27
- package/public/types/node/http2.d.ts +38 -5
- package/public/types/node/https.d.ts +12 -3
- package/public/types/node/module.d.ts +1 -2
- package/public/types/node/net.d.ts +69 -28
- package/public/types/node/os.d.ts +16 -5
- package/public/types/node/path.d.ts +5 -5
- package/public/types/node/perf_hooks.d.ts +48 -9
- package/public/types/node/process.d.ts +18 -17
- package/public/types/node/querystring.d.ts +2 -2
- package/public/types/node/readline/promises.d.ts +146 -0
- package/public/types/node/readline.d.ts +141 -31
- package/public/types/node/stream/consumers.d.ts +2 -2
- package/public/types/node/stream/promises.d.ts +1 -1
- package/public/types/node/stream/web.d.ts +4 -66
- package/public/types/node/stream.d.ts +96 -118
- package/public/types/node/string_decoder.d.ts +2 -2
- package/public/types/node/test.d.ts +200 -16
- package/public/types/node/timers/promises.d.ts +1 -26
- package/public/types/node/timers.d.ts +2 -2
- package/public/types/node/tls.d.ts +21 -12
- package/public/types/node/trace_events.d.ts +12 -2
- package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
- package/public/types/node/ts4.8/assert.d.ts +964 -0
- package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
- package/public/types/node/ts4.8/buffer.d.ts +2262 -0
- package/public/types/node/ts4.8/child_process.d.ts +1372 -0
- package/public/types/node/ts4.8/cluster.d.ts +413 -0
- package/public/types/node/ts4.8/console.d.ts +415 -0
- package/public/types/node/ts4.8/crypto.d.ts +3967 -0
- package/public/types/node/ts4.8/dgram.d.ts +548 -0
- package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
- package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
- package/public/types/node/ts4.8/dns.d.ts +662 -0
- package/public/types/node/ts4.8/dom-events.d.ts +129 -0
- package/public/types/node/ts4.8/domain.d.ts +173 -0
- package/public/types/node/ts4.8/events.d.ts +681 -0
- package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
- package/public/types/node/ts4.8/fs.d.ts +3875 -0
- package/public/types/node/ts4.8/globals.d.ts +297 -0
- package/public/types/node/ts4.8/http.d.ts +1617 -0
- package/public/types/node/ts4.8/http2.d.ts +2137 -0
- package/public/types/node/ts4.8/https.d.ts +544 -0
- package/public/types/node/ts4.8/module.d.ts +117 -0
- package/public/types/node/ts4.8/net.d.ts +872 -0
- package/public/types/node/ts4.8/os.d.ts +469 -0
- package/public/types/node/ts4.8/path.d.ts +194 -0
- package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
- package/public/types/node/ts4.8/process.d.ts +1485 -0
- package/public/types/node/ts4.8/querystring.d.ts +134 -0
- package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
- package/public/types/node/ts4.8/readline.d.ts +656 -0
- package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
- package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
- package/public/types/node/ts4.8/stream/web.d.ts +333 -0
- package/public/types/node/ts4.8/stream.d.ts +1343 -0
- package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
- package/public/types/node/ts4.8/test.d.ts +377 -0
- package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
- package/public/types/node/ts4.8/timers.d.ts +97 -0
- package/public/types/node/ts4.8/tls.d.ts +1031 -0
- package/public/types/node/ts4.8/trace_events.d.ts +174 -0
- package/public/types/node/ts4.8/tty.d.ts +209 -0
- package/public/types/node/ts4.8/url.d.ts +900 -0
- package/public/types/node/ts4.8/util.d.ts +1853 -0
- package/public/types/node/ts4.8/v8.d.ts +399 -0
- package/public/types/node/ts4.8/vm.d.ts +512 -0
- package/public/types/node/ts4.8/wasi.d.ts +161 -0
- package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
- package/public/types/node/ts4.8/zlib.d.ts +520 -0
- package/public/types/node/tty.d.ts +5 -3
- package/public/types/node/url.d.ts +81 -39
- package/public/types/node/util.d.ts +269 -13
- package/public/types/node/v8.d.ts +22 -4
- package/public/types/node/vm.d.ts +7 -5
- package/public/types/node/wasi.d.ts +2 -2
- package/public/types/node/worker_threads.d.ts +51 -11
- package/public/types/node/zlib.d.ts +2 -2
- package/public/types/node-red/func.d.ts +26 -17
- package/public/vendor/ace/worker-jsonata.js +1 -1
- package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
- package/public/vendor/monaco/dist/css.worker.js +1 -1
- package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/editor.js +1 -29
- package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
- package/public/vendor/monaco/dist/editor.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/json.worker.js +1 -1
- package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/locale/cs.js +324 -106
- package/public/vendor/monaco/dist/locale/de.js +336 -118
- package/public/vendor/monaco/dist/locale/es.js +329 -111
- package/public/vendor/monaco/dist/locale/fr.js +334 -116
- package/public/vendor/monaco/dist/locale/it.js +327 -109
- package/public/vendor/monaco/dist/locale/ja.js +329 -111
- package/public/vendor/monaco/dist/locale/ko.js +330 -112
- package/public/vendor/monaco/dist/locale/pl.js +329 -111
- package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
- package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
- package/public/vendor/monaco/dist/locale/ru.js +331 -113
- package/public/vendor/monaco/dist/locale/tr.js +329 -111
- package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
- package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
- package/public/vendor/monaco/dist/ts.worker.js +2 -2
- package/public/vendor/vendor.js +1 -1
- package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
- /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `fs` module enables interacting with the file system in a
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* All file system operations have synchronous, callback, and promise-based
|
|
21
21
|
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
22
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
22
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js)
|
|
23
23
|
*/
|
|
24
24
|
declare module 'fs' {
|
|
25
25
|
import * as stream from 'node:stream';
|
|
@@ -271,18 +271,22 @@ declare module 'fs' {
|
|
|
271
271
|
*/
|
|
272
272
|
export interface StatWatcher extends EventEmitter {
|
|
273
273
|
/**
|
|
274
|
+
* When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
|
|
275
|
+
* no effect.
|
|
276
|
+
*
|
|
277
|
+
* By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
|
|
278
|
+
* unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
|
|
279
|
+
* called previously.
|
|
274
280
|
* @since v14.3.0, v12.20.0
|
|
275
|
-
* When called, requests that the Node.js event loop not exit so long as the `fs.StatWatcher` is active.
|
|
276
|
-
* Calling `watcher.ref()` multiple times will have no effect.
|
|
277
|
-
* By default, all `fs.StatWatcher`` objects are "ref'ed", making it normally unnecessary to call `watcher.ref()`
|
|
278
|
-
* unless `watcher.unref()` had been called previously.
|
|
279
281
|
*/
|
|
280
282
|
ref(): this;
|
|
281
283
|
/**
|
|
284
|
+
* When called, the active `fs.StatWatcher` object will not require the Node.js
|
|
285
|
+
* event loop to remain active. If there is no other activity keeping the
|
|
286
|
+
* event loop running, the process may exit before the `fs.StatWatcher` object's
|
|
287
|
+
* callback is invoked. Calling `watcher.unref()` multiple times will have
|
|
288
|
+
* no effect.
|
|
282
289
|
* @since v14.3.0, v12.20.0
|
|
283
|
-
* When called, the active `fs.StatWatcher`` object will not require the Node.js event loop to remain active.
|
|
284
|
-
* If there is no other activity keeping the event loop running, the process may exit before the `fs.StatWatcher`` object's callback is invoked.
|
|
285
|
-
* `Calling watcher.unref()` multiple times will have no effect.
|
|
286
290
|
*/
|
|
287
291
|
unref(): this;
|
|
288
292
|
}
|
|
@@ -1017,8 +1021,10 @@ declare module 'fs' {
|
|
|
1017
1021
|
function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
1018
1022
|
}
|
|
1019
1023
|
/**
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1024
|
+
* Retrieves the `fs.Stats` for the file descriptor.
|
|
1025
|
+
*
|
|
1026
|
+
* See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
|
|
1027
|
+
* @since v0.1.95
|
|
1022
1028
|
*/
|
|
1023
1029
|
export function fstatSync(
|
|
1024
1030
|
fd: number,
|
|
@@ -1033,7 +1039,6 @@ declare module 'fs' {
|
|
|
1033
1039
|
}
|
|
1034
1040
|
): BigIntStats;
|
|
1035
1041
|
export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
1036
|
-
|
|
1037
1042
|
/**
|
|
1038
1043
|
* Retrieves the `fs.Stats` for the symbolic link referred to by the path.
|
|
1039
1044
|
* The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
|
|
@@ -1121,15 +1126,15 @@ declare module 'fs' {
|
|
|
1121
1126
|
* ```js
|
|
1122
1127
|
* import { symlink } from 'fs';
|
|
1123
1128
|
*
|
|
1124
|
-
* symlink('./mew', './
|
|
1129
|
+
* symlink('./mew', './mewtwo', callback);
|
|
1125
1130
|
* ```
|
|
1126
1131
|
*
|
|
1127
|
-
* The above example creates a symbolic link `mewtwo`
|
|
1128
|
-
*
|
|
1132
|
+
* The above example creates a symbolic link `mewtwo` which points to `mew` in the
|
|
1133
|
+
* same directory:
|
|
1129
1134
|
*
|
|
1130
1135
|
* ```bash
|
|
1131
|
-
* $ tree
|
|
1132
|
-
*
|
|
1136
|
+
* $ tree .
|
|
1137
|
+
* .
|
|
1133
1138
|
* ├── mew
|
|
1134
1139
|
* └── mewtwo -> ./mew
|
|
1135
1140
|
* ```
|
|
@@ -1393,7 +1398,7 @@ declare module 'fs' {
|
|
|
1393
1398
|
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
1394
1399
|
*
|
|
1395
1400
|
* If `true`, perform a recursive directory removal. In
|
|
1396
|
-
* recursive mode
|
|
1401
|
+
* recursive mode, operations are retried on failure.
|
|
1397
1402
|
* @default false
|
|
1398
1403
|
*/
|
|
1399
1404
|
recursive?: boolean | undefined;
|
|
@@ -1999,8 +2004,8 @@ declare module 'fs' {
|
|
|
1999
2004
|
export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
2000
2005
|
/**
|
|
2001
2006
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
2002
|
-
* @param [flags='r'] See `support of file system `flags``.
|
|
2003
2007
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2008
|
+
* @param [flags='r'] See `support of file system `flags``.
|
|
2004
2009
|
*/
|
|
2005
2010
|
export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
2006
2011
|
/**
|
|
@@ -2008,6 +2013,7 @@ declare module 'fs' {
|
|
|
2008
2013
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2009
2014
|
*/
|
|
2010
2015
|
export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
2016
|
+
|
|
2011
2017
|
export namespace open {
|
|
2012
2018
|
/**
|
|
2013
2019
|
* Asynchronous open(2) - open and possibly create a file.
|
|
@@ -2096,8 +2102,7 @@ declare module 'fs' {
|
|
|
2096
2102
|
*/
|
|
2097
2103
|
export function fsyncSync(fd: number): void;
|
|
2098
2104
|
/**
|
|
2099
|
-
* Write `buffer` to the file specified by `fd`.
|
|
2100
|
-
* must have an own `toString` function property.
|
|
2105
|
+
* Write `buffer` to the file specified by `fd`.
|
|
2101
2106
|
*
|
|
2102
2107
|
* `offset` determines the part of the buffer to be written, and `length` is
|
|
2103
2108
|
* an integer specifying the number of bytes to write.
|
|
@@ -2220,8 +2225,6 @@ declare module 'fs' {
|
|
|
2220
2225
|
}>;
|
|
2221
2226
|
}
|
|
2222
2227
|
/**
|
|
2223
|
-
* If `buffer` is a plain object, it must have an own (not inherited) `toString`function property.
|
|
2224
|
-
*
|
|
2225
2228
|
* For detailed information, see the documentation of the asynchronous version of
|
|
2226
2229
|
* this API: {@link write}.
|
|
2227
2230
|
* @since v0.1.21
|
|
@@ -2237,6 +2240,23 @@ declare module 'fs' {
|
|
|
2237
2240
|
*/
|
|
2238
2241
|
export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
|
|
2239
2242
|
export type ReadPosition = number | bigint;
|
|
2243
|
+
export interface ReadSyncOptions {
|
|
2244
|
+
/**
|
|
2245
|
+
* @default 0
|
|
2246
|
+
*/
|
|
2247
|
+
offset?: number | undefined;
|
|
2248
|
+
/**
|
|
2249
|
+
* @default `length of buffer`
|
|
2250
|
+
*/
|
|
2251
|
+
length?: number | undefined;
|
|
2252
|
+
/**
|
|
2253
|
+
* @default null
|
|
2254
|
+
*/
|
|
2255
|
+
position?: ReadPosition | null | undefined;
|
|
2256
|
+
}
|
|
2257
|
+
export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
|
|
2258
|
+
buffer?: TBuffer;
|
|
2259
|
+
}
|
|
2240
2260
|
/**
|
|
2241
2261
|
* Read data from the file specified by `fd`.
|
|
2242
2262
|
*
|
|
@@ -2262,6 +2282,21 @@ declare module 'fs' {
|
|
|
2262
2282
|
position: ReadPosition | null,
|
|
2263
2283
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
|
|
2264
2284
|
): void;
|
|
2285
|
+
/**
|
|
2286
|
+
* Similar to the above `fs.read` function, this version takes an optional `options` object.
|
|
2287
|
+
* If not otherwise specified in an `options` object,
|
|
2288
|
+
* `buffer` defaults to `Buffer.alloc(16384)`,
|
|
2289
|
+
* `offset` defaults to `0`,
|
|
2290
|
+
* `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
|
|
2291
|
+
* `position` defaults to `null`
|
|
2292
|
+
* @since v12.17.0, 13.11.0
|
|
2293
|
+
*/
|
|
2294
|
+
export function read<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2295
|
+
fd: number,
|
|
2296
|
+
options: ReadAsyncOptions<TBuffer>,
|
|
2297
|
+
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
|
|
2298
|
+
): void;
|
|
2299
|
+
export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
|
|
2265
2300
|
export namespace read {
|
|
2266
2301
|
/**
|
|
2267
2302
|
* @param fd A file descriptor.
|
|
@@ -2280,20 +2315,17 @@ declare module 'fs' {
|
|
|
2280
2315
|
bytesRead: number;
|
|
2281
2316
|
buffer: TBuffer;
|
|
2282
2317
|
}>;
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
* @default null
|
|
2295
|
-
*/
|
|
2296
|
-
position?: ReadPosition | null | undefined;
|
|
2318
|
+
function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2319
|
+
fd: number,
|
|
2320
|
+
options: ReadAsyncOptions<TBuffer>
|
|
2321
|
+
): Promise<{
|
|
2322
|
+
bytesRead: number;
|
|
2323
|
+
buffer: TBuffer;
|
|
2324
|
+
}>;
|
|
2325
|
+
function __promisify__(fd: number): Promise<{
|
|
2326
|
+
bytesRead: number;
|
|
2327
|
+
buffer: NodeJS.ArrayBufferView;
|
|
2328
|
+
}>;
|
|
2297
2329
|
}
|
|
2298
2330
|
/**
|
|
2299
2331
|
* Returns the number of `bytesRead`.
|
|
@@ -2558,8 +2590,6 @@ declare module 'fs' {
|
|
|
2558
2590
|
*
|
|
2559
2591
|
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2560
2592
|
*
|
|
2561
|
-
* If `data` is a plain object, it must have an own (not inherited) `toString`function property.
|
|
2562
|
-
*
|
|
2563
2593
|
* ```js
|
|
2564
2594
|
* import { writeFile } from 'fs';
|
|
2565
2595
|
* import { Buffer } from 'buffer';
|
|
@@ -2636,8 +2666,6 @@ declare module 'fs' {
|
|
|
2636
2666
|
/**
|
|
2637
2667
|
* Returns `undefined`.
|
|
2638
2668
|
*
|
|
2639
|
-
* If `data` is a plain object, it must have an own (not inherited) `toString`function property.
|
|
2640
|
-
*
|
|
2641
2669
|
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2642
2670
|
*
|
|
2643
2671
|
* For detailed information, see the documentation of the asynchronous version of
|
|
@@ -2821,6 +2849,52 @@ declare module 'fs' {
|
|
|
2821
2849
|
persistent?: boolean | undefined;
|
|
2822
2850
|
interval?: number | undefined;
|
|
2823
2851
|
}
|
|
2852
|
+
/**
|
|
2853
|
+
* Watch for changes on `filename`. The callback `listener` will be called each
|
|
2854
|
+
* time the file is accessed.
|
|
2855
|
+
*
|
|
2856
|
+
* The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
|
|
2857
|
+
* whether the process should continue to run as long as files are being watched.
|
|
2858
|
+
* The `options` object may specify an `interval` property indicating how often the
|
|
2859
|
+
* target should be polled in milliseconds.
|
|
2860
|
+
*
|
|
2861
|
+
* The `listener` gets two arguments the current stat object and the previous
|
|
2862
|
+
* stat object:
|
|
2863
|
+
*
|
|
2864
|
+
* ```js
|
|
2865
|
+
* import { watchFile } from 'fs';
|
|
2866
|
+
*
|
|
2867
|
+
* watchFile('message.text', (curr, prev) => {
|
|
2868
|
+
* console.log(`the current mtime is: ${curr.mtime}`);
|
|
2869
|
+
* console.log(`the previous mtime was: ${prev.mtime}`);
|
|
2870
|
+
* });
|
|
2871
|
+
* ```
|
|
2872
|
+
*
|
|
2873
|
+
* These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
|
|
2874
|
+
* the numeric values in these objects are specified as `BigInt`s.
|
|
2875
|
+
*
|
|
2876
|
+
* To be notified when the file was modified, not just accessed, it is necessary
|
|
2877
|
+
* to compare `curr.mtimeMs` and `prev.mtimeMs`.
|
|
2878
|
+
*
|
|
2879
|
+
* When an `fs.watchFile` operation results in an `ENOENT` error, it
|
|
2880
|
+
* will invoke the listener once, with all the fields zeroed (or, for dates, the
|
|
2881
|
+
* Unix Epoch). If the file is created later on, the listener will be called
|
|
2882
|
+
* again, with the latest stat objects. This is a change in functionality since
|
|
2883
|
+
* v0.10.
|
|
2884
|
+
*
|
|
2885
|
+
* Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
|
|
2886
|
+
*
|
|
2887
|
+
* When a file being watched by `fs.watchFile()` disappears and reappears,
|
|
2888
|
+
* then the contents of `previous` in the second callback event (the file's
|
|
2889
|
+
* reappearance) will be the same as the contents of `previous` in the first
|
|
2890
|
+
* callback event (its disappearance).
|
|
2891
|
+
*
|
|
2892
|
+
* This happens when:
|
|
2893
|
+
*
|
|
2894
|
+
* * the file is deleted, followed by a restore
|
|
2895
|
+
* * the file is renamed and then renamed a second time back to its original name
|
|
2896
|
+
* @since v0.1.31
|
|
2897
|
+
*/
|
|
2824
2898
|
export function watchFile(
|
|
2825
2899
|
filename: PathLike,
|
|
2826
2900
|
options:
|
|
@@ -3189,9 +3263,9 @@ declare module 'fs' {
|
|
|
3189
3263
|
/**
|
|
3190
3264
|
* Tests a user's permissions for the file or directory specified by `path`.
|
|
3191
3265
|
* The `mode` argument is an optional integer that specifies the accessibility
|
|
3192
|
-
* checks to be performed.
|
|
3193
|
-
*
|
|
3194
|
-
*
|
|
3266
|
+
* checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
|
|
3267
|
+
* (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
|
|
3268
|
+
* possible values of `mode`.
|
|
3195
3269
|
*
|
|
3196
3270
|
* The final argument, `callback`, is a callback function that is invoked with
|
|
3197
3271
|
* a possible error argument. If any of the accessibility checks fail, the error
|
|
@@ -3217,14 +3291,9 @@ declare module 'fs' {
|
|
|
3217
3291
|
* console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
|
|
3218
3292
|
* });
|
|
3219
3293
|
*
|
|
3220
|
-
* // Check if the file
|
|
3221
|
-
* access(file, constants.
|
|
3222
|
-
*
|
|
3223
|
-
* console.error(
|
|
3224
|
-
* `${file} ${err.code === 'ENOENT' ? 'does not exist' : 'is read-only'}`);
|
|
3225
|
-
* } else {
|
|
3226
|
-
* console.log(`${file} exists, and it is writable`);
|
|
3227
|
-
* }
|
|
3294
|
+
* // Check if the file is readable and writable.
|
|
3295
|
+
* access(file, constants.R_OK | constants.W_OK, (err) => {
|
|
3296
|
+
* console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
|
|
3228
3297
|
* });
|
|
3229
3298
|
* ```
|
|
3230
3299
|
*
|
|
@@ -3368,10 +3437,9 @@ declare module 'fs' {
|
|
|
3368
3437
|
/**
|
|
3369
3438
|
* Synchronously tests a user's permissions for the file or directory specified
|
|
3370
3439
|
* by `path`. The `mode` argument is an optional integer that specifies the
|
|
3371
|
-
* accessibility checks to be performed.
|
|
3372
|
-
*
|
|
3373
|
-
*
|
|
3374
|
-
* (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
|
|
3440
|
+
* accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
|
|
3441
|
+
* `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
|
|
3442
|
+
* possible values of `mode`.
|
|
3375
3443
|
*
|
|
3376
3444
|
* If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
|
|
3377
3445
|
* the method will return `undefined`.
|
|
@@ -3474,9 +3542,9 @@ declare module 'fs' {
|
|
|
3474
3542
|
/**
|
|
3475
3543
|
* `options` may also include a `start` option to allow writing data at some
|
|
3476
3544
|
* position past the beginning of the file, allowed values are in the
|
|
3477
|
-
* \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
|
|
3478
|
-
* it may require the `flags` option to be set to `r+` rather than the
|
|
3479
|
-
* The `encoding` can be any one of those accepted by `Buffer`.
|
|
3545
|
+
* \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
|
|
3546
|
+
* replacing it may require the `flags` option to be set to `r+` rather than the
|
|
3547
|
+
* default `w`. The `encoding` can be any one of those accepted by `Buffer`.
|
|
3480
3548
|
*
|
|
3481
3549
|
* If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
|
|
3482
3550
|
* then the file descriptor won't be closed, even if there's an error.
|
|
@@ -3756,6 +3824,11 @@ declare module 'fs' {
|
|
|
3756
3824
|
* @default false
|
|
3757
3825
|
*/
|
|
3758
3826
|
recursive?: boolean;
|
|
3827
|
+
/**
|
|
3828
|
+
* When true, path resolution for symlinks will be skipped
|
|
3829
|
+
* @default false
|
|
3830
|
+
*/
|
|
3831
|
+
verbatimSymlinks?: boolean;
|
|
3759
3832
|
}
|
|
3760
3833
|
export interface CopyOptions extends CopyOptionsBase {
|
|
3761
3834
|
/**
|
|
@@ -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
|
// Declare "static" methods in Error
|
|
5
5
|
interface ErrorConstructor {
|
|
@@ -56,28 +56,32 @@ interface AbortController {
|
|
|
56
56
|
/**
|
|
57
57
|
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
58
58
|
*/
|
|
59
|
-
abort(
|
|
59
|
+
abort(): void;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
|
|
63
|
-
interface AbortSignal {
|
|
63
|
+
interface AbortSignal extends EventTarget {
|
|
64
64
|
/**
|
|
65
65
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
66
66
|
*/
|
|
67
67
|
readonly aborted: boolean;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
declare var AbortController: {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
|
|
71
|
+
? T
|
|
72
|
+
: {
|
|
73
|
+
prototype: AbortController;
|
|
74
|
+
new(): AbortController;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
|
|
78
|
+
? T
|
|
79
|
+
: {
|
|
80
|
+
prototype: AbortSignal;
|
|
81
|
+
new(): AbortSignal;
|
|
82
|
+
abort(reason?: any): AbortSignal;
|
|
83
|
+
timeout(milliseconds: number): AbortSignal;
|
|
84
|
+
};
|
|
81
85
|
//#endregion borrowed
|
|
82
86
|
|
|
83
87
|
//#region ArrayLike.at()
|
|
@@ -105,6 +109,16 @@ interface BigInt64Array extends RelativeIndexable<bigint> {}
|
|
|
105
109
|
interface BigUint64Array extends RelativeIndexable<bigint> {}
|
|
106
110
|
//#endregion ArrayLike.at() end
|
|
107
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @since v17.0.0
|
|
114
|
+
*
|
|
115
|
+
* Creates a deep clone of an object.
|
|
116
|
+
*/
|
|
117
|
+
declare function structuredClone<T>(
|
|
118
|
+
value: T,
|
|
119
|
+
transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
|
|
120
|
+
): T;
|
|
121
|
+
|
|
108
122
|
/*----------------------------------------------*
|
|
109
123
|
* *
|
|
110
124
|
* GLOBAL INTERFACES *
|
|
@@ -210,9 +224,9 @@ declare namespace NodeJS {
|
|
|
210
224
|
writable: boolean;
|
|
211
225
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
212
226
|
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
213
|
-
end(cb?: () => void):
|
|
214
|
-
end(data: string | Uint8Array, cb?: () => void):
|
|
215
|
-
end(str: string, encoding?: BufferEncoding, cb?: () => void):
|
|
227
|
+
end(cb?: () => void): this;
|
|
228
|
+
end(data: string | Uint8Array, cb?: () => void): this;
|
|
229
|
+
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
216
230
|
}
|
|
217
231
|
|
|
218
232
|
interface ReadWriteStream extends ReadableStream, WritableStream { }
|