From 9bb4fb78106463b27c500b1c73627415d2fb2f63 Mon Sep 17 00:00:00 2001 From: Patrick Facheris Date: Wed, 6 Aug 2025 16:44:36 -0400 Subject: [PATCH] pass optional event to parseBuffer in extractor plugin --- utils/extractor/src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/extractor/src/index.ts b/utils/extractor/src/index.ts index 2b675db8..ccec0052 100644 --- a/utils/extractor/src/index.ts +++ b/utils/extractor/src/index.ts @@ -1,5 +1,5 @@ import { Flatfile, FlatfileClient } from '@flatfile/api' -import type { FlatfileListener } from '@flatfile/listener' +import type { FlatfileEvent, FlatfileListener } from '@flatfile/listener' import { createAllRecords, slugify } from '@flatfile/util-common' import { getFileBuffer } from '@flatfile/util-file-buffer' const api = new FlatfileClient() @@ -11,7 +11,8 @@ export const Extractor = ( extractorType: string, parseBuffer: ( buffer: Buffer, - options: any + options: any, + event?: FlatfileEvent ) => WorkbookCapture | Promise, options?: Record ) => { @@ -97,7 +98,7 @@ export const Extractor = ( fileExt: file.ext, headerSelectionEnabled, getHeaders, - }) + }, event) await tick(5, 'plugins.extraction.createWorkbook') const workbook = await createWorkbook(