@absolutejs/absolute 0.19.0-beta.1074 → 0.19.0-beta.1075

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-qrTyUD/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-pJspKi/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-qrTyUD/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-pJspKi/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-qrTyUD/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-pJspKi/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -2478,11 +2478,12 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
2478
2478
  headers.set("content-type", HTML_CONTENT_TYPE);
2479
2479
  headers.set(STREAMING_PAGE_HEADER, "1");
2480
2480
  return headers;
2481
- }, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request) => {
2481
+ }, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request, options) => {
2482
2482
  const contentType = response.headers.get("content-type") ?? "";
2483
2483
  if (!contentType.includes(HTML_CONTENT_TYPE))
2484
2484
  return response;
2485
- if (response.headers.get(STREAMING_PAGE_HEADER) === "1" || !response.body) {
2485
+ const isStreaming = response.headers.get(STREAMING_PAGE_HEADER) === "1";
2486
+ if (isStreaming && !options?.bufferStreamForEtag || !response.body) {
2486
2487
  response.headers.delete(STREAMING_PAGE_HEADER);
2487
2488
  response.headers.set("cache-control", "no-cache");
2488
2489
  return response;
@@ -2496,6 +2497,7 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
2496
2497
  });
2497
2498
  }
2498
2499
  const headers = new Headers(response.headers);
2500
+ headers.delete(STREAMING_PAGE_HEADER);
2499
2501
  headers.set("cache-control", "no-cache");
2500
2502
  headers.set("etag", etag);
2501
2503
  return new Response(html, {
@@ -15886,5 +15888,5 @@ export {
15886
15888
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15887
15889
  };
15888
15890
 
15889
- //# debugId=4CE7D8C0E75D262C64756E2164756E21
15891
+ //# debugId=4A79A80332A695EF64756E2164756E21
15890
15892
  //# sourceMappingURL=index.js.map