keycloakify 11.7.3 → 11.8.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/{911.index.js → 297.index.js} +18918 -11359
- package/bin/355.index.js +41 -703
- package/bin/363.index.js +3 -0
- package/bin/369.index.js +968 -0
- package/bin/656.index.js +111 -0
- package/bin/{288.index.js → 664.index.js} +13 -119
- package/bin/780.index.js +9 -7
- package/bin/880.index.js +215 -160
- package/bin/932.index.js +965 -0
- package/bin/97.index.js +2092 -770
- package/bin/main.js +52 -24
- package/bin/shared/buildContext.d.ts +11 -3
- package/package.json +10 -13
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +29 -27
- package/src/bin/initialize-account-theme/multi-page-boilerplate/i18n.ts +2 -2
- package/src/bin/initialize-email-theme.ts +103 -53
- package/src/bin/keycloakify/generateResources/generateResources.ts +285 -205
- package/src/bin/shared/{initializeSpa/addSyncExtensionsToPostinstallScript.ts → addSyncExtensionsToPostinstallScript.ts} +1 -1
- package/src/bin/shared/buildContext.ts +69 -24
- package/src/bin/shared/{initializeSpa/initializeSpa.ts → initializeSpa.ts} +3 -3
- package/src/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts +6 -0
- package/vite-plugin/index.js +48 -20
- package/bin/313.index.js +0 -377
- package/bin/678.index.js +0 -7565
- package/bin/9.index.js +0 -850
- package/bin/947.index.js +0 -1565
- package/bin/shared/initializeSpa/index.d.ts +0 -1
- package/src/bin/shared/initializeSpa/index.ts +0 -1
- /package/bin/shared/{initializeSpa/addSyncExtensionsToPostinstallScript.d.ts → addSyncExtensionsToPostinstallScript.d.ts} +0 -0
- /package/bin/shared/{initializeSpa/initializeSpa.d.ts → initializeSpa.d.ts} +0 -0
package/bin/880.index.js
CHANGED
@@ -847,6 +847,8 @@ function createObjectWithSomePropertiesThatThrowIfAccessed(obj, debugMessage) {
|
|
847
847
|
//# sourceMappingURL=createObjectThatThrowsIfAccessed.js.map
|
848
848
|
// EXTERNAL MODULE: ./dist/bin/tools/listInstalledModules.js
|
849
849
|
var listInstalledModules = __webpack_require__(75564);
|
850
|
+
// EXTERNAL MODULE: ./dist/bin/tools/isInside.js
|
851
|
+
var isInside = __webpack_require__(90665);
|
850
852
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResources.js
|
851
853
|
|
852
854
|
|
@@ -867,6 +869,7 @@ var listInstalledModules = __webpack_require__(75564);
|
|
867
869
|
|
868
870
|
|
869
871
|
|
872
|
+
|
870
873
|
|
871
874
|
(0,assert/* assert */.h)();
|
872
875
|
async function generateResources(params) {
|
@@ -881,9 +884,14 @@ async function generateResources(params) {
|
|
881
884
|
return (0,external_path_.join)(resourcesDirPath, "theme", themeName, themeType);
|
882
885
|
};
|
883
886
|
const writeMessagePropertiesFilesByThemeType = {};
|
884
|
-
for (const themeType of constants/* THEME_TYPES */.Jh) {
|
885
|
-
|
886
|
-
|
887
|
+
for (const themeType of [...constants/* THEME_TYPES */.Jh, "email"]) {
|
888
|
+
let isNative;
|
889
|
+
{
|
890
|
+
const v = buildContext.implementedThemeTypes[themeType];
|
891
|
+
if (!v.isImplemented && !v.isImplemented_native) {
|
892
|
+
continue;
|
893
|
+
}
|
894
|
+
isNative = !v.isImplemented && v.isImplemented_native;
|
887
895
|
}
|
888
896
|
const getAccountThemeType = () => {
|
889
897
|
(0,assert/* assert */.h)(themeType === "account");
|
@@ -898,10 +906,15 @@ async function generateResources(params) {
|
|
898
906
|
return getAccountThemeType() === "Single-Page";
|
899
907
|
case "admin":
|
900
908
|
return true;
|
909
|
+
case "email":
|
910
|
+
return false;
|
901
911
|
}
|
902
912
|
})();
|
903
913
|
const themeTypeDirPath = getThemeTypeDirPath({ themeName, themeType });
|
904
914
|
apply_replacers_and_move_to_theme_resources: {
|
915
|
+
if (isNative) {
|
916
|
+
break apply_replacers_and_move_to_theme_resources;
|
917
|
+
}
|
905
918
|
const destDirPath = (0,external_path_.join)(themeTypeDirPath, "resources", constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST);
|
906
919
|
// NOTE: Prevent accumulation of files in the assets dir, as names are hashed they pile up.
|
907
920
|
(0,fs_rmSync/* rmSync */.a)(destDirPath, { recursive: true, force: true });
|
@@ -957,50 +970,75 @@ async function generateResources(params) {
|
|
957
970
|
}
|
958
971
|
});
|
959
972
|
}
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
+
generate_ftl_files: {
|
974
|
+
if (isNative) {
|
975
|
+
break generate_ftl_files;
|
976
|
+
}
|
977
|
+
(0,assert/* assert */.h)(themeType !== "email");
|
978
|
+
const { generateFtlFilesCode } = generateFtlFilesCodeFactory({
|
979
|
+
themeName,
|
980
|
+
indexHtmlCode: external_fs_default().readFileSync((0,external_path_.join)(buildContext.projectBuildDirPath, "index.html"))
|
981
|
+
.toString("utf8"),
|
982
|
+
buildContext,
|
983
|
+
keycloakifyVersion: (0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)(),
|
984
|
+
themeType,
|
985
|
+
fieldNames: isSpa
|
986
|
+
? []
|
987
|
+
: ((0,assert/* assert */.h)(themeType !== "admin"),
|
988
|
+
readFieldNameUsage({
|
989
|
+
themeSrcDirPath: buildContext.themeSrcDirPath,
|
990
|
+
themeType
|
991
|
+
}))
|
992
|
+
});
|
993
|
+
[
|
994
|
+
...(() => {
|
995
|
+
switch (themeType) {
|
996
|
+
case "login":
|
997
|
+
return constants/* LOGIN_THEME_PAGE_IDS */.XV;
|
998
|
+
case "account":
|
999
|
+
return getAccountThemeType() === "Single-Page"
|
1000
|
+
? ["index.ftl"]
|
1001
|
+
: constants/* ACCOUNT_THEME_PAGE_IDS */.yV;
|
1002
|
+
case "admin":
|
1003
|
+
return ["index.ftl"];
|
1004
|
+
}
|
1005
|
+
})(),
|
1006
|
+
...(isSpa
|
1007
|
+
? []
|
1008
|
+
: readExtraPagesNames({
|
1009
|
+
themeType,
|
1010
|
+
themeSrcDirPath: buildContext.themeSrcDirPath
|
973
1011
|
}))
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
1012
|
+
].forEach(pageId => {
|
1013
|
+
const { ftlCode } = generateFtlFilesCode({ pageId });
|
1014
|
+
external_fs_default().writeFileSync((0,external_path_.join)(themeTypeDirPath, pageId), Buffer.from(ftlCode, "utf8"));
|
1015
|
+
});
|
1016
|
+
}
|
1017
|
+
copy_native_theme: {
|
1018
|
+
if (!isNative) {
|
1019
|
+
break copy_native_theme;
|
1020
|
+
}
|
1021
|
+
const dirPath = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType);
|
1022
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
1023
|
+
srcDirPath: dirPath,
|
1024
|
+
destDirPath: getThemeTypeDirPath({ themeName, themeType }),
|
1025
|
+
transformSourceCode: ({ fileRelativePath, sourceCode }) => {
|
1026
|
+
if ((0,isInside/* isInside */.V)({ dirPath: "messages", filePath: fileRelativePath })) {
|
1027
|
+
return undefined;
|
1028
|
+
}
|
1029
|
+
return { modifiedSourceCode: sourceCode };
|
986
1030
|
}
|
987
|
-
})
|
988
|
-
|
989
|
-
? []
|
990
|
-
: readExtraPagesNames({
|
991
|
-
themeType,
|
992
|
-
themeSrcDirPath: buildContext.themeSrcDirPath
|
993
|
-
}))
|
994
|
-
].forEach(pageId => {
|
995
|
-
const { ftlCode } = generateFtlFilesCode({ pageId });
|
996
|
-
external_fs_default().writeFileSync((0,external_path_.join)(themeTypeDirPath, pageId), Buffer.from(ftlCode, "utf8"));
|
997
|
-
});
|
1031
|
+
});
|
1032
|
+
}
|
998
1033
|
let languageTags = undefined;
|
999
1034
|
i18n_multi_page: {
|
1035
|
+
if (isNative) {
|
1036
|
+
break i18n_multi_page;
|
1037
|
+
}
|
1000
1038
|
if (isSpa) {
|
1001
1039
|
break i18n_multi_page;
|
1002
1040
|
}
|
1003
|
-
(0,assert/* assert */.h)(themeType !== "admin");
|
1041
|
+
(0,assert/* assert */.h)(themeType !== "admin" && themeType !== "email");
|
1004
1042
|
const wrap = (0,generateMessageProperties/* generateMessageProperties */.k)({
|
1005
1043
|
buildContext,
|
1006
1044
|
themeType
|
@@ -1070,16 +1108,17 @@ async function generateResources(params) {
|
|
1070
1108
|
languageTags = external_fs_default().readdirSync(messagesDirPath_dest)
|
1071
1109
|
.map(basename => basename.replace(/^messages_/, "").replace(/\.properties$/, ""));
|
1072
1110
|
}
|
1073
|
-
|
1074
|
-
if (!isSpa) {
|
1075
|
-
break
|
1111
|
+
i18n_for_spas_and_native: {
|
1112
|
+
if (!isSpa && !isNative) {
|
1113
|
+
break i18n_for_spas_and_native;
|
1076
1114
|
}
|
1077
1115
|
if (isLegacyAccountSpa) {
|
1078
|
-
break
|
1116
|
+
break i18n_for_spas_and_native;
|
1117
|
+
}
|
1118
|
+
const messagesDirPath_theme = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, isNative ? "messages" : "i18n");
|
1119
|
+
if (!external_fs_default().existsSync(messagesDirPath_theme)) {
|
1120
|
+
break i18n_for_spas_and_native;
|
1079
1121
|
}
|
1080
|
-
(0,assert/* assert */.h)(themeType === "account" || themeType === "admin");
|
1081
|
-
const messagesDirPath_theme = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, "i18n");
|
1082
|
-
(0,assert/* assert */.h)(external_fs_default().existsSync(messagesDirPath_theme), `${messagesDirPath_theme} is supposed to exist`);
|
1083
1122
|
const propertiesByLang = {};
|
1084
1123
|
external_fs_default().readdirSync(messagesDirPath_theme).forEach(basename => {
|
1085
1124
|
var _a;
|
@@ -1158,6 +1197,9 @@ async function generateResources(params) {
|
|
1158
1197
|
};
|
1159
1198
|
}
|
1160
1199
|
keycloak_static_resources: {
|
1200
|
+
if (isNative) {
|
1201
|
+
break keycloak_static_resources;
|
1202
|
+
}
|
1161
1203
|
if (isSpa) {
|
1162
1204
|
break keycloak_static_resources;
|
1163
1205
|
}
|
@@ -1166,72 +1208,145 @@ async function generateResources(params) {
|
|
1166
1208
|
destDirPath: (0,external_path_.join)(themeTypeDirPath, "resources")
|
1167
1209
|
});
|
1168
1210
|
}
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
? ["deprecatedMode=false"]
|
1188
|
-
: []),
|
1189
|
-
...((_a = buildContext.extraThemeProperties) !== null && _a !== void 0 ? _a : []),
|
1190
|
-
...[
|
1191
|
-
...buildContext.environmentVariables,
|
1192
|
-
{ name: constants/* KEYCLOAKIFY_SPA_DEV_SERVER_PORT */.Sz, default: "" }
|
1193
|
-
].map(({ name, default: defaultValue }) => `${name}=\${env.${name}:${(0,escapeStringForPropertiesFile/* escapeStringForPropertiesFile */.y)(defaultValue)}}`),
|
1194
|
-
...(languageTags === undefined
|
1195
|
-
? []
|
1196
|
-
: [`locales=${languageTags.join(",")}`])
|
1197
|
-
].join("\n\n"), "utf8"));
|
1198
|
-
}
|
1199
|
-
email: {
|
1200
|
-
if (!buildContext.implementedThemeTypes.email.isImplemented) {
|
1201
|
-
break email;
|
1211
|
+
bring_in_account_v1: {
|
1212
|
+
if (isNative) {
|
1213
|
+
break bring_in_account_v1;
|
1214
|
+
}
|
1215
|
+
if (themeType !== "account") {
|
1216
|
+
break bring_in_account_v1;
|
1217
|
+
}
|
1218
|
+
(0,assert/* assert */.h)(buildContext.implementedThemeTypes.account.isImplemented);
|
1219
|
+
if (buildContext.implementedThemeTypes.account.type !== "Multi-Page") {
|
1220
|
+
break bring_in_account_v1;
|
1221
|
+
}
|
1222
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
1223
|
+
srcDirPath: (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "res", "account-v1"),
|
1224
|
+
destDirPath: getThemeTypeDirPath({
|
1225
|
+
themeName: "account-v1",
|
1226
|
+
themeType: "account"
|
1227
|
+
})
|
1228
|
+
});
|
1202
1229
|
}
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1230
|
+
generate_theme_properties: {
|
1231
|
+
if (isNative) {
|
1232
|
+
break generate_theme_properties;
|
1233
|
+
}
|
1234
|
+
(0,assert/* assert */.h)(themeType !== "email");
|
1235
|
+
external_fs_default().writeFileSync((0,external_path_.join)(themeTypeDirPath, "theme.properties"), Buffer.from([
|
1236
|
+
`parent=${(() => {
|
1237
|
+
switch (themeType) {
|
1238
|
+
case "account":
|
1239
|
+
switch (getAccountThemeType()) {
|
1240
|
+
case "Multi-Page":
|
1241
|
+
return "account-v1";
|
1242
|
+
case "Single-Page":
|
1243
|
+
return "base";
|
1244
|
+
}
|
1245
|
+
case "login":
|
1246
|
+
return "keycloak";
|
1247
|
+
case "admin":
|
1248
|
+
return "base";
|
1249
|
+
}
|
1250
|
+
assert/* assert */.h;
|
1251
|
+
})()}`,
|
1252
|
+
...(themeType === "account" &&
|
1253
|
+
getAccountThemeType() === "Single-Page"
|
1254
|
+
? ["deprecatedMode=false"]
|
1255
|
+
: []),
|
1256
|
+
...((_a = buildContext.extraThemeProperties) !== null && _a !== void 0 ? _a : []),
|
1257
|
+
...[
|
1258
|
+
...buildContext.environmentVariables,
|
1259
|
+
{ name: constants/* KEYCLOAKIFY_SPA_DEV_SERVER_PORT */.Sz, default: "" }
|
1260
|
+
].map(({ name, default: defaultValue }) => `${name}=\${env.${name}:${(0,escapeStringForPropertiesFile/* escapeStringForPropertiesFile */.y)(defaultValue)}}`),
|
1261
|
+
...(languageTags === undefined
|
1262
|
+
? []
|
1263
|
+
: [`locales=${languageTags.join(",")}`])
|
1264
|
+
].join("\n\n"), "utf8"));
|
1212
1265
|
}
|
1213
|
-
|
1214
|
-
|
1266
|
+
}
|
1267
|
+
for (const themeVariantName of buildContext.themeNames) {
|
1268
|
+
for (const themeType of [...constants/* THEME_TYPES */.Jh, "email"]) {
|
1269
|
+
copy_main_theme_to_theme_variant_theme: {
|
1270
|
+
let isNative;
|
1271
|
+
{
|
1272
|
+
const v = buildContext.implementedThemeTypes[themeType];
|
1273
|
+
if (!v.isImplemented && !v.isImplemented_native) {
|
1274
|
+
break copy_main_theme_to_theme_variant_theme;
|
1275
|
+
}
|
1276
|
+
isNative = !v.isImplemented && v.isImplemented_native;
|
1277
|
+
}
|
1278
|
+
if (themeVariantName === themeName) {
|
1279
|
+
break copy_main_theme_to_theme_variant_theme;
|
1280
|
+
}
|
1281
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
1282
|
+
srcDirPath: (0,external_path_.join)(resourcesDirPath, "theme", themeName),
|
1283
|
+
destDirPath: (0,external_path_.join)(resourcesDirPath, "theme", themeVariantName),
|
1284
|
+
transformSourceCode: isNative
|
1285
|
+
? undefined
|
1286
|
+
: ({ fileRelativePath, sourceCode }) => {
|
1287
|
+
if ((0,external_path_.extname)(fileRelativePath) === ".ftl" &&
|
1288
|
+
fileRelativePath.split(external_path_.sep).length === 2) {
|
1289
|
+
const modifiedSourceCode = Buffer.from(Buffer.from(sourceCode)
|
1290
|
+
.toString("utf-8")
|
1291
|
+
.replace(`"themeName": "${themeName}"`, `"themeName": "${themeVariantName}"`), "utf8");
|
1292
|
+
(0,assert/* assert */.h)(Buffer.compare(modifiedSourceCode, sourceCode) !== 0);
|
1293
|
+
return { modifiedSourceCode };
|
1294
|
+
}
|
1295
|
+
return { modifiedSourceCode: sourceCode };
|
1296
|
+
}
|
1297
|
+
});
|
1298
|
+
}
|
1299
|
+
run_writeMessagePropertiesFiles: {
|
1300
|
+
const writeMessagePropertiesFiles = writeMessagePropertiesFilesByThemeType[themeType];
|
1301
|
+
if (writeMessagePropertiesFiles === undefined) {
|
1302
|
+
break run_writeMessagePropertiesFiles;
|
1303
|
+
}
|
1304
|
+
writeMessagePropertiesFiles({
|
1305
|
+
messageDirPath: (0,external_path_.join)(getThemeTypeDirPath({ themeName: themeVariantName, themeType }), "messages"),
|
1306
|
+
themeName: themeVariantName
|
1307
|
+
});
|
1308
|
+
}
|
1309
|
+
replace_xKeycloakify_themeName_in_native_ftl_files: {
|
1310
|
+
{
|
1311
|
+
const v = buildContext.implementedThemeTypes[themeType];
|
1312
|
+
if (v.isImplemented || !v.isImplemented_native) {
|
1313
|
+
break replace_xKeycloakify_themeName_in_native_ftl_files;
|
1314
|
+
}
|
1315
|
+
}
|
1316
|
+
const emailThemeDirPath = getThemeTypeDirPath({
|
1317
|
+
themeName,
|
1318
|
+
themeType
|
1319
|
+
});
|
1320
|
+
(0,transformCodebase/* transformCodebase */.N)({
|
1321
|
+
srcDirPath: emailThemeDirPath,
|
1322
|
+
destDirPath: emailThemeDirPath,
|
1323
|
+
transformSourceCode: ({ filePath, sourceCode }) => {
|
1324
|
+
if (!filePath.endsWith(".ftl")) {
|
1325
|
+
return { modifiedSourceCode: sourceCode };
|
1326
|
+
}
|
1327
|
+
return {
|
1328
|
+
modifiedSourceCode: Buffer.from(sourceCode
|
1329
|
+
.toString("utf8")
|
1330
|
+
.replace(/xKeycloakify\.themeName/g, `"${themeName}"`), "utf8")
|
1331
|
+
};
|
1332
|
+
}
|
1333
|
+
});
|
1334
|
+
}
|
1215
1335
|
}
|
1216
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
1217
|
-
srcDirPath: (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "res", "account-v1"),
|
1218
|
-
destDirPath: getThemeTypeDirPath({
|
1219
|
-
themeName: "account-v1",
|
1220
|
-
themeType: "account"
|
1221
|
-
})
|
1222
|
-
});
|
1223
1336
|
}
|
1337
|
+
// Generate meta-inf/keycloak-themes.json
|
1224
1338
|
{
|
1225
1339
|
const metaInfKeycloakThemes = { themes: [] };
|
1226
1340
|
for (const themeName of buildContext.themeNames) {
|
1227
1341
|
metaInfKeycloakThemes.themes.push({
|
1228
1342
|
name: themeName,
|
1229
1343
|
types: (0,objectEntries/* objectEntries */.q)(buildContext.implementedThemeTypes)
|
1230
|
-
.filter(([,
|
1344
|
+
.filter(([, v]) => v.isImplemented || v.isImplemented_native)
|
1231
1345
|
.map(([themeType]) => themeType)
|
1232
1346
|
});
|
1233
1347
|
}
|
1234
|
-
if (buildContext.implementedThemeTypes.account.isImplemented
|
1348
|
+
if (buildContext.implementedThemeTypes.account.isImplemented &&
|
1349
|
+
buildContext.implementedThemeTypes.account.type === "Multi-Page") {
|
1235
1350
|
metaInfKeycloakThemes.themes.push({
|
1236
1351
|
name: "account-v1",
|
1237
1352
|
types: ["account"]
|
@@ -1242,64 +1357,6 @@ async function generateResources(params) {
|
|
1242
1357
|
getNewMetaInfKeycloakTheme: () => metaInfKeycloakThemes
|
1243
1358
|
});
|
1244
1359
|
}
|
1245
|
-
for (const themeVariantName of buildContext.themeNames) {
|
1246
|
-
if (themeVariantName === themeName) {
|
1247
|
-
continue;
|
1248
|
-
}
|
1249
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
1250
|
-
srcDirPath: (0,external_path_.join)(resourcesDirPath, "theme", themeName),
|
1251
|
-
destDirPath: (0,external_path_.join)(resourcesDirPath, "theme", themeVariantName),
|
1252
|
-
transformSourceCode: ({ fileRelativePath, sourceCode }) => {
|
1253
|
-
if ((0,external_path_.extname)(fileRelativePath) === ".ftl" &&
|
1254
|
-
fileRelativePath.split(external_path_.sep).length === 2) {
|
1255
|
-
const modifiedSourceCode = Buffer.from(Buffer.from(sourceCode)
|
1256
|
-
.toString("utf-8")
|
1257
|
-
.replace(`"themeName": "${themeName}"`, `"themeName": "${themeVariantName}"`), "utf8");
|
1258
|
-
(0,assert/* assert */.h)(Buffer.compare(modifiedSourceCode, sourceCode) !== 0);
|
1259
|
-
return { modifiedSourceCode };
|
1260
|
-
}
|
1261
|
-
return { modifiedSourceCode: sourceCode };
|
1262
|
-
}
|
1263
|
-
});
|
1264
|
-
}
|
1265
|
-
for (const themeName of buildContext.themeNames) {
|
1266
|
-
for (const [themeType, writeMessagePropertiesFiles] of (0,objectEntries/* objectEntries */.q)(writeMessagePropertiesFilesByThemeType)) {
|
1267
|
-
// NOTE: This is just a quirk of the type system: We can't really differentiate in a record
|
1268
|
-
// between the case where the key isn't present and the case where the value is `undefined`.
|
1269
|
-
if (writeMessagePropertiesFiles === undefined) {
|
1270
|
-
return;
|
1271
|
-
}
|
1272
|
-
writeMessagePropertiesFiles({
|
1273
|
-
messageDirPath: (0,external_path_.join)(getThemeTypeDirPath({ themeName, themeType }), "messages"),
|
1274
|
-
themeName
|
1275
|
-
});
|
1276
|
-
}
|
1277
|
-
}
|
1278
|
-
modify_email_theme_per_variant: {
|
1279
|
-
if (!buildContext.implementedThemeTypes.email.isImplemented) {
|
1280
|
-
break modify_email_theme_per_variant;
|
1281
|
-
}
|
1282
|
-
for (const themeName of buildContext.themeNames) {
|
1283
|
-
const emailThemeDirPath = getThemeTypeDirPath({
|
1284
|
-
themeName,
|
1285
|
-
themeType: "email"
|
1286
|
-
});
|
1287
|
-
(0,transformCodebase/* transformCodebase */.N)({
|
1288
|
-
srcDirPath: emailThemeDirPath,
|
1289
|
-
destDirPath: emailThemeDirPath,
|
1290
|
-
transformSourceCode: ({ filePath, sourceCode }) => {
|
1291
|
-
if (!filePath.endsWith(".ftl")) {
|
1292
|
-
return { modifiedSourceCode: sourceCode };
|
1293
|
-
}
|
1294
|
-
return {
|
1295
|
-
modifiedSourceCode: Buffer.from(sourceCode
|
1296
|
-
.toString("utf8")
|
1297
|
-
.replace(/xKeycloakify\.themeName/g, `"${themeName}"`), "utf8")
|
1298
|
-
};
|
1299
|
-
}
|
1300
|
-
});
|
1301
|
-
}
|
1302
|
-
}
|
1303
1360
|
}
|
1304
1361
|
//# sourceMappingURL=generateResources.js.map
|
1305
1362
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/index.js
|
@@ -1447,8 +1504,6 @@ function generatePom(params) {
|
|
1447
1504
|
return { pomFileCode };
|
1448
1505
|
}
|
1449
1506
|
//# sourceMappingURL=generatePom.js.map
|
1450
|
-
// EXTERNAL MODULE: ./dist/bin/tools/isInside.js
|
1451
|
-
var isInside = __webpack_require__(90665);
|
1452
1507
|
// EXTERNAL MODULE: ./dist/bin/tools/fs.existsAsync.js
|
1453
1508
|
var fs_existsAsync = __webpack_require__(43765);
|
1454
1509
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/buildJar.js
|