qfai 0.3.8 → 0.4.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/README.md +7 -0
- package/assets/init/.qfai/README.md +4 -0
- package/assets/init/.qfai/specs/README.md +1 -1
- package/assets/init/root/qfai.config.yaml +2 -0
- package/assets/init/root/tests/qfai-traceability.sample.test.ts +2 -0
- package/dist/cli/index.cjs +351 -218
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +350 -217
- package/dist/cli/index.mjs.map +1 -1
- package/dist/core/config.d.ts +2 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +4 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/report.d.ts +2 -0
- package/dist/core/report.d.ts.map +1 -1
- package/dist/core/report.js +34 -0
- package/dist/core/report.js.map +1 -1
- package/dist/core/traceability.d.ts +12 -0
- package/dist/core/traceability.d.ts.map +1 -0
- package/dist/core/traceability.js +70 -0
- package/dist/core/traceability.js.map +1 -0
- package/dist/core/validators/traceability.d.ts.map +1 -1
- package/dist/core/validators/traceability.js +11 -1
- package/dist/core/validators/traceability.js.map +1 -1
- package/dist/index.cjs +344 -205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.mjs +348 -208
- package/dist/index.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
type IssueSeverity = "info" | "warning" | "error";
|
|
2
|
-
declare const VALIDATION_SCHEMA_VERSION: "0.2";
|
|
3
2
|
type IssueLocation = {
|
|
4
3
|
line: number;
|
|
5
4
|
column?: number;
|
|
@@ -19,7 +18,6 @@ type ValidationCounts = {
|
|
|
19
18
|
error: number;
|
|
20
19
|
};
|
|
21
20
|
type ValidationResult = {
|
|
22
|
-
schemaVersion: typeof VALIDATION_SCHEMA_VERSION;
|
|
23
21
|
toolVersion: string;
|
|
24
22
|
issues: Issue[];
|
|
25
23
|
counts: ValidationCounts;
|
|
@@ -45,6 +43,8 @@ type QfaiValidationConfig = {
|
|
|
45
43
|
traceability: {
|
|
46
44
|
brMustHaveSc: boolean;
|
|
47
45
|
scMustTouchContracts: boolean;
|
|
46
|
+
scMustHaveTest: boolean;
|
|
47
|
+
scNoTestSeverity: TraceabilitySeverity;
|
|
48
48
|
allowOrphanContracts: boolean;
|
|
49
49
|
unknownContractIdSeverity: TraceabilitySeverity;
|
|
50
50
|
};
|
|
@@ -74,6 +74,14 @@ declare function extractIds(text: string, prefix: IdPrefix): string[];
|
|
|
74
74
|
declare function extractAllIds(text: string): string[];
|
|
75
75
|
declare function extractInvalidIds(text: string, prefixes: IdFormatPrefix[]): string[];
|
|
76
76
|
|
|
77
|
+
type ScCoverage = {
|
|
78
|
+
total: number;
|
|
79
|
+
covered: number;
|
|
80
|
+
missing: number;
|
|
81
|
+
missingIds: string[];
|
|
82
|
+
refs: Record<string, string[]>;
|
|
83
|
+
};
|
|
84
|
+
|
|
77
85
|
type ReportSummary = {
|
|
78
86
|
specs: number;
|
|
79
87
|
scenarios: number;
|
|
@@ -95,6 +103,7 @@ type ReportIds = {
|
|
|
95
103
|
type ReportTraceability = {
|
|
96
104
|
upstreamIdsFound: number;
|
|
97
105
|
referencedInCodeOrTests: boolean;
|
|
106
|
+
sc: ScCoverage;
|
|
98
107
|
};
|
|
99
108
|
type ReportData = {
|
|
100
109
|
tool: "qfai";
|
|
@@ -130,4 +139,4 @@ declare function validateSpecContent(text: string, file: string, requiredSection
|
|
|
130
139
|
|
|
131
140
|
declare function validateTraceability(root: string, config: QfaiConfig): Promise<Issue[]>;
|
|
132
141
|
|
|
133
|
-
export { type ConfigLoadResult, type ConfigPathKey, type FailOn, type IdFormatPrefix, type IdPrefix, type Issue, type IssueLocation, type IssueSeverity, type OutputFormat, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiValidationConfig, type ReportData, type ReportIds, type ReportSummary, type ReportTraceability, type TraceabilitySeverity,
|
|
142
|
+
export { type ConfigLoadResult, type ConfigPathKey, type FailOn, type IdFormatPrefix, type IdPrefix, type Issue, type IssueLocation, type IssueSeverity, type OutputFormat, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiValidationConfig, type ReportData, type ReportIds, type ReportSummary, type ReportTraceability, type TraceabilitySeverity, type ValidationCounts, type ValidationResult, createReportData, defaultConfig, extractAllIds, extractIds, extractInvalidIds, formatReportJson, formatReportMarkdown, getConfigPath, lintSql, loadConfig, resolvePath, resolveToolVersion, validateContracts, validateDefinedIds, validateDeltas, validateProject, validateScenarioContent, validateScenarios, validateSpecContent, validateSpecs, validateTraceability };
|