feat: add plugin HTTP hooks + Zalo plugin
This commit is contained in:
1 parent
0e76d21f11
commit
5abe3c2145
36 files changed
+3061
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import type { PluginRegistry } from "../../../plugins/registry.js";
|
||||
|
||||
export const createTestRegistry = (
|
||||
overrides: Partial<PluginRegistry> = {},
|
||||
): PluginRegistry => {
|
||||
const base: PluginRegistry = {
|
||||
plugins: [],
|
||||
tools: [],
|
||||
channels: [],
|
||||
gatewayHandlers: {},
|
||||
httpHandlers: [],
|
||||
cliRegistrars: [],
|
||||
services: [],
|
||||
diagnostics: [],
|
||||
};
|
||||
const merged = { ...base, ...overrides };
|
||||
return {
|
||||
...merged,
|
||||
gatewayHandlers: merged.gatewayHandlers ?? {},
|
||||
httpHandlers: merged.httpHandlers ?? [],
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user