aws-delivlib 15.4.0 → 15.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
  2. package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
  3. package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
  4. package/lib/package-integrity/handler/validate.bundle.js +11361 -9248
  5. package/lib/publishing/github/node_modules/.yarn-integrity +5 -5
  6. package/lib/publishing/github/node_modules/@types/aws-lambda/README.md +1 -1
  7. package/lib/publishing/github/node_modules/@types/aws-lambda/package.json +2 -2
  8. package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +2 -2
  9. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +3 -3
  10. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +13 -56
  11. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +189 -190
  12. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +151 -43
  13. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +12 -13
  14. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +103 -237
  15. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +40 -155
  16. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +238 -384
  17. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +45 -404
  18. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +3 -10
  19. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +1019 -1600
  20. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +133 -81
  21. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
  22. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +9 -15
  23. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +136 -183
  24. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +12 -32
  25. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +872 -840
  26. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ffi.d.ts +500 -0
  27. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +256 -85
  28. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +865 -525
  29. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +12 -34
  30. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +63 -0
  31. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +433 -312
  32. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +548 -893
  33. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +64 -243
  34. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +25 -7
  35. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +35 -0
  36. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +70 -58
  37. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +764 -410
  38. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +54 -219
  39. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +224 -226
  40. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +41 -49
  41. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +13 -18
  42. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +8 -0
  43. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +8 -0
  44. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +119 -141
  45. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +339 -690
  46. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +390 -205
  47. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +3 -31
  48. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +3 -16
  49. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +2191 -0
  50. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +3 -6
  51. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +66 -152
  52. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +101 -109
  53. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +1 -116
  54. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +486 -68
  55. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +91 -15
  56. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +449 -0
  57. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +136 -15
  58. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +197 -454
  59. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +603 -491
  60. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +3 -43
  61. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +60 -0
  62. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +585 -292
  63. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +3 -18
  64. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +3 -141
  65. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +180 -267
  66. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +3 -97
  67. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
  68. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  69. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
  70. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +26 -6
  71. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  72. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +118 -0
  73. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +61 -43
  74. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +156 -584
  75. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +558 -0
  76. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +173 -1099
  77. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +175 -36
  78. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vfs.d.ts +211 -0
  79. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +293 -209
  80. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +24 -74
  81. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  82. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  83. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +9 -0
  84. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  85. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  86. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  87. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +9 -0
  88. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
  89. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  90. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  91. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  92. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  93. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +97 -0
  94. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  95. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +24 -0
  96. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +260 -407
  97. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +131 -0
  98. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +782 -165
  99. package/lib/publishing/github/node_modules/semver/classes/range.js +2 -2
  100. package/lib/publishing/github/node_modules/semver/internal/constants.js +30 -0
  101. package/lib/publishing/github/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  102. package/lib/publishing/github/node_modules/semver/package.json +1 -1
  103. package/lib/publishing/github/node_modules/undici-types/agent.d.ts +12 -13
  104. package/lib/publishing/github/node_modules/undici-types/api.d.ts +26 -26
  105. package/lib/publishing/github/node_modules/undici-types/balanced-pool.d.ts +13 -12
  106. package/lib/publishing/github/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  107. package/lib/publishing/github/node_modules/undici-types/client-stats.d.ts +15 -0
  108. package/lib/publishing/github/node_modules/undici-types/client.d.ts +63 -37
  109. package/lib/publishing/github/node_modules/undici-types/connector.d.ts +5 -2
  110. package/lib/publishing/github/node_modules/undici-types/cookies.d.ts +3 -1
  111. package/lib/publishing/github/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  112. package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +136 -139
  113. package/lib/publishing/github/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  114. package/lib/publishing/github/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  115. package/lib/publishing/github/node_modules/undici-types/errors.d.ts +92 -54
  116. package/lib/publishing/github/node_modules/undici-types/eventsource.d.ts +9 -4
  117. package/lib/publishing/github/node_modules/undici-types/fetch.d.ts +51 -25
  118. package/lib/publishing/github/node_modules/undici-types/formdata.d.ts +7 -7
  119. package/lib/publishing/github/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  120. package/lib/publishing/github/node_modules/undici-types/global-origin.d.ts +5 -5
  121. package/lib/publishing/github/node_modules/undici-types/h2c-client.d.ts +73 -0
  122. package/lib/publishing/github/node_modules/undici-types/handlers.d.ts +10 -9
  123. package/lib/publishing/github/node_modules/undici-types/header.d.ts +162 -1
  124. package/lib/publishing/github/node_modules/undici-types/index.d.ts +69 -47
  125. package/lib/publishing/github/node_modules/undici-types/interceptors.d.ts +72 -9
  126. package/lib/publishing/github/node_modules/undici-types/mock-agent.d.ts +36 -18
  127. package/lib/publishing/github/node_modules/undici-types/mock-call-history.d.ts +111 -0
  128. package/lib/publishing/github/node_modules/undici-types/mock-client.d.ts +6 -4
  129. package/lib/publishing/github/node_modules/undici-types/mock-errors.d.ts +3 -3
  130. package/lib/publishing/github/node_modules/undici-types/mock-interceptor.d.ts +26 -21
  131. package/lib/publishing/github/node_modules/undici-types/mock-pool.d.ts +6 -4
  132. package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
  133. package/lib/publishing/github/node_modules/undici-types/patch.d.ts +0 -4
  134. package/lib/publishing/github/node_modules/undici-types/pool-stats.d.ts +8 -8
  135. package/lib/publishing/github/node_modules/undici-types/pool.d.ts +14 -14
  136. package/lib/publishing/github/node_modules/undici-types/proxy-agent.d.ts +14 -6
  137. package/lib/publishing/github/node_modules/undici-types/readable.d.ts +19 -16
  138. package/lib/publishing/github/node_modules/undici-types/retry-agent.d.ts +1 -1
  139. package/lib/publishing/github/node_modules/undici-types/retry-handler.d.ts +19 -10
  140. package/lib/publishing/github/node_modules/undici-types/round-robin-pool.d.ts +39 -0
  141. package/lib/publishing/github/node_modules/undici-types/snapshot-agent.d.ts +113 -0
  142. package/lib/publishing/github/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  143. package/lib/publishing/github/node_modules/undici-types/util.d.ts +3 -3
  144. package/lib/publishing/github/node_modules/undici-types/utility.d.ts +7 -0
  145. package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +148 -30
  146. package/lib/publishing/github/node_modules/undici-types/websocket.d.ts +48 -10
  147. package/lib/shellable.d.ts +7 -3
  148. package/lib/shellable.js +44 -30
  149. package/package.json +11 -11
  150. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  151. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/index.d.ts +0 -9
  152. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  153. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  154. package/lib/publishing/github/node_modules/undici-types/file.d.ts +0 -39
  155. package/lib/publishing/github/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,13 +1,7 @@
