nuxt-og-image 2.0.16 → 2.0.19
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 +10 -2
- package/dist/client/404.html +10 -2
- package/dist/client/_nuxt/{IconCSS.a55f717f.js → IconCSS.c48402d9.js} +1 -1
- package/dist/client/_nuxt/{ImageLoader.3395b395.js → ImageLoader.30c30af0.js} +1 -1
- package/dist/client/_nuxt/entry.69e9376f.js +136 -0
- package/dist/client/_nuxt/entry.c3a567ab.css +1 -0
- package/dist/client/_nuxt/error-404.888958ab.css +1 -0
- package/dist/client/_nuxt/{error-404.a5317b87.js → error-404.a59731bb.js} +1 -1
- package/dist/client/_nuxt/error-500.69009e70.css +1 -0
- package/dist/client/_nuxt/{error-500.35b52ab9.js → error-500.9ac6c975.js} +1 -1
- package/dist/client/_nuxt/{index.eb10a816.js → index.62ccb0c3.js} +1 -1
- package/dist/client/_nuxt/{options.3b29a706.js → options.3fadaf0e.js} +1 -1
- package/dist/client/_nuxt/{png.46aa9032.js → png.d3e36bb9.js} +1 -1
- package/dist/client/_nuxt/{shiki.13a22aea.js → shiki.be0584d9.js} +1 -1
- package/dist/client/_nuxt/{svg.8746c773.js → svg.89706ebb.js} +1 -1
- package/dist/client/_nuxt/{vnodes.8df7aa5a.js → vnodes.ddf136d5.js} +1 -1
- package/dist/client/index.html +10 -2
- package/dist/client/options/index.html +10 -2
- package/dist/client/png/index.html +10 -2
- package/dist/client/svg/index.html +10 -2
- package/dist/client/vnodes/index.html +10 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/cache.mjs +3 -2
- package/dist/runtime/nitro/middleware/og.png.d.ts +1 -1
- package/dist/runtime/nitro/middleware/og.png.mjs +1 -1
- package/dist/runtime/nitro/middleware/playground.d.ts +1 -1
- package/dist/runtime/nitro/routes/debug.d.ts +2 -2
- package/dist/runtime/nitro/routes/html.d.ts +1 -1
- package/dist/runtime/nitro/routes/options.d.ts +1 -1
- package/dist/runtime/nitro/routes/svg.d.ts +1 -1
- package/dist/runtime/nitro/routes/vnode.d.ts +1 -1
- package/package.json +23 -26
- package/dist/client/_nuxt/entry.6446ab59.js +0 -143
- package/dist/client/_nuxt/entry.7047f7e9.css +0 -1
- package/dist/client/_nuxt/error-404.f3dd5020.css +0 -1
- package/dist/client/_nuxt/error-500.06915589.css +0 -1
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
+
<link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.c3a567ab.css">
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin="" href="/__nuxt_og_image__/client/_nuxt/entry.69e9376f.js">
|
|
7
|
+
<link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.888958ab.css">
|
|
8
|
+
<link rel="prefetch" as="script" crossorigin="" href="/__nuxt_og_image__/client/_nuxt/error-404.a59731bb.js">
|
|
9
|
+
<link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.69009e70.css">
|
|
10
|
+
<link rel="prefetch" as="script" crossorigin="" href="/__nuxt_og_image__/client/_nuxt/error-500.9ac6c975.js">
|
|
11
|
+
<script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.69e9376f.js" crossorigin=""></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
5
12
|
</script></head>
|
|
6
|
-
<body ><div id="__nuxt"
|
|
13
|
+
<body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
|
|
14
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
|
7
15
|
</html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import { createBirpcGroup } from 'birpc';
|
|
|
20
20
|
import { stringify, parse } from 'flatted';
|
|
21
21
|
import { addDependency } from 'nypm';
|
|
22
22
|
|
|
23
|
-
const version = "2.0.
|
|
23
|
+
const version = "2.0.19";
|
|
24
24
|
|
|
25
25
|
async function createBrowser() {
|
|
26
26
|
if (process.dev || process.env.prerender) {
|
package/dist/runtime/cache.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { getQuery, setHeader } from "h3";
|
|
|
3
3
|
import { useRuntimeConfig, useStorage } from "#imports";
|
|
4
4
|
export async function useNitroCache(e, module, options) {
|
|
5
5
|
const { runtimeCacheStorage, version } = useRuntimeConfig()[module];
|
|
6
|
-
const enabled =
|
|
6
|
+
const enabled = options.cache && runtimeCacheStorage && options.cacheTtl && options.cacheTtl > 0;
|
|
7
7
|
const baseCacheKey = runtimeCacheStorage === "default" ? `/cache/${module}@${version}` : `/${module}@${version}`;
|
|
8
8
|
const cache = prefixStorage(useStorage(), `${baseCacheKey}/`);
|
|
9
9
|
const key = options.key;
|
|
10
|
-
let xCacheHeader = "
|
|
10
|
+
let xCacheHeader = "DISABLED";
|
|
11
11
|
let xCacheExpires = 0;
|
|
12
12
|
const newExpires = Date.now() + (options.cacheTtl || 0);
|
|
13
13
|
const purge = typeof getQuery(e).purge !== "undefined";
|
|
@@ -24,6 +24,7 @@ export async function useNitroCache(e, module, options) {
|
|
|
24
24
|
xCacheExpires = newExpires;
|
|
25
25
|
cachedItem = value;
|
|
26
26
|
} else {
|
|
27
|
+
xCacheHeader = "MISS";
|
|
27
28
|
xCacheExpires = expiresAt;
|
|
28
29
|
await cache.removeItem(key).catch(() => {
|
|
29
30
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<any
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
|
|
2
2
|
export default _default;
|
|
@@ -31,7 +31,7 @@ export default defineEventHandler(async (e) => {
|
|
|
31
31
|
const { enabled: cacheEnabled, cachedItem, update } = await useNitroCache(e, "nuxt-og-image", {
|
|
32
32
|
key,
|
|
33
33
|
cacheTtl: options.cacheTtl || 0,
|
|
34
|
-
cache: process.dev && options.cache,
|
|
34
|
+
cache: !process.dev && options.cache,
|
|
35
35
|
headers: true
|
|
36
36
|
});
|
|
37
37
|
let png;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<string | undefined
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<string | undefined>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<{
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
|
|
2
2
|
siteConfigUrl: {
|
|
3
3
|
value: any;
|
|
4
4
|
source: any;
|
|
@@ -7,5 +7,5 @@ declare const _default: import("h3").EventHandler<{
|
|
|
7
7
|
runtimeConfig: any;
|
|
8
8
|
baseCacheKey: string;
|
|
9
9
|
cachedKeys: string[];
|
|
10
|
-
}
|
|
10
|
+
}>>;
|
|
11
11
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<string | void
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<string | void>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OgImageOptions } from '../../types';
|
|
2
|
-
declare const _default: import("h3").EventHandler<false | OgImageOptions
|
|
2
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<false | OgImageOptions>>;
|
|
3
3
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<any
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<any
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
|
|
2
2
|
export default _default;
|
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.
|
|
4
|
+
"version": "2.0.19",
|
|
5
|
+
"packageManager": "pnpm@8.7.0",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nuxt/kit": "^3.
|
|
30
|
+
"@nuxt/kit": "^3.7.0",
|
|
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
|
-
"birpc": "^0.2.
|
|
34
|
+
"birpc": "^0.2.13",
|
|
35
35
|
"chalk": "^5.3.0",
|
|
36
36
|
"chrome-launcher": "^1.0.0",
|
|
37
37
|
"defu": "^6.1.2",
|
|
38
|
-
"execa": "^
|
|
38
|
+
"execa": "^8.0.1",
|
|
39
39
|
"fast-glob": "^3.3.1",
|
|
40
40
|
"flatted": "^3.2.7",
|
|
41
41
|
"fs-extra": "^11.1.1",
|
|
@@ -43,43 +43,40 @@
|
|
|
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.
|
|
48
|
-
"nypm": "^0.
|
|
49
|
-
"ofetch": "^1.
|
|
46
|
+
"nuxt-site-config": "^1.0.11",
|
|
47
|
+
"nuxt-site-config-kit": "^1.0.11",
|
|
48
|
+
"nypm": "^0.3.1",
|
|
49
|
+
"ofetch": "^1.3.3",
|
|
50
50
|
"ohash": "^1.1.3",
|
|
51
51
|
"pathe": "^1.1.1",
|
|
52
|
-
"playwright-core": "^1.
|
|
53
|
-
"radix3": "^1.0
|
|
54
|
-
"satori": "0.10.
|
|
52
|
+
"playwright-core": "^1.37.1",
|
|
53
|
+
"radix3": "^1.1.0",
|
|
54
|
+
"satori": "0.10.3",
|
|
55
55
|
"satori-html": "^0.3.2",
|
|
56
56
|
"sirv": "^2.0.3",
|
|
57
|
-
"std-env": "^3.
|
|
57
|
+
"std-env": "^3.4.3",
|
|
58
58
|
"svg2png-wasm": "^1.4.0",
|
|
59
59
|
"tinyws": "^0.1.0",
|
|
60
60
|
"twemoji": "^14.0.2",
|
|
61
|
-
"ufo": "^1.
|
|
61
|
+
"ufo": "^1.3.0",
|
|
62
62
|
"ws": "^8.13.0",
|
|
63
63
|
"yoga-wasm-web": "^0.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@antfu/eslint-config": "^0.
|
|
67
|
-
"@nuxt/devtools
|
|
66
|
+
"@antfu/eslint-config": "^0.41.0",
|
|
67
|
+
"@nuxt/devtools": "0.8.0",
|
|
68
68
|
"@nuxt/module-builder": "^0.4.0",
|
|
69
|
-
"@nuxt/test-utils": "3.
|
|
69
|
+
"@nuxt/test-utils": "3.7.0",
|
|
70
70
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
71
71
|
"@types/ws": "^8.5.5",
|
|
72
|
-
"bumpp": "^9.
|
|
73
|
-
"eslint": "8.
|
|
72
|
+
"bumpp": "^9.2.0",
|
|
73
|
+
"eslint": "8.48.0",
|
|
74
74
|
"jest-image-snapshot": "^6.2.0",
|
|
75
|
-
"nuxt": "^3.
|
|
75
|
+
"nuxt": "^3.7.0",
|
|
76
76
|
"nuxt-icon": "^0.5.0",
|
|
77
|
-
"playwright": "^1.
|
|
78
|
-
"sass": "^1.
|
|
79
|
-
"vitest": "^0.34.
|
|
80
|
-
},
|
|
81
|
-
"resolutions": {
|
|
82
|
-
"@nuxt/schema": "3.6.2"
|
|
77
|
+
"playwright": "^1.37.1",
|
|
78
|
+
"sass": "^1.66.1",
|
|
79
|
+
"vitest": "^0.34.3"
|
|
83
80
|
},
|
|
84
81
|
"scripts": {
|
|
85
82
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client",
|