Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CSLTech committed May 3, 2024
0 parents commit cb5ce75
Show file tree
Hide file tree
Showing 15 changed files with 21,833 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: 18
- name: Make the production plugin bundle
run: |
release_version=$(cat package.json | jq -r '.version')
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
yarn
yarn build
- name: Perform Github Release
uses: softprops/action-gh-release@v1
with:
name: v${{ env.RELEASE_VERSION }}
tag_name: v${{ env.RELEASE_VERSION }}
generate_release_notes: true
files: |
dist/*.tar.gz
106 changes: 106 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

.idea/
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.github
rollup.config.js
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CSV Export

## Description
CSV Export Automation Step

Find out more about [Budibase](https://github.com/Budibase/budibase).

This brings in a CSV Export step to automation. This is meant to be more flexible than the built-in export.
The resulting files are uploaded to an S3 bucket (or any other S3 compatible service). It is then up to you to notify the user or finish the process in some other way.

It also makes sense to detach this from the frontend flow in an asynchronous automation since the resulting files can be fairly large and take some time to generate.

## Important things to note

* To keep things simple, the current behavior is to export all columns in the order received by budibase, but this isn't necessarily ideal. I also don't think there would be an elegant way to configure columns in the current automation configuration schema.
* This requires you to supply the API url (ex: http://127.0.0.1/api/public/v1) and an API key to your budibase instance, since to the best of my knowledge there is no way for custom automations to call the internal API.

## Disclaimer
This is still very experimental and implemented to the best of my guesses as there is very little documentation and examples for custom automation steps.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
}
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
transform: {
"^.+\\.ts?$": "ts-jest",
},
transformIgnorePatterns: ["<rootDir>/node_modules/"]
}
Loading

0 comments on commit cb5ce75

Please sign in to comment.