modelmix 2.2.8 → 2.3.2

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 (1129) hide show
  1. package/README.md +2 -2
  2. package/demo/demo.mjs +9 -12
  3. package/demo/lmstudio.mjs +1 -1
  4. package/demo/package-lock.json +1 -50
  5. package/demo/package.json +1 -3
  6. package/demo/stream.mjs +3 -3
  7. package/demo/watson.jpg +0 -0
  8. package/index.js +5 -1
  9. package/package.json +3 -2
  10. package/demo/node_modules/.package-lock.json +0 -301
  11. package/demo/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -859
  12. package/demo/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
  13. package/demo/node_modules/@anthropic-ai/sdk/README.md +0 -424
  14. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts +0 -9
  15. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts.map +0 -1
  16. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js +0 -16
  17. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js.map +0 -1
  18. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs +0 -12
  19. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs.map +0 -1
  20. package/demo/node_modules/@anthropic-ai/sdk/_shims/README.md +0 -46
  21. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts +0 -5
  22. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts.map +0 -1
  23. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js +0 -21
  24. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js.map +0 -1
  25. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs +0 -2
  26. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs.map +0 -1
  27. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts +0 -5
  28. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts.map +0 -1
  29. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js +0 -21
  30. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js.map +0 -1
  31. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs +0 -2
  32. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs.map +0 -1
  33. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts +0 -5
  34. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts.map +0 -1
  35. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js +0 -21
  36. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js.map +0 -1
  37. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs +0 -2
  38. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs.map +0 -1
  39. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts +0 -5
  40. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts.map +0 -1
  41. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js +0 -21
  42. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js.map +0 -1
  43. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs +0 -2
  44. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs.map +0 -1
  45. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.d.ts +0 -101
  46. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.js +0 -3
  47. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.mjs +0 -3
  48. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts +0 -6
  49. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts.map +0 -1
  50. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js +0 -14
  51. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js.map +0 -1
  52. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs +0 -10
  53. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs.map +0 -1
  54. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.d.ts +0 -81
  55. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.js +0 -13
  56. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.mjs +0 -7
  57. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.d.ts +0 -12
  58. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.js +0 -3
  59. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.mjs +0 -3
  60. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts +0 -3
  61. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts.map +0 -1
  62. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js +0 -90
  63. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js.map +0 -1
  64. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs +0 -56
  65. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs.map +0 -1
  66. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.d.ts +0 -42
  67. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.js +0 -3
  68. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.mjs +0 -3
  69. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts +0 -37
  70. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts.map +0 -1
  71. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js +0 -41
  72. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js.map +0 -1
  73. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs +0 -37
  74. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs.map +0 -1
  75. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts +0 -5
  76. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts.map +0 -1
  77. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js +0 -78
  78. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js.map +0 -1
  79. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs +0 -71
  80. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs.map +0 -1
  81. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.d.ts +0 -83
  82. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.js +0 -3
  83. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.mjs +0 -3
  84. package/demo/node_modules/@anthropic-ai/sdk/core.d.ts +0 -239
  85. package/demo/node_modules/@anthropic-ai/sdk/core.d.ts.map +0 -1
  86. package/demo/node_modules/@anthropic-ai/sdk/core.js +0 -879
  87. package/demo/node_modules/@anthropic-ai/sdk/core.js.map +0 -1
  88. package/demo/node_modules/@anthropic-ai/sdk/core.mjs +0 -848
  89. package/demo/node_modules/@anthropic-ai/sdk/core.mjs.map +0 -1
  90. package/demo/node_modules/@anthropic-ai/sdk/error.d.ts +0 -53
  91. package/demo/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
  92. package/demo/node_modules/@anthropic-ai/sdk/error.js +0 -143
  93. package/demo/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
  94. package/demo/node_modules/@anthropic-ai/sdk/error.mjs +0 -127
  95. package/demo/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
  96. package/demo/node_modules/@anthropic-ai/sdk/index.d.mts +0 -147
  97. package/demo/node_modules/@anthropic-ai/sdk/index.d.ts +0 -147
  98. package/demo/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
  99. package/demo/node_modules/@anthropic-ai/sdk/index.js +0 -149
  100. package/demo/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
  101. package/demo/node_modules/@anthropic-ai/sdk/index.mjs +0 -121
  102. package/demo/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
  103. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -94
  104. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
  105. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -436
  106. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
  107. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -432
  108. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
  109. package/demo/node_modules/@anthropic-ai/sdk/package.json +0 -104
  110. package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -6
  111. package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
  112. package/demo/node_modules/@anthropic-ai/sdk/resource.js +0 -11
  113. package/demo/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
  114. package/demo/node_modules/@anthropic-ai/sdk/resource.mjs +0 -7
  115. package/demo/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
  116. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -9
  117. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
  118. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -40
  119. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
  120. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -13
  121. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
  122. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -3
  123. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
  124. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -9
  125. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
  126. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -4
  127. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
  128. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts +0 -3
  129. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts.map +0 -1
  130. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js +0 -9
  131. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js.map +0 -1
  132. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs +0 -4
  133. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs.map +0 -1
  134. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts +0 -462
  135. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts.map +0 -1
  136. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js +0 -20
  137. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js.map +0 -1
  138. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs +0 -16
  139. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs.map +0 -1
  140. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts +0 -19
  141. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts.map +0 -1
  142. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js +0 -40
  143. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js.map +0 -1
  144. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs +0 -13
  145. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs.map +0 -1
  146. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -184
  147. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
  148. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -19
  149. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
  150. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -15
  151. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
  152. package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -4
  153. package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
  154. package/demo/node_modules/@anthropic-ai/sdk/resources/index.js +0 -11
  155. package/demo/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
  156. package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -5
  157. package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
  158. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -619
  159. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
  160. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -28
  161. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
  162. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -23
  163. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
  164. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
  165. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
  166. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
  167. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
  168. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
  169. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
  170. package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts +0 -29
  171. package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts.map +0 -1
  172. package/demo/node_modules/@anthropic-ai/sdk/shims/node.js +0 -31
  173. package/demo/node_modules/@anthropic-ai/sdk/shims/node.js.map +0 -1
  174. package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs +0 -5
  175. package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs.map +0 -1
  176. package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts +0 -26
  177. package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts.map +0 -1
  178. package/demo/node_modules/@anthropic-ai/sdk/shims/web.js +0 -31
  179. package/demo/node_modules/@anthropic-ai/sdk/shims/web.js.map +0 -1
  180. package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs +0 -5
  181. package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs.map +0 -1
  182. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/MultipartBody.ts +0 -9
  183. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/README.md +0 -46
  184. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-bun.ts +0 -4
  185. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-node.ts +0 -4
  186. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime.ts +0 -4
  187. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types-node.ts +0 -4
  188. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.d.ts +0 -101
  189. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.js +0 -3
  190. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.mjs +0 -3
  191. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/bun-runtime.ts +0 -14
  192. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.d.ts +0 -81
  193. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.js +0 -13
  194. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.mjs +0 -7
  195. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.d.ts +0 -12
  196. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.js +0 -3
  197. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.mjs +0 -3
  198. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-runtime.ts +0 -83
  199. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.d.ts +0 -42
  200. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.js +0 -3
  201. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.mjs +0 -3
  202. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/registry.ts +0 -67
  203. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-runtime.ts +0 -103
  204. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.d.ts +0 -83
  205. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.js +0 -3
  206. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.mjs +0 -3
  207. package/demo/node_modules/@anthropic-ai/sdk/src/core.ts +0 -1162
  208. package/demo/node_modules/@anthropic-ai/sdk/src/error.ts +0 -146
  209. package/demo/node_modules/@anthropic-ai/sdk/src/index.ts +0 -264
  210. package/demo/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
  211. package/demo/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -535
  212. package/demo/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -11
  213. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -12
  214. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -4
  215. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/index.ts +0 -16
  216. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/messages.ts +0 -531
  217. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/tools.ts +0 -22
  218. package/demo/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -223
  219. package/demo/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -33
  220. package/demo/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -729
  221. package/demo/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
  222. package/demo/node_modules/@anthropic-ai/sdk/src/shims/node.ts +0 -50
  223. package/demo/node_modules/@anthropic-ai/sdk/src/shims/web.ts +0 -50
  224. package/demo/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -509
  225. package/demo/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
  226. package/demo/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -248
  227. package/demo/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
  228. package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -41
  229. package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
  230. package/demo/node_modules/@anthropic-ai/sdk/streaming.js +0 -431
  231. package/demo/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
  232. package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -424
  233. package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
  234. package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -75
  235. package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
  236. package/demo/node_modules/@anthropic-ai/sdk/uploads.js +0 -165
  237. package/demo/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
  238. package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -152
  239. package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
  240. package/demo/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  241. package/demo/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
  242. package/demo/node_modules/@anthropic-ai/sdk/version.js +0 -5
  243. package/demo/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
  244. package/demo/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
  245. package/demo/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
  246. package/demo/node_modules/@types/node/LICENSE +0 -21
  247. package/demo/node_modules/@types/node/README.md +0 -15
  248. package/demo/node_modules/@types/node/assert/strict.d.ts +0 -8
  249. package/demo/node_modules/@types/node/assert.d.ts +0 -985
  250. package/demo/node_modules/@types/node/async_hooks.d.ts +0 -522
  251. package/demo/node_modules/@types/node/buffer.d.ts +0 -2353
  252. package/demo/node_modules/@types/node/child_process.d.ts +0 -1544
  253. package/demo/node_modules/@types/node/cluster.d.ts +0 -578
  254. package/demo/node_modules/@types/node/console.d.ts +0 -452
  255. package/demo/node_modules/@types/node/constants.d.ts +0 -19
  256. package/demo/node_modules/@types/node/crypto.d.ts +0 -4457
  257. package/demo/node_modules/@types/node/dgram.d.ts +0 -596
  258. package/demo/node_modules/@types/node/diagnostics_channel.d.ts +0 -546
  259. package/demo/node_modules/@types/node/dns/promises.d.ts +0 -473
  260. package/demo/node_modules/@types/node/dns.d.ts +0 -853
  261. package/demo/node_modules/@types/node/dom-events.d.ts +0 -124
  262. package/demo/node_modules/@types/node/domain.d.ts +0 -170
  263. package/demo/node_modules/@types/node/events.d.ts +0 -819
  264. package/demo/node_modules/@types/node/fs/promises.d.ts +0 -1205
  265. package/demo/node_modules/@types/node/fs.d.ts +0 -4237
  266. package/demo/node_modules/@types/node/globals.d.ts +0 -377
  267. package/demo/node_modules/@types/node/globals.global.d.ts +0 -1
  268. package/demo/node_modules/@types/node/http.d.ts +0 -1803
  269. package/demo/node_modules/@types/node/http2.d.ts +0 -2392
  270. package/demo/node_modules/@types/node/https.d.ts +0 -544
  271. package/demo/node_modules/@types/node/index.d.ts +0 -88
  272. package/demo/node_modules/@types/node/inspector.d.ts +0 -2738
  273. package/demo/node_modules/@types/node/module.d.ts +0 -298
  274. package/demo/node_modules/@types/node/net.d.ts +0 -918
  275. package/demo/node_modules/@types/node/os.d.ts +0 -473
  276. package/demo/node_modules/@types/node/package.json +0 -222
  277. package/demo/node_modules/@types/node/path.d.ts +0 -191
  278. package/demo/node_modules/@types/node/perf_hooks.d.ts +0 -626
  279. package/demo/node_modules/@types/node/process.d.ts +0 -1548
  280. package/demo/node_modules/@types/node/punycode.d.ts +0 -117
  281. package/demo/node_modules/@types/node/querystring.d.ts +0 -141
  282. package/demo/node_modules/@types/node/readline/promises.d.ts +0 -143
  283. package/demo/node_modules/@types/node/readline.d.ts +0 -666
  284. package/demo/node_modules/@types/node/repl.d.ts +0 -430
  285. package/demo/node_modules/@types/node/stream/consumers.d.ts +0 -12
  286. package/demo/node_modules/@types/node/stream/promises.d.ts +0 -83
  287. package/demo/node_modules/@types/node/stream/web.d.ts +0 -352
  288. package/demo/node_modules/@types/node/stream.d.ts +0 -1731
  289. package/demo/node_modules/@types/node/string_decoder.d.ts +0 -67
  290. package/demo/node_modules/@types/node/test.d.ts +0 -1113
  291. package/demo/node_modules/@types/node/timers/promises.d.ts +0 -93
  292. package/demo/node_modules/@types/node/timers.d.ts +0 -126
  293. package/demo/node_modules/@types/node/tls.d.ts +0 -1203
  294. package/demo/node_modules/@types/node/trace_events.d.ts +0 -171
  295. package/demo/node_modules/@types/node/tty.d.ts +0 -206
  296. package/demo/node_modules/@types/node/url.d.ts +0 -954
  297. package/demo/node_modules/@types/node/util.d.ts +0 -2075
  298. package/demo/node_modules/@types/node/v8.d.ts +0 -753
  299. package/demo/node_modules/@types/node/vm.d.ts +0 -667
  300. package/demo/node_modules/@types/node/wasi.d.ts +0 -160
  301. package/demo/node_modules/@types/node/worker_threads.d.ts +0 -692
  302. package/demo/node_modules/@types/node/zlib.d.ts +0 -517
  303. package/demo/node_modules/@types/node-fetch/LICENSE +0 -21
  304. package/demo/node_modules/@types/node-fetch/README.md +0 -15
  305. package/demo/node_modules/@types/node-fetch/externals.d.ts +0 -32
  306. package/demo/node_modules/@types/node-fetch/index.d.ts +0 -238
  307. package/demo/node_modules/@types/node-fetch/package.json +0 -83
  308. package/demo/node_modules/abort-controller/LICENSE +0 -21
  309. package/demo/node_modules/abort-controller/README.md +0 -98
  310. package/demo/node_modules/abort-controller/browser.js +0 -13
  311. package/demo/node_modules/abort-controller/browser.mjs +0 -11
  312. package/demo/node_modules/abort-controller/package.json +0 -97
  313. package/demo/node_modules/abort-controller/polyfill.js +0 -21
  314. package/demo/node_modules/abort-controller/polyfill.mjs +0 -19
  315. package/demo/node_modules/agentkeepalive/History.md +0 -268
  316. package/demo/node_modules/agentkeepalive/LICENSE +0 -23
  317. package/demo/node_modules/agentkeepalive/README.md +0 -256
  318. package/demo/node_modules/agentkeepalive/browser.js +0 -5
  319. package/demo/node_modules/agentkeepalive/index.d.ts +0 -65
  320. package/demo/node_modules/agentkeepalive/index.js +0 -5
  321. package/demo/node_modules/agentkeepalive/lib/agent.js +0 -402
  322. package/demo/node_modules/agentkeepalive/lib/constants.js +0 -14
  323. package/demo/node_modules/agentkeepalive/lib/https_agent.js +0 -51
  324. package/demo/node_modules/agentkeepalive/package.json +0 -56
  325. package/demo/node_modules/asynckit/LICENSE +0 -21
  326. package/demo/node_modules/asynckit/README.md +0 -233
  327. package/demo/node_modules/asynckit/bench.js +0 -76
  328. package/demo/node_modules/asynckit/index.js +0 -6
  329. package/demo/node_modules/asynckit/lib/abort.js +0 -29
  330. package/demo/node_modules/asynckit/lib/async.js +0 -34
  331. package/demo/node_modules/asynckit/lib/defer.js +0 -26
  332. package/demo/node_modules/asynckit/lib/iterate.js +0 -75
  333. package/demo/node_modules/asynckit/lib/readable_asynckit.js +0 -91
  334. package/demo/node_modules/asynckit/lib/readable_parallel.js +0 -25
  335. package/demo/node_modules/asynckit/lib/readable_serial.js +0 -25
  336. package/demo/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
  337. package/demo/node_modules/asynckit/lib/state.js +0 -37
  338. package/demo/node_modules/asynckit/lib/streamify.js +0 -141
  339. package/demo/node_modules/asynckit/lib/terminator.js +0 -29
  340. package/demo/node_modules/asynckit/package.json +0 -63
  341. package/demo/node_modules/asynckit/parallel.js +0 -43
  342. package/demo/node_modules/asynckit/serial.js +0 -17
  343. package/demo/node_modules/asynckit/serialOrdered.js +0 -75
  344. package/demo/node_modules/asynckit/stream.js +0 -21
  345. package/demo/node_modules/combined-stream/License +0 -19
  346. package/demo/node_modules/combined-stream/Readme.md +0 -138
  347. package/demo/node_modules/combined-stream/lib/combined_stream.js +0 -208
  348. package/demo/node_modules/combined-stream/package.json +0 -25
  349. package/demo/node_modules/combined-stream/yarn.lock +0 -17
  350. package/demo/node_modules/debug/LICENSE +0 -20
  351. package/demo/node_modules/debug/README.md +0 -481
  352. package/demo/node_modules/debug/node_modules/ms/index.js +0 -162
  353. package/demo/node_modules/debug/node_modules/ms/license.md +0 -21
  354. package/demo/node_modules/debug/node_modules/ms/package.json +0 -37
  355. package/demo/node_modules/debug/node_modules/ms/readme.md +0 -60
  356. package/demo/node_modules/debug/package.json +0 -59
  357. package/demo/node_modules/debug/src/browser.js +0 -269
  358. package/demo/node_modules/debug/src/common.js +0 -274
  359. package/demo/node_modules/debug/src/index.js +0 -10
  360. package/demo/node_modules/debug/src/node.js +0 -263
  361. package/demo/node_modules/delayed-stream/License +0 -19
  362. package/demo/node_modules/delayed-stream/Makefile +0 -7
  363. package/demo/node_modules/delayed-stream/Readme.md +0 -141
  364. package/demo/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
  365. package/demo/node_modules/delayed-stream/package.json +0 -27
  366. package/demo/node_modules/dotenv/CHANGELOG.md +0 -475
  367. package/demo/node_modules/dotenv/LICENSE +0 -23
  368. package/demo/node_modules/dotenv/README-es.md +0 -448
  369. package/demo/node_modules/dotenv/README.md +0 -728
  370. package/demo/node_modules/dotenv/config.d.ts +0 -1
  371. package/demo/node_modules/dotenv/config.js +0 -9
  372. package/demo/node_modules/dotenv/lib/cli-options.js +0 -11
  373. package/demo/node_modules/dotenv/lib/env-options.js +0 -24
  374. package/demo/node_modules/dotenv/lib/main.d.ts +0 -153
  375. package/demo/node_modules/dotenv/lib/main.js +0 -361
  376. package/demo/node_modules/dotenv/package.json +0 -65
  377. package/demo/node_modules/event-target-shim/LICENSE +0 -22
  378. package/demo/node_modules/event-target-shim/README.md +0 -293
  379. package/demo/node_modules/event-target-shim/index.d.ts +0 -399
  380. package/demo/node_modules/event-target-shim/package.json +0 -82
  381. package/demo/node_modules/form-data/License +0 -19
  382. package/demo/node_modules/form-data/README.md.bak +0 -358
  383. package/demo/node_modules/form-data/Readme.md +0 -358
  384. package/demo/node_modules/form-data/index.d.ts +0 -62
  385. package/demo/node_modules/form-data/lib/browser.js +0 -2
  386. package/demo/node_modules/form-data/lib/form_data.js +0 -501
  387. package/demo/node_modules/form-data/lib/populate.js +0 -10
  388. package/demo/node_modules/form-data/package.json +0 -68
  389. package/demo/node_modules/form-data-encoder/@type/FileLike.d.ts +0 -23
  390. package/demo/node_modules/form-data-encoder/@type/FormDataEncoder.d.ts +0 -160
  391. package/demo/node_modules/form-data-encoder/@type/FormDataLike.d.ts +0 -40
  392. package/demo/node_modules/form-data-encoder/@type/index.d.ts +0 -5
  393. package/demo/node_modules/form-data-encoder/@type/util/createBoundary.d.ts +0 -13
  394. package/demo/node_modules/form-data-encoder/@type/util/escapeName.d.ts +0 -11
  395. package/demo/node_modules/form-data-encoder/@type/util/isFileLike.d.ts +0 -28
  396. package/demo/node_modules/form-data-encoder/@type/util/isFormData.d.ts +0 -15
  397. package/demo/node_modules/form-data-encoder/@type/util/isFunction.d.ts +0 -7
  398. package/demo/node_modules/form-data-encoder/@type/util/isPlainObject.d.ts +0 -2
  399. package/demo/node_modules/form-data-encoder/@type/util/normalizeValue.d.ts +0 -11
  400. package/demo/node_modules/form-data-encoder/lib/cjs/FileLike.js +0 -2
  401. package/demo/node_modules/form-data-encoder/lib/cjs/FormDataEncoder.js +0 -126
  402. package/demo/node_modules/form-data-encoder/lib/cjs/FormDataLike.js +0 -2
  403. package/demo/node_modules/form-data-encoder/lib/cjs/index.js +0 -17
  404. package/demo/node_modules/form-data-encoder/lib/cjs/package.json +0 -3
  405. package/demo/node_modules/form-data-encoder/lib/cjs/util/createBoundary.js +0 -12
  406. package/demo/node_modules/form-data-encoder/lib/cjs/util/escapeName.js +0 -7
  407. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFileLike.js +0 -16
  408. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFormData.js +0 -16
  409. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFunction.js +0 -4
  410. package/demo/node_modules/form-data-encoder/lib/cjs/util/isPlainObject.js +0 -15
  411. package/demo/node_modules/form-data-encoder/lib/cjs/util/normalizeValue.js +0 -11
  412. package/demo/node_modules/form-data-encoder/lib/esm/FileLike.js +0 -1
  413. package/demo/node_modules/form-data-encoder/lib/esm/FormDataEncoder.js +0 -119
  414. package/demo/node_modules/form-data-encoder/lib/esm/FormDataLike.js +0 -1
  415. package/demo/node_modules/form-data-encoder/lib/esm/index.js +0 -5
  416. package/demo/node_modules/form-data-encoder/lib/esm/package.json +0 -3
  417. package/demo/node_modules/form-data-encoder/lib/esm/util/createBoundary.js +0 -10
  418. package/demo/node_modules/form-data-encoder/lib/esm/util/escapeName.js +0 -5
  419. package/demo/node_modules/form-data-encoder/lib/esm/util/isFileLike.js +0 -9
  420. package/demo/node_modules/form-data-encoder/lib/esm/util/isFormData.js +0 -9
  421. package/demo/node_modules/form-data-encoder/lib/esm/util/isFunction.js +0 -2
  422. package/demo/node_modules/form-data-encoder/lib/esm/util/isPlainObject.js +0 -13
  423. package/demo/node_modules/form-data-encoder/lib/esm/util/normalizeValue.js +0 -9
  424. package/demo/node_modules/form-data-encoder/license +0 -21
  425. package/demo/node_modules/form-data-encoder/package.json +0 -63
  426. package/demo/node_modules/form-data-encoder/readme.md +0 -366
  427. package/demo/node_modules/formdata-node/@type/Blob.d.ts +0 -66
  428. package/demo/node_modules/formdata-node/@type/BlobPart.d.ts +0 -2
  429. package/demo/node_modules/formdata-node/@type/File.d.ts +0 -53
  430. package/demo/node_modules/formdata-node/@type/FormData.d.ts +0 -105
  431. package/demo/node_modules/formdata-node/@type/blobHelpers.d.ts +0 -9
  432. package/demo/node_modules/formdata-node/@type/browser.d.ts +0 -10
  433. package/demo/node_modules/formdata-node/@type/deprecateConstructorEntries.d.ts +0 -1
  434. package/demo/node_modules/formdata-node/@type/fileFromPath.d.ts +0 -55
  435. package/demo/node_modules/formdata-node/@type/index.d.ts +0 -3
  436. package/demo/node_modules/formdata-node/@type/isBlob.d.ts +0 -2
  437. package/demo/node_modules/formdata-node/@type/isFile.d.ts +0 -7
  438. package/demo/node_modules/formdata-node/@type/isFunction.d.ts +0 -1
  439. package/demo/node_modules/formdata-node/@type/isPlainObject.d.ts +0 -2
  440. package/demo/node_modules/formdata-node/lib/cjs/Blob.js +0 -122
  441. package/demo/node_modules/formdata-node/lib/cjs/BlobPart.js +0 -2
  442. package/demo/node_modules/formdata-node/lib/cjs/File.js +0 -52
  443. package/demo/node_modules/formdata-node/lib/cjs/FormData.js +0 -148
  444. package/demo/node_modules/formdata-node/lib/cjs/blobHelpers.js +0 -80
  445. package/demo/node_modules/formdata-node/lib/cjs/browser.js +0 -13
  446. package/demo/node_modules/formdata-node/lib/cjs/deprecateConstructorEntries.js +0 -6
  447. package/demo/node_modules/formdata-node/lib/cjs/fileFromPath.js +0 -97
  448. package/demo/node_modules/formdata-node/lib/cjs/index.js +0 -15
  449. package/demo/node_modules/formdata-node/lib/cjs/isBlob.js +0 -6
  450. package/demo/node_modules/formdata-node/lib/cjs/isFile.js +0 -6
  451. package/demo/node_modules/formdata-node/lib/cjs/isFunction.js +0 -5
  452. package/demo/node_modules/formdata-node/lib/cjs/isPlainObject.js +0 -15
  453. package/demo/node_modules/formdata-node/lib/cjs/package.json +0 -3
  454. package/demo/node_modules/formdata-node/lib/esm/Blob.js +0 -118
  455. package/demo/node_modules/formdata-node/lib/esm/BlobPart.js +0 -1
  456. package/demo/node_modules/formdata-node/lib/esm/File.js +0 -48
  457. package/demo/node_modules/formdata-node/lib/esm/FormData.js +0 -144
  458. package/demo/node_modules/formdata-node/lib/esm/blobHelpers.js +0 -75
  459. package/demo/node_modules/formdata-node/lib/esm/browser.js +0 -10
  460. package/demo/node_modules/formdata-node/lib/esm/deprecateConstructorEntries.js +0 -3
  461. package/demo/node_modules/formdata-node/lib/esm/fileFromPath.js +0 -79
  462. package/demo/node_modules/formdata-node/lib/esm/index.js +0 -3
  463. package/demo/node_modules/formdata-node/lib/esm/isBlob.js +0 -2
  464. package/demo/node_modules/formdata-node/lib/esm/isFile.js +0 -2
  465. package/demo/node_modules/formdata-node/lib/esm/isFunction.js +0 -1
  466. package/demo/node_modules/formdata-node/lib/esm/isPlainObject.js +0 -13
  467. package/demo/node_modules/formdata-node/lib/esm/package.json +0 -3
  468. package/demo/node_modules/formdata-node/lib/node-domexception.d.ts +0 -5
  469. package/demo/node_modules/formdata-node/license +0 -21
  470. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/LICENSE +0 -22
  471. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/README.md +0 -135
  472. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/es5/package.json +0 -6
  473. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/package.json +0 -101
  474. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/es5/package.json +0 -5
  475. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/package.json +0 -5
  476. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/polyfill.d.ts +0 -62
  477. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/ponyfill.d.ts +0 -775
  478. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +0 -11
  479. package/demo/node_modules/formdata-node/package.json +0 -94
  480. package/demo/node_modules/formdata-node/readme.md +0 -444
  481. package/demo/node_modules/humanize-ms/History.md +0 -25
  482. package/demo/node_modules/humanize-ms/LICENSE +0 -17
  483. package/demo/node_modules/humanize-ms/README.md +0 -40
  484. package/demo/node_modules/humanize-ms/index.js +0 -24
  485. package/demo/node_modules/humanize-ms/package.json +0 -37
  486. package/demo/node_modules/lemonlog/README.md +0 -133
  487. package/demo/node_modules/lemonlog/demo/demo.js +0 -31
  488. package/demo/node_modules/lemonlog/index.js +0 -94
  489. package/demo/node_modules/lemonlog/package.json +0 -31
  490. package/demo/node_modules/mime-db/HISTORY.md +0 -507
  491. package/demo/node_modules/mime-db/LICENSE +0 -23
  492. package/demo/node_modules/mime-db/README.md +0 -100
  493. package/demo/node_modules/mime-db/db.json +0 -8519
  494. package/demo/node_modules/mime-db/index.js +0 -12
  495. package/demo/node_modules/mime-db/package.json +0 -60
  496. package/demo/node_modules/mime-types/HISTORY.md +0 -397
  497. package/demo/node_modules/mime-types/LICENSE +0 -23
  498. package/demo/node_modules/mime-types/README.md +0 -113
  499. package/demo/node_modules/mime-types/index.js +0 -188
  500. package/demo/node_modules/mime-types/package.json +0 -44
  501. package/demo/node_modules/ms/index.js +0 -162
  502. package/demo/node_modules/ms/license.md +0 -21
  503. package/demo/node_modules/ms/package.json +0 -38
  504. package/demo/node_modules/ms/readme.md +0 -59
  505. package/demo/node_modules/node-domexception/.history/README_20210527203617.md +0 -2
  506. package/demo/node_modules/node-domexception/.history/README_20210527212714.md +0 -41
  507. package/demo/node_modules/node-domexception/.history/README_20210527213345.md +0 -36
  508. package/demo/node_modules/node-domexception/.history/README_20210527213411.md +0 -36
  509. package/demo/node_modules/node-domexception/.history/README_20210527213803.md +0 -36
  510. package/demo/node_modules/node-domexception/.history/README_20210527214323.md +0 -38
  511. package/demo/node_modules/node-domexception/.history/README_20210527214408.md +0 -38
  512. package/demo/node_modules/node-domexception/.history/index_20210527203842.js +0 -0
  513. package/demo/node_modules/node-domexception/.history/index_20210527203947.js +0 -8
  514. package/demo/node_modules/node-domexception/.history/index_20210527204259.js +0 -9
  515. package/demo/node_modules/node-domexception/.history/index_20210527204418.js +0 -9
  516. package/demo/node_modules/node-domexception/.history/index_20210527204756.js +0 -11
  517. package/demo/node_modules/node-domexception/.history/index_20210527204833.js +0 -11
  518. package/demo/node_modules/node-domexception/.history/index_20210527211208.js +0 -15
  519. package/demo/node_modules/node-domexception/.history/index_20210527211248.js +0 -15
  520. package/demo/node_modules/node-domexception/.history/index_20210527212722.js +0 -23
  521. package/demo/node_modules/node-domexception/.history/index_20210527212731.js +0 -23
  522. package/demo/node_modules/node-domexception/.history/index_20210527212746.js +0 -15
  523. package/demo/node_modules/node-domexception/.history/index_20210527212900.js +0 -16
  524. package/demo/node_modules/node-domexception/.history/index_20210527213022.js +0 -16
  525. package/demo/node_modules/node-domexception/.history/index_20210527213822.js +0 -16
  526. package/demo/node_modules/node-domexception/.history/index_20210527213843.js +0 -17
  527. package/demo/node_modules/node-domexception/.history/index_20210527213852.js +0 -17
  528. package/demo/node_modules/node-domexception/.history/index_20210527213910.js +0 -16
  529. package/demo/node_modules/node-domexception/.history/index_20210527214034.js +0 -16
  530. package/demo/node_modules/node-domexception/.history/index_20210527214643.js +0 -41
  531. package/demo/node_modules/node-domexception/.history/index_20210527214654.js +0 -41
  532. package/demo/node_modules/node-domexception/.history/index_20210527214700.js +0 -16
  533. package/demo/node_modules/node-domexception/.history/package_20210527203733.json +0 -19
  534. package/demo/node_modules/node-domexception/.history/package_20210527203825.json +0 -16
  535. package/demo/node_modules/node-domexception/.history/package_20210527204621.json +0 -19
  536. package/demo/node_modules/node-domexception/.history/package_20210527204913.json +0 -25
  537. package/demo/node_modules/node-domexception/.history/package_20210527204925.json +0 -25
  538. package/demo/node_modules/node-domexception/.history/package_20210527205145.json +0 -29
  539. package/demo/node_modules/node-domexception/.history/package_20210527205156.json +0 -29
  540. package/demo/node_modules/node-domexception/.history/test_20210527205603.js +0 -0
  541. package/demo/node_modules/node-domexception/.history/test_20210527205957.js +0 -3
  542. package/demo/node_modules/node-domexception/.history/test_20210527210021.js +0 -3
  543. package/demo/node_modules/node-domexception/LICENSE +0 -21
  544. package/demo/node_modules/node-domexception/README.md +0 -46
  545. package/demo/node_modules/node-domexception/index.js +0 -16
  546. package/demo/node_modules/node-domexception/package.json +0 -29
  547. package/demo/node_modules/node-fetch/LICENSE.md +0 -22
  548. package/demo/node_modules/node-fetch/README.md +0 -634
  549. package/demo/node_modules/node-fetch/browser.js +0 -25
  550. package/demo/node_modules/node-fetch/lib/index.es.js +0 -1777
  551. package/demo/node_modules/node-fetch/lib/index.js +0 -1787
  552. package/demo/node_modules/node-fetch/lib/index.mjs +0 -1775
  553. package/demo/node_modules/node-fetch/package.json +0 -89
  554. package/demo/node_modules/openai/CHANGELOG.md +0 -1176
  555. package/demo/node_modules/openai/LICENSE +0 -201
  556. package/demo/node_modules/openai/README.md +0 -616
  557. package/demo/node_modules/openai/_shims/MultipartBody.d.ts +0 -9
  558. package/demo/node_modules/openai/_shims/MultipartBody.d.ts.map +0 -1
  559. package/demo/node_modules/openai/_shims/MultipartBody.js +0 -16
  560. package/demo/node_modules/openai/_shims/MultipartBody.js.map +0 -1
  561. package/demo/node_modules/openai/_shims/MultipartBody.mjs +0 -12
  562. package/demo/node_modules/openai/_shims/MultipartBody.mjs.map +0 -1
  563. package/demo/node_modules/openai/_shims/README.md +0 -46
  564. package/demo/node_modules/openai/_shims/auto/runtime-bun.d.ts +0 -5
  565. package/demo/node_modules/openai/_shims/auto/runtime-bun.d.ts.map +0 -1
  566. package/demo/node_modules/openai/_shims/auto/runtime-bun.js +0 -21
  567. package/demo/node_modules/openai/_shims/auto/runtime-bun.js.map +0 -1
  568. package/demo/node_modules/openai/_shims/auto/runtime-bun.mjs +0 -2
  569. package/demo/node_modules/openai/_shims/auto/runtime-bun.mjs.map +0 -1
  570. package/demo/node_modules/openai/_shims/auto/runtime-node.d.ts +0 -5
  571. package/demo/node_modules/openai/_shims/auto/runtime-node.d.ts.map +0 -1
  572. package/demo/node_modules/openai/_shims/auto/runtime-node.js +0 -21
  573. package/demo/node_modules/openai/_shims/auto/runtime-node.js.map +0 -1
  574. package/demo/node_modules/openai/_shims/auto/runtime-node.mjs +0 -2
  575. package/demo/node_modules/openai/_shims/auto/runtime-node.mjs.map +0 -1
  576. package/demo/node_modules/openai/_shims/auto/runtime.d.ts +0 -5
  577. package/demo/node_modules/openai/_shims/auto/runtime.d.ts.map +0 -1
  578. package/demo/node_modules/openai/_shims/auto/runtime.js +0 -21
  579. package/demo/node_modules/openai/_shims/auto/runtime.js.map +0 -1
  580. package/demo/node_modules/openai/_shims/auto/runtime.mjs +0 -2
  581. package/demo/node_modules/openai/_shims/auto/runtime.mjs.map +0 -1
  582. package/demo/node_modules/openai/_shims/auto/types-node.d.ts +0 -5
  583. package/demo/node_modules/openai/_shims/auto/types-node.d.ts.map +0 -1
  584. package/demo/node_modules/openai/_shims/auto/types-node.js +0 -21
  585. package/demo/node_modules/openai/_shims/auto/types-node.js.map +0 -1
  586. package/demo/node_modules/openai/_shims/auto/types-node.mjs +0 -2
  587. package/demo/node_modules/openai/_shims/auto/types-node.mjs.map +0 -1
  588. package/demo/node_modules/openai/_shims/auto/types.d.ts +0 -101
  589. package/demo/node_modules/openai/_shims/auto/types.js +0 -3
  590. package/demo/node_modules/openai/_shims/auto/types.mjs +0 -3
  591. package/demo/node_modules/openai/_shims/bun-runtime.d.ts +0 -6
  592. package/demo/node_modules/openai/_shims/bun-runtime.d.ts.map +0 -1
  593. package/demo/node_modules/openai/_shims/bun-runtime.js +0 -14
  594. package/demo/node_modules/openai/_shims/bun-runtime.js.map +0 -1
  595. package/demo/node_modules/openai/_shims/bun-runtime.mjs +0 -10
  596. package/demo/node_modules/openai/_shims/bun-runtime.mjs.map +0 -1
  597. package/demo/node_modules/openai/_shims/index.d.ts +0 -81
  598. package/demo/node_modules/openai/_shims/index.js +0 -13
  599. package/demo/node_modules/openai/_shims/index.mjs +0 -7
  600. package/demo/node_modules/openai/_shims/manual-types.d.ts +0 -12
  601. package/demo/node_modules/openai/_shims/manual-types.js +0 -3
  602. package/demo/node_modules/openai/_shims/manual-types.mjs +0 -3
  603. package/demo/node_modules/openai/_shims/node-runtime.d.ts +0 -3
  604. package/demo/node_modules/openai/_shims/node-runtime.d.ts.map +0 -1
  605. package/demo/node_modules/openai/_shims/node-runtime.js +0 -90
  606. package/demo/node_modules/openai/_shims/node-runtime.js.map +0 -1
  607. package/demo/node_modules/openai/_shims/node-runtime.mjs +0 -56
  608. package/demo/node_modules/openai/_shims/node-runtime.mjs.map +0 -1
  609. package/demo/node_modules/openai/_shims/node-types.d.ts +0 -42
  610. package/demo/node_modules/openai/_shims/node-types.js +0 -3
  611. package/demo/node_modules/openai/_shims/node-types.mjs +0 -3
  612. package/demo/node_modules/openai/_shims/registry.d.ts +0 -37
  613. package/demo/node_modules/openai/_shims/registry.d.ts.map +0 -1
  614. package/demo/node_modules/openai/_shims/registry.js +0 -41
  615. package/demo/node_modules/openai/_shims/registry.js.map +0 -1
  616. package/demo/node_modules/openai/_shims/registry.mjs +0 -37
  617. package/demo/node_modules/openai/_shims/registry.mjs.map +0 -1
  618. package/demo/node_modules/openai/_shims/web-runtime.d.ts +0 -5
  619. package/demo/node_modules/openai/_shims/web-runtime.d.ts.map +0 -1
  620. package/demo/node_modules/openai/_shims/web-runtime.js +0 -78
  621. package/demo/node_modules/openai/_shims/web-runtime.js.map +0 -1
  622. package/demo/node_modules/openai/_shims/web-runtime.mjs +0 -71
  623. package/demo/node_modules/openai/_shims/web-runtime.mjs.map +0 -1
  624. package/demo/node_modules/openai/_shims/web-types.d.ts +0 -83
  625. package/demo/node_modules/openai/_shims/web-types.js +0 -3
  626. package/demo/node_modules/openai/_shims/web-types.mjs +0 -3
  627. package/demo/node_modules/openai/bin/cli +0 -49
  628. package/demo/node_modules/openai/core.d.ts +0 -239
  629. package/demo/node_modules/openai/core.d.ts.map +0 -1
  630. package/demo/node_modules/openai/core.js +0 -879
  631. package/demo/node_modules/openai/core.js.map +0 -1
  632. package/demo/node_modules/openai/core.mjs +0 -848
  633. package/demo/node_modules/openai/core.mjs.map +0 -1
  634. package/demo/node_modules/openai/error.d.ts +0 -57
  635. package/demo/node_modules/openai/error.d.ts.map +0 -1
  636. package/demo/node_modules/openai/error.js +0 -148
  637. package/demo/node_modules/openai/error.js.map +0 -1
  638. package/demo/node_modules/openai/error.mjs +0 -132
  639. package/demo/node_modules/openai/error.mjs.map +0 -1
  640. package/demo/node_modules/openai/index.d.mts +0 -267
  641. package/demo/node_modules/openai/index.d.ts +0 -267
  642. package/demo/node_modules/openai/index.d.ts.map +0 -1
  643. package/demo/node_modules/openai/index.js +0 -262
  644. package/demo/node_modules/openai/index.js.map +0 -1
  645. package/demo/node_modules/openai/index.mjs +0 -232
  646. package/demo/node_modules/openai/index.mjs.map +0 -1
  647. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.d.ts +0 -74
  648. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.d.ts.map +0 -1
  649. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.js +0 -246
  650. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.js.map +0 -1
  651. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.mjs +0 -242
  652. package/demo/node_modules/openai/lib/AbstractAssistantStreamRunner.mjs.map +0 -1
  653. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts +0 -114
  654. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +0 -1
  655. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -519
  656. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +0 -1
  657. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +0 -515
  658. package/demo/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +0 -1
  659. package/demo/node_modules/openai/lib/AssistantStream.d.ts +0 -58
  660. package/demo/node_modules/openai/lib/AssistantStream.d.ts.map +0 -1
  661. package/demo/node_modules/openai/lib/AssistantStream.js +0 -548
  662. package/demo/node_modules/openai/lib/AssistantStream.js.map +0 -1
  663. package/demo/node_modules/openai/lib/AssistantStream.mjs +0 -521
  664. package/demo/node_modules/openai/lib/AssistantStream.mjs.map +0 -1
  665. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.d.ts +0 -2
  666. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.d.ts.map +0 -1
  667. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.js +0 -2177
  668. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.js.map +0 -1
  669. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.mjs +0 -2172
  670. package/demo/node_modules/openai/lib/ChatCompletionRunFunctions.test.mjs.map +0 -1
  671. package/demo/node_modules/openai/lib/ChatCompletionRunner.d.ts +0 -19
  672. package/demo/node_modules/openai/lib/ChatCompletionRunner.d.ts.map +0 -1
  673. package/demo/node_modules/openai/lib/ChatCompletionRunner.js +0 -34
  674. package/demo/node_modules/openai/lib/ChatCompletionRunner.js.map +0 -1
  675. package/demo/node_modules/openai/lib/ChatCompletionRunner.mjs +0 -30
  676. package/demo/node_modules/openai/lib/ChatCompletionRunner.mjs.map +0 -1
  677. package/demo/node_modules/openai/lib/ChatCompletionStream.d.ts +0 -149
  678. package/demo/node_modules/openai/lib/ChatCompletionStream.d.ts.map +0 -1
  679. package/demo/node_modules/openai/lib/ChatCompletionStream.js +0 -312
  680. package/demo/node_modules/openai/lib/ChatCompletionStream.js.map +0 -1
  681. package/demo/node_modules/openai/lib/ChatCompletionStream.mjs +0 -308
  682. package/demo/node_modules/openai/lib/ChatCompletionStream.mjs.map +0 -1
  683. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts +0 -22
  684. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map +0 -1
  685. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -32
  686. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map +0 -1
  687. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +0 -28
  688. package/demo/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map +0 -1
  689. package/demo/node_modules/openai/lib/RunnableFunction.d.ts +0 -95
  690. package/demo/node_modules/openai/lib/RunnableFunction.d.ts.map +0 -1
  691. package/demo/node_modules/openai/lib/RunnableFunction.js +0 -35
  692. package/demo/node_modules/openai/lib/RunnableFunction.js.map +0 -1
  693. package/demo/node_modules/openai/lib/RunnableFunction.mjs +0 -29
  694. package/demo/node_modules/openai/lib/RunnableFunction.mjs.map +0 -1
  695. package/demo/node_modules/openai/lib/Util.d.ts +0 -5
  696. package/demo/node_modules/openai/lib/Util.d.ts.map +0 -1
  697. package/demo/node_modules/openai/lib/Util.js +0 -26
  698. package/demo/node_modules/openai/lib/Util.js.map +0 -1
  699. package/demo/node_modules/openai/lib/Util.mjs +0 -22
  700. package/demo/node_modules/openai/lib/Util.mjs.map +0 -1
  701. package/demo/node_modules/openai/lib/chatCompletionUtils.d.ts +0 -6
  702. package/demo/node_modules/openai/lib/chatCompletionUtils.d.ts.map +0 -1
  703. package/demo/node_modules/openai/lib/chatCompletionUtils.js +0 -20
  704. package/demo/node_modules/openai/lib/chatCompletionUtils.js.map +0 -1
  705. package/demo/node_modules/openai/lib/chatCompletionUtils.mjs +0 -13
  706. package/demo/node_modules/openai/lib/chatCompletionUtils.mjs.map +0 -1
  707. package/demo/node_modules/openai/lib/jsonschema.d.ts +0 -106
  708. package/demo/node_modules/openai/lib/jsonschema.d.ts.map +0 -1
  709. package/demo/node_modules/openai/lib/jsonschema.js +0 -11
  710. package/demo/node_modules/openai/lib/jsonschema.js.map +0 -1
  711. package/demo/node_modules/openai/lib/jsonschema.mjs +0 -10
  712. package/demo/node_modules/openai/lib/jsonschema.mjs.map +0 -1
  713. package/demo/node_modules/openai/package.json +0 -105
  714. package/demo/node_modules/openai/pagination.d.ts +0 -37
  715. package/demo/node_modules/openai/pagination.d.ts.map +0 -1
  716. package/demo/node_modules/openai/pagination.js +0 -64
  717. package/demo/node_modules/openai/pagination.js.map +0 -1
  718. package/demo/node_modules/openai/pagination.mjs +0 -59
  719. package/demo/node_modules/openai/pagination.mjs.map +0 -1
  720. package/demo/node_modules/openai/resource.d.ts +0 -6
  721. package/demo/node_modules/openai/resource.d.ts.map +0 -1
  722. package/demo/node_modules/openai/resource.js +0 -11
  723. package/demo/node_modules/openai/resource.js.map +0 -1
  724. package/demo/node_modules/openai/resource.mjs +0 -7
  725. package/demo/node_modules/openai/resource.mjs.map +0 -1
  726. package/demo/node_modules/openai/resources/audio/audio.d.ts +0 -20
  727. package/demo/node_modules/openai/resources/audio/audio.d.ts.map +0 -1
  728. package/demo/node_modules/openai/resources/audio/audio.js +0 -46
  729. package/demo/node_modules/openai/resources/audio/audio.js.map +0 -1
  730. package/demo/node_modules/openai/resources/audio/audio.mjs +0 -19
  731. package/demo/node_modules/openai/resources/audio/audio.mjs.map +0 -1
  732. package/demo/node_modules/openai/resources/audio/index.d.ts +0 -5
  733. package/demo/node_modules/openai/resources/audio/index.d.ts.map +0 -1
  734. package/demo/node_modules/openai/resources/audio/index.js +0 -13
  735. package/demo/node_modules/openai/resources/audio/index.js.map +0 -1
  736. package/demo/node_modules/openai/resources/audio/index.mjs +0 -6
  737. package/demo/node_modules/openai/resources/audio/index.mjs.map +0 -1
  738. package/demo/node_modules/openai/resources/audio/speech.d.ts +0 -42
  739. package/demo/node_modules/openai/resources/audio/speech.d.ts.map +0 -1
  740. package/demo/node_modules/openai/resources/audio/speech.js +0 -17
  741. package/demo/node_modules/openai/resources/audio/speech.js.map +0 -1
  742. package/demo/node_modules/openai/resources/audio/speech.mjs +0 -13
  743. package/demo/node_modules/openai/resources/audio/speech.mjs.map +0 -1
  744. package/demo/node_modules/openai/resources/audio/transcriptions.d.ts +0 -71
  745. package/demo/node_modules/openai/resources/audio/transcriptions.d.ts.map +0 -1
  746. package/demo/node_modules/openai/resources/audio/transcriptions.js +0 -18
  747. package/demo/node_modules/openai/resources/audio/transcriptions.js.map +0 -1
  748. package/demo/node_modules/openai/resources/audio/transcriptions.mjs +0 -14
  749. package/demo/node_modules/openai/resources/audio/transcriptions.mjs.map +0 -1
  750. package/demo/node_modules/openai/resources/audio/translations.d.ts +0 -50
  751. package/demo/node_modules/openai/resources/audio/translations.d.ts.map +0 -1
  752. package/demo/node_modules/openai/resources/audio/translations.js +0 -18
  753. package/demo/node_modules/openai/resources/audio/translations.js.map +0 -1
  754. package/demo/node_modules/openai/resources/audio/translations.mjs +0 -14
  755. package/demo/node_modules/openai/resources/audio/translations.mjs.map +0 -1
  756. package/demo/node_modules/openai/resources/batches.d.ts +0 -189
  757. package/demo/node_modules/openai/resources/batches.d.ts.map +0 -1
  758. package/demo/node_modules/openai/resources/batches.js +0 -65
  759. package/demo/node_modules/openai/resources/batches.js.map +0 -1
  760. package/demo/node_modules/openai/resources/batches.mjs +0 -37
  761. package/demo/node_modules/openai/resources/batches.mjs.map +0 -1
  762. package/demo/node_modules/openai/resources/beta/assistants.d.ts +0 -1048
  763. package/demo/node_modules/openai/resources/beta/assistants.d.ts.map +0 -1
  764. package/demo/node_modules/openai/resources/beta/assistants.js +0 -89
  765. package/demo/node_modules/openai/resources/beta/assistants.js.map +0 -1
  766. package/demo/node_modules/openai/resources/beta/assistants.mjs +0 -61
  767. package/demo/node_modules/openai/resources/beta/assistants.mjs.map +0 -1
  768. package/demo/node_modules/openai/resources/beta/beta.d.ts +0 -53
  769. package/demo/node_modules/openai/resources/beta/beta.d.ts.map +0 -1
  770. package/demo/node_modules/openai/resources/beta/beta.js +0 -51
  771. package/demo/node_modules/openai/resources/beta/beta.js.map +0 -1
  772. package/demo/node_modules/openai/resources/beta/beta.mjs +0 -24
  773. package/demo/node_modules/openai/resources/beta/beta.mjs.map +0 -1
  774. package/demo/node_modules/openai/resources/beta/chat/chat.d.ts +0 -9
  775. package/demo/node_modules/openai/resources/beta/chat/chat.d.ts.map +0 -1
  776. package/demo/node_modules/openai/resources/beta/chat/chat.js +0 -40
  777. package/demo/node_modules/openai/resources/beta/chat/chat.js.map +0 -1
  778. package/demo/node_modules/openai/resources/beta/chat/chat.mjs +0 -13
  779. package/demo/node_modules/openai/resources/beta/chat/chat.mjs.map +0 -1
  780. package/demo/node_modules/openai/resources/beta/chat/completions.d.ts +0 -37
  781. package/demo/node_modules/openai/resources/beta/chat/completions.d.ts.map +0 -1
  782. package/demo/node_modules/openai/resources/beta/chat/completions.js +0 -39
  783. package/demo/node_modules/openai/resources/beta/chat/completions.js.map +0 -1
  784. package/demo/node_modules/openai/resources/beta/chat/completions.mjs +0 -30
  785. package/demo/node_modules/openai/resources/beta/chat/completions.mjs.map +0 -1
  786. package/demo/node_modules/openai/resources/beta/chat/index.d.ts +0 -3
  787. package/demo/node_modules/openai/resources/beta/chat/index.d.ts.map +0 -1
  788. package/demo/node_modules/openai/resources/beta/chat/index.js +0 -9
  789. package/demo/node_modules/openai/resources/beta/chat/index.js.map +0 -1
  790. package/demo/node_modules/openai/resources/beta/chat/index.mjs +0 -4
  791. package/demo/node_modules/openai/resources/beta/chat/index.mjs.map +0 -1
  792. package/demo/node_modules/openai/resources/beta/index.d.ts +0 -6
  793. package/demo/node_modules/openai/resources/beta/index.d.ts.map +0 -1
  794. package/demo/node_modules/openai/resources/beta/index.js +0 -17
  795. package/demo/node_modules/openai/resources/beta/index.js.map +0 -1
  796. package/demo/node_modules/openai/resources/beta/index.mjs +0 -7
  797. package/demo/node_modules/openai/resources/beta/index.mjs.map +0 -1
  798. package/demo/node_modules/openai/resources/beta/threads/index.d.ts +0 -4
  799. package/demo/node_modules/openai/resources/beta/threads/index.d.ts.map +0 -1
  800. package/demo/node_modules/openai/resources/beta/threads/index.js +0 -13
  801. package/demo/node_modules/openai/resources/beta/threads/index.js.map +0 -1
  802. package/demo/node_modules/openai/resources/beta/threads/index.mjs +0 -5
  803. package/demo/node_modules/openai/resources/beta/threads/index.mjs.map +0 -1
  804. package/demo/node_modules/openai/resources/beta/threads/messages.d.ts +0 -552
  805. package/demo/node_modules/openai/resources/beta/threads/messages.d.ts.map +0 -1
  806. package/demo/node_modules/openai/resources/beta/threads/messages.js +0 -89
  807. package/demo/node_modules/openai/resources/beta/threads/messages.js.map +0 -1
  808. package/demo/node_modules/openai/resources/beta/threads/messages.mjs +0 -61
  809. package/demo/node_modules/openai/resources/beta/threads/messages.mjs.map +0 -1
  810. package/demo/node_modules/openai/resources/beta/threads/runs/index.d.ts +0 -3
  811. package/demo/node_modules/openai/resources/beta/threads/runs/index.d.ts.map +0 -1
  812. package/demo/node_modules/openai/resources/beta/threads/runs/index.js +0 -11
  813. package/demo/node_modules/openai/resources/beta/threads/runs/index.js.map +0 -1
  814. package/demo/node_modules/openai/resources/beta/threads/runs/index.mjs +0 -4
  815. package/demo/node_modules/openai/resources/beta/threads/runs/index.mjs.map +0 -1
  816. package/demo/node_modules/openai/resources/beta/threads/runs/runs.d.ts +0 -1194
  817. package/demo/node_modules/openai/resources/beta/threads/runs/runs.d.ts.map +0 -1
  818. package/demo/node_modules/openai/resources/beta/threads/runs/runs.js +0 -190
  819. package/demo/node_modules/openai/resources/beta/threads/runs/runs.js.map +0 -1
  820. package/demo/node_modules/openai/resources/beta/threads/runs/runs.mjs +0 -162
  821. package/demo/node_modules/openai/resources/beta/threads/runs/runs.mjs.map +0 -1
  822. package/demo/node_modules/openai/resources/beta/threads/runs/steps.d.ts +0 -520
  823. package/demo/node_modules/openai/resources/beta/threads/runs/steps.d.ts.map +0 -1
  824. package/demo/node_modules/openai/resources/beta/threads/runs/steps.js +0 -60
  825. package/demo/node_modules/openai/resources/beta/threads/runs/steps.js.map +0 -1
  826. package/demo/node_modules/openai/resources/beta/threads/runs/steps.mjs +0 -32
  827. package/demo/node_modules/openai/resources/beta/threads/runs/steps.mjs.map +0 -1
  828. package/demo/node_modules/openai/resources/beta/threads/threads.d.ts +0 -1240
  829. package/demo/node_modules/openai/resources/beta/threads/threads.d.ts.map +0 -1
  830. package/demo/node_modules/openai/resources/beta/threads/threads.js +0 -108
  831. package/demo/node_modules/openai/resources/beta/threads/threads.js.map +0 -1
  832. package/demo/node_modules/openai/resources/beta/threads/threads.mjs +0 -81
  833. package/demo/node_modules/openai/resources/beta/threads/threads.mjs.map +0 -1
  834. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.d.ts +0 -142
  835. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.d.ts.map +0 -1
  836. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.js +0 -129
  837. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.js.map +0 -1
  838. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.mjs +0 -125
  839. package/demo/node_modules/openai/resources/beta/vector-stores/file-batches.mjs.map +0 -1
  840. package/demo/node_modules/openai/resources/beta/vector-stores/files.d.ts +0 -154
  841. package/demo/node_modules/openai/resources/beta/vector-stores/files.d.ts.map +0 -1
  842. package/demo/node_modules/openai/resources/beta/vector-stores/files.js +0 -149
  843. package/demo/node_modules/openai/resources/beta/vector-stores/files.js.map +0 -1
  844. package/demo/node_modules/openai/resources/beta/vector-stores/files.mjs +0 -121
  845. package/demo/node_modules/openai/resources/beta/vector-stores/files.mjs.map +0 -1
  846. package/demo/node_modules/openai/resources/beta/vector-stores/index.d.ts +0 -4
  847. package/demo/node_modules/openai/resources/beta/vector-stores/index.d.ts.map +0 -1
  848. package/demo/node_modules/openai/resources/beta/vector-stores/index.js +0 -13
  849. package/demo/node_modules/openai/resources/beta/vector-stores/index.js.map +0 -1
  850. package/demo/node_modules/openai/resources/beta/vector-stores/index.mjs +0 -5
  851. package/demo/node_modules/openai/resources/beta/vector-stores/index.mjs.map +0 -1
  852. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.d.ts +0 -233
  853. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.d.ts.map +0 -1
  854. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.js +0 -99
  855. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.js.map +0 -1
  856. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.mjs +0 -71
  857. package/demo/node_modules/openai/resources/beta/vector-stores/vector-stores.mjs.map +0 -1
  858. package/demo/node_modules/openai/resources/chat/chat.d.ts +0 -42
  859. package/demo/node_modules/openai/resources/chat/chat.d.ts.map +0 -1
  860. package/demo/node_modules/openai/resources/chat/chat.js +0 -40
  861. package/demo/node_modules/openai/resources/chat/chat.js.map +0 -1
  862. package/demo/node_modules/openai/resources/chat/chat.mjs +0 -13
  863. package/demo/node_modules/openai/resources/chat/chat.mjs.map +0 -1
  864. package/demo/node_modules/openai/resources/chat/completions.d.ts +0 -845
  865. package/demo/node_modules/openai/resources/chat/completions.d.ts.map +0 -1
  866. package/demo/node_modules/openai/resources/chat/completions.js +0 -14
  867. package/demo/node_modules/openai/resources/chat/completions.js.map +0 -1
  868. package/demo/node_modules/openai/resources/chat/completions.mjs +0 -10
  869. package/demo/node_modules/openai/resources/chat/completions.mjs.map +0 -1
  870. package/demo/node_modules/openai/resources/chat/index.d.ts +0 -3
  871. package/demo/node_modules/openai/resources/chat/index.d.ts.map +0 -1
  872. package/demo/node_modules/openai/resources/chat/index.js +0 -9
  873. package/demo/node_modules/openai/resources/chat/index.js.map +0 -1
  874. package/demo/node_modules/openai/resources/chat/index.mjs +0 -4
  875. package/demo/node_modules/openai/resources/chat/index.mjs.map +0 -1
  876. package/demo/node_modules/openai/resources/completions.d.ts +0 -272
  877. package/demo/node_modules/openai/resources/completions.d.ts.map +0 -1
  878. package/demo/node_modules/openai/resources/completions.js +0 -14
  879. package/demo/node_modules/openai/resources/completions.js.map +0 -1
  880. package/demo/node_modules/openai/resources/completions.mjs +0 -10
  881. package/demo/node_modules/openai/resources/completions.mjs.map +0 -1
  882. package/demo/node_modules/openai/resources/embeddings.d.ts +0 -103
  883. package/demo/node_modules/openai/resources/embeddings.d.ts.map +0 -1
  884. package/demo/node_modules/openai/resources/embeddings.js +0 -17
  885. package/demo/node_modules/openai/resources/embeddings.js.map +0 -1
  886. package/demo/node_modules/openai/resources/embeddings.mjs +0 -13
  887. package/demo/node_modules/openai/resources/embeddings.mjs.map +0 -1
  888. package/demo/node_modules/openai/resources/files.d.ts +0 -140
  889. package/demo/node_modules/openai/resources/files.d.ts.map +0 -1
  890. package/demo/node_modules/openai/resources/files.js +0 -120
  891. package/demo/node_modules/openai/resources/files.js.map +0 -1
  892. package/demo/node_modules/openai/resources/files.mjs +0 -92
  893. package/demo/node_modules/openai/resources/files.mjs.map +0 -1
  894. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts +0 -19
  895. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts.map +0 -1
  896. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -42
  897. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.js.map +0 -1
  898. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +0 -15
  899. package/demo/node_modules/openai/resources/fine-tuning/fine-tuning.mjs.map +0 -1
  900. package/demo/node_modules/openai/resources/fine-tuning/index.d.ts +0 -3
  901. package/demo/node_modules/openai/resources/fine-tuning/index.d.ts.map +0 -1
  902. package/demo/node_modules/openai/resources/fine-tuning/index.js +0 -11
  903. package/demo/node_modules/openai/resources/fine-tuning/index.js.map +0 -1
  904. package/demo/node_modules/openai/resources/fine-tuning/index.mjs +0 -4
  905. package/demo/node_modules/openai/resources/fine-tuning/index.mjs.map +0 -1
  906. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +0 -69
  907. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts.map +0 -1
  908. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -47
  909. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js.map +0 -1
  910. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +0 -19
  911. package/demo/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs.map +0 -1
  912. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.d.ts +0 -3
  913. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.d.ts.map +0 -1
  914. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.js +0 -12
  915. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.js.map +0 -1
  916. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.mjs +0 -4
  917. package/demo/node_modules/openai/resources/fine-tuning/jobs/index.mjs.map +0 -1
  918. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +0 -362
  919. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts.map +0 -1
  920. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -93
  921. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.js.map +0 -1
  922. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +0 -64
  923. package/demo/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs.map +0 -1
  924. package/demo/node_modules/openai/resources/images.d.ts +0 -174
  925. package/demo/node_modules/openai/resources/images.d.ts.map +0 -1
  926. package/demo/node_modules/openai/resources/images.js +0 -30
  927. package/demo/node_modules/openai/resources/images.js.map +0 -1
  928. package/demo/node_modules/openai/resources/images.mjs +0 -26
  929. package/demo/node_modules/openai/resources/images.mjs.map +0 -1
  930. package/demo/node_modules/openai/resources/index.d.ts +0 -13
  931. package/demo/node_modules/openai/resources/index.d.ts.map +0 -1
  932. package/demo/node_modules/openai/resources/index.js +0 -44
  933. package/demo/node_modules/openai/resources/index.js.map +0 -1
  934. package/demo/node_modules/openai/resources/index.mjs +0 -14
  935. package/demo/node_modules/openai/resources/index.mjs.map +0 -1
  936. package/demo/node_modules/openai/resources/models.d.ts +0 -58
  937. package/demo/node_modules/openai/resources/models.d.ts.map +0 -1
  938. package/demo/node_modules/openai/resources/models.js +0 -64
  939. package/demo/node_modules/openai/resources/models.js.map +0 -1
  940. package/demo/node_modules/openai/resources/models.mjs +0 -36
  941. package/demo/node_modules/openai/resources/models.mjs.map +0 -1
  942. package/demo/node_modules/openai/resources/moderations.d.ts +0 -176
  943. package/demo/node_modules/openai/resources/moderations.d.ts.map +0 -1
  944. package/demo/node_modules/openai/resources/moderations.js +0 -17
  945. package/demo/node_modules/openai/resources/moderations.js.map +0 -1
  946. package/demo/node_modules/openai/resources/moderations.mjs +0 -13
  947. package/demo/node_modules/openai/resources/moderations.mjs.map +0 -1
  948. package/demo/node_modules/openai/resources/shared.d.ts +0 -39
  949. package/demo/node_modules/openai/resources/shared.d.ts.map +0 -1
  950. package/demo/node_modules/openai/resources/shared.js +0 -4
  951. package/demo/node_modules/openai/resources/shared.js.map +0 -1
  952. package/demo/node_modules/openai/resources/shared.mjs +0 -3
  953. package/demo/node_modules/openai/resources/shared.mjs.map +0 -1
  954. package/demo/node_modules/openai/shims/node.d.ts +0 -29
  955. package/demo/node_modules/openai/shims/node.d.ts.map +0 -1
  956. package/demo/node_modules/openai/shims/node.js +0 -31
  957. package/demo/node_modules/openai/shims/node.js.map +0 -1
  958. package/demo/node_modules/openai/shims/node.mjs +0 -5
  959. package/demo/node_modules/openai/shims/node.mjs.map +0 -1
  960. package/demo/node_modules/openai/shims/web.d.ts +0 -26
  961. package/demo/node_modules/openai/shims/web.d.ts.map +0 -1
  962. package/demo/node_modules/openai/shims/web.js +0 -31
  963. package/demo/node_modules/openai/shims/web.js.map +0 -1
  964. package/demo/node_modules/openai/shims/web.mjs +0 -5
  965. package/demo/node_modules/openai/shims/web.mjs.map +0 -1
  966. package/demo/node_modules/openai/src/_shims/MultipartBody.ts +0 -9
  967. package/demo/node_modules/openai/src/_shims/README.md +0 -46
  968. package/demo/node_modules/openai/src/_shims/auto/runtime-bun.ts +0 -4
  969. package/demo/node_modules/openai/src/_shims/auto/runtime-node.ts +0 -4
  970. package/demo/node_modules/openai/src/_shims/auto/runtime.ts +0 -4
  971. package/demo/node_modules/openai/src/_shims/auto/types-node.ts +0 -4
  972. package/demo/node_modules/openai/src/_shims/auto/types.d.ts +0 -101
  973. package/demo/node_modules/openai/src/_shims/auto/types.js +0 -3
  974. package/demo/node_modules/openai/src/_shims/auto/types.mjs +0 -3
  975. package/demo/node_modules/openai/src/_shims/bun-runtime.ts +0 -14
  976. package/demo/node_modules/openai/src/_shims/index.d.ts +0 -81
  977. package/demo/node_modules/openai/src/_shims/index.js +0 -13
  978. package/demo/node_modules/openai/src/_shims/index.mjs +0 -7
  979. package/demo/node_modules/openai/src/_shims/manual-types.d.ts +0 -12
  980. package/demo/node_modules/openai/src/_shims/manual-types.js +0 -3
  981. package/demo/node_modules/openai/src/_shims/manual-types.mjs +0 -3
  982. package/demo/node_modules/openai/src/_shims/node-runtime.ts +0 -83
  983. package/demo/node_modules/openai/src/_shims/node-types.d.ts +0 -42
  984. package/demo/node_modules/openai/src/_shims/node-types.js +0 -3
  985. package/demo/node_modules/openai/src/_shims/node-types.mjs +0 -3
  986. package/demo/node_modules/openai/src/_shims/registry.ts +0 -65
  987. package/demo/node_modules/openai/src/_shims/web-runtime.ts +0 -103
  988. package/demo/node_modules/openai/src/_shims/web-types.d.ts +0 -83
  989. package/demo/node_modules/openai/src/_shims/web-types.js +0 -3
  990. package/demo/node_modules/openai/src/_shims/web-types.mjs +0 -3
  991. package/demo/node_modules/openai/src/core.ts +0 -1162
  992. package/demo/node_modules/openai/src/error.ts +0 -158
  993. package/demo/node_modules/openai/src/index.ts +0 -502
  994. package/demo/node_modules/openai/src/lib/.keep +0 -4
  995. package/demo/node_modules/openai/src/lib/AbstractAssistantStreamRunner.ts +0 -340
  996. package/demo/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +0 -682
  997. package/demo/node_modules/openai/src/lib/AssistantStream.ts +0 -723
  998. package/demo/node_modules/openai/src/lib/ChatCompletionRunFunctions.test.ts +0 -2328
  999. package/demo/node_modules/openai/src/lib/ChatCompletionRunner.ts +0 -68
  1000. package/demo/node_modules/openai/src/lib/ChatCompletionStream.ts +0 -494
  1001. package/demo/node_modules/openai/src/lib/ChatCompletionStreamingRunner.ts +0 -68
  1002. package/demo/node_modules/openai/src/lib/RunnableFunction.ts +0 -134
  1003. package/demo/node_modules/openai/src/lib/Util.ts +0 -23
  1004. package/demo/node_modules/openai/src/lib/chatCompletionUtils.ts +0 -28
  1005. package/demo/node_modules/openai/src/lib/jsonschema.ts +0 -148
  1006. package/demo/node_modules/openai/src/pagination.ts +0 -98
  1007. package/demo/node_modules/openai/src/resource.ts +0 -11
  1008. package/demo/node_modules/openai/src/resources/audio/audio.ts +0 -23
  1009. package/demo/node_modules/openai/src/resources/audio/index.ts +0 -6
  1010. package/demo/node_modules/openai/src/resources/audio/speech.ts +0 -52
  1011. package/demo/node_modules/openai/src/resources/audio/transcriptions.ts +0 -84
  1012. package/demo/node_modules/openai/src/resources/audio/translations.ts +0 -61
  1013. package/demo/node_modules/openai/src/resources/batches.ts +0 -252
  1014. package/demo/node_modules/openai/src/resources/beta/assistants.ts +0 -1315
  1015. package/demo/node_modules/openai/src/resources/beta/beta.ts +0 -56
  1016. package/demo/node_modules/openai/src/resources/beta/chat/chat.ts +0 -12
  1017. package/demo/node_modules/openai/src/resources/beta/chat/completions.ts +0 -106
  1018. package/demo/node_modules/openai/src/resources/beta/chat/index.ts +0 -4
  1019. package/demo/node_modules/openai/src/resources/beta/index.ts +0 -48
  1020. package/demo/node_modules/openai/src/resources/beta/threads/index.ts +0 -72
  1021. package/demo/node_modules/openai/src/resources/beta/threads/messages.ts +0 -706
  1022. package/demo/node_modules/openai/src/resources/beta/threads/runs/index.ts +0 -44
  1023. package/demo/node_modules/openai/src/resources/beta/threads/runs/runs.ts +0 -1627
  1024. package/demo/node_modules/openai/src/resources/beta/threads/runs/steps.ts +0 -641
  1025. package/demo/node_modules/openai/src/resources/beta/threads/threads.ts +0 -1536
  1026. package/demo/node_modules/openai/src/resources/beta/vector-stores/file-batches.ts +0 -293
  1027. package/demo/node_modules/openai/src/resources/beta/vector-stores/files.ts +0 -284
  1028. package/demo/node_modules/openai/src/resources/beta/vector-stores/index.ts +0 -25
  1029. package/demo/node_modules/openai/src/resources/beta/vector-stores/vector-stores.ts +0 -318
  1030. package/demo/node_modules/openai/src/resources/chat/chat.ts +0 -67
  1031. package/demo/node_modules/openai/src/resources/chat/completions.ts +0 -996
  1032. package/demo/node_modules/openai/src/resources/chat/index.ts +0 -33
  1033. package/demo/node_modules/openai/src/resources/completions.ts +0 -329
  1034. package/demo/node_modules/openai/src/resources/embeddings.ts +0 -125
  1035. package/demo/node_modules/openai/src/resources/files.ts +0 -214
  1036. package/demo/node_modules/openai/src/resources/fine-tuning/fine-tuning.ts +0 -22
  1037. package/demo/node_modules/openai/src/resources/fine-tuning/index.ts +0 -16
  1038. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +0 -108
  1039. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/index.ts +0 -21
  1040. package/demo/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +0 -458
  1041. package/demo/node_modules/openai/src/resources/images.ts +0 -215
  1042. package/demo/node_modules/openai/src/resources/index.ts +0 -45
  1043. package/demo/node_modules/openai/src/resources/models.ts +0 -76
  1044. package/demo/node_modules/openai/src/resources/moderations.ts +0 -214
  1045. package/demo/node_modules/openai/src/resources/shared.ts +0 -47
  1046. package/demo/node_modules/openai/src/shims/node.ts +0 -50
  1047. package/demo/node_modules/openai/src/shims/web.ts +0 -50
  1048. package/demo/node_modules/openai/src/streaming.ts +0 -508
  1049. package/demo/node_modules/openai/src/tsconfig.json +0 -11
  1050. package/demo/node_modules/openai/src/uploads.ts +0 -248
  1051. package/demo/node_modules/openai/src/version.ts +0 -1
  1052. package/demo/node_modules/openai/streaming.d.ts +0 -41
  1053. package/demo/node_modules/openai/streaming.d.ts.map +0 -1
  1054. package/demo/node_modules/openai/streaming.js +0 -433
  1055. package/demo/node_modules/openai/streaming.js.map +0 -1
  1056. package/demo/node_modules/openai/streaming.mjs +0 -426
  1057. package/demo/node_modules/openai/streaming.mjs.map +0 -1
  1058. package/demo/node_modules/openai/uploads.d.ts +0 -75
  1059. package/demo/node_modules/openai/uploads.d.ts.map +0 -1
  1060. package/demo/node_modules/openai/uploads.js +0 -165
  1061. package/demo/node_modules/openai/uploads.js.map +0 -1
  1062. package/demo/node_modules/openai/uploads.mjs +0 -152
  1063. package/demo/node_modules/openai/uploads.mjs.map +0 -1
  1064. package/demo/node_modules/openai/version.d.ts +0 -2
  1065. package/demo/node_modules/openai/version.d.ts.map +0 -1
  1066. package/demo/node_modules/openai/version.js +0 -5
  1067. package/demo/node_modules/openai/version.js.map +0 -1
  1068. package/demo/node_modules/openai/version.mjs +0 -2
  1069. package/demo/node_modules/openai/version.mjs.map +0 -1
  1070. package/demo/node_modules/tr46/index.js +0 -193
  1071. package/demo/node_modules/tr46/lib/.gitkeep +0 -0
  1072. package/demo/node_modules/tr46/lib/mappingTable.json +0 -1
  1073. package/demo/node_modules/tr46/package.json +0 -31
  1074. package/demo/node_modules/undici-types/README.md +0 -6
  1075. package/demo/node_modules/undici-types/agent.d.ts +0 -31
  1076. package/demo/node_modules/undici-types/api.d.ts +0 -43
  1077. package/demo/node_modules/undici-types/balanced-pool.d.ts +0 -18
  1078. package/demo/node_modules/undici-types/cache.d.ts +0 -36
  1079. package/demo/node_modules/undici-types/client.d.ts +0 -97
  1080. package/demo/node_modules/undici-types/connector.d.ts +0 -34
  1081. package/demo/node_modules/undici-types/content-type.d.ts +0 -21
  1082. package/demo/node_modules/undici-types/cookies.d.ts +0 -28
  1083. package/demo/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  1084. package/demo/node_modules/undici-types/dispatcher.d.ts +0 -241
  1085. package/demo/node_modules/undici-types/errors.d.ts +0 -128
  1086. package/demo/node_modules/undici-types/fetch.d.ts +0 -209
  1087. package/demo/node_modules/undici-types/file.d.ts +0 -39
  1088. package/demo/node_modules/undici-types/filereader.d.ts +0 -54
  1089. package/demo/node_modules/undici-types/formdata.d.ts +0 -108
  1090. package/demo/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  1091. package/demo/node_modules/undici-types/global-origin.d.ts +0 -7
  1092. package/demo/node_modules/undici-types/handlers.d.ts +0 -9
  1093. package/demo/node_modules/undici-types/header.d.ts +0 -4
  1094. package/demo/node_modules/undici-types/index.d.ts +0 -63
  1095. package/demo/node_modules/undici-types/interceptors.d.ts +0 -5
  1096. package/demo/node_modules/undici-types/mock-agent.d.ts +0 -50
  1097. package/demo/node_modules/undici-types/mock-client.d.ts +0 -25
  1098. package/demo/node_modules/undici-types/mock-errors.d.ts +0 -12
  1099. package/demo/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  1100. package/demo/node_modules/undici-types/mock-pool.d.ts +0 -25
  1101. package/demo/node_modules/undici-types/package.json +0 -55
  1102. package/demo/node_modules/undici-types/patch.d.ts +0 -71
  1103. package/demo/node_modules/undici-types/pool-stats.d.ts +0 -19
  1104. package/demo/node_modules/undici-types/pool.d.ts +0 -28
  1105. package/demo/node_modules/undici-types/proxy-agent.d.ts +0 -30
  1106. package/demo/node_modules/undici-types/readable.d.ts +0 -61
  1107. package/demo/node_modules/undici-types/webidl.d.ts +0 -220
  1108. package/demo/node_modules/undici-types/websocket.d.ts +0 -131
  1109. package/demo/node_modules/web-streams-polyfill/LICENSE +0 -22
  1110. package/demo/node_modules/web-streams-polyfill/README.md +0 -110
  1111. package/demo/node_modules/web-streams-polyfill/es2018/package.json +0 -14
  1112. package/demo/node_modules/web-streams-polyfill/es6/package.json +0 -14
  1113. package/demo/node_modules/web-streams-polyfill/package.json +0 -83
  1114. package/demo/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +0 -13
  1115. package/demo/node_modules/web-streams-polyfill/ponyfill/es6/package.json +0 -13
  1116. package/demo/node_modules/web-streams-polyfill/ponyfill/package.json +0 -13
  1117. package/demo/node_modules/webidl-conversions/LICENSE.md +0 -12
  1118. package/demo/node_modules/webidl-conversions/README.md +0 -53
  1119. package/demo/node_modules/webidl-conversions/lib/index.js +0 -189
  1120. package/demo/node_modules/webidl-conversions/package.json +0 -23
  1121. package/demo/node_modules/whatwg-url/LICENSE.txt +0 -21
  1122. package/demo/node_modules/whatwg-url/README.md +0 -67
  1123. package/demo/node_modules/whatwg-url/lib/URL-impl.js +0 -200
  1124. package/demo/node_modules/whatwg-url/lib/URL.js +0 -196
  1125. package/demo/node_modules/whatwg-url/lib/public-api.js +0 -11
  1126. package/demo/node_modules/whatwg-url/lib/url-state-machine.js +0 -1297
  1127. package/demo/node_modules/whatwg-url/lib/utils.js +0 -20
  1128. package/demo/node_modules/whatwg-url/package.json +0 -32
  1129. package/demo/watson.png +0 -0
