@mitre/hdf-schema 3.1.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.
Files changed (38) hide show
  1. package/README.md +20 -14
  2. package/dist/go/go.mod +2 -2
  3. package/dist/go/hdf.go +570 -210
  4. package/dist/helpers.d.ts +5 -1
  5. package/dist/index.d.ts +27 -52
  6. package/dist/index.js +30 -48
  7. package/dist/schemas/hdf-amendments.schema.json +565 -45
  8. package/dist/schemas/hdf-baseline.schema.json +570 -50
  9. package/dist/schemas/hdf-comparison.schema.json +820 -103
  10. package/dist/schemas/hdf-evidence-package.schema.json +564 -44
  11. package/dist/schemas/hdf-plan.schema.json +571 -50
  12. package/dist/schemas/hdf-results.schema.json +777 -80
  13. package/dist/schemas/hdf-system.schema.json +596 -59
  14. package/dist/ts/hdf.d.ts +3562 -0
  15. package/dist/ts/hdf.js +564 -0
  16. package/dist/ts/hdf.ts +3623 -0
  17. package/package.json +18 -17
  18. package/dist/ts/hdf-amendments.d.ts +0 -474
  19. package/dist/ts/hdf-amendments.js +0 -88
  20. package/dist/ts/hdf-amendments.ts +0 -486
  21. package/dist/ts/hdf-baseline.d.ts +0 -472
  22. package/dist/ts/hdf-baseline.js +0 -58
  23. package/dist/ts/hdf-baseline.ts +0 -483
  24. package/dist/ts/hdf-comparison.d.ts +0 -1185
  25. package/dist/ts/hdf-comparison.js +0 -216
  26. package/dist/ts/hdf-comparison.ts +0 -1210
  27. package/dist/ts/hdf-evidence-package.d.ts +0 -348
  28. package/dist/ts/hdf-evidence-package.js +0 -39
  29. package/dist/ts/hdf-evidence-package.ts +0 -356
  30. package/dist/ts/hdf-plan.d.ts +0 -204
  31. package/dist/ts/hdf-plan.js +0 -23
  32. package/dist/ts/hdf-plan.ts +0 -205
  33. package/dist/ts/hdf-results.d.ts +0 -1511
  34. package/dist/ts/hdf-results.js +0 -194
  35. package/dist/ts/hdf-results.ts +0 -1536
  36. package/dist/ts/hdf-system.d.ts +0 -609
  37. package/dist/ts/hdf-system.js +0 -102
  38. 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 (one schema per import, tree-shakeable)
61
- import type { HdfResults } from '@mitre/hdf-schema/hdf-results';
62
- import type { HdfBaseline } from '@mitre/hdf-schema/hdf-baseline';
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 { HdfResults, HdfBaseline } from '@mitre/hdf-schema';
90
+ import type { HDFResults, HDFBaseline } from '@mitre/hdf-schema';
95
91
 
96
- function processResults(results: HdfResults) {
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}`);
@@ -105,7 +101,7 @@ function processResults(results: HdfResults) {
105
101
  ### Using Generated Types (Go)
106
102
 
107
103
  ```go
108
- import hdf "github.com/mitre/hdf-libs/hdf-schema/dist/go"
104
+ import hdf "github.com/mitre/hdf-libs/hdf-schema/dist/go/v3"
109
105
 
110
106
  func main() {
111
107
  data := []byte(`{"baselines": [...]}`)
@@ -145,8 +141,8 @@ After building, types are available in:
145
141
 
146
142
  | Language | Location |
147
143
  |----------|----------|
148
- | TypeScript | `dist/ts/hdf-*.ts` (7 files, one per schema) |
149
- | Go | `dist/go/hdf.go` (single file containing all types) |
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
 
@@ -188,6 +184,16 @@ All schemas use **JSON Schema draft/2020-12**.
188
184
  Interactive schema reference documentation is published at:
189
185
  **<https://mitre.github.io/hdf-libs/schemas/>**
190
186
 
187
+ ### What's new in v3.2.0
188
+
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.
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.
195
+ - **All schema fields are optional and additive.** v3.1.x documents validate cleanly under v3.2.0.
196
+
191
197
  ### What's new in v3.1.0
192
198
 
193
199
  - **`disposition`** field on `EvaluatedRequirement` — the type of the governing override or POAM (e.g., `waiver`, `falsePositive`, `riskAdjustment`). Indicates why a requirement is in its current state.
package/dist/go/go.mod CHANGED
@@ -1,4 +1,4 @@
1
1
  // Code generated by hdf-schema build. DO NOT EDIT.
2
- module github.com/mitre/hdf-schema
2
+ module github.com/mitre/hdf-libs/hdf-schema/dist/go/v3
3
3
 
4
- go 1.23
4
+ go 1.26