The importer of an OSCAL control catalog (commons 0019-mizan-integrationsFR-005, FR-006, FR-009, FR-015): a slice of the controls of a catalog such as NIST SP 800-53, read from OSCAL's JSON, written as a generated TypeScript module of a typed code list whose keys are the control identifiers, so that a requirement cites ac-2 and the compiler knows it is a control of the pinned catalog.
The catalog's JSON is read once, here, into typed records (decodeCatalog); a control is its identifier, title, group and, for an enhancement, the control it enhances. The slice names control identifiers (ac-2, ac-2.1), never the whole catalog. The checks are those of the vocabulary importer: a pin that differs, no license and no right to copy are refused, a control the catalog lacks is named, and the same input gives the same text. The module carries the catalog's title, version and OSCAL version in its header.
typeOscalImportInput= {
readonlystandard:StandardRecord;
/** The catalog's JSON, as the pinned bytes read as UTF-8 text. */readonlysourceText:string;
/** The control identifiers to take (`ac-2`, `ac-2.1`), never the whole catalog. */readonlyslice:readonlystring[];
/** The name the code list is exported as (`controls` by default). */readonlyexportName?:string;
};
typeOscalImportInput= {
readonlystandard:StandardRecord;
/** The catalog's JSON, as the pinned bytes read as UTF-8 text. */readonlysourceText:string;
/** The control identifiers to take (`ac-2`, `ac-2.1`), never the whole catalog. */readonlyslice:readonlystring[];
/** The name the code list is exported as (`controls` by default). */readonlyexportName?:string;
};