keycloakify 10.0.0-rc.142 → 10.0.0-rc.144
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/526.index.js
CHANGED
@@ -743,7 +743,11 @@ async function command(params) {
|
|
743
743
|
`--name${SPACE_PLACEHOLDER}${constants/* CONTAINER_NAME */.sv}`,
|
744
744
|
`-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN=admin`,
|
745
745
|
`-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN_PASSWORD=admin`,
|
746
|
-
buildContext.startKeycloakOptions.dockerExtraArgs.
|
746
|
+
...(buildContext.startKeycloakOptions.dockerExtraArgs.length === 0
|
747
|
+
? []
|
748
|
+
: [
|
749
|
+
buildContext.startKeycloakOptions.dockerExtraArgs.join(SPACE_PLACEHOLDER)
|
750
|
+
]),
|
747
751
|
...(realmJsonFilePath === undefined
|
748
752
|
? []
|
749
753
|
: [
|
@@ -776,7 +780,11 @@ async function command(params) {
|
|
776
780
|
? ["--features=declarative-user-profile"]
|
777
781
|
: []),
|
778
782
|
...(realmJsonFilePath === undefined ? [] : ["--import-realm"]),
|
779
|
-
buildContext.startKeycloakOptions.keycloakExtraArgs.
|
783
|
+
...(buildContext.startKeycloakOptions.keycloakExtraArgs.length === 0
|
784
|
+
? []
|
785
|
+
: [
|
786
|
+
buildContext.startKeycloakOptions.keycloakExtraArgs.join(SPACE_PLACEHOLDER)
|
787
|
+
])
|
780
788
|
];
|
781
789
|
console.log(source_default().blue([
|
782
790
|
`$ docker run \\`,
|
@@ -790,6 +798,15 @@ async function command(params) {
|
|
790
798
|
child.on("exit", process.exit);
|
791
799
|
const srcDirPath = (0,external_path_.join)(buildContext.projectDirPath, "src");
|
792
800
|
{
|
801
|
+
const kcHttpRelativePath = (() => {
|
802
|
+
const match = buildContext.startKeycloakOptions.dockerExtraArgs
|
803
|
+
.join(" ")
|
804
|
+
.match(/KC_HTTP_RELATIVE_PATH=([^ ]+)/);
|
805
|
+
if (match === null) {
|
806
|
+
return undefined;
|
807
|
+
}
|
808
|
+
return match[1];
|
809
|
+
})();
|
793
810
|
const handler = async (data) => {
|
794
811
|
if (!data.toString("utf8").includes("Listening on: http://0.0.0.0:8080")) {
|
795
812
|
return;
|
@@ -800,13 +817,22 @@ async function command(params) {
|
|
800
817
|
"",
|
801
818
|
`The ftl files from ${source_default().bold(`.${external_path_.sep}${(0,external_path_.relative)(process.cwd(), (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "theme"))}`)} are mounted in the Keycloak container.`,
|
802
819
|
"",
|
803
|
-
`Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${port}`)}`,
|
820
|
+
`Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${port}${kcHttpRelativePath !== null && kcHttpRelativePath !== void 0 ? kcHttpRelativePath : ""}`)}`,
|
804
821
|
`- user: ${source_default().cyan.bold("admin")}`,
|
805
822
|
`- password: ${source_default().cyan.bold("admin")}`,
|
806
823
|
"",
|
807
824
|
"",
|
808
825
|
`${source_default().green("Your theme is accessible at:")}`,
|
809
|
-
`${source_default().green("➜")} ${source_default().cyan.bold(
|
826
|
+
`${source_default().green("➜")} ${source_default().cyan.bold((() => {
|
827
|
+
const url = new URL("https://my-theme.keycloakify.dev");
|
828
|
+
if (port !== DEFAULT_PORT) {
|
829
|
+
url.searchParams.set("port", `${port}`);
|
830
|
+
}
|
831
|
+
if (kcHttpRelativePath !== undefined) {
|
832
|
+
url.searchParams.set("kcHttpRelativePath", kcHttpRelativePath);
|
833
|
+
}
|
834
|
+
return url.href;
|
835
|
+
})())}`,
|
810
836
|
"",
|
811
837
|
"You can login with the following credentials:",
|
812
838
|
`- username: ${source_default().cyan.bold("testuser")}`,
|
package/package.json
CHANGED
@@ -314,7 +314,8 @@ export async function generateResourcesForMainTheme(params: {
|
|
314
314
|
}
|
315
315
|
|
316
316
|
const { extractedDirPath } = await downloadAndExtractArchive({
|
317
|
-
urlOrPath:
|
317
|
+
urlOrPath:
|
318
|
+
"https://repo1.maven.org/maven2/org/keycloak/keycloak-account-ui/25.0.1/keycloak-account-ui-25.0.1.jar",
|
318
319
|
cacheDirPath: buildContext.cacheDirPath,
|
319
320
|
fetchOptions: buildContext.fetchOptions,
|
320
321
|
uniqueIdOfOnArchiveFile: "bring_in_account_v3_i18n_messages",
|
@@ -345,7 +345,13 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
345
345
|
`--name${SPACE_PLACEHOLDER}${CONTAINER_NAME}`,
|
346
346
|
`-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN=admin`,
|
347
347
|
`-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN_PASSWORD=admin`,
|
348
|
-
buildContext.startKeycloakOptions.dockerExtraArgs.
|
348
|
+
...(buildContext.startKeycloakOptions.dockerExtraArgs.length === 0
|
349
|
+
? []
|
350
|
+
: [
|
351
|
+
buildContext.startKeycloakOptions.dockerExtraArgs.join(
|
352
|
+
SPACE_PLACEHOLDER
|
353
|
+
)
|
354
|
+
]),
|
349
355
|
...(realmJsonFilePath === undefined
|
350
356
|
? []
|
351
357
|
: [
|
@@ -399,7 +405,13 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
399
405
|
? ["--features=declarative-user-profile"]
|
400
406
|
: []),
|
401
407
|
...(realmJsonFilePath === undefined ? [] : ["--import-realm"]),
|
402
|
-
buildContext.startKeycloakOptions.keycloakExtraArgs.
|
408
|
+
...(buildContext.startKeycloakOptions.keycloakExtraArgs.length === 0
|
409
|
+
? []
|
410
|
+
: [
|
411
|
+
buildContext.startKeycloakOptions.keycloakExtraArgs.join(
|
412
|
+
SPACE_PLACEHOLDER
|
413
|
+
)
|
414
|
+
])
|
403
415
|
];
|
404
416
|
|
405
417
|
console.log(
|
@@ -431,6 +443,18 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
431
443
|
const srcDirPath = pathJoin(buildContext.projectDirPath, "src");
|
432
444
|
|
433
445
|
{
|
446
|
+
const kcHttpRelativePath = (() => {
|
447
|
+
const match = buildContext.startKeycloakOptions.dockerExtraArgs
|
448
|
+
.join(" ")
|
449
|
+
.match(/KC_HTTP_RELATIVE_PATH=([^ ]+)/);
|
450
|
+
|
451
|
+
if (match === null) {
|
452
|
+
return undefined;
|
453
|
+
}
|
454
|
+
|
455
|
+
return match[1];
|
456
|
+
})();
|
457
|
+
|
434
458
|
const handler = async (data: Buffer) => {
|
435
459
|
if (!data.toString("utf8").includes("Listening on: http://0.0.0.0:8080")) {
|
436
460
|
return;
|
@@ -448,7 +472,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
448
472
|
)} are mounted in the Keycloak container.`,
|
449
473
|
"",
|
450
474
|
`Keycloak Admin console: ${chalk.cyan.bold(
|
451
|
-
`http://localhost:${port}`
|
475
|
+
`http://localhost:${port}${kcHttpRelativePath ?? ""}`
|
452
476
|
)}`,
|
453
477
|
`- user: ${chalk.cyan.bold("admin")}`,
|
454
478
|
`- password: ${chalk.cyan.bold("admin")}`,
|
@@ -456,7 +480,21 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
456
480
|
"",
|
457
481
|
`${chalk.green("Your theme is accessible at:")}`,
|
458
482
|
`${chalk.green("➜")} ${chalk.cyan.bold(
|
459
|
-
|
483
|
+
(() => {
|
484
|
+
const url = new URL("https://my-theme.keycloakify.dev");
|
485
|
+
|
486
|
+
if (port !== DEFAULT_PORT) {
|
487
|
+
url.searchParams.set("port", `${port}`);
|
488
|
+
}
|
489
|
+
if (kcHttpRelativePath !== undefined) {
|
490
|
+
url.searchParams.set(
|
491
|
+
"kcHttpRelativePath",
|
492
|
+
kcHttpRelativePath
|
493
|
+
);
|
494
|
+
}
|
495
|
+
|
496
|
+
return url.href;
|
497
|
+
})()
|
460
498
|
)}`,
|
461
499
|
"",
|
462
500
|
"You can login with the following credentials:",
|
@@ -21,7 +21,7 @@ export async function downloadAndExtractArchive(params: {
|
|
21
21
|
}) => Promise<void>;
|
22
22
|
cacheDirPath: string;
|
23
23
|
fetchOptions: FetchOptions | undefined;
|
24
|
-
}): Promise<{ extractedDirPath: string; archiveFilePath: string
|
24
|
+
}): Promise<{ extractedDirPath: string; archiveFilePath: string }> {
|
25
25
|
const {
|
26
26
|
urlOrPath,
|
27
27
|
uniqueIdOfOnArchiveFile,
|