Formatting
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user