@nifrajs/web 3.1.0 → 3.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-plan.d.ts +228 -0
- package/dist/build-plan.d.ts.map +1 -0
- package/dist/build-plan.js +514 -0
- package/dist/build-plan.js.map +1 -0
- package/dist/build-vite.d.ts +2 -1
- package/dist/build-vite.d.ts.map +1 -1
- package/dist/build-vite.js.map +1 -1
- package/dist/build.d.ts +2 -197
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +61 -502
- package/dist/build.js.map +1 -1
- package/dist/chunk-names.d.ts.map +1 -1
- package/dist/chunk-names.js +3 -2
- package/dist/chunk-names.js.map +1 -1
- package/dist/dev-ssr-graph.d.ts.map +1 -1
- package/dist/dev-ssr-graph.js +63 -28
- package/dist/dev-ssr-graph.js.map +1 -1
- package/dist/diagnostic.d.ts.map +1 -1
- package/dist/diagnostic.js +9 -2
- package/dist/diagnostic.js.map +1 -1
- package/dist/fonts-google.d.ts.map +1 -1
- package/dist/fonts-google.js +3 -1
- package/dist/fonts-google.js.map +1 -1
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +2 -1
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +15 -609
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -1935
- package/dist/index.js.map +1 -1
- package/dist/internal/codegen.d.ts +68 -0
- package/dist/internal/codegen.d.ts.map +1 -0
- package/dist/internal/codegen.js +317 -0
- package/dist/internal/codegen.js.map +1 -0
- package/dist/internal/head-merge.d.ts +2 -0
- package/dist/internal/head-merge.d.ts.map +1 -1
- package/dist/internal/head-merge.js +17 -1
- package/dist/internal/head-merge.js.map +1 -1
- package/dist/internal/parity.d.ts +7 -0
- package/dist/internal/parity.d.ts.map +1 -1
- package/dist/internal/parity.js +212 -30
- package/dist/internal/parity.js.map +1 -1
- package/dist/internal/render-document.d.ts +372 -0
- package/dist/internal/render-document.d.ts.map +1 -0
- package/dist/internal/render-document.js +744 -0
- package/dist/internal/render-document.js.map +1 -0
- package/dist/internal/runtime-contract.d.ts +48 -0
- package/dist/internal/runtime-contract.d.ts.map +1 -0
- package/dist/internal/runtime-contract.js +27 -0
- package/dist/internal/runtime-contract.js.map +1 -0
- package/dist/internal/web-app.d.ts +171 -0
- package/dist/internal/web-app.d.ts.map +1 -0
- package/dist/internal/web-app.js +844 -0
- package/dist/internal/web-app.js.map +1 -0
- package/dist/islands.d.ts +48 -0
- package/dist/islands.d.ts.map +1 -1
- package/dist/islands.js +79 -0
- package/dist/islands.js.map +1 -1
- package/dist/module-graph.d.ts.map +1 -1
- package/dist/module-graph.js +22 -9
- package/dist/module-graph.js.map +1 -1
- package/dist/nano.d.ts +125 -0
- package/dist/nano.d.ts.map +1 -0
- package/dist/nano.js +190 -0
- package/dist/nano.js.map +1 -0
- package/dist/plugins/css-modules.js +2 -2
- package/dist/plugins/css-modules.js.map +1 -1
- package/dist/plugins/kit.d.ts +12 -0
- package/dist/plugins/kit.d.ts.map +1 -1
- package/dist/plugins/kit.js +62 -12
- package/dist/plugins/kit.js.map +1 -1
- package/dist/plugins/postcss.js +2 -2
- package/dist/plugins/postcss.js.map +1 -1
- package/dist/plugins/scss.js +2 -2
- package/dist/plugins/scss.js.map +1 -1
- package/dist/plugins/stylex.d.ts +70 -0
- package/dist/plugins/stylex.d.ts.map +1 -0
- package/dist/plugins/stylex.js +166 -0
- package/dist/plugins/stylex.js.map +1 -0
- package/dist/plugins/svg.js +2 -2
- package/dist/plugins/svg.js.map +1 -1
- package/dist/router.d.ts +1 -1
- package/dist/router.js +23 -23
- package/dist/router.js.map +1 -1
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +26 -10
- package/dist/vite.js.map +1 -1
- package/package.json +39 -3
- package/src/build-plan.ts +741 -0
- package/src/build-vite.ts +1 -4
- package/src/build.ts +84 -716
- package/src/chunk-names.ts +3 -2
- package/src/dev-ssr-graph.ts +63 -28
- package/src/diagnostic.ts +14 -2
- package/src/fonts-google.ts +3 -1
- package/src/fs.ts +2 -1
- package/src/index.ts +73 -2705
- package/src/internal/codegen.ts +400 -0
- package/src/internal/head-merge.ts +19 -1
- package/src/internal/parity.ts +215 -35
- package/src/internal/render-document.ts +1116 -0
- package/src/internal/runtime-contract.ts +54 -0
- package/src/internal/web-app.ts +1114 -0
- package/src/islands.ts +85 -0
- package/src/module-graph.ts +23 -9
- package/src/nano.ts +246 -0
- package/src/plugins/css-modules.ts +2 -2
- package/src/plugins/kit.ts +65 -12
- package/src/plugins/postcss.ts +2 -2
- package/src/plugins/scss.ts +2 -2
- package/src/plugins/stylex.ts +298 -0
- package/src/plugins/svg.ts +2 -2
- package/src/router.ts +24 -24
- package/src/vite.ts +33 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-document.js","sourceRoot":"","sources":["../../src/internal/render-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAuB,MAAM,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEpG,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACvF,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAY/F,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE/E,MAAM,YAAY,GAA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AACH,MAAM,UAAU,MAAM,CAAC,IAA6B;IAClD,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAA;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,OAAiF;IAEjF,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,+DAA+D,CAAC,CAAA;IACtF,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAA;IACrC,mGAAmG;IACnG,mGAAmG;IACnG,2BAA2B;IAC3B,0BAA0B,CAAC,IAAI,CAAC,CAAA;IAChC,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,IAAI;QACJ,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO;KACR,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Phantom brand key for {@link ServerOnly}. */
|
|
2
|
+
declare const SERVER_ONLY_BRAND: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Type-level intent marker for a value that must only exist on the server - a secret, a DB handle, a
|
|
5
|
+
* server-only client. `ServerOnly<T>` is structurally `T` (the brand is an optional phantom field, so
|
|
6
|
+
* existing code keeps type-checking), but it advertises to readers + the compiler that the value is
|
|
7
|
+
* not meant to cross to the browser. It is **purely type-level** and erases at build - it does NOT,
|
|
8
|
+
* by itself, keep the value out of the client bundle.
|
|
9
|
+
*
|
|
10
|
+
* The enforcement is two runtime conventions:
|
|
11
|
+
* - add the side-effect import `import "@nifrajs/web/server-only"` at the top of the module - the
|
|
12
|
+
* client build ({@link buildClient}) fails loud, with the import chain, if it reaches a browser
|
|
13
|
+
* chunk (the poison-import marker);
|
|
14
|
+
* - or name the file `*.server.ts` - the `.server` convention empties it in the client build.
|
|
15
|
+
*
|
|
16
|
+
* Use this brand to express the intent in the types; pair it with one of those runtime markers so a
|
|
17
|
+
* leak is caught at build time rather than shipping a secret to the client.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* import "@nifrajs/web/server-only"
|
|
21
|
+
* import type { ServerOnly } from "@nifrajs/web"
|
|
22
|
+
* export const apiKey: ServerOnly<string> = process.env.SECRET_API_KEY!
|
|
23
|
+
*/
|
|
24
|
+
export type ServerOnly<T> = T & {
|
|
25
|
+
readonly [SERVER_ONLY_BRAND]?: never;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Pre-hydration form guard - a tiny inline script flushed in `<head>` (it runs in the window between
|
|
29
|
+
* first paint and the island bundle taking over). It neutralizes the one real hydration footgun: a
|
|
30
|
+
* JS-only form (a hand-wired `onSubmit` with no native fallback) submitting *natively* before its
|
|
31
|
+
* handler is attached, which navigates the browser to a broken `?field=…` GET of the current page.
|
|
32
|
+
*
|
|
33
|
+
* It blocks ONLY that shape - an effective-GET form whose action targets the current document - and
|
|
34
|
+
* only until hydration commits (`data-nifra-hydrated`, set by the client entry). Method-`post` forms
|
|
35
|
+
* (progressive enhancement: the native POST hits the route `action`) and GET forms with a real action
|
|
36
|
+
* (a search box → `/search`) pass through untouched. Opt out per-form with `data-native`. Static text
|
|
37
|
+
* (no interpolation), so it can't carry injected markup. See the Hydration guide.
|
|
38
|
+
*/
|
|
39
|
+
export declare const PRE_HYDRATION_GUARD: string;
|
|
40
|
+
/**
|
|
41
|
+
* The single default port for the dev server (`@nifrajs/web/dev`, `@nifrajs/web/vite`) **and**
|
|
42
|
+
* `nifra start`. Deliberately uncommon: `3000`/`5173`/`8080` collide with whatever else is running
|
|
43
|
+
* (Next, Vite, a stray Node API). `4321` rarely is - and being the *same* constant across `nifra dev`
|
|
44
|
+
* and `nifra start` means a project's URL doesn't change between commands. Override per-run with
|
|
45
|
+
* `--port <n>` or the `PORT` env var. */
|
|
46
|
+
export declare const DEFAULT_DEV_PORT = 4321;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=runtime-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-contract.d.ts","sourceRoot":"","sources":["../../src/internal/runtime-contract.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAExE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QAOjB,CAAA;AAEf;;;;;yCAKyC;AACzC,eAAO,MAAM,gBAAgB,OAAO,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-hydration form guard - a tiny inline script flushed in `<head>` (it runs in the window between
|
|
3
|
+
* first paint and the island bundle taking over). It neutralizes the one real hydration footgun: a
|
|
4
|
+
* JS-only form (a hand-wired `onSubmit` with no native fallback) submitting *natively* before its
|
|
5
|
+
* handler is attached, which navigates the browser to a broken `?field=…` GET of the current page.
|
|
6
|
+
*
|
|
7
|
+
* It blocks ONLY that shape - an effective-GET form whose action targets the current document - and
|
|
8
|
+
* only until hydration commits (`data-nifra-hydrated`, set by the client entry). Method-`post` forms
|
|
9
|
+
* (progressive enhancement: the native POST hits the route `action`) and GET forms with a real action
|
|
10
|
+
* (a search box → `/search`) pass through untouched. Opt out per-form with `data-native`. Static text
|
|
11
|
+
* (no interpolation), so it can't carry injected markup. See the Hydration guide.
|
|
12
|
+
*/
|
|
13
|
+
export const PRE_HYDRATION_GUARD = "(function(){addEventListener('submit',function(e){var f=e.target;" +
|
|
14
|
+
"if(!f||f.tagName!=='FORM'||f.hasAttribute('data-native'))return;" +
|
|
15
|
+
"if(document.documentElement.hasAttribute('data-nifra-hydrated'))return;" +
|
|
16
|
+
"var m=(f.getAttribute('method')||'get').toLowerCase();if(m==='post')return;" +
|
|
17
|
+
"var a=f.getAttribute('action');" +
|
|
18
|
+
"if(!a||a===''||a==='#'||a===location.pathname||a===location.href)e.preventDefault()" +
|
|
19
|
+
"},true)})()";
|
|
20
|
+
/**
|
|
21
|
+
* The single default port for the dev server (`@nifrajs/web/dev`, `@nifrajs/web/vite`) **and**
|
|
22
|
+
* `nifra start`. Deliberately uncommon: `3000`/`5173`/`8080` collide with whatever else is running
|
|
23
|
+
* (Next, Vite, a stray Node API). `4321` rarely is - and being the *same* constant across `nifra dev`
|
|
24
|
+
* and `nifra start` means a project's URL doesn't change between commands. Override per-run with
|
|
25
|
+
* `--port <n>` or the `PORT` env var. */
|
|
26
|
+
export const DEFAULT_DEV_PORT = 4321;
|
|
27
|
+
//# sourceMappingURL=runtime-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-contract.js","sourceRoot":"","sources":["../../src/internal/runtime-contract.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,mEAAmE;IACnE,kEAAkE;IAClE,yEAAyE;IACzE,6EAA6E;IAC7E,iCAAiC;IACjC,qFAAqF;IACrF,aAAa,CAAA;AAEf;;;;;yCAKyC;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { type ServerOptions, server } from "@nifrajs/core/server";
|
|
2
|
+
import type { Manifest } from "../manifest.js";
|
|
3
|
+
import type { RenderAdapter } from "../render-seam.js";
|
|
4
|
+
export interface CreateWebAppOptions<Env = unknown> {
|
|
5
|
+
readonly adapter: RenderAdapter;
|
|
6
|
+
readonly manifest: Manifest;
|
|
7
|
+
/** URL of the built client entry (module script) injected into every page. */
|
|
8
|
+
readonly clientEntry: string;
|
|
9
|
+
/** Default document title for all pages. */
|
|
10
|
+
readonly title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Options for the underlying `server()` - `requestTimeoutMs`, `admission`, `gracefulSignals`, and
|
|
13
|
+
* the rest of {@link ServerOptions}.
|
|
14
|
+
*
|
|
15
|
+
* Needed because the `Server` is constructed in here, so a caller has no other way to reach its
|
|
16
|
+
* constructor: a page app could set no request timeout and no capacity gate, which are exactly the
|
|
17
|
+
* two knobs a production readiness check looks for. An SSR app wants them MORE than a backend does -
|
|
18
|
+
* a render is slow and allocation-heavy, so a burst that a JSON API would absorb is the one that
|
|
19
|
+
* exhausts the pod.
|
|
20
|
+
*
|
|
21
|
+
* Applies to the whole app, {@link mounts} and the {@link api} auto-mount included: the capacity gate
|
|
22
|
+
* sits at the fetch entry, ahead of the request hooks those are dispatched from.
|
|
23
|
+
*/
|
|
24
|
+
readonly server?: ServerOptions;
|
|
25
|
+
/**
|
|
26
|
+
* Runs against the app BEFORE any page route is registered - the seam for `securityHeaders()`,
|
|
27
|
+
* `requestId()`, `logger()`, a rate limit, or anything else applied with `use`.
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* createWebApp({
|
|
31
|
+
* …,
|
|
32
|
+
* use: (app) => {
|
|
33
|
+
* app.use(securityHeaders())
|
|
34
|
+
* app.use(requestId())
|
|
35
|
+
* },
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* A callback rather than an array because `use` is overloaded - `Middleware`, `IdentityPlugin`,
|
|
40
|
+
* `ContextPlugin` - and only the real call site instantiates the right overload. The return value
|
|
41
|
+
* is ignored: this is for cross-cutting concerns, not for declaring routes (declare those on the
|
|
42
|
+
* returned app, where they get their types).
|
|
43
|
+
*
|
|
44
|
+
* **Why the timing matters.** `beforeHandle`, `afterHandle`, `around`, `derive`/`decorate`, and
|
|
45
|
+
* `onError` are snapshotted into each route AS IT IS DECLARED, and `createWebApp` declares every
|
|
46
|
+
* page (plus the `/*` catch-all) before it returns - so a caller's `app.use(…)` afterwards binds
|
|
47
|
+
* them to nothing, silently. `requestId()` is exactly that case: it is a `derive`, so applied late
|
|
48
|
+
* it leaves every page without `c.requestId`. Route assurance evidence is order-scoped the same
|
|
49
|
+
* way, so a late `securityHeaders()` leaves the pages unable to PROVE the header to `nifra assure`
|
|
50
|
+
* even though it does still set it.
|
|
51
|
+
*
|
|
52
|
+
* `onRequest`/`onResponse` (and the response header/body hooks) are app-global arrays read at
|
|
53
|
+
* request time, so those alone DO work when added late. Using this seam for everything avoids
|
|
54
|
+
* having to remember which is which.
|
|
55
|
+
*
|
|
56
|
+
* Runs ahead of the {@link mounts} / {@link api} request hooks, so an `onRequest` middleware guards
|
|
57
|
+
* a mounted auth handler too.
|
|
58
|
+
*
|
|
59
|
+
* A `ContextPlugin` applied here takes runtime effect but cannot widen the declared return type of
|
|
60
|
+
* this function, so `c.requestId` is not typed on routes you declare afterwards. Named plugins are
|
|
61
|
+
* idempotent, so `app.use(requestId())` on the returned app recovers the TYPE without applying the
|
|
62
|
+
* plugin a second time.
|
|
63
|
+
*/
|
|
64
|
+
readonly use?: (app: ReturnType<typeof server<Env>>) => void;
|
|
65
|
+
/** Injected into each loader's `ctx.api` - typically an `inProcessClient(app)` (typed
|
|
66
|
+
* per-route via `@nifrajs/client`'s `createRoutes`). Opaque to the core.
|
|
67
|
+
*
|
|
68
|
+
* **Auto-mount.** Every `inProcessClient(backend)` exposes the symbol-keyed platform-aware backend
|
|
69
|
+
* mount interface from `@nifrajs/core/mount`; `createWebApp` also serves that backend over HTTP at
|
|
70
|
+
* {@link apiPrefix} (default `/api`): a request whose pathname starts with the prefix is dispatched
|
|
71
|
+
* before page routing with the same `env`/`waitUntil` platform context, and the backend's `Response`
|
|
72
|
+
* is returned untouched. The mount runs in `nifra dev` too. Pass `apiPrefix: ""` to disable it. */
|
|
73
|
+
readonly api?: unknown;
|
|
74
|
+
/** HTTP path prefix the {@link api} backend is auto-mounted at (default `"/api"`). A request whose
|
|
75
|
+
* pathname is exactly the prefix or starts with `prefix + "/"` is dispatched to the backend before
|
|
76
|
+
* page routing; the backend therefore defines its routes at the **full** path (`server().post("/api/
|
|
77
|
+
* sync", …)`), matching the in-process `inProcessClient` call sites. Set to `""` to disable the
|
|
78
|
+
* auto-mount entirely (the app serves pages only and `api` stays a loader-only `ctx.api`). Mounting
|
|
79
|
+
* is also a no-op when `api` does not expose the symbol mount. */
|
|
80
|
+
readonly apiPrefix?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Strip {@link apiPrefix} from the pathname before dispatching to `api` (default `false`).
|
|
83
|
+
*
|
|
84
|
+
* The default suits a backend that declares FULL paths (`server().post("/api/sync", …)`), which is
|
|
85
|
+
* right when it is only ever mounted here. Set this when the backend declares its routes WITHOUT the
|
|
86
|
+
* prefix because it also runs standalone behind its own shell, so its paths cannot carry a prefix that
|
|
87
|
+
* only exists when it is mounted. Without it every request 404s inside the backend, and the workaround
|
|
88
|
+
* is a `Proxy` that rewrites each URL.
|
|
89
|
+
*/
|
|
90
|
+
readonly apiStrip?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Sub-apps mounted ahead of page routing - an auth handler, a webhook receiver, a stack's routes.
|
|
93
|
+
*
|
|
94
|
+
* Structural on purpose: anything with `{ path, app: { fetch } }` fits, so a library that exposes its
|
|
95
|
+
* routes as such a list mounts as `mounts: theirRoutes` without `@nifrajs/web` taking a dependency on
|
|
96
|
+
* it. `better-auth` is the motivating case - it is not a `backend` route, so `/api/auth/*` used to 404
|
|
97
|
+
* silently.
|
|
98
|
+
*
|
|
99
|
+
* Tried longest-path-first and BEFORE the `api` mount, so a mount at `/api/auth` wins over a backend
|
|
100
|
+
* at `/api` no matter which was declared first. `stripPrefix` is the per-mount form of {@link apiStrip}:
|
|
101
|
+
* leave it off to pass the full path through.
|
|
102
|
+
*/
|
|
103
|
+
readonly mounts?: ReadonlyArray<{
|
|
104
|
+
readonly path: string;
|
|
105
|
+
readonly app: {
|
|
106
|
+
fetch(request: Request): Response | Promise<Response>;
|
|
107
|
+
};
|
|
108
|
+
readonly stripPrefix?: boolean;
|
|
109
|
+
}>;
|
|
110
|
+
/** Secret for **draft / preview mode** (see `enableDraft`). When set, a request carrying a valid
|
|
111
|
+
* signed `__nifra_draft` cookie gets `ctx.draft === true` in loaders/actions (else always `false`).
|
|
112
|
+
* Pair with `withISR({ draftSecret })` so editors bypass the cache. Omit to disable draft mode. */
|
|
113
|
+
readonly draftSecret?: string;
|
|
114
|
+
/** Per-route chunk URLs (`buildClient`'s `BuildManifest.routes`) - `routeId → [layout chunks…, own
|
|
115
|
+
* chunk]`. When present, each page `modulepreload`s its matched route's chunks alongside the entry,
|
|
116
|
+
* so the route code downloads in parallel (no entry→route-chunk waterfall). Omit ⇒ entry-only. */
|
|
117
|
+
readonly routePreload?: Readonly<Record<string, readonly string[]>>;
|
|
118
|
+
/** The app's bundled stylesheet URLs (`buildClient`'s `BuildManifest.css`) - the aggregate, injected
|
|
119
|
+
* as `<link rel="stylesheet">` in a page's `<head>`. Used as the fallback for any route absent from
|
|
120
|
+
* {@link routeStyles}. Omit ⇒ no links (dev, where Vite injects CSS, or a CSS-free app). */
|
|
121
|
+
readonly styles?: readonly string[];
|
|
122
|
+
/** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - `routeId → [chain CSS]`.
|
|
123
|
+
* When a matched route has an entry here, only those (its layout chain + own CSS) are linked instead
|
|
124
|
+
* of the aggregate `styles`, so a page ships only the CSS it uses. An empty array ⇒ no `<link>` (the
|
|
125
|
+
* page imports no CSS). Routes absent here fall back to `styles`. Omit ⇒ always use `styles`. */
|
|
126
|
+
readonly routeStyles?: Readonly<Record<string, readonly string[]>>;
|
|
127
|
+
/** SSG: the prerendered-path set (e.g. `enumerateStaticRoutes(routes).paths` or the build's
|
|
128
|
+
* `prerendered.json`). Injected as `window.__NIFRA_PRERENDERED__` on every page so a client soft-nav
|
|
129
|
+
* into a prerendered route fetches its static `_data.json` instead of hitting the worker. */
|
|
130
|
+
readonly prerenderedPaths?: readonly string[];
|
|
131
|
+
/** Publish the project's `AGENTS.md` inside `/llms.txt` and `/llms-full.txt`. **Off by default**:
|
|
132
|
+
* those endpoints are public and unauthenticated, while `AGENTS.md` is a repo file written for the
|
|
133
|
+
* team - unreleased feature names, internal hostnames, and "don't touch X yet" notes live there
|
|
134
|
+
* routinely. Turn it on only for a repo whose guidelines you would publish as a page. */
|
|
135
|
+
readonly publishLocalGuidelines?: boolean;
|
|
136
|
+
/** SSG: per dynamic route pattern, its `getStaticPaths` `fallback` (from `enumerateStaticRoutes` or
|
|
137
|
+
* the build's `prerendered.json`). A route mapped to `"404"` rejects any path NOT in
|
|
138
|
+
* `prerenderedPaths` with the 404 page - the unlisted path simply doesn't exist. `"ssr"` (the
|
|
139
|
+
* default for unmapped routes) renders unlisted paths on-demand. */
|
|
140
|
+
readonly staticFallbacks?: Readonly<Record<string, "ssr" | "404">>;
|
|
141
|
+
/** In-memory reference cache for explicitly `static` boundary values. It never persists payloads
|
|
142
|
+
* across processes; operated/durable cache implementations stay outside the public framework. */
|
|
143
|
+
readonly staticBoundaryCache?: import("../boundary.js").StaticBoundaryCache;
|
|
144
|
+
/** Observe every loader/action failure - for error-reporting plugins (Sentry-style). Called for
|
|
145
|
+
* real throws (not control-flow `Response`s like `redirect`), **before** the nearest `_error`
|
|
146
|
+
* boundary renders / a soft-nav 500 / a rethrow - so it sees errors that the boundary would
|
|
147
|
+
* otherwise hide. Observation only; its own throws are swallowed so a faulty reporter can't break
|
|
148
|
+
* rendering. (`beforeLoader` is intentionally omitted - the core HTTP hooks already cover
|
|
149
|
+
* pre-request work.) */
|
|
150
|
+
readonly onLoaderError?: (error: unknown, ctx: {
|
|
151
|
+
readonly request: Request;
|
|
152
|
+
readonly params: Readonly<Record<string, string>>;
|
|
153
|
+
readonly route: string;
|
|
154
|
+
}) => void;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Build a nifra app from a route manifest: every route SSRs its layout chain via `renderPage`,
|
|
158
|
+
* and a wildcard catch-all renders `_404` (or a plain 404). Reuses @nifrajs/core's router +
|
|
159
|
+
* lifecycle, so matching, params, and precedence are battle-tested. fs-free - feed it a
|
|
160
|
+
* manifest from `discoverRoutes` (`@nifrajs/web/fs`) at startup, so the served app stays portable.
|
|
161
|
+
*
|
|
162
|
+
* **Typed platform bindings.** Pass `Env` - `createWebApp<Env>({ … })` - to declare the app's Workers
|
|
163
|
+
* bindings ONCE. It seeds the returned `Server`'s context with `{ env: Env }` (exactly as the backend's
|
|
164
|
+
* `server<Env>()` does), so `app.fetch(req, { env })` / `toFetchHandler(app)` type-check the `env`
|
|
165
|
+
* argument against the declared shape - no per-binding cast at the edge entry. Per-route loaders/actions
|
|
166
|
+
* stay typed independently of this call: annotate them with `@nifrajs/client`'s `LoaderArgs<Api, Env>`
|
|
167
|
+
* (same `Env`) so `ctx.env.MY_KV` is typed there too. Omit the parameter and `Env` is `unknown` - the
|
|
168
|
+
* secure default; validate at the trust boundary before use.
|
|
169
|
+
*/
|
|
170
|
+
export declare function createWebApp<Env = unknown>(options: CreateWebAppOptions<Env>): ReturnType<typeof server<Env>>;
|
|
171
|
+
//# sourceMappingURL=web-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../src/internal/web-app.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,EAA6B,MAAM,sBAAsB,CAAA;AAW5F,OAAO,KAAK,EAGV,QAAQ,EAKT,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AA8BtD,MAAM,WAAW,mBAAmB,CAAC,GAAG,GAAG,OAAO;IAChD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,EAAE,MAAM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