Docs for Release: 2.0.1
    Preparing search index...

    Interface ConfigDefinition

    interface ConfigDefinition {
        argName?: string;
        argShort?: string;
        default?: any;
        description?: string;
        displayName?: string;
        envName?: string;
        hideFromUI?: boolean;
        skipLabel?: boolean;
        toHtml?: (conf: ConfigDefinition, currentValue: any) => string;
        type: ZodType;
        useZodTypeName?: "string" | "number" | "boolean" | "enum";
    }
    Index

    Properties

    argName?: string

    If defined, uses this command-line argument name instead of the default --category-config.

    argShort?: string

    If defined, uses this single-character command-line argument name instead of none.

    default?: any

    The default value for this config element, if not provided from other sources.

    description?: string

    A short description of this config element, shown as a tooltip in hte UI.

    displayName?: string

    If defined, uses this display name instead of the key.

    envName?: string

    If defined, uses this environment variable name instead of the default PREFIX_CATEGORY_CONFIG.

    hideFromUI?: boolean

    If true, will not show this config element in the UI, but will still load from env or other sources and be available in values.

    skipLabel?: boolean

    If true, will not generate a label for this config element. Useful when implementing custom toHtml.

    toHtml?: (conf: ConfigDefinition, currentValue: any) => string

    If defined, applies custom HTML rendering for this config element. If undefined, tries to auto-generate based on zod type.

    type: ZodType

    The Zod type definition for this config element.

    useZodTypeName?: "string" | "number" | "boolean" | "enum"

    If defined, uses this Zod type name instead of trying to unwrap the type.

    This can be more convenient than redefining the HTML with toHtml, if the input type is simple. For instance, when using zod pipes that should accept simple string inputs.