mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-26 10:56:55 +01:00
Compare commits
3 Commits
2a1280421f
...
4131207790
Author | SHA1 | Date | |
---|---|---|---|
|
4131207790 | ||
93e821794e | |||
cfe6778745 |
@ -9,7 +9,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "6.1.2",
|
"@fortawesome/fontawesome-free": "6.1.2",
|
||||||
"app-root-path": "3.0.0",
|
"app-root-path": "3.0.0",
|
||||||
"bootstrap": "5.2.0",
|
"bootstrap": "5.1.3",
|
||||||
"cookie-parser": "1.4.6",
|
"cookie-parser": "1.4.6",
|
||||||
"cron": "2.1.0",
|
"cron": "2.1.0",
|
||||||
"debug": "4.3.4",
|
"debug": "4.3.4",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"jquery": "3.6.0",
|
"jquery": "3.6.0",
|
||||||
"luxon": "3.0.1",
|
"luxon": "3.0.1",
|
||||||
"morgan": "1.10.0",
|
"morgan": "1.10.0",
|
||||||
"webdav": "4.11.0",
|
"webdav": "4.11.2",
|
||||||
"winston": "3.8.1"
|
"winston": "3.8.1"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.2.2"
|
"packageManager": "yarn@3.2.2"
|
||||||
|
@ -21,7 +21,7 @@ router.get("/formated-local-snap", function (req, res, next) {
|
|||||||
hassioApiTools.getSnapshots()
|
hassioApiTools.getSnapshots()
|
||||||
.then((snaps) => {
|
.then((snaps) => {
|
||||||
snaps.sort((a, b) => {
|
snaps.sort((a, b) => {
|
||||||
return a.date < b.date ? 1 : -1
|
return Date.parse(b.date) - Date.parse(a.date);
|
||||||
});
|
});
|
||||||
|
|
||||||
res.render("localSnaps", { snaps: snaps, DateTime: DateTime });
|
res.render("localSnaps", { snaps: snaps, DateTime: DateTime });
|
||||||
@ -43,7 +43,7 @@ router.get("/formated-backup-manual", function (req, res, next) {
|
|||||||
.getFolderContent(webdav.getConf().back_dir + pathTools.manual)
|
.getFolderContent(webdav.getConf().back_dir + pathTools.manual)
|
||||||
.then((contents) => {
|
.then((contents) => {
|
||||||
contents.sort((a, b) => {
|
contents.sort((a, b) => {
|
||||||
return a.date < b.date ? 1 : -1
|
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||||
});
|
});
|
||||||
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||||
for (let backup of contents) {
|
for (let backup of contents) {
|
||||||
@ -67,7 +67,7 @@ router.get("/formated-backup-auto", function (req, res, next) {
|
|||||||
.getFolderContent(url)
|
.getFolderContent(url)
|
||||||
.then((contents) => {
|
.then((contents) => {
|
||||||
contents.sort((a, b) => {
|
contents.sort((a, b) => {
|
||||||
return a.date < b.date ? 1 : -1
|
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||||
});
|
});
|
||||||
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
//TODO Remove this when bug is fixed, etag contain '"' at start and end ?
|
||||||
for (let backup of contents) {
|
for (let backup of contents) {
|
||||||
|
@ -295,7 +295,7 @@ function clean() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
snaps.sort((a, b) => {
|
snaps.sort((a, b) => {
|
||||||
return a.date < b.date ? 1 : -1
|
return Date.parse(b.date) - Date.parse(a.date);
|
||||||
});
|
});
|
||||||
let toDel = snaps.slice(limit);
|
let toDel = snaps.slice(limit);
|
||||||
for (let i of toDel) {
|
for (let i of toDel) {
|
||||||
|
@ -380,12 +380,13 @@ class WebdavTools {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.getFolderContent(this.getConf().back_dir + pathTools.auto)
|
this.getFolderContent(this.getConf().back_dir + pathTools.auto)
|
||||||
.then(async (contents) => {
|
.then(async (contents) => {
|
||||||
|
|
||||||
if (contents.length < limit) {
|
if (contents.length < limit) {
|
||||||
resolve();
|
resolve();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
contents.sort((a, b) => {
|
contents.sort((a, b) => {
|
||||||
return a.date < b.date ? 1 : -1
|
return Date.parse(b.lastmod) - Date.parse(a.lastmod)
|
||||||
});
|
});
|
||||||
|
|
||||||
let toDel = contents.slice(limit);
|
let toDel = contents.slice(limit);
|
||||||
|
@ -197,12 +197,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"bootstrap@npm:5.2.0":
|
"bootstrap@npm:5.1.3":
|
||||||
version: 5.2.0
|
version: 5.1.3
|
||||||
resolution: "bootstrap@npm:5.2.0"
|
resolution: "bootstrap@npm:5.1.3"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@popperjs/core": ^2.11.5
|
"@popperjs/core": ^2.10.2
|
||||||
checksum: 9dbfb5d26bbdac3e27a6b46cb7456cd4dd75ae3b48644737809885b8ea9c265d3359c4cdbf25a55bb7e5046f51e441557033ba21eeaf24ef8316bfbb3d420084
|
checksum: 301b5ed872efba061104cf22ac93568e3837867fb5527ab9326a51510fb752bd4883e1d488225c8be72f86d9d3a55ef5b166aa7fa62c2fdd077c3f05b65752f8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -778,10 +778,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"hot-patcher@npm:^0.5.0":
|
"hot-patcher@npm:^1.0.0":
|
||||||
version: 0.5.0
|
version: 1.0.0
|
||||||
resolution: "hot-patcher@npm:0.5.0"
|
resolution: "hot-patcher@npm:1.0.0"
|
||||||
checksum: 07d1dfa658e36aa9105a42569f7d6a7461bc65570358f80612545e1a6d44cb06c8f07a7c6128fd4b7d214c363137fd524523b9dfe130daf4bc7cddb5d60e8839
|
checksum: 7f410e5fe1a24498ff68821654df30d501b48f957bf577de86b36bd254947e355823557bd11f0707c043fc7765fc7f513250fd0a8d5150666e37af83157c68a8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -1104,7 +1104,7 @@ __metadata:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@fortawesome/fontawesome-free": 6.1.2
|
"@fortawesome/fontawesome-free": 6.1.2
|
||||||
app-root-path: 3.0.0
|
app-root-path: 3.0.0
|
||||||
bootstrap: 5.2.0
|
bootstrap: 5.1.3
|
||||||
cookie-parser: 1.4.6
|
cookie-parser: 1.4.6
|
||||||
cron: 2.1.0
|
cron: 2.1.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
@ -1116,7 +1116,7 @@ __metadata:
|
|||||||
jquery: 3.6.0
|
jquery: 3.6.0
|
||||||
luxon: 3.0.1
|
luxon: 3.0.1
|
||||||
morgan: 1.10.0
|
morgan: 1.10.0
|
||||||
webdav: 4.11.0
|
webdav: 4.11.2
|
||||||
winston: 3.8.1
|
winston: 3.8.1
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@ -1505,16 +1505,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"webdav@npm:4.11.0":
|
"webdav@npm:4.11.2":
|
||||||
version: 4.11.0
|
version: 4.11.2
|
||||||
resolution: "webdav@npm:4.11.0"
|
resolution: "webdav@npm:4.11.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
axios: ^0.27.2
|
axios: ^0.27.2
|
||||||
base-64: ^1.0.0
|
base-64: ^1.0.0
|
||||||
byte-length: ^1.0.2
|
byte-length: ^1.0.2
|
||||||
fast-xml-parser: ^3.19.0
|
fast-xml-parser: ^3.19.0
|
||||||
he: ^1.2.0
|
he: ^1.2.0
|
||||||
hot-patcher: ^0.5.0
|
hot-patcher: ^1.0.0
|
||||||
layerr: ^0.1.2
|
layerr: ^0.1.2
|
||||||
md5: ^2.3.0
|
md5: ^2.3.0
|
||||||
minimatch: ^5.1.0
|
minimatch: ^5.1.0
|
||||||
@ -1522,7 +1522,7 @@ __metadata:
|
|||||||
path-posix: ^1.0.0
|
path-posix: ^1.0.0
|
||||||
url-join: ^4.0.1
|
url-join: ^4.0.1
|
||||||
url-parse: ^1.5.10
|
url-parse: ^1.5.10
|
||||||
checksum: 0a7aab0a3118deea20485d3c417fda40e71c3930b866a92cfff5dedce4a25c0fbed0cd083bf14ac5a4ee7cab55136265d5011b2601cbb2a1b359da551910ec97
|
checksum: 6fe040b43e350cb15febf688d8eabe45dbe3c74922c94a3730d63911139def435de7f410439e4e1eac6b46d545b6a3631808cc773647b04e6e41731f8ad5f011
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user