feat(core): Refactor TypeScript interfaces and improve module exports

This commit is contained in:
2024-12-14 00:30:35 +01:00
parent 470f4fe730
commit 5d0d125e43
7 changed files with 76 additions and 59 deletions

44
ts/interfaces/index.ts Normal file
View File

@ -0,0 +1,44 @@
export interface RepositoryOwner {
login: string;
}
export interface Repository {
owner: RepositoryOwner;
name: string;
}
export interface CommitAuthor {
date: string;
}
export interface CommitDetail {
message: string;
author: CommitAuthor;
}
export interface Commit {
sha: string;
commit: CommitDetail;
}
export interface Tag {
commit?: {
sha?: string;
};
}
export interface RepoSearchResponse {
data: Repository[];
}
export interface CommitResult {
baseUrl: string;
org: string;
repo: string;
timestamp: string;
hash: string;
commitMessage: string;
tagged: boolean;
publishedOnNpm: boolean;
prettyAgoTime: string;
}