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.
Files changed (138) hide show
  1. package/extensions/cleave/dispatcher.ts +213 -20
  2. package/extensions/cleave/rpc-child.ts +269 -0
  3. package/extensions/cleave/types.ts +52 -0
  4. package/node_modules/@types/node/README.md +3 -3
  5. package/node_modules/@types/node/assert/strict.d.ts +11 -5
  6. package/node_modules/@types/node/assert.d.ts +173 -50
  7. package/node_modules/@types/node/async_hooks.d.ts +8 -28
  8. package/node_modules/@types/node/buffer.buffer.d.ts +7 -1
  9. package/node_modules/@types/node/buffer.d.ts +168 -44
  10. package/node_modules/@types/node/child_process.d.ts +70 -27
  11. package/node_modules/@types/node/cluster.d.ts +332 -240
  12. package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  13. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  14. package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  15. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
  16. package/node_modules/@types/node/console.d.ts +350 -49
  17. package/node_modules/@types/node/constants.d.ts +4 -3
  18. package/node_modules/@types/node/crypto.d.ts +1110 -630
  19. package/node_modules/@types/node/dgram.d.ts +51 -15
  20. package/node_modules/@types/node/diagnostics_channel.d.ts +6 -4
  21. package/node_modules/@types/node/dns/promises.d.ts +4 -4
  22. package/node_modules/@types/node/dns.d.ts +133 -132
  23. package/node_modules/@types/node/domain.d.ts +17 -13
  24. package/node_modules/@types/node/events.d.ts +663 -734
  25. package/node_modules/@types/node/fs/promises.d.ts +9 -43
  26. package/node_modules/@types/node/fs.d.ts +411 -628
  27. package/node_modules/@types/node/globals.d.ts +30 -8
  28. package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
  29. package/node_modules/@types/node/http.d.ts +265 -364
  30. package/node_modules/@types/node/http2.d.ts +715 -551
  31. package/node_modules/@types/node/https.d.ts +239 -65
  32. package/node_modules/@types/node/index.d.ts +6 -24
  33. package/node_modules/@types/node/inspector.d.ts +53 -69
  34. package/node_modules/@types/node/inspector.generated.d.ts +410 -759
  35. package/node_modules/@types/node/module.d.ts +186 -52
  36. package/node_modules/@types/node/net.d.ts +194 -70
  37. package/node_modules/@types/node/os.d.ts +11 -12
  38. package/node_modules/@types/node/package.json +3 -13
  39. package/node_modules/@types/node/path.d.ts +133 -120
  40. package/node_modules/@types/node/perf_hooks.d.ts +643 -318
  41. package/node_modules/@types/node/process.d.ts +132 -223
  42. package/node_modules/@types/node/punycode.d.ts +5 -5
  43. package/node_modules/@types/node/querystring.d.ts +4 -4
  44. package/node_modules/@types/node/readline/promises.d.ts +3 -3
  45. package/node_modules/@types/node/readline.d.ts +120 -68
  46. package/node_modules/@types/node/repl.d.ts +100 -87
  47. package/node_modules/@types/node/sea.d.ts +1 -10
  48. package/node_modules/@types/node/sqlite.d.ts +19 -363
  49. package/node_modules/@types/node/stream/consumers.d.ts +10 -10
  50. package/node_modules/@types/node/stream/promises.d.ts +15 -136
  51. package/node_modules/@types/node/stream/web.d.ts +502 -176
  52. package/node_modules/@types/node/stream.d.ts +475 -581
  53. package/node_modules/@types/node/string_decoder.d.ts +4 -4
  54. package/node_modules/@types/node/test.d.ts +196 -308
  55. package/node_modules/@types/node/timers/promises.d.ts +4 -4
  56. package/node_modules/@types/node/timers.d.ts +132 -4
  57. package/node_modules/@types/node/tls.d.ts +226 -110
  58. package/node_modules/@types/node/trace_events.d.ts +9 -9
  59. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -1
  60. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
  61. package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
  62. package/node_modules/@types/node/tty.d.ts +16 -58
  63. package/node_modules/@types/node/url.d.ts +573 -130
  64. package/node_modules/@types/node/util.d.ts +1100 -181
  65. package/node_modules/@types/node/v8.d.ts +8 -76
  66. package/node_modules/@types/node/vm.d.ts +72 -280
  67. package/node_modules/@types/node/wasi.d.ts +4 -25
  68. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
  69. package/node_modules/@types/node/web-globals/events.d.ts +0 -9
  70. package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
  71. package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
  72. package/node_modules/@types/node/worker_threads.d.ts +335 -268
  73. package/node_modules/@types/node/zlib.d.ts +74 -9
  74. package/node_modules/undici-types/agent.d.ts +12 -13
  75. package/node_modules/undici-types/api.d.ts +26 -26
  76. package/node_modules/undici-types/balanced-pool.d.ts +12 -13
  77. package/node_modules/undici-types/client.d.ts +19 -19
  78. package/node_modules/undici-types/connector.d.ts +2 -2
  79. package/node_modules/undici-types/cookies.d.ts +0 -2
  80. package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
  81. package/node_modules/undici-types/dispatcher.d.ts +103 -123
  82. package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
  83. package/node_modules/undici-types/errors.d.ts +54 -66
  84. package/node_modules/undici-types/eventsource.d.ts +4 -9
  85. package/node_modules/undici-types/fetch.d.ts +20 -22
  86. package/node_modules/undici-types/file.d.ts +39 -0
  87. package/node_modules/undici-types/filereader.d.ts +54 -0
  88. package/node_modules/undici-types/formdata.d.ts +7 -7
  89. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  90. package/node_modules/undici-types/global-origin.d.ts +5 -5
  91. package/node_modules/undici-types/handlers.d.ts +8 -8
  92. package/node_modules/undici-types/header.d.ts +1 -157
  93. package/node_modules/undici-types/index.d.ts +47 -64
  94. package/node_modules/undici-types/interceptors.d.ts +8 -64
  95. package/node_modules/undici-types/mock-agent.d.ts +18 -36
  96. package/node_modules/undici-types/mock-client.d.ts +4 -6
  97. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  98. package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
  99. package/node_modules/undici-types/mock-pool.d.ts +4 -6
  100. package/node_modules/undici-types/package.json +1 -1
  101. package/node_modules/undici-types/patch.d.ts +4 -0
  102. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  103. package/node_modules/undici-types/pool.d.ts +13 -15
  104. package/node_modules/undici-types/proxy-agent.d.ts +4 -5
  105. package/node_modules/undici-types/readable.d.ts +16 -19
  106. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  107. package/node_modules/undici-types/retry-handler.d.ts +10 -19
  108. package/node_modules/undici-types/util.d.ts +3 -3
  109. package/node_modules/undici-types/webidl.d.ts +29 -142
  110. package/node_modules/undici-types/websocket.d.ts +10 -46
  111. package/package.json +2 -1
  112. package/skills/cleave/SKILL.md +62 -2
  113. package/node_modules/@types/node/inspector/promises.d.ts +0 -41
  114. package/node_modules/@types/node/path/posix.d.ts +0 -8
  115. package/node_modules/@types/node/path/win32.d.ts +0 -8
  116. package/node_modules/@types/node/quic.d.ts +0 -910
  117. package/node_modules/@types/node/test/reporters.d.ts +0 -96
  118. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  119. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  120. package/node_modules/@types/node/ts5.7/index.d.ts +0 -117
  121. package/node_modules/@types/node/util/types.d.ts +0 -558
  122. package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  123. package/node_modules/@types/node/web-globals/console.d.ts +0 -9
  124. package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  125. package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  126. package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  127. package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  128. package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  129. package/node_modules/@types/node/web-globals/streams.d.ts +0 -115
  130. package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  131. package/node_modules/@types/node/web-globals/url.d.ts +0 -24
  132. package/node_modules/undici-types/cache-interceptor.d.ts +0 -173
  133. package/node_modules/undici-types/client-stats.d.ts +0 -15
  134. package/node_modules/undici-types/h2c-client.d.ts +0 -73
  135. package/node_modules/undici-types/mock-call-history.d.ts +0 -111
  136. package/node_modules/undici-types/round-robin-pool.d.ts +0 -41
  137. package/node_modules/undici-types/snapshot-agent.d.ts +0 -109
  138. package/node_modules/undici-types/utility.d.ts +0 -7
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js)
5
5
  */
