cdk-common 2.0.221 → 2.0.224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.jsii +3 -3
  2. package/lib/main.js +1 -1
  3. package/node_modules/@aws-cdk/assert/package.json +8 -8
  4. package/node_modules/@aws-cdk/cfnspec/package.json +3 -3
  5. package/node_modules/@aws-cdk/cfnspec/tsconfig.tsbuildinfo +5 -5
  6. package/node_modules/@aws-cdk/cloudformation-diff/package.json +5 -5
  7. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/LICENSE +0 -0
  8. package/node_modules/@types/node/README.md +16 -0
  9. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/assert.d.ts +35 -6
  10. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/async_hooks.d.ts +96 -11
  11. package/node_modules/@types/node/buffer.d.ts +89 -0
  12. package/node_modules/@types/node/child_process.d.ts +514 -0
  13. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/cluster.d.ts +43 -38
  14. package/node_modules/@types/node/console.d.ts +142 -0
  15. package/node_modules/@types/node/constants.d.ts +18 -0
  16. package/node_modules/@types/node/crypto.d.ts +1283 -0
  17. package/node_modules/@types/node/dgram.d.ts +144 -0
  18. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/dns.d.ts +33 -12
  19. package/node_modules/@types/node/domain.d.ts +27 -0
  20. package/node_modules/@types/node/events.d.ts +82 -0
  21. package/node_modules/@types/node/fs/promises.d.ts +569 -0
  22. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/fs.d.ts +736 -757
  23. package/node_modules/@types/node/globals.d.ts +746 -0
  24. package/node_modules/@types/node/globals.global.d.ts +1 -0
  25. package/node_modules/@types/node/http.d.ts +492 -0
  26. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/http2.d.ts +289 -186
  27. package/node_modules/@types/node/https.d.ts +142 -0
  28. package/node_modules/@types/node/index.d.ts +98 -0
  29. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/inspector.d.ts +1508 -1619
  30. package/node_modules/@types/node/module.d.ts +56 -0
  31. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/net.d.ts +128 -71
  32. package/node_modules/@types/node/os.d.ts +242 -0
  33. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/package.json +67 -23
  34. package/node_modules/@types/node/path.d.ts +168 -0
  35. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/perf_hooks.d.ts +124 -19
  36. package/node_modules/@types/node/process.d.ts +413 -0
  37. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/punycode.d.ts +11 -1
  38. package/node_modules/@types/node/querystring.d.ts +31 -0
  39. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/readline.d.ts +55 -24
  40. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/repl.d.ts +40 -22
  41. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/stream.d.ts +103 -57
  42. package/node_modules/@types/node/string_decoder.d.ts +10 -0
  43. package/node_modules/@types/node/timers.d.ts +19 -0
  44. package/node_modules/@types/node/tls.d.ts +784 -0
  45. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/trace_events.d.ts +7 -4
  46. package/node_modules/@types/node/tty.d.ts +69 -0
  47. package/node_modules/@types/node/url.d.ts +149 -0
  48. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/util.d.ts +70 -41
  49. package/node_modules/@types/node/v8.d.ts +190 -0
  50. package/node_modules/@types/node/vm.d.ts +155 -0
  51. package/node_modules/@types/node/wasi.d.ts +89 -0
  52. package/node_modules/@types/node/worker_threads.d.ts +241 -0
  53. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/zlib.d.ts +91 -54
  54. package/package.json +3 -3
  55. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/README.md +0 -16
  56. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/base.d.ts +0 -19
  57. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/buffer.d.ts +0 -16
  58. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/child_process.d.ts +0 -369
  59. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/console.d.ts +0 -3
  60. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/constants.d.ts +0 -449
  61. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/crypto.d.ts +0 -613
  62. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/dgram.d.ts +0 -97
  63. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/domain.d.ts +0 -16
  64. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/events.d.ts +0 -30
  65. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/globals.d.ts +0 -1066
  66. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/http.d.ts +0 -274
  67. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/https.d.ts +0 -51
  68. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/index.d.ts +0 -41
  69. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/module.d.ts +0 -3
  70. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/os.d.ts +0 -254
  71. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/path.d.ts +0 -159
  72. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/process.d.ts +0 -3
  73. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/querystring.d.ts +0 -17
  74. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/string_decoder.d.ts +0 -9
  75. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/timers.d.ts +0 -16
  76. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tls.d.ts +0 -459
  77. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/assert.d.ts +0 -73
  78. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/base.d.ts +0 -54
  79. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/index.d.ts +0 -6
  80. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tty.d.ts +0 -17
  81. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/url.d.ts +0 -104
  82. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/v8.d.ts +0 -28
  83. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/vm.d.ts +0 -81
  84. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/worker_threads.d.ts +0 -124
