configuration/constants/evidence.source.constants.ts

configuration/constants/evidence.source.constants.ts is a file in Bane's Lab Site. 111 lines of code and 3 definitions.

import { ALGO_FACE, ARCH_FACE, LEX_FACE } from "@govlab/constants";
import { ARCHITECTURE_PAGE, METHODOLOGY_PAGE } from "#core/ids/page.ids";
import { DEFINITION_SECTION_ID, DIRECTION_SECTION_ID, MODEL_TAB, SPINE_SECTION_ID } from "#core/ids/architecture.ids";
import { FILESYSTEM_SECTION_ID, HOME_SECTION_ID } from "#core/ids/invariant.ids";
import { METHODOLOGY_BUILD_TAB, VERIFY_TAB } from "#core/ids/methodology.ids";
import {
    chapterSubject as chapter,
    definitionNode as definition,
    fileNode as file,
    folderNode as folder,
    groundedBy,
    recordSubject as record,
} from "#core/factories/evidence.factory";
import { CHAPTER_EVIDENCE } from "#configuration/constants/evidence.chapter.constants";
import { COORDINATION_EVIDENCE } from "#configuration/constants/evidence.coordination.constants";
import { DERIVED_SECTION_ID } from "#core/ids/derivation.ids";
import { DOCUMENTATION_SECTION_ID } from "#core/ids/coverage.ids";
import type { Evidence } from "#types/evidence.types";
import { GOVERNANCE_EVIDENCE } from "#configuration/constants/evidence.governance.constants";
import { RELEASE_EVIDENCE } from "#configuration/constants/evidence.release.constants";
import { TAXONOMY_SECTION_ID } from "#core/ids/taxonomy.ids";

const PAGE_RECORDS = [definition("registerPage"), folder("presentation", "records"), file("records.barrel.ts")];

const EVENT_BUS = [definition("emitEvent"), definition("subscribeEvent"), folder("core", "buses")];

export const EVIDENCE: readonly Evidence[] = [
    ...CHAPTER_EVIDENCE,
    ...COORDINATION_EVIDENCE,
    ...GOVERNANCE_EVIDENCE,
    ...RELEASE_EVIDENCE,
    { nodes: [...PAGE_RECORDS, definition("createRegistry")], subject: record(ARCH_FACE, "registry-pattern") },
    ...groundedBy(PAGE_RECORDS, LEX_FACE, ["self-registration"]),
    {
        nodes: [folder("configuration", "strings"), folder("core", "ids"), definition("tabLink")],
        subject: record(ARCH_FACE, "single-source-of-truth"),
    },
    {
        nodes: [
            definition("ANATOMY"),
            definition("ONTOLOGY"),
            definition("VOCABULARY"),
            folder("core", "assets"),
            definition("anatomyChapter"),
        ],
        subject: record(ARCH_FACE, "self-describing-architecture"),
    },
    {
        nodes: [
            definition("linkTabs"),
            definition("chapterVocabulary"),
            definition("joinGlossary"),
            definition("matchPhrases"),
            definition("linkText", "link.vocabulary.converter.ts"),
        ],
        subject: chapter(METHODOLOGY_PAGE, VERIFY_TAB, DERIVED_SECTION_ID),
    },
    {
        nodes: [folder("configuration", "constants"), folder("configuration", "icons")],
        subject: record(ARCH_FACE, "declarative-configuration"),
    },
    {
        nodes: [definition("importsDiagram"), folder("core"), folder("domain")],
        subject: record(ARCH_FACE, "dependency-inversion"),
    },
    {
        nodes: [folder("types"), definition("renderBlock")],
        subject: chapter(ARCHITECTURE_PAGE, MODEL_TAB, DEFINITION_SECTION_ID),
    },
    {
        nodes: [definition("treeTab"), definition("layersText")],
        subject: chapter(ARCHITECTURE_PAGE, MODEL_TAB, SPINE_SECTION_ID),
    },
    {
        nodes: [definition("treeTab"), definition("layersText")],
        subject: chapter(METHODOLOGY_PAGE, METHODOLOGY_BUILD_TAB, TAXONOMY_SECTION_ID),
    },
    {
        nodes: [definition("importsDiagram"), folder("core"), folder("domain")],
        subject: chapter(ARCHITECTURE_PAGE, MODEL_TAB, DIRECTION_SECTION_ID),
    },
    {
        nodes: [definition("markDocumentReferences"), definition("documentBlocks")],
        subject: chapter(METHODOLOGY_PAGE, VERIFY_TAB, DOCUMENTATION_SECTION_ID),
    },
    {
        nodes: [
            definition("mountReference"),
            definition("anatomyRecord"),
            definition("loadReferences", "reference.generated.ts"),
        ],
        subject: record(ALGO_FACE, "architecture-knowledge-graph"),
    },
    {
        nodes: [folder("configuration", "strings"), folder("core", "ids"), definition("tabLink")],
        subject: chapter(METHODOLOGY_PAGE, METHODOLOGY_BUILD_TAB, HOME_SECTION_ID),
    },
    { nodes: PAGE_RECORDS, subject: chapter(METHODOLOGY_PAGE, METHODOLOGY_BUILD_TAB, FILESYSTEM_SECTION_ID) },
    ...groundedBy(PAGE_RECORDS, ARCH_FACE, [
        "extension-points",
        "lazy-evaluation",
        "open-closed",
        "plugin-architecture",
        "runtime-discovery",
    ]),
    ...groundedBy(PAGE_RECORDS.slice(0, 2), ARCH_FACE, ["metadata-driven-design"]),
    ...groundedBy(PAGE_RECORDS.slice(2), ARCH_FACE, ["glob-resolvable-tree"]),
    ...groundedBy(EVENT_BUS, ARCH_FACE, ["event-bus", "observer-pattern", "publish-subscribe-pattern"]),
    ...groundedBy([definition("diagramDigest")], ARCH_FACE, ["caching"]),
    ...groundedBy([definition("importsDiagram")], ARCH_FACE, ["dependency-graph"]),
    ...groundedBy([definition("loadReferences", "reference.generated.ts"), definition("mountReference")], ARCH_FACE, [
        "knowledge-graphs",
    ]),
];