keycloakify 10.0.0-rc.38 → 10.0.0-rc.39

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 (81) hide show
  1. package/bin/193.index.js +13 -13
  2. package/bin/3.index.js +86 -86
  3. package/bin/322.index.js +595 -0
  4. package/bin/453.index.js +3 -3
  5. package/bin/526.index.js +42 -633
  6. package/bin/538.index.js +68 -57
  7. package/bin/932.index.js +7 -7
  8. package/bin/944.index.js +621 -0
  9. package/bin/961.index.js +5 -5
  10. package/bin/97.index.js +3 -3
  11. package/bin/{21.index.js → 98.index.js} +59 -48
  12. package/bin/main.js +8 -8
  13. package/lib/getKcClsx.js +12 -1
  14. package/lib/getKcClsx.js.map +1 -1
  15. package/login/Fallback.d.ts +1 -0
  16. package/login/Fallback.js.map +1 -1
  17. package/login/UserProfileFormFields.d.ts +1 -0
  18. package/login/UserProfileFormFields.js +1 -3
  19. package/login/UserProfileFormFields.js.map +1 -1
  20. package/login/i18n/i18n.js +1 -1
  21. package/login/pages/IdpReviewUserProfile.d.ts +1 -0
  22. package/login/pages/IdpReviewUserProfile.js +2 -2
  23. package/login/pages/IdpReviewUserProfile.js.map +1 -1
  24. package/login/pages/LoginUpdateProfile.d.ts +1 -0
  25. package/login/pages/LoginUpdateProfile.js +2 -2
  26. package/login/pages/LoginUpdateProfile.js.map +1 -1
  27. package/login/pages/Register.d.ts +1 -0
  28. package/login/pages/Register.js +2 -2
  29. package/login/pages/Register.js.map +1 -1
  30. package/login/pages/UpdateEmail.d.ts +1 -0
  31. package/login/pages/UpdateEmail.js +2 -2
  32. package/login/pages/UpdateEmail.js.map +1 -1
  33. package/package.json +5 -8
  34. package/src/bin/add-story.ts +3 -3
  35. package/src/bin/copy-keycloak-resources-to-public.ts +3 -3
  36. package/src/bin/download-keycloak-default-theme.ts +5 -5
  37. package/src/bin/eject-page.ts +3 -3
  38. package/src/bin/initialize-email-theme.ts +5 -5
  39. package/src/bin/keycloakify/buildJars/buildJar.ts +14 -14
  40. package/src/bin/keycloakify/buildJars/buildJars.ts +8 -8
  41. package/src/bin/keycloakify/buildJars/generatePom.ts +9 -9
  42. package/src/bin/keycloakify/generateFtl/generateFtl.ts +12 -12
  43. package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +7 -7
  44. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +9 -9
  45. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +25 -25
  46. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +8 -8
  47. package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +9 -9
  48. package/src/bin/keycloakify/keycloakify.ts +11 -11
  49. package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +6 -6
  50. package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +7 -7
  51. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +10 -10
  52. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +13 -13
  53. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +11 -11
  54. package/src/bin/main.ts +2 -2
  55. package/src/bin/shared/{buildOptions.ts → buildContext.ts} +62 -51
  56. package/src/bin/shared/copyKeycloakResourcesToPublic.ts +12 -12
  57. package/src/bin/shared/downloadKeycloakDefaultTheme.ts +7 -7
  58. package/src/bin/shared/downloadKeycloakStaticResources.ts +7 -7
  59. package/src/bin/shared/generateKcGenTs.ts +12 -12
  60. package/src/bin/shared/getThemeSrcDirPath.ts +3 -3
  61. package/src/bin/start-keycloak/appBuild.ts +11 -11
  62. package/src/bin/start-keycloak/keycloakifyBuild.ts +7 -7
  63. package/src/bin/start-keycloak/start-keycloak.ts +34 -22
  64. package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +3 -3
  65. package/src/bin/update-kc-gen.ts +3 -3
  66. package/src/lib/getKcClsx.ts +15 -1
  67. package/src/login/Fallback.tsx +1 -0
  68. package/src/login/UserProfileFormFields.tsx +2 -4
  69. package/src/login/i18n/i18n.tsx +1 -1
  70. package/src/login/pages/IdpReviewUserProfile.tsx +8 -2
  71. package/src/login/pages/LoginUpdateProfile.tsx +8 -2
  72. package/src/login/pages/Register.tsx +8 -2
  73. package/src/login/pages/UpdateEmail.tsx +8 -2
  74. package/src/vite-plugin/vite-plugin.ts +19 -19
  75. package/vite-plugin/index.js +91 -80
  76. package/vite-plugin/vite-plugin.d.ts +3 -3
  77. package/bin/795.index.js +0 -1198
  78. package/lib/isStorybook.d.ts +0 -1
  79. package/lib/isStorybook.js +0 -3
  80. package/lib/isStorybook.js.map +0 -1
  81. package/src/lib/isStorybook.ts +0 -3
