@nifrajs/web 2.1.0 → 2.3.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/README.md +3 -3
- package/dist/build-vite.d.ts +68 -0
- package/dist/build-vite.d.ts.map +1 -0
- package/dist/build-vite.js +433 -0
- package/dist/build-vite.js.map +1 -0
- package/dist/build.d.ts +174 -65
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +376 -135
- package/dist/build.js.map +1 -1
- package/dist/bun-dev-entry.d.ts +83 -0
- package/dist/bun-dev-entry.d.ts.map +1 -0
- package/dist/bun-dev-entry.js +136 -0
- package/dist/bun-dev-entry.js.map +1 -0
- package/dist/chunk-names.js +1 -1
- package/dist/client.d.ts +3 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +209 -27
- package/dist/client.js.map +1 -1
- package/dist/conformance.d.ts +2 -2
- package/dist/conformance.js +3 -3
- package/dist/deferred.d.ts +11 -11
- package/dist/deferred.d.ts.map +1 -1
- package/dist/deferred.js +16 -16
- package/dist/dev-error.d.ts +2 -2
- package/dist/dev-error.js +3 -3
- package/dist/dev-port.d.ts +36 -0
- package/dist/dev-port.d.ts.map +1 -0
- package/dist/dev-port.js +48 -0
- package/dist/dev-port.js.map +1 -0
- package/dist/dev.d.ts +62 -5
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +419 -60
- package/dist/dev.js.map +1 -1
- package/dist/draft.d.ts +44 -7
- package/dist/draft.d.ts.map +1 -1
- package/dist/draft.js +92 -9
- package/dist/draft.js.map +1 -1
- package/dist/fn-state.d.ts +56 -0
- package/dist/fn-state.d.ts.map +1 -0
- package/dist/fn-state.js +77 -0
- package/dist/fn-state.js.map +1 -0
- package/dist/fn.d.ts +111 -0
- package/dist/fn.d.ts.map +1 -0
- package/dist/fn.js +125 -0
- package/dist/fn.js.map +1 -0
- package/dist/fonts-google.d.ts +9 -9
- package/dist/fonts-google.js +10 -10
- package/dist/fonts.d.ts +7 -7
- package/dist/fonts.js +1 -1
- package/dist/forms.d.ts +8 -8
- package/dist/fs.d.ts +15 -2
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +8 -2
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +266 -74
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +869 -179
- package/dist/index.js.map +1 -1
- package/dist/internal/head-attributes.d.ts +15 -0
- package/dist/internal/head-attributes.d.ts.map +1 -0
- package/dist/internal/head-attributes.js +99 -0
- package/dist/internal/head-attributes.js.map +1 -0
- package/dist/internal/script-types.d.ts +14 -0
- package/dist/internal/script-types.d.ts.map +1 -0
- package/dist/internal/script-types.js +17 -0
- package/dist/internal/script-types.js.map +1 -0
- package/dist/internal/server-boundary.d.ts +60 -0
- package/dist/internal/server-boundary.d.ts.map +1 -0
- package/dist/internal/server-boundary.js +174 -0
- package/dist/internal/server-boundary.js.map +1 -0
- package/dist/internal/timing-safe-equal.d.ts +16 -0
- package/dist/internal/timing-safe-equal.d.ts.map +1 -0
- package/dist/internal/timing-safe-equal.js +26 -0
- package/dist/internal/timing-safe-equal.js.map +1 -0
- package/dist/internal/vite-import.d.ts +63 -0
- package/dist/internal/vite-import.d.ts.map +1 -0
- package/dist/internal/vite-import.js +94 -0
- package/dist/internal/vite-import.js.map +1 -0
- package/dist/islands.d.ts +5 -5
- package/dist/islands.js +5 -5
- package/dist/isr.d.ts +15 -15
- package/dist/isr.d.ts.map +1 -1
- package/dist/isr.js +8 -21
- package/dist/isr.js.map +1 -1
- package/dist/llms-txt.d.ts.map +1 -1
- package/dist/llms-txt.js +12 -6
- package/dist/llms-txt.js.map +1 -1
- package/dist/manifest.d.ts +121 -40
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +136 -26
- package/dist/manifest.js.map +1 -1
- package/dist/module-graph.d.ts +91 -0
- package/dist/module-graph.d.ts.map +1 -0
- package/dist/module-graph.js +92 -0
- package/dist/module-graph.js.map +1 -0
- package/dist/navigation.d.ts +120 -5
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +37 -5
- package/dist/navigation.js.map +1 -1
- package/dist/plugins/css-modules.d.ts +3 -3
- package/dist/plugins/css-modules.d.ts.map +1 -1
- package/dist/plugins/css-modules.js +0 -0
- package/dist/plugins/css-modules.js.map +1 -1
- package/dist/plugins/kit.d.ts +8 -8
- package/dist/plugins/kit.js +9 -9
- package/dist/plugins/scss.js +3 -3
- package/dist/plugins/vite-leak-guard.d.ts +45 -0
- package/dist/plugins/vite-leak-guard.d.ts.map +1 -0
- package/dist/plugins/vite-leak-guard.js +67 -0
- package/dist/plugins/vite-leak-guard.js.map +1 -0
- package/dist/plugins/vite-server-fn.d.ts +23 -0
- package/dist/plugins/vite-server-fn.d.ts.map +1 -0
- package/dist/plugins/vite-server-fn.js +51 -0
- package/dist/plugins/vite-server-fn.js.map +1 -0
- package/dist/plugins/vite-server-only.d.ts +49 -0
- package/dist/plugins/vite-server-only.d.ts.map +1 -0
- package/dist/plugins/vite-server-only.js +57 -0
- package/dist/plugins/vite-server-only.js.map +1 -0
- package/dist/prerender.d.ts +5 -5
- package/dist/prerender.js +7 -7
- package/dist/public-dir.d.ts +36 -0
- package/dist/public-dir.d.ts.map +1 -0
- package/dist/public-dir.js +89 -0
- package/dist/public-dir.js.map +1 -0
- package/dist/query.d.ts +10 -10
- package/dist/query.js +15 -15
- package/dist/route-manifest.d.ts +91 -0
- package/dist/route-manifest.d.ts.map +1 -0
- package/dist/route-manifest.js +128 -0
- package/dist/route-manifest.js.map +1 -0
- package/dist/router.d.ts +94 -22
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +170 -58
- package/dist/router.js.map +1 -1
- package/dist/search.d.ts +94 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +232 -0
- package/dist/search.js.map +1 -0
- package/dist/server-only.d.ts +6 -6
- package/dist/server-only.js +7 -7
- package/dist/service-worker.d.ts +56 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/service-worker.js +127 -0
- package/dist/service-worker.js.map +1 -0
- package/dist/vite.d.ts +25 -17
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +75 -33
- package/dist/vite.js.map +1 -1
- package/package.json +48 -4
- package/server-manifest.d.ts +31 -0
- package/src/build-vite.ts +553 -0
- package/src/build.ts +563 -172
- package/src/bun-dev-entry.ts +184 -0
- package/src/chunk-names.ts +1 -1
- package/src/client.ts +221 -30
- package/src/conformance.ts +3 -3
- package/src/deferred.ts +17 -17
- package/src/dev-error.ts +3 -3
- package/src/dev-port.ts +63 -0
- package/src/dev.ts +468 -66
- package/src/draft.ts +124 -12
- package/src/fn-state.ts +107 -0
- package/src/fn.ts +199 -0
- package/src/fonts-google.ts +13 -13
- package/src/fonts.ts +7 -7
- package/src/forms.ts +8 -8
- package/src/fs.ts +24 -6
- package/src/index.ts +1174 -225
- package/src/internal/head-attributes.ts +109 -0
- package/src/internal/script-types.ts +18 -0
- package/src/internal/server-boundary.ts +187 -0
- package/src/internal/timing-safe-equal.ts +24 -0
- package/src/internal/vite-import.ts +92 -0
- package/src/islands.ts +7 -7
- package/src/isr.ts +18 -30
- package/src/llms-txt.ts +13 -5
- package/src/manifest.ts +264 -48
- package/src/module-graph.ts +146 -0
- package/src/navigation.ts +151 -5
- package/src/plugins/css-modules.ts +0 -0
- package/src/plugins/kit.ts +11 -11
- package/src/plugins/scss.ts +3 -3
- package/src/plugins/vite-leak-guard.ts +110 -0
- package/src/plugins/vite-server-fn.ts +67 -0
- package/src/plugins/vite-server-only.ts +75 -0
- package/src/prerender.ts +10 -10
- package/src/public-dir.ts +108 -0
- package/src/query.ts +22 -22
- package/src/route-manifest.ts +240 -0
- package/src/router.ts +288 -74
- package/src/search.ts +297 -0
- package/src/server-only.ts +7 -7
- package/src/service-worker.ts +165 -0
- package/src/vite.ts +103 -49
package/dist/build.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BunPlugin } from "bun";
|
|
2
2
|
import { generateServerManifest } from "./index.js";
|
|
3
|
+
import { type ClientModuleGraph } from "./module-graph.js";
|
|
3
4
|
export { type CloudflarePagesRoutes, type CloudflarePagesRoutesOptions, cloudflarePagesRoutes, dataFileFor, htmlFileFor, type PrerenderApp, type PrerenderEntry, type PrerenderOptions, type PrerenderResult, prerenderRoutes, } from "./prerender.js";
|
|
4
5
|
export interface BuildClientOptions {
|
|
5
6
|
/** The `routes/` directory to discover (absolute path). */
|
|
@@ -20,11 +21,20 @@ export interface BuildClientOptions {
|
|
|
20
21
|
readonly minify?: boolean;
|
|
21
22
|
/** URL prefix the assets are served under (default `"/assets/"`); also Bun's chunk `publicPath`. */
|
|
22
23
|
readonly publicPath?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Directory of user-authored static files copied into the build and served at the root (default
|
|
26
|
+
* `"public"`). Absent directory ⇒ nothing copied, no error.
|
|
27
|
+
*
|
|
28
|
+
* NOT the same thing as {@link publicPath}, despite the names: that is the URL prefix for
|
|
29
|
+
* content-hashed bundle chunks and never covers files an author put on disk. The collision is a
|
|
30
|
+
* real source of confusion, which is why both are spelled out here.
|
|
31
|
+
*/
|
|
32
|
+
readonly publicDir?: string | false;
|
|
23
33
|
/**
|
|
24
34
|
* Prefix that opts an environment variable into the **client** bundle (Vite/Next convention; default
|
|
25
35
|
* `"PUBLIC_"`). Every var in the build environment whose name starts with this prefix is baked into
|
|
26
36
|
* the client `define` as `"process.env.NAME": JSON.stringify(value)`, so `process.env.PUBLIC_API_URL`
|
|
27
|
-
* compiles to its literal value in the browser. Vars WITHOUT the prefix are never exposed
|
|
37
|
+
* compiles to its literal value in the browser. Vars WITHOUT the prefix are never exposed - the bare
|
|
28
38
|
* `process.env` define resolves them to `undefined`, so server secrets can't leak into the client
|
|
29
39
|
* bundle. Set to `""` to disable auto-exposure entirely (no var is baked in). `options.define` still
|
|
30
40
|
* wins over an auto-exposed var (it's layered last). Sourced from `Bun.env` (falls back to
|
|
@@ -39,51 +49,74 @@ export interface BuildClientOptions {
|
|
|
39
49
|
* opt-out). Pure + exported so the prefix/redaction contract is unit-testable without a real build.
|
|
40
50
|
*/
|
|
41
51
|
export declare function publicEnvDefines(prefix: string, env: Readonly<Record<string, string | undefined>>): Record<string, string>;
|
|
42
|
-
|
|
52
|
+
export interface CloudflareRouteRules {
|
|
53
|
+
readonly include: readonly string[];
|
|
54
|
+
readonly exclude: readonly string[];
|
|
55
|
+
/** Public files the budget could not name, so the build can say so instead of capping silently. */
|
|
56
|
+
readonly omitted: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build the cf-pages `_routes.json` rules for a set of copied public files, within Cloudflare's budget.
|
|
60
|
+
*
|
|
61
|
+
* `exclude` is what Pages serves straight from the CDN instead of invoking the worker, so naming every
|
|
62
|
+
* public file is ideal - and impossible past ~99 of them. A `public/` of icons, fonts and share images
|
|
63
|
+
* clears 100 easily, and the rejection lands at `wrangler pages deploy`, long after the build reported
|
|
64
|
+
* success.
|
|
65
|
+
*
|
|
66
|
+
* A glob is emitted only where it cannot be wrong. `/assets/*` always is: the build owns that prefix
|
|
67
|
+
* outright, since it is where the hashed bundle is written. A `public/` subdirectory is different - the
|
|
68
|
+
* name is the author's, and a `/blog/*` rule would hand Pages every future path under `/blog/`, so a
|
|
69
|
+
* `/blog/:slug` route would 404 from the CDN in production only. {@link collapsibleDirs} therefore
|
|
70
|
+
* collapses a directory only after checking it against the app's real route patterns, which is what
|
|
71
|
+
* makes the compaction safe rather than merely smaller. Everything else stays an exact path, and a name
|
|
72
|
+
* containing `*` is dropped rather than escaped, since the rule would become a wildcard.
|
|
73
|
+
*
|
|
74
|
+
* What still does not fit is dropped, which is safe because the list is only an optimization: the
|
|
75
|
+
* generated worker serves any allowlisted path it receives through the ASSETS binding, so an omitted
|
|
76
|
+
* file costs one worker invocation, not a 404.
|
|
77
|
+
*/
|
|
78
|
+
export declare function cloudflareRouteRules(publicFiles: readonly string[],
|
|
79
|
+
/**
|
|
80
|
+
* Every route pattern the app serves. Required, not defaulted: an empty list means "this app serves
|
|
81
|
+
* no routes", which makes every directory collapsible - a defensible answer to state deliberately and
|
|
82
|
+
* a dangerous one to arrive at by forgetting the argument.
|
|
83
|
+
*/
|
|
84
|
+
routePatterns: readonly string[]): CloudflareRouteRules;
|
|
85
|
+
/** The built asset map - the server reads `entry` for the client script + serves `assets`. */
|
|
86
|
+
/**
|
|
87
|
+
* Copy `from` into `to`, returning the URL paths copied (sorted).
|
|
88
|
+
*
|
|
89
|
+
* Lives here, not beside `servePublicDir`, because it is BUILD-time: it reaches for `Bun.Glob` and
|
|
90
|
+
* `node:fs`, and `public-dir.ts` is reachable from the client bundle graph through the package
|
|
91
|
+
* entry - a dynamic `import("bun")` there fails the browser build outright.
|
|
92
|
+
*/
|
|
93
|
+
export declare function copyPublicDir(from: string, to: string): Promise<string[]>;
|
|
43
94
|
export interface BuildManifest {
|
|
44
95
|
/** URL of the client entry module (content-hashed). */
|
|
45
96
|
readonly entry: string;
|
|
46
|
-
/** URLs of every emitted asset (entry + chunks)
|
|
97
|
+
/** URLs of every emitted asset (entry + chunks) - for serving + preloading. */
|
|
47
98
|
readonly assets: readonly string[];
|
|
48
|
-
/** `routeId → [layout chunk URLs…, own chunk URL]`
|
|
99
|
+
/** `routeId → [layout chunk URLs…, own chunk URL]` - the chunks a route needs, for `createWebApp`'s
|
|
49
100
|
* `routePreload` (`<link rel="modulepreload">` the matched route alongside the entry). Each route +
|
|
50
101
|
* layout is also a build entrypoint, so it gets a named chunk the bootstrap's lazy import dedupes to. */
|
|
51
102
|
readonly routes: Readonly<Record<string, readonly string[]>>;
|
|
52
|
-
/**
|
|
103
|
+
/** URL paths copied from `publicDir`, sorted. Lets the server entry serve them without scanning a
|
|
104
|
+
* directory per request, and lets an adapter that needs a file list (CDN upload, platform static
|
|
105
|
+
* assets) consume one. Omitted when there is no `public/`. */
|
|
106
|
+
readonly publicFiles?: readonly string[];
|
|
107
|
+
/** The app's bundled, content-hashed stylesheet(s) - the bootstrap's **aggregate** CSS (every
|
|
53
108
|
* `import './x.css'` reachable from the app). The complete stylesheet regardless of which file
|
|
54
109
|
* imported the CSS; the always-safe fallback `createWebApp` links when a route has no per-route entry
|
|
55
110
|
* in {@link routeStyles}. Omitted when the app imports no CSS. */
|
|
56
111
|
readonly css?: readonly string[];
|
|
57
|
-
/** `routeId → [chain CSS URLs]`
|
|
112
|
+
/** `routeId → [chain CSS URLs]` - only the stylesheets the matched route's layout chain + own file
|
|
58
113
|
* actually use (Bun emits a per-entrypoint CSS bundle per route/layout, with shared-component CSS
|
|
59
114
|
* inlined into each consumer). `createWebApp` links these instead of the aggregate, so a page ships
|
|
60
115
|
* only its own CSS. A route is omitted (→ aggregate fallback) when its `[name]` collides with another
|
|
61
|
-
* route's basename (ambiguous CSS↔route) or the build emitted orphan shared-chunk CSS
|
|
116
|
+
* route's basename (ambiguous CSS↔route) or the build emitted orphan shared-chunk CSS - correctness
|
|
62
117
|
* over minimality. Absent entirely when the app imports no CSS. */
|
|
63
118
|
readonly routeStyles?: Readonly<Record<string, readonly string[]>>;
|
|
64
119
|
}
|
|
65
|
-
/** One edge in the metafile's import graph: the resolved `path` + the `original` specifier as written
|
|
66
|
-
* (so `import "node:crypto"` records `original: "node:crypto"` even after Bun resolves it to a
|
|
67
|
-
* polyfill path). Other Bun fields (`kind`, `external`) are ignored here. */
|
|
68
|
-
interface BunMetafileImport {
|
|
69
|
-
readonly path?: string;
|
|
70
|
-
readonly original?: string;
|
|
71
|
-
}
|
|
72
|
-
/** The slice of Bun's build metafile nifra reads: per INPUT module, the specifiers it `imports`
|
|
73
|
-
* (for the `node:` guard); per JS OUTPUT, its source `entryPoint`, the `cssBundle` Bun emitted for
|
|
74
|
-
* that entry, and the `inputs` (graph keys) that landed in it (for the per-route CSS map + locating
|
|
75
|
-
* which chunk a flagged builtin reached). Not yet in `@types/bun`; shape per the Bun bundler docs. */
|
|
76
|
-
interface BunMetafileOutput {
|
|
77
|
-
readonly entryPoint?: string;
|
|
78
|
-
readonly cssBundle?: string;
|
|
79
|
-
readonly inputs?: Readonly<Record<string, unknown>>;
|
|
80
|
-
}
|
|
81
|
-
interface BunMetafile {
|
|
82
|
-
readonly inputs?: Readonly<Record<string, {
|
|
83
|
-
readonly imports?: readonly BunMetafileImport[];
|
|
84
|
-
}>>;
|
|
85
|
-
readonly outputs: Readonly<Record<string, BunMetafileOutput>>;
|
|
86
|
-
}
|
|
87
120
|
/** One `node:`-builtin-in-the-client finding: the offending builtin, the emitted chunk it landed in,
|
|
88
121
|
* and the shortest USER-module import chain that pulled it there (entry → … → builtin). */
|
|
89
122
|
export interface NodeBuiltinFinding {
|
|
@@ -101,17 +134,17 @@ export interface NodeBuiltinFinding {
|
|
|
101
134
|
* Scan a build's metafile for any `node:` builtin that a USER module pulled into a CLIENT output
|
|
102
135
|
* chunk, returning a sorted, deduped list of {@link NodeBuiltinFinding}s. Three graph facts combine so
|
|
103
136
|
* the report is precise AND actionable:
|
|
104
|
-
* 1. **What the user wrote**
|
|
137
|
+
* 1. **What the user wrote** - only builtins imported by a NON-`node:` input count, so Bun's own
|
|
105
138
|
* polyfill chain (`node:crypto` → `node:buffer`/`node:stream`/…) doesn't bury the real cause.
|
|
106
|
-
* 2. **Where it landed**
|
|
139
|
+
* 2. **Where it landed** - the chunk is read from the per-output `inputs`, so the error names the
|
|
107
140
|
* emitted file to look at.
|
|
108
|
-
* 3. **How it got there**
|
|
141
|
+
* 3. **How it got there** - the shortest import chain from a user entry to the builtin
|
|
109
142
|
* (`shortestBuiltinChain`), so the error points straight at the offending `import` line instead of
|
|
110
143
|
* leaving the dev to grep the dependency tree (the DX gap this closes).
|
|
111
144
|
* Graph-based (never the emitted text), so it survives minification and can't be fooled by a string
|
|
112
145
|
* literal that merely contains `"node:crypto"`. Pure + exported for unit testing. Empty ⇒ clean.
|
|
113
146
|
*/
|
|
114
|
-
export declare function detectNodeBuiltinsInClient(
|
|
147
|
+
export declare function detectNodeBuiltinsInClient(graph: ClientModuleGraph): ReadonlyArray<NodeBuiltinFinding>;
|
|
115
148
|
/** The marker specifier an author imports to opt a module into the client-leak guard. Matched on the
|
|
116
149
|
* import edge's *as-written* `original` first (the robust signal: it's exactly what the author typed,
|
|
117
150
|
* before Bun resolves it to `src/server-only.ts` / `dist/server-only.js`). */
|
|
@@ -132,12 +165,16 @@ export interface ServerOnlyFinding {
|
|
|
132
165
|
* Scan a build's metafile for any module that opts into the `server-only` marker (a side-effect
|
|
133
166
|
* `import "@nifrajs/web/server-only"`) yet landed in a CLIENT output chunk, returning a sorted, deduped
|
|
134
167
|
* list of {@link ServerOnlyFinding}s. Mirrors {@link detectNodeBuiltinsInClient}: it reads the SAME
|
|
135
|
-
* graph facts
|
|
168
|
+
* graph facts - which inputs import the marker (the "marked" modules), which chunk each landed in (the
|
|
136
169
|
* per-output `inputs`), and the shortest import chain from a user entry to it. The marker module ITSELF
|
|
137
|
-
* (which imports nothing) is excluded
|
|
170
|
+
* (which imports nothing) is excluded - only the modules that *opt in* are flagged. Pure + exported for
|
|
138
171
|
* unit testing. Empty ⇒ clean.
|
|
139
172
|
*/
|
|
140
|
-
export declare function detectServerOnlyInClient(
|
|
173
|
+
export declare function detectServerOnlyInClient(graph: ClientModuleGraph): ReadonlyArray<ServerOnlyFinding>;
|
|
174
|
+
/** The build-failing message for `node:` builtins that reached the client bundle. `undefined` ⇒ clean. */
|
|
175
|
+
export declare function formatNodeBuiltinLeak(findings: ReadonlyArray<NodeBuiltinFinding>): string | undefined;
|
|
176
|
+
/** The build-failing message for `server-only`-marked modules that reached the client. `undefined` ⇒ clean. */
|
|
177
|
+
export declare function formatServerOnlyLeak(findings: ReadonlyArray<ServerOnlyFinding>): string | undefined;
|
|
141
178
|
/** One emitted chunk's measured size, in raw bytes + gzipped bytes (over-the-wire weight). */
|
|
142
179
|
export interface ChunkSize {
|
|
143
180
|
/** The emitted file's basename (e.g. `index-abc123.js`). */
|
|
@@ -147,7 +184,7 @@ export interface ChunkSize {
|
|
|
147
184
|
/** Gzipped byte length (what the client actually downloads, modulo brotli). */
|
|
148
185
|
readonly gzip: number;
|
|
149
186
|
}
|
|
150
|
-
/** A whole build's size report
|
|
187
|
+
/** A whole build's size report - every chunk (largest first) + the totals. */
|
|
151
188
|
export interface SizeReport {
|
|
152
189
|
/** Per-chunk sizes, sorted biggest gzip first (the regression you want to see at the top). */
|
|
153
190
|
readonly chunks: readonly ChunkSize[];
|
|
@@ -158,24 +195,24 @@ export interface SizeReport {
|
|
|
158
195
|
}
|
|
159
196
|
/**
|
|
160
197
|
* Aggregate a list of measured chunks into a {@link SizeReport}: sort biggest-gzip-first (ties broken
|
|
161
|
-
* by raw bytes, then name for stable output) and sum the totals. Pure
|
|
198
|
+
* by raw bytes, then name for stable output) and sum the totals. Pure - the measurement (reading the
|
|
162
199
|
* file + `Bun.gzipSync`) happens in the orchestrator; this is the deterministic, unit-testable core.
|
|
163
200
|
*/
|
|
164
201
|
export declare function aggregateSizeReport(chunks: readonly ChunkSize[]): SizeReport;
|
|
165
202
|
/** Human-readable byte count: `B`/`KB`/`MB` with one decimal above 1 KB (e.g. `12.3 KB`). Pure. */
|
|
166
203
|
export declare function formatBytes(bytes: number): string;
|
|
167
204
|
/**
|
|
168
|
-
* Render a {@link SizeReport} as a terse aligned table (biggest first) with a totals row
|
|
205
|
+
* Render a {@link SizeReport} as a terse aligned table (biggest first) with a totals row - the text
|
|
169
206
|
* `nifra build --report` prints. Pure (string in, string out) so the formatting is unit-testable.
|
|
170
207
|
*/
|
|
171
208
|
export declare function renderSizeReport(report: SizeReport): string;
|
|
172
209
|
/** A drift finding between a committed server-manifest and the live `routes/` tree. */
|
|
173
210
|
export interface ManifestDrift {
|
|
174
|
-
/** Route files present in `routes/` but ABSENT from the committed manifest (the manifest is stale
|
|
211
|
+
/** Route files present in `routes/` but ABSENT from the committed manifest (the manifest is stale -
|
|
175
212
|
* the new route won't be served by the worker). */
|
|
176
213
|
readonly missing: readonly string[];
|
|
177
214
|
/** Route files the committed manifest imports that no longer exist in `routes/` (a deleted/renamed
|
|
178
|
-
* route still wired into the worker
|
|
215
|
+
* route still wired into the worker - a build/runtime break). */
|
|
179
216
|
readonly extra: readonly string[];
|
|
180
217
|
}
|
|
181
218
|
/**
|
|
@@ -183,7 +220,7 @@ export interface ManifestDrift {
|
|
|
183
220
|
* `routes/`-relative keys `discoverRoutes` produces (e.g. `docs/index.tsx`). `routesPrefix` is the
|
|
184
221
|
* specifier prefix the manifest used for the routes dir (default `./routes/`, what `buildServer`'s
|
|
185
222
|
* default `resolve` emits). Only import specifiers under that prefix are route files; the
|
|
186
|
-
* `@nifrajs/web` import (and any other bare specifier) is ignored. Pure
|
|
223
|
+
* `@nifrajs/web` import (and any other bare specifier) is ignored. Pure - operates on source text.
|
|
187
224
|
*/
|
|
188
225
|
export declare function parseManifestRouteFiles(source: string, routesPrefix?: string): string[];
|
|
189
226
|
/** The baked `clientEntry` URL in a committed server-manifest, or `undefined` if absent. Pure. */
|
|
@@ -203,8 +240,8 @@ export declare function parseManifestRouteStyles(source: string): Record<string,
|
|
|
203
240
|
export declare function resyncServerManifestSource(source: string, manifest: Parameters<typeof generateServerManifest>[0], routesPrefix: string): string;
|
|
204
241
|
/**
|
|
205
242
|
* Diff the route files a committed server-manifest imports against the files freshly discovered in
|
|
206
|
-
* `routes/`. Returns the `missing` (in routes/, not in manifest
|
|
207
|
-
* manifest, gone from routes/
|
|
243
|
+
* `routes/`. Returns the `missing` (in routes/, not in manifest - stale manifest) and `extra` (in
|
|
244
|
+
* manifest, gone from routes/ - dangling import) sets. Empty arrays ⇒ in sync. Pure - the caller
|
|
208
245
|
* supplies both file lists (the committed source is parsed via {@link parseManifestRouteFiles}; the
|
|
209
246
|
* fresh list comes from `discoverRoutes`). Lists need not be pre-sorted; the result is sorted.
|
|
210
247
|
*/
|
|
@@ -219,37 +256,37 @@ export declare function isManifestInSync(drift: ManifestDrift): boolean;
|
|
|
219
256
|
export declare function formatManifestDrift(drift: ManifestDrift, manifestPath?: string): string | undefined;
|
|
220
257
|
/**
|
|
221
258
|
* Build the client bundle for a file-routed app. Writes the hashed assets + `manifest.json` to
|
|
222
|
-
* `outDir` and returns the manifest. Throws (with the bundler logs) on build failure
|
|
259
|
+
* `outDir` and returns the manifest. Throws (with the bundler logs) on build failure - never
|
|
223
260
|
* silently ships a broken bundle.
|
|
224
261
|
*/
|
|
225
262
|
export declare function buildClient(options: BuildClientOptions): Promise<BuildManifest>;
|
|
226
263
|
export interface BuildServerOptions {
|
|
227
264
|
/** The `routes/` directory to discover (absolute path). */
|
|
228
265
|
readonly routesDir: string;
|
|
229
|
-
/** The worker entry module (absolute path)
|
|
266
|
+
/** The worker entry module (absolute path) - your `worker.ts`. It imports `{ manifest, clientEntry }`
|
|
230
267
|
* from the generated `./server-manifest`, builds `createWebApp`, and `export default toFetchHandler(app)`. */
|
|
231
268
|
readonly serverEntry: string;
|
|
232
269
|
/** Output directory for the bundled worker (absolute path). */
|
|
233
270
|
readonly outDir: string;
|
|
234
|
-
/** The content-hashed client entry URL (from `buildClient`'s manifest)
|
|
271
|
+
/** The content-hashed client entry URL (from `buildClient`'s manifest) - **baked** into the generated
|
|
235
272
|
* server manifest, since a disk-less worker can't read `manifest.json` at runtime. */
|
|
236
273
|
readonly clientEntry: string;
|
|
237
|
-
/** The app's aggregate stylesheet URLs (`buildClient`'s `BuildManifest.css`)
|
|
274
|
+
/** The app's aggregate stylesheet URLs (`buildClient`'s `BuildManifest.css`) - baked into the generated
|
|
238
275
|
* manifest so the server entry hands them to `createWebApp` (→ `<link rel="stylesheet">`). Omit ⇒ no CSS
|
|
239
276
|
* link (the built SSR page would otherwise render unstyled). */
|
|
240
277
|
readonly styles?: readonly string[] | undefined;
|
|
241
|
-
/** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`)
|
|
278
|
+
/** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - baked alongside `styles`. */
|
|
242
279
|
readonly routeStyles?: Readonly<Record<string, readonly string[]>> | undefined;
|
|
243
280
|
/** Route/layout file → import specifier in the generated manifest (default: a relative path from the
|
|
244
|
-
* manifest's location
|
|
281
|
+
* manifest's location - written next to `serverEntry` - to `routesDir`). */
|
|
245
282
|
readonly resolve?: (file: string) => string;
|
|
246
283
|
/** Filename for the generated server-manifest module, written next to `serverEntry` (default
|
|
247
284
|
* `"server-manifest.ts"`); your `serverEntry` imports it as `./server-manifest`. */
|
|
248
285
|
readonly manifestFile?: string;
|
|
249
|
-
/** Adapter build plugins (e.g. `solidBunPlugin("ssr")`
|
|
286
|
+
/** Adapter build plugins (e.g. `solidBunPlugin("ssr")` - Solid routes need their SSR transform at
|
|
250
287
|
* build time; React's JSX is Bun-native and needs none). */
|
|
251
288
|
readonly plugins?: readonly BunPlugin[];
|
|
252
|
-
/** `Bun.build` resolution conditions (default `["workerd", "edge-light", "browser"]`)
|
|
289
|
+
/** `Bun.build` resolution conditions (default `["workerd", "edge-light", "browser"]`) - selects each
|
|
253
290
|
* dependency's edge build. */
|
|
254
291
|
readonly conditions?: readonly string[];
|
|
255
292
|
/** Compile-time replacements (default `{ "process.env.NODE_ENV": '"production"' }` → production
|
|
@@ -257,7 +294,7 @@ export interface BuildServerOptions {
|
|
|
257
294
|
readonly define?: Readonly<Record<string, string>>;
|
|
258
295
|
/** Minify the output (default `true`). */
|
|
259
296
|
readonly minify?: boolean;
|
|
260
|
-
/** `Bun.build` target (default `"browser"`
|
|
297
|
+
/** `Bun.build` target (default `"browser"` - the right shape for edge runtimes: Cloudflare Workers,
|
|
261
298
|
* Vercel Edge, Deno, Deno Deploy). Use `"node"` for a `@nifrajs/node` server (so `node:*` built-ins
|
|
262
299
|
* stay external), or `"bun"` for a Bun server. The default `conditions` + the edge resolve shims
|
|
263
300
|
* only apply to the `"browser"` target; `"node"`/`"bun"` resolve their own renderer builds via the
|
|
@@ -266,24 +303,24 @@ export interface BuildServerOptions {
|
|
|
266
303
|
/** **Lazy/code-split routes** (default `false`): emit `() => import(route)` loaders + bundle with
|
|
267
304
|
* `splitting`, so each route is its own chunk loaded on first request (smaller cold-start parse)
|
|
268
305
|
* instead of all parsed at boot. The output becomes the worker entry **+ chunk files** in `outDir`
|
|
269
|
-
*
|
|
306
|
+
* - on Cloudflare, ship them with wrangler's `no_bundle` + `find_additional_modules` + an ESModule
|
|
270
307
|
* `rule` (Node/Deno import the chunks natively). Eager (one self-contained file) stays the default. */
|
|
271
308
|
readonly lazy?: boolean;
|
|
272
309
|
}
|
|
273
|
-
/** The built worker bundle
|
|
310
|
+
/** The built worker bundle - point your `wrangler.toml`'s `main` at `worker`. */
|
|
274
311
|
export interface ServerBuild {
|
|
275
312
|
/** Path to the bundled, self-contained worker entry. */
|
|
276
313
|
readonly worker: string;
|
|
277
|
-
/** Paths of every emitted output (entry + any code-split chunks)
|
|
314
|
+
/** Paths of every emitted output (entry + any code-split chunks) - what to ship to the platform. */
|
|
278
315
|
readonly outputs: readonly string[];
|
|
279
316
|
}
|
|
280
317
|
export declare const reactDedupePlugin: (from: string) => BunPlugin;
|
|
281
318
|
export declare const preactDedupePlugin: (from: string) => BunPlugin;
|
|
282
319
|
/**
|
|
283
|
-
* Dedupe Svelte to a single copy
|
|
320
|
+
* Dedupe Svelte to a single copy - the Svelte analogue of `reactDedupePlugin`/`preactDedupePlugin`, closing
|
|
284
321
|
* the same class of bug for Svelte (which had NO build-time dedup before). A workspace- or file-linked
|
|
285
322
|
* `@nifrajs/web-svelte` can resolve its OWN `svelte` (e.g. a sibling repo's install store) while the app's
|
|
286
|
-
* components resolve another
|
|
323
|
+
* components resolve another - SAME version, two physical copies. Svelte 5's client runtime
|
|
287
324
|
* (`svelte/internal/client`) holds module-level component-context state, so two copies means the compiled
|
|
288
325
|
* components register on one runtime while `hydrate` runs on the other → hydration throws
|
|
289
326
|
* `Cannot read properties of undefined (reading 'call')` and the server-rendered markup is wiped.
|
|
@@ -295,14 +332,36 @@ export declare const preactDedupePlugin: (from: string) => BunPlugin;
|
|
|
295
332
|
* when Svelte isn't used / isn't resolvable from `from`.
|
|
296
333
|
*/
|
|
297
334
|
export declare const svelteDedupePlugin: (from: string) => BunPlugin;
|
|
335
|
+
/**
|
|
336
|
+
* Remix-style `.server` convention for the CLIENT build. A module named `*.server.ts(x)` (`db.server.ts`,
|
|
337
|
+
* `auth.server.ts`, …) is server-only - empty it in the browser bundle so its (possibly `node:` / native /
|
|
338
|
+
* Capacitor) import subtree never reaches the client. The body is CJS-with-a-Proxy so any named OR default
|
|
339
|
+
* import resolves to `undefined` rather than a "missing export" bundle error (verified), and the real
|
|
340
|
+
* import subtree is gone. The complement to the node-builtin guard: when a server-only import is co-located
|
|
341
|
+
* in a route file (so it can't be tree-shaken out and the guard fails loud), moving it into a `*.server`
|
|
342
|
+
* module is the fix. CLIENT-only - buildServer keeps the real module, which runs server-side.
|
|
343
|
+
*/
|
|
298
344
|
export declare const serverOnlyEmptyPlugin: () => BunPlugin;
|
|
345
|
+
/**
|
|
346
|
+
* Server functions in the CLIENT build: replace each `*.fn.ts` module with stubs that call the routes
|
|
347
|
+
* the server mounted, so the function bodies - and everything they import - never reach a browser.
|
|
348
|
+
*
|
|
349
|
+
* The sibling of {@link serverOnlyEmptyPlugin}, and a deliberate contrast: a `*.server` module is
|
|
350
|
+
* EMPTIED because nothing may call it from the client, while a `*.fn` module is REPLACED because the
|
|
351
|
+
* client is supposed to call it, just over HTTP. The generation itself is in
|
|
352
|
+
* `internal/server-boundary.ts` so the Vite pipeline emits identical stubs from the same code; two
|
|
353
|
+
* hand-written copies would be a client that works in dev and 404s in production.
|
|
354
|
+
*
|
|
355
|
+
* CLIENT-only. The server build keeps the real module, which is what `serverFunctions()` mounts.
|
|
356
|
+
*/
|
|
357
|
+
export declare const serverFnStubPlugin: () => BunPlugin;
|
|
299
358
|
/**
|
|
300
359
|
* Build a self-contained **worker bundle** for a file-routed app on a disk-less edge (Cloudflare
|
|
301
360
|
* Workers / workerd). Discovers routes (build-time fs), codegens the static-import server manifest
|
|
302
361
|
* (`generateServerManifest`, written next to `serverEntry`), then bundles `serverEntry` with
|
|
303
362
|
* `Bun.build` using **edge conditions** + the adapter's SSR plugins. The output imports no `node:fs`
|
|
304
363
|
* and does no dynamic-path import, so it runs on workerd: point `wrangler.toml`'s `main` at it and
|
|
305
|
-
* serve the client assets via Workers Assets. Throws (with the bundler logs) on failure
|
|
364
|
+
* serve the client assets via Workers Assets. Throws (with the bundler logs) on failure - never
|
|
306
365
|
* silently ships a broken worker.
|
|
307
366
|
*/
|
|
308
367
|
export declare function buildServer(options: BuildServerOptions): Promise<ServerBuild>;
|
|
@@ -320,7 +379,7 @@ export declare function isBuildTarget(value: string): value is BuildTarget;
|
|
|
320
379
|
* - `deno`: same fetch-handler default, plus `Deno.serve` self-host when run directly.
|
|
321
380
|
* - `bun` / `node`: a self-hosting server that ALSO serves the client bundle from disk (those
|
|
322
381
|
* runtimes have a filesystem; the static `/assets/*` sit next to the entry).
|
|
323
|
-
* `adapterImport`/`backendImport` are the specifiers the entry uses (relative to where it's written)
|
|
382
|
+
* `adapterImport`/`backendImport` are the specifiers the entry uses (relative to where it's written) -
|
|
324
383
|
* `buildServer` writes the entry next to `serverEntry`, so they're resolved from there. Pure (string in,
|
|
325
384
|
* string out) so the generation is unit-testable without a real build.
|
|
326
385
|
*/
|
|
@@ -332,6 +391,8 @@ export declare function generateServerEntry(options: {
|
|
|
332
391
|
readonly backendImport?: string;
|
|
333
392
|
/** Document `<title>` passed to `createWebApp`. */
|
|
334
393
|
readonly title?: string;
|
|
394
|
+
/** Encoded root-relative public file paths copied into the deploy directory. */
|
|
395
|
+
readonly publicFiles?: readonly string[];
|
|
335
396
|
}): string;
|
|
336
397
|
export interface BuildTargetOptions {
|
|
337
398
|
/** The `routes/` directory to discover (absolute path). */
|
|
@@ -347,7 +408,7 @@ export interface BuildTargetOptions {
|
|
|
347
408
|
readonly adapterImport: string;
|
|
348
409
|
/** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */
|
|
349
410
|
readonly backendImport?: string;
|
|
350
|
-
/** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest
|
|
411
|
+
/** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest - so the
|
|
351
412
|
* emitted hydration `<script src>` uses the REAL content-hashed entry (`client.entry`) plus the same
|
|
352
413
|
* styles/route-preload the server targets use. A pre-built instance can't work here: the hash isn't known
|
|
353
414
|
* until `buildClient` runs inside `buildTarget`, so a hardcoded entry 404s → pages render but never
|
|
@@ -361,14 +422,18 @@ export interface BuildTargetOptions {
|
|
|
361
422
|
readonly conditions?: readonly string[];
|
|
362
423
|
/** Compile-time `define` replacements layered onto both builds. */
|
|
363
424
|
readonly define?: Readonly<Record<string, string>>;
|
|
425
|
+
/** Project-root static directory copied to deploy root. `false` disables it. */
|
|
426
|
+
readonly publicDir?: string | false;
|
|
427
|
+
/** Prefix of environment variables allowed into the client bundle (default `"PUBLIC_"`). */
|
|
428
|
+
readonly publicEnvPrefix?: string;
|
|
364
429
|
/** Document `<title>` for the generated server entry. */
|
|
365
430
|
readonly title?: string;
|
|
366
431
|
}
|
|
367
|
-
/** Minimal app surface `buildTarget`'s static path needs
|
|
432
|
+
/** Minimal app surface `buildTarget`'s static path needs - a fetch handler (a built `createWebApp`). */
|
|
368
433
|
export interface PrerenderAppLike {
|
|
369
434
|
fetch(req: Request): Response | Promise<Response>;
|
|
370
435
|
}
|
|
371
|
-
/** The result of a target build
|
|
436
|
+
/** The result of a target build - the deploy dir + the client manifest + an optional size report. */
|
|
372
437
|
export interface BuildTargetResult {
|
|
373
438
|
/** The deploy target that was built. */
|
|
374
439
|
readonly target: BuildTarget;
|
|
@@ -388,7 +453,7 @@ export interface BuildTargetResult {
|
|
|
388
453
|
* - `static`: prerenders opted-in routes (`prerenderRoutes`) to `<outDir>/<path>/index.html` (+
|
|
389
454
|
* `_data.json`); needs `prerenderApp`. No server.
|
|
390
455
|
* - `cf-pages`: a `_worker.js` (edge bundle) + a `_routes.json` excluding /assets/* from the worker.
|
|
391
|
-
* - `vercel`: a `.vercel/output`-shaped function isn't emitted here
|
|
456
|
+
* - `vercel`: a `.vercel/output`-shaped function isn't emitted here - `vercel` emits the bundled edge
|
|
392
457
|
* entry as `<outDir>/index.js` (the CLI's docs point at `vercel`'s Build Output wrapper). [see note]
|
|
393
458
|
* - `deno`/`node`/`bun`: the self-hosting server bundle (`server.js`) next to the assets.
|
|
394
459
|
* The server entry is GENERATED (`generateServerEntry`) and bundled (`buildServer`); the app supplies
|
|
@@ -397,5 +462,49 @@ export interface BuildTargetResult {
|
|
|
397
462
|
* Note: the heavier platform wrappers (`.vercel/output` v3 layout, wrangler ISR `find_additional_modules`)
|
|
398
463
|
* remain app-owned scripts; this command targets the common single-bundle deploys. See the CLI docs.
|
|
399
464
|
*/
|
|
465
|
+
/**
|
|
466
|
+
* A build-tool STRATEGY for {@link buildTargetWith} - the two bundling steps, and nothing else. Everything
|
|
467
|
+
* around them (server-entry codegen, deploy assembly, prerender, size report) is bundler-agnostic and
|
|
468
|
+
* lives in `buildTargetWith`, so a second bundler (Vite) is this interface, not a second orchestrator.
|
|
469
|
+
*
|
|
470
|
+
* Plugin lists are `readonly unknown[]` because a Bun plugin and a Vite plugin are different types; each
|
|
471
|
+
* strategy casts to its own. `buildTargetWith` only forwards them.
|
|
472
|
+
*/
|
|
473
|
+
export interface Bundler {
|
|
474
|
+
/** Build the client bundle → the shared {@link BuildManifest}. */
|
|
475
|
+
buildClient(input: {
|
|
476
|
+
readonly routesDir: string;
|
|
477
|
+
readonly outDir: string;
|
|
478
|
+
readonly clientModule: string;
|
|
479
|
+
readonly plugins?: readonly unknown[];
|
|
480
|
+
readonly conditions?: readonly string[];
|
|
481
|
+
readonly define?: Readonly<Record<string, string>>;
|
|
482
|
+
readonly publicDir?: string | false;
|
|
483
|
+
readonly publicEnvPrefix?: string;
|
|
484
|
+
/** Project root (Vite needs it; the Bun strategy ignores it). */
|
|
485
|
+
readonly root?: string;
|
|
486
|
+
}): Promise<BuildManifest>;
|
|
487
|
+
/** Build the server worker → the shared {@link ServerBuild}. */
|
|
488
|
+
buildServer(input: {
|
|
489
|
+
readonly routesDir: string;
|
|
490
|
+
readonly serverEntry: string;
|
|
491
|
+
readonly outDir: string;
|
|
492
|
+
readonly clientEntry: string;
|
|
493
|
+
readonly target: "browser" | "node" | "bun";
|
|
494
|
+
readonly plugins?: readonly unknown[];
|
|
495
|
+
readonly define?: Readonly<Record<string, string>>;
|
|
496
|
+
readonly root?: string;
|
|
497
|
+
}): Promise<ServerBuild>;
|
|
498
|
+
}
|
|
499
|
+
/** The default (Bun) strategy - `buildClient`/`buildServer` from this module. */
|
|
500
|
+
export declare const bunBundler: Bundler;
|
|
501
|
+
/** Build a full deploy dir for `target` using the default Bun bundler. See {@link buildTargetWith}. */
|
|
400
502
|
export declare function buildTarget(target: BuildTarget, options: BuildTargetOptions): Promise<BuildTargetResult>;
|
|
503
|
+
/**
|
|
504
|
+
* The bundler-agnostic deploy orchestrator: everything `buildTarget` does EXCEPT the two bundling steps,
|
|
505
|
+
* which come from `bundler`. `buildTarget` passes {@link bunBundler}; `buildTargetVite`
|
|
506
|
+
* (`@nifrajs/web/build-vite`) passes the Vite strategy. One orchestrator, so the deploy-dir shape,
|
|
507
|
+
* server-entry codegen, prerender and size report are identical across pipelines.
|
|
508
|
+
*/
|
|
509
|
+
export declare function buildTargetWith(target: BuildTarget, options: BuildTargetOptions, bundler: Bundler): Promise<BuildTargetResult>;
|
|
401
510
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,KAAK,CAAA;AAG1C,OAAO,EAAuB,sBAAsB,EAAE,MAAM,YAAY,CAAA;AASxE,OAAO,EAAE,KAAK,iBA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