configuration/constants/evidence.constants.ts

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

import {
    DETECT_SECTION_ID,
    GATE_SECTION_ID,
    ORDER_SECTION_ID,
    SHAPE_SECTION_ID,
    TOOL_SECTION_ID,
} from "@banes-lab/web/core/ids/build.ids.ts";
import { ARCHITECTURE_ABSENT } from "#configuration/constants/evidence.architecture.constants";
import { CHAPTER_ABSENT } from "#configuration/constants/evidence.chapter.constants";
import type { DeclaredAbsence } from "#types/coverage.types";
import { METHODOLOGY_BUILD_TAB } from "@banes-lab/web/core/ids/methodology.ids.ts";
import { METHODOLOGY_PAGE } from "@banes-lab/web/core/ids/page.ids.ts";
import { ONTOLOGY_ABSENT } from "#configuration/constants/evidence.ontology.constants";
import { PATTERN_ABSENT } from "#configuration/constants/evidence.pattern.constants";

const OUTSIDE_THE_WEB_MEMBER: DeclaredAbsence["reason"] = "outside-the-web-member";

const absent = function absent(section: string, reason: DeclaredAbsence["reason"]): DeclaredAbsence {
    return { reason, subject: { kind: "chapter", page: METHODOLOGY_PAGE, section, tab: METHODOLOGY_BUILD_TAB } };
};

export const EVIDENCE_ABSENT: readonly DeclaredAbsence[] = [
    absent(DETECT_SECTION_ID, OUTSIDE_THE_WEB_MEMBER),
    absent(GATE_SECTION_ID, OUTSIDE_THE_WEB_MEMBER),
    absent(ORDER_SECTION_ID, OUTSIDE_THE_WEB_MEMBER),
    absent(SHAPE_SECTION_ID, OUTSIDE_THE_WEB_MEMBER),
    absent(TOOL_SECTION_ID, OUTSIDE_THE_WEB_MEMBER),
    ...CHAPTER_ABSENT,
    ...ARCHITECTURE_ABSENT,
    ...PATTERN_ABSENT,
    ...ONTOLOGY_ABSENT,
];