From cd72765bf6dd1ce191b3915a3b0a5789a0ad1b1f Mon Sep 17 00:00:00 2001 From: aisouler Date: Thu, 22 Feb 2024 11:46:09 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=BF=AB=E7=85=A7=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/file.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/file.ts b/src/file.ts index 66e048b9..ecff69d0 100644 --- a/src/file.ts +++ b/src/file.ts @@ -130,7 +130,7 @@ export async function* walk(dirPath: string) { export const validSnapshotUrl = (s: string) => { const u = new URL(s); - return u.pathname.startsWith('/import/'); + return u.pathname.startsWith('/import/') || u.pathname.startsWith('/i/'); }; export const checkConfig = (newConfig: RawSubscription) => { @@ -284,7 +284,7 @@ export const checkConfig = (newConfig: RawSubscription) => { groupKey: g.key, }); throw new Error( - `invalid snapshotUrls: ${u}\nit should like https://i.gkd.li/import/12506571`, + `invalid snapshotUrls: ${u}\nit should like https://i.gkd.li/import/12506571 or https://i.gkd.li/i/14362119`, ); } }); @@ -299,7 +299,7 @@ export const checkConfig = (newConfig: RawSubscription) => { ruleKey: r.key, }); throw new Error( - `invalid snapshotUrls: ${u}\nit should like https://i.gkd.li/import/12506571`, + `invalid snapshotUrls: ${u}\nit should like https://i.gkd.li/import/12506571 or https://i.gkd.li/i/14362119`, ); } });