Tidy up config and settings types

This commit is contained in:
Neil MacDougall 2025-09-06 17:25:50 +01:00
parent f367e9141e
commit 30dd2a46ca
1 changed files with 11 additions and 16 deletions

View File

@ -30,6 +30,15 @@ export type Configuration = {
distribution: Distribution;
};
/**
* Settings configuration that can be supplied in the dynamic content package
*/
export type SettingsInfo = {
releaseNotesUrl: string; // URL format to use when generating release note links for new releases
suseExtensions: string[]; // Names of extra SUSE UI extensions on top of the list built-in
debugVersion?: string;
};
/**
* Common context passed through various functions
*/
@ -40,13 +49,14 @@ export type Context = {
logger: Logger,
isAdmin: boolean,
config: Configuration,
settings: SettingsInfo,
};
/**
* Version information
*/
export type VersionInfo = {
version: SemVer;
version: SemVer | null;
isPrime: boolean;
};
@ -57,21 +67,6 @@ export type ReleaseInfo = {
name: string;
};
/**
* Settings configuration that can be supplied in the dynamic content package
*/
export type SettingsInfo = {
releaseNotesUrl: string; // URL format to use when generating release note links for new releases
suseExtensions: string[]; // Names of extra SUSE UI extensions on top of the list built-in
};
/**
* Context that includes settings
*/
export type ContextWithSettings = Context & {
settings: SettingsInfo,
};
/**
* Information for an upcoming release
*/