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
+2
View File
@@ -17,6 +17,8 @@ limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTPError = void 0;
class HTTPError extends Error {
statusCode;
location;
constructor({ status, message, location, }) {
super(`(${status}) ${message}`);
this.statusCode = status;
+2 -2
View File
@@ -19,15 +19,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const promise_retry_1 = require("@gar/promise-retry");
const http2_1 = require("http2");
const make_fetch_happen_1 = __importDefault(require("make-fetch-happen"));
const proc_log_1 = require("proc-log");
const promise_retry_1 = __importDefault(require("promise-retry"));
const util_1 = require("../util");
const error_1 = require("./error");
const { HTTP2_HEADER_LOCATION, HTTP2_HEADER_CONTENT_TYPE, HTTP2_HEADER_USER_AGENT, HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_TOO_MANY_REQUESTS, HTTP_STATUS_REQUEST_TIMEOUT, } = http2_1.constants;
async function fetchWithRetry(url, options) {
return (0, promise_retry_1.default)(async (retry, attemptNum) => {
return (0, promise_retry_1.promiseRetry)(async (retry, attemptNum) => {
const method = options.method || 'POST';
const headers = {
[HTTP2_HEADER_USER_AGENT]: util_1.ua.getUserAgent(),
+1
View File
@@ -21,6 +21,7 @@ const fetch_1 = require("./fetch");
* Fulcio API client.
*/
class Fulcio {
options;
constructor(options) {
this.options = options;
}
+1
View File
@@ -21,6 +21,7 @@ const fetch_1 = require("./fetch");
* Rekor API client.
*/
class Rekor {
options;
constructor(options) {
this.options = options;
}
+7 -1
View File
@@ -18,12 +18,18 @@ limitations under the License.
*/
const fetch_1 = require("./fetch");
class TimestampAuthority {
options;
constructor(options) {
this.options = options;
}
async createTimestamp(request) {
const { baseURL, timeout, retry } = this.options;
const url = `${baseURL}/api/v1/timestamp`;
// Account for the fact that the TSA URL may already include the full
// path if the client was initalized from a `SigningConfig` service entry
// (which always uses the full URL).
const url = new URL(baseURL).pathname === '/'
? `${baseURL}/api/v1/timestamp`
: baseURL;
const response = await (0, fetch_1.fetchWithRetry)(url, {
headers: {
'Content-Type': 'application/json',