MCPcopy
hub / github.com/ZToolsCenter/ZTools / normalizeConfigList

Function normalizeConfigList

src/shared/pluginSettings.ts:6–11  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

4
5/** 解析配置列表,兼容旧式 { pluginName, source } 和新式 string */
6export function normalizeConfigList(data: unknown): string[] {
7 if (!Array.isArray(data)) return []
8 return data
9 .map((item: PluginConfigEntry) => (typeof item === 'string' ? item : (item?.pluginName ?? '')))
10 .filter((name): name is string => Boolean(name))
11}
12
13export function isMainPushPluginEnabled(
14 pluginName: string,

Callers 9

reloadPluginCommandsFunction · 0.90
loadCommandsFunction · 0.90
loadPluginSettingsFunction · 0.90
toggleAutoKillFunction · 0.90
toggleAutoDetachFunction · 0.90
toggleAutoStartFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected