keycloakify 11.8.55 → 11.8.57-rc.1
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/375.index.js +10 -0
- package/bin/712.index.js +26 -7
- package/bin/keycloakify/buildJars/extensionVersions.d.ts +1 -1
- package/bin/main.js +5 -3
- package/bin/shared/KeycloakVersionRange.d.ts +1 -1
- package/package.json +1 -1
- package/src/bin/keycloakify/buildJars/extensionVersions.ts +1 -1
- package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +45 -11
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +6 -1
- package/src/bin/shared/KeycloakVersionRange.ts +7 -1
- package/src/bin/shared/buildContext.ts +9 -4
- package/src/bin/start-keycloak/start-keycloak.ts +17 -0
- package/vite-plugin/index.js +5 -3
package/bin/375.index.js
CHANGED
@@ -1596,6 +1596,16 @@ async function command(params) {
|
|
1596
1596
|
const { dockerImageTag } = await (async () => {
|
1597
1597
|
if (cliCommandOptions.keycloakVersion !== undefined) {
|
1598
1598
|
const cliCommandOptions_keycloakVersion = cliCommandOptions.keycloakVersion;
|
1599
|
+
if (buildContext.implementedThemeTypes.account.isImplemented &&
|
1600
|
+
buildContext.implementedThemeTypes.account.type === "Multi-Page" &&
|
1601
|
+
(cliCommandOptions_keycloakVersion.startsWith("26.0") ||
|
1602
|
+
cliCommandOptions_keycloakVersion.startsWith("26.1"))) {
|
1603
|
+
console.error(source_default().red([
|
1604
|
+
`Sorry, for internal technical reasons you can't test your theme`,
|
1605
|
+
`with Keycloak 26.0 and 26.1, use 26.2 or newer.`
|
1606
|
+
].join(" ")));
|
1607
|
+
process.exit(-1);
|
1608
|
+
}
|
1599
1609
|
const tag = allSupportedTags.find(tag => tag.startsWith(cliCommandOptions_keycloakVersion));
|
1600
1610
|
if (tag === undefined) {
|
1601
1611
|
console.log(source_default().red([
|
package/bin/712.index.js
CHANGED
@@ -596,6 +596,7 @@ function generateFtlFilesCodeFactory(params) {
|
|
596
596
|
$(element).attr(attrName, href.replace(new RegExp(`^${((_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/").replace(/\//g, "\\/")}`), `\${xKeycloakify.resourcesPath}/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/`));
|
597
597
|
}));
|
598
598
|
}
|
599
|
+
$("head base").remove();
|
599
600
|
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
|
600
601
|
const kcContextDeclarationTemplateFtl = external_fs_.readFileSync((0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "src", "bin", "keycloakify", "generateFtl", "kcContextDeclarationTemplate.ftl"))
|
601
602
|
.toString("utf8")
|
@@ -608,7 +609,10 @@ function generateFtlFilesCodeFactory(params) {
|
|
608
609
|
.replace("{{KEYCLOAKIFY_SPA_DEV_SERVER_PORT}}", constants/* KEYCLOAKIFY_SPA_DEV_SERVER_PORT */.Sz)
|
609
610
|
.replace("{{userDefinedExclusions}}", (_a = buildContext.kcContextExclusionsFtlCode) !== null && _a !== void 0 ? _a : "");
|
610
611
|
const ftlObjectToJsCodeDeclaringAnObjectPlaceholder = '{ "x": "vIdLqMeOed9sdLdIdOxdK0d" }';
|
611
|
-
$("head").prepend(
|
612
|
+
$("head").prepend([
|
613
|
+
`<script>\n${ftlObjectToJsCodeDeclaringAnObjectPlaceholder}\n</script>`,
|
614
|
+
`<base href="\${xKeycloakify.resourcesPath}/${constants/* WELL_KNOWN_DIRECTORY_BASE_NAME.DIST */.Ju.DIST}/" />`
|
615
|
+
].join("\n"));
|
612
616
|
// Remove part of the document marked as ignored.
|
613
617
|
{
|
614
618
|
const startTags = $('meta[name="keycloakify-ignore-start"]');
|
@@ -1340,7 +1344,7 @@ var external_child_process_ = __webpack_require__(32081);
|
|
1340
1344
|
var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_);
|
1341
1345
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/extensionVersions.js
|
1342
1346
|
// NOTE: v0.5 is a dummy version.
|
1343
|
-
const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6"];
|
1347
|
+
const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6", "0.7"];
|
1344
1348
|
const keycloakThemeAdditionalInfoExtensionVersions = [null, "1.1.5"];
|
1345
1349
|
//# sourceMappingURL=extensionVersions.js.map
|
1346
1350
|
;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js
|
@@ -1356,33 +1360,48 @@ function getKeycloakVersionRangeForJar(params) {
|
|
1356
1360
|
return "21-and-below";
|
1357
1361
|
case "1.1.5":
|
1358
1362
|
return undefined;
|
1363
|
+
default:
|
1364
|
+
(0,assert/* assert */.h)(false);
|
1359
1365
|
}
|
1360
|
-
(0,assert/* assert */.h)(false);
|
1361
1366
|
case "0.3":
|
1362
1367
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
1363
1368
|
case null:
|
1364
1369
|
return undefined;
|
1365
1370
|
case "1.1.5":
|
1366
1371
|
return "23";
|
1372
|
+
default:
|
1373
|
+
(0,assert/* assert */.h)(false);
|
1367
1374
|
}
|
1368
|
-
(0,assert/* assert */.h)(false);
|
1369
1375
|
case "0.4":
|
1370
1376
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
1371
1377
|
case null:
|
1372
1378
|
return undefined;
|
1373
1379
|
case "1.1.5":
|
1374
1380
|
return "24";
|
1381
|
+
default:
|
1382
|
+
(0,assert/* assert */.h)(false);
|
1375
1383
|
}
|
1376
|
-
(0,assert/* assert */.h)(false);
|
1377
1384
|
case "0.6":
|
1378
1385
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
1379
1386
|
case null:
|
1380
|
-
return "26-
|
1387
|
+
return "26.0-to-26.1";
|
1381
1388
|
case "1.1.5":
|
1382
1389
|
return "25";
|
1390
|
+
default:
|
1391
|
+
(0,assert/* assert */.h)(false);
|
1392
|
+
}
|
1393
|
+
case "0.7":
|
1394
|
+
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
1395
|
+
case null:
|
1396
|
+
return "26.2-and-above";
|
1397
|
+
case "1.1.5":
|
1398
|
+
return undefined;
|
1399
|
+
default:
|
1400
|
+
(0,assert/* assert */.h)(false);
|
1383
1401
|
}
|
1402
|
+
default:
|
1403
|
+
(0,assert/* assert */.h)(false);
|
1384
1404
|
}
|
1385
|
-
(0,assert/* assert */.h)(false);
|
1386
1405
|
})();
|
1387
1406
|
(0,assert/* assert */.h)();
|
1388
1407
|
return keycloakVersionRange;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare const keycloakAccountV1Versions: readonly [null, "0.3", "0.4", "0.6"];
|
1
|
+
export declare const keycloakAccountV1Versions: readonly [null, "0.3", "0.4", "0.6", "0.7"];
|
2
2
|
/**
|
3
3
|
* https://central.sonatype.com/artifact/io.phasetwo.keycloak/keycloak-account-v1
|
4
4
|
* https://github.com/p2-inc/keycloak-account-v1
|
package/bin/main.js
CHANGED
@@ -251,7 +251,8 @@ function getBuildContext(params) {
|
|
251
251
|
"23": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
252
252
|
"24": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
253
253
|
"25": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
254
|
-
"26-
|
254
|
+
"26.0-to-26.1": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
255
|
+
"26.2-and-above": lib.z.union([lib.z.boolean(), lib.z.string()])
|
255
256
|
})
|
256
257
|
.optional()
|
257
258
|
});
|
@@ -635,7 +636,7 @@ function getBuildContext(params) {
|
|
635
636
|
if (buildForKeycloakMajorVersionNumber === 25) {
|
636
637
|
return "25";
|
637
638
|
}
|
638
|
-
return "26-and-above";
|
639
|
+
return "26.2-and-above";
|
639
640
|
})();
|
640
641
|
(0,assert/* assert */.h)();
|
641
642
|
return keycloakVersionRange;
|
@@ -687,7 +688,8 @@ function getBuildContext(params) {
|
|
687
688
|
"23",
|
688
689
|
"24",
|
689
690
|
"25",
|
690
|
-
"26-
|
691
|
+
"26.0-to-26.1",
|
692
|
+
"26.2-and-above"
|
691
693
|
]) {
|
692
694
|
(0,assert/* assert */.h)(true);
|
693
695
|
jarTargets.push({
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export type KeycloakVersionRange = KeycloakVersionRange.WithAccountV1Theme | KeycloakVersionRange.WithoutAccountV1Theme;
|
2
2
|
export declare namespace KeycloakVersionRange {
|
3
3
|
type WithoutAccountV1Theme = "22-to-25" | "all-other-versions";
|
4
|
-
type WithAccountV1Theme = "21-and-below" | "23" | "24" | "25" | "26-and-above";
|
4
|
+
type WithAccountV1Theme = "21-and-below" | "23" | "24" | "25" | "26.0-to-26.1" | "26.2-and-above";
|
5
5
|
}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// NOTE: v0.5 is a dummy version.
|
2
|
-
export const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6"] as const;
|
2
|
+
export const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6", "0.7"] as const;
|
3
3
|
|
4
4
|
/**
|
5
5
|
* https://central.sonatype.com/artifact/io.phasetwo.keycloak/keycloak-account-v1
|
@@ -25,39 +25,73 @@ export function getKeycloakVersionRangeForJar(params: {
|
|
25
25
|
return "21-and-below" as const;
|
26
26
|
case "1.1.5":
|
27
27
|
return undefined;
|
28
|
+
default:
|
29
|
+
assert<
|
30
|
+
Equals<
|
31
|
+
typeof keycloakThemeAdditionalInfoExtensionVersion,
|
32
|
+
never
|
33
|
+
>
|
34
|
+
>(false);
|
28
35
|
}
|
29
|
-
assert<
|
30
|
-
Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>
|
31
|
-
>(false);
|
32
36
|
case "0.3":
|
33
37
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
34
38
|
case null:
|
35
39
|
return undefined;
|
36
40
|
case "1.1.5":
|
37
41
|
return "23" as const;
|
42
|
+
default:
|
43
|
+
assert<
|
44
|
+
Equals<
|
45
|
+
typeof keycloakThemeAdditionalInfoExtensionVersion,
|
46
|
+
never
|
47
|
+
>
|
48
|
+
>(false);
|
38
49
|
}
|
39
|
-
assert<
|
40
|
-
Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>
|
41
|
-
>(false);
|
42
50
|
case "0.4":
|
43
51
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
44
52
|
case null:
|
45
53
|
return undefined;
|
46
54
|
case "1.1.5":
|
47
55
|
return "24" as const;
|
56
|
+
default:
|
57
|
+
assert<
|
58
|
+
Equals<
|
59
|
+
typeof keycloakThemeAdditionalInfoExtensionVersion,
|
60
|
+
never
|
61
|
+
>
|
62
|
+
>(false);
|
48
63
|
}
|
49
|
-
assert<
|
50
|
-
Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>
|
51
|
-
>(false);
|
52
64
|
case "0.6":
|
53
65
|
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
54
66
|
case null:
|
55
|
-
return "26-
|
67
|
+
return "26.0-to-26.1" as const;
|
56
68
|
case "1.1.5":
|
57
69
|
return "25" as const;
|
70
|
+
default:
|
71
|
+
assert<
|
72
|
+
Equals<
|
73
|
+
typeof keycloakThemeAdditionalInfoExtensionVersion,
|
74
|
+
never
|
75
|
+
>
|
76
|
+
>(false);
|
58
77
|
}
|
78
|
+
case "0.7":
|
79
|
+
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
80
|
+
case null:
|
81
|
+
return "26.2-and-above" as const;
|
82
|
+
case "1.1.5":
|
83
|
+
return undefined;
|
84
|
+
default:
|
85
|
+
assert<
|
86
|
+
Equals<
|
87
|
+
typeof keycloakThemeAdditionalInfoExtensionVersion,
|
88
|
+
never
|
89
|
+
>
|
90
|
+
>(false);
|
91
|
+
}
|
92
|
+
default:
|
93
|
+
assert<Equals<typeof keycloakAccountV1Version, never>>(false);
|
59
94
|
}
|
60
|
-
assert<Equals<typeof keycloakAccountV1Version, never>>(false);
|
61
95
|
})();
|
62
96
|
|
63
97
|
assert<
|
@@ -101,6 +101,8 @@ export function generateFtlFilesCodeFactory(params: {
|
|
101
101
|
);
|
102
102
|
}
|
103
103
|
|
104
|
+
$("head base").remove();
|
105
|
+
|
104
106
|
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
|
105
107
|
const kcContextDeclarationTemplateFtl = fs
|
106
108
|
.readFileSync(
|
@@ -130,7 +132,10 @@ export function generateFtlFilesCodeFactory(params: {
|
|
130
132
|
'{ "x": "vIdLqMeOed9sdLdIdOxdK0d" }';
|
131
133
|
|
132
134
|
$("head").prepend(
|
133
|
-
|
135
|
+
[
|
136
|
+
`<script>\n${ftlObjectToJsCodeDeclaringAnObjectPlaceholder}\n</script>`,
|
137
|
+
`<base href="\${xKeycloakify.resourcesPath}/${WELL_KNOWN_DIRECTORY_BASE_NAME.DIST}/" />`
|
138
|
+
].join("\n")
|
134
139
|
);
|
135
140
|
|
136
141
|
// Remove part of the document marked as ignored.
|
@@ -5,5 +5,11 @@ export type KeycloakVersionRange =
|
|
5
5
|
export namespace KeycloakVersionRange {
|
6
6
|
export type WithoutAccountV1Theme = "22-to-25" | "all-other-versions";
|
7
7
|
|
8
|
-
export type WithAccountV1Theme =
|
8
|
+
export type WithAccountV1Theme =
|
9
|
+
| "21-and-below"
|
10
|
+
| "23"
|
11
|
+
| "24"
|
12
|
+
| "25"
|
13
|
+
| "26.0-to-26.1"
|
14
|
+
| "26.2-and-above";
|
9
15
|
}
|
@@ -270,7 +270,8 @@ export function getBuildContext(params: {
|
|
270
270
|
"23": z.union([z.boolean(), z.string()]),
|
271
271
|
"24": z.union([z.boolean(), z.string()]),
|
272
272
|
"25": z.union([z.boolean(), z.string()]),
|
273
|
-
"26-
|
273
|
+
"26.0-to-26.1": z.union([z.boolean(), z.string()]),
|
274
|
+
"26.2-and-above": z.union([z.boolean(), z.string()])
|
274
275
|
})
|
275
276
|
.optional()
|
276
277
|
});
|
@@ -820,13 +821,16 @@ export function getBuildContext(params: {
|
|
820
821
|
return "25" as const;
|
821
822
|
}
|
822
823
|
|
823
|
-
return "26-and-above" as const;
|
824
|
+
return "26.2-and-above" as const;
|
824
825
|
})();
|
825
826
|
|
826
827
|
assert<
|
827
828
|
Equals<
|
828
829
|
typeof keycloakVersionRange,
|
829
|
-
|
830
|
+
Exclude<
|
831
|
+
KeycloakVersionRange.WithAccountV1Theme,
|
832
|
+
"26.0-to-26.1"
|
833
|
+
>
|
830
834
|
>
|
831
835
|
>();
|
832
836
|
|
@@ -909,7 +913,8 @@ export function getBuildContext(params: {
|
|
909
913
|
"23",
|
910
914
|
"24",
|
911
915
|
"25",
|
912
|
-
"26-
|
916
|
+
"26.0-to-26.1",
|
917
|
+
"26.2-and-above"
|
913
918
|
] as const) {
|
914
919
|
assert<
|
915
920
|
Equals<
|
@@ -113,6 +113,23 @@ export async function command(params: {
|
|
113
113
|
if (cliCommandOptions.keycloakVersion !== undefined) {
|
114
114
|
const cliCommandOptions_keycloakVersion = cliCommandOptions.keycloakVersion;
|
115
115
|
|
116
|
+
if (
|
117
|
+
buildContext.implementedThemeTypes.account.isImplemented &&
|
118
|
+
buildContext.implementedThemeTypes.account.type === "Multi-Page" &&
|
119
|
+
(cliCommandOptions_keycloakVersion.startsWith("26.0") ||
|
120
|
+
cliCommandOptions_keycloakVersion.startsWith("26.1"))
|
121
|
+
) {
|
122
|
+
console.error(
|
123
|
+
chalk.red(
|
124
|
+
[
|
125
|
+
`Sorry, for internal technical reasons you can't test your theme`,
|
126
|
+
`with Keycloak 26.0 and 26.1, use 26.2 or newer.`
|
127
|
+
].join(" ")
|
128
|
+
)
|
129
|
+
);
|
130
|
+
process.exit(-1);
|
131
|
+
}
|
132
|
+
|
116
133
|
const tag = allSupportedTags.find(tag =>
|
117
134
|
tag.startsWith(cliCommandOptions_keycloakVersion)
|
118
135
|
);
|
package/vite-plugin/index.js
CHANGED
@@ -465,7 +465,8 @@ function getBuildContext(params) {
|
|
465
465
|
"23": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
466
466
|
"24": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
467
467
|
"25": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
468
|
-
"26-
|
468
|
+
"26.0-to-26.1": lib.z.union([lib.z.boolean(), lib.z.string()]),
|
469
|
+
"26.2-and-above": lib.z.union([lib.z.boolean(), lib.z.string()])
|
469
470
|
})
|
470
471
|
.optional()
|
471
472
|
});
|
@@ -849,7 +850,7 @@ function getBuildContext(params) {
|
|
849
850
|
if (buildForKeycloakMajorVersionNumber === 25) {
|
850
851
|
return "25";
|
851
852
|
}
|
852
|
-
return "26-and-above";
|
853
|
+
return "26.2-and-above";
|
853
854
|
})();
|
854
855
|
(0,assert/* assert */.h)();
|
855
856
|
return keycloakVersionRange;
|
@@ -901,7 +902,8 @@ function getBuildContext(params) {
|
|
901
902
|
"23",
|
902
903
|
"24",
|
903
904
|
"25",
|
904
|
-
"26-
|
905
|
+
"26.0-to-26.1",
|
906
|
+
"26.2-and-above"
|
905
907
|
]) {
|
906
908
|
(0,assert/* assert */.h)(true);
|
907
909
|
jarTargets.push({
|