only show gsheets in self host
This commit is contained in:
parent
dc9d8b9261
commit
e1bc104715
|
@ -1,7 +1,6 @@
|
||||||
const { definitions } = require("../../integrations")
|
const { definitions } = require("../../integrations")
|
||||||
|
|
||||||
exports.fetch = async function (ctx) {
|
exports.fetch = async function (ctx) {
|
||||||
// TODO: fetch these from a github repo etc
|
|
||||||
ctx.status = 200
|
ctx.status = 200
|
||||||
ctx.body = definitions
|
ctx.body = definitions
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ const arangodb = require("./arangodb")
|
||||||
const rest = require("./rest")
|
const rest = require("./rest")
|
||||||
const googlesheets = require("./googlesheets")
|
const googlesheets = require("./googlesheets")
|
||||||
const { SourceNames } = require("../definitions/datasource")
|
const { SourceNames } = require("../definitions/datasource")
|
||||||
|
const environment = require("../environment")
|
||||||
|
|
||||||
const DEFINITIONS = {
|
const DEFINITIONS = {
|
||||||
[SourceNames.POSTGRES]: postgres.schema,
|
[SourceNames.POSTGRES]: postgres.schema,
|
||||||
|
@ -24,7 +25,6 @@ const DEFINITIONS = {
|
||||||
[SourceNames.MYSQL]: mysql.schema,
|
[SourceNames.MYSQL]: mysql.schema,
|
||||||
[SourceNames.ARANGODB]: arangodb.schema,
|
[SourceNames.ARANGODB]: arangodb.schema,
|
||||||
[SourceNames.REST]: rest.schema,
|
[SourceNames.REST]: rest.schema,
|
||||||
[SourceNames.GOOGLE_SHEETS]: googlesheets.schema,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const INTEGRATIONS = {
|
const INTEGRATIONS = {
|
||||||
|
@ -39,7 +39,6 @@ const INTEGRATIONS = {
|
||||||
[SourceNames.MYSQL]: mysql.integration,
|
[SourceNames.MYSQL]: mysql.integration,
|
||||||
[SourceNames.ARANGODB]: arangodb.integration,
|
[SourceNames.ARANGODB]: arangodb.integration,
|
||||||
[SourceNames.REST]: rest.integration,
|
[SourceNames.REST]: rest.integration,
|
||||||
[SourceNames.GOOGLE_SHEETS]: googlesheets.integration,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// optionally add oracle integration if the oracle binary can be installed
|
// optionally add oracle integration if the oracle binary can be installed
|
||||||
|
@ -49,6 +48,11 @@ if (!(process.arch === "arm64" && process.platform === "darwin")) {
|
||||||
INTEGRATIONS[SourceNames.ORACLE] = oracle.integration
|
INTEGRATIONS[SourceNames.ORACLE] = oracle.integration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (environment.SELF_HOSTED) {
|
||||||
|
DEFINITIONS[SourceNames.GOOGLE_SHEETS] = googlesheets.schema
|
||||||
|
INTEGRATIONS[SourceNames.GOOGLE_SHEETS] = googlesheets.integration
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
definitions: DEFINITIONS,
|
definitions: DEFINITIONS,
|
||||||
integrations: INTEGRATIONS,
|
integrations: INTEGRATIONS,
|
||||||
|
|
Loading…
Reference in New Issue