All files / types/dist/schemas embgit.js

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62                      16x                 16x         16x                                     16x                                  
/**
 * Embgit Schemas
 *
 * Zod schemas for validating responses from the embedded git binary (embgit).
 * These match the Go struct types in quiqr-docs/embgit/src.
 */
import { z } from 'zod';
/**
 * Commit entry returned by log_local and log_remote commands.
 * Matches Go jsonCommitEntry struct in main.go.
 */
export const commitEntrySchema = z.object({
    message: z.string(),
    author: z.string(),
    date: z.string(),
    ref: z.string()
});
/**
 * Array of commit entries returned by log commands.
 */
export const commitLogSchema = z.array(commitEntrySchema);
/**
 * Hugo theme repository info returned by repo_show_hugotheme command.
 * Matches Go responseHugothemeDictType struct in cmd_repo_show_hugotheme.go.
 */
export const hugoThemeRepoInfoSchema = z.object({
    Name: z.string(),
    License: z.string(),
    LicenseLink: z.string(),
    Description: z.string(),
    MinHugoVersion: z.string(),
    Author: z.string(),
    Screenshot: z.string(),
    ExampleSite: z.boolean(),
    Features: z.array(z.string()).nullable(),
    Tags: z.array(z.string()).nullable(),
    Homepage: z.string(),
    Demosite: z.string(),
    AuthorHomepage: z.string()
});
/**
 * Quiqr site repository info returned by repo_show_quiqrsite command.
 * Matches Go responseQuiqrsiteDictType struct in cmd_repo_show_quiqrsite.go.
 */
export const quiqrSiteRepoInfoSchema = z.object({
    HugoVersion: z.string(),
    HugoTheme: z.string(),
    QuiqrFormsEndPoints: z.number(),
    QuiqrModel: z.string(),
    QuiqrEtalageName: z.string(),
    QuiqrEtalageDescription: z.string(),
    QuiqrEtalageHomepage: z.string(),
    QuiqrEtalageDemoUrl: z.string(),
    QuiqrEtalageLicense: z.string(),
    QuiqrEtalageLicenseURL: z.string(),
    QuiqrEtalageAuthor: z.string(),
    QuiqrEtalageAuthorHomepage: z.string(),
    QuiqrEtalageScreenshots: z.array(z.string()),
    Screenshot: z.string(),
    ScreenshotImageType: z.string()
});