cdk-ecr-deployment 3.3.0 → 3.3.1

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 (539) hide show
  1. package/.jsii +2 -6
  2. package/lib/index.js +3 -3
  3. package/package.json +1 -13
  4. package/build-lambda.sh +0 -12
  5. package/node_modules/@sindresorhus/is/dist/index.d.ts +0 -232
  6. package/node_modules/@sindresorhus/is/dist/index.js +0 -434
  7. package/node_modules/@sindresorhus/is/dist/types.d.ts +0 -25
  8. package/node_modules/@sindresorhus/is/dist/types.js +0 -3
  9. package/node_modules/@sindresorhus/is/license +0 -9
  10. package/node_modules/@sindresorhus/is/package.json +0 -96
  11. package/node_modules/@sindresorhus/is/readme.md +0 -669
  12. package/node_modules/@szmarczak/http-timer/LICENSE +0 -21
  13. package/node_modules/@szmarczak/http-timer/README.md +0 -93
  14. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +0 -32
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.js +0 -126
  16. package/node_modules/@szmarczak/http-timer/package.json +0 -72
  17. package/node_modules/@types/cacheable-request/LICENSE +0 -21
  18. package/node_modules/@types/cacheable-request/README.md +0 -16
  19. package/node_modules/@types/cacheable-request/index.d.ts +0 -137
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -21
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +0 -15
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +0 -8
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +0 -1095
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +0 -541
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +0 -1926
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +0 -1549
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +0 -579
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +0 -9
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +0 -452
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +0 -21
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +0 -4510
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +0 -599
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +0 -476
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +0 -865
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +0 -124
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +0 -170
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +0 -931
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +0 -1275
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +0 -4343
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +0 -511
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +0 -1959
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -2558
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +0 -543
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -92
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +0 -3966
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -702
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +0 -1029
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +0 -495
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +0 -220
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +0 -200
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +0 -970
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +0 -2013
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +0 -117
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +0 -153
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +0 -162
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +0 -589
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +0 -430
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +0 -153
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +0 -439
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +0 -12
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +0 -90
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +0 -614
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +0 -1662
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +0 -67
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -2150
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +0 -97
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +0 -240
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +0 -1226
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +0 -197
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +0 -208
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +0 -972
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +0 -2439
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +0 -808
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +0 -976
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +0 -181
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +0 -745
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +0 -539
  87. package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +0 -21
  88. package/node_modules/@types/cacheable-request/node_modules/undici-types/README.md +0 -6
  89. package/node_modules/@types/cacheable-request/node_modules/undici-types/agent.d.ts +0 -31
  90. package/node_modules/@types/cacheable-request/node_modules/undici-types/api.d.ts +0 -43
  91. package/node_modules/@types/cacheable-request/node_modules/undici-types/balanced-pool.d.ts +0 -29
  92. package/node_modules/@types/cacheable-request/node_modules/undici-types/cache.d.ts +0 -36
  93. package/node_modules/@types/cacheable-request/node_modules/undici-types/client.d.ts +0 -108
  94. package/node_modules/@types/cacheable-request/node_modules/undici-types/connector.d.ts +0 -34
  95. package/node_modules/@types/cacheable-request/node_modules/undici-types/content-type.d.ts +0 -21
  96. package/node_modules/@types/cacheable-request/node_modules/undici-types/cookies.d.ts +0 -28
  97. package/node_modules/@types/cacheable-request/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  98. package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +0 -255
  99. package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  100. package/node_modules/@types/cacheable-request/node_modules/undici-types/errors.d.ts +0 -149
  101. package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -61
  102. package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +0 -209
  103. package/node_modules/@types/cacheable-request/node_modules/undici-types/file.d.ts +0 -39
  104. package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +0 -54
  105. package/node_modules/@types/cacheable-request/node_modules/undici-types/formdata.d.ts +0 -108
  106. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  107. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-origin.d.ts +0 -7
  108. package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +0 -15
  109. package/node_modules/@types/cacheable-request/node_modules/undici-types/header.d.ts +0 -4
  110. package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +0 -71
  111. package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +0 -17
  112. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-agent.d.ts +0 -50
  113. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-client.d.ts +0 -25
  114. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-errors.d.ts +0 -12
  115. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  116. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-pool.d.ts +0 -25
  117. package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +0 -55
  118. package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -33
  119. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool-stats.d.ts +0 -19
  120. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool.d.ts +0 -39
  121. package/node_modules/@types/cacheable-request/node_modules/undici-types/proxy-agent.d.ts +0 -28
  122. package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +0 -60
  123. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +0 -8
  124. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +0 -116
  125. package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +0 -18
  126. package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +0 -222
  127. package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -150
  128. package/node_modules/@types/cacheable-request/package.json +0 -35
  129. package/node_modules/@types/http-cache-semantics/LICENSE +0 -21
  130. package/node_modules/@types/http-cache-semantics/README.md +0 -15
  131. package/node_modules/@types/http-cache-semantics/index.d.ts +0 -165
  132. package/node_modules/@types/http-cache-semantics/package.json +0 -25
  133. package/node_modules/@types/keyv/LICENSE +0 -21
  134. package/node_modules/@types/keyv/README.md +0 -16
  135. package/node_modules/@types/keyv/index.d.ts +0 -90
  136. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -21
  137. package/node_modules/@types/keyv/node_modules/@types/node/README.md +0 -15
  138. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +0 -8
  139. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +0 -1095
  140. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +0 -541
  141. package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  142. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +0 -1926
  143. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +0 -1549
  144. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +0 -579
  145. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  146. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +0 -9
  147. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  148. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  149. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +0 -452
  150. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +0 -21
  151. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +0 -4510
  152. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +0 -599
  153. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  154. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +0 -476
  155. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +0 -865
  156. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +0 -124
  157. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +0 -170
  158. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +0 -931
  159. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +0 -1275
  160. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +0 -4343
  161. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +0 -511
  162. package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  163. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +0 -1959
  164. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -2558
  165. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +0 -543
  166. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -92
  167. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +0 -3966
  168. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -702
  169. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +0 -1029
  170. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +0 -495
  171. package/node_modules/@types/keyv/node_modules/@types/node/package.json +0 -220
  172. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +0 -200
  173. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +0 -970
  174. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +0 -2013
  175. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +0 -117
  176. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +0 -153
  177. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +0 -162
  178. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +0 -589
  179. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +0 -430
  180. package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +0 -153
  181. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +0 -439
  182. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +0 -12
  183. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +0 -90
  184. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +0 -614
  185. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +0 -1662
  186. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +0 -67
  187. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -2150
  188. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +0 -97
  189. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +0 -240
  190. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +0 -1226
  191. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +0 -197
  192. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  193. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  194. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  195. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +0 -208
  196. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +0 -972
  197. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +0 -2439
  198. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +0 -808
  199. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +0 -976
  200. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +0 -181
  201. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +0 -745
  202. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +0 -539
  203. package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +0 -21
  204. package/node_modules/@types/keyv/node_modules/undici-types/README.md +0 -6
  205. package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +0 -31
  206. package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +0 -43
  207. package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +0 -29
  208. package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +0 -36
  209. package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +0 -108
  210. package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +0 -34
  211. package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +0 -21
  212. package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +0 -28
  213. package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  214. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +0 -255
  215. package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  216. package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +0 -149
  217. package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -61
  218. package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +0 -209
  219. package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +0 -39
  220. package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +0 -54
  221. package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +0 -108
  222. package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  223. package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +0 -7
  224. package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +0 -15
  225. package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +0 -4
  226. package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +0 -71
  227. package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +0 -17
  228. package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +0 -50
  229. package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +0 -25
  230. package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +0 -12
  231. package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  232. package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +0 -25
  233. package/node_modules/@types/keyv/node_modules/undici-types/package.json +0 -55
  234. package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -33
  235. package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +0 -19
  236. package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +0 -39
  237. package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +0 -28
  238. package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +0 -60
  239. package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +0 -8
  240. package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +0 -116
  241. package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +0 -18
  242. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +0 -222
  243. package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -150
  244. package/node_modules/@types/keyv/package.json +0 -32
  245. package/node_modules/@types/responselike/LICENSE +0 -21
  246. package/node_modules/@types/responselike/README.md +0 -48
  247. package/node_modules/@types/responselike/index.d.ts +0 -29
  248. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -21
  249. package/node_modules/@types/responselike/node_modules/@types/node/README.md +0 -15
  250. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +0 -8
  251. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +0 -1095
  252. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +0 -541
  253. package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  254. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +0 -1926
  255. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +0 -1549
  256. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +0 -579
  257. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  258. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +0 -9
  259. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  260. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  261. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +0 -452
  262. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +0 -21
  263. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +0 -4510
  264. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +0 -599
  265. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  266. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +0 -476
  267. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +0 -865
  268. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +0 -124
  269. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +0 -170
  270. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +0 -931
  271. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +0 -1275
  272. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +0 -4343
  273. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +0 -511
  274. package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  275. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +0 -1959
  276. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -2558
  277. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +0 -543
  278. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -92
  279. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +0 -3966
  280. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -702
  281. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +0 -1029
  282. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +0 -495
  283. package/node_modules/@types/responselike/node_modules/@types/node/package.json +0 -220
  284. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +0 -200
  285. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +0 -970
  286. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +0 -2013
  287. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +0 -117
  288. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +0 -153
  289. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +0 -162
  290. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +0 -589
  291. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +0 -430
  292. package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +0 -153
  293. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +0 -439
  294. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +0 -12
  295. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +0 -90
  296. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +0 -614
  297. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +0 -1662
  298. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +0 -67
  299. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -2150
  300. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +0 -97
  301. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +0 -240
  302. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +0 -1226
  303. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +0 -197
  304. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  305. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  306. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  307. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +0 -208
  308. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +0 -972
  309. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +0 -2439
  310. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +0 -808
  311. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +0 -976
  312. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +0 -181
  313. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +0 -745
  314. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +0 -539
  315. package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +0 -21
  316. package/node_modules/@types/responselike/node_modules/undici-types/README.md +0 -6
  317. package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +0 -31
  318. package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +0 -43
  319. package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +0 -29
  320. package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +0 -36
  321. package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +0 -108
  322. package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +0 -34
  323. package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +0 -21
  324. package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +0 -28
  325. package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  326. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +0 -255
  327. package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  328. package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +0 -149
  329. package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -61
  330. package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +0 -209
  331. package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +0 -39
  332. package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +0 -54
  333. package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +0 -108
  334. package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  335. package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +0 -7
  336. package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +0 -15
  337. package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +0 -4
  338. package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +0 -71
  339. package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +0 -17
  340. package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +0 -50
  341. package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +0 -25
  342. package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +0 -12
  343. package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  344. package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +0 -25
  345. package/node_modules/@types/responselike/node_modules/undici-types/package.json +0 -55
  346. package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -33
  347. package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +0 -19
  348. package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +0 -39
  349. package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +0 -28
  350. package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +0 -60
  351. package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +0 -8
  352. package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +0 -116
  353. package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +0 -18
  354. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +0 -222
  355. package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -150
  356. package/node_modules/@types/responselike/package.json +0 -27
  357. package/node_modules/cacheable-lookup/LICENSE +0 -21
  358. package/node_modules/cacheable-lookup/README.md +0 -240
  359. package/node_modules/cacheable-lookup/index.d.ts +0 -139
  360. package/node_modules/cacheable-lookup/package.json +0 -45
  361. package/node_modules/cacheable-lookup/source/index.js +0 -436
  362. package/node_modules/cacheable-request/LICENSE +0 -21
  363. package/node_modules/cacheable-request/README.md +0 -206
  364. package/node_modules/cacheable-request/package.json +0 -56
  365. package/node_modules/cacheable-request/src/index.js +0 -251
  366. package/node_modules/clone-response/LICENSE +0 -21
  367. package/node_modules/clone-response/README.md +0 -62
  368. package/node_modules/clone-response/node_modules/mimic-response/index.js +0 -32
  369. package/node_modules/clone-response/node_modules/mimic-response/license +0 -9
  370. package/node_modules/clone-response/node_modules/mimic-response/package.json +0 -37
  371. package/node_modules/clone-response/node_modules/mimic-response/readme.md +0 -54
  372. package/node_modules/clone-response/package.json +0 -41
  373. package/node_modules/clone-response/src/index.js +0 -17
  374. package/node_modules/decompress-response/index.d.ts +0 -22
  375. package/node_modules/decompress-response/index.js +0 -58
  376. package/node_modules/decompress-response/license +0 -9
  377. package/node_modules/decompress-response/package.json +0 -56
  378. package/node_modules/decompress-response/readme.md +0 -48
  379. package/node_modules/defer-to-connect/LICENSE +0 -21
  380. package/node_modules/defer-to-connect/README.md +0 -38
  381. package/node_modules/defer-to-connect/dist/source/index.d.ts +0 -10
  382. package/node_modules/defer-to-connect/dist/source/index.js +0 -47
  383. package/node_modules/defer-to-connect/package.json +0 -71
  384. package/node_modules/end-of-stream/LICENSE +0 -21
  385. package/node_modules/end-of-stream/README.md +0 -54
  386. package/node_modules/end-of-stream/index.js +0 -94
  387. package/node_modules/end-of-stream/package.json +0 -37
  388. package/node_modules/get-stream/buffer-stream.js +0 -52
  389. package/node_modules/get-stream/index.d.ts +0 -108
  390. package/node_modules/get-stream/index.js +0 -60
  391. package/node_modules/get-stream/license +0 -9
  392. package/node_modules/get-stream/package.json +0 -50
  393. package/node_modules/get-stream/readme.md +0 -124
  394. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +0 -2
  395. package/node_modules/got/dist/source/as-promise/create-rejection.js +0 -30
  396. package/node_modules/got/dist/source/as-promise/index.d.ts +0 -3
  397. package/node_modules/got/dist/source/as-promise/index.js +0 -176
  398. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +0 -3
  399. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +0 -78
  400. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +0 -3
  401. package/node_modules/got/dist/source/as-promise/parse-body.js +0 -25
  402. package/node_modules/got/dist/source/as-promise/types.d.ts +0 -256
  403. package/node_modules/got/dist/source/as-promise/types.js +0 -42
  404. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +0 -5
  405. package/node_modules/got/dist/source/core/calculate-retry-delay.js +0 -29
  406. package/node_modules/got/dist/source/core/index.d.ts +0 -1124
  407. package/node_modules/got/dist/source/core/index.js +0 -1505
  408. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +0 -5
  409. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +0 -17
  410. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +0 -3
  411. package/node_modules/got/dist/source/core/utils/get-body-size.js +0 -32
  412. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +0 -4
  413. package/node_modules/got/dist/source/core/utils/get-buffer.js +0 -16
  414. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +0 -8
  415. package/node_modules/got/dist/source/core/utils/is-form-data.js +0 -4
  416. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +0 -2
  417. package/node_modules/got/dist/source/core/utils/is-response-ok.js +0 -8
  418. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +0 -14
  419. package/node_modules/got/dist/source/core/utils/options-to-url.js +0 -53
  420. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +0 -3
  421. package/node_modules/got/dist/source/core/utils/proxy-events.js +0 -17
  422. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +0 -29
  423. package/node_modules/got/dist/source/core/utils/timed-out.js +0 -121
  424. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +0 -11
  425. package/node_modules/got/dist/source/core/utils/unhandle.js +0 -22
  426. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +0 -15
  427. package/node_modules/got/dist/source/core/utils/url-to-options.js +0 -24
  428. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +0 -8
  429. package/node_modules/got/dist/source/core/utils/weakable-map.js +0 -29
  430. package/node_modules/got/dist/source/create.d.ts +0 -5
  431. package/node_modules/got/dist/source/create.js +0 -240
  432. package/node_modules/got/dist/source/index.d.ts +0 -4
  433. package/node_modules/got/dist/source/index.js +0 -132
  434. package/node_modules/got/dist/source/types.d.ts +0 -344
  435. package/node_modules/got/dist/source/types.js +0 -2
  436. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +0 -1
  437. package/node_modules/got/dist/source/utils/deep-freeze.js +0 -12
  438. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +0 -2
  439. package/node_modules/got/dist/source/utils/deprecation-warning.js +0 -13
  440. package/node_modules/got/license +0 -9
  441. package/node_modules/got/package.json +0 -131
  442. package/node_modules/got/readme.md +0 -2477
  443. package/node_modules/hpagent/.github/dependabot.yml +0 -8
  444. package/node_modules/hpagent/.github/workflows/build.yml +0 -29
  445. package/node_modules/hpagent/LICENSE +0 -21
  446. package/node_modules/hpagent/README.md +0 -138
  447. package/node_modules/hpagent/index.d.ts +0 -26
  448. package/node_modules/hpagent/index.js +0 -101
  449. package/node_modules/hpagent/index.mjs +0 -5
  450. package/node_modules/hpagent/package.json +0 -49
  451. package/node_modules/hpagent/test/got.test.js +0 -111
  452. package/node_modules/hpagent/test/http-http.test.js +0 -351
  453. package/node_modules/hpagent/test/http-https.test.js +0 -313
  454. package/node_modules/hpagent/test/https-http.test.js +0 -313
  455. package/node_modules/hpagent/test/https-https.test.js +0 -313
  456. package/node_modules/hpagent/test/index.test-d.ts +0 -45
  457. package/node_modules/hpagent/test/needle.test.js +0 -103
  458. package/node_modules/hpagent/test/node-fetch.test.js +0 -103
  459. package/node_modules/hpagent/test/simple-get.test.js +0 -139
  460. package/node_modules/hpagent/test/ssl.cert +0 -19
  461. package/node_modules/hpagent/test/ssl.key +0 -27
  462. package/node_modules/hpagent/test/utils.js +0 -59
  463. package/node_modules/http-cache-semantics/LICENSE +0 -9
  464. package/node_modules/http-cache-semantics/README.md +0 -203
  465. package/node_modules/http-cache-semantics/index.js +0 -674
  466. package/node_modules/http-cache-semantics/package.json +0 -18
  467. package/node_modules/http2-wrapper/LICENSE +0 -21
  468. package/node_modules/http2-wrapper/README.md +0 -470
  469. package/node_modules/http2-wrapper/package.json +0 -54
  470. package/node_modules/http2-wrapper/source/agent.js +0 -670
  471. package/node_modules/http2-wrapper/source/auto.js +0 -149
  472. package/node_modules/http2-wrapper/source/client-request.js +0 -445
  473. package/node_modules/http2-wrapper/source/incoming-message.js +0 -58
  474. package/node_modules/http2-wrapper/source/index.js +0 -28
  475. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +0 -27
  476. package/node_modules/http2-wrapper/source/utils/errors.js +0 -45
  477. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +0 -13
  478. package/node_modules/http2-wrapper/source/utils/proxy-events.js +0 -7
  479. package/node_modules/http2-wrapper/source/utils/url-to-options.js +0 -25
  480. package/node_modules/json-buffer/.travis.yml +0 -3
  481. package/node_modules/json-buffer/LICENSE +0 -22
  482. package/node_modules/json-buffer/README.md +0 -24
  483. package/node_modules/json-buffer/index.js +0 -58
  484. package/node_modules/json-buffer/package.json +0 -34
  485. package/node_modules/json-buffer/test/index.js +0 -63
  486. package/node_modules/keyv/README.md +0 -429
  487. package/node_modules/keyv/package.json +0 -57
  488. package/node_modules/keyv/src/index.d.ts +0 -112
  489. package/node_modules/keyv/src/index.js +0 -259
  490. package/node_modules/lowercase-keys/index.d.ts +0 -16
  491. package/node_modules/lowercase-keys/index.js +0 -10
  492. package/node_modules/lowercase-keys/license +0 -9
  493. package/node_modules/lowercase-keys/package.json +0 -38
  494. package/node_modules/lowercase-keys/readme.md +0 -32
  495. package/node_modules/mimic-response/index.d.ts +0 -17
  496. package/node_modules/mimic-response/index.js +0 -77
  497. package/node_modules/mimic-response/license +0 -9
  498. package/node_modules/mimic-response/package.json +0 -42
  499. package/node_modules/mimic-response/readme.md +0 -78
  500. package/node_modules/normalize-url/index.d.ts +0 -267
  501. package/node_modules/normalize-url/index.js +0 -216
  502. package/node_modules/normalize-url/license +0 -9
  503. package/node_modules/normalize-url/package.json +0 -50
  504. package/node_modules/normalize-url/readme.md +0 -286
  505. package/node_modules/once/LICENSE +0 -15
  506. package/node_modules/once/README.md +0 -79
  507. package/node_modules/once/once.js +0 -42
  508. package/node_modules/once/package.json +0 -33
  509. package/node_modules/p-cancelable/index.d.ts +0 -176
  510. package/node_modules/p-cancelable/index.js +0 -111
  511. package/node_modules/p-cancelable/license +0 -9
  512. package/node_modules/p-cancelable/package.json +0 -49
  513. package/node_modules/p-cancelable/readme.md +0 -153
  514. package/node_modules/pump/.github/FUNDING.yml +0 -2
  515. package/node_modules/pump/.travis.yml +0 -5
  516. package/node_modules/pump/LICENSE +0 -21
  517. package/node_modules/pump/README.md +0 -74
  518. package/node_modules/pump/SECURITY.md +0 -5
  519. package/node_modules/pump/index.js +0 -86
  520. package/node_modules/pump/package.json +0 -24
  521. package/node_modules/pump/test-browser.js +0 -66
  522. package/node_modules/pump/test-node.js +0 -53
  523. package/node_modules/quick-lru/index.d.ts +0 -97
  524. package/node_modules/quick-lru/index.js +0 -123
  525. package/node_modules/quick-lru/license +0 -9
  526. package/node_modules/quick-lru/package.json +0 -43
  527. package/node_modules/quick-lru/readme.md +0 -111
  528. package/node_modules/resolve-alpn/LICENSE +0 -22
  529. package/node_modules/resolve-alpn/README.md +0 -60
  530. package/node_modules/resolve-alpn/index.js +0 -43
  531. package/node_modules/resolve-alpn/package.json +0 -34
  532. package/node_modules/responselike/LICENSE +0 -19
  533. package/node_modules/responselike/README.md +0 -77
  534. package/node_modules/responselike/package.json +0 -39
  535. package/node_modules/responselike/src/index.js +0 -34
  536. package/node_modules/wrappy/LICENSE +0 -15
  537. package/node_modules/wrappy/README.md +0 -36
  538. package/node_modules/wrappy/package.json +0 -29
  539. package/node_modules/wrappy/wrappy.js +0 -33
