"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DockerComposeFile = void 0;
const zod_1 = require("zod");
const DockerComposeService = zod_1.z.object({
    image: zod_1.z.string().optional(),
    build: zod_1.z
        .object({
        context: zod_1.z.string().optional(),
        dockerfile: zod_1.z.string().optional(),
    })
        .optional(),
});
const DockerComposeFileV1 = zod_1.z.record(DockerComposeService);
const DockerComposeFileModern = zod_1.z.object({
    // compose does not use this strictly, so we shouldn't be either
    // https://docs.docker.com/compose/compose-file/04-version-and-name/#version-top-level-element
    version: zod_1.z.string().optional(),
    services: zod_1.z.record(DockerComposeService),
});
exports.DockerComposeFile = DockerComposeFileModern.or(DockerComposeFileV1);
//# sourceMappingURL=schema.js.map