@timber-js/app 0.2.0-alpha.84 → 0.2.0-alpha.86
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/LICENSE +8 -0
- package/dist/_chunks/{actions-YHRCboUO.js → actions-DLnUaR65.js} +2 -2
- package/dist/_chunks/{actions-YHRCboUO.js.map → actions-DLnUaR65.js.map} +1 -1
- package/dist/_chunks/{chunk-DYhsFzuS.js → chunk-BYIpzuS7.js} +7 -1
- package/dist/_chunks/{define-cookie-C9pquwOg.js → define-cookie-BowvzoP0.js} +4 -4
- package/dist/_chunks/{define-cookie-C9pquwOg.js.map → define-cookie-BowvzoP0.js.map} +1 -1
- package/dist/_chunks/{request-context-Dl0hXED3.js → request-context-CK5tZqIP.js} +2 -2
- package/dist/_chunks/{request-context-Dl0hXED3.js.map → request-context-CK5tZqIP.js.map} +1 -1
- package/dist/client/form.d.ts +4 -1
- package/dist/client/form.d.ts.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/config-validation.d.ts +51 -0
- package/dist/config-validation.d.ts.map +1 -0
- package/dist/cookies/index.js +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1185 -51
- package/dist/index.js.map +1 -1
- package/dist/plugins/dev-404-page.d.ts +56 -0
- package/dist/plugins/dev-404-page.d.ts.map +1 -0
- package/dist/plugins/dev-error-overlay.d.ts +25 -11
- package/dist/plugins/dev-error-overlay.d.ts.map +1 -1
- package/dist/plugins/dev-error-page.d.ts +58 -0
- package/dist/plugins/dev-error-page.d.ts.map +1 -0
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/dev-terminal-error.d.ts +28 -0
- package/dist/plugins/dev-terminal-error.d.ts.map +1 -0
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/plugins/fonts.d.ts +4 -0
- package/dist/plugins/fonts.d.ts.map +1 -1
- package/dist/plugins/routing.d.ts.map +1 -1
- package/dist/routing/convention-lint.d.ts +41 -0
- package/dist/routing/convention-lint.d.ts.map +1 -0
- package/dist/server/action-client.d.ts +13 -5
- package/dist/server/action-client.d.ts.map +1 -1
- package/dist/server/dev-source-map.d.ts +22 -0
- package/dist/server/dev-source-map.d.ts.map +1 -0
- package/dist/server/fallback-error.d.ts +9 -5
- package/dist/server/fallback-error.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/internal.js +21 -4
- package/dist/server/internal.js.map +1 -1
- package/dist/server/pipeline.d.ts +10 -0
- package/dist/server/pipeline.d.ts.map +1 -1
- package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts +11 -0
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +10 -0
- 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/package.json +6 -7
- package/src/cli.ts +0 -0
- package/src/client/form.tsx +10 -5
- package/src/config-validation.ts +299 -0
- package/src/index.ts +17 -0
- package/src/plugins/dev-404-page.ts +418 -0
- package/src/plugins/dev-error-overlay.ts +185 -54
- package/src/plugins/dev-error-page.ts +536 -0
- package/src/plugins/dev-server.ts +76 -10
- package/src/plugins/dev-terminal-error.ts +217 -0
- package/src/plugins/entries.ts +3 -0
- package/src/plugins/fonts.ts +3 -2
- package/src/plugins/routing.ts +37 -5
- package/src/routing/convention-lint.ts +356 -0
- package/src/server/action-client.ts +17 -9
- package/src/server/dev-source-map.ts +31 -0
- package/src/server/fallback-error.ts +44 -88
- package/src/server/pipeline.ts +34 -4
- package/src/server/rsc-entry/error-renderer.ts +5 -0
- package/src/server/rsc-entry/index.ts +88 -2
- package/src/server/rsc-entry/rsc-stream.ts +16 -0
- package/src/server/rsc-entry/ssr-renderer.ts +6 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev 404 page — self-contained HTML page for dev-mode route misses.
|
|
3
|
+
*
|
|
4
|
+
* When no route matches and the user has no 404.tsx, this page shows:
|
|
5
|
+
* - The requested path
|
|
6
|
+
* - All registered routes in the app
|
|
7
|
+
* - "Did you mean?" suggestions based on string similarity
|
|
8
|
+
* - Setup instructions for new projects with no routes
|
|
9
|
+
*
|
|
10
|
+
* Dev-only: this module is only imported in dev mode. It is never
|
|
11
|
+
* included in production builds.
|
|
12
|
+
*
|
|
13
|
+
* Design doc: 21-dev-server.md, 07-routing.md
|
|
14
|
+
*/
|
|
15
|
+
interface RouteInfo {
|
|
16
|
+
/** URL path pattern (e.g., "/dashboard/[id]") */
|
|
17
|
+
path: string;
|
|
18
|
+
/** Whether this is a page route or API route handler */
|
|
19
|
+
type: 'page' | 'route';
|
|
20
|
+
}
|
|
21
|
+
/** Minimal segment node shape — matches ManifestSegmentNode. */
|
|
22
|
+
interface SegmentNode {
|
|
23
|
+
segmentName: string;
|
|
24
|
+
segmentType: string;
|
|
25
|
+
urlPath: string;
|
|
26
|
+
page?: {
|
|
27
|
+
filePath: string;
|
|
28
|
+
};
|
|
29
|
+
route?: {
|
|
30
|
+
filePath: string;
|
|
31
|
+
};
|
|
32
|
+
children: SegmentNode[];
|
|
33
|
+
slots: Record<string, SegmentNode> | Map<string, SegmentNode>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Collect all routable paths from the manifest tree.
|
|
37
|
+
*
|
|
38
|
+
* Walks the segment tree and collects paths for segments that have
|
|
39
|
+
* a page or route handler.
|
|
40
|
+
*/
|
|
41
|
+
export declare function collectRoutes(root: SegmentNode): RouteInfo[];
|
|
42
|
+
/**
|
|
43
|
+
* Find routes similar to the requested path.
|
|
44
|
+
*
|
|
45
|
+
* Returns up to 3 suggestions, sorted by similarity.
|
|
46
|
+
* Only includes routes with distance ≤ 40% of the longer string.
|
|
47
|
+
*/
|
|
48
|
+
export declare function findSimilarRoutes(requestedPath: string, routes: RouteInfo[]): RouteInfo[];
|
|
49
|
+
/**
|
|
50
|
+
* Generate a dev-mode 404 page with route listing and suggestions.
|
|
51
|
+
*
|
|
52
|
+
* Returns an HTML string for a self-contained error page.
|
|
53
|
+
*/
|
|
54
|
+
export declare function generateDev404Page(requestedPath: string, routes: RouteInfo[]): string;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=dev-404-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-404-page.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-404-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,UAAU,SAAS;IACjB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,gEAAgE;AAChE,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAC/D;AAID;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,EAAE,CAI5D;AA4DD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAezF;AAcD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAiFrF"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dev error overlay — formats and sends errors to Vite's browser overlay and stderr.
|
|
3
3
|
*
|
|
4
|
-
* Integrates with Vite's built-in error overlay (`server.
|
|
5
|
-
*
|
|
4
|
+
* Integrates with Vite's built-in error overlay (`server.hot.send`) rather
|
|
5
|
+
* than implementing a custom overlay.
|
|
6
|
+
*
|
|
7
|
+
* Stack trace source-mapping uses the correct Vite environment module graph:
|
|
8
|
+
* RSC errors use `server.environments.rsc.moduleGraph`, SSR/other errors use
|
|
9
|
+
* `server.environments.ssr.moduleGraph`. `server.ssrFixStacktrace()` is NOT
|
|
10
|
+
* used because it hardcodes the SSR module graph, which doesn't contain
|
|
11
|
+
* source maps for RSC modules (separate Vite environment with its own
|
|
12
|
+
* module graph). This caused RSC errors to show transpiled line numbers
|
|
13
|
+
* instead of original source positions.
|
|
6
14
|
*
|
|
7
15
|
* Design doc: 21-dev-server.md §"Error Overlay"
|
|
8
16
|
*/
|
|
9
17
|
import type { ViteDevServer } from 'vite';
|
|
10
18
|
/** The phase of the pipeline where the error occurred. */
|
|
11
19
|
export type ErrorPhase = 'module-transform' | 'proxy' | 'middleware' | 'access' | 'render' | 'handler';
|
|
20
|
+
/** Labels for terminal output. */
|
|
21
|
+
export declare const PHASE_LABELS: Record<ErrorPhase, string>;
|
|
12
22
|
export type FrameType = 'app' | 'framework' | 'internal';
|
|
13
23
|
/**
|
|
14
24
|
* Classify a stack frame line by origin.
|
|
@@ -38,15 +48,8 @@ export declare function parseFirstAppFrame(stack: string, projectRoot: string):
|
|
|
38
48
|
* Falls back to 'render' if no specific phase can be determined.
|
|
39
49
|
*/
|
|
40
50
|
export declare function classifyErrorPhase(error: Error, projectRoot: string): ErrorPhase;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
* - Red for the error message and phase label
|
|
45
|
-
* - Dim for framework-internal frames
|
|
46
|
-
* - Normal for application frames
|
|
47
|
-
* - Separate section for component stack (if present)
|
|
48
|
-
*/
|
|
49
|
-
export declare function formatTerminalError(error: Error, phase: ErrorPhase, projectRoot: string): string;
|
|
51
|
+
import { formatTerminalError as _formatTerminalError } from './dev-terminal-error.js';
|
|
52
|
+
export declare const formatTerminalError: typeof _formatTerminalError;
|
|
50
53
|
/**
|
|
51
54
|
* Component info extracted from the RSC debug channel.
|
|
52
55
|
* Contains only names, environments, and stack frames — never source code.
|
|
@@ -67,6 +70,17 @@ export interface RscDebugComponentInfo {
|
|
|
67
70
|
* Returns an empty string if no components are provided.
|
|
68
71
|
*/
|
|
69
72
|
export declare function formatRscDebugContext(components: RscDebugComponentInfo[]): string;
|
|
73
|
+
/**
|
|
74
|
+
* Source-map an error's stack trace using the Vite dev server's module graph.
|
|
75
|
+
*
|
|
76
|
+
* Exported so that the fallback error renderer (fallback-error.ts) can
|
|
77
|
+
* source-map errors before rendering the dev error page. Without this,
|
|
78
|
+
* the dev error page shows transpiled positions (e.g. page.tsx:1:1 instead
|
|
79
|
+
* of page.tsx:4:9).
|
|
80
|
+
*
|
|
81
|
+
* See TIM-811.
|
|
82
|
+
*/
|
|
83
|
+
export declare function fixErrorStacktrace(server: ViteDevServer, error: Error, phase?: ErrorPhase): void;
|
|
70
84
|
/**
|
|
71
85
|
* Send an error to Vite's browser overlay and log it to stderr.
|
|
72
86
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-error-overlay.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-error-overlay.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dev-error-overlay.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-error-overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,MAAM,CAAC;AAoC1D,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,Q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;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,GAC3C,IAAI,CA0CN"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev error page — self-contained HTML error page for dev server 500s.
|
|
3
|
+
*
|
|
4
|
+
* Generates a styled, self-contained HTML page when the RSC pipeline fails
|
|
5
|
+
* and the Vite error overlay can't fire (e.g., first page load before HMR
|
|
6
|
+
* WebSocket connects, RSC entry module crash, early pipeline errors).
|
|
7
|
+
*
|
|
8
|
+
* This is NOT a replacement for Vite's error overlay — it's the fallback
|
|
9
|
+
* for when the overlay's transport (WebSocket) isn't available yet.
|
|
10
|
+
*
|
|
11
|
+
* Dev-only: this module is only imported by dev-server.ts (apply: 'serve').
|
|
12
|
+
* It is never included in production builds.
|
|
13
|
+
*
|
|
14
|
+
* Design doc: 21-dev-server.md §"Error Overlay"
|
|
15
|
+
*/
|
|
16
|
+
import { type ErrorPhase } from './dev-error-overlay.js';
|
|
17
|
+
/**
|
|
18
|
+
* HMR connection options for the dev error page auto-reload WebSocket.
|
|
19
|
+
* Derived from Vite's resolved server config so the error page can
|
|
20
|
+
* connect to the correct HMR endpoint (TIM-789).
|
|
21
|
+
*/
|
|
22
|
+
export interface DevErrorHmrOptions {
|
|
23
|
+
protocol?: string;
|
|
24
|
+
host?: string;
|
|
25
|
+
port?: number;
|
|
26
|
+
path?: string;
|
|
27
|
+
token?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Extract HMR connection options from a Vite resolved config.
|
|
31
|
+
* Used by the dev server to pass HMR config to the error page generator
|
|
32
|
+
* so the auto-reload WebSocket connects to the correct endpoint.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractHmrOptions(config: {
|
|
35
|
+
server?: {
|
|
36
|
+
hmr?: {
|
|
37
|
+
protocol?: string;
|
|
38
|
+
host?: string;
|
|
39
|
+
port?: number;
|
|
40
|
+
path?: string;
|
|
41
|
+
} | boolean;
|
|
42
|
+
};
|
|
43
|
+
webSocketToken?: string;
|
|
44
|
+
}): DevErrorHmrOptions | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Generate a self-contained HTML error page for dev server 500 responses.
|
|
47
|
+
*
|
|
48
|
+
* The page includes:
|
|
49
|
+
* - Error message and phase label
|
|
50
|
+
* - Source code context around the first app frame (if readable)
|
|
51
|
+
* - Component stack (for React render errors)
|
|
52
|
+
* - Classified stack trace (app frames highlighted, internals collapsed)
|
|
53
|
+
* - Copy button for the full error
|
|
54
|
+
* - Dark/light mode via prefers-color-scheme
|
|
55
|
+
* - Auto-reconnect script that watches for Vite HMR and reloads
|
|
56
|
+
*/
|
|
57
|
+
export declare function generateDevErrorPage(error: Error, phase: ErrorPhase, projectRoot: string, hmrOptions?: DevErrorHmrOptions): string;
|
|
58
|
+
//# sourceMappingURL=dev-error-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-error-page.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-error-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AAuGhC;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAeD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAA;KAAE,CAAC;IAChG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,kBAAkB,GAAG,SAAS,CAkBjC;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,kBAAkB,GAC9B,MAAM,CAoIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA8C1D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkE1D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal error formatting — boxed, color-coded error output for dev mode.
|
|
3
|
+
*
|
|
4
|
+
* Produces a visually scannable error block with:
|
|
5
|
+
* - Unicode box-drawing border around the error
|
|
6
|
+
* - Phase badge and error message
|
|
7
|
+
* - First app frame highlighted as the primary action item
|
|
8
|
+
* - OSC 8 clickable file:line links (VSCode terminal, iTerm2, etc.)
|
|
9
|
+
* - Internal/framework frames collapsed with a count
|
|
10
|
+
* - Component stack (for React render errors)
|
|
11
|
+
*
|
|
12
|
+
* Dev-only: this module is only imported by dev-error-overlay.ts.
|
|
13
|
+
*
|
|
14
|
+
* Design doc: 21-dev-server.md §"Error Overlay"
|
|
15
|
+
*/
|
|
16
|
+
import { type ErrorPhase } from './dev-error-overlay.js';
|
|
17
|
+
/**
|
|
18
|
+
* Format an error for terminal output with a boxed layout.
|
|
19
|
+
*
|
|
20
|
+
* The output is designed to be scannable at a glance:
|
|
21
|
+
* 1. Red box with phase badge and error message
|
|
22
|
+
* 2. First app frame as a clickable link (the primary action item)
|
|
23
|
+
* 3. App frames listed normally
|
|
24
|
+
* 4. Internal/framework frames collapsed with count
|
|
25
|
+
* 5. Component stack (if present)
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatTerminalError(error: Error, phase: ErrorPhase, projectRoot: string): string;
|
|
28
|
+
//# sourceMappingURL=dev-terminal-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-terminal-error.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-terminal-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AA4GhC;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAkEhG"}
|
|
@@ -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,sBAAsB,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,sBAAsB,CAAC;AAqH1D;;;;;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;AAiDD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkFxD"}
|
package/dist/plugins/fonts.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ import type { FontFaceDescriptor } from '../fonts/types.js';
|
|
|
22
22
|
* Keyed by a unique font ID derived from family + config.
|
|
23
23
|
*/
|
|
24
24
|
export type FontRegistry = Map<string, ExtractedFont>;
|
|
25
|
+
/**
|
|
26
|
+
* Generate a unique font ID from family + config hash.
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateFontId(family: string, config: GoogleFontConfig): string;
|
|
25
29
|
/**
|
|
26
30
|
* Extract static font config from a font function call in source code.
|
|
27
31
|
*
|
|
@@ -1 +1 @@
|
|
|
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,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAYzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AA6B5D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,aA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E,kBAAkB,EAAE,CAAC,GACrD,MAAM,CAOR;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,CAsYtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/plugins/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/plugins/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAgBlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA2D1D,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAmKxD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convention linter — validates common misconfigurations in the route tree.
|
|
3
|
+
*
|
|
4
|
+
* Runs at scan time (build and dev startup). Each check produces a warning
|
|
5
|
+
* with the file path, what's wrong, and what to do about it.
|
|
6
|
+
*
|
|
7
|
+
* These are warnings, not errors — they don't block the build. The goal is
|
|
8
|
+
* to catch issues that would otherwise produce cryptic runtime behavior
|
|
9
|
+
* (silent 404s, empty pages, confusing React errors).
|
|
10
|
+
*
|
|
11
|
+
* Design doc: 07-routing.md, 10-error-handling.md
|
|
12
|
+
*/
|
|
13
|
+
import type { RouteTree } from './types.js';
|
|
14
|
+
export interface ConventionWarning {
|
|
15
|
+
/** Warning ID for deduplication and filtering. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Human-readable single-line summary. */
|
|
18
|
+
summary: string;
|
|
19
|
+
/** Multi-line details with file path and fix suggestion. */
|
|
20
|
+
details: string;
|
|
21
|
+
/** Severity: 'warn' for potential issues, 'error' for definite misconfigurations. */
|
|
22
|
+
level: 'warn' | 'error';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Run all convention lint checks on a route tree.
|
|
26
|
+
*
|
|
27
|
+
* Returns an array of warnings. Empty array means everything looks good.
|
|
28
|
+
*/
|
|
29
|
+
export declare function lintConventions(tree: RouteTree, appDir: string): ConventionWarning[];
|
|
30
|
+
/**
|
|
31
|
+
* Check if the app/ directory exists. Called before scanning.
|
|
32
|
+
* Returns a warning if missing, or null if the directory exists.
|
|
33
|
+
*/
|
|
34
|
+
export declare function checkAppDirExists(appDir: string): ConventionWarning | null;
|
|
35
|
+
/**
|
|
36
|
+
* Format warnings for terminal output.
|
|
37
|
+
*
|
|
38
|
+
* Groups by severity, uses colors, and includes fix suggestions.
|
|
39
|
+
*/
|
|
40
|
+
export declare function formatConventionWarnings(warnings: ConventionWarning[]): string;
|
|
41
|
+
//# sourceMappingURL=convention-lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convention-lint.d.ts","sourceRoot":"","sources":["../../src/routing/convention-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAIzD,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAqBpF;AAwOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAe1E;AAUD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAgC9E"}
|
|
@@ -122,12 +122,12 @@ export interface ActionBuilder<TCtx> {
|
|
|
122
122
|
/** Declare the input schema. Validation errors are returned typed. */
|
|
123
123
|
schema<TInput>(schema: ActionSchema<TInput>): ActionBuilderWithSchema<TCtx, TInput>;
|
|
124
124
|
/** Define the action body without input validation. */
|
|
125
|
-
action<TData>(fn: (ctx: ActionContext<TCtx, undefined>) => Promise<TData>): ActionFn<
|
|
125
|
+
action<TData>(fn: (ctx: ActionContext<TCtx, undefined>) => Promise<TData>): ActionFn<TData, undefined>;
|
|
126
126
|
}
|
|
127
127
|
/** Builder after .schema() has been called. */
|
|
128
128
|
export interface ActionBuilderWithSchema<TCtx, TInput> {
|
|
129
129
|
/** Define the action body with validated input. */
|
|
130
|
-
action<TData>(fn: (ctx: ActionContext<TCtx, TInput>) => Promise<TData>): ActionFn<
|
|
130
|
+
action<TData>(fn: (ctx: ActionContext<TCtx, TInput>) => Promise<TData>): ActionFn<TData, TInput>;
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* The final action function. Callable three ways:
|
|
@@ -149,10 +149,18 @@ export interface ActionBuilderWithSchema<TCtx, TInput> {
|
|
|
149
149
|
export type InputHint<T> = T extends Record<string, unknown> ? {
|
|
150
150
|
[K in keyof T]: string | undefined;
|
|
151
151
|
} : T;
|
|
152
|
-
|
|
152
|
+
/**
|
|
153
|
+
* ActionFn — the callable returned by `createActionClient().action()`.
|
|
154
|
+
*
|
|
155
|
+
* Generic order: `<TData, TInput>` — TData first for backward compatibility.
|
|
156
|
+
* Previously ActionFn had a single `<TData>` generic, so existing code like
|
|
157
|
+
* `ActionFn<MyResult>` must still work with TData in the first position.
|
|
158
|
+
* See TIM-797.
|
|
159
|
+
*/
|
|
160
|
+
export type ActionFn<TData = unknown, TInput = unknown> = {
|
|
153
161
|
/** <form action={fn}> compatibility — React discards the return value. */
|
|
154
162
|
(formData: FormData): void;
|
|
155
|
-
/** Direct call: action(input) — optional when TInput is undefined (no-schema actions). */
|
|
163
|
+
/** Direct call: action(input) — optional when TInput is undefined/unknown (no-schema actions). */
|
|
156
164
|
(...args: undefined extends TInput ? [input?: TInput] : [input: TInput]): Promise<ActionResult<TData>>;
|
|
157
165
|
/** React useActionState: action(prevState, formData) */
|
|
158
166
|
(prevState: ActionResult<TData> | null, formData: FormData): Promise<ActionResult<TData>>;
|
|
@@ -204,6 +212,6 @@ export declare function createActionClient<TCtx = Record<string, never>>(config?
|
|
|
204
212
|
* )
|
|
205
213
|
* ```
|
|
206
214
|
*/
|
|
207
|
-
export declare function validated<TInput, TData>(schema: ActionSchema<TInput>, handler: (input: TInput) => Promise<TData>): ActionFn<
|
|
215
|
+
export declare function validated<TInput, TData>(schema: ActionSchema<TInput>, handler: (input: TInput) => Promise<TData>): ActionFn<TData, TInput>;
|
|
208
216
|
export {};
|
|
209
217
|
//# sourceMappingURL=action-client.d.ts.map
|
|
@@ -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,CAAC;CAMxD;AAID;;;;;;;GAOG;AACH,UAAU,gBAAgB,CAAC,MAAM,GAAG,OAAO;IACzC,WAAW,EAAE;QACX,QAAQ,CAAC,KAAK,E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AK,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,CAkHrB;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,EAAE,MAAM,CAAC,CAIzB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev-only error source-mapping bridge.
|
|
3
|
+
*
|
|
4
|
+
* Stores a callback that rewrites an error's stack trace using the Vite
|
|
5
|
+
* dev server's module graph. Set by the RSC entry on startup (via
|
|
6
|
+
* setDevSourceMapHandler), consumed by error renderers before generating
|
|
7
|
+
* error pages.
|
|
8
|
+
*
|
|
9
|
+
* In production, the callback is never set — all calls are no-ops.
|
|
10
|
+
*
|
|
11
|
+
* See TIM-811.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Set the source-map callback. Called once during dev server initialization.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setSourceMapCallback(fn: (error: Error) => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* Source-map an error's stack trace in-place if the callback is available.
|
|
19
|
+
* No-op in production or before the dev server initializes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function sourceMapError(error: unknown): void;
|
|
22
|
+
//# sourceMappingURL=dev-source-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-source-map.d.ts","sourceRoot":"","sources":["../../src/server/dev-source-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAErE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAInD"}
|
|
@@ -18,12 +18,16 @@ import type { GlobalErrorFile } from './rsc-entry/error-renderer.js';
|
|
|
18
18
|
* In dev: styled HTML with error details.
|
|
19
19
|
* In prod: renders root error pages via renderErrorPage.
|
|
20
20
|
*/
|
|
21
|
-
export declare function renderFallbackError(error: unknown, req: Request, responseHeaders: Headers, isDev: boolean, rootSegment: ManifestSegmentNode, clientBootstrap: ClientBootstrapConfig, globalError?: GlobalErrorFile): Promise<Response>;
|
|
21
|
+
export declare function renderFallbackError(error: unknown, req: Request, responseHeaders: Headers, isDev: boolean, rootSegment: ManifestSegmentNode, clientBootstrap: ClientBootstrapConfig, globalError?: GlobalErrorFile, projectRoot?: string): Promise<Response>;
|
|
22
22
|
/**
|
|
23
|
-
* Render a dev-mode 500 error page with error
|
|
23
|
+
* Render a dev-mode 500 error page with error details, source context,
|
|
24
|
+
* classified stack trace, and copy button.
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* Dynamically imports the shared template from `plugins/dev-error-page.ts`
|
|
27
|
+
* so it is NOT pulled into production server bundles. The Vite client script
|
|
28
|
+
* is injected so the error overlay fires when the HMR WebSocket connects.
|
|
29
|
+
*
|
|
30
|
+
* Dev-only — the dynamic import has zero production cost.
|
|
27
31
|
*/
|
|
28
|
-
export declare function renderDevErrorPage(error: unknown): Response
|
|
32
|
+
export declare function renderDevErrorPage(error: unknown, projectRoot?: string): Promise<Response>;
|
|
29
33
|
//# sourceMappingURL=fallback-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-error.d.ts","sourceRoot":"","sources":["../../src/server/fallback-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"fallback-error.d.ts","sourceRoot":"","sources":["../../src/server/fallback-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAKrE;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,mBAAmB,EAChC,eAAe,EAAE,qBAAqB,EACtC,WAAW,CAAC,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,QAAQ,CAAC,CA4CnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAyBhG"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as isDevMode, t as isDebug } from "../_chunks/debug-ECi_61pb.js";
|
|
2
2
|
import { t as formatSize } from "../_chunks/format-CYBGxKtc.js";
|
|
3
3
|
import { n as formFlashAls } from "../_chunks/als-registry-HS0LGUl2.js";
|
|
4
|
-
import { a as getHeaders, c as getSegmentParams, i as getHeader, n as getCookie, r as getCookies, s as getSearchParams } from "../_chunks/request-context-
|
|
5
|
-
import { a as revalidateTag, c as RedirectType, d as redirect, f as redirectExternal, i as revalidatePath, o as DenySignal, p as waitUntil, s as RedirectSignal, u as deny } from "../_chunks/actions-
|
|
4
|
+
import { a as getHeaders, c as getSegmentParams, i as getHeader, n as getCookie, r as getCookies, s as getSearchParams } from "../_chunks/request-context-CK5tZqIP.js";
|
|
5
|
+
import { a as revalidateTag, c as RedirectType, d as redirect, f as redirectExternal, i as revalidatePath, o as DenySignal, p as waitUntil, s as RedirectSignal, u as deny } from "../_chunks/actions-DLnUaR65.js";
|
|
6
6
|
import { a as getSpanId, d as withSpan, o as getTraceId, t as addSpanEvent } from "../_chunks/tracing-CCYbKn5n.js";
|
|
7
7
|
//#region src/server/form-data.ts
|
|
8
8
|
/**
|