@apollo/client 0.0.0-pr-10521-20230206180228

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 (778) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +45 -0
  3. package/apollo-client.cjs +7614 -0
  4. package/apollo-client.cjs.map +1 -0
  5. package/apollo-client.min.cjs +1 -0
  6. package/cache/cache.cjs +2425 -0
  7. package/cache/cache.cjs.map +1 -0
  8. package/cache/cache.cjs.native.js +2425 -0
  9. package/cache/core/cache.d.ts +32 -0
  10. package/cache/core/cache.d.ts.map +1 -0
  11. package/cache/core/cache.js +84 -0
  12. package/cache/core/cache.js.map +1 -0
  13. package/cache/core/types/Cache.d.ts +55 -0
  14. package/cache/core/types/Cache.d.ts.map +1 -0
  15. package/cache/core/types/Cache.js +4 -0
  16. package/cache/core/types/Cache.js.map +1 -0
  17. package/cache/core/types/DataProxy.d.ts +52 -0
  18. package/cache/core/types/DataProxy.d.ts.map +1 -0
  19. package/cache/core/types/DataProxy.js +2 -0
  20. package/cache/core/types/DataProxy.js.map +1 -0
  21. package/cache/core/types/common.d.ts +47 -0
  22. package/cache/core/types/common.d.ts.map +1 -0
  23. package/cache/core/types/common.js +26 -0
  24. package/cache/core/types/common.js.map +1 -0
  25. package/cache/index.d.ts +15 -0
  26. package/cache/index.d.ts.map +1 -0
  27. package/cache/index.js +14 -0
  28. package/cache/index.js.map +1 -0
  29. package/cache/inmemory/__mocks__/optimism.d.ts +2 -0
  30. package/cache/inmemory/__mocks__/optimism.d.ts.map +1 -0
  31. package/cache/inmemory/__mocks__/optimism.js +14 -0
  32. package/cache/inmemory/__mocks__/optimism.js.map +1 -0
  33. package/cache/inmemory/entityStore.d.ts +83 -0
  34. package/cache/inmemory/entityStore.d.ts.map +1 -0
  35. package/cache/inmemory/entityStore.js +467 -0
  36. package/cache/inmemory/entityStore.js.map +1 -0
  37. package/cache/inmemory/fixPolyfills.d.ts +1 -0
  38. package/cache/inmemory/fixPolyfills.d.ts.map +1 -0
  39. package/cache/inmemory/fixPolyfills.js +1 -0
  40. package/cache/inmemory/fixPolyfills.js.map +1 -0
  41. package/cache/inmemory/fixPolyfills.native.d.ts +2 -0
  42. package/cache/inmemory/fixPolyfills.native.d.ts.map +1 -0
  43. package/cache/inmemory/fixPolyfills.native.js +48 -0
  44. package/cache/inmemory/fixPolyfills.native.js.map +1 -0
  45. package/cache/inmemory/fragmentRegistry.d.ts +8 -0
  46. package/cache/inmemory/fragmentRegistry.d.ts.map +1 -0
  47. package/cache/inmemory/fragmentRegistry.js +113 -0
  48. package/cache/inmemory/fragmentRegistry.js.map +1 -0
  49. package/cache/inmemory/helpers.d.ts +27 -0
  50. package/cache/inmemory/helpers.d.ts.map +1 -0
  51. package/cache/inmemory/helpers.js +85 -0
  52. package/cache/inmemory/helpers.js.map +1 -0
  53. package/cache/inmemory/inMemoryCache.d.ts +52 -0
  54. package/cache/inmemory/inMemoryCache.d.ts.map +1 -0
  55. package/cache/inmemory/inMemoryCache.js +316 -0
  56. package/cache/inmemory/inMemoryCache.js.map +1 -0
  57. package/cache/inmemory/key-extractor.d.ts +9 -0
  58. package/cache/inmemory/key-extractor.d.ts.map +1 -0
  59. package/cache/inmemory/key-extractor.js +118 -0
  60. package/cache/inmemory/key-extractor.js.map +1 -0
  61. package/cache/inmemory/object-canon.d.ts +17 -0
  62. package/cache/inmemory/object-canon.d.ts.map +1 -0
  63. package/cache/inmemory/object-canon.js +120 -0
  64. package/cache/inmemory/object-canon.js.map +1 -0
  65. package/cache/inmemory/policies.d.ts +96 -0
  66. package/cache/inmemory/policies.d.ts.map +1 -0
  67. package/cache/inmemory/policies.js +416 -0
  68. package/cache/inmemory/policies.js.map +1 -0
  69. package/cache/inmemory/reactiveVars.d.ts +18 -0
  70. package/cache/inmemory/reactiveVars.d.ts.map +1 -0
  71. package/cache/inmemory/reactiveVars.js +65 -0
  72. package/cache/inmemory/reactiveVars.js.map +1 -0
  73. package/cache/inmemory/readFromStore.d.ts +36 -0
  74. package/cache/inmemory/readFromStore.d.ts.map +1 -0
  75. package/cache/inmemory/readFromStore.js +267 -0
  76. package/cache/inmemory/readFromStore.js.map +1 -0
  77. package/cache/inmemory/types.d.ts +81 -0
  78. package/cache/inmemory/types.d.ts.map +1 -0
  79. package/cache/inmemory/types.js +4 -0
  80. package/cache/inmemory/types.js.map +1 -0
  81. package/cache/inmemory/writeToStore.d.ts +37 -0
  82. package/cache/inmemory/writeToStore.d.ts.map +1 -0
  83. package/cache/inmemory/writeToStore.js +394 -0
  84. package/cache/inmemory/writeToStore.js.map +1 -0
  85. package/cache/package.json +8 -0
  86. package/config/jest/setup.d.ts +2 -0
  87. package/config/jest/setup.d.ts.map +1 -0
  88. package/config/jest/setup.js +5 -0
  89. package/config/jest/setup.js.map +1 -0
  90. package/core/ApolloClient.d.ts +76 -0
  91. package/core/ApolloClient.d.ts.map +1 -0
  92. package/core/ApolloClient.js +240 -0
  93. package/core/ApolloClient.js.map +1 -0
  94. package/core/LocalState.d.ts +69 -0
  95. package/core/LocalState.d.ts.map +1 -0
  96. package/core/LocalState.js +321 -0
  97. package/core/LocalState.js.map +1 -0
  98. package/core/ObservableQuery.d.ts +74 -0
  99. package/core/ObservableQuery.d.ts.map +1 -0
  100. package/core/ObservableQuery.js +507 -0
  101. package/core/ObservableQuery.js.map +1 -0
  102. package/core/QueryInfo.d.ts +62 -0
  103. package/core/QueryInfo.d.ts.map +1 -0
  104. package/core/QueryInfo.js +287 -0
  105. package/core/QueryInfo.js.map +1 -0
  106. package/core/QueryManager.d.ts +120 -0
  107. package/core/QueryManager.d.ts.map +1 -0
  108. package/core/QueryManager.js +890 -0
  109. package/core/QueryManager.js.map +1 -0
  110. package/core/core.cjs +2349 -0
  111. package/core/core.cjs.map +1 -0
  112. package/core/core.cjs.native.js +2349 -0
  113. package/core/index.d.ts +17 -0
  114. package/core/index.d.ts.map +1 -0
  115. package/core/index.js +17 -0
  116. package/core/index.js.map +1 -0
  117. package/core/networkStatus.d.ts +11 -0
  118. package/core/networkStatus.d.ts.map +1 -0
  119. package/core/networkStatus.js +14 -0
  120. package/core/networkStatus.js.map +1 -0
  121. package/core/package.json +8 -0
  122. package/core/types.d.ts +74 -0
  123. package/core/types.d.ts.map +1 -0
  124. package/core/types.js +3 -0
  125. package/core/types.js.map +1 -0
  126. package/core/watchQueryOptions.d.ts +78 -0
  127. package/core/watchQueryOptions.d.ts.map +1 -0
  128. package/core/watchQueryOptions.js +2 -0
  129. package/core/watchQueryOptions.js.map +1 -0
  130. package/errors/errors.cjs +49 -0
  131. package/errors/errors.cjs.map +1 -0
  132. package/errors/errors.cjs.native.js +49 -0
  133. package/errors/index.d.ts +23 -0
  134. package/errors/index.d.ts.map +1 -0
  135. package/errors/index.js +42 -0
  136. package/errors/index.js.map +1 -0
  137. package/errors/package.json +8 -0
  138. package/index.d.ts +3 -0
  139. package/index.d.ts.map +1 -0
  140. package/index.js +3 -0
  141. package/index.js.map +1 -0
  142. package/invariantErrorCodes.js +339 -0
  143. package/link/batch/batch.cjs +159 -0
  144. package/link/batch/batch.cjs.map +1 -0
  145. package/link/batch/batch.cjs.native.js +159 -0
  146. package/link/batch/batchLink.d.ts +19 -0
  147. package/link/batch/batchLink.d.ts.map +1 -0
  148. package/link/batch/batchLink.js +31 -0
  149. package/link/batch/batchLink.js.map +1 -0
  150. package/link/batch/batching.d.ts +27 -0
  151. package/link/batch/batching.d.ts.map +1 -0
  152. package/link/batch/batching.js +125 -0
  153. package/link/batch/batching.js.map +1 -0
  154. package/link/batch/index.d.ts +2 -0
  155. package/link/batch/index.d.ts.map +1 -0
  156. package/link/batch/index.js +2 -0
  157. package/link/batch/index.js.map +1 -0
  158. package/link/batch/package.json +8 -0
  159. package/link/batch-http/batch-http.cjs +137 -0
  160. package/link/batch-http/batch-http.cjs.map +1 -0
  161. package/link/batch-http/batch-http.cjs.native.js +137 -0
  162. package/link/batch-http/batchHttpLink.d.ts +16 -0
  163. package/link/batch-http/batchHttpLink.d.ts.map +1 -0
  164. package/link/batch-http/batchHttpLink.js +131 -0
  165. package/link/batch-http/batchHttpLink.js.map +1 -0
  166. package/link/batch-http/index.d.ts +2 -0
  167. package/link/batch-http/index.d.ts.map +1 -0
  168. package/link/batch-http/index.js +2 -0
  169. package/link/batch-http/index.js.map +1 -0
  170. package/link/batch-http/package.json +8 -0
  171. package/link/context/context.cjs +38 -0
  172. package/link/context/context.cjs.map +1 -0
  173. package/link/context/context.cjs.native.js +38 -0
  174. package/link/context/index.d.ts +5 -0
  175. package/link/context/index.d.ts.map +1 -0
  176. package/link/context/index.js +31 -0
  177. package/link/context/index.js.map +1 -0
  178. package/link/context/package.json +8 -0
  179. package/link/core/ApolloLink.d.ts +16 -0
  180. package/link/core/ApolloLink.d.ts.map +1 -0
  181. package/link/core/ApolloLink.js +100 -0
  182. package/link/core/ApolloLink.js.map +1 -0
  183. package/link/core/concat.d.ts +3 -0
  184. package/link/core/concat.d.ts.map +1 -0
  185. package/link/core/concat.js +3 -0
  186. package/link/core/concat.js.map +1 -0
  187. package/link/core/core.cjs +121 -0
  188. package/link/core/core.cjs.map +1 -0
  189. package/link/core/core.cjs.native.js +121 -0
  190. package/link/core/empty.d.ts +3 -0
  191. package/link/core/empty.d.ts.map +1 -0
  192. package/link/core/empty.js +3 -0
  193. package/link/core/empty.js.map +1 -0
  194. package/link/core/execute.d.ts +3 -0
  195. package/link/core/execute.d.ts.map +1 -0
  196. package/link/core/execute.js +3 -0
  197. package/link/core/execute.js.map +1 -0
  198. package/link/core/from.d.ts +3 -0
  199. package/link/core/from.d.ts.map +1 -0
  200. package/link/core/from.js +3 -0
  201. package/link/core/from.js.map +1 -0
  202. package/link/core/index.d.ts +9 -0
  203. package/link/core/index.d.ts.map +1 -0
  204. package/link/core/index.js +9 -0
  205. package/link/core/index.js.map +1 -0
  206. package/link/core/package.json +8 -0
  207. package/link/core/split.d.ts +3 -0
  208. package/link/core/split.d.ts.map +1 -0
  209. package/link/core/split.js +3 -0
  210. package/link/core/split.js.map +1 -0
  211. package/link/core/types.d.ts +52 -0
  212. package/link/core/types.d.ts.map +1 -0
  213. package/link/core/types.js +2 -0
  214. package/link/core/types.js.map +1 -0
  215. package/link/error/error.cjs +90 -0
  216. package/link/error/error.cjs.map +1 -0
  217. package/link/error/error.cjs.native.js +90 -0
  218. package/link/error/index.d.ts +24 -0
  219. package/link/error/index.d.ts.map +1 -0
  220. package/link/error/index.js +83 -0
  221. package/link/error/index.js.map +1 -0
  222. package/link/error/package.json +8 -0
  223. package/link/http/HttpLink.d.ts +8 -0
  224. package/link/http/HttpLink.d.ts.map +1 -0
  225. package/link/http/HttpLink.js +15 -0
  226. package/link/http/HttpLink.js.map +1 -0
  227. package/link/http/checkFetcher.d.ts +2 -0
  228. package/link/http/checkFetcher.d.ts.map +1 -0
  229. package/link/http/checkFetcher.js +7 -0
  230. package/link/http/checkFetcher.js.map +1 -0
  231. package/link/http/createHttpLink.d.ts +4 -0
  232. package/link/http/createHttpLink.d.ts.map +1 -0
  233. package/link/http/createHttpLink.js +127 -0
  234. package/link/http/createHttpLink.js.map +1 -0
  235. package/link/http/createSignalIfSupported.d.ts +8 -0
  236. package/link/http/createSignalIfSupported.d.ts.map +1 -0
  237. package/link/http/createSignalIfSupported.js +8 -0
  238. package/link/http/createSignalIfSupported.js.map +1 -0
  239. package/link/http/http.cjs +593 -0
  240. package/link/http/http.cjs.map +1 -0
  241. package/link/http/http.cjs.native.js +593 -0
  242. package/link/http/index.d.ts +11 -0
  243. package/link/http/index.d.ts.map +1 -0
  244. package/link/http/index.js +11 -0
  245. package/link/http/index.js.map +1 -0
  246. package/link/http/iterators/async.d.ts +2 -0
  247. package/link/http/iterators/async.d.ts.map +1 -0
  248. package/link/http/iterators/async.js +14 -0
  249. package/link/http/iterators/async.js.map +1 -0
  250. package/link/http/iterators/nodeStream.d.ts +4 -0
  251. package/link/http/iterators/nodeStream.d.ts.map +1 -0
  252. package/link/http/iterators/nodeStream.js +71 -0
  253. package/link/http/iterators/nodeStream.js.map +1 -0
  254. package/link/http/iterators/promise.d.ts +2 -0
  255. package/link/http/iterators/promise.d.ts.map +1 -0
  256. package/link/http/iterators/promise.js +28 -0
  257. package/link/http/iterators/promise.js.map +1 -0
  258. package/link/http/iterators/reader.d.ts +2 -0
  259. package/link/http/iterators/reader.d.ts.map +1 -0
  260. package/link/http/iterators/reader.js +15 -0
  261. package/link/http/iterators/reader.js.map +1 -0
  262. package/link/http/package.json +8 -0
  263. package/link/http/parseAndCheckHttpResponse.d.ts +14 -0
  264. package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -0
  265. package/link/http/parseAndCheckHttpResponse.js +148 -0
  266. package/link/http/parseAndCheckHttpResponse.js.map +1 -0
  267. package/link/http/responseIterator.d.ts +3 -0
  268. package/link/http/responseIterator.d.ts.map +1 -0
  269. package/link/http/responseIterator.js +23 -0
  270. package/link/http/responseIterator.js.map +1 -0
  271. package/link/http/rewriteURIForGET.d.ts +9 -0
  272. package/link/http/rewriteURIForGET.d.ts.map +1 -0
  273. package/link/http/rewriteURIForGET.js +43 -0
  274. package/link/http/rewriteURIForGET.js.map +1 -0
  275. package/link/http/selectHttpOptionsAndBody.d.ts +57 -0
  276. package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -0
  277. package/link/http/selectHttpOptionsAndBody.js +78 -0
  278. package/link/http/selectHttpOptionsAndBody.js.map +1 -0
  279. package/link/http/selectURI.d.ts +3 -0
  280. package/link/http/selectURI.d.ts.map +1 -0
  281. package/link/http/selectURI.js +14 -0
  282. package/link/http/selectURI.js.map +1 -0
  283. package/link/http/serializeFetchParameter.d.ts +6 -0
  284. package/link/http/serializeFetchParameter.d.ts.map +1 -0
  285. package/link/http/serializeFetchParameter.js +14 -0
  286. package/link/http/serializeFetchParameter.js.map +1 -0
  287. package/link/persisted-queries/index.d.ts +31 -0
  288. package/link/persisted-queries/index.d.ts.map +1 -0
  289. package/link/persisted-queries/index.js +170 -0
  290. package/link/persisted-queries/index.js.map +1 -0
  291. package/link/persisted-queries/package.json +8 -0
  292. package/link/persisted-queries/persisted-queries.cjs +174 -0
  293. package/link/persisted-queries/persisted-queries.cjs.map +1 -0
  294. package/link/persisted-queries/persisted-queries.cjs.native.js +174 -0
  295. package/link/retry/delayFunction.d.ts +11 -0
  296. package/link/retry/delayFunction.d.ts.map +1 -0
  297. package/link/retry/delayFunction.js +12 -0
  298. package/link/retry/delayFunction.js.map +1 -0
  299. package/link/retry/index.d.ts +2 -0
  300. package/link/retry/index.d.ts.map +1 -0
  301. package/link/retry/index.js +2 -0
  302. package/link/retry/index.js.map +1 -0
  303. package/link/retry/package.json +8 -0
  304. package/link/retry/retry.cjs +170 -0
  305. package/link/retry/retry.cjs.map +1 -0
  306. package/link/retry/retry.cjs.native.js +170 -0
  307. package/link/retry/retryFunction.d.ts +10 -0
  308. package/link/retry/retryFunction.d.ts.map +1 -0
  309. package/link/retry/retryFunction.js +9 -0
  310. package/link/retry/retryFunction.js.map +1 -0
  311. package/link/retry/retryLink.d.ts +17 -0
  312. package/link/retry/retryLink.d.ts.map +1 -0
  313. package/link/retry/retryLink.js +145 -0
  314. package/link/retry/retryLink.js.map +1 -0
  315. package/link/schema/index.d.ts +22 -0
  316. package/link/schema/index.d.ts.map +1 -0
  317. package/link/schema/index.js +50 -0
  318. package/link/schema/index.js.map +1 -0
  319. package/link/schema/package.json +8 -0
  320. package/link/schema/schema.cjs +56 -0
  321. package/link/schema/schema.cjs.map +1 -0
  322. package/link/schema/schema.cjs.native.js +56 -0
  323. package/link/subscriptions/index.d.ts +9 -0
  324. package/link/subscriptions/index.d.ts.map +1 -0
  325. package/link/subscriptions/index.js +39 -0
  326. package/link/subscriptions/index.js.map +1 -0
  327. package/link/subscriptions/package.json +8 -0
  328. package/link/subscriptions/subscriptions.cjs +45 -0
  329. package/link/subscriptions/subscriptions.cjs.map +1 -0
  330. package/link/subscriptions/subscriptions.cjs.native.js +45 -0
  331. package/link/utils/createOperation.d.ts +3 -0
  332. package/link/utils/createOperation.d.ts.map +1 -0
  333. package/link/utils/createOperation.js +23 -0
  334. package/link/utils/createOperation.js.map +1 -0
  335. package/link/utils/fromError.d.ts +3 -0
  336. package/link/utils/fromError.d.ts.map +1 -0
  337. package/link/utils/fromError.js +7 -0
  338. package/link/utils/fromError.js.map +1 -0
  339. package/link/utils/fromPromise.d.ts +3 -0
  340. package/link/utils/fromPromise.d.ts.map +1 -0
  341. package/link/utils/fromPromise.js +12 -0
  342. package/link/utils/fromPromise.js.map +1 -0
  343. package/link/utils/index.d.ts +9 -0
  344. package/link/utils/index.d.ts.map +1 -0
  345. package/link/utils/index.js +9 -0
  346. package/link/utils/index.js.map +1 -0
  347. package/link/utils/package.json +8 -0
  348. package/link/utils/throwServerError.d.ts +7 -0
  349. package/link/utils/throwServerError.d.ts.map +1 -0
  350. package/link/utils/throwServerError.js +9 -0
  351. package/link/utils/throwServerError.js.map +1 -0
  352. package/link/utils/toPromise.d.ts +3 -0
  353. package/link/utils/toPromise.d.ts.map +1 -0
  354. package/link/utils/toPromise.js +19 -0
  355. package/link/utils/toPromise.js.map +1 -0
  356. package/link/utils/transformOperation.d.ts +3 -0
  357. package/link/utils/transformOperation.d.ts.map +1 -0
  358. package/link/utils/transformOperation.js +17 -0
  359. package/link/utils/transformOperation.js.map +1 -0
  360. package/link/utils/utils.cjs +115 -0
  361. package/link/utils/utils.cjs.map +1 -0
  362. package/link/utils/utils.cjs.native.js +115 -0
  363. package/link/utils/validateOperation.d.ts +3 -0
  364. package/link/utils/validateOperation.d.ts.map +1 -0
  365. package/link/utils/validateOperation.js +18 -0
  366. package/link/utils/validateOperation.js.map +1 -0
  367. package/link/ws/index.d.ts +17 -0
  368. package/link/ws/index.d.ts.map +1 -0
  369. package/link/ws/index.js +22 -0
  370. package/link/ws/index.js.map +1 -0
  371. package/link/ws/package.json +8 -0
  372. package/link/ws/ws.cjs +28 -0
  373. package/link/ws/ws.cjs.map +1 -0
  374. package/link/ws/ws.cjs.native.js +28 -0
  375. package/main.cjs +16 -0
  376. package/main.cjs.map +1 -0
  377. package/main.cjs.native.js +16 -0
  378. package/package.json +141 -0
  379. package/react/cache/SuspenseCache.d.ts +18 -0
  380. package/react/cache/SuspenseCache.d.ts.map +1 -0
  381. package/react/cache/SuspenseCache.js +49 -0
  382. package/react/cache/SuspenseCache.js.map +1 -0
  383. package/react/cache/index.d.ts +2 -0
  384. package/react/cache/index.d.ts.map +1 -0
  385. package/react/cache/index.js +2 -0
  386. package/react/cache/index.js.map +1 -0
  387. package/react/components/Mutation.d.ts +12 -0
  388. package/react/components/Mutation.d.ts.map +1 -0
  389. package/react/components/Mutation.js +22 -0
  390. package/react/components/Mutation.js.map +1 -0
  391. package/react/components/Query.d.ts +12 -0
  392. package/react/components/Query.d.ts.map +1 -0
  393. package/react/components/Query.js +23 -0
  394. package/react/components/Query.js.map +1 -0
  395. package/react/components/Subscription.d.ts +12 -0
  396. package/react/components/Subscription.d.ts.map +1 -0
  397. package/react/components/Subscription.js +17 -0
  398. package/react/components/Subscription.js.map +1 -0
  399. package/react/components/components.cjs +81 -0
  400. package/react/components/components.cjs.map +1 -0
  401. package/react/components/components.cjs.native.js +81 -0
  402. package/react/components/index.d.ts +5 -0
  403. package/react/components/index.d.ts.map +1 -0
  404. package/react/components/index.js +5 -0
  405. package/react/components/index.js.map +1 -0
  406. package/react/components/package.json +8 -0
  407. package/react/components/types.d.ts +18 -0
  408. package/react/components/types.d.ts.map +1 -0
  409. package/react/components/types.js +2 -0
  410. package/react/components/types.js.map +1 -0
  411. package/react/context/ApolloConsumer.d.ts +7 -0
  412. package/react/context/ApolloConsumer.d.ts.map +1 -0
  413. package/react/context/ApolloConsumer.js +12 -0
  414. package/react/context/ApolloConsumer.js.map +1 -0
  415. package/react/context/ApolloContext.d.ts +12 -0
  416. package/react/context/ApolloContext.d.ts.map +1 -0
  417. package/react/context/ApolloContext.js +20 -0
  418. package/react/context/ApolloContext.js.map +1 -0
  419. package/react/context/ApolloProvider.d.ts +10 -0
  420. package/react/context/ApolloProvider.d.ts.map +1 -0
  421. package/react/context/ApolloProvider.js +20 -0
  422. package/react/context/ApolloProvider.js.map +1 -0
  423. package/react/context/context.cjs +70 -0
  424. package/react/context/context.cjs.map +1 -0
  425. package/react/context/context.cjs.native.js +70 -0
  426. package/react/context/index.d.ts +5 -0
  427. package/react/context/index.d.ts.map +1 -0
  428. package/react/context/index.js +5 -0
  429. package/react/context/index.js.map +1 -0
  430. package/react/context/package.json +8 -0
  431. package/react/hoc/graphql.d.ts +6 -0
  432. package/react/hoc/graphql.d.ts.map +1 -0
  433. package/react/hoc/graphql.js +17 -0
  434. package/react/hoc/graphql.js.map +1 -0
  435. package/react/hoc/hoc-utils.d.ts +17 -0
  436. package/react/hoc/hoc-utils.d.ts.map +1 -0
  437. package/react/hoc/hoc-utils.js +47 -0
  438. package/react/hoc/hoc-utils.js.map +1 -0
  439. package/react/hoc/hoc.cjs +325 -0
  440. package/react/hoc/hoc.cjs.map +1 -0
  441. package/react/hoc/hoc.cjs.native.js +325 -0
  442. package/react/hoc/index.d.ts +8 -0
  443. package/react/hoc/index.d.ts.map +1 -0
  444. package/react/hoc/index.js +8 -0
  445. package/react/hoc/index.js.map +1 -0
  446. package/react/hoc/mutation-hoc.d.ts +7 -0
  447. package/react/hoc/mutation-hoc.d.ts.map +1 -0
  448. package/react/hoc/mutation-hoc.js +63 -0
  449. package/react/hoc/mutation-hoc.js.map +1 -0
  450. package/react/hoc/package.json +8 -0
  451. package/react/hoc/query-hoc.d.ts +5 -0
  452. package/react/hoc/query-hoc.d.ts.map +1 -0
  453. package/react/hoc/query-hoc.js +70 -0
  454. package/react/hoc/query-hoc.js.map +1 -0
  455. package/react/hoc/subscription-hoc.d.ts +5 -0
  456. package/react/hoc/subscription-hoc.d.ts.map +1 -0
  457. package/react/hoc/subscription-hoc.js +80 -0
  458. package/react/hoc/subscription-hoc.js.map +1 -0
  459. package/react/hoc/types.d.ts +43 -0
  460. package/react/hoc/types.d.ts.map +1 -0
  461. package/react/hoc/types.js +2 -0
  462. package/react/hoc/types.js.map +1 -0
  463. package/react/hoc/withApollo.d.ts +4 -0
  464. package/react/hoc/withApollo.d.ts.map +1 -0
  465. package/react/hoc/withApollo.js +45 -0
  466. package/react/hoc/withApollo.js.map +1 -0
  467. package/react/hooks/compareResults.d.ts +3 -0
  468. package/react/hooks/compareResults.d.ts.map +1 -0
  469. package/react/hooks/compareResults.js +63 -0
  470. package/react/hooks/compareResults.js.map +1 -0
  471. package/react/hooks/hooks.cjs +913 -0
  472. package/react/hooks/hooks.cjs.map +1 -0
  473. package/react/hooks/hooks.cjs.native.js +913 -0
  474. package/react/hooks/index.d.ts +10 -0
  475. package/react/hooks/index.d.ts.map +1 -0
  476. package/react/hooks/index.js +10 -0
  477. package/react/hooks/index.js.map +1 -0
  478. package/react/hooks/internal/index.d.ts +3 -0
  479. package/react/hooks/internal/index.d.ts.map +1 -0
  480. package/react/hooks/internal/index.js +3 -0
  481. package/react/hooks/internal/index.js.map +1 -0
  482. package/react/hooks/internal/useDeepMemo.d.ts +3 -0
  483. package/react/hooks/internal/useDeepMemo.d.ts.map +1 -0
  484. package/react/hooks/internal/useDeepMemo.js +10 -0
  485. package/react/hooks/internal/useDeepMemo.js.map +1 -0
  486. package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +3 -0
  487. package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
  488. package/react/hooks/internal/useIsomorphicLayoutEffect.js +6 -0
  489. package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -0
  490. package/react/hooks/package.json +8 -0
  491. package/react/hooks/useApolloClient.d.ts +3 -0
  492. package/react/hooks/useApolloClient.d.ts.map +1 -0
  493. package/react/hooks/useApolloClient.js +12 -0
  494. package/react/hooks/useApolloClient.js.map +1 -0
  495. package/react/hooks/useFragment.d.ts +13 -0
  496. package/react/hooks/useFragment.d.ts.map +1 -0
  497. package/react/hooks/useFragment.js +39 -0
  498. package/react/hooks/useFragment.js.map +1 -0
  499. package/react/hooks/useLazyQuery.d.ts +6 -0
  500. package/react/hooks/useLazyQuery.d.ts.map +1 -0
  501. package/react/hooks/useLazyQuery.js +71 -0
  502. package/react/hooks/useLazyQuery.js.map +1 -0
  503. package/react/hooks/useMutation.d.ts +6 -0
  504. package/react/hooks/useMutation.d.ts.map +1 -0
  505. package/react/hooks/useMutation.js +100 -0
  506. package/react/hooks/useMutation.js.map +1 -0
  507. package/react/hooks/useQuery.d.ts +41 -0
  508. package/react/hooks/useQuery.d.ts.map +1 -0
  509. package/react/hooks/useQuery.js +302 -0
  510. package/react/hooks/useQuery.js.map +1 -0
  511. package/react/hooks/useReactiveVar.d.ts +3 -0
  512. package/react/hooks/useReactiveVar.d.ts.map +1 -0
  513. package/react/hooks/useReactiveVar.js +16 -0
  514. package/react/hooks/useReactiveVar.js.map +1 -0
  515. package/react/hooks/useSubscription.d.ts +6 -0
  516. package/react/hooks/useSubscription.d.ts.map +1 -0
  517. package/react/hooks/useSubscription.js +141 -0
  518. package/react/hooks/useSubscription.js.map +1 -0
  519. package/react/hooks/useSuspenseCache.d.ts +2 -0
  520. package/react/hooks/useSuspenseCache.d.ts.map +1 -0
  521. package/react/hooks/useSuspenseCache.js +10 -0
  522. package/react/hooks/useSuspenseCache.js.map +1 -0
  523. package/react/hooks/useSuspenseQuery.d.ts +12 -0
  524. package/react/hooks/useSuspenseQuery.d.ts.map +1 -0
  525. package/react/hooks/useSuspenseQuery.js +181 -0
  526. package/react/hooks/useSuspenseQuery.js.map +1 -0
  527. package/react/hooks/useSyncExternalStore.d.ts +4 -0
  528. package/react/hooks/useSyncExternalStore.d.ts.map +1 -0
  529. package/react/hooks/useSyncExternalStore.js +48 -0
  530. package/react/hooks/useSyncExternalStore.js.map +1 -0
  531. package/react/index.d.ts +7 -0
  532. package/react/index.d.ts.map +1 -0
  533. package/react/index.js +7 -0
  534. package/react/index.js.map +1 -0
  535. package/react/package.json +8 -0
  536. package/react/parser/index.d.ts +15 -0
  537. package/react/parser/index.d.ts.map +1 -0
  538. package/react/parser/index.js +94 -0
  539. package/react/parser/index.js.map +1 -0
  540. package/react/parser/package.json +8 -0
  541. package/react/parser/parser.cjs +103 -0
  542. package/react/parser/parser.cjs.map +1 -0
  543. package/react/parser/parser.cjs.native.js +103 -0
  544. package/react/react.cjs +69 -0
  545. package/react/react.cjs.map +1 -0
  546. package/react/react.cjs.native.js +69 -0
  547. package/react/ssr/RenderPromises.d.ts +22 -0
  548. package/react/ssr/RenderPromises.d.ts.map +1 -0
  549. package/react/ssr/RenderPromises.js +90 -0
  550. package/react/ssr/RenderPromises.js.map +1 -0
  551. package/react/ssr/getDataFromTree.d.ts +13 -0
  552. package/react/ssr/getDataFromTree.d.ts.map +1 -0
  553. package/react/ssr/getDataFromTree.js +32 -0
  554. package/react/ssr/getDataFromTree.js.map +1 -0
  555. package/react/ssr/index.d.ts +4 -0
  556. package/react/ssr/index.d.ts.map +1 -0
  557. package/react/ssr/index.js +4 -0
  558. package/react/ssr/index.js.map +1 -0
  559. package/react/ssr/package.json +8 -0
  560. package/react/ssr/renderToStringWithData.d.ts +3 -0
  561. package/react/ssr/renderToStringWithData.d.ts.map +1 -0
  562. package/react/ssr/renderToStringWithData.js +9 -0
  563. package/react/ssr/renderToStringWithData.js.map +1 -0
  564. package/react/ssr/ssr.cjs +151 -0
  565. package/react/ssr/ssr.cjs.map +1 -0
  566. package/react/ssr/ssr.cjs.native.js +151 -0
  567. package/react/types/types.d.ts +130 -0
  568. package/react/types/types.d.ts.map +1 -0
  569. package/react/types/types.js +2 -0
  570. package/react/types/types.js.map +1 -0
  571. package/testing/core/core.cjs +315 -0
  572. package/testing/core/core.cjs.map +1 -0
  573. package/testing/core/core.cjs.native.js +315 -0
  574. package/testing/core/index.d.ts +8 -0
  575. package/testing/core/index.d.ts.map +1 -0
  576. package/testing/core/index.js +8 -0
  577. package/testing/core/index.js.map +1 -0
  578. package/testing/core/itAsync.d.ts +6 -0
  579. package/testing/core/itAsync.d.ts.map +1 -0
  580. package/testing/core/itAsync.js +19 -0
  581. package/testing/core/itAsync.js.map +1 -0
  582. package/testing/core/mocking/mockClient.d.ts +5 -0
  583. package/testing/core/mocking/mockClient.d.ts.map +1 -0
  584. package/testing/core/mocking/mockClient.js +14 -0
  585. package/testing/core/mocking/mockClient.js.map +1 -0
  586. package/testing/core/mocking/mockFetch.d.ts +24 -0
  587. package/testing/core/mocking/mockFetch.d.ts.map +1 -0
  588. package/testing/core/mocking/mockFetch.js +83 -0
  589. package/testing/core/mocking/mockFetch.js.map +1 -0
  590. package/testing/core/mocking/mockLink.d.ts +28 -0
  591. package/testing/core/mocking/mockLink.d.ts.map +1 -0
  592. package/testing/core/mocking/mockLink.js +139 -0
  593. package/testing/core/mocking/mockLink.js.map +1 -0
  594. package/testing/core/mocking/mockQueryManager.d.ts +5 -0
  595. package/testing/core/mocking/mockQueryManager.d.ts.map +1 -0
  596. package/testing/core/mocking/mockQueryManager.js +14 -0
  597. package/testing/core/mocking/mockQueryManager.js.map +1 -0
  598. package/testing/core/mocking/mockSubscriptionLink.d.ts +24 -0
  599. package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -0
  600. package/testing/core/mocking/mockSubscriptionLink.js +62 -0
  601. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -0
  602. package/testing/core/mocking/mockWatchQuery.d.ts +5 -0
  603. package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -0
  604. package/testing/core/mocking/mockWatchQuery.js +15 -0
  605. package/testing/core/mocking/mockWatchQuery.js.map +1 -0
  606. package/testing/core/observableToPromise.d.ts +15 -0
  607. package/testing/core/observableToPromise.d.ts.map +1 -0
  608. package/testing/core/observableToPromise.js +65 -0
  609. package/testing/core/observableToPromise.js.map +1 -0
  610. package/testing/core/package.json +8 -0
  611. package/testing/core/subscribeAndCount.d.ts +3 -0
  612. package/testing/core/subscribeAndCount.d.ts.map +1 -0
  613. package/testing/core/subscribeAndCount.js +16 -0
  614. package/testing/core/subscribeAndCount.js.map +1 -0
  615. package/testing/core/wait.d.ts +3 -0
  616. package/testing/core/wait.d.ts.map +1 -0
  617. package/testing/core/wait.js +16 -0
  618. package/testing/core/wait.js.map +1 -0
  619. package/testing/core/withConsoleSpy.d.ts +4 -0
  620. package/testing/core/withConsoleSpy.d.ts.map +1 -0
  621. package/testing/core/withConsoleSpy.js +39 -0
  622. package/testing/core/withConsoleSpy.js.map +1 -0
  623. package/testing/core/wrap.d.ts +4 -0
  624. package/testing/core/wrap.d.ts.map +1 -0
  625. package/testing/core/wrap.js +26 -0
  626. package/testing/core/wrap.js.map +1 -0
  627. package/testing/index.d.ts +4 -0
  628. package/testing/index.d.ts.map +1 -0
  629. package/testing/index.js +4 -0
  630. package/testing/index.js.map +1 -0
  631. package/testing/package.json +8 -0
  632. package/testing/react/MockedProvider.d.ts +30 -0
  633. package/testing/react/MockedProvider.d.ts.map +1 -0
  634. package/testing/react/MockedProvider.js +39 -0
  635. package/testing/react/MockedProvider.js.map +1 -0
  636. package/testing/testing.cjs +109 -0
  637. package/testing/testing.cjs.map +1 -0
  638. package/testing/testing.cjs.native.js +109 -0
  639. package/utilities/common/arrays.d.ts +2 -0
  640. package/utilities/common/arrays.d.ts.map +1 -0
  641. package/utilities/common/arrays.js +4 -0
  642. package/utilities/common/arrays.js.map +1 -0
  643. package/utilities/common/canUse.d.ts +7 -0
  644. package/utilities/common/canUse.d.ts.map +1 -0
  645. package/utilities/common/canUse.js +11 -0
  646. package/utilities/common/canUse.js.map +1 -0
  647. package/utilities/common/cloneDeep.d.ts +2 -0
  648. package/utilities/common/cloneDeep.d.ts.map +1 -0
  649. package/utilities/common/cloneDeep.js +33 -0
  650. package/utilities/common/cloneDeep.js.map +1 -0
  651. package/utilities/common/compact.d.ts +3 -0
  652. package/utilities/common/compact.d.ts.map +1 -0
  653. package/utilities/common/compact.js +19 -0
  654. package/utilities/common/compact.js.map +1 -0
  655. package/utilities/common/errorHandling.d.ts +4 -0
  656. package/utilities/common/errorHandling.d.ts.map +1 -0
  657. package/utilities/common/errorHandling.js +21 -0
  658. package/utilities/common/errorHandling.js.map +1 -0
  659. package/utilities/common/filterInPlace.d.ts +2 -0
  660. package/utilities/common/filterInPlace.d.ts.map +1 -0
  661. package/utilities/common/filterInPlace.js +11 -0
  662. package/utilities/common/filterInPlace.js.map +1 -0
  663. package/utilities/common/incrementalResult.d.ts +6 -0
  664. package/utilities/common/incrementalResult.d.ts.map +1 -0
  665. package/utilities/common/incrementalResult.js +32 -0
  666. package/utilities/common/incrementalResult.js.map +1 -0
  667. package/utilities/common/makeUniqueId.d.ts +2 -0
  668. package/utilities/common/makeUniqueId.d.ts.map +1 -0
  669. package/utilities/common/makeUniqueId.js +7 -0
  670. package/utilities/common/makeUniqueId.js.map +1 -0
  671. package/utilities/common/maybeDeepFreeze.d.ts +2 -0
  672. package/utilities/common/maybeDeepFreeze.d.ts.map +1 -0
  673. package/utilities/common/maybeDeepFreeze.js +34 -0
  674. package/utilities/common/maybeDeepFreeze.js.map +1 -0
  675. package/utilities/common/mergeDeep.d.ts +14 -0
  676. package/utilities/common/mergeDeep.d.ts.map +1 -0
  677. package/utilities/common/mergeDeep.js +76 -0
  678. package/utilities/common/mergeDeep.js.map +1 -0
  679. package/utilities/common/mergeOptions.d.ts +5 -0
  680. package/utilities/common/mergeOptions.d.ts.map +1 -0
  681. package/utilities/common/mergeOptions.js +8 -0
  682. package/utilities/common/mergeOptions.js.map +1 -0
  683. package/utilities/common/objects.d.ts +2 -0
  684. package/utilities/common/objects.d.ts.map +1 -0
  685. package/utilities/common/objects.js +4 -0
  686. package/utilities/common/objects.js.map +1 -0
  687. package/utilities/common/responseIterator.d.ts +10 -0
  688. package/utilities/common/responseIterator.d.ts.map +1 -0
  689. package/utilities/common/responseIterator.js +21 -0
  690. package/utilities/common/responseIterator.js.map +1 -0
  691. package/utilities/common/stringifyForDisplay.d.ts +2 -0
  692. package/utilities/common/stringifyForDisplay.d.ts.map +1 -0
  693. package/utilities/common/stringifyForDisplay.js +8 -0
  694. package/utilities/common/stringifyForDisplay.js.map +1 -0
  695. package/utilities/globals/DEV.d.ts +3 -0
  696. package/utilities/globals/DEV.d.ts.map +1 -0
  697. package/utilities/globals/DEV.js +9 -0
  698. package/utilities/globals/DEV.js.map +1 -0
  699. package/utilities/globals/fix-graphql.d.ts +2 -0
  700. package/utilities/globals/fix-graphql.d.ts.map +1 -0
  701. package/utilities/globals/fix-graphql.js +6 -0
  702. package/utilities/globals/fix-graphql.js.map +1 -0
  703. package/utilities/globals/global.d.ts +5 -0
  704. package/utilities/globals/global.d.ts.map +1 -0
  705. package/utilities/globals/global.js +6 -0
  706. package/utilities/globals/global.js.map +1 -0
  707. package/utilities/globals/globals.cjs +42 -0
  708. package/utilities/globals/globals.cjs.map +1 -0
  709. package/utilities/globals/globals.cjs.native.js +42 -0
  710. package/utilities/globals/index.d.ts +8 -0
  711. package/utilities/globals/index.d.ts.map +1 -0
  712. package/utilities/globals/index.js +10 -0
  713. package/utilities/globals/index.js.map +1 -0
  714. package/utilities/globals/maybe.d.ts +2 -0
  715. package/utilities/globals/maybe.d.ts.map +1 -0
  716. package/utilities/globals/maybe.js +7 -0
  717. package/utilities/globals/maybe.js.map +1 -0
  718. package/utilities/globals/package.json +8 -0
  719. package/utilities/graphql/directives.d.ts +18 -0
  720. package/utilities/graphql/directives.d.ts.map +1 -0
  721. package/utilities/graphql/directives.js +72 -0
  722. package/utilities/graphql/directives.js.map +1 -0
  723. package/utilities/graphql/fragments.d.ts +9 -0
  724. package/utilities/graphql/fragments.d.ts.map +1 -0
  725. package/utilities/graphql/fragments.js +64 -0
  726. package/utilities/graphql/fragments.js.map +1 -0
  727. package/utilities/graphql/getFromAST.d.ts +10 -0
  728. package/utilities/graphql/getFromAST.d.ts.map +1 -0
  729. package/utilities/graphql/getFromAST.js +76 -0
  730. package/utilities/graphql/getFromAST.js.map +1 -0
  731. package/utilities/graphql/storeUtils.d.ts +32 -0
  732. package/utilities/graphql/storeUtils.d.ts.map +1 -0
  733. package/utilities/graphql/storeUtils.js +208 -0
  734. package/utilities/graphql/storeUtils.js.map +1 -0
  735. package/utilities/graphql/transform.d.ts +27 -0
  736. package/utilities/graphql/transform.d.ts.map +1 -0
  737. package/utilities/graphql/transform.js +281 -0
  738. package/utilities/graphql/transform.js.map +1 -0
  739. package/utilities/index.d.ts +27 -0
  740. package/utilities/index.d.ts.map +1 -0
  741. package/utilities/index.js +27 -0
  742. package/utilities/index.js.map +1 -0
  743. package/utilities/observables/Concast.d.ts +27 -0
  744. package/utilities/observables/Concast.d.ts.map +1 -0
  745. package/utilities/observables/Concast.js +137 -0
  746. package/utilities/observables/Concast.js.map +1 -0
  747. package/utilities/observables/Observable.d.ts +5 -0
  748. package/utilities/observables/Observable.d.ts.map +1 -0
  749. package/utilities/observables/Observable.js +9 -0
  750. package/utilities/observables/Observable.js.map +1 -0
  751. package/utilities/observables/asyncMap.d.ts +3 -0
  752. package/utilities/observables/asyncMap.d.ts.map +1 -0
  753. package/utilities/observables/asyncMap.js +49 -0
  754. package/utilities/observables/asyncMap.js.map +1 -0
  755. package/utilities/observables/iteration.d.ts +3 -0
  756. package/utilities/observables/iteration.d.ts.map +1 -0
  757. package/utilities/observables/iteration.js +6 -0
  758. package/utilities/observables/iteration.js.map +1 -0
  759. package/utilities/observables/subclassing.d.ts +3 -0
  760. package/utilities/observables/subclassing.d.ts.map +1 -0
  761. package/utilities/observables/subclassing.js +13 -0
  762. package/utilities/observables/subclassing.js.map +1 -0
  763. package/utilities/package.json +8 -0
  764. package/utilities/policies/pagination.d.ts +28 -0
  765. package/utilities/policies/pagination.d.ts.map +1 -0
  766. package/utilities/policies/pagination.js +151 -0
  767. package/utilities/policies/pagination.js.map +1 -0
  768. package/utilities/types/IsStrictlyAny.d.ts +5 -0
  769. package/utilities/types/IsStrictlyAny.d.ts.map +1 -0
  770. package/utilities/types/IsStrictlyAny.js +2 -0
  771. package/utilities/types/IsStrictlyAny.js.map +1 -0
  772. package/utilities/utilities.cjs +1371 -0
  773. package/utilities/utilities.cjs.map +1 -0
  774. package/utilities/utilities.cjs.native.js +1371 -0
  775. package/version.d.ts +2 -0
  776. package/version.d.ts.map +1 -0
  777. package/version.js +2 -0
  778. package/version.js.map +1 -0
