imdone-core 1.54.13 → 1.54.14
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.
- package/README.md +0 -1
- package/lib/mixins/repo-watched-fs-store.js +2 -0
- package/lib/project.js +5 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,6 @@ Imdone is text based kanban processor with a simple syntax that uses [comment ta
|
|
|
9
9
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
10
10
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
- [Imdone format](#imdone-format)
|
|
14
13
|
- [Code Style](#code-style)
|
|
15
14
|
- [Hash Style](#hash-style)
|
|
@@ -112,6 +112,7 @@ function mixin(repo, fs = require('fs')) {
|
|
|
112
112
|
repo.pause = async function () {
|
|
113
113
|
log('Pausing watcher for:', repo.path)
|
|
114
114
|
paused = true
|
|
115
|
+
repo.emit('paused')
|
|
115
116
|
return Promise.resolve()
|
|
116
117
|
}
|
|
117
118
|
|
|
@@ -124,6 +125,7 @@ function mixin(repo, fs = require('fs')) {
|
|
|
124
125
|
console.error('Error refreshing repo on resume', err)
|
|
125
126
|
return reject(err)
|
|
126
127
|
}
|
|
128
|
+
repo.emit('resumed')
|
|
127
129
|
resolve(files)
|
|
128
130
|
})
|
|
129
131
|
})
|
package/lib/project.js
CHANGED
|
@@ -32,17 +32,15 @@ function calculateTotals(lists = []) {
|
|
|
32
32
|
return totals
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
project.emit(event, data)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const EVENTS = [
|
|
35
|
+
const REPO_EVENTS_EMITTED = [
|
|
40
36
|
'file.processed',
|
|
41
37
|
'files.found',
|
|
42
38
|
'file.update',
|
|
43
39
|
'file.saved',
|
|
44
40
|
'list.modified',
|
|
45
41
|
'config.update',
|
|
42
|
+
'paused',
|
|
43
|
+
'resumed',
|
|
46
44
|
]
|
|
47
45
|
|
|
48
46
|
module.exports = class WorkerProject extends Project {
|
|
@@ -157,8 +155,8 @@ module.exports = class WorkerProject extends Project {
|
|
|
157
155
|
|
|
158
156
|
console.log('data', this.data)
|
|
159
157
|
console.log('dataKeys', this.dataKeys)
|
|
160
|
-
|
|
161
|
-
this.repo.on(event, (data) =>
|
|
158
|
+
REPO_EVENTS_EMITTED.forEach((event) => {
|
|
159
|
+
this.repo.on(event, (data) => this.emit(event, data))
|
|
162
160
|
})
|
|
163
161
|
|
|
164
162
|
this.repo.on('task.found', (task) => this.pluginManager.onTaskFound(task))
|