keycloakify 10.0.0-rc.142 → 10.0.0-rc.143

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
@@ -790,6 +790,15 @@ async function command(params) {
790
790
  child.on("exit", process.exit);
791
791
  const srcDirPath = (0,external_path_.join)(buildContext.projectDirPath, "src");
792
792
  {
793
+ const kcHttpRelativePath = (() => {
794
+ const match = buildContext.startKeycloakOptions.dockerExtraArgs
795
+ .join(" ")
796
+ .match(/KC_HTTP_RELATIVE_PATH=([^ ]+)/);
797
+ if (match === null) {
798
+ return undefined;
799
+ }
800
+ return match[1];
801
+ })();
793
802
  const handler = async (data) => {
794
803
  if (!data.toString("utf8").includes("Listening on: http://0.0.0.0:8080")) {
795
804
  return;
@@ -800,13 +809,22 @@ async function command(params) {
800
809
  "",
801
810
  `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
811
  "",
803
- `Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${port}`)}`,
812
+ `Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${port}${kcHttpRelativePath !== null && kcHttpRelativePath !== void 0 ? kcHttpRelativePath : ""}`)}`,
804
813
  `- user: ${source_default().cyan.bold("admin")}`,
805
814
  `- password: ${source_default().cyan.bold("admin")}`,
806
815
  "",
807
816
  "",
808
817
  `${source_default().green("Your theme is accessible at:")}`,
809
- `${source_default().green("➜")} ${source_default().cyan.bold(`https://my-theme.keycloakify.dev${port === DEFAULT_PORT ? "" : `?port=${port}`}`)}`,
818
+ `${source_default().green("➜")} ${source_default().cyan.bold((() => {
819
+ const url = new URL("https://my-theme.keycloakify.dev");
820
+ if (port !== DEFAULT_PORT) {
821
+ url.searchParams.set("port", `${port}`);
822
+ }
823
+ if (kcHttpRelativePath !== undefined) {
824
+ url.searchParams.set("kcHttpRelativePath", kcHttpRelativePath);
825
+ }
826
+ return url.href;
827
+ })())}`,
810
828
  "",
811
829
  "You can login with the following credentials:",
812
830
  `- username: ${source_default().cyan.bold("testuser")}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "10.0.0-rc.142",
3
+ "version": "10.0.0-rc.143",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -314,7 +314,8 @@ export async function generateResourcesForMainTheme(params: {
314
314
  }
315
315
 
316
316
  const { extractedDirPath } = await downloadAndExtractArchive({
317
- urlOrPath: "https://repo1.maven.org/maven2/org/keycloak/keycloak-account-ui/25.0.1/keycloak-account-ui-25.0.1.jar",
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",
@@ -431,6 +431,18 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
431
431
  const srcDirPath = pathJoin(buildContext.projectDirPath, "src");
432
432
 
433
433
  {
434
+ const kcHttpRelativePath = (() => {
435
+ const match = buildContext.startKeycloakOptions.dockerExtraArgs
436
+ .join(" ")
437
+ .match(/KC_HTTP_RELATIVE_PATH=([^ ]+)/);
438
+
439
+ if (match === null) {
440
+ return undefined;
441
+ }
442
+
443
+ return match[1];
444
+ })();
445
+
434
446
  const handler = async (data: Buffer) => {
435
447
  if (!data.toString("utf8").includes("Listening on: http://0.0.0.0:8080")) {
436
448
  return;
@@ -448,7 +460,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
448
460
  )} are mounted in the Keycloak container.`,
449
461
  "",
450
462
  `Keycloak Admin console: ${chalk.cyan.bold(
451
- `http://localhost:${port}`
463
+ `http://localhost:${port}${kcHttpRelativePath ?? ""}`
452
464
  )}`,
453
465
  `- user: ${chalk.cyan.bold("admin")}`,
454
466
  `- password: ${chalk.cyan.bold("admin")}`,
@@ -456,7 +468,21 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
456
468
  "",
457
469
  `${chalk.green("Your theme is accessible at:")}`,
458
470
  `${chalk.green("➜")} ${chalk.cyan.bold(
459
- `https://my-theme.keycloakify.dev${port === DEFAULT_PORT ? "" : `?port=${port}`}`
471
+ (() => {
472
+ const url = new URL("https://my-theme.keycloakify.dev");
473
+
474
+ if (port !== DEFAULT_PORT) {
475
+ url.searchParams.set("port", `${port}`);
476
+ }
477
+ if (kcHttpRelativePath !== undefined) {
478
+ url.searchParams.set(
479
+ "kcHttpRelativePath",
480
+ kcHttpRelativePath
481
+ );
482
+ }
483
+
484
+ return url.href;
485
+ })()
460
486
  )}`,
461
487
  "",
462
488
  "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,