@live-change/backup-service 0.9.8 → 0.9.10
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/clear.js +2 -2
- package/index.js +1 -1
- package/package.json +4 -4
package/clear.js
CHANGED
|
@@ -40,7 +40,7 @@ export async function getLastTriggerTimestamp() {
|
|
|
40
40
|
const lastTriggers = await app.dao.get(
|
|
41
41
|
['database', 'indexRange', app.databaseName, 'triggers_byTimestamp', { reverse: true, limit: 1 }])
|
|
42
42
|
const lastTrigger = lastTriggers[0]?.id
|
|
43
|
-
return lastTrigger
|
|
43
|
+
return lastTrigger ? lastTrigger.split('_')[0] : null
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export async function getLastCommandTimestamp() {
|
|
@@ -50,7 +50,7 @@ export async function getLastCommandTimestamp() {
|
|
|
50
50
|
const lastCommands = await app.dao.get(
|
|
51
51
|
['database', 'indexRange', app.databaseName, 'commands_byTimestamp', { reverse: true, limit: 1 }])
|
|
52
52
|
const lastCommand = lastCommands[0]?.id
|
|
53
|
-
return lastCommand
|
|
53
|
+
return lastCommand ? lastCommand.split('_')[0] : null
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
const clearQuery = `${async (input, output, { tableName, bucket, before }) => {
|
package/index.js
CHANGED
|
@@ -185,7 +185,7 @@ expressApp.post('/restore/:fileName', async (req, res) => {
|
|
|
185
185
|
return 'ok'
|
|
186
186
|
})
|
|
187
187
|
|
|
188
|
-
definition.
|
|
188
|
+
definition.afterStart(() => {
|
|
189
189
|
|
|
190
190
|
expressApp.listen(backupServerPort, () => {
|
|
191
191
|
console.log(`backup port listening on ${backupServerPort}`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/backup-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"author": "Michał Łaszczewski <michal@emikse.com>",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@live-change/db-client": "^0.9.
|
|
13
|
-
"@live-change/framework": "^0.9.
|
|
12
|
+
"@live-change/db-client": "^0.9.10",
|
|
13
|
+
"@live-change/framework": "^0.9.10",
|
|
14
14
|
"express": "^4.18.2",
|
|
15
15
|
"express-basic-auth": "^1.2.1",
|
|
16
16
|
"fs-extra": "^11.1.1",
|
|
17
17
|
"p-queue": "^8.0.1",
|
|
18
18
|
"progress-stream": "^2.0.0"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "d41e404c1933e9ed6e3927d85a5dadf66da0f951",
|
|
21
21
|
"type": "module"
|
|
22
22
|
}
|