feat(core): expose V2 VCS status and diff APIs (#35129)
This commit is contained in:
parent
85fde8c11d
commit
a1b6c84135
16 changed files with 970 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ export { Provider } from "./provider.js"
|
|||
export { Reference } from "./reference.js"
|
||||
export { Revert } from "./revert.js"
|
||||
export { Session } from "./session.js"
|
||||
export { Vcs } from "./vcs.js"
|
||||
export { SessionInput } from "./session-input.js"
|
||||
export { SessionMessage } from "./session-message.js"
|
||||
export { Shell } from "./shell.js"
|
||||
|
|
|
|||
15
packages/schema/src/vcs.ts
Normal file
15
packages/schema/src/vcs.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export * as Vcs from "./vcs.js"
|
||||
|
||||
import { Schema } from "effect"
|
||||
import { NonNegativeInt } from "./schema.js"
|
||||
|
||||
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> {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue