nuxt-og-image 3.0.5 → 3.0.6

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.
@@ -272,5 +272,5 @@
272
272
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C8Z5-t5y.js">
273
273
  <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.CqHIQwTo.css">
274
274
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/rcTrcRWB.js">
275
- <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729058980608,false]</script>
276
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"59aafbab-e31b-49a3-b8fb-14e88be53959",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
275
+ <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729059443015,false]</script>
276
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"1c6351cf-9fce-42b7-83f6-082f24455f16",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -272,5 +272,5 @@
272
272
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C8Z5-t5y.js">
273
273
  <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.CqHIQwTo.css">
274
274
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/rcTrcRWB.js">
275
- <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729058980608,false]</script>
276
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"59aafbab-e31b-49a3-b8fb-14e88be53959",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
275
+ <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729059443015,false]</script>
276
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"1c6351cf-9fce-42b7-83f6-082f24455f16",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- {"id":"59aafbab-e31b-49a3-b8fb-14e88be53959","timestamp":1729058938033}
1
+ {"id":"1c6351cf-9fce-42b7-83f6-082f24455f16","timestamp":1729059411704}
@@ -0,0 +1 @@
1
+ {"id":"1c6351cf-9fce-42b7-83f6-082f24455f16","timestamp":1729059411704,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -272,5 +272,5 @@
272
272
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C8Z5-t5y.js">
273
273
  <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.CqHIQwTo.css">
274
274
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/rcTrcRWB.js">
275
- <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729058980608,false]</script>
276
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"59aafbab-e31b-49a3-b8fb-14e88be53959",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
275
+ <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729059443015,false]</script>
276
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"1c6351cf-9fce-42b7-83f6-082f24455f16",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "3.0.4",
8
+ "version": "3.0.5",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -225,14 +225,16 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
225
225
  wasmEntries.push(resolve(dirname(serverEntry), "./chunks/_/wasm.mjs"));
226
226
  wasmEntries.push(resolve(dirname(serverEntry), "./chunks/index_bg.mjs"));
227
227
  const routesPath = resolve(nitro.options.output.publicDir, "_routes.json");
228
- const routes = await readFile(routesPath).then((buffer) => JSON.parse(buffer.toString()));
229
- const preSize = routes.exclude.length;
230
- routes.exclude = routes.exclude.filter((path) => !path.startsWith("/__og-image__/static"));
231
- routes.exclude.push("/__og-image__/static/*");
232
- if (preSize !== routes.exclude.length) {
233
- logger.info(`Optimizing CloudFlare \`_routes.json\` for prerendered OG Images ${gray(`(${100 - Math.round(routes.exclude.length / preSize * 100)}% smaller)`)}`);
228
+ if (existsSync(routesPath)) {
229
+ const routes = await readFile(routesPath).then((buffer) => JSON.parse(buffer.toString()));
230
+ const preSize = routes.exclude.length;
231
+ routes.exclude = routes.exclude.filter((path) => !path.startsWith("/__og-image__/static"));
232
+ routes.exclude.push("/__og-image__/static/*");
233
+ if (preSize !== routes.exclude.length) {
234
+ logger.info(`Optimizing CloudFlare \`_routes.json\` for prerendered OG Images ${gray(`(${100 - Math.round(routes.exclude.length / preSize * 100)}% smaller)`)}`);
235
+ }
236
+ await writeFile(routesPath, JSON.stringify(routes, void 0, 2));
234
237
  }
235
- await writeFile(routesPath, JSON.stringify(routes, void 0, 2));
236
238
  }
237
239
  const resvgHash = await resolveFilePathSha1("@resvg/resvg-wasm/index_bg.wasm");
238
240
  const yogaHash = await resolveFilePathSha1("yoga-wasm-web/dist/yoga.wasm");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "3.0.5",
4
+ "version": "3.0.6",
5
5
  "description": "Enlightened OG Image generation for Nuxt.",
6
6
  "author": {
7
7
  "website": "https://harlanzw.com",
@@ -1 +0,0 @@
1
- {"id":"59aafbab-e31b-49a3-b8fb-14e88be53959","timestamp":1729058938033,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}