nuxt-og-image 2.0.0-beta.41 → 2.0.0-beta.42

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/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "2.0.0-beta.41"
8
+ "version": "2.0.0-beta.42"
9
9
  }
package/dist/module.mjs CHANGED
@@ -569,6 +569,22 @@ export async function useProvider(provider) {
569
569
  contents = contents.replace(".cwd(),", '?.cwd || "/",');
570
570
  updated = true;
571
571
  }
572
+ if (_nitro.options.preset.includes("netlify") && path.endsWith("netlify.mjs")) {
573
+ const match = "// TODO: handle event.isBase64Encoded\n });";
574
+ contents = contents.replace(match, `${match}
575
+
576
+ const headers = normalizeOutgoingHeaders(r.headers);
577
+ // image buffers must be base64 encoded
578
+ if (Buffer.isBuffer(r.body) && headers["content-type"].startsWith("image/")) {
579
+ return {
580
+ statusCode: r.status,
581
+ headers,
582
+ body: r.body.toString("base64"),
583
+ isBase64Encoded: true
584
+ };
585
+ }`);
586
+ updated = true;
587
+ }
572
588
  for (const wasm of Wasms) {
573
589
  if (contents.includes(wasm.placeholder)) {
574
590
  if (nitroCompatibility.wasm === "import") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.41",
4
+ "version": "2.0.0-beta.42",
5
5
  "packageManager": "pnpm@8.6.0",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",