From 9fb9bca6289495905bd2bb6ee381a949788249c4 Mon Sep 17 00:00:00 2001 From: Tachibana Shin Date: Sat, 14 Oct 2023 04:49:06 +0000 Subject: [PATCH] fix: plugin data not save state `devMode` --- src/stores/plugin.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stores/plugin.ts b/src/stores/plugin.ts index 410e9a23..b1d7f76e 100644 --- a/src/stores/plugin.ts +++ b/src/stores/plugin.ts @@ -86,18 +86,20 @@ export const usePluginStore = defineStore("plugin", () => { const plugin = createWorkerPlugin(pluginMjs, httpGet, httpPost, devMode) - Object.assign(meta, { + const metaDisk: PackageDisk = { + ...meta, source, installedAt, updatedAt, - plugin: pluginMjs - }) + plugin: pluginMjs, + devMode + } await Filesystem.writeFile({ path: `plugins/${meta.id}`, directory: Directory.External, encoding: Encoding.UTF8, - data: JSON.stringify(meta), + data: JSON.stringify(metaDisk), recursive: true }) ;(await pluginsInstalled.get(meta.id))?.plugin.destroy()