enhance(plugin): ignore save package json for the web plugin

This commit is contained in:
charlie
2024-12-30 16:03:59 +08:00
parent b9a7950caf
commit 49227f4651
2 changed files with 4 additions and 4 deletions

View File

@@ -594,14 +594,14 @@ class PluginLocal extends EventEmitter<
// TODO: strategy for Logseq plugins center
if (this.isInstalledInDotRoot) {
this._id = path.basename(localRoot)
} else {
} else if (!this.isWebPlugin) {
// development mode
if (!this.isWebPlugin && logseq.id) {
if (logseq.id) {
this._id = logseq.id
} else {
logseq.id = this.id
try {
await invokeHostExportedApi('save_plugin_config', url, {
await invokeHostExportedApi('save_plugin_package_json', url, {
...pkg,
logseq,
})

View File

@@ -215,7 +215,7 @@
(fn [path]
(fs/read-file nil (util/node-path.join path "readme.md"))))
(def ^:export save_plugin_config
(def ^:export save_plugin_package_json
(fn [path ^js data]
(let [repo ""
path (util/node-path.join path "package.json")]