@produtype/core 0.53.0 → 0.55.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.
|
@@ -17,6 +17,8 @@ export interface CategoryScore {
|
|
|
17
17
|
assessedCount: number;
|
|
18
18
|
criticalCount: number;
|
|
19
19
|
highCount: number;
|
|
20
|
+
/** Checks in this category that reached no verdict. */
|
|
21
|
+
unknownCount: number;
|
|
20
22
|
/** True when nothing in the analysis touched this category, so the score is not evidence of health. */
|
|
21
23
|
notAssessed: boolean;
|
|
22
24
|
}
|
|
@@ -112,6 +112,14 @@ function buildCategoryScores(findings) {
|
|
|
112
112
|
verifiedCount: assessed.filter((finding) => finding.status === 'passed').length,
|
|
113
113
|
/** Checks in this category that reached a verdict either way. */
|
|
114
114
|
assessedCount: assessed.length,
|
|
115
|
+
/**
|
|
116
|
+
* Checks in this category that did not.
|
|
117
|
+
*
|
|
118
|
+
* "Taking payments: 1 check verified, nothing outstanding" appeared under "what
|
|
119
|
+
* already works" on the strength of one check out of eleven in that category.
|
|
120
|
+
* The count that stops the misreading is the one that was missing.
|
|
121
|
+
*/
|
|
122
|
+
unknownCount: categoryFindings.filter((finding) => finding.status === 'unknown').length,
|
|
115
123
|
criticalCount: actionable.filter((finding) => finding.severity === 'critical').length,
|
|
116
124
|
highCount: actionable.filter((finding) => finding.severity === 'high').length,
|
|
117
125
|
/**
|
|
@@ -154,6 +154,24 @@ function buildVerdict(args) {
|
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
const { gap, profileTitle } = args.profile;
|
|
157
|
+
/**
|
|
158
|
+
* A profile that requires nothing cannot be satisfied by having nothing.
|
|
159
|
+
*
|
|
160
|
+
* `static-site` marks every capability recommended or optional, so
|
|
161
|
+
* `requiredMissing === 0 && requiredPartial === 0` is true before anything is
|
|
162
|
+
* measured. Five static sites in the verification corpus were told they covered
|
|
163
|
+
* everything expected of them while satisfying one applicable capability out of six
|
|
164
|
+
* — the verdict and the coverage line disagreeing on the same page.
|
|
165
|
+
*
|
|
166
|
+
* The same answer as no profile at all, because it is the same situation: launch
|
|
167
|
+
* readiness is a question about requirements, and this profile states none.
|
|
168
|
+
*/
|
|
169
|
+
if (gap.requiredTotal === 0) {
|
|
170
|
+
return {
|
|
171
|
+
verdict: `Nothing is strictly required of ${profileTitle}, so nothing is blocking a launch. ${gap.satisfied} of ${gap.applicableTotal} expected ${gap.applicableTotal === 1 ? 'capability is' : 'capabilities are'} in place.`,
|
|
172
|
+
launchReady: null,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
157
175
|
const launchReady = gap.requiredMissing === 0 && gap.requiredPartial === 0;
|
|
158
176
|
if (launchReady) {
|
|
159
177
|
return {
|
|
@@ -193,7 +211,22 @@ function buildStrengths(categoryScores, findings) {
|
|
|
193
211
|
const strengths = strongCategories.slice(0, 3).map((entry) => {
|
|
194
212
|
const label = CATEGORY_LABEL[entry.category];
|
|
195
213
|
const checks = entry.verifiedCount === 1 ? '1 check' : `${entry.verifiedCount} checks`;
|
|
196
|
-
|
|
214
|
+
/**
|
|
215
|
+
* The coverage, not a claim of completeness.
|
|
216
|
+
*
|
|
217
|
+
* "Taking payments: 1 check verified, nothing outstanding" told a reader their
|
|
218
|
+
* billing was in good shape on the strength of one check. Forty-nine of ninety
|
|
219
|
+
* strengths across the verification corpus read that way. "Nothing outstanding"
|
|
220
|
+
* means "no finding among the checks that ran", and in a category where one check
|
|
221
|
+
* ran and ten did not, that is a sentence about this analyzer rather than about
|
|
222
|
+
* the product.
|
|
223
|
+
*
|
|
224
|
+
* Saying how many did not run is what stops the misreading, and it costs four
|
|
225
|
+
* words.
|
|
226
|
+
*/
|
|
227
|
+
return entry.unknownCount > 0
|
|
228
|
+
? `${label}: ${checks} verified, ${entry.unknownCount} not assessed`
|
|
229
|
+
: `${label}: ${checks} verified`;
|
|
197
230
|
});
|
|
198
231
|
if (strengths.length === 0 && passed.length > 0) {
|
|
199
232
|
strengths.push(`${passed.length} individual ${passed.length === 1 ? 'check' : 'checks'} already pass`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.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": {
|