mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-06 12:47:44 +00:00
feat: Submitted data restructure (#533)
* Merge tools into components and resources * Rename components to packages * Format * Redirect with code 302 * Fix text on submitting page * Validate misc.json, format * Permanent redirects * Implement feedback for resources * Fix lint * Improve updateNpm.js types * Fix repo links
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
import { packageNameRegex } from 'package-name-regex';
|
||||
|
||||
export const componentsSchema = z.array(
|
||||
export const packagesSchema = z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
npm: z.string().regex(packageNameRegex),
|
||||
@@ -9,22 +9,26 @@ export const componentsSchema = z.array(
|
||||
repository: z.string().url(),
|
||||
description: z.string(),
|
||||
category: z.enum([
|
||||
'Display Components',
|
||||
'Developer Experience',
|
||||
'Internationalization',
|
||||
'Bundler Plugins',
|
||||
'CSS and Layout',
|
||||
'Icons',
|
||||
'Multimedia',
|
||||
'Testing',
|
||||
'Data Visualisation',
|
||||
'Integration',
|
||||
'Debugging',
|
||||
'Design Pattern',
|
||||
'Stores',
|
||||
'Routers',
|
||||
'SvelteKit Adapters',
|
||||
'Design System',
|
||||
'User Interaction',
|
||||
'Forms & User Input'
|
||||
'Developer Experience',
|
||||
'Display Components',
|
||||
'Forms & User Input',
|
||||
'Icons',
|
||||
'Integration',
|
||||
'Internationalization',
|
||||
'Linting and Formatting',
|
||||
'Multimedia',
|
||||
'Preprocessors',
|
||||
'Routers',
|
||||
'Stores',
|
||||
'SvelteKit Adapters',
|
||||
'Testing',
|
||||
'User Interaction'
|
||||
]),
|
||||
tags: z.array(z.string()).optional()
|
||||
})
|
||||
@@ -40,21 +44,3 @@ export const templatesSchema = z.array(
|
||||
tags: z.array(z.string()).optional()
|
||||
})
|
||||
);
|
||||
|
||||
export const toolsSchema = z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
npm: z.string().regex(packageNameRegex).optional(),
|
||||
url: z.string().url().optional(),
|
||||
repository: z.string().url(),
|
||||
description: z.string(),
|
||||
category: z.enum([
|
||||
'Debugging',
|
||||
'Linting and Formatting',
|
||||
'Editor Extensions',
|
||||
'Bundler Plugins',
|
||||
'Preprocessors'
|
||||
]),
|
||||
tags: z.array(z.string()).optional()
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user