@stryker-mutator/dashboard-common 0.13.3-pr-366.4 → 0.13.3-pr-281.2
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/src/Report.d.ts +2 -0
- package/dist/src/Report.js +6 -0
- package/dist/src/Uri.d.ts +5 -0
- package/dist/src/Uri.js +12 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/package.json +2 -2
package/dist/src/Report.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface MutationScoreOnlyResult {
|
|
|
5
5
|
export interface ReportIdentifier {
|
|
6
6
|
projectName: string;
|
|
7
7
|
moduleName: string | undefined;
|
|
8
|
+
realTime?: boolean;
|
|
8
9
|
version: string;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
@@ -12,4 +13,5 @@ export interface ReportIdentifier {
|
|
|
12
13
|
*/
|
|
13
14
|
export type Report = (ReportIdentifier & MutationScoreOnlyResult) | (ReportIdentifier & MutationScoreOnlyResult & MutationTestResult);
|
|
14
15
|
export declare function isMutationTestResult(report: MutationScoreOnlyResult | MutationTestResult): report is MutationTestResult;
|
|
16
|
+
export declare function isPendingReport(report: MutationTestResult): boolean;
|
|
15
17
|
//# sourceMappingURL=Report.d.ts.map
|
package/dist/src/Report.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { MutantStatus, } from 'mutation-testing-report-schema';
|
|
1
2
|
export function isMutationTestResult(report) {
|
|
2
3
|
return !!report.files;
|
|
3
4
|
}
|
|
5
|
+
export function isPendingReport(report) {
|
|
6
|
+
return Object.values(report.files)
|
|
7
|
+
.flatMap((file) => file.mutants)
|
|
8
|
+
.some((mutant) => mutant.status === MutantStatus.Pending);
|
|
9
|
+
}
|
|
4
10
|
//# sourceMappingURL=Report.js.map
|
package/dist/src/Uri.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function constructApiUri(slug, queryParams) {
|
|
2
|
+
const base = `/api/reports/${slug}`;
|
|
3
|
+
const params = new URLSearchParams();
|
|
4
|
+
for (const [key, value] of Object.entries(queryParams)) {
|
|
5
|
+
if (value !== undefined && value !== null) {
|
|
6
|
+
params.append(key, value);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const queryString = params.toString();
|
|
10
|
+
return queryString.length > 0 ? `${base}?${params.toString()}` : base;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Uri.js.map
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryker-mutator/dashboard-common",
|
|
3
|
-
"version": "0.13.3-pr-
|
|
3
|
+
"version": "0.13.3-pr-281.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "This package contains common utilities to be shared between the different dashboard components.",
|
|
6
6
|
"scripts": {
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"mutation-testing-report-schema": "2.0.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "8e5bbad7ea17830628f85f28d6d2efb204ce41be"
|
|
26
26
|
}
|