@foss.global/interfaces 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +9 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/gitmanager.d.ts +82 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/gitmanager.ts +105 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-06-23 - 0.3.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add GitManager read contract interfaces (gitmanager)
|
|
8
|
+
- Added commit detail, diff, and tag contract interfaces for GitManager reads.
|
|
9
|
+
- Added diff status and line kind union types for structured diff data.
|
|
10
|
+
- Added tests covering the exported GitManager read contract shapes.
|
|
11
|
+
|
|
3
12
|
## 2026-06-22 - 0.2.0
|
|
4
13
|
|
|
5
14
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@foss.global/interfaces',
|
|
6
|
-
version: '0.
|
|
6
|
+
version: '0.3.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type TGitManagerRefType = 'branch' | 'tag' | 'other';
|
|
2
2
|
export type TGitManagerObjectType = 'blob' | 'tree' | 'commit' | 'tag' | 'other';
|
|
3
3
|
export type TGitManagerTreeEntryType = 'file' | 'dir' | 'symlink' | 'submodule' | 'other';
|
|
4
|
+
export type TGitManagerDiffFileStatus = 'added' | 'modified' | 'deleted' | 'renamed' | 'copied' | 'typechange' | 'unmerged' | 'unknown';
|
|
5
|
+
export type TGitManagerDiffLineKind = 'add' | 'del' | 'context';
|
|
4
6
|
export interface IGitManagerRepositorySelector {
|
|
5
7
|
org: string;
|
|
6
8
|
repo: string;
|
|
@@ -64,3 +66,83 @@ export interface IGitManagerCommitSummary extends IGitManagerRepositorySelector
|
|
|
64
66
|
authorEmail: string;
|
|
65
67
|
subject: string;
|
|
66
68
|
}
|
|
69
|
+
export interface IGitManagerCommitRequest extends IGitManagerRepositorySelector {
|
|
70
|
+
ref: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IGitManagerCommitParent {
|
|
73
|
+
sha: string;
|
|
74
|
+
shortSha: string;
|
|
75
|
+
}
|
|
76
|
+
export interface IGitManagerCommitActor {
|
|
77
|
+
name: string;
|
|
78
|
+
email: string;
|
|
79
|
+
date: string;
|
|
80
|
+
}
|
|
81
|
+
export interface IGitManagerDiffStats {
|
|
82
|
+
filesChanged: number;
|
|
83
|
+
additions: number;
|
|
84
|
+
deletions: number;
|
|
85
|
+
}
|
|
86
|
+
export interface IGitManagerCommitDetail extends IGitManagerCommitSummary {
|
|
87
|
+
message: string;
|
|
88
|
+
body: string;
|
|
89
|
+
treeId: string;
|
|
90
|
+
parents: IGitManagerCommitParent[];
|
|
91
|
+
author: IGitManagerCommitActor;
|
|
92
|
+
committer: IGitManagerCommitActor;
|
|
93
|
+
stats: IGitManagerDiffStats;
|
|
94
|
+
}
|
|
95
|
+
export interface IGitManagerDiffRequest extends IGitManagerRepositorySelector {
|
|
96
|
+
headRef: string;
|
|
97
|
+
baseRef?: string;
|
|
98
|
+
path?: string;
|
|
99
|
+
contextLines?: number;
|
|
100
|
+
}
|
|
101
|
+
export interface IGitManagerDiffLine {
|
|
102
|
+
kind: TGitManagerDiffLineKind;
|
|
103
|
+
content: string;
|
|
104
|
+
oldNumber: number | null;
|
|
105
|
+
newNumber: number | null;
|
|
106
|
+
}
|
|
107
|
+
export interface IGitManagerDiffHunk {
|
|
108
|
+
header: string;
|
|
109
|
+
oldStart: number;
|
|
110
|
+
oldLines: number;
|
|
111
|
+
newStart: number;
|
|
112
|
+
newLines: number;
|
|
113
|
+
lines: IGitManagerDiffLine[];
|
|
114
|
+
}
|
|
115
|
+
export interface IGitManagerDiffFile {
|
|
116
|
+
oldPath: string;
|
|
117
|
+
newPath: string;
|
|
118
|
+
status: TGitManagerDiffFileStatus;
|
|
119
|
+
additions: number;
|
|
120
|
+
deletions: number;
|
|
121
|
+
isBinary: boolean;
|
|
122
|
+
hunks: IGitManagerDiffHunk[];
|
|
123
|
+
}
|
|
124
|
+
export interface IGitManagerDiff extends IGitManagerRepositorySelector, IGitManagerDiffStats {
|
|
125
|
+
baseRef: string;
|
|
126
|
+
headRef: string;
|
|
127
|
+
files: IGitManagerDiffFile[];
|
|
128
|
+
truncated: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface IGitManagerListTagsRequest extends IGitManagerRepositorySelector {
|
|
131
|
+
pattern?: string;
|
|
132
|
+
limit?: number;
|
|
133
|
+
}
|
|
134
|
+
export interface IGitManagerTagRequest extends IGitManagerRepositorySelector {
|
|
135
|
+
tag: string;
|
|
136
|
+
}
|
|
137
|
+
export interface IGitManagerTag extends IGitManagerRepositorySelector {
|
|
138
|
+
name: string;
|
|
139
|
+
objectId: string;
|
|
140
|
+
targetObjectId: string;
|
|
141
|
+
targetObjectType: TGitManagerObjectType;
|
|
142
|
+
isAnnotated: boolean;
|
|
143
|
+
taggerName: string;
|
|
144
|
+
taggerEmail: string;
|
|
145
|
+
taggedAt: string;
|
|
146
|
+
subject: string;
|
|
147
|
+
message: string;
|
|
148
|
+
}
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/gitmanager.ts
CHANGED
|
@@ -4,6 +4,18 @@ export type TGitManagerObjectType = 'blob' | 'tree' | 'commit' | 'tag' | 'other'
|
|
|
4
4
|
|
|
5
5
|
export type TGitManagerTreeEntryType = 'file' | 'dir' | 'symlink' | 'submodule' | 'other';
|
|
6
6
|
|
|
7
|
+
export type TGitManagerDiffFileStatus =
|
|
8
|
+
| 'added'
|
|
9
|
+
| 'modified'
|
|
10
|
+
| 'deleted'
|
|
11
|
+
| 'renamed'
|
|
12
|
+
| 'copied'
|
|
13
|
+
| 'typechange'
|
|
14
|
+
| 'unmerged'
|
|
15
|
+
| 'unknown';
|
|
16
|
+
|
|
17
|
+
export type TGitManagerDiffLineKind = 'add' | 'del' | 'context';
|
|
18
|
+
|
|
7
19
|
export interface IGitManagerRepositorySelector {
|
|
8
20
|
org: string;
|
|
9
21
|
repo: string;
|
|
@@ -77,3 +89,96 @@ export interface IGitManagerCommitSummary extends IGitManagerRepositorySelector
|
|
|
77
89
|
authorEmail: string;
|
|
78
90
|
subject: string;
|
|
79
91
|
}
|
|
92
|
+
|
|
93
|
+
export interface IGitManagerCommitRequest extends IGitManagerRepositorySelector {
|
|
94
|
+
ref: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface IGitManagerCommitParent {
|
|
98
|
+
sha: string;
|
|
99
|
+
shortSha: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface IGitManagerCommitActor {
|
|
103
|
+
name: string;
|
|
104
|
+
email: string;
|
|
105
|
+
date: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface IGitManagerDiffStats {
|
|
109
|
+
filesChanged: number;
|
|
110
|
+
additions: number;
|
|
111
|
+
deletions: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface IGitManagerCommitDetail extends IGitManagerCommitSummary {
|
|
115
|
+
message: string;
|
|
116
|
+
body: string;
|
|
117
|
+
treeId: string;
|
|
118
|
+
parents: IGitManagerCommitParent[];
|
|
119
|
+
author: IGitManagerCommitActor;
|
|
120
|
+
committer: IGitManagerCommitActor;
|
|
121
|
+
stats: IGitManagerDiffStats;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface IGitManagerDiffRequest extends IGitManagerRepositorySelector {
|
|
125
|
+
headRef: string;
|
|
126
|
+
baseRef?: string;
|
|
127
|
+
path?: string;
|
|
128
|
+
contextLines?: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface IGitManagerDiffLine {
|
|
132
|
+
kind: TGitManagerDiffLineKind;
|
|
133
|
+
content: string;
|
|
134
|
+
oldNumber: number | null;
|
|
135
|
+
newNumber: number | null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface IGitManagerDiffHunk {
|
|
139
|
+
header: string;
|
|
140
|
+
oldStart: number;
|
|
141
|
+
oldLines: number;
|
|
142
|
+
newStart: number;
|
|
143
|
+
newLines: number;
|
|
144
|
+
lines: IGitManagerDiffLine[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface IGitManagerDiffFile {
|
|
148
|
+
oldPath: string;
|
|
149
|
+
newPath: string;
|
|
150
|
+
status: TGitManagerDiffFileStatus;
|
|
151
|
+
additions: number;
|
|
152
|
+
deletions: number;
|
|
153
|
+
isBinary: boolean;
|
|
154
|
+
hunks: IGitManagerDiffHunk[];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface IGitManagerDiff extends IGitManagerRepositorySelector, IGitManagerDiffStats {
|
|
158
|
+
baseRef: string;
|
|
159
|
+
headRef: string;
|
|
160
|
+
files: IGitManagerDiffFile[];
|
|
161
|
+
truncated: boolean;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface IGitManagerListTagsRequest extends IGitManagerRepositorySelector {
|
|
165
|
+
pattern?: string;
|
|
166
|
+
limit?: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface IGitManagerTagRequest extends IGitManagerRepositorySelector {
|
|
170
|
+
tag: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface IGitManagerTag extends IGitManagerRepositorySelector {
|
|
174
|
+
name: string;
|
|
175
|
+
objectId: string;
|
|
176
|
+
targetObjectId: string;
|
|
177
|
+
targetObjectType: TGitManagerObjectType;
|
|
178
|
+
isAnnotated: boolean;
|
|
179
|
+
taggerName: string;
|
|
180
|
+
taggerEmail: string;
|
|
181
|
+
taggedAt: string;
|
|
182
|
+
subject: string;
|
|
183
|
+
message: string;
|
|
184
|
+
}
|