/
raiden
/
obsidian-git-encrypt
Обзор
Документация
Войти
/
raiden
/
obsidian-git-encrypt
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/git/gitTypes.ts
53 строки
2 KB
Robert Kuzhin
feat: add manual encrypted source control
09 авг 2026, 20:57
09 авг 2026, 20:57
3c8fa38
Код
Авторство
О чём код?
export interface GitStatusEntry { readonly indexStatus: string; readonly workTreeStatus: string; readonly path: string; readonly originalPath?: string; } export interface GitStatus { readonly entries: readonly GitStatusEntry[]; readonly clean: boolean; } export interface PullResult { readonly status: "no-remote" | "no-remote-branch" | "up-to-date" | "pulled"; readonly beforeCommit: string | null; readonly afterCommit: string | null; } export interface FetchResult { readonly status: "no-remote" | "no-remote-branch" | "fetched"; readonly localCommit: string | null; readonly remoteCommit: string | null; } export interface AheadBehind { readonly ahead: number; readonly behind: number; } export interface EncryptedSnapshotChange { readonly fileId: string; readonly envelope?: Uint8Array; readonly deleted: boolean; } export interface GitAdapter { init(): Promise<void>; fetch(): Promise<FetchResult>; readFileAt(revision: string, encryptedPath: string): Promise<Uint8Array>; getHeadCommit(): Promise<string | null>; aheadBehind(localCommit: string, remoteCommit: string): Promise<AheadBehind>; commitSnapshot( message: string, expectedHead: string, manifestEnvelope: Uint8Array, changes: readonly EncryptedSnapshotChange[], ): Promise<string>; pull(): Promise<PullResult>; status(): Promise<GitStatus>; commit(message: string): Promise<string | null>; commitReconciled(message: string, remoteCommit: string | null): Promise<string | null>; push(): Promise<void>; }