@node-red/editor-client 3.1.8 → 4.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/en-US/editor.json +10 -1
  3. package/locales/fr/editor.json +8 -1
  4. package/locales/ja/editor.json +10 -3
  5. package/package.json +1 -1
  6. package/public/red/about +52 -0
  7. package/public/red/red.js +1433 -263
  8. package/public/red/red.min.js +3 -3
  9. package/public/red/style.min.css +2 -2
  10. package/public/red/tours/3.1/welcome.js +231 -0
  11. package/public/red/tours/images/nr4-auto-complete.png +0 -0
  12. package/public/red/tours/images/nr4-config-select.png +0 -0
  13. package/public/red/tours/images/nr4-multiplayer.png +0 -0
  14. package/public/red/tours/images/nr4-plugins.png +0 -0
  15. package/public/red/tours/images/nr4-sf-config.png +0 -0
  16. package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
  17. package/public/red/tours/welcome.js +105 -161
  18. package/public/types/node/assert/strict.d.ts +1 -1
  19. package/public/types/node/assert.d.ts +8 -9
  20. package/public/types/node/async_hooks.d.ts +9 -5
  21. package/public/types/node/buffer.d.ts +43 -18
  22. package/public/types/node/child_process.d.ts +8 -5
  23. package/public/types/node/cluster.d.ts +15 -19
  24. package/public/types/node/console.d.ts +2 -2
  25. package/public/types/node/crypto.d.ts +165 -70
  26. package/public/types/node/dgram.d.ts +4 -4
  27. package/public/types/node/diagnostics_channel.d.ts +8 -7
  28. package/public/types/node/dns/promises.d.ts +11 -9
  29. package/public/types/node/dns.d.ts +18 -13
  30. package/public/types/node/dom-events.d.ts +129 -0
  31. package/public/types/node/domain.d.ts +2 -2
  32. package/public/types/node/events.d.ts +49 -12
  33. package/public/types/node/fs/promises.d.ts +68 -24
  34. package/public/types/node/fs.d.ts +132 -59
  35. package/public/types/node/globals.d.ts +31 -17
  36. package/public/types/node/http.d.ts +138 -27
  37. package/public/types/node/http2.d.ts +38 -5
  38. package/public/types/node/https.d.ts +12 -3
  39. package/public/types/node/module.d.ts +1 -2
  40. package/public/types/node/net.d.ts +69 -28
  41. package/public/types/node/os.d.ts +16 -5
  42. package/public/types/node/path.d.ts +5 -5
  43. package/public/types/node/perf_hooks.d.ts +48 -9
  44. package/public/types/node/process.d.ts +18 -17
  45. package/public/types/node/querystring.d.ts +2 -2
  46. package/public/types/node/readline/promises.d.ts +146 -0
  47. package/public/types/node/readline.d.ts +141 -31
  48. package/public/types/node/stream/consumers.d.ts +2 -2
  49. package/public/types/node/stream/promises.d.ts +1 -1
  50. package/public/types/node/stream/web.d.ts +4 -66
  51. package/public/types/node/stream.d.ts +96 -118
  52. package/public/types/node/string_decoder.d.ts +2 -2
  53. package/public/types/node/test.d.ts +200 -16
  54. package/public/types/node/timers/promises.d.ts +1 -26
  55. package/public/types/node/timers.d.ts +2 -2
  56. package/public/types/node/tls.d.ts +21 -12
  57. package/public/types/node/trace_events.d.ts +12 -2
  58. package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
  59. package/public/types/node/ts4.8/assert.d.ts +964 -0
  60. package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
  61. package/public/types/node/ts4.8/buffer.d.ts +2262 -0
  62. package/public/types/node/ts4.8/child_process.d.ts +1372 -0
  63. package/public/types/node/ts4.8/cluster.d.ts +413 -0
  64. package/public/types/node/ts4.8/console.d.ts +415 -0
  65. package/public/types/node/ts4.8/crypto.d.ts +3967 -0
  66. package/public/types/node/ts4.8/dgram.d.ts +548 -0
  67. package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
  68. package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
  69. package/public/types/node/ts4.8/dns.d.ts +662 -0
  70. package/public/types/node/ts4.8/dom-events.d.ts +129 -0
  71. package/public/types/node/ts4.8/domain.d.ts +173 -0
  72. package/public/types/node/ts4.8/events.d.ts +681 -0
  73. package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
  74. package/public/types/node/ts4.8/fs.d.ts +3875 -0
  75. package/public/types/node/ts4.8/globals.d.ts +297 -0
  76. package/public/types/node/ts4.8/http.d.ts +1617 -0
  77. package/public/types/node/ts4.8/http2.d.ts +2137 -0
  78. package/public/types/node/ts4.8/https.d.ts +544 -0
  79. package/public/types/node/ts4.8/module.d.ts +117 -0
  80. package/public/types/node/ts4.8/net.d.ts +872 -0
  81. package/public/types/node/ts4.8/os.d.ts +469 -0
  82. package/public/types/node/ts4.8/path.d.ts +194 -0
  83. package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
  84. package/public/types/node/ts4.8/process.d.ts +1485 -0
  85. package/public/types/node/ts4.8/querystring.d.ts +134 -0
  86. package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
  87. package/public/types/node/ts4.8/readline.d.ts +656 -0
  88. package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
  89. package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
  90. package/public/types/node/ts4.8/stream/web.d.ts +333 -0
  91. package/public/types/node/ts4.8/stream.d.ts +1343 -0
  92. package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
  93. package/public/types/node/ts4.8/test.d.ts +377 -0
  94. package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
  95. package/public/types/node/ts4.8/timers.d.ts +97 -0
  96. package/public/types/node/ts4.8/tls.d.ts +1031 -0
  97. package/public/types/node/ts4.8/trace_events.d.ts +174 -0
  98. package/public/types/node/ts4.8/tty.d.ts +209 -0
  99. package/public/types/node/ts4.8/url.d.ts +900 -0
  100. package/public/types/node/ts4.8/util.d.ts +1853 -0
  101. package/public/types/node/ts4.8/v8.d.ts +399 -0
  102. package/public/types/node/ts4.8/vm.d.ts +512 -0
  103. package/public/types/node/ts4.8/wasi.d.ts +161 -0
  104. package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
  105. package/public/types/node/ts4.8/zlib.d.ts +520 -0
  106. package/public/types/node/tty.d.ts +5 -3
  107. package/public/types/node/url.d.ts +81 -39
  108. package/public/types/node/util.d.ts +269 -13
  109. package/public/types/node/v8.d.ts +22 -4
  110. package/public/types/node/vm.d.ts +7 -5
  111. package/public/types/node/wasi.d.ts +2 -2
  112. package/public/types/node/worker_threads.d.ts +51 -11
  113. package/public/types/node/zlib.d.ts +2 -2
  114. package/public/types/node-red/func.d.ts +26 -17
  115. package/public/vendor/ace/worker-jsonata.js +1 -1
  116. package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
  117. package/public/vendor/monaco/dist/css.worker.js +1 -1
  118. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  119. package/public/vendor/monaco/dist/editor.js +1 -29
  120. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
  121. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  122. package/public/vendor/monaco/dist/html.worker.js +1 -1
  123. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  124. package/public/vendor/monaco/dist/json.worker.js +1 -1
  125. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  126. package/public/vendor/monaco/dist/locale/cs.js +324 -106
  127. package/public/vendor/monaco/dist/locale/de.js +336 -118
  128. package/public/vendor/monaco/dist/locale/es.js +329 -111
  129. package/public/vendor/monaco/dist/locale/fr.js +334 -116
  130. package/public/vendor/monaco/dist/locale/it.js +327 -109
  131. package/public/vendor/monaco/dist/locale/ja.js +329 -111
  132. package/public/vendor/monaco/dist/locale/ko.js +330 -112
  133. package/public/vendor/monaco/dist/locale/pl.js +329 -111
  134. package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
  135. package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
  136. package/public/vendor/monaco/dist/locale/ru.js +331 -113
  137. package/public/vendor/monaco/dist/locale/tr.js +329 -111
  138. package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
  139. package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
  140. package/public/vendor/monaco/dist/ts.worker.js +2 -2
  141. package/public/vendor/vendor.js +1 -1
  142. package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
  143. /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
  144. /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
  145. /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
  146. /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
  147. /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
  148. /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
  149. /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