package/bin/538.index.js CHANGED
@@ -3,13 +3,13 @@ exports.id = 538;
3
3
  exports.ids = [538];
4
4
  exports.modules = {
5
5
 
6
- /***/ 54659:
6
+ /***/ 87751:
7
7
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
8
 
9
9
 
10
10
  // EXPORTS
11
11
  __webpack_require__.d(__webpack_exports__, {
12
- "d": () => (/* binding */ readBuildOptions)
12
+ "s": () => (/* binding */ getBuildContext)
13
13
  });
14
14
 
15
15
  // EXTERNAL MODULE: external "url"
@@ -30,9 +30,9 @@ var external_fs_ = __webpack_require__(57147);
30
30
 
31
31
 
32
32
  function getNpmWorkspaceRootDirPath(params) {
33
- const { reactAppRootDirPath, dependencyExpected } = params;
33
+ const { projectDirPath, dependencyExpected } = params;
34
34
  const npmWorkspaceRootDirPath = (function callee(depth) {
35
- const cwd = (0,external_path_.resolve)((0,external_path_.join)(...[reactAppRootDirPath, ...Array(depth).fill("..")]));
35
+ const cwd = (0,external_path_.resolve)((0,external_path_.join)(...[projectDirPath, ...Array(depth).fill("..")]));
36
36
  (0,assert.assert)(cwd !== external_path_.sep, "NPM workspace not found");
37
37
  try {
38
38
  external_child_process_.execSync("npm config get", {
@@ -81,7 +81,7 @@ var lib = __webpack_require__(52300);
81
81
  var tsafe = __webpack_require__(1666);
82
82
  // EXTERNAL MODULE: ./dist/bin/shared/constants.js
83
83
  var constants = __webpack_require__(173);
84
- ;// CONCATENATED MODULE: ./dist/bin/shared/buildOptions.js
84
+ ;// CONCATENATED MODULE: ./dist/bin/shared/buildContext.js
85
85
 
86
86
 
87
87
 
@@ -91,26 +91,26 @@ var constants = __webpack_require__(173);
91
91
 
92
92
 
93
93
 
94
- function readBuildOptions(params) {
94
+ function getBuildContext(params) {
95
95
  var _a, _b, _c, _d, _e, _f;
96
96
  const { cliCommandOptions } = params;
97
- const reactAppRootDirPath = (() => {
98
- if (cliCommandOptions.reactAppRootDirPath === undefined) {
97
+ const projectDirPath = (() => {
98
+ if (cliCommandOptions.projectDirPath === undefined) {
99
99
  return process.cwd();
100
100
  }
101
101
  return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
102
- pathIsh: cliCommandOptions.reactAppRootDirPath,
102
+ pathIsh: cliCommandOptions.projectDirPath,
103
103
  cwd: process.cwd()
104
104
  });
105
105
  })();
106
106
  const { resolvedViteConfig } = (() => {
107
- if (external_fs_.readdirSync(reactAppRootDirPath)
107
+ if (external_fs_.readdirSync(projectDirPath)
108
108
  .find(fileBasename => fileBasename.startsWith("vite.config")) ===
109
109
  undefined) {
110
110
  return { resolvedViteConfig: undefined };
111
111
  }
112
112
  const output = external_child_process_.execSync("npx vite", {
113
- cwd: reactAppRootDirPath,
113
+ cwd: projectDirPath,
114
114
  env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.resolveViteConfig */.fe.resolveViteConfig]: "true" })
115
115
  })
116
116
  .toString("utf8");
@@ -131,7 +131,7 @@ function readBuildOptions(params) {
131
131
  artifactId: lib.z.string().optional(),
132
132
  groupId: lib.z.string().optional(),
133
133
  loginThemeResourcesFromKeycloakVersion: lib.z.string().optional(),
134
- reactAppBuildDirPath: lib.z.string().optional(),
134
+ projectBuildDirPath: lib.z.string().optional(),
135
135
  keycloakifyBuildDirPath: lib.z.string().optional(),
136
136
  themeName: lib.z.union([lib.z.string(), lib.z.array(lib.z.string())]).optional()
137
137
  })
@@ -141,12 +141,11 @@ function readBuildOptions(params) {
141
141
  (0,tsafe.assert)();
142
142
  (0,tsafe.assert)();
143
143
  }
144
- return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(reactAppRootDirPath, "package.json"))
145
- .toString("utf8")));
144
+ return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
146
145
  })();
147
- const userProvidedBuildOptions = Object.assign(Object.assign({}, parsedPackageJson.keycloakify), resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.userProvidedBuildOptions);
146
+ const buildOptions = Object.assign(Object.assign({}, parsedPackageJson.keycloakify), resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildOptions);
148
147
  const themeNames = (() => {
149
- if (userProvidedBuildOptions.themeName === undefined) {
148
+ if (buildOptions.themeName === undefined) {
150
149
  return [
151
150
  parsedPackageJson.name
152
151
  .replace(/^@(.*)/, "$1")
@@ -154,56 +153,56 @@ function readBuildOptions(params) {
154
153
  .join("-")
155
154
  ];
156
155
  }
157
- if (typeof userProvidedBuildOptions.themeName === "string") {
158
- return [userProvidedBuildOptions.themeName];
156
+ if (typeof buildOptions.themeName === "string") {
157
+ return [buildOptions.themeName];
159
158
  }
160
- return userProvidedBuildOptions.themeName;
159
+ return buildOptions.themeName;
161
160
  })();
162
- const reactAppBuildDirPath = (() => {
161
+ const projectBuildDirPath = (() => {
163
162
  var _a;
164
163
  webpack: {
165
164
  if (resolvedViteConfig !== undefined) {
166
165
  break webpack;
167
166
  }
168
- if (((_a = parsedPackageJson.keycloakify) === null || _a === void 0 ? void 0 : _a.reactAppBuildDirPath) !== undefined) {
167
+ if (((_a = parsedPackageJson.keycloakify) === null || _a === void 0 ? void 0 : _a.projectBuildDirPath) !== undefined) {
169
168
  return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
170
- pathIsh: parsedPackageJson.keycloakify.reactAppBuildDirPath,
171
- cwd: reactAppRootDirPath
169
+ pathIsh: parsedPackageJson.keycloakify.projectBuildDirPath,
170
+ cwd: projectDirPath
172
171
  });
173
172
  }
174
- return (0,external_path_.join)(reactAppRootDirPath, "build");
173
+ return (0,external_path_.join)(projectDirPath, "build");
175
174
  }
176
- return (0,external_path_.join)(reactAppRootDirPath, resolvedViteConfig.buildDir);
175
+ return (0,external_path_.join)(projectDirPath, resolvedViteConfig.buildDir);
177
176
  })();
178
177
  const { npmWorkspaceRootDirPath } = getNpmWorkspaceRootDirPath({
179
- reactAppRootDirPath,
178
+ projectDirPath,
180
179
  dependencyExpected: "keycloakify"
181
180
  });
182
181
  return {
183
182
  bundler: resolvedViteConfig !== undefined ? "vite" : "webpack",
184
183
  themeVersion: (_b = (_a = process.env.KEYCLOAKIFY_THEME_VERSION) !== null && _a !== void 0 ? _a : parsedPackageJson.version) !== null && _b !== void 0 ? _b : "0.0.0",
185
184
  themeNames,
186
- extraThemeProperties: userProvidedBuildOptions.extraThemeProperties,
185
+ extraThemeProperties: buildOptions.extraThemeProperties,
187
186
  groupId: (() => {
188
187
  var _a, _b, _c, _d, _e;
189
188
  const fallbackGroupId = `${themeNames[0]}.keycloak`;
190
- return ((_b = (_a = process.env.KEYCLOAKIFY_GROUP_ID) !== null && _a !== void 0 ? _a : userProvidedBuildOptions.groupId) !== null && _b !== void 0 ? _b : (parsedPackageJson.homepage === undefined
189
+ return ((_b = (_a = process.env.KEYCLOAKIFY_GROUP_ID) !== null && _a !== void 0 ? _a : buildOptions.groupId) !== null && _b !== void 0 ? _b : (parsedPackageJson.homepage === undefined
191
190
  ? fallbackGroupId
192
191
  : (_e = (_d = (_c = (0,external_url_.parse)(parsedPackageJson.homepage)
193
192
  .host) === null || _c === void 0 ? void 0 : _c.replace(/:[0-9]+$/, "")) === null || _d === void 0 ? void 0 : _d.split(".").reverse().join(".")) !== null && _e !== void 0 ? _e : fallbackGroupId) + ".keycloak");
194
193
  })(),
195
- artifactId: (_d = (_c = process.env.KEYCLOAKIFY_ARTIFACT_ID) !== null && _c !== void 0 ? _c : userProvidedBuildOptions.artifactId) !== null && _d !== void 0 ? _d : `${themeNames[0]}-keycloak-theme`,
196
- loginThemeResourcesFromKeycloakVersion: (_e = userProvidedBuildOptions.loginThemeResourcesFromKeycloakVersion) !== null && _e !== void 0 ? _e : "24.0.4",
197
- reactAppRootDirPath,
198
- reactAppBuildDirPath,
194
+ artifactId: (_d = (_c = process.env.KEYCLOAKIFY_ARTIFACT_ID) !== null && _c !== void 0 ? _c : buildOptions.artifactId) !== null && _d !== void 0 ? _d : `${themeNames[0]}-keycloak-theme`,
195
+ loginThemeResourcesFromKeycloakVersion: (_e = buildOptions.loginThemeResourcesFromKeycloakVersion) !== null && _e !== void 0 ? _e : "24.0.4",
196
+ projectDirPath,
197
+ projectBuildDirPath,
199
198
  keycloakifyBuildDirPath: (() => {
200
- if (userProvidedBuildOptions.keycloakifyBuildDirPath !== undefined) {
199
+ if (buildOptions.keycloakifyBuildDirPath !== undefined) {
201
200
  return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
202
- pathIsh: userProvidedBuildOptions.keycloakifyBuildDirPath,
203
- cwd: reactAppRootDirPath
201
+ pathIsh: buildOptions.keycloakifyBuildDirPath,
202
+ cwd: projectDirPath
204
203
  });
205
204
  }
206
- return (0,external_path_.join)(reactAppRootDirPath, (resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildDir) === undefined
205
+ return (0,external_path_.join)(projectDirPath, (resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildDir) === undefined
207
206
  ? "build_keycloak"
208
207
  : `${resolvedViteConfig.buildDir}_keycloak`);
209
208
  })(),
@@ -215,12 +214,12 @@ function readBuildOptions(params) {
215
214
  if (process.env.PUBLIC_DIR_PATH !== undefined) {
216
215
  return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
217
216
  pathIsh: process.env.PUBLIC_DIR_PATH,
218
- cwd: reactAppRootDirPath
217
+ cwd: projectDirPath
219
218
  });
220
219
  }
221
- return (0,external_path_.join)(reactAppRootDirPath, "public");
220
+ return (0,external_path_.join)(projectDirPath, "public");
222
221
  }
223
- return (0,external_path_.join)(reactAppRootDirPath, resolvedViteConfig.publicDir);
222
+ return (0,external_path_.join)(projectDirPath, resolvedViteConfig.publicDir);
224
223
  })(),
225
224
  cacheDirPath: (() => {
226
225
  const cacheDirPath = (0,external_path_.join)((() => {
@@ -257,16 +256,28 @@ function readBuildOptions(params) {
257
256
  if (resolvedViteConfig !== undefined) {
258
257
  break webpack;
259
258
  }
260
- return (0,external_path_.join)(reactAppBuildDirPath, "static");
259
+ return (0,external_path_.join)(projectBuildDirPath, "static");
261
260
  }
262
- return (0,external_path_.join)(reactAppBuildDirPath, resolvedViteConfig.assetsDir);
261
+ return (0,external_path_.join)(projectBuildDirPath, resolvedViteConfig.assetsDir);
263
262
  })(),
264
263
  npmWorkspaceRootDirPath,
265
- kcContextExclusionsFtlCode: userProvidedBuildOptions.kcContextExclusionsFtlCode,
266
- environmentVariables: (_f = userProvidedBuildOptions.environmentVariables) !== null && _f !== void 0 ? _f : []
264
+ kcContextExclusionsFtlCode: (() => {
265
+ if (buildOptions.kcContextExclusionsFtl === undefined) {
266
+ return undefined;
267
+ }
268
+ if (buildOptions.kcContextExclusionsFtl.endsWith(".ftl")) {
269
+ const kcContextExclusionsFtlPath = (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
270
+ pathIsh: buildOptions.kcContextExclusionsFtl,
271
+ cwd: projectDirPath
272
+ });
273
+ return external_fs_.readFileSync(kcContextExclusionsFtlPath).toString("utf8");
274
+ }
275
+ return buildOptions.kcContextExclusionsFtl;
276
+ })(),
277
+ environmentVariables: (_f = buildOptions.environmentVariables) !== null && _f !== void 0 ? _f : []
267
278
  };
268
279
  }
269
- //# sourceMappingURL=buildOptions.js.map
280
+ //# sourceMappingURL=buildContext.js.map
270
281
 
271
282
  /***/ }),
272
283
 
@@ -373,8 +384,8 @@ const containerName = "keycloak-keycloakify";
373
384
  const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
374
385
  /** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
375
386
  function getThemeSrcDirPath(params) {
376
- const { reactAppRootDirPath } = params;
377
- const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(reactAppRootDirPath, "src");
387
+ const { projectDirPath } = params;
388
+ const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(projectDirPath, "src");
378
389
  const themeSrcDirPath = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
379
390
  dirPath: srcDirPath,
380
391
  returnedPathsType: "relative to dirPath"
@@ -488,8 +499,8 @@ __webpack_require__.d(__webpack_exports__, {
488
499
  "command": () => (/* binding */ command)
489
500
  });
490
501
 
491
- // EXTERNAL MODULE: ./dist/bin/shared/buildOptions.js + 1 modules
492
- var shared_buildOptions = __webpack_require__(54659);
502
+ // EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
503
+ var shared_buildContext = __webpack_require__(87751);
493
504
  // EXTERNAL MODULE: ./node_modules/tsafe/assert.js
494
505
  var assert = __webpack_require__(88078);
495
506
  // EXTERNAL MODULE: ./dist/bin/shared/getThemeSrcDirPath.js
@@ -505,9 +516,9 @@ var external_path_ = __webpack_require__(71017);
505
516
 
506
517
  (0,assert.assert)();
507
518
  async function generateKcGenTs(params) {
508
- const { buildOptions } = params;
519
+ const { buildContext } = params;
509
520
  const { themeSrcDirPath } = (0,getThemeSrcDirPath/* getThemeSrcDirPath */.f)({
510
- reactAppRootDirPath: buildOptions.reactAppRootDirPath
521
+ projectDirPath: buildContext.projectDirPath
511
522
  });
512
523
  await promises_.writeFile((0,external_path_.join)(themeSrcDirPath, "kc.gen.ts"), Buffer.from([
513
524
  `/* prettier-ignore-start */`,
@@ -520,15 +531,15 @@ async function generateKcGenTs(params) {
520
531
  ``,
521
532
  `// This file is auto-generated by Keycloakify`,
522
533
  ``,
523
- `export type ThemeName = ${buildOptions.themeNames.map(themeName => `"${themeName}"`).join(" | ")};`,
534
+ `export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(" | ")};`,
524
535
  ``,
525
- `export const themeNames: ThemeName[] = [${buildOptions.themeNames.map(themeName => `"${themeName}"`).join(", ")}];`,
536
+ `export const themeNames: ThemeName[] = [${buildContext.themeNames.map(themeName => `"${themeName}"`).join(", ")}];`,
526
537
  ``,
527
- `export type KcEnvName = ${buildOptions.environmentVariables.length === 0 ? "never" : buildOptions.environmentVariables.map(({ name }) => `"${name}"`).join(" | ")};`,
538
+ `export type KcEnvName = ${buildContext.environmentVariables.length === 0 ? "never" : buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(" | ")};`,
528
539
  ``,
529
- `export const KcEnvNames: KcEnvName[] = [${buildOptions.environmentVariables.map(({ name }) => `"${name}"`).join(", ")}];`,
540
+ `export const KcEnvNames: KcEnvName[] = [${buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(", ")}];`,
530
541
  ``,
531
- `export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildOptions.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
542
+ `export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
532
543
  ``,
533
544
  `/* prettier-ignore-end */`
534
545
  ].join("\n"), "utf8"));
@@ -539,10 +550,10 @@ async function generateKcGenTs(params) {
539
550
 
540
551
  async function command(params) {
541
552
  const { cliCommandOptions } = params;
542
- const buildOptions = (0,shared_buildOptions/* readBuildOptions */.d)({
553
+ const buildContext = (0,shared_buildContext/* getBuildContext */.s)({
543
554
  cliCommandOptions
544
555
  });
545
- await generateKcGenTs({ buildOptions });
556
+ await generateKcGenTs({ buildContext });
546
557
  }
547
558
  //# sourceMappingURL=update-kc-gen.js.map
548
559
 
package/bin/932.index.js CHANGED
@@ -15,7 +15,7 @@ __webpack_require__.r(__webpack_exports__);
15
15
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
16
16
  /* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60332);
17
17
  /* harmony import */ var _shared_promptKeycloakVersion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95781);
18
- /* harmony import */ var _shared_buildOptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54659);
18
+ /* harmony import */ var _shared_buildContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87751);
19
19
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57147);
20
20
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_5__);
21
21
  /* harmony import */ var _shared_getThemeSrcDirPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39216);
@@ -28,9 +28,9 @@ __webpack_require__.r(__webpack_exports__);
28
28
 
29
29
  async function command(params) {
30
30
  const { cliCommandOptions } = params;
31
- const buildOptions = (0,_shared_buildOptions__WEBPACK_IMPORTED_MODULE_4__/* .readBuildOptions */ .d)({ cliCommandOptions });
31
+ const buildContext = (0,_shared_buildContext__WEBPACK_IMPORTED_MODULE_4__/* .getBuildContext */ .s)({ cliCommandOptions });
32
32
  const { themeSrcDirPath } = (0,_shared_getThemeSrcDirPath__WEBPACK_IMPORTED_MODULE_6__/* .getThemeSrcDirPath */ .f)({
33
- reactAppRootDirPath: buildOptions.reactAppRootDirPath
33
+ projectDirPath: buildContext.projectDirPath
34
34
  });
35
35
  const emailThemeSrcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeSrcDirPath, "email");
36
36
  if (fs__WEBPACK_IMPORTED_MODULE_5__.existsSync(emailThemeSrcDirPath)) {
@@ -41,11 +41,11 @@ async function command(params) {
41
41
  const { keycloakVersion } = await (0,_shared_promptKeycloakVersion__WEBPACK_IMPORTED_MODULE_3__/* .promptKeycloakVersion */ .s)({
42
42
  // NOTE: This is arbitrary
43
43
  startingFromMajor: 17,
44
- cacheDirPath: buildOptions.cacheDirPath
44
+ cacheDirPath: buildContext.cacheDirPath
45
45
  });
46
46
  const { defaultThemeDirPath } = await (0,_shared_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_0__/* .downloadKeycloakDefaultTheme */ .x)({
47
47
  keycloakVersion,
48
- buildOptions
48
+ buildContext
49
49
  });
50
50
  (0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_2__/* .transformCodebase */ .N)({
51
51
  srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", "email"),
@@ -84,8 +84,8 @@ async function command(params) {
84
84
  const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
85
85
  /** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
86
86
  function getThemeSrcDirPath(params) {
87
- const { reactAppRootDirPath } = params;
88
- const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(reactAppRootDirPath, "src");
87
+ const { projectDirPath } = params;
88
+ const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(projectDirPath, "src");
89
89
  const themeSrcDirPath = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
90
90
  dirPath: srcDirPath,
91
91
  returnedPathsType: "relative to dirPath"