export interface Concern { folder: string; tag: string; layer: string; collection?: string; } export interface ParsedName { subject: string; variant: string | null; concern: string; ext: string; } export interface ExemptName { exempt: true; marker: string; } export interface ParseFailure { reason: string; word: string; } export type ParseResult = ExemptName | ParsedName | ParseFailure; export type ContainerKind = "container" | "special"; export type LetterCase = "lower" | "upper"; export interface Splitter { readonly name: string; readonly joiner: string | null; readonly letters: LetterCase; } export interface Dialect { readonly splitter: string; readonly extensions: readonly string[]; } export interface Placement { root: string; container: string; kind: ContainerKind; firstBelow: string; depth: number; } export interface PlacementFinding { messageId: string; data: Record; } export interface TaxonomyFinding extends PlacementFinding { path: string; } export interface TaxonomyReport { readonly assessed: number; readonly findings: readonly TaxonomyFinding[]; } export interface GeneratedFolderForm { readonly marker: string; readonly prefix: string; } export interface ExcludedTrees { readonly trees: readonly string[]; } export interface TaxonomyView { readonly byFolder: ReadonlyMap; readonly byTag: ReadonlyMap; readonly compoundMarkers: readonly string[]; readonly containers: ReadonlyMap>; readonly declaredContainers: Readonly>; readonly declaredSpecial: Readonly>; readonly dialects: readonly Dialect[]; readonly generatedFolder: GeneratedFolderForm | null; readonly ignoredNames: readonly string[]; readonly markerFolders: ReadonlyMap; readonly maxDepth: number; readonly special: ReadonlyMap>; readonly splitters: readonly Splitter[]; readonly subjects: ReadonlySet; readonly fixtureMarkers: readonly string[]; readonly testMarkers: readonly string[]; } export interface GrammarRoles { readonly rolesAtDepth: readonly (readonly string[])[]; readonly roleOrder: readonly string[]; readonly terminalRole: string; } export interface IgnoreDeclaration { readonly foldersFiles: readonly string[]; } export type TaxonomySource = Readonly> & TaxonomyShape; export interface TaxonomyShape { readonly Excluded?: ExcludedTrees; readonly boundaryDocuments?: readonly string[]; readonly concerns: readonly Concern[]; readonly containers: Readonly>; readonly foreignContainers?: Readonly>; readonly grammar: { readonly case: string; readonly compoundMarkers: readonly string[]; readonly dialects?: readonly Dialect[]; readonly file: readonly string[]; readonly folder: Readonly>; readonly generatedFolder?: GeneratedFolderForm; readonly markerFolders?: Readonly>; readonly maxDepthFromRoot: number; readonly separator: string; readonly fixtureMarkers?: readonly string[]; readonly splitters?: readonly Splitter[]; readonly testMarkers?: readonly string[]; }; readonly specialContainers: Readonly>; readonly subjects: readonly string[]; readonly testMirrors?: Readonly>; readonly variants: readonly string[]; } export interface Vocabulary { readonly boundaryDocuments: ReadonlySet; readonly byFolder: ReadonlyMap; readonly byTag: ReadonlyMap; readonly case: string; readonly compoundMarkers: readonly string[]; readonly dialects: readonly Dialect[]; readonly excludedTrees: readonly string[]; readonly fileShapes: readonly string[]; readonly generatedFolder: GeneratedFolderForm | null; readonly ignoredNames: readonly string[]; readonly legalSubjects: ReadonlySet; readonly markerFolders: ReadonlyMap; readonly maxDepth: number; readonly roles: GrammarRoles; readonly separator: string; readonly splitters: ReadonlyMap; readonly subjects: ReadonlySet; readonly fixtureMarkers: readonly string[]; readonly testMarkers: readonly string[]; readonly variants: ReadonlySet; } export interface Jurisdiction { readonly containers: ReadonlyMap>; readonly foreign: ReadonlyMap>; readonly host: Vocabulary; readonly mirrors: ReadonlyMap; readonly roots: readonly string[]; readonly special: ReadonlyMap>; readonly vocabularies: ReadonlyMap; }