keycloakify 11.6.2 → 11.7.0

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 (69) hide show
  1. package/bin/{735.index.js → 288.index.js} +226 -360
  2. package/bin/313.index.js +377 -0
  3. package/bin/{174.index.js → 33.index.js} +37 -2
  4. package/bin/{840.index.js → 355.index.js} +348 -97
  5. package/bin/363.index.js +153 -144
  6. package/bin/453.index.js +5 -41
  7. package/bin/{503.index.js → 678.index.js} +577 -53
  8. package/bin/{921.index.js → 780.index.js} +54 -45
  9. package/bin/880.index.js +206 -21
  10. package/bin/9.index.js +850 -0
  11. package/bin/{525.index.js → 911.index.js} +1302 -2
  12. package/bin/930.index.js +3 -4
  13. package/bin/{153.index.js → 947.index.js} +22 -797
  14. package/bin/main.js +6 -6
  15. package/bin/shared/initializeSpa/index.d.ts +1 -0
  16. package/bin/shared/initializeSpa/initializeSpa.d.ts +9 -0
  17. package/bin/tools/getInstalledModuleDirPath.d.ts +0 -1
  18. package/bin/tools/isRootPath.d.ts +1 -0
  19. package/bin/tools/listInstalledModules.d.ts +0 -1
  20. package/package.json +22 -44
  21. package/src/bin/eject-page.ts +7 -81
  22. package/src/bin/initialize-account-theme/initialize-account-theme.ts +15 -14
  23. package/src/bin/initialize-admin-theme.ts +17 -124
  24. package/src/bin/initialize-email-theme.ts +10 -34
  25. package/src/bin/keycloakify/generateResources/generateResources.ts +49 -21
  26. package/src/bin/own.ts +1 -2
  27. package/src/bin/shared/{addSyncExtensionsToPostinstallScript.ts → initializeSpa/addSyncExtensionsToPostinstallScript.ts} +2 -2
  28. package/src/bin/shared/initializeSpa/index.ts +1 -0
  29. package/src/bin/shared/initializeSpa/initializeSpa.ts +149 -0
  30. package/src/bin/sync-extensions/extensionModuleMeta.ts +0 -1
  31. package/src/bin/tools/getInstalledModuleDirPath.ts +24 -22
  32. package/src/bin/tools/isRootPath.ts +22 -0
  33. package/src/bin/tools/listInstalledModules.ts +2 -4
  34. package/src/bin/tsconfig.json +1 -1
  35. package/bin/375.index.js +0 -4089
  36. package/bin/490.index.js +0 -1108
  37. package/bin/568.index.js +0 -1867
  38. package/bin/743.index.js +0 -69
  39. package/bin/initialize-account-theme/copyBoilerplate.d.ts +0 -4
  40. package/bin/initialize-account-theme/initializeAccountTheme_multiPage.d.ts +0 -3
  41. package/bin/initialize-account-theme/initializeAccountTheme_singlePage.d.ts +0 -11
  42. package/bin/shared/getLatestsSemVersionedTag.d.ts +0 -15
  43. package/bin/shared/promptKeycloakVersion.d.ts +0 -10
  44. package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
  45. package/bin/tools/crc32.d.ts +0 -9
  46. package/bin/tools/deflate.d.ts +0 -24
  47. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -15
  48. package/bin/tools/octokit-addons/listTags.d.ts +0 -13
  49. package/bin/tools/tee.d.ts +0 -3
  50. package/bin/tools/trimIndent.d.ts +0 -5
  51. package/src/bin/initialize-account-theme/copyBoilerplate.ts +0 -32
  52. package/src/bin/initialize-account-theme/initializeAccountTheme_multiPage.ts +0 -21
  53. package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +0 -142
  54. package/src/bin/initialize-account-theme/src/single-page/KcContext.ts +0 -7
  55. package/src/bin/initialize-account-theme/src/single-page/KcPage.tsx +0 -11
  56. package/src/bin/shared/getLatestsSemVersionedTag.ts +0 -201
  57. package/src/bin/shared/promptKeycloakVersion.ts +0 -72
  58. package/src/bin/tools/OptionalIfCanBeUndefined.ts +0 -12
  59. package/src/bin/tools/crc32.ts +0 -73
  60. package/src/bin/tools/deflate.ts +0 -61
  61. package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +0 -47
  62. package/src/bin/tools/octokit-addons/listTags.ts +0 -60
  63. package/src/bin/tools/tee.ts +0 -39
  64. package/src/bin/tools/trimIndent.ts +0 -49
  65. /package/bin/shared/{addSyncExtensionsToPostinstallScript.d.ts → initializeSpa/addSyncExtensionsToPostinstallScript.d.ts} +0 -0
  66. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcContext.ts +0 -0
  67. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPage.tsx +0 -0
  68. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPageStory.tsx +0 -0
  69. /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) => {
@@ -557,8 +484,8 @@ __webpack_require__.d(__webpack_exports__, {
557
484
  "W": () => (/* binding */ command)
558
485
  });
559
486
 
560
- // EXTERNAL MODULE: ./dist/bin/sync-extensions/extensionModuleMeta.js + 3 modules
561
- var sync_extensions_extensionModuleMeta = __webpack_require__(53090);
487
+ // EXTERNAL MODULE: ./dist/bin/sync-extensions/extensionModuleMeta.js + 2 modules
488
+ var sync_extensions_extensionModuleMeta = __webpack_require__(77372);
562
489
  // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
563
490
  var assert = __webpack_require__(29041);
564
491
  // EXTERNAL MODULE: ./node_modules/zod/lib/index.mjs
@@ -949,53 +876,170 @@ function rmSync(dirPath, options) {
949
876
 
950
877
  /***/ }),
