npq 3.21.0 → 3.21.1
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const BaseMarshall = require('./baseMarshall')
|
|
4
4
|
const { marshallCategories } = require('./constants')
|
|
5
|
+
const NotEvaluated = require('../helpers/notEvaluated')
|
|
5
6
|
const { Resolver } = require('dns/promises')
|
|
6
7
|
|
|
7
8
|
const dns = new Resolver()
|
|
@@ -28,6 +29,10 @@ class Marshall extends BaseMarshall {
|
|
|
28
29
|
|
|
29
30
|
const maintainersAccounts = lastVersionData && lastVersionData.maintainers
|
|
30
31
|
|
|
32
|
+
if (!Array.isArray(maintainersAccounts) || maintainersAccounts.length === 0) {
|
|
33
|
+
throw new NotEvaluated('no maintainers information available for the package')
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
const testEmails = []
|
|
32
37
|
for (const maintainerInfo of maintainersAccounts) {
|
|
33
38
|
const maintainerEmail = maintainerInfo.email
|
|
@@ -38,6 +43,10 @@ class Marshall extends BaseMarshall {
|
|
|
38
43
|
return Promise.all(testEmails)
|
|
39
44
|
})
|
|
40
45
|
.catch((error) => {
|
|
46
|
+
if (error instanceof NotEvaluated) {
|
|
47
|
+
throw error
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
const emailHostname = error.hostname ? error.hostname : '<unknown>'
|
|
42
51
|
this.debug('\nDetected error resolving domain for maintainer e-mail: %s', emailHostname)
|
|
43
52
|
throw new Error(
|