keycloakify 11.3.6 → 11.3.7
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/README.md +25 -3
- package/bin/932.index.js +25 -2
- package/package.json +1 -1
- package/src/bin/initialize-email-theme.ts +29 -2
package/README.md
CHANGED
@@ -50,7 +50,7 @@ Keycloakify is fully compatible with Keycloak from version 11 to 26...[and beyon
|
|
50
50
|
|
51
51
|
## Sponsors
|
52
52
|
|
53
|
-
|
53
|
+
Project backers, we trust and recommend their services.
|
54
54
|
|
55
55
|
<br/>
|
56
56
|
|
@@ -62,7 +62,29 @@ Friends for the project, we trust and recommend their services.
|
|
62
62
|
|
63
63
|
<div align="center">
|
64
64
|
|
65
|
-

|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<br/>
|
70
|
+
|
71
|
+
<p align="center">
|
72
|
+
<i><a href="https://phasetwo.io/?utm_source=keycloakify"><strong>Keycloak as a Service</strong></a> - Keycloak community contributors of popular <a href="https://github.com/p2-inc#our-extensions-?utm_source=keycloakify">extensions</a> providing free and dedicated <a href="https://phasetwo.io/hosting/?utm_source=keycloakify">Keycloak hosting</a> and enterprise <a href="https://phasetwo.io/support/?utm_source=keycloakify">Keycloak support</a> to businesses of all sizes.</i>
|
73
|
+
</p>
|
74
|
+
|
75
|
+
<br/>
|
76
|
+
<br/>
|
77
|
+
<br/>
|
78
|
+
|
79
|
+
<div align="center">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div align="center">
|
86
|
+
|
87
|
+

|
66
88
|
|
67
89
|
</div>
|
68
90
|
|
@@ -87,7 +109,7 @@ Friends for the project, we trust and recommend their services.
|
|
87
109
|
</div>
|
88
110
|
|
89
111
|
<p align="center">
|
90
|
-
<a href="https://cloud-iam.com/?mtm_campaign=keycloakify-deal&mtm_source=keycloakify-github"><strong>Managed Keycloak Provider</strong> - With Cloud-IAM powering your Keycloak clusters, you can sleep easy knowing you've got the software and the experts you need for operational excellence.
|
112
|
+
<a href="https://cloud-iam.com/?mtm_campaign=keycloakify-deal&mtm_source=keycloakify-github"><strong>Managed Keycloak Provider</strong> - With Cloud-IAM powering your Keycloak clusters, you can sleep easy knowing you've got the software and the experts you need for operational excellence. Cloud IAM is a french company. </a>
|
91
113
|
<br/>
|
92
114
|
Use code <code>keycloakify5</code> at checkout for a 5% discount.
|
93
115
|
</p>
|
package/bin/932.index.js
CHANGED
@@ -18,6 +18,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
18
18
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_3__);
|
19
19
|
/* harmony import */ var _tools_downloadAndExtractArchive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38367);
|
20
20
|
/* harmony import */ var _shared_customHandler_delegate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72138);
|
21
|
+
/* harmony import */ var make_fetch_happen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9525);
|
22
|
+
/* harmony import */ var make_fetch_happen__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(make_fetch_happen__WEBPACK_IMPORTED_MODULE_6__);
|
23
|
+
/* harmony import */ var _tools_SemVer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12171);
|
24
|
+
/* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(29041);
|
25
|
+
|
26
|
+
|
27
|
+
|
21
28
|
|
22
29
|
|
23
30
|
|
@@ -40,15 +47,31 @@ async function command(params) {
|
|
40
47
|
process.exit(-1);
|
41
48
|
}
|
42
49
|
console.log("Initialize with the base email theme from which version of Keycloak?");
|
43
|
-
|
50
|
+
let { keycloakVersion } = await (0,_shared_promptKeycloakVersion__WEBPACK_IMPORTED_MODULE_2__/* .promptKeycloakVersion */ .s)({
|
44
51
|
// NOTE: This is arbitrary
|
45
52
|
startingFromMajor: 17,
|
46
53
|
excludeMajorVersions: [],
|
47
54
|
doOmitPatch: false,
|
48
55
|
buildContext
|
49
56
|
});
|
57
|
+
const getUrl = (keycloakVersion) => {
|
58
|
+
return `https://repo1.maven.org/maven2/org/keycloak/keycloak-themes/${keycloakVersion}/keycloak-themes-${keycloakVersion}.jar`;
|
59
|
+
};
|
60
|
+
keycloakVersion = await (async () => {
|
61
|
+
const keycloakVersionParsed = _tools_SemVer__WEBPACK_IMPORTED_MODULE_7__/* .SemVer.parse */ .h.parse(keycloakVersion);
|
62
|
+
while (true) {
|
63
|
+
const url = getUrl(_tools_SemVer__WEBPACK_IMPORTED_MODULE_7__/* .SemVer.stringify */ .h.stringify(keycloakVersionParsed));
|
64
|
+
const response = await make_fetch_happen__WEBPACK_IMPORTED_MODULE_6___default()(url, buildContext.fetchOptions);
|
65
|
+
if (response.ok) {
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .h)(keycloakVersionParsed.patch !== 0);
|
69
|
+
keycloakVersionParsed.patch--;
|
70
|
+
}
|
71
|
+
return _tools_SemVer__WEBPACK_IMPORTED_MODULE_7__/* .SemVer.stringify */ .h.stringify(keycloakVersionParsed);
|
72
|
+
})();
|
50
73
|
const { extractedDirPath } = await (0,_tools_downloadAndExtractArchive__WEBPACK_IMPORTED_MODULE_4__/* .downloadAndExtractArchive */ .I)({
|
51
|
-
url:
|
74
|
+
url: getUrl(keycloakVersion),
|
52
75
|
cacheDirPath: buildContext.cacheDirPath,
|
53
76
|
fetchOptions: buildContext.fetchOptions,
|
54
77
|
uniqueIdOfOnArchiveFile: "extractOnlyEmailTheme",
|
package/package.json
CHANGED
@@ -5,6 +5,9 @@ import type { BuildContext } from "./shared/buildContext";
|
|
5
5
|
import * as fs from "fs";
|
6
6
|
import { downloadAndExtractArchive } from "./tools/downloadAndExtractArchive";
|
7
7
|
import { maybeDelegateCommandToCustomHandler } from "./shared/customHandler_delegate";
|
8
|
+
import fetch from "make-fetch-happen";
|
9
|
+
import { SemVer } from "./tools/SemVer";
|
10
|
+
import { assert } from "tsafe/assert";
|
8
11
|
|
9
12
|
export async function command(params: { buildContext: BuildContext }) {
|
10
13
|
const { buildContext } = params;
|
@@ -36,7 +39,7 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
36
39
|
|
37
40
|
console.log("Initialize with the base email theme from which version of Keycloak?");
|
38
41
|
|
39
|
-
|
42
|
+
let { keycloakVersion } = await promptKeycloakVersion({
|
40
43
|
// NOTE: This is arbitrary
|
41
44
|
startingFromMajor: 17,
|
42
45
|
excludeMajorVersions: [],
|
@@ -44,8 +47,32 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
44
47
|
buildContext
|
45
48
|
});
|
46
49
|
|
50
|
+
const getUrl = (keycloakVersion: string) => {
|
51
|
+
return `https://repo1.maven.org/maven2/org/keycloak/keycloak-themes/${keycloakVersion}/keycloak-themes-${keycloakVersion}.jar`;
|
52
|
+
};
|
53
|
+
|
54
|
+
keycloakVersion = await (async () => {
|
55
|
+
const keycloakVersionParsed = SemVer.parse(keycloakVersion);
|
56
|
+
|
57
|
+
while (true) {
|
58
|
+
const url = getUrl(SemVer.stringify(keycloakVersionParsed));
|
59
|
+
|
60
|
+
const response = await fetch(url, buildContext.fetchOptions);
|
61
|
+
|
62
|
+
if (response.ok) {
|
63
|
+
break;
|
64
|
+
}
|
65
|
+
|
66
|
+
assert(keycloakVersionParsed.patch !== 0);
|
67
|
+
|
68
|
+
keycloakVersionParsed.patch--;
|
69
|
+
}
|
70
|
+
|
71
|
+
return SemVer.stringify(keycloakVersionParsed);
|
72
|
+
})();
|
73
|
+
|
47
74
|
const { extractedDirPath } = await downloadAndExtractArchive({
|
48
|
-
url:
|
75
|
+
url: getUrl(keycloakVersion),
|
49
76
|
cacheDirPath: buildContext.cacheDirPath,
|
50
77
|
fetchOptions: buildContext.fetchOptions,
|
51
78
|
uniqueIdOfOnArchiveFile: "extractOnlyEmailTheme",
|