Update async library to 2.x

This commit is contained in:
Björn Dahlgren 2022-05-30 22:48:43 +02:00
parent 24153027d9
commit 827f1e614a
2 changed files with 11 additions and 3 deletions

View File

@ -97,13 +97,21 @@ Logs.prototype.logFiles = function (callback) {
async.filter(files, function (file, cb) {
fs.stat(file.path, function (err, stat) {
if (err) {
return cb(err)
}
file.created = stat.birthtime.toISOString()
file.modified = stat.mtime.toISOString()
file.formattedSize = filesize(stat.size)
file.size = stat.size
cb(!err && stat.isFile())
cb(null, stat.isFile())
})
}, function (files) {
}, function (err, files) {
if (err) {
return callback(err)
}
files.sort(function (a, b) {
return b.created.localeCompare(a.created) // Descending order
})

View File

@ -19,7 +19,7 @@
"dependencies": {
"arma-class-parser": "^1.1.1",
"arma-server": "0.0.10",
"async": "^0.9.0",
"async": "^2.6.4",
"backbone": "1.3.3",
"backbone.bootstrap-modal": "https://github.com/powmedia/backbone.bootstrap-modal/archive/632210077c2424be2ee6ea2aafe0d3fe016ae524.tar.gz",
"backbone.marionette": "2.4.7",