keycloakify 10.0.0-rc.140 → 10.0.0-rc.142

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
@@ -735,12 +735,15 @@ async function command(params) {
735
735
  });
736
736
  }
737
737
  catch (_g) { }
738
+ const DEFAULT_PORT = 8080;
739
+ const port = (_b = (_a = cliCommandOptions.port) !== null && _a !== void 0 ? _a : buildContext.startKeycloakOptions.port) !== null && _b !== void 0 ? _b : DEFAULT_PORT;
738
740
  const SPACE_PLACEHOLDER = "SPACE_PLACEHOLDER_xKLmdPd";
739
741
  const dockerRunArgs = [
740
- `-p${SPACE_PLACEHOLDER}${(_b = (_a = cliCommandOptions.port) !== null && _a !== void 0 ? _a : buildContext.startKeycloakOptions.port) !== null && _b !== void 0 ? _b : 8080}:8080`,
742
+ `-p${SPACE_PLACEHOLDER}${port}:8080`,
741
743
  `--name${SPACE_PLACEHOLDER}${constants/* CONTAINER_NAME */.sv}`,
742
744
  `-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN=admin`,
743
745
  `-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN_PASSWORD=admin`,
746
+ buildContext.startKeycloakOptions.dockerExtraArgs.join(SPACE_PLACEHOLDER),
744
747
  ...(realmJsonFilePath === undefined
745
748
  ? []
746
749
  : [
@@ -767,14 +770,13 @@ async function command(params) {
767
770
  .map(({ name, envValue }) => envValue === undefined ? undefined : { name, envValue })
768
771
  .filter((0,exclude.exclude)(undefined))
769
772
  .map(({ name, envValue }) => `--env${SPACE_PLACEHOLDER}${name}='${envValue.replace(/'/g, "'\\''")}'`),
770
- ...buildContext.startKeycloakOptions.dockerExtraArgs.join(SPACE_PLACEHOLDER),
771
773
  `${(_d = (_c = buildContext.startKeycloakOptions.dockerImage) === null || _c === void 0 ? void 0 : _c.reference) !== null && _d !== void 0 ? _d : "quay.io/keycloak/keycloak"}:${dockerImageTag}`,
772
774
  "start-dev",
773
775
  ...(21 <= keycloakMajorVersionNumber && keycloakMajorVersionNumber < 24
774
776
  ? ["--features=declarative-user-profile"]
775
777
  : []),
776
778
  ...(realmJsonFilePath === undefined ? [] : ["--import-realm"]),
777
- ...buildContext.startKeycloakOptions.keycloakExtraArgs.join(SPACE_PLACEHOLDER)
779
+ buildContext.startKeycloakOptions.keycloakExtraArgs.join(SPACE_PLACEHOLDER)
778
780
  ];
779
781
  console.log(source_default().blue([
780
782
  `$ docker run \\`,
@@ -798,13 +800,13 @@ async function command(params) {
798
800
  "",
799
801
  `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.`,
800
802
  "",
801
- `Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${cliCommandOptions.port}`)}`,
803
+ `Keycloak Admin console: ${source_default().cyan.bold(`http://localhost:${port}`)}`,
802
804
  `- user: ${source_default().cyan.bold("admin")}`,
803
805
  `- password: ${source_default().cyan.bold("admin")}`,
804
806
  "",
805
807
  "",
806
808
  `${source_default().green("Your theme is accessible at:")}`,
807
- `${source_default().green("➜")} ${source_default().cyan.bold(`https://my-theme.keycloakify.dev${cliCommandOptions.port === 8080 ? "" : `?port=${cliCommandOptions.port}`}`)}`,
809
+ `${source_default().green("➜")} ${source_default().cyan.bold(`https://my-theme.keycloakify.dev${port === DEFAULT_PORT ? "" : `?port=${port}`}`)}`,
808
810
  "",
809
811
  "You can login with the following credentials:",
810
812
  `- 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.140",
3
+ "version": "10.0.0-rc.142",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -334,13 +334,18 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
334
334
  });
335
335
  } catch {}
336
336
 
337
+ const DEFAULT_PORT = 8080;
338
+ const port =
339
+ cliCommandOptions.port ?? buildContext.startKeycloakOptions.port ?? DEFAULT_PORT;
340
+
337
341
  const SPACE_PLACEHOLDER = "SPACE_PLACEHOLDER_xKLmdPd";
338
342
 
339
343
  const dockerRunArgs: string[] = [
340
- `-p${SPACE_PLACEHOLDER}${cliCommandOptions.port ?? buildContext.startKeycloakOptions.port ?? 8080}:8080`,
344
+ `-p${SPACE_PLACEHOLDER}${port}:8080`,
341
345
  `--name${SPACE_PLACEHOLDER}${CONTAINER_NAME}`,
342
346
  `-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN=admin`,
343
347
  `-e${SPACE_PLACEHOLDER}KEYCLOAK_ADMIN_PASSWORD=admin`,
348
+ buildContext.startKeycloakOptions.dockerExtraArgs.join(SPACE_PLACEHOLDER),
344
349
  ...(realmJsonFilePath === undefined
345
350
  ? []
346
351
  : [
@@ -388,14 +393,13 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
388
393
  ({ name, envValue }) =>
389
394
  `--env${SPACE_PLACEHOLDER}${name}='${envValue.replace(/'/g, "'\\''")}'`
390
395
  ),
391
- ...buildContext.startKeycloakOptions.dockerExtraArgs.join(SPACE_PLACEHOLDER),
392
396
  `${buildContext.startKeycloakOptions.dockerImage?.reference ?? "quay.io/keycloak/keycloak"}:${dockerImageTag}`,
393
397
  "start-dev",
394
398
  ...(21 <= keycloakMajorVersionNumber && keycloakMajorVersionNumber < 24
395
399
  ? ["--features=declarative-user-profile"]
396
400
  : []),
397
401
  ...(realmJsonFilePath === undefined ? [] : ["--import-realm"]),
398
- ...buildContext.startKeycloakOptions.keycloakExtraArgs.join(SPACE_PLACEHOLDER)
402
+ buildContext.startKeycloakOptions.keycloakExtraArgs.join(SPACE_PLACEHOLDER)
399
403
  ];
400
404
 
401
405
  console.log(
@@ -444,7 +448,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
444
448
  )} are mounted in the Keycloak container.`,
445
449
  "",
446
450
  `Keycloak Admin console: ${chalk.cyan.bold(
447
- `http://localhost:${cliCommandOptions.port}`
451
+ `http://localhost:${port}`
448
452
  )}`,
449
453
  `- user: ${chalk.cyan.bold("admin")}`,
450
454
  `- password: ${chalk.cyan.bold("admin")}`,
@@ -452,7 +456,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
452
456
  "",
453
457
  `${chalk.green("Your theme is accessible at:")}`,
454
458
  `${chalk.green("➜")} ${chalk.cyan.bold(
455
- `https://my-theme.keycloakify.dev${cliCommandOptions.port === 8080 ? "" : `?port=${cliCommandOptions.port}`}`
459
+ `https://my-theme.keycloakify.dev${port === DEFAULT_PORT ? "" : `?port=${port}`}`
456
460
  )}`,
457
461
  "",
458
462
  "You can login with the following credentials:",