[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 {
|
interface VendettaPluginObject {
|
||||||
|
id: string;
|
||||||
manifest: PluginManifest;
|
manifest: PluginManifest;
|
||||||
storage: Indexable<any>;
|
storage: Indexable<any>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ export async function evalPlugin(plugin: Plugin) {
|
||||||
const vendettaForPlugins = {
|
const vendettaForPlugins = {
|
||||||
...window.vendetta,
|
...window.vendetta,
|
||||||
plugin: {
|
plugin: {
|
||||||
|
id: plugin.id,
|
||||||
manifest: plugin.manifest,
|
manifest: plugin.manifest,
|
||||||
// Wrapping this with wrapSync is NOT an option.
|
// Wrapping this with wrapSync is NOT an option.
|
||||||
storage: await createStorage<Indexable<any>>(createMMKVBackend(plugin.id)),
|
storage: await createStorage<Indexable<any>>(createMMKVBackend(plugin.id)),
|
||||||
|
|
Loading…
Reference in a new issue