diff options
Diffstat (limited to 'deps/npm/node_modules/sigstore/dist/types/sigstore/index.js')
-rw-r--r-- | deps/npm/node_modules/sigstore/dist/types/sigstore/index.js | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/deps/npm/node_modules/sigstore/dist/types/sigstore/index.js b/deps/npm/node_modules/sigstore/dist/types/sigstore/index.js index df07d6dc9f..55df7e744d 100644 --- a/deps/npm/node_modules/sigstore/dist/types/sigstore/index.js +++ b/deps/npm/node_modules/sigstore/dist/types/sigstore/index.js @@ -14,32 +14,39 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.signingCertificate = exports.bundle = exports.isVerifiableTransparencyLogEntry = exports.isCAVerificationOptions = exports.isBundleWithCertificateChain = exports.isBundleWithVerificationMaterial = exports.envelopeFromJSON = exports.envelopeToJSON = exports.bundleFromJSON = exports.bundleToJSON = exports.TransparencyLogEntry = void 0; +exports.signingCertificate = exports.bundle = exports.isVerifiableTransparencyLogEntry = exports.isCAVerificationOptions = exports.isBundleWithCertificateChain = exports.isBundleWithVerificationMaterial = exports.envelopeFromJSON = exports.envelopeToJSON = exports.bundleFromJSON = exports.bundleToJSON = void 0; +/* +Copyright 2023 The Sigstore Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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 protobuf_specs_1 = require("@sigstore/protobuf-specs"); const util_1 = require("../../util"); const cert_1 = require("../../x509/cert"); const validate_1 = require("./validate"); -const envelope_1 = require("./__generated__/envelope"); -const sigstore_bundle_1 = require("./__generated__/sigstore_bundle"); -const sigstore_common_1 = require("./__generated__/sigstore_common"); +__exportStar(require("@sigstore/protobuf-specs"), exports); __exportStar(require("./serialized"), exports); __exportStar(require("./validate"), exports); -__exportStar(require("./__generated__/envelope"), exports); -__exportStar(require("./__generated__/sigstore_bundle"), exports); -__exportStar(require("./__generated__/sigstore_common"), exports); -var sigstore_rekor_1 = require("./__generated__/sigstore_rekor"); -Object.defineProperty(exports, "TransparencyLogEntry", { enumerable: true, get: function () { return sigstore_rekor_1.TransparencyLogEntry; } }); -__exportStar(require("./__generated__/sigstore_trustroot"), exports); -__exportStar(require("./__generated__/sigstore_verification"), exports); -exports.bundleToJSON = sigstore_bundle_1.Bundle.toJSON; +exports.bundleToJSON = protobuf_specs_1.Bundle.toJSON; // eslint-disable-next-line @typescript-eslint/no-explicit-any const bundleFromJSON = (obj) => { - const bundle = sigstore_bundle_1.Bundle.fromJSON(obj); + const bundle = protobuf_specs_1.Bundle.fromJSON(obj); (0, validate_1.assertValidBundle)(bundle); return bundle; }; exports.bundleFromJSON = bundleFromJSON; -exports.envelopeToJSON = envelope_1.Envelope.toJSON; -exports.envelopeFromJSON = envelope_1.Envelope.fromJSON; +exports.envelopeToJSON = protobuf_specs_1.Envelope.toJSON; +exports.envelopeFromJSON = protobuf_specs_1.Envelope.fromJSON; const BUNDLE_MEDIA_TYPE = 'application/vnd.dev.sigstore.bundle+json;version=0.1'; // Type guard for narrowing a Bundle to a BundleWithVerificationMaterial function isBundleWithVerificationMaterial(bundle) { @@ -80,7 +87,7 @@ exports.bundle = { $case: 'messageSignature', messageSignature: { messageDigest: { - algorithm: sigstore_common_1.HashAlgorithm.SHA2_256, + algorithm: protobuf_specs_1.HashAlgorithm.SHA2_256, digest: digest, }, signature: signature.signature, |