mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
wip: replace packages with pure files
This commit is contained in:
1 parent
2d95ca382f
commit
87b8ca5d04
112 files changed
+740
-522
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
const fileSchema = z.object({
|
||||
path: z.string(),
|
||||
type: z.enum(['file', 'directory']),
|
||||
discovered: z.boolean(),
|
||||
})
|
||||
|
||||
export const commandParamsSchema = z.object({
|
||||
discover: fileSchema.array().optional(),
|
||||
})
|
||||
|
||||
export type ICommandParams = z.infer<typeof commandParamsSchema>
|
||||
|
||||
export const commandSchema = z.object({
|
||||
command: z.string().optional(),
|
||||
output: z.string().optional(),
|
||||
error: z.string().optional(),
|
||||
pwd: z.string().optional(),
|
||||
params: commandParamsSchema.optional(),
|
||||
})
|
||||
|
||||
export type ICommand = z.infer<typeof commandSchema>
|
||||
Reference in new issue
Block a user