gemi 0.49.0-rc.3 → 0.49.0-rc.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/app/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{o as a,p as b}from"../chunk-vjwgfkwn.js";import"../chunk-tjqn206t.js";import"../chunk-x5f4e2fp.js";import"../chunk-p5r0t9jh.js";import"../chunk-xkrthw08.js";import"../chunk-4z53shav.js";import"../chunk-m0earq80.js";import"../chunk-f18weffa.js";export{b as prismaExtension,a as App};
2
+ import{o as a,p as b}from"../chunk-p2k3cckx.js";import"../chunk-j0c51zzj.js";import"../chunk-x5f4e2fp.js";import"../chunk-p5r0t9jh.js";import"../chunk-xkrthw08.js";import"../chunk-4z53shav.js";import"../chunk-m0earq80.js";import"../chunk-f18weffa.js";export{b as prismaExtension,a as App};
3
3
 
4
4
  //# debugId=15EBDBCE0B2D702364756E2164756E21
package/dist/bin/gemi.js CHANGED
@@ -68636,6 +68636,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68636
68636
  pathname,
68637
68637
  serverQueries,
68638
68638
  userAgent,
68639
+ noStream,
68639
68640
  url,
68640
68641
  user,
68641
68642
  viewData,
@@ -68726,7 +68727,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68726
68727
  serverQueries.markRenderStart();
68727
68728
  const deadline = new AbortController;
68728
68729
  const deadlineTimer = setTimeout(() => deadline.abort(), STREAM_DEADLINE_MS);
68729
- const isBot = isBotUserAgent(userAgent);
68730
+ const settled = isBotUserAgent(userAgent) || noStream;
68730
68731
  try {
68731
68732
  const stream = await renderToReadableStream(import_react.createElement(import_react.Fragment, {
68732
68733
  children: [
@@ -68749,7 +68750,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68749
68750
  bootstrapScriptContent: `window.__GEMI_DATA__ = ${JSON.stringify(result.data)}; window.loaders=${loaders}`,
68750
68751
  bootstrapModules,
68751
68752
  signal: deadline.signal,
68752
- ...isBot ? { progressiveChunkSize: Number.MAX_SAFE_INTEGER } : {},
68753
+ ...settled ? { progressiveChunkSize: Number.MAX_SAFE_INTEGER } : {},
68753
68754
  onError(error) {
68754
68755
  if (true) {
68755
68756
  console.error(error);
@@ -68757,7 +68758,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68757
68758
  }
68758
68759
  });
68759
68760
  stream.allReady.catch(() => {}).finally(() => clearTimeout(deadlineTimer));
68760
- if (isBot) {
68761
+ if (settled) {
68761
68762
  await stream.allReady.catch(() => {});
68762
68763
  }
68763
68764
  return new Response(injectQueryPayloads(stream, serverQueries), {
@@ -68813,6 +68814,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68813
68814
  let currentPathName = null;
68814
68815
  let params = {};
68815
68816
  let partial = null;
68817
+ let noStream = false;
68816
68818
  try {
68817
68819
  const match = matchViewRoute(this.flatViewRoutes, urlPathname);
68818
68820
  if (match) {
@@ -68820,6 +68822,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68820
68822
  params = match.params;
68821
68823
  handlers = match.route.exec;
68822
68824
  middlewares = match.route.middleware;
68825
+ noStream = middlewares.includes("no-stream");
68823
68826
  if (isViewDataRequest && this.service.partialRendering) {
68824
68827
  const from = req.headers.get(PARTIAL_RENDER_HEADER);
68825
68828
  const plan = resolvePartialRender({
@@ -68959,6 +68962,7 @@ class ViewRouterServiceContainer extends ServiceContainer {
68959
68962
  pathname: url.pathname,
68960
68963
  serverQueries: ctx.serverQueries,
68961
68964
  userAgent: req.headers.get("user-agent"),
68965
+ noStream,
68962
68966
  url,
68963
68967
  user,
68964
68968
  viewData,
@@ -70006,5 +70010,5 @@ program.command("app:route-manifest").action(async () => {
70006
70010
  });
70007
70011
  program.parse();
70008
70012
 
70009
- //# debugId=44D95B041CD6BDAE64756E2164756E21
70013
+ //# debugId=4B7C38AF6FD3DF1064756E2164756E21
70010
70014
  //# sourceMappingURL=gemi.js.map