cdk-common 2.0.965 → 2.0.967
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/.jsii +2 -2
- package/lib/main.js +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +16 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +34 -29
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +2 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +17 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +7 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +238 -101
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +17 -23
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +67 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +11 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +19 -19
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +17 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +15 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +7 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +44 -44
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +12 -12
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +22 -22
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +16 -9
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +34 -29
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +2 -1
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +17 -1
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +7 -7
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +238 -101
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +17 -23
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +67 -0
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +11 -15
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +19 -19
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +17 -17
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +15 -15
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +7 -7
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +44 -44
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +12 -12
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +22 -22
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +8 -8
- package/node_modules/fast-uri/.github/workflows/ci.yml +2 -2
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
- package/node_modules/fast-uri/index.js +3 -9
- package/node_modules/fast-uri/package.json +3 -3
- package/node_modules/fast-uri/test/ajv.test.js +1 -1
- package/node_modules/fast-uri/test/compatibility.test.js +3 -2
- package/node_modules/fast-uri/test/equal.test.js +1 -2
- package/node_modules/fast-uri/test/parse.test.js +1 -2
- package/node_modules/fast-uri/test/resolve.test.js +1 -2
- package/node_modules/fast-uri/test/serialize.test.js +1 -2
- package/node_modules/fast-uri/test/uri-js.test.js +539 -567
- package/node_modules/fast-uri/test/util.test.js +2 -3
- package/package.json +1 -1
- package/node_modules/fast-uri/.taprc +0 -3
|
@@ -10,7 +10,7 @@ declare module "https" {
|
|
|
10
10
|
import { URL } from "node:url";
|
|
11
11
|
type ServerOptions<
|
|
12
12
|
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
13
|
-
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
13
|
+
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
|
14
14
|
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
|
|
15
15
|
type RequestOptions =
|
|
16
16
|
& http.RequestOptions
|
|
@@ -34,7 +34,7 @@ declare module "https" {
|
|
|
34
34
|
}
|
|
35
35
|
interface Server<
|
|
36
36
|
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
37
|
-
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
37
|
+
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
|
38
38
|
> extends http.Server<Request, Response> {}
|
|
39
39
|
/**
|
|
40
40
|
* See `http.Server` for more information.
|
|
@@ -42,7 +42,7 @@ declare module "https" {
|
|
|
42
42
|
*/
|
|
43
43
|
class Server<
|
|
44
44
|
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
45
|
-
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
45
|
+
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
|
46
46
|
> extends tls.Server {
|
|
47
47
|
constructor(requestListener?: http.RequestListener<Request, Response>);
|
|
48
48
|
constructor(
|
|
@@ -119,25 +119,19 @@ declare module "https" {
|
|
|
119
119
|
emit(
|
|
120
120
|
event: "checkContinue",
|
|
121
121
|
req: InstanceType<Request>,
|
|
122
|
-
res: InstanceType<Response
|
|
123
|
-
req: InstanceType<Request>;
|
|
124
|
-
},
|
|
122
|
+
res: InstanceType<Response>,
|
|
125
123
|
): boolean;
|
|
126
124
|
emit(
|
|
127
125
|
event: "checkExpectation",
|
|
128
126
|
req: InstanceType<Request>,
|
|
129
|
-
res: InstanceType<Response
|
|
130
|
-
req: InstanceType<Request>;
|
|
131
|
-
},
|
|
127
|
+
res: InstanceType<Response>,
|
|
132
128
|
): boolean;
|
|
133
129
|
emit(event: "clientError", err: Error, socket: Duplex): boolean;
|
|
134
130
|
emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
135
131
|
emit(
|
|
136
132
|
event: "request",
|
|
137
133
|
req: InstanceType<Request>,
|
|
138
|
-
res: InstanceType<Response
|
|
139
|
-
req: InstanceType<Request>;
|
|
140
|
-
},
|
|
134
|
+
res: InstanceType<Response>,
|
|
141
135
|
): boolean;
|
|
142
136
|
emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
143
137
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
@@ -276,8 +270,8 @@ declare module "https" {
|
|
|
276
270
|
/**
|
|
277
271
|
* ```js
|
|
278
272
|
* // curl -k https://localhost:8000/
|
|
279
|
-
*
|
|
280
|
-
*
|
|
273
|
+
* import https from 'node:https';
|
|
274
|
+
* import fs from 'node:fs';
|
|
281
275
|
*
|
|
282
276
|
* const options = {
|
|
283
277
|
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
@@ -293,8 +287,8 @@ declare module "https" {
|
|
|
293
287
|
* Or
|
|
294
288
|
*
|
|
295
289
|
* ```js
|
|
296
|
-
*
|
|
297
|
-
*
|
|
290
|
+
* import https from 'node:https';
|
|
291
|
+
* import fs from 'node:fs';
|
|
298
292
|
*
|
|
299
293
|
* const options = {
|
|
300
294
|
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
|
|
@@ -312,11 +306,11 @@ declare module "https" {
|
|
|
312
306
|
*/
|
|
313
307
|
function createServer<
|
|
314
308
|
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
315
|
-
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
309
|
+
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
|
316
310
|
>(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
|
|
317
311
|
function createServer<
|
|
318
312
|
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
319
|
-
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
313
|
+
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
|
|
320
314
|
>(
|
|
321
315
|
options: ServerOptions<Request, Response>,
|
|
322
316
|
requestListener?: http.RequestListener<Request, Response>,
|
|
@@ -334,7 +328,7 @@ declare module "https" {
|
|
|
334
328
|
* upload a file with a POST request, then write to the `ClientRequest` object.
|
|
335
329
|
*
|
|
336
330
|
* ```js
|
|
337
|
-
*
|
|
331
|
+
* import https from 'node:https';
|
|
338
332
|
*
|
|
339
333
|
* const options = {
|
|
340
334
|
* hostname: 'encrypted.google.com',
|
|
@@ -407,9 +401,9 @@ declare module "https" {
|
|
|
407
401
|
* Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
|
|
408
402
|
*
|
|
409
403
|
* ```js
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
404
|
+
* import tls from 'node:tls';
|
|
405
|
+
* import https from 'node:https';
|
|
406
|
+
* import crypto from 'node:crypto';
|
|
413
407
|
*
|
|
414
408
|
* function sha256(s) {
|
|
415
409
|
* return crypto.createHash('sha256').update(s).digest('base64');
|
|
@@ -517,7 +511,7 @@ declare module "https" {
|
|
|
517
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.
|
|
518
512
|
*
|
|
519
513
|
* ```js
|
|
520
|
-
*
|
|
514
|
+
* import https from 'node:https';
|
|
521
515
|
*
|
|
522
516
|
* https.get('https://encrypted.google.com/', (res) => {
|
|
523
517
|
* console.log('statusCode:', res.statusCode);
|
|
@@ -1704,6 +1704,10 @@ declare module 'inspector' {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
namespace Network {
|
|
1707
|
+
/**
|
|
1708
|
+
* Resource type as it was perceived by the rendering engine.
|
|
1709
|
+
*/
|
|
1710
|
+
type ResourceType = string;
|
|
1707
1711
|
/**
|
|
1708
1712
|
* Unique request identifier.
|
|
1709
1713
|
*/
|
|
@@ -1722,6 +1726,21 @@ declare module 'inspector' {
|
|
|
1722
1726
|
interface Request {
|
|
1723
1727
|
url: string;
|
|
1724
1728
|
method: string;
|
|
1729
|
+
headers: Headers;
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* HTTP response data.
|
|
1733
|
+
*/
|
|
1734
|
+
interface Response {
|
|
1735
|
+
url: string;
|
|
1736
|
+
status: number;
|
|
1737
|
+
statusText: string;
|
|
1738
|
+
headers: Headers;
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Request / response headers as keys / values of JSON object.
|
|
1742
|
+
*/
|
|
1743
|
+
interface Headers {
|
|
1725
1744
|
}
|
|
1726
1745
|
interface RequestWillBeSentEventDataType {
|
|
1727
1746
|
/**
|
|
@@ -1750,6 +1769,32 @@ declare module 'inspector' {
|
|
|
1750
1769
|
* Timestamp.
|
|
1751
1770
|
*/
|
|
1752
1771
|
timestamp: MonotonicTime;
|
|
1772
|
+
/**
|
|
1773
|
+
* Resource type.
|
|
1774
|
+
*/
|
|
1775
|
+
type: ResourceType;
|
|
1776
|
+
/**
|
|
1777
|
+
* Response data.
|
|
1778
|
+
*/
|
|
1779
|
+
response: Response;
|
|
1780
|
+
}
|
|
1781
|
+
interface LoadingFailedEventDataType {
|
|
1782
|
+
/**
|
|
1783
|
+
* Request identifier.
|
|
1784
|
+
*/
|
|
1785
|
+
requestId: RequestId;
|
|
1786
|
+
/**
|
|
1787
|
+
* Timestamp.
|
|
1788
|
+
*/
|
|
1789
|
+
timestamp: MonotonicTime;
|
|
1790
|
+
/**
|
|
1791
|
+
* Resource type.
|
|
1792
|
+
*/
|
|
1793
|
+
type: ResourceType;
|
|
1794
|
+
/**
|
|
1795
|
+
* Error message.
|
|
1796
|
+
*/
|
|
1797
|
+
errorText: string;
|
|
1753
1798
|
}
|
|
1754
1799
|
interface LoadingFinishedEventDataType {
|
|
1755
1800
|
/**
|
|
@@ -2260,6 +2305,7 @@ declare module 'inspector' {
|
|
|
2260
2305
|
* Fired when HTTP response is available.
|
|
2261
2306
|
*/
|
|
2262
2307
|
addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
2308
|
+
addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
2263
2309
|
addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
2264
2310
|
/**
|
|
2265
2311
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -2302,6 +2348,7 @@ declare module 'inspector' {
|
|
|
2302
2348
|
emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
|
|
2303
2349
|
emit(event: 'Network.requestWillBeSent', message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
|
|
2304
2350
|
emit(event: 'Network.responseReceived', message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
|
|
2351
|
+
emit(event: 'Network.loadingFailed', message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
|
|
2305
2352
|
emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
|
|
2306
2353
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
|
2307
2354
|
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
|
@@ -2408,6 +2455,7 @@ declare module 'inspector' {
|
|
|
2408
2455
|
* Fired when HTTP response is available.
|
|
2409
2456
|
*/
|
|
2410
2457
|
on(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
2458
|
+
on(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
2411
2459
|
on(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
2412
2460
|
/**
|
|
2413
2461
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -2524,6 +2572,7 @@ declare module 'inspector' {
|
|
|
2524
2572
|
* Fired when HTTP response is available.
|
|
2525
2573
|
*/
|
|
2526
2574
|
once(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
2575
|
+
once(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
2527
2576
|
once(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
2528
2577
|
/**
|
|
2529
2578
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -2640,6 +2689,7 @@ declare module 'inspector' {
|
|
|
2640
2689
|
* Fired when HTTP response is available.
|
|
2641
2690
|
*/
|
|
2642
2691
|
prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
2692
|
+
prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
2643
2693
|
prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
2644
2694
|
/**
|
|
2645
2695
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -2756,6 +2806,7 @@ declare module 'inspector' {
|
|
|
2756
2806
|
* Fired when HTTP response is available.
|
|
2757
2807
|
*/
|
|
2758
2808
|
prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
2809
|
+
prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
2759
2810
|
prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
2760
2811
|
/**
|
|
2761
2812
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -2853,6 +2904,7 @@ declare module 'inspector' {
|
|
|
2853
2904
|
*/
|
|
2854
2905
|
const console: InspectorConsole;
|
|
2855
2906
|
|
|
2907
|
+
// DevTools protocol event broadcast methods
|
|
2856
2908
|
namespace Network {
|
|
2857
2909
|
/**
|
|
2858
2910
|
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
|
@@ -2881,6 +2933,15 @@ declare module 'inspector' {
|
|
|
2881
2933
|
* @experimental
|
|
2882
2934
|
*/
|
|
2883
2935
|
function loadingFinished(params: LoadingFinishedEventDataType): void;
|
|
2936
|
+
/**
|
|
2937
|
+
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
|
2938
|
+
*
|
|
2939
|
+
* Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
|
|
2940
|
+
* HTTP request has failed to load.
|
|
2941
|
+
* @since v22.7.0
|
|
2942
|
+
* @experimental
|
|
2943
|
+
*/
|
|
2944
|
+
function loadingFailed(params: LoadingFailedEventDataType): void;
|
|
2884
2945
|
}
|
|
2885
2946
|
}
|
|
2886
2947
|
|
|
@@ -3357,6 +3418,7 @@ declare module 'inspector/promises' {
|
|
|
3357
3418
|
* Fired when HTTP response is available.
|
|
3358
3419
|
*/
|
|
3359
3420
|
addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
3421
|
+
addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
3360
3422
|
addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
3361
3423
|
/**
|
|
3362
3424
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -3399,6 +3461,7 @@ declare module 'inspector/promises' {
|
|
|
3399
3461
|
emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
|
|
3400
3462
|
emit(event: 'Network.requestWillBeSent', message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
|
|
3401
3463
|
emit(event: 'Network.responseReceived', message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
|
|
3464
|
+
emit(event: 'Network.loadingFailed', message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
|
|
3402
3465
|
emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
|
|
3403
3466
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
|
3404
3467
|
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
|
@@ -3505,6 +3568,7 @@ declare module 'inspector/promises' {
|
|
|
3505
3568
|
* Fired when HTTP response is available.
|
|
3506
3569
|
*/
|
|
3507
3570
|
on(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
3571
|
+
on(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
3508
3572
|
on(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
3509
3573
|
/**
|
|
3510
3574
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -3621,6 +3685,7 @@ declare module 'inspector/promises' {
|
|
|
3621
3685
|
* Fired when HTTP response is available.
|
|
3622
3686
|
*/
|
|
3623
3687
|
once(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
3688
|
+
once(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
3624
3689
|
once(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
3625
3690
|
/**
|
|
3626
3691
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -3737,6 +3802,7 @@ declare module 'inspector/promises' {
|
|
|
3737
3802
|
* Fired when HTTP response is available.
|
|
3738
3803
|
*/
|
|
3739
3804
|
prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
3805
|
+
prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
3740
3806
|
prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
3741
3807
|
/**
|
|
3742
3808
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -3853,6 +3919,7 @@ declare module 'inspector/promises' {
|
|
|
3853
3919
|
* Fired when HTTP response is available.
|
|
3854
3920
|
*/
|
|
3855
3921
|
prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
|
3922
|
+
prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
|
3856
3923
|
prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
|
3857
3924
|
/**
|
|
3858
3925
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
|
@@ -12,9 +12,9 @@ declare module "module" {
|
|
|
12
12
|
* does not add or remove exported names from the `ES Modules`.
|
|
13
13
|
*
|
|
14
14
|
* ```js
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* import fs from 'node:fs';
|
|
16
|
+
* import assert from 'node:assert';
|
|
17
|
+
* import { syncBuiltinESMExports } from 'node:module';
|
|
18
18
|
*
|
|
19
19
|
* fs.readFile = newAPI;
|
|
20
20
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* It can be accessed using:
|
|
9
9
|
*
|
|
10
10
|
* ```js
|
|
11
|
-
*
|
|
11
|
+
* import net from 'node:net';
|
|
12
12
|
* ```
|
|
13
13
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js)
|
|
14
14
|
*/
|
|
@@ -29,6 +29,7 @@ declare module "net" {
|
|
|
29
29
|
interface SocketConstructorOpts {
|
|
30
30
|
fd?: number | undefined;
|
|
31
31
|
allowHalfOpen?: boolean | undefined;
|
|
32
|
+
onread?: OnReadOpts | undefined;
|
|
32
33
|
readable?: boolean | undefined;
|
|
33
34
|
writable?: boolean | undefined;
|
|
34
35
|
signal?: AbortSignal;
|
|
@@ -37,20 +38,15 @@ declare module "net" {
|
|
|
37
38
|
buffer: Uint8Array | (() => Uint8Array);
|
|
38
39
|
/**
|
|
39
40
|
* This function is called for every chunk of incoming data.
|
|
40
|
-
* Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer
|
|
41
|
-
* Return false from this function to implicitly pause() the socket.
|
|
41
|
+
* Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`.
|
|
42
|
+
* Return `false` from this function to implicitly `pause()` the socket.
|
|
42
43
|
*/
|
|
43
|
-
callback(bytesWritten: number,
|
|
44
|
-
}
|
|
45
|
-
interface ConnectOpts {
|
|
46
|
-
/**
|
|
47
|
-
* If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
|
|
48
|
-
* Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
|
|
49
|
-
* still be emitted as normal and methods like pause() and resume() will also behave as expected.
|
|
50
|
-
*/
|
|
51
|
-
onread?: OnReadOpts | undefined;
|
|
44
|
+
callback(bytesWritten: number, buffer: Uint8Array): boolean;
|
|
52
45
|
}
|
|
53
|
-
|
|
46
|
+
// TODO: remove empty ConnectOpts placeholder at next major @types/node version.
|
|
47
|
+
/** @deprecated */
|
|
48
|
+
interface ConnectOpts {}
|
|
49
|
+
interface TcpSocketConnectOpts {
|
|
54
50
|
port: number;
|
|
55
51
|
host?: string | undefined;
|
|
56
52
|
localAddress?: string | undefined;
|
|
@@ -70,7 +66,7 @@ declare module "net" {
|
|
|
70
66
|
*/
|
|
71
67
|
autoSelectFamilyAttemptTimeout?: number | undefined;
|
|
72
68
|
}
|
|
73
|
-
interface IpcSocketConnectOpts
|
|
69
|
+
interface IpcSocketConnectOpts {
|
|
74
70
|
path: string;
|
|
75
71
|
}
|
|
76
72
|
type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
|
|
@@ -812,7 +808,7 @@ declare module "net" {
|
|
|
812
808
|
* on port 8124:
|
|
813
809
|
*
|
|
814
810
|
* ```js
|
|
815
|
-
*
|
|
811
|
+
* import net from 'node:net';
|
|
816
812
|
* const server = net.createServer((c) => {
|
|
817
813
|
* // 'connection' listener.
|
|
818
814
|
* console.log('client connected');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.7.3",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -212,6 +212,6 @@
|
|
|
212
212
|
"dependencies": {
|
|
213
213
|
"undici-types": "~6.19.2"
|
|
214
214
|
},
|
|
215
|
-
"typesPublisherContentHash": "
|
|
215
|
+
"typesPublisherContentHash": "2bb1484e75c6732b1b3034801a330f7c899d253519ba67b22db3b0bf1c5b9b2c",
|
|
216
216
|
"typeScriptVersion": "4.8"
|
|
217
217
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
*
|
|
13
|
+
* import { PerformanceObserver, performance } from 'node:perf_hooks';
|
|
14
14
|
*
|
|
15
15
|
* const obs = new PerformanceObserver((items) => {
|
|
16
16
|
* console.log(items.getEntries()[0].duration);
|
|
@@ -355,10 +355,10 @@ declare module "perf_hooks" {
|
|
|
355
355
|
* A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
|
|
356
356
|
*
|
|
357
357
|
* ```js
|
|
358
|
-
*
|
|
358
|
+
* import {
|
|
359
359
|
* performance,
|
|
360
360
|
* PerformanceObserver,
|
|
361
|
-
* }
|
|
361
|
+
* } from 'node:perf_hooks';
|
|
362
362
|
*
|
|
363
363
|
* function someFunction() {
|
|
364
364
|
* console.log('hello world');
|
|
@@ -397,10 +397,10 @@ declare module "perf_hooks" {
|
|
|
397
397
|
* with respect to `performanceEntry.startTime`.
|
|
398
398
|
*
|
|
399
399
|
* ```js
|
|
400
|
-
*
|
|
400
|
+
* import {
|
|
401
401
|
* performance,
|
|
402
402
|
* PerformanceObserver,
|
|
403
|
-
* }
|
|
403
|
+
* } from 'node:perf_hooks';
|
|
404
404
|
*
|
|
405
405
|
* const obs = new PerformanceObserver((perfObserverList, observer) => {
|
|
406
406
|
* console.log(perfObserverList.getEntries());
|
|
@@ -440,10 +440,10 @@ declare module "perf_hooks" {
|
|
|
440
440
|
* equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
|
|
441
441
|
*
|
|
442
442
|
* ```js
|
|
443
|
-
*
|
|
443
|
+
* import {
|
|
444
444
|
* performance,
|
|
445
445
|
* PerformanceObserver,
|
|
446
|
-
* }
|
|
446
|
+
* } from 'node:perf_hooks';
|
|
447
447
|
*
|
|
448
448
|
* const obs = new PerformanceObserver((perfObserverList, observer) => {
|
|
449
449
|
* console.log(perfObserverList.getEntriesByName('meow'));
|
|
@@ -491,10 +491,10 @@ declare module "perf_hooks" {
|
|
|
491
491
|
* with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`.
|
|
492
492
|
*
|
|
493
493
|
* ```js
|
|
494
|
-
*
|
|
494
|
+
* import {
|
|
495
495
|
* performance,
|
|
496
496
|
* PerformanceObserver,
|
|
497
|
-
* }
|
|
497
|
+
* } from 'node:perf_hooks';
|
|
498
498
|
*
|
|
499
499
|
* const obs = new PerformanceObserver((perfObserverList, observer) => {
|
|
500
500
|
* console.log(perfObserverList.getEntriesByType('mark'));
|
|
@@ -544,10 +544,10 @@ declare module "perf_hooks" {
|
|
|
544
544
|
* Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`:
|
|
545
545
|
*
|
|
546
546
|
* ```js
|
|
547
|
-
*
|
|
547
|
+
* import {
|
|
548
548
|
* performance,
|
|
549
549
|
* PerformanceObserver,
|
|
550
|
-
* }
|
|
550
|
+
* } from 'node:perf_hooks';
|
|
551
551
|
*
|
|
552
552
|
* const obs = new PerformanceObserver((list, observer) => {
|
|
553
553
|
* // Called once asynchronously. `list` contains three items.
|
|
@@ -816,7 +816,7 @@ declare module "perf_hooks" {
|
|
|
816
816
|
* detect.
|
|
817
817
|
*
|
|
818
818
|
* ```js
|
|
819
|
-
*
|
|
819
|
+
* import { monitorEventLoopDelay } from 'node:perf_hooks';
|
|
820
820
|
* const h = monitorEventLoopDelay({ resolution: 20 });
|
|
821
821
|
* h.enable();
|
|
822
822
|
* // Do something.
|
|
@@ -865,7 +865,7 @@ declare module "perf_hooks" {
|
|
|
865
865
|
} from "perf_hooks";
|
|
866
866
|
global {
|
|
867
867
|
/**
|
|
868
|
-
* `PerformanceEntry` is a global reference for `
|
|
868
|
+
* `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'`
|
|
869
869
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceentry
|
|
870
870
|
* @since v19.0.0
|
|
871
871
|
*/
|
|
@@ -875,7 +875,7 @@ declare module "perf_hooks" {
|
|
|
875
875
|
} ? T
|
|
876
876
|
: typeof _PerformanceEntry;
|
|
877
877
|
/**
|
|
878
|
-
* `PerformanceMark` is a global reference for `
|
|
878
|
+
* `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'`
|
|
879
879
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemark
|
|
880
880
|
* @since v19.0.0
|
|
881
881
|
*/
|
|
@@ -885,7 +885,7 @@ declare module "perf_hooks" {
|
|
|
885
885
|
} ? T
|
|
886
886
|
: typeof _PerformanceMark;
|
|
887
887
|
/**
|
|
888
|
-
* `PerformanceMeasure` is a global reference for `
|
|
888
|
+
* `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'`
|
|
889
889
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemeasure
|
|
890
890
|
* @since v19.0.0
|
|
891
891
|
*/
|
|
@@ -895,7 +895,7 @@ declare module "perf_hooks" {
|
|
|
895
895
|
} ? T
|
|
896
896
|
: typeof _PerformanceMeasure;
|
|
897
897
|
/**
|
|
898
|
-
* `PerformanceObserver` is a global reference for `
|
|
898
|
+
* `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'`
|
|
899
899
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserver
|
|
900
900
|
* @since v19.0.0
|
|
901
901
|
*/
|
|
@@ -905,7 +905,7 @@ declare module "perf_hooks" {
|
|
|
905
905
|
} ? T
|
|
906
906
|
: typeof _PerformanceObserver;
|
|
907
907
|
/**
|
|
908
|
-
* `PerformanceObserverEntryList` is a global reference for `
|
|
908
|
+
* `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'`
|
|
909
909
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserverentrylist
|
|
910
910
|
* @since v19.0.0
|
|
911
911
|
*/
|
|
@@ -915,7 +915,7 @@ declare module "perf_hooks" {
|
|
|
915
915
|
} ? T
|
|
916
916
|
: typeof _PerformanceObserverEntryList;
|
|
917
917
|
/**
|
|
918
|
-
* `PerformanceResourceTiming` is a global reference for `
|
|
918
|
+
* `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'`
|
|
919
919
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceresourcetiming
|
|
920
920
|
* @since v19.0.0
|
|
921
921
|
*/
|
|
@@ -925,7 +925,7 @@ declare module "perf_hooks" {
|
|
|
925
925
|
} ? T
|
|
926
926
|
: typeof _PerformanceResourceTiming;
|
|
927
927
|
/**
|
|
928
|
-
* `performance` is a global reference for `
|
|
928
|
+
* `performance` is a global reference for `import { performance } from 'node:perf_hooks'`
|
|
929
929
|
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performance
|
|
930
930
|
* @since v16.0.0
|
|
931
931
|
*/
|
|
@@ -115,7 +115,7 @@ declare module "readline/promises" {
|
|
|
115
115
|
* The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
|
|
116
116
|
*
|
|
117
117
|
* ```js
|
|
118
|
-
*
|
|
118
|
+
* import readlinePromises from 'node:readline/promises';
|
|
119
119
|
* const rl = readlinePromises.createInterface({
|
|
120
120
|
* input: process.stdin,
|
|
121
121
|
* output: process.stdout,
|
|
@@ -342,7 +342,7 @@ declare module "readline" {
|
|
|
342
342
|
* The `readline.createInterface()` method creates a new `readline.Interface` instance.
|
|
343
343
|
*
|
|
344
344
|
* ```js
|
|
345
|
-
*
|
|
345
|
+
* import readline from 'node:readline';
|
|
346
346
|
* const rl = readline.createInterface({
|
|
347
347
|
* input: process.stdin,
|
|
348
348
|
* output: process.stdout,
|
|
@@ -398,7 +398,7 @@ declare module "readline" {
|
|
|
398
398
|
* implement a small command-line interface:
|
|
399
399
|
*
|
|
400
400
|
* ```js
|
|
401
|
-
*
|
|
401
|
+
* import readline from 'node:readline';
|
|
402
402
|
* const rl = readline.createInterface({
|
|
403
403
|
* input: process.stdin,
|
|
404
404
|
* output: process.stdout,
|
|
@@ -430,8 +430,8 @@ declare module "readline" {
|
|
|
430
430
|
* well as a `for await...of` loop:
|
|
431
431
|
*
|
|
432
432
|
* ```js
|
|
433
|
-
*
|
|
434
|
-
*
|
|
433
|
+
* import fs from 'node:fs';
|
|
434
|
+
* import readline from 'node:readline';
|
|
435
435
|
*
|
|
436
436
|
* async function processLineByLine() {
|
|
437
437
|
* const fileStream = fs.createReadStream('input.txt');
|
|
@@ -455,8 +455,8 @@ declare module "readline" {
|
|
|
455
455
|
* Alternatively, one could use the `'line'` event:
|
|
456
456
|
*
|
|
457
457
|
* ```js
|
|
458
|
-
*
|
|
459
|
-
*
|
|
458
|
+
* import fs from 'node:fs';
|
|
459
|
+
* import readline from 'node:readline';
|
|
460
460
|
*
|
|
461
461
|
* const rl = readline.createInterface({
|
|
462
462
|
* input: fs.createReadStream('sample.txt'),
|
|
@@ -471,9 +471,9 @@ declare module "readline" {
|
|
|
471
471
|
* Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied:
|
|
472
472
|
*
|
|
473
473
|
* ```js
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
474
|
+
* import { once } from 'node:events';
|
|
475
|
+
* import { createReadStream } from 'node:fs';
|
|
476
|
+
* import { createInterface } from 'node:readline';
|
|
477
477
|
*
|
|
478
478
|
* (async function processLineByLine() {
|
|
479
479
|
* try {
|