@@ -1,1803 +0,0 @@
1
- /**
2
- * To use the HTTP server and client one must `require('http')`.
3
- *
4
- * The HTTP interfaces in Node.js are designed to support many features
5
- * of the protocol which have been traditionally difficult to use.
6
- * In particular, large, possibly chunk-encoded, messages. The interface is
7
- * careful to never buffer entire requests or responses, so the
8
- * user is able to stream data.
9
- *
10
- * HTTP message headers are represented by an object like this:
11
- *
12
- * ```js
13
- * { 'content-length': '123',
14
- * 'content-type': 'text/plain',
15
- * 'connection': 'keep-alive',
16
- * 'host': 'example.com',
17
- * 'accept': '*' }
18
- * ```
19
- *
20
- * Keys are lowercased. Values are not modified.
21
- *
22
- * In order to support the full spectrum of possible HTTP applications, the Node.js
23
- * HTTP API is very low-level. It deals with stream handling and message
24
- * parsing only. It parses a message into headers and body but it does not
25
- * parse the actual headers or the body.
26
- *
27
- * See `message.headers` for details on how duplicate headers are handled.
28
- *
29
- * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For
30
- * example, the previous message header object might have a `rawHeaders`list like the following:
31
- *
32
- * ```js
33
- * [ 'ConTent-Length', '123456',
34
- * 'content-LENGTH', '123',
35
- * 'content-type', 'text/plain',
36
- * 'CONNECTION', 'keep-alive',
37
- * 'Host', 'example.com',
38
- * 'accepT', '*' ]
39
- * ```
40
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js)
41
- */
42
- declare module "http" {
43
- import * as stream from "node:stream";
44
- import { URL } from "node:url";
45
- import { EventEmitter } from "node:events";
46
- import { LookupOptions } from "node:dns";
47
- import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net";
48
- // incoming headers will never contain number
49
- interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
50
- accept?: string | undefined;
51
- "accept-language"?: string | undefined;
52
- "accept-patch"?: string | undefined;
53
- "accept-ranges"?: string | undefined;
54
- "access-control-allow-credentials"?: string | undefined;
55
- "access-control-allow-headers"?: string | undefined;
56
- "access-control-allow-methods"?: string | undefined;
57
- "access-control-allow-origin"?: string | undefined;
58
- "access-control-expose-headers"?: string | undefined;
59
- "access-control-max-age"?: string | undefined;
60
- "access-control-request-headers"?: string | undefined;
61
- "access-control-request-method"?: string | undefined;
62
- age?: string | undefined;
63
- allow?: string | undefined;
64
- "alt-svc"?: string | undefined;
65
- authorization?: string | undefined;
66
- "cache-control"?: string | undefined;
67
- connection?: string | undefined;
68
- "content-disposition"?: string | undefined;
69
- "content-encoding"?: string | undefined;
70
- "content-language"?: string | undefined;
71
- "content-length"?: string | undefined;
72
- "content-location"?: string | undefined;
73
- "content-range"?: string | undefined;
74
- "content-type"?: string | undefined;
75
- cookie?: string | undefined;
76
- date?: string | undefined;
77
- etag?: string | undefined;
78
- expect?: string | undefined;
79
- expires?: string | undefined;
80
- forwarded?: string | undefined;
81
- from?: string | undefined;
82
- host?: string | undefined;
83
- "if-match"?: string | undefined;
84
- "if-modified-since"?: string | undefined;
85
- "if-none-match"?: string | undefined;
86
- "if-unmodified-since"?: string | undefined;
87
- "last-modified"?: string | undefined;
88
- location?: string | undefined;
89
- origin?: string | undefined;
90
- pragma?: string | undefined;
91
- "proxy-authenticate"?: string | undefined;
92
- "proxy-authorization"?: string | undefined;
93
- "public-key-pins"?: string | undefined;
94
- range?: string | undefined;
95
- referer?: string | undefined;
96
- "retry-after"?: string | undefined;
97
- "sec-websocket-accept"?: string | undefined;
98
- "sec-websocket-extensions"?: string | undefined;
99
- "sec-websocket-key"?: string | undefined;
100
- "sec-websocket-protocol"?: string | undefined;
101
- "sec-websocket-version"?: string | undefined;
102
- "set-cookie"?: string[] | undefined;
103
- "strict-transport-security"?: string | undefined;
104
- tk?: string | undefined;
105
- trailer?: string | undefined;
106
- "transfer-encoding"?: string | undefined;
107
- upgrade?: string | undefined;
108
- "user-agent"?: string | undefined;
109
- vary?: string | undefined;
110
- via?: string | undefined;
111
- warning?: string | undefined;
112
- "www-authenticate"?: string | undefined;
113
- }
114
- // outgoing headers allows numbers (as they are converted internally to strings)
115
- type OutgoingHttpHeader = number | string | string[];
116
- interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
117
- accept?: string | string[] | undefined;
118
- "accept-charset"?: string | string[] | undefined;
119
- "accept-encoding"?: string | string[] | undefined;
120
- "accept-language"?: string | string[] | undefined;
121
- "accept-ranges"?: string | undefined;
122
- "access-control-allow-credentials"?: string | undefined;
123
- "access-control-allow-headers"?: string | undefined;
124
- "access-control-allow-methods"?: string | undefined;
125
- "access-control-allow-origin"?: string | undefined;
126
- "access-control-expose-headers"?: string | undefined;
127
- "access-control-max-age"?: string | undefined;
128
- "access-control-request-headers"?: string | undefined;
129
- "access-control-request-method"?: string | undefined;
130
- age?: string | undefined;
131
- allow?: string | undefined;
132
- authorization?: string | undefined;
133
- "cache-control"?: string | undefined;
134
- "cdn-cache-control"?: string | undefined;
135
- connection?: string | string[] | undefined;
136
- "content-disposition"?: string | undefined;
137
- "content-encoding"?: string | undefined;
138
- "content-language"?: string | undefined;
139
- "content-length"?: string | number | undefined;
140
- "content-location"?: string | undefined;
141
- "content-range"?: string | undefined;
142
- "content-security-policy"?: string | undefined;
143
- "content-security-policy-report-only"?: string | undefined;
144
- cookie?: string | string[] | undefined;
145
- dav?: string | string[] | undefined;
146
- dnt?: string | undefined;
147
- date?: string | undefined;
148
- etag?: string | undefined;
149
- expect?: string | undefined;
150
- expires?: string | undefined;
151
- forwarded?: string | undefined;
152
- from?: string | undefined;
153
- host?: string | undefined;
154
- "if-match"?: string | undefined;
155
- "if-modified-since"?: string | undefined;
156
- "if-none-match"?: string | undefined;
157
- "if-range"?: string | undefined;
158
- "if-unmodified-since"?: string | undefined;
159
- "last-modified"?: string | undefined;
160
- link?: string | string[] | undefined;
161
- location?: string | undefined;
162
- "max-forwards"?: string | undefined;
163
- origin?: string | undefined;
164
- prgama?: string | string[] | undefined;
165
- "proxy-authenticate"?: string | string[] | undefined;
166
- "proxy-authorization"?: string | undefined;
167
- "public-key-pins"?: string | undefined;
168
- "public-key-pins-report-only"?: string | undefined;
169
- range?: string | undefined;
170
- referer?: string | undefined;
171
- "referrer-policy"?: string | undefined;
172
- refresh?: string | undefined;
173
- "retry-after"?: string | undefined;
174
- "sec-websocket-accept"?: string | undefined;
175
- "sec-websocket-extensions"?: string | string[] | undefined;
176
- "sec-websocket-key"?: string | undefined;
177
- "sec-websocket-protocol"?: string | string[] | undefined;
178
- "sec-websocket-version"?: string | undefined;
179
- server?: string | undefined;
180
- "set-cookie"?: string | string[] | undefined;
181
- "strict-transport-security"?: string | undefined;
182
- te?: string | undefined;
183
- trailer?: string | undefined;
184
- "transfer-encoding"?: string | undefined;
185
- "user-agent"?: string | undefined;
186
- upgrade?: string | undefined;
187
- "upgrade-insecure-requests"?: string | undefined;
188
- vary?: string | undefined;
189
- via?: string | string[] | undefined;
190
- warning?: string | undefined;
191
- "www-authenticate"?: string | string[] | undefined;
192
- "x-content-type-options"?: string | undefined;
193
- "x-dns-prefetch-control"?: string | undefined;
194
- "x-frame-options"?: string | undefined;
195
- "x-xss-protection"?: string | undefined;
196
- }
197
- interface ClientRequestArgs {
198
- _defaultAgent?: Agent | undefined;
199
- agent?: Agent | boolean | undefined;
200
- auth?: string | null | undefined;
201
- createConnection?:
202
- | ((
203
- options: ClientRequestArgs,
204
- oncreate: (err: Error | null, socket: stream.Duplex) => void,
205
- ) => stream.Duplex | null | undefined)
206
- | undefined;
207
- defaultPort?: number | string | undefined;
208
- family?: number | undefined;
209
- headers?: OutgoingHttpHeaders | undefined;
210
- hints?: LookupOptions["hints"];
211
- host?: string | null | undefined;
212
- hostname?: string | null | undefined;
213
- insecureHTTPParser?: boolean | undefined;
214
- localAddress?: string | undefined;
215
- localPort?: number | undefined;
216
- lookup?: LookupFunction | undefined;
217
- /**
218
- * @default 16384
219
- */
220
- maxHeaderSize?: number | undefined;
221
- method?: string | undefined;
222
- path?: string | null | undefined;
223
- port?: number | string | null | undefined;
224
- protocol?: string | null | undefined;
225
- setHost?: boolean | undefined;
226
- signal?: AbortSignal | undefined;
227
- socketPath?: string | undefined;
228
- timeout?: number | undefined;
229
- uniqueHeaders?: Array<string | string[]> | undefined;
230
- joinDuplicateHeaders?: boolean;
231
- }
232
- interface ServerOptions<
233
- Request extends typeof IncomingMessage = typeof IncomingMessage,
234
- Response extends typeof ServerResponse = typeof ServerResponse,
235
- > {
236
- /**
237
- * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
238
- */
239
- IncomingMessage?: Request | undefined;
240
- /**
241
- * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
242
- */
243
- ServerResponse?: Response | undefined;
244
- /**
245
- * Sets the timeout value in milliseconds for receiving the entire request from the client.
246
- * @see Server.requestTimeout for more information.
247
- * @default 300000
248
- * @since v18.0.0
249
- */
250
- requestTimeout?: number | undefined;
251
- /**
252
- * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
253
- * @default false
254
- * @since v18.14.0
255
- */
256
- joinDuplicateHeaders?: boolean;
257
- /**
258
- * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
259
- * after it has finished writing the last response, before a socket will be destroyed.
260
- * @see Server.keepAliveTimeout for more information.
261
- * @default 5000
262
- * @since v18.0.0
263
- */
264
- keepAliveTimeout?: number | undefined;
265
- /**
266
- * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
267
- * @default 30000
268
- */
269
- connectionsCheckingInterval?: number | undefined;
270
- /**
271
- * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
272
- * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
273
- * Default: @see stream.getDefaultHighWaterMark().
274
- * @since v18.17.0
275
- */
276
- highWaterMark?: number | undefined;
277
- /**
278
- * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
279
- * Using the insecure parser should be avoided.
280
- * See --insecure-http-parser for more information.
281
- * @default false
282
- */
283
- insecureHTTPParser?: boolean | undefined;
284
- /**
285
- * Optionally overrides the value of
286
- * `--max-http-header-size` for requests received by this server, i.e.
287
- * the maximum length of request headers in bytes.
288
- * @default 16384
289
- * @since v13.3.0
290
- */
291
- maxHeaderSize?: number | undefined;
292
- /**
293
- * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
294
- * @default true
295
- * @since v16.5.0
296
- */
297
- noDelay?: boolean | undefined;
298
- /**
299
- * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
300
- * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
301
- * @default false
302
- * @since v16.5.0
303
- */
304
- keepAlive?: boolean | undefined;
305
- /**
306
- * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
307
- * @default 0
308
- * @since v16.5.0
309
- */
310
- keepAliveInitialDelay?: number | undefined;
311
- /**
312
- * A list of response headers that should be sent only once.
313
- * If the header's value is an array, the items will be joined using `; `.
314
- */
315
- uniqueHeaders?: Array<string | string[]> | undefined;
316
- }
317
- type RequestListener<
318
- Request extends typeof IncomingMessage = typeof IncomingMessage,
319
- Response extends typeof ServerResponse = typeof ServerResponse,
320
- > = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
321
- /**
322
- * @since v0.1.17
323
- */
324
- class Server<
325
- Request extends typeof IncomingMessage = typeof IncomingMessage,
326
- Response extends typeof ServerResponse = typeof ServerResponse,
327
- > extends NetServer {
328
- constructor(requestListener?: RequestListener<Request, Response>);
329
- constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
330
- /**
331
- * Sets the timeout value for sockets, and emits a `'timeout'` event on
332
- * the Server object, passing the socket as an argument, if a timeout
333
- * occurs.
334
- *
335
- * If there is a `'timeout'` event listener on the Server object, then it
336
- * will be called with the timed-out socket as an argument.
337
- *
338
- * By default, the Server does not timeout sockets. However, if a callback
339
- * is assigned to the Server's `'timeout'` event, timeouts must be handled
340
- * explicitly.
341
- * @since v0.9.12
342
- * @param [msecs=0 (no timeout)]
343
- */
344
- setTimeout(msecs?: number, callback?: () => void): this;
345
- setTimeout(callback: () => void): this;
346
- /**
347
- * Limits maximum incoming headers count. If set to 0, no limit will be applied.
348
- * @since v0.7.0
349
- */
350
- maxHeadersCount: number | null;
351
- /**
352
- * The maximum number of requests socket can handle
353
- * before closing keep alive connection.
354
- *
355
- * A value of `0` will disable the limit.
356
- *
357
- * When the limit is reached it will set the `Connection` header value to `close`,
358
- * but will not actually close the connection, subsequent requests sent
359
- * after the limit is reached will get `503 Service Unavailable` as a response.
360
- * @since v16.10.0
361
- */
362
- maxRequestsPerSocket: number | null;
363
- /**
364
- * The number of milliseconds of inactivity before a socket is presumed
365
- * to have timed out.
366
- *
367
- * A value of `0` will disable the timeout behavior on incoming connections.
368
- *
369
- * The socket timeout logic is set up on connection, so changing this
370
- * value only affects new connections to the server, not any existing connections.
371
- * @since v0.9.12
372
- */
373
- timeout: number;
374
- /**
375
- * Limit the amount of time the parser will wait to receive the complete HTTP
376
- * headers.
377
- *
378
- * If the timeout expires, the server responds with status 408 without
379
- * forwarding the request to the request listener and then closes the connection.
380
- *
381
- * It must be set to a non-zero value (e.g. 120 seconds) to protect against
382
- * potential Denial-of-Service attacks in case the server is deployed without a
383
- * reverse proxy in front.
384
- * @since v11.3.0, v10.14.0
385
- */
386
- headersTimeout: number;
387
- /**
388
- * The number of milliseconds of inactivity a server needs to wait for additional
389
- * incoming data, after it has finished writing the last response, before a socket
390
- * will be destroyed. If the server receives new data before the keep-alive
391
- * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`.
392
- *
393
- * A value of `0` will disable the keep-alive timeout behavior on incoming
394
- * connections.
395
- * A value of `0` makes the http server behave similarly to Node.js versions prior
396
- * to 8.0.0, which did not have a keep-alive timeout.
397
- *
398
- * The socket timeout logic is set up on connection, so changing this value only
399
- * affects new connections to the server, not any existing connections.
400
- * @since v8.0.0
401
- */
402
- keepAliveTimeout: number;
403
- /**
404
- * Sets the timeout value in milliseconds for receiving the entire request from
405
- * the client.
406
- *
407
- * If the timeout expires, the server responds with status 408 without
408
- * forwarding the request to the request listener and then closes the connection.
409
- *
410
- * It must be set to a non-zero value (e.g. 120 seconds) to protect against
411
- * potential Denial-of-Service attacks in case the server is deployed without a
412
- * reverse proxy in front.
413
- * @since v14.11.0
414
- */
415
- requestTimeout: number;
416
- /**
417
- * Closes all connections connected to this server.
418
- * @since v18.2.0
419
- */
420
- closeAllConnections(): void;
421
- /**
422
- * Closes all connections connected to this server which are not sending a request or waiting for a response.
423
- * @since v18.2.0
424
- */
425
- closeIdleConnections(): void;
426
- addListener(event: string, listener: (...args: any[]) => void): this;
427
- addListener(event: "close", listener: () => void): this;
428
- addListener(event: "connection", listener: (socket: Socket) => void): this;
429
- addListener(event: "error", listener: (err: Error) => void): this;
430
- addListener(event: "listening", listener: () => void): this;
431
- addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
432
- addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
433
- addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
434
- addListener(
435
- event: "connect",
436
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
437
- ): this;
438
- addListener(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
439
- addListener(event: "request", listener: RequestListener<Request, Response>): this;
440
- addListener(
441
- event: "upgrade",
442
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
443
- ): this;
444
- emit(event: string, ...args: any[]): boolean;
445
- emit(event: "close"): boolean;
446
- emit(event: "connection", socket: Socket): boolean;
447
- emit(event: "error", err: Error): boolean;
448
- emit(event: "listening"): boolean;
449
- emit(
450
- event: "checkContinue",
451
- req: InstanceType<Request>,
452
- res: InstanceType<Response> & { req: InstanceType<Request> },
453
- ): boolean;
454
- emit(
455
- event: "checkExpectation",
456
- req: InstanceType<Request>,
457
- res: InstanceType<Response> & { req: InstanceType<Request> },
458
- ): boolean;
459
- emit(event: "clientError", err: Error, socket: stream.Duplex): boolean;
460
- emit(event: "connect", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
461
- emit(event: "dropRequest", req: InstanceType<Request>, socket: stream.Duplex): boolean;
462
- emit(
463
- event: "request",
464
- req: InstanceType<Request>,
465
- res: InstanceType<Response> & { req: InstanceType<Request> },
466
- ): boolean;
467
- emit(event: "upgrade", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
468
- on(event: string, listener: (...args: any[]) => void): this;
469
- on(event: "close", listener: () => void): this;
470
- on(event: "connection", listener: (socket: Socket) => void): this;
471
- on(event: "error", listener: (err: Error) => void): this;
472
- on(event: "listening", listener: () => void): this;
473
- on(event: "checkContinue", listener: RequestListener<Request, Response>): this;
474
- on(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
475
- on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
476
- on(event: "connect", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
477
- on(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
478
- on(event: "request", listener: RequestListener<Request, Response>): this;
479
- on(event: "upgrade", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
480
- once(event: string, listener: (...args: any[]) => void): this;
481
- once(event: "close", listener: () => void): this;
482
- once(event: "connection", listener: (socket: Socket) => void): this;
483
- once(event: "error", listener: (err: Error) => void): this;
484
- once(event: "listening", listener: () => void): this;
485
- once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
486
- once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
487
- once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
488
- once(
489
- event: "connect",
490
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
491
- ): this;
492
- once(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
493
- once(event: "request", listener: RequestListener<Request, Response>): this;
494
- once(
495
- event: "upgrade",
496
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
497
- ): this;
498
- prependListener(event: string, listener: (...args: any[]) => void): this;
499
- prependListener(event: "close", listener: () => void): this;
500
- prependListener(event: "connection", listener: (socket: Socket) => void): this;
501
- prependListener(event: "error", listener: (err: Error) => void): this;
502
- prependListener(event: "listening", listener: () => void): this;
503
- prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
504
- prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
505
- prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
506
- prependListener(
507
- event: "connect",
508
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
509
- ): this;
510
- prependListener(
511
- event: "dropRequest",
512
- listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
513
- ): this;
514
- prependListener(event: "request", listener: RequestListener<Request, Response>): this;
515
- prependListener(
516
- event: "upgrade",
517
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
518
- ): this;
519
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
520
- prependOnceListener(event: "close", listener: () => void): this;
521
- prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
522
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
523
- prependOnceListener(event: "listening", listener: () => void): this;
524
- prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
525
- prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
526
- prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
527
- prependOnceListener(
528
- event: "connect",
529
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
530
- ): this;
531
- prependOnceListener(
532
- event: "dropRequest",
533
- listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
534
- ): this;
535
- prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
536
- prependOnceListener(
537
- event: "upgrade",
538
- listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
539
- ): this;
540
- }
541
- /**
542
- * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from
543
- * the perspective of the participants of HTTP transaction.
544
- * @since v0.1.17
545
- */
546
- class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
547
- readonly req: Request;
548
- chunkedEncoding: boolean;
549
- shouldKeepAlive: boolean;
550
- useChunkedEncodingByDefault: boolean;
551
- sendDate: boolean;
552
- /**
553
- * @deprecated Use `writableEnded` instead.
554
- */
555
- finished: boolean;
556
- /**
557
- * Read-only. `true` if the headers were sent, otherwise `false`.
558
- * @since v0.9.3
559
- */
560
- readonly headersSent: boolean;
561
- /**
562
- * Aliases of `outgoingMessage.socket`
563
- * @since v0.3.0
564
- * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
565
- */
566
- readonly connection: Socket | null;
567
- /**
568
- * Reference to the underlying socket. Usually, users will not want to access
569
- * this property.
570
- *
571
- * After calling `outgoingMessage.end()`, this property will be nulled.
572
- * @since v0.3.0
573
- */
574
- readonly socket: Socket | null;
575
- constructor();
576
- /**
577
- * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter.
578
- * @since v0.9.12
579
- * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
580
- */
581
- setTimeout(msecs: number, callback?: () => void): this;
582
- /**
583
- * Sets a single header value for the header object.
584
- * If the header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings to send multiple headers with the same name.
585
- * @since v0.4.0
586
- * @param name Header name
587
- * @param value Header value
588
- */
589
- setHeader(name: string, value: number | string | readonly string[]): this;
590
- /**
591
- * Append a single header value for the header object.
592
- *
593
- * If the value is an array, this is equivalent of calling this method multiple times.
594
- *
595
- * If there were no previous value for the header, this is equivalent of calling `outgoingMessage.setHeader(name, value)`.
596
- *
597
- * Depending of the value of `options.uniqueHeaders` when the client request or the server were created,
598
- * this will end up in the header being sent multiple times or a single time with values joined using `; `.
599
- * @since v18.3.0, v16.17.0
600
- * @param name Header name
601
- * @param value Header value
602
- */
603
- appendHeader(name: string, value: string | readonly string[]): this;
604
- /**
605
- * Gets the value of HTTP header with the given name. If such a name doesn't
606
- * exist in message, it will be `undefined`.
607
- * @since v0.4.0
608
- * @param name Name of header
609
- */
610
- getHeader(name: string): number | string | string[] | undefined;
611
- /**
612
- * Returns a shallow copy of the current outgoing headers. Since a shallow
613
- * copy is used, array values may be mutated without additional calls to
614
- * various header-related HTTP module methods. The keys of the returned
615
- * object are the header names and the values are the respective header
616
- * values. All header names are lowercase.
617
- *
618
- * The object returned by the `outgoingMessage.getHeaders()` method does
619
- * not prototypically inherit from the JavaScript Object. This means that
620
- * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`,
621
- * and others are not defined and will not work.
622
- *
623
- * ```js
624
- * outgoingMessage.setHeader('Foo', 'bar');
625
- * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
626
- *
627
- * const headers = outgoingMessage.getHeaders();
628
- * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
629
- * ```
630
- * @since v7.7.0
631
- */
632
- getHeaders(): OutgoingHttpHeaders;
633
- /**
634
- * Returns an array of names of headers of the outgoing outgoingMessage. All
635
- * names are lowercase.
636
- * @since v7.7.0
637
- */
638
- getHeaderNames(): string[];
639
- /**
640
- * Returns `true` if the header identified by `name` is currently set in the
641
- * outgoing headers. The header name is case-insensitive.
642
- *
643
- * ```js
644
- * const hasContentType = outgoingMessage.hasHeader('content-type');
645
- * ```
646
- * @since v7.7.0
647
- */
648
- hasHeader(name: string): boolean;
649
- /**
650
- * Removes a header that is queued for implicit sending.
651
- *
652
- * ```js
653
- * outgoingMessage.removeHeader('Content-Encoding');
654
- * ```
655
- * @since v0.4.0
656
- * @param name Header name
657
- */
658
- removeHeader(name: string): void;
659
- /**
660
- * Adds HTTP trailers (headers but at the end of the message) to the message.
661
- *
662
- * Trailers are **only** be emitted if the message is chunked encoded. If not,
663
- * the trailer will be silently discarded.
664
- *
665
- * HTTP requires the `Trailer` header to be sent to emit trailers,
666
- * with a list of header fields in its value, e.g.
667
- *
668
- * ```js
669
- * message.writeHead(200, { 'Content-Type': 'text/plain',
670
- * 'Trailer': 'Content-MD5' });
671
- * message.write(fileData);
672
- * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
673
- * message.end();
674
- * ```
675
- *
676
- * Attempting to set a header field name or value that contains invalid characters
677
- * will result in a `TypeError` being thrown.
678
- * @since v0.3.0
679
- */
680
- addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
681
- /**
682
- * Compulsorily flushes the message headers
683
- *
684
- * For efficiency reason, Node.js normally buffers the message headers
685
- * until `outgoingMessage.end()` is called or the first chunk of message data
686
- * is written. It then tries to pack the headers and data into a single TCP
687
- * packet.
688
- *
689
- * It is usually desired (it saves a TCP round-trip), but not when the first
690
- * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request.
691
- * @since v1.6.0
692
- */
693
- flushHeaders(): void;
694
- }
695
- /**
696
- * This object is created internally by an HTTP server, not by the user. It is
697
- * passed as the second parameter to the `'request'` event.
698
- * @since v0.1.17
699
- */
700
- class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
701
- /**
702
- * When using implicit headers (not calling `response.writeHead()` explicitly),
703
- * this property controls the status code that will be sent to the client when
704
- * the headers get flushed.
705
- *
706
- * ```js
707
- * response.statusCode = 404;
708
- * ```
709
- *
710
- * After response header was sent to the client, this property indicates the
711
- * status code which was sent out.
712
- * @since v0.4.0
713
- */
714
- statusCode: number;
715
- /**
716
- * When using implicit headers (not calling `response.writeHead()` explicitly),
717
- * this property controls the status message that will be sent to the client when
718
- * the headers get flushed. If this is left as `undefined` then the standard
719
- * message for the status code will be used.
720
- *
721
- * ```js
722
- * response.statusMessage = 'Not found';
723
- * ```
724
- *
725
- * After response header was sent to the client, this property indicates the
726
- * status message which was sent out.
727
- * @since v0.11.8
728
- */
729
- statusMessage: string;
730
- /**
731
- * If set to `true`, Node.js will check whether the `Content-Length` header value
732
- * and the size of the body, in bytes, are equal. Mismatching the
733
- * `Content-Length` header value will result in an `Error` being thrown,
734
- * identified by `code: 'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
735
- * @since v18.10.0, v16.18.0
736
- */
737
- strictContentLength: boolean;
738
- constructor(req: Request);
739
- assignSocket(socket: Socket): void;
740
- detachSocket(socket: Socket): void;
741
- /**
742
- * Sends an HTTP/1.1 100 Continue message to the client, indicating that
743
- * the request body should be sent. See the `'checkContinue'` event on`Server`.
744
- * @since v0.3.0
745
- */
746
- writeContinue(callback?: () => void): void;
747
- /**
748
- * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
749
- * indicating that the user agent can preload/preconnect the linked resources.
750
- * The `hints` is an object containing the values of headers to be sent with
751
- * early hints message. The optional `callback` argument will be called when
752
- * the response message has been written.
753
- *
754
- * Example:
755
- *
756
- * ```js
757
- * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
758
- * response.writeEarlyHints({
759
- * 'link': earlyHintsLink,
760
- * });
761
- *
762
- * const earlyHintsLinks = [
763
- * '</styles.css>; rel=preload; as=style',
764
- * '</scripts.js>; rel=preload; as=script',
765
- * ];
766
- * response.writeEarlyHints({
767
- * 'link': earlyHintsLinks,
768
- * 'x-trace-id': 'id for diagnostics'
769
- * });
770
- *
771
- * const earlyHintsCallback = () => console.log('early hints message sent');
772
- * response.writeEarlyHints({
773
- * 'link': earlyHintsLinks
774
- * }, earlyHintsCallback);
775
- * ```
776
- *
777
- * @since v18.11.0
778
- * @param hints An object containing the values of headers
779
- * @param callback Will be called when the response message has been written
780
- */
781
- writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
782
- /**
783
- * Sends a response header to the request. The status code is a 3-digit HTTP
784
- * status code, like `404`. The last argument, `headers`, are the response headers.
785
- * Optionally one can give a human-readable `statusMessage` as the second
786
- * argument.
787
- *
788
- * `headers` may be an `Array` where the keys and values are in the same list.
789
- * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
790
- * and the odd-numbered offsets are the associated values. The array is in the same
791
- * format as `request.rawHeaders`.
792
- *
793
- * Returns a reference to the `ServerResponse`, so that calls can be chained.
794
- *
795
- * ```js
796
- * const body = 'hello world';
797
- * response
798
- * .writeHead(200, {
799
- * 'Content-Length': Buffer.byteLength(body),
800
- * 'Content-Type': 'text/plain'
801
- * })
802
- * .end(body);
803
- * ```
804
- *
805
- * This method must only be called once on a message and it must
806
- * be called before `response.end()` is called.
807
- *
808
- * If `response.write()` or `response.end()` are called before calling
809
- * this, the implicit/mutable headers will be calculated and call this function.
810
- *
811
- * When headers have been set with `response.setHeader()`, they will be merged
812
- * with any headers passed to `response.writeHead()`, with the headers passed
813
- * to `response.writeHead()` given precedence.
814
- *
815
- * If this method is called and `response.setHeader()` has not been called,
816
- * it will directly write the supplied header values onto the network channel
817
- * without caching internally, and the `response.getHeader()` on the header
818
- * will not yield the expected result. If progressive population of headers is
819
- * desired with potential future retrieval and modification, use `response.setHeader()` instead.
820
- *
821
- * ```js
822
- * // Returns content-type = text/plain
823
- * const server = http.createServer((req, res) => {
824
- * res.setHeader('Content-Type', 'text/html');
825
- * res.setHeader('X-Foo', 'bar');
826
- * res.writeHead(200, { 'Content-Type': 'text/plain' });
827
- * res.end('ok');
828
- * });
829
- * ```
830
- *
831
- * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
832
- * does not check whether `Content-Length` and the length of the body which has
833
- * been transmitted are equal or not.
834
- *
835
- * Attempting to set a header field name or value that contains invalid characters
836
- * will result in a `TypeError` being thrown.
837
- * @since v0.1.30
838
- */
839
- writeHead(
840
- statusCode: number,
841
- statusMessage?: string,
842
- headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
843
- ): this;
844
- writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
845
- /**
846
- * Sends an HTTP/1.1 102 Processing message to the client, indicating that
847
- * the request body should be sent.
848
- * @since v10.0.0
849
- */
850
- writeProcessing(): void;
851
- }
852
- interface InformationEvent {
853
- statusCode: number;
854
- statusMessage: string;
855
- httpVersion: string;
856
- httpVersionMajor: number;
857
- httpVersionMinor: number;
858
- headers: IncomingHttpHeaders;
859
- rawHeaders: string[];
860
- }
861
- /**
862
- * This object is created internally and returned from {@link request}. It
863
- * represents an _in-progress_ request whose header has already been queued. The
864
- * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will
865
- * be sent along with the first data chunk or when calling `request.end()`.
866
- *
867
- * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response
868
- * headers have been received. The `'response'` event is executed with one
869
- * argument which is an instance of {@link IncomingMessage}.
870
- *
871
- * During the `'response'` event, one can add listeners to the
872
- * response object; particularly to listen for the `'data'` event.
873
- *
874
- * If no `'response'` handler is added, then the response will be
875
- * entirely discarded. However, if a `'response'` event handler is added,
876
- * then the data from the response object **must** be consumed, either by
877
- * calling `response.read()` whenever there is a `'readable'` event, or
878
- * by adding a `'data'` handler, or by calling the `.resume()` method.
879
- * Until the data is consumed, the `'end'` event will not fire. Also, until
880
- * the data is read it will consume memory that can eventually lead to a
881
- * 'process out of memory' error.
882
- *
883
- * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered.
884
- *
885
- * Node.js does not check whether Content-Length and the length of the
886
- * body which has been transmitted are equal or not.
887
- * @since v0.1.17
888
- */
889
- class ClientRequest extends OutgoingMessage {
890
- /**
891
- * The `request.aborted` property will be `true` if the request has
892
- * been aborted.
893
- * @since v0.11.14
894
- * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
895
- */
896
- aborted: boolean;
897
- /**
898
- * The request host.
899
- * @since v14.5.0, v12.19.0
900
- */
901
- host: string;
902
- /**
903
- * The request protocol.
904
- * @since v14.5.0, v12.19.0
905
- */
906
- protocol: string;
907
- /**
908
- * When sending request through a keep-alive enabled agent, the underlying socket
909
- * might be reused. But if server closes connection at unfortunate time, client
910
- * may run into a 'ECONNRESET' error.
911
- *
912
- * ```js
913
- * const http = require('http');
914
- *
915
- * // Server has a 5 seconds keep-alive timeout by default
916
- * http
917
- * .createServer((req, res) => {
918
- * res.write('hello\n');
919
- * res.end();
920
- * })
921
- * .listen(3000);
922
- *
923
- * setInterval(() => {
924
- * // Adapting a keep-alive agent
925
- * http.get('http://localhost:3000', { agent }, (res) => {
926
- * res.on('data', (data) => {
927
- * // Do nothing
928
- * });
929
- * });
930
- * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
931
- * ```
932
- *
933
- * By marking a request whether it reused socket or not, we can do
934
- * automatic error retry base on it.
935
- *
936
- * ```js
937
- * const http = require('http');
938
- * const agent = new http.Agent({ keepAlive: true });
939
- *
940
- * function retriableRequest() {
941
- * const req = http
942
- * .get('http://localhost:3000', { agent }, (res) => {
943
- * // ...
944
- * })
945
- * .on('error', (err) => {
946
- * // Check if retry is needed
947
- * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
948
- * retriableRequest();
949
- * }
950
- * });
951
- * }
952
- *
953
- * retriableRequest();
954
- * ```
955
- * @since v13.0.0, v12.16.0
956
- */
957
- reusedSocket: boolean;
958
- /**
959
- * Limits maximum response headers count. If set to 0, no limit will be applied.
960
- */
961
- maxHeadersCount: number;
962
- constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
963
- /**
964
- * The request method.
965
- * @since v0.1.97
966
- */
967
- method: string;
968
- /**
969
- * The request path.
970
- * @since v0.4.0
971
- */
972
- path: string;
973
- /**
974
- * Marks the request as aborting. Calling this will cause remaining data
975
- * in the response to be dropped and the socket to be destroyed.
976
- * @since v0.3.8
977
- * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
978
- */
979
- abort(): void;
980
- onSocket(socket: Socket): void;
981
- /**
982
- * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
983
- * @since v0.5.9
984
- * @param timeout Milliseconds before a request times out.
985
- * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
986
- */
987
- setTimeout(timeout: number, callback?: () => void): this;
988
- /**
989
- * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
990
- * @since v0.5.9
991
- */
992
- setNoDelay(noDelay?: boolean): void;
993
- /**
994
- * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
995
- * @since v0.5.9
996
- */
997
- setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
998
- /**
999
- * Returns an array containing the unique names of the current outgoing raw
1000
- * headers. Header names are returned with their exact casing being set.
1001
- *
1002
- * ```js
1003
- * request.setHeader('Foo', 'bar');
1004
- * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
1005
- *
1006
- * const headerNames = request.getRawHeaderNames();
1007
- * // headerNames === ['Foo', 'Set-Cookie']
1008
- * ```
1009
- * @since v15.13.0, v14.17.0
1010
- */
1011
- getRawHeaderNames(): string[];
1012
- /**
1013
- * @deprecated
1014
- */
1015
- addListener(event: "abort", listener: () => void): this;
1016
- addListener(
1017
- event: "connect",
1018
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1019
- ): this;
1020
- addListener(event: "continue", listener: () => void): this;
1021
- addListener(event: "information", listener: (info: InformationEvent) => void): this;
1022
- addListener(event: "response", listener: (response: IncomingMessage) => void): this;
1023
- addListener(event: "socket", listener: (socket: Socket) => void): this;
1024
- addListener(event: "timeout", listener: () => void): this;
1025
- addListener(
1026
- event: "upgrade",
1027
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1028
- ): this;
1029
- addListener(event: "close", listener: () => void): this;
1030
- addListener(event: "drain", listener: () => void): this;
1031
- addListener(event: "error", listener: (err: Error) => void): this;
1032
- addListener(event: "finish", listener: () => void): this;
1033
- addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
1034
- addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1035
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
1036
- /**
1037
- * @deprecated
1038
- */
1039
- on(event: "abort", listener: () => void): this;
1040
- on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
1041
- on(event: "continue", listener: () => void): this;
1042
- on(event: "information", listener: (info: InformationEvent) => void): this;
1043
- on(event: "response", listener: (response: IncomingMessage) => void): this;
1044
- on(event: "socket", listener: (socket: Socket) => void): this;
1045
- on(event: "timeout", listener: () => void): this;
1046
- on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
1047
- on(event: "close", listener: () => void): this;
1048
- on(event: "drain", listener: () => void): this;
1049
- on(event: "error", listener: (err: Error) => void): this;
1050
- on(event: "finish", listener: () => void): this;
1051
- on(event: "pipe", listener: (src: stream.Readable) => void): this;
1052
- on(event: "unpipe", listener: (src: stream.Readable) => void): this;
1053
- on(event: string | symbol, listener: (...args: any[]) => void): this;
1054
- /**
1055
- * @deprecated
1056
- */
1057
- once(event: "abort", listener: () => void): this;
1058
- once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
1059
- once(event: "continue", listener: () => void): this;
1060
- once(event: "information", listener: (info: InformationEvent) => void): this;
1061
- once(event: "response", listener: (response: IncomingMessage) => void): this;
1062
- once(event: "socket", listener: (socket: Socket) => void): this;
1063
- once(event: "timeout", listener: () => void): this;
1064
- once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
1065
- once(event: "close", listener: () => void): this;
1066
- once(event: "drain", listener: () => void): this;
1067
- once(event: "error", listener: (err: Error) => void): this;
1068
- once(event: "finish", listener: () => void): this;
1069
- once(event: "pipe", listener: (src: stream.Readable) => void): this;
1070
- once(event: "unpipe", listener: (src: stream.Readable) => void): this;
1071
- once(event: string | symbol, listener: (...args: any[]) => void): this;
1072
- /**
1073
- * @deprecated
1074
- */
1075
- prependListener(event: "abort", listener: () => void): this;
1076
- prependListener(
1077
- event: "connect",
1078
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1079
- ): this;
1080
- prependListener(event: "continue", listener: () => void): this;
1081
- prependListener(event: "information", listener: (info: InformationEvent) => void): this;
1082
- prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
1083
- prependListener(event: "socket", listener: (socket: Socket) => void): this;
1084
- prependListener(event: "timeout", listener: () => void): this;
1085
- prependListener(
1086
- event: "upgrade",
1087
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1088
- ): this;
1089
- prependListener(event: "close", listener: () => void): this;
1090
- prependListener(event: "drain", listener: () => void): this;
1091
- prependListener(event: "error", listener: (err: Error) => void): this;
1092
- prependListener(event: "finish", listener: () => void): this;
1093
- prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
1094
- prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1095
- prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
1096
- /**
1097
- * @deprecated
1098
- */
1099
- prependOnceListener(event: "abort", listener: () => void): this;
1100
- prependOnceListener(
1101
- event: "connect",
1102
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1103
- ): this;
1104
- prependOnceListener(event: "continue", listener: () => void): this;
1105
- prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
1106
- prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
1107
- prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
1108
- prependOnceListener(event: "timeout", listener: () => void): this;
1109
- prependOnceListener(
1110
- event: "upgrade",
1111
- listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1112
- ): this;
1113
- prependOnceListener(event: "close", listener: () => void): this;
1114
- prependOnceListener(event: "drain", listener: () => void): this;
1115
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
1116
- prependOnceListener(event: "finish", listener: () => void): this;
1117
- prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
1118
- prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1119
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1120
- }
1121
- /**
1122
- * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
1123
- * access response
1124
- * status, headers and data.
1125
- *
1126
- * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
1127
- * parse and emit the incoming HTTP headers and payload, as the underlying socket
1128
- * may be reused multiple times in case of keep-alive.
1129
- * @since v0.1.17
1130
- */
1131
- class IncomingMessage extends stream.Readable {
1132
- constructor(socket: Socket);
1133
- /**
1134
- * The `message.aborted` property will be `true` if the request has
1135
- * been aborted.
1136
- * @since v10.1.0
1137
- * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
1138
- */
1139
- aborted: boolean;
1140
- /**
1141
- * In case of server request, the HTTP version sent by the client. In the case of
1142
- * client response, the HTTP version of the connected-to server.
1143
- * Probably either `'1.1'` or `'1.0'`.
1144
- *
1145
- * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
1146
- * @since v0.1.1
1147
- */
1148
- httpVersion: string;
1149
- httpVersionMajor: number;
1150
- httpVersionMinor: number;
1151
- /**
1152
- * The `message.complete` property will be `true` if a complete HTTP message has
1153
- * been received and successfully parsed.
1154
- *
1155
- * This property is particularly useful as a means of determining if a client or
1156
- * server fully transmitted a message before a connection was terminated:
1157
- *
1158
- * ```js
1159
- * const req = http.request({
1160
- * host: '127.0.0.1',
1161
- * port: 8080,
1162
- * method: 'POST'
1163
- * }, (res) => {
1164
- * res.resume();
1165
- * res.on('end', () => {
1166
- * if (!res.complete)
1167
- * console.error(
1168
- * 'The connection was terminated while the message was still being sent');
1169
- * });
1170
- * });
1171
- * ```
1172
- * @since v0.3.0
1173
- */
1174
- complete: boolean;
1175
- /**
1176
- * Alias for `message.socket`.
1177
- * @since v0.1.90
1178
- * @deprecated Since v16.0.0 - Use `socket`.
1179
- */
1180
- connection: Socket;
1181
- /**
1182
- * The `net.Socket` object associated with the connection.
1183
- *
1184
- * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
1185
- * client's authentication details.
1186
- *
1187
- * This property is guaranteed to be an instance of the `net.Socket` class,
1188
- * a subclass of `stream.Duplex`, unless the user specified a socket
1189
- * type other than `net.Socket` or internally nulled.
1190
- * @since v0.3.0
1191
- */
1192
- socket: Socket;
1193
- /**
1194
- * The request/response headers object.
1195
- *
1196
- * Key-value pairs of header names and values. Header names are lower-cased.
1197
- *
1198
- * ```js
1199
- * // Prints something like:
1200
- * //
1201
- * // { 'user-agent': 'curl/7.22.0',
1202
- * // host: '127.0.0.1:8000',
1203
- * // accept: '*' }
1204
- * console.log(request.getHeaders());
1205
- * ```
1206
- *
1207
- * Duplicates in raw headers are handled in the following ways, depending on the
1208
- * header name:
1209
- *
1210
- * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`,
1211
- * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded.
1212
- * * `set-cookie` is always an array. Duplicates are added to the array.
1213
- * * For duplicate `cookie` headers, the values are joined together with '; '.
1214
- * * For all other headers, the values are joined together with ', '.
1215
- * @since v0.1.5
1216
- */
1217
- headers: IncomingHttpHeaders;
1218
- /**
1219
- * Similar to `message.headers`, but there is no join logic and the values are always arrays of strings, even for headers received just once.
1220
- *
1221
- * ```js
1222
- * // Prints something like:
1223
- * //
1224
- * // { 'user-agent': ['curl/7.22.0'],
1225
- * // host: ['127.0.0.1:8000'],
1226
- * // accept: ['*'] }
1227
- * console.log(request.headersDistinct);
1228
- * ```
1229
- * @since v18.3.0, v16.17.0
1230
- */
1231
- headersDistinct: NodeJS.Dict<string[]>;
1232
- /**
1233
- * The raw request/response headers list exactly as they were received.
1234
- *
1235
- * The keys and values are in the same list. It is _not_ a
1236
- * list of tuples. So, the even-numbered offsets are key values, and the
1237
- * odd-numbered offsets are the associated values.
1238
- *
1239
- * Header names are not lowercased, and duplicates are not merged.
1240
- *
1241
- * ```js
1242
- * // Prints something like:
1243
- * //
1244
- * // [ 'user-agent',
1245
- * // 'this is invalid because there can be only one',
1246
- * // 'User-Agent',
1247
- * // 'curl/7.22.0',
1248
- * // 'Host',
1249
- * // '127.0.0.1:8000',
1250
- * // 'ACCEPT',
1251
- * // '*' ]
1252
- * console.log(request.rawHeaders);
1253
- * ```
1254
- * @since v0.11.6
1255
- */
1256
- rawHeaders: string[];
1257
- /**
1258
- * The request/response trailers object. Only populated at the `'end'` event.
1259
- * @since v0.3.0
1260
- */
1261
- trailers: NodeJS.Dict<string>;
1262
- /**
1263
- * Similar to `message.trailers`, but there is no join logic and the values are always arrays of strings, even for headers received just once.
1264
- * Only populated at the `'end'` event.
1265
- * @since v18.3.0, v16.17.0
1266
- */
1267
- trailersDistinct: NodeJS.Dict<string[]>;
1268
- /**
1269
- * The raw request/response trailer keys and values exactly as they were
1270
- * received. Only populated at the `'end'` event.
1271
- * @since v0.11.6
1272
- */
1273
- rawTrailers: string[];
1274
- /**
1275
- * Calls `message.socket.setTimeout(msecs, callback)`.
1276
- * @since v0.5.9
1277
- */
1278
- setTimeout(msecs: number, callback?: () => void): this;
1279
- /**
1280
- * **Only valid for request obtained from {@link Server}.**
1281
- *
1282
- * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
1283
- * @since v0.1.1
1284
- */
1285
- method?: string | undefined;
1286
- /**
1287
- * **Only valid for request obtained from {@link Server}.**
1288
- *
1289
- * Request URL string. This contains only the URL that is present in the actual
1290
- * HTTP request. Take the following request:
1291
- *
1292
- * ```http
1293
- * GET /status?name=ryan HTTP/1.1
1294
- * Accept: text/plain
1295
- * ```
1296
- *
1297
- * To parse the URL into its parts:
1298
- *
1299
- * ```js
1300
- * new URL(request.url, `http://${request.getHeaders().host}`);
1301
- * ```
1302
- *
1303
- * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`:
1304
- *
1305
- * ```console
1306
- * $ node
1307
- * > new URL(request.url, `http://${request.getHeaders().host}`)
1308
- * URL {
1309
- * href: 'http://localhost:3000/status?name=ryan',
1310
- * origin: 'http://localhost:3000',
1311
- * protocol: 'http:',
1312
- * username: '',
1313
- * password: '',
1314
- * host: 'localhost:3000',
1315
- * hostname: 'localhost',
1316
- * port: '3000',
1317
- * pathname: '/status',
1318
- * search: '?name=ryan',
1319
- * searchParams: URLSearchParams { 'name' => 'ryan' },
1320
- * hash: ''
1321
- * }
1322
- * ```
1323
- * @since v0.1.90
1324
- */
1325
- url?: string | undefined;
1326
- /**
1327
- * **Only valid for response obtained from {@link ClientRequest}.**
1328
- *
1329
- * The 3-digit HTTP response status code. E.G. `404`.
1330
- * @since v0.1.1
1331
- */
1332
- statusCode?: number | undefined;
1333
- /**
1334
- * **Only valid for response obtained from {@link ClientRequest}.**
1335
- *
1336
- * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
1337
- * @since v0.11.10
1338
- */
1339
- statusMessage?: string | undefined;
1340
- /**
1341
- * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed
1342
- * as an argument to any listeners on the event.
1343
- * @since v0.3.0
1344
- */
1345
- destroy(error?: Error): this;
1346
- }
1347
- interface AgentOptions extends Partial<TcpSocketConnectOpts> {
1348
- /**
1349
- * Keep sockets around in a pool to be used by other requests in the future. Default = false
1350
- */
1351
- keepAlive?: boolean | undefined;
1352
- /**
1353
- * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
1354
- * Only relevant if keepAlive is set to true.
1355
- */
1356
- keepAliveMsecs?: number | undefined;
1357
- /**
1358
- * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
1359
- */
1360
- maxSockets?: number | undefined;
1361
- /**
1362
- * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
1363
- */
1364
- maxTotalSockets?: number | undefined;
1365
- /**
1366
- * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
1367
- */
1368
- maxFreeSockets?: number | undefined;
1369
- /**
1370
- * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
1371
- */
1372
- timeout?: number | undefined;
1373
- /**
1374
- * Scheduling strategy to apply when picking the next free socket to use.
1375
- * @default `lifo`
1376
- */
1377
- scheduling?: "fifo" | "lifo" | undefined;
1378
- }
1379
- /**
1380
- * An `Agent` is responsible for managing connection persistence
1381
- * and reuse for HTTP clients. It maintains a queue of pending requests
1382
- * for a given host and port, reusing a single socket connection for each
1383
- * until the queue is empty, at which time the socket is either destroyed
1384
- * or put into a pool where it is kept to be used again for requests to the
1385
- * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`.
1386
- *
1387
- * Pooled connections have TCP Keep-Alive enabled for them, but servers may
1388
- * still close idle connections, in which case they will be removed from the
1389
- * pool and a new connection will be made when a new HTTP request is made for
1390
- * that host and port. Servers may also refuse to allow multiple requests
1391
- * over the same connection, in which case the connection will have to be
1392
- * remade for every request and cannot be pooled. The `Agent` will still make
1393
- * the requests to that server, but each one will occur over a new connection.
1394
- *
1395
- * When a connection is closed by the client or the server, it is removed
1396
- * from the pool. Any unused sockets in the pool will be unrefed so as not
1397
- * to keep the Node.js process running when there are no outstanding requests.
1398
- * (see `socket.unref()`).
1399
- *
1400
- * It is good practice, to `destroy()` an `Agent` instance when it is no
1401
- * longer in use, because unused sockets consume OS resources.
1402
- *
1403
- * Sockets are removed from an agent when the socket emits either
1404
- * a `'close'` event or an `'agentRemove'` event. When intending to keep one
1405
- * HTTP request open for a long time without keeping it in the agent, something
1406
- * like the following may be done:
1407
- *
1408
- * ```js
1409
- * http.get(options, (res) => {
1410
- * // Do stuff
1411
- * }).on('socket', (socket) => {
1412
- * socket.emit('agentRemove');
1413
- * });
1414
- * ```
1415
- *
1416
- * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
1417
- * will be used
1418
- * for the client connection.
1419
- *
1420
- * `agent:false`:
1421
- *
1422
- * ```js
1423
- * http.get({
1424
- * hostname: 'localhost',
1425
- * port: 80,
1426
- * path: '/',
1427
- * agent: false // Create a new agent just for this one request
1428
- * }, (res) => {
1429
- * // Do stuff with response
1430
- * });
1431
- * ```
1432
- * @since v0.3.4
1433
- */
1434
- class Agent extends EventEmitter {
1435
- /**
1436
- * By default set to 256. For agents with `keepAlive` enabled, this
1437
- * sets the maximum number of sockets that will be left open in the free
1438
- * state.
1439
- * @since v0.11.7
1440
- */
1441
- maxFreeSockets: number;
1442
- /**
1443
- * By default set to `Infinity`. Determines how many concurrent sockets the agent
1444
- * can have open per origin. Origin is the returned value of `agent.getName()`.
1445
- * @since v0.3.6
1446
- */
1447
- maxSockets: number;
1448
- /**
1449
- * By default set to `Infinity`. Determines how many concurrent sockets the agent
1450
- * can have open. Unlike `maxSockets`, this parameter applies across all origins.
1451
- * @since v14.5.0, v12.19.0
1452
- */
1453
- maxTotalSockets: number;
1454
- /**
1455
- * An object which contains arrays of sockets currently awaiting use by
1456
- * the agent when `keepAlive` is enabled. Do not modify.
1457
- *
1458
- * Sockets in the `freeSockets` list will be automatically destroyed and
1459
- * removed from the array on `'timeout'`.
1460
- * @since v0.11.4
1461
- */
1462
- readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
1463
- /**
1464
- * An object which contains arrays of sockets currently in use by the
1465
- * agent. Do not modify.
1466
- * @since v0.3.6
1467
- */
1468
- readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
1469
- /**
1470
- * An object which contains queues of requests that have not yet been assigned to
1471
- * sockets. Do not modify.
1472
- * @since v0.5.9
1473
- */
1474
- readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
1475
- constructor(opts?: AgentOptions);
1476
- /**
1477
- * Destroy any sockets that are currently in use by the agent.
1478
- *
1479
- * It is usually not necessary to do this. However, if using an
1480
- * agent with `keepAlive` enabled, then it is best to explicitly shut down
1481
- * the agent when it is no longer needed. Otherwise,
1482
- * sockets might stay open for quite a long time before the server
1483
- * terminates them.
1484
- * @since v0.11.4
1485
- */
1486
- destroy(): void;
1487
- }
1488
- const METHODS: string[];
1489
- const STATUS_CODES: {
1490
- [errorCode: number]: string | undefined;
1491
- [errorCode: string]: string | undefined;
1492
- };
1493
- /**
1494
- * Returns a new instance of {@link Server}.
1495
- *
1496
- * The `requestListener` is a function which is automatically
1497
- * added to the `'request'` event.
1498
- * @since v0.1.13
1499
- */
1500
- function createServer<
1501
- Request extends typeof IncomingMessage = typeof IncomingMessage,
1502
- Response extends typeof ServerResponse = typeof ServerResponse,
1503
- >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
1504
- function createServer<
1505
- Request extends typeof IncomingMessage = typeof IncomingMessage,
1506
- Response extends typeof ServerResponse = typeof ServerResponse,
1507
- >(
1508
- options: ServerOptions<Request, Response>,
1509
- requestListener?: RequestListener<Request, Response>,
1510
- ): Server<Request, Response>;
1511
- // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
1512
- // create interface RequestOptions would make the naming more clear to developers
1513
- interface RequestOptions extends ClientRequestArgs {}
1514
- /**
1515
- * `options` in `socket.connect()` are also supported.
1516
- *
1517
- * Node.js maintains several connections per server to make HTTP requests.
1518
- * This function allows one to transparently issue requests.
1519
- *
1520
- * `url` can be a string or a `URL` object. If `url` is a
1521
- * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
1522
- *
1523
- * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence.
1524
- *
1525
- * The optional `callback` parameter will be added as a one-time listener for
1526
- * the `'response'` event.
1527
- *
1528
- * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
1529
- * upload a file with a POST request, then write to the `ClientRequest` object.
1530
- *
1531
- * ```js
1532
- * const http = require('http');
1533
- *
1534
- * const postData = JSON.stringify({
1535
- * 'msg': 'Hello World!'
1536
- * });
1537
- *
1538
- * const options = {
1539
- * hostname: 'www.google.com',
1540
- * port: 80,
1541
- * path: '/upload',
1542
- * method: 'POST',
1543
- * headers: {
1544
- * 'Content-Type': 'application/json',
1545
- * 'Content-Length': Buffer.byteLength(postData)
1546
- * }
1547
- * };
1548
- *
1549
- * const req = http.request(options, (res) => {
1550
- * console.log(`STATUS: ${res.statusCode}`);
1551
- * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
1552
- * res.setEncoding('utf8');
1553
- * res.on('data', (chunk) => {
1554
- * console.log(`BODY: ${chunk}`);
1555
- * });
1556
- * res.on('end', () => {
1557
- * console.log('No more data in response.');
1558
- * });
1559
- * });
1560
- *
1561
- * req.on('error', (e) => {
1562
- * console.error(`problem with request: ${e.message}`);
1563
- * });
1564
- *
1565
- * // Write data to request body
1566
- * req.write(postData);
1567
- * req.end();
1568
- * ```
1569
- *
1570
- * In the example `req.end()` was called. With `http.request()` one
1571
- * must always call `req.end()` to signify the end of the request -
1572
- * even if there is no data being written to the request body.
1573
- *
1574
- * If any error is encountered during the request (be that with DNS resolution,
1575
- * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
1576
- * on the returned request object. As with all `'error'` events, if no listeners
1577
- * are registered the error will be thrown.
1578
- *
1579
- * There are a few special headers that should be noted.
1580
- *
1581
- * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
1582
- * the server should be persisted until the next request.
1583
- * * Sending a 'Content-Length' header will disable the default chunked encoding.
1584
- * * Sending an 'Expect' header will immediately send the request headers.
1585
- * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
1586
- * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
1587
- * information.
1588
- * * Sending an Authorization header will override using the `auth` option
1589
- * to compute basic authentication.
1590
- *
1591
- * Example using a `URL` as `options`:
1592
- *
1593
- * ```js
1594
- * const options = new URL('http://abc:xyz@example.com');
1595
- *
1596
- * const req = http.request(options, (res) => {
1597
- * // ...
1598
- * });
1599
- * ```
1600
- *
1601
- * In a successful request, the following events will be emitted in the following
1602
- * order:
1603
- *
1604
- * * `'socket'`
1605
- * * `'response'`
1606
- * * `'data'` any number of times, on the `res` object
1607
- * (`'data'` will not be emitted at all if the response body is empty, for
1608
- * instance, in most redirects)
1609
- * * `'end'` on the `res` object
1610
- * * `'close'`
1611
- *
1612
- * In the case of a connection error, the following events will be emitted:
1613
- *
1614
- * * `'socket'`
1615
- * * `'error'`
1616
- * * `'close'`
1617
- *
1618
- * In the case of a premature connection close before the response is received,
1619
- * the following events will be emitted in the following order:
1620
- *
1621
- * * `'socket'`
1622
- * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
1623
- * * `'close'`
1624
- *
1625
- * In the case of a premature connection close after the response is received,
1626
- * the following events will be emitted in the following order:
1627
- *
1628
- * * `'socket'`
1629
- * * `'response'`
1630
- * * `'data'` any number of times, on the `res` object
1631
- * * (connection closed here)
1632
- * * `'aborted'` on the `res` object
1633
- * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
1634
- * * `'close'`
1635
- * * `'close'` on the `res` object
1636
- *
1637
- * If `req.destroy()` is called before a socket is assigned, the following
1638
- * events will be emitted in the following order:
1639
- *
1640
- * * (`req.destroy()` called here)
1641
- * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
1642
- * * `'close'`
1643
- *
1644
- * If `req.destroy()` is called before the connection succeeds, the following
1645
- * events will be emitted in the following order:
1646
- *
1647
- * * `'socket'`
1648
- * * (`req.destroy()` called here)
1649
- * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
1650
- * * `'close'`
1651
- *
1652
- * If `req.destroy()` is called after the response is received, the following
1653
- * events will be emitted in the following order:
1654
- *
1655
- * * `'socket'`
1656
- * * `'response'`
1657
- * * `'data'` any number of times, on the `res` object
1658
- * * (`req.destroy()` called here)
1659
- * * `'aborted'` on the `res` object
1660
- * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
1661
- * * `'close'`
1662
- * * `'close'` on the `res` object
1663
- *
1664
- * If `req.abort()` is called before a socket is assigned, the following
1665
- * events will be emitted in the following order:
1666
- *
1667
- * * (`req.abort()` called here)
1668
- * * `'abort'`
1669
- * * `'close'`
1670
- *
1671
- * If `req.abort()` is called before the connection succeeds, the following
1672
- * events will be emitted in the following order:
1673
- *
1674
- * * `'socket'`
1675
- * * (`req.abort()` called here)
1676
- * * `'abort'`
1677
- * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
1678
- * * `'close'`
1679
- *
1680
- * If `req.abort()` is called after the response is received, the following
1681
- * events will be emitted in the following order:
1682
- *
1683
- * * `'socket'`
1684
- * * `'response'`
1685
- * * `'data'` any number of times, on the `res` object
1686
- * * (`req.abort()` called here)
1687
- * * `'abort'`
1688
- * * `'aborted'` on the `res` object
1689
- * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
1690
- * * `'close'`
1691
- * * `'close'` on the `res` object
1692
- *
1693
- * Setting the `timeout` option or using the `setTimeout()` function will
1694
- * not abort the request or do anything besides add a `'timeout'` event.
1695
- *
1696
- * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the
1697
- * request itself.
1698
- * @since v0.3.6
1699
- */
1700
- function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
1701
- function request(
1702
- url: string | URL,
1703
- options: RequestOptions,
1704
- callback?: (res: IncomingMessage) => void,
1705
- ): ClientRequest;
1706
- /**
1707
- * Since most requests are GET requests without bodies, Node.js provides this
1708
- * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the
1709
- * response
1710
- * data for reasons stated in {@link ClientRequest} section.
1711
- *
1712
- * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
1713
- *
1714
- * JSON fetching example:
1715
- *
1716
- * ```js
1717
- * http.get('http://localhost:8000/', (res) => {
1718
- * const { statusCode } = res;
1719
- * const contentType = res.headers['content-type'];
1720
- *
1721
- * let error;
1722
- * // Any 2xx status code signals a successful response but
1723
- * // here we're only checking for 200.
1724
- * if (statusCode !== 200) {
1725
- * error = new Error('Request Failed.\n' +
1726
- * `Status Code: ${statusCode}`);
1727
- * } else if (!/^application\/json/.test(contentType)) {
1728
- * error = new Error('Invalid content-type.\n' +
1729
- * `Expected application/json but received ${contentType}`);
1730
- * }
1731
- * if (error) {
1732
- * console.error(error.message);
1733
- * // Consume response data to free up memory
1734
- * res.resume();
1735
- * return;
1736
- * }
1737
- *
1738
- * res.setEncoding('utf8');
1739
- * let rawData = '';
1740
- * res.on('data', (chunk) => { rawData += chunk; });
1741
- * res.on('end', () => {
1742
- * try {
1743
- * const parsedData = JSON.parse(rawData);
1744
- * console.log(parsedData);
1745
- * } catch (e) {
1746
- * console.error(e.message);
1747
- * }
1748
- * });
1749
- * }).on('error', (e) => {
1750
- * console.error(`Got error: ${e.message}`);
1751
- * });
1752
- *
1753
- * // Create a local server to receive data from
1754
- * const server = http.createServer((req, res) => {
1755
- * res.writeHead(200, { 'Content-Type': 'application/json' });
1756
- * res.end(JSON.stringify({
1757
- * data: 'Hello World!'
1758
- * }));
1759
- * });
1760
- *
1761
- * server.listen(8000);
1762
- * ```
1763
- * @since v0.3.6
1764
- * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored.
1765
- */
1766
- function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
1767
- function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
1768
-
1769
- /**
1770
- * Performs the low-level validations on the provided name that are done when `res.setHeader(name, value)` is called.
1771
- * Passing illegal value as name will result in a TypeError being thrown, identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
1772
- * @param name Header name
1773
- * @since v14.3.0
1774
- */
1775
- function validateHeaderName(name: string): void;
1776
- /**
1777
- * Performs the low-level validations on the provided value that are done when `res.setHeader(name, value)` is called.
1778
- * Passing illegal value as value will result in a TypeError being thrown.
1779
- * - Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
1780
- * - Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
1781
- * @param name Header name
1782
- * @param value Header value
1783
- * @since v14.3.0
1784
- */
1785
- function validateHeaderValue(name: string, value: string): void;
1786
-
1787
- /**
1788
- * Set the maximum number of idle HTTP parsers. Default: 1000.
1789
- * @param count
1790
- * @since v18.8.0, v16.18.0
1791
- */
1792
- function setMaxIdleHTTPParsers(count: number): void;
1793
-
1794
- let globalAgent: Agent;
1795
- /**
1796
- * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
1797
- * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
1798
- */
1799
- const maxHeaderSize: number;
1800
- }
1801
- declare module "node:http" {
1802
- export * from "http";
1803
- }