mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-11 23:53:03 -04:00
feat: Typesafe Settings Definitions (#403)
Co-authored-by: Ven <vendicated@riseup.net>
This commit is contained in:
parent
6c5fcc4119
commit
ea748dfb60
15 changed files with 288 additions and 180 deletions
|
@ -60,7 +60,16 @@ for (const p of pluginsValues) {
|
|||
});
|
||||
}
|
||||
|
||||
for (const p of pluginsValues)
|
||||
for (const p of pluginsValues) {
|
||||
if (p.settings) {
|
||||
p.settings.pluginName = p.name;
|
||||
p.options ??= {};
|
||||
for (const [name, def] of Object.entries(p.settings.def)) {
|
||||
const checks = p.settings.checks?.[name];
|
||||
p.options[name] = { ...def, ...checks };
|
||||
}
|
||||
}
|
||||
|
||||
if (p.patches && isPluginEnabled(p.name)) {
|
||||
for (const patch of p.patches) {
|
||||
patch.plugin = p.name;
|
||||
|
@ -69,6 +78,7 @@ for (const p of pluginsValues)
|
|||
patches.push(patch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const startAllPlugins = traceFunction("startAllPlugins", function startAllPlugins() {
|
||||
for (const name in Plugins)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue