diff --git a/src/lib/schemas.js b/src/lib/schemas.js index 03d912419..940f86473 100644 --- a/src/lib/schemas.js +++ b/src/lib/schemas.js @@ -5,7 +5,10 @@ export const componentsSchema = z.array( title: z.string(), npm: z.string().regex(/^(@[a-z0-9-]*\/)?[a-z0-9-]*$/), url: z.string().url().optional(), - repository: z.string().url(), + repository: z + .string() + .url() + .refine((val) => val.includes('github.com') || val.includes('gitlab.com')), description: z.string(), category: z.enum([ 'Display Components', @@ -33,7 +36,10 @@ export const templatesSchema = z.array( z.object({ title: z.string(), url: z.string().url().optional(), - repository: z.string().url(), + repository: z + .string() + .url() + .refine((val) => val.includes('github.com') || val.includes('gitlab.com')), description: z.string(), category: z.enum(['Svelte Add', 'SvelteKit', 'Svelte']), tags: z.array(z.string()).optional() @@ -48,7 +54,10 @@ export const toolsSchema = z.array( .regex(/^(@[a-z0-9-]*\/)?[a-z0-9-]*$/) .optional(), url: z.string().url().optional(), - repository: z.string().url(), + repository: z + .string() + .url() + .refine((val) => val.includes('github.com') || val.includes('gitlab.com')), description: z.string(), category: z.enum([ 'Debugging', diff --git a/src/routes/components/components.json b/src/routes/components/components.json index 60a75b22e..2ea461c3a 100644 --- a/src/routes/components/components.json +++ b/src/routes/components/components.json @@ -213,7 +213,8 @@ }, { "title": "SCR Svelte Client Router", - "repository": "https://arthurgermano.github.io/svelte-client-router/#/svelte-client-router", + "url": "https://arthurgermano.github.io/svelte-client-router/#/svelte-client-router", + "repository": "https://github.com/arthurgermano/svelte-client-router", "npm": "svelte-client-router", "description": "Svelte Client Router is everything you need and think when routing SPA's. This is The Svelte Router for SPA!", "tags": ["routers"],