nuxt-og-image 6.7.4 → 6.7.6

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.
Files changed (80) hide show
  1. package/dist/chunks/tw4.cjs +2 -2
  2. package/dist/chunks/tw4.mjs +2 -2
  3. package/dist/chunks/uno.cjs +20 -5
  4. package/dist/chunks/uno.mjs +19 -5
  5. package/dist/cli.cjs +8 -2
  6. package/dist/cli.mjs +8 -2
  7. package/dist/devtools/lib/og-image/rpc.ts +4 -1
  8. package/dist/module.cjs +2 -2
  9. package/dist/module.json +2 -2
  10. package/dist/module.mjs +2 -2
  11. package/dist/runtime/app/plugins/og-image-canonical-urls.server.d.ts +2 -1
  12. package/dist/runtime/app/plugins/og-image-canonical-urls.server.js +3 -1
  13. package/dist/runtime/app/plugins/route-rule-og-image.server.d.ts +2 -1
  14. package/dist/runtime/app/plugins/route-rule-og-image.server.js +3 -1
  15. package/dist/runtime/app/utils/plugins.js +4 -10
  16. package/dist/runtime/logger.js +2 -6
  17. package/dist/runtime/pure.d.ts +0 -1
  18. package/dist/runtime/pure.js +0 -5
  19. package/dist/runtime/server/og-image/bindings/browser/chrome-launcher.d.ts +1 -1
  20. package/dist/runtime/server/og-image/bindings/browser/cloudflare.d.ts +1 -2
  21. package/dist/runtime/server/og-image/bindings/browser/cloudflare.js +2 -9
  22. package/dist/runtime/server/og-image/bindings/browser/on-demand.d.ts +1 -1
  23. package/dist/runtime/server/og-image/bindings/browser/playwright.d.ts +1 -1
  24. package/dist/runtime/server/og-image/bindings/font-assets/cloudflare.d.ts +1 -1
  25. package/dist/runtime/server/og-image/bindings/font-assets/cloudflare.js +1 -1
  26. package/dist/runtime/server/og-image/bindings/font-assets/dev-prerender.d.ts +1 -1
  27. package/dist/runtime/server/og-image/bindings/font-assets/dev-prerender.js +27 -13
  28. package/dist/runtime/server/og-image/bindings/font-assets/external-url.js +3 -1
  29. package/dist/runtime/server/og-image/bindings/font-assets/node.d.ts +1 -1
  30. package/dist/runtime/server/og-image/bindings/font-assets/node.js +4 -2
  31. package/dist/runtime/server/og-image/bindings/resvg/node-dev.js +18 -64
  32. package/dist/runtime/server/og-image/bindings/takumi/node-dev.js +26 -83
  33. package/dist/runtime/server/og-image/bindings/worker-queue.d.ts +34 -0
  34. package/dist/runtime/server/og-image/bindings/worker-queue.js +150 -0
  35. package/dist/runtime/server/og-image/browser/renderer.js +1 -1
  36. package/dist/runtime/server/og-image/context.d.ts +1 -1
  37. package/dist/runtime/server/og-image/context.js +2 -3
  38. package/dist/runtime/server/og-image/core/plugins/imageSrc.js +1 -1
  39. package/dist/runtime/server/og-image/core/transforms/emojis/local.d.ts +2 -17
  40. package/dist/runtime/server/og-image/core/transforms/emojis/local.js +1 -1
  41. package/dist/runtime/server/og-image/devtools.d.ts +1 -1
  42. package/dist/runtime/server/og-image/devtools.js +1 -1
  43. package/dist/runtime/server/og-image/fonts.d.ts +1 -1
  44. package/dist/runtime/server/og-image/fonts.js +3 -1
  45. package/dist/runtime/server/og-image/templates/html.js +1 -1
  46. package/dist/runtime/server/plugins/prerender.d.ts +1 -1
  47. package/dist/runtime/server/plugins/prerender.js +2 -2
  48. package/dist/runtime/server/routes/__zero-runtime/image.d.ts +1 -1
  49. package/dist/runtime/server/routes/__zero-runtime/image.js +1 -1
  50. package/dist/runtime/server/routes/debug.json.d.ts +1 -10
  51. package/dist/runtime/server/routes/debug.json.js +1 -1
  52. package/dist/runtime/server/routes/image.d.ts +1 -1
  53. package/dist/runtime/server/routes/image.js +1 -1
  54. package/dist/runtime/server/routes/resolve.d.ts +1 -1
  55. package/dist/runtime/server/routes/resolve.js +1 -1
  56. package/dist/runtime/server/util/cache.d.ts +1 -6
  57. package/dist/runtime/server/util/cache.js +2 -2
  58. package/dist/runtime/server/util/cloudflare.d.ts +3 -0
  59. package/dist/runtime/server/util/cloudflare.js +17 -0
  60. package/dist/runtime/server/util/cloudflareAssets.d.ts +1 -1
  61. package/dist/runtime/server/util/cloudflareAssets.js +8 -5
  62. package/dist/runtime/server/util/encoding.d.ts +0 -1
  63. package/dist/runtime/server/util/encoding.js +0 -7
  64. package/dist/runtime/server/util/eventHandlers.d.ts +1 -1
  65. package/dist/runtime/server/util/eventHandlers.js +1 -1
  66. package/dist/runtime/server/util/fetchLocalAsset.d.ts +1 -1
  67. package/dist/runtime/server/util/kit.d.ts +7 -4
  68. package/dist/runtime/server/util/kit.js +4 -19
  69. package/dist/runtime/server/util/logger.js +2 -6
  70. package/dist/runtime/server/util/options.js +1 -1
  71. package/dist/runtime/server/util/query.d.ts +1 -1
  72. package/dist/runtime/server/util/timings.d.ts +0 -3
  73. package/dist/runtime/server/util/timings.js +0 -3
  74. package/dist/runtime/server/utils.d.ts +1 -1
  75. package/dist/runtime/server/utils.js +7 -4
  76. package/dist/runtime/types.d.ts +11 -9
  77. package/dist/shared/{nuxt-og-image.Bv8VSGTj.mjs → nuxt-og-image.BIbfn5xQ.mjs} +146 -108
  78. package/dist/shared/{nuxt-og-image.BRBtdkUp.cjs → nuxt-og-image.CdpC3njh.cjs} +148 -107
  79. package/package.json +57 -48
  80. package/types/virtual.d.ts +15 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "6.7.4",
