Skip to content

Commit 64f9601

Browse files
committed
feat(types): add ProvenanceDetails type
1 parent 4b142f4 commit 64f9601

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

shared/types/npm-registry.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,30 @@ export interface NpmVersionDist {
193193
attestations?: NpmVersionAttestations
194194
}
195195

196+
/**
197+
* Parsed provenance details for display (from attestation bundle SLSA predicate).
198+
* Used by the provenance API and PackageProvenanceSection.
199+
* @public
200+
*/
201+
export interface ProvenanceDetails {
202+
/** Provider ID (e.g. "github", "gitlab") */
203+
provider: string
204+
/** Human-readable provider label (e.g. "GitHub Actions") */
205+
providerLabel: string
206+
/** Link to build run summary (e.g. GitHub Actions run URL) */
207+
buildSummaryUrl?: string
208+
/** Link to source commit in repository */
209+
sourceCommitUrl?: string
210+
/** Source commit SHA (short or full) */
211+
sourceCommitSha?: string
212+
/** Link to workflow/build config file in repo */
213+
buildFileUrl?: string
214+
/** Workflow path (e.g. ".github/workflows/release.yml") */
215+
buildFilePath?: string
216+
/** Link to transparency log entry (e.g. Sigstore search) */
217+
publicLedgerUrl?: string
218+
}
219+
196220
/**
197221
* Download counts API response
198222
* From https://api.npmjs.org/downloads/

0 commit comments

Comments
 (0)