Fix build

This commit is contained in:
Pieter Vander Vennet 2024-08-11 20:13:04 +02:00
parent 081a6dbb79
commit c03a27aa0f

View file

@ -172,6 +172,11 @@ export default class ScriptUtils {
headers?: any,
timeoutSecs?: number
): Promise<{ content: string } | { redirect: string } | "timeout"> {
if(url.startsWith("./")){
return Promise.resolve({content: readFileSync(url, "utf8")})
}
const requestPromise = new Promise((resolve, reject) => {
try {
headers = headers ?? {}