diff --git a/src/bin/copy-keycloak-resources-to-public.ts b/src/bin/copy-keycloak-resources-to-public.ts index ba944068..b48f9d0e 100644 --- a/src/bin/copy-keycloak-resources-to-public.ts +++ b/src/bin/copy-keycloak-resources-to-public.ts @@ -1,9 +1,15 @@ import { copyKeycloakResourcesToPublic } from "./shared/copyKeycloakResourcesToPublic"; import type { BuildContext } from "./shared/buildContext"; +import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate"; export async function command(params: { buildContext: BuildContext }) { const { buildContext } = params; + maybeDelegateCommandToCustomHandler({ + commandName: "copy-keycloak-resources-to-public", + buildContext + }); + copyKeycloakResourcesToPublic({ buildContext }); diff --git a/src/bin/initialize-account-theme/initialize-account-theme.ts b/src/bin/initialize-account-theme/initialize-account-theme.ts index 3caed327..e7ae9223 100644 --- a/src/bin/initialize-account-theme/initialize-account-theme.ts +++ b/src/bin/initialize-account-theme/initialize-account-theme.ts @@ -6,10 +6,16 @@ import { join as pathJoin, relative as pathRelative } from "path"; import * as fs from "fs"; import { updateAccountThemeImplementationInConfig } from "./updateAccountThemeImplementationInConfig"; import { command as updateKcGenCommand } from "../update-kc-gen"; +import { maybeDelegateCommandToCustomHandler } from "../shared/customHandler_delegate"; export async function command(params: { buildContext: BuildContext }) { const { buildContext } = params; + maybeDelegateCommandToCustomHandler({ + commandName: "initialize-account-theme", + buildContext + }); + const accountThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "account"); if ( diff --git a/src/bin/initialize-email-theme.ts b/src/bin/initialize-email-theme.ts index dfa0287c..d5ce0fd8 100644 --- a/src/bin/initialize-email-theme.ts +++ b/src/bin/initialize-email-theme.ts @@ -4,10 +4,16 @@ import { promptKeycloakVersion } from "./shared/promptKeycloakVersion"; import type { BuildContext } from "./shared/buildContext"; import * as fs from "fs"; import { downloadAndExtractArchive } from "./tools/downloadAndExtractArchive"; +import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate"; export async function command(params: { buildContext: BuildContext }) { const { buildContext } = params; + maybeDelegateCommandToCustomHandler({ + commandName: "initialize-email-theme", + buildContext + }); + const emailThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "email"); if ( diff --git a/src/bin/shared/customHandler.ts b/src/bin/shared/customHandler.ts index d858aaa5..7c0b9e1c 100644 --- a/src/bin/shared/customHandler.ts +++ b/src/bin/shared/customHandler.ts @@ -6,7 +6,13 @@ export const BIN_NAME = "_keycloakify-custom-handler"; export const NOT_IMPLEMENTED_EXIT_CODE = 78; -export type CommandName = "update-kc-gen" | "eject-page" | "add-story"; +export type CommandName = + | "update-kc-gen" + | "eject-page" + | "add-story" + | "initialize-account-theme" + | "initialize-email-theme" + | "copy-keycloak-resources-to-public"; export type ApiVersion = "v1";