@teyik0/furin 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
@@ -1,9 +1,21 @@
1
- import type { BuildTarget } from "../config";
1
+ import type { BuildTarget, StaticExportConfig } from "../config";
2
2
  import type { ResolvedRoute } from "../router";
3
3
  export interface BuildClientOptions {
4
+ /**
5
+ * Sub-path prefix for the deployment (e.g. "/furin" for GitHub Pages).
6
+ * Passed through to the generated hydrate entry so SPA navigation uses
7
+ * correct physical URLs. Pass "" for root deployments.
8
+ */
9
+ basePath: string;
4
10
  outDir: string;
5
11
  pagesDir?: string;
6
12
  plugins?: Bun.BunPlugin[];
13
+ /**
14
+ * Public path prefix for all emitted JS/CSS chunks.
15
+ * Pass "/_client/" for root deployments; override for basePath deployments,
16
+ * e.g. "/furin/_client/".
17
+ */
18
+ publicPath: string;
7
19
  rootLayout: string;
8
20
  }
9
21
  export interface BuildRouteManifestEntry {
@@ -23,6 +35,7 @@ export interface TargetBuildManifest {
23
35
  targetDir: string;
24
36
  templatePath: string | null;
25
37
  }
38
+ export type AnyTargetManifest = TargetBuildManifest | StaticTargetBuildManifest;
26
39
  export interface BuildManifest {
27
40
  generatedAt: string;
28
41
  pagesDir: string;
@@ -30,7 +43,7 @@ export interface BuildManifest {
30
43
  rootPath: string;
31
44
  routes: BuildRouteManifestEntry[];
32
45
  serverEntry: string | null;
33
- targets: Partial<Record<BuildTarget, TargetBuildManifest>>;
46
+ targets: Partial<Record<BuildTarget, AnyTargetManifest>>;
34
47
  version: 1;
35
48
  }
36
49
  export interface BuildAppOptions {
@@ -39,11 +52,21 @@ export interface BuildAppOptions {
39
52
  plugins?: Bun.BunPlugin[];
40
53
  rootDir?: string;
41
54
  serverEntry?: string;
55
+ /** Configuration for the `static` build target. */
56
+ staticConfig?: StaticExportConfig;
42
57
  target: BuildTarget | "all";
43
58
  }
59
+ /** Build manifest entry produced by the `static` adapter. */
60
+ export interface StaticTargetBuildManifest {
61
+ basePath: string;
62
+ generatedAt: string;
63
+ outDir: string;
64
+ renderedRoutes: string[];
65
+ skippedRoutes: string[];
66
+ }
44
67
  export interface BuildAppResult {
45
68
  manifest: BuildManifest;
46
- targets: Partial<Record<BuildTarget, TargetBuildManifest>>;
69
+ targets: Partial<Record<BuildTarget, AnyTargetManifest>>;
47
70
  }
48
71
  export type BunBuildAliasConfig = Bun.BuildConfig & {
49
72
  alias?: Record<string, string>;