Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add badge endpoint

Vasek Mlejnsky3802bbb9f5c1
diff --git a/components/Badge.tsx b/components/Badge.tsx
new file mode 100644
index 000000000..17f8fb337
--- /dev/null
+++ b/components/Badge.tsx
@@ -0,0 +1,10 @@
+function Badge() {
+ return (
+ <svg width="141" height="30" viewBox="0 0 141 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="0.5" y="0.5" width="140" height="29" rx="7.5" fill="#F2F2F2" stroke="#6366F1"/>
+ <path d="M16.826 19V8.794H21.74C22.9253 8.794 23.9147 9.00867 24.708 9.438C25.5013 9.858 26.0987 10.4507 26.5 11.216C26.9013 11.9813 27.102 12.8773 27.102 13.904C27.102 14.7253 26.976 15.458 26.724 16.102C26.4813 16.7367 26.1267 17.2687 25.66 17.698C25.1933 18.1273 24.6287 18.454 23.966 18.678C23.3033 18.8927 22.5613 19 21.74 19H16.826ZM19.262 17.096H21.264C21.852 17.096 22.356 17.026 22.776 16.886C23.2053 16.7367 23.5553 16.522 23.826 16.242C24.106 15.962 24.3113 15.6213 24.442 15.22C24.5727 14.8187 24.638 14.366 24.638 13.862C24.638 13.0967 24.498 12.4853 24.218 12.028C23.938 11.5613 23.546 11.2207 23.042 11.006C22.538 10.7913 21.9453 10.684 21.264 10.684H19.262V17.096ZM32.384 19.126C31.4694 19.126 30.676 18.972 30.004 18.664C29.332 18.356 28.8094 17.9173 28.436 17.348C28.0627 16.7787 27.876 16.0927 27.876 15.29C27.876 14.4593 28.0627 13.7547 28.436 13.176C28.8187 12.588 29.3414 12.14 30.004 11.832C30.676 11.5147 31.46 11.356 32.356 11.356C33.308 11.356 34.1154 11.5333 34.778 11.888C35.45 12.2333 35.9494 12.7327 36.276 13.386C36.612 14.0393 36.7474 14.828 36.682 15.752H30.242C30.2514 16.116 30.3447 16.4333 30.522 16.704C30.7087 16.9747 30.9607 17.1847 31.278 17.334C31.6047 17.474 31.992 17.544 32.44 17.544C32.9534 17.544 33.3874 17.46 33.742 17.292C34.106 17.1147 34.3394 16.886 34.442 16.606H36.668C36.6027 17.1007 36.374 17.5393 35.982 17.922C35.5994 18.3047 35.0954 18.6033 34.47 18.818C33.854 19.0233 33.1587 19.126 32.384 19.126ZM30.186 14.59L30.102 14.464H34.47L34.358 14.576C34.3487 14.2493 34.2647 13.9647 34.106 13.722C33.9474 13.4793 33.7187 13.2927 33.42 13.162C33.1307 13.0313 32.7714 12.966 32.342 12.966C31.9314 12.966 31.572 13.0313 31.264 13.162C30.956 13.2833 30.7087 13.4653 30.522 13.708C30.3447 13.9507 30.2327 14.2447 30.186 14.59ZM37.7684 21.338V11.496H39.9944L40.0644 12.672H40.1624C40.3864 12.2893 40.7317 11.9767 41.1984 11.734C41.665 11.4913 42.2577 11.37 42.9764 11.37C43.527 11.37 44.0264 11.4633 44.4744 11.65C44.9224 11.8273 45.3097 12.084 45.6364 12.42C45.963 12.756 46.215 13.162 46.3924 13.638C46.5697 14.114 46.6584 14.6507 46.6584 15.248C46.6584 16.0413 46.5044 16.7273 46.1964 17.306C45.8884 17.8847 45.459 18.3373 44.9084 18.664C44.3577 18.9813 43.709 19.14 42.9624 19.14C42.5517 19.14 42.1644 19.084 41.8004 18.972C41.4457 18.86 41.133 18.706 40.8624 18.51C40.5917 18.3047 40.3724 18.0667 40.2044 17.796H40.1204V21.338H37.7684ZM42.2484 17.348C42.659 17.348 43.0137 17.2687 43.3124 17.11C43.6204 16.942 43.8584 16.704 44.0264 16.396C44.2037 16.0787 44.2924 15.696 44.2924 15.248C44.2924 14.8 44.2084 14.422 44.0404 14.114C43.8724 13.806 43.6344 13.5727 43.3264 13.414C43.0184 13.246 42.659 13.162 42.2484 13.162C41.8097 13.162 41.427 13.246 41.1004 13.414C40.783 13.582 40.5404 13.8107 40.3724 14.1C40.2044 14.38 40.1204 14.6973 40.1204 15.052V15.416C40.1204 15.6773 40.167 15.9293 40.2604 16.172C40.363 16.4053 40.503 16.6107 40.6804 16.788C40.867 16.9653 41.091 17.1053 41.3524 17.208C41.6137 17.3013 41.9124 17.348 42.2484 17.348ZM47.7352 19V8.794H50.0872V19H47.7352ZM55.6813 19.14C54.9999 19.14 54.3839 19.056 53.8333 18.888C53.2826 18.7107 52.8066 18.454 52.4053 18.118C52.0039 17.782 51.6959 17.376 51.4813 16.9C51.2666 16.4147 51.1593 15.864 51.1593 15.248C51.1593 14.436 51.3459 13.7407 51.7193 13.162C52.1019 12.5833 52.6293 12.14 53.3013 11.832C53.9826 11.5147 54.7759 11.356 55.6813 11.356C56.3533 11.356 56.9646 11.4447 57.5153 11.622C58.0753 11.7993 58.5513 12.056 58.9433 12.392C59.3446 12.7187 59.6526 13.1247 59.8673 13.61C60.0819 14.0953 60.1893 14.6413 60.1893 15.248C60.1893 16.0507 60.0026 16.746 59.6293 17.334C59.2559 17.922 58.7333 18.37 58.0613 18.678C57.3893 18.986 56.5959 19.14 55.6813 19.14ZM55.6813 17.334C56.1386 17.334 56.5259 17.25 56.8433 17.082C57.1699 16.9047 57.4173 16.662 57.5853 16.354C57.7533 16.0367 57.8373 15.668 57.8373 15.248C57.8373 14.9307 57.7906 14.646 57.6973 14.394C57.6039 14.1327 57.4639 13.9133 57.2773 13.736C57.0906 13.5493 56.8619 13.4093 56.5913 13.316C56.3299 13.2133 56.0266 13.162 55.6813 13.162C55.2239 13.162 54.8319 13.246 54.5053 13.414C54.1879 13.582 53.9453 13.8247 53.7773 14.142C53.6093 14.45 53.5253 14.8187 53.5253 15.248C53.5253 15.5653 53.5719 15.8547 53.6653 16.116C53.7679 16.368 53.9079 16.5873 54.0853 16.774C54.2719 16.9513 54.4959 17.0913 54.7573 17.194C55.0279 17.2873 55.3359 17.334 55.6813 17.334ZM60.8368 21.338V19.476H61.8308C62.1574 19.476 62.4188 19.448 62.6148 19.392C62.8108 19.336 62.9694 19.2427 63.0908 19.112C63.2121 18.9907 63.3101 18.8413 63.3848 18.664L63.6508 18.076L63.7348 18.846L60.0388 11.496H62.5728L64.2388 15.276L64.6308 16.228H64.7148L65.0928 15.276L66.6748 11.496H69.1248L65.3868 19.406C65.1628 19.882 64.8968 20.26 64.5888 20.54C64.2901 20.82 63.9354 21.0207 63.5248 21.142C63.1141 21.2727 62.6381 21.338 62.0968 21.338H60.8368ZM77.0777 19.14C76.3964 19.14 75.7804 19.056 75.2297 18.888C74.6791 18.7107 74.2031 18.454 73.8017 18.118C73.4004 17.782 73.0924 17.376 72.8777 16.9C72.6631 16.4147 72.5557 15.864 72.5557 15.248C72.5557 14.436 72.7424 13.7407 73.1157 13.162C73.4984 12.5833 74.0257 12.14 74.6977 11.832C75.3791 11.5147 76.1724 11.356 77.0777 11.356C77.7497 11.356 78.3611 11.4447 78.9117 11.622C79.4717 11.7993 79.9477 12.056 80.3397 12.392C80.7411 12.7187 81.0491 13.1247 81.2637 13.61C81.4784 14.0953 81.5857 14.6413 81.5857 15.248C81.5857 16.0507 81.3991 16.746 81.0257 17.334C80.6524 17.922 80.1297 18.37 79.4577 18.678C78.7857 18.986 77.9924 19.14 77.0777 19.14ZM77.0777 17.334C77.5351 17.334 77.9224 17.25 78.2397 17.082C78.5664 16.9047 78.8137 16.662 78.9817 16.354C79.1497 16.0367 79.2337 15.668 79.2337 15.248C79.2337 14.9307 79.1871 14.646 79.0937 14.394C79.0004 14.1327 78.8604 13.9133 78.6737 13.736C78.4871 13.5493 78.2584 13.4093 77.9877 13.316C77.7264 13.2133 77.4231 13.162 77.0777 13.162C76.6204 13.162 76.2284 13.246 75.9017 13.414C75.5844 13.582 75.3417 13.8247 75.1737 14.142C75.0057 14.45 74.9217 14.8187 74.9217 15.248C74.9217 15.5653 74.9684 15.8547 75.0617 16.116C75.1644 16.368 75.3044 16.5873 75.4817 16.774C75.6684 16.9513 75.8924 17.0913 76.1537 17.194C76.4244 17.2873 76.7324 17.334 77.0777 17.334ZM82.6805 19V11.496H84.9485L85.0325 12.798H85.1585C85.4011 12.3407 85.7791 11.986 86.2925 11.734C86.8058 11.482 87.3471 11.356 87.9165 11.356C88.4018 11.356 88.8451 11.4167 89.2465 11.538C89.6478 11.6593 89.9885 11.8553 90.2685 12.126C90.5578 12.3967 90.7818 12.7607 90.9405 13.218C91.0991 13.666 91.1785 14.2213 91.1785 14.884V19H88.8265V15.29C88.8265 14.8327 88.7705 14.4453 88.6585 14.128C88.5465 13.8107 88.3645 13.568 88.1125 13.4C87.8605 13.232 87.5245 13.148 87.1045 13.148C86.6845 13.148 86.3205 13.2413 86.0125 13.428C85.7045 13.6053 85.4618 13.8527 85.2845 14.17C85.1165 14.4873 85.0325 14.8513 85.0325 15.262V19H82.6805ZM99.8717 19.14C98.9104 19.14 98.075 18.986 97.3657 18.678C96.6657 18.37 96.1197 17.9267 95.7277 17.348C95.345 16.7693 95.1537 16.0693 95.1537 15.248C95.1537 14.3893 95.3497 13.666 95.7417 13.078C96.143 12.4807 96.6937 12.028 97.3937 11.72C98.103 11.4027 98.9197 11.244 99.8437 11.244C100.861 11.244 101.72 11.426 102.42 11.79C103.129 12.154 103.656 12.6813 104.002 13.372C104.347 14.0627 104.482 14.898 104.408 15.878H98.2477C98.257 16.13 98.327 16.3493 98.4577 16.536C98.5977 16.7227 98.7937 16.8673 99.0457 16.97C99.2977 17.0633 99.601 17.11 99.9557 17.11C100.338 17.11 100.674 17.054 100.964 16.942C101.253 16.8207 101.44 16.6713 101.524 16.494H104.436C104.38 17.0167 104.146 17.4787 103.736 17.88C103.325 18.2813 102.788 18.594 102.126 18.818C101.463 19.0327 100.712 19.14 99.8717 19.14ZM98.1637 14.408L98.0657 14.268H101.496L101.37 14.394C101.351 14.1793 101.286 13.988 101.174 13.82C101.062 13.652 100.894 13.5213 100.67 13.428C100.455 13.3347 100.175 13.288 99.8297 13.288C99.5217 13.288 99.251 13.33 99.0177 13.414C98.7844 13.4887 98.593 13.61 98.4437 13.778C98.3037 13.946 98.2104 14.156 98.1637 14.408ZM105.15 19V18.538C105.15 17.978 105.248 17.4833 105.444 17.054C105.64 16.6247 105.902 16.2467 106.228 15.92C106.555 15.584 106.914 15.2853 107.306 15.024C107.698 14.7533 108.09 14.506 108.482 14.282C108.874 14.0487 109.234 13.8247 109.56 13.61C109.887 13.3953 110.148 13.1713 110.344 12.938C110.54 12.7047 110.638 12.448 110.638 12.168C110.638 11.9253 110.578 11.734 110.456 11.594C110.344 11.4447 110.204 11.3373 110.036 11.272C109.878 11.2067 109.728 11.174 109.588 11.174C109.299 11.174 109.056 11.2253 108.86 11.328C108.664 11.4307 108.51 11.58 108.398 11.776C108.296 11.9627 108.226 12.1867 108.188 12.448H105.192C105.286 11.608 105.519 10.922 105.892 10.39C106.266 9.84867 106.77 9.44733 107.404 9.186C108.039 8.92467 108.8 8.794 109.686 8.794C110.554 8.794 111.292 8.934 111.898 9.214C112.505 9.48467 112.967 9.86733 113.284 10.362C113.602 10.8567 113.76 11.4353 113.76 12.098C113.76 12.5087 113.695 12.882 113.564 13.218C113.434 13.5447 113.256 13.848 113.032 14.128C112.818 14.3987 112.57 14.6413 112.29 14.856C112.02 15.0707 111.735 15.2667 111.436 15.444C111.147 15.6213 110.862 15.7847 110.582 15.934C110.302 16.074 110.05 16.2047 109.826 16.326C109.602 16.438 109.425 16.55 109.294 16.662H113.746V19H105.15ZM120.643 19.112C120.204 19.112 119.812 19.0653 119.467 18.972C119.131 18.8787 118.841 18.748 118.599 18.58C118.365 18.412 118.174 18.2207 118.025 18.006H117.927L117.829 19H114.903V8.794H117.997V12.35H118.095C118.337 11.9953 118.687 11.7247 119.145 11.538C119.602 11.342 120.101 11.244 120.643 11.244C121.203 11.244 121.707 11.3373 122.155 11.524C122.612 11.7013 122.999 11.9627 123.317 12.308C123.643 12.6533 123.895 13.0687 124.073 13.554C124.25 14.03 124.339 14.5713 124.339 15.178C124.339 15.9807 124.185 16.676 123.877 17.264C123.569 17.852 123.139 18.3093 122.589 18.636C122.038 18.9533 121.389 19.112 120.643 19.112ZM119.663 16.802C119.98 16.802 120.255 16.7413 120.489 16.62C120.731 16.4893 120.918 16.3027 121.049 16.06C121.179 15.8173 121.245 15.5233 121.245 15.178C121.245 14.9073 121.207 14.674 121.133 14.478C121.058 14.2727 120.951 14.1047 120.811 13.974C120.671 13.834 120.503 13.7313 120.307 13.666C120.12 13.5913 119.905 13.554 119.663 13.554C119.317 13.554 119.019 13.6193 118.767 13.75C118.515 13.8807 118.323 14.0627 118.193 14.296C118.062 14.52 117.997 14.786 117.997 15.094V15.248C117.997 15.5467 118.062 15.8173 118.193 16.06C118.323 16.2933 118.515 16.4753 118.767 16.606C119.019 16.7367 119.317 16.802 119.663 16.802Z" fill="#3A3A3A"/>
+ </svg>
+ )
+}
+
+export default Badge
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 2f441ca43..892279f80 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -27,6 +27,7 @@
"@tiptap/pm": "^2.0.0-beta.220",
"@tiptap/react": "^2.0.0-beta.220",
"@tiptap/starter-kit": "^2.0.0-beta.220",
+ "@vercel/og": "^0.5.8",
"clsx": "^1.2.1",
"cross-fetch": "^3.1.5",
"exponential-backoff": "^3.1.1",
@@ -910,6 +911,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/@resvg/resvg-wasm": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/@resvg/resvg-wasm/-/resvg-wasm-2.4.1.tgz",
+ "integrity": "sha512-yi6R0HyHtsoWTRA06Col4WoDs7SvlXU3DLMNP2bdAgs7HK18dTEVl1weXgxRzi8gwLteGUbIg29zulxIB3GSdg==",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"node_modules/@rollup/plugin-commonjs": {
"version": "24.0.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.0.tgz",
@@ -1262,6 +1271,26 @@
"node": ">= 8"
}
},
+ "node_modules/@shuding/opentype.js": {
+ "version": "1.4.0-beta.0",
+ "resolved": "https://registry.npmjs.org/@shuding/opentype.js/-/opentype.js-1.4.0-beta.0.tgz",
+ "integrity": "sha512-3NgmNyH3l/Hv6EvsWJbsvpcpUba6R8IREQ83nH83cyakCw7uM1arZKNfHwv1Wz6jgqrF/j4x5ELvR6PnK9nTcA==",
+ "dependencies": {
+ "fflate": "^0.7.3",
+ "string.prototype.codepointat": "^0.2.1"
+ },
+ "bin": {
+ "ot": "bin/ot"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ }
+ },
+ "node_modules/@shuding/opentype.js/node_modules/fflate": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz",
+ "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw=="
+ },
"node_modules/@supabase/auth-helpers-nextjs": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/@supabase/auth-helpers-nextjs/-/auth-helpers-nextjs-0.5.5.tgz",
@@ -2038,6 +2067,19 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@vercel/og": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/@vercel/og/-/og-0.5.8.tgz",
+ "integrity": "sha512-WlY5q96e2OmQEUsgqKZrCljNHiD05aErsa7u2z2+pkxyoVSWPHXLYFwHPtp7+IubU4gt4JYfgSbzGQg7n6xeAQ==",
+ "dependencies": {
+ "@resvg/resvg-wasm": "2.4.1",
+ "satori": "0.10.1",
+ "yoga-wasm-web": "0.3.3"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/acorn": {
"version": "8.8.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
@@ -2548,6 +2590,14 @@
"node": ">= 6"
}
},
+ "node_modules/camelize": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz",
+ "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/caniuse-api": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
@@ -2889,6 +2939,24 @@
"node": ">= 8"
}
},
+ "node_modules/css-background-parser": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/css-background-parser/-/css-background-parser-0.1.0.tgz",
+ "integrity": "sha512-2EZLisiZQ+7m4wwur/qiYJRniHX4K5Tc9w93MT3AS0WS1u5kaZ4FKXlOTBhOjc+CgEgPiGY+fX1yWD8UwpEqUA=="
+ },
+ "node_modules/css-box-shadow": {
+ "version": "1.0.0-3",
+ "resolved": "https://registry.npmjs.org/css-box-shadow/-/css-box-shadow-1.0.0-3.tgz",
+ "integrity": "sha512-9jaqR6e7Ohds+aWwmhe6wILJ99xYQbfmK9QQB9CcMjDbTxPZjwEmUQpU91OG05Xgm8BahT5fW+svbsQGjS/zPg=="
+ },
+ "node_modules/css-color-keywords": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
+ "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/css-declaration-sorter": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.0.tgz",
@@ -2917,6 +2985,16 @@
"url": "https://github.com/sponsors/fb55"
}
},
+ "node_modules/css-to-react-native": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz",
+ "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==",
+ "dependencies": {
+ "camelize": "^1.0.0",
+ "css-color-keywords": "^1.0.0",
+ "postcss-value-parser": "^4.0.2"
+ }
+ },
"node_modules/css-tree": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
@@ -3564,6 +3642,11 @@
"node": ">=6"
}
},
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
"node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -4719,6 +4802,17 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/hex-rgb": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/hex-rgb/-/hex-rgb-4.3.0.tgz",
+ "integrity": "sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/hoist-non-react-statics": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
@@ -5509,6 +5603,23 @@
"node": ">=10"
}
},
+ "node_modules/linebreak": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.1.0.tgz",
+ "integrity": "sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ==",
+ "dependencies": {
+ "base64-js": "0.0.8",
+ "unicode-trie": "^2.0.0"
+ }
+ },
+ "node_modules/linebreak/node_modules/base64-js": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
+ "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -6870,6 +6981,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/pako": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
+ "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA=="
+ },
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -6882,6 +6998,15 @@
"node": ">=6"
}
},
+ "node_modules/parse-css-color": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/parse-css-color/-/parse-css-color-0.2.1.tgz",
+ "integrity": "sha512-bwS/GGIFV3b6KS4uwpzCFj4w297Yl3uqnSgIPsoQkx7GMLROXfMnWvxfNkL0oh8HVhZA4hvJoEoEIqonfJ3BWg==",
+ "dependencies": {
+ "color-name": "^1.1.4",
+ "hex-rgb": "^4.1.0"
+ }
+ },
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
@@ -8251,6 +8376,31 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/satori": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/satori/-/satori-0.10.1.tgz",
+ "integrity": "sha512-F4bTCkDp931tLb7+UCNPBuSQwXhikrUkI4fBQo6fA8lF0Evqqgg3nDyUpRktQpR5Ry1DIiIVqLyEwkAms87ykg==",
+ "dependencies": {
+ "@shuding/opentype.js": "1.4.0-beta.0",
+ "css-background-parser": "^0.1.0",
+ "css-box-shadow": "1.0.0-3",
+ "css-to-react-native": "^3.0.0",
+ "emoji-regex": "^10.2.1",
+ "escape-html": "^1.0.3",
+ "linebreak": "^1.1.0",
+ "parse-css-color": "^0.2.1",
+ "postcss-value-parser": "^4.2.0",
+ "yoga-wasm-web": "^0.3.3"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/satori/node_modules/emoji-regex": {
+ "version": "10.2.1",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.2.1.tgz",
+ "integrity": "sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA=="
+ },
"node_modules/scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
@@ -8501,6 +8651,11 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
+ "node_modules/string.prototype.codepointat": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",
+ "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg=="
+ },
"node_modules/string.prototype.matchall": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",
@@ -8964,6 +9119,11 @@
"globrex": "^0.1.2"
}
},
+ "node_modules/tiny-inflate": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
+ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="
+ },
"node_modules/tippy.js": {
"version": "6.3.7",
"resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz",
@@ -9197,6 +9357,15 @@
"node": ">=14.0"
}
},
+ "node_modules/unicode-trie": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz",
+ "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==",
+ "dependencies": {
+ "pako": "^0.2.5",
+ "tiny-inflate": "^1.0.0"
+ }
+ },
"node_modules/unified": {
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz",
@@ -9720,6 +9889,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/yoga-wasm-web": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz",
+ "integrity": "sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA=="
+ },
"node_modules/zustand": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.5.tgz",
diff --git a/package.json b/package.json
index 9bd610104..bfcb101ac 100644
--- a/package.json
+++ b/package.json
@@ -59,6 +59,7 @@
"@tiptap/pm": "^2.0.0-beta.220",
"@tiptap/react": "^2.0.0-beta.220",
"@tiptap/starter-kit": "^2.0.0-beta.220",
+ "@vercel/og": "^0.5.8",
"clsx": "^1.2.1",
"cross-fetch": "^3.1.5",
"exponential-backoff": "^3.1.1",
diff --git a/pages/api/badge.tsx b/pages/api/badge.tsx
new file mode 100644
index 000000000..1c4d84610
--- /dev/null
+++ b/pages/api/badge.tsx
@@ -0,0 +1,25 @@
+import { NextApiRequest, NextApiResponse } from 'next'
+import { ImageResponse } from '@vercel/og'
+
+import BadgeImg from 'components/Badge'
+
+export const config = {
+ runtime: 'edge',
+}
+
+function handler(
+ req: NextApiRequest,
+ res: NextApiResponse
+) {
+ return new ImageResponse(
+ (
+ <BadgeImg/>
+ ),
+ {
+ width: 141,
+ height: 30,
+ },
+ )
+}
+
+export default handler
\ No newline at end of file