node-red-contrib-tak-registration 0.16.0 → 0.16.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 (347) hide show
  1. package/node_modules/@types/node/README.md +2 -2
  2. package/node_modules/@types/node/assert.d.ts +8 -6
  3. package/node_modules/@types/node/async_hooks.d.ts +26 -6
  4. package/node_modules/@types/node/buffer.d.ts +7 -3
  5. package/node_modules/@types/node/child_process.d.ts +28 -124
  6. package/node_modules/@types/node/cluster.d.ts +15 -15
  7. package/node_modules/@types/node/console.d.ts +17 -17
  8. package/node_modules/@types/node/crypto.d.ts +95 -38
  9. package/node_modules/@types/node/dgram.d.ts +1 -1
  10. package/node_modules/@types/node/diagnostics_channel.d.ts +18 -13
  11. package/node_modules/@types/node/dns/promises.d.ts +36 -9
  12. package/node_modules/@types/node/dns.d.ts +89 -36
  13. package/node_modules/@types/node/domain.d.ts +1 -1
  14. package/node_modules/@types/node/events.d.ts +1 -2
  15. package/node_modules/@types/node/fs/promises.d.ts +67 -40
  16. package/node_modules/@types/node/fs.d.ts +88 -52
  17. package/node_modules/@types/node/globals.d.ts +148 -351
  18. package/node_modules/@types/node/globals.typedarray.d.ts +1 -0
  19. package/node_modules/@types/node/http.d.ts +73 -7
  20. package/node_modules/@types/node/http2.d.ts +88 -15
  21. package/node_modules/@types/node/https.d.ts +1 -1
  22. package/node_modules/@types/node/index.d.ts +13 -6
  23. package/node_modules/@types/node/inspector.d.ts +222 -13
  24. package/node_modules/@types/node/module.d.ts +153 -31
  25. package/node_modules/@types/node/net.d.ts +3 -6
  26. package/node_modules/@types/node/os.d.ts +8 -7
  27. package/node_modules/@types/node/package.json +14 -84
  28. package/node_modules/@types/node/path.d.ts +1 -1
  29. package/node_modules/@types/node/perf_hooks.d.ts +24 -10
  30. package/node_modules/@types/node/process.d.ts +21 -11
  31. package/node_modules/@types/node/punycode.d.ts +1 -1
  32. package/node_modules/@types/node/querystring.d.ts +1 -1
  33. package/node_modules/@types/node/readline/promises.d.ts +0 -1
  34. package/node_modules/@types/node/readline.d.ts +13 -13
  35. package/node_modules/@types/node/repl.d.ts +25 -17
  36. package/node_modules/@types/node/sea.d.ts +1 -1
  37. package/node_modules/@types/node/sqlite.d.ts +209 -3
  38. package/node_modules/@types/node/stream/web.d.ts +8 -0
  39. package/node_modules/@types/node/stream.d.ts +30 -24
  40. package/node_modules/@types/node/string_decoder.d.ts +1 -1
  41. package/node_modules/@types/node/test.d.ts +2029 -1975
  42. package/node_modules/@types/node/timers/promises.d.ts +1 -1
  43. package/node_modules/@types/node/timers.d.ts +1 -3
  44. package/node_modules/@types/node/tls.d.ts +2 -48
  45. package/node_modules/@types/node/trace_events.d.ts +6 -6
  46. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  47. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
  48. package/node_modules/@types/node/ts5.6/index.d.ts +15 -6
  49. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  50. package/node_modules/@types/node/ts5.7/index.d.ts +101 -0
  51. package/node_modules/@types/node/tty.d.ts +1 -1
  52. package/node_modules/@types/node/url.d.ts +73 -20
  53. package/node_modules/@types/node/util.d.ts +23 -298
  54. package/node_modules/@types/node/v8.d.ts +62 -32
  55. package/node_modules/@types/node/vm.d.ts +132 -24
  56. package/node_modules/@types/node/wasi.d.ts +22 -1
  57. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  58. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  59. package/node_modules/@types/node/web-globals/events.d.ts +94 -0
  60. package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
  61. package/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  62. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  63. package/node_modules/@types/node/worker_threads.d.ts +85 -26
  64. package/node_modules/@types/node/zlib.d.ts +13 -9
  65. package/node_modules/axios/CHANGELOG.md +58 -0
  66. package/node_modules/axios/README.md +87 -10
  67. package/node_modules/axios/dist/axios.js +355 -289
  68. package/node_modules/axios/dist/axios.js.map +1 -1
  69. package/node_modules/axios/dist/axios.min.js +2 -2
  70. package/node_modules/axios/dist/axios.min.js.map +1 -1
  71. package/node_modules/axios/dist/browser/axios.cjs +286 -213
  72. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  73. package/node_modules/axios/dist/esm/axios.js +286 -213
  74. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  75. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  76. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  77. package/node_modules/axios/dist/node/axios.cjs +377 -213
  78. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  79. package/node_modules/axios/index.d.cts +12 -5
  80. package/node_modules/axios/index.d.ts +13 -4
  81. package/node_modules/axios/lib/adapters/adapters.js +6 -4
  82. package/node_modules/axios/lib/adapters/fetch.js +221 -162
  83. package/node_modules/axios/lib/adapters/http.js +18 -0
  84. package/node_modules/axios/lib/adapters/xhr.js +11 -8
  85. package/node_modules/axios/lib/core/Axios.js +0 -2
  86. package/node_modules/axios/lib/core/AxiosError.js +10 -3
  87. package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
  88. package/node_modules/axios/lib/defaults/index.js +1 -1
  89. package/node_modules/axios/lib/env/data.js +1 -1
  90. package/node_modules/axios/lib/helpers/buildURL.js +1 -3
  91. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
  92. package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
  93. package/node_modules/axios/lib/utils.js +5 -3
  94. package/node_modules/axios/package.json +18 -12
  95. package/node_modules/bignumber.js/CHANGELOG.md +6 -1
  96. package/node_modules/bignumber.js/README.md +5 -4
  97. package/node_modules/bignumber.js/bignumber.js +2 -2
  98. package/node_modules/bignumber.js/bignumber.mjs +2 -2
  99. package/node_modules/bignumber.js/package.json +1 -1
  100. package/node_modules/follow-redirects/package.json +1 -1
  101. package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
  102. package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
  103. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  104. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  105. package/node_modules/protobufjs/dist/protobuf.js +2 -2
  106. package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
  107. package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
  108. package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
  109. package/node_modules/protobufjs/package.json +1 -1
  110. package/node_modules/undici-types/agent.d.ts +11 -7
  111. package/node_modules/undici-types/api.d.ts +24 -24
  112. package/node_modules/undici-types/balanced-pool.d.ts +11 -11
  113. package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  114. package/node_modules/undici-types/client-stats.d.ts +15 -0
  115. package/node_modules/undici-types/client.d.ts +18 -16
  116. package/node_modules/undici-types/cookies.d.ts +2 -0
  117. package/node_modules/undici-types/diagnostics-channel.d.ts +19 -10
  118. package/node_modules/undici-types/dispatcher.d.ts +119 -93
  119. package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  120. package/node_modules/undici-types/errors.d.ts +69 -47
  121. package/node_modules/undici-types/eventsource.d.ts +3 -3
  122. package/node_modules/undici-types/fetch.d.ts +18 -16
  123. package/node_modules/undici-types/formdata.d.ts +7 -7
  124. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  125. package/node_modules/undici-types/global-origin.d.ts +5 -5
  126. package/node_modules/undici-types/h2c-client.d.ts +75 -0
  127. package/node_modules/undici-types/handlers.d.ts +8 -8
  128. package/node_modules/undici-types/header.d.ts +157 -1
  129. package/node_modules/undici-types/index.d.ts +51 -47
  130. package/node_modules/undici-types/interceptors.d.ts +25 -8
  131. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  132. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  133. package/node_modules/undici-types/mock-client.d.ts +6 -4
  134. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  135. package/node_modules/undici-types/mock-interceptor.d.ts +21 -19
  136. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  137. package/node_modules/undici-types/package.json +1 -1
  138. package/node_modules/undici-types/patch.d.ts +0 -4
  139. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  140. package/node_modules/undici-types/pool.d.ts +14 -12
  141. package/node_modules/undici-types/proxy-agent.d.ts +5 -4
  142. package/node_modules/undici-types/readable.d.ts +18 -15
  143. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  144. package/node_modules/undici-types/retry-handler.d.ts +19 -10
  145. package/node_modules/undici-types/util.d.ts +3 -3
  146. package/node_modules/undici-types/utility.d.ts +7 -0
  147. package/node_modules/undici-types/webidl.d.ts +50 -8
  148. package/node_modules/undici-types/websocket.d.ts +36 -2
  149. package/node_modules/uuid/README.md +8 -19
  150. package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
  151. package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
  152. package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
  153. package/node_modules/uuid/dist-node/native.js +2 -0
  154. package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
  155. package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
  156. package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
  157. package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
  158. package/node_modules/uuid/package.json +28 -41
  159. package/package.json +4 -4
  160. package/tak-registration.bak +557 -0
  161. package/tak-registration.js +8 -8
  162. package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  163. package/node_modules/@types/node/compatibility/index.d.ts +0 -9
  164. package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  165. package/node_modules/@types/node/dom-events.d.ts +0 -124
  166. package/node_modules/undici-types/file.d.ts +0 -39
  167. package/node_modules/undici-types/filereader.d.ts +0 -54
  168. package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
  169. package/node_modules/uuid/dist/cjs/index.js +0 -31
  170. package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
  171. package/node_modules/uuid/dist/cjs/max.js +0 -3
  172. package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
  173. package/node_modules/uuid/dist/cjs/md5.js +0 -13
  174. package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
  175. package/node_modules/uuid/dist/cjs/native.js +0 -4
  176. package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
  177. package/node_modules/uuid/dist/cjs/nil.js +0 -3
  178. package/node_modules/uuid/dist/cjs/package.json +0 -1
  179. package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
  180. package/node_modules/uuid/dist/cjs/parse.js +0 -11
  181. package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
  182. package/node_modules/uuid/dist/cjs/regex.js +0 -3
  183. package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
  184. package/node_modules/uuid/dist/cjs/rng.js +0 -13
  185. package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
  186. package/node_modules/uuid/dist/cjs/sha1.js +0 -13
  187. package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
  188. package/node_modules/uuid/dist/cjs/stringify.js +0 -39
  189. package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
  190. package/node_modules/uuid/dist/cjs/types.js +0 -2
  191. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
  192. package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
  193. package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
  194. package/node_modules/uuid/dist/cjs/v1.js +0 -87
  195. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
  196. package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
  197. package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
  198. package/node_modules/uuid/dist/cjs/v3.js +0 -14
  199. package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
  200. package/node_modules/uuid/dist/cjs/v35.js +0 -41
  201. package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
  202. package/node_modules/uuid/dist/cjs/v4.js +0 -29
  203. package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
  204. package/node_modules/uuid/dist/cjs/v5.js +0 -14
  205. package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
  206. package/node_modules/uuid/dist/cjs/v6.js +0 -19
  207. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
  208. package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
  209. package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
  210. package/node_modules/uuid/dist/cjs/v7.js +0 -69
  211. package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
  212. package/node_modules/uuid/dist/cjs/validate.js +0 -7
  213. package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
  214. package/node_modules/uuid/dist/cjs/version.js +0 -10
  215. package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
  216. package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
  217. package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
  218. package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
  219. package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
  220. package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
  221. package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
  222. package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
  223. package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
  224. package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
  225. package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
  226. package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
  227. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
  228. package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
  229. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
  230. package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
  231. package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
  232. package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
  233. package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
  234. package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
  235. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
  236. package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
  237. package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
  238. package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
  239. package/node_modules/uuid/dist/esm/index.d.ts +0 -15
  240. package/node_modules/uuid/dist/esm/max.d.ts +0 -2
  241. package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
  242. package/node_modules/uuid/dist/esm/native.d.ts +0 -6
  243. package/node_modules/uuid/dist/esm/native.js +0 -2
  244. package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
  245. package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
  246. package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
  247. package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
  248. package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
  249. package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
  250. package/node_modules/uuid/dist/esm/types.d.ts +0 -21
  251. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
  252. package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
  253. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
  254. package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
  255. package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
  256. package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
  257. package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
  258. package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
  259. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
  260. package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
  261. package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
  262. package/node_modules/uuid/dist/esm/version.d.ts +0 -2
  263. package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
  264. package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
  265. package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
  266. package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
  267. package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
  268. package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
  269. package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
  270. package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
  271. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
  272. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
  273. package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
  274. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
  275. package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
  276. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
  277. package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
  278. package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
  279. package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
  280. package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
  281. package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
  282. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
  283. package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
  284. package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
  285. package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
  286. /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
  287. /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
  288. /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
  289. /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
  290. /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
  291. /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
  292. /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
  293. /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
  294. /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
  295. /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
  296. /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
  297. /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
  298. /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
  299. /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
  300. /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
  301. /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
  302. /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
  303. /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
  304. /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
  305. /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
  306. /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
  307. /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
  308. /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
  309. /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
  310. /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
  311. /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
  312. /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
  313. /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
  314. /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
  315. /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
  316. /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
  317. /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
  318. /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
  319. /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
  320. /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
  321. /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
  322. /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
  323. /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
  324. /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
  325. /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
  326. /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
  327. /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
  328. /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
  329. /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
  330. /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
  331. /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
  332. /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
  333. /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
  334. /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
  335. /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
  336. /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
  337. /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
  338. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
  339. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
  340. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
  341. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
  342. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
  343. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
  344. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
  345. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
  346. /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
  347. /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
