-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
42 lines (36 loc) · 1.06 KB
/
index.d.ts
File metadata and controls
42 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
export interface AdapterOptions {
/**
* Input directory containing the static files
* @default 'dist' | 'build' | 'out' | 'public' (auto-detected)
*/
input?: string;
/**
* Output directory for the OpenWorkers build
* @default 'dist-openworkers'
*/
out?: string;
/**
* Routing mode for serving files without extensions
* - 'directory': /page -> /page/index.html
* - 'flat': /page -> /page.html
* @default auto-detected based on file structure
*/
mode?: 'directory' | 'flat';
/**
* SPA fallback file path (e.g., '/index.html' or '/200.html')
* When set, this file is served for all routes that don't match a file
* @default undefined (no fallback, returns 404)
*/
fallback?: string;
/**
* Glob patterns for immutable assets (hashed filenames)
* These files get long cache headers
* @default auto-detected (/_app/immutable/**, /assets/**, etc.)
*/
immutable?: string[];
}
/**
* Build static site for OpenWorkers
*/
export function adapt(options?: AdapterOptions): Promise<void>;
export default adapt;