modelmix 2.5.8 → 2.6.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 (594) hide show
  1. package/README.md +37 -4
  2. package/demo/demo.mjs +1 -1
  3. package/demo/lmstudio.mjs +1 -1
  4. package/demo/parallel.mjs +22 -21
  5. package/index.js +31 -7
  6. package/package.json +5 -4
  7. package/demo/node_modules/.package-lock.json +0 -254
  8. package/demo/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -859
  9. package/demo/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
  10. package/demo/node_modules/@anthropic-ai/sdk/README.md +0 -424
  11. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts +0 -9
  12. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts.map +0 -1
  13. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js +0 -16
  14. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js.map +0 -1
  15. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs +0 -12
  16. package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs.map +0 -1
  17. package/demo/node_modules/@anthropic-ai/sdk/_shims/README.md +0 -46
  18. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts +0 -5
  19. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts.map +0 -1
  20. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js +0 -21
  21. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js.map +0 -1
  22. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs +0 -2
  23. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs.map +0 -1
  24. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts +0 -5
  25. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts.map +0 -1
  26. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js +0 -21
  27. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js.map +0 -1
  28. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs +0 -2
  29. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs.map +0 -1
  30. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts +0 -5
  31. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts.map +0 -1
  32. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js +0 -21
  33. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js.map +0 -1
  34. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs +0 -2
  35. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs.map +0 -1
  36. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts +0 -5
  37. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts.map +0 -1
  38. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js +0 -21
  39. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js.map +0 -1
  40. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs +0 -2
  41. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs.map +0 -1
  42. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.d.ts +0 -101
  43. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.js +0 -3
  44. package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.mjs +0 -3
  45. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts +0 -6
  46. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts.map +0 -1
  47. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js +0 -14
  48. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js.map +0 -1
  49. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs +0 -10
  50. package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs.map +0 -1
  51. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.d.ts +0 -81
  52. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.js +0 -13
  53. package/demo/node_modules/@anthropic-ai/sdk/_shims/index.mjs +0 -7
  54. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.d.ts +0 -12
  55. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.js +0 -3
  56. package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.mjs +0 -3
  57. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts +0 -3
  58. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts.map +0 -1
  59. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js +0 -90
  60. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js.map +0 -1
  61. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs +0 -56
  62. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs.map +0 -1
  63. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.d.ts +0 -42
  64. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.js +0 -3
  65. package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.mjs +0 -3
  66. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts +0 -37
  67. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts.map +0 -1
  68. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js +0 -41
  69. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js.map +0 -1
  70. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs +0 -37
  71. package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs.map +0 -1
  72. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts +0 -5
  73. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts.map +0 -1
  74. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js +0 -78
  75. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js.map +0 -1
  76. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs +0 -71
  77. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs.map +0 -1
  78. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.d.ts +0 -83
  79. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.js +0 -3
  80. package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.mjs +0 -3
  81. package/demo/node_modules/@anthropic-ai/sdk/core.d.ts +0 -239
  82. package/demo/node_modules/@anthropic-ai/sdk/core.d.ts.map +0 -1
  83. package/demo/node_modules/@anthropic-ai/sdk/core.js +0 -879
  84. package/demo/node_modules/@anthropic-ai/sdk/core.js.map +0 -1
  85. package/demo/node_modules/@anthropic-ai/sdk/core.mjs +0 -848
  86. package/demo/node_modules/@anthropic-ai/sdk/core.mjs.map +0 -1
  87. package/demo/node_modules/@anthropic-ai/sdk/error.d.ts +0 -53
  88. package/demo/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
  89. package/demo/node_modules/@anthropic-ai/sdk/error.js +0 -143
  90. package/demo/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
  91. package/demo/node_modules/@anthropic-ai/sdk/error.mjs +0 -127
  92. package/demo/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
  93. package/demo/node_modules/@anthropic-ai/sdk/index.d.mts +0 -147
  94. package/demo/node_modules/@anthropic-ai/sdk/index.d.ts +0 -147
  95. package/demo/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
  96. package/demo/node_modules/@anthropic-ai/sdk/index.js +0 -149
  97. package/demo/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
  98. package/demo/node_modules/@anthropic-ai/sdk/index.mjs +0 -121
  99. package/demo/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
  100. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -94
  101. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
  102. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -436
  103. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
  104. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -432
  105. package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
  106. package/demo/node_modules/@anthropic-ai/sdk/package.json +0 -104
  107. package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -6
  108. package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
  109. package/demo/node_modules/@anthropic-ai/sdk/resource.js +0 -11
  110. package/demo/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
  111. package/demo/node_modules/@anthropic-ai/sdk/resource.mjs +0 -7
  112. package/demo/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
  113. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -9
  114. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
  115. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -40
  116. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
  117. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -13
  118. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
  119. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -3
  120. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
  121. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -9
  122. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
  123. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -4
  124. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
  125. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts +0 -3
  126. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts.map +0 -1
  127. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js +0 -9
  128. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js.map +0 -1
  129. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs +0 -4
  130. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs.map +0 -1
  131. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts +0 -462
  132. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts.map +0 -1
  133. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js +0 -20
  134. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js.map +0 -1
  135. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs +0 -16
  136. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs.map +0 -1
  137. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts +0 -19
  138. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts.map +0 -1
  139. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js +0 -40
  140. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js.map +0 -1
  141. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs +0 -13
  142. package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs.map +0 -1
  143. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -184
  144. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
  145. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -19
  146. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
  147. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -15
  148. package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
  149. package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -4
  150. package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
  151. package/demo/node_modules/@anthropic-ai/sdk/resources/index.js +0 -11
  152. package/demo/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
  153. package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -5
  154. package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
  155. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -619
  156. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
  157. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -28
  158. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
  159. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -23
  160. package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
  161. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
  162. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
  163. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
  164. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
  165. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
  166. package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
  167. package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts +0 -29
  168. package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts.map +0 -1
  169. package/demo/node_modules/@anthropic-ai/sdk/shims/node.js +0 -31
  170. package/demo/node_modules/@anthropic-ai/sdk/shims/node.js.map +0 -1
  171. package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs +0 -5
  172. package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs.map +0 -1
  173. package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts +0 -26
  174. package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts.map +0 -1
  175. package/demo/node_modules/@anthropic-ai/sdk/shims/web.js +0 -31
  176. package/demo/node_modules/@anthropic-ai/sdk/shims/web.js.map +0 -1
  177. package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs +0 -5
  178. package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs.map +0 -1
  179. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/MultipartBody.ts +0 -9
  180. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/README.md +0 -46
  181. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-bun.ts +0 -4
  182. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-node.ts +0 -4
  183. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime.ts +0 -4
  184. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types-node.ts +0 -4
  185. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.d.ts +0 -101
  186. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.js +0 -3
  187. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.mjs +0 -3
  188. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/bun-runtime.ts +0 -14
  189. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.d.ts +0 -81
  190. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.js +0 -13
  191. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.mjs +0 -7
  192. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.d.ts +0 -12
  193. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.js +0 -3
  194. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.mjs +0 -3
  195. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-runtime.ts +0 -83
  196. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.d.ts +0 -42
  197. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.js +0 -3
  198. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.mjs +0 -3
  199. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/registry.ts +0 -67
  200. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-runtime.ts +0 -103
  201. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.d.ts +0 -83
  202. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.js +0 -3
  203. package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.mjs +0 -3
  204. package/demo/node_modules/@anthropic-ai/sdk/src/core.ts +0 -1162
  205. package/demo/node_modules/@anthropic-ai/sdk/src/error.ts +0 -146
  206. package/demo/node_modules/@anthropic-ai/sdk/src/index.ts +0 -264
  207. package/demo/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
  208. package/demo/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -535
  209. package/demo/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -11
  210. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -12
  211. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -4
  212. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/index.ts +0 -16
  213. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/messages.ts +0 -531
  214. package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/tools.ts +0 -22
  215. package/demo/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -223
  216. package/demo/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -33
  217. package/demo/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -729
  218. package/demo/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
  219. package/demo/node_modules/@anthropic-ai/sdk/src/shims/node.ts +0 -50
  220. package/demo/node_modules/@anthropic-ai/sdk/src/shims/web.ts +0 -50
  221. package/demo/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -509
  222. package/demo/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
  223. package/demo/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -248
  224. package/demo/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
  225. package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -41
  226. package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
  227. package/demo/node_modules/@anthropic-ai/sdk/streaming.js +0 -431
  228. package/demo/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
  229. package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -424
  230. package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
  231. package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -75
  232. package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
  233. package/demo/node_modules/@anthropic-ai/sdk/uploads.js +0 -165
  234. package/demo/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
  235. package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -152
  236. package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
  237. package/demo/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  238. package/demo/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
  239. package/demo/node_modules/@anthropic-ai/sdk/version.js +0 -5
  240. package/demo/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
  241. package/demo/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
  242. package/demo/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
  243. package/demo/node_modules/@types/node/LICENSE +0 -21
  244. package/demo/node_modules/@types/node/README.md +0 -15
  245. package/demo/node_modules/@types/node/assert/strict.d.ts +0 -8
  246. package/demo/node_modules/@types/node/assert.d.ts +0 -985
  247. package/demo/node_modules/@types/node/async_hooks.d.ts +0 -522
  248. package/demo/node_modules/@types/node/buffer.d.ts +0 -2353
  249. package/demo/node_modules/@types/node/child_process.d.ts +0 -1544
  250. package/demo/node_modules/@types/node/cluster.d.ts +0 -578
  251. package/demo/node_modules/@types/node/console.d.ts +0 -452
  252. package/demo/node_modules/@types/node/constants.d.ts +0 -19
  253. package/demo/node_modules/@types/node/crypto.d.ts +0 -4457
  254. package/demo/node_modules/@types/node/dgram.d.ts +0 -596
  255. package/demo/node_modules/@types/node/diagnostics_channel.d.ts +0 -546
  256. package/demo/node_modules/@types/node/dns/promises.d.ts +0 -473
  257. package/demo/node_modules/@types/node/dns.d.ts +0 -853
  258. package/demo/node_modules/@types/node/dom-events.d.ts +0 -124
  259. package/demo/node_modules/@types/node/domain.d.ts +0 -170
  260. package/demo/node_modules/@types/node/events.d.ts +0 -819
  261. package/demo/node_modules/@types/node/fs/promises.d.ts +0 -1205
  262. package/demo/node_modules/@types/node/fs.d.ts +0 -4237
  263. package/demo/node_modules/@types/node/globals.d.ts +0 -377
  264. package/demo/node_modules/@types/node/globals.global.d.ts +0 -1
  265. package/demo/node_modules/@types/node/http.d.ts +0 -1803
  266. package/demo/node_modules/@types/node/http2.d.ts +0 -2392
  267. package/demo/node_modules/@types/node/https.d.ts +0 -544
  268. package/demo/node_modules/@types/node/index.d.ts +0 -88
  269. package/demo/node_modules/@types/node/inspector.d.ts +0 -2738
  270. package/demo/node_modules/@types/node/module.d.ts +0 -298
  271. package/demo/node_modules/@types/node/net.d.ts +0 -918
  272. package/demo/node_modules/@types/node/os.d.ts +0 -473
  273. package/demo/node_modules/@types/node/package.json +0 -222
  274. package/demo/node_modules/@types/node/path.d.ts +0 -191
  275. package/demo/node_modules/@types/node/perf_hooks.d.ts +0 -626
  276. package/demo/node_modules/@types/node/process.d.ts +0 -1548
  277. package/demo/node_modules/@types/node/punycode.d.ts +0 -117
  278. package/demo/node_modules/@types/node/querystring.d.ts +0 -141
  279. package/demo/node_modules/@types/node/readline/promises.d.ts +0 -143
  280. package/demo/node_modules/@types/node/readline.d.ts +0 -666
  281. package/demo/node_modules/@types/node/repl.d.ts +0 -430
  282. package/demo/node_modules/@types/node/stream/consumers.d.ts +0 -12
  283. package/demo/node_modules/@types/node/stream/promises.d.ts +0 -83
  284. package/demo/node_modules/@types/node/stream/web.d.ts +0 -352
  285. package/demo/node_modules/@types/node/stream.d.ts +0 -1731
  286. package/demo/node_modules/@types/node/string_decoder.d.ts +0 -67
  287. package/demo/node_modules/@types/node/test.d.ts +0 -1113
  288. package/demo/node_modules/@types/node/timers/promises.d.ts +0 -93
  289. package/demo/node_modules/@types/node/timers.d.ts +0 -126
  290. package/demo/node_modules/@types/node/tls.d.ts +0 -1203
  291. package/demo/node_modules/@types/node/trace_events.d.ts +0 -171
  292. package/demo/node_modules/@types/node/tty.d.ts +0 -206
  293. package/demo/node_modules/@types/node/url.d.ts +0 -954
  294. package/demo/node_modules/@types/node/util.d.ts +0 -2075
  295. package/demo/node_modules/@types/node/v8.d.ts +0 -753
  296. package/demo/node_modules/@types/node/vm.d.ts +0 -667
  297. package/demo/node_modules/@types/node/wasi.d.ts +0 -160
  298. package/demo/node_modules/@types/node/worker_threads.d.ts +0 -692
  299. package/demo/node_modules/@types/node/zlib.d.ts +0 -517
  300. package/demo/node_modules/@types/node-fetch/LICENSE +0 -21
  301. package/demo/node_modules/@types/node-fetch/README.md +0 -15
  302. package/demo/node_modules/@types/node-fetch/externals.d.ts +0 -32
  303. package/demo/node_modules/@types/node-fetch/index.d.ts +0 -238
  304. package/demo/node_modules/@types/node-fetch/package.json +0 -83
  305. package/demo/node_modules/abort-controller/LICENSE +0 -21
  306. package/demo/node_modules/abort-controller/README.md +0 -98
  307. package/demo/node_modules/abort-controller/browser.js +0 -13
  308. package/demo/node_modules/abort-controller/browser.mjs +0 -11
  309. package/demo/node_modules/abort-controller/package.json +0 -97
  310. package/demo/node_modules/abort-controller/polyfill.js +0 -21
  311. package/demo/node_modules/abort-controller/polyfill.mjs +0 -19
  312. package/demo/node_modules/agentkeepalive/History.md +0 -268
  313. package/demo/node_modules/agentkeepalive/LICENSE +0 -23
  314. package/demo/node_modules/agentkeepalive/README.md +0 -256
  315. package/demo/node_modules/agentkeepalive/browser.js +0 -5
  316. package/demo/node_modules/agentkeepalive/index.d.ts +0 -65
  317. package/demo/node_modules/agentkeepalive/index.js +0 -5
  318. package/demo/node_modules/agentkeepalive/lib/agent.js +0 -402
  319. package/demo/node_modules/agentkeepalive/lib/constants.js +0 -14
  320. package/demo/node_modules/agentkeepalive/lib/https_agent.js +0 -51
  321. package/demo/node_modules/agentkeepalive/package.json +0 -56
  322. package/demo/node_modules/asynckit/LICENSE +0 -21
  323. package/demo/node_modules/asynckit/README.md +0 -233
  324. package/demo/node_modules/asynckit/bench.js +0 -76
  325. package/demo/node_modules/asynckit/index.js +0 -6
  326. package/demo/node_modules/asynckit/lib/abort.js +0 -29
  327. package/demo/node_modules/asynckit/lib/async.js +0 -34
  328. package/demo/node_modules/asynckit/lib/defer.js +0 -26
  329. package/demo/node_modules/asynckit/lib/iterate.js +0 -75
  330. package/demo/node_modules/asynckit/lib/readable_asynckit.js +0 -91
  331. package/demo/node_modules/asynckit/lib/readable_parallel.js +0 -25
  332. package/demo/node_modules/asynckit/lib/readable_serial.js +0 -25
  333. package/demo/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
  334. package/demo/node_modules/asynckit/lib/state.js +0 -37
  335. package/demo/node_modules/asynckit/lib/streamify.js +0 -141
  336. package/demo/node_modules/asynckit/lib/terminator.js +0 -29
  337. package/demo/node_modules/asynckit/package.json +0 -63
  338. package/demo/node_modules/asynckit/parallel.js +0 -43
  339. package/demo/node_modules/asynckit/serial.js +0 -17
  340. package/demo/node_modules/asynckit/serialOrdered.js +0 -75
  341. package/demo/node_modules/asynckit/stream.js +0 -21
  342. package/demo/node_modules/combined-stream/License +0 -19
  343. package/demo/node_modules/combined-stream/Readme.md +0 -138
  344. package/demo/node_modules/combined-stream/lib/combined_stream.js +0 -208
  345. package/demo/node_modules/combined-stream/package.json +0 -25
  346. package/demo/node_modules/combined-stream/yarn.lock +0 -17
  347. package/demo/node_modules/delayed-stream/License +0 -19
  348. package/demo/node_modules/delayed-stream/Makefile +0 -7
  349. package/demo/node_modules/delayed-stream/Readme.md +0 -141
  350. package/demo/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
  351. package/demo/node_modules/delayed-stream/package.json +0 -27
  352. package/demo/node_modules/dotenv/CHANGELOG.md +0 -475
  353. package/demo/node_modules/dotenv/LICENSE +0 -23
  354. package/demo/node_modules/dotenv/README-es.md +0 -448
  355. package/demo/node_modules/dotenv/README.md +0 -728
  356. package/demo/node_modules/dotenv/config.d.ts +0 -1
  357. package/demo/node_modules/dotenv/config.js +0 -9
  358. package/demo/node_modules/dotenv/lib/cli-options.js +0 -11
  359. package/demo/node_modules/dotenv/lib/env-options.js +0 -24
  360. package/demo/node_modules/dotenv/lib/main.d.ts +0 -153
  361. package/demo/node_modules/dotenv/lib/main.js +0 -361
  362. package/demo/node_modules/dotenv/package.json +0 -65
  363. package/demo/node_modules/event-target-shim/LICENSE +0 -22
  364. package/demo/node_modules/event-target-shim/README.md +0 -293
  365. package/demo/node_modules/event-target-shim/index.d.ts +0 -399
  366. package/demo/node_modules/event-target-shim/package.json +0 -82
  367. package/demo/node_modules/form-data/License +0 -19
  368. package/demo/node_modules/form-data/README.md.bak +0 -358
  369. package/demo/node_modules/form-data/Readme.md +0 -358
  370. package/demo/node_modules/form-data/index.d.ts +0 -62
  371. package/demo/node_modules/form-data/lib/browser.js +0 -2
  372. package/demo/node_modules/form-data/lib/form_data.js +0 -501
  373. package/demo/node_modules/form-data/lib/populate.js +0 -10
  374. package/demo/node_modules/form-data/package.json +0 -68
  375. package/demo/node_modules/form-data-encoder/@type/FileLike.d.ts +0 -23
  376. package/demo/node_modules/form-data-encoder/@type/FormDataEncoder.d.ts +0 -160
  377. package/demo/node_modules/form-data-encoder/@type/FormDataLike.d.ts +0 -40
  378. package/demo/node_modules/form-data-encoder/@type/index.d.ts +0 -5
  379. package/demo/node_modules/form-data-encoder/@type/util/createBoundary.d.ts +0 -13
  380. package/demo/node_modules/form-data-encoder/@type/util/escapeName.d.ts +0 -11
  381. package/demo/node_modules/form-data-encoder/@type/util/isFileLike.d.ts +0 -28
  382. package/demo/node_modules/form-data-encoder/@type/util/isFormData.d.ts +0 -15
  383. package/demo/node_modules/form-data-encoder/@type/util/isFunction.d.ts +0 -7
  384. package/demo/node_modules/form-data-encoder/@type/util/isPlainObject.d.ts +0 -2
  385. package/demo/node_modules/form-data-encoder/@type/util/normalizeValue.d.ts +0 -11
  386. package/demo/node_modules/form-data-encoder/lib/cjs/FileLike.js +0 -2
  387. package/demo/node_modules/form-data-encoder/lib/cjs/FormDataEncoder.js +0 -126
  388. package/demo/node_modules/form-data-encoder/lib/cjs/FormDataLike.js +0 -2
  389. package/demo/node_modules/form-data-encoder/lib/cjs/index.js +0 -17
  390. package/demo/node_modules/form-data-encoder/lib/cjs/package.json +0 -3
  391. package/demo/node_modules/form-data-encoder/lib/cjs/util/createBoundary.js +0 -12
  392. package/demo/node_modules/form-data-encoder/lib/cjs/util/escapeName.js +0 -7
  393. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFileLike.js +0 -16
  394. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFormData.js +0 -16
  395. package/demo/node_modules/form-data-encoder/lib/cjs/util/isFunction.js +0 -4
  396. package/demo/node_modules/form-data-encoder/lib/cjs/util/isPlainObject.js +0 -15
  397. package/demo/node_modules/form-data-encoder/lib/cjs/util/normalizeValue.js +0 -11
  398. package/demo/node_modules/form-data-encoder/lib/esm/FileLike.js +0 -1
  399. package/demo/node_modules/form-data-encoder/lib/esm/FormDataEncoder.js +0 -119
  400. package/demo/node_modules/form-data-encoder/lib/esm/FormDataLike.js +0 -1
  401. package/demo/node_modules/form-data-encoder/lib/esm/index.js +0 -5
  402. package/demo/node_modules/form-data-encoder/lib/esm/package.json +0 -3
  403. package/demo/node_modules/form-data-encoder/lib/esm/util/createBoundary.js +0 -10
  404. package/demo/node_modules/form-data-encoder/lib/esm/util/escapeName.js +0 -5
  405. package/demo/node_modules/form-data-encoder/lib/esm/util/isFileLike.js +0 -9
  406. package/demo/node_modules/form-data-encoder/lib/esm/util/isFormData.js +0 -9
  407. package/demo/node_modules/form-data-encoder/lib/esm/util/isFunction.js +0 -2
  408. package/demo/node_modules/form-data-encoder/lib/esm/util/isPlainObject.js +0 -13
  409. package/demo/node_modules/form-data-encoder/lib/esm/util/normalizeValue.js +0 -9
  410. package/demo/node_modules/form-data-encoder/license +0 -21
  411. package/demo/node_modules/form-data-encoder/package.json +0 -63
  412. package/demo/node_modules/form-data-encoder/readme.md +0 -366
  413. package/demo/node_modules/formdata-node/@type/Blob.d.ts +0 -66
  414. package/demo/node_modules/formdata-node/@type/BlobPart.d.ts +0 -2
  415. package/demo/node_modules/formdata-node/@type/File.d.ts +0 -53
  416. package/demo/node_modules/formdata-node/@type/FormData.d.ts +0 -105
  417. package/demo/node_modules/formdata-node/@type/blobHelpers.d.ts +0 -9
  418. package/demo/node_modules/formdata-node/@type/browser.d.ts +0 -10
  419. package/demo/node_modules/formdata-node/@type/deprecateConstructorEntries.d.ts +0 -1
  420. package/demo/node_modules/formdata-node/@type/fileFromPath.d.ts +0 -55
  421. package/demo/node_modules/formdata-node/@type/index.d.ts +0 -3
  422. package/demo/node_modules/formdata-node/@type/isBlob.d.ts +0 -2
  423. package/demo/node_modules/formdata-node/@type/isFile.d.ts +0 -7
  424. package/demo/node_modules/formdata-node/@type/isFunction.d.ts +0 -1
  425. package/demo/node_modules/formdata-node/@type/isPlainObject.d.ts +0 -2
  426. package/demo/node_modules/formdata-node/lib/cjs/Blob.js +0 -122
  427. package/demo/node_modules/formdata-node/lib/cjs/BlobPart.js +0 -2
  428. package/demo/node_modules/formdata-node/lib/cjs/File.js +0 -52
  429. package/demo/node_modules/formdata-node/lib/cjs/FormData.js +0 -148
  430. package/demo/node_modules/formdata-node/lib/cjs/blobHelpers.js +0 -80
  431. package/demo/node_modules/formdata-node/lib/cjs/browser.js +0 -13
  432. package/demo/node_modules/formdata-node/lib/cjs/deprecateConstructorEntries.js +0 -6
  433. package/demo/node_modules/formdata-node/lib/cjs/fileFromPath.js +0 -97
  434. package/demo/node_modules/formdata-node/lib/cjs/index.js +0 -15
  435. package/demo/node_modules/formdata-node/lib/cjs/isBlob.js +0 -6
  436. package/demo/node_modules/formdata-node/lib/cjs/isFile.js +0 -6
  437. package/demo/node_modules/formdata-node/lib/cjs/isFunction.js +0 -5
  438. package/demo/node_modules/formdata-node/lib/cjs/isPlainObject.js +0 -15
  439. package/demo/node_modules/formdata-node/lib/cjs/package.json +0 -3
  440. package/demo/node_modules/formdata-node/lib/esm/Blob.js +0 -118
  441. package/demo/node_modules/formdata-node/lib/esm/BlobPart.js +0 -1
  442. package/demo/node_modules/formdata-node/lib/esm/File.js +0 -48
  443. package/demo/node_modules/formdata-node/lib/esm/FormData.js +0 -144
  444. package/demo/node_modules/formdata-node/lib/esm/blobHelpers.js +0 -75
  445. package/demo/node_modules/formdata-node/lib/esm/browser.js +0 -10
  446. package/demo/node_modules/formdata-node/lib/esm/deprecateConstructorEntries.js +0 -3
  447. package/demo/node_modules/formdata-node/lib/esm/fileFromPath.js +0 -79
  448. package/demo/node_modules/formdata-node/lib/esm/index.js +0 -3
  449. package/demo/node_modules/formdata-node/lib/esm/isBlob.js +0 -2
  450. package/demo/node_modules/formdata-node/lib/esm/isFile.js +0 -2
  451. package/demo/node_modules/formdata-node/lib/esm/isFunction.js +0 -1
  452. package/demo/node_modules/formdata-node/lib/esm/isPlainObject.js +0 -13
  453. package/demo/node_modules/formdata-node/lib/esm/package.json +0 -3
  454. package/demo/node_modules/formdata-node/lib/node-domexception.d.ts +0 -5
  455. package/demo/node_modules/formdata-node/license +0 -21
  456. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/LICENSE +0 -22
  457. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/README.md +0 -135
  458. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/es5/package.json +0 -6
  459. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/package.json +0 -101
  460. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/es5/package.json +0 -5
  461. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/package.json +0 -5
  462. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/polyfill.d.ts +0 -62
  463. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/ponyfill.d.ts +0 -775
  464. package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +0 -11
  465. package/demo/node_modules/formdata-node/package.json +0 -94
  466. package/demo/node_modules/formdata-node/readme.md +0 -444
  467. package/demo/node_modules/humanize-ms/History.md +0 -25
  468. package/demo/node_modules/humanize-ms/LICENSE +0 -17
  469. package/demo/node_modules/humanize-ms/README.md +0 -40
  470. package/demo/node_modules/humanize-ms/index.js +0 -24
  471. package/demo/node_modules/humanize-ms/package.json +0 -37
  472. package/demo/node_modules/mime-db/HISTORY.md +0 -507
  473. package/demo/node_modules/mime-db/LICENSE +0 -23
  474. package/demo/node_modules/mime-db/README.md +0 -100
  475. package/demo/node_modules/mime-db/db.json +0 -8519
  476. package/demo/node_modules/mime-db/index.js +0 -12
  477. package/demo/node_modules/mime-db/package.json +0 -60
  478. package/demo/node_modules/mime-types/HISTORY.md +0 -397
  479. package/demo/node_modules/mime-types/LICENSE +0 -23
  480. package/demo/node_modules/mime-types/README.md +0 -113
  481. package/demo/node_modules/mime-types/index.js +0 -188
  482. package/demo/node_modules/mime-types/package.json +0 -44
  483. package/demo/node_modules/ms/index.js +0 -162
  484. package/demo/node_modules/ms/license.md +0 -21
  485. package/demo/node_modules/ms/package.json +0 -38
  486. package/demo/node_modules/ms/readme.md +0 -59
  487. package/demo/node_modules/node-domexception/.history/README_20210527203617.md +0 -2
  488. package/demo/node_modules/node-domexception/.history/README_20210527212714.md +0 -41
  489. package/demo/node_modules/node-domexception/.history/README_20210527213345.md +0 -36
  490. package/demo/node_modules/node-domexception/.history/README_20210527213411.md +0 -36
  491. package/demo/node_modules/node-domexception/.history/README_20210527213803.md +0 -36
  492. package/demo/node_modules/node-domexception/.history/README_20210527214323.md +0 -38
  493. package/demo/node_modules/node-domexception/.history/README_20210527214408.md +0 -38
  494. package/demo/node_modules/node-domexception/.history/index_20210527203842.js +0 -0
  495. package/demo/node_modules/node-domexception/.history/index_20210527203947.js +0 -8
  496. package/demo/node_modules/node-domexception/.history/index_20210527204259.js +0 -9
  497. package/demo/node_modules/node-domexception/.history/index_20210527204418.js +0 -9
  498. package/demo/node_modules/node-domexception/.history/index_20210527204756.js +0 -11
  499. package/demo/node_modules/node-domexception/.history/index_20210527204833.js +0 -11
  500. package/demo/node_modules/node-domexception/.history/index_20210527211208.js +0 -15
  501. package/demo/node_modules/node-domexception/.history/index_20210527211248.js +0 -15
  502. package/demo/node_modules/node-domexception/.history/index_20210527212722.js +0 -23
  503. package/demo/node_modules/node-domexception/.history/index_20210527212731.js +0 -23
  504. package/demo/node_modules/node-domexception/.history/index_20210527212746.js +0 -15
  505. package/demo/node_modules/node-domexception/.history/index_20210527212900.js +0 -16
  506. package/demo/node_modules/node-domexception/.history/index_20210527213022.js +0 -16
  507. package/demo/node_modules/node-domexception/.history/index_20210527213822.js +0 -16
  508. package/demo/node_modules/node-domexception/.history/index_20210527213843.js +0 -17
  509. package/demo/node_modules/node-domexception/.history/index_20210527213852.js +0 -17
  510. package/demo/node_modules/node-domexception/.history/index_20210527213910.js +0 -16
  511. package/demo/node_modules/node-domexception/.history/index_20210527214034.js +0 -16
  512. package/demo/node_modules/node-domexception/.history/index_20210527214643.js +0 -41
  513. package/demo/node_modules/node-domexception/.history/index_20210527214654.js +0 -41
  514. package/demo/node_modules/node-domexception/.history/index_20210527214700.js +0 -16
  515. package/demo/node_modules/node-domexception/.history/package_20210527203733.json +0 -19
  516. package/demo/node_modules/node-domexception/.history/package_20210527203825.json +0 -16
  517. package/demo/node_modules/node-domexception/.history/package_20210527204621.json +0 -19
  518. package/demo/node_modules/node-domexception/.history/package_20210527204913.json +0 -25
  519. package/demo/node_modules/node-domexception/.history/package_20210527204925.json +0 -25
  520. package/demo/node_modules/node-domexception/.history/package_20210527205145.json +0 -29
  521. package/demo/node_modules/node-domexception/.history/package_20210527205156.json +0 -29
  522. package/demo/node_modules/node-domexception/.history/test_20210527205603.js +0 -0
  523. package/demo/node_modules/node-domexception/.history/test_20210527205957.js +0 -3
  524. package/demo/node_modules/node-domexception/.history/test_20210527210021.js +0 -3
  525. package/demo/node_modules/node-domexception/LICENSE +0 -21
  526. package/demo/node_modules/node-domexception/README.md +0 -46
  527. package/demo/node_modules/node-domexception/index.js +0 -16
  528. package/demo/node_modules/node-domexception/package.json +0 -29
  529. package/demo/node_modules/node-fetch/LICENSE.md +0 -22
  530. package/demo/node_modules/node-fetch/README.md +0 -634
  531. package/demo/node_modules/node-fetch/browser.js +0 -25
  532. package/demo/node_modules/node-fetch/lib/index.es.js +0 -1777
  533. package/demo/node_modules/node-fetch/lib/index.js +0 -1787
  534. package/demo/node_modules/node-fetch/lib/index.mjs +0 -1775
  535. package/demo/node_modules/node-fetch/package.json +0 -89
  536. package/demo/node_modules/tr46/index.js +0 -193
  537. package/demo/node_modules/tr46/lib/.gitkeep +0 -0
  538. package/demo/node_modules/tr46/lib/mappingTable.json +0 -1
  539. package/demo/node_modules/tr46/package.json +0 -31
  540. package/demo/node_modules/undici-types/README.md +0 -6
  541. package/demo/node_modules/undici-types/agent.d.ts +0 -31
  542. package/demo/node_modules/undici-types/api.d.ts +0 -43
  543. package/demo/node_modules/undici-types/balanced-pool.d.ts +0 -18
  544. package/demo/node_modules/undici-types/cache.d.ts +0 -36
  545. package/demo/node_modules/undici-types/client.d.ts +0 -97
  546. package/demo/node_modules/undici-types/connector.d.ts +0 -34
  547. package/demo/node_modules/undici-types/content-type.d.ts +0 -21
  548. package/demo/node_modules/undici-types/cookies.d.ts +0 -28
  549. package/demo/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  550. package/demo/node_modules/undici-types/dispatcher.d.ts +0 -241
  551. package/demo/node_modules/undici-types/errors.d.ts +0 -128
  552. package/demo/node_modules/undici-types/fetch.d.ts +0 -209
  553. package/demo/node_modules/undici-types/file.d.ts +0 -39
  554. package/demo/node_modules/undici-types/filereader.d.ts +0 -54
  555. package/demo/node_modules/undici-types/formdata.d.ts +0 -108
  556. package/demo/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  557. package/demo/node_modules/undici-types/global-origin.d.ts +0 -7
  558. package/demo/node_modules/undici-types/handlers.d.ts +0 -9
  559. package/demo/node_modules/undici-types/header.d.ts +0 -4
  560. package/demo/node_modules/undici-types/index.d.ts +0 -63
  561. package/demo/node_modules/undici-types/interceptors.d.ts +0 -5
  562. package/demo/node_modules/undici-types/mock-agent.d.ts +0 -50
  563. package/demo/node_modules/undici-types/mock-client.d.ts +0 -25
  564. package/demo/node_modules/undici-types/mock-errors.d.ts +0 -12
  565. package/demo/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  566. package/demo/node_modules/undici-types/mock-pool.d.ts +0 -25
  567. package/demo/node_modules/undici-types/package.json +0 -55
  568. package/demo/node_modules/undici-types/patch.d.ts +0 -71
  569. package/demo/node_modules/undici-types/pool-stats.d.ts +0 -19
  570. package/demo/node_modules/undici-types/pool.d.ts +0 -28
  571. package/demo/node_modules/undici-types/proxy-agent.d.ts +0 -30
  572. package/demo/node_modules/undici-types/readable.d.ts +0 -61
  573. package/demo/node_modules/undici-types/webidl.d.ts +0 -220
  574. package/demo/node_modules/undici-types/websocket.d.ts +0 -131
  575. package/demo/node_modules/web-streams-polyfill/LICENSE +0 -22
  576. package/demo/node_modules/web-streams-polyfill/README.md +0 -110
  577. package/demo/node_modules/web-streams-polyfill/es2018/package.json +0 -14
  578. package/demo/node_modules/web-streams-polyfill/es6/package.json +0 -14
  579. package/demo/node_modules/web-streams-polyfill/package.json +0 -83
  580. package/demo/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +0 -13
  581. package/demo/node_modules/web-streams-polyfill/ponyfill/es6/package.json +0 -13
  582. package/demo/node_modules/web-streams-polyfill/ponyfill/package.json +0 -13
  583. package/demo/node_modules/webidl-conversions/LICENSE.md +0 -12
  584. package/demo/node_modules/webidl-conversions/README.md +0 -53
  585. package/demo/node_modules/webidl-conversions/lib/index.js +0 -189
  586. package/demo/node_modules/webidl-conversions/package.json +0 -23
  587. package/demo/node_modules/whatwg-url/LICENSE.txt +0 -21
  588. package/demo/node_modules/whatwg-url/README.md +0 -67
  589. package/demo/node_modules/whatwg-url/lib/URL-impl.js +0 -200
  590. package/demo/node_modules/whatwg-url/lib/URL.js +0 -196
  591. package/demo/node_modules/whatwg-url/lib/public-api.js +0 -11
  592. package/demo/node_modules/whatwg-url/lib/url-state-machine.js +0 -1297
  593. package/demo/node_modules/whatwg-url/lib/utils.js +0 -20
  594. package/demo/node_modules/whatwg-url/package.json +0 -32
