From b0aa0feab5b6bbe255d3af0540bf54f8d927dba6 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sat, 26 Oct 2024 22:06:37 +0200 Subject: [PATCH] up --- .../generateResources/generateResources.ts | 11 +++++++---- .../generateResources/readFieldNameUsage.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/keycloakify/generateResources/generateResources.ts b/src/bin/keycloakify/generateResources/generateResources.ts index d549967a..5fff1408 100644 --- a/src/bin/keycloakify/generateResources/generateResources.ts +++ b/src/bin/keycloakify/generateResources/generateResources.ts @@ -197,10 +197,13 @@ export async function generateResources(params: { buildContext, keycloakifyVersion: readThisNpmPackageVersion(), themeType, - fieldNames: readFieldNameUsage({ - themeSrcDirPath: buildContext.themeSrcDirPath, - themeType - }) + fieldNames: isSpa + ? [] + : (assert(themeType !== "admin"), + readFieldNameUsage({ + themeSrcDirPath: buildContext.themeSrcDirPath, + themeType + })) }); [ diff --git a/src/bin/keycloakify/generateResources/readFieldNameUsage.ts b/src/bin/keycloakify/generateResources/readFieldNameUsage.ts index 7f5b65ee..478c9348 100644 --- a/src/bin/keycloakify/generateResources/readFieldNameUsage.ts +++ b/src/bin/keycloakify/generateResources/readFieldNameUsage.ts @@ -7,7 +7,7 @@ import { getThisCodebaseRootDirPath } from "../../tools/getThisCodebaseRootDirPa /** Assumes the theme type exists */ export function readFieldNameUsage(params: { themeSrcDirPath: string; - themeType: ThemeType; + themeType: Exclude; }): string[] { const { themeSrcDirPath, themeType } = params;