The admin theme does not support traditional eject

This commit is contained in:
Joseph Garrone 2024-11-17 03:35:01 +01:00
parent c423e4cacc
commit c03623875a
2 changed files with 15 additions and 5 deletions

View File

@ -66,11 +66,18 @@ export async function command(params: { buildContext: BuildContext }) {
return value; return value;
})(); })();
if (themeType === "admin") {
console.log(
"Use `npx keycloakify eject-file` command instead, see documentation"
);
process.exit(-1);
}
if ( if (
themeType === "admin" || themeType === "account" &&
(themeType === "account" && (assert(buildContext.implementedThemeTypes.account.isImplemented),
(assert(buildContext.implementedThemeTypes.account.isImplemented), buildContext.implementedThemeTypes.account.type === "Single-Page")
buildContext.implementedThemeTypes.account.type === "Single-Page"))
) { ) {
const srcDirPath = pathJoin( const srcDirPath = pathJoin(
pathDirname(buildContext.packageJsonFilePath), pathDirname(buildContext.packageJsonFilePath),

View File

@ -246,7 +246,10 @@ program
file: string; file: string;
}>({ }>({
name: "eject-file", name: "eject-file",
description: "Take ownership over a given file" description: [
"WARNING: Not usable yet, will be used for future features",
"Take ownership over a given file"
].join(" ")
}) })
.option({ .option({
key: "file", key: "file",