@foss.global/interfaces 0.5.0 → 0.6.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/runner.d.ts +37 -1
- package/dist_ts/requests/public.d.ts +10 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/runner.ts +41 -1
- package/ts/requests/public.ts +15 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-21 - 0.6.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add repository CI artifact contracts (ci-artifacts)
|
|
8
|
+
- Add runner job artifact specification types and optional artifact definitions on job specs
|
|
9
|
+
- Expose artifact upload and repository artifact list view interfaces
|
|
10
|
+
- Add repositoryCiArtifacts typed request contract
|
|
11
|
+
|
|
3
12
|
## 2026-07-21 - 0.5.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.6.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=
|
package/dist_ts/data/runner.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type TRunnerProtocolVersion = typeof runnerProtocolVersion;
|
|
|
3
3
|
export type TOciRuntime = 'docker' | 'podman';
|
|
4
4
|
export type TJobNetwork = 'none' | 'bridge';
|
|
5
5
|
export type TLogStream = 'stdout' | 'stderr' | 'runner';
|
|
6
|
+
export type TJobArtifactWhen = 'always' | 'success' | 'failure';
|
|
6
7
|
export type TJobCompletionStatus = 'succeeded' | 'failed' | 'canceled' | 'timed_out' | 'system_error';
|
|
7
8
|
export type TCiJobState = 'queued' | 'running' | TJobCompletionStatus;
|
|
8
9
|
export interface IRunnerCredential {
|
|
@@ -15,7 +16,7 @@ export interface IRunnerCapabilities {
|
|
|
15
16
|
runtime: TOciRuntime;
|
|
16
17
|
networks: TJobNetwork[];
|
|
17
18
|
sourceArchives: ['tar.gz'];
|
|
18
|
-
artifacts:
|
|
19
|
+
artifacts: boolean;
|
|
19
20
|
caches: false;
|
|
20
21
|
serviceContainers: false;
|
|
21
22
|
}
|
|
@@ -63,6 +64,13 @@ export interface IJobSourceArchive {
|
|
|
63
64
|
url: string;
|
|
64
65
|
sha256: string;
|
|
65
66
|
}
|
|
67
|
+
export interface IJobArtifactSpec {
|
|
68
|
+
name: string;
|
|
69
|
+
path: string;
|
|
70
|
+
when?: TJobArtifactWhen;
|
|
71
|
+
required?: boolean;
|
|
72
|
+
retentionDays?: number;
|
|
73
|
+
}
|
|
66
74
|
export interface IJobSpec {
|
|
67
75
|
image: string;
|
|
68
76
|
command: string[];
|
|
@@ -72,6 +80,7 @@ export interface IJobSpec {
|
|
|
72
80
|
timeoutMs?: number;
|
|
73
81
|
resources?: IJobResources;
|
|
74
82
|
source?: IJobSourceArchive;
|
|
83
|
+
artifacts?: IJobArtifactSpec[];
|
|
75
84
|
}
|
|
76
85
|
export interface IJobLease {
|
|
77
86
|
jobId: string;
|
|
@@ -115,6 +124,17 @@ export interface ILogAcknowledgement {
|
|
|
115
124
|
serverTime: string;
|
|
116
125
|
nextSequence: number;
|
|
117
126
|
}
|
|
127
|
+
export interface ICiArtifactUploadResponse {
|
|
128
|
+
artifactId: string;
|
|
129
|
+
jobId: string;
|
|
130
|
+
attemptId: string;
|
|
131
|
+
name: string;
|
|
132
|
+
sha256: string;
|
|
133
|
+
sizeBytes: number;
|
|
134
|
+
contentType: string;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
expiresAt: string;
|
|
137
|
+
}
|
|
118
138
|
export interface ICompleteJobRequest extends IJobMutationIdentity {
|
|
119
139
|
status: TJobCompletionStatus;
|
|
120
140
|
exitCode: number | null;
|
|
@@ -221,3 +241,19 @@ export interface IRepositoryCiRunLogView {
|
|
|
221
241
|
run: IRepositoryCiRunStatus;
|
|
222
242
|
logs: ICiLogPage;
|
|
223
243
|
}
|
|
244
|
+
export interface IRepositoryCiArtifact {
|
|
245
|
+
artifactId: string;
|
|
246
|
+
dispatchId: string;
|
|
247
|
+
jobId: string;
|
|
248
|
+
attemptId: string;
|
|
249
|
+
name: string;
|
|
250
|
+
sha256: string;
|
|
251
|
+
sizeBytes: number;
|
|
252
|
+
contentType: string;
|
|
253
|
+
createdAt: string;
|
|
254
|
+
expiresAt: string;
|
|
255
|
+
}
|
|
256
|
+
export interface IRepositoryCiArtifactListView {
|
|
257
|
+
run: IRepositoryCiRunStatus;
|
|
258
|
+
artifacts: IRepositoryCiArtifact[];
|
|
259
|
+
}
|
|
@@ -121,3 +121,13 @@ export interface IReq_RepositoryCiCancelRun extends plugins.typedrequestInterfac
|
|
|
121
121
|
run: data.IRepositoryCiRunStatus;
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
+
export interface IReq_RepositoryCiArtifacts extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryCiArtifacts> {
|
|
125
|
+
method: 'repositoryCiArtifacts';
|
|
126
|
+
request: {
|
|
127
|
+
org: string;
|
|
128
|
+
repo: string;
|
|
129
|
+
dispatchId: string;
|
|
130
|
+
accessToken: string;
|
|
131
|
+
};
|
|
132
|
+
response: data.IRepositoryCiArtifactListView;
|
|
133
|
+
}
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/runner.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type TRunnerProtocolVersion = typeof runnerProtocolVersion;
|
|
|
4
4
|
export type TOciRuntime = 'docker' | 'podman';
|
|
5
5
|
export type TJobNetwork = 'none' | 'bridge';
|
|
6
6
|
export type TLogStream = 'stdout' | 'stderr' | 'runner';
|
|
7
|
+
export type TJobArtifactWhen = 'always' | 'success' | 'failure';
|
|
7
8
|
export type TJobCompletionStatus =
|
|
8
9
|
| 'succeeded'
|
|
9
10
|
| 'failed'
|
|
@@ -23,7 +24,7 @@ export interface IRunnerCapabilities {
|
|
|
23
24
|
runtime: TOciRuntime;
|
|
24
25
|
networks: TJobNetwork[];
|
|
25
26
|
sourceArchives: ['tar.gz'];
|
|
26
|
-
artifacts:
|
|
27
|
+
artifacts: boolean;
|
|
27
28
|
caches: false;
|
|
28
29
|
serviceContainers: false;
|
|
29
30
|
}
|
|
@@ -80,6 +81,14 @@ export interface IJobSourceArchive {
|
|
|
80
81
|
sha256: string;
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
export interface IJobArtifactSpec {
|
|
85
|
+
name: string;
|
|
86
|
+
path: string;
|
|
87
|
+
when?: TJobArtifactWhen;
|
|
88
|
+
required?: boolean;
|
|
89
|
+
retentionDays?: number;
|
|
90
|
+
}
|
|
91
|
+
|
|
83
92
|
export interface IJobSpec {
|
|
84
93
|
image: string;
|
|
85
94
|
command: string[];
|
|
@@ -89,6 +98,7 @@ export interface IJobSpec {
|
|
|
89
98
|
timeoutMs?: number;
|
|
90
99
|
resources?: IJobResources;
|
|
91
100
|
source?: IJobSourceArchive;
|
|
101
|
+
artifacts?: IJobArtifactSpec[];
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
export interface IJobLease {
|
|
@@ -140,6 +150,18 @@ export interface ILogAcknowledgement {
|
|
|
140
150
|
nextSequence: number;
|
|
141
151
|
}
|
|
142
152
|
|
|
153
|
+
export interface ICiArtifactUploadResponse {
|
|
154
|
+
artifactId: string;
|
|
155
|
+
jobId: string;
|
|
156
|
+
attemptId: string;
|
|
157
|
+
name: string;
|
|
158
|
+
sha256: string;
|
|
159
|
+
sizeBytes: number;
|
|
160
|
+
contentType: string;
|
|
161
|
+
createdAt: string;
|
|
162
|
+
expiresAt: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
143
165
|
export interface ICompleteJobRequest extends IJobMutationIdentity {
|
|
144
166
|
status: TJobCompletionStatus;
|
|
145
167
|
exitCode: number | null;
|
|
@@ -261,3 +283,21 @@ export interface IRepositoryCiRunLogView {
|
|
|
261
283
|
run: IRepositoryCiRunStatus;
|
|
262
284
|
logs: ICiLogPage;
|
|
263
285
|
}
|
|
286
|
+
|
|
287
|
+
export interface IRepositoryCiArtifact {
|
|
288
|
+
artifactId: string;
|
|
289
|
+
dispatchId: string;
|
|
290
|
+
jobId: string;
|
|
291
|
+
attemptId: string;
|
|
292
|
+
name: string;
|
|
293
|
+
sha256: string;
|
|
294
|
+
sizeBytes: number;
|
|
295
|
+
contentType: string;
|
|
296
|
+
createdAt: string;
|
|
297
|
+
expiresAt: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface IRepositoryCiArtifactListView {
|
|
301
|
+
run: IRepositoryCiRunStatus;
|
|
302
|
+
artifacts: IRepositoryCiArtifact[];
|
|
303
|
+
}
|
package/ts/requests/public.ts
CHANGED
|
@@ -166,3 +166,18 @@ export interface IReq_RepositoryCiCancelRun
|
|
|
166
166
|
run: data.IRepositoryCiRunStatus;
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
+
|
|
170
|
+
export interface IReq_RepositoryCiArtifacts
|
|
171
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
172
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
173
|
+
IReq_RepositoryCiArtifacts
|
|
174
|
+
> {
|
|
175
|
+
method: 'repositoryCiArtifacts';
|
|
176
|
+
request: {
|
|
177
|
+
org: string;
|
|
178
|
+
repo: string;
|
|
179
|
+
dispatchId: string;
|
|
180
|
+
accessToken: string;
|
|
181
|
+
};
|
|
182
|
+
response: data.IRepositoryCiArtifactListView;
|
|
183
|
+
}
|