/**
 * Yii2 module inventory (N1).
 *
 * Scans a Yii2 codebase for classes extending `yii\\base\\Module` and emits
 * a structured per-module summary: controller namespace, controllers, views,
 * migrations path, components, sub-modules. Also resolves URL prefixes by
 * cross-referencing config/web.php urlManager rules + the application's
 * `modules` registration.
 *
 * Why this is its own tool (vs. squeezing into php_project_audit):
 *   - Modules are the primary architectural unit of medium/large Yii2 apps
 *     (tgm-panel: 11 modules; Mobi 2: similar). Routing, RBAC, and god-model
 *     analysis all benefit from being able to scope to a module.
 *   - The output is a graph of cross-file references (controllers ↔ views ↔
 *     migrations ↔ config), not a flat findings list.
 *
 * Implementation depends on the v2.0.0 PHP extractor — uses `s.extends`
 * (introduced in Sprint 1) to detect Module subclasses structurally.
 * Falls back to a regex check on `s.source` when `extends` is absent so
 * stale indexes don't go silent.
 */
import { relative } from "node:path";
export interface YiiControllerRef {
    class: string;
    file: string;
    /** Action methods discovered as children — names retain the `action` prefix
     *  so callers can map them back to URL action ids without ambiguity. */
    actions: string[];
}
export interface YiiModuleSummary {
    /** Module id derived from the directory name containing Module.php. */
    id: string;
    /** Fully-qualified class name (e.g. app\\modules\\review\\Module). */
    class: string;
    /** Path to the Module.php file. */
    file: string;
    /** Value of `controllerNamespace` property if declared, else null. */
    controllerNamespace: string | null;
    /** Path containing the module's controllers, derived from the Module.php
     *  location. */
    controllers_path: string;
    controllers: YiiControllerRef[];
    /** Per-module views directory. */
    views_path: string;
    views_count: number;
    /** Module's own migrations directory if present (e.g. modules/<id>/migrations/). */
    migrations_path: string | null;
    migrations_count: number;
    /** Sub-module ids (modules nested under this module's modules() method). */
    submodules: string[];
    /** URL prefixes from main app config that route into this module. */
    url_prefixes: string[];
}
export interface YiiModulesAudit {
    repo: string;
    total_modules: number;
    modules: YiiModuleSummary[];
}
export declare function analyzeYiiModules(repo: string, options?: {
    module_id?: string;
}): Promise<YiiModulesAudit>;
export { relative as _relativePathForTests };
//# sourceMappingURL=yii-modules-tools.d.ts.map