cdk-ecr-deployment 0.0.75 → 0.0.81

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 (357) hide show
  1. package/.gitattributes +20 -21
  2. package/.jsii +43 -35
  3. package/lambda/Dockerfile +25 -0
  4. package/lambda/install.js +64 -0
  5. package/lib/index.js +40 -23
  6. package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
  7. package/node_modules/@sindresorhus/is/dist/index.js +427 -0
  8. package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
  9. package/node_modules/@sindresorhus/is/dist/types.js +3 -0
  10. package/node_modules/@sindresorhus/is/license +9 -0
  11. package/node_modules/@sindresorhus/is/package.json +96 -0
  12. package/node_modules/@sindresorhus/is/readme.md +628 -0
  13. package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  14. package/node_modules/@szmarczak/http-timer/README.md +93 -0
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  16. package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
  17. package/node_modules/@szmarczak/http-timer/package.json +72 -0
  18. package/node_modules/@types/cacheable-request/LICENSE +21 -0
  19. package/node_modules/@types/cacheable-request/README.md +16 -0
  20. package/node_modules/@types/cacheable-request/index.d.ts +137 -0
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1366 -0
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +368 -0
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +654 -0
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1091 -0
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3784 -0
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1369 -0
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2745 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1481 -0
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +543 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +821 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1594 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
  75. package/node_modules/@types/cacheable-request/package.json +35 -0
  76. package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  77. package/node_modules/@types/http-cache-semantics/README.md +16 -0
  78. package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
  79. package/node_modules/@types/http-cache-semantics/package.json +25 -0
  80. package/node_modules/@types/keyv/LICENSE +21 -0
  81. package/node_modules/@types/keyv/README.md +16 -0
  82. package/node_modules/@types/keyv/index.d.ts +77 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
  85. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
  87. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
  88. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1366 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
  93. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +368 -0
  97. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +654 -0
  98. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1091 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3784 -0
  102. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
  103. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1369 -0
  105. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
  108. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2745 -0
  109. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
  112. package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
  113. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
  114. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
  115. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1481 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +543 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
  122. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
  126. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
  128. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +821 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1594 -0
  132. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
  133. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
  136. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
  137. package/node_modules/@types/keyv/package.json +32 -0
  138. package/node_modules/@types/responselike/LICENSE +21 -0
  139. package/node_modules/@types/responselike/README.md +16 -0
  140. package/node_modules/@types/responselike/index.d.ts +34 -0
  141. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
  144. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
  145. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1366 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
  151. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +368 -0
  155. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +654 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1091 -0
  159. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3784 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
  161. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
  162. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1369 -0
  163. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
  164. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
  165. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
  166. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2745 -0
  167. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
  169. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
  170. package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
  171. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
  172. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
  173. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1481 -0
  174. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
  175. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
  176. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +543 -0
  177. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
  178. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  179. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
  180. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  181. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
  182. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
  183. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
  184. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
  185. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
  186. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
  187. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
  188. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +821 -0
  189. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1594 -0
  190. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
  191. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
  192. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
  193. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
  194. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
  195. package/node_modules/@types/responselike/package.json +25 -0
  196. package/node_modules/cacheable-lookup/LICENSE +21 -0
  197. package/node_modules/cacheable-lookup/README.md +240 -0
  198. package/node_modules/cacheable-lookup/index.d.ts +139 -0
  199. package/node_modules/cacheable-lookup/package.json +45 -0
  200. package/node_modules/cacheable-lookup/source/index.js +436 -0
  201. package/node_modules/cacheable-request/LICENSE +21 -0
  202. package/node_modules/cacheable-request/README.md +206 -0
  203. package/node_modules/cacheable-request/package.json +56 -0
  204. package/node_modules/cacheable-request/src/index.js +251 -0
  205. package/node_modules/clone-response/LICENSE +21 -0
  206. package/node_modules/clone-response/README.md +62 -0
  207. package/node_modules/clone-response/package.json +44 -0
  208. package/node_modules/clone-response/src/index.js +17 -0
  209. package/node_modules/decompress-response/index.d.ts +22 -0
  210. package/node_modules/decompress-response/index.js +58 -0
  211. package/node_modules/decompress-response/license +9 -0
  212. package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
  213. package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
  214. package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
  215. package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
  216. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
  217. package/node_modules/decompress-response/package.json +56 -0
  218. package/node_modules/decompress-response/readme.md +48 -0
  219. package/node_modules/defer-to-connect/LICENSE +21 -0
  220. package/node_modules/defer-to-connect/README.md +38 -0
  221. package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  222. package/node_modules/defer-to-connect/dist/source/index.js +47 -0
  223. package/node_modules/defer-to-connect/package.json +71 -0
  224. package/node_modules/end-of-stream/LICENSE +21 -0
  225. package/node_modules/end-of-stream/README.md +54 -0
  226. package/node_modules/end-of-stream/index.js +94 -0
  227. package/node_modules/end-of-stream/package.json +37 -0
  228. package/node_modules/get-stream/buffer-stream.js +52 -0
  229. package/node_modules/get-stream/index.d.ts +108 -0
  230. package/node_modules/get-stream/index.js +60 -0
  231. package/node_modules/get-stream/license +9 -0
  232. package/node_modules/get-stream/package.json +50 -0
  233. package/node_modules/get-stream/readme.md +124 -0
  234. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
  235. package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
  236. package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  237. package/node_modules/got/dist/source/as-promise/index.js +175 -0
  238. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
  239. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
  240. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
  241. package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
  242. package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
  243. package/node_modules/got/dist/source/as-promise/types.js +40 -0
  244. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
  245. package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  246. package/node_modules/got/dist/source/core/index.d.ts +1124 -0
  247. package/node_modules/got/dist/source/core/index.js +1491 -0
  248. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
  249. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
  250. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  251. package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
  252. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
  253. package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
  254. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  255. package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  256. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
  257. package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
  258. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
  259. package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
  260. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  261. package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
  262. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
  263. package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
  264. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  265. package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
  266. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  267. package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
  268. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  269. package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
  270. package/node_modules/got/dist/source/create.d.ts +5 -0
  271. package/node_modules/got/dist/source/create.js +240 -0
  272. package/node_modules/got/dist/source/index.d.ts +4 -0
  273. package/node_modules/got/dist/source/index.js +132 -0
  274. package/node_modules/got/dist/source/types.d.ts +342 -0
  275. package/node_modules/got/dist/source/types.js +2 -0
  276. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
  277. package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
  278. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
  279. package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
  280. package/node_modules/got/license +9 -0
  281. package/node_modules/got/package.json +130 -0
  282. package/node_modules/got/readme.md +2476 -0
  283. package/node_modules/http-cache-semantics/LICENSE +9 -0
  284. package/node_modules/http-cache-semantics/README.md +203 -0
  285. package/node_modules/http-cache-semantics/index.js +673 -0
  286. package/node_modules/http-cache-semantics/package.json +24 -0
  287. package/node_modules/http2-wrapper/LICENSE +21 -0
  288. package/node_modules/http2-wrapper/README.md +470 -0
  289. package/node_modules/http2-wrapper/package.json +54 -0
  290. package/node_modules/http2-wrapper/source/agent.js +670 -0
  291. package/node_modules/http2-wrapper/source/auto.js +149 -0
  292. package/node_modules/http2-wrapper/source/client-request.js +445 -0
  293. package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
  294. package/node_modules/http2-wrapper/source/index.js +28 -0
  295. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
  296. package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
  297. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  298. package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  299. package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
  300. package/node_modules/json-buffer/.travis.yml +3 -0
  301. package/node_modules/json-buffer/LICENSE +22 -0
  302. package/node_modules/json-buffer/README.md +24 -0
  303. package/node_modules/json-buffer/index.js +58 -0
  304. package/node_modules/json-buffer/package.json +34 -0
  305. package/node_modules/json-buffer/test/index.js +63 -0
  306. package/node_modules/keyv/LICENSE +21 -0
  307. package/node_modules/keyv/README.md +288 -0
  308. package/node_modules/keyv/package.json +49 -0
  309. package/node_modules/keyv/src/index.js +111 -0
  310. package/node_modules/lowercase-keys/index.d.ts +16 -0
  311. package/node_modules/lowercase-keys/index.js +10 -0
  312. package/node_modules/lowercase-keys/license +9 -0
  313. package/node_modules/lowercase-keys/package.json +38 -0
  314. package/node_modules/lowercase-keys/readme.md +32 -0
  315. package/node_modules/mimic-response/index.js +32 -0
  316. package/node_modules/mimic-response/license +9 -0
  317. package/node_modules/mimic-response/package.json +37 -0
  318. package/node_modules/mimic-response/readme.md +54 -0
  319. package/node_modules/normalize-url/index.d.ts +267 -0
  320. package/node_modules/normalize-url/index.js +216 -0
  321. package/node_modules/normalize-url/license +9 -0
  322. package/node_modules/normalize-url/package.json +50 -0
  323. package/node_modules/normalize-url/readme.md +286 -0
  324. package/node_modules/once/LICENSE +15 -0
  325. package/node_modules/once/README.md +79 -0
  326. package/node_modules/once/once.js +42 -0
  327. package/node_modules/once/package.json +33 -0
  328. package/node_modules/p-cancelable/index.d.ts +176 -0
  329. package/node_modules/p-cancelable/index.js +111 -0
  330. package/node_modules/p-cancelable/license +9 -0
  331. package/node_modules/p-cancelable/package.json +49 -0
  332. package/node_modules/p-cancelable/readme.md +153 -0
  333. package/node_modules/pump/.travis.yml +5 -0
  334. package/node_modules/pump/LICENSE +21 -0
  335. package/node_modules/pump/README.md +65 -0
  336. package/node_modules/pump/index.js +82 -0
  337. package/node_modules/pump/package.json +24 -0
  338. package/node_modules/pump/test-browser.js +66 -0
  339. package/node_modules/pump/test-node.js +53 -0
  340. package/node_modules/quick-lru/index.d.ts +97 -0
  341. package/node_modules/quick-lru/index.js +123 -0
  342. package/node_modules/quick-lru/license +9 -0
  343. package/node_modules/quick-lru/package.json +43 -0
  344. package/node_modules/quick-lru/readme.md +111 -0
  345. package/node_modules/resolve-alpn/LICENSE +22 -0
  346. package/node_modules/resolve-alpn/README.md +60 -0
  347. package/node_modules/resolve-alpn/index.js +43 -0
  348. package/node_modules/resolve-alpn/package.json +34 -0
  349. package/node_modules/responselike/LICENSE +19 -0
  350. package/node_modules/responselike/README.md +77 -0
  351. package/node_modules/responselike/package.json +38 -0
  352. package/node_modules/responselike/src/index.js +34 -0
  353. package/node_modules/wrappy/LICENSE +15 -0
  354. package/node_modules/wrappy/README.md +36 -0
  355. package/node_modules/wrappy/package.json +29 -0
  356. package/node_modules/wrappy/wrappy.js +33 -0
  357. package/package.json +41 -38
