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.
Files changed (49) hide show
  1. package/account/KcContext/KcContext.d.ts +1 -0
  2. package/account/KcContext/KcContext.js.map +1 -1
  3. package/account/KcContext/kcContextMocks.js +2 -1
  4. package/account/KcContext/kcContextMocks.js.map +1 -1
  5. package/account/pages/Totp.js +2 -7
  6. package/account/pages/Totp.js.map +1 -1
  7. package/bin/193.index.js +0 -501
  8. package/bin/246.index.js +371 -75118
  9. package/bin/363.index.js +36 -665
  10. package/bin/453.index.js +603 -23
  11. package/bin/{890.index.js → 456.index.js} +1831 -3
  12. package/bin/490.index.js +75195 -0
  13. package/bin/526.index.js +311 -166
  14. package/bin/538.index.js +1 -509
  15. package/bin/{240.index.js → 751.index.js} +306 -322
  16. package/bin/772.index.js +1 -1
  17. package/bin/837.index.js +787 -0
  18. package/bin/932.index.js +1 -574
  19. package/bin/97.index.js +594 -14
  20. package/bin/main.js +8 -8
  21. package/bin/shared/buildContext.d.ts +16 -0
  22. package/bin/shared/constants.d.ts +1 -1
  23. package/bin/shared/constants.js +1 -1
  24. package/bin/shared/constants.js.map +1 -1
  25. package/package.json +5 -9
  26. package/src/account/KcContext/KcContext.ts +1 -0
  27. package/src/account/KcContext/kcContextMocks.ts +2 -1
  28. package/src/account/pages/Totp.tsx +1 -7
  29. package/src/bin/add-story.ts +1 -6
  30. package/src/bin/eject-page.ts +7 -8
  31. package/src/bin/initialize-email-theme.ts +1 -6
  32. package/src/bin/keycloakify/buildJars/buildJars.ts +23 -49
  33. package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +8 -6
  34. package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +15 -20
  35. package/src/bin/keycloakify/keycloakify.ts +6 -8
  36. package/src/bin/shared/buildContext.ts +434 -42
  37. package/src/bin/shared/constants.ts +2 -1
  38. package/src/bin/shared/downloadKeycloakDefaultTheme.ts +135 -108
  39. package/src/bin/shared/generateKcGenTs.ts +2 -6
  40. package/src/bin/start-keycloak/keycloakifyBuild.ts +4 -4
  41. package/src/bin/start-keycloak/start-keycloak.ts +40 -83
  42. package/src/vite-plugin/vite-plugin.ts +5 -4
  43. package/vite-plugin/index.js +410 -187
  44. package/bin/480.index.js +0 -466
  45. package/bin/818.index.js +0 -1802
  46. package/bin/827.index.js +0 -1094
  47. package/src/bin/shared/getImplementedThemeTypes.ts +0 -23
  48. package/src/bin/shared/getJarFileBasename.ts +0 -11
  49. package/src/bin/shared/getThemeSrcDirPath.ts +0 -62
@@ -3,7 +3,6 @@ import { type BuildContext } from "./buildContext";
3
3
  import { assert } from "tsafe/assert";
4
4
  import { lastKeycloakVersionWithAccountV1 } from "./constants";
5
5
  import { downloadAndExtractArchive } from "../tools/downloadAndExtractArchive";
6
- import { isInside } from "../tools/isInside";
7
6
 
