nuxt-og-image 6.7.8 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/tw4.mjs +2 -2
- package/dist/chunks/uno.mjs +4 -4
- package/dist/cli.mjs +1 -1
- package/dist/devtools/nuxt.config.ts +4 -1
- package/dist/module.d.mts +10 -0
- package/dist/module.d.ts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/app/client-utils.js +4 -3
- package/dist/runtime/app/utils.js +3 -2
- package/dist/runtime/server/nitro.d.ts +9 -0
- package/dist/runtime/server/nitro.js +10 -0
- package/dist/runtime/server/og-image/bindings/fetch/node.d.ts +2 -0
- package/dist/runtime/server/og-image/bindings/fetch/node.js +42 -0
- package/dist/runtime/server/og-image/bindings/fetch/web.d.ts +7 -0
- package/dist/runtime/server/og-image/bindings/fetch/web.js +3 -0
- package/dist/runtime/server/og-image/bindings/font-assets/external-url.d.ts +0 -11
- package/dist/runtime/server/og-image/bindings/font-assets/external-url.js +2 -19
- package/dist/runtime/server/og-image/bindings/satori/harfbuzz.d.ts +4 -0
- package/dist/runtime/server/og-image/bindings/satori/harfbuzz.js +33 -0
- package/dist/runtime/server/og-image/browser/screenshot.js +4 -1
- package/dist/runtime/server/og-image/context.js +9 -1
- package/dist/runtime/server/og-image/font-subsets.d.ts +3 -11
- package/dist/runtime/server/og-image/font-subsets.js +50 -27
- package/dist/runtime/server/og-image/fonts.d.ts +1 -1
- package/dist/runtime/server/routes/resolve.js +2 -2
- package/dist/runtime/server/util/cloudflare.js +2 -2
- package/dist/runtime/server/util/eventHandlers.js +3 -3
- package/dist/runtime/server/util/ssrf.d.ts +31 -0
- package/dist/runtime/server/util/ssrf.js +64 -5
- package/dist/runtime/server/utils.d.ts +1 -1
- package/dist/runtime/server/utils.js +3 -3
- package/dist/runtime/shared.d.ts +10 -1
- package/dist/runtime/shared.js +2 -2
- package/dist/runtime/types.d.ts +5 -1
- package/dist/shared/{nuxt-og-image.BMHzg1Vz.mjs → nuxt-og-image.CTD0ZPNd.mjs} +634 -468
- package/package.json +70 -66
- package/types/virtual.d.ts +26 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.9.0",
|
|
5
5
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -53,15 +53,15 @@
|
|
|
53
53
|
"@takumi-rs/core": "^1.0.0-beta.3 || ^2.0.0",
|
|
54
54
|
"@takumi-rs/wasm": "^1.0.0-beta.3 || ^2.0.0",
|
|
55
55
|
"@unhead/vue": "^2.0.5 || ^3.0.0",
|
|
56
|
-
"@unocss/config": "^66.
|
|
57
|
-
"@unocss/core": "^66.
|
|
58
|
-
"fontless": "^0.2.0",
|
|
56
|
+
"@unocss/config": "^66.10.5",
|
|
57
|
+
"@unocss/core": "^66.10.5",
|
|
58
|
+
"fontless": "^0.2.0 || ^0.4.3 || ^1.0.0",
|
|
59
59
|
"nitropack": "^2.13.4",
|
|
60
60
|
"playwright-core": "^1.50.0",
|
|
61
|
-
"satori": ">=0.
|
|
62
|
-
"sharp": "^0.
|
|
61
|
+
"satori": ">=0.33.5",
|
|
62
|
+
"sharp": "^0.35.4",
|
|
63
63
|
"tailwindcss": "^4.0.0",
|
|
64
|
-
"unifont": "^0.7.0",
|
|
64
|
+
"unifont": "^0.7.0 || ^0.8.3",
|
|
65
65
|
"unstorage": "^1.15.0",
|
|
66
66
|
"zod": ">=3"
|
|
67
67
|
},
|
|
@@ -110,56 +110,56 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
|
-
"@clack/prompts": "^1.
|
|
113
|
+
"@clack/prompts": "^1.8.1",
|
|
114
114
|
"@nuxt/kit": "^4.5.2",
|
|
115
|
-
"@vue/compiler-sfc": "^3.5.
|
|
115
|
+
"@vue/compiler-sfc": "^3.5.43",
|
|
116
116
|
"chrome-launcher": "^1.2.1",
|
|
117
117
|
"consola": "^3.4.2",
|
|
118
118
|
"defu": "^6.1.7",
|
|
119
|
-
"devalue": "^5.9.
|
|
119
|
+
"devalue": "^5.9.2",
|
|
120
120
|
"exsolve": "^1.1.1",
|
|
121
121
|
"fnv1a-64": "^0.1.2",
|
|
122
122
|
"lightningcss": "^1.33.0",
|
|
123
|
-
"magic-string": "^1.1
|
|
124
|
-
"magicast": "^0.5.
|
|
123
|
+
"magic-string": "^1.4.1",
|
|
124
|
+
"magicast": "^0.5.5",
|
|
125
125
|
"mocked-exports": "^0.1.1",
|
|
126
|
-
"nuxt-site-config": "^4.2.
|
|
127
|
-
"nuxtseo-shared": "^5.3.
|
|
128
|
-
"nypm": "^0.6.
|
|
126
|
+
"nuxt-site-config": "^4.2.3",
|
|
127
|
+
"nuxtseo-shared": "^5.3.16",
|
|
128
|
+
"nypm": "^0.6.10",
|
|
129
129
|
"object-identity": "^0.2.3",
|
|
130
130
|
"ofetch": "^1.5.1",
|
|
131
|
-
"ohash": "^2.0.
|
|
132
|
-
"oxc-parser": "^0.
|
|
131
|
+
"ohash": "^2.0.12",
|
|
132
|
+
"oxc-parser": "^0.151.0",
|
|
133
133
|
"oxc-walker": "^1.1.1",
|
|
134
134
|
"pathe": "^2.0.3",
|
|
135
|
-
"pkg-types": "^2.3.
|
|
135
|
+
"pkg-types": "^2.3.3",
|
|
136
136
|
"radix3": "^1.1.2",
|
|
137
137
|
"std-env": "^4.2.0",
|
|
138
138
|
"strip-literal": "^4.0.0",
|
|
139
|
-
"tinyexec": "^1.3.
|
|
139
|
+
"tinyexec": "^1.3.1",
|
|
140
140
|
"ufo": "^1.6.4",
|
|
141
141
|
"ultrahtml": "^1.7.0",
|
|
142
|
-
"unplugin": "^3.
|
|
142
|
+
"unplugin": "^3.4.0"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@antfu/eslint-config": "^9.
|
|
145
|
+
"@antfu/eslint-config": "^9.5.1",
|
|
146
146
|
"@fontsource/noto-sans-sc": "^5.3.0",
|
|
147
|
-
"@iconify-json/carbon": "^1.2.
|
|
148
|
-
"@iconify-json/logos": "^1.2.
|
|
149
|
-
"@iconify-json/noto": "^1.2.
|
|
147
|
+
"@iconify-json/carbon": "^1.2.27",
|
|
148
|
+
"@iconify-json/logos": "^1.2.14",
|
|
149
|
+
"@iconify-json/noto": "^1.2.8",
|
|
150
150
|
"@iconify-json/ri": "^1.2.10",
|
|
151
|
-
"@iconify-json/tabler": "^1.2.
|
|
151
|
+
"@iconify-json/tabler": "^1.2.39",
|
|
152
152
|
"@iconify/types": "^2.0.0",
|
|
153
|
-
"@img/sharp-linux-x64": "^0.35.
|
|
154
|
-
"@nuxt/content": "^3.
|
|
155
|
-
"@nuxt/devtools": "4.0.0-
|
|
156
|
-
"@nuxt/devtools-kit": "4.0.0-
|
|
153
|
+
"@img/sharp-linux-x64": "^0.35.4",
|
|
154
|
+
"@nuxt/content": "^3.16.1",
|
|
155
|
+
"@nuxt/devtools": "4.0.0-beta.1",
|
|
156
|
+
"@nuxt/devtools-kit": "4.0.0-beta.1",
|
|
157
157
|
"@nuxt/fonts": "^0.14.0",
|
|
158
|
-
"@nuxt/icon": "^2.
|
|
158
|
+
"@nuxt/icon": "^2.5.1",
|
|
159
159
|
"@nuxt/image": "^2.1.0",
|
|
160
160
|
"@nuxt/module-builder": "^1.0.3",
|
|
161
|
-
"@nuxt/test-utils": "^4.
|
|
162
|
-
"@nuxt/ui": "^4.
|
|
161
|
+
"@nuxt/test-utils": "^4.3.2",
|
|
162
|
+
"@nuxt/ui": "^4.11.1",
|
|
163
163
|
"@nuxtjs/color-mode": "^4.0.1",
|
|
164
164
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
165
165
|
"@nuxtjs/i18n": "^10.6.0",
|
|
@@ -167,53 +167,56 @@
|
|
|
167
167
|
"@resvg/resvg-js": "^2.6.2",
|
|
168
168
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
169
169
|
"@tailwindcss/vite": "^4.3.3",
|
|
170
|
-
"@takumi-rs/core": "^2.
|
|
170
|
+
"@takumi-rs/core": "^2.14.0",
|
|
171
171
|
"@takumi-rs/core-v1": "npm:@takumi-rs/core@1.8.7",
|
|
172
|
-
"@takumi-rs/helpers": "^2.
|
|
172
|
+
"@takumi-rs/helpers": "^2.14.0",
|
|
173
173
|
"@takumi-rs/helpers-v1": "npm:@takumi-rs/helpers@1.8.7",
|
|
174
|
-
"@takumi-rs/wasm": "^2.
|
|
174
|
+
"@takumi-rs/wasm": "^2.14.0",
|
|
175
175
|
"@takumi-rs/wasm-v1": "npm:@takumi-rs/wasm@1.8.7",
|
|
176
|
-
"@unocss/config": "^66.
|
|
177
|
-
"@unocss/core": "^66.
|
|
178
|
-
"@unocss/nuxt": "^66.
|
|
179
|
-
"@unocss/preset-icons": "^66.
|
|
180
|
-
"@unocss/preset-wind": "^66.
|
|
181
|
-
"@unocss/preset-wind4": "^66.
|
|
182
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
183
|
-
"@vue/compiler-core": "^3.5.
|
|
184
|
-
"@vueuse/nuxt": "^
|
|
185
|
-
"birpc": "^4.
|
|
186
|
-
"bumpp": "^12.
|
|
187
|
-
"eslint": "^10.
|
|
188
|
-
"eslint-plugin-harlanzw": "^0.
|
|
189
|
-
"fontless": "^0.
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
176
|
+
"@unocss/config": "^66.10.5",
|
|
177
|
+
"@unocss/core": "^66.10.5",
|
|
178
|
+
"@unocss/nuxt": "^66.10.5",
|
|
179
|
+
"@unocss/preset-icons": "^66.10.5",
|
|
180
|
+
"@unocss/preset-wind": "^66.10.5",
|
|
181
|
+
"@unocss/preset-wind4": "^66.10.5",
|
|
182
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
183
|
+
"@vue/compiler-core": "^3.5.43",
|
|
184
|
+
"@vueuse/nuxt": "^15.0.0",
|
|
185
|
+
"birpc": "^4.2.0",
|
|
186
|
+
"bumpp": "^12.3.0",
|
|
187
|
+
"eslint": "^10.11.0",
|
|
188
|
+
"eslint-plugin-harlanzw": "^0.22.0",
|
|
189
|
+
"fontless": "^1.0.0",
|
|
190
|
+
"fontless-v0-2": "npm:fontless@0.2.0",
|
|
191
|
+
"globby": "^16.2.4",
|
|
192
|
+
"happy-dom": "^20.14.5",
|
|
193
|
+
"hookable": "^6.1.2",
|
|
193
194
|
"jest-image-snapshot": "^6.5.2",
|
|
194
195
|
"lightningcss": "^1.33.0",
|
|
195
196
|
"nitropack": "^2.13.4",
|
|
196
197
|
"nuxt": "^4.5.2",
|
|
197
|
-
"nuxtseo-layer-devtools": "^5.3.
|
|
198
|
-
"playwright": "^1.
|
|
199
|
-
"playwright-core": "^1.
|
|
200
|
-
"sass": "^1.
|
|
201
|
-
"satori": "^0.
|
|
202
|
-
"sharp": "^0.35.
|
|
198
|
+
"nuxtseo-layer-devtools": "^5.3.16",
|
|
199
|
+
"playwright": "^1.63.0",
|
|
200
|
+
"playwright-core": "^1.63.0",
|
|
201
|
+
"sass": "^1.104.1",
|
|
202
|
+
"satori": "^0.33.5",
|
|
203
|
+
"sharp": "^0.35.4",
|
|
203
204
|
"sirv": "^3.0.2",
|
|
204
205
|
"tailwindcss": "^4.3.3",
|
|
205
206
|
"typescript": "6.0.3",
|
|
206
207
|
"unbuild": "^3.6.1",
|
|
207
|
-
"unifont": "^0.
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"vue
|
|
212
|
-
"
|
|
208
|
+
"unifont": "^0.8.3",
|
|
209
|
+
"unifont-v0-7": "npm:unifont@0.7.0",
|
|
210
|
+
"unocss": "^66.10.5",
|
|
211
|
+
"vitest": "^5.0.1",
|
|
212
|
+
"vue": "^3.5.43",
|
|
213
|
+
"vue-tsc": "^3.3.11",
|
|
214
|
+
"wrangler": "^4.136.1",
|
|
213
215
|
"yoga-wasm-web": "^0.3.3",
|
|
214
|
-
"zod": "^4.
|
|
216
|
+
"zod": "^4.6.5"
|
|
215
217
|
},
|
|
216
218
|
"scripts": {
|
|
219
|
+
"bench:edge-startup": "nuxt build bench/fixtures/edge-startup && node bench/edge-startup.mjs bench/fixtures/edge-startup/.netlify/edge-functions/server/server.js",
|
|
217
220
|
"snapshots": "node --import jiti/register scripts/generate-template-snapshots.ts",
|
|
218
221
|
"stub": "nuxt-build-module build --stub && nuxt-module-build prepare",
|
|
219
222
|
"build": "pnpm stub && nuxt-module-build build && pnpm run build:client",
|
|
@@ -229,9 +232,10 @@
|
|
|
229
232
|
"typecheck": "pnpm stub && nuxt typecheck",
|
|
230
233
|
"test": "pnpm run prepare:fixtures && vitest",
|
|
231
234
|
"test:run": "pnpm test -- --run && pnpm test:nuxt5",
|
|
232
|
-
"test:nuxt5": "pnpm pack --out test/fixtures/nuxt5/nuxt-og-image.tgz && pnpm install --dir test/fixtures/nuxt5 --no-frozen-lockfile --force --update-checksums && pnpm --dir test/fixtures/nuxt5 test",
|
|
235
|
+
"test:nuxt5": "pnpm pack --out test/fixtures/nuxt5/nuxt-og-image.tgz && node -e \"require('node:fs').rmSync('test/fixtures/nuxt5/node_modules', { recursive: true, force: true })\" && pnpm install --dir test/fixtures/nuxt5 --no-frozen-lockfile --force --update-checksums && pnpm --dir test/fixtures/nuxt5 test",
|
|
233
236
|
"test:chrome": "HAS_CHROME=true vitest",
|
|
234
237
|
"test:packed-install": "node scripts/smoke-packed-install.mjs",
|
|
238
|
+
"test:peers": "node scripts/test-peer-compatibility.mjs",
|
|
235
239
|
"test:takumi:e2e": "node scripts/test-takumi-e2e.mjs",
|
|
236
240
|
"test:takumi:e2e:matrix": "node scripts/test-takumi-e2e.mjs --matrix",
|
|
237
241
|
"test:takumi:e2e:compare": "node scripts/test-takumi-e2e.mjs --compare"
|
package/types/virtual.d.ts
CHANGED
|
@@ -29,6 +29,14 @@ declare module '#og-image/renderers/browser' {
|
|
|
29
29
|
export default renderer
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
declare module '#og-image/bindings/fetch' {
|
|
33
|
+
export function guardedFetch(url: string, init: {
|
|
34
|
+
headers?: Record<string, string>
|
|
35
|
+
signal: AbortSignal
|
|
36
|
+
isBlockedAddress?: (address: string) => boolean
|
|
37
|
+
}): Promise<Response>
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
declare module '#og-image/bindings/satori' {
|
|
33
41
|
const satori: typeof import('satori').satori
|
|
34
42
|
export default satori
|
|
@@ -107,3 +115,21 @@ declare module '#og-image-cache' {
|
|
|
107
115
|
|
|
108
116
|
export const emojiCache: Storage<string>
|
|
109
117
|
}
|
|
118
|
+
|
|
119
|
+
declare module '#og-image/harfbuzz-factory' {
|
|
120
|
+
const createHarfBuzz: (options: {
|
|
121
|
+
convertJsFunctionToWasm?: (callback: WebAssembly.ImportValue, signature: string) => WebAssembly.ExportValue
|
|
122
|
+
instantiateWasm: (imports: WebAssembly.Imports, receiveInstance: (instance: WebAssembly.Instance) => void) => object
|
|
123
|
+
}) => Promise<unknown>
|
|
124
|
+
export default createHarfBuzz
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare module '#og-image/harfbuzz-adapter' {
|
|
128
|
+
const wrapHarfBuzz: (instance: unknown) => unknown
|
|
129
|
+
export default wrapHarfBuzz
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare module '#og-image/harfbuzz-callbacks' {
|
|
133
|
+
const callbacks: Record<string, WebAssembly.Module | Promise<WebAssembly.Module>> | undefined
|
|
134
|
+
export default callbacks
|
|
135
|
+
}
|