diff --git a/src/processScript/transform.ts b/src/processScript/transform.ts index f0cce77..5e403da 100644 --- a/src/processScript/transform.ts +++ b/src/processScript/transform.ts @@ -32,7 +32,8 @@ export function transform( file: File, sourceCode: string, { uniqueId = `00000000000`, scriptUser, scriptName, seclevel = 4 }: TransformOptions -) { +): { file: File; seclevel: number, warnings: { message: string }[] } { + const warnings: { message: string }[] = [] const topFunctionName = `_${uniqueId}_SCRIPT_` let program!: NodePath diff --git a/src/push.ts b/src/push.ts index f2d22ce..bb2f667 100644 --- a/src/push.ts +++ b/src/push.ts @@ -54,7 +54,7 @@ export async function push( sourcePath: string, hackmudPath: string, { scripts = [ `*.*` ], onPush = () => {}, minify = true, mangleNames = false, forceQuineCheats }: PushOptions = {} -) { +): Promise { const [ sourceFolder, hackmudFolder ] = await Promise.all([ readDirectoryWithStats(sourcePath).catch(error => { if (error && (error as NodeJS.ErrnoException).code == "ENOENT")