@@ -6,98 +6,99 @@ import { IncomingHttpHeaders } from './header'
6
6
  import BodyReadable from './readable'
7
7
  import { FormData } from './formdata'
8
8
  import Errors from './errors'
9
+ import { Autocomplete } from './utility'
9
10
 
10
- type AbortSignal = unknown;
11
+ type AbortSignal = unknown
11
12
 
12
13
  export default Dispatcher
13
14
 
15
+ export type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
16
+
14
17
  /** Dispatcher is the core API used to dispatch requests. */
15
18
  declare class Dispatcher extends EventEmitter {
16
19
  /** 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;
20
+ dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
18
21
  /** 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;
22
+ connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>
23
+ connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void
21
24
  /** Compose a chain of dispatchers */
22
- compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
23
- compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
25
+ compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
26
+ compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
24
27
  /** 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;
28
+ request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>
29
+ request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void
27
30
  /** For easy use with `stream.pipeline`. */
28
- pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex;
31
+ pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex
29
32
  /** 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;
33
+ stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>
34
+ stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void
32
35
  /** 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;
36
+ upgrade (options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>
37
+ upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void
35
38
  /** 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;
39
+ close (): Promise<void>
40
+ close (callback: () => void): void
38
41
  /** 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;
42
+ destroy (): Promise<void>
43
+ destroy (err: Error | null): Promise<void>
44
+ destroy (callback: () => void): void
45
+ destroy (err: Error | null, callback: () => void): void
54
46
 
47
+ on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
48
+ on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
49
+ on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
50
+ on (eventName: 'drain', callback: (origin: URL) => void): this
55
51
 
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;
52
+ once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
53
+ once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
54
+ once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
55
+ once (eventName: 'drain', callback: (origin: URL) => void): this
60
56
 
57
+ off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
58
+ off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
59
+ off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
60
+ off (eventName: 'drain', callback: (origin: URL) => void): this
61
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;
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
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;
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
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;
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
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;
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
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)[];
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
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)[];
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
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;
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
96
  }
97
97
 
98
98
  declare namespace Dispatcher {
99
99
  export interface ComposedDispatcher extends Dispatcher {}
100
- export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
100
+ export type Dispatch = Dispatcher['dispatch']
101
+ export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
101
102
  export interface DispatchOptions {
102
103
  origin?: string | URL;
103
104
  path: string;
@@ -105,12 +106,12 @@ declare namespace Dispatcher {
105
106
  /** Default: `null` */
106
107
  body?: string | Buffer | Uint8Array | Readable | null | FormData;
107
108
  /** Default: `null` */
108
- headers?: IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
109
+ headers?: UndiciHeaders;
109
110
  /** Query string params to be embedded in the request URL. Default: `null` */
110
111
  query?: Record<string, any>;
111
112
  /** 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
113
  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
+ /** 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. Defaults to `method !== 'HEAD'`. */
114
115
  blocking?: boolean;
115
116
  /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
116
117
  upgrade?: boolean | string | null;
@@ -122,28 +123,28 @@ declare namespace Dispatcher {
122
123
  reset?: boolean;
123
124
  /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
124
125
  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
+ /** 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
127
  expectContinue?: boolean;
127
128
  }
128
- export interface ConnectOptions {
129
+ export interface ConnectOptions<TOpaque = null> {
129
130
  origin: string | URL;
130
131
  path: string;
131
132
  /** Default: `null` */
132
- headers?: IncomingHttpHeaders | string[] | null;
133
+ headers?: UndiciHeaders;
133
134
  /** Default: `null` */
134
135
  signal?: AbortSignal | EventEmitter | null;
135
136
  /** This argument parameter is passed through to `ConnectData` */
136
- opaque?: unknown;
137
+ opaque?: TOpaque;
137
138
  /** Default: 0 */
138
139
  maxRedirections?: number;
139
140
  /** Default: false */
140
141
  redirectionLimitReached?: boolean;
141
142
  /** Default: `null` */
142
- responseHeader?: 'raw' | null;
143
+ responseHeaders?: 'raw' | null;
143
144
  }
144
- export interface RequestOptions extends DispatchOptions {
145
+ export interface RequestOptions<TOpaque = null> extends DispatchOptions {
145
146
  /** Default: `null` */
146
- opaque?: unknown;
147
+ opaque?: TOpaque;
147
148
  /** Default: `null` */
148
149
  signal?: AbortSignal | EventEmitter | null;
149
150
  /** Default: 0 */
@@ -153,11 +154,11 @@ declare namespace Dispatcher {
153
154
  /** Default: `null` */
154
155
  onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
155
156
  /** Default: `null` */
156
- responseHeader?: 'raw' | null;
157
+ responseHeaders?: 'raw' | null;
157
158
  /** Default: `64 KiB` */
158
159
  highWaterMark?: number;
159
160
  }
160
- export interface PipelineOptions extends RequestOptions {
161
+ export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
161
162
  /** `true` if the `handler` will return an object stream. Default: `false` */
162
163
  objectMode?: boolean;
163
164
  }
@@ -166,7 +167,7 @@ declare namespace Dispatcher {
166
167
  /** Default: `'GET'` */
167
168
  method?: string;
168
169
  /** Default: `null` */
169
- headers?: IncomingHttpHeaders | string[] | null;
170
+ headers?: UndiciHeaders;
170
171
  /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
171
172
  protocol?: string;
172
173
  /** Default: `null` */
@@ -176,65 +177,90 @@ declare namespace Dispatcher {
176
177
  /** Default: false */
177
178
  redirectionLimitReached?: boolean;
178
179
  /** Default: `null` */
179
- responseHeader?: 'raw' | null;
180
+ responseHeaders?: 'raw' | null;
180
181
  }
181
- export interface ConnectData {
182
+ export interface ConnectData<TOpaque = null> {
182
183
  statusCode: number;
183
184
  headers: IncomingHttpHeaders;
184
185
  socket: Duplex;
185
- opaque: unknown;
186
+ opaque: TOpaque;
186
187
  }
187
- export interface ResponseData {
188
+ export interface ResponseData<TOpaque = null> {
188
189
  statusCode: number;
189
190
  headers: IncomingHttpHeaders;
190
191
  body: BodyReadable & BodyMixin;
191
192
  trailers: Record<string, string>;
192
- opaque: unknown;
193
+ opaque: TOpaque;
193
194
  context: object;
194
195
  }
195
- export interface PipelineHandlerData {
196
+ export interface PipelineHandlerData<TOpaque = null> {
196
197
  statusCode: number;
197
198
  headers: IncomingHttpHeaders;
198
- opaque: unknown;
199
+ opaque: TOpaque;
199
200
  body: BodyReadable;
200
201
  context: object;
201
202
  }
202
- export interface StreamData {
203
- opaque: unknown;
203
+ export interface StreamData<TOpaque = null> {
204
+ opaque: TOpaque;
204
205
  trailers: Record<string, string>;
205
206
  }
206
- export interface UpgradeData {
207
+ export interface UpgradeData<TOpaque = null> {
207
208
  headers: IncomingHttpHeaders;
208
209
  socket: Duplex;
209
- opaque: unknown;
210
+ opaque: TOpaque;
210
211
  }
211
- export interface StreamFactoryData {
212
+ export interface StreamFactoryData<TOpaque = null> {
212
213
  statusCode: number;
213
214
  headers: IncomingHttpHeaders;
214
- opaque: unknown;
215
+ opaque: TOpaque;
215
216
  context: object;
216
217
  }
217
- export type StreamFactory = (data: StreamFactoryData) => Writable;
218
- export interface DispatchHandlers {
218
+ export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
219
+
220
+ export interface DispatchController {
221
+ get aborted () : boolean
222
+ get paused () : boolean
223
+ get reason () : Error | null
224
+ abort (reason: Error): void
225
+ pause(): void
226
+ resume(): void
227
+ }
228
+
229
+ export interface DispatchHandler {
230
+ onRequestStart?(controller: DispatchController, context: any): void;
231
+ onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
232
+ onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
233
+ onResponseData?(controller: DispatchController, chunk: Buffer): void;
234
+ onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
235
+ onResponseError?(controller: DispatchController, error: Error): void;
236
+
219
237
  /** 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. */
238
+ /** @deprecated */
220
239
  onConnect?(abort: (err?: Error) => void): void;
221
240
  /** Invoked when an error has occurred. */
241
+ /** @deprecated */
222
242
  onError?(err: Error): void;
223
243
  /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
244
+ /** @deprecated */
224
245
  onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
225
246
  /** Invoked when response is received, before headers have been read. **/
247
+ /** @deprecated */
226
248
  onResponseStarted?(): void;
227
249
  /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
250
+ /** @deprecated */
228
251
  onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
229
252
  /** Invoked when response payload data is received. */
253
+ /** @deprecated */
230
254
  onData?(chunk: Buffer): boolean;
231
255
  /** Invoked when response payload and trailers have been received and the request has completed. */
256
+ /** @deprecated */
232
257
  onComplete?(trailers: string[] | null): void;
233
258
  /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
259
+ /** @deprecated */
234
260
  onBodySent?(chunkSize: number, totalBytesSent: number): void;
235
261
  }
236
- export type PipelineHandler = (data: PipelineHandlerData) => Readable;
237
- export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
262
+ export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable
263
+ export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>
238
264
 
239
265
  /**
240
266
  * @link https://fetch.spec.whatwg.org/#body-mixin
@@ -251,6 +277,6 @@ declare namespace Dispatcher {
251
277
  }
252
278
 
253
279
  export interface DispatchInterceptor {
254
- (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch']
280
+ (dispatch: Dispatch): Dispatch
255
281
  }
256
282
  }
@@ -1,16 +1,17 @@
1
1
  import Agent from './agent'
2
+ import ProxyAgent from './proxy-agent'
2
3
  import Dispatcher from './dispatcher'
3
4
 
4
5
  export default EnvHttpProxyAgent
5
6
 
6
7
  declare class EnvHttpProxyAgent extends Dispatcher {
7
- constructor(opts?: EnvHttpProxyAgent.Options)
8
+ constructor (opts?: EnvHttpProxyAgent.Options)
8
9
 
9
- dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
10
+ dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
10
11
  }
11
12
 
12
13
  declare namespace EnvHttpProxyAgent {
13
- export interface Options extends Agent.Options {
14
+ export interface Options extends Omit<ProxyAgent.Options, 'uri'> {
14
15
  /** Overrides the value of the HTTP_PROXY environment variable */
15
16
  httpProxy?: string;
16
17
  /** Overrides the value of the HTTPS_PROXY environment variable */
@@ -1,24 +1,24 @@
1
- import { IncomingHttpHeaders } from "./header";
1
+ import { IncomingHttpHeaders } from './header'
2
2
  import Client from './client'
3
3
 
4
4
  export default Errors
5
5
 
6
6
  declare namespace Errors {
7
7
  export class UndiciError extends Error {
8
- name: string;
9
- code: string;
8
+ name: string
9
+ code: string
10
10
  }
11
11
 
12
12
  /** Connect timeout error. */
13
13
  export class ConnectTimeoutError extends UndiciError {
14
- name: 'ConnectTimeoutError';
15
- code: 'UND_ERR_CONNECT_TIMEOUT';
14
+ name: 'ConnectTimeoutError'
15
+ code: 'UND_ERR_CONNECT_TIMEOUT'
16
16
  }
17
17
 
18
18
  /** A header exceeds the `headersTimeout` option. */
19
19
  export class HeadersTimeoutError extends UndiciError {
20
- name: 'HeadersTimeoutError';
21
- code: 'UND_ERR_HEADERS_TIMEOUT';
20
+ name: 'HeadersTimeoutError'
21
+ code: 'UND_ERR_HEADERS_TIMEOUT'
22
22
  }
23
23
 
24
24
  /** Headers overflow error. */
@@ -29,8 +29,24 @@ declare namespace Errors {
29
29
 
30
30
  /** A body exceeds the `bodyTimeout` option. */
31
31
  export class BodyTimeoutError extends UndiciError {
32
- name: 'BodyTimeoutError';
33
- code: 'UND_ERR_BODY_TIMEOUT';
32
+ name: 'BodyTimeoutError'
33
+ code: 'UND_ERR_BODY_TIMEOUT'
34
+ }
35
+
36
+ export class ResponseError extends UndiciError {
37
+ constructor (
38
+ message: string,
39
+ code: number,
40
+ options: {
41
+ headers?: IncomingHttpHeaders | string[] | null,
42
+ body?: null | Record<string, any> | string
43
+ }
44
+ )
45
+ name: 'ResponseError'
46
+ code: 'UND_ERR_RESPONSE'
47
+ statusCode: number
48
+ body: null | Record<string, any> | string
49
+ headers: IncomingHttpHeaders | string[] | null
34
50
  }
35
51
 
36
52
  export class ResponseStatusCodeError extends UndiciError {
@@ -39,91 +55,91 @@ declare namespace Errors {
39
55
  statusCode?: number,
40
56
  headers?: IncomingHttpHeaders | string[] | null,
41
57
  body?: null | Record<string, any> | string
42
- );
43
- name: 'ResponseStatusCodeError';
44
- code: 'UND_ERR_RESPONSE_STATUS_CODE';
58
+ )
59
+ name: 'ResponseStatusCodeError'
60
+ code: 'UND_ERR_RESPONSE_STATUS_CODE'
45
61
  body: null | Record<string, any> | string
46
62
  status: number
47
63
  statusCode: number
48
- headers: IncomingHttpHeaders | string[] | null;
64
+ headers: IncomingHttpHeaders | string[] | null
49
65
  }
50
66
 
51
67
  /** Passed an invalid argument. */
52
68
  export class InvalidArgumentError extends UndiciError {
53
- name: 'InvalidArgumentError';
54
- code: 'UND_ERR_INVALID_ARG';
69
+ name: 'InvalidArgumentError'
70
+ code: 'UND_ERR_INVALID_ARG'
55
71
  }
56
72
 
57
73
  /** Returned an invalid value. */
58
74
  export class InvalidReturnValueError extends UndiciError {
59
- name: 'InvalidReturnValueError';
60
- code: 'UND_ERR_INVALID_RETURN_VALUE';
75
+ name: 'InvalidReturnValueError'
76
+ code: 'UND_ERR_INVALID_RETURN_VALUE'
61
77
  }
62
78
 
63
79
  /** The request has been aborted by the user. */
64
80
  export class RequestAbortedError extends UndiciError {
65
- name: 'AbortError';
66
- code: 'UND_ERR_ABORTED';
81
+ name: 'AbortError'
82
+ code: 'UND_ERR_ABORTED'
67
83
  }
68
84
 
69
85
  /** Expected error with reason. */
70
86
  export class InformationalError extends UndiciError {
71
- name: 'InformationalError';
72
- code: 'UND_ERR_INFO';
87
+ name: 'InformationalError'
88
+ code: 'UND_ERR_INFO'
73
89
  }
74
90
 
75
91
  /** Request body length does not match content-length header. */
76
92
  export class RequestContentLengthMismatchError extends UndiciError {
77
- name: 'RequestContentLengthMismatchError';
78
- code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
93
+ name: 'RequestContentLengthMismatchError'
94
+ code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
79
95
  }
80
96
 
81
97
  /** Response body length does not match content-length header. */
82
98
  export class ResponseContentLengthMismatchError extends UndiciError {
83
- name: 'ResponseContentLengthMismatchError';
84
- code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
99
+ name: 'ResponseContentLengthMismatchError'
100
+ code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
85
101
  }
86
102
 
87
103
  /** Trying to use a destroyed client. */
88
104
  export class ClientDestroyedError extends UndiciError {
89
- name: 'ClientDestroyedError';
90
- code: 'UND_ERR_DESTROYED';
105
+ name: 'ClientDestroyedError'
106
+ code: 'UND_ERR_DESTROYED'
91
107
  }
92
108
 
93
109
  /** Trying to use a closed client. */
94
110
  export class ClientClosedError extends UndiciError {
95
- name: 'ClientClosedError';
96
- code: 'UND_ERR_CLOSED';
111
+ name: 'ClientClosedError'
112
+ code: 'UND_ERR_CLOSED'
97
113
  }
98
114
 
99
115
  /** There is an error with the socket. */
100
116
  export class SocketError extends UndiciError {
101
- name: 'SocketError';
102
- code: 'UND_ERR_SOCKET';
117
+ name: 'SocketError'
118
+ code: 'UND_ERR_SOCKET'
103
119
  socket: Client.SocketInfo | null
104
120
  }
105
121
 
106
122
  /** Encountered unsupported functionality. */
107
123
  export class NotSupportedError extends UndiciError {
108
- name: 'NotSupportedError';
109
- code: 'UND_ERR_NOT_SUPPORTED';
124
+ name: 'NotSupportedError'
125
+ code: 'UND_ERR_NOT_SUPPORTED'
110
126
  }
111
127
 
112
128
  /** No upstream has been added to the BalancedPool. */
113
129
  export class BalancedPoolMissingUpstreamError extends UndiciError {
114
- name: 'MissingUpstreamError';
115
- code: 'UND_ERR_BPL_MISSING_UPSTREAM';
130
+ name: 'MissingUpstreamError'
131
+ code: 'UND_ERR_BPL_MISSING_UPSTREAM'
116
132
  }
117
133
 
118
134
  export class HTTPParserError extends UndiciError {
119
- name: 'HTTPParserError';
120
- code: string;
135
+ name: 'HTTPParserError'
136
+ code: string
121
137
  }
122
138
 
123
139
  /** The response exceed the length allowed. */
124
140
  export class ResponseExceededMaxSizeError extends UndiciError {
125
- name: 'ResponseExceededMaxSizeError';
126
- code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
141
+ name: 'ResponseExceededMaxSizeError'
142
+ code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
127
143
  }
128
144
 
129
145
  export class RequestRetryError extends UndiciError {
@@ -132,18 +148,24 @@ declare namespace Errors {
132
148
  statusCode: number,
133
149
  headers?: IncomingHttpHeaders | string[] | null,
134
150
  body?: null | Record<string, any> | string
135
- );
136
- name: 'RequestRetryError';
137
- code: 'UND_ERR_REQ_RETRY';
138
- statusCode: number;
151
+ )
152
+ name: 'RequestRetryError'
153
+ code: 'UND_ERR_REQ_RETRY'
154
+ statusCode: number
139
155
  data: {
140
156
  count: number;
141
- };
142
- headers: Record<string, string | string[]>;
157
+ }
158
+
159
+ headers: Record<string, string | string[]>
143
160
  }
144
161
 
145
162
  export class SecureProxyConnectionError extends UndiciError {
146
- name: 'SecureProxyConnectionError';
147
- code: 'UND_ERR_PRX_TLS';
163
+ constructor (
164
+ cause?: Error,
165
+ message?: string,
166
+ options?: Record<any, any>
167
+ )
168
+ name: 'SecureProxyConnectionError'
169
+ code: 'UND_ERR_PRX_TLS'
148
170
  }
149
171
  }
@@ -18,9 +18,9 @@ interface EventSource extends EventTarget {
18
18
  readonly CLOSED: 2
19
19
  readonly CONNECTING: 0
20
20
  readonly OPEN: 1
21
- onerror: (this: EventSource, ev: ErrorEvent) => any
22
- onmessage: (this: EventSource, ev: MessageEvent) => any
23
- onopen: (this: EventSource, ev: Event) => any
21
+ onerror: ((this: EventSource, ev: ErrorEvent) => any) | null
22
+ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null
23
+ onopen: ((this: EventSource, ev: Event) => any) | null
24
24
  readonly readyState: 0 | 1 | 2
25
25
  readonly url: string
26
26
  readonly withCredentials: boolean