@mitre/hdf-schema 3.3.2 → 3.4.1
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 +10 -0
- package/dist/go/hdf.go +585 -534
- package/dist/helpers.js +5 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -25
- package/dist/schemas/hdf-amendments.schema.json +53 -46
- package/dist/schemas/hdf-baseline.schema.json +58 -51
- package/dist/schemas/hdf-comparison.schema.json +846 -243
- package/dist/schemas/hdf-evidence-package.schema.json +204 -51
- package/dist/schemas/hdf-plan.schema.json +58 -51
- package/dist/schemas/hdf-results.schema.json +785 -214
- package/dist/schemas/hdf-system.schema.json +760 -187
- package/dist/ts/hdf.d.ts +628 -468
- package/dist/ts/hdf.js +95 -139
- package/dist/ts/hdf.ts +637 -468
- package/package.json +2 -2
package/dist/helpers.js
CHANGED
|
@@ -92,14 +92,16 @@ export function createDescription(label, data) {
|
|
|
92
92
|
/**
|
|
93
93
|
* Create a RequirementResult
|
|
94
94
|
* @param {import('../dist/ts/hdf-results.js').ResultStatus} status - Test result status
|
|
95
|
-
* @param {string} [message] - Optional message explaining the result
|
|
95
|
+
* @param {string} [message] - Optional message explaining the result. Omitted from
|
|
96
|
+
* the result entirely when empty/undefined, so converters no longer emit a spurious
|
|
97
|
+
* `"message": ""` that the Go side (omitempty) drops — keeping TS/Go output aligned.
|
|
96
98
|
* @param {Object} [options] - Optional fields
|
|
97
99
|
* @returns {import('../dist/ts/hdf-results.js').RequirementResult}
|
|
98
100
|
*/
|
|
99
|
-
export function createResult(status, message
|
|
101
|
+
export function createResult(status, message, options = {}) {
|
|
100
102
|
return {
|
|
101
103
|
status,
|
|
102
|
-
message,
|
|
104
|
+
...(message ? { message } : {}),
|
|
103
105
|
codeDesc: options.codeDesc || '',
|
|
104
106
|
startTime: options.startTime,
|
|
105
107
|
runTime: options.runTime,
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const hdfResultsSchema: Readonly<Record<string, unknown>>;
|
|
|
15
15
|
export declare const hdfSystemSchema: Readonly<Record<string, unknown>>;
|
|
16
16
|
export declare const affectedPackageSchema: Readonly<Record<string, unknown>>;
|
|
17
17
|
export declare const amendmentsSchema: Readonly<Record<string, unknown>>;
|
|
18
|
+
export declare const bomSchema: Readonly<Record<string, unknown>>;
|
|
18
19
|
export declare const commonSchema: Readonly<Record<string, unknown>>;
|
|
19
20
|
export declare const comparisonSchema: Readonly<Record<string, unknown>>;
|
|
20
21
|
export declare const componentSchema: Readonly<Record<string, unknown>>;
|