@mitre/hdf-schema 3.2.0 → 3.3.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 +15 -16
- package/dist/go/hdf.go +398 -134
- package/dist/helpers.d.ts +1 -1
- package/dist/index.d.ts +27 -52
- package/dist/index.js +30 -48
- package/dist/schemas/hdf-amendments.schema.json +466 -45
- package/dist/schemas/hdf-baseline.schema.json +471 -50
- package/dist/schemas/hdf-comparison.schema.json +721 -103
- package/dist/schemas/hdf-evidence-package.schema.json +465 -44
- package/dist/schemas/hdf-plan.schema.json +472 -50
- package/dist/schemas/hdf-results.schema.json +678 -80
- package/dist/schemas/hdf-system.schema.json +497 -59
- package/dist/ts/hdf.d.ts +3562 -0
- package/dist/ts/hdf.js +564 -0
- package/dist/ts/hdf.ts +3623 -0
- package/package.json +18 -17
- package/dist/ts/hdf-amendments.d.ts +0 -474
- package/dist/ts/hdf-amendments.js +0 -88
- package/dist/ts/hdf-amendments.ts +0 -486
- package/dist/ts/hdf-baseline.d.ts +0 -549
- package/dist/ts/hdf-baseline.js +0 -110
- package/dist/ts/hdf-baseline.ts +0 -563
- package/dist/ts/hdf-comparison.d.ts +0 -1185
- package/dist/ts/hdf-comparison.js +0 -216
- package/dist/ts/hdf-comparison.ts +0 -1210
- package/dist/ts/hdf-evidence-package.d.ts +0 -348
- package/dist/ts/hdf-evidence-package.js +0 -39
- package/dist/ts/hdf-evidence-package.ts +0 -356
- package/dist/ts/hdf-plan.d.ts +0 -204
- package/dist/ts/hdf-plan.js +0 -23
- package/dist/ts/hdf-plan.ts +0 -205
- package/dist/ts/hdf-results.d.ts +0 -1588
- package/dist/ts/hdf-results.js +0 -246
- package/dist/ts/hdf-results.ts +0 -1616
- package/dist/ts/hdf-system.d.ts +0 -609
- package/dist/ts/hdf-system.js +0 -102
- package/dist/ts/hdf-system.ts +0 -617
package/README.md
CHANGED
|
@@ -54,17 +54,13 @@ Output of the diff engine. Structural comparison between two or more HDF documen
|
|
|
54
54
|
Schemas can be imported in two ways:
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
|
-
// Named exports from the barrel (all schemas available)
|
|
57
|
+
// Named exports from the barrel (all schemas + types available)
|
|
58
58
|
import { hdfResultsSchema, hdfBaselineSchema, hdfSystemSchema } from '@mitre/hdf-schema';
|
|
59
|
+
import type { HDFResults, HDFBaseline, HDFSystem, HDFPlan, HDFAmendments, HDFEvidencePackage, HDFComparison } from '@mitre/hdf-schema';
|
|
59
60
|
|
|
60
|
-
// Sub-path imports (
|
|
61
|
-
import type {
|
|
62
|
-
import type {
|
|
63
|
-
import type { HdfSystem } from '@mitre/hdf-schema/hdf-system';
|
|
64
|
-
import type { HdfPlan } from '@mitre/hdf-schema/hdf-plan';
|
|
65
|
-
import type { HdfAmendments } from '@mitre/hdf-schema/hdf-amendments';
|
|
66
|
-
import type { HdfEvidencePackage } from '@mitre/hdf-schema/hdf-evidence-package';
|
|
67
|
-
import type { HdfComparison } from '@mitre/hdf-schema/hdf-comparison';
|
|
61
|
+
// Sub-path imports also work (all resolve to the same combined module)
|
|
62
|
+
import type { HDFResults } from '@mitre/hdf-schema/hdf-results';
|
|
63
|
+
import type { HDFBaseline } from '@mitre/hdf-schema/hdf-baseline';
|
|
68
64
|
```
|
|
69
65
|
|
|
70
66
|
Helper functions (severity mapping, effective status computation):
|
|
@@ -91,9 +87,9 @@ if (!isValid) {
|
|
|
91
87
|
### Using Generated Types (TypeScript)
|
|
92
88
|
|
|
93
89
|
```typescript
|
|
94
|
-
import type {
|
|
90
|
+
import type { HDFResults, HDFBaseline } from '@mitre/hdf-schema';
|
|
95
91
|
|
|
96
|
-
function processResults(results:
|
|
92
|
+
function processResults(results: HDFResults) {
|
|
97
93
|
for (const baseline of results.baselines) {
|
|
98
94
|
for (const requirement of baseline.requirements) {
|
|
99
95
|
console.log(`${requirement.id}: ${requirement.results[0]?.status}`);
|
|
@@ -145,8 +141,8 @@ After building, types are available in:
|
|
|
145
141
|
|
|
146
142
|
| Language | Location |
|
|
147
143
|
|----------|----------|
|
|
148
|
-
| TypeScript | `dist/ts/hdf
|
|
149
|
-
| Go | `dist/go/hdf.go` (single file
|
|
144
|
+
| TypeScript | `dist/ts/hdf.ts` (single combined file, all types deduplicated) |
|
|
145
|
+
| Go | `dist/go/hdf.go` (single combined file, all types deduplicated) |
|
|
150
146
|
|
|
151
147
|
## Development
|
|
152
148
|
|
|
@@ -190,10 +186,13 @@ Interactive schema reference documentation is published at:
|
|
|
190
186
|
|
|
191
187
|
### What's new in v3.2.0
|
|
192
188
|
|
|
193
|
-
-
|
|
194
|
-
-
|
|
189
|
+
- **Combined TypeScript output** — all types are now generated into a single `dist/ts/hdf.ts` via quicktype combined mode. This eliminates the duplicate `Identity` type bug (same interface from different per-file outputs was not assignable). Sub-path exports (`@mitre/hdf-schema/hdf-results`, etc.) still work but all resolve to the same module.
|
|
190
|
+
- **Canonical type naming via `title`** — all generated enum names are now controlled by explicit `title` properties in the source schemas. Key renames: `Copyright` → `TargetType`, `OwnerType` → `IdentityType`, `Status` → `MilestoneStatus`, `SbomFormat` → `SBOMFormat`, `PoamType` → `POAMType`.
|
|
191
|
+
- **Deprecated aliases** — `HdfResults`, `HdfBaseline`, etc. are deprecated type aliases for `HDFResults`, `HDFBaseline`. They still compile but consumers should migrate to the `HDF*` naming.
|
|
192
|
+
- **`controlType`** field on `Requirement_Core` — optional enum (`policy | procedure | technical | management | operational`) aligning with NIST SP 800-53 / SP 800-53A categories.
|
|
193
|
+
- **`verificationMethod`** field on `Requirement_Core` — optional enum (`automated | manual-by-design | manual-pending-automation | hybrid`) disambiguating the two cases that null `code` overloaded.
|
|
195
194
|
- **`applicability`** field on `Requirement_Core` — optional enum (`required | optional | advisory`) providing a uniform expression for what FedRAMP `CORE` props, FedRAMP 20x `Optional:` markers, CIS Implementation Groups, and CMMC sublevels each encode incompatibly today.
|
|
196
|
-
- **All
|
|
195
|
+
- **All schema fields are optional and additive.** v3.1.x documents validate cleanly under v3.2.0.
|
|
197
196
|
|
|
198
197
|
### What's new in v3.1.0
|
|
199
198
|
|