diff --git a/package.json b/package.json index f9fc6cd2..56454d52 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@babel/core": "^7.0.0", "@types/make-fetch-happen": "^10.0.1", "@types/minimist": "^1.2.2", - "@types/node": "^18.14.1", + "@types/node": "^18.15.3", "@types/react": "18.0.9", "concurrently": "^7.6.0", "copyfiles": "^2.4.1", diff --git a/scripts/link-in-app.ts b/scripts/link-in-app.ts index a5ecea3b..76b14650 100644 --- a/scripts/link-in-app.ts +++ b/scripts/link-in-app.ts @@ -37,6 +37,8 @@ fs.writeFileSync( ) ); +fs.cpSync(pathJoin(rootDirPath, "src"), pathJoin(rootDirPath, "dist", "src"), { "recursive": true }); + const commonThirdPartyDeps = (() => { // For example [ "@emotion" ] it's more convenient than // having to list every sub emotion packages (@emotion/css @emotion/utils ...) diff --git a/src/bin/eject-keycloak-page.ts b/src/bin/eject-keycloak-page.ts index f58cc598..1376a13a 100644 --- a/src/bin/eject-keycloak-page.ts +++ b/src/bin/eject-keycloak-page.ts @@ -20,7 +20,7 @@ import { kebabCaseToCamelCase } from "./tools/kebabCaseToSnakeCase"; process.exit(-1); }); - const pageBasename = `${capitalize(kebabCaseToCamelCase(pageId))}.tsx`; + const pageBasename = capitalize(kebabCaseToCamelCase(pageId)).replace(/ftl$/, "tsx"); console.log(pageId); diff --git a/src/pages/IdpReviewUserProfile.tsx b/src/pages/IdpReviewUserProfile.tsx index a69792b6..4cb5df0f 100644 --- a/src/pages/IdpReviewUserProfile.tsx +++ b/src/pages/IdpReviewUserProfile.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { clsx } from "keycloakify/tools/clsx"; -import { UserProfileFormFields } from "./shared/UserProfileCommons"; +import { UserProfileFormFields } from "keycloakify/pages/shared/UserProfileCommons"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; import type { KcContext } from "../kcContext"; diff --git a/src/pages/Info.tsx b/src/pages/Info.tsx index aaee4498..9ff0a4f9 100644 --- a/src/pages/Info.tsx +++ b/src/pages/Info.tsx @@ -1,4 +1,4 @@ -import { assert } from "../tools/assert"; +import { assert } from "keycloakify/tools/assert"; import { type PageProps } from "keycloakify/pages/PageProps"; import type { KcContext } from "../kcContext"; import type { I18n } from "../i18n"; diff --git a/src/pages/LoginOtp.tsx b/src/pages/LoginOtp.tsx index 513fffce..af9e74e9 100644 --- a/src/pages/LoginOtp.tsx +++ b/src/pages/LoginOtp.tsx @@ -1,6 +1,6 @@ import { useEffect } from "react"; -import { headInsert } from "../tools/headInsert"; -import { pathJoin } from "../bin/tools/pathJoin"; +import { headInsert } from "keycloakify/tools/headInsert"; +import { pathJoin } from "keycloakify/bin/tools/pathJoin"; import { clsx } from "keycloakify/tools/clsx"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; diff --git a/src/pages/LoginPassword.tsx b/src/pages/LoginPassword.tsx index 0c66b3fc..25a29398 100644 --- a/src/pages/LoginPassword.tsx +++ b/src/pages/LoginPassword.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { clsx } from "keycloakify/tools/clsx"; -import { useConstCallback } from "../tools/useConstCallback"; +import { useConstCallback } from "keycloakify/tools/useConstCallback"; import type { FormEventHandler } from "react"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; diff --git a/src/pages/LoginUsername.tsx b/src/pages/LoginUsername.tsx index 01365137..95668642 100644 --- a/src/pages/LoginUsername.tsx +++ b/src/pages/LoginUsername.tsx @@ -1,7 +1,7 @@ +import type { FormEventHandler } from "react"; import { useState } from "react"; import { clsx } from "keycloakify/tools/clsx"; -import { useConstCallback } from "../tools/useConstCallback"; -import type { FormEventHandler } from "react"; +import { useConstCallback } from "keycloakify/tools/useConstCallback"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; import type { KcContext } from "../kcContext"; diff --git a/src/pages/UpdateUserProfile.tsx b/src/pages/UpdateUserProfile.tsx index 8fc2855e..7cc4c696 100644 --- a/src/pages/UpdateUserProfile.tsx +++ b/src/pages/UpdateUserProfile.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { clsx } from "keycloakify/tools/clsx"; -import { UserProfileFormFields } from "./shared/UserProfileCommons"; +import { UserProfileFormFields } from "keycloakify/pages/shared/UserProfileCommons"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; import type { KcContext } from "../kcContext"; diff --git a/src/pages/WebauthnAuthenticate.tsx b/src/pages/WebauthnAuthenticate.tsx index 2bf96911..1ea771c6 100644 --- a/src/pages/WebauthnAuthenticate.tsx +++ b/src/pages/WebauthnAuthenticate.tsx @@ -2,7 +2,7 @@ import { useRef, useState } from "react"; import { clsx } from "keycloakify/tools/clsx"; import type { MessageKey } from "../i18n/i18n"; import { base64url } from "rfc4648"; -import { useConstCallback } from "../tools/useConstCallback"; +import { useConstCallback } from "keycloakify/tools/useConstCallback"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; import type { KcContext } from "../kcContext";