keycloakify 10.0.0-rc.65 → 10.0.0-rc.67
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/193.index.js +51 -0
- package/bin/246.index.js +371 -75118
- package/bin/363.index.js +64 -165
- package/bin/453.index.js +603 -23
- package/bin/{890.index.js → 456.index.js} +1831 -3
- package/bin/490.index.js +75195 -0
- package/bin/526.index.js +294 -173
- package/bin/538.index.js +1 -509
- package/bin/{203.index.js → 751.index.js} +306 -305
- package/bin/772.index.js +1 -1
- package/bin/{190.index.js → 837.index.js} +259 -35
- package/bin/932.index.js +1 -578
- package/bin/97.index.js +594 -14
- package/bin/main.js +8 -8
- package/bin/shared/KeycloakVersionRange.d.ts +5 -0
- package/bin/shared/KeycloakVersionRange.js.map +1 -0
- package/bin/shared/buildContext.d.ts +16 -0
- package/bin/shared/buildContext.js.map +1 -0
- package/bin/shared/constants.d.ts +1 -1
- package/bin/shared/constants.js.map +1 -1
- package/bin/shared/copyKeycloakResourcesToPublic.d.ts +8 -0
- package/bin/shared/copyKeycloakResourcesToPublic.js.map +1 -0
- package/bin/shared/downloadKeycloakDefaultTheme.d.ts +10 -0
- package/bin/shared/downloadKeycloakDefaultTheme.js.map +1 -0
- package/bin/shared/downloadKeycloakStaticResources.d.ts +9 -0
- package/bin/shared/downloadKeycloakStaticResources.js.map +1 -0
- package/bin/shared/generateKcGenTs.d.ts +12 -0
- package/bin/shared/generateKcGenTs.js.map +1 -0
- package/bin/shared/metaInfKeycloakThemes.d.ts +13 -0
- package/bin/shared/metaInfKeycloakThemes.js.map +1 -0
- package/bin/shared/promptKeycloakVersion.d.ts +7 -0
- package/bin/shared/promptKeycloakVersion.js.map +1 -0
- package/package.json +21 -12
- package/src/bin/add-story.ts +1 -6
- package/src/bin/eject-page.ts +7 -8
- package/src/bin/initialize-email-theme.ts +1 -6
- package/src/bin/keycloakify/buildJars/buildJars.ts +23 -49
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +15 -20
- package/src/bin/keycloakify/keycloakify.ts +6 -8
- package/src/bin/shared/buildContext.ts +434 -42
- package/src/bin/shared/constants.ts +2 -1
- package/src/bin/shared/generateKcGenTs.ts +2 -6
- package/src/bin/start-keycloak/keycloakifyBuild.ts +4 -4
- package/src/bin/start-keycloak/start-keycloak.ts +40 -83
- package/src/vite-plugin/vite-plugin.ts +5 -4
- package/vite-plugin/index.js +341 -117
- package/bin/480.index.js +0 -466
- package/bin/818.index.js +0 -1802
- package/bin/827.index.js +0 -1094
- package/bin/shared/constants.js +0 -59
- package/src/bin/shared/getImplementedThemeTypes.ts +0 -38
- package/src/bin/shared/getJarFileBasename.ts +0 -11
- package/src/bin/shared/getThemeSrcDirPath.ts +0 -62
package/bin/363.index.js
CHANGED
@@ -678,8 +678,6 @@ async function bringInAccountV1(params) {
|
|
678
678
|
].join("\n"), "utf8"));
|
679
679
|
}
|
680
680
|
//# sourceMappingURL=bringInAccountV1.js.map
|
681
|
-
// EXTERNAL MODULE: ./dist/bin/shared/getThemeSrcDirPath.js
|
682
|
-
var getThemeSrcDirPath = __webpack_require__(39216);
|
683
681
|
// EXTERNAL MODULE: ./dist/bin/tools/fs.rmSync.js
|
684
682
|
var fs_rmSync = __webpack_require__(89693);
|
685
683
|
// EXTERNAL MODULE: ./dist/bin/tools/readThisNpmPackageVersion.js
|
@@ -709,8 +707,6 @@ function writeMetaInfKeycloakThemes(params) {
|
|
709
707
|
var objectEntries = __webpack_require__(39612);
|
710
708
|
// EXTERNAL MODULE: ./dist/bin/tools/escapeStringForPropertiesFile.js
|
711
709
|
var escapeStringForPropertiesFile = __webpack_require__(27190);
|
712
|
-
// EXTERNAL MODULE: ./dist/bin/shared/getImplementedThemeTypes.js
|
713
|
-
var getImplementedThemeTypes = __webpack_require__(64409);
|
714
710
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResourcesForMainTheme.js
|
715
711
|
|
716
712
|
|
@@ -730,25 +726,17 @@ var getImplementedThemeTypes = __webpack_require__(64409);
|
|
730
726
|
|
731
727
|
|
732
728
|
|
733
|
-
|
734
|
-
|
735
729
|
(0,assert.assert)();
|
736
730
|
async function generateResourcesForMainTheme(params) {
|
737
731
|
var _a;
|
738
732
|
const { themeName, resourcesDirPath, buildContext } = params;
|
739
|
-
const { themeSrcDirPath } = (0,getThemeSrcDirPath/* getThemeSrcDirPath */.f)({
|
740
|
-
projectDirPath: buildContext.projectDirPath
|
741
|
-
});
|
742
|
-
const { implementedThemeTypes } = (0,getImplementedThemeTypes/* getImplementedThemeTypes */.C)({
|
743
|
-
projectDirPath: buildContext.projectDirPath
|
744
|
-
});
|
745
733
|
const getThemeTypeDirPath = (params) => {
|
746
734
|
const { themeType } = params;
|
747
735
|
return (0,external_path_.join)(resourcesDirPath, "theme", themeName, themeType);
|
748
736
|
};
|
749
737
|
const cssGlobalsToDefine = {};
|
750
738
|
for (const themeType of ["login", "account"]) {
|
751
|
-
if (!
|
739
|
+
if (!buildContext.recordIsImplementedByThemeType[themeType]) {
|
752
740
|
continue;
|
753
741
|
}
|
754
742
|
const themeTypeDirPath = getThemeTypeDirPath({ themeType });
|
@@ -756,7 +744,8 @@ async function generateResourcesForMainTheme(params) {
|
|
756
744
|
const destDirPath = (0,external_path_.join)(themeTypeDirPath, "resources", constants/* basenameOfTheKeycloakifyResourcesDir */.M);
|
757
745
|
// NOTE: Prevent accumulation of files in the assets dir, as names are hashed they pile up.
|
758
746
|
(0,fs_rmSync/* rmSync */.a)(destDirPath, { recursive: true, force: true });
|
759
|
-
if (themeType === "account" &&
|
747
|
+
if (themeType === "account" &&
|
748
|
+
buildContext.recordIsImplementedByThemeType.login) {
|
760
749
|
// NOTE: We prevent doing it twice, it has been done for the login theme.
|
761
750
|
(0,transformCodebase/* transformCodebase */.N)({
|
762
751
|
srcDirPath: (0,external_path_.join)(getThemeTypeDirPath({
|
@@ -816,7 +805,7 @@ async function generateResourcesForMainTheme(params) {
|
|
816
805
|
keycloakifyVersion: (0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)(),
|
817
806
|
themeType,
|
818
807
|
fieldNames: readFieldNameUsage({
|
819
|
-
themeSrcDirPath,
|
808
|
+
themeSrcDirPath: buildContext.themeSrcDirPath,
|
820
809
|
themeType
|
821
810
|
})
|
822
811
|
});
|
@@ -831,14 +820,14 @@ async function generateResourcesForMainTheme(params) {
|
|
831
820
|
})(),
|
832
821
|
...readExtraPagesNames({
|
833
822
|
themeType,
|
834
|
-
themeSrcDirPath
|
823
|
+
themeSrcDirPath: buildContext.themeSrcDirPath
|
835
824
|
})
|
836
825
|
].forEach(pageId => {
|
837
826
|
const { ftlCode } = generateFtlFilesCode({ pageId });
|
838
827
|
external_fs_.writeFileSync((0,external_path_.join)(themeTypeDirPath, pageId), Buffer.from(ftlCode, "utf8"));
|
839
828
|
});
|
840
829
|
(0,generateMessageProperties/* generateMessageProperties */.k)({
|
841
|
-
themeSrcDirPath,
|
830
|
+
themeSrcDirPath: buildContext.themeSrcDirPath,
|
842
831
|
themeType
|
843
832
|
}).forEach(({ languageTag, propertiesFileSource }) => {
|
844
833
|
const messagesDirPath = (0,external_path_.join)(themeTypeDirPath, "messages");
|
@@ -876,16 +865,16 @@ async function generateResourcesForMainTheme(params) {
|
|
876
865
|
].join("\n\n"), "utf8"));
|
877
866
|
}
|
878
867
|
email: {
|
879
|
-
if (!
|
868
|
+
if (!buildContext.recordIsImplementedByThemeType.email) {
|
880
869
|
break email;
|
881
870
|
}
|
882
|
-
const emailThemeSrcDirPath = (0,external_path_.join)(themeSrcDirPath, "email");
|
871
|
+
const emailThemeSrcDirPath = (0,external_path_.join)(buildContext.themeSrcDirPath, "email");
|
883
872
|
(0,transformCodebase/* transformCodebase */.N)({
|
884
873
|
srcDirPath: emailThemeSrcDirPath,
|
885
874
|
destDirPath: getThemeTypeDirPath({ themeType: "email" })
|
886
875
|
});
|
887
876
|
}
|
888
|
-
if (
|
877
|
+
if (buildContext.recordIsImplementedByThemeType.account) {
|
889
878
|
await bringInAccountV1({
|
890
879
|
resourcesDirPath,
|
891
880
|
buildContext
|
@@ -895,11 +884,11 @@ async function generateResourcesForMainTheme(params) {
|
|
895
884
|
const metaInfKeycloakThemes = { themes: [] };
|
896
885
|
metaInfKeycloakThemes.themes.push({
|
897
886
|
name: themeName,
|
898
|
-
types: (0,objectEntries.objectEntries)(
|
887
|
+
types: (0,objectEntries.objectEntries)(buildContext.recordIsImplementedByThemeType)
|
899
888
|
.filter(([, isImplemented]) => isImplemented)
|
900
889
|
.map(([themeType]) => themeType)
|
901
890
|
});
|
902
|
-
if (
|
891
|
+
if (buildContext.recordIsImplementedByThemeType.account) {
|
903
892
|
metaInfKeycloakThemes.themes.push({
|
904
893
|
name: constants/* accountV1ThemeName */.y_,
|
905
894
|
types: ["account"]
|
@@ -989,8 +978,6 @@ var external_child_process_ = __webpack_require__(32081);
|
|
989
978
|
var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_);
|
990
979
|
// EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
|
991
980
|
var shared_buildContext = __webpack_require__(87751);
|
992
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/exclude.js
|
993
|
-
var exclude = __webpack_require__(41370);
|
994
981
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/extensionVersions.js
|
995
982
|
// NOTE: v0.5 is a dummy version.
|
996
983
|
const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6"];
|
@@ -1244,22 +1231,15 @@ async function buildJar(params) {
|
|
1244
1231
|
(0,fs_rmSync/* rmSync */.a)(keycloakifyBuildTmpDirPath, { recursive: true });
|
1245
1232
|
}
|
1246
1233
|
//# sourceMappingURL=buildJar.js.map
|
1247
|
-
// EXTERNAL MODULE: ./dist/bin/shared/getJarFileBasename.js
|
1248
|
-
var getJarFileBasename = __webpack_require__(2323);
|
1249
1234
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/buildJars.js
|
1250
1235
|
|
1251
1236
|
|
1252
1237
|
|
1253
1238
|
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
1239
|
(0,assert.assert)();
|
1258
1240
|
async function buildJars(params) {
|
1259
|
-
const {
|
1260
|
-
const doesImplementAccountTheme =
|
1261
|
-
projectDirPath: buildContext.projectDirPath
|
1262
|
-
}).implementedThemeTypes.account;
|
1241
|
+
const { resourcesDirPath, buildContext } = params;
|
1242
|
+
const doesImplementAccountTheme = buildContext.recordIsImplementedByThemeType.account;
|
1263
1243
|
await Promise.all(keycloakAccountV1Versions.map(keycloakAccountV1Version => keycloakThemeAdditionalInfoExtensionVersions.map(keycloakThemeAdditionalInfoExtensionVersion => {
|
1264
1244
|
const keycloakVersionRange = getKeycloakVersionRangeForJar({
|
1265
1245
|
doesImplementAccountTheme,
|
@@ -1269,33 +1249,19 @@ async function buildJars(params) {
|
|
1269
1249
|
if (keycloakVersionRange === undefined) {
|
1270
1250
|
return undefined;
|
1271
1251
|
}
|
1272
|
-
|
1273
|
-
|
1274
|
-
keycloakVersionRange
|
1275
|
-
};
|
1276
|
-
})
|
1277
|
-
.filter((0,exclude.exclude)(undefined))
|
1278
|
-
.map(({ keycloakThemeAdditionalInfoExtensionVersion, keycloakVersionRange }) => {
|
1279
|
-
const { jarFileBasename } = (0,getJarFileBasename/* getJarFileBasename */.m)({
|
1280
|
-
keycloakVersionRange
|
1281
|
-
});
|
1282
|
-
if (onlyBuildJarFileBasename !== undefined &&
|
1283
|
-
onlyBuildJarFileBasename !== jarFileBasename) {
|
1252
|
+
const jarTarget = buildContext.jarTargets.find(jarTarget => jarTarget.keycloakVersionRange === keycloakVersionRange);
|
1253
|
+
if (jarTarget === undefined) {
|
1284
1254
|
return undefined;
|
1285
1255
|
}
|
1286
|
-
|
1256
|
+
const { jarFileBasename } = jarTarget;
|
1257
|
+
return buildJar({
|
1258
|
+
jarFileBasename,
|
1259
|
+
keycloakAccountV1Version,
|
1287
1260
|
keycloakThemeAdditionalInfoExtensionVersion,
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
.map(({ keycloakThemeAdditionalInfoExtensionVersion, jarFileBasename }) => buildJar({
|
1293
|
-
jarFileBasename,
|
1294
|
-
keycloakAccountV1Version,
|
1295
|
-
keycloakThemeAdditionalInfoExtensionVersion,
|
1296
|
-
resourcesDirPath,
|
1297
|
-
buildContext
|
1298
|
-
})))
|
1261
|
+
resourcesDirPath,
|
1262
|
+
buildContext
|
1263
|
+
});
|
1264
|
+
}))
|
1299
1265
|
.flat());
|
1300
1266
|
}
|
1301
1267
|
//# sourceMappingURL=buildJars.js.map
|
@@ -1371,13 +1337,15 @@ async function command(params) {
|
|
1371
1337
|
}
|
1372
1338
|
external_child_process_.execSync("npx vite", {
|
1373
1339
|
cwd: buildContext.projectDirPath,
|
1374
|
-
env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.runPostBuildScript */.fe.runPostBuildScript]: JSON.stringify(
|
1340
|
+
env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.runPostBuildScript */.fe.runPostBuildScript]: JSON.stringify({
|
1341
|
+
resourcesDirPath,
|
1342
|
+
buildContext
|
1343
|
+
}) })
|
1375
1344
|
});
|
1376
1345
|
}
|
1377
1346
|
await buildJars({
|
1378
1347
|
resourcesDirPath,
|
1379
|
-
buildContext
|
1380
|
-
onlyBuildJarFileBasename: process.env[constants/* onlyBuildJarFileBasenameEnvName */.Dv]
|
1348
|
+
buildContext
|
1381
1349
|
});
|
1382
1350
|
(0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
|
1383
1351
|
console.log(source_default().green(`✓ keycloak theme built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
|
@@ -1389,123 +1357,54 @@ async function command(params) {
|
|
1389
1357
|
|
1390
1358
|
/***/ }),
|
1391
1359
|
|
1392
|
-
/***/
|
1360
|
+
/***/ 62190:
|
1393
1361
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1394
1362
|
|
1395
1363
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1396
|
-
/* harmony export */ "
|
1364
|
+
/* harmony export */ "p": () => (/* binding */ downloadKeycloakStaticResources)
|
1397
1365
|
/* harmony export */ });
|
1398
|
-
/* harmony import */ var
|
1399
|
-
/* harmony import */ var
|
1400
|
-
/* harmony import */ var
|
1401
|
-
/* harmony import */ var
|
1402
|
-
/* harmony import */ var
|
1403
|
-
/* harmony import */ var
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
let cache;
|
1409
|
-
function getImplementedThemeTypes(params) {
|
1410
|
-
const { projectDirPath } = params;
|
1411
|
-
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
1412
|
-
const { implementedThemeTypes } = cache;
|
1413
|
-
return { implementedThemeTypes };
|
1414
|
-
}
|
1415
|
-
cache = undefined;
|
1416
|
-
const { themeSrcDirPath } = (0,_getThemeSrcDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThemeSrcDirPath */ .f)({
|
1417
|
-
projectDirPath
|
1418
|
-
});
|
1419
|
-
const implementedThemeTypes = (0,tsafe_objectFromEntries__WEBPACK_IMPORTED_MODULE_1__.objectFromEntries)(["login", "account", "email"].map(themeType => [
|
1420
|
-
themeType,
|
1421
|
-
fs__WEBPACK_IMPORTED_MODULE_2__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_0__.join)(themeSrcDirPath, themeType))
|
1422
|
-
]));
|
1423
|
-
cache = { projectDirPath, implementedThemeTypes };
|
1424
|
-
return { implementedThemeTypes };
|
1425
|
-
}
|
1426
|
-
//# sourceMappingURL=getImplementedThemeTypes.js.map
|
1427
|
-
|
1428
|
-
/***/ }),
|
1429
|
-
|
1430
|
-
/***/ 2323:
|
1431
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1432
|
-
|
1433
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1434
|
-
/* harmony export */ "m": () => (/* binding */ getJarFileBasename)
|
1435
|
-
/* harmony export */ });
|
1436
|
-
function getJarFileBasename(params) {
|
1437
|
-
const { keycloakVersionRange } = params;
|
1438
|
-
const jarFileBasename = `keycloak-theme-for-kc-${keycloakVersionRange}.jar`;
|
1439
|
-
return { jarFileBasename };
|
1440
|
-
}
|
1441
|
-
//# sourceMappingURL=getJarFileBasename.js.map
|
1442
|
-
|
1443
|
-
/***/ }),
|
1444
|
-
|
1445
|
-
/***/ 39216:
|
1446
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1447
|
-
|
1448
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1449
|
-
/* harmony export */ "f": () => (/* binding */ getThemeSrcDirPath)
|
1450
|
-
/* harmony export */ });
|
1451
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57147);
|
1452
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
1453
|
-
/* harmony import */ var tsafe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1666);
|
1454
|
-
/* harmony import */ var tsafe__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tsafe__WEBPACK_IMPORTED_MODULE_1__);
|
1455
|
-
/* harmony import */ var _tools_crawl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73036);
|
1456
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71017);
|
1457
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
1458
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
|
1459
|
-
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78818);
|
1460
|
-
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_5__);
|
1366
|
+
/* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60332);
|
1367
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
1368
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
1369
|
+
/* harmony import */ var _downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47802);
|
1370
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
|
1371
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88078);
|
1372
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_4__);
|
1373
|
+
/* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
|
1461
1374
|
|
1462
1375
|
|
1463
1376
|
|
1464
1377
|
|
1465
1378
|
|
1466
1379
|
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
const {
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
dirPath: srcDirPath,
|
1480
|
-
returnedPathsType: "relative to dirPath"
|
1481
|
-
})
|
1482
|
-
.map(fileRelativePath => {
|
1483
|
-
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
1484
|
-
const split = fileRelativePath.split(themeSrcDirBasename);
|
1485
|
-
if (split.length === 2) {
|
1486
|
-
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
1487
|
-
}
|
1488
|
-
}
|
1489
|
-
return undefined;
|
1490
|
-
})
|
1491
|
-
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
1492
|
-
if (themeSrcDirPath !== undefined) {
|
1493
|
-
return { themeSrcDirPath };
|
1494
|
-
}
|
1495
|
-
for (const themeType of [..._constants__WEBPACK_IMPORTED_MODULE_4__/* .themeTypes */ .rO, "email"]) {
|
1496
|
-
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, themeType))) {
|
1497
|
-
continue;
|
1498
|
-
}
|
1499
|
-
return { themeSrcDirPath: srcDirPath };
|
1380
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
|
1381
|
+
async function downloadKeycloakStaticResources(params) {
|
1382
|
+
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
1383
|
+
const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
|
1384
|
+
keycloakVersion,
|
1385
|
+
buildContext
|
1386
|
+
});
|
1387
|
+
const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
|
1388
|
+
repatriate_base_resources: {
|
1389
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
|
1390
|
+
if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
|
1391
|
+
break repatriate_base_resources;
|
1500
1392
|
}
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1393
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1394
|
+
srcDirPath,
|
1395
|
+
destDirPath: resourcesDirPath
|
1396
|
+
});
|
1397
|
+
}
|
1398
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1399
|
+
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", themeType, "resources"),
|
1400
|
+
destDirPath: resourcesDirPath
|
1401
|
+
});
|
1402
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1403
|
+
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
|
1404
|
+
destDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(resourcesDirPath, _constants__WEBPACK_IMPORTED_MODULE_3__/* .resources_common */ .z0)
|
1405
|
+
});
|
1506
1406
|
}
|
1507
|
-
|
1508
|
-
//# sourceMappingURL=getThemeSrcDirPath.js.map
|
1407
|
+
//# sourceMappingURL=downloadKeycloakStaticResources.js.map
|
1509
1408
|
|
1510
1409
|
/***/ }),
|
1511
1410
|
|