keycloakify 10.0.0-rc.63 → 10.0.0-rc.65
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/account/KcContext/KcContext.d.ts +1 -0
- package/account/KcContext/KcContext.js.map +1 -1
- package/account/KcContext/kcContextMocks.js +2 -1
- package/account/KcContext/kcContextMocks.js.map +1 -1
- package/account/pages/Totp.js +2 -7
- package/account/pages/Totp.js.map +1 -1
- package/bin/190.index.js +67 -101
- package/bin/{991.index.js → 203.index.js} +40 -19
- package/bin/{952.index.js → 363.index.js} +174 -154
- package/bin/{214.index.js → 430.index.js} +2 -161
- package/bin/526.index.js +130 -90
- package/bin/538.index.js +37 -28
- package/bin/{98.index.js → 827.index.js} +39 -187
- package/bin/{941.index.js → 890.index.js} +159 -2
- package/bin/932.index.js +104 -129
- package/bin/97.index.js +1 -1
- package/bin/main.js +7 -7
- package/package.json +9 -8
- package/src/account/KcContext/KcContext.ts +1 -0
- package/src/account/KcContext/kcContextMocks.ts +2 -1
- package/src/account/pages/Totp.tsx +1 -7
- package/src/bin/add-story.ts +1 -1
- package/src/bin/keycloakify/buildJars/buildJar.ts +24 -27
- package/src/bin/keycloakify/buildJars/buildJars.ts +5 -5
- package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +8 -6
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +33 -32
- package/src/bin/keycloakify/generateResources/generateResourcesForThemeVariant.ts +22 -26
- package/src/bin/shared/downloadKeycloakDefaultTheme.ts +135 -108
- package/src/bin/shared/getImplementedThemeTypes.ts +38 -0
- package/src/bin/shared/getThemeSrcDirPath.ts +44 -32
- package/src/bin/shared/metaInfKeycloakThemes.ts +16 -60
- package/src/bin/start-keycloak/keycloakifyBuild.ts +1 -1
- package/src/bin/start-keycloak/start-keycloak.ts +35 -70
- package/vite-plugin/index.js +1917 -100
package/bin/526.index.js
CHANGED
@@ -3,6 +3,44 @@ exports.id = 526;
|
|
3
3
|
exports.ids = [526];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
|
+
/***/ 64409:
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
8
|
+
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
10
|
+
/* harmony export */ "C": () => (/* binding */ getImplementedThemeTypes)
|
11
|
+
/* harmony export */ });
|
12
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
13
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
14
|
+
/* harmony import */ var tsafe_objectFromEntries__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68634);
|
15
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57147);
|
16
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__);
|
17
|
+
/* harmony import */ var _getThemeSrcDirPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39216);
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
let cache;
|
23
|
+
function getImplementedThemeTypes(params) {
|
24
|
+
const { projectDirPath } = params;
|
25
|
+
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
26
|
+
const { implementedThemeTypes } = cache;
|
27
|
+
return { implementedThemeTypes };
|
28
|
+
}
|
29
|
+
cache = undefined;
|
30
|
+
const { themeSrcDirPath } = (0,_getThemeSrcDirPath__WEBPACK_IMPORTED_MODULE_3__/* .getThemeSrcDirPath */ .f)({
|
31
|
+
projectDirPath
|
32
|
+
});
|
33
|
+
const implementedThemeTypes = (0,tsafe_objectFromEntries__WEBPACK_IMPORTED_MODULE_1__.objectFromEntries)(["login", "account", "email"].map(themeType => [
|
34
|
+
themeType,
|
35
|
+
fs__WEBPACK_IMPORTED_MODULE_2__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_0__.join)(themeSrcDirPath, themeType))
|
36
|
+
]));
|
37
|
+
cache = { projectDirPath, implementedThemeTypes };
|
38
|
+
return { implementedThemeTypes };
|
39
|
+
}
|
40
|
+
//# sourceMappingURL=getImplementedThemeTypes.js.map
|
41
|
+
|
42
|
+
/***/ }),
|
43
|
+
|
6
44
|
/***/ 2323:
|
7
45
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
8
46
|
|
@@ -18,67 +56,70 @@ function getJarFileBasename(params) {
|
|
18
56
|
|
19
57
|
/***/ }),
|
20
58
|
|
21
|
-
/***/
|
59
|
+
/***/ 39216:
|
22
60
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
23
61
|
|
24
62
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
25
|
-
/* harmony export */ "
|
26
|
-
/* harmony export */ "JJ": () => (/* binding */ writeMetaInfKeycloakThemes),
|
27
|
-
/* harmony export */ "Ju": () => (/* binding */ readMetaInfKeycloakThemes_fromResourcesDirPath),
|
28
|
-
/* harmony export */ "KQ": () => (/* binding */ getMetaInfKeycloakThemesJsonFilePath)
|
63
|
+
/* harmony export */ "f": () => (/* binding */ getThemeSrcDirPath)
|
29
64
|
/* harmony export */ });
|
30
|
-
/* harmony import */ var
|
31
|
-
/* harmony import */ var
|
32
|
-
/* harmony import */ var
|
33
|
-
/* harmony import */ var
|
34
|
-
/* harmony import */ var
|
35
|
-
/* harmony import */ var
|
36
|
-
/* harmony import */ var
|
65
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57147);
|
66
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
67
|
+
/* harmony import */ var tsafe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1666);
|
68
|
+
/* harmony import */ var tsafe__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tsafe__WEBPACK_IMPORTED_MODULE_1__);
|
69
|
+
/* harmony import */ var _tools_crawl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73036);
|
70
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71017);
|
71
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
72
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
|
73
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78818);
|
74
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_5__);
|
37
75
|
|
38
76
|
|
39
77
|
|
40
78
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
function
|
46
|
-
const {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
79
|
+
|
80
|
+
|
81
|
+
let cache = undefined;
|
82
|
+
/** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
|
83
|
+
function getThemeSrcDirPath(params) {
|
84
|
+
const { projectDirPath } = params;
|
85
|
+
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
86
|
+
const { themeSrcDirPath } = cache;
|
87
|
+
return { themeSrcDirPath };
|
88
|
+
}
|
89
|
+
cache = undefined;
|
90
|
+
const { themeSrcDirPath } = (() => {
|
91
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(projectDirPath, "src");
|
92
|
+
const themeSrcDirPath = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
|
93
|
+
dirPath: srcDirPath,
|
94
|
+
returnedPathsType: "relative to dirPath"
|
95
|
+
})
|
96
|
+
.map(fileRelativePath => {
|
97
|
+
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
98
|
+
const split = fileRelativePath.split(themeSrcDirBasename);
|
99
|
+
if (split.length === 2) {
|
100
|
+
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
101
|
+
}
|
62
102
|
}
|
103
|
+
return undefined;
|
104
|
+
})
|
105
|
+
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
106
|
+
if (themeSrcDirPath !== undefined) {
|
107
|
+
return { themeSrcDirPath };
|
63
108
|
}
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}
|
68
|
-
|
69
|
-
const { resourcesDirPath, metaInfKeycloakThemes } = params;
|
70
|
-
const metaInfKeycloakThemesJsonPath = getMetaInfKeycloakThemesJsonFilePath({
|
71
|
-
resourcesDirPath
|
72
|
-
});
|
73
|
-
{
|
74
|
-
const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(metaInfKeycloakThemesJsonPath);
|
75
|
-
if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(dirPath)) {
|
76
|
-
fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync(dirPath, { recursive: true });
|
109
|
+
for (const themeType of [..._constants__WEBPACK_IMPORTED_MODULE_4__/* .themeTypes */ .rO, "email"]) {
|
110
|
+
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, themeType))) {
|
111
|
+
continue;
|
112
|
+
}
|
113
|
+
return { themeSrcDirPath: srcDirPath };
|
77
114
|
}
|
78
|
-
|
79
|
-
|
115
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_5___default().red("Can't locate your theme source directory. It should be either: "));
|
116
|
+
process.exit(-1);
|
117
|
+
})();
|
118
|
+
cache = { projectDirPath, themeSrcDirPath };
|
119
|
+
return { themeSrcDirPath };
|
80
120
|
}
|
81
|
-
|
121
|
+
const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
|
122
|
+
//# sourceMappingURL=getThemeSrcDirPath.js.map
|
82
123
|
|
83
124
|
/***/ }),
|
84
125
|
|
@@ -306,8 +347,8 @@ var shared_buildContext = __webpack_require__(87751);
|
|
306
347
|
var exclude = __webpack_require__(41370);
|
307
348
|
// EXTERNAL MODULE: ./dist/bin/shared/promptKeycloakVersion.js + 2 modules
|
308
349
|
var promptKeycloakVersion = __webpack_require__(95781);
|
309
|
-
// EXTERNAL MODULE: ./dist/bin/shared/
|
310
|
-
var
|
350
|
+
// EXTERNAL MODULE: ./dist/bin/shared/getImplementedThemeTypes.js
|
351
|
+
var getImplementedThemeTypes = __webpack_require__(64409);
|
311
352
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
312
353
|
var constants = __webpack_require__(173);
|
313
354
|
// EXTERNAL MODULE: ./dist/bin/tools/SemVer.js
|
@@ -518,38 +559,7 @@ async function command(params) {
|
|
518
559
|
}
|
519
560
|
const { cliCommandOptions } = params;
|
520
561
|
const buildContext = (0,shared_buildContext/* getBuildContext */.s)({ cliCommandOptions });
|
521
|
-
{
|
522
|
-
const { isAppBuildSuccess } = await appBuild({
|
523
|
-
buildContext
|
524
|
-
});
|
525
|
-
if (!isAppBuildSuccess) {
|
526
|
-
console.log(source_default().red(`App build failed, exiting. Try running 'yarn build-keycloak-theme' and see what's wrong.`));
|
527
|
-
process.exit(1);
|
528
|
-
}
|
529
|
-
const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
|
530
|
-
onlyBuildJarFileBasename: undefined,
|
531
|
-
buildContext
|
532
|
-
});
|
533
|
-
if (!isKeycloakifyBuildSuccess) {
|
534
|
-
console.log(source_default().red(`Keycloakify build failed, exiting. Try running 'yarn build-keycloak-theme' and see what's wrong.`));
|
535
|
-
process.exit(1);
|
536
|
-
}
|
537
|
-
}
|
538
|
-
const { doesImplementAccountTheme } = await (async () => {
|
539
|
-
const latestJarFilePath = external_fs_.readdirSync(buildContext.keycloakifyBuildDirPath)
|
540
|
-
.filter(fileBasename => fileBasename.endsWith(".jar"))
|
541
|
-
.map(fileBasename => (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, fileBasename))
|
542
|
-
.sort((a, b) => external_fs_.statSync(b).mtimeMs - external_fs_.statSync(a).mtimeMs)[0];
|
543
|
-
(0,assert.assert)(latestJarFilePath !== undefined);
|
544
|
-
const metaInfKeycloakThemes = await (0,shared_metaInfKeycloakThemes/* readMetaInfKeycloakThemes_fromJar */.IS)({
|
545
|
-
jarFilePath: latestJarFilePath
|
546
|
-
});
|
547
|
-
const mainThemeEntry = metaInfKeycloakThemes.themes.find(({ name }) => name === buildContext.themeNames[0]);
|
548
|
-
(0,assert.assert)(mainThemeEntry !== undefined);
|
549
|
-
const doesImplementAccountTheme = mainThemeEntry.types.includes("account");
|
550
|
-
return { doesImplementAccountTheme };
|
551
|
-
})();
|
552
|
-
const { keycloakVersion, keycloakMajorNumber: keycloakMajorVersionNumber } = await (async function getKeycloakMajor() {
|
562
|
+
const { keycloakVersion, keycloakMajorNumber: keycloakMajorVersionNumber } = await (async () => {
|
553
563
|
if (cliCommandOptions.keycloakVersion !== undefined) {
|
554
564
|
return {
|
555
565
|
keycloakVersion: cliCommandOptions.keycloakVersion,
|
@@ -565,16 +575,12 @@ async function command(params) {
|
|
565
575
|
});
|
566
576
|
console.log(`→ ${keycloakVersion}`);
|
567
577
|
const keycloakMajorNumber = SemVer/* SemVer.parse */.h.parse(keycloakVersion).major;
|
568
|
-
if (doesImplementAccountTheme && keycloakMajorNumber === 22) {
|
569
|
-
console.log([
|
570
|
-
"Unfortunately, Keycloakify themes that implements an account theme do not work on Keycloak 22",
|
571
|
-
"Please select any other Keycloak version"
|
572
|
-
].join(" "));
|
573
|
-
return getKeycloakMajor();
|
574
|
-
}
|
575
578
|
return { keycloakVersion, keycloakMajorNumber };
|
576
579
|
})();
|
577
580
|
const keycloakVersionRange = (() => {
|
581
|
+
const doesImplementAccountTheme = (0,getImplementedThemeTypes/* getImplementedThemeTypes */.C)({
|
582
|
+
projectDirPath: buildContext.projectDirPath
|
583
|
+
}).implementedThemeTypes.account;
|
578
584
|
if (doesImplementAccountTheme) {
|
579
585
|
const keycloakVersionRange = (() => {
|
580
586
|
if (keycloakMajorVersionNumber <= 21) {
|
@@ -604,6 +610,23 @@ async function command(params) {
|
|
604
610
|
}
|
605
611
|
})();
|
606
612
|
const { jarFileBasename } = (0,getJarFileBasename/* getJarFileBasename */.m)({ keycloakVersionRange });
|
613
|
+
{
|
614
|
+
const { isAppBuildSuccess } = await appBuild({
|
615
|
+
buildContext
|
616
|
+
});
|
617
|
+
if (!isAppBuildSuccess) {
|
618
|
+
console.log(source_default().red(`App build failed, exiting. Try running 'npm run build-keycloak-theme' and see what's wrong.`));
|
619
|
+
process.exit(1);
|
620
|
+
}
|
621
|
+
const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
|
622
|
+
onlyBuildJarFileBasename: jarFileBasename,
|
623
|
+
buildContext
|
624
|
+
});
|
625
|
+
if (!isKeycloakifyBuildSuccess) {
|
626
|
+
console.log(source_default().red(`Keycloakify build failed, exiting. Try running 'npm run build-keycloak-theme' and see what's wrong.`));
|
627
|
+
process.exit(1);
|
628
|
+
}
|
629
|
+
}
|
607
630
|
console.log(`Using Keycloak ${source_default().bold(jarFileBasename)}`);
|
608
631
|
const realmJsonFilePath = await (async () => {
|
609
632
|
if (cliCommandOptions.realmJsonFilePath !== undefined) {
|
@@ -806,6 +829,23 @@ async function command(params) {
|
|
806
829
|
|
807
830
|
//# sourceMappingURL=index.js.map
|
808
831
|
|
832
|
+
/***/ }),
|
833
|
+
|
834
|
+
/***/ 90665:
|
835
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
836
|
+
|
837
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
838
|
+
/* harmony export */ "V": () => (/* binding */ isInside)
|
839
|
+
/* harmony export */ });
|
840
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
841
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
842
|
+
|
843
|
+
function isInside(params) {
|
844
|
+
const { dirPath, filePath } = params;
|
845
|
+
return !(0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(dirPath, filePath).startsWith("..");
|
846
|
+
}
|
847
|
+
//# sourceMappingURL=isInside.js.map
|
848
|
+
|
809
849
|
/***/ })
|
810
850
|
|
811
851
|
};
|
package/bin/538.index.js
CHANGED
@@ -384,46 +384,55 @@ const containerName = "keycloak-keycloakify";
|
|
384
384
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71017);
|
385
385
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
386
386
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
|
387
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78818);
|
388
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_5__);
|
387
389
|
|
388
390
|
|
389
391
|
|
390
392
|
|
391
393
|
|
392
|
-
|
394
|
+
|
395
|
+
let cache = undefined;
|
393
396
|
/** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
|
394
397
|
function getThemeSrcDirPath(params) {
|
395
398
|
const { projectDirPath } = params;
|
396
|
-
|
397
|
-
|
398
|
-
dirPath: srcDirPath,
|
399
|
-
returnedPathsType: "relative to dirPath"
|
400
|
-
})
|
401
|
-
.map(fileRelativePath => {
|
402
|
-
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
403
|
-
const split = fileRelativePath.split(themeSrcDirBasename);
|
404
|
-
if (split.length === 2) {
|
405
|
-
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
406
|
-
}
|
407
|
-
}
|
408
|
-
return undefined;
|
409
|
-
})
|
410
|
-
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
411
|
-
if (themeSrcDirPath !== undefined) {
|
399
|
+
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
400
|
+
const { themeSrcDirPath } = cache;
|
412
401
|
return { themeSrcDirPath };
|
413
402
|
}
|
414
|
-
|
415
|
-
|
416
|
-
|
403
|
+
cache = undefined;
|
404
|
+
const { themeSrcDirPath } = (() => {
|
405
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(projectDirPath, "src");
|
406
|
+
const themeSrcDirPath = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
|
407
|
+
dirPath: srcDirPath,
|
408
|
+
returnedPathsType: "relative to dirPath"
|
409
|
+
})
|
410
|
+
.map(fileRelativePath => {
|
411
|
+
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
412
|
+
const split = fileRelativePath.split(themeSrcDirBasename);
|
413
|
+
if (split.length === 2) {
|
414
|
+
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
415
|
+
}
|
416
|
+
}
|
417
|
+
return undefined;
|
418
|
+
})
|
419
|
+
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
420
|
+
if (themeSrcDirPath !== undefined) {
|
421
|
+
return { themeSrcDirPath };
|
417
422
|
}
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
423
|
+
for (const themeType of [..._constants__WEBPACK_IMPORTED_MODULE_4__/* .themeTypes */ .rO, "email"]) {
|
424
|
+
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, themeType))) {
|
425
|
+
continue;
|
426
|
+
}
|
427
|
+
return { themeSrcDirPath: srcDirPath };
|
428
|
+
}
|
429
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_5___default().red("Can't locate your theme source directory. It should be either: "));
|
430
|
+
process.exit(-1);
|
431
|
+
})();
|
432
|
+
cache = { projectDirPath, themeSrcDirPath };
|
433
|
+
return { themeSrcDirPath };
|
426
434
|
}
|
435
|
+
const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
|
427
436
|
//# sourceMappingURL=getThemeSrcDirPath.js.map
|
428
437
|
|
429
438
|
/***/ }),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
exports.id =
|
3
|
-
exports.ids = [
|
2
|
+
exports.id = 827;
|
3
|
+
exports.ids = [827];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
6
|
/***/ 87751:
|
@@ -384,46 +384,55 @@ const containerName = "keycloak-keycloakify";
|
|
384
384
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71017);
|
385
385
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
386
386
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
|
387
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(78818);
|
388
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_5__);
|
387
389
|
|
388
390
|
|
389
391
|
|
390
392
|
|
391
393
|
|
392
|
-
|
394
|
+
|
395
|
+
let cache = undefined;
|
393
396
|
/** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
|
394
397
|
function getThemeSrcDirPath(params) {
|
395
398
|
const { projectDirPath } = params;
|
396
|
-
|
397
|
-
|
398
|
-
dirPath: srcDirPath,
|
399
|
-
returnedPathsType: "relative to dirPath"
|
400
|
-
})
|
401
|
-
.map(fileRelativePath => {
|
402
|
-
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
403
|
-
const split = fileRelativePath.split(themeSrcDirBasename);
|
404
|
-
if (split.length === 2) {
|
405
|
-
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
406
|
-
}
|
407
|
-
}
|
408
|
-
return undefined;
|
409
|
-
})
|
410
|
-
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
411
|
-
if (themeSrcDirPath !== undefined) {
|
399
|
+
if (cache !== undefined && cache.projectDirPath === projectDirPath) {
|
400
|
+
const { themeSrcDirPath } = cache;
|
412
401
|
return { themeSrcDirPath };
|
413
402
|
}
|
414
|
-
|
415
|
-
|
416
|
-
|
403
|
+
cache = undefined;
|
404
|
+
const { themeSrcDirPath } = (() => {
|
405
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(projectDirPath, "src");
|
406
|
+
const themeSrcDirPath = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_2__/* .crawl */ .J)({
|
407
|
+
dirPath: srcDirPath,
|
408
|
+
returnedPathsType: "relative to dirPath"
|
409
|
+
})
|
410
|
+
.map(fileRelativePath => {
|
411
|
+
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
412
|
+
const split = fileRelativePath.split(themeSrcDirBasename);
|
413
|
+
if (split.length === 2) {
|
414
|
+
return (0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
415
|
+
}
|
416
|
+
}
|
417
|
+
return undefined;
|
418
|
+
})
|
419
|
+
.filter((0,tsafe__WEBPACK_IMPORTED_MODULE_1__.exclude)(undefined))[0];
|
420
|
+
if (themeSrcDirPath !== undefined) {
|
421
|
+
return { themeSrcDirPath };
|
417
422
|
}
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
423
|
+
for (const themeType of [..._constants__WEBPACK_IMPORTED_MODULE_4__/* .themeTypes */ .rO, "email"]) {
|
424
|
+
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(srcDirPath, themeType))) {
|
425
|
+
continue;
|
426
|
+
}
|
427
|
+
return { themeSrcDirPath: srcDirPath };
|
428
|
+
}
|
429
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_5___default().red("Can't locate your theme source directory. It should be either: "));
|
430
|
+
process.exit(-1);
|
431
|
+
})();
|
432
|
+
cache = { projectDirPath, themeSrcDirPath };
|
433
|
+
return { themeSrcDirPath };
|
426
434
|
}
|
435
|
+
const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
|
427
436
|
//# sourceMappingURL=getThemeSrcDirPath.js.map
|
428
437
|
|
429
438
|
/***/ }),
|
@@ -1079,163 +1088,6 @@ const withObjectValues = options => {
|
|
1079
1088
|
|
1080
1089
|
exports.withObjectValues = withObjectValues;
|
1081
1090
|
|
1082
|
-
/***/ }),
|
1083
|
-
|
1084
|
-
/***/ 31621:
|
1085
|
-
/***/ ((module) => {
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
module.exports = (flag, argv = process.argv) => {
|
1090
|
-
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
1091
|
-
const position = argv.indexOf(prefix + flag);
|
1092
|
-
const terminatorPosition = argv.indexOf('--');
|
1093
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
1094
|
-
};
|
1095
|
-
|
1096
|
-
|
1097
|
-
/***/ }),
|
1098
|
-
|
1099
|
-
/***/ 59318:
|
1100
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1101
|
-
|
1102
|
-
|
1103
|
-
const os = __webpack_require__(22037);
|
1104
|
-
const tty = __webpack_require__(76224);
|
1105
|
-
const hasFlag = __webpack_require__(31621);
|
1106
|
-
|
1107
|
-
const {env} = process;
|
1108
|
-
|
1109
|
-
let forceColor;
|
1110
|
-
if (hasFlag('no-color') ||
|
1111
|
-
hasFlag('no-colors') ||
|
1112
|
-
hasFlag('color=false') ||
|
1113
|
-
hasFlag('color=never')) {
|
1114
|
-
forceColor = 0;
|
1115
|
-
} else if (hasFlag('color') ||
|
1116
|
-
hasFlag('colors') ||
|
1117
|
-
hasFlag('color=true') ||
|
1118
|
-
hasFlag('color=always')) {
|
1119
|
-
forceColor = 1;
|
1120
|
-
}
|
1121
|
-
|
1122
|
-
if ('FORCE_COLOR' in env) {
|
1123
|
-
if (env.FORCE_COLOR === 'true') {
|
1124
|
-
forceColor = 1;
|
1125
|
-
} else if (env.FORCE_COLOR === 'false') {
|
1126
|
-
forceColor = 0;
|
1127
|
-
} else {
|
1128
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
1129
|
-
}
|
1130
|
-
}
|
1131
|
-
|
1132
|
-
function translateLevel(level) {
|
1133
|
-
if (level === 0) {
|
1134
|
-
return false;
|
1135
|
-
}
|
1136
|
-
|
1137
|
-
return {
|
1138
|
-
level,
|
1139
|
-
hasBasic: true,
|
1140
|
-
has256: level >= 2,
|
1141
|
-
has16m: level >= 3
|
1142
|
-
};
|
1143
|
-
}
|
1144
|
-
|
1145
|
-
function supportsColor(haveStream, streamIsTTY) {
|
1146
|
-
if (forceColor === 0) {
|
1147
|
-
return 0;
|
1148
|
-
}
|
1149
|
-
|
1150
|
-
if (hasFlag('color=16m') ||
|
1151
|
-
hasFlag('color=full') ||
|
1152
|
-
hasFlag('color=truecolor')) {
|
1153
|
-
return 3;
|
1154
|
-
}
|
1155
|
-
|
1156
|
-
if (hasFlag('color=256')) {
|
1157
|
-
return 2;
|
1158
|
-
}
|
1159
|
-
|
1160
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
1161
|
-
return 0;
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
const min = forceColor || 0;
|
1165
|
-
|
1166
|
-
if (env.TERM === 'dumb') {
|
1167
|
-
return min;
|
1168
|
-
}
|
1169
|
-
|
1170
|
-
if (process.platform === 'win32') {
|
1171
|
-
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
1172
|
-
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
1173
|
-
const osRelease = os.release().split('.');
|
1174
|
-
if (
|
1175
|
-
Number(osRelease[0]) >= 10 &&
|
1176
|
-
Number(osRelease[2]) >= 10586
|
1177
|
-
) {
|
1178
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
1179
|
-
}
|
1180
|
-
|
1181
|
-
return 1;
|
1182
|
-
}
|
1183
|
-
|
1184
|
-
if ('CI' in env) {
|
1185
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
1186
|
-
return 1;
|
1187
|
-
}
|
1188
|
-
|
1189
|
-
return min;
|
1190
|
-
}
|
1191
|
-
|
1192
|
-
if ('TEAMCITY_VERSION' in env) {
|
1193
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
1194
|
-
}
|
1195
|
-
|
1196
|
-
if (env.COLORTERM === 'truecolor') {
|
1197
|
-
return 3;
|
1198
|
-
}
|
1199
|
-
|
1200
|
-
if ('TERM_PROGRAM' in env) {
|
1201
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
1202
|
-
|
1203
|
-
switch (env.TERM_PROGRAM) {
|
1204
|
-
case 'iTerm.app':
|
1205
|
-
return version >= 3 ? 3 : 2;
|
1206
|
-
case 'Apple_Terminal':
|
1207
|
-
return 2;
|
1208
|
-
// No default
|
1209
|
-
}
|
1210
|
-
}
|
1211
|
-
|
1212
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
1213
|
-
return 2;
|
1214
|
-
}
|
1215
|
-
|
1216
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
1217
|
-
return 1;
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
if ('COLORTERM' in env) {
|
1221
|
-
return 1;
|
1222
|
-
}
|
1223
|
-
|
1224
|
-
return min;
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
function getSupportLevel(stream) {
|
1228
|
-
const level = supportsColor(stream, stream && stream.isTTY);
|
1229
|
-
return translateLevel(level);
|
1230
|
-
}
|
1231
|
-
|
1232
|
-
module.exports = {
|
1233
|
-
supportsColor: getSupportLevel,
|
1234
|
-
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
1235
|
-
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
1236
|
-
};
|
1237
|
-
|
1238
|
-
|
1239
1091
|
/***/ })
|
1240
1092
|
|
1241
1093
|
};
|