Comparing version 1.1.5 to 1.1.6
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.DefaultFetcher = exports.BaseFetcher = void 0; | ||
const debug_1 = __importDefault(require("debug")); | ||
const fs_1 = __importDefault(require("fs")); | ||
@@ -13,2 +14,3 @@ const make_fetch_happen_1 = __importDefault(require("make-fetch-happen")); | ||
const tmpfile_1 = require("./utils/tmpfile"); | ||
const log = (0, debug_1.default)('tuf:fetch'); | ||
class BaseFetcher { | ||
@@ -63,2 +65,3 @@ // Download file from given URL. The file is downloaded to a temporary | ||
async fetch(url) { | ||
log('GET %s', url); | ||
const response = await (0, make_fetch_happen_1.default)(url, { | ||
@@ -65,0 +68,0 @@ timeout: this.timeout, |
@@ -25,5 +25,9 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Updater = void 0; | ||
const models_1 = require("@tufjs/models"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const fs = __importStar(require("fs")); | ||
@@ -36,2 +40,3 @@ const path = __importStar(require("path")); | ||
const url = __importStar(require("./utils/url")); | ||
const log = (0, debug_1.default)('tuf:cache'); | ||
class Updater { | ||
@@ -91,2 +96,3 @@ constructor(options) { | ||
// Copy file to target path | ||
log('WRITE %s', targetPath); | ||
fs.copyFileSync(fileName, targetPath); | ||
@@ -113,2 +119,3 @@ }); | ||
const filePath = path.join(this.dir, `${fileName}.json`); | ||
log('READ %s', filePath); | ||
return fs.readFileSync(filePath); | ||
@@ -307,2 +314,3 @@ } | ||
const filePath = path.join(this.dir, `${metaDataName}.json`); | ||
log('WRITE %s', filePath); | ||
fs.writeFileSync(filePath, bytesData.toString('utf8')); | ||
@@ -309,0 +317,0 @@ } |
{ | ||
"name": "tuf-js", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "JavaScript implementation of The Update Framework (TUF)", | ||
@@ -32,4 +32,5 @@ "main": "dist/index.js", | ||
"@tufjs/repo-mock": "1.3.1", | ||
"@types/debug": "^4.1.7", | ||
"@types/make-fetch-happen": "^10.0.1", | ||
"@types/node": "^18.16.3", | ||
"@types/node": "^20.1.1", | ||
"nock": "^13.3.1", | ||
@@ -39,4 +40,5 @@ "typescript": "^5.0.4" | ||
"dependencies": { | ||
"make-fetch-happen": "^11.1.0", | ||
"@tufjs/models": "1.0.4" | ||
"@tufjs/models": "1.0.4", | ||
"debug": "^4.3.4", | ||
"make-fetch-happen": "^11.1.0" | ||
}, | ||
@@ -43,0 +45,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39116
836
3
6
+ Addeddebug@^4.3.4