chore: extract fs extractor code (#1972)

This commit is contained in:
Marvin Hagemeister
2023-10-23 12:41:45 +02:00
committed by GitHub
parent cd4a3344a9
commit 20fdd7e16c
8 changed files with 681 additions and 702 deletions
+14 -1
View File
@@ -122,7 +122,7 @@ export interface ResolvedFreshConfig {
outDir: string;
target: string | string[];
};
render?: RenderFunction;
render: RenderFunction;
plugins: Plugin[];
staticDir: string;
router?: RouterOptions;
@@ -180,6 +180,19 @@ export interface PageProps<T = any, S = Record<string, unknown>> {
state: S;
}
export interface StaticFile {
/** The URL to the static file on disk. */
localUrl: URL;
/** The path to the file as it would be in the incoming request. */
path: string;
/** The size of the file. */
size: number;
/** The content-type of the file. */
contentType: string;
/** Hash of the file contents. */
etag: string;
}
/**
* Context passed to async route components.
*/