nuxt-og-image 2.0.9 → 2.0.11
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/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/{IconCSS.e4e62dd9.js → IconCSS.a6651292.js} +1 -1
- package/dist/client/_nuxt/{ImageLoader.916635f4.js → ImageLoader.882ba623.js} +1 -1
- package/dist/client/_nuxt/{entry.7c943872.js → entry.f499f974.js} +61 -61
- package/dist/client/_nuxt/{error-404.499328d7.js → error-404.144d0cc0.js} +1 -1
- package/dist/client/_nuxt/{error-500.096cdb23.js → error-500.ecc05719.js} +1 -1
- package/dist/client/_nuxt/{index.3fdd2e9c.js → index.17f21566.js} +1 -1
- package/dist/client/_nuxt/{options.55a0a33e.js → options.79b33522.js} +1 -1
- package/dist/client/_nuxt/{png.05d9b0c3.js → png.fec7fa44.js} +1 -1
- package/dist/client/_nuxt/{shiki.a1b1ab93.js → shiki.6a407cf4.js} +1 -1
- package/dist/client/_nuxt/{svg.00ddcf45.js → svg.0d95f20c.js} +1 -1
- package/dist/client/_nuxt/{vnodes.c3f3b275.js → vnodes.3cf4d8d7.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/options/index.html +7 -0
- package/dist/client/png/index.html +7 -0
- package/dist/client/svg/index.html +7 -0
- package/dist/client/vnodes/index.html +7 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +19 -15
- package/dist/runtime/browserUtil.mjs +4 -3
- package/dist/runtime/cache.mjs +1 -1
- package/dist/runtime/components/OgImageTemplate/Fallback.vue +1 -1
- package/dist/runtime/composables/defineOgImage.mjs +2 -1
- package/dist/runtime/nitro/routes/html.mjs +2 -1
- package/package.json +15 -15
|
@@ -8,7 +8,8 @@ export function defineOgImageScreenshot(options = {}) {
|
|
|
8
8
|
return defineOgImage({
|
|
9
9
|
alt: `Web page screenshot${route ? ` of ${route}` : ""}.`,
|
|
10
10
|
provider: "browser",
|
|
11
|
-
component:
|
|
11
|
+
component: "PageScreenshot",
|
|
12
|
+
// this is an alias
|
|
12
13
|
cache: true,
|
|
13
14
|
...options
|
|
14
15
|
});
|
|
@@ -25,7 +25,7 @@ export default defineEventHandler(async (e) => {
|
|
|
25
25
|
let options = await fetchOptionsCached(e, path);
|
|
26
26
|
if (queryOptions)
|
|
27
27
|
options = defu(queryOptions, options);
|
|
28
|
-
if (options.provider === "browser" &&
|
|
28
|
+
if (options.provider === "browser" && options.component === "PageScreenshot") {
|
|
29
29
|
const pathWithoutBase = path.replace(new RegExp(`^${useRuntimeConfig().app.baseURL}`), "");
|
|
30
30
|
return sendRedirect(e, withBase(pathWithoutBase, nitroOrigin));
|
|
31
31
|
}
|
|
@@ -123,6 +123,7 @@ img.emoji {
|
|
|
123
123
|
})
|
|
124
124
|
]
|
|
125
125
|
});
|
|
126
|
+
html = html.replaceAll(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "");
|
|
126
127
|
const headChunk = await renderSSRHead(head);
|
|
127
128
|
let htmlTemplate = `<!DOCTYPE html>
|
|
128
129
|
<html ${headChunk.htmlAttrs}>
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
5
|
-
"packageManager": "pnpm@8.6.
|
|
4
|
+
"version": "2.0.11",
|
|
5
|
+
"packageManager": "pnpm@8.6.10",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -27,29 +27,29 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nuxt/kit": "^3.6.
|
|
30
|
+
"@nuxt/kit": "^3.6.5",
|
|
31
31
|
"@resvg/resvg-js": "^2.4.1",
|
|
32
32
|
"@resvg/resvg-wasm": "^2.4.1",
|
|
33
33
|
"@types/fs-extra": "^11.0.1",
|
|
34
34
|
"birpc": "^0.2.12",
|
|
35
35
|
"chalk": "^5.3.0",
|
|
36
|
-
"chrome-launcher": "^0.
|
|
36
|
+
"chrome-launcher": "^1.0.0",
|
|
37
37
|
"defu": "^6.1.2",
|
|
38
38
|
"execa": "^7.1.1",
|
|
39
|
-
"fast-glob": "^3.3.
|
|
39
|
+
"fast-glob": "^3.3.1",
|
|
40
40
|
"flatted": "^3.2.7",
|
|
41
41
|
"fs-extra": "^11.1.1",
|
|
42
42
|
"globby": "^13.2.2",
|
|
43
43
|
"image-size": "^1.0.2",
|
|
44
44
|
"inline-css": "^4.0.2",
|
|
45
45
|
"launch-editor": "^2.6.0",
|
|
46
|
-
"nuxt-site-config": "^1.0.
|
|
47
|
-
"nuxt-site-config-kit": "^1.0.
|
|
46
|
+
"nuxt-site-config": "^1.0.8",
|
|
47
|
+
"nuxt-site-config-kit": "^1.0.8",
|
|
48
48
|
"nypm": "^0.2.2",
|
|
49
49
|
"ofetch": "^1.1.1",
|
|
50
50
|
"ohash": "^1.1.2",
|
|
51
51
|
"pathe": "^1.1.1",
|
|
52
|
-
"playwright-core": "^1.
|
|
52
|
+
"playwright-core": "^1.36.2",
|
|
53
53
|
"radix3": "^1.0.1",
|
|
54
54
|
"satori": "0.10.1",
|
|
55
55
|
"satori-html": "^0.3.2",
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
"yoga-wasm-web": "^0.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@antfu/eslint-config": "^0.39.
|
|
66
|
+
"@antfu/eslint-config": "^0.39.8",
|
|
67
67
|
"@nuxt/devtools-edge": "0.6.6-28142701.2977264",
|
|
68
68
|
"@nuxt/module-builder": "^0.4.0",
|
|
69
|
-
"@nuxt/test-utils": "3.6.
|
|
69
|
+
"@nuxt/test-utils": "3.6.5",
|
|
70
70
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
71
71
|
"@types/ws": "^8.5.5",
|
|
72
72
|
"bumpp": "^9.1.1",
|
|
73
|
-
"eslint": "8.
|
|
74
|
-
"jest-image-snapshot": "^6.
|
|
75
|
-
"nuxt": "^3.6.
|
|
73
|
+
"eslint": "8.45.0",
|
|
74
|
+
"jest-image-snapshot": "^6.2.0",
|
|
75
|
+
"nuxt": "^3.6.5",
|
|
76
76
|
"nuxt-icon": "^0.4.2",
|
|
77
|
-
"playwright": "^1.
|
|
78
|
-
"sass": "^1.
|
|
77
|
+
"playwright": "^1.36.2",
|
|
78
|
+
"sass": "^1.64.1",
|
|
79
79
|
"vitest": "^0.33.0"
|
|
80
80
|
},
|
|
81
81
|
"resolutions": {
|