1 | export declare const CACHE_DIR = ".microsite/cache";
|
2 | export declare const STAGING_DIR = ".microsite/staging";
|
3 | export declare const SSR_DIR = ".microsite/ssr";
|
4 | export declare const OUT_DIR = "./dist";
|
5 | export interface ManifestEntry {
|
6 | name: string;
|
7 | hydrateStyleBindings: string[] | null;
|
8 | hydrateBindings: Record<string, string[]> | null;
|
9 | }
|
10 | export interface RouteDataEntry {
|
11 | name: string;
|
12 | route: string;
|
13 | props: Record<string, object>;
|
14 | }
|
15 | export declare const getFileNameFromPath: (path: string) => string;
|
16 | export declare const proxyImportTransformer: {
|
17 | filter: (source: string) => boolean;
|
18 | transform: (source: string) => string;
|
19 | };
|
20 | export declare const preactImportTransformer: {
|
21 | filter: (source: string) => boolean;
|
22 | transform: (source: string) => string;
|
23 | };
|
24 | export declare const preactToCDN: (code: string) => string;
|
25 | export declare const withHydrateTransformer: {
|
26 | filter: (source: string) => boolean;
|
27 | transform: (source: string) => string;
|
28 | };
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | export declare const stripWithHydrate: (source: string) => string;
|
35 | export declare const hashContentSync: (content: string, len?: number) => string;
|
36 | export declare const emitFile: (filename: string, content: string | Uint8Array) => Promise<void>;
|
37 | export declare const emitFinalAsset: (filename: string, content: string | Uint8Array) => Promise<void>;
|
38 | export declare const copyAssetToFinal: (path: string, transform?: (source: string) => Promise<string>) => Promise<void>;
|
39 | export declare const renderPage: (data: RouteDataEntry | null, manifest: ManifestEntry, { debug, hasGlobalScript }?: {
|
40 | debug?: boolean;
|
41 | hasGlobalScript?: boolean;
|
42 | }) => Promise<{
|
43 | name: string;
|
44 | contents: string;
|
45 | }>;
|
46 | export declare const importDataMethods: (path: string) => Promise<DataHandlers>;
|
47 | interface DataHandlers {
|
48 | getStaticPaths?: (ctx?: any) => any;
|
49 | getStaticProps?: (ctx?: any) => any;
|
50 | }
|
51 | export declare function applyDataMethods(fileName: string, handlers: DataHandlers): Promise<RouteDataEntry[]>;
|
52 | export {};
|