@@ -0,0 +1,56 @@
1
+ declare module 'module' {
2
+ import { URL } from 'url';
3
+ namespace Module {
4
+ /**
5
+ * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
6
+ * It does not add or remove exported names from the ES Modules.
7
+ */
8
+ function syncBuiltinESMExports(): void;
9
+
10
+ function findSourceMap(path: string, error?: Error): SourceMap;
11
+ interface SourceMapPayload {
12
+ file: string;
13
+ version: number;
14
+ sources: string[];
15
+ sourcesContent: string[];
16
+ names: string[];
17
+ mappings: string;
18
+ sourceRoot: string;
19
+ }
20
+
21
+ interface SourceMapping {
22
+ generatedLine: number;
23
+ generatedColumn: number;
24
+ originalSource: string;
25
+ originalLine: number;
26
+ originalColumn: number;
27
+ }
28
+
29
+ class SourceMap {
30
+ readonly payload: SourceMapPayload;
31
+ constructor(payload: SourceMapPayload);
32
+ findEntry(line: number, column: number): SourceMapping;
33
+ }
34
+ }
35
+ interface Module extends NodeModule {}
36
+ class Module {
37
+ static runMain(): void;
38
+ static wrap(code: string): string;
39
+
40
+ /**
41
+ * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
42
+ */
43
+ static createRequireFromPath(path: string): NodeRequire;
44
+ static createRequire(path: string | URL): NodeRequire;
45
+ static builtinModules: string[];
46
+
47
+ static Module: typeof Module;
48
+
49
+ constructor(id: string, parent?: Module);
50
+ }
51
+ export = Module;
52
+ }
53
+ declare module 'node:module' {
54
+ import module = require('module');
55
+ export = module;
56
+ }
@@ -1,9 +1,13 @@
1
- declare module "net" {
2
- import * as stream from "stream";
3
- import * as events from "events";
4
- import * as dns from "dns";
1
+ declare module 'net' {
2
+ import * as stream from 'stream';
3
+ import EventEmitter = require('events');
4
+ import * as dns from 'dns';
5
5
 
6
- type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
6
+ type LookupFunction = (
7
+ hostname: string,
8
+ options: dns.LookupOneOptions,
9
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
10
+ ) => void;
7
11
 
8
12
  interface AddressInfo {
9
13
  address: string;
@@ -12,54 +16,71 @@ declare module "net" {
12
16
  }
13
17
 
14
18
  interface SocketConstructorOpts {
15
- fd?: number;
16
- allowHalfOpen?: boolean;
17
- readable?: boolean;
18
- writable?: boolean;
19
+ fd?: number | undefined;
20
+ allowHalfOpen?: boolean | undefined;
21
+ readable?: boolean | undefined;
22
+ writable?: boolean | undefined;
19
23
  }
20
24
 
21
- interface TcpSocketConnectOpts {
25
+ interface OnReadOpts {
26
+ buffer: Uint8Array | (() => Uint8Array);
27
+ /**
28
+ * This function is called for every chunk of incoming data.
29
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
30
+ * Return false from this function to implicitly pause() the socket.
31
+ */
32
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
33
+ }
34
+
35
+ interface ConnectOpts {
36
+ /**
37
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
38
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
39
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
40
+ */
41
+ onread?: OnReadOpts | undefined;
42
+ }
43
+
44
+ interface TcpSocketConnectOpts extends ConnectOpts {
22
45
  port: number;
23
- host?: string;
24
- localAddress?: string;
25
- localPort?: number;
26
- hints?: number;
27
- family?: number;
28
- lookup?: LookupFunction;
46
+ host?: string | undefined;
47
+ localAddress?: string | undefined;
48
+ localPort?: number | undefined;
49
+ hints?: number | undefined;
50
+ family?: number | undefined;
51
+ lookup?: LookupFunction | undefined;
29
52
  }
30
53
 
31
- interface IpcSocketConnectOpts {
54
+ interface IpcSocketConnectOpts extends ConnectOpts {
32
55
  path: string;
33
56
  }
34
57
 
35
58
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
59
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
36
60
 
37
61
  class Socket extends stream.Duplex {
38
62
  constructor(options?: SocketConstructorOpts);
39
63
 
40
64
  // Extended base methods
41
- write(buffer: Buffer): boolean;
42
- write(buffer: Buffer, cb?: Function): boolean;
43
- write(str: string, cb?: Function): boolean;
44
- write(str: string, encoding?: string, cb?: Function): boolean;
45
- write(str: string, encoding?: string, fd?: string): boolean;
46
- write(data: any, encoding?: string, callback?: Function): void;
47
-
48
- connect(options: SocketConnectOpts, connectionListener?: Function): this;
49
- connect(port: number, host: string, connectionListener?: Function): this;
50
- connect(port: number, connectionListener?: Function): this;
51
- connect(path: string, connectionListener?: Function): this;
52
-
53
- setEncoding(encoding?: string): this;
65
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
66
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
67
+
68
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
69
+ connect(port: number, host: string, connectionListener?: () => void): this;
70
+ connect(port: number, connectionListener?: () => void): this;
71
+ connect(path: string, connectionListener?: () => void): this;
72
+
73
+ setEncoding(encoding?: BufferEncoding): this;
54
74
  pause(): this;
55
75
  resume(): this;
56
- setTimeout(timeout: number, callback?: Function): this;
76
+ setTimeout(timeout: number, callback?: () => void): this;
57
77
  setNoDelay(noDelay?: boolean): this;
58
78
  setKeepAlive(enable?: boolean, initialDelay?: number): this;
59
- address(): AddressInfo | string;
60
- unref(): void;
61
- ref(): void;
79
+ address(): AddressInfo | {};
80
+ unref(): this;
81
+ ref(): this;
62
82
 
83
+ /** @deprecated since v14.6.0 - Use `writableLength` instead. */
63
84
  readonly bufferSize: number;
64
85
  readonly bytesRead: number;
65
86
  readonly bytesWritten: number;
@@ -67,16 +88,25 @@ declare module "net" {
67
88
  readonly destroyed: boolean;
68
89
  readonly localAddress: string;
69
90
  readonly localPort: number;
70
- readonly remoteAddress?: string;
71
- readonly remoteFamily?: string;
72
- readonly remotePort?: number;
91
+ /**
92
+ * This property represents the state of the connection as a string.
93
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
94
+ * @since v0.5.0
95
+ */
96
+ readonly readyState: SocketReadyState;
97
+ readonly remoteAddress?: string | undefined;
98
+ readonly remoteFamily?: string | undefined;
99
+ readonly remotePort?: number | undefined;
100
+ /**
101
+ * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
102
+ * @since v10.7.0
103
+ */
104
+ readonly timeout?: number | undefined;
73
105
 
74
106
  // Extended base methods
75
- end(): void;
76
- end(buffer: Buffer, cb?: Function): void;
77
- end(str: string, cb?: Function): void;
78
- end(str: string, encoding?: string, cb?: Function): void;
79
- end(data?: any, encoding?: string): void;
107
+ end(cb?: () => void): this;
108
+ end(buffer: Uint8Array | string, cb?: () => void): this;
109
+ end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): this;
80
110
 
81
111
  /**
82
112
  * events.EventEmitter
@@ -97,6 +127,7 @@ declare module "net" {
97
127
  addListener(event: "end", listener: () => void): this;
98
128
  addListener(event: "error", listener: (err: Error) => void): this;
99
129
  addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
130
+ addListener(event: "ready", listener: () => void): this;
100
131
  addListener(event: "timeout", listener: () => void): this;
101
132
 
102
133
  emit(event: string | symbol, ...args: any[]): boolean;
@@ -107,6 +138,7 @@ declare module "net" {
107
138
  emit(event: "end"): boolean;
108
139
  emit(event: "error", err: Error): boolean;
109
140
  emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
141
+ emit(event: "ready"): boolean;
110
142
  emit(event: "timeout"): boolean;
111
143
 
112
144
  on(event: string, listener: (...args: any[]) => void): this;
@@ -117,6 +149,7 @@ declare module "net" {
117
149
  on(event: "end", listener: () => void): this;
118
150
  on(event: "error", listener: (err: Error) => void): this;
119
151
  on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
152
+ on(event: "ready", listener: () => void): this;
120
153
  on(event: "timeout", listener: () => void): this;
121
154
 
122
155
  once(event: string, listener: (...args: any[]) => void): this;
@@ -127,6 +160,7 @@ declare module "net" {
127
160
  once(event: "end", listener: () => void): this;
128
161
  once(event: "error", listener: (err: Error) => void): this;
129
162
  once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
163
+ once(event: "ready", listener: () => void): this;
130
164
  once(event: "timeout", listener: () => void): this;
131
165
 
132
166
  prependListener(event: string, listener: (...args: any[]) => void): this;
@@ -137,6 +171,7 @@ declare module "net" {
137
171
  prependListener(event: "end", listener: () => void): this;
138
172
  prependListener(event: "error", listener: (err: Error) => void): this;
139
173
  prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
174
+ prependListener(event: "ready", listener: () => void): this;
140
175
  prependListener(event: "timeout", listener: () => void): this;
141
176
 
142
177
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
@@ -147,35 +182,54 @@ declare module "net" {
147
182
  prependOnceListener(event: "end", listener: () => void): this;
148
183
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
149
184
  prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
185
+ prependOnceListener(event: "ready", listener: () => void): this;
150
186
  prependOnceListener(event: "timeout", listener: () => void): this;
151
187
  }
152
188
 
153
189
  interface ListenOptions {
154
- port?: number;
155
- host?: string;
156
- backlog?: number;
157
- path?: string;
158
- exclusive?: boolean;
159
- readableAll?: boolean;
160
- writableAll?: boolean;
190
+ port?: number | undefined;
191
+ host?: string | undefined;
192
+ backlog?: number | undefined;
193
+ path?: string | undefined;
194
+ exclusive?: boolean | undefined;
195
+ readableAll?: boolean | undefined;
196
+ writableAll?: boolean | undefined;
197
+ /**
198
+ * @default false
199
+ */
200
+ ipv6Only?: boolean | undefined;
201
+ }
202
+
203
+ interface ServerOpts {
204
+ /**
205
+ * Indicates whether half-opened TCP connections are allowed.
206
+ * @default false
207
+ */
208
+ allowHalfOpen?: boolean | undefined;
209
+
210
+ /**
211
+ * Indicates whether the socket should be paused on incoming connections.
212
+ * @default false
213
+ */
214
+ pauseOnConnect?: boolean | undefined;
161
215
  }
162
216
 
163
217
  // https://github.com/nodejs/node/blob/master/lib/net.js
164
- class Server extends events.EventEmitter {
218
+ class Server extends EventEmitter {
165
219
  constructor(connectionListener?: (socket: Socket) => void);
166
- constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void);
167
-
168
- listen(port?: number, hostname?: string, backlog?: number, listeningListener?: Function): this;
169
- listen(port?: number, hostname?: string, listeningListener?: Function): this;
170
- listen(port?: number, backlog?: number, listeningListener?: Function): this;
171
- listen(port?: number, listeningListener?: Function): this;
172
- listen(path: string, backlog?: number, listeningListener?: Function): this;
173
- listen(path: string, listeningListener?: Function): this;
174
- listen(options: ListenOptions, listeningListener?: Function): this;
175
- listen(handle: any, backlog?: number, listeningListener?: Function): this;
176
- listen(handle: any, listeningListener?: Function): this;
220
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
221
+
222
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
223
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
224
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
225
+ listen(port?: number, listeningListener?: () => void): this;
226
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
227
+ listen(path: string, listeningListener?: () => void): this;
228
+ listen(options: ListenOptions, listeningListener?: () => void): this;
229
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
230
+ listen(handle: any, listeningListener?: () => void): this;
177
231
  close(callback?: (err?: Error) => void): this;
178
- address(): AddressInfo | string;
232
+ address(): AddressInfo | string | null;
179
233
  getConnections(cb: (error: Error | null, count: number) => void): void;
180
234
  ref(): this;
181
235
  unref(): this;
@@ -228,24 +282,27 @@ declare module "net" {
228
282
  }
229
283
 
230
284
  interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
231
- timeout?: number;
285
+ timeout?: number | undefined;
232
286
  }
233
287
 
234
288
  interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
235
- timeout?: number;
289
+ timeout?: number | undefined;
236
290
  }
237
291
 
238
292
  type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
239
293
 
240
294
  function createServer(connectionListener?: (socket: Socket) => void): Server;
241
- function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server;
242
- function connect(options: NetConnectOpts, connectionListener?: Function): Socket;
243
- function connect(port: number, host?: string, connectionListener?: Function): Socket;
244
- function connect(path: string, connectionListener?: Function): Socket;
245
- function createConnection(options: NetConnectOpts, connectionListener?: Function): Socket;
246
- function createConnection(port: number, host?: string, connectionListener?: Function): Socket;
247
- function createConnection(path: string, connectionListener?: Function): Socket;
295
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
296
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
297
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
298
+ function connect(path: string, connectionListener?: () => void): Socket;
299
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
300
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
301
+ function createConnection(path: string, connectionListener?: () => void): Socket;
248
302
  function isIP(input: string): number;
249
303
  function isIPv4(input: string): boolean;
250
304
  function isIPv6(input: string): boolean;
251
305
  }
306
+ declare module 'node:net' {
307
+ export * from 'net';
308
+ }
@@ -0,0 +1,242 @@
1
+ declare module 'os' {
2
+ interface CpuInfo {
3
+ model: string;
4
+ speed: number;
5
+ times: {
6
+ user: number;
7
+ nice: number;
8
+ sys: number;
9
+ idle: number;
10
+ irq: number;
11
+ };
12
+ }
13
+
14
+ interface NetworkInterfaceBase {
15
+ address: string;
16
+ netmask: string;
17
+ mac: string;
18
+ internal: boolean;
19
+ cidr: string | null;
20
+ }
21
+
22
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
23
+ family: "IPv4";
24
+ }
25
+
26
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
27
+ family: "IPv6";
28
+ scopeid: number;
29
+ }
30
+
31
+ interface UserInfo<T> {
32
+ username: T;
33
+ uid: number;
34
+ gid: number;
35
+ shell: T;
36
+ homedir: T;
37
+ }
38
+
39
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
40
+
41
+ function hostname(): string;
42
+ function loadavg(): number[];
43
+ function uptime(): number;
44
+ function freemem(): number;
45
+ function totalmem(): number;
46
+ function cpus(): CpuInfo[];
47
+ function type(): string;
48
+ function release(): string;
49
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
50
+ function homedir(): string;
51
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
52
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
53
+
54
+ type SignalConstants = {
55
+ [key in NodeJS.Signals]: number;
56
+ };
57
+
58
+ namespace constants {
59
+ const UV_UDP_REUSEADDR: number;
60
+ namespace signals {}
61
+ const signals: SignalConstants;
62
+ namespace errno {
63
+ const E2BIG: number;
64
+ const EACCES: number;
65
+ const EADDRINUSE: number;
66
+ const EADDRNOTAVAIL: number;
67
+ const EAFNOSUPPORT: number;
68
+ const EAGAIN: number;
69
+ const EALREADY: number;
70
+ const EBADF: number;
71
+ const EBADMSG: number;
72
+ const EBUSY: number;
73
+ const ECANCELED: number;
74
+ const ECHILD: number;
75
+ const ECONNABORTED: number;
76
+ const ECONNREFUSED: number;
77
+ const ECONNRESET: number;
78
+ const EDEADLK: number;
79
+ const EDESTADDRREQ: number;
80
+ const EDOM: number;
81
+ const EDQUOT: number;
82
+ const EEXIST: number;
83
+ const EFAULT: number;
84
+ const EFBIG: number;
85
+ const EHOSTUNREACH: number;
86
+ const EIDRM: number;
87
+ const EILSEQ: number;
88
+ const EINPROGRESS: number;
89
+ const EINTR: number;
90
+ const EINVAL: number;
91
+ const EIO: number;
92
+ const EISCONN: number;
93
+ const EISDIR: number;
94
+ const ELOOP: number;
95
+ const EMFILE: number;
96
+ const EMLINK: number;
97
+ const EMSGSIZE: number;
98
+ const EMULTIHOP: number;
99
+ const ENAMETOOLONG: number;
100
+ const ENETDOWN: number;
101
+ const ENETRESET: number;
102
+ const ENETUNREACH: number;
103
+ const ENFILE: number;
104
+ const ENOBUFS: number;
105
+ const ENODATA: number;
106
+ const ENODEV: number;
107
+ const ENOENT: number;
108
+ const ENOEXEC: number;
109
+ const ENOLCK: number;
110
+ const ENOLINK: number;
111
+ const ENOMEM: number;
112
+ const ENOMSG: number;
113
+ const ENOPROTOOPT: number;
114
+ const ENOSPC: number;
115
+ const ENOSR: number;
116
+ const ENOSTR: number;
117
+ const ENOSYS: number;
118
+ const ENOTCONN: number;
119
+ const ENOTDIR: number;
120
+ const ENOTEMPTY: number;
121
+ const ENOTSOCK: number;
122
+ const ENOTSUP: number;
123
+ const ENOTTY: number;
124
+ const ENXIO: number;
125
+ const EOPNOTSUPP: number;
126
+ const EOVERFLOW: number;
127
+ const EPERM: number;
128
+ const EPIPE: number;
129
+ const EPROTO: number;
130
+ const EPROTONOSUPPORT: number;
131
+ const EPROTOTYPE: number;
132
+ const ERANGE: number;
133
+ const EROFS: number;
134
+ const ESPIPE: number;
135
+ const ESRCH: number;
136
+ const ESTALE: number;
137
+ const ETIME: number;
138
+ const ETIMEDOUT: number;
139
+ const ETXTBSY: number;
140
+ const EWOULDBLOCK: number;
141
+ const EXDEV: number;
142
+ const WSAEINTR: number;
143
+ const WSAEBADF: number;
144
+ const WSAEACCES: number;
145
+ const WSAEFAULT: number;
146
+ const WSAEINVAL: number;
147
+ const WSAEMFILE: number;
148
+ const WSAEWOULDBLOCK: number;
149
+ const WSAEINPROGRESS: number;
150
+ const WSAEALREADY: number;
151
+ const WSAENOTSOCK: number;
152
+ const WSAEDESTADDRREQ: number;
153
+ const WSAEMSGSIZE: number;
154
+ const WSAEPROTOTYPE: number;
155
+ const WSAENOPROTOOPT: number;
156
+ const WSAEPROTONOSUPPORT: number;
157
+ const WSAESOCKTNOSUPPORT: number;
158
+ const WSAEOPNOTSUPP: number;
159
+ const WSAEPFNOSUPPORT: number;
160
+ const WSAEAFNOSUPPORT: number;
161
+ const WSAEADDRINUSE: number;
162
+ const WSAEADDRNOTAVAIL: number;
163
+ const WSAENETDOWN: number;
164
+ const WSAENETUNREACH: number;
165
+ const WSAENETRESET: number;
166
+ const WSAECONNABORTED: number;
167
+ const WSAECONNRESET: number;
168
+ const WSAENOBUFS: number;
169
+ const WSAEISCONN: number;
170
+ const WSAENOTCONN: number;
171
+ const WSAESHUTDOWN: number;
172
+ const WSAETOOMANYREFS: number;
173
+ const WSAETIMEDOUT: number;
174
+ const WSAECONNREFUSED: number;
175
+ const WSAELOOP: number;
176
+ const WSAENAMETOOLONG: number;
177
+ const WSAEHOSTDOWN: number;
178
+ const WSAEHOSTUNREACH: number;
179
+ const WSAENOTEMPTY: number;
180
+ const WSAEPROCLIM: number;
181
+ const WSAEUSERS: number;
182
+ const WSAEDQUOT: number;
183
+ const WSAESTALE: number;
184
+ const WSAEREMOTE: number;
185
+ const WSASYSNOTREADY: number;
186
+ const WSAVERNOTSUPPORTED: number;
187
+ const WSANOTINITIALISED: number;
188
+ const WSAEDISCON: number;
189
+ const WSAENOMORE: number;
190
+ const WSAECANCELLED: number;
191
+ const WSAEINVALIDPROCTABLE: number;
192
+ const WSAEINVALIDPROVIDER: number;
193
+ const WSAEPROVIDERFAILEDINIT: number;
194
+ const WSASYSCALLFAILURE: number;
195
+ const WSASERVICE_NOT_FOUND: number;
196
+ const WSATYPE_NOT_FOUND: number;
197
+ const WSA_E_NO_MORE: number;
198
+ const WSA_E_CANCELLED: number;
199
+ const WSAEREFUSED: number;
200
+ }
201
+ namespace priority {
202
+ const PRIORITY_LOW: number;
203
+ const PRIORITY_BELOW_NORMAL: number;
204
+ const PRIORITY_NORMAL: number;
205
+ const PRIORITY_ABOVE_NORMAL: number;
206
+ const PRIORITY_HIGH: number;
207
+ const PRIORITY_HIGHEST: number;
208
+ }
209
+ }
210
+
211
+ function arch(): string;
212
+ /**
213
+ * Returns a string identifying the kernel version.
214
+ * On POSIX systems, the operating system release is determined by calling
215
+ * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
216
+ * `GetVersionExW()` will be used. See
217
+ * https://en.wikipedia.org/wiki/Uname#Examples for more information.
218
+ */
219
+ function version(): string;
220
+ function platform(): NodeJS.Platform;
221
+ function tmpdir(): string;
222
+ const EOL: string;
223
+ function endianness(): "BE" | "LE";
224
+ /**
225
+ * Gets the priority of a process.
226
+ * Defaults to current process.
227
+ */
228
+ function getPriority(pid?: number): number;
229
+ /**
230
+ * Sets the priority of the current process.
231
+ * @param priority Must be in range of -20 to 19
232
+ */
233
+ function setPriority(priority: number): void;
234
+ /**
235
+ * Sets the priority of the process specified process.
236
+ * @param priority Must be in range of -20 to 19
237
+ */
238
+ function setPriority(pid: number, priority: number): void;
239
+ }
240
+ declare module 'node:os' {
241
+ export * from 'os';
242
+ }