keycloakify 10.0.0-rc.44 → 10.0.0-rc.46
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 +93 -96
- package/bin/526.index.js +80 -49
- package/bin/538.index.js +5 -3
- 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/buildJars/extensionVersions.ts +1 -1
- package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +9 -2
- 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/KeycloakVersionRange.ts +1 -1
- package/src/bin/shared/buildContext.ts +7 -3
- package/src/bin/shared/constants.ts +1 -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 +62 -67
- package/src/vite-plugin/vite-plugin.ts +4 -0
- package/vite-plugin/index.js +6 -3
- 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
|
}
|
@@ -968,7 +975,7 @@ var shared_buildContext = __webpack_require__(87751);
|
|
968
975
|
var exclude = __webpack_require__(41370);
|
969
976
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/extensionVersions.js
|
970
977
|
// NOTE: v0.5 is a dummy version.
|
971
|
-
const keycloakAccountV1Versions = [null, "0.3", "0.4"];
|
978
|
+
const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6"];
|
972
979
|
const keycloakThemeAdditionalInfoExtensionVersions = [null, "1.1.5"];
|
973
980
|
//# sourceMappingURL=extensionVersions.js.map
|
974
981
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js
|
@@ -999,10 +1006,18 @@ function getKeycloakVersionRangeForJar(params) {
|
|
999
1006
|
case null:
|
1000
1007
|
return undefined;
|
1001
1008
|
case "1.1.5":
|
1002
|
-
return "24
|
1009
|
+
return "24";
|
1003
1010
|
}
|
1004
1011
|
(0,assert.assert)(false);
|
1012
|
+
case "0.6":
|
1013
|
+
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
1014
|
+
case null:
|
1015
|
+
return undefined;
|
1016
|
+
case "1.1.5":
|
1017
|
+
return "25-and-above";
|
1018
|
+
}
|
1005
1019
|
}
|
1020
|
+
(0,assert.assert)(false);
|
1006
1021
|
})();
|
1007
1022
|
(0,assert.assert)();
|
1008
1023
|
return keycloakVersionRange;
|
@@ -1111,19 +1126,19 @@ function generatePom(params) {
|
|
1111
1126
|
|
1112
1127
|
(0,assert.assert)();
|
1113
1128
|
async function buildJar(params) {
|
1114
|
-
const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, buildContext } = params;
|
1129
|
+
const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, resourcesDirPath, buildContext } = params;
|
1115
1130
|
const keycloakifyBuildTmpDirPath = (0,external_path_.join)(buildContext.cacheDirPath, jarFileBasename.replace(".jar", ""));
|
1116
1131
|
(0,fs_rmSync/* rmSync */.a)(keycloakifyBuildTmpDirPath, { recursive: true, force: true });
|
1117
1132
|
{
|
1118
1133
|
const transformCodebase_common = (params) => {
|
1119
1134
|
const { fileRelativePath, sourceCode } = params;
|
1120
1135
|
if (fileRelativePath ===
|
1121
|
-
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({
|
1136
|
+
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({ resourcesDirPath: "." })) {
|
1122
1137
|
return { modifiedSourceCode: sourceCode };
|
1123
1138
|
}
|
1124
1139
|
for (const themeName of [...buildContext.themeNames, constants/* accountV1ThemeName */.y_]) {
|
1125
1140
|
if ((0,isInside/* isInside */.V)({
|
1126
|
-
dirPath: (0,external_path_.join)("
|
1141
|
+
dirPath: (0,external_path_.join)("theme", themeName),
|
1127
1142
|
filePath: fileRelativePath
|
1128
1143
|
})) {
|
1129
1144
|
return { modifiedSourceCode: sourceCode };
|
@@ -1136,14 +1151,14 @@ async function buildJar(params) {
|
|
1136
1151
|
: (params) => {
|
1137
1152
|
const { fileRelativePath, sourceCode } = params;
|
1138
1153
|
if ((0,isInside/* isInside */.V)({
|
1139
|
-
dirPath: (0,external_path_.join)("
|
1154
|
+
dirPath: (0,external_path_.join)("theme", constants/* accountV1ThemeName */.y_),
|
1140
1155
|
filePath: fileRelativePath
|
1141
1156
|
})) {
|
1142
1157
|
return undefined;
|
1143
1158
|
}
|
1144
1159
|
if (fileRelativePath ===
|
1145
1160
|
(0,shared_metaInfKeycloakThemes/* getMetaInfKeycloakThemesJsonFilePath */.KQ)({
|
1146
|
-
|
1161
|
+
resourcesDirPath: "."
|
1147
1162
|
})) {
|
1148
1163
|
const keycloakThemesJsonParsed = JSON.parse(sourceCode.toString("utf8"));
|
1149
1164
|
keycloakThemesJsonParsed.themes =
|
@@ -1154,7 +1169,7 @@ async function buildJar(params) {
|
|
1154
1169
|
}
|
1155
1170
|
for (const themeName of buildContext.themeNames) {
|
1156
1171
|
if (fileRelativePath ===
|
1157
|
-
(0,external_path_.join)("
|
1172
|
+
(0,external_path_.join)("theme", themeName, "account", "theme.properties")) {
|
1158
1173
|
const modifiedSourceCode = Buffer.from(sourceCode
|
1159
1174
|
.toString("utf8")
|
1160
1175
|
.replace(`parent=${constants/* accountV1ThemeName */.y_}`, "parent=keycloak"), "utf8");
|
@@ -1165,8 +1180,8 @@ async function buildJar(params) {
|
|
1165
1180
|
return { modifiedSourceCode: sourceCode };
|
1166
1181
|
};
|
1167
1182
|
(0,transformCodebase/* transformCodebase */.N)({
|
1168
|
-
srcDirPath:
|
1169
|
-
destDirPath: keycloakifyBuildTmpDirPath,
|
1183
|
+
srcDirPath: resourcesDirPath,
|
1184
|
+
destDirPath: (0,external_path_.join)(keycloakifyBuildTmpDirPath, "src", "main", "resources"),
|
1170
1185
|
transformSourceCode: params => {
|
1171
1186
|
const resultCommon = transformCodebase_common(params);
|
1172
1187
|
if (transformCodebase_patchForUsingBuiltinAccountV1 === undefined) {
|
@@ -1251,9 +1266,9 @@ var getJarFileBasename = __webpack_require__(2323);
|
|
1251
1266
|
|
1252
1267
|
(0,assert.assert)();
|
1253
1268
|
async function buildJars(params) {
|
1254
|
-
const { buildContext } = params;
|
1255
|
-
const doesImplementAccountTheme = (0,shared_metaInfKeycloakThemes/*
|
1256
|
-
|
1269
|
+
const { onlyBuildJarFileBasename, resourcesDirPath, buildContext } = params;
|
1270
|
+
const doesImplementAccountTheme = (0,shared_metaInfKeycloakThemes/* readMetaInfKeycloakThemes_fromResourcesDirPath */.Ju)({
|
1271
|
+
resourcesDirPath
|
1257
1272
|
}).themes.some(({ name }) => name === constants/* accountV1ThemeName */.y_);
|
1258
1273
|
await Promise.all(keycloakAccountV1Versions.map(keycloakAccountV1Version => keycloakThemeAdditionalInfoExtensionVersions.map(keycloakThemeAdditionalInfoExtensionVersion => {
|
1259
1274
|
const keycloakVersionRange = getKeycloakVersionRangeForJar({
|
@@ -1274,15 +1289,21 @@ async function buildJars(params) {
|
|
1274
1289
|
const { jarFileBasename } = (0,getJarFileBasename/* getJarFileBasename */.m)({
|
1275
1290
|
keycloakVersionRange
|
1276
1291
|
});
|
1292
|
+
if (onlyBuildJarFileBasename !== undefined &&
|
1293
|
+
onlyBuildJarFileBasename !== jarFileBasename) {
|
1294
|
+
return undefined;
|
1295
|
+
}
|
1277
1296
|
return {
|
1278
1297
|
keycloakThemeAdditionalInfoExtensionVersion,
|
1279
1298
|
jarFileBasename
|
1280
1299
|
};
|
1281
1300
|
})
|
1301
|
+
.filter((0,exclude.exclude)(undefined))
|
1282
1302
|
.map(({ keycloakThemeAdditionalInfoExtensionVersion, jarFileBasename }) => buildJar({
|
1283
1303
|
jarFileBasename,
|
1284
1304
|
keycloakAccountV1Version,
|
1285
1305
|
keycloakThemeAdditionalInfoExtensionVersion,
|
1306
|
+
resourcesDirPath,
|
1286
1307
|
buildContext
|
1287
1308
|
})))
|
1288
1309
|
.flat());
|
@@ -1307,6 +1328,7 @@ var external_os_ = __webpack_require__(22037);
|
|
1307
1328
|
|
1308
1329
|
|
1309
1330
|
|
1331
|
+
|
1310
1332
|
async function command(params) {
|
1311
1333
|
exit_if_maven_not_installed: {
|
1312
1334
|
let commandOutput = undefined;
|
@@ -1348,7 +1370,11 @@ async function command(params) {
|
|
1348
1370
|
}
|
1349
1371
|
external_fs_.writeFileSync((0,external_path_.join)(buildContext.keycloakifyBuildDirPath, ".gitignore"), Buffer.from("*", "utf8"));
|
1350
1372
|
}
|
1351
|
-
|
1373
|
+
const resourcesDirPath = (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "resources");
|
1374
|
+
await generateSrcMainResources({
|
1375
|
+
resourcesDirPath,
|
1376
|
+
buildContext
|
1377
|
+
});
|
1352
1378
|
run_post_build_script: {
|
1353
1379
|
if (buildContext.bundler !== "vite") {
|
1354
1380
|
break run_post_build_script;
|
@@ -1358,13 +1384,13 @@ async function command(params) {
|
|
1358
1384
|
env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.runPostBuildScript */.fe.runPostBuildScript]: JSON.stringify(buildContext) })
|
1359
1385
|
});
|
1360
1386
|
}
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
}
|
1367
|
-
console.log(source_default().green(`✓ built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
|
1387
|
+
await buildJars({
|
1388
|
+
resourcesDirPath,
|
1389
|
+
buildContext,
|
1390
|
+
onlyBuildJarFileBasename: process.env[constants/* onlyBuildJarFileBasenameEnvName */.Dv]
|
1391
|
+
});
|
1392
|
+
(0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
|
1393
|
+
console.log(source_default().green(`✓ keycloak theme built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
|
1368
1394
|
}
|
1369
1395
|
//# sourceMappingURL=keycloakify.js.map
|
1370
1396
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/index.js
|
@@ -1373,57 +1399,6 @@ async function command(params) {
|
|
1373
1399
|
|
1374
1400
|
/***/ }),
|
1375
1401
|
|
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
1402
|
/***/ 2323:
|
1428
1403
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1429
1404
|
|
@@ -1501,31 +1476,53 @@ function getThemeSrcDirPath(params) {
|
|
1501
1476
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1502
1477
|
|
1503
1478
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1504
|
-
/* harmony export */ "
|
1479
|
+
/* harmony export */ "IS": () => (/* binding */ readMetaInfKeycloakThemes_fromJar),
|
1505
1480
|
/* harmony export */ "JJ": () => (/* binding */ writeMetaInfKeycloakThemes),
|
1481
|
+
/* harmony export */ "Ju": () => (/* binding */ readMetaInfKeycloakThemes_fromResourcesDirPath),
|
1506
1482
|
/* harmony export */ "KQ": () => (/* binding */ getMetaInfKeycloakThemesJsonFilePath)
|
1507
1483
|
/* harmony export */ });
|
1508
1484
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
1509
1485
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
1510
1486
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57147);
|
1511
1487
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
1488
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88078);
|
1489
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_2__);
|
1490
|
+
/* harmony import */ var _tools_extractArchive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29121);
|
1491
|
+
|
1492
|
+
|
1512
1493
|
|
1513
1494
|
|
1514
1495
|
function getMetaInfKeycloakThemesJsonFilePath(params) {
|
1515
|
-
const {
|
1516
|
-
return (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(
|
1496
|
+
const { resourcesDirPath } = params;
|
1497
|
+
return (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(resourcesDirPath === "." ? "" : resourcesDirPath, "META-INF", "keycloak-themes.json");
|
1517
1498
|
}
|
1518
|
-
function
|
1519
|
-
const {
|
1499
|
+
function readMetaInfKeycloakThemes_fromResourcesDirPath(params) {
|
1500
|
+
const { resourcesDirPath } = params;
|
1520
1501
|
return JSON.parse(fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(getMetaInfKeycloakThemesJsonFilePath({
|
1521
|
-
|
1502
|
+
resourcesDirPath
|
1522
1503
|
}))
|
1523
1504
|
.toString("utf8"));
|
1524
1505
|
}
|
1506
|
+
async function readMetaInfKeycloakThemes_fromJar(params) {
|
1507
|
+
const { jarFilePath } = params;
|
1508
|
+
let metaInfKeycloakThemes = undefined;
|
1509
|
+
await (0,_tools_extractArchive__WEBPACK_IMPORTED_MODULE_3__/* .extractArchive */ .N)({
|
1510
|
+
archiveFilePath: jarFilePath,
|
1511
|
+
onArchiveFile: async ({ relativeFilePathInArchive, readFile, earlyExit }) => {
|
1512
|
+
if (relativeFilePathInArchive ===
|
1513
|
+
getMetaInfKeycloakThemesJsonFilePath({ resourcesDirPath: "." })) {
|
1514
|
+
metaInfKeycloakThemes = JSON.parse((await readFile()).toString("utf8"));
|
1515
|
+
earlyExit();
|
1516
|
+
}
|
1517
|
+
}
|
1518
|
+
});
|
1519
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_2__.assert)(metaInfKeycloakThemes !== undefined);
|
1520
|
+
return metaInfKeycloakThemes;
|
1521
|
+
}
|
1525
1522
|
function writeMetaInfKeycloakThemes(params) {
|
1526
|
-
const {
|
1523
|
+
const { resourcesDirPath, metaInfKeycloakThemes } = params;
|
1527
1524
|
const metaInfKeycloakThemesJsonPath = getMetaInfKeycloakThemesJsonFilePath({
|
1528
|
-
|
1525
|
+
resourcesDirPath
|
1529
1526
|
});
|
1530
1527
|
{
|
1531
1528
|
const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_0__.dirname)(metaInfKeycloakThemesJsonPath);
|