@karmaniverous/jeeves-scripts-core
    Preparing search index...

    Function readComponentConfig

    • Read and validate a component's config file.

      Type Parameters

      • S extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

      Parameters

      • name: string

        Component name, used in error messages.

      • schema: S

        Zod schema for the parts of the file the caller reads.

      • file: string = ...

        Config file. Default: componentConfigPath.

      Returns output<S> | undefined

      The parsed config, or undefined when the file does not exist.

      When the file is not JSON or does not match schema.