imdone-core 1.54.7 → 1.54.8

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.
@@ -23,7 +23,7 @@ module.exports = class DefaultBoardPropertiesPlugin extends Plugin {
23
23
  this.templates = await this.getTemplates()
24
24
  }
25
25
 
26
- getBoardProperties() {
26
+ async getBoardProperties() {
27
27
  const templates = flattenObject(this.templates);
28
28
  const clearFilterURL = this.getFilterURL('');
29
29
  const getFilterURL = (filter) => this.getFilterURL(filter);
@@ -38,8 +38,8 @@ module.exports = class ExtensionPlugin extends Plugin {
38
38
  return this.cardPropertiesFunction(task)
39
39
  }
40
40
 
41
- getBoardProperties() {
42
- return this.boardPropertiesFunction()
41
+ async getBoardProperties() {
42
+ return await this.boardPropertiesFunction()
43
43
  }
44
44
 
45
45
  getCardActions(task) {
@@ -321,11 +321,15 @@ module.exports = class PluginManager extends Emitter {
321
321
  return cardProps
322
322
  }
323
323
 
324
- getBoardProperties() {
324
+ // READY Make getBoardProperties async
325
+ // <!--
326
+ // order:-10
327
+ // -->
328
+ async getBoardProperties() {
325
329
  let boardProps = {}
326
- this.eachPlugin(({ pluginInstance }) => {
330
+ await this.eachPluginAsync(async ({ pluginInstance }) => {
327
331
  try {
328
- const pluginProps = pluginInstance.getBoardProperties ? pluginInstance.getBoardProperties() : {}
332
+ const pluginProps = pluginInstance.getBoardProperties ? await pluginInstance.getBoardProperties() : {}
329
333
  boardProps = { ...boardProps, ...pluginProps }
330
334
  } catch (e) {
331
335
  this.pluginError('getBoardProperties', pluginInstance, e)
package/lib/project.js CHANGED
@@ -65,7 +65,7 @@ module.exports = class WorkerProject extends Project {
65
65
  this.pluginManager.on('plugin-uninstalled', () => this.emitUpdate())
66
66
  this.pluginManager.on('plugins-reloaded', () => this.emitUpdate())
67
67
  await this.pluginManager.loadPlugins()
68
- this.data = this.pluginManager.getBoardProperties()
68
+ this.data = await this.pluginManager.getBoardProperties()
69
69
  this.dataKeys = this.getDataKeys(this.data)
70
70
 
71
71
  console.log('data', this.data)
@@ -154,7 +154,7 @@ module.exports = class WorkerProject extends Project {
154
154
  console.timeEnd('plugin onBeforeBoardUpdate time')
155
155
 
156
156
  console.time('getBoardProperties time')
157
- const data = this.data = this.pluginManager.getBoardProperties()
157
+ const data = this.data = await this.pluginManager.getBoardProperties()
158
158
  console.timeEnd('getBoardProperties time')
159
159
 
160
160
  console.time('getDataKeys time')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imdone-core",
3
- "version": "1.54.7",
3
+ "version": "1.54.8",
4
4
  "description": "imdone-core",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -59,7 +59,7 @@
59
59
  "find-up": "^5.0.0",
60
60
  "gray-matter": "^4.0.2",
61
61
  "ignore": "^5.2.0",
62
- "imdone-api": "^1.53.0",
62
+ "imdone-api": "^1.54.0",
63
63
  "isbinaryfile": "^3.0.2",
64
64
  "js-yaml": "^3.14.1",
65
65
  "json-fns": "^1.0.0",