nuxt-og-image 2.0.12 → 2.0.14
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.382836c9.css +1 -0
- package/dist/client/_nuxt/IconCSS.cbce4ce0.js +1 -0
- package/dist/client/_nuxt/{ImageLoader.895a1b72.js → ImageLoader.17ab6fa9.js} +1 -1
- package/dist/client/_nuxt/{entry.7e203440.js → entry.4641b20a.js} +59 -59
- package/dist/client/_nuxt/{entry.1311cc29.css → entry.7047f7e9.css} +1 -1
- package/dist/client/_nuxt/{error-404.2ab5a8c7.js → error-404.d560cacd.js} +1 -1
- package/dist/client/_nuxt/{error-500.3a4cb038.js → error-500.9ac1270b.js} +1 -1
- package/dist/client/_nuxt/{index.bf324f21.js → index.e14010ca.js} +1 -1
- package/dist/client/_nuxt/{options.a57c7b26.js → options.a9579927.js} +1 -1
- package/dist/client/_nuxt/{png.624e5d30.js → png.5c5a5e35.js} +1 -1
- package/dist/client/_nuxt/{shiki.ead6ae48.js → shiki.bb5712bc.js} +1 -1
- package/dist/client/_nuxt/{svg.1d6be239.js → svg.c0191f89.js} +1 -1
- package/dist/client/_nuxt/{vnodes.720c63a9.js → vnodes.d2becdad.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/options/index.html +2 -2
- package/dist/client/png/index.html +2 -2
- package/dist/client/svg/index.html +2 -2
- package/dist/client/vnodes/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/cache.mjs +11 -10
- package/dist/runtime/nitro/routes/debug.d.ts +2 -0
- package/dist/runtime/nitro/routes/debug.mjs +7 -2
- package/package.json +13 -13
- package/dist/client/_nuxt/IconCSS.65ba4a11.js +0 -1
- package/dist/client/_nuxt/IconCSS.b41b9663.css +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
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"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.4641b20a.js"><link rel="preload" as="style" href="/__nuxt_og_image__/client/_nuxt/entry.7047f7e9.css"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.f3dd5020.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-404.d560cacd.js"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.06915589.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-500.9ac1270b.js"><link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.7047f7e9.css"><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
5
|
</script></head>
|
|
6
|
-
<body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.
|
|
6
|
+
<body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.4641b20a.js" crossorigin></script></body>
|
|
7
7
|
</html>
|
|
@@ -1,7 +1,7 @@
|
|
|
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"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.4641b20a.js"><link rel="preload" as="style" href="/__nuxt_og_image__/client/_nuxt/entry.7047f7e9.css"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.f3dd5020.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-404.d560cacd.js"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.06915589.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-500.9ac1270b.js"><link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.7047f7e9.css"><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
5
|
</script></head>
|
|
6
|
-
<body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.
|
|
6
|
+
<body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.4641b20a.js" crossorigin></script></body>
|
|
7
7
|
</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.14";
|
|
24
24
|
|
|
25
25
|
async function createBrowser() {
|
|
26
26
|
if (process.dev || process.env.prerender) {
|
package/dist/runtime/cache.mjs
CHANGED
|
@@ -9,21 +9,22 @@ export async function useNitroCache(e, module, options) {
|
|
|
9
9
|
const key = options.key;
|
|
10
10
|
let xCacheHeader = "MISS";
|
|
11
11
|
let xCacheExpires = 0;
|
|
12
|
+
const newExpires = Date.now() + (options.cacheTtl || 0);
|
|
12
13
|
const purge = typeof getQuery(e).purge !== "undefined";
|
|
13
14
|
let cachedItem = false;
|
|
14
15
|
if (!options.skipRestore && enabled && await cache.hasItem(key).catch(() => false)) {
|
|
15
16
|
const { value, expiresAt } = await cache.getItem(key).catch(() => ({ value: null, expiresAt: Date.now() }));
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
17
|
+
if (purge) {
|
|
18
|
+
xCacheHeader = "PURGE";
|
|
19
|
+
xCacheExpires = newExpires;
|
|
20
|
+
await cache.removeItem(key).catch(() => {
|
|
21
|
+
});
|
|
22
|
+
} else if (expiresAt > Date.now()) {
|
|
23
|
+
xCacheHeader = "HIT";
|
|
24
|
+
xCacheExpires = newExpires;
|
|
25
|
+
cachedItem = value;
|
|
26
26
|
} else {
|
|
27
|
+
xCacheExpires = expiresAt;
|
|
27
28
|
await cache.removeItem(key).catch(() => {
|
|
28
29
|
});
|
|
29
30
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { defineEventHandler, setHeader } from "h3";
|
|
2
|
-
import {
|
|
2
|
+
import { prefixStorage } from "unstorage";
|
|
3
|
+
import { useRuntimeConfig, useSiteConfig, useStorage } from "#imports";
|
|
3
4
|
export default defineEventHandler(async (e) => {
|
|
4
5
|
setHeader(e, "Content-Type", "application/json");
|
|
5
6
|
const runtimeConfig = useRuntimeConfig()["nuxt-og-image"];
|
|
6
7
|
const siteConfig = await useSiteConfig(e);
|
|
8
|
+
const baseCacheKey = runtimeCacheStorage === "default" ? `/cache/nuxt-og-image@${runtimeConfig.version}` : `/nuxt-og-image@${runtimeConfig.version}`;
|
|
9
|
+
const cache = prefixStorage(useStorage(), `${baseCacheKey}/`);
|
|
7
10
|
return {
|
|
8
11
|
siteConfigUrl: {
|
|
9
12
|
value: siteConfig.url,
|
|
10
13
|
source: siteConfig._context.url || "unknown"
|
|
11
14
|
},
|
|
12
|
-
|
|
15
|
+
dev: process.dev,
|
|
16
|
+
runtimeConfig,
|
|
17
|
+
cachedKeys: await cache.keys()
|
|
13
18
|
};
|
|
14
19
|
});
|
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.14",
|
|
5
|
+
"packageManager": "pnpm@8.6.12",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"types": "./dist/types.d.ts",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"import": "./dist/module.mjs",
|
|
21
|
+
"require": "./dist/module.cjs"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/module.cjs",
|
|
@@ -43,15 +43,15 @@
|
|
|
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.10",
|
|
47
|
+
"nuxt-site-config-kit": "^1.0.10",
|
|
48
48
|
"nypm": "^0.2.2",
|
|
49
49
|
"ofetch": "^1.1.1",
|
|
50
|
-
"ohash": "^1.1.
|
|
50
|
+
"ohash": "^1.1.3",
|
|
51
51
|
"pathe": "^1.1.1",
|
|
52
52
|
"playwright-core": "^1.36.2",
|
|
53
53
|
"radix3": "^1.0.1",
|
|
54
|
-
"satori": "0.10.
|
|
54
|
+
"satori": "0.10.2",
|
|
55
55
|
"satori-html": "^0.3.2",
|
|
56
56
|
"sirv": "^2.0.3",
|
|
57
57
|
"std-env": "^3.3.3",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"yoga-wasm-web": "^0.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@antfu/eslint-config": "^0.
|
|
67
|
-
"@nuxt/devtools-edge": "0.
|
|
66
|
+
"@antfu/eslint-config": "^0.40.2",
|
|
67
|
+
"@nuxt/devtools-edge": "0.7.4-28188711.761b349",
|
|
68
68
|
"@nuxt/module-builder": "^0.4.0",
|
|
69
69
|
"@nuxt/test-utils": "3.6.5",
|
|
70
70
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"eslint": "8.46.0",
|
|
74
74
|
"jest-image-snapshot": "^6.2.0",
|
|
75
75
|
"nuxt": "^3.6.5",
|
|
76
|
-
"nuxt-icon": "^0.
|
|
76
|
+
"nuxt-icon": "^0.5.0",
|
|
77
77
|
"playwright": "^1.36.2",
|
|
78
|
-
"sass": "^1.
|
|
79
|
-
"vitest": "^0.
|
|
78
|
+
"sass": "^1.65.1",
|
|
79
|
+
"vitest": "^0.34.1"
|
|
80
80
|
},
|
|
81
81
|
"resolutions": {
|
|
82
82
|
"@nuxt/schema": "3.6.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r,H as u,I as p,n as t,o as l,c as _,s as f,_ as m}from"./entry.7e203440.js";const d=r({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(a){const s=a;u(e=>({"193e663e":i.value}));const n=p();n?.nuxtIcon?.aliases;const c=t(()=>(n?.nuxtIcon?.aliases||{})[s.name]||s.name),i=t(()=>`url('https://api.iconify.design/${c.value.replace(":","/")}.svg')`),o=t(()=>{if(!s.size&&typeof n.nuxtIcon?.size=="boolean"&&!n.nuxtIcon?.size)return;const e=s.size||n.nuxtIcon?.size||"1em";return String(Number(e))===e?`${e}px`:e});return(e,x)=>(l(),_("span",{style:f({width:o.value,height:o.value})},null,4))}});const g=m(d,[["__scopeId","data-v-1172c8f8"]]);export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
span[data-v-1172c8f8]{background-color:currentColor;display:inline-block;-webkit-mask-image:var(--193e663e);mask-image:var(--193e663e);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle}
|