From c4371ed566411e3936ccbbd474a9022d5fcd24f5 Mon Sep 17 00:00:00 2001 From: amsyarasyiq <82711525+amsyarasyiq@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:24:10 +0800 Subject: [PATCH] fix(storage): properly create sub-proxy storage --- src/lib/api/storage/new.ts | 2 +- src/lib/plugins/types.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/api/storage/new.ts b/src/lib/api/storage/new.ts index 6f7fc09..c704339 100644 --- a/src/lib/api/storage/new.ts +++ b/src/lib/api/storage/new.ts @@ -49,7 +49,7 @@ function _createProxy(target: any, path: string[], emitter: Emitter): any { const origValue = value; value = objChildrens.get(origValue); if (!value) { - value = _createProxy(value, newPath, emitter); + value = _createProxy(origValue, newPath, emitter); objChildrens.set(origValue, value!); } } diff --git a/src/lib/plugins/types.ts b/src/lib/plugins/types.ts index aa197cc..60e8392 100644 --- a/src/lib/plugins/types.ts +++ b/src/lib/plugins/types.ts @@ -4,10 +4,9 @@ import { Author } from "@lib/utils/types"; export interface PluginRepo { [id: string]: { - name: string; version: string; - // For plugin developing convenience, plugins with this on will always gets fetched + // For plugin developing convenience, plugins with this on will always get fetched alwaysFetch?: boolean; }; } @@ -17,7 +16,9 @@ export interface PluginRepoStorage { } export interface PluginSettingsStorage { - [pluginId: string]: any; + [pluginId: string]: { + enabled: boolean; + }; } export interface BunnyPluginManifest {