Skip to content

Commit

Permalink
feat: export-workbook refactor (#512)
Browse files Browse the repository at this point in the history
* feat: export-workbook refactor

* feat: export-workbook refactor

* Update outcome

* Update api version

* plugins sandbox

* Update package-lock.json

* Change build tools

* Update @flatfile/api on all packages

* feat: export-workbook refactor

* Update api version

* plugins sandbox

* Documentation & changeset

* Update README.md

* Update README.md

* Update flatfilers/sandbox/README.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Move all deps to peerDeps to reduce bundle size

Other plugins installed as deps must be in devDeps for turbo to build in the correct order

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
carlbrugger and coderabbitai[bot] authored May 20, 2024
1 parent 3cb2665 commit 1d253d8
Show file tree
Hide file tree
Showing 39 changed files with 1,762 additions and 10,698 deletions.
34 changes: 34 additions & 0 deletions .changeset/tricky-zoos-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@flatfile/plugin-webhook-event-forwarder': patch
'@flatfile/plugin-foreign-db-extractor': patch
'@flatfile/plugin-delimiter-extractor': patch
'@flatfile/plugin-convert-sql-ddl': patch
'@flatfile/plugin-connect-via-merge': patch
'@flatfile/util-response-rejection': patch
'@flatfile/plugin-export-workbook': minor
'@flatfile/plugin-space-configure': patch
'@flatfile/plugin-convert-openapi-schema': patch
'@flatfile/plugin-webhook-egress': patch
'@flatfile/plugin-dxp-configure': patch
'@flatfile/plugin-pdf-extractor': patch
'@flatfile/plugin-psv-extractor': patch
'@flatfile/plugin-tsv-extractor': patch
'@flatfile/plugin-zip-extractor': patch
'@flatfile/plugin-constraints': patch
'@flatfile/plugin-job-handler': patch
'@flatfile/plugin-convert-json-schema': patch
'@flatfile/plugin-record-hook': patch
'@flatfile/plugin-convert-yaml-schema': patch
'@flatfile/util-fetch-schema': patch
'@flatfile/util-file-buffer': patch
'@flatfile/plugin-autocast': patch
'@flatfile/plugin-automap': patch
'@flatfile/util-extractor': patch
'@flatfile/plugin-dedupe': patch
'@flatfile/utils-testing': patch
'@flatfile/util-common': patch
---

This release updates the @flatfile/api dependency on all plugins.

@flatfile/plugin-export-workbook: a new option has been added to the plugin to automatically download the file after exporting.
3 changes: 3 additions & 0 deletions flatfilers/sandbox/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FLATFILE_API_URL=https://platform.flatfile.com/api
FLATFILE_ENVIRONMENT_ID=us_env_123
FLATFILE_API_KEY=sk_123
30 changes: 30 additions & 0 deletions flatfilers/sandbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @private/sandbox

This is a development sandbox for plugins. To get started, go to the repo root and run:

```bash
npm install
npm run build
```

Navigate to the plugin you're working on and run:

```bash
cd plugins/<plugin_name>
npm run build:watch
```

Running the `build:watch` script automatically updates the sandbox on any changes to the plugin(s).

Now navigate to the sandbox folder and copy `.env.example` to `.env` and update it with your environment variables.

Finally, run the sandbox with:

```bash
cd ../.. # go to the repo root
cd flatfilers/sandbox
npm run dev
```

If you have multiple environments, you can create a new `.env.prod`, `.env.staging`, and `.env.local` files with the appropriate environment variables and run `npm run dev:<environment>`.

35 changes: 35 additions & 0 deletions flatfilers/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@private/sandbox",
"private": true,
"version": "0.0.0",
"author": "Carl Brugger",
"main": "src/index.ts",
"description": "",
"license": "ISC",
"scripts": {
"dev": "node --enable-source-maps --inspect ../../node_modules/.bin/flatfile develop",
"dev:local": "dotenvx run --env-file=.env.local -- npm run dev",
"dev:staging": "dotenvx run --env-file=.env.staging -- npm run dev",
"dev:prod": "dotenvx run --env-file=.env.prod -- npm run dev",
"deploy": "flatfile deploy",
"deploy:local": "dotenvx run --env-file=.env.local -- npm run deploy",
"deploy:staging": "dotenvx run --env-file=.env.staging -- npm run deploy",
"deploy:prod": "dotenvx run --env-file=.env.prod -- npm run deploy",
"list": "flatfile list",
"list:local": "dotenvx run --env-file=.env.local -- npm run list",
"list:staging": "dotenvx run --env-file=.env.staging -- npm run list",
"list:prod": "dotenvx run --env-file=.env.prod -- npm run list",
"delete": "flatfile delete",
"delete:local": "dotenvx run --env-file=.env.local -- npm run delete",
"delete:staging": "dotenvx run --env-file=.env.staging -- npm run delete",
"delete:prod": "dotenvx run --env-file=.env.prod -- npm run delete"
},
"dependencies": {
"@flatfile/api": "^1.8.9",
"@flatfile/listener": "^1.0.1"
},
"devDependencies": {
"@dotenvx/dotenvx": "^0.39.0",
"flatfile": "^3.6.1"
}
}
7 changes: 7 additions & 0 deletions flatfilers/sandbox/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { FlatfileListener } from '@flatfile/listener'

import { exportWorkbookPlugin } from '@flatfile/plugin-export-workbook'

export default async function (listener: FlatfileListener) {
listener.use(exportWorkbookPlugin({ autoDownload: true, debug: true }))
}
Loading

0 comments on commit 1d253d8

Please sign in to comment.