951
878
 
952
- /***/ 21022:
879
+ /***/ 93721:
953
880
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
954
881
 
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);
882
+
883
+ // EXPORTS
884
+ __webpack_require__.d(__webpack_exports__, {
885
+ "p": () => (/* binding */ getInstalledModuleDirPath)
886
+ });
887
+
888
+ // EXTERNAL MODULE: external "path"
889
+ var external_path_ = __webpack_require__(71017);
890
+ // EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
891
+ var fs_existsAsync = __webpack_require__(43765);
892
+ // EXTERNAL MODULE: external "child_process"
893
+ var external_child_process_ = __webpack_require__(32081);
894
+ // EXTERNAL MODULE: ./node_modules/tsafe/esm/assert.mjs + 1 modules
895
+ var assert = __webpack_require__(29041);
896
+ ;// CONCATENATED MODULE: ./dist/bin/tools/isRootPath.js
897
+
898
+ function getIsRootPath(filePath) {
899
+ const path_normalized = (0,external_path_.normalize)(filePath);
900
+ // Unix-like root ("/")
901
+ if (path_normalized === "/") {
902
+ return true;
903
+ }
904
+ // Check for Windows drive root (e.g., "C:\\")
905
+ if (/^[a-zA-Z]:\\$/.test(path_normalized)) {
906
+ return true;
907
+ }
908
+ // Check for UNC root (e.g., "\\server\share")
909
+ if (/^\\\\[^\\]+\\[^\\]+\\?$/.test(path_normalized)) {
910
+ return true;
911
+ }
912
+ return false;
913
+ }
914
+ //# sourceMappingURL=isRootPath.js.map
915
+ ;// CONCATENATED MODULE: ./dist/bin/tools/getInstalledModuleDirPath.js
916
+
964
917
 
965
918
 
966
919
 
967
920
 
968
921
  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;
922
+ const { moduleName, packageJsonDirPath } = params;
923
+ {
924
+ let dirPath = packageJsonDirPath;
925
+ while (true) {
926
+ const dirPath_candidate = (0,external_path_.join)(dirPath, "node_modules", ...moduleName.split("/"));
927
+ let doesExist;
928
+ try {
929
+ doesExist = await (0,fs_existsAsync/* existsAsync */.o)(dirPath_candidate);
930
+ }
931
+ catch (_a) {
932
+ doesExist = false;
933
+ }
934
+ if (doesExist) {
935
+ return dirPath_candidate;
936
+ }
937
+ if (getIsRootPath(dirPath)) {
938
+ break;
939
+ }
940
+ dirPath = (0,external_path_.join)(dirPath, "..");
984
941
  }
985
- return dirPath;
986
942
  }
987
- const dirPath = child_process__WEBPACK_IMPORTED_MODULE_2__.execSync(`npm list ${moduleName}`, {
943
+ const dirPath = external_child_process_.execSync(`npm list ${moduleName}`, {
988
944
  cwd: packageJsonDirPath
989
945
  })
990
946
  .toString("utf8")
991
947
  .trim();
992
- (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .h)(dirPath !== "");
948
+ (0,assert/* assert */.h)(dirPath !== "");
993
949
  return dirPath;
994
950
  }
995
951
  //# sourceMappingURL=getInstalledModuleDirPath.js.map
996
952
 
997
953
  /***/ }),
998
954
 
