Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified public/og/components/draw-a-line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/og/components/scroll-deck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/og/components/split-footer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions scripts/capture-component-og.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions shared/component-og.ts
Original file line number Diff line number Diff line change
@@ -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/<slug>.png.
* A component missing here falls back to the text share card.
*/
export const COMPONENT_SCREENSHOTS: Readonly<Record<string, string>> = {
"draw-a-line": "5f6f7c73f72e",
"draw-a-line": "2456b737927e",
"icon-folder": "80795b77f245",
"scroll-deck": "ac2dc0bb8e66",
"split-footer": "ec3484432bb0",
"scroll-deck": "a7356e7e1290",
"split-footer": "1d918ab6b517",
};
Loading