@arbidocs/client 0.5.173 → 0.5.175

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.
package/dist/index.cjs CHANGED
@@ -1603,13 +1603,17 @@ function authTokenOf(input, init) {
1603
1603
  }
1604
1604
  function createDedupFetch(originalFetch) {
1605
1605
  const inFlightRequests = /* @__PURE__ */ new Map();
1606
+ let writes = 0;
1606
1607
  return function dedupFetch(input, init) {
1607
1608
  const method = (init?.method ?? (input instanceof Request ? input.method : "GET")).toUpperCase();
1608
1609
  if (method !== "GET") {
1609
- return originalFetch(input, init);
1610
+ writes++;
1611
+ return originalFetch(input, init).finally(() => {
1612
+ writes++;
1613
+ });
1610
1614
  }
1611
1615
  const url = input instanceof Request ? input.url : String(input);
1612
- const key = `GET:${url}\0${authTokenOf(input, init)}`;
1616
+ const key = `GET:${url}\0${authTokenOf(input, init)}\0${writes}`;
1613
1617
  const existing = inFlightRequests.get(key);
1614
1618
  if (existing) {
1615
1619
  return existing.then((r) => r.clone());