@absolutejs/absolute 0.19.0-beta.369 → 0.19.0-beta.370

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.
@@ -11277,23 +11277,27 @@ var registerStreamingSlot = (slot) => {
11277
11277
  };
11278
11278
 
11279
11279
  // src/core/streamingSlotRegistry.ts
11280
- var asyncLocalStorage;
11280
+ var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
11281
+ var getStorageGlobal = () => globalThis;
11281
11282
  var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
11282
11283
  var ensureAsyncLocalStorage = async () => {
11283
- if (typeof asyncLocalStorage !== "undefined")
11284
- return asyncLocalStorage;
11284
+ const storageGlobal = getStorageGlobal();
11285
+ if (typeof storageGlobal[STREAMING_SLOT_STORAGE_KEY] !== "undefined") {
11286
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
11287
+ }
11285
11288
  if (!isServerRuntime()) {
11286
- asyncLocalStorage = null;
11287
- return asyncLocalStorage;
11289
+ storageGlobal[STREAMING_SLOT_STORAGE_KEY] = null;
11290
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
11288
11291
  }
11289
11292
  const mod = await import("async_hooks");
11290
- asyncLocalStorage = new mod.AsyncLocalStorage;
11291
- return asyncLocalStorage;
11293
+ storageGlobal[STREAMING_SLOT_STORAGE_KEY] = new mod.AsyncLocalStorage;
11294
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
11292
11295
  };
11293
11296
  var registerStreamingSlot2 = (slot) => {
11294
- if (!asyncLocalStorage)
11297
+ const storage = getStorageGlobal()[STREAMING_SLOT_STORAGE_KEY];
11298
+ if (!storage)
11295
11299
  return;
11296
- const store = asyncLocalStorage.getStore();
11300
+ const store = storage.getStore();
11297
11301
  if (!store)
11298
11302
  return;
11299
11303
  store.set(slot.id, slot);
@@ -11783,5 +11787,5 @@ export {
11783
11787
  DeferSlotComponent
11784
11788
  };
11785
11789
 
11786
- //# debugId=ADFC4B4BF6E33FDD64756E2164756E21
11790
+ //# debugId=92AB488148E6584364756E2164756E21
11787
11791
  //# sourceMappingURL=index.js.map