@rangojs/router 0.0.0-experimental.preview.1774295099 → 0.0.0-experimental.preview.1774295247
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/vite/index.js
CHANGED
|
@@ -1745,7 +1745,7 @@ import { resolve } from "node:path";
|
|
|
1745
1745
|
// package.json
|
|
1746
1746
|
var package_default = {
|
|
1747
1747
|
name: "@rangojs/router",
|
|
1748
|
-
version: "0.0.0-experimental.preview.
|
|
1748
|
+
version: "0.0.0-experimental.preview.1774295247",
|
|
1749
1749
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1750
1750
|
keywords: [
|
|
1751
1751
|
"react",
|
package/package.json
CHANGED
|
@@ -119,15 +119,14 @@ export function createNavigationClient(
|
|
|
119
119
|
|
|
120
120
|
/** Start a fresh navigation fetch (no cache / inflight hit). */
|
|
121
121
|
const doFreshFetch = (): Promise<Response> => {
|
|
122
|
-
// Dev-only:
|
|
122
|
+
// Dev-only: generate debugId for React Performance Tracks.
|
|
123
|
+
// The debug channel is created AFTER response headers arrive,
|
|
124
|
+
// so the server has time to finish writing debug data before
|
|
125
|
+
// the client sends "ready".
|
|
123
126
|
const debugId = (import.meta as any).hot
|
|
124
127
|
? crypto.randomUUID()
|
|
125
128
|
: undefined;
|
|
126
129
|
debugChannel = null;
|
|
127
|
-
if (debugId) {
|
|
128
|
-
debugChannel = createClientDebugChannel(debugId);
|
|
129
|
-
console.log("[perf-tracks] client: fresh fetch, debugId =", debugId);
|
|
130
|
-
}
|
|
131
130
|
|
|
132
131
|
if (tx) {
|
|
133
132
|
browserDebugLog(tx, "fetching", {
|
|
@@ -148,6 +147,14 @@ export function createNavigationClient(
|
|
|
148
147
|
},
|
|
149
148
|
signal,
|
|
150
149
|
}).then((response) => {
|
|
150
|
+
// Create debug channel now — response headers arrived, meaning
|
|
151
|
+
// the server started streaming. By the time we send "ready",
|
|
152
|
+
// all debug data should be buffered in the relay.
|
|
153
|
+
if (debugId) {
|
|
154
|
+
debugChannel = createClientDebugChannel(debugId);
|
|
155
|
+
console.log("[perf-tracks] client: debug channel created after response for", debugId.slice(0, 8));
|
|
156
|
+
}
|
|
157
|
+
|
|
151
158
|
// Check for version mismatch - server wants us to reload
|
|
152
159
|
const reload = extractRscHeaderUrl(response, "X-RSC-Reload");
|
|
153
160
|
if (reload === "blocked") {
|