MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / composePluginApi

Function composePluginApi

packages/core/api/src/plugin-routes.ts:120–132  ·  view source on GitHub ↗
(
  plugins: TPlugins,
)

Source from the content-addressed store, hash-verified

118 * `import type { …Group }` statements at the host.
119 */
120export const composePluginApi = <TPlugins extends readonly AnyPlugin[]>(
121 plugins: TPlugins,
122): ComposedExecutorApi<TPlugins> => {
123 // eslint-disable-next-line @typescript-eslint/no-explicit-any
124 let api: any = CoreExecutorApi;
125 for (const plugin of plugins) {
126 if (plugin.routes) {
127 const group = plugin.routes();
128 api = api.add(group);
129 }
130 }
131 return api as ComposedExecutorApi<TPlugins>;
132};
133
134/**
135 * Build the merged Layer of plugin handler implementations, satisfying

Calls

no outgoing calls

Tested by

no test coverage detected