diff --git a/README.md b/README.md index b05d92f..cec6a16 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ | Name | Deploy | | ----------- | ------------------------------------------------------------------------------------------------------------------- | -| Vercel | [![Deploy with Vercel](https://vercel.com/button)](http://gg.gg/15thba) | +| Vercel | [![Deploy with Vercel](https://vercel.com/button)](http://gg.gg/15tho7) | | Deno Deploy | [Deploy to Deno Deploy](https://nitro.unjs.io/deploy/providers/deno) / [Example](.github/workflows/deno-deploy.yml) | | Cloudflare | [Deploy to Cloudflare](https://nitro.unjs.io/deploy/providers/cloudflare) | | Netlify | [Deploy to Netlify](https://nitro.unjs.io/deploy/providers/netlify) | diff --git a/package.json b/package.json index ef2eb12..82bb522 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "base64-js": "^1.5.1", + "core-js": "^3.31.1", "lodash-es": "^4.17.21", "nano-jsx": "^0.0.37", "nitropack": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e91857f..44d02a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ dependencies: base64-js: specifier: ^1.5.1 version: 1.5.1 + core-js: + specifier: ^3.31.1 + version: 3.31.1 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -1093,6 +1096,11 @@ packages: resolution: {integrity: sha512-mWYvfOLrfEc996hlKcdABeIiPHUPC6DM2QYZdGGOvhOTbA3tjm2eBwqlJpoFdjC89NI4Qt6h0Pu06Mp+1Pj5OQ==} dev: false + /core-js@3.31.1: + resolution: {integrity: sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==} + requiresBuild: true + dev: false + /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: false diff --git a/scripts/update-sponsor-tiers.ts b/scripts/update-sponsor-tiers.ts index 36c3758..4c0e62e 100644 --- a/scripts/update-sponsor-tiers.ts +++ b/scripts/update-sponsor-tiers.ts @@ -1,6 +1,7 @@ import { resolve } from 'node:path'; import { writeFileSync, copyFileSync } from 'node:fs'; import { config } from 'dotenv'; +import 'core-js/actual/url'; config({ path: resolve(process.cwd(), '.env') }); const u = process.env.SPONSOR_TIERS_UPDATE_URL; @@ -11,7 +12,8 @@ const exampleFilename = resolve( 'afdian/sponsor-tiers-example.ts' ); -if (u) +// @ts-ignore +if (URL.canParse(u)) fetch(u) .then(resp => { if (resp.status !== 200) throw new Error(resp.statusText);