Skip to content

Commit 4e2f586

Browse files
committed
deps: tuf-js@1.1.6
1 parent 58f7ea8 commit 4e2f586

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

DEPENDENCIES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ graph LR;
789789
tar-->minizlib;
790790
tar-->mkdirp;
791791
tar-->yallist;
792+
tuf-js-->debug;
792793
tuf-js-->make-fetch-happen;
793794
tuf-js-->tufjs-models["@tufjs/models"];
794795
tufjs-models-->minimatch;

node_modules/tuf-js/dist/fetcher.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
44
};
55
Object.defineProperty(exports, "__esModule", { value: true });
66
exports.DefaultFetcher = exports.BaseFetcher = void 0;
7+
const debug_1 = __importDefault(require("debug"));
78
const fs_1 = __importDefault(require("fs"));
89
const make_fetch_happen_1 = __importDefault(require("make-fetch-happen"));
910
const util_1 = __importDefault(require("util"));
1011
const error_1 = require("./error");
1112
const tmpfile_1 = require("./utils/tmpfile");
13+
const log = (0, debug_1.default)('tuf:fetch');
1214
class BaseFetcher {
1315
// Download file from given URL. The file is downloaded to a temporary
1416
// location and then passed to the given handler. The handler is responsible
@@ -58,6 +60,7 @@ class DefaultFetcher extends BaseFetcher {
5860
this.retries = options.retries;
5961
}
6062
async fetch(url) {
63+
log('GET %s', url);
6164
const response = await (0, make_fetch_happen_1.default)(url, {
6265
timeout: this.timeout,
6366
retry: this.retries,

node_modules/tuf-js/dist/updater.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
2222
__setModuleDefault(result, mod);
2323
return result;
2424
};
25+
var __importDefault = (this && this.__importDefault) || function (mod) {
26+
return (mod && mod.__esModule) ? mod : { "default": mod };
27+
};
2528
Object.defineProperty(exports, "__esModule", { value: true });
2629
exports.Updater = void 0;
2730
const models_1 = require("@tufjs/models");
31+
const debug_1 = __importDefault(require("debug"));
2832
const fs = __importStar(require("fs"));
2933
const path = __importStar(require("path"));
3034
const config_1 = require("./config");
3135
const error_1 = require("./error");
3236
const fetcher_1 = require("./fetcher");
3337
const store_1 = require("./store");
3438
const url = __importStar(require("./utils/url"));
39+
const log = (0, debug_1.default)('tuf:cache');
3540
class Updater {
3641
constructor(options) {
3742
const { metadataDir, metadataBaseUrl, targetDir, targetBaseUrl, fetcher, config, } = options;
@@ -86,6 +91,7 @@ class Updater {
8691
// Verify hashes and length of downloaded file
8792
await targetInfo.verify(fs.createReadStream(fileName));
8893
// Copy file to target path
94+
log('WRITE %s', targetPath);
8995
fs.copyFileSync(fileName, targetPath);
9096
});
9197
return targetPath;
@@ -107,6 +113,7 @@ class Updater {
107113
}
108114
loadLocalMetadata(fileName) {
109115
const filePath = path.join(this.dir, `${fileName}.json`);
116+
log('READ %s', filePath);
110117
return fs.readFileSync(filePath);
111118
}
112119
// Sequentially load and persist on local disk every newer root metadata
@@ -300,6 +307,7 @@ class Updater {
300307
async persistMetadata(metaDataName, bytesData) {
301308
try {
302309
const filePath = path.join(this.dir, `${metaDataName}.json`);
310+
log('WRITE %s', filePath);
303311
fs.writeFileSync(filePath, bytesData.toString('utf8'));
304312
}
305313
catch (error) {

node_modules/tuf-js/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tuf-js",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "JavaScript implementation of The Update Framework (TUF)",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -29,14 +29,16 @@
2929
"homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/client#readme",
3030
"devDependencies": {
3131
"@tufjs/repo-mock": "1.3.1",
32+
"@types/debug": "^4.1.7",
3233
"@types/make-fetch-happen": "^10.0.1",
33-
"@types/node": "^18.16.3",
34+
"@types/node": "^20.1.1",
3435
"nock": "^13.3.1",
3536
"typescript": "^5.0.4"
3637
},
3738
"dependencies": {
38-
"make-fetch-happen": "^11.1.0",
39-
"@tufjs/models": "1.0.4"
39+
"@tufjs/models": "1.0.4",
40+
"debug": "^4.3.4",
41+
"make-fetch-happen": "^11.1.0"
4042
},
4143
"engines": {
4244
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"

package-lock.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14518,12 +14518,13 @@
1451814518
}
1451914519
},
1452014520
"node_modules/tuf-js": {
14521-
"version": "1.1.5",
14522-
"resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.5.tgz",
14523-
"integrity": "sha512-inqodgxdsmuxrtQVbu6tPNgRKWD1Boy3VB6GO7KczJZpAHiTukwhSzXUSzvDcw5pE2Jo8ua+e1ykpHv7VdPVlQ==",
14521+
"version": "1.1.6",
14522+
"resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.6.tgz",
14523+
"integrity": "sha512-CXwFVIsXGbVY4vFiWF7TJKWmlKJAT8TWkH4RmiohJRcDJInix++F0dznDmoVbtJNzZ8yLprKUG4YrDIhv3nBMg==",
1452414524
"inBundle": true,
1452514525
"dependencies": {
1452614526
"@tufjs/models": "1.0.4",
14527+
"debug": "^4.3.4",
1452714528
"make-fetch-happen": "^11.1.0"
1452814529
},
1452914530
"engines": {

0 commit comments

Comments
 (0)