import type { RangkaConfig } from '@rangka/shared'; import type { DiscoveredApp } from './types.js'; export interface ProjectScanResult { app: DiscoveredApp; rangkaConfig: RangkaConfig; } export interface DatabaseConfig { host: string; port: number; database: string; user: string; password: string; } export declare class ProjectScanner { private readonly root; constructor(root: string); /** * Scans the project root and returns a fully-assembled DiscoveredApp * along with the rangka.config.ts settings. */ scan(): Promise; /** Loads rangka.config.ts from the project root. */ private loadRangkaConfig; /** Discovers all sub-modules under the modules/ directory. */ private scanModules; /** * Scans a single module's subdirectories and pushes discovered * artifacts into the corresponding accumulator arrays. */ private collectModuleArtifacts; /** Scans .ts files in modules//models/ for model definitions. */ private scanModels; /** * Scans .ts files in modules//hooks/ for hook definitions. * Each file exports defineHooks(model, config) which returns { model, ...config }. */ private scanHooksDirectory; /** Loads modules//roles.ts if it exists. Returns the RolesConfig or null. */ private scanRoles; /** Scans .ts files in modules//services/ for service definitions. */ private scanServices; /** Scans .ts files in modules//jobs/ for job definitions. */ private scanJobs; /** Scans .ts files in modules//fixtures/ for fixture definitions. */ private scanFixtures; /** Scans .ts files in modules//pages/ for page definitions (with error handling). */ private scanPages; /** Scans extensions/ directory for extension definitions. */ private scanExtensions; /** Emits console warnings for invalid page sources or duplicate page keys. */ private warnAboutPageIssues; /** Builds the final DiscoveredApp object, omitting empty optional arrays. */ private buildDiscoveredApp; /** Dynamically imports a TypeScript file by path. */ private importFile; /** Returns true if the path exists and is a regular file. */ private fileExists; /** Returns true if the path exists and is a directory. */ private dirExists; /** Throws if the file does not exist. */ private assertFileExists; /** * Generic helper: reads all .ts files in a directory and collects * their default exports into an array. Skips files without a default export. * Returns an empty array if the directory doesn't exist. */ private scanTsFilesWithDefault; } //# sourceMappingURL=project-scanner.d.ts.map