keycloakify 10.0.0-rc.65 → 10.0.0-rc.67
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/bin/193.index.js +51 -0
- package/bin/246.index.js +371 -75118
- package/bin/363.index.js +64 -165
- 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 +294 -173
- package/bin/538.index.js +1 -509
- package/bin/{203.index.js → 751.index.js} +306 -305
- package/bin/772.index.js +1 -1
- package/bin/{190.index.js → 837.index.js} +259 -35
- package/bin/932.index.js +1 -578
- package/bin/97.index.js +594 -14
- package/bin/main.js +8 -8
- package/bin/shared/KeycloakVersionRange.d.ts +5 -0
- package/bin/shared/KeycloakVersionRange.js.map +1 -0
- package/bin/shared/buildContext.d.ts +16 -0
- package/bin/shared/buildContext.js.map +1 -0
- package/bin/shared/constants.d.ts +1 -1
- package/bin/shared/constants.js.map +1 -1
- package/bin/shared/copyKeycloakResourcesToPublic.d.ts +8 -0
- package/bin/shared/copyKeycloakResourcesToPublic.js.map +1 -0
- package/bin/shared/downloadKeycloakDefaultTheme.d.ts +10 -0
- package/bin/shared/downloadKeycloakDefaultTheme.js.map +1 -0
- package/bin/shared/downloadKeycloakStaticResources.d.ts +9 -0
- package/bin/shared/downloadKeycloakStaticResources.js.map +1 -0
- package/bin/shared/generateKcGenTs.d.ts +12 -0
- package/bin/shared/generateKcGenTs.js.map +1 -0
- package/bin/shared/metaInfKeycloakThemes.d.ts +13 -0
- package/bin/shared/metaInfKeycloakThemes.js.map +1 -0
- package/bin/shared/promptKeycloakVersion.d.ts +7 -0
- package/bin/shared/promptKeycloakVersion.js.map +1 -0
- package/package.json +21 -12
- 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/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/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 +341 -117
- package/bin/480.index.js +0 -466
- package/bin/818.index.js +0 -1802
- package/bin/827.index.js +0 -1094
- package/bin/shared/constants.js +0 -59
- package/src/bin/shared/getImplementedThemeTypes.ts +0 -38
- package/src/bin/shared/getJarFileBasename.ts +0 -11
- package/src/bin/shared/getThemeSrcDirPath.ts +0 -62
package/bin/shared/constants.js
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
export const nameOfTheLocalizationRealmOverridesUserProfileProperty = "__localizationRealmOverridesUserProfile";
|
2
|
-
export const keycloak_resources = "keycloak-resources";
|
3
|
-
export const resources_common = "resources-common";
|
4
|
-
export const lastKeycloakVersionWithAccountV1 = "21.1.2";
|
5
|
-
export const basenameOfTheKeycloakifyResourcesDir = "build";
|
6
|
-
export const themeTypes = ["login", "account"];
|
7
|
-
export const accountV1ThemeName = "account-v1";
|
8
|
-
export const vitePluginSubScriptEnvNames = {
|
9
|
-
runPostBuildScript: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT",
|
10
|
-
resolveViteConfig: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG"
|
11
|
-
};
|
12
|
-
export const onlyBuildJarFileBasenameEnvName = "KEYCLOAKIFY_ONLY_BUILD_JAR_FILE_BASENAME";
|
13
|
-
export const loginThemePageIds = [
|
14
|
-
"login.ftl",
|
15
|
-
"login-username.ftl",
|
16
|
-
"login-password.ftl",
|
17
|
-
"webauthn-authenticate.ftl",
|
18
|
-
"webauthn-register.ftl",
|
19
|
-
"register.ftl",
|
20
|
-
"info.ftl",
|
21
|
-
"error.ftl",
|
22
|
-
"login-reset-password.ftl",
|
23
|
-
"login-verify-email.ftl",
|
24
|
-
"terms.ftl",
|
25
|
-
"login-oauth2-device-verify-user-code.ftl",
|
26
|
-
"login-oauth-grant.ftl",
|
27
|
-
"login-otp.ftl",
|
28
|
-
"login-update-profile.ftl",
|
29
|
-
"login-update-password.ftl",
|
30
|
-
"login-idp-link-confirm.ftl",
|
31
|
-
"login-idp-link-email.ftl",
|
32
|
-
"login-page-expired.ftl",
|
33
|
-
"login-config-totp.ftl",
|
34
|
-
"logout-confirm.ftl",
|
35
|
-
"idp-review-user-profile.ftl",
|
36
|
-
"update-email.ftl",
|
37
|
-
"select-authenticator.ftl",
|
38
|
-
"saml-post-form.ftl",
|
39
|
-
"delete-credential.ftl",
|
40
|
-
"code.ftl",
|
41
|
-
"delete-account-confirm.ftl",
|
42
|
-
"frontchannel-logout.ftl",
|
43
|
-
"login-recovery-authn-code-config.ftl",
|
44
|
-
"login-recovery-authn-code-input.ftl",
|
45
|
-
"login-reset-otp.ftl",
|
46
|
-
"login-x509-info.ftl",
|
47
|
-
"webauthn-error.ftl"
|
48
|
-
];
|
49
|
-
export const accountThemePageIds = [
|
50
|
-
"password.ftl",
|
51
|
-
"account.ftl",
|
52
|
-
"sessions.ftl",
|
53
|
-
"totp.ftl",
|
54
|
-
"applications.ftl",
|
55
|
-
"log.ftl",
|
56
|
-
"federatedIdentity.ftl"
|
57
|
-
];
|
58
|
-
export const containerName = "keycloak-keycloakify";
|
59
|
-
//# sourceMappingURL=constants.js.map
|
@@ -1,38 +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
|
-
type ImplementedThemeTypes = Readonly<Record<ThemeType | "email", boolean>>;
|
8
|
-
|
9
|
-
let cache:
|
10
|
-
| { projectDirPath: string; implementedThemeTypes: ImplementedThemeTypes }
|
11
|
-
| undefined;
|
12
|
-
|
13
|
-
export function getImplementedThemeTypes(params: { projectDirPath: string }) {
|
14
|
-
const { projectDirPath } = params;
|
15
|
-
|
16
|
-
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
17
|
-
const { implementedThemeTypes } = cache;
|
18
|
-
return { implementedThemeTypes };
|
19
|
-
}
|
20
|
-
|
21
|
-
cache = undefined;
|
22
|
-
|
23
|
-
const { themeSrcDirPath } = getThemeSrcDirPath({
|
24
|
-
projectDirPath
|
25
|
-
});
|
26
|
-
|
27
|
-
const implementedThemeTypes: Readonly<Record<ThemeType | "email", boolean>> =
|
28
|
-
objectFromEntries(
|
29
|
-
(["login", "account", "email"] as const).map(themeType => [
|
30
|
-
themeType,
|
31
|
-
fs.existsSync(pathJoin(themeSrcDirPath, themeType))
|
32
|
-
])
|
33
|
-
);
|
34
|
-
|
35
|
-
cache = { projectDirPath, implementedThemeTypes };
|
36
|
-
|
37
|
-
return { implementedThemeTypes };
|
38
|
-
}
|
@@ -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"];
|