feat(medusa): workflow engine api (#6330)

What:

   Workflow Engine API.
   Endpoints for:
     - List workflow executions
     - Run a workflow
     - Set async steps as success or failure
     - Retrieve the details of a workflow run
This commit is contained in:
Carlos R. L. Rodrigues
2024-02-13 15:19:10 +00:00
committed by GitHub
parent 59ab66a773
commit 0c2a460751
44 changed files with 1425 additions and 80 deletions
@@ -88,7 +88,12 @@ const DbTestUtil = {
const instance = DbTestUtil
module.exports = {
initDb: async function ({ cwd, database_extra, env }) {
initDb: async function ({
cwd,
database_extra,
env,
force_modules_migration,
}) {
if (isObject(env)) {
Object.entries(env).forEach(([k, v]) => (process.env[k] = v))
}
@@ -149,7 +154,10 @@ module.exports = {
instance.setDb(dbDataSource)
if (featureFlagRouter.isFeatureEnabled(MedusaV2Flag.key)) {
if (
force_modules_migration ||
featureFlagRouter.isFeatureEnabled(MedusaV2Flag.key)
) {
const pgConnectionLoader =
require("@medusajs/medusa/dist/loaders/pg-connection").default