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.
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed } from 'vue'
2
+ import { computed, resolveComponent } from 'vue'
3
3
  import { useSiteConfig } from '#imports'
4
4
 
5
5
  // inherited attrs can mess up the satori parser
@@ -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: null,
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" && !options.component) {
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.9",
5
- "packageManager": "pnpm@8.6.7",
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.2",
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.15.2",
36
+ "chrome-launcher": "^1.0.0",
37
37
  "defu": "^6.1.2",
38
38
  "execa": "^7.1.1",
39
- "fast-glob": "^3.3.0",
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.5",
47
- "nuxt-site-config-kit": "^1.0.5",
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.35.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.7",
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.2",
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.44.0",
74
- "jest-image-snapshot": "^6.1.0",
75
- "nuxt": "^3.6.2",
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.35.1",
78
- "sass": "^1.63.6",
77
+ "playwright": "^1.36.2",
78
+ "sass": "^1.64.1",
79
79
  "vitest": "^0.33.0"
80
80
  },
81
81
  "resolutions": {