refactor: make App.prototype.handler() sync (#2906)

This commit is contained in:
Tim Reichen
2025-05-12 10:12:50 +02:00
committed by GitHub
parent 9605cd81b5
commit 1cfb4bc876
13 changed files with 49 additions and 48 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ export interface BuildCache {
}
export class ProdBuildCache implements BuildCache {
static async fromSnapshot(config: ResolvedFreshConfig, islandCount: number) {
static fromSnapshot(config: ResolvedFreshConfig, islandCount: number) {
const snapshotPath = getSnapshotPath(config);
const staticFiles = new Map<string, FileSnapshot>();
@@ -37,7 +37,7 @@ export class ProdBuildCache implements BuildCache {
let hasSnapshot = false;
try {
const content = await Deno.readTextFile(snapshotPath);
const content = Deno.readTextFileSync(snapshotPath);
const snapshot = JSON.parse(content) as BuildSnapshot;
hasSnapshot = true;
setBuildId(snapshot.buildId);