@teyik0/furin 0.9.0-alpha.1 → 0.9.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/runtime-build.d.ts +7 -3
- package/dist/adapter/vercel.js +31 -6
- package/dist/build/client.d.ts +1 -1
- package/dist/build/entry-template.d.ts +3 -12
- package/dist/build/entry-template.ts +3 -15
- package/dist/build/hydrate.d.ts +6 -1
- package/dist/build/index.d.ts +1 -1
- package/dist/build/index.js +565 -401
- package/dist/build/route-metadata.d.ts +2 -2
- package/dist/build/route-types.d.ts +1 -1
- package/dist/build/types.d.ts +10 -4
- package/dist/cli/index.js +594 -422
- package/dist/client/chunks/{client-xy6g38kx.js → client-a7spxfnn.js} +24 -5
- package/dist/client/chunks/{client-rjhxgt64.js → client-d9v49jwz.js} +1 -1
- package/dist/client/chunks/{client-k29262a4.js → client-rdxyrw11.js} +1 -1
- package/dist/client/define-route.d.ts +14 -0
- package/dist/client/internal/runtime-types.d.ts +8 -0
- package/dist/client/link.js +3 -3
- package/dist/client/router/link-utils.d.ts +3 -2
- package/dist/client/router/search/index.js +2 -2
- package/dist/client/router/types.d.ts +9 -3
- package/dist/client.js +22 -6
- package/dist/config.d.ts +4 -0
- package/dist/config.js +4 -1
- package/dist/define-route.d.ts +53 -12
- package/dist/furin.d.ts +13 -3
- package/dist/furin.js +766 -614
- package/dist/plugin/route-config.d.ts +3 -3
- package/dist/plugin/route-manifest.d.ts +46 -0
- package/dist/plugin/route-tree.d.ts +13 -29
- package/dist/routes.d.ts +2 -2
- package/dist/server/dev/runtime.d.ts +2 -1
- package/dist/server/internal.d.ts +6 -0
- package/dist/server/internal.js +57 -76
- package/dist/server/registrations.d.ts +4 -2
- package/dist/server/router/defined-route.d.ts +4 -0
- package/dist/server/router/discovery.d.ts +14 -4
- package/dist/server/router/hmr.d.ts +12 -12
- package/dist/server/router/patterns.d.ts +4 -12
- package/dist/server/router/types.d.ts +16 -1
- package/dist/server/static-export.js +88 -120
- package/dist/server/sync/drizzle/index.d.ts +8 -10
- package/dist/shared/route-specificity.d.ts +10 -1
- package/package.json +3 -6
- package/src/adapter/package.ts +11 -37
- package/src/adapter/runtime-build.ts +5 -4
- package/src/adapter/static.ts +1 -1
- package/src/adapter/vercel.ts +2 -1
- package/src/build/client.ts +3 -3
- package/src/build/discover-pages-process.ts +1 -1
- package/src/build/elysia-aot.ts +2 -2
- package/src/build/entry-template.ts +3 -15
- package/src/build/hydrate.ts +12 -6
- package/src/build/index.ts +19 -9
- package/src/build/route-metadata.ts +15 -8
- package/src/build/route-types.ts +18 -43
- package/src/build/types.ts +12 -5
- package/src/cli/config.ts +6 -0
- package/src/cli/index.ts +30 -14
- package/src/client/define-route.ts +29 -4
- package/src/client/internal/runtime-types.ts +8 -0
- package/src/client/router/link-utils.ts +16 -8
- package/src/client/router/types.ts +40 -14
- package/src/config.ts +5 -0
- package/src/define-route.ts +85 -16
- package/src/furin.ts +31 -7
- package/src/plugin/dev-routes.ts +8 -17
- package/src/plugin/route-config.ts +77 -62
- package/src/plugin/route-manifest.ts +437 -0
- package/src/plugin/route-modules.ts +6 -1
- package/src/plugin/route-registry.ts +7 -21
- package/src/plugin/route-tree.ts +71 -181
- package/src/routes.ts +2 -2
- package/src/server/dev/runtime.ts +16 -22
- package/src/server/internal.ts +4 -1
- package/src/server/registrations.ts +5 -2
- package/src/server/render/static-params.ts +2 -10
- package/src/server/router/defined-route.ts +8 -0
- package/src/server/router/discovery.ts +237 -196
- package/src/server/router/hmr.ts +45 -63
- package/src/server/router/patterns.ts +41 -117
- package/src/server/router/types.ts +17 -1
- package/src/server/sync/drizzle/index.ts +18 -19
- package/src/shared/route-specificity.ts +34 -2
- package/src/shared/utils/index.ts +1 -1
|
@@ -12,13 +12,13 @@ interface RouteBuildInfo {
|
|
|
12
12
|
searchDefaults: SearchParamsInput | undefined;
|
|
13
13
|
}
|
|
14
14
|
/** Discovery results contain data only; application closures stay in the child. */
|
|
15
|
-
export interface BuildRoute extends Pick<ResolvedRoute, "mode" | "path" | "pattern" | "requestKeys" | "requestKeysByLoader" | "tags"> {
|
|
15
|
+
export interface BuildRoute extends Pick<ResolvedRoute, "layouts" | "mode" | "path" | "pattern" | "requestKeys" | "requestKeysByLoader" | "tags"> {
|
|
16
16
|
build: RouteBuildInfo;
|
|
17
17
|
routeChain: {
|
|
18
18
|
layout: boolean;
|
|
19
19
|
sourcePath?: string;
|
|
20
20
|
}[];
|
|
21
|
-
segmentBoundaries: Pick<SegmentBoundary, "depth" | "path" | "errorPath" | "notFoundPath">[];
|
|
21
|
+
segmentBoundaries: Pick<SegmentBoundary, "depth" | "path" | "errorPath" | "fromRoute" | "notFoundPath">[];
|
|
22
22
|
}
|
|
23
23
|
export type BuildRouteInput = BuildRoute | ResolvedRoute;
|
|
24
24
|
export type BuildRoot = Pick<RootLayout, "path" | "errorPath" | "notFoundPath"> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RouteInstanceSpec } from "../plugin/route-
|
|
1
|
+
import { type RouteInstanceSpec } from "../plugin/route-manifest.ts";
|
|
2
2
|
import type { ResolvedRoute } from "../server/router/types.ts";
|
|
3
3
|
/**
|
|
4
4
|
* @internal Exported for framework build and focused contract tests. `routes`
|
package/dist/build/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AdapterTargetManifest } from "../adapter/types.ts";
|
|
2
2
|
import type { FurinTarget, StaticExportConfig } from "../config";
|
|
3
|
+
import type { RouteStyle } from "../plugin/route-manifest.ts";
|
|
3
4
|
import type { RouteRegistrySnapshot } from "../plugin/route-registry.ts";
|
|
4
5
|
import type { ResolvedRoute } from "../server/router/types.ts";
|
|
5
6
|
import type { ClientBoundary } from "../rsc/build/discover.ts";
|
|
@@ -26,7 +27,11 @@ export interface BuildClientOptions {
|
|
|
26
27
|
/** Package barrels Bun should parse on demand instead of loading in full. */
|
|
27
28
|
optimizeImports?: string[];
|
|
28
29
|
outDir: string;
|
|
29
|
-
|
|
30
|
+
/** The app whose route registry the client bundle embeds. */
|
|
31
|
+
pages?: {
|
|
32
|
+
pagesDir: string;
|
|
33
|
+
style: RouteStyle;
|
|
34
|
+
};
|
|
30
35
|
plugins?: Bun.BunPlugin[];
|
|
31
36
|
/** Record route chunks in the preload manifest. Defaults to true. */
|
|
32
37
|
preloadRouteChunks?: boolean;
|
|
@@ -72,6 +77,7 @@ interface BuildAppSpec {
|
|
|
72
77
|
pagesDir: string;
|
|
73
78
|
/** Mount prefix (`""` or absent = root). */
|
|
74
79
|
prefix?: string;
|
|
80
|
+
style: RouteStyle;
|
|
75
81
|
}
|
|
76
82
|
export interface BuildManifest {
|
|
77
83
|
/** Every mounted app built into this artifact (multi-instance). */
|
|
@@ -79,6 +85,7 @@ export interface BuildManifest {
|
|
|
79
85
|
pagesDir: string;
|
|
80
86
|
prefix: string;
|
|
81
87
|
routes: BuildRouteManifestEntry[];
|
|
88
|
+
style: RouteStyle;
|
|
82
89
|
}>;
|
|
83
90
|
generatedAt: string;
|
|
84
91
|
pagesDir: string;
|
|
@@ -100,8 +107,8 @@ export interface BuildAppOptions {
|
|
|
100
107
|
output?: "app" | "server";
|
|
101
108
|
};
|
|
102
109
|
/**
|
|
103
|
-
* Explicit multi-app build (furin.config.ts `apps`). Overrides
|
|
104
|
-
*
|
|
110
|
+
* Explicit multi-app build (furin.config.ts `apps`). Overrides the mounts
|
|
111
|
+
* found by evaluating the server entry.
|
|
105
112
|
*/
|
|
106
113
|
apps?: BuildAppSpec[];
|
|
107
114
|
/** Inject the evlog client logger into the hydrate entry. Defaults to false. */
|
|
@@ -109,7 +116,6 @@ export interface BuildAppOptions {
|
|
|
109
116
|
compile?: "server" | "embed";
|
|
110
117
|
/** Package barrels Bun should parse on demand in production client bundles. */
|
|
111
118
|
optimizeImports?: string[];
|
|
112
|
-
pagesDir?: string;
|
|
113
119
|
plugins?: Bun.BunPlugin[];
|
|
114
120
|
/** Module preloading (furin.config.ts `preload`). */
|
|
115
121
|
preload?: {
|