64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
import { launchReadiness } from './site-config'
|
|
|
|
type PublicLaunchChecklistId =
|
|
| 'windows-download'
|
|
| 'operator-checkout'
|
|
| 'studio-checkout'
|
|
| 'mpl-source'
|
|
| 'open-source-notices'
|
|
|
|
export type PublicLaunchChecklistItem = {
|
|
id: PublicLaunchChecklistId
|
|
label: string
|
|
configured: boolean
|
|
}
|
|
|
|
export type PublicLaunchReadiness = {
|
|
windowsDownloadConfigured: boolean
|
|
operatorCheckoutConfigured: boolean
|
|
studioCheckoutConfigured: boolean
|
|
mplSourceConfigured: boolean
|
|
openSourceRepoConfigured: boolean
|
|
}
|
|
|
|
export function getPublicLaunchChecklist(
|
|
readiness: PublicLaunchReadiness = launchReadiness,
|
|
): PublicLaunchChecklistItem[] {
|
|
return [
|
|
{
|
|
id: 'windows-download',
|
|
label: 'Windows download URL',
|
|
configured: readiness.windowsDownloadConfigured,
|
|
},
|
|
{
|
|
id: 'operator-checkout',
|
|
label: 'Operator checkout',
|
|
configured: readiness.operatorCheckoutConfigured,
|
|
},
|
|
{
|
|
id: 'studio-checkout',
|
|
label: 'Studio checkout',
|
|
configured: readiness.studioCheckoutConfigured,
|
|
},
|
|
{
|
|
id: 'mpl-source',
|
|
label: 'Corresponding-source URL',
|
|
configured: readiness.mplSourceConfigured,
|
|
},
|
|
{
|
|
id: 'open-source-notices',
|
|
label: 'Open-source notices/repository URL',
|
|
configured: readiness.openSourceRepoConfigured,
|
|
},
|
|
]
|
|
}
|
|
|
|
export function getMissingPublicLaunchChecklistItems(
|
|
readiness: PublicLaunchReadiness = launchReadiness,
|
|
): PublicLaunchChecklistItem[] {
|
|
return getPublicLaunchChecklist(readiness).filter((item) => !item.configured)
|
|
}
|
|
|
|
export function isPublicLaunchReady(readiness: PublicLaunchReadiness = launchReadiness): boolean {
|
|
return getMissingPublicLaunchChecklistItems(readiness).length === 0
|
|
}
|