akanjs 2.2.11 → 2.2.13-rc.0

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.
@@ -2,8 +2,15 @@ import { type AkanI18nConfig } from "akanjs/common";
2
2
  import type { AkanMetricsReport } from "akanjs/service";
3
3
  import { type BuilderRpc, type RouteSeedIndex } from "./artifact.d.ts";
4
4
  import type { HmrWsData, HmrWsHub } from "./hmr/wsHub.d.ts";
5
- import { RscWorker } from "./rscWorkerHost.d.ts";
5
+ import { type RscRedirectMethod, type RscRedirectStatus, type RscRenderResult, RscWorker } from "./rscWorkerHost.d.ts";
6
6
  import type { BaseBuildArtifact, HttpRoutes, RenderState } from "./types.d.ts";
7
+ export declare function createRscRedirectResponse(location: string, method: RscRedirectMethod, status?: RscRedirectStatus): Response;
8
+ export declare function createRscStreamResponse(stream: BodyInit, status?: number): Response;
9
+ export declare function cacheHtmlWhileStreaming(stream: ReadableStream<Uint8Array>, onComplete: (html: string) => void): ReadableStream<Uint8Array>;
10
+ export declare function cancelStreamForHeadResponse(stream: ReadableStream<Uint8Array>, reason: unknown): void;
11
+ export declare function createRscNavigationStreamResponse(result: Extract<RscRenderResult, {
12
+ type: "stream";
13
+ }>): Promise<Response>;
7
14
  export declare function normalizeRscTargetUrlForHostBasePath(targetUrl: URL, options: {
8
15
  basePath: string | null;
9
16
  basePaths?: readonly string[];
@@ -61,6 +61,7 @@ export interface AkanMetricsReport {
61
61
  rscWorkerLastRecycleReason?: string;
62
62
  rscPendingRenderCount?: number;
63
63
  rscQueuedSendCount?: number;
64
+ rscHostPendingChunkOverflowCount?: number;
64
65
  rscRenderCount?: number;
65
66
  rscInFlightRenderCount?: number;
66
67
  rscLastRenderedPath?: string;
@@ -99,6 +100,7 @@ export interface AkanMetricsReport {
99
100
  ssrChunkRegistrySize?: number;
100
101
  ssrChunkLoadCount?: number;
101
102
  ssrChunkCacheHitCount?: number;
103
+ ssrChunkEvictionCount?: number;
102
104
  httpFullSsrCount?: number;
103
105
  httpRscNavigationCount?: number;
104
106
  httpStaticAssetCount?: number;
@@ -61,8 +61,6 @@ export default function SsrLink({
61
61
  if (!router.isInitialized || !rscNavigationReady) return;
62
62
  event.preventDefault();
63
63
  try {
64
- Logger.log(`pathChange-start:${requestHref}`);
65
- window.parent.postMessage({ type: "pathChange", href: requestHref }, "*");
66
64
  if (replace) router.replace(href, { scrollToTop });
67
65
  else router.push(href, { scrollToTop });
68
66
  } catch (error) {