import { FileAccessor } from "../fileAccessor"; import { FilePathMapping } from "./dto"; export declare class YamlIncludeFileParser { private fileAccessor; private includes; constructor(fileAccessor: FileAccessor); /** * Find all the !include (and similar) tags * Return a list of mappings, from location (path) in file x to file y via tag-type z * @param filename of the file to find !includes in */ parse(filename: string, path: string): Promise; /** * Flatten (and distinct) the includes to a 2 dimensional array * that can be used by external services * */ private getPathMappings; /** * Replace directory-based includes with includes for all the files in the directory */ private replaceFolderBasedIncludes; /** * Traverse over YAML document and find the includes * The includes are a special type of object set via this.includeResolver() * In this includeResolver it's unknown where this include is (no context) * This method sets the 'path' property on this object */ private updatePathsViaTraversal; private getCustomTags; /** * Custom Resolver for the tags set in `this.getCustomTags()` * This gets called as part of the `YAML.parse()` operatin * both the `!include` and the `filename.yaml` part are replaced in the final YAML result * they are replaced by an object containing both the from- and to filenames * also all includes are stored in `this.includes` for later use */ private includeResolver; }