@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,544 @@
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
+ * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
6
+ * separate module.
7
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
8
+ */
9
+ declare module 'https' {
10
+ import { Duplex } from 'node:stream';
11
+ import * as tls from 'node:tls';
12
+ import * as http from 'node:http';
13
+ import { URL } from 'node:url';
14
+ type ServerOptions<
15
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
16
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
17
+ > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
18
+ type RequestOptions = http.RequestOptions &
19
+ tls.SecureContextOptions & {
20
+ rejectUnauthorized?: boolean | undefined; // Defaults to true
21
+ servername?: string | undefined; // SNI TLS Extension
22
+ };
23
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
24
+ rejectUnauthorized?: boolean | undefined;
25
+ maxCachedSessions?: number | undefined;
26
+ }
27
+ /**
28
+ * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
29
+ * @since v0.4.5
30
+ */
31
+ class Agent extends http.Agent {
32
+ constructor(options?: AgentOptions);
33
+ options: AgentOptions;
34
+ }
35
+ interface Server<
36
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
37
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
38
+ > extends http.Server<Request, Response> {}
39
+ /**
40
+ * See `http.Server` for more information.
41
+ * @since v0.3.4
42
+ */
43
+ class Server<
44
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
45
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
46
+ > extends tls.Server {
47
+ constructor(requestListener?: http.RequestListener<Request, Response>);
48
+ constructor(
49
+ options: ServerOptions<Request, Response>,
50
+ requestListener?: http.RequestListener<Request, Response>,
51
+ );
52
+ /**
53
+ * Closes all connections connected to this server.
54
+ * @since v18.2.0
55
+ */
56
+ closeAllConnections(): void;
57
+ /**
58
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
59
+ * @since v18.2.0
60
+ */
61
+ closeIdleConnections(): void;
62
+ addListener(event: string, listener: (...args: any[]) => void): this;
63
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
64
+ addListener(
65
+ event: 'newSession',
66
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
67
+ ): this;
68
+ addListener(
69
+ event: 'OCSPRequest',
70
+ listener: (
71
+ certificate: Buffer,
72
+ issuer: Buffer,
73
+ callback: (err: Error | null, resp: Buffer) => void,
74
+ ) => void,
75
+ ): this;
76
+ addListener(
77
+ event: 'resumeSession',
78
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
79
+ ): this;
80
+ addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
81
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
82
+ addListener(event: 'close', listener: () => void): this;
83
+ addListener(event: 'connection', listener: (socket: Duplex) => void): this;
84
+ addListener(event: 'error', listener: (err: Error) => void): this;
85
+ addListener(event: 'listening', listener: () => void): this;
86
+ addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
87
+ addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
88
+ addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
89
+ addListener(
90
+ event: 'connect',
91
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
92
+ ): this;
93
+ addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
94
+ addListener(
95
+ event: 'upgrade',
96
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
97
+ ): this;
98
+ emit(event: string, ...args: any[]): boolean;
99
+ emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
100
+ emit(
101
+ event: 'newSession',
102
+ sessionId: Buffer,
103
+ sessionData: Buffer,
104
+ callback: (err: Error, resp: Buffer) => void,
105
+ ): boolean;
106
+ emit(
107
+ event: 'OCSPRequest',
108
+ certificate: Buffer,
109
+ issuer: Buffer,
110
+ callback: (err: Error | null, resp: Buffer) => void,
111
+ ): boolean;
112
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
113
+ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
114
+ emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
115
+ emit(event: 'close'): boolean;
116
+ emit(event: 'connection', socket: Duplex): boolean;
117
+ emit(event: 'error', err: Error): boolean;
118
+ emit(event: 'listening'): boolean;
119
+ emit(
120
+ event: 'checkContinue',
121
+ req: InstanceType<Request>,
122
+ res: InstanceType<Response> & { req: InstanceType<Request> },
123
+ ): boolean;
124
+ emit(
125
+ event: 'checkExpectation',
126
+ req: InstanceType<Request>,
127
+ res: InstanceType<Response> & { req: InstanceType<Request> },
128
+ ): boolean;
129
+ emit(event: 'clientError', err: Error, socket: Duplex): boolean;
130
+ emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
131
+ emit(
132
+ event: 'request',
133
+ req: InstanceType<Request>,
134
+ res: InstanceType<Response> & { req: InstanceType<Request> },
135
+ ): boolean;
136
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
137
+ on(event: string, listener: (...args: any[]) => void): this;
138
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
139
+ on(
140
+ event: 'newSession',
141
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
142
+ ): this;
143
+ on(
144
+ event: 'OCSPRequest',
145
+ listener: (
146
+ certificate: Buffer,
147
+ issuer: Buffer,
148
+ callback: (err: Error | null, resp: Buffer) => void,
149
+ ) => void,
150
+ ): this;
151
+ on(
152
+ event: 'resumeSession',
153
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
154
+ ): this;
155
+ on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
156
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
157
+ on(event: 'close', listener: () => void): this;
158
+ on(event: 'connection', listener: (socket: Duplex) => void): this;
159
+ on(event: 'error', listener: (err: Error) => void): this;
160
+ on(event: 'listening', listener: () => void): this;
161
+ on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
162
+ on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
163
+ on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
164
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
165
+ on(event: 'request', listener: http.RequestListener<Request, Response>): this;
166
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
167
+ once(event: string, listener: (...args: any[]) => void): this;
168
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
169
+ once(
170
+ event: 'newSession',
171
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
172
+ ): this;
173
+ once(
174
+ event: 'OCSPRequest',
175
+ listener: (
176
+ certificate: Buffer,
177
+ issuer: Buffer,
178
+ callback: (err: Error | null, resp: Buffer) => void,
179
+ ) => void,
180
+ ): this;
181
+ once(
182
+ event: 'resumeSession',
183
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
184
+ ): this;
185
+ once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
186
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
187
+ once(event: 'close', listener: () => void): this;
188
+ once(event: 'connection', listener: (socket: Duplex) => void): this;
189
+ once(event: 'error', listener: (err: Error) => void): this;
190
+ once(event: 'listening', listener: () => void): this;
191
+ once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
192
+ once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
193
+ once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
194
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
195
+ once(event: 'request', listener: http.RequestListener<Request, Response>): this;
196
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
197
+ prependListener(event: string, listener: (...args: any[]) => void): this;
198
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
199
+ prependListener(
200
+ event: 'newSession',
201
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
202
+ ): this;
203
+ prependListener(
204
+ event: 'OCSPRequest',
205
+ listener: (
206
+ certificate: Buffer,
207
+ issuer: Buffer,
208
+ callback: (err: Error | null, resp: Buffer) => void,
209
+ ) => void,
210
+ ): this;
211
+ prependListener(
212
+ event: 'resumeSession',
213
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
214
+ ): this;
215
+ prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
216
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
217
+ prependListener(event: 'close', listener: () => void): this;
218
+ prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
219
+ prependListener(event: 'error', listener: (err: Error) => void): this;
220
+ prependListener(event: 'listening', listener: () => void): this;
221
+ prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
222
+ prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
223
+ prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
224
+ prependListener(
225
+ event: 'connect',
226
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
227
+ ): this;
228
+ prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
229
+ prependListener(
230
+ event: 'upgrade',
231
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
232
+ ): this;
233
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
234
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
235
+ prependOnceListener(
236
+ event: 'newSession',
237
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
238
+ ): this;
239
+ prependOnceListener(
240
+ event: 'OCSPRequest',
241
+ listener: (
242
+ certificate: Buffer,
243
+ issuer: Buffer,
244
+ callback: (err: Error | null, resp: Buffer) => void,
245
+ ) => void,
246
+ ): this;
247
+ prependOnceListener(
248
+ event: 'resumeSession',
249
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
250
+ ): this;
251
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
252
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
253
+ prependOnceListener(event: 'close', listener: () => void): this;
254
+ prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
255
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
256
+ prependOnceListener(event: 'listening', listener: () => void): this;
257
+ prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
258
+ prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
259
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
260
+ prependOnceListener(
261
+ event: 'connect',
262
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
263
+ ): this;
264
+ prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
265
+ prependOnceListener(
266
+ event: 'upgrade',
267
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
268
+ ): this;
269
+ }
270
+ /**
271
+ * ```js
272
+ * // curl -k https://localhost:8000/
273
+ * const https = require('https');
274
+ * const fs = require('fs');
275
+ *
276
+ * const options = {
277
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
278
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
279
+ * };
280
+ *
281
+ * https.createServer(options, (req, res) => {
282
+ * res.writeHead(200);
283
+ * res.end('hello world\n');
284
+ * }).listen(8000);
285
+ * ```
286
+ *
287
+ * Or
288
+ *
289
+ * ```js
290
+ * const https = require('https');
291
+ * const fs = require('fs');
292
+ *
293
+ * const options = {
294
+ * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
295
+ * passphrase: 'sample'
296
+ * };
297
+ *
298
+ * https.createServer(options, (req, res) => {
299
+ * res.writeHead(200);
300
+ * res.end('hello world\n');
301
+ * }).listen(8000);
302
+ * ```
303
+ * @since v0.3.4
304
+ * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
305
+ * @param requestListener A listener to be added to the `'request'` event.
306
+ */
307
+ function createServer<
308
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
309
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
310
+ >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
311
+ function createServer<
312
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
313
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
314
+ >(
315
+ options: ServerOptions<Request, Response>,
316
+ requestListener?: http.RequestListener<Request, Response>,
317
+ ): Server<Request, Response>;
318
+ /**
319
+ * Makes a request to a secure web server.
320
+ *
321
+ * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
322
+ * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
323
+ *
324
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
325
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
326
+ *
327
+ * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
328
+ * upload a file with a POST request, then write to the `ClientRequest` object.
329
+ *
330
+ * ```js
331
+ * const https = require('https');
332
+ *
333
+ * const options = {
334
+ * hostname: 'encrypted.google.com',
335
+ * port: 443,
336
+ * path: '/',
337
+ * method: 'GET'
338
+ * };
339
+ *
340
+ * const req = https.request(options, (res) => {
341
+ * console.log('statusCode:', res.statusCode);
342
+ * console.log('headers:', res.headers);
343
+ *
344
+ * res.on('data', (d) => {
345
+ * process.stdout.write(d);
346
+ * });
347
+ * });
348
+ *
349
+ * req.on('error', (e) => {
350
+ * console.error(e);
351
+ * });
352
+ * req.end();
353
+ * ```
354
+ *
355
+ * Example using options from `tls.connect()`:
356
+ *
357
+ * ```js
358
+ * const options = {
359
+ * hostname: 'encrypted.google.com',
360
+ * port: 443,
361
+ * path: '/',
362
+ * method: 'GET',
363
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
364
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
365
+ * };
366
+ * options.agent = new https.Agent(options);
367
+ *
368
+ * const req = https.request(options, (res) => {
369
+ * // ...
370
+ * });
371
+ * ```
372
+ *
373
+ * Alternatively, opt out of connection pooling by not using an `Agent`.
374
+ *
375
+ * ```js
376
+ * const options = {
377
+ * hostname: 'encrypted.google.com',
378
+ * port: 443,
379
+ * path: '/',
380
+ * method: 'GET',
381
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
382
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
383
+ * agent: false
384
+ * };
385
+ *
386
+ * const req = https.request(options, (res) => {
387
+ * // ...
388
+ * });
389
+ * ```
390
+ *
391
+ * Example using a `URL` as `options`:
392
+ *
393
+ * ```js
394
+ * const options = new URL('https://abc:xyz@example.com');
395
+ *
396
+ * const req = https.request(options, (res) => {
397
+ * // ...
398
+ * });
399
+ * ```
400
+ *
401
+ * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
402
+ *
403
+ * ```js
404
+ * const tls = require('tls');
405
+ * const https = require('https');
406
+ * const crypto = require('crypto');
407
+ *
408
+ * function sha256(s) {
409
+ * return crypto.createHash('sha256').update(s).digest('base64');
410
+ * }
411
+ * const options = {
412
+ * hostname: 'github.com',
413
+ * port: 443,
414
+ * path: '/',
415
+ * method: 'GET',
416
+ * checkServerIdentity: function(host, cert) {
417
+ * // Make sure the certificate is issued to the host we are connected to
418
+ * const err = tls.checkServerIdentity(host, cert);
419
+ * if (err) {
420
+ * return err;
421
+ * }
422
+ *
423
+ * // Pin the public key, similar to HPKP pin-sha25 pinning
424
+ * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
425
+ * if (sha256(cert.pubkey) !== pubkey256) {
426
+ * const msg = 'Certificate verification error: ' +
427
+ * `The public key of '${cert.subject.CN}' ` +
428
+ * 'does not match our pinned fingerprint';
429
+ * return new Error(msg);
430
+ * }
431
+ *
432
+ * // Pin the exact certificate, rather than the pub key
433
+ * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
434
+ * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
435
+ * if (cert.fingerprint256 !== cert256) {
436
+ * const msg = 'Certificate verification error: ' +
437
+ * `The certificate of '${cert.subject.CN}' ` +
438
+ * 'does not match our pinned fingerprint';
439
+ * return new Error(msg);
440
+ * }
441
+ *
442
+ * // This loop is informational only.
443
+ * // Print the certificate and public key fingerprints of all certs in the
444
+ * // chain. Its common to pin the public key of the issuer on the public
445
+ * // internet, while pinning the public key of the service in sensitive
446
+ * // environments.
447
+ * do {
448
+ * console.log('Subject Common Name:', cert.subject.CN);
449
+ * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
450
+ *
451
+ * hash = crypto.createHash('sha256');
452
+ * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
453
+ *
454
+ * lastprint256 = cert.fingerprint256;
455
+ * cert = cert.issuerCertificate;
456
+ * } while (cert.fingerprint256 !== lastprint256);
457
+ *
458
+ * },
459
+ * };
460
+ *
461
+ * options.agent = new https.Agent(options);
462
+ * const req = https.request(options, (res) => {
463
+ * console.log('All OK. Server matched our pinned cert or public key');
464
+ * console.log('statusCode:', res.statusCode);
465
+ * // Print the HPKP values
466
+ * console.log('headers:', res.headers['public-key-pins']);
467
+ *
468
+ * res.on('data', (d) => {});
469
+ * });
470
+ *
471
+ * req.on('error', (e) => {
472
+ * console.error(e.message);
473
+ * });
474
+ * req.end();
475
+ * ```
476
+ *
477
+ * Outputs for example:
478
+ *
479
+ * ```text
480
+ * Subject Common Name: github.com
481
+ * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
482
+ * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
483
+ * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
484
+ * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
485
+ * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
486
+ * Subject Common Name: DigiCert High Assurance EV Root CA
487
+ * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
488
+ * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
489
+ * All OK. Server matched our pinned cert or public key
490
+ * statusCode: 200
491
+ * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
492
+ * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
493
+ * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
494
+ * ```
495
+ * @since v0.3.6
496
+ * @param options Accepts all `options` from `request`, with some differences in default values:
497
+ */
498
+ function request(
499
+ options: RequestOptions | string | URL,
500
+ callback?: (res: http.IncomingMessage) => void,
501
+ ): http.ClientRequest;
502
+ function request(
503
+ url: string | URL,
504
+ options: RequestOptions,
505
+ callback?: (res: http.IncomingMessage) => void,
506
+ ): http.ClientRequest;
507
+ /**
508
+ * Like `http.get()` but for HTTPS.
509
+ *
510
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
511
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
512
+ *
513
+ * ```js
514
+ * const https = require('https');
515
+ *
516
+ * https.get('https://encrypted.google.com/', (res) => {
517
+ * console.log('statusCode:', res.statusCode);
518
+ * console.log('headers:', res.headers);
519
+ *
520
+ * res.on('data', (d) => {
521
+ * process.stdout.write(d);
522
+ * });
523
+ *
524
+ * }).on('error', (e) => {
525
+ * console.error(e);
526
+ * });
527
+ * ```
528
+ * @since v0.3.6
529
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
530
+ */
531
+ function get(
532
+ options: RequestOptions | string | URL,
533
+ callback?: (res: http.IncomingMessage) => void,
534
+ ): http.ClientRequest;
535
+ function get(
536
+ url: string | URL,
537
+ options: RequestOptions,
538
+ callback?: (res: http.IncomingMessage) => void,
539
+ ): http.ClientRequest;
540
+ let globalAgent: Agent;
541
+ }
542
+ declare module 'node:https' {
543
+ export * from 'https';
544
+ }
@@ -0,0 +1,117 @@
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
+ * @since v0.3.7
6
+ */
7
+ declare module 'module' {
8
+ import { URL } from 'node:url';
9
+ namespace Module {
10
+ /**
11
+ * The `module.syncBuiltinESMExports()` method updates all the live bindings for
12
+ * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
13
+ * does not add or remove exported names from the `ES Modules`.
14
+ *
15
+ * ```js
16
+ * const fs = require('fs');
17
+ * const assert = require('assert');
18
+ * const { syncBuiltinESMExports } = require('module');
19
+ *
20
+ * fs.readFile = newAPI;
21
+ *
22
+ * delete fs.readFileSync;
23
+ *
24
+ * function newAPI() {
25
+ * // ...
26
+ * }
27
+ *
28
+ * fs.newAPI = newAPI;
29
+ *
30
+ * syncBuiltinESMExports();
31
+ *
32
+ * import('fs').then((esmFS) => {
33
+ * // It syncs the existing readFile property with the new value
34
+ * assert.strictEqual(esmFS.readFile, newAPI);
35
+ * // readFileSync has been deleted from the required fs
36
+ * assert.strictEqual('readFileSync' in fs, false);
37
+ * // syncBuiltinESMExports() does not remove readFileSync from esmFS
38
+ * assert.strictEqual('readFileSync' in esmFS, true);
39
+ * // syncBuiltinESMExports() does not add names
40
+ * assert.strictEqual(esmFS.newAPI, undefined);
41
+ * });
42
+ * ```
43
+ * @since v12.12.0
44
+ */
45
+ function syncBuiltinESMExports(): void;
46
+ /**
47
+ * `path` is the resolved path for the file for which a corresponding source map
48
+ * should be fetched.
49
+ * @since v13.7.0, v12.17.0
50
+ */
51
+ function findSourceMap(path: string, error?: Error): SourceMap;
52
+ interface SourceMapPayload {
53
+ file: string;
54
+ version: number;
55
+ sources: string[];
56
+ sourcesContent: string[];
57
+ names: string[];
58
+ mappings: string;
59
+ sourceRoot: string;
60
+ }
61
+ interface SourceMapping {
62
+ generatedLine: number;
63
+ generatedColumn: number;
64
+ originalSource: string;
65
+ originalLine: number;
66
+ originalColumn: number;
67
+ }
68
+ /**
69
+ * @since v13.7.0, v12.17.0
70
+ */
71
+ class SourceMap {
72
+ /**
73
+ * Getter for the payload used to construct the `SourceMap` instance.
74
+ */
75
+ readonly payload: SourceMapPayload;
76
+ constructor(payload: SourceMapPayload);
77
+ /**
78
+ * Given a line number and column number in the generated source file, returns
79
+ * an object representing the position in the original file. The object returned
80
+ * consists of the following keys:
81
+ */
82
+ findEntry(line: number, column: number): SourceMapping;
83
+ }
84
+ }
85
+ interface Module extends NodeModule {}
86
+ class Module {
87
+ static runMain(): void;
88
+ static wrap(code: string): string;
89
+ static createRequire(path: string | URL): NodeRequire;
90
+ static builtinModules: string[];
91
+ static Module: typeof Module;
92
+ constructor(id: string, parent?: Module);
93
+ }
94
+ global {
95
+ interface ImportMeta {
96
+ url: string;
97
+ /**
98
+ * @experimental
99
+ * This feature is only available with the `--experimental-import-meta-resolve`
100
+ * command flag enabled.
101
+ *
102
+ * Provides a module-relative resolution function scoped to each module, returning
103
+ * the URL string.
104
+ *
105
+ * @param specified The module specifier to resolve relative to `parent`.
106
+ * @param parent The absolute parent module URL to resolve from. If none
107
+ * is specified, the value of `import.meta.url` is used as the default.
108
+ */
109
+ resolve?(specified: string, parent?: string | URL): Promise<string>;
110
+ }
111
+ }
112
+ export = Module;
113
+ }
114
+ declare module 'node:module' {
115
+ import module = require('module');
116
+ export = module;
117
+ }