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,1124 +0,0 @@
1
- /// <reference types="node" />
2
- import { Duplex, Readable } from 'stream';
3
- import { URL, URLSearchParams } from 'url';
4
- import { Socket } from 'net';
5
- import { SecureContextOptions, DetailedPeerCertificate } from 'tls';
6
- import http = require('http');
7
- import { ClientRequest, RequestOptions, ServerResponse, request as httpRequest } from 'http';
8
- import https = require('https');
9
- import { Timings, IncomingMessageWithTimings } from '@szmarczak/http-timer';
10
- import CacheableLookup from 'cacheable-lookup';
11
- import CacheableRequest = require('cacheable-request');
12
- import ResponseLike = require('responselike');
13
- import { Delays, TimeoutError as TimedOutTimeoutError } from './utils/timed-out';
14
- import { URLOptions } from './utils/options-to-url';
15
- import { DnsLookupIpVersion } from './utils/dns-ip-version';
16
- import { PromiseOnly } from '../as-promise/types';
17
- declare type HttpRequestFunction = typeof httpRequest;
18
- declare type Error = NodeJS.ErrnoException;
19
- declare const kRequest: unique symbol;
20
- declare const kResponse: unique symbol;
21
- declare const kResponseSize: unique symbol;
22
- declare const kDownloadedSize: unique symbol;
23
- declare const kBodySize: unique symbol;
24
- declare const kUploadedSize: unique symbol;
25
- declare const kServerResponsesPiped: unique symbol;
26
- declare const kUnproxyEvents: unique symbol;
27
- declare const kIsFromCache: unique symbol;
28
- declare const kCancelTimeouts: unique symbol;
29
- declare const kStartedReading: unique symbol;
30
- declare const kStopReading: unique symbol;
31
- declare const kTriggerRead: unique symbol;
32
- declare const kBody: unique symbol;
33
- declare const kJobs: unique symbol;
34
- declare const kOriginalResponse: unique symbol;
35
- declare const kRetryTimeout: unique symbol;
36
- export declare const kIsNormalizedAlready: unique symbol;
37
- export interface Agents {
38
- http?: http.Agent;
39
- https?: https.Agent;
40
- http2?: unknown;
41
- }
42
- export declare const withoutBody: ReadonlySet<string>;
43
- export interface ToughCookieJar {
44
- getCookieString: ((currentUrl: string, options: Record<string, unknown>, cb: (err: Error | null, cookies: string) => void) => void) & ((url: string, callback: (error: Error | null, cookieHeader: string) => void) => void);
45
- setCookie: ((cookieOrString: unknown, currentUrl: string, options: Record<string, unknown>, cb: (err: Error | null, cookie: unknown) => void) => void) & ((rawCookie: string, url: string, callback: (error: Error | null, result: unknown) => void) => void);
46
- }
47
- export interface PromiseCookieJar {
48
- getCookieString: (url: string) => Promise<string>;
49
- setCookie: (rawCookie: string, url: string) => Promise<unknown>;
50
- }
51
- /**
52
- All available HTTP request methods provided by Got.
53
- */
54
- export declare type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace';
55
- declare type Promisable<T> = T | Promise<T>;
56
- export declare type InitHook = (options: Options) => void;
57
- export declare type BeforeRequestHook = (options: NormalizedOptions) => Promisable<void | Response | ResponseLike>;
58
- export declare type BeforeRedirectHook = (options: NormalizedOptions, response: Response) => Promisable<void>;
59
- export declare type BeforeErrorHook = (error: RequestError) => Promisable<RequestError>;
60
- export declare type BeforeRetryHook = (options: NormalizedOptions, error?: RequestError, retryCount?: number) => void | Promise<void>;
61
- interface PlainHooks {
62
- /**
63
- Called with plain request options, right before their normalization.
64
- This is especially useful in conjunction with `got.extend()` when the input needs custom handling.
65
-
66
- __Note #1__: This hook must be synchronous!
67
-
68
- __Note #2__: Errors in this hook will be converted into an instances of `RequestError`.
69
-
70
- __Note #3__: The options object may not have a `url` property.
71
- To modify it, use a `beforeRequest` hook instead.
72
-
73
- @default []
74
- */
75
- init?: InitHook[];
76
- /**
77
- Called with normalized request options.
78
- Got will make no further changes to the request before it is sent.
79
- This is especially useful in conjunction with `got.extend()` when you want to create an API client that, for example, uses HMAC-signing.
80
-
81
- @default []
82
- */
83
- beforeRequest?: BeforeRequestHook[];
84
- /**
85
- Called with normalized request options and the redirect response.
86
- Got will make no further changes to the request.
87
- This is especially useful when you want to avoid dead sites.
88
-
89
- @default []
90
-
91
- @example
92
- ```
93
- const got = require('got');
94
-
95
- got('https://example.com', {
96
- hooks: {
97
- beforeRedirect: [
98
- (options, response) => {
99
- if (options.hostname === 'deadSite') {
100
- options.hostname = 'fallbackSite';
101
- }
102
- }
103
- ]
104
- }
105
- });
106
- ```
107
- */
108
- beforeRedirect?: BeforeRedirectHook[];
109
- /**
110
- Called with an `Error` instance.
111
- The error is passed to the hook right before it's thrown.
112
- This is especially useful when you want to have more detailed errors.
113
-
114
- __Note__: Errors thrown while normalizing input options are thrown directly and not part of this hook.
115
-
116
- @default []
117
-
118
- @example
119
- ```
120
- const got = require('got');
121
-
122
- got('https://api.github.com/some-endpoint', {
123
- hooks: {
124
- beforeError: [
125
- error => {
126
- const {response} = error;
127
- if (response && response.body) {
128
- error.name = 'GitHubError';
129
- error.message = `${response.body.message} (${response.statusCode})`;
130
- }
131
-
132
- return error;
133
- }
134
- ]
135
- }
136
- });
137
- ```
138
- */
139
- beforeError?: BeforeErrorHook[];
140
- /**
141
- Called with normalized request options, the error and the retry count.
142
- Got will make no further changes to the request.
143
- This is especially useful when some extra work is required before the next try.
144
-
145
- __Note__: When using streams, this hook is ignored.
146
- __Note__: When retrying in a `afterResponse` hook, all remaining `beforeRetry` hooks will be called without the `error` and `retryCount` arguments.
147
-
148
- @default []
149
-
150
- @example
151
- ```
152
- const got = require('got');
153
-
154
- got.post('https://example.com', {
155
- hooks: {
156
- beforeRetry: [
157
- (options, error, retryCount) => {
158
- if (error.response.statusCode === 413) { // Payload too large
159
- options.body = getNewBody();
160
- }
161
- }
162
- ]
163
- }
164
- });
165
- ```
166
- */
167
- beforeRetry?: BeforeRetryHook[];
168
- }
169
- /**
170
- All available hook of Got.
171
- */
172
- export interface Hooks extends PromiseOnly.Hooks, PlainHooks {
173
- }
174
- declare type PlainHookEvent = 'init' | 'beforeRequest' | 'beforeRedirect' | 'beforeError' | 'beforeRetry';
175
- /**
176
- All hook events acceptable by Got.
177
- */
178
- export declare type HookEvent = PromiseOnly.HookEvent | PlainHookEvent;
179
- export declare const knownHookEvents: HookEvent[];
180
- declare type AcceptableResponse = IncomingMessageWithTimings | ResponseLike;
181
- declare type AcceptableRequestResult = AcceptableResponse | ClientRequest | Promise<AcceptableResponse | ClientRequest> | undefined;
182
- export declare type RequestFunction = (url: URL, options: RequestOptions, callback?: (response: AcceptableResponse) => void) => AcceptableRequestResult;
183
- export declare type Headers = Record<string, string | string[] | undefined>;
184
- declare type CheckServerIdentityFunction = (hostname: string, certificate: DetailedPeerCertificate) => Error | void;
185
- export declare type ParseJsonFunction = (text: string) => unknown;
186
- export declare type StringifyJsonFunction = (object: unknown) => string;
187
- export interface RetryObject {
188
- attemptCount: number;
189
- retryOptions: RequiredRetryOptions;
190
- error: TimeoutError | RequestError;
191
- computedValue: number;
192
- retryAfter?: number;
193
- }
194
- export declare type RetryFunction = (retryObject: RetryObject) => number | Promise<number>;
195
- /**
196
- An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
197
-
198
- Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
199
-
200
- The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value.
201
- The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
202
-
203
- By default, it retries *only* on the specified methods, status codes, and on these network errors:
204
- - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
205
- - `ECONNRESET`: Connection was forcibly closed by a peer.
206
- - `EADDRINUSE`: Could not bind to any free port.
207
- - `ECONNREFUSED`: Connection was refused by the server.
208
- - `EPIPE`: The remote side of the stream being written has been closed.
209
- - `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
210
- - `ENETUNREACH`: No internet connection.
211
- - `EAI_AGAIN`: DNS lookup timed out.
212
-
213
- __Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.
214
- __Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
215
- */
216
- export interface RequiredRetryOptions {
217
- limit: number;
218
- methods: Method[];
219
- statusCodes: number[];
220
- errorCodes: string[];
221
- calculateDelay: RetryFunction;
222
- maxRetryAfter?: number;
223
- }
224
- export interface CacheOptions {
225
- shared?: boolean;
226
- cacheHeuristic?: number;
227
- immutableMinTimeToLive?: number;
228
- ignoreCargoCult?: boolean;
229
- }
230
- interface PlainOptions extends URLOptions {
231
- /**
232
- Custom request function.
233
- The main purpose of this is to [support HTTP2 using a wrapper](https://github.com/szmarczak/http2-wrapper).
234
-
235
- @default http.request | https.request
236
- */
237
- request?: RequestFunction;
238
- /**
239
- An object representing `http`, `https` and `http2` keys for [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent), [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent) and [`http2wrapper.Agent`](https://github.com/szmarczak/http2-wrapper#new-http2agentoptions) instance.
240
- This is necessary because a request to one protocol might redirect to another.
241
- In such a scenario, Got will switch over to the right protocol agent for you.
242
-
243
- If a key is not present, it will default to a global agent.
244
-
245
- @example
246
- ```
247
- const got = require('got');
248
- const HttpAgent = require('agentkeepalive');
249
- const {HttpsAgent} = HttpAgent;
250
-
251
- got('https://sindresorhus.com', {
252
- agent: {
253
- http: new HttpAgent(),
254
- https: new HttpsAgent()
255
- }
256
- });
257
- ```
258
- */
259
- agent?: Agents | false;
260
- /**
261
- Decompress the response automatically.
262
- This will set the `accept-encoding` header to `gzip, deflate, br` on Node.js 11.7.0+ or `gzip, deflate` for older Node.js versions, unless you set it yourself.
263
-
264
- Brotli (`br`) support requires Node.js 11.7.0 or later.
265
-
266
- If this is disabled, a compressed response is returned as a `Buffer`.
267
- This may be useful if you want to handle decompression yourself or stream the raw compressed data.
268
-
269
- @default true
270
- */
271
- decompress?: boolean;
272
- /**
273
- Milliseconds to wait for the server to end the response before aborting the request with `got.TimeoutError` error (a.k.a. `request` property).
274
- By default, there's no timeout.
275
-
276
- This also accepts an `object` with the following fields to constrain the duration of each phase of the request lifecycle:
277
-
278
- - `lookup` starts when a socket is assigned and ends when the hostname has been resolved.
279
- Does not apply when using a Unix domain socket.
280
- - `connect` starts when `lookup` completes (or when the socket is assigned if lookup does not apply to the request) and ends when the socket is connected.
281
- - `secureConnect` starts when `connect` completes and ends when the handshaking process completes (HTTPS only).
282
- - `socket` starts when the socket is connected. See [request.setTimeout](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback).
283
- - `response` starts when the request has been written to the socket and ends when the response headers are received.
284
- - `send` starts when the socket is connected and ends with the request has been written to the socket.
285
- - `request` starts when the request is initiated and ends when the response's end event fires.
286
- */
287
- timeout?: Delays | number;
288
- /**
289
- When specified, `prefixUrl` will be prepended to `url`.
290
- The prefix can be any valid URL, either relative or absolute.
291
- A trailing slash `/` is optional - one will be added automatically.
292
-
293
- __Note__: `prefixUrl` will be ignored if the `url` argument is a URL instance.
294
-
295
- __Note__: Leading slashes in `input` are disallowed when using this option to enforce consistency and avoid confusion.
296
- For example, when the prefix URL is `https://example.com/foo` and the input is `/bar`, there's ambiguity whether the resulting URL would become `https://example.com/foo/bar` or `https://example.com/bar`.
297
- The latter is used by browsers.
298
-
299
- __Tip__: Useful when used with `got.extend()` to create niche-specific Got instances.
300
-
301
- __Tip__: You can change `prefixUrl` using hooks as long as the URL still includes the `prefixUrl`.
302
- If the URL doesn't include it anymore, it will throw.
303
-
304
- @example
305
- ```
306
- const got = require('got');
307
-
308
- (async () => {
309
- await got('unicorn', {prefixUrl: 'https://cats.com'});
310
- //=> 'https://cats.com/unicorn'
311
-
312
- const instance = got.extend({
313
- prefixUrl: 'https://google.com'
314
- });
315
-
316
- await instance('unicorn', {
317
- hooks: {
318
- beforeRequest: [
319
- options => {
320
- options.prefixUrl = 'https://cats.com';
321
- }
322
- ]
323
- }
324
- });
325
- //=> 'https://cats.com/unicorn'
326
- })();
327
- ```
328
- */
329
- prefixUrl?: string | URL;
330
- /**
331
- __Note #1__: The `body` option cannot be used with the `json` or `form` option.
332
-
333
- __Note #2__: If you provide this option, `got.stream()` will be read-only.
334
-
335
- __Note #3__: If you provide a payload with the `GET` or `HEAD` method, it will throw a `TypeError` unless the method is `GET` and the `allowGetBody` option is set to `true`.
336
-
337
- __Note #4__: This option is not enumerable and will not be merged with the instance defaults.
338
-
339
- The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / `fs.createReadStream` instance / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`.
340
- */
341
- body?: string | Buffer | Readable;
342
- /**
343
- The form body is converted to a query string using [`(new URLSearchParams(object)).toString()`](https://nodejs.org/api/url.html#url_constructor_new_urlsearchparams_obj).
344
-
345
- If the `Content-Type` header is not present, it will be set to `application/x-www-form-urlencoded`.
346
-
347
- __Note #1__: If you provide this option, `got.stream()` will be read-only.
348
-
349
- __Note #2__: This option is not enumerable and will not be merged with the instance defaults.
350
- */
351
- form?: Record<string, any>;
352
- /**
353
- JSON body. If the `Content-Type` header is not set, it will be set to `application/json`.
354
-
355
- __Note #1__: If you provide this option, `got.stream()` will be read-only.
356
-
357
- __Note #2__: This option is not enumerable and will not be merged with the instance defaults.
358
- */
359
- json?: Record<string, any>;
360
- /**
361
- The URL to request, as a string, a [`https.request` options object](https://nodejs.org/api/https.html#https_https_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url).
362
-
363
- Properties from `options` will override properties in the parsed `url`.
364
-
365
- If no protocol is specified, it will throw a `TypeError`.
366
-
367
- __Note__: The query string is **not** parsed as search params.
368
-
369
- @example
370
- ```
371
- got('https://example.com/?query=a b'); //=> https://example.com/?query=a%20b
372
- got('https://example.com/', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
373
-
374
- // The query string is overridden by `searchParams`
375
- got('https://example.com/?query=a b', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
376
- ```
377
- */
378
- url?: string | URL;
379
- /**
380
- Cookie support. You don't have to care about parsing or how to store them.
381
-
382
- __Note__: If you provide this option, `options.headers.cookie` will be overridden.
383
- */
384
- cookieJar?: PromiseCookieJar | ToughCookieJar;
385
- /**
386
- Ignore invalid cookies instead of throwing an error.
387
- Only useful when the `cookieJar` option has been set. Not recommended.
388
-
389
- @default false
390
- */
391
- ignoreInvalidCookies?: boolean;
392
- /**
393
- Query string that will be added to the request URL.
394
- This will override the query string in `url`.
395
-
396
- If you need to pass in an array, you can do it using a `URLSearchParams` instance.
397
-
398
- @example
399
- ```
400
- const got = require('got');
401
-
402
- const searchParams = new URLSearchParams([['key', 'a'], ['key', 'b']]);
403
-
404
- got('https://example.com', {searchParams});
405
-
406
- console.log(searchParams.toString());
407
- //=> 'key=a&key=b'
408
- ```
409
- */
410
- searchParams?: string | Record<string, string | number | boolean | null | undefined> | URLSearchParams;
411
- /**
412
- An instance of [`CacheableLookup`](https://github.com/szmarczak/cacheable-lookup) used for making DNS lookups.
413
- Useful when making lots of requests to different *public* hostnames.
414
-
415
- `CacheableLookup` uses `dns.resolver4(..)` and `dns.resolver6(...)` under the hood and fall backs to `dns.lookup(...)` when the first two fail, which may lead to additional delay.
416
-
417
- __Note__: This should stay disabled when making requests to internal hostnames such as `localhost`, `database.local` etc.
418
-
419
- @default false
420
- */
421
- dnsCache?: CacheableLookup | boolean;
422
- /**
423
- User data. In contrast to other options, `context` is not enumerable.
424
-
425
- __Note__: The object is never merged, it's just passed through.
426
- Got will not modify the object in any way.
427
-
428
- @example
429
- ```
430
- const got = require('got');
431
-
432
- const instance = got.extend({
433
- hooks: {
434
- beforeRequest: [
435
- options => {
436
- if (!options.context || !options.context.token) {
437
- throw new Error('Token required');
438
- }
439
-
440
- options.headers.token = options.context.token;
441
- }
442
- ]
443
- }
444
- });
445
-
446
- (async () => {
447
- const context = {
448
- token: 'secret'
449
- };
450
-
451
- const response = await instance('https://httpbin.org/headers', {context});
452
-
453
- // Let's see the headers
454
- console.log(response.body);
455
- })();
456
- ```
457
- */
458
- context?: Record<string, unknown>;
459
- /**
460
- Hooks allow modifications during the request lifecycle.
461
- Hook functions may be async and are run serially.
462
- */
463
- hooks?: Hooks;
464
- /**
465
- Defines if redirect responses should be followed automatically.
466
-
467
- Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`.
468
- This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4).
469
-
470
- @default true
471
- */
472
- followRedirect?: boolean;
473
- /**
474
- If exceeded, the request will be aborted and a `MaxRedirectsError` will be thrown.
475
-
476
- @default 10
477
- */
478
- maxRedirects?: number;
479
- /**
480
- A cache adapter instance for storing cached response data.
481
-
482
- @default false
483
- */
484
- cache?: string | CacheableRequest.StorageAdapter | false;
485
- /**
486
- Determines if a `got.HTTPError` is thrown for unsuccessful responses.
487
-
488
- If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing.
489
- This may be useful if you are checking for resource availability and are expecting error responses.
490
-
491
- @default true
492
- */
493
- throwHttpErrors?: boolean;
494
- username?: string;
495
- password?: string;
496
- /**
497
- If set to `true`, Got will additionally accept HTTP2 requests.
498
-
499
- It will choose either HTTP/1.1 or HTTP/2 depending on the ALPN protocol.
500
-
501
- __Note__: Overriding `options.request` will disable HTTP2 support.
502
-
503
- __Note__: This option will default to `true` in the next upcoming major release.
504
-
505
- @default false
506
-
507
- @example
508
- ```
509
- const got = require('got');
510
-
511
- (async () => {
512
- const {headers} = await got('https://nghttp2.org/httpbin/anything', {http2: true});
513
- console.log(headers.via);
514
- //=> '2 nghttpx'
515
- })();
516
- ```
517
- */
518
- http2?: boolean;
519
- /**
520
- Set this to `true` to allow sending body for the `GET` method.
521
- However, the [HTTP/2 specification](https://tools.ietf.org/html/rfc7540#section-8.1.3) says that `An HTTP GET request includes request header fields and no payload body`, therefore when using the HTTP/2 protocol this option will have no effect.
522
- This option is only meant to interact with non-compliant servers when you have no other choice.
523
-
524
- __Note__: The [RFC 7321](https://tools.ietf.org/html/rfc7231#section-4.3.1) doesn't specify any particular behavior for the GET method having a payload, therefore __it's considered an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern)__.
525
-
526
- @default false
527
- */
528
- allowGetBody?: boolean;
529
- lookup?: CacheableLookup['lookup'];
530
- /**
531
- Request headers.
532
-
533
- Existing headers will be overwritten. Headers set to `undefined` will be omitted.
534
-
535
- @default {}
536
- */
537
- headers?: Headers;
538
- /**
539
- By default, redirects will use [method rewriting](https://tools.ietf.org/html/rfc7231#section-6.4).
540
- For example, when sending a POST request and receiving a `302`, it will resend the body to the new location using the same HTTP method (`POST` in this case).
541
-
542
- @default true
543
- */
544
- methodRewriting?: boolean;
545
- /**
546
- Indicates which DNS record family to use.
547
-
548
- Values:
549
- - `auto`: IPv4 (if present) or IPv6
550
- - `ipv4`: Only IPv4
551
- - `ipv6`: Only IPv6
552
-
553
- __Note__: If you are using the undocumented option `family`, `dnsLookupIpVersion` will override it.
554
-
555
- @default 'auto'
556
- */
557
- dnsLookupIpVersion?: DnsLookupIpVersion;
558
- /**
559
- A function used to parse JSON responses.
560
-
561
- @example
562
- ```
563
- const got = require('got');
564
- const Bourne = require('@hapi/bourne');
565
-
566
- (async () => {
567
- const parsed = await got('https://example.com', {
568
- parseJson: text => Bourne.parse(text)
569
- }).json();
570
-
571
- console.log(parsed);
572
- })();
573
- ```
574
- */
575
- parseJson?: ParseJsonFunction;
576
- /**
577
- A function used to stringify the body of JSON requests.
578
-
579
- @example
580
- ```
581
- const got = require('got');
582
-
583
- (async () => {
584
- await got.post('https://example.com', {
585
- stringifyJson: object => JSON.stringify(object, (key, value) => {
586
- if (key.startsWith('_')) {
587
- return;
588
- }
589
-
590
- return value;
591
- }),
592
- json: {
593
- some: 'payload',
594
- _ignoreMe: 1234
595
- }
596
- });
597
- })();
598
- ```
599
-
600
- @example
601
- ```
602
- const got = require('got');
603
-
604
- (async () => {
605
- await got.post('https://example.com', {
606
- stringifyJson: object => JSON.stringify(object, (key, value) => {
607
- if (typeof value === 'number') {
608
- return value.toString();
609
- }
610
-
611
- return value;
612
- }),
613
- json: {
614
- some: 'payload',
615
- number: 1
616
- }
617
- });
618
- })();
619
- ```
620
- */
621
- stringifyJson?: StringifyJsonFunction;
622
- /**
623
- An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
624
-
625
- Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
626
-
627
- The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value.
628
- The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
629
-
630
- By default, it retries *only* on the specified methods, status codes, and on these network errors:
631
-
632
- - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
633
- - `ECONNRESET`: Connection was forcibly closed by a peer.
634
- - `EADDRINUSE`: Could not bind to any free port.
635
- - `ECONNREFUSED`: Connection was refused by the server.
636
- - `EPIPE`: The remote side of the stream being written has been closed.
637
- - `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
638
- - `ENETUNREACH`: No internet connection.
639
- - `EAI_AGAIN`: DNS lookup timed out.
640
-
641
- __Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.
642
- __Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
643
- */
644
- retry?: Partial<RequiredRetryOptions> | number;
645
- /**
646
- The IP address used to send the request from.
647
- */
648
- localAddress?: string;
649
- socketPath?: string;
650
- /**
651
- The HTTP method used to make the request.
652
-
653
- @default 'GET'
654
- */
655
- method?: Method;
656
- createConnection?: (options: http.RequestOptions, oncreate: (error: Error, socket: Socket) => void) => Socket;
657
- cacheOptions?: CacheOptions;
658
- /**
659
- If set to `false`, all invalid SSL certificates will be ignored and no error will be thrown.
660
-
661
- If set to `true`, it will throw an error whenever an invalid SSL certificate is detected.
662
-
663
- We strongly recommend to have this set to `true` for security reasons.
664
-
665
- @default true
666
-
667
- @example
668
- ```
669
- const got = require('got');
670
-
671
- (async () => {
672
- // Correct:
673
- await got('https://example.com', {rejectUnauthorized: true});
674
-
675
- // You can disable it when developing an HTTPS app:
676
- await got('https://localhost', {rejectUnauthorized: false});
677
-
678
- // Never do this:
679
- await got('https://example.com', {rejectUnauthorized: false});
680
- })();
681
- ```
682
- */
683
- rejectUnauthorized?: boolean;
684
- /**
685
- Options for the advanced HTTPS API.
686
- */
687
- https?: HTTPSOptions;
688
- }
689
- export interface Options extends PromiseOnly.Options, PlainOptions {
690
- }
691
- export interface HTTPSOptions {
692
- rejectUnauthorized?: https.RequestOptions['rejectUnauthorized'];
693
- checkServerIdentity?: CheckServerIdentityFunction;
694
- /**
695
- Override the default Certificate Authorities ([from Mozilla](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReport)).
696
-
697
- @example
698
- ```
699
- // Single Certificate Authority
700
- got('https://example.com', {
701
- https: {
702
- certificateAuthority: fs.readFileSync('./my_ca.pem')
703
- }
704
- });
705
- ```
706
- */
707
- certificateAuthority?: SecureContextOptions['ca'];
708
- /**
709
- Private keys in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
710
-
711
- [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) allows the option of private keys being encrypted.
712
- Encrypted keys will be decrypted with `options.https.passphrase`.
713
-
714
- Multiple keys with different passphrases can be provided as an array of `{pem: <string | Buffer>, passphrase: <string>}`
715
- */
716
- key?: SecureContextOptions['key'];
717
- /**
718
- [Certificate chains](https://en.wikipedia.org/wiki/X.509#Certificate_chains_and_cross-certification) in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
719
-
720
- One cert chain should be provided per private key (`options.https.key`).
721
-
722
- When providing multiple cert chains, they do not have to be in the same order as their private keys in `options.https.key`.
723
-
724
- If the intermediate certificates are not provided, the peer will not be able to validate the certificate, and the handshake will fail.
725
- */
726
- certificate?: SecureContextOptions['cert'];
727
- /**
728
- The passphrase to decrypt the `options.https.key` (if different keys have different passphrases refer to `options.https.key` documentation).
729
- */
730
- passphrase?: SecureContextOptions['passphrase'];
731
- pfx?: SecureContextOptions['pfx'];
732
- }
733
- interface NormalizedPlainOptions extends PlainOptions {
734
- method: Method;
735
- url: URL;
736
- timeout: Delays;
737
- prefixUrl: string;
738
- ignoreInvalidCookies: boolean;
739
- decompress: boolean;
740
- searchParams?: URLSearchParams;
741
- cookieJar?: PromiseCookieJar;
742
- headers: Headers;
743
- context: Record<string, unknown>;
744
- hooks: Required<Hooks>;
745
- followRedirect: boolean;
746
- maxRedirects: number;
747
- cache?: string | CacheableRequest.StorageAdapter;
748
- throwHttpErrors: boolean;
749
- dnsCache?: CacheableLookup;
750
- http2: boolean;
751
- allowGetBody: boolean;
752
- rejectUnauthorized: boolean;
753
- lookup?: CacheableLookup['lookup'];
754
- methodRewriting: boolean;
755
- username: string;
756
- password: string;
757
- parseJson: ParseJsonFunction;
758
- stringifyJson: StringifyJsonFunction;
759
- retry: RequiredRetryOptions;
760
- cacheOptions: CacheOptions;
761
- [kRequest]: HttpRequestFunction;
762
- [kIsNormalizedAlready]?: boolean;
763
- }
764
- export interface NormalizedOptions extends PromiseOnly.NormalizedOptions, NormalizedPlainOptions {
765
- }
766
- interface PlainDefaults {
767
- timeout: Delays;
768
- prefixUrl: string;
769
- method: Method;
770
- ignoreInvalidCookies: boolean;
771
- decompress: boolean;
772
- context: Record<string, unknown>;
773
- cookieJar?: PromiseCookieJar | ToughCookieJar;
774
- dnsCache?: CacheableLookup;
775
- headers: Headers;
776
- hooks: Required<Hooks>;
777
- followRedirect: boolean;
778
- maxRedirects: number;
779
- cache?: string | CacheableRequest.StorageAdapter;
780
- throwHttpErrors: boolean;
781
- http2: boolean;
782
- allowGetBody: boolean;
783
- https?: HTTPSOptions;
784
- methodRewriting: boolean;
785
- parseJson: ParseJsonFunction;
786
- stringifyJson: StringifyJsonFunction;
787
- retry: RequiredRetryOptions;
788
- agent?: Agents | false;
789
- request?: RequestFunction;
790
- searchParams?: URLSearchParams;
791
- lookup?: CacheableLookup['lookup'];
792
- localAddress?: string;
793
- createConnection?: Options['createConnection'];
794
- cacheOptions: CacheOptions;
795
- }
796
- export interface Defaults extends PromiseOnly.Defaults, PlainDefaults {
797
- }
798
- export interface Progress {
799
- percent: number;
800
- transferred: number;
801
- total?: number;
802
- }
803
- export interface PlainResponse extends IncomingMessageWithTimings {
804
- /**
805
- The original request URL.
806
- */
807
- requestUrl: string;
808
- /**
809
- The redirect URLs.
810
- */
811
- redirectUrls: string[];
812
- /**
813
- - `options` - The Got options that were set on this request.
814
-
815
- __Note__: This is not a [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest).
816
- */
817
- request: Request;
818
- /**
819
- The remote IP address.
820
-
821
- This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://github.com/lukechilds/cacheable-request/issues/86).
822
-
823
- __Note__: Not available when the response is cached.
824
- */
825
- ip?: string;
826
- /**
827
- Whether the response was retrieved from the cache.
828
- */
829
- isFromCache: boolean;
830
- /**
831
- The status code of the response.
832
- */
833
- statusCode: number;
834
- /**
835
- The request URL or the final URL after redirects.
836
- */
837
- url: string;
838
- /**
839
- The object contains the following properties:
840
-
841
- - `start` - Time when the request started.
842
- - `socket` - Time when a socket was assigned to the request.
843
- - `lookup` - Time when the DNS lookup finished.
844
- - `connect` - Time when the socket successfully connected.
845
- - `secureConnect` - Time when the socket securely connected.
846
- - `upload` - Time when the request finished uploading.
847
- - `response` - Time when the request fired `response` event.
848
- - `end` - Time when the response fired `end` event.
849
- - `error` - Time when the request fired `error` event.
850
- - `abort` - Time when the request fired `abort` event.
851
- - `phases`
852
- - `wait` - `timings.socket - timings.start`
853
- - `dns` - `timings.lookup - timings.socket`
854
- - `tcp` - `timings.connect - timings.lookup`
855
- - `tls` - `timings.secureConnect - timings.connect`
856
- - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
857
- - `firstByte` - `timings.response - timings.upload`
858
- - `download` - `timings.end - timings.response`
859
- - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
860
-
861
- If something has not been measured yet, it will be `undefined`.
862
-
863
- __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
864
- */
865
- timings: Timings;
866
- /**
867
- The number of times the request was retried.
868
- */
869
- retryCount: number;
870
- /**
871
- The raw result of the request.
872
- */
873
- rawBody?: Buffer;
874
- /**
875
- The result of the request.
876
- */
877
- body?: unknown;
878
- }
879
- export interface Response<T = unknown> extends PlainResponse {
880
- /**
881
- The result of the request.
882
- */
883
- body: T;
884
- /**
885
- The raw result of the request.
886
- */
887
- rawBody: Buffer;
888
- }
889
- export interface RequestEvents<T> {
890
- /**
891
- `request` event to get the request object of the request.
892
-
893
- __Tip__: You can use `request` event to abort requests.
894
-
895
- @example
896
- ```
897
- got.stream('https://github.com')
898
- .on('request', request => setTimeout(() => request.destroy(), 50));
899
- ```
900
- */
901
- on: ((name: 'request', listener: (request: http.ClientRequest) => void) => T)
902
- /**
903
- The `response` event to get the response object of the final request.
904
- */
905
- & (<R extends Response>(name: 'response', listener: (response: R) => void) => T)
906
- /**
907
- The `redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location.
908
- */
909
- & (<R extends Response, N extends NormalizedOptions>(name: 'redirect', listener: (response: R, nextOptions: N) => void) => T)
910
- /**
911
- Progress events for uploading (sending a request) and downloading (receiving a response).
912
- The `progress` argument is an object like:
913
-
914
- ```js
915
- {
916
- percent: 0.1,
917
- transferred: 1024,
918
- total: 10240
919
- }
920
- ```
921
-
922
- If the `content-length` header is missing, `total` will be `undefined`.
923
-
924
- @example
925
- ```js
926
- (async () => {
927
- const response = await got('https://sindresorhus.com')
928
- .on('downloadProgress', progress => {
929
- // Report download progress
930
- })
931
- .on('uploadProgress', progress => {
932
- // Report upload progress
933
- });
934
-
935
- console.log(response);
936
- })();
937
- ```
938
- */
939
- & ((name: 'uploadProgress' | 'downloadProgress', listener: (progress: Progress) => void) => T)
940
- /**
941
- To enable retrying on a Got stream, it is required to have a `retry` handler attached.
942
-
943
- When this event is emitted, you should reset the stream you were writing to and prepare the body again.
944
-
945
- See `got.options.retry` for more information.
946
- */
947
- & ((name: 'retry', listener: (retryCount: number, error: RequestError) => void) => T);
948
- }
949
- export declare const setNonEnumerableProperties: (sources: Array<Options | Defaults | undefined>, to: Options) => void;
950
- /**
951
- An error to be thrown when a request fails.
952
- Contains a `code` property with error class code, like `ECONNREFUSED`.
953
- */
954
- export declare class RequestError extends Error {
955
- code: string;
956
- stack: string;
957
- readonly options: NormalizedOptions;
958
- readonly response?: Response;
959
- readonly request?: Request;
960
- readonly timings?: Timings;
961
- constructor(message: string, error: Partial<Error & {
962
- code?: string;
963
- }>, self: Request | NormalizedOptions);
964
- }
965
- /**
966
- An error to be thrown when the server redirects you more than ten times.
967
- Includes a `response` property.
968
- */
969
- export declare class MaxRedirectsError extends RequestError {
970
- readonly response: Response;
971
- readonly request: Request;
972
- readonly timings: Timings;
973
- constructor(request: Request);
974
- }
975
- /**
976
- An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
977
- Includes a `response` property.
978
- */
979
- export declare class HTTPError extends RequestError {
980
- readonly response: Response;
981
- readonly request: Request;
982
- readonly timings: Timings;
983
- constructor(response: Response);
984
- }
985
- /**
986
- An error to be thrown when a cache method fails.
987
- For example, if the database goes down or there's a filesystem error.
988
- */
989
- export declare class CacheError extends RequestError {
990
- readonly request: Request;
991
- constructor(error: Error, request: Request);
992
- }
993
- /**
994
- An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
995
- */
996
- export declare class UploadError extends RequestError {
997
- readonly request: Request;
998
- constructor(error: Error, request: Request);
999
- }
1000
- /**
1001
- An error to be thrown when the request is aborted due to a timeout.
1002
- Includes an `event` and `timings` property.
1003
- */
1004
- export declare class TimeoutError extends RequestError {
1005
- readonly request: Request;
1006
- readonly timings: Timings;
1007
- readonly event: string;
1008
- constructor(error: TimedOutTimeoutError, timings: Timings, request: Request);
1009
- }
1010
- /**
1011
- An error to be thrown when reading from response stream fails.
1012
- */
1013
- export declare class ReadError extends RequestError {
1014
- readonly request: Request;
1015
- readonly response: Response;
1016
- readonly timings: Timings;
1017
- constructor(error: Error, request: Request);
1018
- }
1019
- /**
1020
- An error to be thrown when given an unsupported protocol.
1021
- */
1022
- export declare class UnsupportedProtocolError extends RequestError {
1023
- constructor(options: NormalizedOptions);
1024
- }
1025
- export default class Request extends Duplex implements RequestEvents<Request> {
1026
- ['constructor']: typeof Request;
1027
- [kUnproxyEvents]: () => void;
1028
- _cannotHaveBody: boolean;
1029
- [kDownloadedSize]: number;
1030
- [kUploadedSize]: number;
1031
- [kStopReading]: boolean;
1032
- [kTriggerRead]: boolean;
1033
- [kBody]: Options['body'];
1034
- [kJobs]: Array<() => void>;
1035
- [kRetryTimeout]?: NodeJS.Timeout;
1036
- [kBodySize]?: number;
1037
- [kServerResponsesPiped]: Set<ServerResponse>;
1038
- [kIsFromCache]?: boolean;
1039
- [kStartedReading]?: boolean;
1040
- [kCancelTimeouts]?: () => void;
1041
- [kResponseSize]?: number;
1042
- [kResponse]?: IncomingMessageWithTimings;
1043
- [kOriginalResponse]?: IncomingMessageWithTimings;
1044
- [kRequest]?: ClientRequest;
1045
- _noPipe?: boolean;
1046
- _progressCallbacks: Array<() => void>;
1047
- options: NormalizedOptions;
1048
- requestUrl: string;
1049
- requestInitialized: boolean;
1050
- redirects: string[];
1051
- retryCount: number;
1052
- constructor(url: string | URL | undefined, options?: Options, defaults?: Defaults);
1053
- static normalizeArguments(url?: string | URL, options?: Options, defaults?: Defaults): NormalizedOptions;
1054
- _lockWrite(): void;
1055
- _unlockWrite(): void;
1056
- _finalizeBody(): Promise<void>;
1057
- _onResponseBase(response: IncomingMessageWithTimings): Promise<void>;
1058
- _onResponse(response: IncomingMessageWithTimings): Promise<void>;
1059
- _onRequest(request: ClientRequest): void;
1060
- _createCacheableRequest(url: URL, options: RequestOptions): Promise<ClientRequest | ResponseLike>;
1061
- _makeRequest(): Promise<void>;
1062
- _error(error: RequestError): Promise<void>;
1063
- _beforeError(error: Error): void;
1064
- _read(): void;
1065
- _write(chunk: any, encoding: string | undefined, callback: (error?: Error | null) => void): void;
1066
- _writeRequest(chunk: any, encoding: BufferEncoding | undefined, callback: (error?: Error | null) => void): void;
1067
- _final(callback: (error?: Error | null) => void): void;
1068
- _destroy(error: Error | null, callback: (error: Error | null) => void): void;
1069
- get _isAboutToError(): boolean;
1070
- /**
1071
- The remote IP address.
1072
- */
1073
- get ip(): string | undefined;
1074
- /**
1075
- Indicates whether the request has been aborted or not.
1076
- */
1077
- get aborted(): boolean;
1078
- get socket(): Socket | undefined;
1079
- /**
1080
- Progress event for downloading (receiving a response).
1081
- */
1082
- get downloadProgress(): Progress;
1083
- /**
1084
- Progress event for uploading (sending a request).
1085
- */
1086
- get uploadProgress(): Progress;
1087
- /**
1088
- The object contains the following properties:
1089
-
1090
- - `start` - Time when the request started.
1091
- - `socket` - Time when a socket was assigned to the request.
1092
- - `lookup` - Time when the DNS lookup finished.
1093
- - `connect` - Time when the socket successfully connected.
1094
- - `secureConnect` - Time when the socket securely connected.
1095
- - `upload` - Time when the request finished uploading.
1096
- - `response` - Time when the request fired `response` event.
1097
- - `end` - Time when the response fired `end` event.
1098
- - `error` - Time when the request fired `error` event.
1099
- - `abort` - Time when the request fired `abort` event.
1100
- - `phases`
1101
- - `wait` - `timings.socket - timings.start`
1102
- - `dns` - `timings.lookup - timings.socket`
1103
- - `tcp` - `timings.connect - timings.lookup`
1104
- - `tls` - `timings.secureConnect - timings.connect`
1105
- - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
1106
- - `firstByte` - `timings.response - timings.upload`
1107
- - `download` - `timings.end - timings.response`
1108
- - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
1109
-
1110
- If something has not been measured yet, it will be `undefined`.
1111
-
1112
- __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
1113
- */
1114
- get timings(): Timings | undefined;
1115
- /**
1116
- Whether the response was retrieved from the cache.
1117
- */
1118
- get isFromCache(): boolean | undefined;
1119
- pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
1120
- end?: boolean;
1121
- }): T;
1122
- unpipe<T extends NodeJS.WritableStream>(destination: T): this;
1123
- }
1124
- export {};