avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+5
View File
@@ -41,6 +41,7 @@ const models_1 = require("@tufjs/models");
const debug_1 = __importDefault(require("debug"));
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const package_json_1 = require("../package.json");
const config_1 = require("./config");
const error_1 = require("./error");
const fetcher_1 = require("./fetcher");
@@ -66,9 +67,13 @@ class Updater {
const data = this.loadLocalMetadata(models_1.MetadataKind.Root);
this.trustedSet = new store_1.TrustedMetadataStore(data);
this.config = { ...config_1.defaultConfig, ...config };
const userAgent = config?.userAgent
? `${config.userAgent} tuf-js/${package_json_1.version}`
: `tuf-js/${package_json_1.version}`;
this.fetcher =
fetcher ||
new fetcher_1.DefaultFetcher({
userAgent,
timeout: this.config.fetchTimeout,
retry: this.config.fetchRetries ?? this.config.fetchRetry,
});