keycloakify 11.6.2 → 11.7.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 (72) hide show
  1. package/README.md +1 -1
  2. package/bin/{735.index.js → 288.index.js} +226 -360
  3. package/bin/313.index.js +377 -0
  4. package/bin/{174.index.js → 33.index.js} +37 -2
  5. package/bin/{840.index.js → 355.index.js} +348 -97
  6. package/bin/363.index.js +157 -145
  7. package/bin/453.index.js +5 -41
  8. package/bin/{503.index.js → 678.index.js} +577 -53
  9. package/bin/{921.index.js → 780.index.js} +54 -45
  10. package/bin/880.index.js +206 -21
  11. package/bin/9.index.js +850 -0
  12. package/bin/{525.index.js → 911.index.js} +1302 -2
  13. package/bin/930.index.js +3 -4
  14. package/bin/{153.index.js → 947.index.js} +22 -797
  15. package/bin/main.js +11 -10
  16. package/bin/shared/initializeSpa/index.d.ts +1 -0
  17. package/bin/shared/initializeSpa/initializeSpa.d.ts +9 -0
  18. package/bin/tools/getInstalledModuleDirPath.d.ts +0 -1
  19. package/bin/tools/isRootPath.d.ts +1 -0
  20. package/bin/tools/listInstalledModules.d.ts +0 -1
  21. package/package.json +22 -44
  22. package/src/bin/eject-page.ts +7 -81
  23. package/src/bin/initialize-account-theme/initialize-account-theme.ts +15 -14
  24. package/src/bin/initialize-admin-theme.ts +17 -124
  25. package/src/bin/initialize-email-theme.ts +10 -34
  26. package/src/bin/keycloakify/generateResources/generateResources.ts +49 -21
  27. package/src/bin/main.ts +5 -4
  28. package/src/bin/own.ts +1 -2
  29. package/src/bin/shared/{addSyncExtensionsToPostinstallScript.ts → initializeSpa/addSyncExtensionsToPostinstallScript.ts} +2 -2
  30. package/src/bin/shared/initializeSpa/index.ts +1 -0
  31. package/src/bin/shared/initializeSpa/initializeSpa.ts +149 -0
  32. package/src/bin/sync-extensions/extensionModuleMeta.ts +0 -1
  33. package/src/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts +4 -1
  34. package/src/bin/tools/getInstalledModuleDirPath.ts +24 -22
  35. package/src/bin/tools/isRootPath.ts +22 -0
  36. package/src/bin/tools/listInstalledModules.ts +2 -4
  37. package/src/bin/tsconfig.json +1 -1
  38. package/bin/375.index.js +0 -4089
  39. package/bin/490.index.js +0 -1108
  40. package/bin/568.index.js +0 -1867
  41. package/bin/743.index.js +0 -69
  42. package/bin/initialize-account-theme/copyBoilerplate.d.ts +0 -4
  43. package/bin/initialize-account-theme/initializeAccountTheme_multiPage.d.ts +0 -3
  44. package/bin/initialize-account-theme/initializeAccountTheme_singlePage.d.ts +0 -11
  45. package/bin/shared/getLatestsSemVersionedTag.d.ts +0 -15
  46. package/bin/shared/promptKeycloakVersion.d.ts +0 -10
  47. package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
  48. package/bin/tools/crc32.d.ts +0 -9
  49. package/bin/tools/deflate.d.ts +0 -24
  50. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -15
  51. package/bin/tools/octokit-addons/listTags.d.ts +0 -13
  52. package/bin/tools/tee.d.ts +0 -3
  53. package/bin/tools/trimIndent.d.ts +0 -5
  54. package/src/bin/initialize-account-theme/copyBoilerplate.ts +0 -32
  55. package/src/bin/initialize-account-theme/initializeAccountTheme_multiPage.ts +0 -21
  56. package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +0 -142
  57. package/src/bin/initialize-account-theme/src/single-page/KcContext.ts +0 -7
  58. package/src/bin/initialize-account-theme/src/single-page/KcPage.tsx +0 -11
  59. package/src/bin/shared/getLatestsSemVersionedTag.ts +0 -201
  60. package/src/bin/shared/promptKeycloakVersion.ts +0 -72
  61. package/src/bin/tools/OptionalIfCanBeUndefined.ts +0 -12
  62. package/src/bin/tools/crc32.ts +0 -73
  63. package/src/bin/tools/deflate.ts +0 -61
  64. package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +0 -47
  65. package/src/bin/tools/octokit-addons/listTags.ts +0 -60
  66. package/src/bin/tools/tee.ts +0 -39
  67. package/src/bin/tools/trimIndent.ts +0 -49
  68. /package/bin/shared/{addSyncExtensionsToPostinstallScript.d.ts → initializeSpa/addSyncExtensionsToPostinstallScript.d.ts} +0 -0
  69. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcContext.ts +0 -0
  70. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPage.tsx +0 -0
  71. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPageStory.tsx +0 -0
  72. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/i18n.ts +0 -0