@@ -1,1029 +0,0 @@
1
- /**
2
- * > Stability: 2 - Stable
3
- *
4
- * The `node:net` module provides an asynchronous network API for creating stream-based
5
- * TCP or `IPC` servers ({@link createServer}) and clients
6
- * ({@link createConnection}).
7
- *
8
- * It can be accessed using:
9
- *
10
- * ```js
11
- * import net from 'node:net';
12
- * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js)
14
- */
15
- declare module "net" {
16
- import * as stream from "node:stream";
17
- import { Abortable, EventEmitter } from "node:events";
18
- import * as dns from "node:dns";
19
- type LookupFunction = (
20
- hostname: string,
21
- options: dns.LookupOptions,
22
- callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void,
23
- ) => void;
24
- interface AddressInfo {
25
- address: string;
26
- family: string;
27
- port: number;
28
- }
29
- interface SocketConstructorOpts {
30
- fd?: number | undefined;
31
- allowHalfOpen?: boolean | undefined;
32
- onread?: OnReadOpts | undefined;
33
- readable?: boolean | undefined;
34
- writable?: boolean | undefined;
35
- signal?: AbortSignal;
36
- }
37
- interface OnReadOpts {
38
- buffer: Uint8Array | (() => Uint8Array);
39
- /**
40
- * This function is called for every chunk of incoming data.
41
- * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`.
42
- * Return `false` from this function to implicitly `pause()` the socket.
43
- */
44
- callback(bytesWritten: number, buffer: Uint8Array): boolean;
45
- }
46
- // TODO: remove empty ConnectOpts placeholder at next major @types/node version.
47
- /** @deprecated */
48
- interface ConnectOpts {}
49
- interface TcpSocketConnectOpts {
50
- port: number;
51
- host?: string | undefined;
52
- localAddress?: string | undefined;
53
- localPort?: number | undefined;
54
- hints?: number | undefined;
55
- family?: number | undefined;
56
- lookup?: LookupFunction | undefined;
57
- noDelay?: boolean | undefined;
58
- keepAlive?: boolean | undefined;
59
- keepAliveInitialDelay?: number | undefined;
60
- /**
61
- * @since v18.13.0
62
- */
63
- autoSelectFamily?: boolean | undefined;
64
- /**
65
- * @since v18.13.0
66
- */
67
- autoSelectFamilyAttemptTimeout?: number | undefined;
68
- blockList?: BlockList | undefined;
69
- }
70
- interface IpcSocketConnectOpts {
71
- path: string;
72
- }
73
- type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
74
- type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
75
- /**
76
- * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
77
- * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
78
- * an `EventEmitter`.
79
- *
80
- * A `net.Socket` can be created by the user and used directly to interact with
81
- * a server. For example, it is returned by {@link createConnection},
82
- * so the user can use it to talk to the server.
83
- *
84
- * It can also be created by Node.js and passed to the user when a connection
85
- * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
86
- * it to interact with the client.
87
- * @since v0.3.4
88
- */
89
- class Socket extends stream.Duplex {
90
- constructor(options?: SocketConstructorOpts);
91
- /**
92
- * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
93
- * If the socket is still writable it implicitly calls `socket.end()`.
94
- * @since v0.3.4
95
- */
96
- destroySoon(): void;
97
- /**
98
- * Sends data on the socket. The second parameter specifies the encoding in the
99
- * case of a string. It defaults to UTF8 encoding.
100
- *
101
- * Returns `true` if the entire data was flushed successfully to the kernel
102
- * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
103
- *
104
- * The optional `callback` parameter will be executed when the data is finally
105
- * written out, which may not be immediately.
106
- *
107
- * See `Writable` stream `write()` method for more
108
- * information.
109
- * @since v0.1.90
110
- * @param [encoding='utf8'] Only used when data is `string`.
111
- */
112
- write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
113
- write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
114
- /**
115
- * Initiate a connection on a given socket.
116
- *
117
- * Possible signatures:
118
- *
119
- * * `socket.connect(options[, connectListener])`
120
- * * `socket.connect(path[, connectListener])` for `IPC` connections.
121
- * * `socket.connect(port[, host][, connectListener])` for TCP connections.
122
- * * Returns: `net.Socket` The socket itself.
123
- *
124
- * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
125
- * instead of a `'connect'` event, an `'error'` event will be emitted with
126
- * the error passed to the `'error'` listener.
127
- * The last parameter `connectListener`, if supplied, will be added as a listener
128
- * for the `'connect'` event **once**.
129
- *
130
- * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
131
- * behavior.
132
- */
133
- connect(options: SocketConnectOpts, connectionListener?: () => void): this;
134
- connect(port: number, host: string, connectionListener?: () => void): this;
135
- connect(port: number, connectionListener?: () => void): this;
136
- connect(path: string, connectionListener?: () => void): this;
137
- /**
138
- * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
139
- * @since v0.1.90
140
- * @return The socket itself.
141
- */
142
- setEncoding(encoding?: BufferEncoding): this;
143
- /**
144
- * Pauses the reading of data. That is, `'data'` events will not be emitted.
145
- * Useful to throttle back an upload.
146
- * @return The socket itself.
147
- */
148
- pause(): this;
149
- /**
150
- * Close the TCP connection by sending an RST packet and destroy the stream.
151
- * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
152
- * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
153
- * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
154
- * @since v18.3.0, v16.17.0
155
- */
156
- resetAndDestroy(): this;
157
- /**
158
- * Resumes reading after a call to `socket.pause()`.
159
- * @return The socket itself.
160
- */
161
- resume(): this;
162
- /**
163
- * Sets the socket to timeout after `timeout` milliseconds of inactivity on
164
- * the socket. By default `net.Socket` do not have a timeout.
165
- *
166
- * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
167
- * end the connection.
168
- *
169
- * ```js
170
- * socket.setTimeout(3000);
171
- * socket.on('timeout', () => {
172
- * console.log('socket timeout');
173
- * socket.end();
174
- * });
175
- * ```
176
- *
177
- * If `timeout` is 0, then the existing idle timeout is disabled.
178
- *
179
- * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
180
- * @since v0.1.90
181
- * @return The socket itself.
182
- */
183
- setTimeout(timeout: number, callback?: () => void): this;
184
- /**
185
- * Enable/disable the use of Nagle's algorithm.
186
- *
187
- * When a TCP connection is created, it will have Nagle's algorithm enabled.
188
- *
189
- * Nagle's algorithm delays data before it is sent via the network. It attempts
190
- * to optimize throughput at the expense of latency.
191
- *
192
- * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
193
- * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
194
- * algorithm.
195
- * @since v0.1.90
196
- * @param [noDelay=true]
197
- * @return The socket itself.
198
- */
199
- setNoDelay(noDelay?: boolean): this;
200
- /**
201
- * Enable/disable keep-alive functionality, and optionally set the initial
202
- * delay before the first keepalive probe is sent on an idle socket.
203
- *
204
- * Set `initialDelay` (in milliseconds) to set the delay between the last
205
- * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
206
- * (or previous) setting.
207
- *
208
- * Enabling the keep-alive functionality will set the following socket options:
209
- *
210
- * * `SO_KEEPALIVE=1`
211
- * * `TCP_KEEPIDLE=initialDelay`
212
- * * `TCP_KEEPCNT=10`
213
- * * `TCP_KEEPINTVL=1`
214
- * @since v0.1.92
215
- * @param [enable=false]
216
- * @param [initialDelay=0]
217
- * @return The socket itself.
218
- */
219
- setKeepAlive(enable?: boolean, initialDelay?: number): this;
220
- /**
221
- * Returns the bound `address`, the address `family` name and `port` of the
222
- * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
223
- * @since v0.1.90
224
- */
225
- address(): AddressInfo | {};
226
- /**
227
- * Calling `unref()` on a socket will allow the program to exit if this is the only
228
- * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
229
- * @since v0.9.1
230
- * @return The socket itself.
231
- */
232
- unref(): this;
233
- /**
234
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
235
- * If the socket is `ref`ed calling `ref` again will have no effect.
236
- * @since v0.9.1
237
- * @return The socket itself.
238
- */
239
- ref(): this;
240
- /**
241
- * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)`
242
- * and it is an array of the addresses that have been attempted.
243
- *
244
- * Each address is a string in the form of `$IP:$PORT`.
245
- * If the connection was successful, then the last address is the one that the socket is currently connected to.
246
- * @since v19.4.0
247
- */
248
- readonly autoSelectFamilyAttemptedAddresses: string[];
249
- /**
250
- * This property shows the number of characters buffered for writing. The buffer
251
- * may contain strings whose length after encoding is not yet known. So this number
252
- * is only an approximation of the number of bytes in the buffer.
253
- *
254
- * `net.Socket` has the property that `socket.write()` always works. This is to
255
- * help users get up and running quickly. The computer cannot always keep up
256
- * with the amount of data that is written to a socket. The network connection
257
- * simply might be too slow. Node.js will internally queue up the data written to a
258
- * socket and send it out over the wire when it is possible.
259
- *
260
- * The consequence of this internal buffering is that memory may grow.
261
- * Users who experience large or growing `bufferSize` should attempt to
262
- * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
263
- * @since v0.3.8
264
- * @deprecated Since v14.6.0 - Use `writableLength` instead.
265
- */
266
- readonly bufferSize: number;
267
- /**
268
- * The amount of received bytes.
269
- * @since v0.5.3
270
- */
271
- readonly bytesRead: number;
272
- /**
273
- * The amount of bytes sent.
274
- * @since v0.5.3
275
- */
276
- readonly bytesWritten: number;
277
- /**
278
- * If `true`, `socket.connect(options[, connectListener])` was
279
- * called and has not yet finished. It will stay `true` until the socket becomes
280
- * connected, then it is set to `false` and the `'connect'` event is emitted. Note
281
- * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
282
- * @since v6.1.0
283
- */
284
- readonly connecting: boolean;
285
- /**
286
- * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
287
- * (see `socket.connecting`).
288
- * @since v11.2.0, v10.16.0
289
- */
290
- readonly pending: boolean;
291
- /**
292
- * See `writable.destroyed` for further details.
293
- */
294
- readonly destroyed: boolean;
295
- /**
296
- * The string representation of the local IP address the remote client is
297
- * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
298
- * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
299
- * @since v0.9.6
300
- */
301
- readonly localAddress?: string;
302
- /**
303
- * The numeric representation of the local port. For example, `80` or `21`.
304
- * @since v0.9.6
305
- */
306
- readonly localPort?: number;
307
- /**
308
- * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
309
- * @since v18.8.0, v16.18.0
310
- */
311
- readonly localFamily?: string;
312
- /**
313
- * This property represents the state of the connection as a string.
314
- *
315
- * * If the stream is connecting `socket.readyState` is `opening`.
316
- * * If the stream is readable and writable, it is `open`.
317
- * * If the stream is readable and not writable, it is `readOnly`.
318
- * * If the stream is not readable and writable, it is `writeOnly`.
319
- * @since v0.5.0
320
- */
321
- readonly readyState: SocketReadyState;
322
- /**
323
- * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
324
- * the socket is destroyed (for example, if the client disconnected).
325
- * @since v0.5.10
326
- */
327
- readonly remoteAddress?: string | undefined;
328
- /**
329
- * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
330
- * the socket is destroyed (for example, if the client disconnected).
331
- * @since v0.11.14
332
- */
333
- readonly remoteFamily?: string | undefined;
334
- /**
335
- * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
336
- * the socket is destroyed (for example, if the client disconnected).
337
- * @since v0.5.10
338
- */
339
- readonly remotePort?: number | undefined;
340
- /**
341
- * The socket timeout in milliseconds as set by `socket.setTimeout()`.
342
- * It is `undefined` if a timeout has not been set.
343
- * @since v10.7.0
344
- */
345
- readonly timeout?: number | undefined;
346
- /**
347
- * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
348
- * server will still send some data.
349
- *
350
- * See `writable.end()` for further details.
351
- * @since v0.1.90
352
- * @param [encoding='utf8'] Only used when data is `string`.
353
- * @param callback Optional callback for when the socket is finished.
354
- * @return The socket itself.
355
- */
356
- end(callback?: () => void): this;
357
- end(buffer: Uint8Array | string, callback?: () => void): this;
358
- end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
359
- /**
360
- * events.EventEmitter
361
- * 1. close
362
- * 2. connect
363
- * 3. connectionAttempt
364
- * 4. connectionAttemptFailed
365
- * 5. connectionAttemptTimeout
366
- * 6. data
367
- * 7. drain
368
- * 8. end
369
- * 9. error
370
- * 10. lookup
371
- * 11. ready
372
- * 12. timeout
373
- */
374
- addListener(event: string, listener: (...args: any[]) => void): this;
375
- addListener(event: "close", listener: (hadError: boolean) => void): this;
376
- addListener(event: "connect", listener: () => void): this;
377
- addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
378
- addListener(
379
- event: "connectionAttemptFailed",
380
- listener: (ip: string, port: number, family: number) => void,
381
- ): this;
382
- addListener(
383
- event: "connectionAttemptTimeout",
384
- listener: (ip: string, port: number, family: number) => void,
385
- ): this;
386
- addListener(event: "data", listener: (data: Buffer) => void): this;
387
- addListener(event: "drain", listener: () => void): this;
388
- addListener(event: "end", listener: () => void): this;
389
- addListener(event: "error", listener: (err: Error) => void): this;
390
- addListener(
391
- event: "lookup",
392
- listener: (err: Error, address: string, family: string | number, host: string) => void,
393
- ): this;
394
- addListener(event: "ready", listener: () => void): this;
395
- addListener(event: "timeout", listener: () => void): this;
396
- emit(event: string | symbol, ...args: any[]): boolean;
397
- emit(event: "close", hadError: boolean): boolean;
398
- emit(event: "connect"): boolean;
399
- emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean;
400
- emit(event: "connectionAttemptFailed", ip: string, port: number, family: number): boolean;
401
- emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean;
402
- emit(event: "data", data: Buffer): boolean;
403
- emit(event: "drain"): boolean;
404
- emit(event: "end"): boolean;
405
- emit(event: "error", err: Error): boolean;
406
- emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
407
- emit(event: "ready"): boolean;
408
- emit(event: "timeout"): boolean;
409
- on(event: string, listener: (...args: any[]) => void): this;
410
- on(event: "close", listener: (hadError: boolean) => void): this;
411
- on(event: "connect", listener: () => void): this;
412
- on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
413
- on(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this;
414
- on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
415
- on(event: "data", listener: (data: Buffer) => void): this;
416
- on(event: "drain", listener: () => void): this;
417
- on(event: "end", listener: () => void): this;
418
- on(event: "error", listener: (err: Error) => void): this;
419
- on(
420
- event: "lookup",
421
- listener: (err: Error, address: string, family: string | number, host: string) => void,
422
- ): this;
423
- on(event: "ready", listener: () => void): this;
424
- on(event: "timeout", listener: () => void): this;
425
- once(event: string, listener: (...args: any[]) => void): this;
426
- once(event: "close", listener: (hadError: boolean) => void): this;
427
- once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
428
- once(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this;
429
- once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
430
- once(event: "connect", listener: () => void): this;
431
- once(event: "data", listener: (data: Buffer) => void): this;
432
- once(event: "drain", listener: () => void): this;
433
- once(event: "end", listener: () => void): this;
434
- once(event: "error", listener: (err: Error) => void): this;
435
- once(
436
- event: "lookup",
437
- listener: (err: Error, address: string, family: string | number, host: string) => void,
438
- ): this;
439
- once(event: "ready", listener: () => void): this;
440
- once(event: "timeout", listener: () => void): this;
441
- prependListener(event: string, listener: (...args: any[]) => void): this;
442
- prependListener(event: "close", listener: (hadError: boolean) => void): this;
443
- prependListener(event: "connect", listener: () => void): this;
444
- prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
445
- prependListener(
446
- event: "connectionAttemptFailed",
447
- listener: (ip: string, port: number, family: number) => void,
448
- ): this;
449
- prependListener(
450
- event: "connectionAttemptTimeout",
451
- listener: (ip: string, port: number, family: number) => void,
452
- ): this;
453
- prependListener(event: "data", listener: (data: Buffer) => void): this;
454
- prependListener(event: "drain", listener: () => void): this;
455
- prependListener(event: "end", listener: () => void): this;
456
- prependListener(event: "error", listener: (err: Error) => void): this;
457
- prependListener(
458
- event: "lookup",
459
- listener: (err: Error, address: string, family: string | number, host: string) => void,
460
- ): this;
461
- prependListener(event: "ready", listener: () => void): this;
462
- prependListener(event: "timeout", listener: () => void): this;
463
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
464
- prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
465
- prependOnceListener(event: "connect", listener: () => void): this;
466
- prependOnceListener(
467
- event: "connectionAttempt",
468
- listener: (ip: string, port: number, family: number) => void,
469
- ): this;
470
- prependOnceListener(
471
- event: "connectionAttemptFailed",
472
- listener: (ip: string, port: number, family: number) => void,
473
- ): this;
474
- prependOnceListener(
475
- event: "connectionAttemptTimeout",
476
- listener: (ip: string, port: number, family: number) => void,
477
- ): this;
478
- prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
479
- prependOnceListener(event: "drain", listener: () => void): this;
480
- prependOnceListener(event: "end", listener: () => void): this;
481
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
482
- prependOnceListener(
483
- event: "lookup",
484
- listener: (err: Error, address: string, family: string | number, host: string) => void,
485
- ): this;
486
- prependOnceListener(event: "ready", listener: () => void): this;
487
- prependOnceListener(event: "timeout", listener: () => void): this;
488
- }
489
- interface ListenOptions extends Abortable {
490
- backlog?: number | undefined;
491
- exclusive?: boolean | undefined;
492
- host?: string | undefined;
493
- /**
494
- * @default false
495
- */
496
- ipv6Only?: boolean | undefined;
497
- reusePort?: boolean | undefined;
498
- path?: string | undefined;
499
- port?: number | undefined;
500
- readableAll?: boolean | undefined;
501
- writableAll?: boolean | undefined;
502
- }
503
- interface ServerOpts {
504
- /**
505
- * Indicates whether half-opened TCP connections are allowed.
506
- * @default false
507
- */
508
- allowHalfOpen?: boolean | undefined;
509
- /**
510
- * Indicates whether the socket should be paused on incoming connections.
511
- * @default false
512
- */
513
- pauseOnConnect?: boolean | undefined;
514
- /**
515
- * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
516
- * @default false
517
- * @since v16.5.0
518
- */
519
- noDelay?: boolean | undefined;
520
- /**
521
- * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
522
- * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
523
- * @default false
524
- * @since v16.5.0
525
- */
526
- keepAlive?: boolean | undefined;
527
- /**
528
- * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
529
- * @default 0
530
- * @since v16.5.0
531
- */
532
- keepAliveInitialDelay?: number | undefined;
533
- /**
534
- * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
535
- * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
536
- * @since v18.17.0, v20.1.0
537
- */
538
- highWaterMark?: number | undefined;
539
- /**
540
- * `blockList` can be used for disabling inbound
541
- * access to specific IP addresses, IP ranges, or IP subnets. This does not
542
- * work if the server is behind a reverse proxy, NAT, etc. because the address
543
- * checked against the block list is the address of the proxy, or the one
544
- * specified by the NAT.
545
- * @since v22.13.0
546
- */
547
- blockList?: BlockList | undefined;
548
- }
549
- interface DropArgument {
550
- localAddress?: string;
551
- localPort?: number;
552
- localFamily?: string;
553
- remoteAddress?: string;
554
- remotePort?: number;
555
- remoteFamily?: string;
556
- }
557
- /**
558
- * This class is used to create a TCP or `IPC` server.
559
- * @since v0.1.90
560
- */
561
- class Server extends EventEmitter {
562
- constructor(connectionListener?: (socket: Socket) => void);
563
- constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
564
- /**
565
- * Start a server listening for connections. A `net.Server` can be a TCP or
566
- * an `IPC` server depending on what it listens to.
567
- *
568
- * Possible signatures:
569
- *
570
- * * `server.listen(handle[, backlog][, callback])`
571
- * * `server.listen(options[, callback])`
572
- * * `server.listen(path[, backlog][, callback])` for `IPC` servers
573
- * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
574
- *
575
- * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
576
- * event.
577
- *
578
- * All `listen()` methods can take a `backlog` parameter to specify the maximum
579
- * length of the queue of pending connections. The actual length will be determined
580
- * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512).
581
- *
582
- * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
583
- * details).
584
- *
585
- * The `server.listen()` method can be called again if and only if there was an
586
- * error during the first `server.listen()` call or `server.close()` has been
587
- * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
588
- *
589
- * One of the most common errors raised when listening is `EADDRINUSE`.
590
- * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
591
- * after a certain amount of time:
592
- *
593
- * ```js
594
- * server.on('error', (e) => {
595
- * if (e.code === 'EADDRINUSE') {
596
- * console.error('Address in use, retrying...');
597
- * setTimeout(() => {
598
- * server.close();
599
- * server.listen(PORT, HOST);
600
- * }, 1000);
601
- * }
602
- * });
603
- * ```
604
- */
605
- listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
606
- listen(port?: number, hostname?: string, listeningListener?: () => void): this;
607
- listen(port?: number, backlog?: number, listeningListener?: () => void): this;
608
- listen(port?: number, listeningListener?: () => void): this;
609
- listen(path: string, backlog?: number, listeningListener?: () => void): this;
610
- listen(path: string, listeningListener?: () => void): this;
611
- listen(options: ListenOptions, listeningListener?: () => void): this;
612
- listen(handle: any, backlog?: number, listeningListener?: () => void): this;
613
- listen(handle: any, listeningListener?: () => void): this;
614
- /**
615
- * Stops the server from accepting new connections and keeps existing
616
- * connections. This function is asynchronous, the server is finally closed
617
- * when all connections are ended and the server emits a `'close'` event.
618
- * The optional `callback` will be called once the `'close'` event occurs. Unlike
619
- * that event, it will be called with an `Error` as its only argument if the server
620
- * was not open when it was closed.
621
- * @since v0.1.90
622
- * @param callback Called when the server is closed.
623
- */
624
- close(callback?: (err?: Error) => void): this;
625
- /**
626
- * Returns the bound `address`, the address `family` name, and `port` of the server
627
- * as reported by the operating system if listening on an IP socket
628
- * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
629
- *
630
- * For a server listening on a pipe or Unix domain socket, the name is returned
631
- * as a string.
632
- *
633
- * ```js
634
- * const server = net.createServer((socket) => {
635
- * socket.end('goodbye\n');
636
- * }).on('error', (err) => {
637
- * // Handle errors here.
638
- * throw err;
639
- * });
640
- *
641
- * // Grab an arbitrary unused port.
642
- * server.listen(() => {
643
- * console.log('opened server on', server.address());
644
- * });
645
- * ```
646
- *
647
- * `server.address()` returns `null` before the `'listening'` event has been
648
- * emitted or after calling `server.close()`.
649
- * @since v0.1.90
650
- */
651
- address(): AddressInfo | string | null;
652
- /**
653
- * Asynchronously get the number of concurrent connections on the server. Works
654
- * when sockets were sent to forks.
655
- *
656
- * Callback should take two arguments `err` and `count`.
657
- * @since v0.9.7
658
- */
659
- getConnections(cb: (error: Error | null, count: number) => void): void;
660
- /**
661
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
662
- * If the server is `ref`ed calling `ref()` again will have no effect.
663
- * @since v0.9.1
664
- */
665
- ref(): this;
666
- /**
667
- * Calling `unref()` on a server will allow the program to exit if this is the only
668
- * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
669
- * @since v0.9.1
670
- */
671
- unref(): this;
672
- /**
673
- * Set this property to reject connections when the server's connection count gets
674
- * high.
675
- *
676
- * It is not recommended to use this option once a socket has been sent to a child
677
- * with `child_process.fork()`.
678
- * @since v0.2.0
679
- */
680
- maxConnections: number;
681
- connections: number;
682
- /**
683
- * Indicates whether or not the server is listening for connections.
684
- * @since v5.7.0
685
- */
686
- readonly listening: boolean;
687
- /**
688
- * events.EventEmitter
689
- * 1. close
690
- * 2. connection
691
- * 3. error
692
- * 4. listening
693
- * 5. drop
694
- */
695
- addListener(event: string, listener: (...args: any[]) => void): this;
696
- addListener(event: "close", listener: () => void): this;
697
- addListener(event: "connection", listener: (socket: Socket) => void): this;
698
- addListener(event: "error", listener: (err: Error) => void): this;
699
- addListener(event: "listening", listener: () => void): this;
700
- addListener(event: "drop", listener: (data?: DropArgument) => void): this;
701
- emit(event: string | symbol, ...args: any[]): boolean;
702
- emit(event: "close"): boolean;
703
- emit(event: "connection", socket: Socket): boolean;
704
- emit(event: "error", err: Error): boolean;
705
- emit(event: "listening"): boolean;
706
- emit(event: "drop", data?: DropArgument): boolean;
707
- on(event: string, listener: (...args: any[]) => void): this;
708
- on(event: "close", listener: () => void): this;
709
- on(event: "connection", listener: (socket: Socket) => void): this;
710
- on(event: "error", listener: (err: Error) => void): this;
711
- on(event: "listening", listener: () => void): this;
712
- on(event: "drop", listener: (data?: DropArgument) => void): this;
713
- once(event: string, listener: (...args: any[]) => void): this;
714
- once(event: "close", listener: () => void): this;
715
- once(event: "connection", listener: (socket: Socket) => void): this;
716
- once(event: "error", listener: (err: Error) => void): this;
717
- once(event: "listening", listener: () => void): this;
718
- once(event: "drop", listener: (data?: DropArgument) => void): this;
719
- prependListener(event: string, listener: (...args: any[]) => void): this;
720
- prependListener(event: "close", listener: () => void): this;
721
- prependListener(event: "connection", listener: (socket: Socket) => void): this;
722
- prependListener(event: "error", listener: (err: Error) => void): this;
723
- prependListener(event: "listening", listener: () => void): this;
724
- prependListener(event: "drop", listener: (data?: DropArgument) => void): this;
725
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
726
- prependOnceListener(event: "close", listener: () => void): this;
727
- prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
728
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
729
- prependOnceListener(event: "listening", listener: () => void): this;
730
- prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this;
731
- /**
732
- * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
733
- * @since v20.5.0
734
- */
735
- [Symbol.asyncDispose](): Promise<void>;
736
- }
737
- type IPVersion = "ipv4" | "ipv6";
738
- /**
739
- * The `BlockList` object can be used with some network APIs to specify rules for
740
- * disabling inbound or outbound access to specific IP addresses, IP ranges, or
741
- * IP subnets.
742
- * @since v15.0.0, v14.18.0
743
- */
744
- class BlockList {
745
- /**
746
- * Adds a rule to block the given IP address.
747
- * @since v15.0.0, v14.18.0
748
- * @param address An IPv4 or IPv6 address.
749
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
750
- */
751
- addAddress(address: string, type?: IPVersion): void;
752
- addAddress(address: SocketAddress): void;
753
- /**
754
- * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
755
- * @since v15.0.0, v14.18.0
756
- * @param start The starting IPv4 or IPv6 address in the range.
757
- * @param end The ending IPv4 or IPv6 address in the range.
758
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
759
- */
760
- addRange(start: string, end: string, type?: IPVersion): void;
761
- addRange(start: SocketAddress, end: SocketAddress): void;
762
- /**
763
- * Adds a rule to block a range of IP addresses specified as a subnet mask.
764
- * @since v15.0.0, v14.18.0
765
- * @param net The network IPv4 or IPv6 address.
766
- * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
767
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
768
- */
769
- addSubnet(net: SocketAddress, prefix: number): void;
770
- addSubnet(net: string, prefix: number, type?: IPVersion): void;
771
- /**
772
- * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
773
- *
774
- * ```js
775
- * const blockList = new net.BlockList();
776
- * blockList.addAddress('123.123.123.123');
777
- * blockList.addRange('10.0.0.1', '10.0.0.10');
778
- * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
779
- *
780
- * console.log(blockList.check('123.123.123.123')); // Prints: true
781
- * console.log(blockList.check('10.0.0.3')); // Prints: true
782
- * console.log(blockList.check('222.111.111.222')); // Prints: false
783
- *
784
- * // IPv6 notation for IPv4 addresses works:
785
- * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
786
- * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
787
- * ```
788
- * @since v15.0.0, v14.18.0
789
- * @param address The IP address to check
790
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
791
- */
792
- check(address: SocketAddress): boolean;
793
- check(address: string, type?: IPVersion): boolean;
794
- /**
795
- * The list of rules added to the blocklist.
796
- * @since v15.0.0, v14.18.0
797
- */
798
- rules: readonly string[];
799
- /**
800
- * Returns `true` if the `value` is a `net.BlockList`.
801
- * @since v22.13.0
802
- * @param value Any JS value
803
- */
804
- static isBlockList(value: unknown): value is BlockList;
805
- }
806
- interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
807
- timeout?: number | undefined;
808
- }
809
- interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
810
- timeout?: number | undefined;
811
- }
812
- type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
813
- /**
814
- * Creates a new TCP or `IPC` server.
815
- *
816
- * If `allowHalfOpen` is set to `true`, when the other end of the socket
817
- * signals the end of transmission, the server will only send back the end of
818
- * transmission when `socket.end()` is explicitly called. For example, in the
819
- * context of TCP, when a FIN packed is received, a FIN packed is sent
820
- * back only when `socket.end()` is explicitly called. Until then the
821
- * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
822
- *
823
- * If `pauseOnConnect` is set to `true`, then the socket associated with each
824
- * incoming connection will be paused, and no data will be read from its handle.
825
- * This allows connections to be passed between processes without any data being
826
- * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
827
- *
828
- * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
829
- *
830
- * Here is an example of a TCP echo server which listens for connections
831
- * on port 8124:
832
- *
833
- * ```js
834
- * import net from 'node:net';
835
- * const server = net.createServer((c) => {
836
- * // 'connection' listener.
837
- * console.log('client connected');
838
- * c.on('end', () => {
839
- * console.log('client disconnected');
840
- * });
841
- * c.write('hello\r\n');
842
- * c.pipe(c);
843
- * });
844
- * server.on('error', (err) => {
845
- * throw err;
846
- * });
847
- * server.listen(8124, () => {
848
- * console.log('server bound');
849
- * });
850
- * ```
851
- *
852
- * Test this by using `telnet`:
853
- *
854
- * ```bash
855
- * telnet localhost 8124
856
- * ```
857
- *
858
- * To listen on the socket `/tmp/echo.sock`:
859
- *
860
- * ```js
861
- * server.listen('/tmp/echo.sock', () => {
862
- * console.log('server bound');
863
- * });
864
- * ```
865
- *
866
- * Use `nc` to connect to a Unix domain socket server:
867
- *
868
- * ```bash
869
- * nc -U /tmp/echo.sock
870
- * ```
871
- * @since v0.5.0
872
- * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
873
- */
874
- function createServer(connectionListener?: (socket: Socket) => void): Server;
875
- function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
876
- /**
877
- * Aliases to {@link createConnection}.
878
- *
879
- * Possible signatures:
880
- *
881
- * * {@link connect}
882
- * * {@link connect} for `IPC` connections.
883
- * * {@link connect} for TCP connections.
884
- */
885
- function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
886
- function connect(port: number, host?: string, connectionListener?: () => void): Socket;
887
- function connect(path: string, connectionListener?: () => void): Socket;
888
- /**
889
- * A factory function, which creates a new {@link Socket},
890
- * immediately initiates connection with `socket.connect()`,
891
- * then returns the `net.Socket` that starts the connection.
892
- *
893
- * When the connection is established, a `'connect'` event will be emitted
894
- * on the returned socket. The last parameter `connectListener`, if supplied,
895
- * will be added as a listener for the `'connect'` event **once**.
896
- *
897
- * Possible signatures:
898
- *
899
- * * {@link createConnection}
900
- * * {@link createConnection} for `IPC` connections.
901
- * * {@link createConnection} for TCP connections.
902
- *
903
- * The {@link connect} function is an alias to this function.
904
- */
905
- function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
906
- function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
907
- function createConnection(path: string, connectionListener?: () => void): Socket;
908
- /**
909
- * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`.
910
- * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided.
911
- * @since v19.4.0
912
- */
913
- function getDefaultAutoSelectFamily(): boolean;
914
- /**
915
- * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
916
- * @param value The new default value.
917
- * The initial default value is `true`, unless the command line option
918
- * `--no-network-family-autoselection` is provided.
919
- * @since v19.4.0
920
- */
921
- function setDefaultAutoSelectFamily(value: boolean): void;
922
- /**
923
- * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
924
- * The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
925
- * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
926
- * @since v19.8.0, v18.8.0
927
- */
928
- function getDefaultAutoSelectFamilyAttemptTimeout(): number;
929
- /**
930
- * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
931
- * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line
932
- * option `--network-family-autoselection-attempt-timeout`.
933
- * @since v19.8.0, v18.8.0
934
- */
935
- function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;
936
- /**
937
- * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
938
- * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
939
- *
940
- * ```js
941
- * net.isIP('::1'); // returns 6
942
- * net.isIP('127.0.0.1'); // returns 4
943
- * net.isIP('127.000.000.001'); // returns 0
944
- * net.isIP('127.0.0.1/24'); // returns 0
945
- * net.isIP('fhqwhgads'); // returns 0
946
- * ```
947
- * @since v0.3.0
948
- */
949
- function isIP(input: string): number;
950
- /**
951
- * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
952
- * leading zeroes. Otherwise, returns `false`.
953
- *
954
- * ```js
955
- * net.isIPv4('127.0.0.1'); // returns true
956
- * net.isIPv4('127.000.000.001'); // returns false
957
- * net.isIPv4('127.0.0.1/24'); // returns false
958
- * net.isIPv4('fhqwhgads'); // returns false
959
- * ```
960
- * @since v0.3.0
961
- */
962
- function isIPv4(input: string): boolean;
963
- /**
964
- * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
965
- *
966
- * ```js
967
- * net.isIPv6('::1'); // returns true
968
- * net.isIPv6('fhqwhgads'); // returns false
969
- * ```
970
- * @since v0.3.0
971
- */
972
- function isIPv6(input: string): boolean;
973
- interface SocketAddressInitOptions {
974
- /**
975
- * The network address as either an IPv4 or IPv6 string.
976
- * @default 127.0.0.1
977
- */
978
- address?: string | undefined;
979
- /**
980
- * @default `'ipv4'`
981
- */
982
- family?: IPVersion | undefined;
983
- /**
984
- * An IPv6 flow-label used only if `family` is `'ipv6'`.
985
- * @default 0
986
- */
987
- flowlabel?: number | undefined;
988
- /**
989
- * An IP port.
990
- * @default 0
991
- */
992
- port?: number | undefined;
993
- }
994
- /**
995
- * @since v15.14.0, v14.18.0
996
- */
997
- class SocketAddress {
998
- constructor(options: SocketAddressInitOptions);
999
- /**
1000
- * Either \`'ipv4'\` or \`'ipv6'\`.
1001
- * @since v15.14.0, v14.18.0
1002
- */
1003
- readonly address: string;
1004
- /**
1005
- * Either \`'ipv4'\` or \`'ipv6'\`.
1006
- * @since v15.14.0, v14.18.0
1007
- */
1008
- readonly family: IPVersion;
1009
- /**
1010
- * @since v15.14.0, v14.18.0
1011
- */
1012
- readonly port: number;
1013
- /**
1014
- * @since v15.14.0, v14.18.0
1015
- */
1016
- readonly flowlabel: number;
1017
- /**
1018
- * @since v22.13.0
1019
- * @param input An input string containing an IP address and optional port,
1020
- * e.g. `123.1.2.3:1234` or `[1::1]:1234`.
1021
- * @returns Returns a `SocketAddress` if parsing was successful.
1022
- * Otherwise returns `undefined`.
1023
- */
1024
- static parse(input: string): SocketAddress | undefined;
1025
- }
1026
- }
1027
- declare module "node:net" {
1028
- export * from "net";
1029
- }