Rename extraThemeNames to themeVariantNames

This commit is contained in:
garronej 2023-09-04 00:53:57 +02:00
parent 5af8d67b62
commit 37dbd49589
5 changed files with 10 additions and 10 deletions

View File

@ -166,7 +166,7 @@ There are very few breaking changes in this major version. [Check them out](http
## 7.12
- You can now pack multiple themes variant in a single `.jar` bundle. In vanilla Keycloak themes you have the ability to extend a base theme.
There is now an idiomatic way of achieving the same result. [Learn more](https://docs.keycloakify.dev/build-options#keycloakify.extrathemenames).
There is now an idiomatic way of achieving the same result. [Learn more](https://docs.keycloakify.dev/build-options#keycloakify.themeVariantNames).
## 7.9

View File

@ -9,7 +9,7 @@ export type BuildOptions = {
isSilent: boolean;
themeVersion: string;
themeName: string;
extraThemeNames: string[];
themeVariantNames: string[];
extraThemeProperties: string[] | undefined;
groupId: string;
artifactId: string;
@ -48,7 +48,7 @@ export function readBuildOptions(params: { reactAppRootDirPath: string; processA
artifactId,
doCreateJar,
loginThemeResourcesFromKeycloakVersion,
extraThemeNames = []
themeVariantNames = []
} = keycloakify ?? {};
const themeName =
@ -61,7 +61,7 @@ export function readBuildOptions(params: { reactAppRootDirPath: string; processA
return {
reactAppRootDirPath,
themeName,
extraThemeNames,
themeVariantNames,
"doCreateJar": doCreateJar ?? true,
"artifactId": process.env.KEYCLOAKIFY_ARTIFACT_ID ?? artifactId ?? `${themeName}-keycloak-theme`,
"groupId": (() => {

View File

@ -8,7 +8,7 @@ import { bringInAccountV1, accountV1 } from "./bringInAccountV1";
export type BuildOptionsLike = {
themeName: string;
extraThemeNames: string[];
themeVariantNames: string[];
groupId: string;
artifactId: string;
themeVersion: string;
@ -178,7 +178,7 @@ export async function generateJavaStackFiles(params: {
"types": ["account"]
}
]),
...[buildOptions.themeName, ...buildOptions.extraThemeNames]
...[buildOptions.themeName, ...buildOptions.themeVariantNames]
.map(themeName => [
{
"name": themeName,
@ -190,7 +190,7 @@ export async function generateJavaStackFiles(params: {
? []
: [
{
"name": `${themeName}_retrocompatible`,
"name": `${themeName}_retrocompat`,
"types": ["account"]
}
])

View File

@ -26,7 +26,7 @@ export async function main() {
const { themeSrcDirPath } = getThemeSrcDirPath({ reactAppRootDirPath });
for (const themeName of [buildOptions.themeName, ...buildOptions.extraThemeNames]) {
for (const themeName of [buildOptions.themeName, ...buildOptions.themeVariantNames]) {
await generateTheme({
themeSrcDirPath,
"keycloakifySrcDirPath": pathJoin(keycloakifyDirPath, "src"),

View File

@ -18,7 +18,7 @@ export type ParsedPackageJson = {
reactAppBuildDirPath?: string;
keycloakifyBuildDirPath?: string;
themeName?: string;
extraThemeNames?: string[];
themeVariantNames?: string[];
};
};
@ -37,7 +37,7 @@ export const zParsedPackageJson = z.object({
"reactAppBuildDirPath": z.string().optional(),
"keycloakifyBuildDirPath": z.string().optional(),
"themeName": z.string().optional(),
"extraThemeNames": z.array(z.string()).optional()
"themeVariantNames": z.array(z.string()).optional()
})
.optional()
});