1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00

Fixing minor Typescript issue, some old requires.

This commit is contained in:
mike12345567 2023-01-11 18:16:30 +00:00
parent 56f9ead3ca
commit c479a7da2f

View file

@ -17,8 +17,8 @@ import oracle from "./oracle"
import { getPlugins } from "../api/controllers/plugin"
import { SourceName, Integration, PluginType } from "@budibase/types"
import { getDatasourcePlugin } from "../utilities/fileSystem"
const environment = require("../environment")
const { cloneDeep } = require("lodash")
import env from "../environment"
import { cloneDeep } from "lodash"
const DEFINITIONS: { [key: string]: Integration } = {
[SourceName.POSTGRES]: postgres.schema,
@ -69,7 +69,7 @@ if (
export async function getDefinitions() {
const pluginSchemas: { [key: string]: Integration } = {}
if (environment.SELF_HOSTED) {
if (env.SELF_HOSTED) {
const plugins = await getPlugins(PluginType.DATASOURCE)
// extract the actual schema from each custom
for (let plugin of plugins) {
@ -93,7 +93,7 @@ export async function getIntegration(integration: string) {
if (INTEGRATIONS[integration]) {
return INTEGRATIONS[integration]
}
if (environment.SELF_HOSTED) {
if (env.SELF_HOSTED) {
const plugins = await getPlugins(PluginType.DATASOURCE)
for (let plugin of plugins) {
if (plugin.name === integration) {