diff --git a/.changeset/clean-rockets-mate.md b/.changeset/clean-rockets-mate.md new file mode 100644 index 00000000..2c180746 --- /dev/null +++ b/.changeset/clean-rockets-mate.md @@ -0,0 +1,5 @@ +--- +'pockethost': minor +--- + +Enhancement: actions execute sequentially diff --git a/packages/pockethost/src/common/plugin/action.ts b/packages/pockethost/src/common/plugin/action.ts index ebe6a8da..0f67d1b6 100644 --- a/packages/pockethost/src/common/plugin/action.ts +++ b/packages/pockethost/src/common/plugin/action.ts @@ -66,7 +66,9 @@ async function action(actionName: string, context: any) { } const action = actions[actionName] if (!action) return false - await Promise.all(action.map((handler) => handler(context))) + for (const { handler } of action) { + await handler(context) + } return true }