keycloakify 10.0.0-rc.43 → 10.0.0-rc.45
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/{322.index.js → 190.index.js} +58 -61
- package/bin/193.index.js +0 -51
- package/bin/3.index.js +83 -94
- package/bin/526.index.js +76 -48
- package/bin/538.index.js +7 -4
- package/bin/932.index.js +535 -1
- package/bin/98.index.js +5 -3
- package/bin/{944.index.js → 991.index.js} +74 -5
- package/bin/main.js +4 -16
- package/bin/shared/buildContext.d.ts +1 -1
- package/bin/shared/constants.d.ts +1 -1
- package/bin/shared/constants.js +1 -1
- package/bin/shared/constants.js.map +1 -1
- package/package.json +3 -6
- package/src/bin/keycloakify/buildJars/buildJar.ts +9 -21
- package/src/bin/keycloakify/buildJars/buildJars.ts +15 -4
- package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +6 -7
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +11 -3
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +6 -18
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +9 -15
- package/src/bin/keycloakify/keycloakify.ts +20 -9
- package/src/bin/main.ts +0 -14
- package/src/bin/shared/buildContext.ts +7 -3
- package/src/bin/shared/constants.ts +1 -1
- package/src/bin/shared/generateKcGenTs.ts +2 -1
- package/src/bin/shared/metaInfKeycloakThemes.ts +37 -14
- package/src/bin/start-keycloak/keycloakifyBuild.ts +4 -4
- package/src/bin/start-keycloak/start-keycloak.ts +57 -66
- package/src/vite-plugin/vite-plugin.ts +5 -1
- package/vite-plugin/index.js +8 -4
- package/bin/961.index.js +0 -263
- package/src/bin/download-keycloak-default-theme.ts +0 -63
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +0 -74
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
exports.id =
|
3
|
-
exports.ids = [
|
2
|
+
exports.id = 190;
|
3
|
+
exports.ids = [190];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
|
-
/***/
|
6
|
+
/***/ 47802:
|
7
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
8
8
|
|
9
9
|
|
@@ -102,45 +102,8 @@ async function getProxyFetchOptions(params) {
|
|
102
102
|
//# sourceMappingURL=fetchProxyOptions.js.map
|
103
103
|
// EXTERNAL MODULE: external "crypto"
|
104
104
|
var external_crypto_ = __webpack_require__(6113);
|
105
|
-
// EXTERNAL MODULE: ./dist/bin/tools/
|
106
|
-
var
|
107
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/fs.rm.js
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
/**
|
112
|
-
* Polyfill of fs.rm(dirPath, { "recursive": true })
|
113
|
-
* For older version of Node
|
114
|
-
*/
|
115
|
-
async function rm(dirPath, options) {
|
116
|
-
if (SemVer/* SemVer.compare */.h.compare(SemVer/* SemVer.parse */.h.parse(process.version), SemVer/* SemVer.parse */.h.parse("14.14.0")) > 0) {
|
117
|
-
return promises_.rm(dirPath, options);
|
118
|
-
}
|
119
|
-
const { force = true } = options;
|
120
|
-
if (force && !(await checkDirExists(dirPath))) {
|
121
|
-
return;
|
122
|
-
}
|
123
|
-
const removeDir_rec = async (dirPath) => Promise.all((await promises_.readdir(dirPath)).map(async (basename) => {
|
124
|
-
const fileOrDirpath = (0,external_path_.join)(dirPath, basename);
|
125
|
-
if ((await promises_.lstat(fileOrDirpath)).isDirectory()) {
|
126
|
-
await removeDir_rec(fileOrDirpath);
|
127
|
-
}
|
128
|
-
else {
|
129
|
-
await promises_.unlink(fileOrDirpath);
|
130
|
-
}
|
131
|
-
}));
|
132
|
-
await removeDir_rec(dirPath);
|
133
|
-
}
|
134
|
-
async function checkDirExists(dirPath) {
|
135
|
-
try {
|
136
|
-
await promises_.access(dirPath, promises_.constants.F_OK);
|
137
|
-
return true;
|
138
|
-
}
|
139
|
-
catch (_a) {
|
140
|
-
return false;
|
141
|
-
}
|
142
|
-
}
|
143
|
-
//# sourceMappingURL=fs.rm.js.map
|
105
|
+
// EXTERNAL MODULE: ./dist/bin/tools/fs.rm.js
|
106
|
+
var fs_rm = __webpack_require__(8699);
|
144
107
|
;// CONCATENATED MODULE: ./dist/bin/tools/downloadAndExtractArchive/downloadAndExtractArchive.js
|
145
108
|
|
146
109
|
|
@@ -196,7 +159,7 @@ async function downloadAndExtractArchive(params) {
|
|
196
159
|
return basename => basename !== extractDirBasename && basename.startsWith(prefix);
|
197
160
|
})())
|
198
161
|
.map(async (extractDirBasename) => {
|
199
|
-
await rm((0,external_path_.join)(cacheDirPath, extractDirBasename), { recursive: true });
|
162
|
+
await (0,fs_rm.rm)((0,external_path_.join)(cacheDirPath, extractDirBasename), { recursive: true });
|
200
163
|
await SuccessTracker.removeFromExtracted({
|
201
164
|
cacheDirPath,
|
202
165
|
extractDirBasename
|
@@ -212,7 +175,7 @@ async function downloadAndExtractArchive(params) {
|
|
212
175
|
if (isExtracted) {
|
213
176
|
break extract_and_transform;
|
214
177
|
}
|
215
|
-
await rm(extractedDirPath, { recursive: true });
|
178
|
+
await (0,fs_rm.rm)(extractedDirPath, { recursive: true });
|
216
179
|
await SuccessTracker.removeFromExtracted({
|
217
180
|
cacheDirPath,
|
218
181
|
extractDirBasename
|
@@ -425,6 +388,57 @@ async function downloadKeycloakDefaultTheme(params) {
|
|
425
388
|
|
426
389
|
/***/ }),
|
427
390
|
|
391
|
+
/***/ 62190:
|
392
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
393
|
+
|
394
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
395
|
+
/* harmony export */ "p": () => (/* binding */ downloadKeycloakStaticResources)
|
396
|
+
/* harmony export */ });
|
397
|
+
/* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60332);
|
398
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
399
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
400
|
+
/* harmony import */ var _downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47802);
|
401
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
|
402
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88078);
|
403
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_4__);
|
404
|
+
/* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
|
412
|
+
async function downloadKeycloakStaticResources(params) {
|
413
|
+
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
414
|
+
const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
|
415
|
+
keycloakVersion,
|
416
|
+
buildContext
|
417
|
+
});
|
418
|
+
const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
|
419
|
+
repatriate_base_resources: {
|
420
|
+
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
|
421
|
+
if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
|
422
|
+
break repatriate_base_resources;
|
423
|
+
}
|
424
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
425
|
+
srcDirPath,
|
426
|
+
destDirPath: resourcesDirPath
|
427
|
+
});
|
428
|
+
}
|
429
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
430
|
+
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", themeType, "resources"),
|
431
|
+
destDirPath: resourcesDirPath
|
432
|
+
});
|
433
|
+
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
434
|
+
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
|
435
|
+
destDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(resourcesDirPath, _constants__WEBPACK_IMPORTED_MODULE_3__/* .resources_common */ .z0)
|
436
|
+
});
|
437
|
+
}
|
438
|
+
//# sourceMappingURL=downloadKeycloakStaticResources.js.map
|
439
|
+
|
440
|
+
/***/ }),
|
441
|
+
|
428
442
|
/***/ 73036:
|
429
443
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
430
444
|
|
@@ -506,23 +520,6 @@ function rmSync(dirPath, options) {
|
|
506
520
|
|
507
521
|
/***/ }),
|
508
522
|
|
509
|
-
/***/ 90665:
|
510
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
511
|
-
|
512
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
513
|
-
/* harmony export */ "V": () => (/* binding */ isInside)
|
514
|
-
/* harmony export */ });
|
515
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
516
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
517
|
-
|
518
|
-
function isInside(params) {
|
519
|
-
const { dirPath, filePath } = params;
|
520
|
-
return !(0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(dirPath, filePath).startsWith("..");
|
521
|
-
}
|
522
|
-
//# sourceMappingURL=isInside.js.map
|
523
|
-
|
524
|
-
/***/ }),
|
525
|
-
|
526
523
|
/***/ 60332:
|
527
524
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
528
525
|
|
package/bin/193.index.js
CHANGED
@@ -103,57 +103,6 @@ async function command(params) {
|
|
103
103
|
}
|
104
104
|
//# sourceMappingURL=copy-keycloak-resources-to-public.js.map
|
105
105
|
|
106
|
-
/***/ }),
|
107
|
-
|
108
|
-
/***/ 62190:
|
109
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
110
|
-
|
111
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
112
|
-
/* harmony export */ "p": () => (/* binding */ downloadKeycloakStaticResources)
|
113
|
-
/* harmony export */ });
|
114
|
-
/* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60332);
|
115
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
116
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
117
|
-
/* harmony import */ var _downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61804);
|
118
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
|
119
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88078);
|
120
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_4__);
|
121
|
-
/* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
|
129
|
-
async function downloadKeycloakStaticResources(params) {
|
130
|
-
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
131
|
-
const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
|
132
|
-
keycloakVersion,
|
133
|
-
buildContext
|
134
|
-
});
|
135
|
-
const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
|
136
|
-
repatriate_base_resources: {
|
137
|
-
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
|
138
|
-
if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
|
139
|
-
break repatriate_base_resources;
|
140
|
-
}
|
141
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
142
|
-
srcDirPath,
|
143
|
-
destDirPath: resourcesDirPath
|
144
|
-
});
|
145
|
-
}
|
146
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
147
|
-
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", themeType, "resources"),
|
148
|
-
destDirPath: resourcesDirPath
|
149
|
-
});
|
150
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
151
|
-
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
|
152
|
-
destDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(resourcesDirPath, _constants__WEBPACK_IMPORTED_MODULE_3__/* .resources_common */ .z0)
|
153
|
-
});
|
154
|
-
}
|
155
|
-
//# sourceMappingURL=downloadKeycloakStaticResources.js.map
|
156
|
-
|
157
106
|
/***/ })
|
158
107
|
|
159
108
|
};
|
package/bin/3.index.js
CHANGED
@@ -172,6 +172,7 @@ var assert = __webpack_require__(88078);
|
|
172
172
|
var transformCodebase = __webpack_require__(60332);
|
173
173
|
// EXTERNAL MODULE: external "fs"
|
174
174
|
var external_fs_ = __webpack_require__(57147);
|
175
|
+
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
|
175
176
|
// EXTERNAL MODULE: external "path"
|
176
177
|
var external_path_ = __webpack_require__(71017);
|
177
178
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
@@ -622,8 +623,8 @@ function readExtraPagesNames(params) {
|
|
622
623
|
//# sourceMappingURL=readExtraPageNames.js.map
|
623
624
|
// EXTERNAL MODULE: ./dist/bin/keycloakify/generateSrcMainResources/generateMessageProperties.js
|
624
625
|
var generateMessageProperties = __webpack_require__(73923);
|
625
|
-
// EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakDefaultTheme.js +
|
626
|
-
var downloadKeycloakDefaultTheme = __webpack_require__(
|
626
|
+
// EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakDefaultTheme.js + 3 modules
|
627
|
+
var downloadKeycloakDefaultTheme = __webpack_require__(47802);
|
627
628
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateSrcMainResources/bringInAccountV1.js
|
628
629
|
|
629
630
|
|
@@ -633,12 +634,12 @@ var downloadKeycloakDefaultTheme = __webpack_require__(61804);
|
|
633
634
|
|
634
635
|
(0,assert.assert)();
|
635
636
|
async function bringInAccountV1(params) {
|
636
|
-
const { buildContext } = params;
|
637
|
+
const { resourcesDirPath, buildContext } = params;
|
637
638
|
const { defaultThemeDirPath } = await (0,downloadKeycloakDefaultTheme/* downloadKeycloakDefaultTheme */.x)({
|
638
639
|
keycloakVersion: constants/* lastKeycloakVersionWithAccountV1 */.v$,
|
639
640
|
buildContext
|
640
641
|
});
|
641
|
-
const accountV1DirPath = (0,external_path_.join)(
|
642
|
+
const accountV1DirPath = (0,external_path_.join)(resourcesDirPath, "theme", constants/* accountV1ThemeName */.y_, "account");
|
642
643
|
(0,transformCodebase/* transformCodebase */.N)({
|
643
644
|
srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "base", "account"),
|
644
645
|
destDirPath: accountV1DirPath
|
@@ -716,13 +717,13 @@ var escapeStringForPropertiesFile = __webpack_require__(27190);
|
|
716
717
|
(0,assert.assert)();
|
717
718
|
async function generateSrcMainResourcesForMainTheme(params) {
|
718
719
|
var _a;
|
719
|
-
const { themeName, buildContext } = params;
|
720
|
+
const { themeName, resourcesDirPath, buildContext } = params;
|
720
721
|
const { themeSrcDirPath } = (0,getThemeSrcDirPath/* getThemeSrcDirPath */.f)({
|
721
722
|
projectDirPath: buildContext.projectDirPath
|
722
723
|
});
|
723
724
|
const getThemeTypeDirPath = (params) => {
|
724
725
|
const { themeType } = params;
|
725
|
-
return (0,external_path_.join)(
|
726
|
+
return (0,external_path_.join)(resourcesDirPath, "theme", themeName, themeType);
|
726
727
|
};
|
727
728
|
const cssGlobalsToDefine = {};
|
728
729
|
const implementedThemeTypes = {
|
@@ -814,7 +815,6 @@ async function generateSrcMainResourcesForMainTheme(params) {
|
|
814
815
|
})
|
815
816
|
].forEach(pageId => {
|
816
817
|
const { ftlCode } = generateFtlFilesCode({ pageId });
|
817
|
-
external_fs_.mkdirSync(themeTypeDirPath, { recursive: true });
|
818
818
|
external_fs_.writeFileSync((0,external_path_.join)(themeTypeDirPath, pageId), Buffer.from(ftlCode, "utf8"));
|
819
819
|
});
|
820
820
|
(0,generateMessageProperties/* generateMessageProperties */.k)({
|
@@ -868,6 +868,7 @@ async function generateSrcMainResourcesForMainTheme(params) {
|
|
868
868
|
}
|
869
869
|
if (implementedThemeTypes.account) {
|
870
870
|
await bringInAccountV1({
|
871
|
+
resourcesDirPath,
|
871
872
|
buildContext
|
872
873
|
});
|
873
874
|
}
|
@@ -886,7 +887,7 @@ async function generateSrcMainResourcesForMainTheme(params) {
|
|
886
887
|
});
|
887
888
|
}
|
888
889
|
(0,shared_metaInfKeycloakThemes/* writeMetaInfKeycloakThemes */.JJ)({
|
889
|
-
|
890
|
+
resourcesDirPath,
|
890
891
|
metaInfKeycloakThemes
|
891
892
|
});
|
892
893
|
}
|
@@ -899,8 +900,8 @@ async function generateSrcMainResourcesForMainTheme(params) {
|
|
899
900
|
|
900
901
|
(0,assert.assert)();
|
901
902
|
function generateSrcMainResourcesForThemeVariant(params) {
|
902
|
-
const { themeName, themeVariantName
|
903
|
-
const mainThemeDirPath = (0,external_path_.join)(
|
903
|
+
const { resourcesDirPath, themeName, themeVariantName } = params;
|
904
|
+
const mainThemeDirPath = (0,external_path_.join)(resourcesDirPath, "theme", themeName);
|
904
905
|
(0,transformCodebase/* transformCodebase */.N)({
|
905
906
|
srcDirPath: mainThemeDirPath,
|
906
907
|
destDirPath: (0,external_path_.join)(mainThemeDirPath, "..", themeVariantName),
|
@@ -917,8 +918,8 @@ function generateSrcMainResourcesForThemeVariant(params) {
|
|
917
918
|
}
|
918
919
|
});
|
919
920
|
{
|
920
|
-
const updatedMetaInfKeycloakThemes = (0,shared_metaInfKeycloakThemes/*
|
921
|
-
|
921
|
+
const updatedMetaInfKeycloakThemes = (0,shared_metaInfKeycloakThemes/* readMetaInfKeycloakThemes_fromResourcesDirPath */.Ju)({
|
922
|
+
resourcesDirPath
|
922
923
|
});
|
923
924
|
updatedMetaInfKeycloakThemes.themes.push({
|
924
925
|
name: themeVariantName,
|
@@ -929,7 +930,7 @@ function generateSrcMainResourcesForThemeVariant(params) {
|
|
929
930
|
})()
|
930
931
|
});
|
931
932
|
(0,shared_metaInfKeycloakThemes/* writeMetaInfKeycloakThemes */.JJ)({
|
932
|
-
|
933
|
+
resourcesDirPath,
|
933
934
|
metaInfKeycloakThemes: updatedMetaInfKeycloakThemes
|
934
935
|
});
|
935
936
|
}
|
@@ -939,19 +940,25 @@ function generateSrcMainResourcesForThemeVariant(params) {
|
|
939
940
|
|
940
941
|
|
941
942
|
|
943
|
+
|
944
|
+
|
942
945
|
(0,assert.assert)();
|
943
946
|
async function generateSrcMainResources(params) {
|
944
|
-
const { buildContext } = params;
|
947
|
+
const { resourcesDirPath, buildContext } = params;
|
945
948
|
const [themeName, ...themeVariantNames] = buildContext.themeNames;
|
949
|
+
if (external_fs_default().existsSync(resourcesDirPath)) {
|
950
|
+
(0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
|
951
|
+
}
|
946
952
|
await generateSrcMainResourcesForMainTheme({
|
953
|
+
resourcesDirPath,
|
947
954
|
themeName,
|
948
955
|
buildContext
|
949
956
|
});
|
950
957
|
for (const themeVariantName of themeVariantNames) {
|
951
958
|
generateSrcMainResourcesForThemeVariant({
|
959
|
+
resourcesDirPath,
|
952
960
|
themeName,
|
953
|
-
themeVariantName
|
954
|
-
buildContext
|
961
|
+
themeVariantName
|
955
962
|
});
|
956
963
|
}
|
957
964
|
}
|
@@ -1111,19 +1118,19 @@ function generatePom(params) {
|
|
1111
1118
|
|
1112
1119
|
(0,assert.assert)();
|
1113
1120
|
async function buildJar(params) {
|
1114
|
-
const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, buildContext } = params;
|
1121
|
+
const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, resourcesDirPath, buildContext } = params;
|
1115
1122
|
const keycloakifyBuildTmpDirPath = (0,external_path_.join)(buildContext.cacheDirPath, jarFileBasename.replace(".jar", ""));
|
1116
1123
|
(0,fs_rmSync/* rmSync */.a)(keycloakifyBuildTmpDirPath, { recursive: true, force: true });
|
1117
1124
|
{
|
1118
1125
|
const transformCodebase_common = (params) => {
|
1119
1126
|
const { fileRelativePath, sourceCode } = params;
|
1120
1127
|
if (fileRelativePath ===
|
1121
|
-
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({
|
1128
|
+
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({ resourcesDirPath: "." })) {
|
1122
1129
|
return { modifiedSourceCode: sourceCode };
|
1123
1130
|
}
|
1124
1131
|
for (const themeName of [...buildContext.themeNames, constants/* accountV1ThemeName */.y_]) {
|
1125
1132
|
if ((0,isInside/* isInside */.V)({
|
1126
|
-
dirPath: (0,external_path_.join)("
|
1133
|
+
dirPath: (0,external_path_.join)("theme", themeName),
|
1127
1134
|
filePath: fileRelativePath
|
1128
1135
|
})) {
|
1129
1136
|
return { modifiedSourceCode: sourceCode };
|
@@ -1136,14 +1143,14 @@ async function buildJar(params) {
|
|
1136
1143
|
: (params) => {
|
1137
1144
|
const { fileRelativePath, sourceCode } = params;
|
1138
1145
|
if ((0,isInside/* isInside */.V)({
|
1139
|
-
dirPath: (0,external_path_.join)("
|
1146
|
+
dirPath: (0,external_path_.join)("theme", constants/* accountV1ThemeName */.y_),
|
1140
1147
|
filePath: fileRelativePath
|
1141
1148
|
})) {
|
1142
1149
|
return undefined;
|
1143
1150
|
}
|
1144
1151
|
if (fileRelativePath ===
|
1145
1152
|
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({
|
1146
|
-
|
1153
|
+
resourcesDirPath: "."
|
1147
1154
|
})) {
|
1148
1155
|
const keycloakThemesJsonParsed = JSON.parse(sourceCode.toString("utf8"));
|
1149
1156
|
keycloakThemesJsonParsed.themes =
|
@@ -1154,7 +1161,7 @@ async function buildJar(params) {
|
|
1154
1161
|
}
|
1155
1162
|
for (const themeName of buildContext.themeNames) {
|
1156
1163
|
if (fileRelativePath ===
|
1157
|
-
(0,external_path_.join)("
|
1164
|
+
(0,external_path_.join)("theme", themeName, "account", "theme.properties")) {
|
1158
1165
|
const modifiedSourceCode = Buffer.from(sourceCode
|
1159
1166
|
.toString("utf8")
|
1160
1167
|
.replace(`parent=${constants/* accountV1ThemeName */.y_}`, "parent=keycloak"), "utf8");
|
@@ -1165,8 +1172,8 @@ async function buildJar(params) {
|
|
1165
1172
|
return { modifiedSourceCode: sourceCode };
|
1166
1173
|
};
|
1167
1174
|
(0,transformCodebase/* transformCodebase */.N)({
|
1168
|
-
srcDirPath:
|
1169
|
-
destDirPath: keycloakifyBuildTmpDirPath,
|
1175
|
+
srcDirPath: resourcesDirPath,
|
1176
|
+
destDirPath: (0,external_path_.join)(keycloakifyBuildTmpDirPath, "src", "main", "resources"),
|
1170
1177
|
transformSourceCode: params => {
|
1171
1178
|
const resultCommon = transformCodebase_common(params);
|
1172
1179
|
if (transformCodebase_patchForUsingBuiltinAccountV1 === undefined) {
|
@@ -1251,9 +1258,9 @@ var getJarFileBasename = __webpack_require__(2323);
|
|
1251
1258
|
|
1252
1259
|
(0,assert.assert)();
|
1253
1260
|
async function buildJars(params) {
|
1254
|
-
const { buildContext } = params;
|
1255
|
-
const doesImplementAccountTheme = (0,shared_metaInfKeycloakThemes/*
|
1256
|
-
|
1261
|
+
const { onlyBuildJarFileBasename, resourcesDirPath, buildContext } = params;
|
1262
|
+
const doesImplementAccountTheme = (0,shared_metaInfKeycloakThemes/* readMetaInfKeycloakThemes_fromResourcesDirPath */.Ju)({
|
1263
|
+
resourcesDirPath
|
1257
1264
|
}).themes.some(({ name }) => name === constants/* accountV1ThemeName */.y_);
|
1258
1265
|
await Promise.all(keycloakAccountV1Versions.map(keycloakAccountV1Version => keycloakThemeAdditionalInfoExtensionVersions.map(keycloakThemeAdditionalInfoExtensionVersion => {
|
1259
1266
|
const keycloakVersionRange = getKeycloakVersionRangeForJar({
|
@@ -1274,15 +1281,21 @@ async function buildJars(params) {
|
|
1274
1281
|
const { jarFileBasename } = (0,getJarFileBasename/* getJarFileBasename */.m)({
|
1275
1282
|
keycloakVersionRange
|
1276
1283
|
});
|
1284
|
+
if (onlyBuildJarFileBasename !== undefined &&
|
1285
|
+
onlyBuildJarFileBasename !== jarFileBasename) {
|
1286
|
+
return undefined;
|
1287
|
+
}
|
1277
1288
|
return {
|
1278
1289
|
keycloakThemeAdditionalInfoExtensionVersion,
|
1279
1290
|
jarFileBasename
|
1280
1291
|
};
|
1281
1292
|
})
|
1293
|
+
.filter((0,exclude.exclude)(undefined))
|
1282
1294
|
.map(({ keycloakThemeAdditionalInfoExtensionVersion, jarFileBasename }) => buildJar({
|
1283
1295
|
jarFileBasename,
|
1284
1296
|
keycloakAccountV1Version,
|
1285
1297
|
keycloakThemeAdditionalInfoExtensionVersion,
|
1298
|
+
resourcesDirPath,
|
1286
1299
|
buildContext
|
1287
1300
|
})))
|
1288
1301
|
.flat());
|
@@ -1307,6 +1320,7 @@ var external_os_ = __webpack_require__(22037);
|
|
1307
1320
|
|
1308
1321
|
|
1309
1322
|
|
1323
|
+
|
1310
1324
|
async function command(params) {
|
1311
1325
|
exit_if_maven_not_installed: {
|
1312
1326
|
let commandOutput = undefined;
|
@@ -1348,7 +1362,11 @@ async function command(params) {
|
|
1348
1362
|
}
|
1349
1363
|
external_fs_.writeFileSync((0,external_path_.join)(buildContext.keycloakifyBuildDirPath, ".gitignore"), Buffer.from("*", "utf8"));
|
1350
1364
|
}
|
1351
|
-
|
1365
|
+
const resourcesDirPath = (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "resources");
|
1366
|
+
await generateSrcMainResources({
|
1367
|
+
resourcesDirPath,
|
1368
|
+
buildContext
|
1369
|
+
});
|
1352
1370
|
run_post_build_script: {
|
1353
1371
|
if (buildContext.bundler !== "vite") {
|
1354
1372
|
break run_post_build_script;
|
@@ -1358,13 +1376,13 @@ async function command(params) {
|
|
1358
1376
|
env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.runPostBuildScript */.fe.runPostBuildScript]: JSON.stringify(buildContext) })
|
1359
1377
|
});
|
1360
1378
|
}
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
}
|
1367
|
-
console.log(source_default().green(`✓ built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
|
1379
|
+
await buildJars({
|
1380
|
+
resourcesDirPath,
|
1381
|
+
buildContext,
|
1382
|
+
onlyBuildJarFileBasename: process.env[constants/* onlyBuildJarFileBasenameEnvName */.Dv]
|
1383
|
+
});
|
1384
|
+
(0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
|
1385
|
+
console.log(source_default().green(`✓ keycloak theme built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
|
1368
1386
|
}
|
1369
1387
|
//# sourceMappingURL=keycloakify.js.map
|
1370
1388
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/index.js
|
@@ -1373,57 +1391,6 @@ async function command(params) {
|
|
1373
1391
|
|
1374
1392
|
/***/ }),
|
1375
1393
|
|
1376
|
-
/***/ 62190:
|
1377
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1378
|
-
|
1379
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1380
|
-
/* harmony export */ "p": () => (/* binding */ downloadKeycloakStaticResources)
|
1381
|
-
/* harmony export */ });
|
1382
|
-
/* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60332);
|
1383
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
|
1384
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
1385
|
-
/* harmony import */ var _downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61804);
|
1386
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
|
1387
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88078);
|
1388
|
-
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_4__);
|
1389
|
-
/* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
|
1397
|
-
async function downloadKeycloakStaticResources(params) {
|
1398
|
-
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
1399
|
-
const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
|
1400
|
-
keycloakVersion,
|
1401
|
-
buildContext
|
1402
|
-
});
|
1403
|
-
const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
|
1404
|
-
repatriate_base_resources: {
|
1405
|
-
const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
|
1406
|
-
if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
|
1407
|
-
break repatriate_base_resources;
|
1408
|
-
}
|
1409
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1410
|
-
srcDirPath,
|
1411
|
-
destDirPath: resourcesDirPath
|
1412
|
-
});
|
1413
|
-
}
|
1414
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1415
|
-
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", themeType, "resources"),
|
1416
|
-
destDirPath: resourcesDirPath
|
1417
|
-
});
|
1418
|
-
(0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
|
1419
|
-
srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
|
1420
|
-
destDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(resourcesDirPath, _constants__WEBPACK_IMPORTED_MODULE_3__/* .resources_common */ .z0)
|
1421
|
-
});
|
1422
|
-
}
|
1423
|
-
//# sourceMappingURL=downloadKeycloakStaticResources.js.map
|
1424
|
-
|
1425
|
-
/***/ }),
|
1426
|
-
|
1427
1394
|
/***/ 2323:
|
1428
1395
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1429
1396
|
|
@@ -1501,31 +1468,53 @@ function getThemeSrcDirPath(params) {
|
|
1501
1468
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1502
1469
|
|
1503
1470
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1504
|
-
/* harmony export */ "
|
1471
|
+
/* harmony export */ "IS": () => (/* binding */ readMetaInfKeycloakThemes_fromJar),
|
1505
1472
|
/* harmony export */ "JJ": () => (/* binding */ writeMetaInfKeycloakThemes),
|
1473
|
+
/* harmony export */ "Ju": () => (/* binding */ readMetaInfKeycloakThemes_fromResourcesDirPath),
|
1506
1474
|
/* harmony export */ "KQ": () => (/* binding */ getMetaInfKeycloakThemesJsonFilePath)
|
1507
1475
|
/* harmony export */ });
|
1508
1476
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
1509
1477
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
1510
1478
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57147);
|
1511
1479
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
1480
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88078);
|
1481
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_2__);
|
1482
|
+
/* harmony import */ var _tools_extractArchive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29121);
|
1483
|
+
|
1484
|
+
|
1512
1485
|
|
1513
1486
|
|
1514
1487
|
function getMetaInfKeycloakThemesJsonFilePath(params) {
|
1515
|
-
const {
|
1516
|
-
return (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(
|
1488
|
+
const { resourcesDirPath } = params;
|
1489
|
+
return (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(resourcesDirPath === "." ? "" : resourcesDirPath, "META-INF", "keycloak-themes.json");
|
1517
1490
|
}
|
1518
|
-
function
|
1519
|
-
const {
|
1491
|
+
function readMetaInfKeycloakThemes_fromResourcesDirPath(params) {
|
1492
|
+
const { resourcesDirPath } = params;
|
1520
1493
|
return JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(getMetaInfKeycloakThemesJsonFilePath({
|
1521
|
-
|
1494
|
+
resourcesDirPath
|
1522
1495
|
}))
|
1523
1496
|
.toString("utf8"));
|
1524
1497
|
}
|
1498
|
+
async function readMetaInfKeycloakThemes_fromJar(params) {
|
1499
|
+
const { jarFilePath } = params;
|
1500
|
+
let metaInfKeycloakThemes = undefined;
|
1501
|
+
await (0,_tools_extractArchive__WEBPACK_IMPORTED_MODULE_3__/* .extractArchive */ .N)({
|
1502
|
+
archiveFilePath: jarFilePath,
|
1503
|
+
onArchiveFile: async ({ relativeFilePathInArchive, readFile, earlyExit }) => {
|
1504
|
+
if (relativeFilePathInArchive ===
|
1505
|
+
getMetaInfKeycloakThemesJsonFilePath({ resourcesDirPath: "." })) {
|
1506
|
+
metaInfKeycloakThemes = JSON.parse((await readFile()).toString("utf8"));
|
1507
|
+
earlyExit();
|
1508
|
+
}
|
1509
|
+
}
|
1510
|
+
});
|
1511
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__.assert)(metaInfKeycloakThemes !== undefined);
|
1512
|
+
return metaInfKeycloakThemes;
|
1513
|
+
}
|
1525
1514
|
function writeMetaInfKeycloakThemes(params) {
|
1526
|
-
const {
|
1515
|
+
const { resourcesDirPath, metaInfKeycloakThemes } = params;
|
1527
1516
|
const metaInfKeycloakThemesJsonPath = getMetaInfKeycloakThemesJsonFilePath({
|
1528
|
-
|
1517
|
+
resourcesDirPath
|
1529
1518
|
});
|
1530
1519
|
{
|
1531
1520
|
const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(metaInfKeycloakThemesJsonPath);
|