cdk-common 2.0.1202 → 2.0.1203

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 (217) hide show
  1. package/.jsii +2 -2
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +5 -5
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +26 -6
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +1 -2
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +2 -2
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +15 -15
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +17 -17
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +35 -28
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +1 -1
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +16 -16
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +1 -1
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +1 -2
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +16 -9
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +28 -19
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +7 -6
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +1 -0
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +2 -2
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +6 -3
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +1 -1
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +7 -5
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +3 -7
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +63 -29
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +2 -5
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +8 -7
  28. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +13 -3
  29. package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +1 -1
  30. package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +8 -8
  31. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +21 -11
  32. package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +1 -1
  33. package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +1 -1
  34. package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -1
  35. package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +13 -13
  36. package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +14 -16
  37. package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
  38. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +182 -2
  39. package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +8 -19
  40. package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +1 -1
  41. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +53 -15
  42. package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +1 -1
  43. package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +1 -1
  44. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +2 -48
  45. package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +6 -6
  46. package/node_modules/@types/concat-stream/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
  47. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.1/index.d.ts +98 -0
  48. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  49. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
  50. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +9 -5
  51. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  52. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +96 -0
  53. package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +1 -1
  54. package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +52 -19
  55. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +16 -295
  56. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +29 -32
  57. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +17 -10
  58. package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
  59. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +34 -18
  60. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +5 -7
  61. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/agent.d.ts +7 -7
  62. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/api.d.ts +24 -24
  63. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/balanced-pool.d.ts +11 -11
  64. package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  65. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/client.d.ts +12 -13
  66. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cookies.d.ts +2 -0
  67. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/diagnostics-channel.d.ts +10 -10
  68. package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +281 -0
  69. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/env-http-proxy-agent.d.ts +2 -2
  70. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/errors.d.ts +69 -47
  71. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/fetch.d.ts +17 -16
  72. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/formdata.d.ts +7 -7
  73. package/node_modules/@types/concat-stream/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  74. package/node_modules/@types/concat-stream/node_modules/undici-types/global-origin.d.ts +7 -0
  75. package/node_modules/@types/concat-stream/node_modules/undici-types/h2c-client.d.ts +75 -0
  76. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/handlers.d.ts +7 -7
  77. package/node_modules/@types/concat-stream/node_modules/undici-types/header.d.ts +160 -0
  78. package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +75 -0
  79. package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +34 -0
  80. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-agent.d.ts +33 -18
  81. package/node_modules/@types/concat-stream/node_modules/undici-types/mock-call-history.d.ts +111 -0
  82. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-client.d.ts +4 -4
  83. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-errors.d.ts +3 -3
  84. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-interceptor.d.ts +19 -19
  85. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-pool.d.ts +4 -4
  86. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/package.json +1 -1
  87. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/patch.d.ts +0 -4
  88. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool-stats.d.ts +8 -8
  89. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool.d.ts +12 -12
  90. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/proxy-agent.d.ts +4 -4
  91. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/readable.d.ts +18 -15
  92. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-agent.d.ts +1 -1
  93. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-handler.d.ts +10 -10
  94. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/util.d.ts +3 -3
  95. package/node_modules/@types/concat-stream/node_modules/undici-types/utility.d.ts +7 -0
  96. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/webidl.d.ts +44 -6
  97. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/websocket.d.ts +35 -1
  98. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  99. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +5 -5
  100. package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +26 -6
  101. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +1 -2
  102. package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +2 -2
  103. package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +15 -15
  104. package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +17 -17
  105. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +35 -28
  106. package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +1 -1
  107. package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  108. package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +16 -16
  109. package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +1 -1
  110. package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +1 -2
  111. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +16 -9
  112. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +28 -19
  113. package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +7 -6
  114. package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +1 -0
  115. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +2 -2
  116. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +6 -3
  117. package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +1 -1
  118. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +7 -5
  119. package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +3 -7
  120. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +63 -29
  121. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +2 -5
  122. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +8 -7
  123. package/node_modules/@types/form-data/node_modules/@types/node/package.json +13 -3
  124. package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +1 -1
  125. package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +8 -8
  126. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +21 -11
  127. package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +1 -1
  128. package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +1 -1
  129. package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -1
  130. package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +13 -13
  131. package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +14 -16
  132. package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
  133. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +182 -2
  134. package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +8 -19
  135. package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +1 -1
  136. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +53 -15
  137. package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +1 -1
  138. package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +1 -1
  139. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +2 -48
  140. package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +6 -6
  141. package/node_modules/@types/form-data/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
  142. package/node_modules/@types/form-data/node_modules/@types/node/ts5.1/index.d.ts +98 -0
  143. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  144. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
  145. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +9 -5
  146. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  147. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +96 -0
  148. package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +1 -1
  149. package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +52 -19
  150. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +16 -295
  151. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +29 -32
  152. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +17 -10
  153. package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
  154. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +34 -18
  155. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +5 -7
  156. package/node_modules/@types/form-data/node_modules/undici-types/LICENSE +21 -0
  157. package/node_modules/@types/form-data/node_modules/undici-types/README.md +6 -0
  158. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +31 -0
  159. package/node_modules/@types/form-data/node_modules/undici-types/api.d.ts +43 -0
  160. package/node_modules/@types/form-data/node_modules/undici-types/balanced-pool.d.ts +29 -0
  161. package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  162. package/node_modules/@types/form-data/node_modules/undici-types/cache.d.ts +36 -0
  163. package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +107 -0
  164. package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +34 -0
  165. package/node_modules/@types/form-data/node_modules/undici-types/content-type.d.ts +21 -0
  166. package/node_modules/@types/form-data/node_modules/undici-types/cookies.d.ts +30 -0
  167. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  168. package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +281 -0
  169. package/node_modules/@types/form-data/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  170. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +171 -0
  171. package/node_modules/@types/form-data/node_modules/undici-types/eventsource.d.ts +61 -0
  172. package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +210 -0
  173. package/node_modules/@types/form-data/node_modules/undici-types/formdata.d.ts +108 -0
  174. package/node_modules/@types/form-data/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  175. package/node_modules/@types/form-data/node_modules/undici-types/global-origin.d.ts +7 -0
  176. package/node_modules/@types/form-data/node_modules/undici-types/h2c-client.d.ts +75 -0
  177. package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +15 -0
  178. package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +160 -0
  179. package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +75 -0
  180. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +34 -0
  181. package/node_modules/@types/form-data/node_modules/undici-types/mock-agent.d.ts +65 -0
  182. package/node_modules/@types/form-data/node_modules/undici-types/mock-call-history.d.ts +111 -0
  183. package/node_modules/@types/form-data/node_modules/undici-types/mock-client.d.ts +25 -0
  184. package/node_modules/@types/form-data/node_modules/undici-types/mock-errors.d.ts +12 -0
  185. package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  186. package/node_modules/@types/form-data/node_modules/undici-types/mock-pool.d.ts +25 -0
  187. package/node_modules/@types/form-data/node_modules/undici-types/package.json +55 -0
  188. package/node_modules/@types/form-data/node_modules/undici-types/patch.d.ts +29 -0
  189. package/node_modules/@types/form-data/node_modules/undici-types/pool-stats.d.ts +19 -0
  190. package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +39 -0
  191. package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +28 -0
  192. package/node_modules/@types/form-data/node_modules/undici-types/readable.d.ts +68 -0
  193. package/node_modules/@types/form-data/node_modules/undici-types/retry-agent.d.ts +8 -0
  194. package/node_modules/@types/form-data/node_modules/undici-types/retry-handler.d.ts +116 -0
  195. package/node_modules/@types/form-data/node_modules/undici-types/util.d.ts +18 -0
  196. package/node_modules/@types/form-data/node_modules/undici-types/utility.d.ts +7 -0
  197. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +266 -0
  198. package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +184 -0
  199. package/package.json +1 -1
  200. package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/index.d.ts +0 -9
  201. package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  202. package/node_modules/@types/form-data/node_modules/@types/node/compatibility/index.d.ts +0 -9
  203. package/node_modules/@types/form-data/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  204. package/node_modules/undici-types/dispatcher.d.ts +0 -256
  205. package/node_modules/undici-types/file.d.ts +0 -39
  206. package/node_modules/undici-types/filereader.d.ts +0 -54
  207. package/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  208. package/node_modules/undici-types/global-origin.d.ts +0 -7
  209. package/node_modules/undici-types/header.d.ts +0 -4
  210. package/node_modules/undici-types/index.d.ts +0 -71
  211. package/node_modules/undici-types/interceptors.d.ts +0 -17
  212. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/LICENSE +0 -0
  213. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/README.md +0 -0
  214. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cache.d.ts +0 -0
  215. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/connector.d.ts +0 -0
  216. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/content-type.d.ts +0 -0
  217. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/eventsource.d.ts +0 -0