package/bin/363.index.js CHANGED
@@ -3,7 +3,7 @@ exports.id = 363;
3
3
  exports.ids = [363];
4
4
  exports.modules = {
5
5
 
6
- /***/ 53090:
6
+ /***/ 77372:
7
7
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
8
 
9
9
 
@@ -25,82 +25,8 @@ var external_path_ = __webpack_require__(71017);
25
25
  var promises_ = __webpack_require__(73292);
26
26
  // EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
27
27
  var fs_existsAsync = __webpack_require__(43765);
28
- // EXTERNAL MODULE: ./dist/bin/tools/getInstalledModuleDirPath.js
29
- var getInstalledModuleDirPath = __webpack_require__(21022);
30
- // EXTERNAL MODULE: ./node_modules/tsafe/esm/exclude.mjs
31
- var exclude = __webpack_require__(83101);
32
- ;// CONCATENATED MODULE: ./dist/bin/tools/listInstalledModules.js
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
- async function listInstalledModules(params) {
41
- const { packageJsonFilePath, projectDirPath, filter } = params;
42
- const parsedPackageJson = await readPackageJsonDependencies({
43
- packageJsonFilePath
44
- });
45
- const extensionModuleNames = [parsedPackageJson.dependencies, parsedPackageJson.devDependencies]
46
- .filter((0,exclude/* exclude */.D)(undefined))
47
- .map(obj => Object.keys(obj))
48
- .flat()
49
- .filter(moduleName => filter({ moduleName }));
50
- const result = await Promise.all(extensionModuleNames.map(async (moduleName) => {
51
- const dirPath = await (0,getInstalledModuleDirPath/* getInstalledModuleDirPath */.p)({
52
- moduleName,
53
- packageJsonDirPath: (0,external_path_.dirname)(packageJsonFilePath),
54
- projectDirPath
55
- });
56
- const { version, peerDependencies } = await readPackageJsonVersionAndPeerDependencies({
57
- packageJsonFilePath: (0,external_path_.join)(dirPath, "package.json")
58
- });
59
- return { moduleName, version, peerDependencies, dirPath };
60
- }));
61
- return result;
62
- }
63
- const { readPackageJsonDependencies } = (() => {
64
- const zParsedPackageJson = (() => {
65
- const zTargetType = lib.z.object({
66
- dependencies: lib.z.record(lib.z.string()).optional(),
67
- devDependencies: lib.z.record(lib.z.string()).optional()
68
- });
69
- (0,assert/* assert */.h)();
70
- return (0,id.id)(zTargetType);
71
- })();
72
- async function readPackageJsonDependencies(params) {
73
- const { packageJsonFilePath } = params;
74
- const parsedPackageJson = JSON.parse((await promises_.readFile(packageJsonFilePath)).toString("utf8"));
75
- zParsedPackageJson.parse(parsedPackageJson);
76
- (0,assert/* assert */.h)((0,assert.is)(parsedPackageJson));
77
- return parsedPackageJson;
78
- }
79
- return { readPackageJsonDependencies };
80
- })();
81
- const { readPackageJsonVersionAndPeerDependencies } = (() => {
82
- const zParsedPackageJson = (() => {
83
- const zTargetType = lib.z.object({
84
- version: lib.z.string(),
85
- peerDependencies: lib.z.record(lib.z.string()).optional()
86
- });
87
- (0,assert/* assert */.h)();
88
- return (0,id.id)(zTargetType);
89
- })();
90
- async function readPackageJsonVersionAndPeerDependencies(params) {
91
- var _a;
92
- const { packageJsonFilePath } = params;
93
- const parsedPackageJson = JSON.parse((await promises_.readFile(packageJsonFilePath)).toString("utf8"));
94
- zParsedPackageJson.parse(parsedPackageJson);
95
- (0,assert/* assert */.h)((0,assert.is)(parsedPackageJson));
96
- return {
97
- version: parsedPackageJson.version,
98
- peerDependencies: (_a = parsedPackageJson.peerDependencies) !== null && _a !== void 0 ? _a : {}
99
- };
100
- }
101
- return { readPackageJsonVersionAndPeerDependencies };
102
- })();
103
- //# sourceMappingURL=listInstalledModules.js.map
28
+ // EXTERNAL MODULE: ./dist/bin/tools/listInstalledModules.js
29
+ var listInstalledModules = __webpack_require__(75564);
104
30
  ;// CONCATENATED MODULE: ./dist/bin/tools/crawlAsync.js
105
31
 
106
32
 
@@ -147,6 +73,8 @@ var getExtensionModuleFileSourceCodeReadyToBeCopied = __webpack_require__(2237);
147
73
  var external_crypto_ = __webpack_require__(6113);
148
74
  // EXTERNAL MODULE: ./dist/bin/shared/constants.js
149
75
  var constants = __webpack_require__(173);
76
+ // EXTERNAL MODULE: ./node_modules/tsafe/esm/exclude.mjs
77
+ var exclude = __webpack_require__(83101);
150
78
  ;// CONCATENATED MODULE: ./node_modules/tsafe/esm/isAmong.mjs
151
79
  /** https://docs.tsafe.dev/isamong */
152
80
  function isAmong(names, value) {
@@ -215,9 +143,8 @@ async function getExtensionModuleMetas(params) {
215
143
  return configHash;
216
144
  })();
217
145
  const installedExtensionModules = await (async () => {
218
- const installedModulesWithKeycloakifyInTheName = await listInstalledModules({
146
+ const installedModulesWithKeycloakifyInTheName = await (0,listInstalledModules/* listInstalledModules */.P)({
219
147
  packageJsonFilePath: buildContext.packageJsonFilePath,
220
- projectDirPath: buildContext.packageJsonFilePath,
221
148
  filter: ({ moduleName }) => moduleName.includes("keycloakify") && moduleName !== "keycloakify"
222
149
  });
223
150
  return (await Promise.all(installedModulesWithKeycloakifyInTheName.map(async (entry) => {
@@ -427,7 +354,10 @@ function addCommentToSourceCode(params) {
427
354
  if (fileRelativePath.endsWith(".html") || fileRelativePath.endsWith(".svg")) {
428
355
  const comment = [
429
356
  `<!--`,
430
- ...commentLines.map(line => ` ${line.replace("--path", "-p").replace("Before modifying", "Before modifying or replacing")}`),
357
+ ...commentLines.map(line => ` ${line
358
+ .replace("--path", "-t")
359
+ .replace("--revert", "-r")
360
+ .replace("Before modifying", "Before modifying or replacing")}`),
431
361
  `-->`
432
362
  ].join("\n");
433
363
  if (fileRelativePath.endsWith(".html") && sourceCode.trim().startsWith("<!")) {
@@ -557,8 +487,8 @@ __webpack_require__.d(__webpack_exports__, {
557
487
  "W": () => (/* binding */ command)
558
488
  });
559
489
 
560
- // EXTERNAL MODULE: ./dist/bin/sync-extensions/extensionModuleMeta.js + 3 modules
561
- var sync_extensions_extensionModuleMeta = __webpack_require__(53090);
490
+ // EXTERNAL MODULE: ./dist/bin/sync-extensions/extensionModuleMeta.js + 2 modules
491
+ var sync_extensions_extensionModuleMeta = __webpack_require__(77372);
562
492
  // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
563
493
  var assert = __webpack_require__(29041);
564
494
  // EXTERNAL MODULE: ./node_modules/zod/lib/index.mjs
@@ -949,53 +879,170 @@ function rmSync(dirPath, options) {
949
879
 
950
880
  /***/ }),
951
881
 
952
- /***/ 21022:
882
+ /***/ 93721:
953
883
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
954
884
 
955
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
956
- /* harmony export */ "p": () => (/* binding */ getInstalledModuleDirPath)
957
- /* harmony export */ });
958
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
959
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
960
- /* harmony import */ var _fs_existsAsync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43765);
961
- /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32081);
962
- /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_2__);
963
- /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29041);
885
+
886
+ // EXPORTS
887
+ __webpack_require__.d(__webpack_exports__, {
888
+ "p": () => (/* binding */ getInstalledModuleDirPath)
889
+ });
890
+
891
+ // EXTERNAL MODULE: external "path"
892
+ var external_path_ = __webpack_require__(71017);
893
+ // EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
894
+ var fs_existsAsync = __webpack_require__(43765);
895
+ // EXTERNAL MODULE: external "child_process"
896
+ var external_child_process_ = __webpack_require__(32081);
897
+ // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
898
+ var assert = __webpack_require__(29041);
899
+ ;// CONCATENATED MODULE: ./dist/bin/tools/isRootPath.js
900
+
901
+ function getIsRootPath(filePath) {
902
+ const path_normalized = (0,external_path_.normalize)(filePath);
903
+ // Unix-like root ("/")
904
+ if (path_normalized === "/") {
905
+ return true;
906
+ }
907
+ // Check for Windows drive root (e.g., "C:\\")
908
+ if (/^[a-zA-Z]:\\$/.test(path_normalized)) {
909
+ return true;
910
+ }
911
+ // Check for UNC root (e.g., "\\server\share")
912
+ if (/^\\\\[^\\]+\\[^\\]+\\?$/.test(path_normalized)) {
913
+ return true;
914
+ }
915
+ return false;
916
+ }
917
+ //# sourceMappingURL=isRootPath.js.map
918
+ ;// CONCATENATED MODULE: ./dist/bin/tools/getInstalledModuleDirPath.js
919
+
964
920
 
965
921
 
966
922
 
967
923
 
968
924
  async function getInstalledModuleDirPath(params) {
969
- const { moduleName, packageJsonDirPath, projectDirPath } = params;
970
- common_case: {
971
- const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(...[packageJsonDirPath, "node_modules", ...moduleName.split("/")]);
972
- if (!(await (0,_fs_existsAsync__WEBPACK_IMPORTED_MODULE_1__/* .existsAsync */ .o)(dirPath))) {
973
- break common_case;
974
- }
975
- return dirPath;
976
- }
977
- node_modules_at_root_case: {
978
- if (projectDirPath === packageJsonDirPath) {
979
- break node_modules_at_root_case;
980
- }
981
- const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(...[projectDirPath, "node_modules", ...moduleName.split("/")]);
982
- if (!(await (0,_fs_existsAsync__WEBPACK_IMPORTED_MODULE_1__/* .existsAsync */ .o)(dirPath))) {
983
- break node_modules_at_root_case;
925
+ const { moduleName, packageJsonDirPath } = params;
926
+ {
927
+ let dirPath = packageJsonDirPath;
928
+ while (true) {
929
+ const dirPath_candidate = (0,external_path_.join)(dirPath, "node_modules", ...moduleName.split("/"));
930
+ let doesExist;
931
+ try {
932
+ doesExist = await (0,fs_existsAsync/* existsAsync */.o)(dirPath_candidate);
933
+ }
934
+ catch (_a) {
935
+ doesExist = false;
936
+ }
937
+ if (doesExist) {
938
+ return dirPath_candidate;
939
+ }
940
+ if (getIsRootPath(dirPath)) {
941
+ break;
942
+ }
943
+ dirPath = (0,external_path_.join)(dirPath, "..");
984
944
  }
985
- return dirPath;
986
945
  }
987
- const dirPath = child_process__WEBPACK_IMPORTED_MODULE_2__.execSync(`npm list ${moduleName}`, {
946
+ const dirPath = external_child_process_.execSync(`npm list ${moduleName}`, {
988
947
  cwd: packageJsonDirPath
989
948
  })
990
949
  .toString("utf8")
991
950
  .trim();
992
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(dirPath !== "");
951
+ (0,assert/* assert */.h)(dirPath !== "");
993
952
  return dirPath;
994
953
  }
995
954
  //# sourceMappingURL=getInstalledModuleDirPath.js.map
996
955
 
997
956
  /***/ }),
998
957
 
958
+ /***/ 75564:
959
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
960
+
961
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
962
+ /* harmony export */ "P": () => (/* binding */ listInstalledModules)
963
+ /* harmony export */ });
964
+ /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29041);
965
+ /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38469);
966
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52300);
967
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
968
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
969
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73292);
970
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
971
+ /* harmony import */ var _tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93721);
972
+ /* harmony import */ var tsafe_exclude__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(83101);
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+ async function listInstalledModules(params) {
981
+ const { packageJsonFilePath, filter } = params;
982
+ const parsedPackageJson = await readPackageJsonDependencies({
983
+ packageJsonFilePath
984
+ });
985
+ const extensionModuleNames = [parsedPackageJson.dependencies, parsedPackageJson.devDependencies]
986
+ .filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_4__/* .exclude */ .D)(undefined))
987
+ .map(obj => Object.keys(obj))
988
+ .flat()
989
+ .filter(moduleName => filter({ moduleName }));
990
+ const result = await Promise.all(extensionModuleNames.map(async (moduleName) => {
991
+ const dirPath = await (0,_tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getInstalledModuleDirPath */ .p)({
992
+ moduleName,
993
+ packageJsonDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.dirname)(packageJsonFilePath)
994
+ });
995
+ const { version, peerDependencies } = await readPackageJsonVersionAndPeerDependencies({
996
+ packageJsonFilePath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(dirPath, "package.json")
997
+ });
998
+ return { moduleName, version, peerDependencies, dirPath };
999
+ }));
1000
+ return result;
1001
+ }
1002
+ const { readPackageJsonDependencies } = (() => {
1003
+ const zParsedPackageJson = (() => {
1004
+ const zTargetType = zod__WEBPACK_IMPORTED_MODULE_5__.z.object({
1005
+ dependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional(),
1006
+ devDependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional()
1007
+ });
1008
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
1009
+ return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(zTargetType);
1010
+ })();
1011
+ async function readPackageJsonDependencies(params) {
1012
+ const { packageJsonFilePath } = params;
1013
+ const parsedPackageJson = JSON.parse((await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(packageJsonFilePath)).toString("utf8"));
1014
+ zParsedPackageJson.parse(parsedPackageJson);
1015
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__.is)(parsedPackageJson));
1016
+ return parsedPackageJson;
1017
+ }
1018
+ return { readPackageJsonDependencies };
1019
+ })();
1020
+ const { readPackageJsonVersionAndPeerDependencies } = (() => {
1021
+ const zParsedPackageJson = (() => {
1022
+ const zTargetType = zod__WEBPACK_IMPORTED_MODULE_5__.z.object({
1023
+ version: zod__WEBPACK_IMPORTED_MODULE_5__.z.string(),
1024
+ peerDependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional()
1025
+ });
1026
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
1027
+ return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(zTargetType);
1028
+ })();
1029
+ async function readPackageJsonVersionAndPeerDependencies(params) {
1030
+ var _a;
1031
+ const { packageJsonFilePath } = params;
1032
+ const parsedPackageJson = JSON.parse((await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(packageJsonFilePath)).toString("utf8"));
1033
+ zParsedPackageJson.parse(parsedPackageJson);
1034
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__.is)(parsedPackageJson));
1035
+ return {
1036
+ version: parsedPackageJson.version,
1037
+ peerDependencies: (_a = parsedPackageJson.peerDependencies) !== null && _a !== void 0 ? _a : {}
1038
+ };
1039
+ }
1040
+ return { readPackageJsonVersionAndPeerDependencies };
1041
+ })();
1042
+ //# sourceMappingURL=listInstalledModules.js.map
1043
+
1044
+ /***/ }),
1045
+
999
1046
  /***/ 73776:
1000
1047
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1001
1048
 
@@ -1487,41 +1534,6 @@ async function runPrettier(params) {
1487
1534
  }
1488
1535
  //# sourceMappingURL=runPrettier.js.map
1489
1536
 
1490
- /***/ }),
1491
-
1492
- /***/ 23483:
1493
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1494
-
1495
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1496
- /* harmony export */ "Y": () => (/* binding */ objectKeys)
1497
- /* harmony export */ });
1498
- /** https://docs.tsafe.dev/objectKeys */
1499
- function objectKeys(o) {
1500
- return Object.keys(o);
1501
- }
1502
-
1503
-
1504
- //# sourceMappingURL=objectKeys.mjs.map
1505
-
1506
-
1507
- /***/ }),
1508
-
1509
- /***/ 76030:
1510
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1511
-
1512
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1513
- /* harmony export */ "r": () => (/* binding */ symToStr)
1514
- /* harmony export */ });
1515
- /** @see <https://docs.tsafe.dev/main/symtostr> */
1516
- function symToStr(wrap) {
1517
- // @ts-expect-error: We know better
1518
- return Object.keys(wrap)[0];
1519
- }
1520
-
1521
-
1522
- //# sourceMappingURL=symToStr.mjs.map
1523
-
1524
-
1525
1537
  /***/ })
