@@ -3,7 +3,7 @@ import type { StandardSchemaV1 } from '@standard-schema/spec';
3
3
import { EventType , SchemaVendor } from './constants.js' ;
4
4
import { ParsingError } from './errors.js' ;
5
5
import type {
6
- BasePartialBatchProcessorParserConfig ,
6
+ BatchProcessorConfig ,
7
7
EventSourceDataClassTypes ,
8
8
RuntimeZodType ,
9
9
} from './types.js' ;
@@ -19,7 +19,7 @@ const isZodSchema = (schema: StandardSchemaV1): schema is RuntimeZodType =>
19
19
/**
20
20
* Extend the schema according to the event type passed.
21
21
*
22
- * If useTransformers is true, extend using opinionated transformers.
22
+ * If ` useTransformers` is true, extend using opinionated transformers.
23
23
* Otherwise, extend without any transformers.
24
24
*
25
25
* @param options - The options for creating the extended schema
@@ -31,7 +31,7 @@ const isZodSchema = (schema: StandardSchemaV1): schema is RuntimeZodType =>
31
31
const createExtendedSchema = async ( options : {
32
32
eventType : keyof typeof EventType ;
33
33
innerSchema : RuntimeZodType ;
34
- transformer ?: BasePartialBatchProcessorParserConfig [ 'transformer' ] ;
34
+ transformer ?: BatchProcessorConfig [ 'transformer' ] ;
35
35
} ) => {
36
36
const { eventType, innerSchema, transformer } = options ;
37
37
let schema = innerSchema ;
@@ -109,7 +109,7 @@ const parseWithErrorHandling = async (
109
109
const errorMessage = issues
110
110
. map ( ( issue ) => `${ issue . path ?. join ( '.' ) } : ${ issue . message } ` )
111
111
. join ( '; ' ) ;
112
- logger . debug ( errorMessage ) ;
112
+ logger . debug ( `Failed to parse record: ${ errorMessage } ` ) ;
113
113
throw new ParsingError ( errorMessage ) ;
114
114
} ;
115
115
@@ -130,7 +130,7 @@ const parser = async (
130
130
record : EventSourceDataClassTypes ,
131
131
eventType : keyof typeof EventType ,
132
132
logger : Pick < GenericLogger , 'debug' | 'warn' | 'error' > ,
133
- parserConfig : BasePartialBatchProcessorParserConfig
133
+ parserConfig : BatchProcessorConfig
134
134
) : Promise < EventSourceDataClassTypes > => {
135
135
const { schema, innerSchema, transformer } = parserConfig ;
136
136
// If the external schema is specified, use it to parse the record
0 commit comments