UNPKG

@sentzunhat/zacatl

Version:

A modular, high-performance TypeScript microservice framework for Node.js, featuring layered architecture, dependency injection, and robust validation for building scalable APIs and distributed systems.

26 lines 967 B
import { z } from '../../third-party/zod.js'; export const commandSpecSchema = z.object({ cmd: z.string().min(1, 'Command must not be empty'), args: z.array(z.string()).default([]), cwd: z.string().optional(), env: z.record(z.string(), z.string()).optional(), }); export const runnerPolicySchema = z.object({ timeoutMs: z.number().int().positive().default(30_000), maxOutputBytes: z.number().int().positive().default(1_048_576), maxConcurrency: z.number().int().min(1).default(4), allowlist: z.array(z.string()).optional(), denyPatterns: z.array(z.string()).optional(), cwdPrefix: z.string().optional(), inheritEnv: z.boolean().default(false), }); export const commandResultSchema = z.object({ cmd: z.string(), args: z.array(z.string()), exitCode: z.number().nullable(), stdout: z.string(), stderr: z.string(), timedOut: z.boolean(), durationMs: z.number(), }); //# sourceMappingURL=types.js.map