Formatting

This commit is contained in:
2026-06-01 12:36:55 +02:00
parent b30243f674
commit c7e1d69e2d
37 changed files with 2187 additions and 1925 deletions
+7 -8
View File
@@ -71,12 +71,7 @@ function resolveTemplateModuleLoaderPath(): string {
}
/** TypeScript extensions that require tsx to evaluate the template module. */
const TYPESCRIPT_TEMPLATE_EXTENSIONS = new Set([
".ts",
".tsx",
".mts",
".cts",
]);
const TYPESCRIPT_TEMPLATE_EXTENSIONS = new Set([".ts", ".tsx", ".mts", ".cts"]);
/**
* Loads a TS/JS template module in an isolated child process.
@@ -155,7 +150,9 @@ async function loadTemplateModuleViaChildProcess(
}
if (stdout.trim().length === 0) {
reject(new TemplateLoadError("Template module loader returned no output."));
reject(
new TemplateLoadError("Template module loader returned no output."),
);
return;
}
@@ -174,7 +171,9 @@ export async function loadTemplateFromFile(filePath: string): Promise<string> {
const absolutePath = path.resolve(filePath);
if (!fs.existsSync(absolutePath)) {
throw new TemplateLoadError(`Template file does not exist: ${absolutePath}`);
throw new TemplateLoadError(
`Template file does not exist: ${absolutePath}`,
);
}
const extension = path.extname(absolutePath).toLowerCase();