@nifrajs/web 2.1.0 → 2.2.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/dist/build-vite.d.ts +68 -0
- package/dist/build-vite.d.ts.map +1 -0
- package/dist/build-vite.js +487 -0
- package/dist/build-vite.js.map +1 -0
- package/dist/build.d.ts +112 -25
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +283 -64
- 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/client.d.ts.map +1 -1
- package/dist/client.js +10 -0
- package/dist/client.js.map +1 -1
- 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 +61 -4
- 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 +37 -0
- package/dist/draft.d.ts.map +1 -1
- package/dist/draft.js +87 -4
- package/dist/draft.js.map +1 -1
- package/dist/fs.d.ts +14 -1
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +7 -1
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +116 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +565 -53
- package/dist/index.js.map +1 -1
- 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/isr.d.ts.map +1 -1
- package/dist/isr.js +1 -14
- 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 +51 -8
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +130 -14
- 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/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/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/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/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 +64 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +114 -31
- package/dist/router.js.map +1 -1
- package/dist/vite.d.ts +10 -4
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +44 -12
- package/dist/vite.js.map +1 -1
- package/package.json +17 -2
- package/src/build-vite.ts +606 -0
- package/src/build.ts +432 -73
- package/src/bun-dev-entry.ts +184 -0
- package/src/client.ts +8 -0
- package/src/dev-port.ts +63 -0
- package/src/dev.ts +467 -65
- package/src/draft.ts +116 -4
- package/src/fs.ts +22 -4
- package/src/index.ts +727 -57
- package/src/internal/timing-safe-equal.ts +24 -0
- package/src/isr.ts +1 -13
- package/src/llms-txt.ts +13 -5
- package/src/manifest.ts +188 -13
- package/src/module-graph.ts +146 -0
- package/src/plugins/css-modules.ts +0 -0
- package/src/plugins/vite-leak-guard.ts +110 -0
- package/src/public-dir.ts +108 -0
- package/src/route-manifest.ts +240 -0
- package/src/router.ts +198 -34
- package/src/vite.ts +62 -20
package/dist/dev.d.ts
CHANGED
|
@@ -5,21 +5,78 @@ interface FetchApp {
|
|
|
5
5
|
}
|
|
6
6
|
export interface DevServerOptions extends Omit<BuildClientOptions, "minify"> {
|
|
7
7
|
/**
|
|
8
|
-
* Build the nifra app for the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Build the nifra app for the current client entry. `importQuery` changes on every reload — pass it to
|
|
9
|
+
* `discoverRoutes(routesDir, { importQuery })` so SSR re-imports edited route modules instead of Bun's
|
|
10
|
+
* cached copies.
|
|
11
11
|
*/
|
|
12
12
|
readonly createApp: (clientEntry: string, importQuery: string) => FetchApp | Promise<FetchApp>;
|
|
13
13
|
/** Directories to watch (default: `[routesDir]`). */
|
|
14
14
|
readonly watch?: readonly string[];
|
|
15
15
|
/** Port to listen on (default {@link DEFAULT_DEV_PORT}). */
|
|
16
16
|
readonly port?: number;
|
|
17
|
+
/** Directory of user-authored static files served at the root (default `"public"`). The SAME
|
|
18
|
+
* option the production build copies and serves, so dev and prod cannot drift. */
|
|
19
|
+
readonly publicDir?: string | false;
|
|
20
|
+
/**
|
|
21
|
+
* Run the client-leak guards on each change (default `true`).
|
|
22
|
+
*
|
|
23
|
+
* `buildClient` is what runs them - server-only code reaching the browser, `node:` builtins in client
|
|
24
|
+
* code - and Bun's dev server does its own bundling, so nothing would run them otherwise. They are
|
|
25
|
+
* security guards; a dev loop that stops enforcing them is how a leak reaches a deploy unnoticed. The
|
|
26
|
+
* pass runs in the background off the hot path, so HMR is never waiting on it, and only reports.
|
|
27
|
+
*/
|
|
28
|
+
readonly guardLeaks?: boolean;
|
|
17
29
|
}
|
|
18
30
|
export interface DevServer {
|
|
19
31
|
readonly port: number;
|
|
32
|
+
/**
|
|
33
|
+
* The URL pages point their client entry at — always {@link CLIENT_ENTRY_PATH}, never Bun's hashed
|
|
34
|
+
* chunk. Deliberately not the underlying chunk URL: that one moves on every rebuild, and anything
|
|
35
|
+
* holding onto it is holding onto a URL that will stop working.
|
|
36
|
+
*/
|
|
37
|
+
readonly clientEntry: string;
|
|
20
38
|
stop(): void;
|
|
21
39
|
}
|
|
22
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* The stable URL every SSR'd page points its client entry at.
|
|
42
|
+
*
|
|
43
|
+
* It has to be stable, and Bun's own URL is not: that one is a content hash over the entire client graph,
|
|
44
|
+
* so it changes whenever anything the entry imports changes. This path redirects to whichever hashed
|
|
45
|
+
* chunk Bun is serving at the moment the browser asks, which is the only formulation that stays correct
|
|
46
|
+
* across a rebuild.
|
|
47
|
+
*/
|
|
48
|
+
export declare const CLIENT_ENTRY_PATH = "/__nifra/client.js";
|
|
49
|
+
/**
|
|
50
|
+
* The throwaway HTML document. Its only job is to make Bun bundle the entry and assign it a URL - it is
|
|
51
|
+
* never shown to a user, so it carries no app markup. The `<div id="root">` is there purely so the
|
|
52
|
+
* document stands on its own if someone opens the probe path directly while debugging.
|
|
53
|
+
*/
|
|
54
|
+
export declare function devHtml(entryHref: string): string;
|
|
55
|
+
interface WriteDevFilesOptions {
|
|
56
|
+
readonly routesDir: string;
|
|
57
|
+
readonly clientModule: string;
|
|
58
|
+
readonly entryPath: string;
|
|
59
|
+
readonly htmlPath: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Generate the client entry + the HTML route that carries it.
|
|
63
|
+
*
|
|
64
|
+
* Route specifiers are written **relative to the entry file**, not root-relative as the Vite path writes
|
|
65
|
+
* them: Vite resolves `/routes/x.tsx` against its configured root, while Bun's bundler resolves an import
|
|
66
|
+
* the way the runtime does, so a leading slash there would mean the filesystem root.
|
|
67
|
+
*/
|
|
68
|
+
export declare function writeDevFiles(options: WriteDevFilesOptions): void;
|
|
69
|
+
/** `<link rel="stylesheet">` tags for Bun's extracted CSS, injected into each SSR'd page's `<head>`. */
|
|
70
|
+
export declare function styleTags(styles: readonly string[]): string;
|
|
71
|
+
/**
|
|
72
|
+
* Inject Bun's stylesheet links into an SSR'd document.
|
|
73
|
+
*
|
|
74
|
+
* Prefers `</head>`; falls back to prepending when a document has no head (a bare fragment from a custom
|
|
75
|
+
* renderer). Never appends blindly at the end - a stylesheet after `</body>` still applies but arrives
|
|
76
|
+
* after first paint, so the page flashes unstyled and dev stops resembling production.
|
|
77
|
+
*/
|
|
78
|
+
export declare function injectStyles(html: string, styles: readonly string[]): string;
|
|
79
|
+
/** Start the Bun dev server: generate → bundle → serve → watch → hot-reload on change. */
|
|
23
80
|
export declare function createDevServer(options: DevServerOptions): Promise<DevServer>;
|
|
24
81
|
export {};
|
|
25
82
|
//# sourceMappingURL=dev.d.ts.map
|
package/dist/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAsDA,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,YAAY,CAAA;AAQjE,mFAAmF;AACnF,UAAU,QAAQ;IAChB,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC9F,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB;sFACkF;IAClF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,IAAI,IAAI,IAAI,CAAA;CACb;AAaD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AAuCrD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAsBjE;AAED,wGAAwG;AACxG,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAQ3D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAM5E;AAED,0FAA0F;AAC1F,wBAAsB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAwOnF"}
|
package/dist/dev.js
CHANGED
|
@@ -1,84 +1,443 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
1
9
|
/**
|
|
2
|
-
* `@nifrajs/web/dev` —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
10
|
+
* `@nifrajs/web/dev` — the **Bun pipeline's** dev server: one toolchain, no Vite in the process.
|
|
11
|
+
*
|
|
12
|
+
* nifra ships two dev pipelines and the rule between them is that a pipeline owns a whole phase. The
|
|
13
|
+
* Vite server (`@nifrajs/web/vite`) is the default - mature framework plugins, and it resolves SSR as
|
|
14
|
+
* well as the client so both halves agree on every specifier. This is the other one: `Bun.serve` bundles
|
|
15
|
+
* and hot-reloads the client while Bun's runtime resolves SSR. Only one toolchain is present, so the two
|
|
16
|
+
* cannot disagree.
|
|
17
|
+
*
|
|
18
|
+
* What you get: React Fast Refresh WITH state preserved — Bun's dev server applies it natively, no plugin
|
|
19
|
+
* (verified: editing a component-only module swaps its markup while a `useState` counter keeps its value,
|
|
20
|
+
* no reload). The usual boundary rule still applies, and it is the same rule Vite has: a module whose
|
|
21
|
+
* exports are all components is a refresh boundary, so a ROUTE file that also exports `loader`/`meta` is
|
|
22
|
+
* not, and saving it does a clean full reload. Plus no Vite dependency and ONE bundler across dev and
|
|
23
|
+
* production, which is the real prize — the dev/prod seam disappears.
|
|
24
|
+
*
|
|
25
|
+
* What you give up: `*.module.css`. Bun's DEV-server bundler has no CSS-Modules transform (its production
|
|
26
|
+
* `Bun.build` does), so the import compiles to a dangling reference. Plain CSS and Tailwind are fine. The
|
|
27
|
+
* CLI refuses `nifra dev --bun` for a CSS-Modules app rather than serving a broken client.
|
|
28
|
+
*
|
|
29
|
+
* ## How the two halves meet
|
|
30
|
+
*
|
|
31
|
+
* Bun's dev server bundles HTML routes. nifra renders the document itself, so there is no HTML file for
|
|
32
|
+
* Bun to rewrite - pages are produced per request by `createWebApp`. The join is a throwaway HTML route
|
|
33
|
+
* that exists only so Bun bundles the generated client entry and assigns it a hashed URL. nifra reads
|
|
34
|
+
* that URL back out (`./bun-dev-entry.ts`); Bun serves the chunk, and its HMR client - bundled into that
|
|
35
|
+
* same chunk - connects from nifra's pages exactly as it would from Bun's own.
|
|
36
|
+
*
|
|
37
|
+
* What pages actually reference is {@link CLIENT_ENTRY_PATH}, a stable nifra URL that redirects to the
|
|
38
|
+
* current chunk, because Bun's URL is a content hash over the whole client graph and moves on every
|
|
39
|
+
* rebuild. Injecting a remembered one is not a stale-cache annoyance but a hard failure: Bun answers a
|
|
40
|
+
* superseded chunk URL with a `location.reload()` stub, so the page reloads, SSR hands it the same dead
|
|
41
|
+
* URL, and it loops forever with no console output surviving to explain it.
|
|
42
|
+
*
|
|
43
|
+
* The stylesheets come across the same way, and they are the reason that probe page is read for more than
|
|
44
|
+
* a script URL: Bun lifts `import "./app.css"` out of the JS graph and links it from the page IT bundled.
|
|
45
|
+
* That page is the throwaway. Carry the links over or the whole dev session renders unstyled while
|
|
46
|
+
* production, which reads CSS from the build manifest, is perfectly fine.
|
|
47
|
+
*
|
|
48
|
+
* SSR invalidation is Bun's import cache rather than Vite's module graph, so route modules are re-imported
|
|
49
|
+
* under a changing query on each change - which is what `discoverRoutes({ importQuery })` exists for.
|
|
50
|
+
*
|
|
6
51
|
* Bun-only + build-time; never imported by the edge runtime.
|
|
7
52
|
*/
|
|
8
|
-
import { readdirSync, unwatchFile, watchFile } from "node:fs";
|
|
53
|
+
import { mkdirSync, readdirSync, readFileSync, rmSync, unwatchFile, watchFile, writeFileSync, } from "node:fs";
|
|
54
|
+
import { dirname, relative, resolve } from "node:path";
|
|
9
55
|
import { buildClient } from "./build.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
56
|
+
import { resolveDevEntry } from "./bun-dev-entry.js";
|
|
57
|
+
import { renderDevErrorOverlay } from "./dev-error.js";
|
|
58
|
+
import { explainBindFailure } from "./dev-port.js";
|
|
59
|
+
import { discoverRoutes } from "./fs.js";
|
|
60
|
+
import { DEFAULT_DEV_PORT, generateClientEntry } from "./index.js";
|
|
61
|
+
import { servePublicDir } from "./public-dir.js";
|
|
62
|
+
/**
|
|
63
|
+
* Where the generated dev files live. A dot-directory inside the project, not a temp dir: Bun's bundler
|
|
64
|
+
* resolves the entry's imports the way the runtime does, so it has to sit where the app's routes and
|
|
65
|
+
* `node_modules` are reachable from.
|
|
66
|
+
*/
|
|
67
|
+
const DEV_DIR = ".nifra-bun";
|
|
68
|
+
/**
|
|
69
|
+
* The throwaway route serving the bundled HTML. Namespaced under `/__nifra/` so it cannot collide with an
|
|
70
|
+
* app route: file-based routing does not produce a leading double underscore.
|
|
71
|
+
*/
|
|
72
|
+
const PROBE_PATH = "/__nifra/dev-entry";
|
|
73
|
+
/**
|
|
74
|
+
* The stable URL every SSR'd page points its client entry at.
|
|
75
|
+
*
|
|
76
|
+
* It has to be stable, and Bun's own URL is not: that one is a content hash over the entire client graph,
|
|
77
|
+
* so it changes whenever anything the entry imports changes. This path redirects to whichever hashed
|
|
78
|
+
* chunk Bun is serving at the moment the browser asks, which is the only formulation that stays correct
|
|
79
|
+
* across a rebuild.
|
|
80
|
+
*/
|
|
81
|
+
export const CLIENT_ENTRY_PATH = "/__nifra/client.js";
|
|
82
|
+
function bunServe() {
|
|
83
|
+
const serve = globalThis.Bun?.serve;
|
|
84
|
+
if (typeof serve !== "function") {
|
|
85
|
+
throw new Error("[nifra] the Bun dev server needs the Bun runtime (`Bun.serve` is not available here). Run it " +
|
|
86
|
+
"under `bun`, or use the Vite pipeline dev server, which runs on Node's http server.");
|
|
87
|
+
}
|
|
88
|
+
return serve;
|
|
89
|
+
}
|
|
90
|
+
/** Write only when the content differs, so an unchanged file's mtime never moves. */
|
|
91
|
+
function writeIfChanged(path, content) {
|
|
92
|
+
try {
|
|
93
|
+
if (readFileSync(path, "utf8") === content)
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// missing or unreadable — fall through and write
|
|
98
|
+
}
|
|
99
|
+
writeFileSync(path, content);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The throwaway HTML document. Its only job is to make Bun bundle the entry and assign it a URL - it is
|
|
103
|
+
* never shown to a user, so it carries no app markup. The `<div id="root">` is there purely so the
|
|
104
|
+
* document stands on its own if someone opens the probe path directly while debugging.
|
|
105
|
+
*/
|
|
106
|
+
export function devHtml(entryHref) {
|
|
107
|
+
return (`<!doctype html><html lang="en"><head><meta charset="utf-8">` +
|
|
108
|
+
`<title>nifra dev entry</title></head><body><div id="root"></div>` +
|
|
109
|
+
`<script type="module" src="${entryHref}"></script></body></html>`);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Generate the client entry + the HTML route that carries it.
|
|
113
|
+
*
|
|
114
|
+
* Route specifiers are written **relative to the entry file**, not root-relative as the Vite path writes
|
|
115
|
+
* them: Vite resolves `/routes/x.tsx` against its configured root, while Bun's bundler resolves an import
|
|
116
|
+
* the way the runtime does, so a leading slash there would mean the filesystem root.
|
|
117
|
+
*/
|
|
118
|
+
export function writeDevFiles(options) {
|
|
119
|
+
const { routesDir, clientModule, entryPath, htmlPath } = options;
|
|
120
|
+
mkdirSync(dirname(entryPath), { recursive: true });
|
|
121
|
+
const manifest = discoverRoutes(routesDir);
|
|
122
|
+
const entryDir = dirname(entryPath);
|
|
123
|
+
const toSpecifier = (file) => {
|
|
124
|
+
const rel = relative(entryDir, `${routesDir}/${file}`).replaceAll("\\", "/");
|
|
125
|
+
// A bare relative path reads as a PACKAGE specifier to a bundler; `./` is what makes it a file.
|
|
126
|
+
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
127
|
+
};
|
|
128
|
+
// No `import.meta.hot.accept` here, deliberately. When an edit lands OUTSIDE a Fast Refresh boundary —
|
|
129
|
+
// a route file, which also exports `loader`/`meta` — Bun walks up to this generated entry, finds no
|
|
130
|
+
// `accept`, logs "hot update was not accepted" and does a full reload. That reload is correct: the route
|
|
131
|
+
// module's non-component exports changed, so patching it into the live tree would be wrong. Accepting
|
|
132
|
+
// here is worse than the warning: Bun re-evaluates the module BEFORE the accept callback runs, so the
|
|
133
|
+
// entry re-executes against a container React already mounted ("createRoot() on a container that has
|
|
134
|
+
// already been passed to createRoot()") and only then does the callback get to reload — trading an
|
|
135
|
+
// accurate warning for a real error. Editing a component-only module never reaches this path: Bun
|
|
136
|
+
// applies React Fast Refresh there and state is preserved.
|
|
137
|
+
writeIfChanged(entryPath, generateClientEntry(manifest, { clientModule, resolve: toSpecifier }));
|
|
138
|
+
const entryHref = `./${relative(dirname(htmlPath), entryPath).replaceAll("\\", "/")}`;
|
|
139
|
+
writeIfChanged(htmlPath, devHtml(entryHref));
|
|
140
|
+
}
|
|
141
|
+
/** `<link rel="stylesheet">` tags for Bun's extracted CSS, injected into each SSR'd page's `<head>`. */
|
|
142
|
+
export function styleTags(styles) {
|
|
143
|
+
let html = "";
|
|
144
|
+
for (const href of styles) {
|
|
145
|
+
// Bun's asset URLs are hashes it generated, not user input; escaping the quote character is still
|
|
146
|
+
// the correct habit at an HTML boundary and costs nothing.
|
|
147
|
+
html += `<link rel="stylesheet" href="${href.replaceAll('"', """)}">`;
|
|
148
|
+
}
|
|
149
|
+
return html;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Inject Bun's stylesheet links into an SSR'd document.
|
|
153
|
+
*
|
|
154
|
+
* Prefers `</head>`; falls back to prepending when a document has no head (a bare fragment from a custom
|
|
155
|
+
* renderer). Never appends blindly at the end - a stylesheet after `</body>` still applies but arrives
|
|
156
|
+
* after first paint, so the page flashes unstyled and dev stops resembling production.
|
|
157
|
+
*/
|
|
158
|
+
export function injectStyles(html, styles) {
|
|
159
|
+
if (styles.length === 0)
|
|
160
|
+
return html;
|
|
161
|
+
const tags = styleTags(styles);
|
|
162
|
+
const head = html.indexOf("</head>");
|
|
163
|
+
if (head !== -1)
|
|
164
|
+
return html.slice(0, head) + tags + html.slice(head);
|
|
165
|
+
return tags + html;
|
|
166
|
+
}
|
|
167
|
+
/** Start the Bun dev server: generate → bundle → serve → watch → hot-reload on change. */
|
|
16
168
|
export async function createDevServer(options) {
|
|
17
|
-
const { createApp, port = DEFAULT_DEV_PORT,
|
|
18
|
-
const
|
|
169
|
+
const { createApp, port = DEFAULT_DEV_PORT, routesDir, clientModule } = options;
|
|
170
|
+
const serve = bunServe();
|
|
171
|
+
// The app root. `routesDir` is `<app>/routes` by convention, so its parent is the project - the one
|
|
172
|
+
// place a generated entry can sit and still resolve the app's imports.
|
|
173
|
+
const root = resolve(routesDir, "..");
|
|
174
|
+
const devDir = resolve(root, DEV_DIR);
|
|
175
|
+
const entryPath = resolve(devDir, "entry.tsx");
|
|
176
|
+
const htmlPath = resolve(devDir, "entry.html");
|
|
177
|
+
const publicDir = options.publicDir === false ? undefined : (options.publicDir ?? "public");
|
|
178
|
+
// Route dev's `public/` through the SAME handler production uses. Dev previously inherited this
|
|
179
|
+
// from Vite implicitly while production had no equivalent, which is the entire bug: two code paths
|
|
180
|
+
// with different defaults, so a file worked in dev and 404'd only once deployed.
|
|
181
|
+
const servePublic = publicDir === undefined
|
|
182
|
+
? async () => undefined
|
|
183
|
+
: servePublicDir({ dir: resolve(publicDir) });
|
|
184
|
+
writeDevFiles({ routesDir, clientModule, entryPath, htmlPath });
|
|
185
|
+
// Importing the generated HTML is what hands it to Bun's bundler. A runtime-computed path is fine:
|
|
186
|
+
// Bun resolves and bundles the HTML, and everything it references, at import time.
|
|
187
|
+
const htmlModule = (await import(__rewriteRelativeImportExtension(htmlPath)));
|
|
188
|
+
let server;
|
|
189
|
+
// The last resolved entry, with the time it was resolved. Deliberately short-lived — see `currentEntry`.
|
|
190
|
+
let cache;
|
|
191
|
+
// The app, tagged with the entry hash it was built against — see `appFor`.
|
|
192
|
+
let built;
|
|
193
|
+
let building;
|
|
19
194
|
let version = 0;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
195
|
+
/**
|
|
196
|
+
* The client entry Bun is serving RIGHT NOW.
|
|
197
|
+
*
|
|
198
|
+
* Bun's entry URL is a content hash over the whole client graph, so any file it reaches re-hashes it.
|
|
199
|
+
* Resolving once at startup and injecting that value forever is the trap this exists to avoid: Bun
|
|
200
|
+
* answers a superseded chunk URL with a `location.reload()` stub, the page reloads, SSR hands it the
|
|
201
|
+
* same dead URL, and it reloads again - an invisible infinite loop, because each reload wipes the
|
|
202
|
+
* console that would have explained it.
|
|
203
|
+
*
|
|
204
|
+
* Re-resolving cannot be driven off the file watcher either. The watcher covers `routesDir`; the client
|
|
205
|
+
* graph includes components, styles and anything else a route imports, so an edit outside the watched
|
|
206
|
+
* tree would re-hash the entry with nothing to notice. Asking the dev server is the only answer that is
|
|
207
|
+
* right by construction.
|
|
208
|
+
*
|
|
209
|
+
* The TTL keeps that honest without making it expensive: a page render probes fresh (`force`), and the
|
|
210
|
+
* client-entry request that follows it milliseconds later reads the same cached answer - so the HTML and
|
|
211
|
+
* the script it points at always come from ONE probe, and cannot describe different builds.
|
|
212
|
+
*/
|
|
213
|
+
const ENTRY_TTL_MS = 250;
|
|
214
|
+
const currentEntry = async (force = false) => {
|
|
215
|
+
const now = performance.now();
|
|
216
|
+
if (!force && cache !== undefined && now - cache.at < ENTRY_TTL_MS)
|
|
217
|
+
return cache.entry;
|
|
218
|
+
const entry = await resolveDevEntry(server, { probePath: PROBE_PATH });
|
|
219
|
+
cache = { entry, at: now };
|
|
220
|
+
return entry;
|
|
23
221
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
222
|
+
/**
|
|
223
|
+
* The app built against the client Bun is currently serving.
|
|
224
|
+
*
|
|
225
|
+
* SSR freshness cannot be driven off the file watcher, and getting this wrong is subtle enough to be
|
|
226
|
+
* worth stating. Bun rebuilds the client and tells the browser to reload the instant a file is saved;
|
|
227
|
+
* the watcher here is `watchFile` mtime polling, a poll interval plus a debounce behind that. So the
|
|
228
|
+
* browser's reload request lands while SSR is still rendering the previous code - the server sends the
|
|
229
|
+
* old markup, the client boots the new module, and React reports a hydration mismatch and throws the
|
|
230
|
+
* server-rendered tree away. Transient, self-correcting on the next reload, and exactly the kind of
|
|
231
|
+
* dev-only weirdness nobody can reproduce on request.
|
|
232
|
+
*
|
|
233
|
+
* Ordering by request instead of by clock removes the race rather than shrinking it. Bun's entry hash is
|
|
234
|
+
* a content hash over the whole client graph, so it IS the version marker - and it is already being
|
|
235
|
+
* fetched to render the page. Rebuilding when it moves means SSR is, by construction, never behind the
|
|
236
|
+
* client that is about to hydrate it.
|
|
237
|
+
*
|
|
238
|
+
* The watcher still runs: it regenerates the entry when routes are added or removed, and re-checks for
|
|
239
|
+
* client leaks. It is no longer what keeps SSR correct.
|
|
240
|
+
*/
|
|
241
|
+
const appFor = (entrySrc) => {
|
|
242
|
+
if (built?.entry === entrySrc)
|
|
243
|
+
return Promise.resolve(built.app);
|
|
244
|
+
if (building?.entry === entrySrc)
|
|
245
|
+
return building.promise;
|
|
246
|
+
version += 1;
|
|
247
|
+
const promise = Promise.resolve(createApp(CLIENT_ENTRY_PATH, `v=${version}`));
|
|
248
|
+
building = { entry: entrySrc, promise };
|
|
249
|
+
void promise
|
|
250
|
+
.then((next) => {
|
|
251
|
+
if (building?.entry === entrySrc) {
|
|
252
|
+
built = { entry: entrySrc, app: next };
|
|
253
|
+
building = undefined;
|
|
37
254
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
255
|
+
})
|
|
256
|
+
.catch(() => {
|
|
257
|
+
// Clear the in-flight marker so the next request retries instead of re-awaiting a failed build.
|
|
258
|
+
if (building?.entry === entrySrc)
|
|
259
|
+
building = undefined;
|
|
260
|
+
});
|
|
261
|
+
return promise;
|
|
262
|
+
};
|
|
263
|
+
try {
|
|
264
|
+
server = serve({
|
|
265
|
+
port,
|
|
266
|
+
development: { hmr: true },
|
|
267
|
+
// The probe route is the ONLY path Bun owns; everything else falls through to nifra's SSR.
|
|
268
|
+
routes: { [PROBE_PATH]: htmlModule.default },
|
|
269
|
+
fetch: async (req) => {
|
|
270
|
+
const url = new URL(req.url);
|
|
271
|
+
// The stable client-entry URL. Pages reference THIS; it redirects to whichever hashed chunk Bun
|
|
272
|
+
// is serving at the moment the browser asks. A redirect rather than a proxy so the module's final
|
|
273
|
+
// URL is Bun's own - its HMR client derives its socket and module identity from `import.meta.url`,
|
|
274
|
+
// and serving the bytes under a nifra path would quietly change both.
|
|
275
|
+
if (url.pathname === CLIENT_ENTRY_PATH) {
|
|
276
|
+
// Not forced: this lands right after the page render that just probed, so it reads that same
|
|
277
|
+
// answer and the document and its script are guaranteed to describe one build.
|
|
278
|
+
const entry = await currentEntry();
|
|
279
|
+
return new Response(null, { status: 307, headers: { location: entry.src } });
|
|
280
|
+
}
|
|
281
|
+
// Static probe before routing; a miss returns undefined and falls through, so no route is
|
|
282
|
+
// shadowed and a page render never pays a filesystem stat (extension-less paths skip it).
|
|
283
|
+
const staticFile = await servePublic(req);
|
|
284
|
+
if (staticFile !== undefined)
|
|
285
|
+
return staticFile;
|
|
286
|
+
try {
|
|
287
|
+
// One fresh probe per request: it is both the freshness check for SSR and the stylesheet list,
|
|
288
|
+
// so the page cannot be rendered against a build the browser is not about to load.
|
|
289
|
+
const entry = await currentEntry(true);
|
|
290
|
+
const res = await (await appFor(entry.src)).fetch(req);
|
|
291
|
+
if (!(res.headers.get("content-type") ?? "").includes("text/html"))
|
|
292
|
+
return res;
|
|
293
|
+
if (entry.styles.length === 0)
|
|
294
|
+
return res;
|
|
295
|
+
const headers = new Headers(res.headers);
|
|
296
|
+
headers.delete("content-length"); // the body grows with the injected stylesheet links
|
|
297
|
+
return new Response(injectStyles(await res.text(), entry.styles), {
|
|
298
|
+
status: res.status,
|
|
299
|
+
headers,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
return new Response(renderDevErrorOverlay(err, {
|
|
304
|
+
method: req.method,
|
|
305
|
+
url: `${url.pathname}${url.search}`,
|
|
306
|
+
}), { status: 500, headers: { "content-type": "text/html; charset=utf-8" } });
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
catch (err) {
|
|
312
|
+
// `Bun.serve` throws synchronously on a bind failure; the Vite path's equivalent arrives as an async
|
|
313
|
+
// `error` event. Same explanation either way - see ./dev-port.ts for why it is worth spelling out.
|
|
314
|
+
throw explainBindFailure(err, port);
|
|
315
|
+
}
|
|
316
|
+
try {
|
|
317
|
+
// Build once up front so a dev server that cannot find the entry, or whose app fails to construct,
|
|
318
|
+
// fails at startup with a real diagnosis instead of on the first page request.
|
|
319
|
+
await appFor((await currentEntry()).src);
|
|
320
|
+
}
|
|
321
|
+
catch (err) {
|
|
322
|
+
// Leaving the server up would answer 500s forever, which presents as a running server rather than as
|
|
323
|
+
// the startup failure it is.
|
|
324
|
+
server.stop(true);
|
|
325
|
+
throw err;
|
|
326
|
+
}
|
|
327
|
+
const guard = options.guardLeaks !== false ? leakGuard(options) : undefined;
|
|
328
|
+
guard?.();
|
|
329
|
+
// What is left for the watcher, now that request ordering keeps SSR fresh: regenerate the client entry
|
|
330
|
+
// when routes are ADDED or REMOVED (a scan result the request path never re-derives), and re-run the
|
|
331
|
+
// leak guards. The entry is rewritten only when the generated source actually differs - an edit inside
|
|
332
|
+
// an existing route does not change it, and rewriting unconditionally would touch the file Bun watches
|
|
333
|
+
// on every save and turn every hot update into a full client rebuild.
|
|
53
334
|
let timer;
|
|
54
335
|
const onChange = () => {
|
|
55
336
|
if (timer)
|
|
56
337
|
clearTimeout(timer);
|
|
57
338
|
timer = setTimeout(() => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.
|
|
64
|
-
}
|
|
65
|
-
|
|
339
|
+
try {
|
|
340
|
+
writeDevFiles({ routesDir, clientModule, entryPath, htmlPath });
|
|
341
|
+
}
|
|
342
|
+
catch (err) {
|
|
343
|
+
// A half-saved file can fail the scan mid-edit; the next change re-runs this.
|
|
344
|
+
console.error("[nifra/web/dev] client entry regeneration failed:", err);
|
|
345
|
+
}
|
|
346
|
+
guard?.();
|
|
66
347
|
}, 60);
|
|
67
348
|
};
|
|
68
|
-
// Poll
|
|
69
|
-
//
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
349
|
+
// Poll file mtimes for content and rescan directory membership for add/remove. `watchFile` cannot
|
|
350
|
+
// discover a path that did not exist at startup, so the bounded topology scan owns that gap.
|
|
351
|
+
const watchRoots = options.watch ?? [routesDir];
|
|
352
|
+
const watched = new Set();
|
|
353
|
+
const scan = () => {
|
|
354
|
+
const next = new Set();
|
|
355
|
+
for (const dir of watchRoots) {
|
|
356
|
+
let files;
|
|
357
|
+
try {
|
|
358
|
+
files = readdirSync(dir, { recursive: true });
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
for (const file of files) {
|
|
364
|
+
if (/\.(tsx|jsx|ts|js|mdx|svelte|vue)$/.test(file))
|
|
365
|
+
next.add(`${dir}/${file}`);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return next;
|
|
369
|
+
};
|
|
370
|
+
const syncWatchedFiles = (notify) => {
|
|
371
|
+
const next = scan();
|
|
372
|
+
let topologyChanged = false;
|
|
373
|
+
for (const file of watched) {
|
|
374
|
+
if (next.has(file))
|
|
375
|
+
continue;
|
|
376
|
+
unwatchFile(file);
|
|
377
|
+
watched.delete(file);
|
|
378
|
+
topologyChanged = true;
|
|
379
|
+
}
|
|
380
|
+
for (const file of next) {
|
|
381
|
+
if (watched.has(file))
|
|
382
|
+
continue;
|
|
383
|
+
watched.add(file);
|
|
384
|
+
watchFile(file, { interval: 150 }, onChange);
|
|
385
|
+
topologyChanged = true;
|
|
386
|
+
}
|
|
387
|
+
if (notify && topologyChanged)
|
|
388
|
+
onChange();
|
|
389
|
+
};
|
|
390
|
+
syncWatchedFiles(false);
|
|
391
|
+
const topologyTimer = setInterval(() => syncWatchedFiles(true), 150);
|
|
392
|
+
topologyTimer.unref?.();
|
|
75
393
|
return {
|
|
76
394
|
port: server.port ?? port,
|
|
395
|
+
clientEntry: CLIENT_ENTRY_PATH,
|
|
77
396
|
stop: () => {
|
|
397
|
+
if (timer)
|
|
398
|
+
clearTimeout(timer);
|
|
399
|
+
clearInterval(topologyTimer);
|
|
78
400
|
for (const file of watched)
|
|
79
401
|
unwatchFile(file);
|
|
80
|
-
server.stop();
|
|
402
|
+
server.stop(true);
|
|
403
|
+
rmSync(devDir, { recursive: true, force: true });
|
|
81
404
|
},
|
|
82
405
|
};
|
|
83
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* A debounced, background client-leak check.
|
|
409
|
+
*
|
|
410
|
+
* Bun's dev server does its own bundling, so `buildClient` - which is where `detectServerOnlyInClient`
|
|
411
|
+
* and `detectNodeBuiltinsInClient` run - is no longer on the path that serves the app. Running it beside
|
|
412
|
+
* the dev loop keeps the guards enforced without HMR ever waiting on a full bundle. It only reports:
|
|
413
|
+
* failing the dev server on a leak would mean an in-progress edit can take the whole server down, and
|
|
414
|
+
* the build already blocks the actual deploy.
|
|
415
|
+
*
|
|
416
|
+
* Overlapping runs are collapsed - a save during a bundle queues exactly one re-run, so a burst of edits
|
|
417
|
+
* cannot pile up builds behind each other.
|
|
418
|
+
*/
|
|
419
|
+
function leakGuard(options) {
|
|
420
|
+
let running = false;
|
|
421
|
+
let queued = false;
|
|
422
|
+
const run = () => {
|
|
423
|
+
if (running) {
|
|
424
|
+
queued = true;
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
running = true;
|
|
428
|
+
buildClient({ ...options, minify: false })
|
|
429
|
+
.catch((err) => {
|
|
430
|
+
console.error(`\n[nifra/web/dev] client-leak guard failed:\n${err instanceof Error ? err.message : String(err)}\n` +
|
|
431
|
+
" The dev server is still running. This will fail `nifra build`.\n");
|
|
432
|
+
})
|
|
433
|
+
.finally(() => {
|
|
434
|
+
running = false;
|
|
435
|
+
if (queued) {
|
|
436
|
+
queued = false;
|
|
437
|
+
run();
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
return run;
|
|
442
|
+
}
|
|
84
443
|
//# sourceMappingURL=dev.js.map
|
package/dist/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,EAA2B,WAAW,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAyB7C,MAAM,WAAW,GAAG,cAAc,CAAA;AAClC,MAAM,YAAY,GAAG,QAAQ,CAAA;AAC7B,yFAAyF;AACzF,MAAM,YAAY,GAAG,oHAAoH,WAAW,wFAAwF,CAAA;AAE5O,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAyB;IAC7D,MAAM,EAAE,SAAS,EAAE,IAAI,GAAG,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,UAAU,CAAA;IACnD,IAAI,OAAO,GAAG,CAAC,CAAA;IACf,MAAM,OAAO,GAAG,KAAK,IAAuB,EAAE;QAC5C,MAAM,QAAQ,GAAG,MAAM,WA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