Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rindeal committed Sep 4, 2024
1 parent 45a754d commit dc768da
Show file tree
Hide file tree
Showing 22 changed files with 1,023 additions and 4,411 deletions.
37 changes: 4 additions & 33 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,7 @@
*
* SPDX-License-Identifier: GPL-3.0-only OR GPL-2.0-only
*/
import { Logger } from './logger';
interface Ref {
name: string;
hash: string;
}
declare class RefDiffTypes extends String {
static refCountMismatch: RefDiffTypes;
static refNotFound: RefDiffTypes;
static hashMismatch: RefDiffTypes;
static criticalError: RefDiffTypes;
}
declare class RefDiff {
message: string;
type: RefDiffTypes;
sourceRefs: Ref[];
targetRefs: Ref[];
sourceRef: Ref | null;
targetRef: Ref | null;
}
declare class GitRepo {
repoUrl: string;
private _refs;
private refNameIndex;
private refHashIndex;
constructor(repoUrl: string);
getRefs(): Promise<Ref[]>;
fetchRefs(): Promise<Ref[]>;
_buildRefIndexes(): Promise<void>;
getRefByName(name: string): Promise<Ref | undefined>;
getRefByHash(hash: string): Promise<Ref | undefined>;
refsDiffer(targetRepo: GitRepo): Promise<RefDiff | null>;
}
export { Ref, RefDiffTypes, RefDiff, GitRepo, Logger };
import { RefDiff } from './repo';
export { Logger } from './logger';
export { Repo, RefDiff, ZeroRefs, RefCountMismatch, RefNotFound, HashMismatch } from './repo';
export declare function refsDiffer(sourceUrl: string, targetUrl: string): Promise<RefDiff | null>;
190 changes: 15 additions & 175 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc768da

Please sign in to comment.