physical.LoadedCatalogtypeno test imports ittype LoadedCatalog = { readonly manifest: CatalogPackage; readonly documents: readonly Document[] };A package read: its manifest and the documents it holds, in the order of the manifest.
Reading a catalog package from a folder (0008-grc-catalogs): the manifest (manifest.json, a grc.catalog-package), then each document it holds through the registry of kinds, after the SHA-256 of its file is checked against the manifest. A package is data and nothing else: a file that is not listed (but a README, a LICENSE or a NOTICE), a file that could run, a path that leaves the folder, a document of a kind or a schema this release does not know, a digest that differs, a document that is not what the manifest says and a crosswalk that names a control a held framework does not have are each refused, naming the file. The package says where its content came from and under what licence, and a package whose content may not be redistributed is held to identifiers and mappings.
import { readCatalogPackage } from "./catalog.ts";
// const loaded = await readCatalogPackage("./catalog-nist-csf-2/data");physical.LoadedCatalogtypeno test imports ittype LoadedCatalog = { readonly manifest: CatalogPackage; readonly documents: readonly Document[] };A package read: its manifest and the documents it holds, in the order of the manifest.
physical.CatalogProblemtypeno test imports ittype CatalogProblem = { readonly file: string; readonly reason: string };Why a package was refused: the file (or the manifest) and the reason.
physical.readCatalogPackagefunctionno test imports itfunction readCatalogPackage(dir: string, kinds: Kinds): Promise<Result<LoadedCatalog, readonly CatalogProblem[]>>Reads a package: the manifest first, then every file it lists; a folder that holds anything else, or whose content does not match its manifest, is refused with every problem found (so that a person fixes the package once).
physical.catalogControlUrnsfunctionno test imports itfunction catalogControlUrns(loaded: LoadedCatalog): readonly string[]The URNs of the controls of a loaded package's frameworks.
LoadedCatalogtypeno test imports ittype LoadedCatalog = { readonly manifest: CatalogPackage; readonly documents: readonly Document[] };A package read: its manifest and the documents it holds, in the order of the manifest.
CatalogProblemtypeno test imports ittype CatalogProblem = { readonly file: string; readonly reason: string };Why a package was refused: the file (or the manifest) and the reason.
readCatalogPackagefunctionfunction readCatalogPackage(dir: string, kinds: Kinds): Promise<Result<LoadedCatalog, readonly CatalogProblem[]>>Reads a package: the manifest first, then every file it lists; a folder that holds anything else, or whose content does not match its manifest, is refused with every problem found (so that a person fixes the package once).
catalogControlUrnsfunctionfunction catalogControlUrns(loaded: LoadedCatalog): readonly string[]The URNs of the controls of a loaded package's frameworks.