8
7
  export type BuildContextLike = {
9
8
  cacheDirPath: string;
@@ -18,27 +17,25 @@ export async function downloadKeycloakDefaultTheme(params: {
18
17
  }): Promise<{ defaultThemeDirPath: string }> {
19
18
  const { keycloakVersion, buildContext } = params;
20
19
 
20
+ let kcNodeModulesKeepFilePaths: string[] | undefined = undefined;
21
+ let kcNodeModulesKeepFilePaths_lastAccountV1: string[] | undefined = undefined;
22
+
21
23
  const { extractedDirPath } = await downloadAndExtractArchive({
22
24
  url: `https://repo1.maven.org/maven2/org/keycloak/keycloak-themes/${keycloakVersion}/keycloak-themes-${keycloakVersion}.jar`,
23
25
  cacheDirPath: buildContext.cacheDirPath,
24
26
  npmWorkspaceRootDirPath: buildContext.npmWorkspaceRootDirPath,
25
27
  uniqueIdOfOnOnArchiveFile: "downloadKeycloakDefaultTheme",
26
28
  onArchiveFile: async params => {
27
- if (!isInside({ dirPath: "theme", filePath: params.fileRelativePath })) {
29
+ const fileRelativePath = pathRelative("theme", params.fileRelativePath);
30
+
31
+ if (fileRelativePath.startsWith("..")) {
28
32
  return;
29
33
  }
30
34
 
31
35
  const { readFile, writeFile } = params;
32
36
 
33
- const fileRelativePath = pathRelative("theme", params.fileRelativePath);
34
-
35
37
  skip_keycloak_v2: {
36
- if (
37
- !isInside({
38
- dirPath: pathJoin("keycloak.v2"),
39
- filePath: fileRelativePath
40
- })
41
- ) {
38
+ if (!fileRelativePath.startsWith(pathJoin("keycloak.v2"))) {
42
39
  break skip_keycloak_v2;
43
40
  }
44
41
 
@@ -50,87 +47,102 @@ export async function downloadKeycloakDefaultTheme(params: {
50
47
  break last_account_v1_transformations;
51
48
  }
52
49
 
53
- patch_account_css: {
50
+ skip_web_modules: {
54
51
  if (
55
- fileRelativePath !==
56
- pathJoin("keycloak", "account", "resources", "css", "account.css")
52
+ !fileRelativePath.startsWith(
53
+ pathJoin("keycloak", "common", "resources", "web_modules")
54
+ )
57
55
  ) {
58
- break patch_account_css;
56
+ break skip_web_modules;
59
57
  }
60
58
 
61
- await writeFile({
62
- fileRelativePath,
63
- modifiedData: Buffer.from(
64
- (await readFile())
65
- .toString("utf8")
66
- .replace("top: -34px;", "top: -34px !important;"),
67
- "utf8"
68
- )
69
- });
70
-
71
59
  return;
72
60
  }
73
61
 
74
- skip_web_modules: {
62
+ skip_lib: {
75
63
  if (
76
- !isInside({
77
- dirPath: pathJoin(
78
- "keycloak",
79
- "common",
80
- "resources",
81
- "web_modules"
82
- ),
83
- filePath: fileRelativePath
84
- })
64
+ !fileRelativePath.startsWith(
65
+ pathJoin("keycloak", "common", "resources", "lib")
66
+ )
85
67
  ) {
86
- break skip_web_modules;
68
+ break skip_lib;
87
69
  }
88
70
 
89
71
  return;
90
72
  }
91
73
 
92
- skip_unused_node_modules: {
93
- const nodeModulesDirPath = pathJoin(
94
- "keycloak",
95
- "common",
96
- "resources",
97
- "node_modules"
98
- );
99
-
74
+ skip_node_modules: {
100
75
  if (
101
- !isInside({
102
- dirPath: nodeModulesDirPath,
103
- filePath: fileRelativePath
104
- })
76
+ !fileRelativePath.startsWith(
77
+ pathJoin("keycloak", "common", "resources", "node_modules")
78
+ )
105
79
  ) {
106
- break skip_unused_node_modules;
80
+ break skip_node_modules;
107
81
  }
108
82
 
109
- const toKeepPrefixes = [
110
- ...[
111
- "patternfly.min.css",
112
- "patternfly-additions.min.css",
113
- "patternfly-additions.min.css"
114
- ].map(fileBasename =>
83
+ if (kcNodeModulesKeepFilePaths_lastAccountV1 === undefined) {
84
+ kcNodeModulesKeepFilePaths_lastAccountV1 = [
85
+ pathJoin("patternfly", "dist", "css", "patternfly.min.css"),
115
86
  pathJoin(
116
- nodeModulesDirPath,
117
87
  "patternfly",
118
88
  "dist",
119
89
  "css",
120
- fileBasename
90
+ "patternfly-additions.min.css"
91
+ ),
92
+ pathJoin(
93
+ "patternfly",
94
+ "dist",
95
+ "fonts",
96
+ "OpenSans-Regular-webfont.woff2"
97
+ ),
98
+ pathJoin(
99
+ "patternfly",
100
+ "dist",
101
+ "fonts",
102
+ "OpenSans-Bold-webfont.woff2"
103
+ ),
104
+ pathJoin(
105
+ "patternfly",
106
+ "dist",
107
+ "fonts",
108
+ "OpenSans-Light-webfont.woff2"
109
+ ),
110
+ pathJoin(
111
+ "patternfly",
112
+ "dist",
113
+ "fonts",
114
+ "OpenSans-Semibold-webfont.woff2"
121
115
  )
122
- ),
123
- pathJoin(nodeModulesDirPath, "patternfly", "dist", "fonts")
124
- ];
116
+ ];
117
+ }
118
+
119
+ for (const keepPath of kcNodeModulesKeepFilePaths_lastAccountV1) {
120
+ if (fileRelativePath.endsWith(keepPath)) {
121
+ break skip_node_modules;
122
+ }
123
+ }
124
+
125
+ return;
126
+ }
125
127
 
128
+ patch_account_css: {
126
129
  if (
127
- toKeepPrefixes.find(prefix =>
128
- fileRelativePath.startsWith(prefix)
129
- ) !== undefined
130
+ fileRelativePath !==
131
+ pathJoin("keycloak", "account", "resources", "css", "account.css")
130
132
  ) {
131
- break skip_unused_node_modules;
133
+ break patch_account_css;
132
134
  }
133
135
 
136
+ await writeFile({
137
+ fileRelativePath,
138
+ modifiedData: Buffer.from(
139
+ (await readFile())
140
+ .toString("utf8")
141
+ .replace("top: -34px;", "top: -34px !important;"),
142
+ "utf8"
143
+ )
144
+ });
145
+
134
146
  return;
135
147
  }
136
148
  }
@@ -140,61 +152,76 @@ export async function downloadKeycloakDefaultTheme(params: {
140
152
  break skip_unused_resources;
141
153
  }
142
154
 
143
- for (const dirBasename of [
144
- "@patternfly-v5",
145
- "@rollup",
146
- "rollup",
147
- "react",
148
- "react-dom",
149
- "shx",
150
- ".pnpm"
151
- ]) {
155
+ skip_node_modules: {
152
156
  if (
153
- isInside({
154
- dirPath: pathJoin(
155
- "keycloak",
156
- "common",
157
- "resources",
158
- "node_modules",
159
- dirBasename
160
- ),
161
- filePath: fileRelativePath
162
- })
157
+ !fileRelativePath.startsWith(
158
+ pathJoin("keycloak", "common", "resources", "node_modules")
159
+ )
163
160
  ) {
164
- return;
161
+ break skip_node_modules;
165
162
  }
163
+
164
+ if (kcNodeModulesKeepFilePaths === undefined) {
165
+ kcNodeModulesKeepFilePaths = [
166
+ pathJoin("@patternfly", "patternfly", "patternfly.min.css"),
167
+ pathJoin("patternfly", "dist", "css", "patternfly.min.css"),
168
+ pathJoin(
169
+ "patternfly",
170
+ "dist",
171
+ "css",
172
+ "patternfly-additions.min.css"
173
+ ),
174
+ pathJoin(
175
+ "patternfly",
176
+ "dist",
177
+ "fonts",
178
+ "OpenSans-Regular-webfont.woff2"
179
+ ),
180
+ pathJoin(
181
+ "patternfly",
182
+ "dist",
183
+ "fonts",
184
+ "OpenSans-Light-webfont.woff2"
185
+ ),
186
+ pathJoin(
187
+ "patternfly",
188
+ "dist",
189
+ "fonts",
190
+ "fontawesome-webfont.woff2"
191
+ ),
192
+ pathJoin("jquery", "dist", "jquery.min.js")
193
+ ];
194
+ }
195
+
196
+ for (const keepPath of kcNodeModulesKeepFilePaths) {
197
+ if (fileRelativePath.endsWith(keepPath)) {
198
+ break skip_node_modules;
199
+ }
200
+ }
201
+
202
+ return;
166
203
  }
167
204
 
168
- for (const dirBasename of ["react", "react-dom"]) {
205
+ skip_vendor: {
169
206
  if (
170
- isInside({
171
- dirPath: pathJoin(
172
- "keycloak",
173
- "common",
174
- "resources",
175
- "vendor",
176
- dirBasename
177
- ),
178
- filePath: fileRelativePath
179
- })
207
+ !fileRelativePath.startsWith(
208
+ pathJoin("keycloak", "common", "resources", "vendor")
209
+ )
180
210
  ) {
181
- return;
211
+ break skip_vendor;
182
212
  }
213
+
214
+ return;
183
215
  }
184
216
 
185
- if (
186
- isInside({
187
- dirPath: pathJoin(
188
- "keycloak",
189
- "common",
190
- "resources",
191
- "node_modules",
192
- "@patternfly",
193
- "react-core"
194
- ),
195
- filePath: fileRelativePath
196
- })
197
- ) {
217
+ skip_rollup_config: {
218
+ if (
219
+ fileRelativePath !==
220
+ pathJoin("keycloak", "common", "resources", "rollup.config.js")
221
+ ) {
222
+ break skip_rollup_config;
223
+ }
224
+
198
225
  return;
199
226
  }
200
227
  }
@@ -1,6 +1,5 @@
1
1
  import { assert } from "tsafe/assert";
2
2
  import type { BuildContext } from "./buildContext";
3
- import { getThemeSrcDirPath } from "./getThemeSrcDirPath";
4
3
  import * as fs from "fs/promises";
5
4
  import { join as pathJoin } from "path";
6
5
  import { existsAsync } from "../tools/fs.existsAsync";
@@ -9,6 +8,7 @@ export type BuildContextLike = {
9
8
  projectDirPath: string;
10
9
  themeNames: string[];
11
10
  environmentVariables: { name: string; default: string }[];
11
+ themeSrcDirPath: string;
12
12
  };
13
13
 
14
14
  assert<BuildContext extends BuildContextLike ? true : false>();
@@ -18,11 +18,7 @@ export async function generateKcGenTs(params: {
18
18
  }): Promise<void> {
19
19
  const { buildContext } = params;
20
20
 
21
- const { themeSrcDirPath } = getThemeSrcDirPath({
22
- projectDirPath: buildContext.projectDirPath
23
- });
24
-
25
- const filePath = pathJoin(themeSrcDirPath, "kc.gen.ts");
21
+ const filePath = pathJoin(buildContext.themeSrcDirPath, "kc.gen.ts");
26
22
 
27
23
  const currentContent = (await existsAsync(filePath))
28
24
  ? await fs.readFile(filePath)
@@ -1,4 +1,4 @@
1
- import { onlyBuildJarFileBasenameEnvName } from "../shared/constants";
1
+ import { buildForKeycloakMajorVersionEnvName } from "../shared/constants";
2
2
  import * as child_process from "child_process";
3
3
  import { Deferred } from "evt/tools/Deferred";
4
4
  import { assert } from "tsafe/assert";
@@ -14,10 +14,10 @@ export type BuildContextLike = {
14
14
  assert<BuildContext extends BuildContextLike ? true : false>();
15
15
 
16
16
  export async function keycloakifyBuild(params: {
17
- onlyBuildJarFileBasename: string;
17
+ buildForKeycloakMajorVersionNumber: number;
18
18
  buildContext: BuildContextLike;
19
19
  }): Promise<{ isKeycloakifyBuildSuccess: boolean }> {
20
- const { buildContext, onlyBuildJarFileBasename } = params;
20
+ const { buildForKeycloakMajorVersionNumber, buildContext } = params;
21
21
 
22
22
  const dResult = new Deferred<{ isSuccess: boolean }>();
23
23
 
@@ -25,7 +25,7 @@ export async function keycloakifyBuild(params: {
25
25
  cwd: buildContext.projectDirPath,
26
26
  env: {
27
27
  ...process.env,
28
- [onlyBuildJarFileBasenameEnvName]: onlyBuildJarFileBasename
28
+ [buildForKeycloakMajorVersionEnvName]: `${buildForKeycloakMajorVersionNumber}`
29
29
  },
30
30
  shell: true
31
31
  });
@@ -2,12 +2,9 @@ import { getBuildContext } from "../shared/buildContext";
2
2
  import { exclude } from "tsafe/exclude";
3
3
  import type { CliCommandOptions as CliCommandOptions_common } from "../main";
4
4
  import { promptKeycloakVersion } from "../shared/promptKeycloakVersion";
5
- import { getImplementedThemeTypes } from "../shared/getImplementedThemeTypes";
6
5
  import { accountV1ThemeName, containerName } from "../shared/constants";
7
6
  import { SemVer } from "../tools/SemVer";
8
- import type { KeycloakVersionRange } from "../shared/KeycloakVersionRange";
9
- import { getJarFileBasename } from "../shared/getJarFileBasename";
10
- import { assert, type Equals } from "tsafe/assert";
7
+ import { assert } from "tsafe/assert";
11
8
  import * as fs from "fs";
12
9
  import {
13
10
  join as pathJoin,
@@ -91,83 +88,30 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
91
88
 
92
89
  const buildContext = getBuildContext({ cliCommandOptions });
93
90
 
94
- const { keycloakVersion, keycloakMajorNumber: keycloakMajorVersionNumber } =
95
- await (async () => {
96
- if (cliCommandOptions.keycloakVersion !== undefined) {
97
- return {
98
- keycloakVersion: cliCommandOptions.keycloakVersion,
99
- keycloakMajorNumber: SemVer.parse(cliCommandOptions.keycloakVersion)
100
- .major
101
- };
102
- }
103
-
104
- console.log(
105
- chalk.cyan("On which version of Keycloak do you want to test your theme?")
106
- );
107
-
108
- const { keycloakVersion } = await promptKeycloakVersion({
109
- startingFromMajor: 18,
110
- excludeMajorVersions: [22],
111
- cacheDirPath: buildContext.cacheDirPath
112
- });
113
-
114
- console.log(`→ ${keycloakVersion}`);
115
-
116
- const keycloakMajorNumber = SemVer.parse(keycloakVersion).major;
117
-
118
- return { keycloakVersion, keycloakMajorNumber };
119
- })();
120
-
121
- const keycloakVersionRange: KeycloakVersionRange = (() => {
122
- const doesImplementAccountTheme = getImplementedThemeTypes({
123
- projectDirPath: buildContext.projectDirPath
124
- }).implementedThemeTypes.account;
125
-
126
- if (doesImplementAccountTheme) {
127
- const keycloakVersionRange = (() => {
128
- if (keycloakMajorVersionNumber <= 21) {
129
- return "21-and-below" as const;
130
- }
131
-
132
- assert(keycloakMajorVersionNumber !== 22);
133
-
134
- if (keycloakMajorVersionNumber === 23) {
135
- return "23" as const;
136
- }
137
-
138
- if (keycloakMajorVersionNumber === 24) {
139
- return "24" as const;
140
- }
141
-
142
- return "25-and-above" as const;
143
- })();
144
-
145
- assert<
146
- Equals<typeof keycloakVersionRange, KeycloakVersionRange.WithAccountTheme>
147
- >();
91
+ const { keycloakVersion } = await (async () => {
92
+ if (cliCommandOptions.keycloakVersion !== undefined) {
93
+ return {
94
+ keycloakVersion: cliCommandOptions.keycloakVersion,
95
+ keycloakMajorNumber: SemVer.parse(cliCommandOptions.keycloakVersion).major
96
+ };
97
+ }
148
98
 
149
- return keycloakVersionRange;
150
- } else {
151
- const keycloakVersionRange = (() => {
152
- if (keycloakMajorVersionNumber <= 21) {
153
- return "21-and-below" as const;
154
- }
99
+ console.log(
100
+ chalk.cyan("On which version of Keycloak do you want to test your theme?")
101
+ );
155
102
 
156
- return "22-and-above" as const;
157
- })();
103
+ const { keycloakVersion } = await promptKeycloakVersion({
104
+ startingFromMajor: 18,
105
+ excludeMajorVersions: [22],
106
+ cacheDirPath: buildContext.cacheDirPath
107
+ });
158
108
 
159
- assert<
160
- Equals<
161
- typeof keycloakVersionRange,
162
- KeycloakVersionRange.WithoutAccountTheme
163
- >
164
- >();
109
+ console.log(`→ ${keycloakVersion}`);
165
110
 
166
- return keycloakVersionRange;
167
- }
111
+ return { keycloakVersion };
168
112
  })();
169
113
 
170
- const { jarFileBasename } = getJarFileBasename({ keycloakVersionRange });
114
+ const keycloakMajorVersionNumber = SemVer.parse(keycloakVersion).major;
171
115
 
172
116
  {
173
117
  const { isAppBuildSuccess } = await appBuild({
@@ -177,28 +121,36 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
177
121
  if (!isAppBuildSuccess) {
178
122
  console.log(
179
123
  chalk.red(
180
- `App build failed, exiting. Try running 'npm run build-keycloak-theme' and see what's wrong.`
124
+ `App build failed, exiting. Try running 'npm run build' and see what's wrong.`
181
125
  )
182
126
  );
183
127
  process.exit(1);
184
128
  }
185
129
 
186
130
  const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
187
- onlyBuildJarFileBasename: jarFileBasename,
131
+ buildForKeycloakMajorVersionNumber: keycloakMajorVersionNumber,
188
132
  buildContext
189
133
  });
190
134
 
191
135
  if (!isKeycloakifyBuildSuccess) {
192
136
  console.log(
193
137
  chalk.red(
194
- `Keycloakify build failed, exiting. Try running 'npm run build-keycloak-theme' and see what's wrong.`
138
+ `Keycloakify build failed, exiting. Try running 'npx keycloakify build' and see what's wrong.`
195
139
  )
196
140
  );
197
141
  process.exit(1);
198
142
  }
199
143
  }
200
144
 
201
- console.log(`Using Keycloak ${chalk.bold(jarFileBasename)}`);
145
+ const jarFilePath = fs
146
+ .readdirSync(buildContext.keycloakifyBuildDirPath)
147
+ .filter(fileBasename => fileBasename.endsWith(".jar"))
148
+ .map(fileBasename => pathJoin(buildContext.keycloakifyBuildDirPath, fileBasename))
149
+ .sort((a, b) => fs.statSync(b).mtimeMs - fs.statSync(a).mtimeMs)[0];
150
+
151
+ assert(jarFilePath !== undefined);
152
+
153
+ console.log(`Using ${chalk.bold(pathBasename(jarFilePath))}`);
202
154
 
203
155
  const realmJsonFilePath = await (async () => {
204
156
  if (cliCommandOptions.realmJsonFilePath !== undefined) {
@@ -284,8 +236,6 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
284
236
  return filePath;
285
237
  })();
286
238
 
287
- const jarFilePath = pathJoin(buildContext.keycloakifyBuildDirPath, jarFileBasename);
288
-
289
239
  async function extractThemeResourcesFromJar() {
290
240
  await extractArchive({
291
241
  archiveFilePath: jarFilePath,
@@ -311,7 +261,10 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
311
261
 
312
262
  await extractThemeResourcesFromJar();
313
263
 
314
- const jarFilePath_cacheDir = pathJoin(buildContext.cacheDirPath, jarFileBasename);
264
+ const jarFilePath_cacheDir = pathJoin(
265
+ buildContext.cacheDirPath,
266
+ pathBasename(jarFilePath)
267
+ );
315
268
 
316
269
  fs.copyFileSync(jarFilePath, jarFilePath_cacheDir);
317
270
 
@@ -413,6 +366,10 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
413
366
 
414
367
  console.log(
415
368
  [
369
+ "",
370
+ `The ftl files from ${chalk.bold(
371
+ `.${pathSep}${pathRelative(process.cwd(), pathJoin(buildContext.keycloakifyBuildDirPath, "theme"))}`
372
+ )} are mounted in the Keycloak container.`,
416
373
  "",
417
374
  `Keycloak Admin console: ${chalk.cyan.bold(
418
375
  `http://localhost:${cliCommandOptions.port}`
@@ -453,7 +410,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
453
410
  }
454
411
 
455
412
  const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
456
- onlyBuildJarFileBasename: jarFileBasename,
413
+ buildForKeycloakMajorVersionNumber: keycloakMajorVersionNumber,
457
414
  buildContext
458
415
  });
459
416
 
@@ -44,11 +44,12 @@ export function keycloakify(params?: Params) {
44
44
  break run_post_build_script_case;
45
45
  }
46
46
 
47
- const buildContext = JSON.parse(envValue) as BuildContext;
47
+ const { buildContext, resourcesDirPath } = JSON.parse(envValue) as {
48
+ buildContext: BuildContext;
49
+ resourcesDirPath: string;
50
+ };
48
51
 
49
- process.chdir(
50
- pathJoin(buildContext.keycloakifyBuildDirPath, "resources")
51
- );
52
+ process.chdir(resourcesDirPath);
52
53
 
53
54
  await postBuild?.(buildContext);
54
55