@node-red/editor-client 3.1.8 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/locales/de/editor.json +2 -0
- package/locales/en-US/editor.json +10 -1
- package/locales/fr/editor.json +8 -1
- package/locales/ja/editor.json +10 -3
- package/package.json +1 -1
- package/public/red/about +52 -0
- package/public/red/red.js +1433 -263
- package/public/red/red.min.js +3 -3
- package/public/red/style.min.css +2 -2
- package/public/red/tours/3.1/welcome.js +231 -0
- package/public/red/tours/images/nr4-auto-complete.png +0 -0
- package/public/red/tours/images/nr4-config-select.png +0 -0
- package/public/red/tours/images/nr4-multiplayer.png +0 -0
- package/public/red/tours/images/nr4-plugins.png +0 -0
- package/public/red/tours/images/nr4-sf-config.png +0 -0
- package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
- package/public/red/tours/welcome.js +105 -161
- package/public/types/node/assert/strict.d.ts +1 -1
- package/public/types/node/assert.d.ts +8 -9
- package/public/types/node/async_hooks.d.ts +9 -5
- package/public/types/node/buffer.d.ts +43 -18
- package/public/types/node/child_process.d.ts +8 -5
- package/public/types/node/cluster.d.ts +15 -19
- package/public/types/node/console.d.ts +2 -2
- package/public/types/node/crypto.d.ts +165 -70
- package/public/types/node/dgram.d.ts +4 -4
- package/public/types/node/diagnostics_channel.d.ts +8 -7
- package/public/types/node/dns/promises.d.ts +11 -9
- package/public/types/node/dns.d.ts +18 -13
- package/public/types/node/dom-events.d.ts +129 -0
- package/public/types/node/domain.d.ts +2 -2
- package/public/types/node/events.d.ts +49 -12
- package/public/types/node/fs/promises.d.ts +68 -24
- package/public/types/node/fs.d.ts +132 -59
- package/public/types/node/globals.d.ts +31 -17
- package/public/types/node/http.d.ts +138 -27
- package/public/types/node/http2.d.ts +38 -5
- package/public/types/node/https.d.ts +12 -3
- package/public/types/node/module.d.ts +1 -2
- package/public/types/node/net.d.ts +69 -28
- package/public/types/node/os.d.ts +16 -5
- package/public/types/node/path.d.ts +5 -5
- package/public/types/node/perf_hooks.d.ts +48 -9
- package/public/types/node/process.d.ts +18 -17
- package/public/types/node/querystring.d.ts +2 -2
- package/public/types/node/readline/promises.d.ts +146 -0
- package/public/types/node/readline.d.ts +141 -31
- package/public/types/node/stream/consumers.d.ts +2 -2
- package/public/types/node/stream/promises.d.ts +1 -1
- package/public/types/node/stream/web.d.ts +4 -66
- package/public/types/node/stream.d.ts +96 -118
- package/public/types/node/string_decoder.d.ts +2 -2
- package/public/types/node/test.d.ts +200 -16
- package/public/types/node/timers/promises.d.ts +1 -26
- package/public/types/node/timers.d.ts +2 -2
- package/public/types/node/tls.d.ts +21 -12
- package/public/types/node/trace_events.d.ts +12 -2
- package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
- package/public/types/node/ts4.8/assert.d.ts +964 -0
- package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
- package/public/types/node/ts4.8/buffer.d.ts +2262 -0
- package/public/types/node/ts4.8/child_process.d.ts +1372 -0
- package/public/types/node/ts4.8/cluster.d.ts +413 -0
- package/public/types/node/ts4.8/console.d.ts +415 -0
- package/public/types/node/ts4.8/crypto.d.ts +3967 -0
- package/public/types/node/ts4.8/dgram.d.ts +548 -0
- package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
- package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
- package/public/types/node/ts4.8/dns.d.ts +662 -0
- package/public/types/node/ts4.8/dom-events.d.ts +129 -0
- package/public/types/node/ts4.8/domain.d.ts +173 -0
- package/public/types/node/ts4.8/events.d.ts +681 -0
- package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
- package/public/types/node/ts4.8/fs.d.ts +3875 -0
- package/public/types/node/ts4.8/globals.d.ts +297 -0
- package/public/types/node/ts4.8/http.d.ts +1617 -0
- package/public/types/node/ts4.8/http2.d.ts +2137 -0
- package/public/types/node/ts4.8/https.d.ts +544 -0
- package/public/types/node/ts4.8/module.d.ts +117 -0
- package/public/types/node/ts4.8/net.d.ts +872 -0
- package/public/types/node/ts4.8/os.d.ts +469 -0
- package/public/types/node/ts4.8/path.d.ts +194 -0
- package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
- package/public/types/node/ts4.8/process.d.ts +1485 -0
- package/public/types/node/ts4.8/querystring.d.ts +134 -0
- package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
- package/public/types/node/ts4.8/readline.d.ts +656 -0
- package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
- package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
- package/public/types/node/ts4.8/stream/web.d.ts +333 -0
- package/public/types/node/ts4.8/stream.d.ts +1343 -0
- package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
- package/public/types/node/ts4.8/test.d.ts +377 -0
- package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
- package/public/types/node/ts4.8/timers.d.ts +97 -0
- package/public/types/node/ts4.8/tls.d.ts +1031 -0
- package/public/types/node/ts4.8/trace_events.d.ts +174 -0
- package/public/types/node/ts4.8/tty.d.ts +209 -0
- package/public/types/node/ts4.8/url.d.ts +900 -0
- package/public/types/node/ts4.8/util.d.ts +1853 -0
- package/public/types/node/ts4.8/v8.d.ts +399 -0
- package/public/types/node/ts4.8/vm.d.ts +512 -0
- package/public/types/node/ts4.8/wasi.d.ts +161 -0
- package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
- package/public/types/node/ts4.8/zlib.d.ts +520 -0
- package/public/types/node/tty.d.ts +5 -3
- package/public/types/node/url.d.ts +81 -39
- package/public/types/node/util.d.ts +269 -13
- package/public/types/node/v8.d.ts +22 -4
- package/public/types/node/vm.d.ts +7 -5
- package/public/types/node/wasi.d.ts +2 -2
- package/public/types/node/worker_threads.d.ts +51 -11
- package/public/types/node/zlib.d.ts +2 -2
- package/public/types/node-red/func.d.ts +26 -17
- package/public/vendor/ace/worker-jsonata.js +1 -1
- package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
- package/public/vendor/monaco/dist/css.worker.js +1 -1
- package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/editor.js +1 -29
- package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
- package/public/vendor/monaco/dist/editor.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js +1 -1
- package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/json.worker.js +1 -1
- package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
- package/public/vendor/monaco/dist/locale/cs.js +324 -106
- package/public/vendor/monaco/dist/locale/de.js +336 -118
- package/public/vendor/monaco/dist/locale/es.js +329 -111
- package/public/vendor/monaco/dist/locale/fr.js +334 -116
- package/public/vendor/monaco/dist/locale/it.js +327 -109
- package/public/vendor/monaco/dist/locale/ja.js +329 -111
- package/public/vendor/monaco/dist/locale/ko.js +330 -112
- package/public/vendor/monaco/dist/locale/pl.js +329 -111
- package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
- package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
- package/public/vendor/monaco/dist/locale/ru.js +331 -113
- package/public/vendor/monaco/dist/locale/tr.js +329 -111
- package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
- package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
- package/public/vendor/monaco/dist/ts.worker.js +2 -2
- package/public/vendor/vendor.js +1 -1
- package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
- /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
- /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* To use the HTTP server and client one must `require('http')`.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* { 'content-length': '123',
|
|
17
17
|
* 'content-type': 'text/plain',
|
|
18
18
|
* 'connection': 'keep-alive',
|
|
19
|
-
* 'host': '
|
|
19
|
+
* 'host': 'example.com',
|
|
20
20
|
* 'accept': '*' }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
* 'content-LENGTH', '123',
|
|
38
38
|
* 'content-type', 'text/plain',
|
|
39
39
|
* 'CONNECTION', 'keep-alive',
|
|
40
|
-
* 'Host', '
|
|
40
|
+
* 'Host', 'example.com',
|
|
41
41
|
* 'accepT', '*' ]
|
|
42
42
|
* ```
|
|
43
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
43
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js)
|
|
44
44
|
*/
|
|
45
45
|
declare module 'http' {
|
|
46
46
|
import * as stream from 'node:stream';
|
|
@@ -244,14 +244,12 @@ declare module 'http' {
|
|
|
244
244
|
* Limit the amount of time the parser will wait to receive the complete HTTP
|
|
245
245
|
* headers.
|
|
246
246
|
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* See `server.timeout` for more information on how timeout behavior can be
|
|
254
|
-
* customized.
|
|
247
|
+
* If the timeout expires, the server responds with status 408 without
|
|
248
|
+
* forwarding the request to the request listener and then closes the connection.
|
|
249
|
+
*
|
|
250
|
+
* It must be set to a non-zero value (e.g. 120 seconds) to protect against
|
|
251
|
+
* potential Denial-of-Service attacks in case the server is deployed without a
|
|
252
|
+
* reverse proxy in front.
|
|
255
253
|
* @since v11.3.0, v10.14.0
|
|
256
254
|
*/
|
|
257
255
|
headersTimeout: number;
|
|
@@ -284,6 +282,16 @@ declare module 'http' {
|
|
|
284
282
|
* @since v14.11.0
|
|
285
283
|
*/
|
|
286
284
|
requestTimeout: number;
|
|
285
|
+
/**
|
|
286
|
+
* Closes all connections connected to this server.
|
|
287
|
+
* @since v18.2.0
|
|
288
|
+
*/
|
|
289
|
+
closeAllConnections(): void;
|
|
290
|
+
/**
|
|
291
|
+
* Closes all connections connected to this server which are not sending a request or waiting for a response.
|
|
292
|
+
* @since v18.2.0
|
|
293
|
+
*/
|
|
294
|
+
closeIdleConnections(): void;
|
|
287
295
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
288
296
|
addListener(event: 'close', listener: () => void): this;
|
|
289
297
|
addListener(event: 'connection', listener: (socket: Socket) => void): this;
|
|
@@ -410,7 +418,7 @@ declare module 'http' {
|
|
|
410
418
|
/**
|
|
411
419
|
* Aliases of `outgoingMessage.socket`
|
|
412
420
|
* @since v0.3.0
|
|
413
|
-
* @deprecated Since v15.12.0 - Use `socket` instead.
|
|
421
|
+
* @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
|
|
414
422
|
*/
|
|
415
423
|
readonly connection: Socket | null;
|
|
416
424
|
/**
|
|
@@ -461,13 +469,13 @@ declare module 'http' {
|
|
|
461
469
|
* const headers = outgoingMessage.getHeaders();
|
|
462
470
|
* // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
|
|
463
471
|
* ```
|
|
464
|
-
* @since
|
|
472
|
+
* @since v7.7.0
|
|
465
473
|
*/
|
|
466
474
|
getHeaders(): OutgoingHttpHeaders;
|
|
467
475
|
/**
|
|
468
476
|
* Returns an array of names of headers of the outgoing outgoingMessage. All
|
|
469
477
|
* names are lowercase.
|
|
470
|
-
* @since
|
|
478
|
+
* @since v7.7.0
|
|
471
479
|
*/
|
|
472
480
|
getHeaderNames(): string[];
|
|
473
481
|
/**
|
|
@@ -477,7 +485,7 @@ declare module 'http' {
|
|
|
477
485
|
* ```js
|
|
478
486
|
* const hasContentType = outgoingMessage.hasHeader('content-type');
|
|
479
487
|
* ```
|
|
480
|
-
* @since
|
|
488
|
+
* @since v7.7.0
|
|
481
489
|
*/
|
|
482
490
|
hasHeader(name: string): boolean;
|
|
483
491
|
/**
|
|
@@ -487,6 +495,7 @@ declare module 'http' {
|
|
|
487
495
|
* outgoingMessage.removeHeader('Content-Encoding');
|
|
488
496
|
* ```
|
|
489
497
|
* @since v0.4.0
|
|
498
|
+
* @param name Header name
|
|
490
499
|
*/
|
|
491
500
|
removeHeader(name: string): void;
|
|
492
501
|
/**
|
|
@@ -564,11 +573,46 @@ declare module 'http' {
|
|
|
564
573
|
assignSocket(socket: Socket): void;
|
|
565
574
|
detachSocket(socket: Socket): void;
|
|
566
575
|
/**
|
|
567
|
-
* Sends
|
|
576
|
+
* Sends an HTTP/1.1 100 Continue message to the client, indicating that
|
|
568
577
|
* the request body should be sent. See the `'checkContinue'` event on`Server`.
|
|
569
578
|
* @since v0.3.0
|
|
570
579
|
*/
|
|
571
580
|
writeContinue(callback?: () => void): void;
|
|
581
|
+
/**
|
|
582
|
+
* Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
|
|
583
|
+
* indicating that the user agent can preload/preconnect the linked resources.
|
|
584
|
+
* The `hints` is an object containing the values of headers to be sent with
|
|
585
|
+
* early hints message. The optional `callback` argument will be called when
|
|
586
|
+
* the response message has been written.
|
|
587
|
+
*
|
|
588
|
+
* Example:
|
|
589
|
+
*
|
|
590
|
+
* ```js
|
|
591
|
+
* const earlyHintsLink = '</styles.css>; rel=preload; as=style';
|
|
592
|
+
* response.writeEarlyHints({
|
|
593
|
+
* 'link': earlyHintsLink,
|
|
594
|
+
* });
|
|
595
|
+
*
|
|
596
|
+
* const earlyHintsLinks = [
|
|
597
|
+
* '</styles.css>; rel=preload; as=style',
|
|
598
|
+
* '</scripts.js>; rel=preload; as=script',
|
|
599
|
+
* ];
|
|
600
|
+
* response.writeEarlyHints({
|
|
601
|
+
* 'link': earlyHintsLinks,
|
|
602
|
+
* 'x-trace-id': 'id for diagnostics'
|
|
603
|
+
* });
|
|
604
|
+
*
|
|
605
|
+
* const earlyHintsCallback = () => console.log('early hints message sent');
|
|
606
|
+
* response.writeEarlyHints({
|
|
607
|
+
* 'link': earlyHintsLinks
|
|
608
|
+
* }, earlyHintsCallback);
|
|
609
|
+
* ```
|
|
610
|
+
*
|
|
611
|
+
* @since v18.11.0
|
|
612
|
+
* @param hints An object containing the values of headers
|
|
613
|
+
* @param callback Will be called when the response message has been written
|
|
614
|
+
*/
|
|
615
|
+
writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
|
|
572
616
|
/**
|
|
573
617
|
* Sends a response header to the request. The status code is a 3-digit HTTP
|
|
574
618
|
* status code, like `404`. The last argument, `headers`, are the response headers.
|
|
@@ -633,7 +677,7 @@ declare module 'http' {
|
|
|
633
677
|
): this;
|
|
634
678
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
|
|
635
679
|
/**
|
|
636
|
-
* Sends
|
|
680
|
+
* Sends an HTTP/1.1 102 Processing message to the client, indicating that
|
|
637
681
|
* the request body should be sent.
|
|
638
682
|
* @since v10.0.0
|
|
639
683
|
*/
|
|
@@ -681,6 +725,7 @@ declare module 'http' {
|
|
|
681
725
|
* The `request.aborted` property will be `true` if the request has
|
|
682
726
|
* been aborted.
|
|
683
727
|
* @since v0.11.14
|
|
728
|
+
* @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
|
|
684
729
|
*/
|
|
685
730
|
aborted: boolean;
|
|
686
731
|
/**
|
|
@@ -694,13 +739,58 @@ declare module 'http' {
|
|
|
694
739
|
*/
|
|
695
740
|
protocol: string;
|
|
696
741
|
/**
|
|
697
|
-
*
|
|
742
|
+
* When sending request through a keep-alive enabled agent, the underlying socket
|
|
743
|
+
* might be reused. But if server closes connection at unfortunate time, client
|
|
744
|
+
* may run into a 'ECONNRESET' error.
|
|
745
|
+
*
|
|
746
|
+
* ```js
|
|
747
|
+
* const http = require('http');
|
|
748
|
+
*
|
|
749
|
+
* // Server has a 5 seconds keep-alive timeout by default
|
|
750
|
+
* http
|
|
751
|
+
* .createServer((req, res) => {
|
|
752
|
+
* res.write('hello\n');
|
|
753
|
+
* res.end();
|
|
754
|
+
* })
|
|
755
|
+
* .listen(3000);
|
|
756
|
+
*
|
|
757
|
+
* setInterval(() => {
|
|
758
|
+
* // Adapting a keep-alive agent
|
|
759
|
+
* http.get('http://localhost:3000', { agent }, (res) => {
|
|
760
|
+
* res.on('data', (data) => {
|
|
761
|
+
* // Do nothing
|
|
762
|
+
* });
|
|
763
|
+
* });
|
|
764
|
+
* }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
|
|
765
|
+
* ```
|
|
766
|
+
*
|
|
767
|
+
* By marking a request whether it reused socket or not, we can do
|
|
768
|
+
* automatic error retry base on it.
|
|
769
|
+
*
|
|
770
|
+
* ```js
|
|
771
|
+
* const http = require('http');
|
|
772
|
+
* const agent = new http.Agent({ keepAlive: true });
|
|
773
|
+
*
|
|
774
|
+
* function retriableRequest() {
|
|
775
|
+
* const req = http
|
|
776
|
+
* .get('http://localhost:3000', { agent }, (res) => {
|
|
777
|
+
* // ...
|
|
778
|
+
* })
|
|
779
|
+
* .on('error', (err) => {
|
|
780
|
+
* // Check if retry is needed
|
|
781
|
+
* if (req.reusedSocket && err.code === 'ECONNRESET') {
|
|
782
|
+
* retriableRequest();
|
|
783
|
+
* }
|
|
784
|
+
* });
|
|
785
|
+
* }
|
|
786
|
+
*
|
|
787
|
+
* retriableRequest();
|
|
788
|
+
* ```
|
|
698
789
|
* @since v13.0.0, v12.16.0
|
|
699
790
|
*/
|
|
700
791
|
reusedSocket: boolean;
|
|
701
792
|
/**
|
|
702
793
|
* Limits maximum response headers count. If set to 0, no limit will be applied.
|
|
703
|
-
* @default 2000
|
|
704
794
|
*/
|
|
705
795
|
maxHeadersCount: number;
|
|
706
796
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
@@ -750,9 +840,12 @@ declare module 'http' {
|
|
|
750
840
|
* const headerNames = request.getRawHeaderNames();
|
|
751
841
|
* // headerNames === ['Foo', 'Set-Cookie']
|
|
752
842
|
* ```
|
|
753
|
-
* @since v15.13.0
|
|
843
|
+
* @since v15.13.0, v14.17.0
|
|
754
844
|
*/
|
|
755
845
|
getRawHeaderNames(): string[];
|
|
846
|
+
/**
|
|
847
|
+
* @deprecated
|
|
848
|
+
*/
|
|
756
849
|
addListener(event: 'abort', listener: () => void): this;
|
|
757
850
|
addListener(
|
|
758
851
|
event: 'connect',
|
|
@@ -774,6 +867,9 @@ declare module 'http' {
|
|
|
774
867
|
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
775
868
|
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
776
869
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
870
|
+
/**
|
|
871
|
+
* @deprecated
|
|
872
|
+
*/
|
|
777
873
|
on(event: 'abort', listener: () => void): this;
|
|
778
874
|
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
779
875
|
on(event: 'continue', listener: () => void): this;
|
|
@@ -789,6 +885,9 @@ declare module 'http' {
|
|
|
789
885
|
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
790
886
|
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
791
887
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
888
|
+
/**
|
|
889
|
+
* @deprecated
|
|
890
|
+
*/
|
|
792
891
|
once(event: 'abort', listener: () => void): this;
|
|
793
892
|
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
794
893
|
once(event: 'continue', listener: () => void): this;
|
|
@@ -804,6 +903,9 @@ declare module 'http' {
|
|
|
804
903
|
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
805
904
|
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
806
905
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
906
|
+
/**
|
|
907
|
+
* @deprecated
|
|
908
|
+
*/
|
|
807
909
|
prependListener(event: 'abort', listener: () => void): this;
|
|
808
910
|
prependListener(
|
|
809
911
|
event: 'connect',
|
|
@@ -825,6 +927,9 @@ declare module 'http' {
|
|
|
825
927
|
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
826
928
|
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
827
929
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
930
|
+
/**
|
|
931
|
+
* @deprecated
|
|
932
|
+
*/
|
|
828
933
|
prependOnceListener(event: 'abort', listener: () => void): this;
|
|
829
934
|
prependOnceListener(
|
|
830
935
|
event: 'connect',
|
|
@@ -863,6 +968,7 @@ declare module 'http' {
|
|
|
863
968
|
* The `message.aborted` property will be `true` if the request has
|
|
864
969
|
* been aborted.
|
|
865
970
|
* @since v10.1.0
|
|
971
|
+
* @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
|
|
866
972
|
*/
|
|
867
973
|
aborted: boolean;
|
|
868
974
|
/**
|
|
@@ -914,7 +1020,7 @@ declare module 'http' {
|
|
|
914
1020
|
*
|
|
915
1021
|
* This property is guaranteed to be an instance of the `net.Socket` class,
|
|
916
1022
|
* a subclass of `stream.Duplex`, unless the user specified a socket
|
|
917
|
-
* type other than `net.Socket
|
|
1023
|
+
* type other than `net.Socket` or internally nulled.
|
|
918
1024
|
* @since v0.3.0
|
|
919
1025
|
*/
|
|
920
1026
|
socket: Socket;
|
|
@@ -929,7 +1035,7 @@ declare module 'http' {
|
|
|
929
1035
|
* // { 'user-agent': 'curl/7.22.0',
|
|
930
1036
|
* // host: '127.0.0.1:8000',
|
|
931
1037
|
* // accept: '*' }
|
|
932
|
-
* console.log(request.
|
|
1038
|
+
* console.log(request.getHeaders());
|
|
933
1039
|
* ```
|
|
934
1040
|
*
|
|
935
1041
|
* Duplicates in raw headers are handled in the following ways, depending on the
|
|
@@ -1005,14 +1111,14 @@ declare module 'http' {
|
|
|
1005
1111
|
* To parse the URL into its parts:
|
|
1006
1112
|
*
|
|
1007
1113
|
* ```js
|
|
1008
|
-
* new URL(request.url, `http://${request.
|
|
1114
|
+
* new URL(request.url, `http://${request.getHeaders().host}`);
|
|
1009
1115
|
* ```
|
|
1010
1116
|
*
|
|
1011
|
-
* When `request.url` is `'/status?name=ryan'` and`request.
|
|
1117
|
+
* When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`:
|
|
1012
1118
|
*
|
|
1013
1119
|
* ```console
|
|
1014
1120
|
* $ node
|
|
1015
|
-
* > new URL(request.url, `http://${request.
|
|
1121
|
+
* > new URL(request.url, `http://${request.getHeaders().host}`)
|
|
1016
1122
|
* URL {
|
|
1017
1123
|
* href: 'http://localhost:3000/status?name=ryan',
|
|
1018
1124
|
* origin: 'http://localhost:3000',
|
|
@@ -1212,11 +1318,16 @@ declare module 'http' {
|
|
|
1212
1318
|
function createServer<
|
|
1213
1319
|
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
|
1214
1320
|
Response extends typeof ServerResponse = typeof ServerResponse,
|
|
1215
|
-
>(
|
|
1321
|
+
>(
|
|
1322
|
+
options: ServerOptions<Request, Response>,
|
|
1323
|
+
requestListener?: RequestListener<Request, Response>,
|
|
1324
|
+
): Server<Request, Response>;
|
|
1216
1325
|
// although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
|
|
1217
1326
|
// create interface RequestOptions would make the naming more clear to developers
|
|
1218
1327
|
interface RequestOptions extends ClientRequestArgs {}
|
|
1219
1328
|
/**
|
|
1329
|
+
* `options` in `socket.connect()` are also supported.
|
|
1330
|
+
*
|
|
1220
1331
|
* Node.js maintains several connections per server to make HTTP requests.
|
|
1221
1332
|
* This function allows one to transparently issue requests.
|
|
1222
1333
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const http2 = require('http2');
|
|
10
10
|
* ```
|
|
11
11
|
* @since v8.4.0
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'http2' {
|
|
15
15
|
import EventEmitter = require('node:events');
|
|
@@ -86,7 +86,7 @@ declare module 'http2' {
|
|
|
86
86
|
*/
|
|
87
87
|
readonly destroyed: boolean;
|
|
88
88
|
/**
|
|
89
|
-
* Set
|
|
89
|
+
* Set to `true` if the `END_STREAM` flag was set in the request or response
|
|
90
90
|
* HEADERS frame received, indicating that no additional data should be received
|
|
91
91
|
* and the readable side of the `Http2Stream` will be closed.
|
|
92
92
|
* @since v10.11.0
|
|
@@ -761,7 +761,7 @@ declare module 'http2' {
|
|
|
761
761
|
* session.setLocalWindowSize(expectedWindowSize);
|
|
762
762
|
* });
|
|
763
763
|
* ```
|
|
764
|
-
* @since v15.3.0
|
|
764
|
+
* @since v15.3.0, v14.18.0
|
|
765
765
|
*/
|
|
766
766
|
setLocalWindowSize(windowSize: number): void;
|
|
767
767
|
/**
|
|
@@ -849,6 +849,11 @@ declare module 'http2' {
|
|
|
849
849
|
* For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
|
|
850
850
|
* HTTP/2 request to the connected server.
|
|
851
851
|
*
|
|
852
|
+
* When a `ClientHttp2Session` is first created, the socket may not yet be
|
|
853
|
+
* connected. if `clienthttp2session.request()` is called during this time, the
|
|
854
|
+
* actual request will be deferred until the socket is ready to go.
|
|
855
|
+
* If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
|
|
856
|
+
*
|
|
852
857
|
* This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
|
|
853
858
|
*
|
|
854
859
|
* ```js
|
|
@@ -1640,7 +1645,7 @@ declare module 'http2' {
|
|
|
1640
1645
|
* be called multiple times to provide successive parts of the body.
|
|
1641
1646
|
*
|
|
1642
1647
|
* In the `http` module, the response body is omitted when the
|
|
1643
|
-
* request is a HEAD request. Similarly, the `204` and `304`
|
|
1648
|
+
* request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
|
|
1644
1649
|
*
|
|
1645
1650
|
* `chunk` can be a string or a buffer. If `chunk` is a string,
|
|
1646
1651
|
* the second parameter specifies how to encode it into a byte stream.
|
|
@@ -1668,6 +1673,34 @@ declare module 'http2' {
|
|
|
1668
1673
|
* @since v8.4.0
|
|
1669
1674
|
*/
|
|
1670
1675
|
writeContinue(): void;
|
|
1676
|
+
/**
|
|
1677
|
+
* Sends a status `103 Early Hints` to the client with a Link header,
|
|
1678
|
+
* indicating that the user agent can preload/preconnect the linked resources.
|
|
1679
|
+
* The `hints` is an object containing the values of headers to be sent with
|
|
1680
|
+
* early hints message.
|
|
1681
|
+
*
|
|
1682
|
+
* Example:
|
|
1683
|
+
*
|
|
1684
|
+
* ```js
|
|
1685
|
+
* const earlyHintsLink = '</styles.css>; rel=preload; as=style';
|
|
1686
|
+
* response.writeEarlyHints({
|
|
1687
|
+
* 'link': earlyHintsLink,
|
|
1688
|
+
* });
|
|
1689
|
+
*
|
|
1690
|
+
* const earlyHintsLinks = [
|
|
1691
|
+
* '</styles.css>; rel=preload; as=style',
|
|
1692
|
+
* '</scripts.js>; rel=preload; as=script',
|
|
1693
|
+
* ];
|
|
1694
|
+
* response.writeEarlyHints({
|
|
1695
|
+
* 'link': earlyHintsLinks,
|
|
1696
|
+
* 'x-trace-id': 'id for diagnostics'
|
|
1697
|
+
* });
|
|
1698
|
+
* ```
|
|
1699
|
+
*
|
|
1700
|
+
* @since v18.11.0
|
|
1701
|
+
* @param hints An object containing the values of headers
|
|
1702
|
+
*/
|
|
1703
|
+
writeEarlyHints(hints: Record<string, string | string[]>): void;
|
|
1671
1704
|
/**
|
|
1672
1705
|
* Sends a response header to the request. The status code is a 3-digit HTTP
|
|
1673
1706
|
* status code, like `404`. The last argument, `headers`, are the response headers.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
6
6
|
* separate module.
|
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module 'https' {
|
|
10
10
|
import { Duplex } from 'node:stream';
|
|
@@ -17,7 +17,6 @@ declare module 'https' {
|
|
|
17
17
|
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
|
|
18
18
|
type RequestOptions = http.RequestOptions &
|
|
19
19
|
tls.SecureContextOptions & {
|
|
20
|
-
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
|
|
21
20
|
rejectUnauthorized?: boolean | undefined; // Defaults to true
|
|
22
21
|
servername?: string | undefined; // SNI TLS Extension
|
|
23
22
|
};
|
|
@@ -50,6 +49,16 @@ declare module 'https' {
|
|
|
50
49
|
options: ServerOptions<Request, Response>,
|
|
51
50
|
requestListener?: http.RequestListener<Request, Response>,
|
|
52
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;
|
|
53
62
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
54
63
|
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
55
64
|
addListener(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/
|
|
2
|
+
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @since v0.3.7
|
|
@@ -88,7 +88,6 @@ declare module 'module' {
|
|
|
88
88
|
static wrap(code: string): string;
|
|
89
89
|
static createRequire(path: string | URL): NodeRequire;
|
|
90
90
|
static builtinModules: string[];
|
|
91
|
-
static isBuiltin(moduleName: string): boolean;
|
|
92
91
|
static Module: typeof Module;
|
|
93
92
|
constructor(id: string, parent?: Module);
|
|
94
93
|
}
|