keycloakify 10.0.0-rc.0 → 10.0.0-rc.10
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/PUBLIC_URL.js +1 -1
- package/PUBLIC_URL.js.map +1 -1
- package/account/Fallback.js +3 -0
- package/account/Fallback.js.map +1 -1
- package/account/Template.js +2 -2
- package/account/Template.js.map +1 -1
- package/account/i18n/baseMessages/index.js.map +1 -1
- package/account/i18n/i18n.d.ts +3 -4
- package/account/i18n/i18n.js +3 -4
- package/account/i18n/i18n.js.map +1 -1
- package/account/index.d.ts +1 -1
- package/account/kcContext/KcContext.d.ts +62 -59
- package/account/kcContext/KcContext.js.map +1 -1
- package/account/kcContext/createGetKcContext.d.ts +3 -3
- package/account/kcContext/createGetKcContext.js.map +1 -1
- package/account/kcContext/getKcContextFromWindow.js +1 -1
- package/account/kcContext/getKcContextFromWindow.js.map +1 -1
- package/account/kcContext/kcContextMocks.js +22 -14
- package/account/kcContext/kcContextMocks.js.map +1 -1
- package/account/pages/Account.js +1 -1
- package/account/pages/Account.js.map +1 -1
- package/account/pages/Applications.js +3 -3
- package/account/pages/Applications.js.map +1 -1
- package/account/pages/FederatedIdentity.d.ts +7 -0
- package/account/pages/FederatedIdentity.js +8 -0
- package/account/pages/FederatedIdentity.js.map +1 -0
- package/account/pages/Log.js +2 -2
- package/account/pages/Log.js.map +1 -1
- package/account/pages/Password.js +4 -6
- package/account/pages/Password.js.map +1 -1
- package/account/pages/Sessions.js +1 -5
- package/account/pages/Sessions.js.map +1 -1
- package/account/pages/Totp.js +2 -2
- package/account/pages/Totp.js.map +1 -1
- package/bin/main.js +143109 -0
- package/lib/BASE_URL.js.map +1 -1
- package/login/Fallback.js.map +1 -1
- package/login/Template.js +4 -4
- package/login/Template.js.map +1 -1
- package/login/UserProfileFormFields.js +17 -19
- package/login/UserProfileFormFields.js.map +1 -1
- package/login/i18n/baseMessages/index.js.map +1 -1
- package/login/i18n/i18n.d.ts +3 -4
- package/login/i18n/i18n.js +3 -4
- package/login/i18n/i18n.js.map +1 -1
- package/login/index.d.ts +1 -1
- package/login/kcContext/KcContext.d.ts +1 -0
- package/login/kcContext/KcContext.js.map +1 -1
- package/login/kcContext/createGetKcContext.d.ts +3 -3
- package/login/kcContext/createGetKcContext.js.map +1 -1
- package/login/kcContext/getKcContextFromWindow.js +1 -1
- package/login/kcContext/getKcContextFromWindow.js.map +1 -1
- package/login/kcContext/kcContextMocks.js +3 -2
- package/login/kcContext/kcContextMocks.js.map +1 -1
- package/login/lib/useDownloadTerms.js.map +1 -1
- package/login/lib/useUserProfileForm.js +9 -9
- package/login/lib/useUserProfileForm.js.map +1 -1
- package/login/pages/Code.js +1 -1
- package/login/pages/Code.js.map +1 -1
- package/login/pages/DeleteAccountConfirm.js +1 -1
- package/login/pages/DeleteAccountConfirm.js.map +1 -1
- package/login/pages/DeleteCredential.js +1 -1
- package/login/pages/DeleteCredential.js.map +1 -1
- package/login/pages/Error.js +1 -1
- package/login/pages/Error.js.map +1 -1
- package/login/pages/FrontchannelLogout.js +1 -1
- package/login/pages/FrontchannelLogout.js.map +1 -1
- package/login/pages/IdpReviewUserProfile.js +1 -1
- package/login/pages/IdpReviewUserProfile.js.map +1 -1
- package/login/pages/Info.js +5 -5
- package/login/pages/Info.js.map +1 -1
- package/login/pages/Login.js +4 -4
- package/login/pages/Login.js.map +1 -1
- package/login/pages/LoginConfigTotp.js +2 -10
- package/login/pages/LoginConfigTotp.js.map +1 -1
- package/login/pages/LoginIdpLinkConfirm.js +1 -1
- package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
- package/login/pages/LoginIdpLinkEmail.js +1 -1
- package/login/pages/LoginIdpLinkEmail.js.map +1 -1
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js +1 -1
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js.map +1 -1
- package/login/pages/LoginOauthGrant.js +2 -2
- package/login/pages/LoginOauthGrant.js.map +1 -1
- package/login/pages/LoginOtp.js +1 -1
- package/login/pages/LoginOtp.js.map +1 -1
- package/login/pages/LoginPageExpired.js +1 -1
- package/login/pages/LoginPageExpired.js.map +1 -1
- package/login/pages/LoginPassword.js +3 -3
- package/login/pages/LoginPassword.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeConfig.js +3 -3
- package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeInput.js +1 -1
- package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
- package/login/pages/LoginResetOtp.js +1 -1
- package/login/pages/LoginResetOtp.js.map +1 -1
- package/login/pages/LoginResetPassword.js +2 -2
- package/login/pages/LoginResetPassword.js.map +1 -1
- package/login/pages/LoginUpdatePassword.js +3 -3
- package/login/pages/LoginUpdatePassword.js.map +1 -1
- package/login/pages/LoginUpdateProfile.js +2 -4
- package/login/pages/LoginUpdateProfile.js.map +1 -1
- package/login/pages/LoginUsername.js +3 -3
- package/login/pages/LoginUsername.js.map +1 -1
- package/login/pages/LoginVerifyEmail.js +1 -1
- package/login/pages/LoginVerifyEmail.js.map +1 -1
- package/login/pages/LoginX509Info.js +1 -1
- package/login/pages/LoginX509Info.js.map +1 -1
- package/login/pages/LogoutConfirm.js +1 -1
- package/login/pages/LogoutConfirm.js.map +1 -1
- package/login/pages/Register.js +4 -8
- package/login/pages/Register.js.map +1 -1
- package/login/pages/SamlPostForm.js +1 -1
- package/login/pages/SamlPostForm.js.map +1 -1
- package/login/pages/SelectAuthenticator.js +2 -2
- package/login/pages/SelectAuthenticator.js.map +1 -1
- package/login/pages/Terms.js +1 -1
- package/login/pages/Terms.js.map +1 -1
- package/login/pages/UpdateEmail.js +3 -5
- package/login/pages/UpdateEmail.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.js +6 -6
- package/login/pages/WebauthnAuthenticate.js.map +1 -1
- package/login/pages/WebauthnError.js +2 -2
- package/login/pages/WebauthnError.js.map +1 -1
- package/login/pages/WebauthnRegister.js +3 -3
- package/login/pages/WebauthnRegister.js.map +1 -1
- package/package.json +62 -509
- package/src/PUBLIC_URL.ts +1 -1
- package/src/account/Fallback.tsx +3 -0
- package/src/account/Template.tsx +2 -5
- package/src/account/i18n/i18n.tsx +5 -8
- package/src/account/index.ts +1 -1
- package/src/account/kcContext/KcContext.ts +72 -62
- package/src/account/kcContext/getKcContextFromWindow.ts +1 -1
- package/src/account/kcContext/kcContextMocks.ts +21 -15
- package/src/account/pages/Applications.tsx +2 -2
- package/src/account/pages/FederatedIdentity.tsx +58 -0
- package/src/account/pages/Log.tsx +1 -1
- package/src/account/pages/Sessions.tsx +0 -3
- package/src/account/pages/Totp.tsx +20 -21
- package/src/bin/copy-keycloak-resources-to-public.ts +10 -106
- package/src/bin/download-builtin-keycloak-theme.ts +14 -274
- package/src/bin/eject-keycloak-page.ts +81 -19
- package/src/bin/initialize-email-theme.ts +22 -21
- package/src/bin/keycloakify/buildJars/buildJar.ts +27 -20
- package/src/bin/keycloakify/buildJars/buildJars.ts +14 -15
- package/src/bin/keycloakify/buildJars/generatePom.ts +4 -4
- package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +45 -18
- package/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +162 -234
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +7 -4
- package/src/bin/keycloakify/generateFtl/index.ts +0 -1
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/bringInAccountV1.ts +8 -7
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/generateMessageProperties.ts +1 -1
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +32 -0
- package/src/bin/keycloakify/{generateTheme/generateSrcMainResources.ts → generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts} +40 -46
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +56 -0
- package/src/bin/keycloakify/generateSrcMainResources/index.ts +1 -0
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/readExtraPageNames.ts +1 -2
- package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/readFieldNameUsage.ts +5 -6
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +14 -15
- package/src/bin/keycloakify/index.ts +0 -7
- package/src/bin/keycloakify/keycloakify.ts +50 -67
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +2 -2
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +2 -2
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +1 -1
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +2 -2
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +2 -2
- package/src/bin/main.ts +175 -0
- package/src/bin/shared/KeycloakVersionRange.ts +7 -0
- package/src/bin/{keycloakify/buildOptions → shared}/buildOptions.ts +113 -25
- package/src/bin/{keycloakify/generateFtl/pageId.ts → shared/constants.ts} +25 -1
- package/src/bin/shared/copyKeycloakResourcesToPublic.ts +90 -0
- package/src/bin/{downloadAndUnzip.ts → shared/downloadAndUnzip.ts} +6 -6
- package/src/bin/shared/downloadBuiltinKeycloakTheme.ts +264 -0
- package/src/bin/{keycloakify/generateTheme → shared}/downloadKeycloakStaticResources.ts +8 -8
- package/src/bin/shared/getJarFileBasename.ts +9 -0
- package/src/bin/{getThemeSrcDirPath.ts → shared/getThemeSrcDirPath.ts} +1 -1
- package/src/bin/shared/metaInfKeycloakThemes.ts +34 -0
- package/src/bin/shared/promptKeycloakVersion.ts +106 -0
- package/src/bin/start-keycloak.ts +236 -0
- package/src/bin/tools/fs.rmSync.ts +4 -4
- package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +8 -1
- package/src/bin/{keycloakify/buildOptions → tools}/getNpmWorkspaceRootDirPath.ts +1 -23
- package/src/bin/tools/{readThisNpmProjectVersion.ts → readThisNpmPackageVersion.ts} +1 -1
- package/src/login/Template.tsx +6 -22
- package/src/login/UserProfileFormFields.tsx +2 -5
- package/src/login/i18n/i18n.tsx +5 -8
- package/src/login/index.ts +1 -1
- package/src/login/kcContext/KcContext.ts +2 -2
- package/src/login/kcContext/getKcContextFromWindow.ts +1 -1
- package/src/login/kcContext/kcContextMocks.ts +3 -3
- package/src/login/lib/useUserProfileForm.tsx +10 -10
- package/src/login/pages/Code.tsx +1 -1
- package/src/login/pages/IdpReviewUserProfile.tsx +1 -1
- package/src/login/pages/Login.tsx +1 -1
- package/src/login/pages/LoginConfigTotp.tsx +1 -9
- package/src/login/pages/LoginUpdateProfile.tsx +1 -1
- package/src/login/pages/LoginUsername.tsx +1 -1
- package/src/login/pages/Register.tsx +2 -2
- package/src/login/pages/UpdateEmail.tsx +1 -1
- package/src/login/pages/WebauthnRegister.tsx +1 -1
- package/src/vite-plugin/tsconfig.json +2 -1
- package/src/vite-plugin/vite-plugin.ts +29 -41
- package/tools/Array.prototype.every.js.map +1 -1
- package/tools/HTMLElement.prototype.prepend.js.map +1 -1
- package/tools/clsx.js.map +1 -1
- package/tools/deepAssign.js.map +1 -1
- package/tools/deepClone.js.map +1 -1
- package/tools/formatNumber.js.map +1 -1
- package/tools/memoize.js.map +1 -1
- package/tools/useInsertLinkTags.js.map +1 -1
- package/tools/useInsertScriptTags.js.map +1 -1
- package/tools/useSetClassName.js.map +1 -1
- package/bin/constants.d.ts +0 -10
- package/bin/constants.js +0 -13
- package/bin/constants.js.map +0 -1
- package/bin/copy-keycloak-resources-to-public.d.ts +0 -14
- package/bin/copy-keycloak-resources-to-public.js +0 -216
- package/bin/copy-keycloak-resources-to-public.js.map +0 -1
- package/bin/download-builtin-keycloak-theme.d.ts +0 -10
- package/bin/download-builtin-keycloak-theme.js +0 -352
- package/bin/download-builtin-keycloak-theme.js.map +0 -1
- package/bin/downloadAndUnzip.d.ts +0 -16
- package/bin/downloadAndUnzip.js +0 -255
- package/bin/downloadAndUnzip.js.map +0 -1
- package/bin/eject-keycloak-page.d.ts +0 -2
- package/bin/eject-keycloak-page.js +0 -132
- package/bin/eject-keycloak-page.js.map +0 -1
- package/bin/getThemeSrcDirPath.d.ts +0 -6
- package/bin/getThemeSrcDirPath.js +0 -123
- package/bin/getThemeSrcDirPath.js.map +0 -1
- package/bin/initialize-email-theme.d.ts +0 -2
- package/bin/initialize-email-theme.js +0 -121
- package/bin/initialize-email-theme.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJar.d.ts +0 -14
- package/bin/keycloakify/buildJars/buildJar.js +0 -216
- package/bin/keycloakify/buildJars/buildJar.js.map +0 -1
- package/bin/keycloakify/buildJars/buildJars.d.ts +0 -10
- package/bin/keycloakify/buildJars/buildJars.js +0 -95
- package/bin/keycloakify/buildJars/buildJars.js.map +0 -1
- package/bin/keycloakify/buildJars/extensionVersions.d.ts +0 -12
- package/bin/keycloakify/buildJars/extensionVersions.js +0 -7
- package/bin/keycloakify/buildJars/extensionVersions.js.map +0 -1
- package/bin/keycloakify/buildJars/generatePom.d.ts +0 -13
- package/bin/keycloakify/buildJars/generatePom.js +0 -94
- package/bin/keycloakify/buildJars/generatePom.js.map +0 -1
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.d.ts +0 -6
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js +0 -35
- package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js.map +0 -1
- package/bin/keycloakify/buildJars/index.d.ts +0 -1
- package/bin/keycloakify/buildJars/index.js +0 -18
- package/bin/keycloakify/buildJars/index.js.map +0 -1
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.d.ts +0 -35
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js +0 -14
- package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js.map +0 -1
- package/bin/keycloakify/buildOptions/buildOptions.d.ts +0 -25
- package/bin/keycloakify/buildOptions/buildOptions.js +0 -178
- package/bin/keycloakify/buildOptions/buildOptions.js.map +0 -1
- package/bin/keycloakify/buildOptions/getCacheDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getCacheDirPath.js +0 -22
- package/bin/keycloakify/buildOptions/getCacheDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js +0 -86
- package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.d.ts +0 -5
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js +0 -26
- package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js.map +0 -1
- package/bin/keycloakify/buildOptions/index.d.ts +0 -1
- package/bin/keycloakify/buildOptions/index.js +0 -18
- package/bin/keycloakify/buildOptions/index.js.map +0 -1
- package/bin/keycloakify/buildOptions/parsedPackageJson.d.ts +0 -10
- package/bin/keycloakify/buildOptions/parsedPackageJson.js +0 -49
- package/bin/keycloakify/buildOptions/parsedPackageJson.js.map +0 -1
- package/bin/keycloakify/buildOptions/resolvedViteConfig.d.ts +0 -13
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js +0 -77
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js.map +0 -1
- package/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +0 -593
- package/bin/keycloakify/generateFtl/generateFtl.d.ts +0 -23
- package/bin/keycloakify/generateFtl/generateFtl.js +0 -169
- package/bin/keycloakify/generateFtl/generateFtl.js.map +0 -1
- package/bin/keycloakify/generateFtl/index.d.ts +0 -2
- package/bin/keycloakify/generateFtl/index.js +0 -19
- package/bin/keycloakify/generateFtl/index.js.map +0 -1
- package/bin/keycloakify/generateFtl/pageId.d.ts +0 -4
- package/bin/keycloakify/generateFtl/pageId.js +0 -41
- package/bin/keycloakify/generateFtl/pageId.js.map +0 -1
- package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +0 -11
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js +0 -89
- package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +0 -1
- package/bin/keycloakify/generateTheme/bringInAccountV1.d.ts +0 -9
- package/bin/keycloakify/generateTheme/bringInAccountV1.js +0 -153
- package/bin/keycloakify/generateTheme/bringInAccountV1.js.map +0 -1
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.d.ts +0 -11
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js +0 -102
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateMessageProperties.d.ts +0 -8
- package/bin/keycloakify/generateTheme/generateMessageProperties.js +0 -271
- package/bin/keycloakify/generateTheme/generateMessageProperties.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateSrcMainResources.d.ts +0 -21
- package/bin/keycloakify/generateTheme/generateSrcMainResources.js +0 -340
- package/bin/keycloakify/generateTheme/generateSrcMainResources.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateTheme.d.ts +0 -13
- package/bin/keycloakify/generateTheme/generateTheme.js +0 -115
- package/bin/keycloakify/generateTheme/generateTheme.js.map +0 -1
- package/bin/keycloakify/generateTheme/generateThemeVariants.d.ts +0 -5
- package/bin/keycloakify/generateTheme/generateThemeVariants.js +0 -67
- package/bin/keycloakify/generateTheme/generateThemeVariants.js.map +0 -1
- package/bin/keycloakify/generateTheme/index.d.ts +0 -1
- package/bin/keycloakify/generateTheme/index.js +0 -18
- package/bin/keycloakify/generateTheme/index.js.map +0 -1
- package/bin/keycloakify/generateTheme/readExtraPageNames.d.ts +0 -5
- package/bin/keycloakify/generateTheme/readExtraPageNames.js +0 -105
- package/bin/keycloakify/generateTheme/readExtraPageNames.js.map +0 -1
- package/bin/keycloakify/generateTheme/readFieldNameUsage.d.ts +0 -7
- package/bin/keycloakify/generateTheme/readFieldNameUsage.js +0 -142
- package/bin/keycloakify/generateTheme/readFieldNameUsage.js.map +0 -1
- package/bin/keycloakify/index.d.ts +0 -2
- package/bin/keycloakify/index.js +0 -23
- package/bin/keycloakify/index.js.map +0 -1
- package/bin/keycloakify/keycloakify.d.ts +0 -1
- package/bin/keycloakify/keycloakify.js +0 -166
- package/bin/keycloakify/keycloakify.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInCssCode.d.ts +0 -15
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js +0 -88
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.d.ts +0 -9
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +0 -38
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +0 -18
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +0 -70
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +0 -13
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +0 -95
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +0 -12
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +0 -103
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +0 -1
- package/bin/promptKeycloakVersion.d.ts +0 -3
- package/bin/promptKeycloakVersion.js +0 -121
- package/bin/promptKeycloakVersion.js.map +0 -1
- package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
- package/bin/tools/OptionalIfCanBeUndefined.js +0 -3
- package/bin/tools/OptionalIfCanBeUndefined.js.map +0 -1
- package/bin/tools/SemVer.d.ts +0 -26
- package/bin/tools/SemVer.js +0 -119
- package/bin/tools/SemVer.js.map +0 -1
- package/bin/tools/String.prototype.replaceAll.d.ts +0 -1
- package/bin/tools/String.prototype.replaceAll.js +0 -29
- package/bin/tools/String.prototype.replaceAll.js.map +0 -1
- package/bin/tools/crawl.d.ts +0 -5
- package/bin/tools/crawl.js +0 -74
- package/bin/tools/crawl.js.map +0 -1
- package/bin/tools/crc32.d.ts +0 -9
- package/bin/tools/crc32.js +0 -64
- package/bin/tools/crc32.js.map +0 -1
- package/bin/tools/deflate.d.ts +0 -24
- package/bin/tools/deflate.js +0 -155
- package/bin/tools/deflate.js.map +0 -1
- package/bin/tools/fetchProxyOptions.d.ts +0 -5
- package/bin/tools/fetchProxyOptions.js +0 -172
- package/bin/tools/fetchProxyOptions.js.map +0 -1
- package/bin/tools/fs.existsAsync.d.ts +0 -1
- package/bin/tools/fs.existsAsync.js +0 -86
- package/bin/tools/fs.existsAsync.js.map +0 -1
- package/bin/tools/fs.rm.d.ts +0 -8
- package/bin/tools/fs.rm.js +0 -151
- package/bin/tools/fs.rm.js.map +0 -1
- package/bin/tools/fs.rmSync.d.ts +0 -8
- package/bin/tools/fs.rmSync.js +0 -58
- package/bin/tools/fs.rmSync.js.map +0 -1
- package/bin/tools/getAbsoluteAndInOsFormatPath.d.ts +0 -4
- package/bin/tools/getAbsoluteAndInOsFormatPath.js +0 -16
- package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.d.ts +0 -1
- package/bin/tools/getThisCodebaseRootDirPath.js +0 -43
- package/bin/tools/getThisCodebaseRootDirPath.js.map +0 -1
- package/bin/tools/grant-exec-perms.d.ts +0 -1
- package/bin/tools/grant-exec-perms.js +0 -100
- package/bin/tools/grant-exec-perms.js.map +0 -1
- package/bin/tools/isInside.d.ts +0 -4
- package/bin/tools/isInside.js +0 -10
- package/bin/tools/isInside.js.map +0 -1
- package/bin/tools/kebabCaseToSnakeCase.d.ts +0 -1
- package/bin/tools/kebabCaseToSnakeCase.js +0 -35
- package/bin/tools/kebabCaseToSnakeCase.js.map +0 -1
- package/bin/tools/logger.d.ts +0 -12
- package/bin/tools/logger.js +0 -23
- package/bin/tools/logger.js.map +0 -1
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -14
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +0 -119
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +0 -1
- package/bin/tools/octokit-addons/listTags.d.ts +0 -13
- package/bin/tools/octokit-addons/listTags.js +0 -154
- package/bin/tools/octokit-addons/listTags.js.map +0 -1
- package/bin/tools/partitionPromiseSettledResults.d.ts +0 -2
- package/bin/tools/partitionPromiseSettledResults.js +0 -41
- package/bin/tools/partitionPromiseSettledResults.js.map +0 -1
- package/bin/tools/readThisNpmProjectVersion.d.ts +0 -1
- package/bin/tools/readThisNpmProjectVersion.js +0 -37
- package/bin/tools/readThisNpmProjectVersion.js.map +0 -1
- package/bin/tools/tee.d.ts +0 -3
- package/bin/tools/tee.js +0 -37
- package/bin/tools/tee.js.map +0 -1
- package/bin/tools/transformCodebase.d.ts +0 -20
- package/bin/tools/transformCodebase.js +0 -97
- package/bin/tools/transformCodebase.js.map +0 -1
- package/bin/tools/trimIndent.d.ts +0 -5
- package/bin/tools/trimIndent.js +0 -82
- package/bin/tools/trimIndent.js.map +0 -1
- package/bin/tools/unzip.d.ts +0 -2
- package/bin/tools/unzip.js +0 -274
- package/bin/tools/unzip.js.map +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -2
- package/index.js.map +0 -1
- package/lib/keycloakJsAdapter.d.ts +0 -51
- package/lib/keycloakJsAdapter.js +0 -74
- package/lib/keycloakJsAdapter.js.map +0 -1
- package/src/bin/constants.ts +0 -13
- package/src/bin/keycloakify/buildOptions/UserProvidedBuildOptions.ts +0 -21
- package/src/bin/keycloakify/buildOptions/getCacheDirPath.ts +0 -25
- package/src/bin/keycloakify/buildOptions/getReactAppRootDirPath.ts +0 -23
- package/src/bin/keycloakify/buildOptions/index.ts +0 -1
- package/src/bin/keycloakify/buildOptions/parsedPackageJson.ts +0 -32
- package/src/bin/keycloakify/buildOptions/resolvedViteConfig.ts +0 -74
- package/src/bin/keycloakify/generateTheme/generateTheme.ts +0 -44
- package/src/bin/keycloakify/generateTheme/generateThemeVariants.ts +0 -50
- package/src/bin/keycloakify/generateTheme/index.ts +0 -1
- package/src/bin/promptKeycloakVersion.ts +0 -49
- package/src/bin/tools/grant-exec-perms.ts +0 -19
- package/src/bin/tools/logger.ts +0 -27
- package/src/index.ts +0 -1
- package/src/lib/keycloakJsAdapter.ts +0 -118
- package/vite-plugin/index.d.ts +0 -1
- package/vite-plugin/index.js +0 -18
- package/vite-plugin/index.js.map +0 -1
- package/vite-plugin/tsconfig.tsbuildinfo +0 -1
- package/vite-plugin/vite-plugin.d.ts +0 -6
- package/vite-plugin/vite-plugin.js +0 -158
- package/vite-plugin/vite-plugin.js.map +0 -1
@@ -1,593 +0,0 @@
|
|
1
|
-
<script>const _=
|
2
|
-
<#assign pageId="PAGE_ID_xIgLsPgGId9D8e">
|
3
|
-
(()=>{
|
4
|
-
|
5
|
-
const out = ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
|
6
|
-
|
7
|
-
out["msg"]= function(){ throw new Error("use import { useKcMessage } from 'keycloakify'"); };
|
8
|
-
out["advancedMsg"]= function(){ throw new Error("use import { useKcMessage } from 'keycloakify'"); };
|
9
|
-
|
10
|
-
out["messagesPerField"]= {
|
11
|
-
<#assign fieldNames = [ FIELD_NAMES_eKsIY4ZsZ4xeM ]>
|
12
|
-
|
13
|
-
<#attempt>
|
14
|
-
<#if profile?? && profile.attributes?? && profile.attributes?is_enumerable>
|
15
|
-
<#list profile.attributes as attribute>
|
16
|
-
<#if fieldNames?seq_contains(attribute.name)>
|
17
|
-
<#continue>
|
18
|
-
</#if>
|
19
|
-
<#assign fieldNames += [attribute.name]>
|
20
|
-
</#list>
|
21
|
-
</#if>
|
22
|
-
<#recover>
|
23
|
-
</#attempt>
|
24
|
-
|
25
|
-
"printIfExists": function (fieldName, text) {
|
26
|
-
|
27
|
-
<#if !messagesPerField?? || !(messagesPerField?is_hash)>
|
28
|
-
throw new Error("You're not supposed to use messagesPerField.printIfExists in this page");
|
29
|
-
<#else>
|
30
|
-
<#list fieldNames as fieldName>
|
31
|
-
if(fieldName === "${fieldName}" ){
|
32
|
-
|
33
|
-
<#-- https://github.com/keycloakify/keycloakify/pull/218 -->
|
34
|
-
<#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
|
35
|
-
|
36
|
-
<#assign doExistErrorOnUsernameOrPassword = "">
|
37
|
-
|
38
|
-
<#attempt>
|
39
|
-
<#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
|
40
|
-
<#recover>
|
41
|
-
<#assign doExistErrorOnUsernameOrPassword = true>
|
42
|
-
</#attempt>
|
43
|
-
|
44
|
-
<#if doExistErrorOnUsernameOrPassword>
|
45
|
-
return text;
|
46
|
-
<#else>
|
47
|
-
|
48
|
-
<#assign doExistMessageForField = "">
|
49
|
-
|
50
|
-
<#attempt>
|
51
|
-
<#assign doExistMessageForField = messagesPerField.exists('${fieldName}')>
|
52
|
-
<#recover>
|
53
|
-
<#assign doExistMessageForField = true>
|
54
|
-
</#attempt>
|
55
|
-
|
56
|
-
return <#if doExistMessageForField>text<#else>undefined</#if>;
|
57
|
-
|
58
|
-
</#if>
|
59
|
-
|
60
|
-
<#else>
|
61
|
-
|
62
|
-
<#assign doExistMessageForField = "">
|
63
|
-
|
64
|
-
<#attempt>
|
65
|
-
<#assign doExistMessageForField = messagesPerField.exists('${fieldName}')>
|
66
|
-
<#recover>
|
67
|
-
<#assign doExistMessageForField = true>
|
68
|
-
</#attempt>
|
69
|
-
|
70
|
-
return <#if doExistMessageForField>text<#else>undefined</#if>;
|
71
|
-
|
72
|
-
</#if>
|
73
|
-
|
74
|
-
|
75
|
-
}
|
76
|
-
</#list>
|
77
|
-
|
78
|
-
throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
|
79
|
-
</#if>
|
80
|
-
|
81
|
-
},
|
82
|
-
"existsError": function (){
|
83
|
-
|
84
|
-
function existsError_singleFieldName(fieldName) {
|
85
|
-
|
86
|
-
<#if !messagesPerField?? || !(messagesPerField?is_hash)>
|
87
|
-
throw new Error("You're not supposed to use messagesPerField.printIfExists in this page");
|
88
|
-
<#else>
|
89
|
-
<#list fieldNames as fieldName>
|
90
|
-
if(fieldName === "${fieldName}" ){
|
91
|
-
|
92
|
-
<#-- https://github.com/keycloakify/keycloakify/pull/218 -->
|
93
|
-
<#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
|
94
|
-
|
95
|
-
<#assign doExistErrorOnUsernameOrPassword = "">
|
96
|
-
|
97
|
-
<#attempt>
|
98
|
-
<#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
|
99
|
-
<#recover>
|
100
|
-
<#assign doExistErrorOnUsernameOrPassword = true>
|
101
|
-
</#attempt>
|
102
|
-
|
103
|
-
return <#if doExistErrorOnUsernameOrPassword>true<#else>false</#if>;
|
104
|
-
|
105
|
-
<#else>
|
106
|
-
|
107
|
-
<#assign doExistErrorMessageForField = "">
|
108
|
-
|
109
|
-
<#attempt>
|
110
|
-
<#assign doExistErrorMessageForField = messagesPerField.existsError('${fieldName}')>
|
111
|
-
<#recover>
|
112
|
-
<#assign doExistErrorMessageForField = true>
|
113
|
-
</#attempt>
|
114
|
-
|
115
|
-
return <#if doExistErrorMessageForField>true<#else>false</#if>;
|
116
|
-
|
117
|
-
</#if>
|
118
|
-
|
119
|
-
}
|
120
|
-
</#list>
|
121
|
-
|
122
|
-
throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
|
123
|
-
|
124
|
-
</#if>
|
125
|
-
|
126
|
-
}
|
127
|
-
|
128
|
-
for( let i = 0; i < arguments.length; i++ ){
|
129
|
-
|
130
|
-
if( existsError_singleFieldName(arguments[i]) ){
|
131
|
-
return true;
|
132
|
-
}
|
133
|
-
|
134
|
-
}
|
135
|
-
|
136
|
-
return false;
|
137
|
-
|
138
|
-
},
|
139
|
-
"get": function (fieldName) {
|
140
|
-
|
141
|
-
|
142
|
-
<#if !messagesPerField?? || !(messagesPerField?is_hash)>
|
143
|
-
throw new Error("You're not supposed to use messagesPerField.get in this page");
|
144
|
-
<#else>
|
145
|
-
<#list fieldNames as fieldName>
|
146
|
-
if(fieldName === "${fieldName}" ){
|
147
|
-
|
148
|
-
<#-- https://github.com/keycloakify/keycloakify/pull/218 -->
|
149
|
-
<#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
|
150
|
-
|
151
|
-
<#assign doExistErrorOnUsernameOrPassword = "">
|
152
|
-
|
153
|
-
<#attempt>
|
154
|
-
<#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
|
155
|
-
<#recover>
|
156
|
-
<#assign doExistErrorOnUsernameOrPassword = true>
|
157
|
-
</#attempt>
|
158
|
-
|
159
|
-
<#if doExistErrorOnUsernameOrPassword>
|
160
|
-
|
161
|
-
<#attempt>
|
162
|
-
return "${kcSanitize(msg('invalidUserMessage'))?no_esc}";
|
163
|
-
<#recover>
|
164
|
-
return "Invalid username or password.";
|
165
|
-
</#attempt>
|
166
|
-
|
167
|
-
<#else>
|
168
|
-
|
169
|
-
<#attempt>
|
170
|
-
return "${messagesPerField.get('${fieldName}')?no_esc}";
|
171
|
-
<#recover>
|
172
|
-
return "";
|
173
|
-
</#attempt>
|
174
|
-
|
175
|
-
</#if>
|
176
|
-
|
177
|
-
<#else>
|
178
|
-
|
179
|
-
<#attempt>
|
180
|
-
return "${messagesPerField.get('${fieldName}')?no_esc}";
|
181
|
-
<#recover>
|
182
|
-
return "invalid field";
|
183
|
-
</#attempt>
|
184
|
-
|
185
|
-
</#if>
|
186
|
-
|
187
|
-
}
|
188
|
-
</#list>
|
189
|
-
|
190
|
-
throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
|
191
|
-
|
192
|
-
</#if>
|
193
|
-
|
194
|
-
},
|
195
|
-
"exists": function (fieldName) {
|
196
|
-
|
197
|
-
<#if !messagesPerField?? || !(messagesPerField?is_hash)>
|
198
|
-
throw new Error("You're not supposed to use messagesPerField.exists in this page");
|
199
|
-
<#else>
|
200
|
-
<#list fieldNames as fieldName>
|
201
|
-
if(fieldName === "${fieldName}" ){
|
202
|
-
|
203
|
-
<#-- https://github.com/keycloakify/keycloakify/pull/218 -->
|
204
|
-
<#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
|
205
|
-
|
206
|
-
<#assign doExistErrorOnUsernameOrPassword = "">
|
207
|
-
|
208
|
-
<#attempt>
|
209
|
-
<#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
|
210
|
-
<#recover>
|
211
|
-
<#assign doExistErrorOnUsernameOrPassword = true>
|
212
|
-
</#attempt>
|
213
|
-
|
214
|
-
return <#if doExistErrorOnUsernameOrPassword>true<#else>false</#if>;
|
215
|
-
|
216
|
-
<#else>
|
217
|
-
|
218
|
-
<#assign doExistErrorMessageForField = "">
|
219
|
-
|
220
|
-
<#attempt>
|
221
|
-
<#assign doExistErrorMessageForField = messagesPerField.exists('${fieldName}')>
|
222
|
-
<#recover>
|
223
|
-
<#assign doExistErrorMessageForField = true>
|
224
|
-
</#attempt>
|
225
|
-
|
226
|
-
return <#if doExistErrorMessageForField>true<#else>false</#if>;
|
227
|
-
|
228
|
-
</#if>
|
229
|
-
|
230
|
-
}
|
231
|
-
</#list>
|
232
|
-
|
233
|
-
throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
|
234
|
-
</#if>
|
235
|
-
|
236
|
-
},
|
237
|
-
"getFirstError": function () {
|
238
|
-
|
239
|
-
for( let i = 0; i < arguments.length; i++ ){
|
240
|
-
|
241
|
-
const fieldName = arguments[i];
|
242
|
-
|
243
|
-
if( out.messagesPerField.existsError(fieldName) ){
|
244
|
-
return out.messagesPerField.get(fieldName);
|
245
|
-
}
|
246
|
-
|
247
|
-
}
|
248
|
-
|
249
|
-
}
|
250
|
-
};
|
251
|
-
|
252
|
-
<#if account??>
|
253
|
-
out["url"]["getLogoutUrl"] = function () {
|
254
|
-
<#attempt>
|
255
|
-
return "${url.getLogoutUrl()}";
|
256
|
-
<#recover>
|
257
|
-
</#attempt>
|
258
|
-
};
|
259
|
-
</#if>
|
260
|
-
|
261
|
-
out["keycloakifyVersion"] = "KEYCLOAKIFY_VERSION_xEdKd3xEdr";
|
262
|
-
out["themeVersion"] = "KEYCLOAKIFY_THEME_VERSION_sIgKd3xEdr3dx";
|
263
|
-
out["themeType"] = "KEYCLOAKIFY_THEME_TYPE_dExKd3xEdr";
|
264
|
-
out["themeName"] = "KEYCLOAKIFY_THEME_NAME_cXxKd3xEer";
|
265
|
-
out["pageId"] = "${pageId}";
|
266
|
-
|
267
|
-
try {
|
268
|
-
|
269
|
-
out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv";
|
270
|
-
|
271
|
-
} catch(error) {
|
272
|
-
|
273
|
-
}
|
274
|
-
|
275
|
-
return out;
|
276
|
-
|
277
|
-
})()
|
278
|
-
<#function ftl_object_to_js_code_declaring_an_object object path>
|
279
|
-
|
280
|
-
<#local isHash = "">
|
281
|
-
<#attempt>
|
282
|
-
<#local isHash = object?is_hash || object?is_hash_ex>
|
283
|
-
<#recover>
|
284
|
-
<#return "ABORT: Can't evaluate if " + path?join(".") + " is hash">
|
285
|
-
</#attempt>
|
286
|
-
|
287
|
-
<#if isHash>
|
288
|
-
|
289
|
-
<#if path?size gt 10>
|
290
|
-
<#return "ABORT: Too many recursive calls, path: " + path?join(".")>
|
291
|
-
</#if>
|
292
|
-
|
293
|
-
<#local keys = "">
|
294
|
-
|
295
|
-
<#attempt>
|
296
|
-
<#local keys = object?keys>
|
297
|
-
<#recover>
|
298
|
-
<#return "ABORT: We can't list keys on this object">
|
299
|
-
</#attempt>
|
300
|
-
|
301
|
-
|
302
|
-
<#local out_seq = []>
|
303
|
-
|
304
|
-
<#list keys as key>
|
305
|
-
|
306
|
-
<#if ["class","declaredConstructors","superclass","declaringClass" ]?seq_contains(key) >
|
307
|
-
<#continue>
|
308
|
-
</#if>
|
309
|
-
|
310
|
-
<#if
|
311
|
-
(
|
312
|
-
["loginUpdatePasswordUrl", "loginUpdateProfileUrl", "loginUsernameReminderUrl", "loginUpdateTotpUrl"]?seq_contains(key) &&
|
313
|
-
are_same_path(path, ["url"])
|
314
|
-
) || (
|
315
|
-
key == "updateProfileCtx" &&
|
316
|
-
are_same_path(path, [])
|
317
|
-
) || (
|
318
|
-
<#-- https://github.com/keycloakify/keycloakify/pull/65#issuecomment-991896344 (reports with saml-post-form.ftl) -->
|
319
|
-
<#-- https://github.com/keycloakify/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
|
320
|
-
<#-- https://github.com/keycloakify/keycloakify/issues/109#issuecomment-1134610163 -->
|
321
|
-
<#-- https://github.com/keycloakify/keycloakify/issues/357 -->
|
322
|
-
<#-- https://github.com/keycloakify/keycloakify/discussions/406#discussioncomment-7514787 -->
|
323
|
-
key == "loginAction" &&
|
324
|
-
are_same_path(path, ["url"]) &&
|
325
|
-
["saml-post-form.ftl", "error.ftl", "info.ftl", "login-oauth-grant.ftl", "logout-confirm.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
|
326
|
-
!(auth?has_content && auth.showTryAnotherWayLink())
|
327
|
-
) || (
|
328
|
-
<#-- https://github.com/keycloakify/keycloakify/issues/362 -->
|
329
|
-
["secretData", "value"]?seq_contains(key) &&
|
330
|
-
are_same_path(path, [ "totp", "otpCredentials", "*" ])
|
331
|
-
) || (
|
332
|
-
["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) &&
|
333
|
-
are_same_path(path, ["brokerContext"]) &&
|
334
|
-
["login-idp-link-confirm.ftl", "login-idp-link-email.ftl" ]?seq_contains(pageId)
|
335
|
-
) || (
|
336
|
-
key == "identityProviderBrokerCtx" &&
|
337
|
-
are_same_path(path, []) &&
|
338
|
-
["login-idp-link-confirm.ftl", "login-idp-link-email.ftl" ]?seq_contains(pageId)
|
339
|
-
) || (
|
340
|
-
["masterAdminClient", "delegateForUpdate", "defaultRole"]?seq_contains(key) &&
|
341
|
-
are_same_path(path, ["realm"])
|
342
|
-
) || (
|
343
|
-
"error.ftl" == pageId &&
|
344
|
-
are_same_path(path, ["realm"]) &&
|
345
|
-
!["name", "displayName", "displayNameHtml", "internationalizationEnabled", "registrationEmailAsUsername" ]?seq_contains(key)
|
346
|
-
) || (
|
347
|
-
"applications.ftl" == pageId &&
|
348
|
-
is_subpath(path, ["applications", "applications"]) &&
|
349
|
-
(
|
350
|
-
key == "realm" ||
|
351
|
-
key == "container"
|
352
|
-
)
|
353
|
-
) || (
|
354
|
-
are_same_path(path, ["user"]) &&
|
355
|
-
key == "delegateForUpdate"
|
356
|
-
) || (
|
357
|
-
<#-- Security audit forwarded by Garth (Gmail) -->
|
358
|
-
are_same_path(path, ["client", "attributes"]) &&
|
359
|
-
key == "saml.signing.private.key"
|
360
|
-
) || (
|
361
|
-
<#-- See: https://github.com/keycloakify/keycloakify/issues/534 -->
|
362
|
-
are_same_path(path, ["login"]) &&
|
363
|
-
key == "password"
|
364
|
-
) || (
|
365
|
-
<#-- Remove realmAttributes added by https://github.com/jcputney/keycloak-theme-additional-info-extension for peace of mind. -->
|
366
|
-
are_same_path(path, []) &&
|
367
|
-
key == "realmAttributes"
|
368
|
-
)
|
369
|
-
>
|
370
|
-
<#local out_seq += ["/*If you need '" + path?join(".") + "." + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
|
371
|
-
<#continue>
|
372
|
-
</#if>
|
373
|
-
|
374
|
-
<#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
|
375
|
-
<#if (
|
376
|
-
["register.ftl", "info.ftl", "login.ftl", "login-update-password.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
|
377
|
-
key == "attemptedUsername" && are_same_path(path, ["auth"])
|
378
|
-
)>
|
379
|
-
<#attempt>
|
380
|
-
<#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
|
381
|
-
<#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
|
382
|
-
<#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
|
383
|
-
<#continue>
|
384
|
-
</#if>
|
385
|
-
<#recover>
|
386
|
-
<#local out_seq += ["/*Testing if attemptedUsername should be skipped throwed an exception */"]>
|
387
|
-
</#attempt>
|
388
|
-
</#if>
|
389
|
-
|
390
|
-
<#attempt>
|
391
|
-
<#if !object[key]??>
|
392
|
-
<#continue>
|
393
|
-
</#if>
|
394
|
-
<#recover>
|
395
|
-
<#local out_seq += ["/*Couldn't test if '" + key + "' is available on this object*/"]>
|
396
|
-
<#continue>
|
397
|
-
</#attempt>
|
398
|
-
|
399
|
-
<#local propertyValue = "">
|
400
|
-
|
401
|
-
<#attempt>
|
402
|
-
<#local propertyValue = object[key]>
|
403
|
-
<#recover>
|
404
|
-
<#local out_seq += ["/*Couldn't dereference '" + key + "' on this object*/"]>
|
405
|
-
<#continue>
|
406
|
-
</#attempt>
|
407
|
-
|
408
|
-
<#local rec_out = ftl_object_to_js_code_declaring_an_object(propertyValue, path + [ key ])>
|
409
|
-
|
410
|
-
<#if rec_out?starts_with("ABORT:")>
|
411
|
-
|
412
|
-
<#local errorMessage = rec_out?remove_beginning("ABORT:")>
|
413
|
-
|
414
|
-
<#if errorMessage != " It's a method" >
|
415
|
-
<#local out_seq += ["/*" + key + ": " + errorMessage + "*/"]>
|
416
|
-
</#if>
|
417
|
-
|
418
|
-
<#continue>
|
419
|
-
</#if>
|
420
|
-
|
421
|
-
<#local out_seq += ['"' + key + '": ' + rec_out + ","]>
|
422
|
-
|
423
|
-
</#list>
|
424
|
-
|
425
|
-
<#return (["{"] + out_seq?map(str -> ""?right_pad(4 * (path?size + 1)) + str) + [ ""?right_pad(4 * path?size) + "}"])?join("\n")>
|
426
|
-
|
427
|
-
</#if>
|
428
|
-
|
429
|
-
<#local isMethod = "">
|
430
|
-
<#attempt>
|
431
|
-
<#local isMethod = object?is_method>
|
432
|
-
<#recover>
|
433
|
-
<#return "ABORT: Can't test if it'sa method.">
|
434
|
-
</#attempt>
|
435
|
-
|
436
|
-
<#if isMethod>
|
437
|
-
|
438
|
-
<#if are_same_path(path, ["auth", "showUsername"])>
|
439
|
-
<#attempt>
|
440
|
-
<#return auth.showUsername()?c>
|
441
|
-
<#recover>
|
442
|
-
<#return "ABORT: Couldn't evaluate auth.showUsername()">
|
443
|
-
</#attempt>
|
444
|
-
</#if>
|
445
|
-
|
446
|
-
<#if are_same_path(path, ["auth", "showResetCredentials"])>
|
447
|
-
<#attempt>
|
448
|
-
<#return auth.showResetCredentials()?c>
|
449
|
-
<#recover>
|
450
|
-
<#return "ABORT: Couldn't evaluate auth.showResetCredentials()">
|
451
|
-
</#attempt>
|
452
|
-
</#if>
|
453
|
-
|
454
|
-
<#if are_same_path(path, ["auth", "showTryAnotherWayLink"])>
|
455
|
-
<#attempt>
|
456
|
-
<#return auth.showTryAnotherWayLink()?c>
|
457
|
-
<#recover>
|
458
|
-
<#return "ABORT: Couldn't evaluate auth.showTryAnotherWayLink()">
|
459
|
-
</#attempt>
|
460
|
-
</#if>
|
461
|
-
|
462
|
-
<#return "ABORT: It's a method">
|
463
|
-
</#if>
|
464
|
-
|
465
|
-
<#local isBoolean = "">
|
466
|
-
<#attempt>
|
467
|
-
<#local isBoolean = object?is_boolean>
|
468
|
-
<#recover>
|
469
|
-
<#return "ABORT: Can't test if it's a boolean">
|
470
|
-
</#attempt>
|
471
|
-
|
472
|
-
<#if isBoolean>
|
473
|
-
<#return object?c>
|
474
|
-
</#if>
|
475
|
-
|
476
|
-
<#local isEnumerable = "">
|
477
|
-
<#attempt>
|
478
|
-
<#local isEnumerable = object?is_enumerable>
|
479
|
-
<#recover>
|
480
|
-
<#return "ABORT: Can't test if it's an enumerable">
|
481
|
-
</#attempt>
|
482
|
-
|
483
|
-
|
484
|
-
<#if isEnumerable>
|
485
|
-
|
486
|
-
<#local out_seq = []>
|
487
|
-
|
488
|
-
<#local i = 0>
|
489
|
-
|
490
|
-
<#list object as array_item>
|
491
|
-
|
492
|
-
<#if !array_item??>
|
493
|
-
<#local out_seq += ["null,"]>
|
494
|
-
<#continue>
|
495
|
-
</#if>
|
496
|
-
|
497
|
-
<#local rec_out = ftl_object_to_js_code_declaring_an_object(array_item, path + [ i ])>
|
498
|
-
|
499
|
-
<#local i = i + 1>
|
500
|
-
|
501
|
-
<#if rec_out?starts_with("ABORT:")>
|
502
|
-
|
503
|
-
<#local errorMessage = rec_out?remove_beginning("ABORT:")>
|
504
|
-
|
505
|
-
<#if errorMessage != " It's a method" >
|
506
|
-
<#local out_seq += ["/*" + i?string + ": " + errorMessage + "*/"]>
|
507
|
-
</#if>
|
508
|
-
|
509
|
-
<#continue>
|
510
|
-
</#if>
|
511
|
-
|
512
|
-
<#local out_seq += [rec_out + ","]>
|
513
|
-
|
514
|
-
</#list>
|
515
|
-
|
516
|
-
<#return (["["] + out_seq?map(str -> ""?right_pad(4 * (path?size + 1)) + str) + [ ""?right_pad(4 * path?size) + "]"])?join("\n")>
|
517
|
-
|
518
|
-
</#if>
|
519
|
-
|
520
|
-
<#local isDate = "">
|
521
|
-
<#attempt>
|
522
|
-
<#local isDate = object?is_date_like>
|
523
|
-
<#recover>
|
524
|
-
<#return "ABORT: Can't test if it's a date">
|
525
|
-
</#attempt>
|
526
|
-
|
527
|
-
<#if isDate>
|
528
|
-
<#return '"' + object?datetime?iso_utc + '"'>
|
529
|
-
</#if>
|
530
|
-
|
531
|
-
<#local isNumber = "">
|
532
|
-
<#attempt>
|
533
|
-
<#local isNumber = object?is_number>
|
534
|
-
<#recover>
|
535
|
-
<#return "ABORT: Can't test if it's a number">
|
536
|
-
</#attempt>
|
537
|
-
|
538
|
-
<#if isNumber>
|
539
|
-
<#return object?c>
|
540
|
-
</#if>
|
541
|
-
|
542
|
-
<#attempt>
|
543
|
-
<#return '"' + object?js_string + '"'>;
|
544
|
-
<#recover>
|
545
|
-
</#attempt>
|
546
|
-
|
547
|
-
<#return "ABORT: Couldn't convert into string non hash, non method, non boolean, non number, non enumerable object">
|
548
|
-
|
549
|
-
</#function>
|
550
|
-
<#function is_subpath path searchedPath>
|
551
|
-
|
552
|
-
<#if path?size < searchedPath?size>
|
553
|
-
<#return false>
|
554
|
-
</#if>
|
555
|
-
|
556
|
-
<#local i=0>
|
557
|
-
|
558
|
-
<#list path as property>
|
559
|
-
|
560
|
-
<#if i == searchedPath?size >
|
561
|
-
<#continue>
|
562
|
-
</#if>
|
563
|
-
|
564
|
-
<#local searchedProperty=searchedPath[i]>
|
565
|
-
|
566
|
-
<#local i+= 1>
|
567
|
-
|
568
|
-
<#if searchedProperty?is_string && searchedProperty == "*">
|
569
|
-
<#continue>
|
570
|
-
</#if>
|
571
|
-
|
572
|
-
<#if searchedProperty?is_string && !property?is_string>
|
573
|
-
<#return false>
|
574
|
-
</#if>
|
575
|
-
|
576
|
-
<#if searchedProperty?is_number && !property?is_number>
|
577
|
-
<#return false>
|
578
|
-
</#if>
|
579
|
-
|
580
|
-
<#if searchedProperty?string != property?string>
|
581
|
-
<#return false>
|
582
|
-
</#if>
|
583
|
-
|
584
|
-
</#list>
|
585
|
-
|
586
|
-
<#return true>
|
587
|
-
|
588
|
-
</#function>
|
589
|
-
|
590
|
-
<#function are_same_path path searchedPath>
|
591
|
-
<#return path?size == searchedPath?size && is_subpath(path, searchedPath)>
|
592
|
-
</#function>
|
593
|
-
</script>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { type ThemeType } from "../../constants";
|
2
|
-
export type BuildOptionsLike = {
|
3
|
-
bundler: "vite" | "webpack";
|
4
|
-
themeVersion: string;
|
5
|
-
urlPathname: string | undefined;
|
6
|
-
reactAppBuildDirPath: string;
|
7
|
-
assetsDirPath: string;
|
8
|
-
};
|
9
|
-
export declare function generateFtlFilesCodeFactory(params: {
|
10
|
-
themeName: string;
|
11
|
-
indexHtmlCode: string;
|
12
|
-
cssGlobalsToDefine: Record<string, string>;
|
13
|
-
buildOptions: BuildOptionsLike;
|
14
|
-
keycloakifyVersion: string;
|
15
|
-
themeType: ThemeType;
|
16
|
-
fieldNames: string[];
|
17
|
-
}): {
|
18
|
-
generateFtlFilesCode: (params: {
|
19
|
-
pageId: string;
|
20
|
-
}) => {
|
21
|
-
ftlCode: string;
|
22
|
-
};
|
23
|
-
};
|