955
+ /***/ 75564:
956
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
957
+
958
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
959
+ /* harmony export */ "P": () => (/* binding */ listInstalledModules)
960
+ /* harmony export */ });
961
+ /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29041);
962
+ /* harmony import */ var tsafe_id__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38469);
963
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52300);
964
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
965
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
966
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73292);
967
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_2__);
968
+ /* harmony import */ var _tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93721);
969
+ /* harmony import */ var tsafe_exclude__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(83101);
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+ async function listInstalledModules(params) {
978
+ const { packageJsonFilePath, filter } = params;
979
+ const parsedPackageJson = await readPackageJsonDependencies({
980
+ packageJsonFilePath
981
+ });
982
+ const extensionModuleNames = [parsedPackageJson.dependencies, parsedPackageJson.devDependencies]
983
+ .filter((0,tsafe_exclude__WEBPACK_IMPORTED_MODULE_4__/* .exclude */ .D)(undefined))
984
+ .map(obj => Object.keys(obj))
985
+ .flat()
986
+ .filter(moduleName => filter({ moduleName }));
987
+ const result = await Promise.all(extensionModuleNames.map(async (moduleName) => {
988
+ const dirPath = await (0,_tools_getInstalledModuleDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getInstalledModuleDirPath */ .p)({
989
+ moduleName,
990
+ packageJsonDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.dirname)(packageJsonFilePath)
991
+ });
992
+ const { version, peerDependencies } = await readPackageJsonVersionAndPeerDependencies({
993
+ packageJsonFilePath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(dirPath, "package.json")
994
+ });
995
+ return { moduleName, version, peerDependencies, dirPath };
996
+ }));
997
+ return result;
998
+ }
999
+ const { readPackageJsonDependencies } = (() => {
1000
+ const zParsedPackageJson = (() => {
1001
+ const zTargetType = zod__WEBPACK_IMPORTED_MODULE_5__.z.object({
1002
+ dependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional(),
1003
+ devDependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional()
1004
+ });
1005
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
1006
+ return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(zTargetType);
1007
+ })();
1008
+ async function readPackageJsonDependencies(params) {
1009
+ const { packageJsonFilePath } = params;
1010
+ const parsedPackageJson = JSON.parse((await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(packageJsonFilePath)).toString("utf8"));
1011
+ zParsedPackageJson.parse(parsedPackageJson);
1012
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__.is)(parsedPackageJson));
1013
+ return parsedPackageJson;
1014
+ }
1015
+ return { readPackageJsonDependencies };
1016
+ })();
1017
+ const { readPackageJsonVersionAndPeerDependencies } = (() => {
1018
+ const zParsedPackageJson = (() => {
1019
+ const zTargetType = zod__WEBPACK_IMPORTED_MODULE_5__.z.object({
1020
+ version: zod__WEBPACK_IMPORTED_MODULE_5__.z.string(),
1021
+ peerDependencies: zod__WEBPACK_IMPORTED_MODULE_5__.z.record(zod__WEBPACK_IMPORTED_MODULE_5__.z.string()).optional()
1022
+ });
1023
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)();
1024
+ return (0,tsafe_id__WEBPACK_IMPORTED_MODULE_6__.id)(zTargetType);
1025
+ })();
1026
+ async function readPackageJsonVersionAndPeerDependencies(params) {
1027
+ var _a;
1028
+ const { packageJsonFilePath } = params;
1029
+ const parsedPackageJson = JSON.parse((await fs_promises__WEBPACK_IMPORTED_MODULE_2__.readFile(packageJsonFilePath)).toString("utf8"));
1030
+ zParsedPackageJson.parse(parsedPackageJson);
1031
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__/* .assert */ .h)((0,tsafe_assert__WEBPACK_IMPORTED_MODULE_0__.is)(parsedPackageJson));
1032
+ return {
1033
+ version: parsedPackageJson.version,
1034
+ peerDependencies: (_a = parsedPackageJson.peerDependencies) !== null && _a !== void 0 ? _a : {}
1035
+ };
1036
+ }
1037
+ return { readPackageJsonVersionAndPeerDependencies };
1038
+ })();
1039
+ //# sourceMappingURL=listInstalledModules.js.map
1040
+
1041
+ /***/ }),
1042
+
999
1043
  /***/ 73776:
1000
1044
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1001
1045
 
@@ -1487,41 +1531,6 @@ async function runPrettier(params) {
1487
1531
  }
1488
1532
  //# sourceMappingURL=runPrettier.js.map
1489
1533
 
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
1534
  /***/ })
1526
1535
 
1527
1536
  };
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}`);