[Plugins] Give plugins their ID on VendettaPluginObject
This commit is contained in:
parent
77dd4503b7
commit
605fd3d73f
2 changed files with 2 additions and 0 deletions
1
src/def.d.ts
vendored
1
src/def.d.ts
vendored
|
@ -373,6 +373,7 @@ interface VendettaObject {
|
|||
}
|
||||
|
||||
interface VendettaPluginObject {
|
||||
id: string;
|
||||
manifest: PluginManifest;
|
||||
storage: Indexable<any>;
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
|
|
Loading…
Reference in a new issue