1
- /**
2
- * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
- * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js)
5
- */
6
- declare module "https" {
7
- import { NonSharedBuffer } from "node:buffer";
1
+ declare module "node:https" {
2
+ import * as http from "node:http";
8
3
  import { Duplex } from "node:stream";
9
4
  import * as tls from "node:tls";
10
- import * as http from "node:http";
11
5
  import { URL } from "node:url";
12
6
  interface ServerOptions<
13
7
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
@@ -25,6 +19,12 @@ declare module "https" {
25
19
  }
26
20
  /**
27
21
  * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
22
+ *
23
+ * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
24
+ * to customize how TLS connections are established.
25
+ *
26
+ * > See `agent.createConnection()` for details on overriding this method,
27
+ * > including asynchronous socket creation with a callback.
28
28
  * @since v0.4.5
29
29
  */
30
30
  class Agent extends http.Agent {
@@ -36,10 +36,10 @@ declare module "https" {
36
36
  ): Duplex | null | undefined;
37
37
  getName(options?: RequestOptions): string;
38
38
  }
39
- interface Server<
39
+ interface ServerEventMap<
40
40
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
41
41
  Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
42
- > extends http.Server<Request, Response> {}
42
+ > extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
43
43
  /**
44
44
  * See `http.Server` for more information.
45
45
  * @since v0.3.4
@@ -63,245 +63,66 @@ declare module "https" {
63
63
  * @since v18.2.0
64
64
  */
65
65
  closeIdleConnections(): 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,
66
+ // #region InternalEventEmitter
67
+ addListener<E extends keyof ServerEventMap>(
68
+ eventName: E,
69
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
181
70
  ): this;
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,
71
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
72
+ emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
73
+ emit(eventName: string | symbol, ...args: any[]): boolean;
74
+ listenerCount<E extends keyof ServerEventMap>(
75
+ eventName: E,
76
+ listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
77
+ ): number;
78
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
79
+ listeners<E extends keyof ServerEventMap>(
80
+ eventName: E,
81
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
82
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
83
+ off<E extends keyof ServerEventMap>(
84
+ eventName: E,
85
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
186
86
  ): this;
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,
87
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
88
+ on<E extends keyof ServerEventMap>(
89
+ eventName: E,
90
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
192
91
  ): this;
193
- once(
194
- event: "OCSPRequest",
195
- listener: (
196
- certificate: NonSharedBuffer,
197
- issuer: NonSharedBuffer,
198
- callback: (err: Error | null, resp: Buffer | null) => void,
199
- ) => void,
92
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
93
+ once<E extends keyof ServerEventMap>(
94
+ eventName: E,
95
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
200
96
  ): this;
201
- once(
202
- event: "resumeSession",
203
- listener: (
204
- sessionId: NonSharedBuffer,
205
- callback: (err: Error | null, sessionData: Buffer | null) => void,
206
- ) => void,
97
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
98
+ prependListener<E extends keyof ServerEventMap>(
99
+ eventName: E,
100
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
207
101
  ): this;
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,
102
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
103
+ prependOnceListener<E extends keyof ServerEventMap>(
104
+ eventName: E,
105
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
220
106
  ): this;
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,
107
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
108
+ rawListeners<E extends keyof ServerEventMap>(
109
+ eventName: E,
110
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
111
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
112
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
113
+ removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
114
+ removeAllListeners(eventName?: string | symbol): this;
115
+ removeListener<E extends keyof ServerEventMap>(
116
+ eventName: E,
117
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
303
118
  ): this;
119
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
120
+ // #endregion
304
121
  }
122
+ interface Server<
123
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
124
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
125
+ > extends http.Server<Request, Response> {}
305
126
  /**
306
127
  * ```js
307
128
  * // curl -k https://localhost:8000/
@@ -574,6 +395,6 @@ declare module "https" {
574
395
  ): http.ClientRequest;
575
396
  let globalAgent: Agent;
576
397
  }
577
- declare module "node:https" {
578
- export * from "https";
398
+ declare module "https" {
399
+ export * from "node:https";
579
400
  }
@@ -22,27 +22,35 @@
22
22
  * IN THE SOFTWARE.
23
23
  */
24
24
 
25
- // NOTE: These definitions support Node.js and TypeScript 5.7+.
25
+ // NOTE: These definitions support Node.js and TypeScript 5.8+.
26
26
 
27
- // Reference required TypeScript libs:
27
+ // Reference required TypeScript libraries:
28
28
  /// <reference lib="es2020" />
29
+ /// <reference lib="esnext.disposable" />
30
+ /// <reference lib="esnext.float16" />
29
31
 
30
- // TypeScript backwards-compatibility definitions:
31
- /// <reference path="compatibility/index.d.ts" />
32
-
33
- // Definitions specific to TypeScript 5.7+:
32
+ // Definitions for Node.js modules specific to TypeScript 5.7+:
34
33
  /// <reference path="globals.typedarray.d.ts" />
35
34
  /// <reference path="buffer.buffer.d.ts" />
36
35
 
37
36
  // Definitions for Node.js modules that are not specific to any version of TypeScript:
38
37
  /// <reference path="globals.d.ts" />
39
38
  /// <reference path="web-globals/abortcontroller.d.ts" />
39
+ /// <reference path="web-globals/blob.d.ts" />
40
+ /// <reference path="web-globals/console.d.ts" />
41
+ /// <reference path="web-globals/crypto.d.ts" />
40
42
  /// <reference path="web-globals/domexception.d.ts" />
43
+ /// <reference path="web-globals/encoding.d.ts" />
41
44
  /// <reference path="web-globals/events.d.ts" />
42
45
  /// <reference path="web-globals/fetch.d.ts" />
46
+ /// <reference path="web-globals/importmeta.d.ts" />
47
+ /// <reference path="web-globals/messaging.d.ts" />
43
48
  /// <reference path="web-globals/navigator.d.ts" />
49
+ /// <reference path="web-globals/performance.d.ts" />
44
50
  /// <reference path="web-globals/storage.d.ts" />
45
51
  /// <reference path="web-globals/streams.d.ts" />
52
+ /// <reference path="web-globals/timers.d.ts" />
53
+ /// <reference path="web-globals/url.d.ts" />
46
54
  /// <reference path="assert.d.ts" />
47
55
  /// <reference path="assert/strict.d.ts" />
48
56
  /// <reference path="async_hooks.d.ts" />
@@ -58,6 +66,7 @@
58
66
  /// <reference path="dns/promises.d.ts" />
59
67
  /// <reference path="domain.d.ts" />
60
68
  /// <reference path="events.d.ts" />
69
+ /// <reference path="ffi.d.ts" />
61
70
  /// <reference path="fs.d.ts" />
62
71
  /// <reference path="fs/promises.d.ts" />
63
72
  /// <reference path="http.d.ts" />
@@ -65,25 +74,31 @@
65
74
  /// <reference path="https.d.ts" />
66
75
  /// <reference path="inspector.d.ts" />
67
76
  /// <reference path="inspector.generated.d.ts" />
77
+ /// <reference path="inspector/promises.d.ts" />
68
78
  /// <reference path="module.d.ts" />
69
79
  /// <reference path="net.d.ts" />
70
80
  /// <reference path="os.d.ts" />
71
81
  /// <reference path="path.d.ts" />
82
+ /// <reference path="path/posix.d.ts" />
83
+ /// <reference path="path/win32.d.ts" />
72
84
  /// <reference path="perf_hooks.d.ts" />
73
85
  /// <reference path="process.d.ts" />
74
86
  /// <reference path="punycode.d.ts" />
75
87
  /// <reference path="querystring.d.ts" />
88
+ /// <reference path="quic.d.ts" />
76
89
  /// <reference path="readline.d.ts" />
77
90
  /// <reference path="readline/promises.d.ts" />
78
91
  /// <reference path="repl.d.ts" />
79
92
  /// <reference path="sea.d.ts" />
80
93
  /// <reference path="sqlite.d.ts" />
81
94
  /// <reference path="stream.d.ts" />
82
- /// <reference path="stream/promises.d.ts" />
83
95
  /// <reference path="stream/consumers.d.ts" />
96
+ /// <reference path="stream/iter.d.ts" />
97
+ /// <reference path="stream/promises.d.ts" />
84
98
  /// <reference path="stream/web.d.ts" />
85
99
  /// <reference path="string_decoder.d.ts" />
86
100
  /// <reference path="test.d.ts" />
101
+ /// <reference path="test/reporters.d.ts" />
87
102
  /// <reference path="timers.d.ts" />
88
103
  /// <reference path="timers/promises.d.ts" />
89
104
  /// <reference path="tls.d.ts" />
@@ -91,8 +106,11 @@
91
106
  /// <reference path="tty.d.ts" />
92
107
  /// <reference path="url.d.ts" />
93
108
  /// <reference path="util.d.ts" />
109
+ /// <reference path="util/types.d.ts" />
94
110
  /// <reference path="v8.d.ts" />
111
+ /// <reference path="vfs.d.ts" />
95
112
  /// <reference path="vm.d.ts" />
96
113
  /// <reference path="wasi.d.ts" />
97
114
  /// <reference path="worker_threads.d.ts" />
98
115
  /// <reference path="zlib.d.ts" />
116
+ /// <reference path="zlib/iter.d.ts" />
@@ -0,0 +1,35 @@
1
+ declare module "node:inspector/promises" {
2
+ import { EventEmitter } from "node:events";
3
+ export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
4
+ /**
5
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
6
+ * back-end and receiving message responses and notifications.
7
+ * @since v19.0.0
8
+ */
9
+ export class Session extends EventEmitter {
10
+ /**
11
+ * Create a new instance of the inspector.Session class.
12
+ * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
13
+ */
14
+ constructor();
15
+ /**
16
+ * Connects a session to the inspector back-end.
17
+ */
18
+ connect(): void;
19
+ /**
20
+ * Connects a session to the inspector back-end.
21
+ * An exception will be thrown if this API was not called on a Worker thread.
22
+ * @since v12.11.0
23
+ */
24
+ connectToMainThread(): void;
25
+ /**
26
+ * Immediately close the session. All pending message callbacks will be called with an error.
27
+ * `session.connect()` will need to be called to be able to send messages again.
28
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
29
+ */
30
+ disconnect(): void;
31
+ }
32
+ }
33
+ declare module "inspector/promises" {
34
+ export * from "node:inspector/promises";
35
+ }