@vercel/queue 0.1.3 → 0.1.4

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.mjs CHANGED
@@ -1463,6 +1463,7 @@ var ApiClient = class _ApiClient {
1463
1463
  transport;
1464
1464
  region;
1465
1465
  baseUrlResolver;
1466
+ dispatcher;
1466
1467
  constructor(options) {
1467
1468
  this.region = options.region;
1468
1469
  this.baseUrlResolver = options.resolveBaseUrl;
@@ -1470,6 +1471,7 @@ var ApiClient = class _ApiClient {
1470
1471
  this.customHeaders = options.headers || {};
1471
1472
  this.providedToken = options.token;
1472
1473
  this.transport = options.transport || new JsonTransport();
1474
+ this.dispatcher = options.dispatcher;
1473
1475
  if (options.deploymentId === null) {
1474
1476
  this.pinSends = false;
1475
1477
  this.explicitlyUnpinned = true;
@@ -1492,7 +1494,8 @@ var ApiClient = class _ApiClient {
1492
1494
  token: this.providedToken,
1493
1495
  headers: { ...this.customHeaders },
1494
1496
  deploymentId: this.explicitlyUnpinned ? null : this.resolvedDeploymentId,
1495
- transport: this.transport
1497
+ transport: this.transport,
1498
+ dispatcher: this.dispatcher
1496
1499
  });
1497
1500
  }
1498
1501
  getRegion() {
@@ -1576,9 +1579,10 @@ Cause: ${cause}`
1576
1579
  }
1577
1580
  console.debug("[VQS Debug] Request:", JSON.stringify(logData, null, 2));
1578
1581
  }
1579
- init.headers.set("User-Agent", `@vercel/queue/${"0.1.3"}`);
1582
+ init.headers.set("User-Agent", `@vercel/queue/${"0.1.4"}`);
1580
1583
  init.headers.set("Vqs-Client-Ts", (/* @__PURE__ */ new Date()).toISOString());
1581
- const response = await fetch(url, init);
1584
+ const fetchInit = this.dispatcher ? { ...init, dispatcher: this.dispatcher } : init;
1585
+ const response = await fetch(url, fetchInit);
1582
1586
  if (isDebugEnabled()) {
1583
1587
  const logData = {
1584
1588
  method,