[Plugins] Give plugins their ID on VendettaPluginObject

This commit is contained in:
Beef 2023-02-20 18:47:30 +00:00
parent 77dd4503b7
commit 605fd3d73f
2 changed files with 2 additions and 0 deletions

1
src/def.d.ts vendored
View file

@ -373,6 +373,7 @@ interface VendettaObject {
}
interface VendettaPluginObject {
id: string;
manifest: PluginManifest;
storage: Indexable<any>;
}

View file

@ -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<Indexable<any>>(createMMKVBackend(plugin.id)),