@timber-js/app 0.2.0-alpha.3 → 0.2.0-alpha.5
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/{als-registry-k-AtAQ9R.js → als-registry-B7DbZ2hS.js} +1 -1
- package/dist/_chunks/{als-registry-k-AtAQ9R.js.map → als-registry-B7DbZ2hS.js.map} +1 -1
- package/dist/_chunks/debug-gwlJkDuf.js +108 -0
- package/dist/_chunks/debug-gwlJkDuf.js.map +1 -0
- package/dist/_chunks/{format-DNt20Kt8.js → format-DviM89f0.js} +3 -2
- package/dist/_chunks/format-DviM89f0.js.map +1 -0
- package/dist/_chunks/{interception-DGDIjDbR.js → interception-BOoWmLUA.js} +2 -2
- package/dist/_chunks/{interception-DGDIjDbR.js.map → interception-BOoWmLUA.js.map} +1 -1
- package/dist/_chunks/{metadata-routes-CQCnF4VK.js → metadata-routes-Cjmvi3rQ.js} +1 -1
- package/dist/_chunks/{metadata-routes-CQCnF4VK.js.map → metadata-routes-Cjmvi3rQ.js.map} +1 -1
- package/dist/_chunks/{request-context-CRj2Zh1E.js → request-context-DIkVh_jG.js} +5 -4
- package/dist/_chunks/request-context-DIkVh_jG.js.map +1 -0
- package/dist/_chunks/{ssr-data-DLnbYpj1.js → ssr-data-MjmprTmO.js} +1 -1
- package/dist/_chunks/{ssr-data-DLnbYpj1.js.map → ssr-data-MjmprTmO.js.map} +1 -1
- package/dist/_chunks/{tracing-DF0G3FB7.js → tracing-Cwn7697K.js} +2 -2
- package/dist/_chunks/{tracing-DF0G3FB7.js.map → tracing-Cwn7697K.js.map} +1 -1
- package/dist/_chunks/{use-cookie-dDbpCTx-.js → use-cookie-DX-l1_5E.js} +2 -2
- package/dist/_chunks/{use-cookie-dDbpCTx-.js.map → use-cookie-DX-l1_5E.js.map} +1 -1
- package/dist/_chunks/{use-query-states-DAhgj8Gx.js → use-query-states-D5KaffOK.js} +1 -1
- package/dist/_chunks/{use-query-states-DAhgj8Gx.js.map → use-query-states-D5KaffOK.js.map} +1 -1
- package/dist/cache/index.js +2 -2
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/index.js +3 -3
- package/dist/cookies/index.js +4 -4
- package/dist/fonts/local.d.ts +4 -2
- package/dist/fonts/local.d.ts.map +1 -1
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +211 -14
- package/dist/index.js.map +1 -1
- package/dist/plugins/build-report.d.ts +11 -1
- package/dist/plugins/build-report.d.ts.map +1 -1
- package/dist/plugins/entries.d.ts +7 -0
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/plugins/fonts.d.ts +2 -1
- package/dist/plugins/fonts.d.ts.map +1 -1
- package/dist/plugins/mdx.d.ts +6 -0
- package/dist/plugins/mdx.d.ts.map +1 -1
- package/dist/plugins/server-bundle.d.ts.map +1 -1
- package/dist/routing/index.js +1 -1
- package/dist/search-params/index.js +1 -1
- package/dist/server/access-gate.d.ts.map +1 -1
- package/dist/server/action-client.d.ts.map +1 -1
- package/dist/server/debug.d.ts +82 -0
- package/dist/server/debug.d.ts.map +1 -0
- package/dist/server/deny-renderer.d.ts.map +1 -1
- package/dist/server/dev-warnings.d.ts.map +1 -1
- package/dist/server/index.js +14 -13
- package/dist/server/index.js.map +1 -1
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/primitives.d.ts.map +1 -1
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/response-cache.d.ts +53 -0
- package/dist/server/response-cache.d.ts.map +1 -0
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
- package/dist/server/rsc-prop-warnings.d.ts.map +1 -1
- package/dist/shims/image.d.ts +15 -15
- package/package.json +1 -1
- package/src/client/stale-reload.ts +1 -1
- package/src/fonts/local.ts +7 -3
- package/src/index.ts +40 -0
- package/src/plugins/build-report.ts +23 -3
- package/src/plugins/entries.ts +9 -4
- package/src/plugins/fonts.ts +106 -5
- package/src/plugins/mdx.ts +9 -5
- package/src/plugins/server-bundle.ts +4 -0
- package/src/server/access-gate.tsx +3 -2
- package/src/server/action-client.ts +8 -4
- package/src/server/debug.ts +137 -0
- package/src/server/deny-renderer.ts +3 -2
- package/src/server/dev-warnings.ts +2 -1
- package/src/server/logger.ts +4 -3
- package/src/server/primitives.ts +2 -1
- package/src/server/request-context.ts +3 -2
- package/src/server/response-cache.ts +277 -0
- package/src/server/rsc-entry/index.ts +51 -13
- package/src/server/rsc-entry/rsc-payload.ts +4 -1
- package/src/server/rsc-entry/rsc-stream.ts +2 -1
- package/src/server/rsc-entry/ssr-renderer.ts +6 -2
- package/src/server/rsc-prop-warnings.ts +3 -1
- package/dist/_chunks/format-DNt20Kt8.js.map +0 -1
- package/dist/_chunks/request-context-CRj2Zh1E.js.map +0 -1
|
@@ -39,7 +39,17 @@ interface RouteInfo {
|
|
|
39
39
|
segments: SegmentNode[];
|
|
40
40
|
entryFilePath: string | null;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Walk the route tree and collect all leaf routes (pages + API endpoints).
|
|
44
|
+
*
|
|
45
|
+
* Parallel slots (`@artists`, `@shows`, etc.) are intentionally skipped —
|
|
46
|
+
* they render alongside the parent page at the same URL and are not
|
|
47
|
+
* separately URL-addressable. Their JS is captured in shared/layout chunks.
|
|
48
|
+
*
|
|
49
|
+
* After collection, entries are deduplicated by URL path so that overlapping
|
|
50
|
+
* route groups (e.g. `(browse)` and `(marketing)` both producing `/`) only
|
|
51
|
+
* appear once. The entry with the largest route-specific size wins.
|
|
52
|
+
*/
|
|
43
53
|
export declare function collectRoutes(tree: RouteTree): RouteInfo[];
|
|
44
54
|
/** Produce formatted report lines for the Vite logger. */
|
|
45
55
|
export declare function buildRouteReport(entries: RouteEntry[], sharedSize: number): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-report.d.ts","sourceRoot":"","sources":["../../src/plugins/build-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,MAAM,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;CACvB;AAUD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,WAAW,EAAE,EACvB,UAAU,GAAE,QAAQ,GAAG,QAAmB,GACzC,SAAS,CAYX;AAID,OAAO,EAAE,UAAU,EAAE,CAAC;AAQtB,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED
|
|
1
|
+
{"version":3,"file":"build-report.d.ts","sourceRoot":"","sources":["../../src/plugins/build-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,MAAM,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,m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C,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAYjG;AAOD,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,MAAM,GAAG,IAAI,CAOf;AAwED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwE5D"}
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { Plugin } from 'vite';
|
|
14
14
|
import type { PluginContext } from '#/index.js';
|
|
15
|
+
/**
|
|
16
|
+
* Detect the user's instrumentation.ts file at the project root.
|
|
17
|
+
*
|
|
18
|
+
* Checks for instrumentation.ts, .js, and .mjs — matching the same
|
|
19
|
+
* extensions as timber.config.ts detection.
|
|
20
|
+
*/
|
|
21
|
+
export declare function detectInstrumentationFile(root: string): string | null;
|
|
15
22
|
/**
|
|
16
23
|
* Generate the virtual:timber-instrumentation module source.
|
|
17
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6GhD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwBxF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwExD"}
|
package/dist/plugins/fonts.d.ts
CHANGED
|
@@ -59,7 +59,8 @@ export declare function parseGoogleFontFamilies(source: string): Map<string, str
|
|
|
59
59
|
/**
|
|
60
60
|
* Generate the CSS output for all extracted fonts.
|
|
61
61
|
*
|
|
62
|
-
* Includes @font-face rules, fallback @font-face rules,
|
|
62
|
+
* Includes @font-face rules for local fonts, fallback @font-face rules,
|
|
63
|
+
* and scoped classes.
|
|
63
64
|
*/
|
|
64
65
|
export declare function generateAllFontCss(registry: FontRegistry): string;
|
|
65
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/plugins/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/plugins/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAGlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAoBxE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AA4CtD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAE7E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAE5F;AAUD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqB3E;AAwED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAwBjE;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKtE;AAqED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA6TtD"}
|
package/dist/plugins/mdx.d.ts
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Plugin } from 'vite';
|
|
11
11
|
import type { PluginContext } from '#/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Check if mdx-components.tsx (or .ts, .jsx, .js) exists at the project root
|
|
14
|
+
* or in src/. Root takes precedence, matching Next.js behavior.
|
|
15
|
+
* Returns the absolute path if found, otherwise undefined.
|
|
16
|
+
*/
|
|
17
|
+
export declare function findMdxComponents(root: string): string | undefined;
|
|
12
18
|
/**
|
|
13
19
|
* Create the timber-mdx Vite plugin.
|
|
14
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../src/plugins/mdx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../src/plugins/mdx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAelE;AA+BD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA0GpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CA6H7C"}
|
package/dist/routing/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DEFAULT_PAGE_EXTENSIONS, i as scanRoutes, n as generateRouteMap, o as INTERCEPTION_MARKERS, r as classifySegment, t as collectInterceptionRewrites } from "../_chunks/interception-
|
|
1
|
+
import { a as DEFAULT_PAGE_EXTENSIONS, i as scanRoutes, n as generateRouteMap, o as INTERCEPTION_MARKERS, r as classifySegment, t as collectInterceptionRewrites } from "../_chunks/interception-BOoWmLUA.js";
|
|
2
2
|
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, collectInterceptionRewrites, generateRouteMap, scanRoutes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as registerSearchParams, n as useQueryStates, r as getSearchParams } from "../_chunks/use-query-states-
|
|
1
|
+
import { i as registerSearchParams, n as useQueryStates, r as getSearchParams } from "../_chunks/use-query-states-D5KaffOK.js";
|
|
2
2
|
//#region src/search-params/create.ts
|
|
3
3
|
/**
|
|
4
4
|
* createSearchParams — factory for SearchParamsDefinition<T>.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-gate.d.ts","sourceRoot":"","sources":["../../src/server/access-gate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"access-gate.d.ts","sourceRoot":"","sources":["../../src/server/access-gate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAmBvF;AAoCD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAyCtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-client.d.ts","sourceRoot":"","sources":["../../src/server/action-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;;;GAOG;AACH,qBAAa,WAAW,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IACnE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAEvC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAA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AAC,SAAS,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CAC3F,CAAC;AA2EF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,CAqBrE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC7D,MAAM,GAAE,kBAAkB,CAAC,IAAI,CAAM,GACpC,aAAa,CAAC,IAAI,CAAC,CAiGrB;AAID;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EACrC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,EAC5B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,GACzC,QAAQ,CAAC,KAAK,CAAC,CAIjB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime debug flag for timber.js.
|
|
3
|
+
*
|
|
4
|
+
* Two distinct functions for two distinct security levels:
|
|
5
|
+
*
|
|
6
|
+
* ## `isDebug()` — server-side logging only
|
|
7
|
+
*
|
|
8
|
+
* Returns true when timber's debug/warning messages should be written to
|
|
9
|
+
* stderr / the server console. This NEVER affects what is sent to the
|
|
10
|
+
* client (no error details, no timing headers, no stack traces).
|
|
11
|
+
*
|
|
12
|
+
* Active when any of:
|
|
13
|
+
* - `NODE_ENV !== 'production'` (standard dev mode)
|
|
14
|
+
* - `TIMBER_DEBUG` env var is set to a truthy value at runtime
|
|
15
|
+
* - `timber.config.ts` has `debug: true`
|
|
16
|
+
*
|
|
17
|
+
* ## `isDevMode()` — client-visible dev behavior
|
|
18
|
+
*
|
|
19
|
+
* Returns true ONLY when `NODE_ENV !== 'production'`. This gates anything
|
|
20
|
+
* that changes what clients can observe:
|
|
21
|
+
* - Dev error pages with stack traces (fallback-error.ts)
|
|
22
|
+
* - Detailed Server-Timing headers (pipeline.ts)
|
|
23
|
+
* - Error messages in action INTERNAL_ERROR payloads (action-client.ts)
|
|
24
|
+
* - Pipeline error handler wiring (Vite overlay)
|
|
25
|
+
*
|
|
26
|
+
* `isDevMode()` is statically replaced in production builds → the guarded
|
|
27
|
+
* code is tree-shaken to zero bytes. TIMBER_DEBUG cannot enable it.
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* In Cloudflare Workers wrangler.toml:
|
|
31
|
+
* [vars]
|
|
32
|
+
* TIMBER_DEBUG = "1"
|
|
33
|
+
*
|
|
34
|
+
* In Node.js:
|
|
35
|
+
* TIMBER_DEBUG=1 node server.js
|
|
36
|
+
*
|
|
37
|
+
* In timber.config.ts:
|
|
38
|
+
* export default { debug: true }
|
|
39
|
+
*
|
|
40
|
+
* See design/13-security.md for the security taxonomy.
|
|
41
|
+
* See design/18-build-system.md for build pipeline details.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Check if the application is running in development mode.
|
|
45
|
+
*
|
|
46
|
+
* This is the ONLY function that should gate client-visible dev behavior:
|
|
47
|
+
* - Dev error pages with stack traces
|
|
48
|
+
* - Detailed Server-Timing response headers
|
|
49
|
+
* - Error messages in action `INTERNAL_ERROR` payloads
|
|
50
|
+
* - Pipeline error handler wiring (Vite overlay)
|
|
51
|
+
*
|
|
52
|
+
* Returns `process.env.NODE_ENV !== 'production'`, which is statically
|
|
53
|
+
* replaced by the bundler in production builds. Code guarded by this
|
|
54
|
+
* function is tree-shaken to zero bytes in production.
|
|
55
|
+
*
|
|
56
|
+
* TIMBER_DEBUG does NOT enable this — that would leak server internals
|
|
57
|
+
* to clients. Use `isDebug()` for server-side-only logging.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isDevMode(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Set the debug flag from timber.config.ts.
|
|
62
|
+
* Called during handler initialization.
|
|
63
|
+
*/
|
|
64
|
+
export declare function setDebugFromConfig(debug: boolean): void;
|
|
65
|
+
/**
|
|
66
|
+
* Check if timber debug logging is active (server-side only).
|
|
67
|
+
*
|
|
68
|
+
* Returns true if ANY of these conditions hold:
|
|
69
|
+
* - NODE_ENV is not 'production' (standard dev mode)
|
|
70
|
+
* - TIMBER_DEBUG environment variable is set to a truthy value at runtime
|
|
71
|
+
* - timber.config.ts has `debug: true`
|
|
72
|
+
*
|
|
73
|
+
* This function controls ONLY server-side logging — messages written to
|
|
74
|
+
* stderr or the server console. It NEVER affects client-visible behavior
|
|
75
|
+
* (error pages, response headers, action payloads). For client-visible
|
|
76
|
+
* behavior, use `isDevMode()`.
|
|
77
|
+
*
|
|
78
|
+
* The TIMBER_DEBUG check is deliberately written as a dynamic property
|
|
79
|
+
* access so bundlers cannot statically replace it.
|
|
80
|
+
*/
|
|
81
|
+
export declare function isDebug(): boolean;
|
|
82
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/server/debug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAYjC"}
|
|
@@ -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;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E,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,eAAe,EAAE,OAAO,EACxB,sBAAsB,EAAE,mBAAmB,GAC1C,OAAO,CAAC,QAAQ,CAAC,CAgDnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-warnings.d.ts","sourceRoot":"","sources":["../../src/server/dev-warnings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"dev-warnings.d.ts","sourceRoot":"","sources":["../../src/server/dev-warnings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAK1C,eAAO,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAInE,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AASD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAEhE;AA0CD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CASrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAUpE;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CASxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAU5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQnF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CASN;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAQtF;AAID,mDAAmD;AACnD,eAAO,MAAM,2BAA2B,6BAAuB,CAAC;AAEhE,mDAAmD;AACnD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAMpE;AAID;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAEjD"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
1
|
+
import { n as isDevMode, t as isDebug } from "../_chunks/debug-gwlJkDuf.js";
|
|
2
|
+
import { a as warnDenyAfterFlush, c as warnRedirectInAccess, d as warnSlowSlotWithoutSuspense, f as warnStaticRequestApi, i as warnCacheRequestProps, l as warnRedirectInSlotAccess, n as WarningId, o as warnDenyInSuspense, p as warnSuspenseWrappingChildren, r as setViteServer, s as warnDynamicApiInStaticBuild, t as formatSize, u as warnRedirectInSuspense } from "../_chunks/format-DviM89f0.js";
|
|
3
|
+
import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-Cjmvi3rQ.js";
|
|
4
|
+
import { a as timingAls, i as revalidationAls, n as formFlashAls, s as waitUntilAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-B7DbZ2hS.js";
|
|
5
|
+
import { a as markResponseFlushed, c as setCookieSecrets, i as headers, l as setMutableCookieContext, n as cookies, o as runWithRequestContext, r as getSetCookieHeaders, s as searchParams, t as applyRequestHeaderOverlay, u as setParsedSearchParams } from "../_chunks/request-context-DIkVh_jG.js";
|
|
6
|
+
import { a as replaceTraceId, c as spanId, i as getTraceStore, l as traceId, n as generateTraceId, o as runWithTraceId, r as getOtelTraceId, s as setSpanAttribute, t as addSpanEvent, u as withSpan } from "../_chunks/tracing-Cwn7697K.js";
|
|
6
7
|
import { readFile } from "node:fs/promises";
|
|
7
8
|
//#region src/server/waituntil-bridge.ts
|
|
8
9
|
/**
|
|
@@ -72,7 +73,7 @@ function findNonSerializable(value, path = "data") {
|
|
|
72
73
|
* No-op in production.
|
|
73
74
|
*/
|
|
74
75
|
function warnIfNotSerializable(data, callerName) {
|
|
75
|
-
if (
|
|
76
|
+
if (!isDebug()) return;
|
|
76
77
|
if (data === void 0) return;
|
|
77
78
|
const issue = findNonSerializable(data);
|
|
78
79
|
if (issue) console.warn(`[timber] ${callerName}: ${issue}. Data passed to deny() or RenderError must be JSON-serializable because the post-flush path uses JSON.stringify, not React Flight.`);
|
|
@@ -603,17 +604,17 @@ function logMiddlewareShortCircuit(data) {
|
|
|
603
604
|
/** Log unhandled error in middleware phase. Level: error. */
|
|
604
605
|
function logMiddlewareError(data) {
|
|
605
606
|
if (_logger) _logger.error("unhandled error in middleware phase", withTraceContext(data));
|
|
606
|
-
else if (
|
|
607
|
+
else if (isDebug()) console.error("[timber] middleware error", data.error);
|
|
607
608
|
}
|
|
608
609
|
/** Log unhandled render-phase error. Level: error. */
|
|
609
610
|
function logRenderError(data) {
|
|
610
611
|
if (_logger) _logger.error("unhandled render-phase error", withTraceContext(data));
|
|
611
|
-
else if (
|
|
612
|
+
else if (isDebug()) console.error("[timber] render error:", formatSsrError(data.error));
|
|
612
613
|
}
|
|
613
614
|
/** Log proxy.ts uncaught error. Level: error. */
|
|
614
615
|
function logProxyError(data) {
|
|
615
616
|
if (_logger) _logger.error("proxy.ts threw uncaught error", withTraceContext(data));
|
|
616
|
-
else if (
|
|
617
|
+
else if (isDebug()) console.error("[timber] proxy error", data.error);
|
|
617
618
|
}
|
|
618
619
|
/** Log waitUntil() adapter missing (once at startup). Level: warn. */
|
|
619
620
|
function logWaitUntilUnsupported() {
|
|
@@ -1503,10 +1504,10 @@ async function SlotAccessGate(props) {
|
|
|
1503
1504
|
} catch (error) {
|
|
1504
1505
|
if (error instanceof DenySignal) return deniedFallback ?? defaultFallback ?? null;
|
|
1505
1506
|
if (error instanceof RedirectSignal) {
|
|
1506
|
-
if (
|
|
1507
|
+
if (isDebug()) console.error("[timber] redirect() is not allowed in slot access.ts. Slots use deny() for graceful degradation — denied.tsx → default.tsx → null. If you need to redirect, move the logic to the parent segment's access.ts.");
|
|
1507
1508
|
return deniedFallback ?? defaultFallback ?? null;
|
|
1508
1509
|
}
|
|
1509
|
-
if (
|
|
1510
|
+
if (isDebug()) console.warn("[timber] Unhandled error in slot access.ts. Use deny() for access control, not unhandled throws.", error);
|
|
1510
1511
|
throw error;
|
|
1511
1512
|
}
|
|
1512
1513
|
return children;
|
|
@@ -2791,7 +2792,7 @@ function handleActionError(error) {
|
|
|
2791
2792
|
} };
|
|
2792
2793
|
return { serverError: {
|
|
2793
2794
|
code: "INTERNAL_ERROR",
|
|
2794
|
-
...
|
|
2795
|
+
...isDevMode() && error instanceof Error ? { data: { message: error.message } } : {}
|
|
2795
2796
|
} };
|
|
2796
2797
|
}
|
|
2797
2798
|
/**
|
|
@@ -2912,7 +2913,7 @@ function validated(schema, handler) {
|
|
|
2912
2913
|
* In production, validation errors are only returned to the client.
|
|
2913
2914
|
*/
|
|
2914
2915
|
function logValidationFailure(errors) {
|
|
2915
|
-
if (!(
|
|
2916
|
+
if (!isDebug()) return;
|
|
2916
2917
|
const fields = Object.entries(errors).map(([field, messages]) => ` ${field}: ${messages.join(", ")}`).join("\n");
|
|
2917
2918
|
console.warn(`[timber] action schema validation failed:\n${fields}`);
|
|
2918
2919
|
}
|