@vercel/og 0.5.7 → 0.5.8

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.
@@ -14328,7 +14328,7 @@ var Sa = P((fo) => {
14328
14328
  for (var n in t)
14329
14329
  Object.defineProperty(e, n, { enumerable: true, get: t[n] });
14330
14330
  }
14331
- wh(fo, { normalize: () => rt, url: () => wa, number: () => _h, percentage: () => Ea, length: () => Ca, lineWidth: () => Th, shadow: () => Ah, color: () => Oh, image: () => Ph, gradient: () => _a3, position: () => Rh, familyName: () => Lh, genericName: () => Nh, absoluteSize: () => Wh, relativeSize: () => Uh });
14331
+ wh(fo, { normalize: () => rt, url: () => wa, number: () => _h, percentage: () => Ea, length: () => Ca, lineWidth: () => Th, shadow: () => Ah, color: () => Oh, image: () => Ph, gradient: () => _a2, position: () => Rh, familyName: () => Lh, genericName: () => Nh, absoluteSize: () => Wh, relativeSize: () => Uh });
14332
14332
  var Eh = no(), Ch = ya(), lo = ["min", "max", "clamp", "calc"], Fa = /,(?![^(]*\))/g, mn = /_(?![^(]*\))/g;
14333
14333
  function rt(e, t = true) {
14334
14334
  return e.includes("url(") ? e.split(/(url\(.*?\))/g).filter(Boolean).map((n) => /^url\(.*?\)$/.test(n) ? n : rt(n, false)).join("") : (e = e.replace(/([^\\])_+/g, (n, r) => r + " ".repeat(n.length - 1)).replace(/^_/g, " ").replace(/\\_/g, "_"), t && (e = e.trim()), e = e.replace(/(calc|min|max|clamp)\(.+\)/g, (n) => n.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ")), e);
@@ -14363,10 +14363,10 @@ var Sa = P((fo) => {
14363
14363
  }
14364
14364
  function Ph(e) {
14365
14365
  let t = 0;
14366
- return e.split(Fa).every((r) => (r = rt(r), r.startsWith("var(") ? true : wa(r) || _a3(r) || ["element(", "image(", "cross-fade(", "image-set("].some((i) => r.startsWith(i)) ? (t++, true) : false)) ? t > 0 : false;
14366
+ return e.split(Fa).every((r) => (r = rt(r), r.startsWith("var(") ? true : wa(r) || _a2(r) || ["element(", "image(", "cross-fade(", "image-set("].some((i) => r.startsWith(i)) ? (t++, true) : false)) ? t > 0 : false;
14367
14367
  }
14368
14368
  var Ih = /* @__PURE__ */ new Set(["linear-gradient", "radial-gradient", "repeating-linear-gradient", "repeating-radial-gradient", "conic-gradient"]);
14369
- function _a3(e) {
14369
+ function _a2(e) {
14370
14370
  e = rt(e);
14371
14371
  for (let t of Ih)
14372
14372
  if (e.startsWith(`${t}(`))
@@ -18814,8 +18814,6 @@ var yoga_wasm = fs.readFileSync(fileURLToPath(`${import.meta.url}/../yoga.wasm`)
18814
18814
  var resvg_wasm = fs.readFileSync(fileURLToPath(`${import.meta.url}/../resvg.wasm`));
18815
18815
  var initializedResvg = initWasm(resvg_wasm);
18816
18816
  var initializedYoga = initYoga(yoga_wasm).then((yoga2) => Ll(yoga2));
18817
- var _a2, _b2;
18818
- var isDev = ((_b2 = (_a2 = globalThis == null ? void 0 : globalThis.process) == null ? void 0 : _a2.env) == null ? void 0 : _b2.NODE_ENV) === "development";
18819
18817
  var ImageResponse = class {
18820
18818
  constructor(element, options = {}) {
18821
18819
  if (typeof Response === "undefined" || typeof ReadableStream === "undefined") {
@@ -18841,7 +18839,7 @@ var ImageResponse = class {
18841
18839
  return new Response(result, {
18842
18840
  headers: {
18843
18841
  "content-type": "image/png",
18844
- "cache-control": isDev ? "no-cache, no-store" : "public, immutable, no-transform, max-age=31536000",
18842
+ "cache-control": process.env.NODE_ENV === "development" ? "no-cache, no-store" : "public, immutable, no-transform, max-age=31536000",
18845
18843
  ...options.headers
18846
18844
  },
18847
18845
  status: options.status,