keycloakify 10.0.0-rc.64 → 10.0.0-rc.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/account/KcContext/KcContext.d.ts +1 -0
- package/account/KcContext/KcContext.js.map +1 -1
- package/account/KcContext/kcContextMocks.js +2 -1
- package/account/KcContext/kcContextMocks.js.map +1 -1
- package/account/pages/Totp.js +2 -7
- package/account/pages/Totp.js.map +1 -1
- package/bin/193.index.js +0 -501
- package/bin/246.index.js +371 -75118
- package/bin/363.index.js +36 -665
- package/bin/453.index.js +603 -23
- package/bin/{890.index.js → 456.index.js} +1831 -3
- package/bin/490.index.js +75195 -0
- package/bin/526.index.js +311 -166
- package/bin/538.index.js +1 -509
- package/bin/{240.index.js → 751.index.js} +306 -322
- package/bin/772.index.js +1 -1
- package/bin/837.index.js +787 -0
- package/bin/932.index.js +1 -574
- package/bin/97.index.js +594 -14
- package/bin/main.js +8 -8
- package/bin/shared/buildContext.d.ts +16 -0
- package/bin/shared/constants.d.ts +1 -1
- package/bin/shared/constants.js +1 -1
- package/bin/shared/constants.js.map +1 -1
- package/package.json +5 -9
- package/src/account/KcContext/KcContext.ts +1 -0
- package/src/account/KcContext/kcContextMocks.ts +2 -1
- package/src/account/pages/Totp.tsx +1 -7
- package/src/bin/add-story.ts +1 -6
- package/src/bin/eject-page.ts +7 -8
- package/src/bin/initialize-email-theme.ts +1 -6
- package/src/bin/keycloakify/buildJars/buildJars.ts +23 -49
- package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +8 -6
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +15 -20
- package/src/bin/keycloakify/keycloakify.ts +6 -8
- package/src/bin/shared/buildContext.ts +434 -42
- package/src/bin/shared/constants.ts +2 -1
- package/src/bin/shared/downloadKeycloakDefaultTheme.ts +135 -108
- package/src/bin/shared/generateKcGenTs.ts +2 -6
- package/src/bin/start-keycloak/keycloakifyBuild.ts +4 -4
- package/src/bin/start-keycloak/start-keycloak.ts +40 -83
- package/src/vite-plugin/vite-plugin.ts +5 -4
- package/vite-plugin/index.js +410 -187
- package/bin/480.index.js +0 -466
- package/bin/818.index.js +0 -1802
- package/bin/827.index.js +0 -1094
- package/src/bin/shared/getImplementedThemeTypes.ts +0 -23
- package/src/bin/shared/getJarFileBasename.ts +0 -11
- package/src/bin/shared/getThemeSrcDirPath.ts +0 -62
@@ -1,23 +0,0 @@
|
|
1
|
-
import { join as pathJoin } from "path";
|
2
|
-
import { objectFromEntries } from "tsafe/objectFromEntries";
|
3
|
-
import * as fs from "fs";
|
4
|
-
import { type ThemeType } from "./constants";
|
5
|
-
import { getThemeSrcDirPath } from "./getThemeSrcDirPath";
|
6
|
-
|
7
|
-
export function getImplementedThemeTypes(params: { projectDirPath: string }) {
|
8
|
-
const { projectDirPath } = params;
|
9
|
-
|
10
|
-
const { themeSrcDirPath } = getThemeSrcDirPath({
|
11
|
-
projectDirPath
|
12
|
-
});
|
13
|
-
|
14
|
-
const implementedThemeTypes: Readonly<Record<ThemeType | "email", boolean>> =
|
15
|
-
objectFromEntries(
|
16
|
-
(["login", "account", "email"] as const).map(themeType => [
|
17
|
-
themeType,
|
18
|
-
fs.existsSync(pathJoin(themeSrcDirPath, themeType))
|
19
|
-
])
|
20
|
-
);
|
21
|
-
|
22
|
-
return { implementedThemeTypes };
|
23
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { KeycloakVersionRange } from "./KeycloakVersionRange";
|
2
|
-
|
3
|
-
export function getJarFileBasename(params: {
|
4
|
-
keycloakVersionRange: KeycloakVersionRange;
|
5
|
-
}) {
|
6
|
-
const { keycloakVersionRange } = params;
|
7
|
-
|
8
|
-
const jarFileBasename = `keycloak-theme-for-kc-${keycloakVersionRange}.jar`;
|
9
|
-
|
10
|
-
return { jarFileBasename };
|
11
|
-
}
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import * as fs from "fs";
|
2
|
-
import { exclude } from "tsafe";
|
3
|
-
import { crawl } from "../tools/crawl";
|
4
|
-
import { join as pathJoin } from "path";
|
5
|
-
import { themeTypes } from "./constants";
|
6
|
-
import chalk from "chalk";
|
7
|
-
|
8
|
-
let cache: { projectDirPath: string; themeSrcDirPath: string } | undefined = undefined;
|
9
|
-
|
10
|
-
/** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
|
11
|
-
export function getThemeSrcDirPath(params: { projectDirPath: string }) {
|
12
|
-
const { projectDirPath } = params;
|
13
|
-
|
14
|
-
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
15
|
-
const { themeSrcDirPath } = cache;
|
16
|
-
return { themeSrcDirPath };
|
17
|
-
}
|
18
|
-
|
19
|
-
cache = undefined;
|
20
|
-
|
21
|
-
const { themeSrcDirPath } = (() => {
|
22
|
-
const srcDirPath = pathJoin(projectDirPath, "src");
|
23
|
-
|
24
|
-
const themeSrcDirPath: string | undefined = crawl({
|
25
|
-
dirPath: srcDirPath,
|
26
|
-
returnedPathsType: "relative to dirPath"
|
27
|
-
})
|
28
|
-
.map(fileRelativePath => {
|
29
|
-
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
30
|
-
const split = fileRelativePath.split(themeSrcDirBasename);
|
31
|
-
if (split.length === 2) {
|
32
|
-
return pathJoin(srcDirPath, split[0] + themeSrcDirBasename);
|
33
|
-
}
|
34
|
-
}
|
35
|
-
return undefined;
|
36
|
-
})
|
37
|
-
.filter(exclude(undefined))[0];
|
38
|
-
|
39
|
-
if (themeSrcDirPath !== undefined) {
|
40
|
-
return { themeSrcDirPath };
|
41
|
-
}
|
42
|
-
|
43
|
-
for (const themeType of [...themeTypes, "email"]) {
|
44
|
-
if (!fs.existsSync(pathJoin(srcDirPath, themeType))) {
|
45
|
-
continue;
|
46
|
-
}
|
47
|
-
return { themeSrcDirPath: srcDirPath };
|
48
|
-
}
|
49
|
-
|
50
|
-
console.log(
|
51
|
-
chalk.red("Can't locate your theme source directory. It should be either: ")
|
52
|
-
);
|
53
|
-
|
54
|
-
process.exit(-1);
|
55
|
-
})();
|
56
|
-
|
57
|
-
cache = { projectDirPath, themeSrcDirPath };
|
58
|
-
|
59
|
-
return { themeSrcDirPath };
|
60
|
-
}
|
61
|
-
|
62
|
-
const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
|