@timber-js/app 0.2.0-alpha.202 → 0.2.0-alpha.203
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/_chunks/dev-server-DioP7tkQ.js.map +1 -1
- package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/deny-renderer.d.ts +1 -1
- package/dist/server/deny-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/helpers.d.ts +8 -10
- package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/browser-entry/rsc-stream.ts +5 -1
- package/src/server/deny-renderer.ts +1 -3
- package/src/server/rsc-entry/helpers.ts +9 -14
- package/src/server/rsc-entry/rsc-stream.ts +10 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAItF,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/client/browser-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAItF,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,GAAG,IAAI,CAmH/D"}
|
|
@@ -27,7 +27,7 @@ export interface LayoutEntry {
|
|
|
27
27
|
/** Callback to create a debug channel sink for RSC rendering. */
|
|
28
28
|
export type DebugChannelFactory = () => {
|
|
29
29
|
writable: WritableStream;
|
|
30
|
-
};
|
|
30
|
+
} | undefined;
|
|
31
31
|
/** Callback to pass RSC stream to SSR for HTML rendering. */
|
|
32
32
|
export type CallSsrFn = (rscStream: ReadableStream<Uint8Array>, navContext: NavContext) => Promise<Response>;
|
|
33
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAc7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjE,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAc7C,OAAO,KA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AE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,sBAAsB,EAAE,mBAAmB,EAC3C,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAiDnB"}
|
|
@@ -7,19 +7,17 @@ import type { ManifestSegmentNode } from '../route-matcher.ts';
|
|
|
7
7
|
import type { SegmentInfo } from '../../shared/segment-info.ts';
|
|
8
8
|
import type { SlotSkipEntry } from '../slot-resolver.ts';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* No-op — returns undefined so no debugChannel is passed to Flight.
|
|
11
|
+
* Debug rows ride the main stream inline (React's default behavior).
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* is omitted entirely so debug rows (owner stacks) ride the main stream
|
|
15
|
-
* and reach the browser for console warning resolution.
|
|
13
|
+
* Production Flight emits no debug rows. In dev, inline debug rows
|
|
14
|
+
* are handled by the Flight client for owner stack resolution.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* A writable-only debugChannel triggers a react-server-dom-webpack
|
|
17
|
+
* >=19.3.0 Flight client regression (owner/stack refs parsed after
|
|
18
|
+
* stream close produce "Connection closed" errors).
|
|
19
19
|
*/
|
|
20
|
-
export declare function createDebugChannelSink():
|
|
21
|
-
writable: WritableStream;
|
|
22
|
-
};
|
|
20
|
+
export declare function createDebugChannelSink(): undefined;
|
|
23
21
|
/**
|
|
24
22
|
* Parsed component debug info extracted from the Flight debug channel.
|
|
25
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,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AO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -13,7 +13,7 @@ import type { RscPayloadRoot } from '../../shared/payload-root.ts';
|
|
|
13
13
|
import { type DenyPageEntry } from '../deny-boundary.ts';
|
|
14
14
|
import { DenySignal, RedirectSignal } from '../primitives.ts';
|
|
15
15
|
import { type DebugComponentEntry } from './helpers.ts';
|
|
16
|
-
import {
|
|
16
|
+
import type { DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
|
|
17
17
|
/**
|
|
18
18
|
* Mutable signal state captured during RSC rendering.
|
|
19
19
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAIL,UAAU,EACV,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAIL,UAAU,EACV,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7E;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,YAAY,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvD;;;;;;;;OAQG;IACH,kBAAkB,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;gEAC4D;IAC5D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IAClD,OAAO,EAAE,aAAa,CAAC;IACvB,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,mBAAmB,EAAE,CAAC;IACjD,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,OAAO,EACZ,aAAa,CAAC,EAAE,aAAa,EAAE,EAC/B,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,eAAe,CAwLjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timber-js/app",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.203",
|
|
4
4
|
"description": "Vite-native React framework built for Servers and Serverless Platforms — correct HTTP semantics, real status codes, pages that work without JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare-workers",
|
|
@@ -95,7 +95,11 @@ export function createRscPayloadStream(): RscStreamResult | null {
|
|
|
95
95
|
},
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
// No debug channel — debug rows ride the main stream inline.
|
|
99
|
+
// A readable debug channel causes "Connection closed" when HMR
|
|
100
|
+
// messages are lost or sessions expire. React handles inline
|
|
101
|
+
// debug rows natively for owner stack resolution.
|
|
102
|
+
const debugChannel = null;
|
|
99
103
|
|
|
100
104
|
// Close the stream when the document finishes loading.
|
|
101
105
|
// DOMContentLoaded fires after the HTML parser has processed all
|
|
@@ -49,9 +49,7 @@ export interface LayoutEntry {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/** Callback to create a debug channel sink for RSC rendering. */
|
|
52
|
-
export type DebugChannelFactory = () => {
|
|
53
|
-
writable: WritableStream;
|
|
54
|
-
};
|
|
52
|
+
export type DebugChannelFactory = () => { writable: WritableStream } | undefined;
|
|
55
53
|
|
|
56
54
|
/** Callback to pass RSC stream to SSR for HTML rendering. */
|
|
57
55
|
export type CallSsrFn = (
|
|
@@ -13,23 +13,18 @@ import { isClientReference } from '../utils/element-type.ts';
|
|
|
13
13
|
import { isStaticRequestDependent } from '../request-dep.ts';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* No-op — returns undefined so no debugChannel is passed to Flight.
|
|
17
|
+
* Debug rows ride the main stream inline (React's default behavior).
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* is omitted entirely so debug rows (owner stacks) ride the main stream
|
|
21
|
-
* and reach the browser for console warning resolution.
|
|
19
|
+
* Production Flight emits no debug rows. In dev, inline debug rows
|
|
20
|
+
* are handled by the Flight client for owner stack resolution.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* A writable-only debugChannel triggers a react-server-dom-webpack
|
|
23
|
+
* >=19.3.0 Flight client regression (owner/stack refs parsed after
|
|
24
|
+
* stream close produce "Connection closed" errors).
|
|
25
25
|
*/
|
|
26
|
-
export function createDebugChannelSink():
|
|
27
|
-
|
|
28
|
-
// Drain the readable side so the writable never back-pressures.
|
|
29
|
-
sink.readable.pipeTo(new WritableStream()).catch(() => {});
|
|
30
|
-
// Only writable — omitting `readable` avoids Flight's keepDebugAlive
|
|
31
|
-
// mode which holds deferred debug refs open per request.
|
|
32
|
-
return { writable: sink.writable };
|
|
26
|
+
export function createDebugChannelSink(): undefined {
|
|
27
|
+
return undefined;
|
|
33
28
|
}
|
|
34
29
|
|
|
35
30
|
// ─── Debug Channel Collector (dev mode only) ────────────────────────────
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
} from '../primitives.ts';
|
|
28
28
|
import { checkAndWarnRscPropError } from '../rsc-prop-warnings.ts';
|
|
29
29
|
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
30
|
+
import { isAbortError, type DebugComponentEntry } from './helpers.ts';
|
|
31
|
+
import type { DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
|
|
32
32
|
import { isDebug } from '../debug.ts';
|
|
33
33
|
import { isDevMode } from '../debug.ts';
|
|
34
34
|
|
|
@@ -111,18 +111,13 @@ export function renderRscStream(
|
|
|
111
111
|
|
|
112
112
|
let rscStream: ReadableStream<Uint8Array> | undefined;
|
|
113
113
|
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const debugChannel = devDebugRegistry
|
|
122
|
-
? createDevDebugChannel(devDebugRegistry)
|
|
123
|
-
: createDebugChannelSink();
|
|
124
|
-
const debugRequestId =
|
|
125
|
-
'requestId' in debugChannel ? (debugChannel as { requestId: string }).requestId : undefined;
|
|
114
|
+
// No debugChannel — debug rows ride the main RSC stream inline.
|
|
115
|
+
// Production Flight emits none. In dev, the browser Flight client
|
|
116
|
+
// handles inline debug rows for owner stack resolution (React's
|
|
117
|
+
// default behavior). A writable-only debugChannel triggers a
|
|
118
|
+
// react-server-dom-webpack >=19.3.0 Flight client regression.
|
|
119
|
+
const debugChannel = undefined;
|
|
120
|
+
const debugRequestId = undefined;
|
|
126
121
|
|
|
127
122
|
try {
|
|
128
123
|
rscStream = renderToReadableStream(
|
|
@@ -284,7 +279,7 @@ export function renderRscStream(
|
|
|
284
279
|
// In dev mode, debug rows ride the main stream (no separate channel), so
|
|
285
280
|
// this is undefined — the error overlay uses stack traces directly.
|
|
286
281
|
getDebugComponents:
|
|
287
|
-
'getComponents' in debugChannel
|
|
282
|
+
debugChannel && 'getComponents' in debugChannel
|
|
288
283
|
? (debugChannel as { getComponents: () => DebugComponentEntry[] }).getComponents
|
|
289
284
|
: undefined,
|
|
290
285
|
debugRequestId,
|