@@ -1,256 +0,0 @@
1
- import { URL } from 'url'
2
- import { Duplex, Readable, Writable } from 'stream'
3
- import { EventEmitter } from 'events'
4
- import { Blob } from 'buffer'
5
- import { IncomingHttpHeaders } from './header'
6
- import BodyReadable from './readable'
7
- import { FormData } from './formdata'
8
- import Errors from './errors'
9
-
10
- type AbortSignal = unknown;
11
-
12
- export default Dispatcher
13
-
14
- /** Dispatcher is the core API used to dispatch requests. */
15
- declare class Dispatcher extends EventEmitter {
16
- /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
17
- dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
18
- /** Starts two-way communications with the requested resource. */
19
- connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>;
20
- connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
21
- /** Compose a chain of dispatchers */
22
- compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
23
- compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
24
- /** Performs an HTTP request. */
25
- request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>;
26
- request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void;
27
- /** For easy use with `stream.pipeline`. */
28
- pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex;
29
- /** A faster version of `Dispatcher.request`. */
30
- stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise<Dispatcher.StreamData>;
31
- stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void;
32
- /** Upgrade to a different protocol. */
33
- upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>;
34
- upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void;
35
- /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
36
- close(): Promise<void>;
37
- close(callback: () => void): void;
38
- /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
39
- destroy(): Promise<void>;
40
- destroy(err: Error | null): Promise<void>;
41
- destroy(callback: () => void): void;
42
- destroy(err: Error | null, callback: () => void): void;
43
-
44
- on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
45
- on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
46
- on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
47
- on(eventName: 'drain', callback: (origin: URL) => void): this;
48
-
49
-
50
- once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
51
- once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
52
- once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
53
- once(eventName: 'drain', callback: (origin: URL) => void): this;
54
-
55
-
56
- off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
57
- off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
58
- off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
59
- off(eventName: 'drain', callback: (origin: URL) => void): this;
60
-
61
-
62
- addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
63
- addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
64
- addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
65
- addListener(eventName: 'drain', callback: (origin: URL) => void): this;
66
-
67
- removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
68
- removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
69
- removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
70
- removeListener(eventName: 'drain', callback: (origin: URL) => void): this;
71
-
72
- prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
73
- prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
74
- prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
75
- prependListener(eventName: 'drain', callback: (origin: URL) => void): this;
76
-
77
- prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
78
- prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
79
- prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
80
- prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this;
81
-
82
- listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
83
- listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
84
- listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
85
- listeners(eventName: 'drain'): ((origin: URL) => void)[];
86
-
87
- rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
88
- rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
89
- rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
90
- rawListeners(eventName: 'drain'): ((origin: URL) => void)[];
91
-
92
- emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean;
93
- emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
94
- emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
95
- emit(eventName: 'drain', origin: URL): boolean;
96
- }
97
-
98
- declare namespace Dispatcher {
99
- export interface ComposedDispatcher extends Dispatcher {}
100
- export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
101
- export interface DispatchOptions {
102
- origin?: string | URL;
103
- path: string;
104
- method: HttpMethod;
105
- /** Default: `null` */
106
- body?: string | Buffer | Uint8Array | Readable | null | FormData;
107
- /** Default: `null` */
108
- headers?: IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
109
- /** Query string params to be embedded in the request URL. Default: `null` */
110
- query?: Record<string, any>;
111
- /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
112
- idempotent?: boolean;
113
- /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. */
114
- blocking?: boolean;
115
- /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
116
- upgrade?: boolean | string | null;
117
- /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
118
- headersTimeout?: number | null;
119
- /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
120
- bodyTimeout?: number | null;
121
- /** Whether the request should stablish a keep-alive or not. Default `false` */
122
- reset?: boolean;
123
- /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
124
- throwOnError?: boolean;
125
- /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/
126
- expectContinue?: boolean;
127
- }
128
- export interface ConnectOptions {
129
- origin: string | URL;
130
- path: string;
131
- /** Default: `null` */
132
- headers?: IncomingHttpHeaders | string[] | null;
133
- /** Default: `null` */
134
- signal?: AbortSignal | EventEmitter | null;
135
- /** This argument parameter is passed through to `ConnectData` */
136
- opaque?: unknown;
137
- /** Default: 0 */
138
- maxRedirections?: number;
139
- /** Default: false */
140
- redirectionLimitReached?: boolean;
141
- /** Default: `null` */
142
- responseHeader?: 'raw' | null;
143
- }
144
- export interface RequestOptions extends DispatchOptions {
145
- /** Default: `null` */
146
- opaque?: unknown;
147
- /** Default: `null` */
148
- signal?: AbortSignal | EventEmitter | null;
149
- /** Default: 0 */
150
- maxRedirections?: number;
151
- /** Default: false */
152
- redirectionLimitReached?: boolean;
153
- /** Default: `null` */
154
- onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
155
- /** Default: `null` */
156
- responseHeader?: 'raw' | null;
157
- /** Default: `64 KiB` */
158
- highWaterMark?: number;
159
- }
160
- export interface PipelineOptions extends RequestOptions {
161
- /** `true` if the `handler` will return an object stream. Default: `false` */
162
- objectMode?: boolean;
163
- }
164
- export interface UpgradeOptions {
165
- path: string;
166
- /** Default: `'GET'` */
167
- method?: string;
168
- /** Default: `null` */
169
- headers?: IncomingHttpHeaders | string[] | null;
170
- /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
171
- protocol?: string;
172
- /** Default: `null` */
173
- signal?: AbortSignal | EventEmitter | null;
174
- /** Default: 0 */
175
- maxRedirections?: number;
176
- /** Default: false */
177
- redirectionLimitReached?: boolean;
178
- /** Default: `null` */
179
- responseHeader?: 'raw' | null;
180
- }
181
- export interface ConnectData {
182
- statusCode: number;
183
- headers: IncomingHttpHeaders;
184
- socket: Duplex;
185
- opaque: unknown;
186
- }
187
- export interface ResponseData {
188
- statusCode: number;
189
- headers: IncomingHttpHeaders;
190
- body: BodyReadable & BodyMixin;
191
- trailers: Record<string, string>;
192
- opaque: unknown;
193
- context: object;
194
- }
195
- export interface PipelineHandlerData {
196
- statusCode: number;
197
- headers: IncomingHttpHeaders;
198
- opaque: unknown;
199
- body: BodyReadable;
200
- context: object;
201
- }
202
- export interface StreamData {
203
- opaque: unknown;
204
- trailers: Record<string, string>;
205
- }
206
- export interface UpgradeData {
207
- headers: IncomingHttpHeaders;
208
- socket: Duplex;
209
- opaque: unknown;
210
- }
211
- export interface StreamFactoryData {
212
- statusCode: number;
213
- headers: IncomingHttpHeaders;
214
- opaque: unknown;
215
- context: object;
216
- }
217
- export type StreamFactory = (data: StreamFactoryData) => Writable;
218
- export interface DispatchHandlers {
219
- /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
220
- onConnect?(abort: (err?: Error) => void): void;
221
- /** Invoked when an error has occurred. */
222
- onError?(err: Error): void;
223
- /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
224
- onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
225
- /** Invoked when response is received, before headers have been read. **/
226
- onResponseStarted?(): void;
227
- /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
228
- onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
229
- /** Invoked when response payload data is received. */
230
- onData?(chunk: Buffer): boolean;
231
- /** Invoked when response payload and trailers have been received and the request has completed. */
232
- onComplete?(trailers: string[] | null): void;
233
- /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
234
- onBodySent?(chunkSize: number, totalBytesSent: number): void;
235
- }
236
- export type PipelineHandler = (data: PipelineHandlerData) => Readable;
237
- export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
238
-
239
- /**
240
- * @link https://fetch.spec.whatwg.org/#body-mixin
241
- */
242
- interface BodyMixin {
243
- readonly body?: never;
244
- readonly bodyUsed: boolean;
245
- arrayBuffer(): Promise<ArrayBuffer>;
246
- blob(): Promise<Blob>;
247
- bytes(): Promise<Uint8Array>;
248
- formData(): Promise<never>;
249
- json(): Promise<unknown>;
250
- text(): Promise<string>;
251
- }
252
-
253
- export interface DispatchInterceptor {
254
- (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch']
255
- }
256
- }
@@ -1,39 +0,0 @@
1
- // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT)
2
- /// <reference types="node" />
3
-
4
- import { Blob } from 'buffer'
5
-
6
- export interface BlobPropertyBag {
7
- type?: string
8
- endings?: 'native' | 'transparent'
9
- }
10
-
11
- export interface FilePropertyBag extends BlobPropertyBag {
12
- /**
13
- * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
14
- */
15
- lastModified?: number
16
- }
17
-
18
- export declare class File extends Blob {
19
- /**
20
- * Creates a new File instance.
21
- *
22
- * @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
23
- * @param fileName The name of the file.
24
- * @param options An options object containing optional attributes for the file.
25
- */
26
- constructor(fileBits: ReadonlyArray<string | NodeJS.ArrayBufferView | Blob>, fileName: string, options?: FilePropertyBag)
27
-
28
- /**
29
- * Name of the file referenced by the File object.
30
- */
31
- readonly name: string
32
-
33
- /**
34
- * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
35
- */
36
- readonly lastModified: number
37
-
38
- readonly [Symbol.toStringTag]: string
39
- }
@@ -1,54 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- import { Blob } from 'buffer'
4
- import { DOMException, EventInit } from './patch'
5
-
6
- export declare class FileReader {
7
- __proto__: EventTarget & FileReader
8
-
9
- constructor ()
10
-
11
- readAsArrayBuffer (blob: Blob): void
12
- readAsBinaryString (blob: Blob): void
13
- readAsText (blob: Blob, encoding?: string): void
14
- readAsDataURL (blob: Blob): void
15
-
16
- abort (): void
17
-
18
- static readonly EMPTY = 0
19
- static readonly LOADING = 1
20
- static readonly DONE = 2
21
-
22
- readonly EMPTY = 0
23
- readonly LOADING = 1
24
- readonly DONE = 2
25
-
26
- readonly readyState: number
27
-
28
- readonly result: string | ArrayBuffer | null
29
-
30
- readonly error: DOMException | null
31
-
32
- onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
33
- onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
34
- onload: null | ((this: FileReader, event: ProgressEvent) => void)
35
- onabort: null | ((this: FileReader, event: ProgressEvent) => void)
36
- onerror: null | ((this: FileReader, event: ProgressEvent) => void)
37
- onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
38
- }
39
-
40
- export interface ProgressEventInit extends EventInit {
41
- lengthComputable?: boolean
42
- loaded?: number
43
- total?: number
44
- }
45
-
46
- export declare class ProgressEvent {
47
- __proto__: Event & ProgressEvent
48
-
49
- constructor (type: string, eventInitDict?: ProgressEventInit)
50
-
51
- readonly lengthComputable: boolean
52
- readonly loaded: number
53
- readonly total: number
54
- }
@@ -1,9 +0,0 @@
1
- import Dispatcher from "./dispatcher";
2
-
3
- export {
4
- getGlobalDispatcher,
5
- setGlobalDispatcher
6
- }
7
-
8
- declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
9
- declare function getGlobalDispatcher(): Dispatcher;
@@ -1,7 +0,0 @@
1
- export {
2
- setGlobalOrigin,
3
- getGlobalOrigin
4
- }
5
-
6
- declare function setGlobalOrigin(origin: string | URL | undefined): void;
7
- declare function getGlobalOrigin(): URL | undefined;
@@ -1,4 +0,0 @@
1
- /**
2
- * The header type declaration of `undici`.
3
- */
4
- export type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
@@ -1,71 +0,0 @@
1
- import Dispatcher from'./dispatcher'
2
- import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher'
3
- import { setGlobalOrigin, getGlobalOrigin } from './global-origin'
4
- import Pool from'./pool'
5
- import { RedirectHandler, DecoratorHandler } from './handlers'
6
-
7
- import BalancedPool from './balanced-pool'
8
- import Client from'./client'
9
- import buildConnector from'./connector'
10
- import errors from'./errors'
11
- import Agent from'./agent'
12
- import MockClient from'./mock-client'
13
- import MockPool from'./mock-pool'
14
- import MockAgent from'./mock-agent'
15
- import mockErrors from'./mock-errors'
16
- import ProxyAgent from'./proxy-agent'
17
- import EnvHttpProxyAgent from './env-http-proxy-agent'
18
- import RetryHandler from'./retry-handler'
19
- import RetryAgent from'./retry-agent'
20
- import { request, pipeline, stream, connect, upgrade } from './api'
21
- import interceptors from './interceptors'
22
-
23
- export * from './util'
24
- export * from './cookies'
25
- export * from './eventsource'
26
- export * from './fetch'
27
- export * from './file'
28
- export * from './filereader'
29
- export * from './formdata'
30
- export * from './diagnostics-channel'
31
- export * from './websocket'
32
- export * from './content-type'
33
- export * from './cache'
34
- export { Interceptable } from './mock-interceptor'
35
-
36
- export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
37
- export default Undici
38
-
39
- declare namespace Undici {
40
- var Dispatcher: typeof import('./dispatcher').default
41
- var Pool: typeof import('./pool').default;
42
- var RedirectHandler: typeof import ('./handlers').RedirectHandler
43
- var DecoratorHandler: typeof import ('./handlers').DecoratorHandler
44
- var RetryHandler: typeof import ('./retry-handler').default
45
- var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor
46
- var BalancedPool: typeof import('./balanced-pool').default;
47
- var Client: typeof import('./client').default;
48
- var buildConnector: typeof import('./connector').default;
49
- var errors: typeof import('./errors').default;
50
- var Agent: typeof import('./agent').default;
51
- var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher;
52
- var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher;
53
- var request: typeof import('./api').request;
54
- var stream: typeof import('./api').stream;
55
- var pipeline: typeof import('./api').pipeline;
56
- var connect: typeof import('./api').connect;
57
- var upgrade: typeof import('./api').upgrade;
58
- var MockClient: typeof import('./mock-client').default;
59
- var MockPool: typeof import('./mock-pool').default;
60
- var MockAgent: typeof import('./mock-agent').default;
61
- var mockErrors: typeof import('./mock-errors').default;
62
- var fetch: typeof import('./fetch').fetch;
63
- var Headers: typeof import('./fetch').Headers;
64
- var Response: typeof import('./fetch').Response;
65
- var Request: typeof import('./fetch').Request;
66
- var FormData: typeof import('./formdata').FormData;
67
- var File: typeof import('./file').File;
68
- var FileReader: typeof import('./filereader').FileReader;
69
- var caches: typeof import('./cache').caches;
70
- var interceptors: typeof import('./interceptors').default;
71
- }
@@ -1,17 +0,0 @@
1
- import Dispatcher from "./dispatcher";
2
- import RetryHandler from "./retry-handler";
3
-
4
- export default Interceptors;
5
-
6
- declare namespace Interceptors {
7
- export type DumpInterceptorOpts = { maxSize?: number }
8
- export type RetryInterceptorOpts = RetryHandler.RetryOptions
9
- export type RedirectInterceptorOpts = { maxRedirections?: number }
10
- export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
11
-
12
- export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
13
- export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
14
- export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
15
- export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
16
- export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
17
- }