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