@lace-cloud/canvas 0.7.0 → 0.7.1

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
@@ -17612,8 +17612,8 @@ var SnapshotCanvasEngine = class {
17612
17612
  }
17613
17613
  this.loadPromise = (async () => {
17614
17614
  const [bundleBytes, layoutsBytes] = await Promise.all([
17615
- this.fetchBytes(input.bundleUrl, "bundle"),
17616
- this.fetchBytes(input.layoutsUrl, "layouts")
17615
+ this.fetchBytes(input.bundleUrl, "bundle", input.headers),
17616
+ this.fetchBytes(input.layoutsUrl, "layouts", input.headers)
17617
17617
  ]);
17618
17618
  const bundle = Bundle.decode(bundleBytes);
17619
17619
  const layouts = LayoutsMap.decode(layoutsBytes).layouts ?? {};
@@ -17624,10 +17624,10 @@ var SnapshotCanvasEngine = class {
17624
17624
  }
17625
17625
  return this.loadPromise;
17626
17626
  }
17627
- async fetchBytes(url, label) {
17627
+ async fetchBytes(url, label, headers) {
17628
17628
  const res = await this.fetchImpl(url, {
17629
17629
  method: "GET",
17630
- headers: { accept: "application/octet-stream" },
17630
+ headers: { accept: "application/octet-stream", ...headers },
17631
17631
  // Credentials: include so same-origin portal fetches carry the
17632
17632
  // session cookie. Embed routes validate the token in the URL
17633
17633
  // instead, so this is a no-op there.