@absolutejs/absolute 0.19.0-beta.454 → 0.19.0-beta.455

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.js CHANGED
@@ -174546,7 +174546,7 @@ ${registrations}
174546
174546
  ({ tsLibDir } = cached);
174547
174547
  cached.lastUsed = Date.now();
174548
174548
  } else {
174549
- const tsPath = __require.resolve("typescript");
174549
+ const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
174550
174550
  const tsRootDir = dirname9(tsPath);
174551
174551
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve18(tsRootDir, "lib");
174552
174552
  const config = readConfiguration("./tsconfig.json");
@@ -177780,6 +177780,10 @@ var ssrDirty4 = false, isRecord10 = (value) => typeof value === "object" && valu
177780
177780
  return new Response(html, {
177781
177781
  headers: { "Content-Type": "text/html" }
177782
177782
  });
177783
+ }, primeVueStream = async (stream) => {
177784
+ const reader = stream.getReader();
177785
+ const firstChunk = await reader.read();
177786
+ return { firstChunk, reader };
177783
177787
  }, handleVuePageRequest = async (_PageComponent, pagePath, indexPath, headTag = "<head></head>", ...props) => {
177784
177788
  const [maybeProps] = props;
177785
177789
  if (ssrDirty4) {
@@ -177812,12 +177816,20 @@ var ssrDirty4 = false, isRecord10 = (value) => typeof value === "object" && valu
177812
177816
  render: () => h(resolvedPage.component, maybeProps ?? null)
177813
177817
  });
177814
177818
  const bodyStream = renderToWebStream(app);
177819
+ const { firstChunk, reader } = await primeVueStream(bodyStream);
177815
177820
  const head = `<!DOCTYPE html><html>${headTag}<body><div id="root">`;
177816
177821
  const tail = `</div><script>window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})}</script><script type="module" src="${indexPath}"></script></body></html>`;
177817
177822
  const stream = new ReadableStream({
177818
177823
  start(controller) {
177819
177824
  controller.enqueue(head);
177820
- const reader = bodyStream.getReader();
177825
+ if (!firstChunk.done) {
177826
+ controller.enqueue(firstChunk.value);
177827
+ }
177828
+ if (firstChunk.done) {
177829
+ controller.enqueue(tail);
177830
+ controller.close();
177831
+ return;
177832
+ }
177821
177833
  const pumpLoop = () => {
177822
177834
  reader.read().then(({ done, value }) => done ? (controller.enqueue(tail), controller.close()) : (controller.enqueue(value), pumpLoop())).catch((err) => controller.error(err));
177823
177835
  };
@@ -188547,5 +188559,5 @@ export {
188547
188559
  ANGULAR_INIT_TIMEOUT_MS
188548
188560
  };
188549
188561
 
188550
- //# debugId=5808B752CDDA79F864756E2164756E21
188562
+ //# debugId=71F97CB428AA05DF64756E2164756E21
188551
188563
  //# sourceMappingURL=index.js.map