refactor: use only what is needed from 'async' (reduce import size)

This commit is contained in:
Dimitar Drenkovski 2022-01-19 13:01:21 +01:00
parent b902551b87
commit 725569ff50

View File

@ -8,7 +8,7 @@ const http = require('http')
const fs = require('fs')
const url = require('url')
const exec = require('child_process').exec
const async = require('async')
const tryEach = require('async/tryEach');
module.exports = class WebStrategy extends AuthStrategy {
// the client will try to call this but we handle this part ourselves
@ -53,7 +53,7 @@ module.exports = class WebStrategy extends AuthStrategy {
refresh_token: refresh
})
}
async.tryEach([
tryEach([
// try to find the token via the environment
(next) => {
if (!process.env.PM2_IO_TOKEN) {