4
+ "version": "6.7.6",
5
5
  "description": "Enlightened OG Image generation for Nuxt.",
6
6
  "author": {
7
7
  "website": "https://harlanzw.com",
@@ -53,6 +53,8 @@
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.7.5",
57
+ "@unocss/core": "^66.7.5",
56
58
  "fontless": "^0.2.0",
57
59
  "nitropack": "^2.13.4",
58
60
  "playwright-core": "^1.50.0",
@@ -76,6 +78,12 @@
76
78
  "@takumi-rs/wasm": {
77
79
  "optional": true
78
80
  },
81
+ "@unocss/config": {
82
+ "optional": true
83
+ },
84
+ "@unocss/core": {
85
+ "optional": true
86
+ },
79
87
  "fontless": {
80
88
  "optional": true
81
89
  },
@@ -103,97 +111,95 @@
103
111
  },
104
112
  "dependencies": {
105
113
  "@clack/prompts": "^1.7.0",
106
- "@nuxt/kit": "^4.5.0",
107
- "@unocss/config": "^66.7.5",
108
- "@unocss/core": "^66.7.5",
114
+ "@nuxt/kit": "^4.5.1",
109
115
  "@vue/compiler-sfc": "^3.5.40",
110
116
  "chrome-launcher": "^1.2.1",
111
117
  "consola": "^3.4.2",
112
- "culori": "^4.0.2",
113
118
  "defu": "^6.1.7",
114
- "devalue": "^5.8.1",
115
- "exsolve": "^1.1.0",
116
- "fnv1a-64": "^0.1.1",
117
- "lightningcss": "^1.32.0",
118
- "magic-string": "^1.0.0",
119
- "magicast": "^0.5.3",
119
+ "devalue": "^5.9.0",
120
+ "exsolve": "^1.1.1",
121
+ "fnv1a-64": "^0.1.2",
122
+ "lightningcss": "^1.33.0",
123
+ "magic-string": "^1.1.0",
124
+ "magicast": "^0.5.4",
120
125
  "mocked-exports": "^0.1.1",
121
- "nuxt-site-config": "^4.1.2",
122
- "nuxtseo-shared": "^5.3.3",
123
- "nypm": "^0.6.8",
126
+ "nuxt-site-config": "^4.1.4",
127
+ "nuxtseo-shared": "^5.3.8",
128
+ "nypm": "^0.6.9",
124
129
  "object-identity": "^0.2.3",
125
130
  "ofetch": "^1.5.1",
126
131
  "ohash": "^2.0.11",
127
- "oxc-parser": "^0.140.0",
128
- "oxc-walker": "^1.0.0",
132
+ "oxc-parser": "^0.142.0",
133
+ "oxc-walker": "^1.1.1",
129
134
  "pathe": "^2.0.3",
130
135
  "pkg-types": "^2.3.1",
131
136
  "radix3": "^1.1.2",
132
137
  "std-env": "^4.2.0",
133
- "strip-literal": "^3.1.0",
134
- "tinyexec": "^1.2.4",
135
- "tinyglobby": "^0.2.17",
138
+ "strip-literal": "^4.0.0",
139
+ "tinyexec": "^1.3.0",
136
140
  "ufo": "^1.6.4",
137
141
  "ultrahtml": "^1.7.0",
138
142
  "unplugin": "^3.3.0"
139
143
  },
