Skip to content

Commit

Permalink
Merge pull request #4 from aaharu/follow-og-0.1.0
Browse files Browse the repository at this point in the history
chore: follow @vercel/[email protected]
  • Loading branch information
ascorbic authored Mar 2, 2023
2 parents ef0d1fb + 91ea646 commit d533ef8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function handler(req: Request) {
serve(handler);
```

Then run `deno run --allow-net=:8000,fonts.googleapis.com,fonts.gstatic.com,cdn.jsdelivr.net --allow-env og.tsx`
Then run `deno run --allow-net --allow-env og.tsx`

Read more about the API, supported features and check out the examples in the
following sections.
Expand Down
2 changes: 1 addition & 1 deletion emoji.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const apis = {
twemoji: (code: string) =>
"https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/" + code.toLowerCase() + ".svg",
"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/" + code.toLowerCase() + ".svg",
openmoji: "https://cdn.jsdelivr.net/npm/@svgmoji/[email protected]/svg/",
blobmoji: "https://cdn.jsdelivr.net/npm/@svgmoji/[email protected]/svg/",
noto:
Expand Down
7 changes: 4 additions & 3 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ReactElement } from "https://esm.sh/[email protected]";

import type { SatoriOptions } from "https://esm.sh/[email protected]";

import satori, { init as initSatori } from "https://esm.sh/[email protected]/wasm";
Expand Down Expand Up @@ -28,15 +29,15 @@ declare module "https://esm.sh/[email protected]" {
}

const resvg_wasm = fetch(
"https://cdn.jsdelivr.net/npm/@vercel/og@0.0.25/vendor/resvg.simd.wasm",
"https://cdn.jsdelivr.net/npm/@vercel/og@0.1.0/vendor/resvg.simd.wasm",
).then((res) => res.arrayBuffer());

const yoga_wasm = fetch(
"https://cdn.jsdelivr.net/npm/@vercel/og@0.0.25/vendor/yoga.wasm",
"https://cdn.jsdelivr.net/npm/@vercel/og@0.1.0/vendor/yoga.wasm",
);

const fallbackFont = fetch(
"https://cdn.jsdelivr.net/npm/@vercel/og@0.0.25/vendor/noto-sans-v27-latin-regular.ttf",
"https://cdn.jsdelivr.net/npm/@vercel/og@0.1.0/vendor/noto-sans-v27-latin-regular.ttf",
).then((a) => a.arrayBuffer());

const initializedResvg = initWasm(resvg_wasm);
Expand Down

0 comments on commit d533ef8

Please sign in to comment.