@@ -3,7 +3,7 @@ import type { StandardSchemaV1 } from '@standard-schema/spec';
33import { EventType , SchemaVendor } from './constants.js' ;
44import { ParsingError } from './errors.js' ;
55import type {
6- BasePartialBatchProcessorParserConfig ,
6+ BatchProcessorConfig ,
77 EventSourceDataClassTypes ,
88 RuntimeZodType ,
99} from './types.js' ;
@@ -19,7 +19,7 @@ const isZodSchema = (schema: StandardSchemaV1): schema is RuntimeZodType =>
1919/**
2020 * Extend the schema according to the event type passed.
2121 *
22- * If useTransformers is true, extend using opinionated transformers.
22+ * If ` useTransformers` is true, extend using opinionated transformers.
2323 * Otherwise, extend without any transformers.
2424 *
2525 * @param options - The options for creating the extended schema
@@ -31,7 +31,7 @@ const isZodSchema = (schema: StandardSchemaV1): schema is RuntimeZodType =>
3131const createExtendedSchema = async ( options : {
3232 eventType : keyof typeof EventType ;
3333 innerSchema : RuntimeZodType ;
34- transformer ?: BasePartialBatchProcessorParserConfig [ 'transformer' ] ;
34+ transformer ?: BatchProcessorConfig [ 'transformer' ] ;
3535} ) => {
3636 const { eventType, innerSchema, transformer } = options ;
3737 let schema = innerSchema ;
@@ -109,7 +109,7 @@ const parseWithErrorHandling = async (
109109 const errorMessage = issues
110110 . map ( ( issue ) => `${ issue . path ?. join ( '.' ) } : ${ issue . message } ` )
111111 . join ( '; ' ) ;
112- logger . debug ( errorMessage ) ;
112+ logger . debug ( `Failed to parse record: ${ errorMessage } ` ) ;
113113 throw new ParsingError ( errorMessage ) ;
114114} ;
115115
@@ -130,7 +130,7 @@ const parser = async (
130130 record : EventSourceDataClassTypes ,
131131 eventType : keyof typeof EventType ,
132132 logger : Pick < GenericLogger , 'debug' | 'warn' | 'error' > ,
133- parserConfig : BasePartialBatchProcessorParserConfig
133+ parserConfig : BatchProcessorConfig
134134) : Promise < EventSourceDataClassTypes > => {
135135 const { schema, innerSchema, transformer } = parserConfig ;
136136 // If the external schema is specified, use it to parse the record
0 commit comments