nuxt-og-image 3.0.0-beta.17 → 3.0.0-beta.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 +4 -4
- package/dist/client/404.html +4 -4
- package/dist/client/_nuxt/{IconCSS.f28630e8.js → IconCSS.87bcb0f3.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5e27be75-aebe-490c-9568-17ec11c8309b.json +1 -0
- package/dist/client/_nuxt/{entry.a173a47f.js → entry.a0f1ce5f.js} +3 -3
- package/dist/client/_nuxt/{error-404.0a39dc18.js → error-404.2d763c3f.js} +1 -1
- package/dist/client/_nuxt/{error-500.c10b453e.js → error-500.c22eee32.js} +1 -1
- package/dist/client/index.html +4 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +20 -15
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/589941de-a30a-47dc-9316-0b535d087e4e.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,u as n,o as r,c as l,a as e,t as s,b as d,w as c,d as p,e as f,p as x,f as h}from"./entry.
|
|
1
|
+
import{_ as a,u as n,o as r,c as l,a as e,t as s,b as d,w as c,d as p,e as f,p as x,f as h}from"./entry.a0f1ce5f.js";const m=t=>(x("data-v-05a2b8a3"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-05a2b8a3"]]);export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.
|
|
1
|
+
import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.a0f1ce5f.js";const c=t=>(l("data-v-c967d9a9"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(u,b)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(x,[["__scopeId","data-v-c967d9a9"]]);export{w as default};
|
package/dist/client/index.html
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.3a009184.css">
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.a0f1ce5f.js">
|
|
7
7
|
<link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-404.b751fa02.css">
|
|
8
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.
|
|
8
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.2d763c3f.js">
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-500.69009e70.css">
|
|
10
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.
|
|
11
|
-
<script type="module" src="/__nuxt-og-image/_nuxt/entry.
|
|
10
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.c22eee32.js">
|
|
11
|
+
<script type="module" src="/__nuxt-og-image/_nuxt/entry.a0f1ce5f.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(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 d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
12
12
|
</script></head>
|
|
13
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
14
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { useNuxt, createResolver, addTemplate, resolvePath, defineNuxtModule, useLogger, hasNuxtModule, addServerPlugin, addPlugin, addServerHandler, addImports, addComponentsDir, addComponent } from '@nuxt/kit';
|
|
4
4
|
import { installNuxtSiteConfig } from 'nuxt-site-config-kit';
|
|
5
|
-
import { provider, env } from 'std-env';
|
|
5
|
+
import { provider, env, isDevelopment } from 'std-env';
|
|
6
6
|
import { hash } from 'ohash';
|
|
7
7
|
import { relative } from 'pathe';
|
|
8
8
|
import 'nypm';
|
|
@@ -11,7 +11,7 @@ import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
|
11
11
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
12
12
|
import { createHash } from 'node:crypto';
|
|
13
13
|
|
|
14
|
-
const version = "3.0.0-beta.
|
|
14
|
+
const version = "3.0.0-beta.19";
|
|
15
15
|
|
|
16
16
|
const autodetectableProviders = {
|
|
17
17
|
azure_static: "azure",
|
|
@@ -43,8 +43,10 @@ const cloudflare = {
|
|
|
43
43
|
"resvg": "wasm",
|
|
44
44
|
"satori": "node",
|
|
45
45
|
"sharp": false
|
|
46
|
+
},
|
|
47
|
+
wasm: {
|
|
48
|
+
esmImport: true
|
|
46
49
|
}
|
|
47
|
-
// nitro configures wasm
|
|
48
50
|
};
|
|
49
51
|
const awsLambda = {
|
|
50
52
|
bindings: {
|
|
@@ -62,10 +64,10 @@ const RuntimeCompatibility = {
|
|
|
62
64
|
"stackblitz": {
|
|
63
65
|
bindings: {
|
|
64
66
|
"chromium": false,
|
|
65
|
-
"css-inline":
|
|
67
|
+
"css-inline": false,
|
|
66
68
|
"resvg": "wasm",
|
|
67
|
-
"satori": "
|
|
68
|
-
"sharp":
|
|
69
|
+
"satori": "wasm",
|
|
70
|
+
"sharp": false
|
|
69
71
|
}
|
|
70
72
|
},
|
|
71
73
|
"aws-lambda": awsLambda,
|
|
@@ -73,7 +75,7 @@ const RuntimeCompatibility = {
|
|
|
73
75
|
"netlify-edge": {
|
|
74
76
|
bindings: {
|
|
75
77
|
"chromium": false,
|
|
76
|
-
"css-inline":
|
|
78
|
+
"css-inline": false,
|
|
77
79
|
"resvg": "wasm",
|
|
78
80
|
"satori": "node",
|
|
79
81
|
"sharp": false
|
|
@@ -276,13 +278,17 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
|
|
|
276
278
|
});
|
|
277
279
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
278
280
|
nitro.hooks.hook("compiled", async (_nitro) => {
|
|
281
|
+
const target = resolveNitroPreset(_nitro.options);
|
|
282
|
+
const compatibility = getPresetNitroPresetCompatibility(target);
|
|
283
|
+
if (compatibility.wasm?.esmImport !== true)
|
|
284
|
+
return;
|
|
279
285
|
const configuredEntry = nitro.options.rollupConfig?.output.entryFileNames;
|
|
280
286
|
const serverEntry = resolve(_nitro.options.output.serverDir, typeof configuredEntry === "string" ? configuredEntry : "index.mjs");
|
|
281
287
|
const contents = await readFile(serverEntry, "utf-8");
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
const postfix =
|
|
285
|
-
await writeFile(serverEntry, contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm"', `"./wasm/index_bg-${
|
|
288
|
+
const resvgHash = sha1(await readFile(await resolvePath("@resvg/resvg-wasm/index_bg.wasm")));
|
|
289
|
+
const yogaHash = sha1(await readFile(await resolvePath("yoga-wasm-web/dist/yoga.wasm")));
|
|
290
|
+
const postfix = target === "vercel-edge" ? "?module" : "";
|
|
291
|
+
await writeFile(serverEntry, contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm"', `"./wasm/index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm"', `"./wasm/yoga-${yogaHash}.wasm${postfix}"`), { encoding: "utf-8" });
|
|
286
292
|
});
|
|
287
293
|
});
|
|
288
294
|
}
|
|
@@ -312,12 +318,11 @@ const module = defineNuxtModule({
|
|
|
312
318
|
cacheMaxAgeSeconds: 60 * 60 * 24 * 3
|
|
313
319
|
},
|
|
314
320
|
componentDirs: ["OgImage", "OgImageTemplate"],
|
|
315
|
-
runtimeSatori: true,
|
|
316
|
-
runtimeBrowser: nuxt.options.dev,
|
|
317
321
|
fonts: [],
|
|
318
322
|
runtimeCacheStorage: true,
|
|
319
|
-
|
|
320
|
-
|
|
323
|
+
runtimeSatori: true,
|
|
324
|
+
runtimeBrowser: nuxt.options.dev,
|
|
325
|
+
debug: isDevelopment
|
|
321
326
|
};
|
|
322
327
|
},
|
|
323
328
|
async setup(config, nuxt) {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"589941de-a30a-47dc-9316-0b535d087e4e","timestamp":1701495685631,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|