@nifrajs/web 0.1.0-alpha.1 → 0.1.0-alpha.2

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.
Files changed (49) hide show
  1. package/README.md +8 -0
  2. package/dist/build.d.ts +252 -0
  3. package/dist/build.d.ts.map +1 -1
  4. package/dist/build.js +755 -6
  5. package/dist/build.js.map +1 -1
  6. package/dist/chunk-names.d.ts +4 -0
  7. package/dist/chunk-names.d.ts.map +1 -0
  8. package/dist/chunk-names.js +46 -0
  9. package/dist/chunk-names.js.map +1 -0
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/client.js +19 -2
  12. package/dist/client.js.map +1 -1
  13. package/dist/dev.d.ts +1 -1
  14. package/dist/dev.d.ts.map +1 -1
  15. package/dist/dev.js +2 -1
  16. package/dist/dev.js.map +1 -1
  17. package/dist/fonts-google.d.ts +2 -1
  18. package/dist/fonts-google.d.ts.map +1 -1
  19. package/dist/fonts-google.js.map +1 -1
  20. package/dist/fonts.d.ts +2 -1
  21. package/dist/fonts.d.ts.map +1 -1
  22. package/dist/fonts.js +0 -16
  23. package/dist/fonts.js.map +1 -1
  24. package/dist/index.d.ts +138 -6
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +268 -23
  27. package/dist/index.js.map +1 -1
  28. package/dist/manifest.d.ts +82 -5
  29. package/dist/manifest.d.ts.map +1 -1
  30. package/dist/manifest.js.map +1 -1
  31. package/dist/server-only.d.ts +21 -0
  32. package/dist/server-only.d.ts.map +1 -0
  33. package/dist/server-only.js +25 -0
  34. package/dist/server-only.js.map +1 -0
  35. package/dist/vite.d.ts +21 -1
  36. package/dist/vite.d.ts.map +1 -1
  37. package/dist/vite.js +68 -4
  38. package/dist/vite.js.map +1 -1
  39. package/package.json +6 -1
  40. package/src/build.ts +1066 -12
  41. package/src/chunk-names.ts +45 -0
  42. package/src/client.ts +19 -2
  43. package/src/dev.ts +3 -2
  44. package/src/fonts-google.ts +3 -2
  45. package/src/fonts.ts +2 -1
  46. package/src/index.ts +373 -32
  47. package/src/manifest.ts +84 -6
  48. package/src/server-only.ts +25 -0
  49. package/src/vite.ts +82 -5
package/README.md CHANGED
@@ -16,3 +16,11 @@ bun add @nifrajs/web
16
16
  - AI-readable: <https://nifra.dev/llms.txt>
17
17
 
18
18
  MIT
19
+
20
+ ## For AI agents
21
+
22
+ Start with [`LLM.md`](./LLM.md) — this package's contract card (the exports you call + its footguns),
23
+ one cheap read instead of the whole corpus. For the wider framework: the repo's
24
+ [`AGENTS.md`](../../AGENTS.md) is the copy-paste quick reference, and
25
+ [`llms-full.txt`](../../llms-full.txt) is the full machine-readable corpus. Run `nifra check` as the
26
+ done-gate, or `nifra mcp` to give the agent live project tools.
package/dist/build.d.ts CHANGED
@@ -19,7 +19,25 @@ export interface BuildClientOptions {
19
19
  readonly minify?: boolean;
20
20
  /** URL prefix the assets are served under (default `"/assets/"`); also Bun's chunk `publicPath`. */
21
21
  readonly publicPath?: string;
22
+ /**
23
+ * Prefix that opts an environment variable into the **client** bundle (Vite/Next convention; default
24
+ * `"PUBLIC_"`). Every var in the build environment whose name starts with this prefix is baked into
25
+ * the client `define` as `"process.env.NAME": JSON.stringify(value)`, so `process.env.PUBLIC_API_URL`
26
+ * compiles to its literal value in the browser. Vars WITHOUT the prefix are never exposed — the bare
27
+ * `process.env` define resolves them to `undefined`, so server secrets can't leak into the client
28
+ * bundle. Set to `""` to disable auto-exposure entirely (no var is baked in). `options.define` still
29
+ * wins over an auto-exposed var (it's layered last). Sourced from `Bun.env` (falls back to
30
+ * `process.env`) at build time. */
31
+ readonly publicEnvPrefix?: string;
22
32
  }
