diff --git a/node_modules/tuf-js/dist/updater.js b/node_modules/tuf-js/dist/updater.js index 71fa4981e3122..2aba48d24affd 100644 --- a/node_modules/tuf-js/dist/updater.js +++ b/node_modules/tuf-js/dist/updater.js @@ -54,6 +54,8 @@ class Updater { retries: this.config.fetchRetries, }); } + // refresh and load the metadata before downloading the target + // refresh should be called once after the client is initialized async refresh() { await this.loadRoot(); await this.loadTimestamp(); @@ -102,7 +104,7 @@ class Updater { } try { if (fs.existsSync(filePath)) { - targetInfo.verify(fs.createReadStream(filePath)); + await targetInfo.verify(fs.createReadStream(filePath)); return filePath; } } diff --git a/node_modules/tuf-js/package.json b/node_modules/tuf-js/package.json index c1134af2b2ff3..9187d88083272 100644 --- a/node_modules/tuf-js/package.json +++ b/node_modules/tuf-js/package.json @@ -1,6 +1,6 @@ { "name": "tuf-js", - "version": "1.1.6", + "version": "1.1.7", "description": "JavaScript implementation of The Update Framework (TUF)", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -29,16 +29,16 @@ "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/client#readme", "devDependencies": { "@tufjs/repo-mock": "1.3.1", - "@types/debug": "^4.1.7", + "@types/debug": "^4.1.8", "@types/make-fetch-happen": "^10.0.1", - "@types/node": "^20.1.1", + "@types/node": "^20.2.5", "nock": "^13.3.1", - "typescript": "^5.0.4" + "typescript": "^5.1.3" }, "dependencies": { "@tufjs/models": "1.0.4", "debug": "^4.3.4", - "make-fetch-happen": "^11.1.0" + "make-fetch-happen": "^11.1.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" diff --git a/package-lock.json b/package-lock.json index e1a2a119dbe83..360248d47040a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14541,14 +14541,14 @@ } }, "node_modules/tuf-js": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.6.tgz", - "integrity": "sha512-CXwFVIsXGbVY4vFiWF7TJKWmlKJAT8TWkH4RmiohJRcDJInix++F0dznDmoVbtJNzZ8yLprKUG4YrDIhv3nBMg==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", + "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==", "inBundle": true, "dependencies": { "@tufjs/models": "1.0.4", "debug": "^4.3.4", - "make-fetch-happen": "^11.1.0" + "make-fetch-happen": "^11.1.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0"