(data: unknown)
| 4 | |
| 5 | /** 解析配置列表,兼容旧式 { pluginName, source } 和新式 string */ |
| 6 | export 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 | |
| 13 | export function isMainPushPluginEnabled( |
| 14 | pluginName: string, |
no outgoing calls
no test coverage detected