mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
4146d69021
* fix(cloudflare): revalidate stale warmup retries * fix(cloudflare): report CDN warmup retry progress * test(cloudflare): retry prewarm verification on fresh Worker * feat(cloudflare): configure CDN readiness probes * fix(cloudflare): validate CDN warmup version overrides * fix(cloudflare): verify CDN warmup version ids * test(cloudflare): opt into dangerous warmup fallback * fix(cloudflare): harden warmup version validation * docs(cloudflare): clarify version binding environments
20 lines
748 B
TypeScript
20 lines
748 B
TypeScript
import fs from "node:fs";
|
|
|
|
export function readAppRouterEntrySource(): string {
|
|
const sourceUrl = new URL("../packages/vinext/src/server/app-router-entry.ts", import.meta.url);
|
|
if (fs.existsSync(sourceUrl)) return fs.readFileSync(sourceUrl, "utf-8");
|
|
return fs.readFileSync(
|
|
new URL("../packages/vinext/src/server/app-router-entry.js", import.meta.url),
|
|
"utf-8",
|
|
);
|
|
}
|
|
|
|
export function readPagesRouterEntrySource(): string {
|
|
const sourceUrl = new URL("../packages/vinext/src/server/pages-router-entry.ts", import.meta.url);
|
|
if (fs.existsSync(sourceUrl)) return fs.readFileSync(sourceUrl, "utf-8");
|
|
return fs.readFileSync(
|
|
new URL("../packages/vinext/src/server/pages-router-entry.js", import.meta.url),
|
|
"utf-8",
|
|
);
|
|
}
|