budibase/packages/server/src/integrations/index.ts

70 lines
2.4 KiB
TypeScript
Raw Normal View History

2020-11-26 15:43:56 +01:00
const postgres = require("./postgres")
2020-11-26 17:46:36 +01:00
const dynamodb = require("./dynamodb")
const mongodb = require("./mongodb")
2020-11-26 18:03:18 +01:00
const elasticsearch = require("./elasticsearch")
const couchdb = require("./couchdb")
2020-12-12 22:48:51 +01:00
const sqlServer = require("./microsoftSqlServer")
const s3 = require("./s3")
2021-01-11 18:18:22 +01:00
const airtable = require("./airtable")
const mysql = require("./mysql")
2021-01-28 14:42:40 +01:00
const arangodb = require("./arangodb")
2021-02-15 18:05:53 +01:00
const rest = require("./rest")
2021-11-25 18:12:12 +01:00
const googlesheets = require("./googlesheets")
const firebase = require("./firebase")
2022-03-31 11:56:16 +02:00
const redis = require("./redis")
2022-05-30 22:13:45 +02:00
const snowflake = require("./snowflake")
const { SourceName } = require("@budibase/types")
2022-02-10 11:34:50 +01:00
const environment = require("../environment")
2020-11-26 15:43:56 +01:00
const DEFINITIONS = {
[SourceName.POSTGRES]: postgres.schema,
[SourceName.DYNAMODB]: dynamodb.schema,
[SourceName.MONGODB]: mongodb.schema,
[SourceName.ELASTICSEARCH]: elasticsearch.schema,
[SourceName.COUCHDB]: couchdb.schema,
[SourceName.SQL_SERVER]: sqlServer.schema,
[SourceName.S3]: s3.schema,
[SourceName.AIRTABLE]: airtable.schema,
[SourceName.MYSQL]: mysql.schema,
[SourceName.ARANGODB]: arangodb.schema,
[SourceName.REST]: rest.schema,
[SourceName.FIRESTORE]: firebase.schema,
[SourceName.REDIS]: redis.schema,
[SourceName.SNOWFLAKE]: snowflake.schema,
2020-11-26 15:43:56 +01:00
}
const INTEGRATIONS = {
[SourceName.POSTGRES]: postgres.integration,
[SourceName.DYNAMODB]: dynamodb.integration,
[SourceName.MONGODB]: mongodb.integration,
[SourceName.ELASTICSEARCH]: elasticsearch.integration,
[SourceName.COUCHDB]: couchdb.integration,
[SourceName.SQL_SERVER]: sqlServer.integration,
[SourceName.S3]: s3.integration,
[SourceName.AIRTABLE]: airtable.integration,
[SourceName.MYSQL]: mysql.integration,
[SourceName.ARANGODB]: arangodb.integration,
[SourceName.REST]: rest.integration,
[SourceName.FIRESTORE]: firebase.integration,
[SourceName.GOOGLE_SHEETS]: googlesheets.integration,
[SourceName.REDIS]: redis.integration,
[SourceName.FIREBASE]: firebase.integration,
[SourceName.SNOWFLAKE]: snowflake.integration,
}
// optionally add oracle integration if the oracle binary can be installed
2022-07-13 13:37:55 +02:00
if (process.arch && !process.arch.startsWith("arm")) {
const oracle = require("./oracle")
DEFINITIONS[SourceName.ORACLE] = oracle.schema
INTEGRATIONS[SourceName.ORACLE] = oracle.integration
2020-11-26 15:43:56 +01:00
}
2022-03-28 17:46:05 +02:00
if (environment.SELF_HOSTED) {
DEFINITIONS[SourceName.GOOGLE_SHEETS] = googlesheets.schema
2022-03-28 17:46:05 +02:00
}
2022-02-10 11:34:50 +01:00
2020-11-26 15:43:56 +01:00
module.exports = {
definitions: DEFINITIONS,
integrations: INTEGRATIONS,
}