axvault 1.10.0 → 1.11.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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted to keep refresh-credential-on-read.ts under the FTA threshold.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { getAdapter } from "axauth";
|
|
7
7
|
import { isValidAgentCli, isRefreshableCredentialType, parseCredentials, } from "axshared";
|
|
8
8
|
/** Check whether a credential should be refreshed */
|
|
9
9
|
function shouldRefreshCredential(blob, agent, refreshThresholdSeconds) {
|
|
@@ -12,10 +12,12 @@ function shouldRefreshCredential(blob, agent, refreshThresholdSeconds) {
|
|
|
12
12
|
if (!isValidAgentCli(agent))
|
|
13
13
|
return { refresh: false };
|
|
14
14
|
const parsed = parseCredentials(blob);
|
|
15
|
-
if (parsed === undefined ||
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
if (parsed === undefined || !isRefreshableCredentialType(parsed.type)) {
|
|
16
|
+
return { refresh: false };
|
|
17
|
+
}
|
|
18
|
+
const adapter = getAdapter(agent);
|
|
19
|
+
if (!adapter.isRefreshable(parsed) ||
|
|
20
|
+
adapter.isExpired(parsed, refreshThresholdSeconds) !== true) {
|
|
19
21
|
return { refresh: false };
|
|
20
22
|
}
|
|
21
23
|
return { refresh: true, agent };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "axvault",
|
|
3
3
|
"author": "Łukasz Jerciński",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.11.0",
|
|
6
6
|
"description": "Remote credential storage server for axkit",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@commander-js/extra-typings": "^14.0.0",
|
|
52
|
-
"axauth": "^3.
|
|
52
|
+
"axauth": "^3.3.0",
|
|
53
53
|
"axshared": "5.0.0",
|
|
54
54
|
"better-sqlite3": "^12.6.2",
|
|
55
55
|
"commander": "^14.0.3",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"automation",
|
|
71
71
|
"coding-assistant"
|
|
72
72
|
],
|
|
73
|
-
"packageManager": "pnpm@10.30.
|
|
73
|
+
"packageManager": "pnpm@10.30.3",
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=22.14.0"
|
|
76
76
|
},
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
79
79
|
"@types/better-sqlite3": "^7.6.13",
|
|
80
80
|
"@types/express": "^5.0.6",
|
|
81
|
-
"@types/node": "^25.3.
|
|
81
|
+
"@types/node": "^25.3.3",
|
|
82
82
|
"@vitest/coverage-v8": "^4.0.18",
|
|
83
|
-
"eslint": "^10.0.
|
|
84
|
-
"eslint-config-axkit": "^1.
|
|
83
|
+
"eslint": "^10.0.2",
|
|
84
|
+
"eslint-config-axkit": "^1.4.0",
|
|
85
85
|
"fta-check": "^1.5.1",
|
|
86
86
|
"fta-cli": "^3.0.0",
|
|
87
87
|
"knip": "^5.85.0",
|