omegon 0.8.4 → 0.9.0
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/extensions/cleave/dispatcher.ts +213 -20
- package/extensions/cleave/rpc-child.ts +269 -0
- package/extensions/cleave/types.ts +52 -0
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +11 -5
- package/node_modules/@types/node/assert.d.ts +173 -50
- package/node_modules/@types/node/async_hooks.d.ts +8 -28
- package/node_modules/@types/node/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/buffer.d.ts +168 -44
- package/node_modules/@types/node/child_process.d.ts +70 -27
- package/node_modules/@types/node/cluster.d.ts +332 -240
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
- package/node_modules/@types/node/console.d.ts +350 -49
- package/node_modules/@types/node/constants.d.ts +4 -3
- package/node_modules/@types/node/crypto.d.ts +1110 -630
- package/node_modules/@types/node/dgram.d.ts +51 -15
- package/node_modules/@types/node/diagnostics_channel.d.ts +6 -4
- package/node_modules/@types/node/dns/promises.d.ts +4 -4
- package/node_modules/@types/node/dns.d.ts +133 -132
- package/node_modules/@types/node/domain.d.ts +17 -13
- package/node_modules/@types/node/events.d.ts +663 -734
- package/node_modules/@types/node/fs/promises.d.ts +9 -43
- package/node_modules/@types/node/fs.d.ts +411 -628
- package/node_modules/@types/node/globals.d.ts +30 -8
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +265 -364
- package/node_modules/@types/node/http2.d.ts +715 -551
- package/node_modules/@types/node/https.d.ts +239 -65
- package/node_modules/@types/node/index.d.ts +6 -24
- package/node_modules/@types/node/inspector.d.ts +53 -69
- package/node_modules/@types/node/inspector.generated.d.ts +410 -759
- package/node_modules/@types/node/module.d.ts +186 -52
- package/node_modules/@types/node/net.d.ts +194 -70
- package/node_modules/@types/node/os.d.ts +11 -12
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +133 -120
- package/node_modules/@types/node/perf_hooks.d.ts +643 -318
- package/node_modules/@types/node/process.d.ts +132 -223
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/node/readline.d.ts +120 -68
- package/node_modules/@types/node/repl.d.ts +100 -87
- package/node_modules/@types/node/sea.d.ts +1 -10
- package/node_modules/@types/node/sqlite.d.ts +19 -363
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +502 -176
- package/node_modules/@types/node/stream.d.ts +475 -581
- package/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/node/test.d.ts +196 -308
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +132 -4
- package/node_modules/@types/node/tls.d.ts +226 -110
- package/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +16 -58
- package/node_modules/@types/node/url.d.ts +573 -130
- package/node_modules/@types/node/util.d.ts +1100 -181
- package/node_modules/@types/node/v8.d.ts +8 -76
- package/node_modules/@types/node/vm.d.ts +72 -280
- package/node_modules/@types/node/wasi.d.ts +4 -25
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/worker_threads.d.ts +335 -268
- package/node_modules/@types/node/zlib.d.ts +74 -9
- package/node_modules/undici-types/agent.d.ts +12 -13
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +19 -19
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +103 -123
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -66
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +20 -22
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +1 -157
- package/node_modules/undici-types/index.d.ts +47 -64
- package/node_modules/undici-types/interceptors.d.ts +8 -64
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +13 -15
- package/node_modules/undici-types/proxy-agent.d.ts +4 -5
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +29 -142
- package/node_modules/undici-types/websocket.d.ts +10 -46
- package/package.json +2 -1
- package/skills/cleave/SKILL.md +62 -2
- package/node_modules/@types/node/inspector/promises.d.ts +0 -41
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -910
- package/node_modules/@types/node/test/reporters.d.ts +0 -96
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -117
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -173
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -41
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -109
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* import net from 'node:net';
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js)
|
|
14
14
|
*/
|
|
15
|
-
declare module "
|
|
15
|
+
declare module "net" {
|
|
16
16
|
import { NonSharedBuffer } from "node:buffer";
|
|
17
|
-
import * as dns from "node:dns";
|
|
18
|
-
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
|
19
17
|
import * as stream from "node:stream";
|
|
18
|
+
import { Abortable, EventEmitter } from "node:events";
|
|
19
|
+
import * as dns from "node:dns";
|
|
20
20
|
type LookupFunction = (
|
|
21
21
|
hostname: string,
|
|
22
22
|
options: dns.LookupOptions,
|
|
@@ -34,10 +34,6 @@ declare module "node:net" {
|
|
|
34
34
|
readable?: boolean | undefined;
|
|
35
35
|
writable?: boolean | undefined;
|
|
36
36
|
signal?: AbortSignal | undefined;
|
|
37
|
-
noDelay?: boolean | undefined;
|
|
38
|
-
keepAlive?: boolean | undefined;
|
|
39
|
-
keepAliveInitialDelay?: number | undefined;
|
|
40
|
-
blockList?: BlockList | undefined;
|
|
41
37
|
}
|
|
42
38
|
interface OnReadOpts {
|
|
43
39
|
buffer: Uint8Array | (() => Uint8Array);
|
|
@@ -48,6 +44,9 @@ declare module "node:net" {
|
|
|
48
44
|
*/
|
|
49
45
|
callback(bytesWritten: number, buffer: Uint8Array): boolean;
|
|
50
46
|
}
|
|
47
|
+
// TODO: remove empty ConnectOpts placeholder at next major @types/node version.
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
interface ConnectOpts {}
|
|
51
50
|
interface TcpSocketConnectOpts {
|
|
52
51
|
port: number;
|
|
53
52
|
host?: string | undefined;
|
|
@@ -56,6 +55,9 @@ declare module "node:net" {
|
|
|
56
55
|
hints?: number | undefined;
|
|
57
56
|
family?: number | undefined;
|
|
58
57
|
lookup?: LookupFunction | undefined;
|
|
58
|
+
noDelay?: boolean | undefined;
|
|
59
|
+
keepAlive?: boolean | undefined;
|
|
60
|
+
keepAliveInitialDelay?: number | undefined;
|
|
59
61
|
/**
|
|
60
62
|
* @since v18.13.0
|
|
61
63
|
*/
|
|
@@ -64,23 +66,13 @@ declare module "node:net" {
|
|
|
64
66
|
* @since v18.13.0
|
|
65
67
|
*/
|
|
66
68
|
autoSelectFamilyAttemptTimeout?: number | undefined;
|
|
69
|
+
blockList?: BlockList | undefined;
|
|
67
70
|
}
|
|
68
71
|
interface IpcSocketConnectOpts {
|
|
69
72
|
path: string;
|
|
70
73
|
}
|
|
71
74
|
type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
|
|
72
75
|
type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
|
|
73
|
-
interface SocketEventMap extends Omit<stream.DuplexEventMap, "close"> {
|
|
74
|
-
"close": [hadError: boolean];
|
|
75
|
-
"connect": [];
|
|
76
|
-
"connectionAttempt": [ip: string, port: number, family: number];
|
|
77
|
-
"connectionAttemptFailed": [ip: string, port: number, family: number, error: Error];
|
|
78
|
-
"connectionAttemptTimeout": [ip: string, port: number, family: number];
|
|
79
|
-
"data": [data: string | NonSharedBuffer];
|
|
80
|
-
"lookup": [err: Error | null, address: string, family: number | null, host: string];
|
|
81
|
-
"ready": [];
|
|
82
|
-
"timeout": [];
|
|
83
|
-
}
|
|
84
76
|
/**
|
|
85
77
|
* This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
|
|
86
78
|
* (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
|
|
@@ -365,45 +357,141 @@ declare module "node:net" {
|
|
|
365
357
|
end(callback?: () => void): this;
|
|
366
358
|
end(buffer: Uint8Array | string, callback?: () => void): this;
|
|
367
359
|
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
360
|
+
/**
|
|
361
|
+
* events.EventEmitter
|
|
362
|
+
* 1. close
|
|
363
|
+
* 2. connect
|
|
364
|
+
* 3. connectionAttempt
|
|
365
|
+
* 4. connectionAttemptFailed
|
|
366
|
+
* 5. connectionAttemptTimeout
|
|
367
|
+
* 6. data
|
|
368
|
+
* 7. drain
|
|
369
|
+
* 8. end
|
|
370
|
+
* 9. error
|
|
371
|
+
* 10. lookup
|
|
372
|
+
* 11. ready
|
|
373
|
+
* 12. timeout
|
|
374
|
+
*/
|
|
375
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
376
|
+
addListener(event: "close", listener: (hadError: boolean) => void): this;
|
|
377
|
+
addListener(event: "connect", listener: () => void): this;
|
|
378
|
+
addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
|
379
|
+
addListener(
|
|
380
|
+
event: "connectionAttemptFailed",
|
|
381
|
+
listener: (ip: string, port: number, family: number, error: Error) => void,
|
|
382
|
+
): this;
|
|
383
|
+
addListener(
|
|
384
|
+
event: "connectionAttemptTimeout",
|
|
385
|
+
listener: (ip: string, port: number, family: number) => void,
|
|
389
386
|
): this;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
387
|
+
addListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
|
388
|
+
addListener(event: "drain", listener: () => void): this;
|
|
389
|
+
addListener(event: "end", listener: () => void): this;
|
|
390
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
391
|
+
addListener(
|
|
392
|
+
event: "lookup",
|
|
393
|
+
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
|
394
394
|
): this;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
395
|
+
addListener(event: "ready", listener: () => void): this;
|
|
396
|
+
addListener(event: "timeout", listener: () => void): this;
|
|
397
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
398
|
+
emit(event: "close", hadError: boolean): boolean;
|
|
399
|
+
emit(event: "connect"): boolean;
|
|
400
|
+
emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean;
|
|
401
|
+
emit(event: "connectionAttemptFailed", ip: string, port: number, family: number, error: Error): boolean;
|
|
402
|
+
emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean;
|
|
403
|
+
emit(event: "data", data: NonSharedBuffer): boolean;
|
|
404
|
+
emit(event: "drain"): boolean;
|
|
405
|
+
emit(event: "end"): boolean;
|
|
406
|
+
emit(event: "error", err: Error): boolean;
|
|
407
|
+
emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
|
|
408
|
+
emit(event: "ready"): boolean;
|
|
409
|
+
emit(event: "timeout"): boolean;
|
|
410
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
411
|
+
on(event: "close", listener: (hadError: boolean) => void): this;
|
|
412
|
+
on(event: "connect", listener: () => void): this;
|
|
413
|
+
on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
|
414
|
+
on(
|
|
415
|
+
event: "connectionAttemptFailed",
|
|
416
|
+
listener: (ip: string, port: number, family: number, error: Error) => void,
|
|
404
417
|
): this;
|
|
405
|
-
|
|
406
|
-
|
|
418
|
+
on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
|
|
419
|
+
on(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
|
420
|
+
on(event: "drain", listener: () => void): this;
|
|
421
|
+
on(event: "end", listener: () => void): this;
|
|
422
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
423
|
+
on(
|
|
424
|
+
event: "lookup",
|
|
425
|
+
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
|
426
|
+
): this;
|
|
427
|
+
on(event: "ready", listener: () => void): this;
|
|
428
|
+
on(event: "timeout", listener: () => void): this;
|
|
429
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
430
|
+
once(event: "close", listener: (hadError: boolean) => void): this;
|
|
431
|
+
once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
|
432
|
+
once(
|
|
433
|
+
event: "connectionAttemptFailed",
|
|
434
|
+
listener: (ip: string, port: number, family: number, error: Error) => void,
|
|
435
|
+
): this;
|
|
436
|
+
once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
|
|
437
|
+
once(event: "connect", listener: () => void): this;
|
|
438
|
+
once(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
|
439
|
+
once(event: "drain", listener: () => void): this;
|
|
440
|
+
once(event: "end", listener: () => void): this;
|
|
441
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
442
|
+
once(
|
|
443
|
+
event: "lookup",
|
|
444
|
+
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
|
445
|
+
): this;
|
|
446
|
+
once(event: "ready", listener: () => void): this;
|
|
447
|
+
once(event: "timeout", listener: () => void): this;
|
|
448
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
449
|
+
prependListener(event: "close", listener: (hadError: boolean) => void): this;
|
|
450
|
+
prependListener(event: "connect", listener: () => void): this;
|
|
451
|
+
prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
|
|
452
|
+
prependListener(
|
|
453
|
+
event: "connectionAttemptFailed",
|
|
454
|
+
listener: (ip: string, port: number, family: number, error: Error) => void,
|
|
455
|
+
): this;
|
|
456
|
+
prependListener(
|
|
457
|
+
event: "connectionAttemptTimeout",
|
|
458
|
+
listener: (ip: string, port: number, family: number) => void,
|
|
459
|
+
): this;
|
|
460
|
+
prependListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
|
461
|
+
prependListener(event: "drain", listener: () => void): this;
|
|
462
|
+
prependListener(event: "end", listener: () => void): this;
|
|
463
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
464
|
+
prependListener(
|
|
465
|
+
event: "lookup",
|
|
466
|
+
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
|
467
|
+
): this;
|
|
468
|
+
prependListener(event: "ready", listener: () => void): this;
|
|
469
|
+
prependListener(event: "timeout", listener: () => void): this;
|
|
470
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
471
|
+
prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
|
|
472
|
+
prependOnceListener(event: "connect", listener: () => void): this;
|
|
473
|
+
prependOnceListener(
|
|
474
|
+
event: "connectionAttempt",
|
|
475
|
+
listener: (ip: string, port: number, family: number) => void,
|
|
476
|
+
): this;
|
|
477
|
+
prependOnceListener(
|
|
478
|
+
event: "connectionAttemptFailed",
|
|
479
|
+
listener: (ip: string, port: number, family: number, error: Error) => void,
|
|
480
|
+
): this;
|
|
481
|
+
prependOnceListener(
|
|
482
|
+
event: "connectionAttemptTimeout",
|
|
483
|
+
listener: (ip: string, port: number, family: number) => void,
|
|
484
|
+
): this;
|
|
485
|
+
prependOnceListener(event: "data", listener: (data: NonSharedBuffer) => void): this;
|
|
486
|
+
prependOnceListener(event: "drain", listener: () => void): this;
|
|
487
|
+
prependOnceListener(event: "end", listener: () => void): this;
|
|
488
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
489
|
+
prependOnceListener(
|
|
490
|
+
event: "lookup",
|
|
491
|
+
listener: (err: Error, address: string, family: string | number, host: string) => void,
|
|
492
|
+
): this;
|
|
493
|
+
prependOnceListener(event: "ready", listener: () => void): this;
|
|
494
|
+
prependOnceListener(event: "timeout", listener: () => void): this;
|
|
407
495
|
}
|
|
408
496
|
interface ListenOptions extends Abortable {
|
|
409
497
|
backlog?: number | undefined;
|
|
@@ -451,7 +539,7 @@ declare module "node:net" {
|
|
|
451
539
|
keepAliveInitialDelay?: number | undefined;
|
|
452
540
|
/**
|
|
453
541
|
* Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
|
|
454
|
-
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-
|
|
542
|
+
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
|
|
455
543
|
* @since v18.17.0, v20.1.0
|
|
456
544
|
*/
|
|
457
545
|
highWaterMark?: number | undefined;
|
|
@@ -473,18 +561,11 @@ declare module "node:net" {
|
|
|
473
561
|
remotePort?: number;
|
|
474
562
|
remoteFamily?: string;
|
|
475
563
|
}
|
|
476
|
-
interface ServerEventMap {
|
|
477
|
-
"close": [];
|
|
478
|
-
"connection": [socket: Socket];
|
|
479
|
-
"error": [err: Error];
|
|
480
|
-
"listening": [];
|
|
481
|
-
"drop": [data?: DropArgument];
|
|
482
|
-
}
|
|
483
564
|
/**
|
|
484
565
|
* This class is used to create a TCP or `IPC` server.
|
|
485
566
|
* @since v0.1.90
|
|
486
567
|
*/
|
|
487
|
-
class Server
|
|
568
|
+
class Server extends EventEmitter {
|
|
488
569
|
constructor(connectionListener?: (socket: Socket) => void);
|
|
489
570
|
constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
|
|
490
571
|
/**
|
|
@@ -610,13 +691,56 @@ declare module "node:net" {
|
|
|
610
691
|
* @since v5.7.0
|
|
611
692
|
*/
|
|
612
693
|
readonly listening: boolean;
|
|
694
|
+
/**
|
|
695
|
+
* events.EventEmitter
|
|
696
|
+
* 1. close
|
|
697
|
+
* 2. connection
|
|
698
|
+
* 3. error
|
|
699
|
+
* 4. listening
|
|
700
|
+
* 5. drop
|
|
701
|
+
*/
|
|
702
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
703
|
+
addListener(event: "close", listener: () => void): this;
|
|
704
|
+
addListener(event: "connection", listener: (socket: Socket) => void): this;
|
|
705
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
706
|
+
addListener(event: "listening", listener: () => void): this;
|
|
707
|
+
addListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
|
708
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
709
|
+
emit(event: "close"): boolean;
|
|
710
|
+
emit(event: "connection", socket: Socket): boolean;
|
|
711
|
+
emit(event: "error", err: Error): boolean;
|
|
712
|
+
emit(event: "listening"): boolean;
|
|
713
|
+
emit(event: "drop", data?: DropArgument): boolean;
|
|
714
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
715
|
+
on(event: "close", listener: () => void): this;
|
|
716
|
+
on(event: "connection", listener: (socket: Socket) => void): this;
|
|
717
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
718
|
+
on(event: "listening", listener: () => void): this;
|
|
719
|
+
on(event: "drop", listener: (data?: DropArgument) => void): this;
|
|
720
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
721
|
+
once(event: "close", listener: () => void): this;
|
|
722
|
+
once(event: "connection", listener: (socket: Socket) => void): this;
|
|
723
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
724
|
+
once(event: "listening", listener: () => void): this;
|
|
725
|
+
once(event: "drop", listener: (data?: DropArgument) => void): this;
|
|
726
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
727
|
+
prependListener(event: "close", listener: () => void): this;
|
|
728
|
+
prependListener(event: "connection", listener: (socket: Socket) => void): this;
|
|
729
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
730
|
+
prependListener(event: "listening", listener: () => void): this;
|
|
731
|
+
prependListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
|
732
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
733
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
734
|
+
prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
|
|
735
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
736
|
+
prependOnceListener(event: "listening", listener: () => void): this;
|
|
737
|
+
prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this;
|
|
613
738
|
/**
|
|
614
739
|
* Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
|
|
615
740
|
* @since v20.5.0
|
|
616
741
|
*/
|
|
617
742
|
[Symbol.asyncDispose](): Promise<void>;
|
|
618
743
|
}
|
|
619
|
-
interface Server extends InternalEventEmitter<ServerEventMap> {}
|
|
620
744
|
type IPVersion = "ipv4" | "ipv6";
|
|
621
745
|
/**
|
|
622
746
|
* The `BlockList` object can be used with some network APIs to specify rules for
|
|
@@ -697,12 +821,12 @@ declare module "node:net" {
|
|
|
697
821
|
* blockList.fromJSON(data);
|
|
698
822
|
* blockList.fromJSON(JSON.stringify(data));
|
|
699
823
|
* ```
|
|
700
|
-
* @since
|
|
824
|
+
* @since v22.19.0
|
|
701
825
|
* @experimental
|
|
702
826
|
*/
|
|
703
827
|
fromJSON(data: string | readonly string[]): void;
|
|
704
828
|
/**
|
|
705
|
-
* @since
|
|
829
|
+
* @since v22.19.0
|
|
706
830
|
* @experimental
|
|
707
831
|
*/
|
|
708
832
|
toJSON(): readonly string[];
|
|
@@ -825,7 +949,7 @@ declare module "node:net" {
|
|
|
825
949
|
function setDefaultAutoSelectFamily(value: boolean): void;
|
|
826
950
|
/**
|
|
827
951
|
* Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
|
|
828
|
-
* The initial default value is `
|
|
952
|
+
* The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
|
|
829
953
|
* @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
|
|
830
954
|
* @since v19.8.0, v18.8.0
|
|
831
955
|
*/
|
|
@@ -928,6 +1052,6 @@ declare module "node:net" {
|
|
|
928
1052
|
static parse(input: string): SocketAddress | undefined;
|
|
929
1053
|
}
|
|
930
1054
|
}
|
|
931
|
-
declare module "net" {
|
|
932
|
-
export * from "
|
|
1055
|
+
declare module "node:net" {
|
|
1056
|
+
export * from "net";
|
|
933
1057
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* import os from 'node:os';
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/os.js)
|
|
9
9
|
*/
|
|
10
|
-
declare module "
|
|
10
|
+
declare module "os" {
|
|
11
11
|
import { NonSharedBuffer } from "buffer";
|
|
12
12
|
interface CpuInfo {
|
|
13
13
|
model: string;
|
|
@@ -251,12 +251,12 @@ declare module "node:os" {
|
|
|
251
251
|
* environment variables for the home directory before falling back to the
|
|
252
252
|
* operating system response.
|
|
253
253
|
*
|
|
254
|
-
* Throws a [`SystemError`](https://nodejs.org/docs/latest-
|
|
254
|
+
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
|
|
255
255
|
* @since v6.0.0
|
|
256
256
|
*/
|
|
257
257
|
function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
|
|
258
258
|
function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
|
|
259
|
-
function userInfo(options: UserInfoOptions): UserInfo<string |
|
|
259
|
+
function userInfo(options: UserInfoOptions): UserInfo<string | Buffer>;
|
|
260
260
|
type SignalConstants = {
|
|
261
261
|
[key in NodeJS.Signals]: number;
|
|
262
262
|
};
|
|
@@ -428,13 +428,13 @@ declare module "node:os" {
|
|
|
428
428
|
const EOL: string;
|
|
429
429
|
/**
|
|
430
430
|
* Returns the operating system CPU architecture for which the Node.js binary was
|
|
431
|
-
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
|
|
432
|
-
*
|
|
431
|
+
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
|
|
432
|
+
* and `'x64'`.
|
|
433
433
|
*
|
|
434
|
-
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-
|
|
434
|
+
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch).
|
|
435
435
|
* @since v0.5.0
|
|
436
436
|
*/
|
|
437
|
-
function arch():
|
|
437
|
+
function arch(): string;
|
|
438
438
|
/**
|
|
439
439
|
* Returns a string identifying the kernel version.
|
|
440
440
|
*
|
|
@@ -456,8 +456,7 @@ declare module "node:os" {
|
|
|
456
456
|
*/
|
|
457
457
|
function platform(): NodeJS.Platform;
|
|
458
458
|
/**
|
|
459
|
-
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
|
|
460
|
-
* `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
|
|
459
|
+
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
|
|
461
460
|
*
|
|
462
461
|
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
|
|
463
462
|
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
|
|
@@ -502,6 +501,6 @@ declare module "node:os" {
|
|
|
502
501
|
function setPriority(priority: number): void;
|
|
503
502
|
function setPriority(pid: number, priority: number): void;
|
|
504
503
|
}
|
|
505
|
-
declare module "os" {
|
|
506
|
-
export * from "
|
|
504
|
+
declare module "node:os" {
|
|
505
|
+
export * from "os";
|
|
507
506
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.19.15",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -119,11 +119,6 @@
|
|
|
119
119
|
"name": "René",
|
|
120
120
|
"githubUsername": "Renegade334",
|
|
121
121
|
"url": "https://github.com/Renegade334"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "Yagiz Nizipli",
|
|
125
|
-
"githubUsername": "anonrig",
|
|
126
|
-
"url": "https://github.com/anonrig"
|
|
127
122
|
}
|
|
128
123
|
],
|
|
129
124
|
"main": "",
|
|
@@ -133,11 +128,6 @@
|
|
|
133
128
|
"*": [
|
|
134
129
|
"ts5.6/*"
|
|
135
130
|
]
|
|
136
|
-
},
|
|
137
|
-
"<=5.7": {
|
|
138
|
-
"*": [
|
|
139
|
-
"ts5.7/*"
|
|
140
|
-
]
|
|
141
131
|
}
|
|
142
132
|
},
|
|
143
133
|
"repository": {
|
|
@@ -147,9 +137,9 @@
|
|
|
147
137
|
},
|
|
148
138
|
"scripts": {},
|
|
149
139
|
"dependencies": {
|
|
150
|
-
"undici-types": "~
|
|
140
|
+
"undici-types": "~6.21.0"
|
|
151
141
|
},
|
|
152
142
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
143
|
+
"typesPublisherContentHash": "e4f9ffdeab50c69a72c98fc00b007f9def62394c519695bf5f543d4d49d0a1c3",
|
|
154
144
|
"typeScriptVersion": "5.2"
|
|
155
145
|
}
|