this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

use a readable stream instead of an uint8array

pomdtr 6bf8205e 23be1d8f

+6 -5
+3 -3
example/email/main.ts
··· 2 2 import PostalMime from "npm:postal-mime@2.4.3" 3 3 4 4 export default { 5 - async email(msg: Uint8Array) { 5 + async email(data: ReadableStream) { 6 6 await ensureDir("./data") 7 7 8 - const email = await PostalMime.parse(msg); 9 - await Deno.writeTextFile(`./data/email.json`, JSON.stringify(email, null, 2)); 8 + const msg = await PostalMime.parse(data); 9 + await Deno.writeTextFile(`./data/email.json`, JSON.stringify(msg, null, 2)); 10 10 } 11 11 }
+3 -2
worker/sandbox.ts
··· 176 176 Deno.exit(1); 177 177 } 178 178 179 - const msg = decodeBase64(payload.msg) 180 - await handler.email(msg) 179 + const data = decodeBase64(payload.msg) 180 + const blob = new Blob([data]); 181 + await handler.email(blob.stream()); 181 182 } else { 182 183 console.error("Unknown command: ", payload.command); 183 184 Deno.exit(1);