mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
feat: add get responses
This commit is contained in:
1 parent
dae9e841ca
commit
f7780c3d98
9 files changed
+94
-54
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import { z } from 'zod'
|
||||
import { FileType } from '../types.js'
|
||||
|
||||
export const fileInputSchema = z.object({
|
||||
path: z.string(),
|
||||
type: z.nativeEnum(FileType),
|
||||
type: z.enum(['file', 'folder']),
|
||||
})
|
||||
|
||||
export type IFileInput = z.infer<typeof fileInputSchema>
|
||||
|
||||
@@ -3,3 +3,32 @@ export { stageSchema, IStage } from './stage.js'
|
||||
export { requirementsSchema, IRequirements } from './requirements.js'
|
||||
export { responseSchema, IResponse } from './response.js'
|
||||
export { questSchema, IQuest } from './quest.js'
|
||||
|
||||
export interface ICommand {
|
||||
command?: string
|
||||
output?: string
|
||||
error?: string
|
||||
pwd?: string
|
||||
}
|
||||
|
||||
export enum FileType {
|
||||
FILE = 'file',
|
||||
FOLDER = 'folder',
|
||||
}
|
||||
|
||||
export interface FileInput {
|
||||
path: string
|
||||
type: FileType
|
||||
}
|
||||
|
||||
export interface FileExistenceInput extends FileInput {
|
||||
exists: boolean
|
||||
}
|
||||
|
||||
export interface IFileExistenceChecker {
|
||||
exists(file: FileInput): Promise<boolean>
|
||||
}
|
||||
|
||||
export interface ISession {
|
||||
completedStages: string[]
|
||||
}
|
||||
Reference in new issue
Block a user