140
144
  "devDependencies": {
141
- "@antfu/eslint-config": "^9.1.0",
145
+ "@antfu/eslint-config": "^9.2.0",
142
146
  "@fontsource/noto-sans-sc": "^5.3.0",
143
- "@iconify-json/carbon": "^1.2.24",
147
+ "@iconify-json/carbon": "^1.2.25",
144
148
  "@iconify-json/logos": "^1.2.11",
145
149
  "@iconify-json/noto": "^1.2.7",
146
150
  "@iconify-json/ri": "^1.2.10",
147
- "@iconify-json/tabler": "^1.2.36",
151
+ "@iconify-json/tabler": "^1.2.38",
148
152
  "@iconify/types": "^2.0.0",
149
153
  "@img/sharp-linux-x64": "^0.35.3",
150
- "@nuxt/content": "^3.15.0",
151
- "@nuxt/devtools": "4.0.0-alpha.7",
152
- "@nuxt/devtools-kit": "4.0.0-alpha.7",
154
+ "@nuxt/content": "^3.15.2",
155
+ "@nuxt/devtools": "4.0.0-alpha.9",
156
+ "@nuxt/devtools-kit": "4.0.0-alpha.9",
153
157
  "@nuxt/fonts": "^0.14.0",
154
- "@nuxt/icon": "^2.3.1",
155
- "@nuxt/image": "^2.0.0",
156
- "@nuxt/module-builder": "^1.0.2",
157
- "@nuxt/test-utils": "^4.0.3",
158
+ "@nuxt/icon": "^2.4.1",
159
+ "@nuxt/image": "^2.1.0",
160
+ "@nuxt/module-builder": "^1.0.3",
161
+ "@nuxt/test-utils": "^4.1.0",
158
162
  "@nuxt/ui": "^4.10.0",
159
163
  "@nuxtjs/color-mode": "^4.0.1",
160
164
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
161
- "@nuxtjs/i18n": "^10.4.1",
165
+ "@nuxtjs/i18n": "^10.6.0",
162
166
  "@nuxtjs/tailwindcss": "7.0.0-beta.1",
163
167
  "@resvg/resvg-js": "^2.6.2",
164
168
  "@resvg/resvg-wasm": "^2.6.2",
165
169
  "@tailwindcss/vite": "^4.3.3",
166
- "@takumi-rs/core": "^2.3.2",
170
+ "@takumi-rs/core": "^2.5.4",
167
171
  "@takumi-rs/core-v1": "npm:@takumi-rs/core@1.8.7",
168
- "@takumi-rs/helpers": "^2.3.2",
172
+ "@takumi-rs/helpers": "^2.5.4",
169
173
  "@takumi-rs/helpers-v1": "npm:@takumi-rs/helpers@1.8.7",
170
- "@takumi-rs/wasm": "^2.3.2",
174
+ "@takumi-rs/wasm": "^2.5.4",
171
175
  "@takumi-rs/wasm-v1": "npm:@takumi-rs/wasm@1.8.7",
176
+ "@unocss/config": "^66.7.5",
177
+ "@unocss/core": "^66.7.5",
172
178
  "@unocss/nuxt": "^66.7.5",
173
179
  "@unocss/preset-icons": "^66.7.5",
174
180
  "@unocss/preset-wind": "^66.7.5",
175
181
  "@unocss/preset-wind4": "^66.7.5",
176
182
  "@vitejs/plugin-vue": "^6.0.8",
177
183
  "@vue/compiler-core": "^3.5.40",
178
- "@vueuse/nuxt": "^14.3.0",
184
+ "@vueuse/nuxt": "^14.4.0",
179
185
  "birpc": "^4.0.0",
180
- "bumpp": "^11.1.0",
181
- "eslint": "^10.7.0",
182
- "eslint-plugin-harlanzw": "^0.17.0",
186
+ "bumpp": "^12.1.1",
187
+ "eslint": "^10.8.0",
188
+ "eslint-plugin-harlanzw": "^0.17.1",
183
189
  "fontless": "^0.2.1",
184
190
  "get-image-colors": "^4.0.1",
185
191
  "globby": "^16.2.2",
186
- "happy-dom": "^20.11.0",
192
+ "happy-dom": "^20.11.1",
187
193
  "hookable": "^6.1.1",
188
194
  "jest-image-snapshot": "^6.5.2",
189
- "lightningcss": "^1.32.0",
195
+ "lightningcss": "^1.33.0",
190
196
  "nitropack": "^2.13.4",
191
- "nuxt": "^4.5.0",
192
- "nuxtseo-layer-devtools": "^5.3.3",
193
- "playwright": "^1.61.1",
194
- "playwright-core": "^1.61.1",
195
- "sass": "^1.101.0",
196
- "satori": "^0.28.0",
197
+ "nuxt": "^4.5.1",
198
+ "nuxtseo-layer-devtools": "^5.3.8",
199
+ "playwright": "^1.62.1",
200
+ "playwright-core": "^1.62.1",
201
+ "sass": "^1.102.0",
202
+ "satori": "^0.29.0",
197
203
  "sharp": "^0.35.3",
198
204
  "sirv": "^3.0.2",
199
205
  "tailwindcss": "^4.3.3",
@@ -203,8 +209,8 @@
203
209
  "unocss": "^66.7.5",
204
210
  "vitest": "^4.1.10",
205
211
  "vue": "^3.5.40",
206
- "vue-tsc": "^3.3.7",
207
- "wrangler": "^4.112.0",
212
+ "vue-tsc": "^3.3.9",
213
+ "wrangler": "^4.118.0",
208
214
  "yoga-wasm-web": "^0.3.3",
209
215
  "zod": "^4.4.3"
210
216
  },
