From d6ae5a3ec0bdba8763ddbf6c65d590f0b488a93d Mon Sep 17 00:00:00 2001 From: dylan <> Date: Tue, 26 Mar 2024 01:04:57 -0700 Subject: [PATCH] start some logging --- src/server/api/release.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/server/api/release.ts b/src/server/api/release.ts index f689eac..5f4aa63 100644 --- a/src/server/api/release.ts +++ b/src/server/api/release.ts @@ -45,15 +45,17 @@ const handler = async ({payload}: FirRouteInput) => { }); console.log("cloned"); console.log("read local manifest"); + console.log("pico exists: ", fs.existsSync(picoBinPath)); + console.log("main exists: ", 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")]); + // 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 = Buffer.from(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, js, - png, + // png, }); return true; };