@node-red/editor-client 2.0.4 → 2.1.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 (77) hide show
  1. package/locales/en-US/editor.json +37 -7
  2. package/locales/ko/editor.json +1 -1
  3. package/package.json +2 -2
  4. package/public/red/about +109 -0
  5. package/public/red/images/node-red-256.svg +1 -0
  6. package/public/red/keymap.json +13 -2
  7. package/public/red/red.js +6122 -3663
  8. package/public/red/red.min.js +1 -1
  9. package/public/red/style.min.css +2 -2
  10. package/public/red/tours/first-flow.js +80 -0
  11. package/public/red/tours/welcome.js +135 -0
  12. package/public/tours/first-flow.js +82 -0
  13. package/public/types/node/assert.d.ts +127 -0
  14. package/public/types/node/async_hooks.d.ts +229 -0
  15. package/public/types/node/buffer.d.ts +25 -1
  16. package/public/types/node/child_process.d.ts +514 -6
  17. package/public/types/node/cluster.d.ts +265 -0
  18. package/public/types/node/console.d.ts +136 -1
  19. package/public/types/node/crypto.d.ts +1189 -1
  20. package/public/types/node/dgram.d.ts +144 -1
  21. package/public/types/node/dns.d.ts +383 -10
  22. package/public/types/node/domain.d.ts +27 -1
  23. package/public/types/node/events.d.ts +81 -1
  24. package/public/types/node/fs.d.ts +2273 -1
  25. package/public/types/node/globals.d.ts +616 -1
  26. package/public/types/node/http.d.ts +489 -1
  27. package/public/types/node/http2.d.ts +961 -0
  28. package/public/types/node/https.d.ts +142 -0
  29. package/public/types/node/module.d.ts +55 -0
  30. package/public/types/node/net.d.ts +296 -1
  31. package/public/types/node/os.d.ts +242 -1
  32. package/public/types/node/path.d.ts +156 -1
  33. package/public/types/node/perf_hooks.d.ts +274 -0
  34. package/public/types/node/process.d.ts +412 -1
  35. package/public/types/node/querystring.d.ts +31 -1
  36. package/public/types/node/readline.d.ts +173 -0
  37. package/public/types/node/stream.d.ts +358 -0
  38. package/public/types/node/string_decoder.d.ts +10 -0
  39. package/public/types/node/timers.d.ts +19 -0
  40. package/public/types/node/tls.d.ts +783 -0
  41. package/public/types/node/trace_events.d.ts +64 -0
  42. package/public/types/node/tty.d.ts +69 -0
  43. package/public/types/node/url.d.ts +119 -1
  44. package/public/types/node/util.d.ts +210 -0
  45. package/public/types/node/v8.d.ts +190 -0
  46. package/public/types/node/vm.d.ts +155 -0
  47. package/public/types/node/wasi.d.ts +89 -0
  48. package/public/types/node/worker_threads.d.ts +241 -0
  49. package/public/types/node/zlib.d.ts +364 -0
  50. package/public/types/node-red/func.d.ts +1 -1
  51. package/public/types/node-red/util.d.ts +1 -1
  52. package/public/vendor/ace/worker-jsonata.js +1 -1
  53. package/public/vendor/monaco/dist/ThirdPartyNotices.txt +192 -192
  54. package/public/vendor/monaco/dist/css.worker.js +1 -1
  55. package/public/vendor/monaco/dist/editor.js +2 -2
  56. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  57. package/public/vendor/monaco/dist/html.worker.js +1 -1
  58. package/public/vendor/monaco/dist/json.worker.js +1 -1
  59. package/public/vendor/monaco/dist/locale/cs.js +44 -10
  60. package/public/vendor/monaco/dist/locale/de.js +46 -12
  61. package/public/vendor/monaco/dist/locale/es.js +46 -12
  62. package/public/vendor/monaco/dist/locale/fr.js +43 -9
  63. package/public/vendor/monaco/dist/locale/it.js +45 -11
  64. package/public/vendor/monaco/dist/locale/ja.js +45 -11
  65. package/public/vendor/monaco/dist/locale/ko.js +44 -10
  66. package/public/vendor/monaco/dist/locale/pl.js +42 -8
  67. package/public/vendor/monaco/dist/locale/pt-br.js +49 -15
  68. package/public/vendor/monaco/dist/locale/qps-ploc.js +1445 -0
  69. package/public/vendor/monaco/dist/locale/ru.js +48 -14
  70. package/public/vendor/monaco/dist/locale/tr.js +49 -15
  71. package/public/vendor/monaco/dist/locale/zh-hans.js +48 -14
  72. package/public/vendor/monaco/dist/locale/zh-hant.js +45 -11
  73. package/public/vendor/monaco/dist/theme/monoindustrial.json +228 -0
  74. package/public/vendor/monaco/dist/theme/solarized-dark.json +1082 -0
  75. package/public/vendor/monaco/dist/ts.worker.js +2 -2
  76. package/public/vendor/vendor.js +4 -4
  77. package/templates/index.mst +5 -1
