/** * Docker Compose → canonical IR for `archrad init --from docker-compose.yml`. * Deterministic mapping: services → nodes, depends_on + connection URLs → edges. */ export declare class DockerComposeInitError extends Error { constructor(message: string); } export type DockerComposeInitReport = { services: number; edges: number; warnings: string[]; }; export type DockerComposeInitOptions = { fileLabel?: string; /** Caller bindings for Compose `${VAR}` / `:-` defaults (e.g. merged dotenv via `archrad init --compose-env-file`). */ interpolateFrom?: Record; /** When true, merge `process.env` before `interpolateFrom` so explicit keys win. */ interpolateFromProcessEnv?: boolean; }; /** * Docker image repository path sans digest/tag. * Parses only the `:tag` on the **final** path segment so `registry:5000/group/img:tag` keeps the registry host. */ export declare function normalizedComposeRepositoryPath(imageRef: string): string; /** Infer node.type from Docker image reference (before tag/digest). */ export declare function inferTypeFromImage(imageRef: string): { type: string; warning?: string; }; /** * Compose interpolates `${VAR:-default}` at deploy time; static YAML parsers keep the literal. * Extract **`default`** so `depends_on: - ${_APP_DB_HOST:-mongodb}` maps to service key `mongodb`. */ export declare function composeDependsOnDefaultServiceKey(depEntry: string): string | null; /** * Collect Traefik **`traefik.http.services.*.loadbalancer.*`** backend names plus router **`.service`** targets. */ export declare function enumerateTraefikHttpBackendRefs(labels: Record): Set; /** * Optional hints merged into each node's `config` for architecture lint after `archrad init --from` Compose. * Convention (service `labels:`): * - `archrad.auth` — e.g. `bearer` (satisfies IR-LINT-MISSING-AUTH-010 on HTTP entries) * - `archrad.auth_required: "false"` — explicit public entry (same rule opt-out) * - `archrad.health_url` or `archrad.health.url` — e.g. `/health` (helps IR-LINT-NO-HEALTHCHECK-003) * - `archrad.http.method` — optional, e.g. `GET` */ export declare function archradLintHintsFromLabels(labels: Record): Record; /** Extract hostname from common DB/cache/messaging URLs for cross-service edges. */ export declare function connectionUrlHost(raw: string): string | null; /** * Parses plain **hostname** (`db`, `redis`, `postgresql:5432`) from env values for Compose edge inference. * Returns **`null`** for URLs (`postgres://`), paths, templating shells, localhost. */ export declare function composePlainEnvHostname(val: string): string | null; /** * When Compose **`healthcheck.test`** invokes curl/wget (or URLs) against a readiness path, * derive **`config.url`** / **`method`** hints so IR-LINT-NO-HEALTHCHECK-003 can clear without OpenAPI ingestion. * * Compose **`labels`** (`archrad.health_url`) still win when merged afterward. */ export declare function composeHealthcheckToLintHints(healthRaw: unknown): Record; /** * Parse Docker Compose YAML and return canonical IR `{ graph: { metadata, nodes, edges } }`. */ export declare function dockerComposeToCanonicalIr(yamlText: string, options?: DockerComposeInitOptions): { ir: Record; report: DockerComposeInitReport; verboseLines: string[]; }; //# sourceMappingURL=docker-compose.d.ts.map