@@ -1,634 +0,0 @@
1
- node-fetch
2
- ==========
3
-
4
- [![npm version][npm-image]][npm-url]
5
- [![build status][travis-image]][travis-url]
6
- [![coverage status][codecov-image]][codecov-url]
7
- [![install size][install-size-image]][install-size-url]
8
- [![Discord][discord-image]][discord-url]
9
-
10
- A light-weight module that brings `window.fetch` to Node.js
11
-
12
- (We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567))
13
-
14
- [![Backers][opencollective-image]][opencollective-url]
15
-
16
- <!-- TOC -->
17
-
18
- - [Motivation](#motivation)
19
- - [Features](#features)
20
- - [Difference from client-side fetch](#difference-from-client-side-fetch)
21
- - [Installation](#installation)
22
- - [Loading and configuring the module](#loading-and-configuring-the-module)
23
- - [Common Usage](#common-usage)
24
- - [Plain text or HTML](#plain-text-or-html)
25
- - [JSON](#json)
26
- - [Simple Post](#simple-post)
27
- - [Post with JSON](#post-with-json)
28
- - [Post with form parameters](#post-with-form-parameters)
29
- - [Handling exceptions](#handling-exceptions)
30
- - [Handling client and server errors](#handling-client-and-server-errors)
31
- - [Advanced Usage](#advanced-usage)
32
- - [Streams](#streams)
33
- - [Buffer](#buffer)
34
- - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data)
35
- - [Extract Set-Cookie Header](#extract-set-cookie-header)
36
- - [Post data using a file stream](#post-data-using-a-file-stream)
37
- - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart)
38
- - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal)
39
- - [API](#api)
40
- - [fetch(url[, options])](#fetchurl-options)
41
- - [Options](#options)
42
- - [Class: Request](#class-request)
43
- - [Class: Response](#class-response)
44
- - [Class: Headers](#class-headers)
45
- - [Interface: Body](#interface-body)
46
- - [Class: FetchError](#class-fetcherror)
47
- - [License](#license)
48
- - [Acknowledgement](#acknowledgement)
49
-
50
- <!-- /TOC -->
51
-
52
- ## Motivation
53
-
54
- Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime.
55
-
56
- See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side).
57
-
58
- ## Features
59
-
60
- - Stay consistent with `window.fetch` API.
61
- - Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences.
62
- - Use native promise but allow substituting it with [insert your favorite promise library].
63
- - Use native Node streams for body on both request and response.
64
- - Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically.
65
- - Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting.
66
-
67
- ## Difference from client-side fetch
68
-
69
- - See [Known Differences](LIMITS.md) for details.
70
- - If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue.
71
- - Pull requests are welcomed too!
72
-
73
- ## Installation
74
-
75
- Current stable release (`2.x`)
76
-
77
- ```sh
78
- $ npm install node-fetch
79
- ```
80
-
81
- ## Loading and configuring the module
82
- We suggest you load the module via `require` until the stabilization of ES modules in node:
83
- ```js
84
- const fetch = require('node-fetch');
85
- ```
86
-
87
- If you are using a Promise library other than native, set it through `fetch.Promise`:
88
- ```js
89
- const Bluebird = require('bluebird');
90
-
91
- fetch.Promise = Bluebird;
92
- ```
93
-
94
- ## Common Usage
95
-
96
- NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences.
97
-
98
- #### Plain text or HTML
99
- ```js
100
- fetch('https://github.com/')
101
- .then(res => res.text())
102
- .then(body => console.log(body));
103
- ```
104
-
105
- #### JSON
106
-
107
- ```js
108
-
109
- fetch('https://api.github.com/users/github')
110
- .then(res => res.json())
111
- .then(json => console.log(json));
112
- ```
113
-
114
- #### Simple Post
115
- ```js
116
- fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' })
117
- .then(res => res.json()) // expecting a json response
118
- .then(json => console.log(json));
119
- ```
120
-
121
- #### Post with JSON
122
-
123
- ```js
124
- const body = { a: 1 };
125
-
126
- fetch('https://httpbin.org/post', {
127
- method: 'post',
128
- body: JSON.stringify(body),
129
- headers: { 'Content-Type': 'application/json' },
130
- })
131
- .then(res => res.json())
132
- .then(json => console.log(json));
133
- ```
134
-
135
- #### Post with form parameters
136
- `URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods.
137
-
138
- NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such:
139
-
140
- ```js
141
- const { URLSearchParams } = require('url');
142
-
143
- const params = new URLSearchParams();
144
- params.append('a', 1);
145
-
146
- fetch('https://httpbin.org/post', { method: 'POST', body: params })
147
- .then(res => res.json())
148
- .then(json => console.log(json));
149
- ```
150
-
151
- #### Handling exceptions
152
- NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information.
153
-
154
- Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details.
155
-
156
- ```js
157
- fetch('https://domain.invalid/')
158
- .catch(err => console.error(err));
159
- ```
160
-
161
- #### Handling client and server errors
162
- It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses:
163
-
164
- ```js
165
- function checkStatus(res) {
166
- if (res.ok) { // res.status >= 200 && res.status < 300
167
- return res;
168
- } else {
169
- throw MyCustomError(res.statusText);
170
- }
171
- }
172
-
173
- fetch('https://httpbin.org/status/400')
174
- .then(checkStatus)
175
- .then(res => console.log('will not get here...'))
176
- ```
177
-
178
- ## Advanced Usage
179
-
180
- #### Streams
181
- The "Node.js way" is to use streams when possible:
182
-
183
- ```js
184
- fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
185
- .then(res => {
186
- const dest = fs.createWriteStream('./octocat.png');
187
- res.body.pipe(dest);
188
- });
189
- ```
190
-
191
- In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch
192
- errors -- the longer a response runs, the more likely it is to encounter an error.
193
-
194
- ```js
195
- const fetch = require('node-fetch');
196
- const response = await fetch('https://httpbin.org/stream/3');
197
- try {
198
- for await (const chunk of response.body) {
199
- console.dir(JSON.parse(chunk.toString()));
200
- }
201
- } catch (err) {
202
- console.error(err.stack);
203
- }
204
- ```
205
-
206
- In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams
207
- did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors
208
- directly from the stream and wait on it response to fully close.
209
-
210
- ```js
211
- const fetch = require('node-fetch');
212
- const read = async body => {
213
- let error;
214
- body.on('error', err => {
215
- error = err;
216
- });
217
- for await (const chunk of body) {
218
- console.dir(JSON.parse(chunk.toString()));
219
- }
220
- return new Promise((resolve, reject) => {
221
- body.on('close', () => {
222
- error ? reject(error) : resolve();
223
- });
224
- });
225
- };
226
- try {
227
- const response = await fetch('https://httpbin.org/stream/3');
228
- await read(response.body);
229
- } catch (err) {
230
- console.error(err.stack);
231
- }
232
- ```
233
-
234
- #### Buffer
235
- If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API)
236
-
237
- ```js
238
- const fileType = require('file-type');
239
-
240
- fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
241
- .then(res => res.buffer())
242
- .then(buffer => fileType(buffer))
243
- .then(type => { /* ... */ });
244
- ```
245
-
246
- #### Accessing Headers and other Meta data
247
- ```js
248
- fetch('https://github.com/')
249
- .then(res => {
250
- console.log(res.ok);
251
- console.log(res.status);
252
- console.log(res.statusText);
253
- console.log(res.headers.raw());
254
- console.log(res.headers.get('content-type'));
255
- });
256
- ```
257
-
258
- #### Extract Set-Cookie Header
259
-
260
- Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API.
261
-
262
- ```js
263
- fetch(url).then(res => {
264
- // returns an array of values, instead of a string of comma-separated values
265
- console.log(res.headers.raw()['set-cookie']);
266
- });
267
- ```
268
-
269
- #### Post data using a file stream
270
-
271
- ```js
272
- const { createReadStream } = require('fs');
273
-
274
- const stream = createReadStream('input.txt');
275
-
276
- fetch('https://httpbin.org/post', { method: 'POST', body: stream })
277
- .then(res => res.json())
278
- .then(json => console.log(json));
279
- ```
280
-
281
- #### Post with form-data (detect multipart)
282
-
283
- ```js
284
- const FormData = require('form-data');
285
-
286
- const form = new FormData();
287
- form.append('a', 1);
288
-
289
- fetch('https://httpbin.org/post', { method: 'POST', body: form })
290
- .then(res => res.json())
291
- .then(json => console.log(json));
292
-
293
- // OR, using custom headers
294
- // NOTE: getHeaders() is non-standard API
295
-
296
- const form = new FormData();
297
- form.append('a', 1);
298
-
299
- const options = {
300
- method: 'POST',
301
- body: form,
302
- headers: form.getHeaders()
303
- }
304
-
305
- fetch('https://httpbin.org/post', options)
306
- .then(res => res.json())
307
- .then(json => console.log(json));
308
- ```
309
-
310
- #### Request cancellation with AbortSignal
311
-
312
- > NOTE: You may cancel streamed requests only on Node >= v8.0.0
313
-
314
- You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller).
315
-
316
- An example of timing out a request after 150ms could be achieved as the following:
317
-
318
- ```js
319
- import AbortController from 'abort-controller';
320
-
321
- const controller = new AbortController();
322
- const timeout = setTimeout(
323
- () => { controller.abort(); },
324
- 150,
325
- );
326
-
327
- fetch(url, { signal: controller.signal })
328
- .then(res => res.json())
329
- .then(
330
- data => {
331
- useData(data)
332
- },
333
- err => {
334
- if (err.name === 'AbortError') {
335
- // request was aborted
336
- }
337
- },
338
- )
339
- .finally(() => {
340
- clearTimeout(timeout);
341
- });
342
- ```
343
-
344
- See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples.
345
-
346
-
347
- ## API
348
-
349
- ### fetch(url[, options])
350
-
351
- - `url` A string representing the URL for fetching
352
- - `options` [Options](#fetch-options) for the HTTP(S) request
353
- - Returns: <code>Promise&lt;[Response](#class-response)&gt;</code>
354
-
355
- Perform an HTTP(S) fetch.
356
-
357
- `url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`.
358
-
359
- <a id="fetch-options"></a>
360
- ### Options
361
-
362
- The default values are shown after each option key.
363
-
364
- ```js
365
- {
366
- // These properties are part of the Fetch Standard
367
- method: 'GET',
368
- headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below)
369
- body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream
370
- redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect
371
- signal: null, // pass an instance of AbortSignal to optionally abort requests
372
-
373
- // The following properties are node-fetch extensions
374
- follow: 20, // maximum redirect count. 0 to not follow redirect
375
- timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead.
376
- compress: true, // support gzip/deflate content encoding. false to disable
377
- size: 0, // maximum response body size in bytes. 0 to disable
378
- agent: null // http(s).Agent instance or function that returns an instance (see below)
379
- }
380
- ```
381
-
382
- ##### Default Headers
383
-
384
- If no values are set, the following request headers will be sent automatically:
385
-
386
- Header | Value
387
- ------------------- | --------------------------------------------------------
388
- `Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_
389
- `Accept` | `*/*`
390
- `Content-Length` | _(automatically calculated, if possible)_
391
- `Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_
392
- `User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)`
393
-
394
- Note: when `body` is a `Stream`, `Content-Length` is not set automatically.
395
-
396
- ##### Custom Agent
397
-
398
- The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following:
399
-
400
- - Support self-signed certificate
401
- - Use only IPv4 or IPv6
402
- - Custom DNS Lookup
403
-
404
- See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information.
405
-
406
- If no agent is specified, the default agent provided by Node.js is used. Note that [this changed in Node.js 19](https://github.com/nodejs/node/blob/4267b92604ad78584244488e7f7508a690cb80d0/lib/_http_agent.js#L564) to have `keepalive` true by default. If you wish to enable `keepalive` in an earlier version of Node.js, you can override the agent as per the following code sample.
407
-
408
- In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol.
409
-
410
- ```js
411
- const httpAgent = new http.Agent({
412
- keepAlive: true
413
- });
414
- const httpsAgent = new https.Agent({
415
- keepAlive: true
416
- });
417
-
418
- const options = {
419
- agent: function (_parsedURL) {
420
- if (_parsedURL.protocol == 'http:') {
421
- return httpAgent;
422
- } else {
423
- return httpsAgent;
424
- }
425
- }
426
- }
427
- ```
428
-
429
- <a id="class-request"></a>
430
- ### Class: Request
431
-
432
- An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface.
433
-
434
- Due to the nature of Node.js, the following properties are not implemented at this moment:
435
-
436
- - `type`
437
- - `destination`
438
- - `referrer`
439
- - `referrerPolicy`
440
- - `mode`
441
- - `credentials`
442
- - `cache`
443
- - `integrity`
444
- - `keepalive`
445
-
446
- The following node-fetch extension properties are provided:
447
-
448
- - `follow`
449
- - `compress`
450
- - `counter`
451
- - `agent`
452
-
453
- See [options](#fetch-options) for exact meaning of these extensions.
454
-
455
- #### new Request(input[, options])
456
-
457
- <small>*(spec-compliant)*</small>
458
-
459
- - `input` A string representing a URL, or another `Request` (which will be cloned)
460
- - `options` [Options][#fetch-options] for the HTTP(S) request
461
-
462
- Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
463
-
464
- In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object.
465
-
466
- <a id="class-response"></a>
467
- ### Class: Response
468
-
469
- An HTTP(S) response. This class implements the [Body](#iface-body) interface.
470
-
471
- The following properties are not implemented in node-fetch at this moment:
472
-
473
- - `Response.error()`
474
- - `Response.redirect()`
475
- - `type`
476
- - `trailer`
477
-
478
- #### new Response([body[, options]])
479
-
480
- <small>*(spec-compliant)*</small>
481
-
482
- - `body` A `String` or [`Readable` stream][node-readable]
483
- - `options` A [`ResponseInit`][response-init] options dictionary
484
-
485
- Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response).
486
-
487
- Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly.
488
-
489
- #### response.ok
490
-
491
- <small>*(spec-compliant)*</small>
492
-
493
- Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300.
494
-
495
- #### response.redirected
496
-
497
- <small>*(spec-compliant)*</small>
498
-
499
- Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0.
500
-
501
- <a id="class-headers"></a>
502
- ### Class: Headers
503
-
504
- This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented.
505
-
506
- #### new Headers([init])
507
-
508
- <small>*(spec-compliant)*</small>
509
-
510
- - `init` Optional argument to pre-fill the `Headers` object
511
-
512
- Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object.
513
-
514
- ```js
515
- // Example adapted from https://fetch.spec.whatwg.org/#example-headers-class
516
-
517
- const meta = {
518
- 'Content-Type': 'text/xml',
519
- 'Breaking-Bad': '<3'
520
- };
521
- const headers = new Headers(meta);
522
-
523
- // The above is equivalent to
524
- const meta = [
525
- [ 'Content-Type', 'text/xml' ],
526
- [ 'Breaking-Bad', '<3' ]
527
- ];
528
- const headers = new Headers(meta);
529
-
530
- // You can in fact use any iterable objects, like a Map or even another Headers
531
- const meta = new Map();
532
- meta.set('Content-Type', 'text/xml');
533
- meta.set('Breaking-Bad', '<3');
534
- const headers = new Headers(meta);
535
- const copyOfHeaders = new Headers(headers);
536
- ```
537
-
538
- <a id="iface-body"></a>
539
- ### Interface: Body
540
-
541
- `Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes.
542
-
543
- The following methods are not yet implemented in node-fetch at this moment:
544
-
545
- - `formData()`
546
-
547
- #### body.body
548
-
549
- <small>*(deviation from spec)*</small>
550
-
551
- * Node.js [`Readable` stream][node-readable]
552
-
553
- Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable].
554
-
555
- #### body.bodyUsed
556
-
557
- <small>*(spec-compliant)*</small>
558
-
559
- * `Boolean`
560
-
561
- A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again.
562
-
563
- #### body.arrayBuffer()
564
- #### body.blob()
565
- #### body.json()
566
- #### body.text()
567
-
568
- <small>*(spec-compliant)*</small>
569
-
570
- * Returns: <code>Promise</code>
571
-
572
- Consume the body and return a promise that will resolve to one of these formats.
573
-
574
- #### body.buffer()
575
-
576
- <small>*(node-fetch extension)*</small>
577
-
578
- * Returns: <code>Promise&lt;Buffer&gt;</code>
579
-
580
- Consume the body and return a promise that will resolve to a Buffer.
581
-
582
- #### body.textConverted()
583
-
584
- <small>*(node-fetch extension)*</small>
585
-
586
- * Returns: <code>Promise&lt;String&gt;</code>
587
-
588
- Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible.
589
-
590
- (This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.)
591
-
592
- <a id="class-fetcherror"></a>
593
- ### Class: FetchError
594
-
595
- <small>*(node-fetch extension)*</small>
596
-
597
- An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info.
598
-
599
- <a id="class-aborterror"></a>
600
- ### Class: AbortError
601
-
602
- <small>*(node-fetch extension)*</small>
603
-
604
- An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info.
605
-
606
- ## Acknowledgement
607
-
608
- Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference.
609
-
610
- `node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr).
611
-
612
- ## License
613
-
614
- MIT
615
-
616
- [npm-image]: https://flat.badgen.net/npm/v/node-fetch
617
- [npm-url]: https://www.npmjs.com/package/node-fetch
618
- [travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch
619
- [travis-url]: https://travis-ci.org/bitinn/node-fetch
620
- [codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master
621
- [codecov-url]: https://codecov.io/gh/bitinn/node-fetch
622
- [install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
623
- [install-size-url]: https://packagephobia.now.sh/result?p=node-fetch
624
- [discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square
625
- [discord-url]: https://discord.gg/Zxbndcm
626
- [opencollective-image]: https://opencollective.com/node-fetch/backers.svg
627
- [opencollective-url]: https://opencollective.com/node-fetch
628
- [whatwg-fetch]: https://fetch.spec.whatwg.org/
629
- [response-init]: https://fetch.spec.whatwg.org/#responseinit
630
- [node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
631
- [mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
632
- [LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md
633
- [ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
634
- [UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- // ref: https://github.com/tc39/proposal-global
4
- var getGlobal = function () {
5
- // the only reliable means to get the global object is
6
- // `Function('return this')()`
7
- // However, this causes CSP violations in Chrome apps.
8
- if (typeof self !== 'undefined') { return self; }
9
- if (typeof window !== 'undefined') { return window; }
10
- if (typeof global !== 'undefined') { return global; }
11
- throw new Error('unable to locate global object');
12
- }
13
-
14
- var globalObject = getGlobal();
15
-
16
- module.exports = exports = globalObject.fetch;
17
-
18
- // Needed for TypeScript and Webpack.
19
- if (globalObject.fetch) {
20
- exports.default = globalObject.fetch.bind(globalObject);
21
- }
22
-
23
- exports.Headers = globalObject.Headers;
24
- exports.Request = globalObject.Request;
25
- exports.Response = globalObject.Response;