33
+ /**
34
+ * The `process.env.<NAME>` → `JSON.stringify(value)` define entries for every env var whose name
35
+ * carries `prefix` (the Vite/Next public-env convention). Exposing ONLY the prefixed vars is the
36
+ * security boundary: an unprefixed var (a secret) never gets a define, so the bare `process.env`
37
+ * define resolves it to `undefined` in the client bundle. An empty `prefix` exposes nothing (the
38
+ * opt-out). Pure + exported so the prefix/redaction contract is unit-testable without a real build.
39
+ */
40
+ export declare function publicEnvDefines(prefix: string, env: Readonly<Record<string, string | undefined>>): Record<string, string>;
23
41
  /** The built asset map — the server reads `entry` for the client script + serves `assets`. */
24
42
  export interface BuildManifest {
25
43
  /** URL of the client entry module (content-hashed). */
@@ -43,6 +61,148 @@ export interface BuildManifest {
43
61
  * over minimality. Absent entirely when the app imports no CSS. */
44
62
  readonly routeStyles?: Readonly<Record<string, readonly string[]>>;
45
63
  }
64
+ /** One edge in the metafile's import graph: the resolved `path` + the `original` specifier as written
65
+ * (so `import "node:crypto"` records `original: "node:crypto"` even after Bun resolves it to a
66
+ * polyfill path). Other Bun fields (`kind`, `external`) are ignored here. */
67
+ interface BunMetafileImport {
68
+ readonly path?: string;
69
+ readonly original?: string;
70
+ }
71
+ /** The slice of Bun's build metafile nifra reads: per INPUT module, the specifiers it `imports`
72
+ * (for the `node:` guard); per JS OUTPUT, its source `entryPoint`, the `cssBundle` Bun emitted for
73
+ * that entry, and the `inputs` (graph keys) that landed in it (for the per-route CSS map + locating
74
+ * which chunk a flagged builtin reached). Not yet in `@types/bun`; shape per the Bun bundler docs. */
75
+ interface BunMetafileOutput {
76
+ readonly entryPoint?: string;
77
+ readonly cssBundle?: string;
78
+ readonly inputs?: Readonly<Record<string, unknown>>;
79
+ }
80
+ interface BunMetafile {
81
+ readonly inputs?: Readonly<Record<string, {
82
+ readonly imports?: readonly BunMetafileImport[];
83
+ }>>;
84
+ readonly outputs: Readonly<Record<string, BunMetafileOutput>>;
85
+ }
86
+ /** One `node:`-builtin-in-the-client finding: the offending builtin, the emitted chunk it landed in,
87
+ * and the shortest USER-module import chain that pulled it there (entry → … → builtin). */
88
+ export interface NodeBuiltinFinding {
89
+ readonly builtin: string;
90
+ readonly chunk: string;
91
+ /** The shortest import path from a user entry to the builtin, as a list of display labels:
92
+ * `[entryFile, ...as-written specifiers along the way, builtin]`, e.g.
93
+ * `["routes/article/[slug].tsx", "../data.ts", "../db/client.ts", "postgres", "node:tls"]`. The
94
+ * entry is its graph key (the route file); each hop is the import's *as-written* specifier; the tail
95
+ * is the builtin. Empty only if the builtin module isn't reachable from any traced input (it always
96
+ * is when flagged). */
97
+ readonly chain: readonly string[];
98
+ }
99
+ /**
100
+ * Scan a build's metafile for any `node:` builtin that a USER module pulled into a CLIENT output
101
+ * chunk, returning a sorted, deduped list of {@link NodeBuiltinFinding}s. Three graph facts combine so
102
+ * the report is precise AND actionable:
103
+ * 1. **What the user wrote** — only builtins imported by a NON-`node:` input count, so Bun's own
104
+ * polyfill chain (`node:crypto` → `node:buffer`/`node:stream`/…) doesn't bury the real cause.
105
+ * 2. **Where it landed** — the chunk is read from the per-output `inputs`, so the error names the
106
+ * emitted file to look at.
107
+ * 3. **How it got there** — the shortest import chain from a user entry to the builtin
108
+ * (`shortestBuiltinChain`), so the error points straight at the offending `import` line instead of
109
+ * leaving the dev to grep the dependency tree (the DX gap this closes).
110
+ * Graph-based (never the emitted text), so it survives minification and can't be fooled by a string
111
+ * literal that merely contains `"node:crypto"`. Pure + exported for unit testing. Empty ⇒ clean.
112
+ */
113
+ export declare function detectNodeBuiltinsInClient(meta: BunMetafile | undefined): ReadonlyArray<NodeBuiltinFinding>;
114
+ /** The marker specifier an author imports to opt a module into the client-leak guard. Matched on the
115
+ * import edge's *as-written* `original` first (the robust signal: it's exactly what the author typed,
116
+ * before Bun resolves it to `src/server-only.ts` / `dist/server-only.js`). */
117
+ export declare const SERVER_ONLY_MARKER = "@nifrajs/web/server-only";
118
+ /** One `server-only`-module-in-the-client finding: the offending module (the as-written marker-import
119
+ * chain's tail before the marker), the emitted chunk it landed in, and the shortest USER-module import
120
+ * chain that pulled it there (entry → … → the server-only module). */
121
+ export interface ServerOnlyFinding {
122
+ /** The emitted client chunk the server-only module landed in (basename). */
123
+ readonly chunk: string;
124
+ /** The shortest import path from a user entry to the server-only module, as display labels:
125
+ * `[entryFile, ...as-written specifiers…, "<module> (marked server-only)"]`. Mirrors
126
+ * {@link NodeBuiltinFinding.chain}; the tail names the marked module so the message reads
127
+ * `routes/x.tsx → ../secrets.ts (marked server-only)`. */
128
+ readonly chain: readonly string[];
129
+ }
130
+ /**
131
+ * Scan a build's metafile for any module that opts into the `server-only` marker (a side-effect
132
+ * `import "@nifrajs/web/server-only"`) yet landed in a CLIENT output chunk, returning a sorted, deduped
133
+ * list of {@link ServerOnlyFinding}s. Mirrors {@link detectNodeBuiltinsInClient}: it reads the SAME
134
+ * graph facts — which inputs import the marker (the "marked" modules), which chunk each landed in (the
135
+ * per-output `inputs`), and the shortest import chain from a user entry to it. The marker module ITSELF
136
+ * (which imports nothing) is excluded — only the modules that *opt in* are flagged. Pure + exported for
137
+ * unit testing. Empty ⇒ clean.
138
+ */
139
+ export declare function detectServerOnlyInClient(meta: BunMetafile | undefined): ReadonlyArray<ServerOnlyFinding>;
140
+ /** One emitted chunk's measured size, in raw bytes + gzipped bytes (over-the-wire weight). */
141
+ export interface ChunkSize {
142
+ /** The emitted file's basename (e.g. `index-abc123.js`). */
143
+ readonly name: string;
144
+ /** Raw byte length of the file. */
145
+ readonly bytes: number;
146
+ /** Gzipped byte length (what the client actually downloads, modulo brotli). */
147
+ readonly gzip: number;
148
+ }
149
+ /** A whole build's size report — every chunk (largest first) + the totals. */
150
+ export interface SizeReport {
151
+ /** Per-chunk sizes, sorted biggest gzip first (the regression you want to see at the top). */
152
+ readonly chunks: readonly ChunkSize[];
153
+ /** Sum of every chunk's raw bytes. */
154
+ readonly totalBytes: number;
155
+ /** Sum of every chunk's gzip bytes. */
156
+ readonly totalGzip: number;
157
+ }
158
+ /**
159
+ * Aggregate a list of measured chunks into a {@link SizeReport}: sort biggest-gzip-first (ties broken
160
+ * by raw bytes, then name for stable output) and sum the totals. Pure — the measurement (reading the
161
+ * file + `Bun.gzipSync`) happens in the orchestrator; this is the deterministic, unit-testable core.
162
+ */
163
+ export declare function aggregateSizeReport(chunks: readonly ChunkSize[]): SizeReport;
164
+ /** Human-readable byte count: `B`/`KB`/`MB` with one decimal above 1 KB (e.g. `12.3 KB`). Pure. */
165
+ export declare function formatBytes(bytes: number): string;
166
+ /**
167
+ * Render a {@link SizeReport} as a terse aligned table (biggest first) with a totals row — the text
168
+ * `nifra build --report` prints. Pure (string in, string out) so the formatting is unit-testable.
169
+ */
170
+ export declare function renderSizeReport(report: SizeReport): string;
171
+ /** A drift finding between a committed server-manifest and the live `routes/` tree. */
172
+ export interface ManifestDrift {
173
+ /** Route files present in `routes/` but ABSENT from the committed manifest (the manifest is stale —
174
+ * the new route won't be served by the worker). */
175
+ readonly missing: readonly string[];
176
+ /** Route files the committed manifest imports that no longer exist in `routes/` (a deleted/renamed
177
+ * route still wired into the worker — a build/runtime break). */
178
+ readonly extra: readonly string[];
179
+ }
180
+ /**
181
+ * Extract the route-relative file list the committed server-manifest imports, normalized to the same
182
+ * `routes/`-relative keys `discoverRoutes` produces (e.g. `docs/index.tsx`). `routesPrefix` is the
183
+ * specifier prefix the manifest used for the routes dir (default `./routes/`, what `buildServer`'s
184
+ * default `resolve` emits). Only import specifiers under that prefix are route files; the
185
+ * `@nifrajs/web` import (and any other bare specifier) is ignored. Pure — operates on source text.
186
+ */
187
+ export declare function parseManifestRouteFiles(source: string, routesPrefix?: string): string[];
188
+ /** The baked `clientEntry` URL in a committed server-manifest, or `undefined` if absent. Pure. */
189
+ export declare function parseManifestClientEntry(source: string): string | undefined;
190
+ /**
191
+ * Diff the route files a committed server-manifest imports against the files freshly discovered in
192
+ * `routes/`. Returns the `missing` (in routes/, not in manifest — stale manifest) and `extra` (in
193
+ * manifest, gone from routes/ — dangling import) sets. Empty arrays ⇒ in sync. Pure — the caller
194
+ * supplies both file lists (the committed source is parsed via {@link parseManifestRouteFiles}; the
195
+ * fresh list comes from `discoverRoutes`). Lists need not be pre-sorted; the result is sorted.
196
+ */
197
+ export declare function diffManifestRoutes(manifestFiles: readonly string[], discoveredFiles: readonly string[]): ManifestDrift;
198
+ /** True when a drift report is clean (no missing + no extra routes). */
199
+ export declare function isManifestInSync(drift: ManifestDrift): boolean;
200
+ /**
201
+ * Format a {@link ManifestDrift} as a named, actionable error message, or `undefined` when in sync.
202
+ * Names the exact missing/extra routes + the one fix (regenerate the manifest by re-running the build).
203
+ * `manifestPath` is shown for the dev to locate the stale file. Pure.
204
+ */
205
+ export declare function formatManifestDrift(drift: ManifestDrift, manifestPath?: string): string | undefined;
46
206
  /**
47
207
  * Build the client bundle for a file-routed app. Writes the hashed assets + `manifest.json` to
48
208
  * `outDir` and returns the manifest. Throws (with the bundler logs) on build failure — never
@@ -97,6 +257,9 @@ export interface ServerBuild {
97
257
  /** Paths of every emitted output (entry + any code-split chunks) — what to ship to the platform. */
98
258
  readonly outputs: readonly string[];
99
259
  }
