






















@@ -36,6 +36,7 @@ import {
3636import { setPluginEnabledInConfig } from "./plugins-config.js";
3737import { runPluginInstallCommand } from "./plugins-install-command.js";
3838import { formatPluginLine } from "./plugins-list-format.js";
39+import { refreshPluginRegistryAfterConfigMutation } from "./plugins-registry-refresh.js";
3940import { resolvePluginUninstallId } from "./plugins-uninstall-selection.js";
4041import { runPluginUpdateCommand } from "./plugins-update-command.js";
4142import { promptYesNo } from "./prompt.js";
@@ -498,6 +499,13 @@ export function registerPluginsCli(program: Command) {
498499nextConfig: next,
499500 ...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
500501});
502+await refreshPluginRegistryAfterConfigMutation({
503+config: next,
504+reason: "policy-changed",
505+logger: {
506+warn: (message) => defaultRuntime.log(theme.warn(message)),
507+},
508+});
501509logSlotWarnings(slotResult.warnings);
502510if (enableResult.enabled) {
503511defaultRuntime.log(`Enabled plugin "${id}". Restart the gateway to apply.`);
@@ -522,6 +530,13 @@ export function registerPluginsCli(program: Command) {
522530nextConfig: next,
523531 ...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
524532});
533+await refreshPluginRegistryAfterConfigMutation({
534+config: next,
535+reason: "policy-changed",
536+logger: {
537+warn: (message) => defaultRuntime.log(theme.warn(message)),
538+},
539+});
525540defaultRuntime.log(`Disabled plugin "${id}". Restart the gateway to apply.`);
526541});
527542@@ -645,6 +660,13 @@ export function registerPluginsCli(program: Command) {
645660nextConfig: result.config,
646661 ...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
647662});
663+await refreshPluginRegistryAfterConfigMutation({
664+config: result.config,
665+reason: "source-changed",
666+logger: {
667+warn: (message) => defaultRuntime.log(theme.warn(message)),
668+},
669+});
648670649671const removed: string[] = [];
650672if (result.actions.entry) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。