1+ import type { Lifecycle , OpenVulns , SeverityLevel , Steward , StewardshipStatus } from './types'
2+
13export interface MockPackageListItem {
24 purl : string
35 name : string
46 ecosystem : string
57 health : number
68 impact : number
7- lifecycle : 'active' | 'stable' | 'declining' | 'abandoned'
9+ lifecycle : Lifecycle
810 maintainerBusFactor : number
9- openVulns : { low : number ; medium : number ; high : number ; critical : number }
10- stewardship : string
11- steward : null
11+ openVulns : OpenVulns
12+ stewardship : StewardshipStatus | null
13+ stewards : Steward [ ] | null
1214}
1315
1416export interface MockPackageDetail {
@@ -30,19 +32,19 @@ export interface MockPackageDetail {
3032 transitiveReach : string
3133 }
3234 riskSignals : {
33- lifecycle : string
35+ lifecycle : Lifecycle
3436 maintainerBusFactor : number
3537 lastRelease : string
3638 hasSecurityFile : null
3739 openSSFScorecard : number
3840 }
3941 }
40- assessment : Record < string , never >
42+ assessment : Record < string , unknown >
4143 security : {
4244 securityContacts : null
4345 advisories : Array < {
4446 osvId : string
45- severity : 'critical' | 'high' | 'medium' | 'low'
47+ severity : SeverityLevel
4648 resolution : null
4749 } >
4850 cvd : {
@@ -56,7 +58,12 @@ export interface MockPackageDetail {
5658 repositoryMapping : { declaredRepo : string ; mappingConfidence : number ; lastCommitAt : string }
5759 supplyChainIntegrity : { buildProvenance : null ; signedReleases : null }
5860 }
59- history : Record < string , never >
61+ stewardship : {
62+ status : StewardshipStatus
63+ stewards : Steward [ ] | null
64+ lastActivityAt : string | null
65+ }
66+ history : Record < string , unknown >
6067}
6168
6269export const MOCK_PACKAGES : MockPackageListItem [ ] = [
@@ -70,7 +77,7 @@ export const MOCK_PACKAGES: MockPackageListItem[] = [
7077 maintainerBusFactor : 1 ,
7178 openVulns : { low : 0 , medium : 0 , high : 1 , critical : 0 } ,
7279 stewardship : 'unassigned' ,
73- steward : null ,
80+ stewards : null ,
7481 } ,
7582 {
7683 purl : 'pkg:maven/org.apache.commons/commons-lang3@3.12.0' ,
@@ -82,7 +89,7 @@ export const MOCK_PACKAGES: MockPackageListItem[] = [
8289 maintainerBusFactor : 3 ,
8390 openVulns : { low : 0 , medium : 0 , high : 0 , critical : 0 } ,
8491 stewardship : 'unassigned' ,
85- steward : null ,
92+ stewards : null ,
8693 } ,
8794 {
8895 purl : 'pkg:npm/minimist@1.2.6' ,
@@ -94,7 +101,7 @@ export const MOCK_PACKAGES: MockPackageListItem[] = [
94101 maintainerBusFactor : 1 ,
95102 openVulns : { low : 0 , medium : 1 , high : 0 , critical : 1 } ,
96103 stewardship : 'unassigned' ,
97- steward : null ,
104+ stewards : null ,
98105 } ,
99106]
100107
@@ -144,6 +151,7 @@ export const MOCK_DETAILS: Record<string, MockPackageDetail> = {
144151 } ,
145152 supplyChainIntegrity : { buildProvenance : null , signedReleases : null } ,
146153 } ,
154+ stewardship : { status : 'unassigned' , stewards : null , lastActivityAt : null } ,
147155 history : { } ,
148156 } ,
149157 'pkg:maven/org.apache.commons/commons-lang3@3.12.0' : {
@@ -191,6 +199,7 @@ export const MOCK_DETAILS: Record<string, MockPackageDetail> = {
191199 } ,
192200 supplyChainIntegrity : { buildProvenance : null , signedReleases : null } ,
193201 } ,
202+ stewardship : { status : 'unassigned' , stewards : null , lastActivityAt : null } ,
194203 history : { } ,
195204 } ,
196205 'pkg:npm/minimist@1.2.6' : {
@@ -241,6 +250,7 @@ export const MOCK_DETAILS: Record<string, MockPackageDetail> = {
241250 } ,
242251 supplyChainIntegrity : { buildProvenance : null , signedReleases : null } ,
243252 } ,
253+ stewardship : { status : 'unassigned' , stewards : null , lastActivityAt : null } ,
244254 history : { } ,
245255 } ,
246256}
0 commit comments