Skip to content

Commit

Permalink
Update keycloakify and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Oct 25, 2024
1 parent 0cbee82 commit 9248d9e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn install # Or use pnpm or bun (but not npm), just be sure to delete the yarn
# Building the theme

You need to have [Maven](https://maven.apache.org/) installed to build the theme (Maven >= 3.1.1, Java >= 7).
The `mvn` command must be in the $PATH.
The `mvn` command must be in the $PATH.

- On macOS: `brew install maven`
- On Debian/Ubuntu: `sudo apt-get install maven`
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"license": "MIT",
"keywords": [],
"dependencies": {
"keycloakify": "^11.3.6",
"keycloakify": "^11.3.11",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down Expand Up @@ -83,4 +83,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}
21 changes: 6 additions & 15 deletions src/kc.gen.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* prettier-ignore-start */
// This file is auto-generated by the `update-kc-gen` command. Do not edit it manually.
// Hash: 52e835881710cf6fd39c1589bb9282feccdcf06c9547d41c919576489f251d2f

/* eslint-disable */

// @ts-nocheck

// noinspection JSUnusedGlobalSymbols

// This file is auto-generated by Keycloakify

import { lazy, Suspense, type ReactNode } from "react";

export type ThemeName = "keycloakify-starter";
Expand All @@ -20,9 +19,7 @@ export const kcEnvNames: KcEnvName[] = [];

export const kcEnvDefaults: Record<KcEnvName, string> = {};

export type KcContext =
| import("./login/KcContext").KcContext
;
export type KcContext = import("./login/KcContext").KcContext;

declare global {
interface Window {
Expand All @@ -32,22 +29,16 @@ declare global {

export const KcLoginPage = lazy(() => import("./login/KcPage"));

export function KcPage(
props: {
kcContext: KcContext;
fallback?: ReactNode;
}
) {
export function KcPage(props: { kcContext: KcContext; fallback?: ReactNode }) {
const { kcContext, fallback } = props;
return (
<Suspense fallback={fallback}>
{(() => {
switch (kcContext.themeType) {
case "login": return <KcLoginPage kcContext={kcContext} />;
case "login":
return <KcLoginPage kcContext={kcContext} />;
}
})()}
</Suspense>
);
}

/* prettier-ignore-end */
4 changes: 1 addition & 3 deletions src/login/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { i18nBuilder } from "keycloakify/login";
import type { ThemeName } from "../kc.gen";

/** @see: https://docs.keycloakify.dev/i18n */
const { useI18n, ofTypeI18n } = i18nBuilder
.withThemeName<ThemeName>()
.build();
const { useI18n, ofTypeI18n } = i18nBuilder.withThemeName<ThemeName>().build();

type I18n = typeof ofTypeI18n;

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7906,10 +7906,10 @@ jsonpointer@^5.0.0:
object.assign "^4.1.4"
object.values "^1.1.6"

keycloakify@^11.3.6:
version "11.3.6"
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-11.3.6.tgz#ed96540cc4107d123e5e7139b627cd2ec3ffcb78"
integrity sha512-F+HVEjsszWTOeEuieEJGZM8/g4Z5ILwHuvtlqY+BZvxUYBYLJfbUUp3rk/pM89vl14cDQkyc+L86G4tGIPQmLg==
keycloakify@^11.3.11:
version "11.3.11"
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-11.3.11.tgz#2eb704d0cc883070d8b1bb9a7e4ec0640fdeed52"
integrity sha512-ZFSocde1hekW0zW1JZEcbPwPwLEmqLGX8qZTNl1o7DoelEZwf2Xy1ktjRuR04EJhmfwvcIdYhKFQKd39oJekfw==
dependencies:
tsafe "^1.7.5"

Expand Down

0 comments on commit 9248d9e

Please sign in to comment.