import { ResolvedConfiguration } from "@css-blocks/core"; import { ResolverConfiguration } from "@glimmer/resolver"; import { ResolvedFile } from "./Template"; /** * The Glimmer CSS Blocks Resolver currently supports three * kinds of project structure modes: * - Component Names as Paths (Module Config) * - Relative Template Paths (Classic Ember) * - Relative Template Paths (Ember Pods) * * It provides abstractions for interacting with the three project * structures, so the rest of the Glimmer analyzer code can operate * independently of the filesystem structure. * */ export declare class Resolver { private depAnalyzers; private moduleConfig?; private fileEndings; /** * Creates a new Resolver for this project. * * @param cssBlocksConfig The CSS Blocks configuration object. * @param moduleConfig If applicable, the Glimmer module config for static analysis. */ constructor(cssBlocksConfig: ResolvedConfiguration, moduleConfig?: ResolverConfiguration); /** * If appropriate, returns the `DependencyAnalyzer` for a given project. * If no module config exists for the project (aka: is not a full, statically * analyzable Glimmer app) it returns undefined. * * @param base The base path of the project to analyze. * @return The DependencyAnalyzer, or undefined. */ private dependencyAnalyzerFor; /** * Converts a template file path to its associated Block filepath, if present. * All file endings associated with a preprocessor are attempted. * If no block exists, returns undefined. * * @param base The base path of the project to lookup Block files relative to. * @param template The template name we're attempting to discover block files for. * @return A promise that resolves with the discover Block path, or undefined. */ private tmplPathToStylesheetPath; /** * If possible, return the recursive template dependencies for the * provided template identifier. This will only return new data in * "Module Map" mode where we can statically analyze application * dependencies. In "Classic Ember" or "Ember Pods" mode we just * return the same ident. * * @param base The base of the project to analyze. * @param identifier The Glimmer identifier to discover recursive dependencies for. * @return The list of recursive dependencies for this identifier. */ recursiveDependenciesForTemplate(base: string, identifier: string): string[]; /** * Given a template identifier, resolve the Block file associated * with the template, if any. * * @param base The base of the project to analyze. * @param identifier The Glimmer identifier to discover recursive dependencies for. * @return The resolved Block file if present, or undefined. */ stylesheetFor(base: string, identifier: string): Promise; /** * Given a template identifier, resolve the actual template file associated * with it, if any. * @param base The base of the project to analyze. * @param identifier The template identifier to discover recursive dependencies for. * @return The resolved Block file if present, or undefined. */ templateFor(base: string, identifier: string): Promise; } //# sourceMappingURL=Resolver.d.ts.map