@timber-js/app 0.2.0-alpha.16 → 0.2.0-alpha.17

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/index.ts"],"names":[],"mappings":"AA0FA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAE/F;AAoZD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;8BAtQ3C,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC;AAwQhD,wBAAiE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/index.ts"],"names":[],"mappings":"AA0FA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAE/F;AA6ZD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;8BA/Q3C,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC;AAiRhD,wBAAiE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timber-js/app",
3
- "version": "0.2.0-alpha.16",
3
+ "version": "0.2.0-alpha.17",
4
4
  "description": "Vite-native React framework for Cloudflare Workers — correct HTTP semantics, real status codes, pages that work without JavaScript",
5
5
  "keywords": [
6
6
  "cloudflare-workers",
@@ -325,6 +325,7 @@ async function renderRoute(
325
325
  // Build the React element tree — loads modules, runs access checks,
326
326
  // resolves metadata. DenySignal/RedirectSignal propagate for HTTP handling.
327
327
  let routeResult;
328
+ const _t0 = performance.now();
328
329
  try {
329
330
  routeResult = await buildRouteElement(_req, match, interception, clientStateTree);
330
331
  } catch (error) {
@@ -367,6 +368,7 @@ async function renderRoute(
367
368
  const { element, headElements, layoutComponents, deferSuspenseFor, skippedSegments } =
368
369
  routeResult;
369
370
 
371
+ const _t1 = performance.now();
370
372
  // Build head HTML for injection into the SSR output.
371
373
  // Collects CSS, fonts, and modulepreload from the build manifest for matched segments.
372
374
  // In dev mode the manifest is empty — Vite HMR handles CSS/JS.
@@ -416,7 +418,9 @@ async function renderRoute(
416
418
  }
417
419
 
418
420
  // Render to RSC Flight stream with signal tracking.
421
+ const _t2 = performance.now();
419
422
  const { rscStream, signals } = renderRscStream(element, _req);
423
+ const _t3 = performance.now();
420
424
 
421
425
  // Synchronous redirect — redirect() in access.ts or a non-async component
422
426
  // throws during renderToReadableStream creation. Return HTTP redirect.
@@ -483,7 +487,8 @@ async function renderRoute(
483
487
  }
484
488
 
485
489
  // Pipe through SSR for HTML rendering with streaming Suspense support.
486
- return renderSsrResponse({
490
+ const _t4 = performance.now();
491
+ const _ssrResult = await renderSsrResponse({
487
492
  req: _req,
488
493
  rscStream: rscStream!,
489
494
  signals,
@@ -496,6 +501,10 @@ async function renderRoute(
496
501
  headHtml,
497
502
  deferSuspenseFor,
498
503
  });
504
+ const _t5 = performance.now();
505
+ // eslint-disable-next-line no-console
506
+ console.log(`[perf] build=${(_t1 - _t0).toFixed(1)}ms head=${(_t2 - _t1).toFixed(1)}ms rsc=${(_t3 - _t2).toFixed(1)}ms setup=${(_t4 - _t3).toFixed(1)}ms ssr=${(_t5 - _t4).toFixed(1)}ms total=${(_t5 - _t0).toFixed(1)}ms`);
507
+ return _ssrResult;
499
508
  }
500
509
 
501
510
  // Re-export for generated entry points (e.g., Nitro node-server/bun) to wrap