From 59cb901f08fd6fd1e857585964b14cda6e9664b3 Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Thu, 19 Oct 2023 15:08:17 -0500 Subject: [PATCH] feat: export each extractor's parser (#285) --- .changeset/rare-parents-swim.md | 9 +++++++++ plugins/delimiter-extractor/src/index.ts | 2 ++ plugins/json-extractor/src/index.ts | 2 ++ plugins/xlsx-extractor/src/index.ts | 2 ++ plugins/xml-extractor/src/index.ts | 2 ++ 5 files changed, 17 insertions(+) create mode 100644 .changeset/rare-parents-swim.md diff --git a/.changeset/rare-parents-swim.md b/.changeset/rare-parents-swim.md new file mode 100644 index 000000000..b3706842b --- /dev/null +++ b/.changeset/rare-parents-swim.md @@ -0,0 +1,9 @@ +--- +'@flatfile/plugin-delimiter-extractor': patch +'@flatfile/plugin-export-workbook': patch +'@flatfile/plugin-json-extractor': patch +'@flatfile/plugin-xlsx-extractor': patch +'@flatfile/plugin-xml-extractor': patch +--- + +Export parsers diff --git a/plugins/delimiter-extractor/src/index.ts b/plugins/delimiter-extractor/src/index.ts index 66573a1bf..9f1de409d 100644 --- a/plugins/delimiter-extractor/src/index.ts +++ b/plugins/delimiter-extractor/src/index.ts @@ -38,3 +38,5 @@ export const DelimiterExtractor = ( ...restOptions, }) } + +export const delimiterParser = parseBuffer diff --git a/plugins/json-extractor/src/index.ts b/plugins/json-extractor/src/index.ts index eeb44262f..3f3c6d247 100644 --- a/plugins/json-extractor/src/index.ts +++ b/plugins/json-extractor/src/index.ts @@ -9,6 +9,8 @@ export const JSONExtractor = (options?: { return Extractor('.json', 'json', parseBuffer, options) } +export const jsonParser = parseBuffer + /* * @deprecated use `JSONExtractor` instead */ diff --git a/plugins/xlsx-extractor/src/index.ts b/plugins/xlsx-extractor/src/index.ts index b6e655dea..b1610e41c 100644 --- a/plugins/xlsx-extractor/src/index.ts +++ b/plugins/xlsx-extractor/src/index.ts @@ -27,6 +27,8 @@ export const ExcelExtractor = (options?: ExcelExtractorOptions) => { ) } +export const excelParser = parseBuffer + /* * @deprecated use `ExcelExtractor` instead */ diff --git a/plugins/xml-extractor/src/index.ts b/plugins/xml-extractor/src/index.ts index 8b37b154e..0020b23b5 100644 --- a/plugins/xml-extractor/src/index.ts +++ b/plugins/xml-extractor/src/index.ts @@ -11,3 +11,5 @@ export const XMLExtractor = (options?: { }) => { return Extractor('.xml', 'xml', parseBuffer, options) } + +export const xmlParser = parseBuffer