@teyik0/furin 0.2.0-alpha.5 → 0.4.0-alpha.1
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 +2 -3
- package/dist/adapter/bun.d.ts +1 -1
- package/dist/adapter/static.d.ts +1 -1
- package/dist/build/bun-build.d.ts +3 -0
- package/dist/build/client.d.ts +2 -2
- package/dist/build/entry-template.d.ts +6 -0
- package/dist/build/entry-template.ts +20 -3
- package/dist/build/hydrate.d.ts +1 -1
- package/dist/build/index.d.ts +1 -1
- package/dist/build/index.js +9363 -5827
- package/dist/build/production-instrumentation.d.ts +1 -0
- package/dist/build/route-types.d.ts +3 -23
- package/dist/build/shared.d.ts +1 -1
- package/dist/build/ssg-cache.d.ts +1 -1
- package/dist/build/types.d.ts +2 -1
- package/dist/cli/index.js +9467 -5870
- package/dist/client/boundaries.d.ts +6 -4
- package/dist/client/define-route.d.ts +35 -0
- package/dist/client/document.d.ts +26 -0
- package/dist/client/hmr.d.ts +10 -0
- package/dist/client/internal/runtime-types.d.ts +32 -0
- package/dist/client/link.d.ts +2 -1
- package/dist/client/link.js +1884 -1227
- package/dist/client/router/boundary-tree.d.ts +1 -1
- package/dist/client/router/index.d.ts +2 -2
- package/dist/client/router/link-utils.d.ts +14 -1
- package/dist/client/router/search/index.d.ts +3 -7
- package/dist/client/router/sync-catch-up.d.ts +4 -4
- package/dist/client/router/types.d.ts +34 -26
- package/dist/client-only.d.ts +1 -0
- package/dist/client-only.js +1 -0
- package/dist/client.d.ts +11 -169
- package/dist/client.js +197 -36
- package/dist/config.d.ts +8 -8
- package/dist/config.js +10 -10
- package/dist/define-route.d.ts +1355 -0
- package/dist/devtools/devtools-element.d.ts +1 -0
- package/dist/devtools/protocol.d.ts +119 -0
- package/dist/furin.d.ts +24 -39
- package/dist/furin.js +14432 -7929
- package/dist/isomorphic.d.ts +18 -0
- package/dist/plugin/binding-scope.d.ts +2 -0
- package/dist/plugin/dead-code-elimination.d.ts +3 -0
- package/dist/plugin/index.js +1708 -489
- package/dist/plugin/route-config-autofix.d.ts +31 -0
- package/dist/plugin/routes.d.ts +27 -0
- package/dist/plugin/transform-client.d.ts +0 -2
- package/dist/plugin/transform-isomorphic.d.ts +9 -0
- package/dist/routes.d.ts +6 -0
- package/dist/routes.js +1 -0
- package/dist/rsc/build/environment.d.ts +2 -0
- package/dist/rsc/build/index.d.ts +15 -0
- package/dist/rsc/client-codec.d.ts +1 -0
- package/dist/rsc/codec.d.ts +4 -0
- package/dist/rsc/flight-drain.d.ts +11 -0
- package/dist/rsc/render-error.d.ts +17 -0
- package/dist/rsc/server-codec.d.ts +2 -0
- package/dist/rsc/server-codec.js +24 -0
- package/dist/rsc/shared.d.ts +30 -0
- package/dist/rsc/symbols.d.ts +2 -0
- package/dist/rsc/transport-benchmark.d.ts +13 -0
- package/dist/rsc/version.d.ts +7 -0
- package/dist/rsc-client.d.ts +4 -0
- package/dist/rsc-client.js +166 -0
- package/dist/rsc-server.d.ts +11 -0
- package/dist/rsc.d.ts +11 -0
- package/dist/rsc.js +353 -0
- package/dist/server/cache/index.d.ts +2 -2
- package/dist/server/cache/invalidation.d.ts +2 -3
- package/dist/server/cache/isr-ssg.d.ts +5 -1
- package/dist/server/cache/isr.d.ts +9 -0
- package/dist/server/cache/route-cache.d.ts +10 -8
- package/dist/server/cache/store-view.d.ts +7 -7
- package/dist/server/dev-page-plugin.d.ts +11 -5
- package/dist/server/devtools/hub.d.ts +11 -0
- package/dist/server/devtools/instrumentation.d.ts +22 -0
- package/dist/server/devtools/instrumentation.production.d.ts +44 -0
- package/dist/server/devtools/plugin.d.ts +3 -0
- package/dist/server/devtools/request-context.d.ts +6 -0
- package/dist/server/internal.d.ts +5 -0
- package/dist/server/internal.js +3 -3
- package/dist/server/lang-detect.d.ts +1 -0
- package/dist/server/logger.d.ts +4 -0
- package/dist/server/render/assemble.d.ts +4 -9
- package/dist/server/render/document.d.ts +4 -0
- package/dist/server/render/element.d.ts +3 -2
- package/dist/server/render/index.d.ts +2 -2
- package/dist/server/render/index.ts +6 -3
- package/dist/server/render/isr.d.ts +1 -1
- package/dist/server/render/loaders.d.ts +9 -1
- package/dist/server/render/not-found.d.ts +2 -2
- package/dist/server/render/ppr-route.d.ts +8 -0
- package/dist/server/render/route-frame-transport.d.ts +2 -0
- package/dist/server/render/shell.ts +0 -1
- package/dist/server/render/ssg.d.ts +1 -1
- package/dist/server/render/ssr.d.ts +9 -9
- package/dist/server/render/template.d.ts +4 -0
- package/dist/server/router/defined-route.d.ts +24 -0
- package/dist/server/router/discovery.d.ts +1 -1
- package/dist/server/router/hmr.d.ts +17 -9
- package/dist/server/router/patterns.d.ts +7 -1
- package/dist/server/router/plugin.d.ts +8 -10
- package/dist/server/router/schema-merge.d.ts +3 -0
- package/dist/server/router/schemas.d.ts +14 -9
- package/dist/server/router/source-version.d.ts +2 -0
- package/dist/server/router/types.d.ts +2 -1
- package/dist/server/runtime-env.js +2 -2
- package/dist/server/sync/adapter.d.ts +45 -26
- package/dist/server/sync/config.d.ts +5 -9
- package/dist/server/sync/fingerprint.d.ts +2 -1
- package/dist/server/sync/index.d.ts +15 -4
- package/dist/server/sync/index.js +3023 -0
- package/dist/server/sync/notifier.d.ts +18 -0
- package/dist/server/sync/plugin.d.ts +53 -54
- package/dist/server/sync/postgres/index.d.ts +19 -0
- package/dist/server/sync/postgres/index.js +252 -0
- package/dist/server/sync/postgres/migrate.d.ts +2 -0
- package/dist/server/sync/postgres/migrate.js +17 -0
- package/dist/server/sync/postgres/migration.sql +66 -0
- package/dist/server/sync/redis/index.d.ts +30 -0
- package/dist/server/sync/redis/index.js +336 -0
- package/dist/server/sync/redis/scripts.d.ts +4 -0
- package/dist/server/sync/response.d.ts +10 -1
- package/dist/server/sync/runtime.d.ts +6 -0
- package/dist/server/sync/sqlite/index.d.ts +20 -0
- package/dist/server/sync/sqlite/index.js +250 -0
- package/dist/server/sync/stream.d.ts +12 -11
- package/dist/server-only.d.ts +1 -0
- package/dist/server-only.js +1 -0
- package/dist/shared/await.d.ts +6 -7
- package/dist/shared/elysia-contract.d.ts +41 -0
- package/dist/shared/parser.d.ts +2 -0
- package/dist/shared/route-frame.d.ts +49 -0
- package/dist/shared/route-map.d.ts +5 -0
- package/dist/shared/utils/index.d.ts +1 -3
- package/package.json +86 -41
- package/src/adapter/bun.ts +113 -36
- package/src/adapter/package.ts +23 -15
- package/src/adapter/static.ts +97 -50
- package/src/build/bun-build.ts +11 -0
- package/src/build/client.ts +41 -26
- package/src/build/entry-template.ts +20 -3
- package/src/build/hydrate.ts +128 -33
- package/src/build/index.ts +14 -2
- package/src/build/production-instrumentation.ts +14 -0
- package/src/build/route-types.ts +20 -116
- package/src/build/scan-server.ts +3 -2
- package/src/build/shared.ts +1 -1
- package/src/build/ssg-cache.ts +4 -2
- package/src/build/types.ts +2 -1
- package/src/cli/config.ts +3 -3
- package/src/cli/index.ts +58 -27
- package/src/client/boundaries.tsx +51 -19
- package/src/client/default-screens.tsx +4 -4
- package/src/client/define-route.ts +48 -0
- package/src/client/document.tsx +165 -0
- package/src/client/hmr.ts +40 -0
- package/src/client/internal/runtime-types.ts +33 -0
- package/src/client/link.tsx +51 -38
- package/src/client/router/boundary-tree.tsx +2 -2
- package/src/client/router/context.ts +13 -9
- package/src/client/router/index.ts +4 -0
- package/src/client/router/link-utils.ts +92 -3
- package/src/client/router/navigation.ts +9 -15
- package/src/client/router/provider.tsx +98 -53
- package/src/client/router/search/index.ts +9 -19
- package/src/client/router/search-store.ts +5 -1
- package/src/client/router/spa-response.ts +3 -4
- package/src/client/router/sync-catch-up.ts +9 -8
- package/src/client/router/types.ts +52 -26
- package/src/client/sync.ts +3 -2
- package/src/client-only.ts +1 -0
- package/src/client.ts +28 -283
- package/src/config.ts +10 -10
- package/src/define-route.ts +959 -0
- package/src/devtools/devtools-element.js +885 -0
- package/src/devtools/protocol.ts +139 -0
- package/src/furin.ts +475 -136
- package/src/isomorphic.ts +66 -0
- package/src/plugin/binding-scope.ts +158 -0
- package/src/plugin/dead-code-elimination.ts +202 -0
- package/src/plugin/index.ts +14 -18
- package/src/plugin/route-config-autofix.ts +1140 -0
- package/src/plugin/routes.ts +891 -0
- package/src/plugin/transform-client.ts +160 -330
- package/src/plugin/transform-isomorphic.ts +464 -0
- package/src/routes.ts +6 -0
- package/src/rsc/build/environment.ts +30 -0
- package/src/rsc/build/index.ts +94 -0
- package/src/rsc/client-codec.ts +11 -0
- package/src/rsc/codec.ts +85 -0
- package/src/rsc/flight-drain.ts +68 -0
- package/src/rsc/react-server-dom-webpack.d.ts +23 -0
- package/src/rsc/render-error.ts +120 -0
- package/src/rsc/server-codec.ts +25 -0
- package/src/rsc/shared.tsx +113 -0
- package/src/rsc/symbols.ts +2 -0
- package/src/rsc/transport-benchmark.ts +73 -0
- package/src/rsc/version.ts +57 -0
- package/src/rsc-client.ts +12 -0
- package/src/rsc-server.tsx +91 -0
- package/src/rsc.tsx +75 -0
- package/src/server/auto-invalidate/registry.ts +2 -2
- package/src/server/auto-invalidate/runtime.ts +32 -6
- package/src/server/cache/dev-loader.ts +70 -10
- package/src/server/cache/index.ts +7 -3
- package/src/server/cache/invalidation.ts +33 -15
- package/src/server/cache/isr-ssg.ts +12 -3
- package/src/server/cache/isr.ts +84 -9
- package/src/server/cache/route-cache.ts +49 -36
- package/src/server/cache/store-view.ts +7 -7
- package/src/server/context-logger.ts +7 -7
- package/src/server/dev-page-plugin.ts +38 -17
- package/src/server/devtools/hub.ts +64 -0
- package/src/server/devtools/instrumentation.production.ts +80 -0
- package/src/server/devtools/instrumentation.ts +72 -0
- package/src/server/devtools/plugin.ts +269 -0
- package/src/server/devtools/request-context.ts +76 -0
- package/src/server/instance.ts +4 -4
- package/src/server/internal.ts +5 -0
- package/src/server/lang-detect.ts +14 -10
- package/src/server/logger.ts +21 -0
- package/src/server/render/assemble.ts +58 -36
- package/src/server/render/document.tsx +25 -0
- package/src/server/render/element.tsx +24 -9
- package/src/server/render/index.ts +6 -3
- package/src/server/render/isr.ts +182 -117
- package/src/server/render/loaders.ts +289 -50
- package/src/server/render/not-found.ts +57 -38
- package/src/server/render/ppr-route.ts +146 -0
- package/src/server/render/route-frame-transport.ts +62 -0
- package/src/server/render/shell.ts +0 -1
- package/src/server/render/ssg.ts +7 -6
- package/src/server/render/ssr.ts +412 -166
- package/src/server/render/template.ts +93 -2
- package/src/server/router/defined-route.ts +110 -0
- package/src/server/router/discovery.ts +165 -48
- package/src/server/router/hmr.ts +126 -53
- package/src/server/router/patterns.ts +56 -27
- package/src/server/router/plugin.ts +210 -200
- package/src/server/router/schema-merge.ts +42 -0
- package/src/server/router/schemas.ts +61 -76
- package/src/server/router/source-version.ts +16 -0
- package/src/server/router/types.ts +3 -1
- package/src/server/sync/adapter.ts +44 -28
- package/src/server/sync/config.ts +9 -27
- package/src/server/sync/fingerprint.ts +8 -3
- package/src/server/sync/index.ts +37 -13
- package/src/server/sync/notifier.ts +109 -0
- package/src/server/sync/plugin.ts +184 -89
- package/src/server/sync/postgres/index.ts +301 -0
- package/src/server/sync/postgres/migrate.ts +16 -0
- package/src/server/sync/postgres/migration.sql +66 -0
- package/src/server/sync/redis/index.ts +342 -0
- package/src/server/sync/redis/scripts.ts +74 -0
- package/src/server/sync/response.ts +145 -16
- package/src/server/sync/runtime.ts +27 -0
- package/src/server/sync/sql.d.ts +4 -0
- package/src/server/sync/sqlite/index.ts +337 -0
- package/src/server/sync/sqlite/migration.sql +70 -0
- package/src/server/sync/stream.ts +137 -81
- package/src/server-only.ts +1 -0
- package/src/shared/await.tsx +10 -11
- package/src/shared/deferred-ndjson.ts +34 -6
- package/src/shared/digest.ts +2 -2
- package/src/shared/elysia-contract.ts +63 -0
- package/src/shared/parser.ts +5 -0
- package/src/shared/route-frame.ts +429 -0
- package/src/shared/route-map.ts +37 -0
- package/src/shared/search-params.ts +7 -7
- package/src/shared/utils/index.ts +6 -22
- package/dist/build/server-routes-entry.d.ts +0 -13
- package/dist/build/server-routes-entry.ts +0 -30
- package/dist/server/dev-inspector.d.ts +0 -89
- package/dist/server/router/index.d.ts +0 -6
- package/dist/server/router/index.js +0 -27
- package/dist/server/router/index.ts +0 -28
- package/dist/server/sync/memory-adapter.d.ts +0 -17
- package/src/build/server-routes-entry.ts +0 -30
- package/src/server/dev-inspector.ts +0 -60
- package/src/server/router/index.ts +0 -28
- package/src/server/sync/memory-adapter.ts +0 -196
package/src/adapter/package.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { existsSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join, relative, resolve } from "node:path";
|
|
3
3
|
import { type BunTargetApp, createBuildFingerprint } from "../adapter/bun.ts";
|
|
4
|
+
import { runBunBuild } from "../build/bun-build.ts";
|
|
4
5
|
import { buildClient } from "../build/client.ts";
|
|
5
6
|
import { buildEntrySource } from "../build/entry-template.ts";
|
|
6
7
|
import { copyDirRecursive, ensureDir, toPosixPath } from "../build/shared.ts";
|
|
7
8
|
import { buildSSGCacheSnapshot } from "../build/ssg-cache.ts";
|
|
8
9
|
import type { BuildAppOptions, PackageTargetBuildManifest } from "../build/types.ts";
|
|
10
|
+
import { createRoutesPlugin, routeModuleSpecifier, routeSourcePaths } from "../plugin/routes.ts";
|
|
9
11
|
import { ssgRouteCache } from "../server/cache/ssg.ts";
|
|
10
12
|
import { generateProdIndexHtml } from "../server/render/shell.ts";
|
|
11
13
|
import { setProductionTemplateContent } from "../server/render/template.ts";
|
|
@@ -46,12 +48,13 @@ export async function buildPackageTarget(
|
|
|
46
48
|
ensureDir(targetDir);
|
|
47
49
|
|
|
48
50
|
const { entryChunk, cssChunks } = await buildClient(routes, {
|
|
51
|
+
basePath: prefix,
|
|
52
|
+
clientLogging: options.clientLogging ?? false,
|
|
49
53
|
outDir: targetDir,
|
|
50
|
-
|
|
54
|
+
pagesDir,
|
|
51
55
|
plugins: options.plugins,
|
|
52
56
|
publicPath: `${prefix}/_client/`,
|
|
53
|
-
|
|
54
|
-
clientLogging: options.clientLogging ?? false,
|
|
57
|
+
rootLayout: root.path,
|
|
55
58
|
});
|
|
56
59
|
|
|
57
60
|
// Same fingerprint as the Bun target: hashing only the client chunks would
|
|
@@ -108,9 +111,9 @@ export async function buildPackageTarget(
|
|
|
108
111
|
routeMetadata[toPosixPath(route.path)] = {
|
|
109
112
|
segmentBoundaries: route.segmentBoundaries.map((b) => ({
|
|
110
113
|
depth: b.depth,
|
|
111
|
-
path: toPosixPath(b.path),
|
|
112
114
|
errorPath: b.errorPath ? toPosixPath(b.errorPath) : undefined,
|
|
113
115
|
notFoundPath: b.notFoundPath ? toPosixPath(b.notFoundPath) : undefined,
|
|
116
|
+
path: toPosixPath(b.path),
|
|
114
117
|
})),
|
|
115
118
|
};
|
|
116
119
|
}
|
|
@@ -120,11 +123,14 @@ export async function buildPackageTarget(
|
|
|
120
123
|
apps: [
|
|
121
124
|
{
|
|
122
125
|
buildId,
|
|
126
|
+
clientLogging: options.clientLogging ?? false,
|
|
127
|
+
modulePaths: routeSourcePaths({ pagesDir, prefix }),
|
|
128
|
+
nativeRoutes: routeModuleSpecifier(app),
|
|
123
129
|
prefix,
|
|
124
|
-
rootPath: root.path,
|
|
125
|
-
routes: routes.map((r) => ({ pattern: r.pattern, path: r.path, mode: r.mode })),
|
|
126
130
|
rootConventions,
|
|
131
|
+
rootPath: root.path,
|
|
127
132
|
routeMetadata,
|
|
133
|
+
routes: routes.map((r) => ({ mode: r.mode, path: r.path, pattern: r.pattern })),
|
|
128
134
|
ssgCache,
|
|
129
135
|
},
|
|
130
136
|
],
|
|
@@ -134,18 +140,21 @@ export async function buildPackageTarget(
|
|
|
134
140
|
const registerEntry = join(targetDir, "register.ts");
|
|
135
141
|
writeFileSync(registerEntry, registerSource);
|
|
136
142
|
|
|
137
|
-
const result = await
|
|
143
|
+
const result = await runBunBuild({
|
|
138
144
|
entrypoints: [registerEntry],
|
|
145
|
+
minify: false,
|
|
146
|
+
naming: { chunk: "[name]-[hash].[ext]", entry: "[name].[ext]" },
|
|
139
147
|
outdir: targetDir,
|
|
140
|
-
target: "bun",
|
|
141
148
|
// Keep EVERY dependency external (incl. @teyik0/furin): the host must
|
|
142
149
|
// share one copy of the furin runtime with this register module — only
|
|
143
150
|
// the package's own page sources get bundled in.
|
|
144
151
|
packages: "external",
|
|
145
|
-
|
|
152
|
+
plugins: [
|
|
153
|
+
...(options.plugins ?? []),
|
|
154
|
+
createRoutesPlugin({ instances: [app], target: "server" }),
|
|
155
|
+
],
|
|
146
156
|
sourcemap: "none",
|
|
147
|
-
|
|
148
|
-
plugins: options.plugins,
|
|
157
|
+
target: "bun",
|
|
149
158
|
});
|
|
150
159
|
if (!result.success) {
|
|
151
160
|
throw new AggregateError(result.logs, "[furin] package register build failed");
|
|
@@ -170,7 +179,7 @@ const CLIENT_DIR = fileURLToPath(new URL("./client", import.meta.url));
|
|
|
170
179
|
*
|
|
171
180
|
* @param {object} [options] Extra furin() options (logger, sync, ...) —
|
|
172
181
|
* pagesDir/prefix/clientDir are baked into the package and cannot be overridden.
|
|
173
|
-
* @returns {
|
|
182
|
+
* @returns {ReturnType<typeof import("@teyik0/furin").furin>}
|
|
174
183
|
*/
|
|
175
184
|
export function createFurinApp(options = {}) {
|
|
176
185
|
return furin({
|
|
@@ -185,12 +194,11 @@ export const prefix = ${JSON.stringify(prefix)};
|
|
|
185
194
|
`;
|
|
186
195
|
writeFileSync(join(targetDir, "index.js"), factorySource);
|
|
187
196
|
|
|
188
|
-
const dtsSource = `import type {
|
|
189
|
-
import type { FurinOptions } from "@teyik0/furin";
|
|
197
|
+
const dtsSource = `import type { FurinOptions, furin } from "@teyik0/furin";
|
|
190
198
|
|
|
191
199
|
/** Extra furin() options — pagesDir/prefix/clientDir are baked into the package and cannot be overridden. */
|
|
192
200
|
export type CreateFurinAppOptions = Omit<FurinOptions, "pagesDir" | "prefix" | "clientDir">;
|
|
193
|
-
export declare function createFurinApp(options?: CreateFurinAppOptions):
|
|
201
|
+
export declare function createFurinApp(options?: CreateFurinAppOptions): ReturnType<typeof furin>;
|
|
194
202
|
export declare const prefix: string;
|
|
195
203
|
`;
|
|
196
204
|
writeFileSync(join(targetDir, "index.d.ts"), dtsSource);
|
package/src/adapter/static.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noAwaitInLoops: static build emits routes in sequence to keep output deterministic
|
|
1
2
|
import { cpSync, existsSync, rmSync, writeFileSync } from "node:fs";
|
|
2
3
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
4
|
import { buildClient } from "../build/client.ts";
|
|
@@ -5,14 +6,11 @@ import { ensureDir, toPosixPath } from "../build/shared.ts";
|
|
|
5
6
|
import type { BuildAppOptions, StaticTargetBuildManifest } from "../build/types.ts";
|
|
6
7
|
import type { StaticExportConfig } from "../config.ts";
|
|
7
8
|
import { resolvePath } from "../server/render/assemble.ts";
|
|
8
|
-
import { prerenderSSG } from "../server/render/index.ts";
|
|
9
9
|
import { generateProdIndexHtml } from "../server/render/shell.ts";
|
|
10
|
+
import { prerenderSSG } from "../server/render/ssg.ts";
|
|
10
11
|
import { setProductionTemplateContent } from "../server/render/template.ts";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
type ResolvedRoute,
|
|
14
|
-
type RootLayout,
|
|
15
|
-
} from "../server/router/index.ts";
|
|
12
|
+
import { createSearchRouteMetadata } from "../server/router/schemas.ts";
|
|
13
|
+
import type { ResolvedRoute, RootLayout } from "../server/router/types.ts";
|
|
16
14
|
import type { SearchRouteMetadata } from "../shared/search-params.ts";
|
|
17
15
|
import { mapWithConcurrency } from "../shared/utils/index.ts";
|
|
18
16
|
|
|
@@ -51,6 +49,38 @@ function pathToOutputFile(urlPath: string, outDir: string, fileName: string): st
|
|
|
51
49
|
return resolved;
|
|
52
50
|
}
|
|
53
51
|
|
|
52
|
+
function sortRouteList(routes: string[]): string[] {
|
|
53
|
+
return routes.toSorted((a, b) => (a < b ? -1 : Number(a > b)));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function assertNoStaticExportSkips(onSSR: "error" | "skip", skippedRoutes: string[]): void {
|
|
57
|
+
if (onSSR !== "error" || skippedRoutes.length === 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const failed = sortRouteList(skippedRoutes);
|
|
61
|
+
const list = failed.map((r) => ` • ${r}`).join("\n");
|
|
62
|
+
throw new Error(
|
|
63
|
+
`[furin] static: ${failed.length} route(s) cannot be statically exported:\n${list}\n` +
|
|
64
|
+
`Define \`staticParams()\` for dynamic SSG routes or set \`onSSR: "skip"\` in your static config.`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function assertNoPrerenderSkips(
|
|
69
|
+
onSSR: "error" | "skip",
|
|
70
|
+
skippedRoutes: string[],
|
|
71
|
+
afterQueueCount: number
|
|
72
|
+
): void {
|
|
73
|
+
if (onSSR !== "error" || skippedRoutes.length <= afterQueueCount) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const failed = sortRouteList(skippedRoutes.slice(afterQueueCount));
|
|
77
|
+
const list = failed.map((r) => ` • ${r}`).join("\n");
|
|
78
|
+
throw new Error(
|
|
79
|
+
`[furin] static: ${failed.length} route(s) failed to pre-render:\n${list}\n` +
|
|
80
|
+
`Set \`onSSR: "skip"\` in your static config to suppress this error.`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
54
84
|
// ── Pre-render worker ─────────────────────────────────────────────────────────
|
|
55
85
|
|
|
56
86
|
async function prerenderAndWrite(
|
|
@@ -165,18 +195,18 @@ async function buildTaskQueue(
|
|
|
165
195
|
STATIC_CONCURRENCY,
|
|
166
196
|
async (route) => {
|
|
167
197
|
if (!DYNAMIC_SEGMENT_RE.test(route.pattern)) {
|
|
168
|
-
return {
|
|
198
|
+
return { paramSets: [{}], route };
|
|
169
199
|
}
|
|
170
200
|
if (!route.page.staticParams) {
|
|
171
201
|
console.warn(
|
|
172
202
|
`[furin] static: skipping dynamic route "${route.pattern}" — no staticParams() defined.`
|
|
173
203
|
);
|
|
174
204
|
skippedRoutes.push(route.pattern);
|
|
175
|
-
return {
|
|
205
|
+
return { paramSets: null, route };
|
|
176
206
|
}
|
|
177
207
|
try {
|
|
178
208
|
const paramSets = (await route.page.staticParams()) ?? [];
|
|
179
|
-
return {
|
|
209
|
+
return { paramSets, route };
|
|
180
210
|
} catch (err) {
|
|
181
211
|
return { error: err, paramSets: null, route };
|
|
182
212
|
}
|
|
@@ -184,12 +214,10 @@ async function buildTaskQueue(
|
|
|
184
214
|
);
|
|
185
215
|
|
|
186
216
|
for (const result of staticParamsResults) {
|
|
217
|
+
const { pattern } = result.route;
|
|
187
218
|
if ("error" in result) {
|
|
188
|
-
console.error(
|
|
189
|
-
|
|
190
|
-
result.error
|
|
191
|
-
);
|
|
192
|
-
skippedRoutes.push(result.route.pattern);
|
|
219
|
+
console.error(`[furin] static: staticParams() failed for "${pattern}":`, result.error);
|
|
220
|
+
skippedRoutes.push(pattern);
|
|
193
221
|
continue;
|
|
194
222
|
}
|
|
195
223
|
if (result.paramSets === null) {
|
|
@@ -200,12 +228,14 @@ async function buildTaskQueue(
|
|
|
200
228
|
// would throw out of `for...of` and abort the entire build.
|
|
201
229
|
if (!Array.isArray(result.paramSets)) {
|
|
202
230
|
console.error(
|
|
203
|
-
`[furin] static: staticParams() for "${
|
|
231
|
+
`[furin] static: staticParams() for "${pattern}" returned a non-array value; skipping route.`
|
|
204
232
|
);
|
|
205
|
-
skippedRoutes.push(
|
|
233
|
+
skippedRoutes.push(pattern);
|
|
206
234
|
continue;
|
|
207
235
|
}
|
|
208
236
|
for (const params of result.paramSets) {
|
|
237
|
+
const urlPath = resolvePath(pattern, params);
|
|
238
|
+
pathToOutputFile(urlPath, outDir, "index.html");
|
|
209
239
|
tasks.push(() =>
|
|
210
240
|
prerenderAndWrite(
|
|
211
241
|
result.route,
|
|
@@ -243,6 +273,24 @@ async function runWithConcurrency(
|
|
|
243
273
|
|
|
244
274
|
// ── Main adapter ──────────────────────────────────────────────────────────────
|
|
245
275
|
|
|
276
|
+
function assertNoRequestLoaders(routes: ResolvedRoute[], root: RootLayout): void {
|
|
277
|
+
const offenders: string[] = [];
|
|
278
|
+
if (root.route.requestLoader !== undefined) {
|
|
279
|
+
offenders.push(" • <root layout>");
|
|
280
|
+
}
|
|
281
|
+
const requestScopedRoutes = routes.filter((route) =>
|
|
282
|
+
route.routeChain.some((entry) => entry.requestLoader !== undefined)
|
|
283
|
+
);
|
|
284
|
+
offenders.push(...requestScopedRoutes.map((route) => ` • ${route.pattern}`));
|
|
285
|
+
if (offenders.length === 0) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
throw new Error(
|
|
289
|
+
"[furin] requestLoader requires a Bun server and is incompatible with a pure static export.\n" +
|
|
290
|
+
offenders.join("\n")
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
246
294
|
export async function buildStaticTarget(
|
|
247
295
|
routes: ResolvedRoute[],
|
|
248
296
|
rootDir: string,
|
|
@@ -250,6 +298,8 @@ export async function buildStaticTarget(
|
|
|
250
298
|
root: RootLayout,
|
|
251
299
|
options: BuildAppOptions
|
|
252
300
|
): Promise<StaticTargetBuildManifest> {
|
|
301
|
+
assertNoRequestLoaders(routes, root);
|
|
302
|
+
|
|
253
303
|
const staticConfig: StaticExportConfig = options.staticConfig ?? {};
|
|
254
304
|
|
|
255
305
|
// Normalize basePath: treat "" and "/" identically as no prefix; strip any
|
|
@@ -311,7 +361,22 @@ export async function buildStaticTarget(
|
|
|
311
361
|
const ssgRoutes = collectSsgRoutes(routes, onSSR, skippedRoutes);
|
|
312
362
|
const searchRoutes = createSearchRouteMetadata(ssgRoutes);
|
|
313
363
|
|
|
314
|
-
// ── 2.
|
|
364
|
+
// ── 2. Resolve and validate every output path before writing artifacts ────
|
|
365
|
+
const tasks = await buildTaskQueue(
|
|
366
|
+
ssgRoutes,
|
|
367
|
+
root,
|
|
368
|
+
outDir,
|
|
369
|
+
renderedRoutes,
|
|
370
|
+
skippedRoutes,
|
|
371
|
+
basePath,
|
|
372
|
+
searchRoutes
|
|
373
|
+
);
|
|
374
|
+
assertNoStaticExportSkips(onSSR, skippedRoutes);
|
|
375
|
+
// Snapshot after queue-building: routes skipped due to missing staticParams() are
|
|
376
|
+
// already recorded; only routes added during task execution are prerender failures.
|
|
377
|
+
const afterQueueCount = skippedRoutes.length;
|
|
378
|
+
|
|
379
|
+
// ── 3. Clean & create output directories ─────────────────────────────────
|
|
315
380
|
rmSync(outDir, { force: true, recursive: true });
|
|
316
381
|
ensureDir(outDir);
|
|
317
382
|
|
|
@@ -319,71 +384,53 @@ export async function buildStaticTarget(
|
|
|
319
384
|
rmSync(targetDir, { force: true, recursive: true });
|
|
320
385
|
ensureDir(targetDir);
|
|
321
386
|
|
|
322
|
-
// ──
|
|
387
|
+
// ── 4. Build client bundle ────────────────────────────────────────────────
|
|
323
388
|
const { entryChunk, cssChunks } = await buildClient(ssgRoutes, {
|
|
389
|
+
basePath,
|
|
390
|
+
clientLogging: Boolean(options.clientLogging),
|
|
324
391
|
outDir: targetDir,
|
|
325
|
-
|
|
392
|
+
pagesDir: dirname(root.path),
|
|
326
393
|
plugins: options.plugins,
|
|
327
394
|
publicPath,
|
|
328
|
-
|
|
329
|
-
clientLogging: Boolean(options.clientLogging),
|
|
395
|
+
rootLayout: root.path,
|
|
330
396
|
});
|
|
331
397
|
|
|
332
|
-
// ──
|
|
398
|
+
// ── 5. Generate HTML shell template ──────────────────────────────────────
|
|
333
399
|
// Emit a <link rel="icon"> only when a favicon.ico exists in the public dir.
|
|
334
400
|
// This ensures the browser finds it even when the site is served from a sub-path.
|
|
335
401
|
const publicFavicon = join(rootDir, "public", "favicon.ico");
|
|
336
402
|
const faviconHref = existsSync(publicFavicon) ? `${basePath}/favicon.ico` : undefined;
|
|
337
403
|
const shellHtml = generateProdIndexHtml(entryChunk, cssChunks, undefined, faviconHref, true);
|
|
338
404
|
|
|
339
|
-
// ──
|
|
405
|
+
// ── 6. Prime the renderer with the production shell ──────────────────────
|
|
340
406
|
// Must be called before any prerenderSSG invocation.
|
|
341
407
|
// prepareRender() checks getProductionTemplate() first (before IS_DEV), so
|
|
342
408
|
// setting the content here is sufficient — no need to flip IS_DEV globally.
|
|
343
409
|
setProductionTemplateContent(shellHtml);
|
|
344
410
|
|
|
345
|
-
// ──
|
|
411
|
+
// ── 7. Copy public/ → outDir/ ─────────────────────────────────────────────
|
|
346
412
|
const publicSrcDir = join(rootDir, "public");
|
|
347
413
|
if (existsSync(publicSrcDir)) {
|
|
348
414
|
cpSync(publicSrcDir, outDir, { recursive: true });
|
|
349
415
|
}
|
|
350
416
|
|
|
351
|
-
// ──
|
|
417
|
+
// ── 8. Copy _client/ chunks → outDir/_client/ ────────────────────────────
|
|
352
418
|
const clientSrcDir = join(targetDir, "client");
|
|
353
419
|
if (existsSync(clientSrcDir)) {
|
|
354
420
|
cpSync(clientSrcDir, join(outDir, "_client"), { recursive: true });
|
|
355
421
|
}
|
|
356
422
|
|
|
357
|
-
// ──
|
|
358
|
-
const tasks = await buildTaskQueue(
|
|
359
|
-
ssgRoutes,
|
|
360
|
-
root,
|
|
361
|
-
outDir,
|
|
362
|
-
renderedRoutes,
|
|
363
|
-
skippedRoutes,
|
|
364
|
-
basePath,
|
|
365
|
-
searchRoutes
|
|
366
|
-
);
|
|
367
|
-
// Snapshot after queue-building: routes skipped due to missing staticParams() are
|
|
368
|
-
// already recorded; only routes added during task execution are prerender failures.
|
|
369
|
-
const afterQueueCount = skippedRoutes.length;
|
|
423
|
+
// ── 9. Pre-render SSG routes ──────────────────────────────────────────────
|
|
370
424
|
await runWithConcurrency(tasks, STATIC_CONCURRENCY);
|
|
371
425
|
|
|
372
426
|
// Fail the build when onSSR="error" and any prerender task was recorded as skipped.
|
|
373
|
-
|
|
374
|
-
const failed = skippedRoutes.slice(afterQueueCount);
|
|
375
|
-
const list = failed.map((r) => ` • ${r}`).join("\n");
|
|
376
|
-
throw new Error(
|
|
377
|
-
`[furin] static: ${failed.length} route(s) failed to pre-render:\n${list}\n` +
|
|
378
|
-
`Set \`onSSR: "skip"\` in your static config to suppress this error.`
|
|
379
|
-
);
|
|
380
|
-
}
|
|
427
|
+
assertNoPrerenderSkips(onSSR, skippedRoutes, afterQueueCount);
|
|
381
428
|
|
|
382
|
-
// ──
|
|
429
|
+
// ── 10. Write 404.html (SPA fallback for GitHub Pages) ──────────────────
|
|
383
430
|
writeFileSync(join(outDir, "404.html"), shellHtml);
|
|
384
431
|
console.log("[furin] static: wrote 404.html (SPA shell fallback)");
|
|
385
432
|
|
|
386
|
-
// ──
|
|
433
|
+
// ── 11. Clean up intermediate build artifacts ───────────────────────────
|
|
387
434
|
rmSync(targetDir, { force: true, recursive: true });
|
|
388
435
|
|
|
389
436
|
console.log(
|
|
@@ -395,7 +442,7 @@ export async function buildStaticTarget(
|
|
|
395
442
|
basePath,
|
|
396
443
|
generatedAt: new Date().toISOString(),
|
|
397
444
|
outDir: toPosixPath(outDir),
|
|
398
|
-
renderedRoutes,
|
|
399
|
-
skippedRoutes,
|
|
445
|
+
renderedRoutes: sortRouteList(renderedRoutes),
|
|
446
|
+
skippedRoutes: sortRouteList(skippedRoutes),
|
|
400
447
|
};
|
|
401
448
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type BunBuild = typeof Bun.build;
|
|
2
|
+
|
|
3
|
+
type BunBuildGlobal = typeof globalThis & {
|
|
4
|
+
__FURIN_BUN_BUILD_FOR_TESTS?: BunBuild;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export function runBunBuild(config: Bun.BuildConfig): ReturnType<BunBuild> {
|
|
8
|
+
return (((globalThis as BunBuildGlobal).__FURIN_BUN_BUILD_FOR_TESTS ?? Bun.build) as BunBuild)(
|
|
9
|
+
config
|
|
10
|
+
);
|
|
11
|
+
}
|
package/src/build/client.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { basename, join } from "node:path";
|
|
3
3
|
import { transformForClient } from "../plugin/transform-client";
|
|
4
|
-
import
|
|
4
|
+
import { createRoutesPlugin } from "../plugin/routes.ts";
|
|
5
|
+
import { environmentGuardPlugin } from "../rsc/build/environment.ts";
|
|
6
|
+
import { detectLoaderFromPath } from "../server/lang-detect.ts";
|
|
7
|
+
import type { ResolvedRoute } from "../server/router/types.ts";
|
|
8
|
+
import { runBunBuild } from "./bun-build.ts";
|
|
5
9
|
import { generateHydrateEntry } from "./hydrate";
|
|
6
10
|
import { CLIENT_MODULE_PATH, LINK_MODULE_PATH, SEARCH_MODULE_PATH } from "./shared";
|
|
7
11
|
import type { BuildClientOptions, BunBuildAliasConfig } from "./types";
|
|
8
12
|
|
|
9
|
-
const
|
|
13
|
+
const SCRIPT_FILE_FILTER = /\.(tsx?|jsx?)$/;
|
|
10
14
|
|
|
11
15
|
export interface BuildClientResult {
|
|
12
16
|
/** Public paths of all CSS chunks, e.g. `["/_client/chunk-abc.css"]` */
|
|
@@ -33,7 +37,16 @@ export interface BuildClientResult {
|
|
|
33
37
|
*/
|
|
34
38
|
export async function buildClient(
|
|
35
39
|
routes: ResolvedRoute[],
|
|
36
|
-
{
|
|
40
|
+
{
|
|
41
|
+
outDir,
|
|
42
|
+
rootLayout,
|
|
43
|
+
plugins,
|
|
44
|
+
publicPath,
|
|
45
|
+
basePath,
|
|
46
|
+
clientLogging,
|
|
47
|
+
clientDirName,
|
|
48
|
+
pagesDir,
|
|
49
|
+
}: BuildClientOptions
|
|
37
50
|
): Promise<BuildClientResult> {
|
|
38
51
|
// Per-app client dir so several mounted apps build side by side
|
|
39
52
|
// ("client", "client-admin", …) without clobbering each other.
|
|
@@ -59,34 +72,29 @@ export async function buildClient(
|
|
|
59
72
|
const transformPlugin: Bun.BunPlugin = {
|
|
60
73
|
name: "furin-transform-client",
|
|
61
74
|
setup(build) {
|
|
62
|
-
build.onLoad({ filter:
|
|
75
|
+
build.onLoad({ filter: SCRIPT_FILE_FILTER }, async (args) => {
|
|
63
76
|
const { path } = args;
|
|
64
77
|
if (path.includes("node_modules")) {
|
|
65
78
|
return;
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
const code = await Bun.file(path).text();
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.replaceAll(`'furin/search'`, JSON.stringify(SEARCH_MODULE_PATH));
|
|
82
|
+
const result = transformForClient(code, path);
|
|
83
|
+
// transformForClient now emits TS/TSX directly (no pre-transpile),
|
|
84
|
+
// so JSX → React handling is delegated to Bun.build's loader, which
|
|
85
|
+
// applies the project tsconfig's automatic runtime by default.
|
|
86
|
+
const transformed = result.code
|
|
87
|
+
.replaceAll(`"@teyik0/furin/client"`, JSON.stringify(CLIENT_MODULE_PATH))
|
|
88
|
+
.replaceAll(`'furin/client'`, JSON.stringify(CLIENT_MODULE_PATH))
|
|
89
|
+
.replaceAll(`"@teyik0/furin/link"`, JSON.stringify(LINK_MODULE_PATH))
|
|
90
|
+
.replaceAll(`'furin/link'`, JSON.stringify(LINK_MODULE_PATH))
|
|
91
|
+
.replaceAll(`"@teyik0/furin/search"`, JSON.stringify(SEARCH_MODULE_PATH))
|
|
92
|
+
.replaceAll(`'furin/search'`, JSON.stringify(SEARCH_MODULE_PATH));
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
} catch (error) {
|
|
87
|
-
console.error(`[furin] Transform error for ${path}:`, error);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
94
|
+
return {
|
|
95
|
+
contents: transformed,
|
|
96
|
+
loader: detectLoaderFromPath(path),
|
|
97
|
+
};
|
|
90
98
|
});
|
|
91
99
|
},
|
|
92
100
|
};
|
|
@@ -114,7 +122,14 @@ export async function buildClient(
|
|
|
114
122
|
// Overridable via the `publicPath` option (e.g. "/furin/_client/" for basePath builds).
|
|
115
123
|
publicPath,
|
|
116
124
|
// User plugins run before the internal transform so they pre-process files first
|
|
117
|
-
plugins:
|
|
125
|
+
plugins: [
|
|
126
|
+
...(plugins ?? []),
|
|
127
|
+
...(pagesDir
|
|
128
|
+
? [createRoutesPlugin({ instances: [{ pagesDir, prefix: basePath }], target: "client" })]
|
|
129
|
+
: []),
|
|
130
|
+
environmentGuardPlugin("client"),
|
|
131
|
+
transformPlugin,
|
|
132
|
+
],
|
|
118
133
|
alias: {
|
|
119
134
|
"@teyik0/furin/client": CLIENT_MODULE_PATH,
|
|
120
135
|
"@teyik0/furin/link": LINK_MODULE_PATH,
|
|
@@ -125,7 +140,7 @@ export async function buildClient(
|
|
|
125
140
|
},
|
|
126
141
|
};
|
|
127
142
|
|
|
128
|
-
const result = await
|
|
143
|
+
const result = await runBunBuild(clientBuildConfig);
|
|
129
144
|
for (const output of result.outputs) {
|
|
130
145
|
console.log(`[furin] ${output.path} (${(output.size / 1024).toFixed(1)} KB)`);
|
|
131
146
|
}
|
|
@@ -20,10 +20,16 @@ const RUNTIME_ENV_MODULE_PATH = `${_pkgSrcDir}/server/runtime-env${_ext}`;
|
|
|
20
20
|
/** One app's compile context payload — the generated entry can carry several. */
|
|
21
21
|
export interface EntryAppContext {
|
|
22
22
|
buildId?: string;
|
|
23
|
+
/** Whether the emitted hydration client sends browser log batches. */
|
|
24
|
+
clientLogging?: boolean;
|
|
23
25
|
/** Extra lines injected inside this app's `__setCompileContext({...})` call. */
|
|
24
26
|
extraContext?: string[];
|
|
25
27
|
/** Extra import lines this app needs (embedded asset imports). */
|
|
26
28
|
extraImports?: string[];
|
|
29
|
+
/** Additional route modules such as filesystem-derived `_route` layouts. */
|
|
30
|
+
modulePaths?: string[];
|
|
31
|
+
/** Virtual module specifier exporting this app's composed Elysia route tree. */
|
|
32
|
+
nativeRoutes?: string;
|
|
27
33
|
/** Mount prefix baked into the context for runtime lookup (`""` = root). */
|
|
28
34
|
prefix?: string;
|
|
29
35
|
rootConventions?: { errorPath?: string; notFoundPath?: string };
|
|
@@ -110,9 +116,12 @@ function buildAppContextBlock(
|
|
|
110
116
|
varPrefix: string
|
|
111
117
|
): { contextLines: string[]; importLines: string[] } {
|
|
112
118
|
const allModulePaths = [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
...new Set([
|
|
120
|
+
app.rootPath,
|
|
121
|
+
...app.routes.map((r) => r.path),
|
|
122
|
+
...(app.modulePaths ?? []),
|
|
123
|
+
...collectConventionPaths(app.rootConventions, app.routeMetadata),
|
|
124
|
+
]),
|
|
116
125
|
];
|
|
117
126
|
const importLines: string[] = [];
|
|
118
127
|
const moduleEntries: string[] = [];
|
|
@@ -123,6 +132,12 @@ function buildAppContextBlock(
|
|
|
123
132
|
importLines.push(`import * as ${varName} from ${JSON.stringify(absPath)};`);
|
|
124
133
|
moduleEntries.push(` ${JSON.stringify(absPath)}: ${varName},`);
|
|
125
134
|
}
|
|
135
|
+
const nativeRoutesVar = `${varPrefix}furinApp`;
|
|
136
|
+
if (app.nativeRoutes) {
|
|
137
|
+
importLines.push(
|
|
138
|
+
`import { furinApp as ${nativeRoutesVar} } from ${JSON.stringify(app.nativeRoutes)};`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
126
141
|
|
|
127
142
|
const routeEntries = app.routes.map(
|
|
128
143
|
(r) =>
|
|
@@ -140,8 +155,10 @@ function buildAppContextBlock(
|
|
|
140
155
|
const contextLines = [
|
|
141
156
|
"__setCompileContext({",
|
|
142
157
|
` buildId: ${JSON.stringify(app.buildId ?? "")},`,
|
|
158
|
+
` clientLogging: ${JSON.stringify(app.clientLogging ?? false)},`,
|
|
143
159
|
` prefix: ${JSON.stringify(app.prefix ?? "")},`,
|
|
144
160
|
` rootPath: ${JSON.stringify(app.rootPath.replace(/\\/g, "/"))},`,
|
|
161
|
+
app.nativeRoutes ? ` nativeRoutes: ${nativeRoutesVar},` : "",
|
|
145
162
|
rootConventionsLine,
|
|
146
163
|
" modules: {",
|
|
147
164
|
...moduleEntries,
|