@@ -0,0 +1,593 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var globals = require('../../utilities/globals');
6
+ var tslib = require('tslib');
7
+ var utilities = require('../../utilities');
8
+ var utils = require('../utils');
9
+ var graphql = require('graphql');
10
+ var core = require('../core');
11
+
12
+ function asyncIterator(source) {
13
+ var _a;
14
+ var iterator = source[Symbol.asyncIterator]();
15
+ return _a = {
16
+ next: function () {
17
+ return iterator.next();
18
+ }
19
+ },
20
+ _a[Symbol.asyncIterator] = function () {
21
+ return this;
22
+ },
23
+ _a;
24
+ }
25
+
26
+ function nodeStreamIterator(stream) {
27
+ var cleanup = null;
28
+ var error = null;
29
+ var done = false;
30
+ var data = [];
31
+ var waiting = [];
32
+ function onData(chunk) {
33
+ if (error)
34
+ return;
35
+ if (waiting.length) {
36
+ var shiftedArr = waiting.shift();
37
+ if (Array.isArray(shiftedArr) && shiftedArr[0]) {
38
+ return shiftedArr[0]({ value: chunk, done: false });
39
+ }
40
+ }
41
+ data.push(chunk);
42
+ }
43
+ function onError(err) {
44
+ error = err;
45
+ var all = waiting.slice();
46
+ all.forEach(function (pair) {
47
+ pair[1](err);
48
+ });
49
+ !cleanup || cleanup();
50
+ }
51
+ function onEnd() {
52
+ done = true;
53
+ var all = waiting.slice();
54
+ all.forEach(function (pair) {
55
+ pair[0]({ value: undefined, done: true });
56
+ });
57
+ !cleanup || cleanup();
58
+ }
59
+ cleanup = function () {
60
+ cleanup = null;
61
+ stream.removeListener("data", onData);
62
+ stream.removeListener("error", onError);
63
+ stream.removeListener("end", onEnd);
64
+ stream.removeListener("finish", onEnd);
65
+ stream.removeListener("close", onEnd);
66
+ };
67
+ stream.on("data", onData);
68
+ stream.on("error", onError);
69
+ stream.on("end", onEnd);
70
+ stream.on("finish", onEnd);
71
+ stream.on("close", onEnd);
72
+ function getNext() {
73
+ return new Promise(function (resolve, reject) {
74
+ if (error)
75
+ return reject(error);
76
+ if (data.length)
77
+ return resolve({ value: data.shift(), done: false });
78
+ if (done)
79
+ return resolve({ value: undefined, done: true });
80
+ waiting.push([resolve, reject]);
81
+ });
82
+ }
83
+ var iterator = {
84
+ next: function () {
85
+ return getNext();
86
+ },
87
+ };
88
+ if (utilities.canUseAsyncIteratorSymbol) {
89
+ iterator[Symbol.asyncIterator] = function () {
90
+ return this;
91
+ };
92
+ }
93
+ return iterator;
94
+ }
95
+
96
+ function promiseIterator(promise) {
97
+ var resolved = false;
98
+ var iterator = {
99
+ next: function () {
100
+ if (resolved)
101
+ return Promise.resolve({
102
+ value: undefined,
103
+ done: true,
104
+ });
105
+ resolved = true;
106
+ return new Promise(function (resolve, reject) {
107
+ promise
108
+ .then(function (value) {
109
+ resolve({ value: value, done: false });
110
+ })
111
+ .catch(reject);
112
+ });
113
+ },
114
+ };
115
+ if (utilities.canUseAsyncIteratorSymbol) {
116
+ iterator[Symbol.asyncIterator] = function () {
117
+ return this;
118
+ };
119
+ }
120
+ return iterator;
121
+ }
122
+
123
+ function readerIterator(reader) {
124
+ var iterator = {
125
+ next: function () {
126
+ return reader.read();
127
+ },
128
+ };
129
+ if (utilities.canUseAsyncIteratorSymbol) {
130
+ iterator[Symbol.asyncIterator] = function () {
131
+ return this;
132
+ };
133
+ }
134
+ return iterator;
135
+ }
136
+
137
+ function responseIterator(response) {
138
+ var body = response;
139
+ if (utilities.isNodeResponse(response))
140
+ body = response.body;
141
+ if (utilities.isAsyncIterableIterator(body))
142
+ return asyncIterator(body);
143
+ if (utilities.isReadableStream(body))
144
+ return readerIterator(body.getReader());
145
+ if (utilities.isStreamableBlob(body)) {
146
+ return readerIterator(body.stream().getReader());
147
+ }
148
+ if (utilities.isBlob(body))
149
+ return promiseIterator(body.arrayBuffer());
150
+ if (utilities.isNodeReadableStream(body))
151
+ return nodeStreamIterator(body);
152
+ throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
153
+ }
154
+
155
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
156
+ function readMultipartBody(response, observer) {
157
+ var _a, _b, _c;
158
+ return tslib.__awaiter(this, void 0, void 0, function () {
159
+ var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _d, value, done, chunk, bi, message, i, headers, contentType_1, body, result;
160
+ var _e;
161
+ return tslib.__generator(this, function (_f) {
162
+ switch (_f.label) {
163
+ case 0:
164
+ if (TextDecoder === undefined) {
165
+ throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");
166
+ }
167
+ decoder = new TextDecoder("utf-8");
168
+ contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get('content-type');
169
+ delimiter = "boundary=";
170
+ boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter))
171
+ ? contentType === null || contentType === void 0 ? void 0 : contentType.substring((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(delimiter)) + delimiter.length).replace(/['"]/g, "").replace(/\;(.*)/gm, "").trim()
172
+ : "-";
173
+ boundary = "--".concat(boundaryVal);
174
+ buffer = "";
175
+ iterator = responseIterator(response);
176
+ running = true;
177
+ _f.label = 1;
178
+ case 1:
179
+ if (!running) return [3, 3];
180
+ return [4, iterator.next()];
181
+ case 2:
182
+ _d = _f.sent(), value = _d.value, done = _d.done;
183
+ chunk = typeof value === "string" ? value : decoder.decode(value);
184
+ running = !done;
185
+ buffer += chunk;
186
+ bi = buffer.indexOf(boundary);
187
+ while (bi > -1) {
188
+ message = void 0;
189
+ _e = [
190
+ buffer.slice(0, bi),
191
+ buffer.slice(bi + boundary.length),
192
+ ], message = _e[0], buffer = _e[1];
193
+ if (message.trim()) {
194
+ i = message.indexOf("\r\n\r\n");
195
+ headers = parseHeaders(message.slice(0, i));
196
+ contentType_1 = headers["content-type"];
197
+ if (contentType_1 &&
198
+ contentType_1.toLowerCase().indexOf("application/json") === -1) {
199
+ throw new Error("Unsupported patch content type: application/json is required.");
200
+ }
201
+ body = message.slice(i);
202
+ try {
203
+ result = parseJsonBody(response, body.replace("\r\n", ""));
204
+ if (Object.keys(result).length > 1 ||
205
+ "data" in result ||
206
+ "incremental" in result ||
207
+ "errors" in result) {
208
+ (_b = observer.next) === null || _b === void 0 ? void 0 : _b.call(observer, result);
209
+ }
210
+ }
211
+ catch (err) {
212
+ handleError(err, observer);
213
+ }
214
+ }
215
+ bi = buffer.indexOf(boundary);
216
+ }
217
+ return [3, 1];
218
+ case 3:
219
+ (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);
220
+ return [2];
221
+ }
222
+ });
223
+ });
224
+ }
225
+ function parseHeaders(headerText) {
226
+ var headersInit = {};
227
+ headerText.split("\n").forEach(function (line) {
228
+ var i = line.indexOf(":");
229
+ if (i > -1) {
230
+ var name_1 = line.slice(0, i).trim().toLowerCase();
231
+ var value = line.slice(i + 1).trim();
232
+ headersInit[name_1] = value;
233
+ }
234
+ });
235
+ return headersInit;
236
+ }
237
+ function parseJsonBody(response, bodyText) {
238
+ if (response.status >= 300) {
239
+ var getResult = function () {
240
+ try {
241
+ return JSON.parse(bodyText);
242
+ }
243
+ catch (err) {
244
+ return bodyText;
245
+ }
246
+ };
247
+ utils.throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));
248
+ }
249
+ try {
250
+ return JSON.parse(bodyText);
251
+ }
252
+ catch (err) {
253
+ var parseError = err;
254
+ parseError.name = "ServerParseError";
255
+ parseError.response = response;
256
+ parseError.statusCode = response.status;
257
+ parseError.bodyText = bodyText;
258
+ throw parseError;
259
+ }
260
+ }
261
+ function handleError(err, observer) {
262
+ var _a, _b;
263
+ if (err.name === "AbortError")
264
+ return;
265
+ if (err.result && err.result.errors && err.result.data) {
266
+ (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, err.result);
267
+ }
268
+ (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, err);
269
+ }
270
+ function readJsonBody(response, operation, observer) {
271
+ parseAndCheckHttpResponse(operation)(response)
272
+ .then(function (result) {
273
+ var _a, _b;
274
+ (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, result);
275
+ (_b = observer.complete) === null || _b === void 0 ? void 0 : _b.call(observer);
276
+ })
277
+ .catch(function (err) { return handleError(err, observer); });
278
+ }
279
+ function parseAndCheckHttpResponse(operations) {
280
+ return function (response) {
281
+ return response
282
+ .text()
283
+ .then(function (bodyText) { return parseJsonBody(response, bodyText); })
284
+ .then(function (result) {
285
+ if (response.status >= 300) {
286
+ utils.throwServerError(response, result, "Response not successful: Received status code ".concat(response.status));
287
+ }
288
+ if (!Array.isArray(result) &&
289
+ !hasOwnProperty.call(result, "data") &&
290
+ !hasOwnProperty.call(result, "errors")) {
291
+ utils.throwServerError(response, result, "Server response was missing for query '".concat(Array.isArray(operations)
292
+ ? operations.map(function (op) { return op.operationName; })
293
+ : operations.operationName, "'."));
294
+ }
295
+ return result;
296
+ });
297
+ };
298
+ }
299
+
300
+ var serializeFetchParameter = function (p, label) {
301
+ var serialized;
302
+ try {
303
+ serialized = JSON.stringify(p);
304
+ }
305
+ catch (e) {
306
+ var parseError = globals.__DEV__ ? new globals.InvariantError("Network request failed. ".concat(label, " is not serializable: ").concat(e.message)) : new globals.InvariantError(24);
307
+ parseError.parseError = e;
308
+ throw parseError;
309
+ }
310
+ return serialized;
311
+ };
312
+
313
+ var defaultHttpOptions = {
314
+ includeQuery: true,
315
+ includeExtensions: false,
316
+ preserveHeaderCase: false,
317
+ };
318
+ var defaultHeaders = {
319
+ accept: '*/*',
320
+ 'content-type': 'application/json',
321
+ };
322
+ var defaultOptions = {
323
+ method: 'POST',
324
+ };
325
+ var fallbackHttpConfig = {
326
+ http: defaultHttpOptions,
327
+ headers: defaultHeaders,
328
+ options: defaultOptions,
329
+ };
330
+ var defaultPrinter = function (ast, printer) { return printer(ast); };
331
+ function selectHttpOptionsAndBody(operation, fallbackConfig) {
332
+ var configs = [];
333
+ for (var _i = 2; _i < arguments.length; _i++) {
334
+ configs[_i - 2] = arguments[_i];
335
+ }
336
+ configs.unshift(fallbackConfig);
337
+ return selectHttpOptionsAndBodyInternal.apply(void 0, tslib.__spreadArray([operation,
338
+ defaultPrinter], configs, false));
339
+ }
340
+ function selectHttpOptionsAndBodyInternal(operation, printer) {
341
+ var configs = [];
342
+ for (var _i = 2; _i < arguments.length; _i++) {
343
+ configs[_i - 2] = arguments[_i];
344
+ }
345
+ var options = {};
346
+ var http = {};
347
+ configs.forEach(function (config) {
348
+ options = tslib.__assign(tslib.__assign(tslib.__assign({}, options), config.options), { headers: tslib.__assign(tslib.__assign({}, options.headers), config.headers) });
349
+ if (config.credentials) {
350
+ options.credentials = config.credentials;
351
+ }
352
+ http = tslib.__assign(tslib.__assign({}, http), config.http);
353
+ });
354
+ if (options.headers) {
355
+ options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);
356
+ }
357
+ var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;
358
+ var body = { operationName: operationName, variables: variables };
359
+ if (http.includeExtensions)
360
+ body.extensions = extensions;
361
+ if (http.includeQuery)
362
+ body.query = printer(query, graphql.print);
363
+ return {
364
+ options: options,
365
+ body: body,
366
+ };
367
+ }
368
+ function removeDuplicateHeaders(headers, preserveHeaderCase) {
369
+ if (!preserveHeaderCase) {
370
+ var normalizedHeaders_1 = Object.create(null);
371
+ Object.keys(Object(headers)).forEach(function (name) {
372
+ normalizedHeaders_1[name.toLowerCase()] = headers[name];
373
+ });
374
+ return normalizedHeaders_1;
375
+ }
376
+ var headerData = Object.create(null);
377
+ Object.keys(Object(headers)).forEach(function (name) {
378
+ headerData[name.toLowerCase()] = { originalName: name, value: headers[name] };
379
+ });
380
+ var normalizedHeaders = Object.create(null);
381
+ Object.keys(headerData).forEach(function (name) {
382
+ normalizedHeaders[headerData[name].originalName] = headerData[name].value;
383
+ });
384
+ return normalizedHeaders;
385
+ }
386
+
387
+ var checkFetcher = function (fetcher) {
388
+ if (!fetcher && typeof fetch === 'undefined') {
389
+ throw globals.__DEV__ ? new globals.InvariantError("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n ") : new globals.InvariantError(23);
390
+ }
391
+ };
392
+
393
+ var createSignalIfSupported = function () {
394
+ if (typeof AbortController === 'undefined')
395
+ return { controller: false, signal: false };
396
+ var controller = new AbortController();
397
+ var signal = controller.signal;
398
+ return { controller: controller, signal: signal };
399
+ };
400
+
401
+ var selectURI = function (operation, fallbackURI) {
402
+ var context = operation.getContext();
403
+ var contextURI = context.uri;
404
+ if (contextURI) {
405
+ return contextURI;
406
+ }
407
+ else if (typeof fallbackURI === 'function') {
408
+ return fallbackURI(operation);
409
+ }
410
+ else {
411
+ return fallbackURI || '/graphql';
412
+ }
413
+ };
414
+
415
+ function rewriteURIForGET(chosenURI, body) {
416
+ var queryParams = [];
417
+ var addQueryParam = function (key, value) {
418
+ queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));
419
+ };
420
+ if ('query' in body) {
421
+ addQueryParam('query', body.query);
422
+ }
423
+ if (body.operationName) {
424
+ addQueryParam('operationName', body.operationName);
425
+ }
426
+ if (body.variables) {
427
+ var serializedVariables = void 0;
428
+ try {
429
+ serializedVariables = serializeFetchParameter(body.variables, 'Variables map');
430
+ }
431
+ catch (parseError) {
432
+ return { parseError: parseError };
433
+ }
434
+ addQueryParam('variables', serializedVariables);
435
+ }
436
+ if (body.extensions) {
437
+ var serializedExtensions = void 0;
438
+ try {
439
+ serializedExtensions = serializeFetchParameter(body.extensions, 'Extensions map');
440
+ }
441
+ catch (parseError) {
442
+ return { parseError: parseError };
443
+ }
444
+ addQueryParam('extensions', serializedExtensions);
445
+ }
446
+ var fragment = '', preFragment = chosenURI;
447
+ var fragmentStart = chosenURI.indexOf('#');
448
+ if (fragmentStart !== -1) {
449
+ fragment = chosenURI.substr(fragmentStart);
450
+ preFragment = chosenURI.substr(0, fragmentStart);
451
+ }
452
+ var queryParamsPrefix = preFragment.indexOf('?') === -1 ? '?' : '&';
453
+ var newURI = preFragment + queryParamsPrefix + queryParams.join('&') + fragment;
454
+ return { newURI: newURI };
455
+ }
456
+
457
+ var backupFetch = utilities.maybe(function () { return fetch; });
458
+ var createHttpLink = function (linkOptions) {
459
+ if (linkOptions === void 0) { linkOptions = {}; }
460
+ var _a = linkOptions.uri, uri = _a === void 0 ? '/graphql' : _a, preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = tslib.__rest(linkOptions, ["uri", "fetch", "print", "includeExtensions", "preserveHeaderCase", "useGETForQueries", "includeUnusedVariables"]);
461
+ if (globals.__DEV__) {
462
+ checkFetcher(preferredFetch || backupFetch);
463
+ }
464
+ var linkConfig = {
465
+ http: { includeExtensions: includeExtensions, preserveHeaderCase: preserveHeaderCase },
466
+ options: requestOptions.fetchOptions,
467
+ credentials: requestOptions.credentials,
468
+ headers: requestOptions.headers,
469
+ };
470
+ return new core.ApolloLink(function (operation) {
471
+ var chosenURI = selectURI(operation, uri);
472
+ var context = operation.getContext();
473
+ var clientAwarenessHeaders = {};
474
+ if (context.clientAwareness) {
475
+ var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;
476
+ if (name_1) {
477
+ clientAwarenessHeaders['apollographql-client-name'] = name_1;
478
+ }
479
+ if (version) {
480
+ clientAwarenessHeaders['apollographql-client-version'] = version;
481
+ }
482
+ }
483
+ var contextHeaders = tslib.__assign(tslib.__assign({}, clientAwarenessHeaders), context.headers);
484
+ var contextConfig = {
485
+ http: context.http,
486
+ options: context.fetchOptions,
487
+ credentials: context.credentials,
488
+ headers: contextHeaders,
489
+ };
490
+ if (utilities.hasDirectives(['client'], operation.query)) {
491
+ var transformedQuery = utilities.removeClientSetsFromDocument(operation.query);
492
+ if (!transformedQuery) {
493
+ return utils.fromError(new Error('HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`.'));
494
+ }
495
+ operation.query = transformedQuery;
496
+ }
497
+ var _b = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;
498
+ if (body.variables && !includeUnusedVariables) {
499
+ var unusedNames_1 = new Set(Object.keys(body.variables));
500
+ graphql.visit(operation.query, {
501
+ Variable: function (node, _key, parent) {
502
+ if (parent && parent.kind !== 'VariableDefinition') {
503
+ unusedNames_1.delete(node.name.value);
504
+ }
505
+ },
506
+ });
507
+ if (unusedNames_1.size) {
508
+ body.variables = tslib.__assign({}, body.variables);
509
+ unusedNames_1.forEach(function (name) {
510
+ delete body.variables[name];
511
+ });
512
+ }
513
+ }
514
+ var controller;
515
+ if (!options.signal) {
516
+ var _c = createSignalIfSupported(), _controller = _c.controller, signal = _c.signal;
517
+ controller = _controller;
518
+ if (controller)
519
+ options.signal = signal;
520
+ }
521
+ var definitionIsMutation = function (d) {
522
+ return d.kind === 'OperationDefinition' && d.operation === 'mutation';
523
+ };
524
+ if (useGETForQueries &&
525
+ !operation.query.definitions.some(definitionIsMutation)) {
526
+ options.method = 'GET';
527
+ }
528
+ if (utilities.hasDirectives(['defer'], operation.query)) {
529
+ options.headers = options.headers || {};
530
+ options.headers.accept = "multipart/mixed; deferSpec=20220824, application/json";
531
+ }
532
+ if (options.method === 'GET') {
533
+ var _d = rewriteURIForGET(chosenURI, body), newURI = _d.newURI, parseError = _d.parseError;
534
+ if (parseError) {
535
+ return utils.fromError(parseError);
536
+ }
537
+ chosenURI = newURI;
538
+ }
539
+ else {
540
+ try {
541
+ options.body = serializeFetchParameter(body, 'Payload');
542
+ }
543
+ catch (parseError) {
544
+ return utils.fromError(parseError);
545
+ }
546
+ }
547
+ return new utilities.Observable(function (observer) {
548
+ var currentFetch = preferredFetch || utilities.maybe(function () { return fetch; }) || backupFetch;
549
+ currentFetch(chosenURI, options)
550
+ .then(function (response) {
551
+ var _a;
552
+ operation.setContext({ response: response });
553
+ var ctype = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get('content-type');
554
+ if (ctype !== null && /^multipart\/mixed/i.test(ctype)) {
555
+ return readMultipartBody(response, observer);
556
+ }
557
+ else {
558
+ return readJsonBody(response, operation, observer);
559
+ }
560
+ })
561
+ .catch(function (err) { return handleError(err, observer); });
562
+ return function () {
563
+ if (controller)
564
+ controller.abort();
565
+ };
566
+ });
567
+ });
568
+ };
569
+
570
+ var HttpLink = (function (_super) {
571
+ tslib.__extends(HttpLink, _super);
572
+ function HttpLink(options) {
573
+ if (options === void 0) { options = {}; }
574
+ var _this = _super.call(this, createHttpLink(options).request) || this;
575
+ _this.options = options;
576
+ return _this;
577
+ }
578
+ return HttpLink;
579
+ }(core.ApolloLink));
580
+
581
+ exports.HttpLink = HttpLink;
582
+ exports.checkFetcher = checkFetcher;
583
+ exports.createHttpLink = createHttpLink;
584
+ exports.createSignalIfSupported = createSignalIfSupported;
585
+ exports.defaultPrinter = defaultPrinter;
586
+ exports.fallbackHttpConfig = fallbackHttpConfig;
587
+ exports.parseAndCheckHttpResponse = parseAndCheckHttpResponse;
588
+ exports.rewriteURIForGET = rewriteURIForGET;
589
+ exports.selectHttpOptionsAndBody = selectHttpOptionsAndBody;
590
+ exports.selectHttpOptionsAndBodyInternal = selectHttpOptionsAndBodyInternal;
591
+ exports.selectURI = selectURI;
592
+ exports.serializeFetchParameter = serializeFetchParameter;
593
+ //# sourceMappingURL=http.cjs.map
@@ -0,0 +1,11 @@
1
+ import '../../utilities/globals';
2
+ export { parseAndCheckHttpResponse, ServerParseError } from './parseAndCheckHttpResponse';
3
+ export { serializeFetchParameter, ClientParseError } from './serializeFetchParameter';
4
+ export { HttpOptions, fallbackHttpConfig, defaultPrinter, selectHttpOptionsAndBody, selectHttpOptionsAndBodyInternal, UriFunction } from './selectHttpOptionsAndBody';
5
+ export { checkFetcher } from './checkFetcher';
6
+ export { createSignalIfSupported } from './createSignalIfSupported';
7
+ export { selectURI } from './selectURI';
8
+ export { createHttpLink } from './createHttpLink';
9
+ export { HttpLink } from './HttpLink';
10
+ export { rewriteURIForGET } from './rewriteURIForGET';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/link/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,gCAAgC,EAChC,WAAW,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import "../../utilities/globals/index.js";
2
+ export { parseAndCheckHttpResponse } from "./parseAndCheckHttpResponse.js";
3
+ export { serializeFetchParameter } from "./serializeFetchParameter.js";
4
+ export { fallbackHttpConfig, defaultPrinter, selectHttpOptionsAndBody, selectHttpOptionsAndBodyInternal } from "./selectHttpOptionsAndBody.js";
5
+ export { checkFetcher } from "./checkFetcher.js";
6
+ export { createSignalIfSupported } from "./createSignalIfSupported.js";
7
+ export { selectURI } from "./selectURI.js";
8
+ export { createHttpLink } from "./createHttpLink.js";
9
+ export { HttpLink } from "./HttpLink.js";
10
+ export { rewriteURIForGET } from "./rewriteURIForGET.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EACL,yBAAyB,EAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,uBAAuB,EAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,gCAAgC,EAEjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["import '../../utilities/globals';\n\nexport {\n parseAndCheckHttpResponse,\n ServerParseError\n} from './parseAndCheckHttpResponse';\nexport {\n serializeFetchParameter,\n ClientParseError\n} from './serializeFetchParameter';\nexport {\n HttpOptions,\n fallbackHttpConfig,\n defaultPrinter,\n selectHttpOptionsAndBody,\n selectHttpOptionsAndBodyInternal, // needed by ../batch-http but not public\n UriFunction\n} from './selectHttpOptionsAndBody';\nexport { checkFetcher } from './checkFetcher';\nexport { createSignalIfSupported } from './createSignalIfSupported';\nexport { selectURI } from './selectURI';\nexport { createHttpLink } from './createHttpLink';\nexport { HttpLink } from './HttpLink';\nexport { rewriteURIForGET } from './rewriteURIForGET';\n"]}
@@ -0,0 +1,2 @@
1
+ export default function asyncIterator<T>(source: AsyncIterableIterator<T>): AsyncIterableIterator<T>;
2
+ //# sourceMappingURL=async.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/link/http/iterators/async.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EACrC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAC/B,qBAAqB,CAAC,CAAC,CAAC,CAU1B"}
@@ -0,0 +1,14 @@
1
+ export default function asyncIterator(source) {
2
+ var _a;
3
+ var iterator = source[Symbol.asyncIterator]();
4
+ return _a = {
5
+ next: function () {
6
+ return iterator.next();
7
+ }
8
+ },
9
+ _a[Symbol.asyncIterator] = function () {
10
+ return this;
11
+ },
12
+ _a;
13
+ }
14
+ //# sourceMappingURL=async.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/link/http/iterators/async.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,MAAgC;;IAEhC,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;IAChD;YACE,IAAI;gBACF,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzB,CAAC;;QACD,GAAC,MAAM,CAAC,aAAa,IAArB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;WACD;AACJ,CAAC","sourcesContent":["/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/async.ts\n */\n\nexport default function asyncIterator<T>(\n source: AsyncIterableIterator<T>\n): AsyncIterableIterator<T> {\n const iterator = source[Symbol.asyncIterator]();\n return {\n next(): Promise<IteratorResult<T, boolean>> {\n return iterator.next();\n },\n [Symbol.asyncIterator](): AsyncIterableIterator<T> {\n return this;\n },\n };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ import { Readable as NodeReadableStream } from "stream";
3
+ export default function nodeStreamIterator<T>(stream: NodeReadableStream): AsyncIterableIterator<T>;
4
+ //# sourceMappingURL=nodeStream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeStream.d.ts","sourceRoot":"","sources":["../../../../src/link/http/iterators/nodeStream.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAQxD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,CAAC,EAC1C,MAAM,EAAE,kBAAkB,GACzB,qBAAqB,CAAC,CAAC,CAAC,CA8E1B"}