@@ -221,9 +227,12 @@
221
227
  "prepare:fixtures": "node scripts/prepare-fixtures.mjs",
222
228
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground && nuxt prepare client && pnpm run prepare:fixtures && pnpm run build:client",
223
229
  "release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\"",
224
- "typecheck": "nuxt-module-build prepare && nuxt typecheck",
230
+ "typecheck": "pnpm stub && nuxt typecheck",
225
231
  "test": "pnpm run prepare:fixtures && vitest",
232
+ "test:run": "pnpm test -- --run && pnpm test:nuxt5",
233
+ "test:nuxt5": "pnpm pack --out test/fixtures/nuxt5/nuxt-og-image.tgz && pnpm --dir test/fixtures/nuxt5 install --frozen-lockfile && pnpm --dir test/fixtures/nuxt5 test",
226
234
  "test:chrome": "HAS_CHROME=true vitest",
235
+ "test:packed-install": "node scripts/smoke-packed-install.mjs",
227
236
  "test:takumi:e2e": "node scripts/test-takumi-e2e.mjs",
228
237
  "test:takumi:e2e:matrix": "node scripts/test-takumi-e2e.mjs --matrix",
229
238
  "test:takumi:e2e:compare": "node scripts/test-takumi-e2e.mjs --compare"
@@ -1,3 +1,11 @@
1
+ declare module '#nuxtseo/h3' {
2
+ export * from 'h3'
3
+ }
4
+
5
+ declare module '#nuxtseo/nitro' {
6
+ export * from 'nitropack/runtime'
7
+ }
8
+
1
9
  declare module '#og-image/components' {
2
10
  import type { Component } from 'vue'
3
11
 
@@ -63,6 +71,13 @@ declare module '#og-image/island-hash' {
63
71
  }): string
64
72
  }
65
73
 
74
+ declare module '#og-image/nitro-fetch' {
75
+ import type { FetchOptions, FetchRequest } from 'ofetch'
76
+ import type { H3Event } from '#nuxtseo/h3'
77
+
78
+ export function fetchWithEvent<T>(event: H3Event, request: FetchRequest, options?: FetchOptions): Promise<T>
79
+ }
80
+
66
81
  declare module '#og-image/font-requirements' {
67
82
  export const fontRequirements: {
68
83
  weights: number[]