Fix issues with circular references and barrel files

This commit is contained in:
Adria Navarro 2024-07-22 16:34:14 +02:00
parent 9bd22bbcdf
commit 6b58549fd9
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,6 @@ import {
AutomationTriggerStepId, AutomationTriggerStepId,
TableRowActions, TableRowActions,
} from "@budibase/types" } from "@budibase/types"
import sdk from "../../../sdk"
export function checkForCollectStep(automation: Automation) { export function checkForCollectStep(automation: Automation) {
return automation.definition.steps.some( return automation.definition.steps.some(
@ -16,6 +15,8 @@ export function checkForCollectStep(automation: Automation) {
export async function getBuilderData( export async function getBuilderData(
automations: Automation[] automations: Automation[]
): Promise<Record<string, AutomationBuilderData>> { ): Promise<Record<string, AutomationBuilderData>> {
const sdk = (await import("../../../sdk")).default
const tableNameCache: Record<string, string> = {} const tableNameCache: Record<string, string> = {}
async function getTableName(tableId: string) { async function getTableName(tableId: string) {
if (!tableNameCache[tableId]) { if (!tableNameCache[tableId]) {