@@ -0,0 +1,174 @@
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
+ /**
5
+ * The `trace_events` module provides a mechanism to centralize tracing information
6
+ * generated by V8, Node.js core, and userspace code.
7
+ *
8
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
9
+ * or by using the `trace_events` module. The `--trace-event-categories` flag
10
+ * accepts a list of comma-separated category names.
11
+ *
12
+ * The available categories are:
13
+ *
14
+ * * `node`: An empty placeholder.
15
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
16
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
17
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
18
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
19
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
20
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
21
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
22
+ * * `node.perf`: Enables capture of `Performance API` measurements.
23
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
24
+ * measures and marks.
25
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
26
+ * measurements.
27
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
28
+ * of unhandled Promise rejections and handled-after-rejections.
29
+ * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
30
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
31
+ *
32
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
33
+ *
34
+ * ```bash
35
+ * node --trace-event-categories v8,node,node.async_hooks server.js
36
+ * ```
37
+ *
38
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
39
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
40
+ *
41
+ * ```bash
42
+ * node --trace-events-enabled
43
+ *
44
+ * # is equivalent to
45
+ *
46
+ * node --trace-event-categories v8,node,node.async_hooks
47
+ * ```
48
+ *
49
+ * Alternatively, trace events may be enabled using the `trace_events` module:
50
+ *
51
+ * ```js
52
+ * const trace_events = require('trace_events');
53
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
54
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
55
+ *
56
+ * // do work
57
+ *
58
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
59
+ * ```
60
+ *
61
+ * Running Node.js with tracing enabled will produce log files that can be opened
62
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
63
+ *
64
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
65
+ * be specified with `--trace-event-file-pattern` that accepts a template
66
+ * string that supports `${rotation}` and `${pid}`:
67
+ *
68
+ * ```bash
69
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
70
+ * ```
71
+ *
72
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
73
+ * in your code, such as:
74
+ *
75
+ * ```js
76
+ * process.on('SIGINT', function onSigint() {
77
+ * console.info('Received SIGINT.');
78
+ * process.exit(130); // Or applicable exit code depending on OS and signal
79
+ * });
80
+ * ```
81
+ *
82
+ * The tracing system uses the same time source
83
+ * as the one used by `process.hrtime()`.
84
+ * However the trace-event timestamps are expressed in microseconds,
85
+ * unlike `process.hrtime()` which returns nanoseconds.
86
+ *
87
+ * The features from this module are not available in `Worker` threads.
88
+ * @experimental
89
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
90
+ */
91
+ declare module 'trace_events' {
92
+ /**
93
+ * The `Tracing` object is used to enable or disable tracing for sets of
94
+ * categories. Instances are created using the
95
+ * `trace_events.createTracing()` method.
96
+ *
97
+ * When created, the `Tracing` object is disabled. Calling the
98
+ * `tracing.enable()` method adds the categories to the set of enabled trace
99
+ * event categories. Calling `tracing.disable()` will remove the categories
100
+ * from the set of enabled trace event categories.
101
+ */
102
+ interface Tracing {
103
+ /**
104
+ * A comma-separated list of the trace event categories covered by this
105
+ * `Tracing` object.
106
+ */
107
+ readonly categories: string;
108
+ /**
109
+ * Disables this `Tracing` object.
110
+ *
111
+ * Only trace event categories _not_ covered by other enabled `Tracing`
112
+ * objects and _not_ specified by the `--trace-event-categories` flag
113
+ * will be disabled.
114
+ */
115
+ disable(): void;
116
+ /**
117
+ * Enables this `Tracing` object for the set of categories covered by
118
+ * the `Tracing` object.
119
+ */
120
+ enable(): void;
121
+ /**
122
+ * `true` only if the `Tracing` object has been enabled.
123
+ */
124
+ readonly enabled: boolean;
125
+ }
126
+ interface CreateTracingOptions {
127
+ /**
128
+ * An array of trace category names. Values included in the array are
129
+ * coerced to a string when possible. An error will be thrown if the
130
+ * value cannot be coerced.
131
+ */
132
+ categories: string[];
133
+ }
134
+ /**
135
+ * Creates and returns a `Tracing` object for the given set of `categories`.
136
+ *
137
+ * ```js
138
+ * const trace_events = require('trace_events');
139
+ * const categories = ['node.perf', 'node.async_hooks'];
140
+ * const tracing = trace_events.createTracing({ categories });
141
+ * tracing.enable();
142
+ * // do stuff
143
+ * tracing.disable();
144
+ * ```
145
+ * @since v10.0.0
146
+ * @return .
147
+ */
148
+ function createTracing(options: CreateTracingOptions): Tracing;
149
+ /**
150
+ * Returns a comma-separated list of all currently-enabled trace event
151
+ * categories. The current set of enabled trace event categories is determined
152
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
153
+ * enabled using the `--trace-event-categories` flag.
154
+ *
155
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
156
+ *
157
+ * ```js
158
+ * const trace_events = require('trace_events');
159
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
160
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
161
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
162
+ *
163
+ * t1.enable();
164
+ * t2.enable();
165
+ *
166
+ * console.log(trace_events.getEnabledCategories());
167
+ * ```
168
+ * @since v10.0.0
169
+ */
170
+ function getEnabledCategories(): string | undefined;
171
+ }
172
+ declare module 'node:trace_events' {
173
+ export * from 'trace_events';
174
+ }
@@ -0,0 +1,209 @@
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
+ /**
5
+ * The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
6
+ * In most cases, it will not be necessary or possible to use this module directly.
7
+ * However, it can be accessed using:
8
+ *
9
+ * ```js
10
+ * const tty = require('tty');
11
+ * ```
12
+ *
13
+ * When Node.js detects that it is being run with a text terminal ("TTY")
14
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
15
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
16
+ * whether Node.js is being run within a TTY context is to check that the value of
17
+ * the `process.stdout.isTTY` property is `true`:
18
+ *
19
+ * ```console
20
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
21
+ * true
22
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
23
+ * false
24
+ * ```
25
+ *
26
+ * In most cases, there should be little to no reason for an application to
27
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
28
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js)
29
+ */
30
+ declare module 'tty' {
31
+ import * as net from 'node:net';
32
+ /**
33
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
34
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
35
+ * integer.
36
+ * @since v0.5.8
37
+ * @param fd A numeric file descriptor
38
+ */
39
+ function isatty(fd: number): boolean;
40
+ /**
41
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
42
+ * process and there should be no reason to create additional instances.
43
+ * @since v0.5.8
44
+ */
45
+ class ReadStream extends net.Socket {
46
+ constructor(fd: number, options?: net.SocketConstructorOpts);
47
+ /**
48
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
49
+ * raw device. Defaults to `false`.
50
+ * @since v0.7.7
51
+ */
52
+ isRaw: boolean;
53
+ /**
54
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
55
+ *
56
+ * When in raw mode, input is always available character-by-character, not
57
+ * including modifiers. Additionally, all special processing of characters by the
58
+ * terminal is disabled, including echoing input
59
+ * characters. Ctrl+C will no longer cause a `SIGINT` when
60
+ * in this mode.
61
+ * @since v0.7.7
62
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
63
+ * property will be set to the resulting mode.
64
+ * @return The read stream instance.
65
+ */
66
+ setRawMode(mode: boolean): this;
67
+ /**
68
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
69
+ * @since v0.5.8
70
+ */
71
+ isTTY: boolean;
72
+ }
73
+ /**
74
+ * -1 - to the left from cursor
75
+ * 0 - the entire line
76
+ * 1 - to the right from cursor
77
+ */
78
+ type Direction = -1 | 0 | 1;
79
+ /**
80
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
81
+ * should be no reason to create additional instances.
82
+ * @since v0.5.8
83
+ */
84
+ class WriteStream extends net.Socket {
85
+ constructor(fd: number);
86
+ addListener(event: string, listener: (...args: any[]) => void): this;
87
+ addListener(event: 'resize', listener: () => void): this;
88
+ emit(event: string | symbol, ...args: any[]): boolean;
89
+ emit(event: 'resize'): boolean;
90
+ on(event: string, listener: (...args: any[]) => void): this;
91
+ on(event: 'resize', listener: () => void): this;
92
+ once(event: string, listener: (...args: any[]) => void): this;
93
+ once(event: 'resize', listener: () => void): this;
94
+ prependListener(event: string, listener: (...args: any[]) => void): this;
95
+ prependListener(event: 'resize', listener: () => void): this;
96
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
97
+ prependOnceListener(event: 'resize', listener: () => void): this;
98
+ /**
99
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
100
+ * direction identified by `dir`.
101
+ * @since v0.7.7
102
+ * @param callback Invoked once the operation completes.
103
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
104
+ */
105
+ clearLine(dir: Direction, callback?: () => void): boolean;
106
+ /**
107
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
108
+ * cursor down.
109
+ * @since v0.7.7
110
+ * @param callback Invoked once the operation completes.
111
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
112
+ */
113
+ clearScreenDown(callback?: () => void): boolean;
114
+ /**
115
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
116
+ * position.
117
+ * @since v0.7.7
118
+ * @param callback Invoked once the operation completes.
119
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
120
+ */
121
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
122
+ cursorTo(x: number, callback: () => void): boolean;
123
+ /**
124
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
125
+ * current position.
126
+ * @since v0.7.7
127
+ * @param callback Invoked once the operation completes.
128
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
129
+ */
130
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
131
+ /**
132
+ * Returns:
133
+ *
134
+ * * `1` for 2,
135
+ * * `4` for 16,
136
+ * * `8` for 256,
137
+ * * `24` for 16,777,216 colors supported.
138
+ *
139
+ * Use this to determine what colors the terminal supports. Due to the nature of
140
+ * colors in terminals it is possible to either have false positives or false
141
+ * negatives. It depends on process information and the environment variables that
142
+ * may lie about what terminal is used.
143
+ * It is possible to pass in an `env` object to simulate the usage of a specific
144
+ * terminal. This can be useful to check how specific environment settings behave.
145
+ *
146
+ * To enforce a specific color support, use one of the below environment settings.
147
+ *
148
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
149
+ * * 16 colors: `FORCE_COLOR = 1`
150
+ * * 256 colors: `FORCE_COLOR = 2`
151
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
152
+ *
153
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
154
+ * @since v9.9.0
155
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
156
+ */
157
+ getColorDepth(env?: object): number;
158
+ /**
159
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
160
+ * in `count`. Minimum support is 2 (black and white).
161
+ *
162
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
163
+ *
164
+ * ```js
165
+ * process.stdout.hasColors();
166
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
167
+ * process.stdout.hasColors(256);
168
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
169
+ * process.stdout.hasColors({ TMUX: '1' });
170
+ * // Returns true.
171
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
172
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
173
+ * ```
174
+ * @since v11.13.0, v10.16.0
175
+ * @param [count=16] The number of colors that are requested (minimum 2).
176
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
177
+ */
178
+ hasColors(count?: number): boolean;
179
+ hasColors(env?: object): boolean;
180
+ hasColors(count: number, env?: object): boolean;
181
+ /**
182
+ * `writeStream.getWindowSize()` returns the size of the TTY
183
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
184
+ * of columns and rows in the corresponding TTY.
185
+ * @since v0.7.7
186
+ */
187
+ getWindowSize(): [number, number];
188
+ /**
189
+ * A `number` specifying the number of columns the TTY currently has. This property
190
+ * is updated whenever the `'resize'` event is emitted.
191
+ * @since v0.7.7
192
+ */
193
+ columns: number;
194
+ /**
195
+ * A `number` specifying the number of rows the TTY currently has. This property
196
+ * is updated whenever the `'resize'` event is emitted.
197
+ * @since v0.7.7
198
+ */
199
+ rows: number;
200
+ /**
201
+ * A `boolean` that is always `true`.
202
+ * @since v0.5.8
203
+ */
204
+ isTTY: boolean;
205
+ }
206
+ }
207
+ declare module 'node:tty' {
208
+ export * from 'tty';
209
+ }