imdone-core 1.33.4 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  const { loadYAML } = require("./tools")
2
2
 
3
3
  const defaultSettingsString = `openIn: default #override
4
- customOpenIn: '' #override
5
4
  editorTheme: blackboard
6
5
  journalType: New File
7
6
  journalPath: imdone-tasks #override
@@ -72,9 +72,9 @@ module.exports = class PluginManager extends Emitter {
72
72
  return reject(new Error('Unable to find plugin:' + pluginName))
73
73
  }
74
74
  const { info } = this.getPlugin(pluginClassName)
75
- const { path, version, name } = info
76
- const pkg = { version, name }
77
- console.log('Uninstalling:', pkg)
75
+ const { path } = info
76
+ // const pkg = { version, name }
77
+ console.log('Uninstalling:', info)
78
78
 
79
79
  rimraf(path, (err) => {
80
80
  if (err) return reject(err)
@@ -137,7 +137,7 @@ module.exports = class PluginManager extends Emitter {
137
137
  throw new Error(`${pluginClass.name} is not a plugin`)
138
138
  const name = pluginClass.name.toString()
139
139
  const pluginInstance = new pluginClass(this.project)
140
- let info = { name, path }
140
+ let info = {}
141
141
  try {
142
142
  info = require(`${path}/package.json`)
143
143
  delete info.dependencies
@@ -146,6 +146,9 @@ module.exports = class PluginManager extends Emitter {
146
146
  delete info.main
147
147
  } catch (e) {
148
148
  console.info('No info on plugin:', path)
149
+ } finally {
150
+ info.path = path
151
+ info.name = name
149
152
  }
150
153
 
151
154
  pluginInstance.getSettings = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imdone-core",
3
- "version": "1.33.4",
3
+ "version": "1.34.0",
4
4
  "description": "imdone-core",
5
5
  "main": "index.js",
6
6
  "bin": {