Move trigger definitions to shared-core.

This commit is contained in:
Sam Rose 2025-02-03 10:46:03 +00:00
parent 07047b2c7e
commit f450cf6912
No known key found for this signature in database
15 changed files with 19 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import emitter from "../events/index" import emitter from "../events/index"
import { getAutomationParams, isDevAppID } from "../db/utils" import { getAutomationParams, isDevAppID } from "../db/utils"
import { coerce } from "../utilities/rowProcessor" import { coerce } from "../utilities/rowProcessor"
import { definitions } from "./triggerInfo" import { definitions } from "../../../shared-core/src/automations/triggers"
// need this to call directly, so we can get a response // need this to call directly, so we can get a response
import { automationQueue } from "./bullboard" import { automationQueue } from "./bullboard"
import { checkTestFlag } from "../utilities/redis" import { checkTestFlag } from "../utilities/redis"

View File

@ -1,5 +1,5 @@
import { Thread, ThreadType } from "../threads" import { Thread, ThreadType } from "../threads"
import { definitions } from "./triggerInfo" import { definitions } from "../../../shared-core/src/automations/triggers"
import { automationQueue } from "./bullboard" import { automationQueue } from "./bullboard"
import { updateEntityMetadata } from "../utilities" import { updateEntityMetadata } from "../utilities"
import { context, db as dbCore, utils } from "@budibase/backend-core" import { context, db as dbCore, utils } from "@budibase/backend-core"

View File

@ -13,7 +13,7 @@ import {
HTTPError, HTTPError,
db as dbCore, db as dbCore,
} from "@budibase/backend-core" } from "@budibase/backend-core"
import { definitions } from "../../../automations/triggerInfo" import { definitions } from "../../../../../shared-core/src/automations/triggers"
import automations from "." import automations from "."
export interface PersistedAutomation extends Automation { export interface PersistedAutomation extends Automation {

View File

@ -9,7 +9,7 @@ import {
} from "@budibase/types" } from "@budibase/types"
import { generateRowActionsID } from "../../../db/utils" import { generateRowActionsID } from "../../../db/utils"
import automations from "../automations" import automations from "../automations"
import { definitions as TRIGGER_DEFINITIONS } from "../../../automations/triggerInfo" import { definitions as TRIGGER_DEFINITIONS } from "../../../../../shared-core/src/automations/triggers"
import * as triggers from "../../../automations/triggers" import * as triggers from "../../../automations/triggers"
import sdk from "../.." import sdk from "../.."

View File

@ -11,7 +11,7 @@ import { replaceFakeBindings } from "../automations/loopUtils"
import { dataFilters, helpers, utils } from "@budibase/shared-core" import { dataFilters, helpers, utils } from "@budibase/shared-core"
import { default as AutomationEmitter } from "../events/AutomationEmitter" import { default as AutomationEmitter } from "../events/AutomationEmitter"
import { generateAutomationMetadataID, isProdAppID } from "../db/utils" import { generateAutomationMetadataID, isProdAppID } from "../db/utils"
import { definitions as triggerDefs } from "../automations/triggerInfo" import { definitions as triggerDefs } from "../../../shared-core/src/automations/triggers"
import { AutomationErrors, MAX_AUTOMATION_RECURRING_ERRORS } from "../constants" import { AutomationErrors, MAX_AUTOMATION_RECURRING_ERRORS } from "../constants"
import { storeLog } from "../automations/logging" import { storeLog } from "../automations/logging"
import { import {

View File

@ -4,6 +4,18 @@
"require": ["tsconfig-paths/register"], "require": ["tsconfig-paths/register"],
"swc": true "swc": true
}, },
"include": ["src/**/*", "specs", "__mocks__"], "include": [
"src/**/*",
"specs",
"__mocks__",
"../shared-core/src/automations/triggers/app.ts",
"../shared-core/src/automations/triggers/cron.ts",
"../shared-core/src/automations/triggers/index.ts",
"../shared-core/src/automations/triggers/rowAction.ts",
"../shared-core/src/automations/triggers/rowDeleted.ts",
"../shared-core/src/automations/triggers/rowSaved.ts",
"../shared-core/src/automations/triggers/rowUpdated.ts",
"../shared-core/src/automations/triggers/webhook.ts"
],
"exclude": ["node_modules", "dist"] "exclude": ["node_modules", "dist"]
} }

View File

@ -1 +1,2 @@
export * as steps from "./steps/index" export * as steps from "./steps/index"
export * as triggers from "./triggers/index"