keycloakify 11.7.4 → 11.8.1

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.
Files changed (38) hide show
  1. package/bin/{33.index.js → 226.index.js} +2 -19
  2. package/bin/{911.index.js → 297.index.js} +18918 -11359
  3. package/bin/355.index.js +41 -703
  4. package/bin/363.index.js +115 -93
  5. package/bin/369.index.js +968 -0
  6. package/bin/{288.index.js → 502.index.js} +123 -227
  7. package/bin/656.index.js +111 -0
  8. package/bin/{880.index.js → 712.index.js} +227 -216
  9. package/bin/780.index.js +9 -7
  10. package/bin/932.index.js +965 -0
  11. package/bin/97.index.js +2099 -769
  12. package/bin/main.js +66 -49
  13. package/bin/shared/buildContext.d.ts +11 -3
  14. package/bin/start-keycloak/realmConfig/prepareRealmConfig.d.ts +5 -6
  15. package/bin/start-keycloak/realmConfig/realmConfig.d.ts +6 -2
  16. package/package.json +12 -17
  17. package/src/bin/initialize-account-theme/initialize-account-theme.ts +29 -27
  18. package/src/bin/initialize-email-theme.ts +103 -53
  19. package/src/bin/keycloakify/buildJars/buildJar.ts +45 -20
  20. package/src/bin/keycloakify/generateResources/generateResources.ts +263 -217
  21. package/src/bin/shared/{initializeSpa/addSyncExtensionsToPostinstallScript.ts → addSyncExtensionsToPostinstallScript.ts} +1 -1
  22. package/src/bin/shared/buildContext.ts +69 -24
  23. package/src/bin/shared/{initializeSpa/initializeSpa.ts → initializeSpa.ts} +3 -3
  24. package/src/bin/start-keycloak/realmConfig/prepareRealmConfig.ts +12 -23
  25. package/src/bin/start-keycloak/realmConfig/realmConfig.ts +14 -12
  26. package/src/bin/start-keycloak/start-keycloak.ts +55 -28
  27. package/src/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts +6 -0
  28. package/vite-plugin/index.js +48 -20
  29. package/bin/313.index.js +0 -377
  30. package/bin/678.index.js +0 -7565
  31. package/bin/9.index.js +0 -850
  32. package/bin/947.index.js +0 -1565
  33. package/bin/shared/initializeSpa/index.d.ts +0 -1
  34. package/bin/shared/metaInfKeycloakThemes.d.ts +0 -13
  35. package/src/bin/shared/initializeSpa/index.ts +0 -1
  36. package/src/bin/shared/metaInfKeycloakThemes.ts +0 -40
  37. /package/bin/shared/{initializeSpa/addSyncExtensionsToPostinstallScript.d.ts → addSyncExtensionsToPostinstallScript.d.ts} +0 -0
  38. /package/bin/shared/{initializeSpa/initializeSpa.d.ts → initializeSpa.d.ts} +0 -0
@@ -1 +0,0 @@
1
- export * from "./initializeSpa";
@@ -1,13 +0,0 @@
1
- import type { ThemeType } from "./constants";
2
- export type MetaInfKeycloakTheme = {
3
- themes: {
4
- name: string;
5
- types: (ThemeType | "email")[];
6
- }[];
7
- };
8
- export declare function writeMetaInfKeycloakThemes(params: {
9
- resourcesDirPath: string;
10
- getNewMetaInfKeycloakTheme: (params: {
11
- metaInfKeycloakTheme: MetaInfKeycloakTheme | undefined;
12
- }) => MetaInfKeycloakTheme;
13
- }): void;
@@ -1 +0,0 @@
1
- export * from "./initializeSpa";
@@ -1,40 +0,0 @@
1
- import { join as pathJoin, dirname as pathDirname } from "path";
2
- import type { ThemeType } from "./constants";
3
- import * as fs from "fs";
4
-
5
- export type MetaInfKeycloakTheme = {
6
- themes: { name: string; types: (ThemeType | "email")[] }[];
7
- };
8
-
9
- export function writeMetaInfKeycloakThemes(params: {
10
- resourcesDirPath: string;
11
- getNewMetaInfKeycloakTheme: (params: {
12
- metaInfKeycloakTheme: MetaInfKeycloakTheme | undefined;
13
- }) => MetaInfKeycloakTheme;
14
- }) {
15
- const { resourcesDirPath, getNewMetaInfKeycloakTheme } = params;
16
-
17
- const filePath = pathJoin(resourcesDirPath, "META-INF", "keycloak-themes.json");
18
-
19
- const currentMetaInfKeycloakTheme = !fs.existsSync(filePath)
20
- ? undefined
21
- : (JSON.parse(
22
- fs.readFileSync(filePath).toString("utf8")
23
- ) as MetaInfKeycloakTheme);
24
-
25
- const newMetaInfKeycloakThemes = getNewMetaInfKeycloakTheme({
26
- metaInfKeycloakTheme: currentMetaInfKeycloakTheme
27
- });
28
-
29
- {
30
- const dirPath = pathDirname(filePath);
31
- if (!fs.existsSync(dirPath)) {
32
- fs.mkdirSync(dirPath, { recursive: true });
33
- }
34
- }
35
-
36
- fs.writeFileSync(
37
- filePath,
38
- Buffer.from(JSON.stringify(newMetaInfKeycloakThemes, null, 2), "utf8")
39
- );
40
- }