diff --git a/packages/server/src/watch.ts b/packages/server/src/watch.ts index 09c7312e3b..8f3fe22023 100644 --- a/packages/server/src/watch.ts +++ b/packages/server/src/watch.ts @@ -3,7 +3,7 @@ import env from "./environment" import chokidar from "chokidar" import fs from "fs" import { constants, tenancy } from "@budibase/backend-core" -import { processUploadedPlugin } from "./api/controllers/plugin" +import pluginsSdk from "./sdk/plugins" export function watch() { const watchPath = path.join(env.PLUGINS_DIR, "./**/*.tar.gz") @@ -27,7 +27,7 @@ export function watch() { const split = path.split("/") const name = split[split.length - 1] console.log("Importing plugin:", path) - await processUploadedPlugin({ name, path }) + await pluginsSdk.processUploaded({ name, path }) } catch (err: any) { const message = err?.message ? err?.message : err console.error("Failed to import plugin:", message)