wkd-checker 2.0.0 → 2.1.0
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/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -105,6 +105,8 @@ const checkKeyUrl = (url, policy, options, email) => __awaiter(void 0, void 0, v
|
|
|
105
105
|
keyTypeValid: false,
|
|
106
106
|
fingerprint: null,
|
|
107
107
|
emailInKey: false,
|
|
108
|
+
expired: false,
|
|
109
|
+
revoked: false,
|
|
108
110
|
valid: false,
|
|
109
111
|
};
|
|
110
112
|
if (keyData.response) {
|
|
@@ -127,6 +129,11 @@ const checkKeyUrl = (url, policy, options, email) => __awaiter(void 0, void 0, v
|
|
|
127
129
|
result.emailInKey = false;
|
|
128
130
|
}
|
|
129
131
|
result.fingerprint = key.getFingerprint().toUpperCase();
|
|
132
|
+
const expirationTime = yield key.getExpirationTime();
|
|
133
|
+
if (expirationTime !== Infinity && expirationTime !== null) {
|
|
134
|
+
result.expired = expirationTime < new Date();
|
|
135
|
+
}
|
|
136
|
+
result.revoked = yield key.isRevoked();
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
result.valid = result.policyAvailable &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wkd-checker",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Web Key Directory library for Node.js. Retreive OpenPGP keys from WKD servers and validate them.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^25.0.6",
|
|
27
|
+
"nock": "^14.0.10",
|
|
28
|
+
"tsx": "^4.21.0",
|
|
27
29
|
"typescript": "^5.4.2"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
@@ -31,7 +33,8 @@
|
|
|
31
33
|
},
|
|
32
34
|
"scripts": {
|
|
33
35
|
"build": "tsc",
|
|
34
|
-
"prepublishOnly": "npm run build"
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"test": "node --import tsx --test \"tests/**/*.test.ts\""
|
|
35
38
|
},
|
|
36
39
|
"files": [
|
|
37
40
|
"dist"
|