Skip to content

Commit

Permalink
fix: plugin data not save state devMode
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibana-shin committed Oct 14, 2023
1 parent 62357bd commit 9fb9bca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/stores/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9fb9bca

Please sign in to comment.