diff --git a/package-lock.json b/package-lock.json index caab3de13..c80840f10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -891,7 +891,7 @@ "link": true }, "node_modules/@flatfile/plugin-export-workbook": { - "resolved": "plugins/export-worbook", + "resolved": "plugins/export-workbook", "link": true }, "node_modules/@flatfile/plugin-graphql": { @@ -10410,7 +10410,7 @@ }, "plugins/automap": { "name": "@flatfile/plugin-automap", - "version": "0.1.0", + "version": "0.1.1", "license": "ISC", "dependencies": { "@flatfile/api": "^1.5.30", @@ -10475,6 +10475,22 @@ } }, "plugins/export-worbook": { + "name": "@flatfile/plugin-export-workbook", + "version": "0.0.4", + "extraneous": true, + "license": "ISC", + "dependencies": { + "@flatfile/api": "^1.5.26", + "@flatfile/hooks": "^1.3.1", + "@flatfile/listener": "^0.3.15", + "remeda": "^1.14.0", + "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz" + }, + "engines": { + "node": ">= 16" + } + }, + "plugins/export-workbook": { "name": "@flatfile/plugin-export-workbook", "version": "0.0.5", "license": "ISC", diff --git a/plugins/export-worbook/CHANGELOG.md b/plugins/export-workbook/CHANGELOG.md similarity index 100% rename from plugins/export-worbook/CHANGELOG.md rename to plugins/export-workbook/CHANGELOG.md diff --git a/plugins/export-worbook/README.md b/plugins/export-workbook/README.md similarity index 100% rename from plugins/export-worbook/README.md rename to plugins/export-workbook/README.md diff --git a/plugins/export-worbook/package.json b/plugins/export-workbook/package.json similarity index 100% rename from plugins/export-worbook/package.json rename to plugins/export-workbook/package.json diff --git a/plugins/export-worbook/src/index.ts b/plugins/export-workbook/src/index.ts similarity index 100% rename from plugins/export-worbook/src/index.ts rename to plugins/export-workbook/src/index.ts diff --git a/plugins/export-worbook/src/plugin.spec.ts b/plugins/export-workbook/src/plugin.spec.ts similarity index 100% rename from plugins/export-worbook/src/plugin.spec.ts rename to plugins/export-workbook/src/plugin.spec.ts diff --git a/plugins/export-worbook/src/plugin.ts b/plugins/export-workbook/src/plugin.ts similarity index 97% rename from plugins/export-worbook/src/plugin.ts rename to plugins/export-workbook/src/plugin.ts index 8d0ae0453..31ad7000b 100644 --- a/plugins/export-worbook/src/plugin.ts +++ b/plugins/export-workbook/src/plugin.ts @@ -56,8 +56,8 @@ export const run = async ( const rows = R.pipe( data.records, - R.map(({ values: row }) => { - return R.pipe( + R.map(({ id, values: row }) => { + const rowValue = R.pipe( Object.keys(row), R.reduce((acc, colName) => { return { @@ -66,6 +66,10 @@ export const run = async ( } }, {}) ) + return { + id, + ...rowValue, + } }) )