Fix build
This commit is contained in:
@ -30,13 +30,7 @@ export function createGetKcContext<KcContextExtension extends { pageId: string }
|
|||||||
if (mockPageId !== undefined && realKcContext === undefined) {
|
if (mockPageId !== undefined && realKcContext === undefined) {
|
||||||
//TODO maybe trow if no mock fo custom page
|
//TODO maybe trow if no mock fo custom page
|
||||||
|
|
||||||
console.log(
|
console.log(`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`, "background: red; color: yellow; font-size: medium");
|
||||||
[
|
|
||||||
`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`,
|
|
||||||
`If assets are missing make sure you have built your Keycloak theme at least once.`
|
|
||||||
].join(" "),
|
|
||||||
"background: red; color: yellow; font-size: medium"
|
|
||||||
);
|
|
||||||
|
|
||||||
const kcContextDefaultMock = kcContextMocks.find(({ pageId }) => pageId === mockPageId);
|
const kcContextDefaultMock = kcContextMocks.find(({ pageId }) => pageId === mockPageId);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import * as fs from "fs";
|
|||||||
const keycloakDirInPublicDir = pathJoin(process.env["PUBLIC_DIR_PATH"] || pathJoin(projectDirPath, "public"), basenameOfKeycloakDirInPublicDir);
|
const keycloakDirInPublicDir = pathJoin(process.env["PUBLIC_DIR_PATH"] || pathJoin(projectDirPath, "public"), basenameOfKeycloakDirInPublicDir);
|
||||||
|
|
||||||
if (fs.existsSync(keycloakDirInPublicDir)) {
|
if (fs.existsSync(keycloakDirInPublicDir)) {
|
||||||
console.log(`${pathRelative(projectDirPath, keycloakDirInPublicDir)} already exists. Aborting.`);
|
console.log(`${pathRelative(projectDirPath, keycloakDirInPublicDir)} already exists.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,4 +43,6 @@ import * as fs from "fs";
|
|||||||
);
|
);
|
||||||
|
|
||||||
fs.writeFileSync(pathJoin(keycloakDirInPublicDir, ".gitignore"), Buffer.from("*", "utf8"));
|
fs.writeFileSync(pathJoin(keycloakDirInPublicDir, ".gitignore"), Buffer.from("*", "utf8"));
|
||||||
|
|
||||||
|
console.log(`${pathRelative(projectDirPath, keycloakDirInPublicDir)} directory created.`);
|
||||||
})();
|
})();
|
||||||
|
@ -33,13 +33,7 @@ export function createGetKcContext<KcContextExtension extends { pageId: string }
|
|||||||
if (mockPageId !== undefined && realKcContext === undefined) {
|
if (mockPageId !== undefined && realKcContext === undefined) {
|
||||||
//TODO maybe trow if no mock fo custom page
|
//TODO maybe trow if no mock fo custom page
|
||||||
|
|
||||||
console.log(
|
console.log(`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`, "background: red; color: yellow; font-size: medium");
|
||||||
[
|
|
||||||
`%cKeycloakify: ${symToStr({ mockPageId })} set to ${mockPageId}.`,
|
|
||||||
`If assets are missing make sure you have built your Keycloak theme at least once.`
|
|
||||||
].join(" "),
|
|
||||||
"background: red; color: yellow; font-size: medium"
|
|
||||||
);
|
|
||||||
|
|
||||||
const kcContextDefaultMock = kcContextMocks.find(({ pageId }) => pageId === mockPageId);
|
const kcContextDefaultMock = kcContextMocks.find(({ pageId }) => pageId === mockPageId);
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ describe("Sample Project", () => {
|
|||||||
|
|
||||||
const destDirPath = pathJoin(
|
const destDirPath = pathJoin(
|
||||||
readBuildOptions({
|
readBuildOptions({
|
||||||
"isExternalAssetsCliParamProvided": false,
|
"processArgv": ["--silent"],
|
||||||
"isSilent": true,
|
|
||||||
"projectDirPath": process.cwd()
|
"projectDirPath": process.cwd()
|
||||||
}).keycloakifyBuildDirPath,
|
}).keycloakifyBuildDirPath,
|
||||||
"src",
|
"src",
|
||||||
@ -62,7 +61,7 @@ describe("Sample Project", () => {
|
|||||||
"resources",
|
"resources",
|
||||||
"theme"
|
"theme"
|
||||||
);
|
);
|
||||||
await downloadBuiltinKeycloakTheme({ destDirPath, keycloakVersion: "11.0.3", isSilent: false });
|
await downloadBuiltinKeycloakTheme({ destDirPath, keycloakVersion: "11.0.3", "isSilent": false });
|
||||||
},
|
},
|
||||||
{ timeout: 90000 }
|
{ timeout: 90000 }
|
||||||
);
|
);
|
||||||
@ -80,8 +79,7 @@ describe("Sample Project", () => {
|
|||||||
|
|
||||||
const destDirPath = pathJoin(
|
const destDirPath = pathJoin(
|
||||||
readBuildOptions({
|
readBuildOptions({
|
||||||
"isExternalAssetsCliParamProvided": false,
|
"processArgv": ["--silent"],
|
||||||
"isSilent": true,
|
|
||||||
"projectDirPath": process.cwd()
|
"projectDirPath": process.cwd()
|
||||||
}).keycloakifyBuildDirPath,
|
}).keycloakifyBuildDirPath,
|
||||||
"src",
|
"src",
|
||||||
@ -89,7 +87,7 @@ describe("Sample Project", () => {
|
|||||||
"resources",
|
"resources",
|
||||||
"theme"
|
"theme"
|
||||||
);
|
);
|
||||||
await downloadBuiltinKeycloakTheme({ destDirPath, keycloakVersion: "11.0.3", isSilent: false });
|
await downloadBuiltinKeycloakTheme({ destDirPath, "keycloakVersion": "11.0.3", "isSilent": false });
|
||||||
},
|
},
|
||||||
{ timeout: 90000 }
|
{ timeout: 90000 }
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user