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`, ); } });