File tree 3 files changed +12
-10
lines changed
3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ class Updater {
54
54
retries : this . config . fetchRetries ,
55
55
} ) ;
56
56
}
57
+ // refresh and load the metadata before downloading the target
58
+ // refresh should be called once after the client is initialized
57
59
async refresh ( ) {
58
60
await this . loadRoot ( ) ;
59
61
await this . loadTimestamp ( ) ;
@@ -102,7 +104,7 @@ class Updater {
102
104
}
103
105
try {
104
106
if ( fs . existsSync ( filePath ) ) {
105
- targetInfo . verify ( fs . createReadStream ( filePath ) ) ;
107
+ await targetInfo . verify ( fs . createReadStream ( filePath ) ) ;
106
108
return filePath ;
107
109
}
108
110
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tuf-js" ,
3
- "version" : " 1.1.6 " ,
3
+ "version" : " 1.1.7 " ,
4
4
"description" : " JavaScript implementation of The Update Framework (TUF)" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
29
29
"homepage" : " https://github.com/theupdateframework/tuf-js/tree/main/packages/client#readme" ,
30
30
"devDependencies" : {
31
31
"@tufjs/repo-mock" : " 1.3.1" ,
32
- "@types/debug" : " ^4.1.7 " ,
32
+ "@types/debug" : " ^4.1.8 " ,
33
33
"@types/make-fetch-happen" : " ^10.0.1" ,
34
- "@types/node" : " ^20.1.1 " ,
34
+ "@types/node" : " ^20.2.5 " ,
35
35
"nock" : " ^13.3.1" ,
36
- "typescript" : " ^5.0.4 "
36
+ "typescript" : " ^5.1.3 "
37
37
},
38
38
"dependencies" : {
39
39
"@tufjs/models" : " 1.0.4" ,
40
40
"debug" : " ^4.3.4" ,
41
- "make-fetch-happen" : " ^11.1.0 "
41
+ "make-fetch-happen" : " ^11.1.1 "
42
42
},
43
43
"engines" : {
44
44
"node" : " ^14.17.0 || ^16.13.0 || >=18.0.0"
Original file line number Diff line number Diff line change @@ -14541,14 +14541,14 @@
14541
14541
}
14542
14542
},
14543
14543
"node_modules/tuf-js": {
14544
- "version": "1.1.6 ",
14545
- "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.6 .tgz",
14546
- "integrity": "sha512-CXwFVIsXGbVY4vFiWF7TJKWmlKJAT8TWkH4RmiohJRcDJInix++F0dznDmoVbtJNzZ8yLprKUG4YrDIhv3nBMg ==",
14544
+ "version": "1.1.7 ",
14545
+ "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7 .tgz",
14546
+ "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg ==",
14547
14547
"inBundle": true,
14548
14548
"dependencies": {
14549
14549
"@tufjs/models": "1.0.4",
14550
14550
"debug": "^4.3.4",
14551
- "make-fetch-happen": "^11.1.0 "
14551
+ "make-fetch-happen": "^11.1.1 "
14552
14552
},
14553
14553
"engines": {
14554
14554
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
You can’t perform that action at this time.
0 commit comments