From 9f2d67b13e6a8923f03bc383368a41cc7b8a7f65 Mon Sep 17 00:00:00 2001 From: dylan <> Date: Tue, 26 Mar 2024 00:55:55 -0700 Subject: [PATCH] cli arg order --- src/server/api/release.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/api/release.ts b/src/server/api/release.ts index 6b3d30e..f689eac 100644 --- a/src/server/api/release.ts +++ b/src/server/api/release.ts @@ -45,10 +45,10 @@ const handler = async ({payload}: FirRouteInput) => { }); console.log("cloned"); console.log("read local manifest"); - await execa(picoBinPath, ["-export", path.join(repoPath, "result.html"), path.join(repoPath, manifest.main)]); - await execa(picoBinPath, ["-export", path.join(repoPath, "result.png"), path.join(repoPath, manifest.main)]); + await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.js")]); + await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.png")]); const js = await fs.promises.readFile(path.join(repoPath, "result.js"), "utf8"); - const png = new Buffer(await fs.promises.readFile(path.join(repoPath, "result.png"))).toString("base64"); + const png = Buffer.from(await fs.promises.readFile(path.join(repoPath, "result.png"))).toString("base64"); fs.promises.rm(repoPath, {recursive: true, force: true}); console.log({ manifest,