Fixing minor Typescript issue, some old requires.
This commit is contained in:
parent
bbd1967a87
commit
b6a750a678
|
@ -17,8 +17,8 @@ import oracle from "./oracle"
|
||||||
import { getPlugins } from "../api/controllers/plugin"
|
import { getPlugins } from "../api/controllers/plugin"
|
||||||
import { SourceName, Integration, PluginType } from "@budibase/types"
|
import { SourceName, Integration, PluginType } from "@budibase/types"
|
||||||
import { getDatasourcePlugin } from "../utilities/fileSystem"
|
import { getDatasourcePlugin } from "../utilities/fileSystem"
|
||||||
const environment = require("../environment")
|
import env from "../environment"
|
||||||
const { cloneDeep } = require("lodash")
|
import { cloneDeep } from "lodash"
|
||||||
|
|
||||||
const DEFINITIONS: { [key: string]: Integration } = {
|
const DEFINITIONS: { [key: string]: Integration } = {
|
||||||
[SourceName.POSTGRES]: postgres.schema,
|
[SourceName.POSTGRES]: postgres.schema,
|
||||||
|
@ -69,7 +69,7 @@ if (
|
||||||
|
|
||||||
export async function getDefinitions() {
|
export async function getDefinitions() {
|
||||||
const pluginSchemas: { [key: string]: Integration } = {}
|
const pluginSchemas: { [key: string]: Integration } = {}
|
||||||
if (environment.SELF_HOSTED) {
|
if (env.SELF_HOSTED) {
|
||||||
const plugins = await getPlugins(PluginType.DATASOURCE)
|
const plugins = await getPlugins(PluginType.DATASOURCE)
|
||||||
// extract the actual schema from each custom
|
// extract the actual schema from each custom
|
||||||
for (let plugin of plugins) {
|
for (let plugin of plugins) {
|
||||||
|
@ -93,7 +93,7 @@ export async function getIntegration(integration: string) {
|
||||||
if (INTEGRATIONS[integration]) {
|
if (INTEGRATIONS[integration]) {
|
||||||
return INTEGRATIONS[integration]
|
return INTEGRATIONS[integration]
|
||||||
}
|
}
|
||||||
if (environment.SELF_HOSTED) {
|
if (env.SELF_HOSTED) {
|
||||||
const plugins = await getPlugins(PluginType.DATASOURCE)
|
const plugins = await getPlugins(PluginType.DATASOURCE)
|
||||||
for (let plugin of plugins) {
|
for (let plugin of plugins) {
|
||||||
if (plugin.name === integration) {
|
if (plugin.name === integration) {
|
||||||
|
|
Loading…
Reference in New Issue