1526
1538
 
1527
1539
  };
package/bin/453.index.js CHANGED
@@ -76,47 +76,11 @@ async function command(params) {
76
76
  if (themeType === "account" &&
77
77
  ((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(buildContext.implementedThemeTypes.account.isImplemented),
78
78
  buildContext.implementedThemeTypes.account.type === "Single-Page")) {
79
- const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,path__WEBPACK_IMPORTED_MODULE_4__.dirname)(buildContext.packageJsonFilePath), "node_modules", "@keycloakify", `keycloak-account-ui`, "src");
80
- console.log([
81
- `There isn't an interactive CLI to eject components of the Account SPA UI.`,
82
- `You can however copy paste into your codebase the any file or directory from the following source directory:`,
83
- ``,
84
- `${chalk__WEBPACK_IMPORTED_MODULE_6___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.join)((0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), srcDirPath)))}`,
85
- ``
86
- ].join("\n"));
87
- eject_entrypoint: {
88
- const kcUiTsxFileRelativePath = `KcAccountUi.tsx`;
89
- const themeSrcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(buildContext.themeSrcDirPath, "account");
90
- const targetFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(themeSrcDirPath, kcUiTsxFileRelativePath);
91
- if (fs__WEBPACK_IMPORTED_MODULE_3__.existsSync(targetFilePath)) {
92
- break eject_entrypoint;
93
- }
94
- fs__WEBPACK_IMPORTED_MODULE_3__.cpSync((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(srcDirPath, kcUiTsxFileRelativePath), targetFilePath);
95
- {
96
- const kcPageTsxFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(themeSrcDirPath, "KcPage.tsx");
97
- const kcPageTsxCode = fs__WEBPACK_IMPORTED_MODULE_3__.readFileSync(kcPageTsxFilePath).toString("utf8");
98
- const componentName = (0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(kcUiTsxFileRelativePath).replace(/.tsx$/, "");
99
- let modifiedKcPageTsxCode = kcPageTsxCode.replace(`@keycloakify/keycloak-account-ui/${componentName}`, `./${componentName}`);
100
- run_prettier: {
101
- if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_8__/* .getIsPrettierAvailable */ .MT)())) {
102
- break run_prettier;
103
- }
104
- modifiedKcPageTsxCode = await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_8__/* .runPrettier */ .eY)({
105
- filePath: kcPageTsxFilePath,
106
- sourceCode: modifiedKcPageTsxCode
107
- });
108
- }
109
- fs__WEBPACK_IMPORTED_MODULE_3__.writeFileSync(kcPageTsxFilePath, Buffer.from(modifiedKcPageTsxCode, "utf8"));
110
- }
111
- const routesTsxFilePath = (0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(srcDirPath, "routes.tsx"));
112
- console.log([
113
- `To help you get started ${chalk__WEBPACK_IMPORTED_MODULE_6___default().bold((0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), targetFilePath))} has been copied into your project.`,
114
- `The next step is usually to eject ${chalk__WEBPACK_IMPORTED_MODULE_6___default().bold(routesTsxFilePath)}`,
115
- `with \`cp ${routesTsxFilePath} ${(0,path__WEBPACK_IMPORTED_MODULE_4__.relative)(process.cwd(), themeSrcDirPath)}\``,
116
- `then update the import of routes in ${kcUiTsxFileRelativePath}.`
117
- ].join("\n"));
118
- }
119
- process.exit(0);
79
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_6___default().yellow([
80
+ "You are implementing a Single-Page Account theme.",
81
+ "The eject-page command isn't applicable in this context"
82
+ ].join("\n")));
83
+ process.exit(1);
120
84
  return;
121
85
  }
122
86
  console.log(`→ ${themeType}`);