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
+1 -1
View File
@@ -12,7 +12,7 @@ repository.
## Prerequisites
- Node.js version >= 18.17.0
- Node.js version ^20.17.0 || >=22.9.0
## Installation
+5
View File
@@ -23,9 +23,11 @@ const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const tuf_js_1 = require("tuf-js");
const _1 = require(".");
const package_json_1 = require("../package.json");
const target_1 = require("./target");
const TARGETS_DIR_NAME = 'targets';
class TUFClient {
updater;
constructor(options) {
const url = new URL(options.mirrorURL);
const repoName = encodeURIComponent(url.host + url.pathname.replace(/\/$/, ''));
@@ -63,6 +65,7 @@ function initTufCache(cachePath) {
if (!fs_1.default.existsSync(cachePath)) {
fs_1.default.mkdirSync(cachePath, { recursive: true });
}
/* istanbul ignore else */
if (!fs_1.default.existsSync(targetsPath)) {
fs_1.default.mkdirSync(targetsPath);
}
@@ -74,6 +77,7 @@ function seedCache({ cachePath, mirrorURL, tufRootPath, forceInit, }) {
const cachedRootPath = path_1.default.join(cachePath, 'root.json');
// If the root.json file does not exist (or we're forcing re-initialization),
// populate it either from the supplied rootPath or from one of the repo seeds.
/* istanbul ignore else */
if (!fs_1.default.existsSync(cachedRootPath) || forceInit) {
if (tufRootPath) {
fs_1.default.copyFileSync(tufRootPath, cachedRootPath);
@@ -99,6 +103,7 @@ function initClient(options) {
const config = {
fetchTimeout: options.timeout,
fetchRetry: options.retry,
userAgent: `${encodeURIComponent(package_json_1.name)}/${package_json_1.version}`,
};
return new tuf_js_1.Updater({
metadataBaseUrl: options.mirrorURL,
+2
View File
@@ -2,6 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.TUFError = void 0;
class TUFError extends Error {
code;
cause;
constructor({ code, message, cause, }) {
super(message);
this.code = code;
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@sigstore/tuf",
"version": "3.1.1",
"version": "4.0.2",
"description": "Client for the Sigstore TUF repository",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -28,14 +28,14 @@
},
"devDependencies": {
"@sigstore/jest": "^0.0.0",
"@tufjs/repo-mock": "^3.0.1",
"@tufjs/repo-mock": "^4.0.1",
"@types/make-fetch-happen": "^10.0.4"
},
"dependencies": {
"@sigstore/protobuf-specs": "^0.4.1",
"tuf-js": "^3.0.1"
"@sigstore/protobuf-specs": "^0.5.0",
"tuf-js": "^4.1.0"
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
"node": "^20.17.0 || >=22.9.0"
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long