@@ -0,0 +1,64 @@
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'trace_events' {
5
+ /**
6
+ * The `Tracing` object is used to enable or disable tracing for sets of
7
+ * categories. Instances are created using the
8
+ * `trace_events.createTracing()` method.
9
+ *
10
+ * When created, the `Tracing` object is disabled. Calling the
11
+ * `tracing.enable()` method adds the categories to the set of enabled trace
12
+ * event categories. Calling `tracing.disable()` will remove the categories
13
+ * from the set of enabled trace event categories.
14
+ */
15
+ interface Tracing {
16
+ /**
17
+ * A comma-separated list of the trace event categories covered by this
18
+ * `Tracing` object.
19
+ */
20
+ readonly categories: string;
21
+
22
+ /**
23
+ * Disables this `Tracing` object.
24
+ *
25
+ * Only trace event categories _not_ covered by other enabled `Tracing`
26
+ * objects and _not_ specified by the `--trace-event-categories` flag
27
+ * will be disabled.
28
+ */
29
+ disable(): void;
30
+
31
+ /**
32
+ * Enables this `Tracing` object for the set of categories covered by
33
+ * the `Tracing` object.
34
+ */
35
+ enable(): void;
36
+
37
+ /**
38
+ * `true` only if the `Tracing` object has been enabled.
39
+ */
40
+ readonly enabled: boolean;
41
+ }
42
+
43
+ interface CreateTracingOptions {
44
+ /**
45
+ * An array of trace category names. Values included in the array are
46
+ * coerced to a string when possible. An error will be thrown if the
47
+ * value cannot be coerced.
48
+ */
49
+ categories: string[];
50
+ }
51
+
52
+ /**
53
+ * Creates and returns a Tracing object for the given set of categories.
54
+ */
55
+ function createTracing(options: CreateTracingOptions): Tracing;
56
+
57
+ /**
58
+ * Returns a comma-separated list of all currently-enabled trace event
59
+ * categories. The current set of enabled trace event categories is
60
+ * determined by the union of all currently-enabled `Tracing` objects and
61
+ * any categories enabled using the `--trace-event-categories` flag.
62
+ */
63
+ function getEnabledCategories(): string | undefined;
64
+ }
@@ -0,0 +1,69 @@
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'tty' {
5
+ import * as net from 'net';
6
+
7
+ function isatty(fd: number): boolean;
8
+ class ReadStream extends net.Socket {
9
+ constructor(fd: number, options?: net.SocketConstructorOpts);
10
+ isRaw: boolean;
11
+ setRawMode(mode: boolean): this;
12
+ isTTY: boolean;
13
+ }
14
+ /**
15
+ * -1 - to the left from cursor
16
+ * 0 - the entire line
17
+ * 1 - to the right from cursor
18
+ */
19
+ type Direction = -1 | 0 | 1;
20
+ class WriteStream extends net.Socket {
21
+ constructor(fd: number);
22
+ addListener(event: string, listener: (...args: any[]) => void): this;
23
+ addListener(event: "resize", listener: () => void): this;
24
+
25
+ emit(event: string | symbol, ...args: any[]): boolean;
26
+ emit(event: "resize"): boolean;
27
+
28
+ on(event: string, listener: (...args: any[]) => void): this;
29
+ on(event: "resize", listener: () => void): this;
30
+
31
+ once(event: string, listener: (...args: any[]) => void): this;
32
+ once(event: "resize", listener: () => void): this;
33
+
34
+ prependListener(event: string, listener: (...args: any[]) => void): this;
35
+ prependListener(event: "resize", listener: () => void): this;
36
+
37
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
38
+ prependOnceListener(event: "resize", listener: () => void): this;
39
+
40
+ /**
41
+ * Clears the current line of this WriteStream in a direction identified by `dir`.
42
+ */
43
+ clearLine(dir: Direction, callback?: () => void): boolean;
44
+ /**
45
+ * Clears this `WriteStream` from the current cursor down.
46
+ */
47
+ clearScreenDown(callback?: () => void): boolean;
48
+ /**
49
+ * Moves this WriteStream's cursor to the specified position.
50
+ */
51
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
52
+ cursorTo(x: number, callback: () => void): boolean;
53
+ /**
54
+ * Moves this WriteStream's cursor relative to its current position.
55
+ */
56
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
57
+ /**
58
+ * @default `process.env`
59
+ */
60
+ getColorDepth(env?: {}): number;
61
+ hasColors(depth?: number): boolean;
62
+ hasColors(env?: {}): boolean;
63
+ hasColors(depth: number, env?: {}): boolean;
64
+ getWindowSize(): [number, number];
65
+ columns: number;
66
+ rows: number;
67
+ isTTY: boolean;
68
+ }
69
+ }
@@ -1 +1,119 @@
1
- declare module'node:url'{export*from'url';}declare module'url'{import{ParsedUrlQuery,ParsedUrlQueryInput}from'node:querystring';interface UrlObject{auth?:string|null;hash?:string|null;host?:string|null;hostname?:string|null;href?:string|null;pathname?:string|null;protocol?:string|null;search?:string|null;slashes?:boolean|null;port?:string|number|null;query?:string|null|ParsedUrlQueryInput;}interface Url{auth:string|null;hash:string|null;host:string|null;hostname:string|null;href:string;path:string|null;pathname:string|null;protocol:string|null;search:string|null;slashes:boolean|null;port:string|null;query:string|null|ParsedUrlQuery;}interface UrlWithParsedQuery extends Url{query:ParsedUrlQuery;}interface UrlWithStringQuery extends Url{query:string|null;}function parse(urlStr:string):UrlWithStringQuery;function parse(urlStr:string,parseQueryString:false|undefined,slashesDenoteHost?:boolean):UrlWithStringQuery;function parse(urlStr:string,parseQueryString:true,slashesDenoteHost?:boolean):UrlWithParsedQuery;function parse(urlStr:string,parseQueryString:boolean,slashesDenoteHost?:boolean):Url;function format(URL:URL,options?:URLFormatOptions):string;function format(urlObject:UrlObject|string):string;function resolve(from:string,to:string):string;function domainToASCII(domain:string):string;function domainToUnicode(domain:string):string;function fileURLToPath(url:string|URL):string;function pathToFileURL(url:string):URL;interface URLFormatOptions{auth?:boolean;fragment?:boolean;search?:boolean;unicode?:boolean;}class URL{constructor(input:string,base?:string|URL);hash:string;host:string;hostname:string;href:string;readonly origin:string;password:string;pathname:string;port:string;protocol:string;search:string;readonly searchParams:URLSearchParams;username:string;toString():string;toJSON():string;}class URLSearchParams implements Iterable<[string,string]>{constructor(init?:URLSearchParams|string|NodeJS.Dict<string|ReadonlyArray<string>>|Iterable<[string,string]>|ReadonlyArray<[string,string]>);append(name:string,value:string):void;delete(name:string):void;entries():IterableIterator<[string,string]>;forEach(callback:(value:string,name:string,searchParams:this)=>void):void;get(name:string):string|null;getAll(name:string):string[];has(name:string):boolean;keys():IterableIterator<string>;set(name:string,value:string):void;sort():void;toString():string;values():IterableIterator<string>;[Symbol.iterator]():IterableIterator<[string,string]>;}}
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'url' {
5
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
6
+
7
+ // Input to `url.format`
8
+ interface UrlObject {
9
+ auth?: string | null | undefined;
10
+ hash?: string | null | undefined;
11
+ host?: string | null | undefined;
12
+ hostname?: string | null | undefined;
13
+ href?: string | null | undefined;
14
+ pathname?: string | null | undefined;
15
+ protocol?: string | null | undefined;
16
+ search?: string | null | undefined;
17
+ slashes?: boolean | null | undefined;
18
+ port?: string | number | null | undefined;
19
+ query?: string | null | ParsedUrlQueryInput | undefined;
20
+ }
21
+
22
+ // Output of `url.parse`
23
+ interface Url {
24
+ auth: string | null;
25
+ hash: string | null;
26
+ host: string | null;
27
+ hostname: string | null;
28
+ href: string;
29
+ path: string | null;
30
+ pathname: string | null;
31
+ protocol: string | null;
32
+ search: string | null;
33
+ slashes: boolean | null;
34
+ port: string | null;
35
+ query: string | null | ParsedUrlQuery;
36
+ }
37
+
38
+ interface UrlWithParsedQuery extends Url {
39
+ query: ParsedUrlQuery;
40
+ }
41
+
42
+ interface UrlWithStringQuery extends Url {
43
+ query: string | null;
44
+ }
45
+
46
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
47
+ function parse(urlStr: string): UrlWithStringQuery;
48
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
49
+ function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
50
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
51
+ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
52
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
53
+ function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
54
+
55
+ function format(URL: URL, options?: URLFormatOptions): string;
56
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
57
+ function format(urlObject: UrlObject | string): string;
58
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
59
+ function resolve(from: string, to: string): string;
60
+
61
+ function domainToASCII(domain: string): string;
62
+ function domainToUnicode(domain: string): string;
63
+
64
+ /**
65
+ * This function ensures the correct decodings of percent-encoded characters as
66
+ * well as ensuring a cross-platform valid absolute path string.
67
+ * @param url The file URL string or URL object to convert to a path.
68
+ */
69
+ function fileURLToPath(url: string | URL): string;
70
+
71
+ /**
72
+ * This function ensures that path is resolved absolutely, and that the URL
73
+ * control characters are correctly encoded when converting into a File URL.
74
+ * @param url The path to convert to a File URL.
75
+ */
76
+ function pathToFileURL(url: string): URL;
77
+
78
+ interface URLFormatOptions {
79
+ auth?: boolean | undefined;
80
+ fragment?: boolean | undefined;
81
+ search?: boolean | undefined;
82
+ unicode?: boolean | undefined;
83
+ }
84
+
85
+ class URL {
86
+ constructor(input: string, base?: string | URL);
87
+ hash: string;
88
+ host: string;
89
+ hostname: string;
90
+ href: string;
91
+ readonly origin: string;
92
+ password: string;
93
+ pathname: string;
94
+ port: string;
95
+ protocol: string;
96
+ search: string;
97
+ readonly searchParams: URLSearchParams;
98
+ username: string;
99
+ toString(): string;
100
+ toJSON(): string;
101
+ }
102
+
103
+ class URLSearchParams implements Iterable<[string, string]> {
104
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
105
+ append(name: string, value: string): void;
106
+ delete(name: string): void;
107
+ entries(): IterableIterator<[string, string]>;
108
+ forEach(callback: (value: string, name: string, searchParams: this) => void): void;
109
+ get(name: string): string | null;
110
+ getAll(name: string): string[];
111
+ has(name: string): boolean;
112
+ keys(): IterableIterator<string>;
113
+ set(name: string, value: string): void;
114
+ sort(): void;
115
+ toString(): string;
116
+ values(): IterableIterator<string>;
117
+ [Symbol.iterator](): IterableIterator<[string, string]>;
118
+ }
119
+ }
@@ -0,0 +1,210 @@
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'util' {
5
+ interface InspectOptions extends NodeJS.InspectOptions { }
6
+ type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
7
+ type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
8
+ interface InspectOptionsStylized extends InspectOptions {
9
+ stylize(text: string, styleType: Style): string;
10
+ }
11
+ function format(format?: any, ...param: any[]): string;
12
+ function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
13
+ /** @deprecated since v0.11.3 - use a third party module instead. */
14
+ function log(string: string): void;
15
+ function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
16
+ function inspect(object: any, options: InspectOptions): string;
17
+ namespace inspect {
18
+ let colors: NodeJS.Dict<[number, number]>;
19
+ let styles: {
20
+ [K in Style]: string
21
+ };
22
+ let defaultOptions: InspectOptions;
23
+ /**
24
+ * Allows changing inspect settings from the repl.
25
+ */
26
+ let replDefaults: InspectOptions;
27
+ const custom: unique symbol;
28
+ }
29
+ /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
30
+ function isArray(object: any): object is any[];
31
+ /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
32
+ function isRegExp(object: any): object is RegExp;
33
+ /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
34
+ function isDate(object: any): object is Date;
35
+ /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
36
+ function isError(object: any): object is Error;
37
+ function inherits(constructor: any, superConstructor: any): void;
38
+ function debuglog(key: string): (msg: string, ...param: any[]) => void;
39
+ /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
40
+ function isBoolean(object: any): object is boolean;
41
+ /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
42
+ function isBuffer(object: any): object is Buffer;
43
+ /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
44
+ function isFunction(object: any): boolean;
45
+ /** @deprecated since v4.0.0 - use `value === null` instead. */
46
+ function isNull(object: any): object is null;
47
+ /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
48
+ function isNullOrUndefined(object: any): object is null | undefined;
49
+ /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
50
+ function isNumber(object: any): object is number;
51
+ /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
52
+ function isObject(object: any): boolean;
53
+ /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
54
+ function isPrimitive(object: any): boolean;
55
+ /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
56
+ function isString(object: any): object is string;
57
+ /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
58
+ function isSymbol(object: any): object is symbol;
59
+ /** @deprecated since v4.0.0 - use `value === undefined` instead. */
60
+ function isUndefined(object: any): object is undefined;
61
+ function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
62
+ function isDeepStrictEqual(val1: any, val2: any): boolean;
63
+
64
+ function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
65
+ function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
66
+ function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
67
+ function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
68
+ function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
69
+ function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
70
+ function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
71
+ function callbackify<T1, T2, T3, TResult>(
72
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
73
+ function callbackify<T1, T2, T3, T4>(
74
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
75
+ function callbackify<T1, T2, T3, T4, TResult>(
76
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
77
+ function callbackify<T1, T2, T3, T4, T5>(
78
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
79
+ function callbackify<T1, T2, T3, T4, T5, TResult>(
80
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
81
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
82
+ function callbackify<T1, T2, T3, T4, T5, T6>(
83
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
84
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
85
+ function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
86
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
87
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
88
+
89
+ interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
90
+ __promisify__: TCustom;
91
+ }
92
+
93
+ interface CustomPromisifySymbol<TCustom extends Function> extends Function {
94
+ [promisify.custom]: TCustom;
95
+ }
96
+
97
+ type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
98
+
99
+ function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
100
+ function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
101
+ function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
102
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
103
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
104
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
105
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
106
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
107
+ (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
108
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
109
+ function promisify<T1, T2, T3, T4, TResult>(
110
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
111
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
112
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
113
+ (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
114
+ function promisify<T1, T2, T3, T4, T5, TResult>(
115
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
116
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
117
+ function promisify<T1, T2, T3, T4, T5>(
118
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
119
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
120
+ function promisify(fn: Function): Function;
121
+ namespace promisify {
122
+ const custom: unique symbol;
123
+ }
124
+
125
+ namespace types {
126
+ function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
127
+ function isArgumentsObject(object: any): object is IArguments;
128
+ function isArrayBuffer(object: any): object is ArrayBuffer;
129
+ function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
130
+ function isAsyncFunction(object: any): boolean;
131
+ function isBigInt64Array(value: any): value is BigInt64Array;
132
+ function isBigUint64Array(value: any): value is BigUint64Array;
133
+ function isBooleanObject(object: any): object is Boolean;
134
+ function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
135
+ function isDataView(object: any): object is DataView;
136
+ function isDate(object: any): object is Date;
137
+ function isExternal(object: any): boolean;
138
+ function isFloat32Array(object: any): object is Float32Array;
139
+ function isFloat64Array(object: any): object is Float64Array;
140
+ function isGeneratorFunction(object: any): object is GeneratorFunction;
141
+ function isGeneratorObject(object: any): object is Generator;
142
+ function isInt8Array(object: any): object is Int8Array;
143
+ function isInt16Array(object: any): object is Int16Array;
144
+ function isInt32Array(object: any): object is Int32Array;
145
+ function isMap<T>(
146
+ object: T | {},
147
+ ): object is T extends ReadonlyMap<any, any>
148
+ ? unknown extends T
149
+ ? never
150
+ : ReadonlyMap<any, any>
151
+ : Map<any, any>;
152
+ function isMapIterator(object: any): boolean;
153
+ function isModuleNamespaceObject(value: any): boolean;
154
+ function isNativeError(object: any): object is Error;
155
+ function isNumberObject(object: any): object is Number;
156
+ function isPromise(object: any): object is Promise<any>;
157
+ function isProxy(object: any): boolean;
158
+ function isRegExp(object: any): object is RegExp;
159
+ function isSet<T>(
160
+ object: T | {},
161
+ ): object is T extends ReadonlySet<any>
162
+ ? unknown extends T
163
+ ? never
164
+ : ReadonlySet<any>
165
+ : Set<any>;
166
+ function isSetIterator(object: any): boolean;
167
+ function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
168
+ function isStringObject(object: any): object is String;
169
+ function isSymbolObject(object: any): object is Symbol;
170
+ function isTypedArray(object: any): object is NodeJS.TypedArray;
171
+ function isUint8Array(object: any): object is Uint8Array;
172
+ function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
173
+ function isUint16Array(object: any): object is Uint16Array;
174
+ function isUint32Array(object: any): object is Uint32Array;
175
+ function isWeakMap(object: any): object is WeakMap<any, any>;
176
+ function isWeakSet(object: any): object is WeakSet<any>;
177
+ }
178
+
179
+ class TextDecoder {
180
+ readonly encoding: string;
181
+ readonly fatal: boolean;
182
+ readonly ignoreBOM: boolean;
183
+ constructor(
184
+ encoding?: string,
185
+ options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
186
+ );
187
+ decode(
188
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
189
+ options?: { stream?: boolean | undefined }
190
+ ): string;
191
+ }
192
+
193
+ interface EncodeIntoResult {
194
+ /**
195
+ * The read Unicode code units of input.
196
+ */
197
+
198
+ read: number;
199
+ /**
200
+ * The written UTF-8 bytes of output.
201
+ */
202
+ written: number;
203
+ }
204
+
205
+ class TextEncoder {
206
+ readonly encoding: string;
207
+ encode(input?: string): Uint8Array;
208
+ encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
209
+ }
210
+ }
@@ -0,0 +1,190 @@
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'v8' {
5
+ import { Readable } from 'stream';
6
+
7
+ interface HeapSpaceInfo {
8
+ space_name: string;
9
+ space_size: number;
10
+ space_used_size: number;
11
+ space_available_size: number;
12
+ physical_space_size: number;
13
+ }
14
+
15
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
16
+ type DoesZapCodeSpaceFlag = 0 | 1;
17
+
18
+ interface HeapInfo {
19
+ total_heap_size: number;
20
+ total_heap_size_executable: number;
21
+ total_physical_size: number;
22
+ total_available_size: number;
23
+ used_heap_size: number;
24
+ heap_size_limit: number;
25
+ malloced_memory: number;
26
+ peak_malloced_memory: number;
27
+ does_zap_garbage: DoesZapCodeSpaceFlag;
28
+ number_of_native_contexts: number;
29
+ number_of_detached_contexts: number;
30
+ }
31
+
32
+ interface HeapCodeStatistics {
33
+ code_and_metadata_size: number;
34
+ bytecode_and_metadata_size: number;
35
+ external_script_source_size: number;
36
+ }
37
+
38
+ /**
39
+ * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
40
+ * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
41
+ */
42
+ function cachedDataVersionTag(): number;
43
+
44
+ function getHeapStatistics(): HeapInfo;
45
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
46
+ function setFlagsFromString(flags: string): void;
47
+ /**
48
+ * Generates a snapshot of the current V8 heap and returns a Readable
49
+ * Stream that may be used to read the JSON serialized representation.
50
+ * This conversation was marked as resolved by joyeecheung
51
+ * This JSON stream format is intended to be used with tools such as
52
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
53
+ * V8 engine, and may change from one version of V8 to the next.
54
+ */
55
+ function getHeapSnapshot(): Readable;
56
+
57
+ /**
58
+ *
59
+ * @param fileName The file path where the V8 heap snapshot is to be
60
+ * saved. If not specified, a file name with the pattern
61
+ * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
62
+ * generated, where `{pid}` will be the PID of the Node.js process,
63
+ * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
64
+ * the main Node.js thread or the id of a worker thread.
65
+ */
66
+ function writeHeapSnapshot(fileName?: string): string;
67
+
68
+ function getHeapCodeStatistics(): HeapCodeStatistics;
69
+
70
+ class Serializer {
71
+ /**
72
+ * Writes out a header, which includes the serialization format version.
73
+ */
74
+ writeHeader(): void;
75
+
76
+ /**
77
+ * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
78
+ * This throws an error if value cannot be serialized.
79
+ */
80
+ writeValue(val: any): boolean;
81
+
82
+ /**
83
+ * Returns the stored internal buffer.
84
+ * This serializer should not be used once the buffer is released.
85
+ * Calling this method results in undefined behavior if a previous write has failed.
86
+ */
87
+ releaseBuffer(): Buffer;
88
+
89
+ /**
90
+ * Marks an ArrayBuffer as having its contents transferred out of band.\
91
+ * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
92
+ */
93
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
94
+
95
+ /**
96
+ * Write a raw 32-bit unsigned integer.
97
+ */
98
+ writeUint32(value: number): void;
99
+
100
+ /**
101
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
102
+ */
103
+ writeUint64(hi: number, lo: number): void;
104
+
105
+ /**
106
+ * Write a JS number value.
107
+ */
108
+ writeDouble(value: number): void;
109
+
110
+ /**
111
+ * Write raw bytes into the serializer’s internal buffer.
112
+ * The deserializer will require a way to compute the length of the buffer.
113
+ */
114
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
115
+ }
116
+
117
+ /**
118
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
119
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
120
+ */
121
+ class DefaultSerializer extends Serializer {
122
+ }
123
+
124
+ class Deserializer {
125
+ constructor(data: NodeJS.TypedArray);
126
+ /**
127
+ * Reads and validates a header (including the format version).
128
+ * May, for example, reject an invalid or unsupported wire format.
129
+ * In that case, an Error is thrown.
130
+ */
131
+ readHeader(): boolean;
132
+
133
+ /**
134
+ * Deserializes a JavaScript value from the buffer and returns it.
135
+ */
136
+ readValue(): any;
137
+
138
+ /**
139
+ * Marks an ArrayBuffer as having its contents transferred out of band.
140
+ * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
141
+ * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
142
+ */
143
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
144
+
145
+ /**
146
+ * Reads the underlying wire format version.
147
+ * Likely mostly to be useful to legacy code reading old wire format versions.
148
+ * May not be called before .readHeader().
149
+ */
150
+ getWireFormatVersion(): number;
151
+
152
+ /**
153
+ * Read a raw 32-bit unsigned integer and return it.
154
+ */
155
+ readUint32(): number;
156
+
157
+ /**
158
+ * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
159
+ */
160
+ readUint64(): [number, number];
161
+
162
+ /**
163
+ * Read a JS number value.
164
+ */
165
+ readDouble(): number;
166
+
167
+ /**
168
+ * Read raw bytes from the deserializer’s internal buffer.
169
+ * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
170
+ */
171
+ readRawBytes(length: number): Buffer;
172
+ }
173
+
174
+ /**
175
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
176
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
177
+ */
178
+ class DefaultDeserializer extends Deserializer {
179
+ }
180
+
181
+ /**
182
+ * Uses a `DefaultSerializer` to serialize value into a buffer.
183
+ */
184
+ function serialize(value: any): Buffer;
185
+
186
+ /**
187
+ * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
188
+ */
189
+ function deserialize(data: NodeJS.TypedArray): any;
190
+ }