Skip to content

Commit 050102c

Browse files
committed
feat: enhance types
1 parent 827ba0f commit 050102c

3 files changed

Lines changed: 164 additions & 25 deletions

File tree

packages/thumbnail/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
"./integration": "./src/integration.ts"
99
},
1010
"dependencies": {
11-
"satori": "^0.12.0",
1211
"@resvg/resvg-js": "^2.6.0",
1312
"culori": "^4.0.0",
14-
"gray-matter": "^4.0.3"
13+
"gray-matter": "^4.0.3",
14+
"satori": "^0.12.0"
1515
},
1616
"peerDependencies": {
1717
"astro": "^5.0.0",
1818
"react": "^19.0.0"
19+
},
20+
"devDependencies": {
21+
"@types/node": "^25.5.0"
1922
}
2023
}

packages/thumbnail/src/integration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { readFile, readdir } from 'node:fs/promises'
2-
import { join, relative } from 'node:path'
31
import type { AstroIntegration } from 'astro'
42
import matter from 'gray-matter'
3+
import { readFile, readdir } from 'node:fs/promises'
4+
import { join } from 'node:path'
55
import { generateThumbnail } from './generator'
66
import { renderThumbnail, renderThumbnailToFile } from './renderer'
77

@@ -111,7 +111,7 @@ export function thumbnailIntegration(config: ThumbnailConfig): AstroIntegration
111111
}
112112

113113
try {
114-
const { headline, title, description } = await resolvePageMeta(
114+
const { headline, title, description } = resolvePageMeta(
115115
config,
116116
req.url,
117117
await getContentIndex(),

pnpm-lock.yaml

Lines changed: 156 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)