Add initialize-email-theme, initialize-account-theme and copy-keycloak-resources-to-public to commands that can be delegated to a custom handler
This commit is contained in:
parent
9de2ed9eaf
commit
5045c5e8bf
@ -1,9 +1,15 @@
|
|||||||
import { copyKeycloakResourcesToPublic } from "./shared/copyKeycloakResourcesToPublic";
|
import { copyKeycloakResourcesToPublic } from "./shared/copyKeycloakResourcesToPublic";
|
||||||
import type { BuildContext } from "./shared/buildContext";
|
import type { BuildContext } from "./shared/buildContext";
|
||||||
|
import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate";
|
||||||
|
|
||||||
export async function command(params: { buildContext: BuildContext }) {
|
export async function command(params: { buildContext: BuildContext }) {
|
||||||
const { buildContext } = params;
|
const { buildContext } = params;
|
||||||
|
|
||||||
|
maybeDelegateCommandToCustomHandler({
|
||||||
|
commandName: "copy-keycloak-resources-to-public",
|
||||||
|
buildContext
|
||||||
|
});
|
||||||
|
|
||||||
copyKeycloakResourcesToPublic({
|
copyKeycloakResourcesToPublic({
|
||||||
buildContext
|
buildContext
|
||||||
});
|
});
|
||||||
|
@ -6,10 +6,16 @@ import { join as pathJoin, relative as pathRelative } from "path";
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { updateAccountThemeImplementationInConfig } from "./updateAccountThemeImplementationInConfig";
|
import { updateAccountThemeImplementationInConfig } from "./updateAccountThemeImplementationInConfig";
|
||||||
import { command as updateKcGenCommand } from "../update-kc-gen";
|
import { command as updateKcGenCommand } from "../update-kc-gen";
|
||||||
|
import { maybeDelegateCommandToCustomHandler } from "../shared/customHandler_delegate";
|
||||||
|
|
||||||
export async function command(params: { buildContext: BuildContext }) {
|
export async function command(params: { buildContext: BuildContext }) {
|
||||||
const { buildContext } = params;
|
const { buildContext } = params;
|
||||||
|
|
||||||
|
maybeDelegateCommandToCustomHandler({
|
||||||
|
commandName: "initialize-account-theme",
|
||||||
|
buildContext
|
||||||
|
});
|
||||||
|
|
||||||
const accountThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "account");
|
const accountThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "account");
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -4,10 +4,16 @@ import { promptKeycloakVersion } from "./shared/promptKeycloakVersion";
|
|||||||
import type { BuildContext } from "./shared/buildContext";
|
import type { BuildContext } from "./shared/buildContext";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { downloadAndExtractArchive } from "./tools/downloadAndExtractArchive";
|
import { downloadAndExtractArchive } from "./tools/downloadAndExtractArchive";
|
||||||
|
import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate";
|
||||||
|
|
||||||
export async function command(params: { buildContext: BuildContext }) {
|
export async function command(params: { buildContext: BuildContext }) {
|
||||||
const { buildContext } = params;
|
const { buildContext } = params;
|
||||||
|
|
||||||
|
maybeDelegateCommandToCustomHandler({
|
||||||
|
commandName: "initialize-email-theme",
|
||||||
|
buildContext
|
||||||
|
});
|
||||||
|
|
||||||
const emailThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "email");
|
const emailThemeSrcDirPath = pathJoin(buildContext.themeSrcDirPath, "email");
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -6,7 +6,13 @@ export const BIN_NAME = "_keycloakify-custom-handler";
|
|||||||
|
|
||||||
export const NOT_IMPLEMENTED_EXIT_CODE = 78;
|
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";
|
export type ApiVersion = "v1";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user