@reactra/vite-plugin 0.1.0-alpha.0
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 +21 -0
- package/README.md +17 -0
- package/dist/esbuild-prescan.d.ts +31 -0
- package/dist/esbuild-prescan.d.ts.map +1 -0
- package/dist/esbuild-prescan.js +75 -0
- package/dist/esbuild-prescan.js.map +1 -0
- package/dist/extract.d.ts +128 -0
- package/dist/extract.d.ts.map +1 -0
- package/dist/extract.js +155 -0
- package/dist/extract.js.map +1 -0
- package/dist/fingerprint.d.ts +28 -0
- package/dist/fingerprint.d.ts.map +1 -0
- package/dist/fingerprint.js +68 -0
- package/dist/fingerprint.js.map +1 -0
- package/dist/graph-cache.d.ts +23 -0
- package/dist/graph-cache.d.ts.map +1 -0
- package/dist/graph-cache.js +52 -0
- package/dist/graph-cache.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +379 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +57 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +147 -0
- package/dist/manifest.js.map +1 -0
- package/dist/resource-names.d.ts +49 -0
- package/dist/resource-names.d.ts.map +1 -0
- package/dist/resource-names.js +128 -0
- package/dist/resource-names.js.map +1 -0
- package/dist/sidecar-writer.d.ts +60 -0
- package/dist/sidecar-writer.d.ts.map +1 -0
- package/dist/sidecar-writer.js +114 -0
- package/dist/sidecar-writer.js.map +1 -0
- package/dist/walker.d.ts +332 -0
- package/dist/walker.d.ts.map +1 -0
- package/dist/walker.js +1070 -0
- package/dist/walker.js.map +1 -0
- package/package.json +39 -0
package/dist/walker.d.ts
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { type GraphCache } from "./graph-cache.ts";
|
|
2
|
+
/**
|
|
3
|
+
* One discovered route. The walker emits these; the emitter formats them
|
|
4
|
+
* into the generated TS module.
|
|
5
|
+
*
|
|
6
|
+
* `importSpecifier` is a relative path with NO extension, suitable for
|
|
7
|
+
* inclusion in an `import X from "..."` line. Vite/TS resolves the actual
|
|
8
|
+
* extension at compile time.
|
|
9
|
+
*
|
|
10
|
+
* `componentIdentifier` is a PascalCase identifier safe to use as a JS
|
|
11
|
+
* variable name (no brackets, dots, or hyphens).
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* One discovered store binding sourced from the sidecar index. Day 19 /
|
|
15
|
+
* Day 20 (`#5c`): the route manifest now ALSO exports a `STORES` array
|
|
16
|
+
* so `main.tsx` can do `configureStores({ stores: STORES })` instead of
|
|
17
|
+
* hand-importing each binding. The walker reuses the existing per-file
|
|
18
|
+
* sidecars (Day 14b writer + Day 15 reader) — every Reactra source that
|
|
19
|
+
* declares a store has a sidecar on disk listing it.
|
|
20
|
+
*
|
|
21
|
+
* `name` is the source-level store identifier (e.g. `counterStore`).
|
|
22
|
+
* `importSpecifier` is a `./`-prefixed path relative to `src/` with no
|
|
23
|
+
* extension — suitable for an `import { name } from "..."` line in
|
|
24
|
+
* `routeManifest.generated.ts`.
|
|
25
|
+
*/
|
|
26
|
+
export interface DiscoveredStore {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly importSpecifier: string;
|
|
29
|
+
/** Absolute source path. Surfaced for diagnostics + dup detection. */
|
|
30
|
+
readonly sourcePath: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One discovered service binding sourced from a source-scan of `src/`.
|
|
34
|
+
* Phase 3 — mirrors {@link DiscoveredStore}.
|
|
35
|
+
*
|
|
36
|
+
* The compiler force-exports every container it processes (MVP rule — Pass 9
|
|
37
|
+
* emits `export const name = …` unconditionally), so ALL declared services are
|
|
38
|
+
* importable as `import { name }` regardless of whether the source carries the
|
|
39
|
+
* `export` keyword. Therefore all declared services are collected here.
|
|
40
|
+
*
|
|
41
|
+
* When the compiler stops force-exporting (a future coordinated change),
|
|
42
|
+
* re-introduce an `exported=true` filter here and add a "non-exported
|
|
43
|
+
* service consumed cross-file" diagnostic. For now, collect all.
|
|
44
|
+
*
|
|
45
|
+
* `name` is the source-level service identifier (e.g. `authService`).
|
|
46
|
+
* `importSpecifier` is a `./`-prefixed path relative to `src/` with no
|
|
47
|
+
* extension — suitable for an `import { name } from "..."` line.
|
|
48
|
+
* `serviceModifier` is `"scoped"` or `"server"` when present; undefined for
|
|
49
|
+
* plain `service X {}`.
|
|
50
|
+
*/
|
|
51
|
+
export interface DiscoveredService {
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly importSpecifier: string;
|
|
54
|
+
/** Absolute source path. Surfaced for diagnostics + dup detection. */
|
|
55
|
+
readonly sourcePath: string;
|
|
56
|
+
/** `"scoped"` | `"server"` | undefined. */
|
|
57
|
+
readonly serviceModifier?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface DiscoveredRoute {
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly path: string;
|
|
62
|
+
readonly filePath: string;
|
|
63
|
+
readonly importSpecifier: string;
|
|
64
|
+
readonly componentIdentifier: string;
|
|
65
|
+
/**
|
|
66
|
+
* Wave 3 §2b — the page's directory relative to `src/pages/`, with all
|
|
67
|
+
* original segments preserved (route groups `(group)` INCLUDED). This is
|
|
68
|
+
* the chain-match key used by {@link chainsForRoutes} so a
|
|
69
|
+
* `_middleware.ts` inside a group only applies to pages physically
|
|
70
|
+
* located inside that group, even though the URLs of those pages don't
|
|
71
|
+
* carry the group segment. Empty string for files directly under
|
|
72
|
+
* `src/pages/`. Optional on the type so hand-built fixtures may omit it
|
|
73
|
+
* (chain resolution treats `undefined` like `""` — root).
|
|
74
|
+
*/
|
|
75
|
+
readonly fileDirRelativeToPages?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Source name of the page's `export component Foo` declaration, used as
|
|
78
|
+
* the lookup key for `RouterRegistry.registerRouteBindings("Foo", …)`.
|
|
79
|
+
* Undefined when the page has no DSL `export component` (e.g. a plain
|
|
80
|
+
* React TSX page or an empty placeholder). Day 16 / `#18b`.
|
|
81
|
+
*/
|
|
82
|
+
readonly bindingsName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The page's `query` declarations, source-scanned for the typed
|
|
85
|
+
* `RouteQuery` map (`#5c-typed-query`). `scanPages` always sets this
|
|
86
|
+
* (empty array when the page declares no query); optional on the type so
|
|
87
|
+
* hand-built route objects (tests, external callers) may omit it — the
|
|
88
|
+
* emitter treats a missing value as "no query schema".
|
|
89
|
+
*/
|
|
90
|
+
readonly queries?: readonly RouteQueryDecl[];
|
|
91
|
+
/**
|
|
92
|
+
* The page's declared `prefetch on <trigger>` policy (Router §5.5), source-
|
|
93
|
+
* scanned. Emitted to the manifest as `prefetch: { trigger }` so a `RouteLink`
|
|
94
|
+
* with no `prefetch` prop inherits the destination's declared trigger.
|
|
95
|
+
* Undefined when the page declares no `prefetch`.
|
|
96
|
+
*/
|
|
97
|
+
readonly prefetch?: "hover" | "visible" | "mount" | "none";
|
|
98
|
+
/**
|
|
99
|
+
* The nearest ancestor `_loading.tsx` for this page (Router §2.3) — used by
|
|
100
|
+
* the runtime as the route's `<Suspense>` fallback in place of the global
|
|
101
|
+
* `configureRouter({ loadingFallback })`. Walks UP from the page's directory
|
|
102
|
+
* to `src/pages/`; undefined if no ancestor declares one. The walker emits
|
|
103
|
+
* this as an eager import (the fallback must render synchronously).
|
|
104
|
+
*/
|
|
105
|
+
readonly loading?: {
|
|
106
|
+
readonly specifier: string;
|
|
107
|
+
readonly identifier: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The nearest ancestor `_error.tsx` for this page (Router §2.3) — used by the
|
|
111
|
+
* runtime as the route's `<RouteErrorBoundary>` fallback (`{ error, reset }`
|
|
112
|
+
* props). Same nearest-wins walk as `loading`; eagerly imported (a lazy error
|
|
113
|
+
* UI that itself suspends would surface as a loading state during the error).
|
|
114
|
+
*/
|
|
115
|
+
readonly errorBoundary?: {
|
|
116
|
+
readonly specifier: string;
|
|
117
|
+
readonly identifier: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The full ancestor chain of `_layout.tsx` files for this page (Router §2.3),
|
|
121
|
+
* **outermost first** — the runtime nests them around the page so the root
|
|
122
|
+
* layout is the outermost wrapper. Eagerly imported so layouts persist while
|
|
123
|
+
* the page below them streams in (the per-route Suspense sits INSIDE the
|
|
124
|
+
* innermost layout, so only the page area shows the loading fallback). Empty
|
|
125
|
+
* array when no `_layout.tsx` exists between the page and `src/pages/`.
|
|
126
|
+
*/
|
|
127
|
+
readonly layouts?: ReadonlyArray<{
|
|
128
|
+
readonly specifier: string;
|
|
129
|
+
readonly identifier: string;
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Convert a path relative to `src/pages/` into the URL pattern the router
|
|
134
|
+
* registers. Returns `null` for Phase-1-unsupported features, special
|
|
135
|
+
* filenames, and unsupported extensions.
|
|
136
|
+
*
|
|
137
|
+
* Examples:
|
|
138
|
+
* "index.tsx" → "/"
|
|
139
|
+
* "about.tsx" → "/about"
|
|
140
|
+
* "customers/index.tsx" → "/customers"
|
|
141
|
+
* "customers/[id].tsx" → "/customers/:id"
|
|
142
|
+
* "customers/[id]/edit.tsx" → "/customers/:id/edit"
|
|
143
|
+
* "(auth)/login.tsx" → "/login" (route group — Wave 3 §2b)
|
|
144
|
+
* "(marketing)/index.tsx" → "/" (route group at root)
|
|
145
|
+
* "(auth)/dashboard/index.tsx" → "/dashboard" (route group + nested)
|
|
146
|
+
* "blog/[...slug].tsx" → "/blog/*slug" (catch-all — Wave 3 §2b)
|
|
147
|
+
* "[...rest].tsx" → "/*rest" (root catch-all)
|
|
148
|
+
* "_middleware.ts" → null (special — Wave 3 §2b)
|
|
149
|
+
* "README.md" → null (unsupported extension)
|
|
150
|
+
*
|
|
151
|
+
* Catch-all constraints:
|
|
152
|
+
* - `[...name]` must be the LAST segment (a mid-path catch-all is
|
|
153
|
+
* rejected with `null`).
|
|
154
|
+
* - `index` filename + catch-all not allowed
|
|
155
|
+
* (`[...slug]/index.tsx` rejected).
|
|
156
|
+
*/
|
|
157
|
+
export declare const deriveRoutePath: (relativePath: string) => string | null;
|
|
158
|
+
/**
|
|
159
|
+
* One `query` declaration on a page component. `#5c-typed-query`: feeds the
|
|
160
|
+
* generated `RouteQuery` map so `navigate(route, { query: { … } })` is checked
|
|
161
|
+
* against the page's declared query schema.
|
|
162
|
+
*
|
|
163
|
+
* `tsType` is the verbatim TS type text from the DSL declaration (e.g.
|
|
164
|
+
* `"string"`, `"number"`, `'"active" | "archived"'`); it defaults to
|
|
165
|
+
* `"string"` when the declaration omits the annotation. It is emitted
|
|
166
|
+
* verbatim into the generated `.ts` manifest.
|
|
167
|
+
*
|
|
168
|
+
* Phase 3: type alias of `QueryDecl` from extract.ts so the shape is
|
|
169
|
+
* shared. Kept as a separate exported name here for backward compat.
|
|
170
|
+
*/
|
|
171
|
+
export interface RouteQueryDecl {
|
|
172
|
+
readonly name: string;
|
|
173
|
+
readonly tsType: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Recursively scan `<projectRoot>/src/pages/` for page files. Files that
|
|
177
|
+
* `deriveRoutePath` returns `null` for are skipped. Returns the routes
|
|
178
|
+
* sorted by `path` so the generated manifest is byte-stable across runs.
|
|
179
|
+
*
|
|
180
|
+
* Tolerates a missing `src/pages/` directory (returns `[]`) — useful during
|
|
181
|
+
* a fresh `dev` boot before pages exist.
|
|
182
|
+
*/
|
|
183
|
+
export declare const scanPages: (projectRoot: string, cache?: GraphCache) => DiscoveredRoute[];
|
|
184
|
+
/**
|
|
185
|
+
* Discover every store binding declared anywhere under `<projectRoot>/src/`
|
|
186
|
+
* by source-regex via `preprocess()` (cold-start safe). Returns a deterministic
|
|
187
|
+
* name-sorted list so the manifest renderer's output is byte-stable.
|
|
188
|
+
*
|
|
189
|
+
* **Collect ALL declared stores regardless of the source `export` keyword.**
|
|
190
|
+
* The compiler force-exports every container it processes (Pass 9 emits
|
|
191
|
+
* `export const name = …` unconditionally), so `session store X {}` and
|
|
192
|
+
* `route store X {}` are BOTH importable as `import { X }` — the walker must
|
|
193
|
+
* collect them. When the compiler stops force-exporting (a future coordinated
|
|
194
|
+
* change), re-introduce an `exported=true` filter and a "non-exported store
|
|
195
|
+
* consumed cross-file" diagnostic. For now, collect all.
|
|
196
|
+
*
|
|
197
|
+
* Phase 3: replaced the hand-rolled `STORE_DECL_RE` regex with `preprocess()`
|
|
198
|
+
* for v1+v2 dual-accept grammar. The `exported` field from `extractStoreNames`
|
|
199
|
+
* is available for diagnostics but is NOT used to filter here.
|
|
200
|
+
*
|
|
201
|
+
* Tolerates a missing `src/` directory (returns []).
|
|
202
|
+
*/
|
|
203
|
+
export declare const scanStores: (projectRoot: string, cache?: GraphCache) => DiscoveredStore[];
|
|
204
|
+
/**
|
|
205
|
+
* Discover every service binding declared anywhere under
|
|
206
|
+
* `<projectRoot>/src/` by source-regex via `preprocess()` (cold-start safe).
|
|
207
|
+
* Returns a deterministic name-sorted list so the manifest renderer's output
|
|
208
|
+
* is byte-stable.
|
|
209
|
+
*
|
|
210
|
+
* **Collect ALL declared services regardless of the source `export` keyword.**
|
|
211
|
+
* Same force-export rationale as {@link scanStores} — see its JSDoc for the
|
|
212
|
+
* full explanation and the re-introduction trigger.
|
|
213
|
+
*
|
|
214
|
+
* Tolerates a missing `src/` directory (returns []).
|
|
215
|
+
*/
|
|
216
|
+
export declare const scanServices: (projectRoot: string, cache?: GraphCache) => DiscoveredService[];
|
|
217
|
+
/**
|
|
218
|
+
* One injection site for an undeclared service — surfaced by
|
|
219
|
+
* {@link collectServiceInjectionDiagnostics} as a `console.warn` during
|
|
220
|
+
* manifest regen. Phase 3 (warn-only; no minted error code yet — deferred
|
|
221
|
+
* to Phase 6 per the brief).
|
|
222
|
+
*/
|
|
223
|
+
export interface ServiceInjectionDiagnostic {
|
|
224
|
+
/** The service name used in `inject service X`. */
|
|
225
|
+
readonly service: string;
|
|
226
|
+
/** The absolute path of the file containing the injection site. */
|
|
227
|
+
readonly file: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Walk `<projectRoot>/src/` and collect every `inject service X` site where
|
|
231
|
+
* `X` is NOT declared anywhere under `src/` (i.e. no `service X {}` or
|
|
232
|
+
* `export service X {}` block exists). Returns one diagnostic per injection
|
|
233
|
+
* site that references an undeclared name.
|
|
234
|
+
*
|
|
235
|
+
* Decision (brief §Step 5): warn-only — no minted error code. An `inject
|
|
236
|
+
* service X` where `X` is declared but non-exported is NOT a diagnostic
|
|
237
|
+
* (it's declared = configurable via hand-listed `configureServices`).
|
|
238
|
+
* `inject baseUrl from config("X")` carries `source:"config"`, not
|
|
239
|
+
* `kind:"service"`, so it is never counted.
|
|
240
|
+
*
|
|
241
|
+
* Tolerates a missing `src/` directory (returns []).
|
|
242
|
+
*/
|
|
243
|
+
export declare const collectServiceInjectionDiagnostics: (projectRoot: string, cache?: GraphCache) => ServiceInjectionDiagnostic[];
|
|
244
|
+
/**
|
|
245
|
+
* One discovered `_middleware.ts` file. The walker captures these in a
|
|
246
|
+
* separate pass from {@link scanPages} (which deliberately skips them via
|
|
247
|
+
* `isSpecialSegment`) so the existing page-tree walk stays simple.
|
|
248
|
+
*
|
|
249
|
+
* `dirRelativeToPages` is the path under `src/pages/` where the middleware
|
|
250
|
+
* lives, normalised to forward slashes and WITHOUT the filename — it's the
|
|
251
|
+
* URL-prefix the middleware applies to. Examples:
|
|
252
|
+
* `src/pages/_middleware.ts` → "" (applies to all routes)
|
|
253
|
+
* `src/pages/dashboard/_middleware.ts` → "dashboard" (applies to /dashboard/**)
|
|
254
|
+
* `src/pages/c/[id]/_middleware.ts` → "c/[id]" (applies to /c/:id/**)
|
|
255
|
+
*
|
|
256
|
+
* `identifier` is a unique JS-safe name for the default-import line in the
|
|
257
|
+
* generated module.
|
|
258
|
+
*/
|
|
259
|
+
export interface DiscoveredMiddleware {
|
|
260
|
+
/** Path under `src/pages/` with the filename stripped. Empty = root. */
|
|
261
|
+
readonly dirRelativeToPages: string;
|
|
262
|
+
/** Absolute filesystem path of the `_middleware.ts` file. */
|
|
263
|
+
readonly sourcePath: string;
|
|
264
|
+
/** Import specifier relative to `src/` (no extension). */
|
|
265
|
+
readonly importSpecifier: string;
|
|
266
|
+
/** Unique JS identifier for the default-import line. */
|
|
267
|
+
readonly identifier: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Walk `<projectRoot>/src/pages/` for `_middleware.ts` files. Skips
|
|
271
|
+
* Phase-1-unsupported directory shapes (route groups `(group)/`,
|
|
272
|
+
* catch-alls `[...slug]/`, parallel routes `@x/`) the same way
|
|
273
|
+
* {@link scanPages} does — a middleware inside a Phase-1-excluded
|
|
274
|
+
* subtree wouldn't be exercisable until those features land.
|
|
275
|
+
*
|
|
276
|
+
* Multiple `_middleware.ts` files in the same directory aren't a
|
|
277
|
+
* supported case (per spec — one per dir); but if both `_middleware.ts`
|
|
278
|
+
* and `_middleware.tsx` exist, only the `.ts` is recognised (the
|
|
279
|
+
* EXT_PRIORITY array drives the lookup).
|
|
280
|
+
*
|
|
281
|
+
* Tolerates a missing `src/pages/` directory (returns []).
|
|
282
|
+
*/
|
|
283
|
+
export declare const scanMiddleware: (projectRoot: string) => DiscoveredMiddleware[];
|
|
284
|
+
/**
|
|
285
|
+
* For every route in `routes`, compute the ordered list of `_middleware.ts`
|
|
286
|
+
* files that apply, root-first → leaf-last (spec §5.7 example). Pure —
|
|
287
|
+
* given the same inputs, produces the same chains, so the generated
|
|
288
|
+
* `router-middleware.generated.ts` is byte-stable.
|
|
289
|
+
*
|
|
290
|
+
* A middleware at directory `D` applies to a route at file directory `R`
|
|
291
|
+
* iff `D` is a prefix of `R` (`D === ""` always applies; `D === "dashboard"`
|
|
292
|
+
* applies to `dashboard/**`). The match treats path components atomically
|
|
293
|
+
* — `dash` does NOT prefix `dashboard`.
|
|
294
|
+
*
|
|
295
|
+
* Wave-3 §2b — route groups: the match is on FILE-TREE location, not URL
|
|
296
|
+
* prefix. `pages/(auth)/_middleware.ts` (dir `(auth)`) applies to
|
|
297
|
+
* `pages/(auth)/login.tsx` (URL `/login`) because the file lives inside
|
|
298
|
+
* `(auth)/`, even though the URL doesn't carry the group segment. Hand-
|
|
299
|
+
* built `DiscoveredRoute` fixtures without `fileDirRelativeToPages` fall
|
|
300
|
+
* back to root (`""`), preserving prior test behaviour.
|
|
301
|
+
*/
|
|
302
|
+
export declare const chainsForRoutes: (routes: readonly DiscoveredRoute[], middleware: readonly DiscoveredMiddleware[]) => Map<string, DiscoveredMiddleware[]>;
|
|
303
|
+
/**
|
|
304
|
+
* Format the `router-middleware.generated.ts` module text per spec §6.4.
|
|
305
|
+
* Empty input (no `_middleware.ts` files OR no routes have a chain) emits
|
|
306
|
+
* a stub module with an empty map — importers don't break on a fresh
|
|
307
|
+
* clone before any middleware exists.
|
|
308
|
+
*
|
|
309
|
+
* Deviation from the spec's illustrative `MiddlewareFn[]` shape: we emit
|
|
310
|
+
* `MiddlewareDef[]` so both `beforeEnter` AND `afterLeave` are reachable
|
|
311
|
+
* from a single map. The runtime (Stage 3) iterates the def's `.beforeEnter`
|
|
312
|
+
* and `.afterLeave` properties directly.
|
|
313
|
+
*/
|
|
314
|
+
export declare const emitRouterMiddleware: (middleware: readonly DiscoveredMiddleware[], chains: ReadonlyMap<string, readonly DiscoveredMiddleware[]>) => string;
|
|
315
|
+
/**
|
|
316
|
+
* Format the routeManifest.generated.ts module text. The output is what the
|
|
317
|
+
* vite plugin writes to `<projectRoot>/src/routeManifest.generated.ts` on
|
|
318
|
+
* `buildStart` and on subsequent `src/pages/` watcher events.
|
|
319
|
+
*
|
|
320
|
+
* Phase-1 shape: an untyped `ROUTES: RouteConfig[]` array. Typed `RouteId`
|
|
321
|
+
* / `RouteParams` / `RouteQuery` / `TypedNavigate` exports per Router §5.1
|
|
322
|
+
* land with #5c (typed query coercion needs the compiler to surface the
|
|
323
|
+
* `query` declarations into the manifest).
|
|
324
|
+
*
|
|
325
|
+
* Import strategy: Day 21 / `#18` — the compiler now also emits
|
|
326
|
+
* `export default Foo` for `export component Foo` (Pass-9 auto-default-
|
|
327
|
+
* export), so the manifest uses clean default imports
|
|
328
|
+
* (`import PageX from "..."`) and references them directly in the
|
|
329
|
+
* ROUTES array. The Day-13 `pickPageComponent` runtime helper is gone.
|
|
330
|
+
*/
|
|
331
|
+
export declare const emitRouteManifest: (routes: readonly DiscoveredRoute[], stores?: readonly DiscoveredStore[], services?: readonly DiscoveredService[]) => string;
|
|
332
|
+
//# sourceMappingURL=walker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../src/walker.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAUpE;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,mBAAmB,EAAE,M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