Skip to content

Commit

Permalink
init cac format
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 14, 2024
1 parent b42a204 commit a28593d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/validators/src/cac/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { z } from "zod";

export const release = z.object({
name: z.string(),
config: z.record(z.any()),
metadata: z.record(z.string()),
});

export const deployment = z.object({
name: z.string().optional(),
releases: z.array(release).optional(),
jobAgent: z.object({ id: z.string(), config: z.record(z.any()) }).optional(),
});

export const system = z.object({
name: z.string().optional(),
description: z.string().optional(),
});

export const cacV1 = z.object({
version: z.literal("v1"),

workspace: z.string(),

systems: z.record(system).optional(),
deployments: z.record(deployment).optional(),
releases: z.record(release).optional(),
});

0 comments on commit a28593d

Please sign in to comment.