@timber-js/app 0.2.0-alpha.237 → 0.2.0-alpha.238
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/chains-CmzbpG-6.js +1 -0
- package/dist/_chunks/{chains-BsGKkMTK.js → chains-DMoHX4yH.js} +2 -2
- package/dist/_chunks/{chains-BsGKkMTK.js.map → chains-DMoHX4yH.js.map} +1 -1
- package/dist/_chunks/{classify-cmE0Gins.js → classify-BwyAd-dZ.js} +3 -3
- package/dist/_chunks/{classify-cmE0Gins.js.map → classify-BwyAd-dZ.js.map} +1 -1
- package/dist/_chunks/{cli-check-BwiahbTC.js → cli-check-DQAD9MLo.js} +3 -3
- package/dist/_chunks/{cli-check-BwiahbTC.js.map → cli-check-DQAD9MLo.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-Brw7kTmm.js → cli-schema-sync-C_xNLqBj.js} +1 -1
- package/dist/_chunks/{cli-schema-sync-B2ldclRO.js → cli-schema-sync-CmGls3dc.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-B2ldclRO.js.map → cli-schema-sync-CmGls3dc.js.map} +1 -1
- package/dist/_chunks/{client-dep-entries-C1nMlLKV.js → client-dep-entries-C5BTQtFS.js} +2 -2
- package/dist/_chunks/{client-dep-entries-C1nMlLKV.js.map → client-dep-entries-C5BTQtFS.js.map} +1 -1
- package/dist/_chunks/{convention-lint-CLpuzY5h.js → convention-lint-GQA6WTRo.js} +2 -2
- package/dist/_chunks/{convention-lint-CLpuzY5h.js.map → convention-lint-GQA6WTRo.js.map} +1 -1
- package/dist/_chunks/dev-server--4_Ogy_6.js +1 -0
- package/dist/_chunks/{dev-server-lrdpD7Ws.js → dev-server-Cr3_Fu5A.js} +244 -26
- package/dist/_chunks/dev-server-Cr3_Fu5A.js.map +1 -0
- package/dist/_chunks/{scanner-CrB_h6FA.js → interception-CtNt9jPt.js} +169 -1043
- package/dist/_chunks/interception-CtNt9jPt.js.map +1 -0
- package/dist/_chunks/{live-graph-ChuFfmLi.js → live-graph-HcLScfiV.js} +4 -4
- package/dist/_chunks/{live-graph-ChuFfmLi.js.map → live-graph-HcLScfiV.js.map} +1 -1
- package/dist/_chunks/{metadata-routes-BL26HCDd.js → metadata-routes-MXNjWOt5.js} +60 -2
- package/dist/_chunks/metadata-routes-MXNjWOt5.js.map +1 -0
- package/dist/_chunks/{poison-scan-CJ9QfJWb.js → poison-scan-DONdiCGX.js} +2 -2
- package/dist/_chunks/{poison-scan-CJ9QfJWb.js.map → poison-scan-DONdiCGX.js.map} +1 -1
- package/dist/_chunks/scanner-DSAJjH0x.js +1043 -0
- package/dist/_chunks/scanner-DSAJjH0x.js.map +1 -0
- package/dist/_chunks/{walkers-BUvpsb2Q.js → walkers-96YopJds.js} +3 -3
- package/dist/_chunks/{walkers-BUvpsb2Q.js.map → walkers-96YopJds.js.map} +1 -1
- package/dist/analyze/crawl-entry.js +3 -3
- package/dist/analyze/graph-command.js +2 -2
- package/dist/cli.js +3 -3
- package/dist/config-types.d.ts +11 -0
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-validation.d.ts.map +1 -1
- package/dist/index.js +6 -155
- package/dist/index.js.map +1 -1
- package/dist/plugins/dev-precompile.d.ts +42 -14
- package/dist/plugins/dev-precompile.d.ts.map +1 -1
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/routing/index.js +3 -2
- package/dist/routing/manifest-codegen.d.ts +2 -0
- package/dist/routing/manifest-codegen.d.ts.map +1 -1
- package/dist/server/internal.js +1 -2
- package/dist/server/internal.js.map +1 -1
- package/docs/api/34-api-config.mdx +18 -0
- package/package.json +1 -1
- package/src/config-types.ts +11 -0
- package/src/config-validation.ts +15 -8
- package/src/plugins/dev-precompile.ts +108 -20
- package/src/plugins/dev-server.ts +12 -11
- package/src/routing/manifest-codegen.ts +2 -2
- package/dist/_chunks/chains-DHmoKxkO.js +0 -1
- package/dist/_chunks/dev-server-BGGGhHXx.js +0 -1
- package/dist/_chunks/dev-server-lrdpD7Ws.js.map +0 -1
- package/dist/_chunks/metadata-routes-BL26HCDd.js.map +0 -1
- package/dist/_chunks/scanner-CrB_h6FA.js.map +0 -1
- package/dist/_chunks/segment-keys-Y60KNc8C.js +0 -61
- package/dist/_chunks/segment-keys-Y60KNc8C.js.map +0 -1
- package/dist/_chunks/tree-match-Bqdr9szG.js +0 -168
- package/dist/_chunks/tree-match-Bqdr9szG.js.map +0 -1
|
@@ -37,6 +37,7 @@ interface TimberUserConfig {
|
|
|
37
37
|
slowPhaseMs?: number;
|
|
38
38
|
hostname?: string | false;
|
|
39
39
|
requestPill?: boolean;
|
|
40
|
+
precompile?: boolean;
|
|
40
41
|
};
|
|
41
42
|
budget?: {
|
|
42
43
|
firstLoadJs?: number;
|
|
@@ -242,6 +243,23 @@ export default {
|
|
|
242
243
|
|
|
243
244
|
It never appears in a browser driven by automation (Playwright, Selenium, Puppeteer), so it can't intercept clicks in your e2e tests.
|
|
244
245
|
|
|
246
|
+
### `dev.precompile`
|
|
247
|
+
|
|
248
|
+
- **Type:** `boolean`
|
|
249
|
+
- **Default:** `true`
|
|
250
|
+
|
|
251
|
+
Once the dev server is listening, compile your app's server code in the background: every route's layouts, pages and route handlers and the modules they statically import, for both server renders, starting with what `/` loads. A dynamic `import()` in your code still compiles at the request that reaches it. Nothing runs, so `instrumentation.ts` still runs at the first request. Without it, the first request to each page waits while Vite compiles its server code one module at a time.
|
|
252
|
+
|
|
253
|
+
Set `false` to leave compiling to each request, for example on a very large app where you only ever open a few routes. `TIMBER_DEV_PRECOMPILE=0` turns it off for a single run.
|
|
254
|
+
|
|
255
|
+
```ts title="timber.config.ts"
|
|
256
|
+
export default {
|
|
257
|
+
dev: {
|
|
258
|
+
precompile: false,
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
```
|
|
262
|
+
|
|
245
263
|
### `dev.hostname`
|
|
246
264
|
|
|
247
265
|
- **Type:** `string | false`
|
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.238",
|
|
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",
|
package/src/config-types.ts
CHANGED
|
@@ -168,6 +168,17 @@ export interface TimberUserConfig {
|
|
|
168
168
|
* Default: `true`. Automated browsers (`navigator.webdriver`) never get it.
|
|
169
169
|
*/
|
|
170
170
|
requestPill?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Compile the app's server code in the background once the dev server
|
|
173
|
+
* listens: every route's layouts, pages and handlers and what they
|
|
174
|
+
* import, in the RSC and SSR environments, `/` first. Nothing executes;
|
|
175
|
+
* the first request still runs the modules. `false` leaves compiling to
|
|
176
|
+
* each request, as Vite does by default (`TIMBER_DEV_PRECOMPILE=0` does
|
|
177
|
+
* the same for one run).
|
|
178
|
+
*
|
|
179
|
+
* Default: `true`. See design/21-dev-server.md §"Server Pre-compile".
|
|
180
|
+
*/
|
|
181
|
+
precompile?: boolean;
|
|
171
182
|
};
|
|
172
183
|
/**
|
|
173
184
|
* Control Server-Timing header output.
|
package/src/config-validation.ts
CHANGED
|
@@ -206,14 +206,21 @@ export function validateConfig(config: TimberUserConfig): ConfigError[] {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// dev
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
// Boolean dev switches — not fatal: dev-only, like dev.hostname below.
|
|
210
|
+
const devSwitches = [
|
|
211
|
+
['requestPill', 'the dev request pill'],
|
|
212
|
+
['precompile', 'the background server compile'],
|
|
213
|
+
] as const;
|
|
214
|
+
for (const [key, what] of devSwitches) {
|
|
215
|
+
const value = config.dev?.[key];
|
|
216
|
+
if (value !== undefined && typeof value !== 'boolean') {
|
|
217
|
+
errors.push({
|
|
218
|
+
field: `dev.${key}`,
|
|
219
|
+
message: `dev.${key} must be a boolean, got ${JSON.stringify(value)}.`,
|
|
220
|
+
value,
|
|
221
|
+
suggestion: `Use dev: { ${key}: false } to turn ${what} off.`,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
217
224
|
}
|
|
218
225
|
|
|
219
226
|
// dev.hostname — not fatal: it is dev-only, so a typo must not fail
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
* - `env.transformRequest()` only: nothing executes, so the app's
|
|
14
14
|
* instrumentation `register()` and cache handler setup still run at the
|
|
15
15
|
* first request, as before.
|
|
16
|
-
* - Static imports only (`result.deps`), from the entries and
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* - Static imports only (`result.deps`), from the entries and every module
|
|
17
|
+
* file in the route tree ({@link routeTreeSeeds}). Route files are dynamic
|
|
18
|
+
* imports of the route manifest, which the crawl does not follow, so they
|
|
19
|
+
* are seeded directly. Crawling only the root layout left most of an app
|
|
20
|
+
* whose UI sits in route groups and slots to the first request: on
|
|
21
|
+
* relisten-web it covered 53 of the 499 SSR modules `GET /` needed, and the
|
|
22
|
+
* whole route tree (~960 modules) takes ~1.6s (TIM-1630).
|
|
23
|
+
* - In waves: what `GET /` can load first, RSC then SSR, so the
|
|
24
|
+
* most common first request is ready soonest; then the rest.
|
|
19
25
|
* - Errors are swallowed. The request that loads the module hits the same
|
|
20
26
|
* error and reports it as it always has; Vite's `warmupRequest` was
|
|
21
27
|
* rejected because it logs each error a second time.
|
|
@@ -28,30 +34,99 @@
|
|
|
28
34
|
*
|
|
29
35
|
* `analyze/crawl.ts` also walks `transformRequest`, for a different job:
|
|
30
36
|
* classifying every module the app can reach, dynamic imports included, in
|
|
31
|
-
* a throwaway middleware-mode server.
|
|
32
|
-
*
|
|
37
|
+
* a throwaway middleware-mode server.
|
|
38
|
+
*
|
|
39
|
+
* `dev.precompile: false` in timber.config, or `TIMBER_DEV_PRECOMPILE=0`,
|
|
40
|
+
* turns it off.
|
|
33
41
|
*
|
|
34
42
|
* See design/21-dev-server.md §"Server Pre-compile".
|
|
35
43
|
*/
|
|
36
44
|
|
|
37
45
|
import { normalizePath, type DevEnvironment, type ViteDevServer } from 'vite';
|
|
38
46
|
import type { PluginApi } from '@vitejs/plugin-rsc';
|
|
47
|
+
import type { RouteFile, RouteTree, SegmentNode } from '../routing/types.ts';
|
|
48
|
+
import { RECORD_FILE_KEYS, SINGLE_FILE_KEYS } from '../routing/manifest-codegen.ts';
|
|
49
|
+
import { isStaticMetadataExtension } from '../server/metadata-routes.ts';
|
|
39
50
|
|
|
40
51
|
/** `TIMBER_DEV_PRECOMPILE=0` turns the crawl off (A/B measurement, escape hatch). */
|
|
41
52
|
export const PRECOMPILE_ENV = 'TIMBER_DEV_PRECOMPILE';
|
|
42
53
|
|
|
43
54
|
/**
|
|
44
|
-
* Past this, the crawl starts no new transform. Generous:
|
|
45
|
-
*
|
|
55
|
+
* Past this, the crawl starts no new transform. Generous: the whole route
|
|
56
|
+
* tree takes ~1.6s on relisten-web. It bounds a crawl stuck behind a slow
|
|
57
|
+
* transform plugin, or an app too large to finish.
|
|
46
58
|
*/
|
|
47
59
|
export const PRECOMPILE_DEADLINE_MS = 60_000;
|
|
48
60
|
|
|
49
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* The roots of each server environment's crawl. `rsc` is crawled in waves,
|
|
63
|
+
* in order; after each wave the SSR environment crawls `ssr` and every
|
|
64
|
+
* client reference recorded so far.
|
|
65
|
+
*/
|
|
50
66
|
export interface PrecompileRoots {
|
|
51
|
-
rsc: string[];
|
|
67
|
+
rsc: string[][];
|
|
52
68
|
ssr: string[];
|
|
53
69
|
}
|
|
54
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Segment types whose subtree can match its parent's URL: they consume no
|
|
73
|
+
* URL segment (or none, for an empty optional catch-all).
|
|
74
|
+
*/
|
|
75
|
+
const PATHLESS = new Set(['group', 'optional-catch-all']);
|
|
76
|
+
|
|
77
|
+
/** `node`, or a pathless segment under it, has a page or handler for its URL. */
|
|
78
|
+
function rendersOwnPath(node: SegmentNode): boolean {
|
|
79
|
+
if (node.page || node.route) return true;
|
|
80
|
+
return node.children.some((child) => PATHLESS.has(child.segmentType) && rendersOwnPath(child));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The files of a segment that the runtime loads as modules: every file the
|
|
85
|
+
* route manifest lists for it (routing/manifest-codegen.ts, so a convention
|
|
86
|
+
* the manifest learns is crawled too), except JSON status files and static
|
|
87
|
+
* metadata files (`sitemap.xml`, `icon.png`, …), which are read from disk
|
|
88
|
+
* and never imported.
|
|
89
|
+
*/
|
|
90
|
+
function segmentFiles(node: SegmentNode): RouteFile[] {
|
|
91
|
+
const files: RouteFile[] = [];
|
|
92
|
+
for (const key of SINGLE_FILE_KEYS) {
|
|
93
|
+
const file = node[key];
|
|
94
|
+
if (file) files.push(file);
|
|
95
|
+
}
|
|
96
|
+
for (const key of RECORD_FILE_KEYS) {
|
|
97
|
+
if (key === 'jsonStatusFiles') continue;
|
|
98
|
+
for (const [name, file] of Object.entries(node[key] ?? {})) {
|
|
99
|
+
if (key === 'metadataRoutes' && isStaticMetadataExtension(name, file.extension)) continue;
|
|
100
|
+
files.push(file);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return files;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Every module file in the route tree, in two waves. `home` is what `GET /`
|
|
108
|
+
* can load: `proxy.ts`, `global-error`, the root segment, and under it the
|
|
109
|
+
* pathless segments (groups, optional catch-alls) with a page or handler at
|
|
110
|
+
* `/`, and the slots of those. A group that only organises other sections
|
|
111
|
+
* (`(admin)/admin/…`) is not in it. `rest` is every other segment's.
|
|
112
|
+
*/
|
|
113
|
+
export function routeTreeSeeds(tree: RouteTree): { home: string[]; rest: string[] } {
|
|
114
|
+
const home: string[] = [];
|
|
115
|
+
const rest: string[] = [];
|
|
116
|
+
for (const file of [tree.proxy, tree.globalError]) if (file) home.push(file.filePath);
|
|
117
|
+
const walk = (node: SegmentNode, inHome: boolean): void => {
|
|
118
|
+
for (const file of segmentFiles(node)) (inHome ? home : rest).push(file.filePath);
|
|
119
|
+
for (const child of node.children) {
|
|
120
|
+
walk(child, inHome && PATHLESS.has(child.segmentType) && rendersOwnPath(child));
|
|
121
|
+
}
|
|
122
|
+
// A slot renders beside its parent's page, so it is in whichever wave
|
|
123
|
+
// its parent is.
|
|
124
|
+
for (const slot of Object.values(node.slots)) walk(slot, inHome);
|
|
125
|
+
};
|
|
126
|
+
walk(tree.root, true);
|
|
127
|
+
return { home, rest };
|
|
128
|
+
}
|
|
129
|
+
|
|
55
130
|
/**
|
|
56
131
|
* The id `transformRequest` takes for an entry of `result.deps`, or null for
|
|
57
132
|
* one it must not follow: a bare specifier, which in a server environment is
|
|
@@ -85,14 +160,17 @@ export function fileUrl(file: string, root: string): string {
|
|
|
85
160
|
/**
|
|
86
161
|
* Transform `roots` and every module they statically import in `env`.
|
|
87
162
|
* Starts no transform once `shouldStop()` is true. Resolves with the
|
|
88
|
-
* number of
|
|
163
|
+
* number of ids in `seen` (every module visited in `env` so far, across
|
|
164
|
+
* crawls that share it) once the graph is done; never rejects. `seen`
|
|
165
|
+
* carries visited ids across crawls of one environment, so a later wave
|
|
166
|
+
* skips what an earlier one transformed.
|
|
89
167
|
*/
|
|
90
168
|
export async function crawlServerGraph(
|
|
91
169
|
env: DevEnvironment,
|
|
92
170
|
roots: string[],
|
|
93
|
-
shouldStop: () => boolean = () => false
|
|
171
|
+
shouldStop: () => boolean = () => false,
|
|
172
|
+
seen: Set<string> = new Set()
|
|
94
173
|
): Promise<number> {
|
|
95
|
-
const seen = new Set<string>();
|
|
96
174
|
const visit = async (id: string): Promise<void> => {
|
|
97
175
|
if (seen.has(id) || shouldStop()) return;
|
|
98
176
|
seen.add(id);
|
|
@@ -115,8 +193,8 @@ export async function crawlServerGraph(
|
|
|
115
193
|
|
|
116
194
|
/**
|
|
117
195
|
* The SSR environment loads each client component the RSC render
|
|
118
|
-
* references, by the id plugin-rsc registered for it. Read
|
|
119
|
-
*
|
|
196
|
+
* references, by the id plugin-rsc registered for it. Read after each RSC
|
|
197
|
+
* wave: plugin-rsc records a client reference when it transforms
|
|
120
198
|
* the `'use client'` module in the RSC environment.
|
|
121
199
|
*/
|
|
122
200
|
function clientReferenceIds(server: ViteDevServer): string[] {
|
|
@@ -134,9 +212,9 @@ function clientReferenceIds(server: ViteDevServer): string[] {
|
|
|
134
212
|
}
|
|
135
213
|
|
|
136
214
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* already in flight for the URLs it asks for.
|
|
215
|
+
* For each RSC wave, crawl the RSC graph, then the SSR graph with the client
|
|
216
|
+
* references found so far. A request that arrives mid-crawl shares the
|
|
217
|
+
* transforms already in flight for the URLs it asks for.
|
|
140
218
|
*/
|
|
141
219
|
export async function precompileServerGraphs(
|
|
142
220
|
server: ViteDevServer,
|
|
@@ -144,9 +222,19 @@ export async function precompileServerGraphs(
|
|
|
144
222
|
shouldStop: () => boolean
|
|
145
223
|
): Promise<void> {
|
|
146
224
|
const { rsc, ssr } = server.environments;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
225
|
+
const rscSeen = new Set<string>();
|
|
226
|
+
const ssrSeen = new Set<string>();
|
|
227
|
+
for (const wave of roots.rsc) {
|
|
228
|
+
if (shouldStop()) return;
|
|
229
|
+
if (rsc) await crawlServerGraph(rsc, wave, shouldStop, rscSeen);
|
|
230
|
+
if (ssr && !shouldStop()) {
|
|
231
|
+
await crawlServerGraph(
|
|
232
|
+
ssr,
|
|
233
|
+
[...roots.ssr, ...clientReferenceIds(server)],
|
|
234
|
+
shouldStop,
|
|
235
|
+
ssrSeen
|
|
236
|
+
);
|
|
237
|
+
}
|
|
150
238
|
}
|
|
151
239
|
}
|
|
152
240
|
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from '../dev-tools/dev-page-shell.ts';
|
|
40
40
|
import { addVirtualModuleContext } from '../config-validation.ts';
|
|
41
41
|
import { devRecordRoot, registerDevDiscovery } from './dev-discovery.ts';
|
|
42
|
-
import { fileUrl, precompileOnListen } from './dev-precompile.ts';
|
|
42
|
+
import { fileUrl, precompileOnListen, routeTreeSeeds } from './dev-precompile.ts';
|
|
43
43
|
import { VIRTUAL_IDS } from './virtual-ids.ts';
|
|
44
44
|
import { advertisedUrls, applyDevHostname } from './dev-hostname.ts';
|
|
45
45
|
import {
|
|
@@ -312,16 +312,17 @@ export function timberDevServer(ctx: PluginContext): Plugin {
|
|
|
312
312
|
|
|
313
313
|
// Transform the server graphs in the background once listening, so
|
|
314
314
|
// the first request does not compile them one module at a time. See
|
|
315
|
-
// design/21 §Server Pre-compile.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
: [VIRTUAL_IDS.rscEntry],
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
315
|
+
// design/21 §Server Pre-compile. `dev.precompile: false` opts out.
|
|
316
|
+
if (ctx.config.dev?.precompile !== false) {
|
|
317
|
+
precompileOnListen(server, () => {
|
|
318
|
+
const toUrl = (file: string) => fileUrl(file, server.config.root);
|
|
319
|
+
const seeds = ctx.routeTree ? routeTreeSeeds(ctx.routeTree) : { home: [], rest: [] };
|
|
320
|
+
return {
|
|
321
|
+
rsc: [[VIRTUAL_IDS.rscEntry, ...seeds.home.map(toUrl)], seeds.rest.map(toUrl)],
|
|
322
|
+
ssr: [VIRTUAL_IDS.ssrEntry],
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
}
|
|
325
326
|
|
|
326
327
|
// Close the holding server and await the port release so Vite's
|
|
327
328
|
// port probe and bind see a free port. configureServer is awaited
|
|
@@ -16,7 +16,7 @@ import type { RouteTree, SegmentNode, RouteFile } from './types.ts';
|
|
|
16
16
|
// ── Single-file conventions ─────────────────────────────────────────────
|
|
17
17
|
// Each entry maps to a node property that holds a single RouteFile.
|
|
18
18
|
// Order matches the original serializeNode output for byte-identical diffs.
|
|
19
|
-
const SINGLE_FILE_KEYS = [
|
|
19
|
+
export const SINGLE_FILE_KEYS = [
|
|
20
20
|
'page',
|
|
21
21
|
'layout',
|
|
22
22
|
'middleware',
|
|
@@ -29,7 +29,7 @@ const SINGLE_FILE_KEYS = [
|
|
|
29
29
|
|
|
30
30
|
// ── Record-shaped conventions ───────────────────────────────────────────
|
|
31
31
|
// Each entry maps to a node property that holds Record<string, RouteFile>.
|
|
32
|
-
const RECORD_FILE_KEYS = ['statusFiles', 'jsonStatusFiles', 'metadataRoutes'] as const;
|
|
32
|
+
export const RECORD_FILE_KEYS = ['statusFiles', 'jsonStatusFiles', 'metadataRoutes'] as const;
|
|
33
33
|
|
|
34
34
|
const SCHEMA_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx'];
|
|
35
35
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as formatChains } from "./chains-BsGKkMTK.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as RESTART_EXIT_CODE } from "./dev-server-lrdpD7Ws.js";
|