@common-grants/cli
Version:
The CommonGrants protocol CLI tool
29 lines (28 loc) • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckApiCommandSchema = exports.CheckSpecCommandSchema = exports.CheckSpecArgsSchema = exports.CheckApiArgsSchema = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
const zod_1 = require("zod");
exports.CheckApiArgsSchema = zod_1.z.object({
apiUrl: zod_1.z.string().url(),
specPath: zod_1.z
.string()
.endsWith(".json")
.or(zod_1.z.string().endsWith(".yaml"))
.or(zod_1.z.string().endsWith(".yml")),
});
exports.CheckSpecArgsSchema = zod_1.z.object({
specPath: zod_1.z
.string()
.endsWith(".json")
.or(zod_1.z.string().endsWith(".yaml"))
.or(zod_1.z.string().endsWith(".yml")),
});
exports.CheckSpecCommandSchema = zod_1.z.object({
base: zod_1.z.string().optional(),
});
exports.CheckApiCommandSchema = zod_1.z.object({
client: zod_1.z.string().optional(),
report: zod_1.z.enum(["json", "html"]).optional(),
auth: zod_1.z.string().optional(),
});