nuxt-og-image 3.0.0-rc.32 → 3.0.0-rc.34

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,6 +1,4 @@
1
- import { setHeader } from "h3";
2
1
  import { prefixStorage } from "unstorage";
3
- import { getExtension } from "../../../pure.mjs";
4
2
  import { useNitroOrigin, useStorage } from "#imports";
5
3
  const assets = prefixStorage(useStorage(), "/assets");
6
4
  export async function loadFont({ e }, font) {
@@ -8,8 +6,7 @@ export async function loadFont({ e }, font) {
8
6
  if (font.data)
9
7
  return font;
10
8
  if (font.key && await assets.hasItem(font.key)) {
11
- setHeader(e, "Content-Type", `font/${getExtension(font.path)}`);
12
- const fontData = await assets.getItemRaw(font.key);
9
+ const fontData = await assets.getItem(font.key);
13
10
  font.data = Buffer.from(fontData, "base64");
14
11
  return font;
15
12
  }
@@ -118,6 +118,7 @@ export interface FontConfig {
118
118
  weight?: string | number;
119
119
  path?: string;
120
120
  key?: string;
121
+ absolutePath?: boolean;
121
122
  }
122
123
  export interface ResolvedFontConfig extends FontConfig {
123
124
  cacheKey: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "3.0.0-rc.32",
4
+ "version": "3.0.0-rc.34",
5
5
  "packageManager": "pnpm@8.15.1",
6
6
  "description": "Enlightened OG Image generation for Nuxt.",
7
7
  "author": {
@@ -1 +0,0 @@
1
- {"id":"79d607f6-b171-4ce5-99be-52f02213b160","timestamp":1706771224767,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}