@vivantel/virage-core
    Preparing search index...

    Interface SourceRepository

    interface SourceRepository {
        rootUri: string;
        getChangedFilesSince(
            prevRevision: string,
            patterns?: string[],
        ): Promise<
            { added: string[]; deleted: string[]; modified: string[] }
            | null,
        >;
        getContext?(): Promise<string>;
        getCurrentRevision(): Promise<string>;
        getFileRevisions(
            files: string[],
            onProgress?: (done: number, total: number) => void,
        ): Promise<Map<string, string>>;
        getPendingChanges?(): Promise<Set<string>>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    rootUri: string
    • Files changed since a given revision. patterns is an optional hint — implementations that support path filtering use it; others return all changed files for the caller to filter. Returns null when the revision is unknown → caller falls back to full scan.

      Parameters

      • prevRevision: string
      • Optionalpatterns: string[]

      Returns Promise<{ added: string[]; deleted: string[]; modified: string[] } | null>

    • An opaque revision identifier covering the whole source. Git: HEAD commit SHA. S3: manifest hash or max version timestamp. Changes whenever any file in the source changes.

      Returns Promise<string>

    • A stable per-file content identifier. CLI git: blob SHA (content-addressed, stable across rebases). S3: ETag (content MD5). Local FS: SHA-256 of file bytes. Changes when and only when file content changes.

      Parameters

      • files: string[]
      • OptionalonProgress: (done: number, total: number) => void

      Returns Promise<Map<string, string>>