@@ -0,0 +1,783 @@
1
+ /**
2
+ * > Stability: 2 - Stable
3
+ *
4
+ * The `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
+ * const net = require('net');
12
+ * ```
13
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/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 = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
20
+ interface AddressInfo {
21
+ address: string;
22
+ family: string;
23
+ port: number;
24
+ }
25
+ interface SocketConstructorOpts {
26
+ fd?: number | undefined;
27
+ allowHalfOpen?: boolean | undefined;
28
+ readable?: boolean | undefined;
29
+ writable?: boolean | undefined;
30
+ }
31
+ interface OnReadOpts {
32
+ buffer: Uint8Array | (() => Uint8Array);
33
+ /**
34
+ * This function is called for every chunk of incoming data.
35
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
36
+ * Return false from this function to implicitly pause() the socket.
37
+ */
38
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
39
+ }
40
+ interface ConnectOpts {
41
+ /**
42
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
43
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
44
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
45
+ */
46
+ onread?: OnReadOpts | undefined;
47
+ }
48
+ interface TcpSocketConnectOpts extends ConnectOpts {
49
+ port: number;
50
+ host?: string | undefined;
51
+ localAddress?: string | undefined;
52
+ localPort?: number | undefined;
53
+ hints?: number | undefined;
54
+ family?: number | undefined;
55
+ lookup?: LookupFunction | undefined;
56
+ }
57
+ interface IpcSocketConnectOpts extends ConnectOpts {
58
+ path: string;
59
+ }
60
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
61
+ /**
62
+ * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
63
+ * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
64
+ * an `EventEmitter`.
65
+ *
66
+ * A `net.Socket` can be created by the user and used directly to interact with
67
+ * a server. For example, it is returned by {@link createConnection},
68
+ * so the user can use it to talk to the server.
69
+ *
70
+ * It can also be created by Node.js and passed to the user when a connection
71
+ * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
72
+ * it to interact with the client.
73
+ * @since v0.3.4
74
+ */
75
+ class Socket extends stream.Duplex {
76
+ constructor(options?: SocketConstructorOpts);
77
+ /**
78
+ * Sends data on the socket. The second parameter specifies the encoding in the
79
+ * case of a string. It defaults to UTF8 encoding.
80
+ *
81
+ * Returns `true` if the entire data was flushed successfully to the kernel
82
+ * 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.
83
+ *
84
+ * The optional `callback` parameter will be executed when the data is finally
85
+ * written out, which may not be immediately.
86
+ *
87
+ * See `Writable` stream `write()` method for more
88
+ * information.
89
+ * @since v0.1.90
90
+ * @param [encoding='utf8'] Only used when data is `string`.
91
+ */
92
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
93
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
94
+ /**
95
+ * Initiate a connection on a given socket.
96
+ *
97
+ * Possible signatures:
98
+ *
99
+ * * `socket.connect(options[, connectListener])`
100
+ * * `socket.connect(path[, connectListener])` for `IPC` connections.
101
+ * * `socket.connect(port[, host][, connectListener])` for TCP connections.
102
+ * * Returns: `net.Socket` The socket itself.
103
+ *
104
+ * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
105
+ * instead of a `'connect'` event, an `'error'` event will be emitted with
106
+ * the error passed to the `'error'` listener.
107
+ * The last parameter `connectListener`, if supplied, will be added as a listener
108
+ * for the `'connect'` event **once**.
109
+ *
110
+ * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
111
+ * behavior.
112
+ */
113
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
114
+ connect(port: number, host: string, connectionListener?: () => void): this;
115
+ connect(port: number, connectionListener?: () => void): this;
116
+ connect(path: string, connectionListener?: () => void): this;
117
+ /**
118
+ * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
119
+ * @since v0.1.90
120
+ * @return The socket itself.
121
+ */
122
+ setEncoding(encoding?: BufferEncoding): this;
123
+ /**
124
+ * Pauses the reading of data. That is, `'data'` events will not be emitted.
125
+ * Useful to throttle back an upload.
126
+ * @return The socket itself.
127
+ */
128
+ pause(): this;
129
+ /**
130
+ * Resumes reading after a call to `socket.pause()`.
131
+ * @return The socket itself.
132
+ */
133
+ resume(): this;
134
+ /**
135
+ * Sets the socket to timeout after `timeout` milliseconds of inactivity on
136
+ * the socket. By default `net.Socket` do not have a timeout.
137
+ *
138
+ * 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
139
+ * end the connection.
140
+ *
141
+ * ```js
142
+ * socket.setTimeout(3000);
143
+ * socket.on('timeout', () => {
144
+ * console.log('socket timeout');
145
+ * socket.end();
146
+ * });
147
+ * ```
148
+ *
149
+ * If `timeout` is 0, then the existing idle timeout is disabled.
150
+ *
151
+ * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
152
+ * @since v0.1.90
153
+ * @return The socket itself.
154
+ */
155
+ setTimeout(timeout: number, callback?: () => void): this;
156
+ /**
157
+ * Enable/disable the use of Nagle's algorithm.
158
+ *
159
+ * When a TCP connection is created, it will have Nagle's algorithm enabled.
160
+ *
161
+ * Nagle's algorithm delays data before it is sent via the network. It attempts
162
+ * to optimize throughput at the expense of latency.
163
+ *
164
+ * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
165
+ * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
166
+ * algorithm.
167
+ * @since v0.1.90
168
+ * @param [noDelay=true]
169
+ * @return The socket itself.
170
+ */
171
+ setNoDelay(noDelay?: boolean): this;
172
+ /**
173
+ * Enable/disable keep-alive functionality, and optionally set the initial
174
+ * delay before the first keepalive probe is sent on an idle socket.
175
+ *
176
+ * Set `initialDelay` (in milliseconds) to set the delay between the last
177
+ * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
178
+ * (or previous) setting.
179
+ *
180
+ * Enabling the keep-alive functionality will set the following socket options:
181
+ *
182
+ * * `SO_KEEPALIVE=1`
183
+ * * `TCP_KEEPIDLE=initialDelay`
184
+ * * `TCP_KEEPCNT=10`
185
+ * * `TCP_KEEPINTVL=1`
186
+ * @since v0.1.92
187
+ * @param [enable=false]
188
+ * @param [initialDelay=0]
189
+ * @return The socket itself.
190
+ */
191
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
192
+ /**
193
+ * Returns the bound `address`, the address `family` name and `port` of the
194
+ * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
195
+ * @since v0.1.90
196
+ */
197
+ address(): AddressInfo | {};
198
+ /**
199
+ * Calling `unref()` on a socket will allow the program to exit if this is the only
200
+ * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
201
+ * @since v0.9.1
202
+ * @return The socket itself.
203
+ */
204
+ unref(): this;
205
+ /**
206
+ * 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).
207
+ * If the socket is `ref`ed calling `ref` again will have no effect.
208
+ * @since v0.9.1
209
+ * @return The socket itself.
210
+ */
211
+ ref(): this;
212
+ /**
213
+ * This property shows the number of characters buffered for writing. The buffer
214
+ * may contain strings whose length after encoding is not yet known. So this number
215
+ * is only an approximation of the number of bytes in the buffer.
216
+ *
217
+ * `net.Socket` has the property that `socket.write()` always works. This is to
218
+ * help users get up and running quickly. The computer cannot always keep up
219
+ * with the amount of data that is written to a socket. The network connection
220
+ * simply might be too slow. Node.js will internally queue up the data written to a
221
+ * socket and send it out over the wire when it is possible.
222
+ *
223
+ * The consequence of this internal buffering is that memory may grow.
224
+ * Users who experience large or growing `bufferSize` should attempt to
225
+ * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
226
+ * @since v0.3.8
227
+ * @deprecated Since v14.6.0 - Use `writableLength` instead.
228
+ */
229
+ readonly bufferSize: number;
230
+ /**
231
+ * The amount of received bytes.
232
+ * @since v0.5.3
233
+ */
234
+ readonly bytesRead: number;
235
+ /**
236
+ * The amount of bytes sent.
237
+ * @since v0.5.3
238
+ */
239
+ readonly bytesWritten: number;
240
+ /**
241
+ * If `true`,`socket.connect(options[, connectListener])` was
242
+ * called and has not yet finished. It will stay `true` until the socket becomes
243
+ * connected, then it is set to `false` and the `'connect'` event is emitted. Note
244
+ * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
245
+ * @since v6.1.0
246
+ */
247
+ readonly connecting: boolean;
248
+ /**
249
+ * See `writable.destroyed` for further details.
250
+ */
251
+ readonly destroyed: boolean;
252
+ /**
253
+ * The string representation of the local IP address the remote client is
254
+ * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
255
+ * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
256
+ * @since v0.9.6
257
+ */
258
+ readonly localAddress?: string;
259
+ /**
260
+ * The numeric representation of the local port. For example, `80` or `21`.
261
+ * @since v0.9.6
262
+ */
263
+ readonly localPort?: number;
264
+ /**
265
+ * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
266
+ * the socket is destroyed (for example, if the client disconnected).
267
+ * @since v0.5.10
268
+ */
269
+ readonly remoteAddress?: string | undefined;
270
+ /**
271
+ * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`.
272
+ * @since v0.11.14
273
+ */
274
+ readonly remoteFamily?: string | undefined;
275
+ /**
276
+ * The numeric representation of the remote port. For example, `80` or `21`.
277
+ * @since v0.5.10
278
+ */
279
+ readonly remotePort?: number | undefined;
280
+ /**
281
+ * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
282
+ * server will still send some data.
283
+ *
284
+ * See `writable.end()` for further details.
285
+ * @since v0.1.90
286
+ * @param [encoding='utf8'] Only used when data is `string`.
287
+ * @param callback Optional callback for when the socket is finished.
288
+ * @return The socket itself.
289
+ */
290
+ end(callback?: () => void): void;
291
+ end(buffer: Uint8Array | string, callback?: () => void): void;
292
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): void;
293
+ /**
294
+ * events.EventEmitter
295
+ * 1. close
296
+ * 2. connect
297
+ * 3. data
298
+ * 4. drain
299
+ * 5. end
300
+ * 6. error
301
+ * 7. lookup
302
+ * 8. timeout
303
+ */
304
+ addListener(event: string, listener: (...args: any[]) => void): this;
305
+ addListener(event: 'close', listener: (hadError: boolean) => void): this;
306
+ addListener(event: 'connect', listener: () => void): this;
307
+ addListener(event: 'data', listener: (data: Buffer) => void): this;
308
+ addListener(event: 'drain', listener: () => void): this;
309
+ addListener(event: 'end', listener: () => void): this;
310
+ addListener(event: 'error', listener: (err: Error) => void): this;
311
+ addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
312
+ addListener(event: 'ready', listener: () => void): this;
313
+ addListener(event: 'timeout', listener: () => void): this;
314
+ emit(event: string | symbol, ...args: any[]): boolean;
315
+ emit(event: 'close', hadError: boolean): boolean;
316
+ emit(event: 'connect'): boolean;
317
+ emit(event: 'data', data: Buffer): boolean;
318
+ emit(event: 'drain'): boolean;
319
+ emit(event: 'end'): boolean;
320
+ emit(event: 'error', err: Error): boolean;
321
+ emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
322
+ emit(event: 'ready'): boolean;
323
+ emit(event: 'timeout'): boolean;
324
+ on(event: string, listener: (...args: any[]) => void): this;
325
+ on(event: 'close', listener: (hadError: boolean) => void): this;
326
+ on(event: 'connect', listener: () => void): this;
327
+ on(event: 'data', listener: (data: Buffer) => void): this;
328
+ on(event: 'drain', listener: () => void): this;
329
+ on(event: 'end', listener: () => void): this;
330
+ on(event: 'error', listener: (err: Error) => void): this;
331
+ on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
332
+ on(event: 'ready', listener: () => void): this;
333
+ on(event: 'timeout', listener: () => void): this;
334
+ once(event: string, listener: (...args: any[]) => void): this;
335
+ once(event: 'close', listener: (hadError: boolean) => void): this;
336
+ once(event: 'connect', listener: () => void): this;
337
+ once(event: 'data', listener: (data: Buffer) => void): this;
338
+ once(event: 'drain', listener: () => void): this;
339
+ once(event: 'end', listener: () => void): this;
340
+ once(event: 'error', listener: (err: Error) => void): this;
341
+ once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
342
+ once(event: 'ready', listener: () => void): this;
343
+ once(event: 'timeout', listener: () => void): this;
344
+ prependListener(event: string, listener: (...args: any[]) => void): this;
345
+ prependListener(event: 'close', listener: (hadError: boolean) => void): this;
346
+ prependListener(event: 'connect', listener: () => void): this;
347
+ prependListener(event: 'data', listener: (data: Buffer) => void): this;
348
+ prependListener(event: 'drain', listener: () => void): this;
349
+ prependListener(event: 'end', listener: () => void): this;
350
+ prependListener(event: 'error', listener: (err: Error) => void): this;
351
+ prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
352
+ prependListener(event: 'ready', listener: () => void): this;
353
+ prependListener(event: 'timeout', listener: () => void): this;
354
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
355
+ prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
356
+ prependOnceListener(event: 'connect', listener: () => void): this;
357
+ prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
358
+ prependOnceListener(event: 'drain', listener: () => void): this;
359
+ prependOnceListener(event: 'end', listener: () => void): this;
360
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
361
+ prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
362
+ prependOnceListener(event: 'ready', listener: () => void): this;
363
+ prependOnceListener(event: 'timeout', listener: () => void): this;
364
+ }
365
+ interface ListenOptions extends Abortable {
366
+ port?: number | undefined;
367
+ host?: string | undefined;
368
+ backlog?: number | undefined;
369
+ path?: string | undefined;
370
+ exclusive?: boolean | undefined;
371
+ readableAll?: boolean | undefined;
372
+ writableAll?: boolean | undefined;
373
+ /**
374
+ * @default false
375
+ */
376
+ ipv6Only?: boolean | undefined;
377
+ }
378
+ interface ServerOpts {
379
+ /**
380
+ * Indicates whether half-opened TCP connections are allowed.
381
+ * @default false
382
+ */
383
+ allowHalfOpen?: boolean | undefined;
384
+ /**
385
+ * Indicates whether the socket should be paused on incoming connections.
386
+ * @default false
387
+ */
388
+ pauseOnConnect?: boolean | undefined;
389
+ }
390
+ /**
391
+ * This class is used to create a TCP or `IPC` server.
392
+ * @since v0.1.90
393
+ */
394
+ class Server extends EventEmitter {
395
+ constructor(connectionListener?: (socket: Socket) => void);
396
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
397
+ /**
398
+ * Start a server listening for connections. A `net.Server` can be a TCP or
399
+ * an `IPC` server depending on what it listens to.
400
+ *
401
+ * Possible signatures:
402
+ *
403
+ * * `server.listen(handle[, backlog][, callback])`
404
+ * * `server.listen(options[, callback])`
405
+ * * `server.listen(path[, backlog][, callback])` for `IPC` servers
406
+ * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
407
+ *
408
+ * 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'`
409
+ * event.
410
+ *
411
+ * All `listen()` methods can take a `backlog` parameter to specify the maximum
412
+ * length of the queue of pending connections. The actual length will be determined
413
+ * 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).
414
+ *
415
+ * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
416
+ * details).
417
+ *
418
+ * The `server.listen()` method can be called again if and only if there was an
419
+ * error during the first `server.listen()` call or `server.close()` has been
420
+ * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
421
+ *
422
+ * One of the most common errors raised when listening is `EADDRINUSE`.
423
+ * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
424
+ * after a certain amount of time:
425
+ *
426
+ * ```js
427
+ * server.on('error', (e) => {
428
+ * if (e.code === 'EADDRINUSE') {
429
+ * console.log('Address in use, retrying...');
430
+ * setTimeout(() => {
431
+ * server.close();
432
+ * server.listen(PORT, HOST);
433
+ * }, 1000);
434
+ * }
435
+ * });
436
+ * ```
437
+ */
438
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
439
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
440
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
441
+ listen(port?: number, listeningListener?: () => void): this;
442
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
443
+ listen(path: string, listeningListener?: () => void): this;
444
+ listen(options: ListenOptions, listeningListener?: () => void): this;
445
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
446
+ listen(handle: any, listeningListener?: () => void): this;
447
+ /**
448
+ * Stops the server from accepting new connections and keeps existing
449
+ * connections. This function is asynchronous, the server is finally closed
450
+ * when all connections are ended and the server emits a `'close'` event.
451
+ * The optional `callback` will be called once the `'close'` event occurs. Unlike
452
+ * that event, it will be called with an `Error` as its only argument if the server
453
+ * was not open when it was closed.
454
+ * @since v0.1.90
455
+ * @param callback Called when the server is closed.
456
+ */
457
+ close(callback?: (err?: Error) => void): this;
458
+ /**
459
+ * Returns the bound `address`, the address `family` name, and `port` of the server
460
+ * as reported by the operating system if listening on an IP socket
461
+ * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
462
+ *
463
+ * For a server listening on a pipe or Unix domain socket, the name is returned
464
+ * as a string.
465
+ *
466
+ * ```js
467
+ * const server = net.createServer((socket) => {
468
+ * socket.end('goodbye\n');
469
+ * }).on('error', (err) => {
470
+ * // Handle errors here.
471
+ * throw err;
472
+ * });
473
+ *
474
+ * // Grab an arbitrary unused port.
475
+ * server.listen(() => {
476
+ * console.log('opened server on', server.address());
477
+ * });
478
+ * ```
479
+ *
480
+ * `server.address()` returns `null` before the `'listening'` event has been
481
+ * emitted or after calling `server.close()`.
482
+ * @since v0.1.90
483
+ */
484
+ address(): AddressInfo | string | null;
485
+ /**
486
+ * Asynchronously get the number of concurrent connections on the server. Works
487
+ * when sockets were sent to forks.
488
+ *
489
+ * Callback should take two arguments `err` and `count`.
490
+ * @since v0.9.7
491
+ */
492
+ getConnections(cb: (error: Error | null, count: number) => void): void;
493
+ /**
494
+ * 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).
495
+ * If the server is `ref`ed calling `ref()` again will have no effect.
496
+ * @since v0.9.1
497
+ */
498
+ ref(): this;
499
+ /**
500
+ * Calling `unref()` on a server will allow the program to exit if this is the only
501
+ * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
502
+ * @since v0.9.1
503
+ */
504
+ unref(): this;
505
+ /**
506
+ * Set this property to reject connections when the server's connection count gets
507
+ * high.
508
+ *
509
+ * It is not recommended to use this option once a socket has been sent to a child
510
+ * with `child_process.fork()`.
511
+ * @since v0.2.0
512
+ */
513
+ maxConnections: number;
514
+ connections: number;
515
+ /**
516
+ * Indicates whether or not the server is listening for connections.
517
+ * @since v5.7.0
518
+ */
519
+ listening: boolean;
520
+ /**
521
+ * events.EventEmitter
522
+ * 1. close
523
+ * 2. connection
524
+ * 3. error
525
+ * 4. listening
526
+ */
527
+ addListener(event: string, listener: (...args: any[]) => void): this;
528
+ addListener(event: 'close', listener: () => void): this;
529
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
530
+ addListener(event: 'error', listener: (err: Error) => void): this;
531
+ addListener(event: 'listening', listener: () => void): this;
532
+ emit(event: string | symbol, ...args: any[]): boolean;
533
+ emit(event: 'close'): boolean;
534
+ emit(event: 'connection', socket: Socket): boolean;
535
+ emit(event: 'error', err: Error): boolean;
536
+ emit(event: 'listening'): boolean;
537
+ on(event: string, listener: (...args: any[]) => void): this;
538
+ on(event: 'close', listener: () => void): this;
539
+ on(event: 'connection', listener: (socket: Socket) => void): this;
540
+ on(event: 'error', listener: (err: Error) => void): this;
541
+ on(event: 'listening', listener: () => void): this;
542
+ once(event: string, listener: (...args: any[]) => void): this;
543
+ once(event: 'close', listener: () => void): this;
544
+ once(event: 'connection', listener: (socket: Socket) => void): this;
545
+ once(event: 'error', listener: (err: Error) => void): this;
546
+ once(event: 'listening', listener: () => void): this;
547
+ prependListener(event: string, listener: (...args: any[]) => void): this;
548
+ prependListener(event: 'close', listener: () => void): this;
549
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
550
+ prependListener(event: 'error', listener: (err: Error) => void): this;
551
+ prependListener(event: 'listening', listener: () => void): this;
552
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
553
+ prependOnceListener(event: 'close', listener: () => void): this;
554
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
555
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
556
+ prependOnceListener(event: 'listening', listener: () => void): this;
557
+ }
558
+ type IPVersion = 'ipv4' | 'ipv6';
559
+ /**
560
+ * The `BlockList` object can be used with some network APIs to specify rules for
561
+ * disabling inbound or outbound access to specific IP addresses, IP ranges, or
562
+ * IP subnets.
563
+ * @since v15.0.0
564
+ */
565
+ class BlockList {
566
+ /**
567
+ * Adds a rule to block the given IP address.
568
+ * @since v15.0.0
569
+ * @param address An IPv4 or IPv6 address.
570
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
571
+ */
572
+ addAddress(address: string, type?: IPVersion): void;
573
+ addAddress(address: SocketAddress): void;
574
+ /**
575
+ * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
576
+ * @since v15.0.0
577
+ * @param start The starting IPv4 or IPv6 address in the range.
578
+ * @param end The ending IPv4 or IPv6 address in the range.
579
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
580
+ */
581
+ addRange(start: string, end: string, type?: IPVersion): void;
582
+ addRange(start: SocketAddress, end: SocketAddress): void;
583
+ /**
584
+ * Adds a rule to block a range of IP addresses specified as a subnet mask.
585
+ * @since v15.0.0
586
+ * @param net The network IPv4 or IPv6 address.
587
+ * @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`.
588
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
589
+ */
590
+ addSubnet(net: SocketAddress, prefix: number): void;
591
+ addSubnet(net: string, prefix: number, type?: IPVersion): void;
592
+ /**
593
+ * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
594
+ *
595
+ * ```js
596
+ * const blockList = new net.BlockList();
597
+ * blockList.addAddress('123.123.123.123');
598
+ * blockList.addRange('10.0.0.1', '10.0.0.10');
599
+ * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
600
+ *
601
+ * console.log(blockList.check('123.123.123.123')); // Prints: true
602
+ * console.log(blockList.check('10.0.0.3')); // Prints: true
603
+ * console.log(blockList.check('222.111.111.222')); // Prints: false
604
+ *
605
+ * // IPv6 notation for IPv4 addresses works:
606
+ * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
607
+ * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
608
+ * ```
609
+ * @since v15.0.0
610
+ * @param address The IP address to check
611
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
612
+ */
613
+ check(address: SocketAddress): boolean;
614
+ check(address: string, type?: IPVersion): boolean;
615
+ }
616
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
617
+ timeout?: number | undefined;
618
+ }
619
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
620
+ timeout?: number | undefined;
621
+ }
622
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
623
+ /**
624
+ * Creates a new TCP or `IPC` server.
625
+ *
626
+ * If `allowHalfOpen` is set to `true`, when the other end of the socket
627
+ * signals the end of transmission, the server will only send back the end of
628
+ * transmission when `socket.end()` is explicitly called. For example, in the
629
+ * context of TCP, when a FIN packed is received, a FIN packed is sent
630
+ * back only when `socket.end()` is explicitly called. Until then the
631
+ * 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.
632
+ *
633
+ * If `pauseOnConnect` is set to `true`, then the socket associated with each
634
+ * incoming connection will be paused, and no data will be read from its handle.
635
+ * This allows connections to be passed between processes without any data being
636
+ * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
637
+ *
638
+ * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
639
+ *
640
+ * Here is an example of an TCP echo server which listens for connections
641
+ * on port 8124:
642
+ *
643
+ * ```js
644
+ * const net = require('net');
645
+ * const server = net.createServer((c) => {
646
+ * // 'connection' listener.
647
+ * console.log('client connected');
648
+ * c.on('end', () => {
649
+ * console.log('client disconnected');
650
+ * });
651
+ * c.write('hello\r\n');
652
+ * c.pipe(c);
653
+ * });
654
+ * server.on('error', (err) => {
655
+ * throw err;
656
+ * });
657
+ * server.listen(8124, () => {
658
+ * console.log('server bound');
659
+ * });
660
+ * ```
661
+ *
662
+ * Test this by using `telnet`:
663
+ *
664
+ * ```console
665
+ * $ telnet localhost 8124
666
+ * ```
667
+ *
668
+ * To listen on the socket `/tmp/echo.sock`:
669
+ *
670
+ * ```js
671
+ * server.listen('/tmp/echo.sock', () => {
672
+ * console.log('server bound');
673
+ * });
674
+ * ```
675
+ *
676
+ * Use `nc` to connect to a Unix domain socket server:
677
+ *
678
+ * ```console
679
+ * $ nc -U /tmp/echo.sock
680
+ * ```
681
+ * @since v0.5.0
682
+ * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
683
+ */
684
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
685
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
686
+ /**
687
+ * Aliases to {@link createConnection}.
688
+ *
689
+ * Possible signatures:
690
+ *
691
+ * * {@link connect}
692
+ * * {@link connect} for `IPC` connections.
693
+ * * {@link connect} for TCP connections.
694
+ */
695
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
696
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
697
+ function connect(path: string, connectionListener?: () => void): Socket;
698
+ /**
699
+ * A factory function, which creates a new {@link Socket},
700
+ * immediately initiates connection with `socket.connect()`,
701
+ * then returns the `net.Socket` that starts the connection.
702
+ *
703
+ * When the connection is established, a `'connect'` event will be emitted
704
+ * on the returned socket. The last parameter `connectListener`, if supplied,
705
+ * will be added as a listener for the `'connect'` event **once**.
706
+ *
707
+ * Possible signatures:
708
+ *
709
+ * * {@link createConnection}
710
+ * * {@link createConnection} for `IPC` connections.
711
+ * * {@link createConnection} for TCP connections.
712
+ *
713
+ * The {@link connect} function is an alias to this function.
714
+ */
715
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
716
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
717
+ function createConnection(path: string, connectionListener?: () => void): Socket;
718
+ /**
719
+ * Tests if input is an IP address. Returns `0` for invalid strings,
720
+ * returns `4` for IP version 4 addresses, and returns `6` for IP version 6
721
+ * addresses.
722
+ * @since v0.3.0
723
+ */
724
+ function isIP(input: string): number;
725
+ /**
726
+ * Returns `true` if input is a version 4 IP address, otherwise returns `false`.
727
+ * @since v0.3.0
728
+ */
729
+ function isIPv4(input: string): boolean;
730
+ /**
731
+ * Returns `true` if input is a version 6 IP address, otherwise returns `false`.
732
+ * @since v0.3.0
733
+ */
734
+ function isIPv6(input: string): boolean;
735
+ interface SocketAddressInitOptions {
736
+ /**
737
+ * The network address as either an IPv4 or IPv6 string.
738
+ * @default 127.0.0.1
739
+ */
740
+ address?: string | undefined;
741
+ /**
742
+ * @default `'ipv4'`
743
+ */
744
+ family?: IPVersion | undefined;
745
+ /**
746
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
747
+ * @default 0
748
+ */
749
+ flowlabel?: number | undefined;
750
+ /**
751
+ * An IP port.
752
+ * @default 0
753
+ */
754
+ port?: number | undefined;
755
+ }
756
+ /**
757
+ * @since v15.14.0
758
+ */
759
+ class SocketAddress {
760
+ constructor(options: SocketAddressInitOptions);
761
+ /**
762
+ * Either \`'ipv4'\` or \`'ipv6'\`.
763
+ * @since v15.14.0
764
+ */
765
+ readonly address: string;
766
+ /**
767
+ * Either \`'ipv4'\` or \`'ipv6'\`.
768
+ * @since v15.14.0
769
+ */
770
+ readonly family: IPVersion;
771
+ /**
772
+ * @since v15.14.0
773
+ */
774
+ readonly port: number;
775
+ /**
776
+ * @since v15.14.0
777
+ */
778
+ readonly flowlabel: number;
779
+ }
780
+ }
781
+ declare module 'node:net' {
782
+ export * from 'net';
783
+ }