6
- declare module "node:https" {
7
- import * as http from "node:http";
6
+ declare module "https" {
7
+ import { NonSharedBuffer } from "node:buffer";
8
8
  import { Duplex } from "node:stream";
9
9
  import * as tls from "node:tls";
10
+ import * as http from "node:http";
10
11
  import { URL } from "node:url";
11
12
  interface ServerOptions<
12
13
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
@@ -24,12 +25,6 @@ declare module "node:https" {
24
25
  }
25
26
  /**
26
27
  * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
27
- *
28
- * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
29
- * to customize how TLS connections are established.
30
- *
31
- * > See `agent.createConnection()` for details on overriding this method,
32
- * > including asynchronous socket creation with a callback.
33
28
  * @since v0.4.5
34
29
  */
35
30
  class Agent extends http.Agent {
@@ -41,10 +36,10 @@ declare module "node:https" {
41
36
  ): Duplex | null | undefined;
42
37
  getName(options?: RequestOptions): string;
43
38
  }
44
- interface ServerEventMap<
39
+ interface Server<
45
40
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
46
41
  Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
47
- > extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
42
+ > extends http.Server<Request, Response> {}
48
43
  /**
49
44
  * See `http.Server` for more information.
50
45
  * @since v0.3.4
@@ -68,66 +63,245 @@ declare module "node:https" {
68
63
  * @since v18.2.0
69
64
  */
70
65
  closeIdleConnections(): void;
71
- // #region InternalEventEmitter
72
- addListener<E extends keyof ServerEventMap>(
73
- eventName: E,
74
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
66
+ addListener(event: string, listener: (...args: any[]) => void): this;
67
+ addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
68
+ addListener(
69
+ event: "newSession",
70
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
71
+ ): this;
72
+ addListener(
73
+ event: "OCSPRequest",
74
+ listener: (
75
+ certificate: NonSharedBuffer,
76
+ issuer: NonSharedBuffer,
77
+ callback: (err: Error | null, resp: Buffer | null) => void,
78
+ ) => void,
79
+ ): this;
80
+ addListener(
81
+ event: "resumeSession",
82
+ listener: (
83
+ sessionId: NonSharedBuffer,
84
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
85
+ ) => void,
86
+ ): this;
87
+ addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
88
+ addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
89
+ addListener(event: "close", listener: () => void): this;
90
+ addListener(event: "connection", listener: (socket: Duplex) => void): this;
91
+ addListener(event: "error", listener: (err: Error) => void): this;
92
+ addListener(event: "listening", listener: () => void): this;
93
+ addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
94
+ addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
95
+ addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
96
+ addListener(
97
+ event: "connect",
98
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
99
+ ): this;
100
+ addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
101
+ addListener(
102
+ event: "upgrade",
103
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
104
+ ): this;
105
+ emit(event: string, ...args: any[]): boolean;
106
+ emit(event: "keylog", line: NonSharedBuffer, tlsSocket: tls.TLSSocket): boolean;
107
+ emit(
108
+ event: "newSession",
109
+ sessionId: NonSharedBuffer,
110
+ sessionData: NonSharedBuffer,
111
+ callback: () => void,
112
+ ): boolean;
113
+ emit(
114
+ event: "OCSPRequest",
115
+ certificate: NonSharedBuffer,
116
+ issuer: NonSharedBuffer,
117
+ callback: (err: Error | null, resp: Buffer | null) => void,
118
+ ): boolean;
119
+ emit(
120
+ event: "resumeSession",
121
+ sessionId: NonSharedBuffer,
122
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
123
+ ): boolean;
124
+ emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
125
+ emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
126
+ emit(event: "close"): boolean;
127
+ emit(event: "connection", socket: Duplex): boolean;
128
+ emit(event: "error", err: Error): boolean;
129
+ emit(event: "listening"): boolean;
130
+ emit(
131
+ event: "checkContinue",
132
+ req: InstanceType<Request>,
133
+ res: InstanceType<Response>,
134
+ ): boolean;
135
+ emit(
136
+ event: "checkExpectation",
137
+ req: InstanceType<Request>,
138
+ res: InstanceType<Response>,
139
+ ): boolean;
140
+ emit(event: "clientError", err: Error, socket: Duplex): boolean;
141
+ emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
142
+ emit(
143
+ event: "request",
144
+ req: InstanceType<Request>,
145
+ res: InstanceType<Response>,
146
+ ): boolean;
147
+ emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
148
+ on(event: string, listener: (...args: any[]) => void): this;
149
+ on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
150
+ on(
151
+ event: "newSession",
152
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
153
+ ): this;
154
+ on(
155
+ event: "OCSPRequest",
156
+ listener: (
157
+ certificate: NonSharedBuffer,
158
+ issuer: NonSharedBuffer,
159
+ callback: (err: Error | null, resp: Buffer | null) => void,
160
+ ) => void,
161
+ ): this;
162
+ on(
163
+ event: "resumeSession",
164
+ listener: (
165
+ sessionId: NonSharedBuffer,
166
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
167
+ ) => void,
168
+ ): this;
169
+ on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
170
+ on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
171
+ on(event: "close", listener: () => void): this;
172
+ on(event: "connection", listener: (socket: Duplex) => void): this;
173
+ on(event: "error", listener: (err: Error) => void): this;
174
+ on(event: "listening", listener: () => void): this;
175
+ on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
176
+ on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
177
+ on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
178
+ on(
179
+ event: "connect",
180
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
75
181
  ): this;
76
- addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
77
- emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
78
- emit(eventName: string | symbol, ...args: any[]): boolean;
79
- listenerCount<E extends keyof ServerEventMap>(
80
- eventName: E,
81
- listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
82
- ): number;
83
- listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
84
- listeners<E extends keyof ServerEventMap>(
85
- eventName: E,
86
- ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
87
- listeners(eventName: string | symbol): ((...args: any[]) => void)[];
88
- off<E extends keyof ServerEventMap>(
89
- eventName: E,
90
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
182
+ on(event: "request", listener: http.RequestListener<Request, Response>): this;
183
+ on(
184
+ event: "upgrade",
185
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
91
186
  ): this;
92
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
93
- on<E extends keyof ServerEventMap>(
94
- eventName: E,
95
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
187
+ once(event: string, listener: (...args: any[]) => void): this;
188
+ once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
189
+ once(
190
+ event: "newSession",
191
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
96
192
  ): this;
97
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
98
- once<E extends keyof ServerEventMap>(
99
- eventName: E,
100
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
193
+ once(
194
+ event: "OCSPRequest",
195
+ listener: (
196
+ certificate: NonSharedBuffer,
197
+ issuer: NonSharedBuffer,
198
+ callback: (err: Error | null, resp: Buffer | null) => void,
199
+ ) => void,
101
200
  ): this;
102
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
103
- prependListener<E extends keyof ServerEventMap>(
104
- eventName: E,
105
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
201
+ once(
202
+ event: "resumeSession",
203
+ listener: (
204
+ sessionId: NonSharedBuffer,
205
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
206
+ ) => void,
106
207
  ): this;
107
- prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
108
- prependOnceListener<E extends keyof ServerEventMap>(
109
- eventName: E,
110
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
208
+ once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
209
+ once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
210
+ once(event: "close", listener: () => void): this;
211
+ once(event: "connection", listener: (socket: Duplex) => void): this;
212
+ once(event: "error", listener: (err: Error) => void): this;
213
+ once(event: "listening", listener: () => void): this;
214
+ once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
215
+ once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
216
+ once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
217
+ once(
218
+ event: "connect",
219
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
111
220
  ): this;
112
- prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
113
- rawListeners<E extends keyof ServerEventMap>(
114
- eventName: E,
115
- ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
116
- rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
117
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
118
- removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
119
- removeAllListeners(eventName?: string | symbol): this;
120
- removeListener<E extends keyof ServerEventMap>(
121
- eventName: E,
122
- listener: (...args: ServerEventMap<Request, Response>[E]) => void,
221
+ once(event: "request", listener: http.RequestListener<Request, Response>): this;
222
+ once(
223
+ event: "upgrade",
224
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
225
+ ): this;
226
+ prependListener(event: string, listener: (...args: any[]) => void): this;
227
+ prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
228
+ prependListener(
229
+ event: "newSession",
230
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
231
+ ): this;
232
+ prependListener(
233
+ event: "OCSPRequest",
234
+ listener: (
235
+ certificate: NonSharedBuffer,
236
+ issuer: NonSharedBuffer,
237
+ callback: (err: Error | null, resp: Buffer | null) => void,
238
+ ) => void,
239
+ ): this;
240
+ prependListener(
241
+ event: "resumeSession",
242
+ listener: (
243
+ sessionId: NonSharedBuffer,
244
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
245
+ ) => void,
246
+ ): this;
247
+ prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
248
+ prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
249
+ prependListener(event: "close", listener: () => void): this;
250
+ prependListener(event: "connection", listener: (socket: Duplex) => void): this;
251
+ prependListener(event: "error", listener: (err: Error) => void): this;
252
+ prependListener(event: "listening", listener: () => void): this;
253
+ prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
254
+ prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
255
+ prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
256
+ prependListener(
257
+ event: "connect",
258
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
259
+ ): this;
260
+ prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
261
+ prependListener(
262
+ event: "upgrade",
263
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
264
+ ): this;
265
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
266
+ prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
267
+ prependOnceListener(
268
+ event: "newSession",
269
+ listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
270
+ ): this;
271
+ prependOnceListener(
272
+ event: "OCSPRequest",
273
+ listener: (
274
+ certificate: NonSharedBuffer,
275
+ issuer: NonSharedBuffer,
276
+ callback: (err: Error | null, resp: Buffer | null) => void,
277
+ ) => void,
278
+ ): this;
279
+ prependOnceListener(
280
+ event: "resumeSession",
281
+ listener: (
282
+ sessionId: NonSharedBuffer,
283
+ callback: (err: Error | null, sessionData: Buffer | null) => void,
284
+ ) => void,
285
+ ): this;
286
+ prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
287
+ prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
288
+ prependOnceListener(event: "close", listener: () => void): this;
289
+ prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
290
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
291
+ prependOnceListener(event: "listening", listener: () => void): this;
292
+ prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
293
+ prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
294
+ prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
295
+ prependOnceListener(
296
+ event: "connect",
297
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
298
+ ): this;
299
+ prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
300
+ prependOnceListener(
301
+ event: "upgrade",
302
+ listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
123
303
  ): this;
124
- removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
125
- // #endregion
126
304
  }
127
- interface Server<
128
- Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
129
- Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
130
- > extends http.Server<Request, Response> {}
131
305
  /**
132
306
  * ```js
133
307
  * // curl -k https://localhost:8000/
@@ -400,6 +574,6 @@ declare module "node:https" {
400
574
  ): http.ClientRequest;
401
575
  let globalAgent: Agent;
402
576
  }
403
- declare module "https" {
404
- export * from "node:https";
577
+ declare module "node:https" {
578
+ export * from "https";
405
579
  }
@@ -22,38 +22,26 @@
22
22
  * IN THE SOFTWARE.
23
23
  */
24
24
 
25
- // NOTE: These definitions support Node.js and TypeScript 5.8+.
25
+ // NOTE: These definitions support Node.js and TypeScript 5.7+.
26
26
 
27
- // Reference required TypeScript libraries:
27
+ // Reference required TypeScript libs:
28
28
  /// <reference lib="es2020" />
29
- /// <reference lib="esnext.disposable" />
30
- /// <reference lib="esnext.float16" />
31
29
 
32
- // Iterator definitions required for compatibility with TypeScript <5.6:
33
- /// <reference path="compatibility/iterators.d.ts" />
30
+ // TypeScript backwards-compatibility definitions:
31
+ /// <reference path="compatibility/index.d.ts" />
34
32
 
35
- // Definitions for Node.js modules specific to TypeScript 5.7+:
33
+ // Definitions specific to TypeScript 5.7+:
36
34
  /// <reference path="globals.typedarray.d.ts" />
37
35
  /// <reference path="buffer.buffer.d.ts" />
38
36
 
39
37
  // Definitions for Node.js modules that are not specific to any version of TypeScript:
40
38
  /// <reference path="globals.d.ts" />
41
39
  /// <reference path="web-globals/abortcontroller.d.ts" />
42
- /// <reference path="web-globals/blob.d.ts" />
43
- /// <reference path="web-globals/console.d.ts" />
44
- /// <reference path="web-globals/crypto.d.ts" />
45
40
  /// <reference path="web-globals/domexception.d.ts" />
46
- /// <reference path="web-globals/encoding.d.ts" />
47
41
  /// <reference path="web-globals/events.d.ts" />
48
42
  /// <reference path="web-globals/fetch.d.ts" />
49
- /// <reference path="web-globals/importmeta.d.ts" />
50
- /// <reference path="web-globals/messaging.d.ts" />
51
43
  /// <reference path="web-globals/navigator.d.ts" />
52
- /// <reference path="web-globals/performance.d.ts" />
53
44
  /// <reference path="web-globals/storage.d.ts" />
54
- /// <reference path="web-globals/streams.d.ts" />
55
- /// <reference path="web-globals/timers.d.ts" />
56
- /// <reference path="web-globals/url.d.ts" />
57
45
  /// <reference path="assert.d.ts" />
58
46
  /// <reference path="assert/strict.d.ts" />
59
47
  /// <reference path="async_hooks.d.ts" />
@@ -76,30 +64,25 @@
76
64
  /// <reference path="https.d.ts" />
77
65
  /// <reference path="inspector.d.ts" />
78
66
  /// <reference path="inspector.generated.d.ts" />
79
- /// <reference path="inspector/promises.d.ts" />
80
67
  /// <reference path="module.d.ts" />
81
68
  /// <reference path="net.d.ts" />
82
69
  /// <reference path="os.d.ts" />
83
70
  /// <reference path="path.d.ts" />
84
- /// <reference path="path/posix.d.ts" />
85
- /// <reference path="path/win32.d.ts" />
86
71
  /// <reference path="perf_hooks.d.ts" />
87
72
  /// <reference path="process.d.ts" />
88
73
  /// <reference path="punycode.d.ts" />
89
74
  /// <reference path="querystring.d.ts" />
90
- /// <reference path="quic.d.ts" />
91
75
  /// <reference path="readline.d.ts" />
92
76
  /// <reference path="readline/promises.d.ts" />
93
77
  /// <reference path="repl.d.ts" />
94
78
  /// <reference path="sea.d.ts" />
95
79
  /// <reference path="sqlite.d.ts" />
96
80
  /// <reference path="stream.d.ts" />
97
- /// <reference path="stream/consumers.d.ts" />
98
81
  /// <reference path="stream/promises.d.ts" />
82
+ /// <reference path="stream/consumers.d.ts" />
99
83
  /// <reference path="stream/web.d.ts" />
100
84
  /// <reference path="string_decoder.d.ts" />
101
85
  /// <reference path="test.d.ts" />
102
- /// <reference path="test/reporters.d.ts" />
103
86
  /// <reference path="timers.d.ts" />
104
87
  /// <reference path="timers/promises.d.ts" />
105
88
  /// <reference path="tls.d.ts" />
@@ -107,7 +90,6 @@
107
90
  /// <reference path="tty.d.ts" />
108
91
  /// <reference path="url.d.ts" />
109
92
  /// <reference path="util.d.ts" />
110
- /// <reference path="util/types.d.ts" />
111
93
  /// <reference path="v8.d.ts" />
112
94
  /// <reference path="vm.d.ts" />
113
95
  /// <reference path="wasi.d.ts" />
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The `node:inspector` module provides an API for interacting with the V8
3
3
  * inspector.
4
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector.js)
5
5
  */
6
- declare module "node:inspector" {
7
- import { EventEmitter } from "node:events";
6
+ declare module "inspector" {
7
+ import EventEmitter = require("node:events");
8
8
  /**
9
9
  * The `inspector.Session` is used for dispatching messages to the V8 inspector
10
10
  * back-end and receiving message responses and notifications.
@@ -39,7 +39,7 @@ declare module "node:inspector" {
39
39
  * If wait is `true`, will block until a client has connected to the inspect port
40
40
  * and flow control has been passed to the debugger client.
41
41
  *
42
- * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
42
+ * See the [security warning](https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
43
43
  * regarding the `host` parameter usage.
44
44
  * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
45
45
  * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
@@ -125,14 +125,14 @@ declare module "node:inspector" {
125
125
  * `Network.streamResourceContent` command was not invoked for the given request yet.
126
126
  *
127
127
  * Also enables `Network.getResponseBody` command to retrieve the response data.
128
- * @since v24.2.0
128
+ * @since v22.17.0
129
129
  */
130
130
  function dataReceived(params: DataReceivedEventDataType): void;
131
131
  /**
132
132
  * This feature is only available with the `--experimental-network-inspection` flag enabled.
133
133
  *
134
134
  * Enables `Network.getRequestPostData` command to retrieve the request data.
135
- * @since v24.3.0
135
+ * @since v22.18.0
136
136
  */
137
137
  function dataSent(params: unknown): void;
138
138
  /**
@@ -159,30 +159,6 @@ declare module "node:inspector" {
159
159
  * @since v22.7.0
160
160
  */
161
161
  function loadingFailed(params: LoadingFailedEventDataType): void;
162
- /**
163
- * This feature is only available with the `--experimental-network-inspection` flag enabled.
164
- *
165
- * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that
166
- * a WebSocket connection has been initiated.
167
- * @since v24.7.0
168
- */
169
- function webSocketCreated(params: WebSocketCreatedEventDataType): void;
170
- /**
171
- * This feature is only available with the `--experimental-network-inspection` flag enabled.
172
- *
173
- * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends.
174
- * This event indicates that the WebSocket handshake response has been received.
175
- * @since v24.7.0
176
- */
177
- function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void;
178
- /**
179
- * This feature is only available with the `--experimental-network-inspection` flag enabled.
180
- *
181
- * Broadcasts the `Network.webSocketClosed` event to connected frontends.
182
- * This event indicates that a WebSocket connection has been closed.
183
- * @since v24.7.0
184
- */
185
- function webSocketClosed(params: WebSocketClosedEventDataType): void;
186
162
  }
187
163
  namespace NetworkResources {
188
164
  /**
@@ -213,57 +189,65 @@ declare module "node:inspector" {
213
189
  * ```
214
190
  *
215
191
  * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)
216
- * @since v24.5.0
192
+ * @since v22.19.0
217
193
  * @experimental
218
194
  */
219
195
  function put(url: string, data: string): void;
220
196
  }
221
- namespace DOMStorage {
222
- /**
223
- * This feature is only available with the
224
- * `--experimental-storage-inspection` flag enabled.
225
- *
226
- * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
227
- * This event indicates that a new item has been added to the storage.
228
- * @since v25.5.0
229
- */
230
- function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
197
+ }
198
+
199
+ /**
200
+ * The `node:inspector` module provides an API for interacting with the V8
201
+ * inspector.
202
+ */
203
+ declare module "node:inspector" {
204
+ export * from "inspector";
205
+ }
206
+
207
+ /**
208
+ * The `node:inspector/promises` module provides an API for interacting with the V8
209
+ * inspector.
210
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector/promises.js)
211
+ * @since v19.0.0
212
+ */
213
+ declare module "inspector/promises" {
214
+ import EventEmitter = require("node:events");
215
+ export { close, console, NetworkResources, open, url, waitForDebugger } from "inspector";
216
+ /**
217
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
218
+ * back-end and receiving message responses and notifications.
219
+ * @since v19.0.0
220
+ */
221
+ export class Session extends EventEmitter {
231
222
  /**
232
- * This feature is only available with the
233
- * `--experimental-storage-inspection` flag enabled.
234
- *
235
- * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
236
- * This event indicates that an item has been removed from the storage.
237
- * @since v25.5.0
223
+ * Create a new instance of the inspector.Session class.
224
+ * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
238
225
  */
239
- function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
226
+ constructor();
240
227
  /**
241
- * This feature is only available with the
242
- * `--experimental-storage-inspection` flag enabled.
243
-
244
- * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
245
- * This event indicates that a storage item has been updated.
246
- * @since v25.5.0
228
+ * Connects a session to the inspector back-end.
247
229
  */
248
- function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
230
+ connect(): void;
249
231
  /**
250
- * This feature is only available with the
251
- * `--experimental-storage-inspection` flag enabled.
252
- *
253
- * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
254
- * frontends. This event indicates that all items have been cleared from the
255
- * storage.
256
- * @since v25.5.0
232
+ * Connects a session to the inspector back-end.
233
+ * An exception will be thrown if this API was not called on a Worker thread.
234
+ * @since v12.11.0
257
235
  */
258
- function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
236
+ connectToMainThread(): void;
259
237
  /**
260
- * This feature is only available with the
261
- * `--experimental-storage-inspection` flag enabled.
262
- * @since v25.5.0
238
+ * Immediately close the session. All pending message callbacks will be called with an error.
239
+ * `session.connect()` will need to be called to be able to send messages again.
240
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
263
241
  */
264
- function registerStorage(params: unknown): void;
242
+ disconnect(): void;
265
243
  }
266
244
  }
267
- declare module "inspector" {
268
- export * from "node:inspector";
245
+
246
+ /**
247
+ * The `node:inspector/promises` module provides an API for interacting with the V8
248
+ * inspector.
249
+ * @since v19.0.0
250
+ */
251
+ declare module "node:inspector/promises" {
252
+ export * from "inspector/promises";
269
253
  }