ccqa 1.32.0 → 1.34.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/dist/bin/ccqa.mjs +704 -229
- package/dist/hub-client/index.d.mts +60 -0
- package/dist/hub-client/index.mjs +20 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -237,6 +237,39 @@ declare const AttestationsResponseSchema: z.ZodObject<{
|
|
|
237
237
|
}, z.core.$strip>>;
|
|
238
238
|
}, z.core.$strip>;
|
|
239
239
|
type AttestationsResponse = z.infer<typeof AttestationsResponseSchema>;
|
|
240
|
+
declare const AuditDismissalResponseSchema: z.ZodObject<{
|
|
241
|
+
project: z.ZodString;
|
|
242
|
+
spec: z.ZodString;
|
|
243
|
+
dismissal: z.ZodObject<{
|
|
244
|
+
by: z.ZodString;
|
|
245
|
+
at: z.ZodString;
|
|
246
|
+
note: z.ZodString;
|
|
247
|
+
auditRunId: z.ZodString;
|
|
248
|
+
label: z.ZodEnum<{
|
|
249
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
250
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
251
|
+
UNKNOWN: "UNKNOWN";
|
|
252
|
+
}>;
|
|
253
|
+
headline: z.ZodString;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
type AuditDismissalResponse = z.infer<typeof AuditDismissalResponseSchema>;
|
|
257
|
+
declare const AuditDismissalsResponseSchema: z.ZodObject<{
|
|
258
|
+
project: z.ZodString;
|
|
259
|
+
specs: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
260
|
+
by: z.ZodString;
|
|
261
|
+
at: z.ZodString;
|
|
262
|
+
note: z.ZodString;
|
|
263
|
+
auditRunId: z.ZodString;
|
|
264
|
+
label: z.ZodEnum<{
|
|
265
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
266
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
267
|
+
UNKNOWN: "UNKNOWN";
|
|
268
|
+
}>;
|
|
269
|
+
headline: z.ZodString;
|
|
270
|
+
}, z.core.$strip>>;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
type AuditDismissalsResponse = z.infer<typeof AuditDismissalsResponseSchema>;
|
|
240
273
|
/** Body of `GET /projects/:project/audit-needed?profile=`: one answer per spec. */
|
|
241
274
|
declare const AuditNeedReportSchema: z.ZodObject<{
|
|
242
275
|
project: z.ZodString;
|
|
@@ -303,6 +336,19 @@ declare const RerunReportSchema: z.ZodObject<{
|
|
|
303
336
|
deployedShaNotInLog: "deployedShaNotInLog";
|
|
304
337
|
gapInRange: "gapInRange";
|
|
305
338
|
}>>;
|
|
339
|
+
auditDismissed: z.ZodOptional<z.ZodObject<{
|
|
340
|
+
by: z.ZodString;
|
|
341
|
+
at: z.ZodString;
|
|
342
|
+
note: z.ZodString;
|
|
343
|
+
auditRunId: z.ZodString;
|
|
344
|
+
label: z.ZodEnum<{
|
|
345
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
346
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
347
|
+
UNKNOWN: "UNKNOWN";
|
|
348
|
+
}>;
|
|
349
|
+
headline: z.ZodString;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
auditDismissalApplied: z.ZodOptional<z.ZodBoolean>;
|
|
306
352
|
executionAssumedReached: z.ZodOptional<z.ZodEnum<{
|
|
307
353
|
noSelectionInRange: "noSelectionInRange";
|
|
308
354
|
selectionUnknown: "selectionUnknown";
|
|
@@ -1070,6 +1116,20 @@ interface HubClient {
|
|
|
1070
1116
|
deleteAttestation(project: string, q: {
|
|
1071
1117
|
profile: string;
|
|
1072
1118
|
}, spec: string): Promise<void>;
|
|
1119
|
+
/** Every dismissed audit finding for the project, current and superseded alike. No profile — findings are about the repository. */
|
|
1120
|
+
getAuditDismissals(project: string): Promise<AuditDismissalsResponse>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Record that a person judged `spec`'s current audit finding wrong. The hub
|
|
1123
|
+
* reads which finding that is from the ledger and pins the dismissal to it;
|
|
1124
|
+
* a spec with no open finding is rejected.
|
|
1125
|
+
*/
|
|
1126
|
+
putAuditDismissal(project: string, body: {
|
|
1127
|
+
spec: string;
|
|
1128
|
+
by: string;
|
|
1129
|
+
note: string;
|
|
1130
|
+
}): Promise<AuditDismissalResponse>;
|
|
1131
|
+
/** Withdraw a dismissal, putting the audit's finding back in force. */
|
|
1132
|
+
deleteAuditDismissal(project: string, spec: string): Promise<void>;
|
|
1073
1133
|
/**
|
|
1074
1134
|
* Every spec's last `ccqa audit --report-to-hub` result, keyed by "feature/spec". No
|
|
1075
1135
|
* profile — drift asks whether a spec still describes the code, not
|
|
@@ -199,6 +199,23 @@ function createHubClient(opts) {
|
|
|
199
199
|
body: JSON.stringify({ spec })
|
|
200
200
|
});
|
|
201
201
|
},
|
|
202
|
+
getAuditDismissals(project) {
|
|
203
|
+
return json(auditDismissalsPath(project));
|
|
204
|
+
},
|
|
205
|
+
putAuditDismissal(project, body) {
|
|
206
|
+
return json(auditDismissalsPath(project), {
|
|
207
|
+
method: "PUT",
|
|
208
|
+
headers: { "Content-Type": "application/json" },
|
|
209
|
+
body: JSON.stringify(body)
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
async deleteAuditDismissal(project, spec) {
|
|
213
|
+
await request(auditDismissalsPath(project), {
|
|
214
|
+
method: "DELETE",
|
|
215
|
+
headers: { "Content-Type": "application/json" },
|
|
216
|
+
body: JSON.stringify({ spec })
|
|
217
|
+
});
|
|
218
|
+
},
|
|
202
219
|
getAuditNeed(project, q) {
|
|
203
220
|
return json(`/api/v1/projects/${encodeURIComponent(project)}/audit-needed?${queryString({ profile: q.profile })}`);
|
|
204
221
|
},
|
|
@@ -325,6 +342,9 @@ function locksPath(project) {
|
|
|
325
342
|
function attestationsPath(project) {
|
|
326
343
|
return `/api/v1/projects/${encodeURIComponent(project)}/attestations`;
|
|
327
344
|
}
|
|
345
|
+
function auditDismissalsPath(project) {
|
|
346
|
+
return `/api/v1/projects/${encodeURIComponent(project)}/audit-dismissals`;
|
|
347
|
+
}
|
|
328
348
|
/** Perspectives are one document per project: `/api/v1/projects/<project>/perspectives`. */
|
|
329
349
|
function perspectivesPath(project) {
|
|
330
350
|
return `/api/v1/projects/${encodeURIComponent(project)}/perspectives`;
|
package/dist/package.json
CHANGED