diff --git a/public/og/components/draw-a-line.png b/public/og/components/draw-a-line.png index db4d437..0ecd347 100644 Binary files a/public/og/components/draw-a-line.png and b/public/og/components/draw-a-line.png differ diff --git a/public/og/components/scroll-deck.png b/public/og/components/scroll-deck.png index 26fc851..b8e3b1d 100644 Binary files a/public/og/components/scroll-deck.png and b/public/og/components/scroll-deck.png differ diff --git a/public/og/components/split-footer.png b/public/og/components/split-footer.png index 18c7def..f9a7bda 100644 Binary files a/public/og/components/split-footer.png and b/public/og/components/split-footer.png differ diff --git a/scripts/capture-component-og.ts b/scripts/capture-component-og.ts index 6767f74..d13822e 100644 --- a/scripts/capture-component-og.ts +++ b/scripts/capture-component-og.ts @@ -120,9 +120,18 @@ async function main() { writeFileSync(manifest, next); console.log(`Updated shared/component-og.ts for ${slugs.length} component${slugs.length === 1 ? "" : "s"}.`); } finally { - chrome?.kill(); + // Let Chrome finish shutting down before removing its profile; it keeps writing to it as it exits. + if (chrome && chrome.exitCode === null) { + const exited = new Promise((resolve) => chrome!.once("exit", resolve)); + chrome.kill(); + await Promise.race([exited, sleep(5000)]); + } await server.close(); - rmSync(profile, { recursive: true, force: true }); + try { + rmSync(profile, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 }); + } catch { + console.warn(`Couldn't remove the temporary Chrome profile at ${profile}; it's safe to delete.`); + } } } diff --git a/shared/component-og.ts b/shared/component-og.ts index 09d8404..f6b73a6 100644 --- a/shared/component-og.ts +++ b/shared/component-og.ts @@ -1,11 +1,11 @@ /** - * Generated by `corepack pnpm og:components` (scripts/capture-component-og.mjs); don't edit by hand. + * Generated by `corepack pnpm og:components` (scripts/capture-component-og.ts); don't edit by hand. * A short hash of each component's captured share image in public/og/components/.png. * A component missing here falls back to the text share card. */ export const COMPONENT_SCREENSHOTS: Readonly> = { - "draw-a-line": "5f6f7c73f72e", + "draw-a-line": "2456b737927e", "icon-folder": "80795b77f245", - "scroll-deck": "ac2dc0bb8e66", - "split-footer": "ec3484432bb0", + "scroll-deck": "a7356e7e1290", + "split-footer": "1d918ab6b517", };