@decantr/verifier 2.3.1 → 2.3.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/README.md +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ npm install @decantr/verifier
|
|
|
23
23
|
- interaction findings now include scanned file counts, file line ranges, and expected signal evidence where available, so CLI health/check output can point agents at source-grounded remediation
|
|
24
24
|
- contract-only Brownfield critique avoids requiring Decantr treatments/decorators when the project keeps its own styling authority
|
|
25
25
|
- project audits check that `pack-manifest.json` references real pack markdown/JSON files on disk
|
|
26
|
+
- project source audits ignore test, spec, story, fixture, and mock files for production drift warnings such as localhost endpoints and unsafe rendering patterns
|
|
26
27
|
- published verifier report schemas are exercised by AJV-backed round-trip tests against real audit, critique, and shortlist-report outputs
|
|
27
28
|
- project audits include runtime evidence when a built `dist/` output is present:
|
|
28
29
|
- root document
|
package/dist/index.js
CHANGED
|
@@ -1185,6 +1185,12 @@ function isAuditableSourceFile(filePath) {
|
|
|
1185
1185
|
if (/\.d\.ts$/i.test(filePath)) return false;
|
|
1186
1186
|
return /\.(?:[cm]?[jt]sx?)$/i.test(filePath);
|
|
1187
1187
|
}
|
|
1188
|
+
function isNonProductionSourceAuditFile(filePath) {
|
|
1189
|
+
const normalized = normalizeSourceAuditPath(filePath);
|
|
1190
|
+
return /(?:^|\/)(?:__tests__|__mocks__|tests?|specs?|fixtures?|mocks?|stories?)(?:\/|$)/i.test(
|
|
1191
|
+
normalized
|
|
1192
|
+
) || /\.(?:test|spec|stories|story|fixture|mock)\.[cm]?[jt]sx?$/i.test(normalized);
|
|
1193
|
+
}
|
|
1188
1194
|
function collectProjectSourceFiles(projectRoot) {
|
|
1189
1195
|
const candidates = [
|
|
1190
1196
|
"src",
|
|
@@ -1412,10 +1418,10 @@ function auditProjectSourceTree(projectRoot) {
|
|
|
1412
1418
|
absolutePath: sourceFile,
|
|
1413
1419
|
relativePath: relative(projectRoot, sourceFile) || sourceFile,
|
|
1414
1420
|
code: readFileSync2(sourceFile, "utf-8")
|
|
1415
|
-
}));
|
|
1421
|
+
})).filter((entry) => !isNonProductionSourceAuditFile(entry.relativePath));
|
|
1416
1422
|
const clientReachableFiles = collectClientReachableSourceFiles(projectRoot, sourceEntries);
|
|
1417
1423
|
const summary = {
|
|
1418
|
-
filesChecked:
|
|
1424
|
+
filesChecked: sourceEntries.length,
|
|
1419
1425
|
inlineStyles: createSourceAuditBucket(),
|
|
1420
1426
|
componentStyleTags: createSourceAuditBucket(),
|
|
1421
1427
|
localCssRuntimeSignals: createSourceAuditBucket(),
|