260
+ export declare const reactDedupePlugin: (from: string) => BunPlugin;
261
+ export declare const preactDedupePlugin: (from: string) => BunPlugin;
262
+ export declare const serverOnlyEmptyPlugin: () => BunPlugin;
100
263
  /**
101
264
  * Build a self-contained **worker bundle** for a file-routed app on a disk-less edge (Cloudflare
102
265
  * Workers / workerd). Discovers routes (build-time fs), codegens the static-import server manifest
@@ -107,4 +270,93 @@ export interface ServerBuild {
107
270
  * silently ships a broken worker.
108
271
  */
109
272
  export declare function buildServer(options: BuildServerOptions): Promise<ServerBuild>;
273
+ /** A deploy target `nifra build --target <t>` can emit. `static` is pure SSG (no server). */
274
+ export declare const BUILD_TARGETS: readonly ["bun", "node", "deno", "cf-pages", "vercel", "static"];
275
+ export type BuildTarget = (typeof BUILD_TARGETS)[number];
276
+ /** A type guard narrowing an arbitrary string to a {@link BuildTarget}. */
277
+ export declare function isBuildTarget(value: string): value is BuildTarget;
278
+ /**
279
+ * Codegen the per-target **server entry** module (source text) for `buildServer` to bundle. It imports
280
+ * the app's `adapter` (from `framework.ts`), the optional `backend` (from `backend.ts`), and the
281
+ * generated `{ manifest, clientEntry }` (from `./server-manifest`), builds `createWebApp`, then wires
282
+ * the right host:
283
+ * - `cf-pages` / `vercel`: `export default` the fetch handler (the platform serves /assets/* itself).
284
+ * - `deno`: same fetch-handler default, plus `Deno.serve` self-host when run directly.
285
+ * - `bun` / `node`: a self-hosting server that ALSO serves the client bundle from disk (those
286
+ * runtimes have a filesystem; the static `/assets/*` sit next to the entry).
287
+ * `adapterImport`/`backendImport` are the specifiers the entry uses (relative to where it's written) —
288
+ * `buildServer` writes the entry next to `serverEntry`, so they're resolved from there. Pure (string in,
289
+ * string out) so the generation is unit-testable without a real build.
290
+ */
291
+ export declare function generateServerEntry(options: {
292
+ readonly target: BuildTarget;
293
+ /** Import specifier for the module exporting `adapter` (e.g. `"../framework.ts"`). */
294
+ readonly adapterImport: string;
295
+ /** Import specifier for the module exporting `backend`, or `undefined` for a frontend-only app. */
296
+ readonly backendImport?: string;
297
+ /** Document `<title>` passed to `createWebApp`. */
298
+ readonly title?: string;
299
+ }): string;
300
+ export interface BuildTargetOptions {
301
+ /** The `routes/` directory to discover (absolute path). */
302
+ readonly routesDir: string;
303
+ /** Output directory for the assembled deploy dir (absolute path). Cleared and recreated. */
304
+ readonly outDir: string;
305
+ /** A scratch directory for intermediate codegen (the generated server entry + manifest) and the
306
+ * server bundle, cleaned up after. Absolute path. */
307
+ readonly workDir: string;
308
+ /** The adapter's client runtime module (exports `mountRouter`), e.g. `"@nifrajs/web-react/client"`. */
309
+ readonly clientModule: string;
310
+ /** Import specifier (resolvable from `workDir`) of the module exporting `adapter`. */
311
+ readonly adapterImport: string;
312
+ /** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */
313
+ readonly backendImport?: string;
314
+ /** A pre-built app instance for `static` prerendering (a `createWebApp` result). Required for
315
+ * `target: "static"` (SSG drives `app.fetch`); ignored otherwise. */
316
+ readonly prerenderApp?: PrerenderAppLike;
317
+ /** Client-build plugins (e.g. the MDX/Vue/Solid Bun plugins). */
318
+ readonly clientPlugins?: readonly BunPlugin[];
319
+ /** Server-build plugins (e.g. the SSR variants). */
320
+ readonly serverPlugins?: readonly BunPlugin[];
321
+ /** Extra Bun.build resolve conditions for the CLIENT build. */
322
+ readonly conditions?: readonly string[];
323
+ /** Compile-time `define` replacements layered onto both builds. */
324
+ readonly define?: Readonly<Record<string, string>>;
325
+ /** Document `<title>` for the generated server entry. */
326
+ readonly title?: string;
327
+ }
328
+ /** Minimal app surface `buildTarget`'s static path needs — a fetch handler (a built `createWebApp`). */
329
+ export interface PrerenderAppLike {
330
+ fetch(req: Request): Response | Promise<Response>;
331
+ }
332
+ /** The result of a target build — the deploy dir + the client manifest + an optional size report. */
333
+ export interface BuildTargetResult {
334
+ /** The deploy target that was built. */
335
+ readonly target: BuildTarget;
336
+ /** The assembled output directory. */
337
+ readonly outDir: string;
338
+ /** The client build's manifest (entry URL, assets, per-route chunks/styles). */
339
+ readonly client: BuildManifest;
340
+ /** A human-readable note on how to run/deploy the output. */
341
+ readonly run: string;
342
+ /** Per-chunk size report over the emitted client (+ server) outputs. Always computed; the CLI prints
343
+ * it only with `--report`. */
344
+ readonly size: SizeReport;
345
+ }
346
+ /**
347
+ * Build a full deploy directory for `target` from a file-routed nifra app. Emits the client bundle to
348
+ * `<outDir>/assets/*`, then per target:
349
+ * - `static`: prerenders opted-in routes (`prerenderRoutes`) to `<outDir>/<path>/index.html` (+
350
+ * `_data.json`); needs `prerenderApp`. No server.
351
+ * - `cf-pages`: a `_worker.js` (edge bundle) + a `_routes.json` excluding /assets/* from the worker.
352
+ * - `vercel`: a `.vercel/output`-shaped function isn't emitted here — `vercel` emits the bundled edge
353
+ * entry as `<outDir>/index.js` (the CLI's docs point at `vercel`'s Build Output wrapper). [see note]
354
+ * - `deno`/`node`/`bun`: the self-hosting server bundle (`server.js`) next to the assets.
355
+ * The server entry is GENERATED (`generateServerEntry`) and bundled (`buildServer`); the app supplies
356
+ * only adapter/backend/routes. Returns the manifest + a size report. Throws on any build failure.
357
+ *
358
+ * Note: the heavier platform wrappers (`.vercel/output` v3 layout, wrangler ISR `find_additional_modules`)
359
+ * remain app-owned scripts; this command targets the common single-bundle deploys. See the CLI docs.
360
+ */
361
+ export declare function buildTarget(target: BuildTarget, options: BuildTargetOptions): Promise<BuildTargetResult>;
110
362
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAMpC,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gGAAgG;IAChG,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC3C,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;IACvC,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,oGAAoG;IACpG,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,8FAA8F;AAC9F,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EA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