@mitre/hdf-schema 3.7.2 → 3.8.0-next.42533588944.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/dist/helpers.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  import type {
7
7
  EvaluatedBaseline,
8
8
  EvaluatedRequirement,
9
+ RawSourceRecord,
9
10
  RequirementResult,
10
11
  Checksum,
11
12
  Integrity,
@@ -24,9 +25,6 @@ import type {
24
25
  OverrideType,
25
26
  } from '../dist/ts/hdf.js';
26
27
 
27
- /** Minimal identity shape used by amendment appliedBy fields. */
28
- type Identity = { type: string; identifier: string; description?: string };
29
-
30
28
  export function createMinimalBaseline(
31
29
  name: string,
32
30
  requirements: EvaluatedRequirement[],
@@ -83,6 +81,7 @@ export function createResult(
83
81
  exception?: string;
84
82
  resource?: string;
85
83
  resourceId?: string;
84
+ rawSourceRecord?: RawSourceRecord;
86
85
  }
87
86
  ): RequirementResult;
88
87
 
@@ -99,7 +98,10 @@ export function createStatusOverride(
99
98
  type: OverrideType | string,
100
99
  options?: {
101
100
  reason?: string;
102
- appliedBy?: Identity;
101
+ // Looser than the schema's Identity on purpose: `type` is a plain string,
102
+ // not the IdentityType enum. Kept inline because a top-level type in a
103
+ // .d.ts module is implicitly exported and would collide with Identity.
104
+ appliedBy?: { type: string; identifier: string; description?: string };
103
105
  appliedAt?: string;
104
106
  expiresAt?: string;
105
107
  status?: ResultStatus;
@@ -111,7 +113,7 @@ export function createPoam(
111
113
  type: 'remediation' | 'mitigation' | 'riskAcceptance' | 'vendorDependency' | string,
112
114
  options?: {
113
115
  explanation?: string;
114
- appliedBy?: Identity;
116
+ appliedBy?: { type: string; identifier: string; description?: string };
115
117
  appliedAt?: string;
116
118
  expiresAt?: string;
117
119
  milestones?: Array<Record<string, unknown>>;
package/dist/helpers.js CHANGED
@@ -125,6 +125,7 @@ export function createResult(status, message, options = {}) {
125
125
  exception: options.exception,
126
126
  ...(options.resource ? { resource: options.resource } : {}),
127
127
  ...(options.resourceId ? { resourceId: options.resourceId } : {}),
128
+ ...(options.rawSourceRecord ? { rawSourceRecord: options.rawSourceRecord } : {}),
128
129
  };
129
130
  }
130
131
 
package/dist/index.d.ts CHANGED
@@ -47,6 +47,18 @@ export * from './helpers.js';
47
47
  // ── Deprecated aliases for backward compatibility ──
48
48
  // These will be removed in the next major version.
49
49
  // Consumers should migrate to HDF* naming (matching schema titles).
50
+ // `export *` re-exports the HDF* names but does not bind them in this
51
+ // module, so the aliases below need an explicit import. Without it they are
52
+ // unresolved and, under skipLibCheck, silently become `any` for consumers.
53
+ import type {
54
+ HDFResults,
55
+ HDFBaseline,
56
+ HDFComparison,
57
+ HDFSystem,
58
+ HDFPlan,
59
+ HDFAmendments,
60
+ HDFEvidencePackage,
61
+ } from './ts/hdf.js';
50
62
  /** @deprecated Use HDFResults */
51
63
  export type HdfResults = HDFResults;
52
64
  /** @deprecated Use HDFBaseline */