Skip to content

Commit

Permalink
✨ feat: 新增 manifest 请求校验
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 28, 2023
1 parent 981ddc8 commit c644a79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/market.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { z } from 'zod';

import { pluginManifestSchema } from './manifest';

export const pluginMetaSchema = z.object({
author: z.string(),
createAt: z.string(),
Expand All @@ -23,6 +25,7 @@ export const pluginRequestPayloadSchema = z.object({
arguments: z.string().optional(),
identifier: z.string(),
indexUrl: z.string().optional(),
manifest: pluginManifestSchema.optional(),
});

export type PluginRequestPayload = z.infer<typeof pluginRequestPayloadSchema>;

0 comments on commit c644a79

Please sign in to comment.