mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-10 19:03:29 +00:00
26 lines
943 B
TypeScript
26 lines
943 B
TypeScript
export * as Vcs from "./vcs.js"
|
|
|
|
import { Schema } from "effect"
|
|
import { NonNegativeInt, optional } from "./schema.js"
|
|
|
|
export const Branch = Schema.Struct({
|
|
current: optional(Schema.String),
|
|
default: optional(Schema.String),
|
|
}).annotate({ identifier: "Vcs.Branch" })
|
|
export interface Branch extends Schema.Schema.Type<typeof Branch> {}
|
|
|
|
export const Info = Schema.Struct({
|
|
branch: Branch,
|
|
}).annotate({ identifier: "Vcs.Info" })
|
|
export interface Info extends Schema.Schema.Type<typeof Info> {}
|
|
|
|
export const Mode = Schema.Literals(["working", "branch"]).annotate({ identifier: "Vcs.Mode" })
|
|
export type Mode = typeof Mode.Type
|
|
|
|
export const FileStatus = Schema.Struct({
|
|
file: Schema.String,
|
|
additions: NonNegativeInt,
|
|
deletions: NonNegativeInt,
|
|
status: Schema.Literals(["added", "deleted", "modified"]),
|
|
}).annotate({ identifier: "Vcs.FileStatus" })
|
|
export interface FileStatus extends Schema.Schema.Type<typeof FileStatus> {}
|