@produtype/core 0.56.0 → 0.57.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/report/buildReport.js +11 -1
- package/dist/report/score.d.ts +15 -1
- package/dist/report/score.js +16 -2
- package/package.json +1 -1
|
@@ -279,9 +279,19 @@ function buildReport(analysis, options) {
|
|
|
279
279
|
* band can be refused and both must reach the number, not only the label.
|
|
280
280
|
*/
|
|
281
281
|
const openCriticals = findings.filter((f) => f.severity === 'critical' && f.status !== 'passed' && f.status !== 'unknown').length;
|
|
282
|
+
/**
|
|
283
|
+
* A required capability the profile cannot find is the third bar.
|
|
284
|
+
*
|
|
285
|
+
* Not counted for a profile that requires nothing, and not counted where no profile
|
|
286
|
+
* was applied: both of those are the absence of a question rather than a failed
|
|
287
|
+
* answer, which is the distinction the rest of this report now draws everywhere.
|
|
288
|
+
*/
|
|
289
|
+
const blockingRequired = productProfile && productProfile.selectedProfile !== 'auto'
|
|
290
|
+
? productProfile.gap.requiredMissing + productProfile.gap.requiredPartial
|
|
291
|
+
: 0;
|
|
282
292
|
const overallScore = inconclusive
|
|
283
293
|
? null
|
|
284
|
-
: (0, score_1.mayClaimTopBand)(coverage, openCriticals)
|
|
294
|
+
: (0, score_1.mayClaimTopBand)(coverage, openCriticals, blockingRequired)
|
|
285
295
|
? scoreAfterInconclusive
|
|
286
296
|
: Math.min(scoreAfterInconclusive, score_1.TOP_BAND_CEILING);
|
|
287
297
|
const maturityLevel = overallScore === null
|
package/dist/report/score.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare function coverageSupportsTopBand(coverage: ScoreCoverage): boolea
|
|
|
46
46
|
* apart again: they did, and the number went on reading 98 above every real product in
|
|
47
47
|
* the corpus while the label said `partial`.
|
|
48
48
|
*/
|
|
49
|
-
export declare function mayClaimTopBand(coverage: ScoreCoverage, openCriticals: number): boolean;
|
|
49
|
+
export declare function mayClaimTopBand(coverage: ScoreCoverage, openCriticals: number, blockingRequired?: number): boolean;
|
|
50
50
|
/**
|
|
51
51
|
* How many critical findings are open.
|
|
52
52
|
*
|
|
@@ -57,4 +57,18 @@ export declare function mayClaimTopBand(coverage: ScoreCoverage, openCriticals:
|
|
|
57
57
|
* severity ceiling was added — "a category with one critical and nine passing checks is
|
|
58
58
|
* not 90% healthy" — and the report's own headline had not learned it.
|
|
59
59
|
*/
|
|
60
|
+
/**
|
|
61
|
+
* A capability the profile calls essential, missing or half-built.
|
|
62
|
+
*
|
|
63
|
+
* The third bar on the top band, and the one a reader could see for themselves.
|
|
64
|
+
* firefly-iii was labelled "Production ready" directly above the sentence "This
|
|
65
|
+
* project is not ready to launch as B2C App: 3 essential capabilities are missing or
|
|
66
|
+
* incomplete" — two labels on one page contradicting each other. Five of the
|
|
67
|
+
* eighty-two repositories measured read that way, this product's own web application
|
|
68
|
+
* among them.
|
|
69
|
+
*
|
|
70
|
+
* The two answer different questions and the words do not care: "production ready" is
|
|
71
|
+
* a claim about readiness, and something the profile calls essential and cannot find
|
|
72
|
+
* is by definition blocking. The band is the thing that has to give.
|
|
73
|
+
*/
|
|
60
74
|
export declare function computeMaturity(score: number, coverage?: ScoreCoverage, openCriticals?: number): MaturityLevel;
|
package/dist/report/score.js
CHANGED
|
@@ -66,8 +66,8 @@ function coverageSupportsTopBand(coverage) {
|
|
|
66
66
|
* apart again: they did, and the number went on reading 98 above every real product in
|
|
67
67
|
* the corpus while the label said `partial`.
|
|
68
68
|
*/
|
|
69
|
-
function mayClaimTopBand(coverage, openCriticals) {
|
|
70
|
-
return coverageSupportsTopBand(coverage) && openCriticals === 0;
|
|
69
|
+
function mayClaimTopBand(coverage, openCriticals, blockingRequired = 0) {
|
|
70
|
+
return coverageSupportsTopBand(coverage) && openCriticals === 0 && blockingRequired === 0;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* How many critical findings are open.
|
|
@@ -79,6 +79,20 @@ function mayClaimTopBand(coverage, openCriticals) {
|
|
|
79
79
|
* severity ceiling was added — "a category with one critical and nine passing checks is
|
|
80
80
|
* not 90% healthy" — and the report's own headline had not learned it.
|
|
81
81
|
*/
|
|
82
|
+
/**
|
|
83
|
+
* A capability the profile calls essential, missing or half-built.
|
|
84
|
+
*
|
|
85
|
+
* The third bar on the top band, and the one a reader could see for themselves.
|
|
86
|
+
* firefly-iii was labelled "Production ready" directly above the sentence "This
|
|
87
|
+
* project is not ready to launch as B2C App: 3 essential capabilities are missing or
|
|
88
|
+
* incomplete" — two labels on one page contradicting each other. Five of the
|
|
89
|
+
* eighty-two repositories measured read that way, this product's own web application
|
|
90
|
+
* among them.
|
|
91
|
+
*
|
|
92
|
+
* The two answer different questions and the words do not care: "production ready" is
|
|
93
|
+
* a claim about readiness, and something the profile calls essential and cannot find
|
|
94
|
+
* is by definition blocking. The band is the thing that has to give.
|
|
95
|
+
*/
|
|
82
96
|
function computeMaturity(score, coverage, openCriticals = 0) {
|
|
83
97
|
if (score <= 39)
|
|
84
98
|
return 'prototype';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|