keycloakify 11.5.4 → 11.6.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.
- package/bin/153.index.js +81 -28
- package/bin/356.index.js +48 -25
- package/bin/{573.index.js → 880.index.js} +155 -9
- package/bin/main.js +5 -4
- package/bin/tools/createObjectThatThrowsIfAccessed.d.ts +21 -0
- package/package.json +5 -2
- package/src/bin/keycloakify/generateResources/generateResources.ts +162 -6
- package/src/bin/main.ts +4 -3
- package/src/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts +63 -24
- package/src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-22.json +2201 -0
- package/src/bin/start-keycloak/start-keycloak.ts +131 -36
- package/src/bin/tools/createObjectThatThrowsIfAccessed.ts +90 -0
package/bin/153.index.js
CHANGED
@@ -1317,13 +1317,57 @@ async function command(params) {
|
|
1317
1317
|
source_default().cyan("On which version of Keycloak do you want to test your theme?"),
|
1318
1318
|
source_default().gray("You can also explicitly provide the version with `npx keycloakify start-keycloak --keycloak-version 26` (or any other version)")
|
1319
1319
|
].join("\n"));
|
1320
|
-
const
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1320
|
+
const tag_userSelected = await (async () => {
|
1321
|
+
let tag;
|
1322
|
+
let latestMajorTags_copy = [...latestMajorTags];
|
1323
|
+
while (true) {
|
1324
|
+
const { value } = await dist_default()({
|
1325
|
+
values: latestMajorTags_copy
|
1326
|
+
}).catch(() => {
|
1327
|
+
process.exit(-1);
|
1328
|
+
});
|
1329
|
+
tag = value;
|
1330
|
+
{
|
1331
|
+
const doImplementAccountMpa = buildContext.implementedThemeTypes.account.isImplemented &&
|
1332
|
+
buildContext.implementedThemeTypes.account.type === "Multi-Page";
|
1333
|
+
if (doImplementAccountMpa && tag.startsWith("22.")) {
|
1334
|
+
console.log(source_default().yellow(`You are implementing a Multi-Page Account theme. Keycloak 22 is not supported, select another version`));
|
1335
|
+
latestMajorTags_copy = latestMajorTags_copy.filter(tag => !tag.startsWith("22."));
|
1336
|
+
continue;
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
const readMajor = (tag) => {
|
1340
|
+
const major = parseInt(tag.split(".")[0]);
|
1341
|
+
(0,assert/* assert */.h)(!isNaN(major));
|
1342
|
+
return major;
|
1343
|
+
};
|
1344
|
+
{
|
1345
|
+
const major = readMajor(tag);
|
1346
|
+
const doImplementAdminTheme = buildContext.implementedThemeTypes.admin.isImplemented;
|
1347
|
+
const getIsSupported = (major) => major >= 23;
|
1348
|
+
if (doImplementAdminTheme && !getIsSupported(major)) {
|
1349
|
+
console.log(source_default().yellow(`You are implementing an Admin theme. Only Keycloak 23 and later are supported, select another version`));
|
1350
|
+
latestMajorTags_copy = latestMajorTags_copy.filter(tag => getIsSupported(readMajor(tag)));
|
1351
|
+
continue;
|
1352
|
+
}
|
1353
|
+
}
|
1354
|
+
{
|
1355
|
+
const doImplementAccountSpa = buildContext.implementedThemeTypes.account.isImplemented &&
|
1356
|
+
buildContext.implementedThemeTypes.account.type === "Single-Page";
|
1357
|
+
const major = readMajor(tag);
|
1358
|
+
const getIsSupported = (major) => major >= 19;
|
1359
|
+
if (doImplementAccountSpa && !getIsSupported(major)) {
|
1360
|
+
console.log(source_default().yellow(`You are implementing a Single-Page Account theme. Only Keycloak 19 and later are supported, select another version`));
|
1361
|
+
latestMajorTags_copy = latestMajorTags_copy.filter(tag => getIsSupported(readMajor(tag)));
|
1362
|
+
continue;
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
break;
|
1366
|
+
}
|
1367
|
+
return tag;
|
1368
|
+
})();
|
1369
|
+
console.log(`→ ${tag_userSelected}`);
|
1370
|
+
return { dockerImageTag: tag_userSelected };
|
1327
1371
|
})();
|
1328
1372
|
const keycloakMajorVersionNumber = (() => {
|
1329
1373
|
const [wrap] = getSupportedKeycloakMajorVersions()
|
@@ -1634,31 +1678,40 @@ async function command(params) {
|
|
1634
1678
|
ignoreInitial: true
|
1635
1679
|
})
|
1636
1680
|
.on("all", async (...[, filePath]) => {
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
if (!doImplementAccountSpa) {
|
1641
|
-
break ignore_account_spa;
|
1681
|
+
ignore_path_covered_by_hmr: {
|
1682
|
+
if (filePath.endsWith(".properties")) {
|
1683
|
+
break ignore_path_covered_by_hmr;
|
1642
1684
|
}
|
1643
|
-
if (!
|
1644
|
-
|
1645
|
-
filePath
|
1646
|
-
})) {
|
1647
|
-
break ignore_account_spa;
|
1685
|
+
if (!doStartDevServer) {
|
1686
|
+
break ignore_path_covered_by_hmr;
|
1648
1687
|
}
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1688
|
+
ignore_account_spa: {
|
1689
|
+
const doImplementAccountSpa = buildContext.implementedThemeTypes.account.isImplemented &&
|
1690
|
+
buildContext.implementedThemeTypes.account.type ===
|
1691
|
+
"Single-Page";
|
1692
|
+
if (!doImplementAccountSpa) {
|
1693
|
+
break ignore_account_spa;
|
1694
|
+
}
|
1695
|
+
if (!(0,isInside/* isInside */.V)({
|
1696
|
+
dirPath: (0,external_path_.join)(buildContext.themeSrcDirPath, "account"),
|
1697
|
+
filePath
|
1698
|
+
})) {
|
1699
|
+
break ignore_account_spa;
|
1700
|
+
}
|
1701
|
+
return;
|
1654
1702
|
}
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1703
|
+
ignore_admin: {
|
1704
|
+
if (!buildContext.implementedThemeTypes.admin.isImplemented) {
|
1705
|
+
break ignore_admin;
|
1706
|
+
}
|
1707
|
+
if (!(0,isInside/* isInside */.V)({
|
1708
|
+
dirPath: (0,external_path_.join)(buildContext.themeSrcDirPath, "admin"),
|
1709
|
+
filePath
|
1710
|
+
})) {
|
1711
|
+
break ignore_admin;
|
1712
|
+
}
|
1713
|
+
return;
|
1660
1714
|
}
|
1661
|
-
return;
|
1662
1715
|
}
|
1663
1716
|
console.log(`Detected changes in ${filePath}`);
|
1664
1717
|
await waitForDebounce();
|
package/bin/356.index.js
CHANGED
@@ -25,31 +25,20 @@ exports.modules = {
|
|
25
25
|
async function getUiModuleFileSourceCodeReadyToBeCopied(params) {
|
26
26
|
const { buildContext, uiModuleDirPath, fileRelativePath, isForEjection, uiModuleName, uiModuleVersion } = params;
|
27
27
|
let sourceCode = (await fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile((0,path__WEBPACK_IMPORTED_MODULE_2__.join)(uiModuleDirPath, _shared_constants__WEBPACK_IMPORTED_MODULE_4__/* .KEYCLOAK_THEME */ .PC, fileRelativePath))).toString("utf8");
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
: [
|
43
|
-
`WARNING: Before modifying this file run the following command:`,
|
44
|
-
``,
|
45
|
-
`$ npx keycloakify eject-file --file ${fileRelativePath.split(path__WEBPACK_IMPORTED_MODULE_2__.sep).join("/")}`,
|
46
|
-
``,
|
47
|
-
`This file comes from ${uiModuleName} version ${uiModuleVersion}.`,
|
48
|
-
`This file has been copied over to your repo by your postinstall script: \`npx keycloakify postinstall\``
|
49
|
-
]);
|
50
|
-
if (comment !== undefined) {
|
51
|
-
sourceCode = [comment, ``, sourceCode].join("\n");
|
52
|
-
}
|
28
|
+
sourceCode = addCommentToSourceCode({
|
29
|
+
sourceCode,
|
30
|
+
fileRelativePath,
|
31
|
+
commentLines: isForEjection
|
32
|
+
? [`This file was ejected from ${uiModuleName} version ${uiModuleVersion}.`]
|
33
|
+
: [
|
34
|
+
`WARNING: Before modifying this file run the following command:`,
|
35
|
+
``,
|
36
|
+
`$ npx keycloakify eject-file --file '${fileRelativePath.split(path__WEBPACK_IMPORTED_MODULE_2__.sep).join("/")}'`,
|
37
|
+
``,
|
38
|
+
`This file comes from ${uiModuleName} version ${uiModuleVersion}.`,
|
39
|
+
`This file has been copied over to your repo by your postinstall script: \`npx keycloakify postinstall\``
|
40
|
+
]
|
41
|
+
});
|
53
42
|
const destFilePath = (0,path__WEBPACK_IMPORTED_MODULE_2__.join)(buildContext.themeSrcDirPath, fileRelativePath);
|
54
43
|
format: {
|
55
44
|
if (!(await (0,_tools_runPrettier__WEBPACK_IMPORTED_MODULE_0__/* .getIsPrettierAvailable */ .MT)())) {
|
@@ -62,6 +51,40 @@ async function getUiModuleFileSourceCodeReadyToBeCopied(params) {
|
|
62
51
|
}
|
63
52
|
return Buffer.from(sourceCode, "utf8");
|
64
53
|
}
|
54
|
+
function addCommentToSourceCode(params) {
|
55
|
+
const { sourceCode, fileRelativePath, commentLines } = params;
|
56
|
+
const toResult = (comment) => {
|
57
|
+
return [comment, ``, sourceCode].join("\n");
|
58
|
+
};
|
59
|
+
for (const ext of [".ts", ".tsx", ".css", ".less", ".sass", ".js", ".jsx"]) {
|
60
|
+
if (!fileRelativePath.endsWith(ext)) {
|
61
|
+
continue;
|
62
|
+
}
|
63
|
+
return toResult([`/**`, ...commentLines.map(line => ` * ${line}`), ` */`].join("\n"));
|
64
|
+
}
|
65
|
+
if (fileRelativePath.endsWith(".properties")) {
|
66
|
+
return toResult(commentLines.map(line => `# ${line}`).join("\n"));
|
67
|
+
}
|
68
|
+
if (fileRelativePath.endsWith(".html") || fileRelativePath.endsWith(".svg")) {
|
69
|
+
const comment = [
|
70
|
+
`<!--`,
|
71
|
+
...commentLines.map(line => ` ${line.replace("--file", "-f").replace("Before modifying", "Before modifying or replacing")}`),
|
72
|
+
`-->`
|
73
|
+
].join("\n");
|
74
|
+
if (fileRelativePath.endsWith(".html") && sourceCode.trim().startsWith("<!")) {
|
75
|
+
const [first, ...rest] = sourceCode.split(">");
|
76
|
+
const last = rest.join(">");
|
77
|
+
return [`${first}>`, comment, last].join("\n");
|
78
|
+
}
|
79
|
+
if (fileRelativePath.endsWith(".svg") && sourceCode.trim().startsWith("<?")) {
|
80
|
+
const [first, ...rest] = sourceCode.split("?>");
|
81
|
+
const last = rest.join("?>");
|
82
|
+
return [`${first}?>`, comment, last].join("\n");
|
83
|
+
}
|
84
|
+
return toResult(comment);
|
85
|
+
}
|
86
|
+
return sourceCode;
|
87
|
+
}
|
65
88
|
//# sourceMappingURL=getUiModuleFileSourceCodeReadyToBeCopied.js.map
|
66
89
|
|
67
90
|
/***/ }),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
exports.id =
|
3
|
-
exports.ids = [
|
2
|
+
exports.id = 880;
|
3
|
+
exports.ids = [880];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
6
|
/***/ 73817:
|
@@ -314,7 +314,7 @@ function recastParseTs(filePath) {
|
|
314
314
|
|
315
315
|
/***/ }),
|
316
316
|
|
317
|
-
/***/
|
317
|
+
/***/ 59880:
|
318
318
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
319
319
|
|
320
320
|
// ESM COMPAT FLAG
|
@@ -788,6 +788,66 @@ var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external
|
|
788
788
|
// EXTERNAL MODULE: ./node_modules/properties-parser/index.js
|
789
789
|
var properties_parser = __webpack_require__(44414);
|
790
790
|
var properties_parser_default = /*#__PURE__*/__webpack_require__.n(properties_parser);
|
791
|
+
;// CONCATENATED MODULE: ./dist/bin/tools/createObjectThatThrowsIfAccessed.js
|
792
|
+
const keyIsTrapped = "isTrapped_zSskDe9d";
|
793
|
+
class AccessError extends Error {
|
794
|
+
constructor(message) {
|
795
|
+
super(message);
|
796
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
797
|
+
}
|
798
|
+
}
|
799
|
+
function createObjectThatThrowsIfAccessed(params) {
|
800
|
+
const { debugMessage = "", isPropertyWhitelisted = () => false } = params !== null && params !== void 0 ? params : {};
|
801
|
+
const get = (...args) => {
|
802
|
+
const [, prop] = args;
|
803
|
+
if (isPropertyWhitelisted(prop)) {
|
804
|
+
return Reflect.get(...args);
|
805
|
+
}
|
806
|
+
if (prop === keyIsTrapped) {
|
807
|
+
return true;
|
808
|
+
}
|
809
|
+
throw new AccessError(`Cannot access ${String(prop)} yet ${debugMessage}`);
|
810
|
+
};
|
811
|
+
const trappedObject = new Proxy({}, {
|
812
|
+
get,
|
813
|
+
set: get
|
814
|
+
});
|
815
|
+
return trappedObject;
|
816
|
+
}
|
817
|
+
function createObjectThatThrowsIfAccessedFactory(params) {
|
818
|
+
const { isPropertyWhitelisted } = params;
|
819
|
+
return {
|
820
|
+
createObjectThatThrowsIfAccessed: (params) => {
|
821
|
+
const { debugMessage } = params !== null && params !== void 0 ? params : {};
|
822
|
+
return createObjectThatThrowsIfAccessed({
|
823
|
+
debugMessage,
|
824
|
+
isPropertyWhitelisted
|
825
|
+
});
|
826
|
+
}
|
827
|
+
};
|
828
|
+
}
|
829
|
+
function isObjectThatThrowIfAccessed(obj) {
|
830
|
+
return obj[keyIsTrapped] === true;
|
831
|
+
}
|
832
|
+
const THROW_IF_ACCESSED = {
|
833
|
+
__brand: "THROW_IF_ACCESSED"
|
834
|
+
};
|
835
|
+
function createObjectWithSomePropertiesThatThrowIfAccessed(obj, debugMessage) {
|
836
|
+
return Object.defineProperties(obj, Object.fromEntries(Object.entries(obj)
|
837
|
+
.filter(([, value]) => value === THROW_IF_ACCESSED)
|
838
|
+
.map(([key]) => {
|
839
|
+
const getAndSet = () => {
|
840
|
+
throw new AccessError(`Cannot access ${key} yet ${debugMessage !== null && debugMessage !== void 0 ? debugMessage : ""}`);
|
841
|
+
};
|
842
|
+
const pd = {
|
843
|
+
get: getAndSet,
|
844
|
+
set: getAndSet,
|
845
|
+
enumerable: true
|
846
|
+
};
|
847
|
+
return [key, pd];
|
848
|
+
})));
|
849
|
+
}
|
850
|
+
//# sourceMappingURL=createObjectThatThrowsIfAccessed.js.map
|
791
851
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResources.js
|
792
852
|
|
793
853
|
|
@@ -808,6 +868,7 @@ var properties_parser_default = /*#__PURE__*/__webpack_require__.n(properties_pa
|
|
808
868
|
|
809
869
|
|
810
870
|
|
871
|
+
|
811
872
|
(0,assert/* assert */.h)();
|
812
873
|
async function generateResources(params) {
|
813
874
|
var _a;
|
@@ -950,12 +1011,14 @@ async function generateResources(params) {
|
|
950
1011
|
writeMessagePropertiesFilesByThemeType[themeType] =
|
951
1012
|
writeMessagePropertiesFiles;
|
952
1013
|
}
|
953
|
-
|
1014
|
+
bring_in_account_spa_messages: {
|
954
1015
|
if (!isSpa) {
|
955
|
-
break
|
1016
|
+
break bring_in_account_spa_messages;
|
1017
|
+
}
|
1018
|
+
if (themeType !== "account") {
|
1019
|
+
break bring_in_account_spa_messages;
|
956
1020
|
}
|
957
|
-
|
958
|
-
const accountUiDirPath = external_child_process_.execSync(`npm list @keycloakify/keycloak-${themeType}-ui --parseable`, {
|
1021
|
+
const accountUiDirPath = external_child_process_.execSync(`npm list @keycloakify/keycloak-account-ui --parseable`, {
|
959
1022
|
cwd: (0,external_path_.dirname)(buildContext.packageJsonFilePath)
|
960
1023
|
})
|
961
1024
|
.toString("utf8")
|
@@ -964,13 +1027,13 @@ async function generateResources(params) {
|
|
964
1027
|
if (!external_fs_default().existsSync(messageDirPath_defaults)) {
|
965
1028
|
throw new Error(`Please update @keycloakify/keycloak-account-ui to 25.0.4-rc.5 or later.`);
|
966
1029
|
}
|
967
|
-
const messagesDirPath_dest = (0,external_path_.join)(getThemeTypeDirPath({ themeName, themeType }), "messages");
|
1030
|
+
const messagesDirPath_dest = (0,external_path_.join)(getThemeTypeDirPath({ themeName, themeType: "account" }), "messages");
|
968
1031
|
(0,transformCodebase/* transformCodebase */.N)({
|
969
1032
|
srcDirPath: messageDirPath_defaults,
|
970
1033
|
destDirPath: messagesDirPath_dest
|
971
1034
|
});
|
972
1035
|
apply_theme_changes: {
|
973
|
-
const messagesDirPath_theme = (0,external_path_.join)(buildContext.themeSrcDirPath,
|
1036
|
+
const messagesDirPath_theme = (0,external_path_.join)(buildContext.themeSrcDirPath, "account", "messages");
|
974
1037
|
if (!external_fs_default().existsSync(messagesDirPath_theme)) {
|
975
1038
|
break apply_theme_changes;
|
976
1039
|
}
|
@@ -993,6 +1056,89 @@ async function generateResources(params) {
|
|
993
1056
|
languageTags = external_fs_default().readdirSync(messagesDirPath_dest)
|
994
1057
|
.map(basename => basename.replace(/^messages_/, "").replace(/\.properties$/, ""));
|
995
1058
|
}
|
1059
|
+
bring_in_admin_messages: {
|
1060
|
+
if (themeType !== "admin") {
|
1061
|
+
break bring_in_admin_messages;
|
1062
|
+
}
|
1063
|
+
const messagesDirPath_theme = (0,external_path_.join)(buildContext.themeSrcDirPath, "admin", "i18n");
|
1064
|
+
(0,assert/* assert */.h)(external_fs_default().existsSync(messagesDirPath_theme), `${messagesDirPath_theme} is supposed to exist`);
|
1065
|
+
const propertiesByLang = {};
|
1066
|
+
external_fs_default().readdirSync(messagesDirPath_theme).forEach(basename => {
|
1067
|
+
var _a;
|
1068
|
+
var _b;
|
1069
|
+
const parsedBasename = (() => {
|
1070
|
+
const match = basename.match(/^messages_([^.]+)\.properties$/);
|
1071
|
+
if (match === null) {
|
1072
|
+
return undefined;
|
1073
|
+
}
|
1074
|
+
const discriminator = match[1];
|
1075
|
+
const split = discriminator.split("_override");
|
1076
|
+
if (split.length === 1) {
|
1077
|
+
return {
|
1078
|
+
lang: discriminator,
|
1079
|
+
isOverride: false
|
1080
|
+
};
|
1081
|
+
}
|
1082
|
+
(0,assert/* assert */.h)(split.length === 2);
|
1083
|
+
if (split[1] === "") {
|
1084
|
+
return {
|
1085
|
+
lang: split[0],
|
1086
|
+
isOverride: true,
|
1087
|
+
themeName: undefined
|
1088
|
+
};
|
1089
|
+
}
|
1090
|
+
const match2 = split[1].match(/^_(.+)$/);
|
1091
|
+
(0,assert/* assert */.h)(match2 !== null);
|
1092
|
+
return {
|
1093
|
+
lang: split[0],
|
1094
|
+
isOverride: true,
|
1095
|
+
themeName: match2[1]
|
1096
|
+
};
|
1097
|
+
})();
|
1098
|
+
if (parsedBasename === undefined) {
|
1099
|
+
return;
|
1100
|
+
}
|
1101
|
+
(_a = propertiesByLang[_b = parsedBasename.lang]) !== null && _a !== void 0 ? _a : (propertiesByLang[_b] = {
|
1102
|
+
base: createObjectThatThrowsIfAccessed({
|
1103
|
+
debugMessage: `No base ${parsedBasename.lang} translation for admin theme`
|
1104
|
+
}),
|
1105
|
+
override: undefined,
|
1106
|
+
overrideByThemeName: {}
|
1107
|
+
});
|
1108
|
+
const buffer = external_fs_default().readFileSync((0,external_path_.join)(messagesDirPath_theme, basename));
|
1109
|
+
if (parsedBasename.isOverride === false) {
|
1110
|
+
propertiesByLang[parsedBasename.lang].base = buffer;
|
1111
|
+
return;
|
1112
|
+
}
|
1113
|
+
if (parsedBasename.themeName === undefined) {
|
1114
|
+
propertiesByLang[parsedBasename.lang].override = buffer;
|
1115
|
+
return;
|
1116
|
+
}
|
1117
|
+
propertiesByLang[parsedBasename.lang].overrideByThemeName[parsedBasename.themeName] = buffer;
|
1118
|
+
});
|
1119
|
+
writeMessagePropertiesFilesByThemeType.admin = ({ messageDirPath, themeName }) => {
|
1120
|
+
if (!external_fs_default().existsSync(messageDirPath)) {
|
1121
|
+
external_fs_default().mkdirSync(messageDirPath, { recursive: true });
|
1122
|
+
}
|
1123
|
+
Object.entries(propertiesByLang).forEach(([lang, { base, override, overrideByThemeName }]) => {
|
1124
|
+
(languageTags !== null && languageTags !== void 0 ? languageTags : (languageTags = [])).push(lang);
|
1125
|
+
const messages = properties_parser_default().parse(base.toString("utf8"));
|
1126
|
+
if (override !== undefined) {
|
1127
|
+
const overrideMessages = properties_parser_default().parse(override.toString("utf8"));
|
1128
|
+
Object.entries(overrideMessages).forEach(([key, value]) => (messages[key] = value));
|
1129
|
+
}
|
1130
|
+
if (themeName in overrideByThemeName) {
|
1131
|
+
const overrideMessages = properties_parser_default().parse(overrideByThemeName[themeName].toString("utf8"));
|
1132
|
+
Object.entries(overrideMessages).forEach(([key, value]) => (messages[key] = value));
|
1133
|
+
}
|
1134
|
+
const editor = properties_parser_default().createEditor();
|
1135
|
+
Object.entries(messages).forEach(([key, value]) => {
|
1136
|
+
editor.set(key, value);
|
1137
|
+
});
|
1138
|
+
external_fs_default().writeFileSync((0,external_path_.join)(messageDirPath, `messages_${lang}.properties`), Buffer.from(editor.toString(), "utf8"));
|
1139
|
+
});
|
1140
|
+
};
|
1141
|
+
}
|
996
1142
|
keycloak_static_resources: {
|
997
1143
|
if (isSpa) {
|
998
1144
|
break keycloak_static_resources;
|
package/bin/main.js
CHANGED
@@ -16153,7 +16153,7 @@ program
|
|
16153
16153
|
.task({
|
16154
16154
|
skip,
|
16155
16155
|
handler: async ({ projectDirPath }) => {
|
16156
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(783), __nccwpck_require__.e(
|
16156
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(783), __nccwpck_require__.e(880)]).then(__nccwpck_require__.bind(__nccwpck_require__, 59880));
|
16157
16157
|
await command({ buildContext: getBuildContext({ projectDirPath }) });
|
16158
16158
|
}
|
16159
16159
|
});
|
@@ -16307,9 +16307,10 @@ program
|
|
16307
16307
|
.option({
|
16308
16308
|
key: "file",
|
16309
16309
|
name: (() => {
|
16310
|
-
const
|
16311
|
-
|
16312
|
-
|
16310
|
+
const long = "file";
|
16311
|
+
const short = "f";
|
16312
|
+
optionsKeys.push(long, short);
|
16313
|
+
return { long, short };
|
16313
16314
|
})(),
|
16314
16315
|
description: [
|
16315
16316
|
"Relative path of the file relative to the directory of your keycloak theme source",
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare class AccessError extends Error {
|
2
|
+
constructor(message: string);
|
3
|
+
}
|
4
|
+
export declare function createObjectThatThrowsIfAccessed<T extends object>(params?: {
|
5
|
+
debugMessage?: string;
|
6
|
+
isPropertyWhitelisted?: (prop: string | number | symbol) => boolean;
|
7
|
+
}): T;
|
8
|
+
export declare function createObjectThatThrowsIfAccessedFactory(params: {
|
9
|
+
isPropertyWhitelisted?: (prop: string | number | symbol) => boolean;
|
10
|
+
}): {
|
11
|
+
createObjectThatThrowsIfAccessed: <T extends object>(params?: {
|
12
|
+
debugMessage?: string;
|
13
|
+
}) => T;
|
14
|
+
};
|
15
|
+
export declare function isObjectThatThrowIfAccessed(obj: object): boolean;
|
16
|
+
export declare const THROW_IF_ACCESSED: {
|
17
|
+
__brand: string;
|
18
|
+
};
|
19
|
+
export declare function createObjectWithSomePropertiesThatThrowIfAccessed<T extends Record<string, unknown>>(obj: {
|
20
|
+
[K in keyof T]: T[K] | typeof THROW_IF_ACCESSED;
|
21
|
+
}, debugMessage?: string): T;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "11.
|
3
|
+
"version": "11.6.0",
|
4
4
|
"description": "Framework to create custom Keycloak UIs",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -714,6 +714,7 @@
|
|
714
714
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-19.json",
|
715
715
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-20.json",
|
716
716
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-21.json",
|
717
|
+
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-22.json",
|
717
718
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-23.json",
|
718
719
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-24.json",
|
719
720
|
"src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-25.json",
|
@@ -733,6 +734,7 @@
|
|
733
734
|
"src/bin/tools/crawl.ts",
|
734
735
|
"src/bin/tools/crawlAsync.ts",
|
735
736
|
"src/bin/tools/crc32.ts",
|
737
|
+
"src/bin/tools/createObjectThatThrowsIfAccessed.ts",
|
736
738
|
"src/bin/tools/deflate.ts",
|
737
739
|
"src/bin/tools/downloadAndExtractArchive.ts",
|
738
740
|
"src/bin/tools/escapeStringForPropertiesFile.ts",
|
@@ -1098,6 +1100,7 @@
|
|
1098
1100
|
"bin/tools/crawl.d.ts",
|
1099
1101
|
"bin/tools/crawlAsync.d.ts",
|
1100
1102
|
"bin/tools/crc32.d.ts",
|
1103
|
+
"bin/tools/createObjectThatThrowsIfAccessed.d.ts",
|
1101
1104
|
"bin/tools/deflate.d.ts",
|
1102
1105
|
"bin/tools/downloadAndExtractArchive.d.ts",
|
1103
1106
|
"bin/tools/escapeStringForPropertiesFile.d.ts",
|
@@ -1141,7 +1144,6 @@
|
|
1141
1144
|
"bin/490.index.js",
|
1142
1145
|
"bin/503.index.js",
|
1143
1146
|
"bin/525.index.js",
|
1144
|
-
"bin/573.index.js",
|
1145
1147
|
"bin/653.index.js",
|
1146
1148
|
"bin/658.index.js",
|
1147
1149
|
"bin/720.index.js",
|
@@ -1152,6 +1154,7 @@
|
|
1152
1154
|
"bin/805.index.js",
|
1153
1155
|
"bin/854.index.js",
|
1154
1156
|
"bin/877.index.js",
|
1157
|
+
"bin/880.index.js",
|
1155
1158
|
"bin/921.index.js",
|
1156
1159
|
"bin/97.index.js",
|
1157
1160
|
"bin/shared/constants.js",
|