
























@@ -694,16 +694,18 @@ export async function startGatewayServer(
694694const channelRuntimeEnvs = Object.fromEntries(
695695Object.entries(channelLogs).map(([id, logger]) => [id, runtimeForLogger(logger)]),
696696) as unknown as Record<ChannelId, RuntimeEnv>;
697+const listStartupChannelGatewayMethods = () => {
698+const methods: string[] = [];
699+for (const plugin of listGatewayStartupChannelPlugins()) {
700+methods.push(...(plugin.gatewayMethods ?? []));
701+for (const descriptor of plugin.gatewayMethodDescriptors ?? []) {
702+methods.push(descriptor.name);
703+}
704+}
705+return methods;
706+};
697707const listActiveGatewayMethods = (nextBaseGatewayMethods: string[]) =>
698-Array.from(
699-new Set([
700- ...nextBaseGatewayMethods,
701- ...listGatewayStartupChannelPlugins().flatMap((plugin) => [
702- ...(plugin.gatewayMethods ?? []),
703- ...(plugin.gatewayMethodDescriptors ?? []).map((descriptor) => descriptor.name),
704-]),
705-]),
706-);
708+Array.from(new Set([...nextBaseGatewayMethods, ...listStartupChannelGatewayMethods()]));
707709const runtimeConfig = await startupTrace.measure("runtime.config", async () => {
708710const { resolveGatewayRuntimeConfig } = await import("./server-runtime-config.js");
709711return resolveGatewayRuntimeConfig({
@@ -1109,10 +1111,7 @@ export async function startGatewayServer(
11091111Array.from(
11101112new Set([
11111113 ...attachedGatewayMethodRegistry.listAdvertisedMethods(),
1112- ...listGatewayStartupChannelPlugins().flatMap((plugin) => [
1113- ...(plugin.gatewayMethods ?? []),
1114- ...(plugin.gatewayMethodDescriptors ?? []).map((descriptor) => descriptor.name),
1115-]),
1114+ ...listStartupChannelGatewayMethods(),
11161115]),
11171116);
11181117runtimeState.gatewayMethods.splice(
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。