(config: PluginConfig, data: Record<string, any>)
| 930 | } |
| 931 | |
| 932 | function mergeLayer(config: PluginConfig, data: Record<string, any>): PluginConfig { |
| 933 | return { |
| 934 | enabled: data.enabled ?? config.enabled, |
| 935 | autoUpdate: data.autoUpdate ?? config.autoUpdate, |
| 936 | debug: data.debug ?? config.debug, |
| 937 | pruneNotification: data.pruneNotification ?? config.pruneNotification, |
| 938 | pruneNotificationType: data.pruneNotificationType ?? config.pruneNotificationType, |
| 939 | commands: mergeCommands(config.commands, data.commands as any), |
| 940 | manualMode: mergeManualMode(config.manualMode, data.manualMode as any), |
| 941 | turnProtection: { |
| 942 | enabled: data.turnProtection?.enabled ?? config.turnProtection.enabled, |
| 943 | turns: data.turnProtection?.turns ?? config.turnProtection.turns, |
| 944 | }, |
| 945 | experimental: mergeExperimental(config.experimental, data.experimental as any), |
| 946 | protectedFilePatterns: [ |
| 947 | ...new Set([...config.protectedFilePatterns, ...(data.protectedFilePatterns ?? [])]), |
| 948 | ], |
| 949 | compress: mergeCompress(config.compress, data.compress as CompressOverride), |
| 950 | strategies: mergeStrategies(config.strategies, data.strategies as any), |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | function scheduleParseWarning(ctx: PluginInput, title: string, message: string): void { |
| 955 | setTimeout(() => { |
no test coverage detected