From 605fd3d73fbaefb0be832a920d2a3246e03da976 Mon Sep 17 00:00:00 2001 From: Beef Date: Mon, 20 Feb 2023 18:47:30 +0000 Subject: [PATCH] [Plugins] Give plugins their ID on VendettaPluginObject --- src/def.d.ts | 1 + src/lib/plugins.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/def.d.ts b/src/def.d.ts index ce63dd2..23d34a5 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -373,6 +373,7 @@ interface VendettaObject { } interface VendettaPluginObject { + id: string; manifest: PluginManifest; storage: Indexable; } diff --git a/src/lib/plugins.ts b/src/lib/plugins.ts index c1c16a1..34bd337 100644 --- a/src/lib/plugins.ts +++ b/src/lib/plugins.ts @@ -55,6 +55,7 @@ export async function evalPlugin(plugin: Plugin) { const vendettaForPlugins = { ...window.vendetta, plugin: { + id: plugin.id, manifest: plugin.manifest, // Wrapping this with wrapSync is NOT an option. storage: await createStorage>(createMMKVBackend(plugin.id)),