This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/capture.ts | |
| async function captureScreenshot(page, options) { | |
| const { caption = "", fullPage = false, store } = options; | |
| const buffer = await page.screenshot({ fullPage }); | |
| const uuid = crypto.randomUUID(); | |
| await store.upload(buffer, uuid, caption); | |
| } | |
| // src/stores/loki.ts | |
| import encoding from "k6/encoding"; |