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.
Files changed (442) hide show
  1. package/PUBLIC_URL.js +1 -1
  2. package/PUBLIC_URL.js.map +1 -1
  3. package/account/Fallback.js +3 -0
  4. package/account/Fallback.js.map +1 -1
  5. package/account/Template.js +2 -2
  6. package/account/Template.js.map +1 -1
  7. package/account/i18n/baseMessages/index.js.map +1 -1
  8. package/account/i18n/i18n.d.ts +3 -4
  9. package/account/i18n/i18n.js +3 -4
  10. package/account/i18n/i18n.js.map +1 -1
  11. package/account/index.d.ts +1 -1
  12. package/account/kcContext/KcContext.d.ts +62 -59
  13. package/account/kcContext/KcContext.js.map +1 -1
  14. package/account/kcContext/createGetKcContext.d.ts +3 -3
  15. package/account/kcContext/createGetKcContext.js.map +1 -1
  16. package/account/kcContext/getKcContextFromWindow.js +1 -1
  17. package/account/kcContext/getKcContextFromWindow.js.map +1 -1
  18. package/account/kcContext/kcContextMocks.js +22 -14
  19. package/account/kcContext/kcContextMocks.js.map +1 -1
  20. package/account/pages/Account.js +1 -1
  21. package/account/pages/Account.js.map +1 -1
  22. package/account/pages/Applications.js +3 -3
  23. package/account/pages/Applications.js.map +1 -1
  24. package/account/pages/FederatedIdentity.d.ts +7 -0
  25. package/account/pages/FederatedIdentity.js +8 -0
  26. package/account/pages/FederatedIdentity.js.map +1 -0
  27. package/account/pages/Log.js +2 -2
  28. package/account/pages/Log.js.map +1 -1
  29. package/account/pages/Password.js +4 -6
  30. package/account/pages/Password.js.map +1 -1
  31. package/account/pages/Sessions.js +1 -5
  32. package/account/pages/Sessions.js.map +1 -1
  33. package/account/pages/Totp.js +2 -2
  34. package/account/pages/Totp.js.map +1 -1
  35. package/bin/main.js +143109 -0
  36. package/lib/BASE_URL.js.map +1 -1
  37. package/login/Fallback.js.map +1 -1
  38. package/login/Template.js +4 -4
  39. package/login/Template.js.map +1 -1
  40. package/login/UserProfileFormFields.js +17 -19
  41. package/login/UserProfileFormFields.js.map +1 -1
  42. package/login/i18n/baseMessages/index.js.map +1 -1
  43. package/login/i18n/i18n.d.ts +3 -4
  44. package/login/i18n/i18n.js +3 -4
  45. package/login/i18n/i18n.js.map +1 -1
  46. package/login/index.d.ts +1 -1
  47. package/login/kcContext/KcContext.d.ts +1 -0
  48. package/login/kcContext/KcContext.js.map +1 -1
  49. package/login/kcContext/createGetKcContext.d.ts +3 -3
  50. package/login/kcContext/createGetKcContext.js.map +1 -1
  51. package/login/kcContext/getKcContextFromWindow.js +1 -1
  52. package/login/kcContext/getKcContextFromWindow.js.map +1 -1
  53. package/login/kcContext/kcContextMocks.js +3 -2
  54. package/login/kcContext/kcContextMocks.js.map +1 -1
  55. package/login/lib/useDownloadTerms.js.map +1 -1
  56. package/login/lib/useUserProfileForm.js +9 -9
  57. package/login/lib/useUserProfileForm.js.map +1 -1
  58. package/login/pages/Code.js +1 -1
  59. package/login/pages/Code.js.map +1 -1
  60. package/login/pages/DeleteAccountConfirm.js +1 -1
  61. package/login/pages/DeleteAccountConfirm.js.map +1 -1
  62. package/login/pages/DeleteCredential.js +1 -1
  63. package/login/pages/DeleteCredential.js.map +1 -1
  64. package/login/pages/Error.js +1 -1
  65. package/login/pages/Error.js.map +1 -1
  66. package/login/pages/FrontchannelLogout.js +1 -1
  67. package/login/pages/FrontchannelLogout.js.map +1 -1
  68. package/login/pages/IdpReviewUserProfile.js +1 -1
  69. package/login/pages/IdpReviewUserProfile.js.map +1 -1
  70. package/login/pages/Info.js +5 -5
  71. package/login/pages/Info.js.map +1 -1
  72. package/login/pages/Login.js +4 -4
  73. package/login/pages/Login.js.map +1 -1
  74. package/login/pages/LoginConfigTotp.js +2 -10
  75. package/login/pages/LoginConfigTotp.js.map +1 -1
  76. package/login/pages/LoginIdpLinkConfirm.js +1 -1
  77. package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
  78. package/login/pages/LoginIdpLinkEmail.js +1 -1
  79. package/login/pages/LoginIdpLinkEmail.js.map +1 -1
  80. package/login/pages/LoginOauth2DeviceVerifyUserCode.js +1 -1
  81. package/login/pages/LoginOauth2DeviceVerifyUserCode.js.map +1 -1
  82. package/login/pages/LoginOauthGrant.js +2 -2
  83. package/login/pages/LoginOauthGrant.js.map +1 -1
  84. package/login/pages/LoginOtp.js +1 -1
  85. package/login/pages/LoginOtp.js.map +1 -1
  86. package/login/pages/LoginPageExpired.js +1 -1
  87. package/login/pages/LoginPageExpired.js.map +1 -1
  88. package/login/pages/LoginPassword.js +3 -3
  89. package/login/pages/LoginPassword.js.map +1 -1
  90. package/login/pages/LoginRecoveryAuthnCodeConfig.js +3 -3
  91. package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
  92. package/login/pages/LoginRecoveryAuthnCodeInput.js +1 -1
  93. package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
  94. package/login/pages/LoginResetOtp.js +1 -1
  95. package/login/pages/LoginResetOtp.js.map +1 -1
  96. package/login/pages/LoginResetPassword.js +2 -2
  97. package/login/pages/LoginResetPassword.js.map +1 -1
  98. package/login/pages/LoginUpdatePassword.js +3 -3
  99. package/login/pages/LoginUpdatePassword.js.map +1 -1
  100. package/login/pages/LoginUpdateProfile.js +2 -4
  101. package/login/pages/LoginUpdateProfile.js.map +1 -1
  102. package/login/pages/LoginUsername.js +3 -3
  103. package/login/pages/LoginUsername.js.map +1 -1
  104. package/login/pages/LoginVerifyEmail.js +1 -1
  105. package/login/pages/LoginVerifyEmail.js.map +1 -1
  106. package/login/pages/LoginX509Info.js +1 -1
  107. package/login/pages/LoginX509Info.js.map +1 -1
  108. package/login/pages/LogoutConfirm.js +1 -1
  109. package/login/pages/LogoutConfirm.js.map +1 -1
  110. package/login/pages/Register.js +4 -8
  111. package/login/pages/Register.js.map +1 -1
  112. package/login/pages/SamlPostForm.js +1 -1
  113. package/login/pages/SamlPostForm.js.map +1 -1
  114. package/login/pages/SelectAuthenticator.js +2 -2
  115. package/login/pages/SelectAuthenticator.js.map +1 -1
  116. package/login/pages/Terms.js +1 -1
  117. package/login/pages/Terms.js.map +1 -1
  118. package/login/pages/UpdateEmail.js +3 -5
  119. package/login/pages/UpdateEmail.js.map +1 -1
  120. package/login/pages/WebauthnAuthenticate.js +6 -6
  121. package/login/pages/WebauthnAuthenticate.js.map +1 -1
  122. package/login/pages/WebauthnError.js +2 -2
  123. package/login/pages/WebauthnError.js.map +1 -1
  124. package/login/pages/WebauthnRegister.js +3 -3
  125. package/login/pages/WebauthnRegister.js.map +1 -1
  126. package/package.json +62 -509
  127. package/src/PUBLIC_URL.ts +1 -1
  128. package/src/account/Fallback.tsx +3 -0
  129. package/src/account/Template.tsx +2 -5
  130. package/src/account/i18n/i18n.tsx +5 -8
  131. package/src/account/index.ts +1 -1
  132. package/src/account/kcContext/KcContext.ts +72 -62
  133. package/src/account/kcContext/getKcContextFromWindow.ts +1 -1
  134. package/src/account/kcContext/kcContextMocks.ts +21 -15
  135. package/src/account/pages/Applications.tsx +2 -2
  136. package/src/account/pages/FederatedIdentity.tsx +58 -0
  137. package/src/account/pages/Log.tsx +1 -1
  138. package/src/account/pages/Sessions.tsx +0 -3
  139. package/src/account/pages/Totp.tsx +20 -21
  140. package/src/bin/copy-keycloak-resources-to-public.ts +10 -106
  141. package/src/bin/download-builtin-keycloak-theme.ts +14 -274
  142. package/src/bin/eject-keycloak-page.ts +81 -19
  143. package/src/bin/initialize-email-theme.ts +22 -21
  144. package/src/bin/keycloakify/buildJars/buildJar.ts +27 -20
  145. package/src/bin/keycloakify/buildJars/buildJars.ts +14 -15
  146. package/src/bin/keycloakify/buildJars/generatePom.ts +4 -4
  147. package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +45 -18
  148. package/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +162 -234
  149. package/src/bin/keycloakify/generateFtl/generateFtl.ts +7 -4
  150. package/src/bin/keycloakify/generateFtl/index.ts +0 -1
  151. package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/bringInAccountV1.ts +8 -7
  152. package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/generateMessageProperties.ts +1 -1
  153. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +32 -0
  154. package/src/bin/keycloakify/{generateTheme/generateSrcMainResources.ts → generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts} +40 -46
  155. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +56 -0
  156. package/src/bin/keycloakify/generateSrcMainResources/index.ts +1 -0
  157. package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/readExtraPageNames.ts +1 -2
  158. package/src/bin/keycloakify/{generateTheme → generateSrcMainResources}/readFieldNameUsage.ts +5 -6
  159. package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +14 -15
  160. package/src/bin/keycloakify/index.ts +0 -7
  161. package/src/bin/keycloakify/keycloakify.ts +50 -67
  162. package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +2 -2
  163. package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +2 -2
  164. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +1 -1
  165. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +2 -2
  166. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +2 -2
  167. package/src/bin/main.ts +175 -0
  168. package/src/bin/shared/KeycloakVersionRange.ts +7 -0
  169. package/src/bin/{keycloakify/buildOptions → shared}/buildOptions.ts +113 -25
  170. package/src/bin/{keycloakify/generateFtl/pageId.ts → shared/constants.ts} +25 -1
  171. package/src/bin/shared/copyKeycloakResourcesToPublic.ts +90 -0
  172. package/src/bin/{downloadAndUnzip.ts → shared/downloadAndUnzip.ts} +6 -6
  173. package/src/bin/shared/downloadBuiltinKeycloakTheme.ts +264 -0
  174. package/src/bin/{keycloakify/generateTheme → shared}/downloadKeycloakStaticResources.ts +8 -8
  175. package/src/bin/shared/getJarFileBasename.ts +9 -0
  176. package/src/bin/{getThemeSrcDirPath.ts → shared/getThemeSrcDirPath.ts} +1 -1
  177. package/src/bin/shared/metaInfKeycloakThemes.ts +34 -0
  178. package/src/bin/shared/promptKeycloakVersion.ts +106 -0
  179. package/src/bin/start-keycloak.ts +236 -0
  180. package/src/bin/tools/fs.rmSync.ts +4 -4
  181. package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +8 -1
  182. package/src/bin/{keycloakify/buildOptions → tools}/getNpmWorkspaceRootDirPath.ts +1 -23
  183. package/src/bin/tools/{readThisNpmProjectVersion.ts → readThisNpmPackageVersion.ts} +1 -1
  184. package/src/login/Template.tsx +6 -22
  185. package/src/login/UserProfileFormFields.tsx +2 -5
  186. package/src/login/i18n/i18n.tsx +5 -8
  187. package/src/login/index.ts +1 -1
  188. package/src/login/kcContext/KcContext.ts +2 -2
  189. package/src/login/kcContext/getKcContextFromWindow.ts +1 -1
  190. package/src/login/kcContext/kcContextMocks.ts +3 -3
  191. package/src/login/lib/useUserProfileForm.tsx +10 -10
  192. package/src/login/pages/Code.tsx +1 -1
  193. package/src/login/pages/IdpReviewUserProfile.tsx +1 -1
  194. package/src/login/pages/Login.tsx +1 -1
  195. package/src/login/pages/LoginConfigTotp.tsx +1 -9
  196. package/src/login/pages/LoginUpdateProfile.tsx +1 -1
  197. package/src/login/pages/LoginUsername.tsx +1 -1
  198. package/src/login/pages/Register.tsx +2 -2
  199. package/src/login/pages/UpdateEmail.tsx +1 -1
  200. package/src/login/pages/WebauthnRegister.tsx +1 -1
  201. package/src/vite-plugin/tsconfig.json +2 -1
  202. package/src/vite-plugin/vite-plugin.ts +29 -41
  203. package/tools/Array.prototype.every.js.map +1 -1
  204. package/tools/HTMLElement.prototype.prepend.js.map +1 -1
  205. package/tools/clsx.js.map +1 -1
  206. package/tools/deepAssign.js.map +1 -1
  207. package/tools/deepClone.js.map +1 -1
  208. package/tools/formatNumber.js.map +1 -1
  209. package/tools/memoize.js.map +1 -1
  210. package/tools/useInsertLinkTags.js.map +1 -1
  211. package/tools/useInsertScriptTags.js.map +1 -1
  212. package/tools/useSetClassName.js.map +1 -1
  213. package/bin/constants.d.ts +0 -10
  214. package/bin/constants.js +0 -13
  215. package/bin/constants.js.map +0 -1
  216. package/bin/copy-keycloak-resources-to-public.d.ts +0 -14
  217. package/bin/copy-keycloak-resources-to-public.js +0 -216
  218. package/bin/copy-keycloak-resources-to-public.js.map +0 -1
  219. package/bin/download-builtin-keycloak-theme.d.ts +0 -10
  220. package/bin/download-builtin-keycloak-theme.js +0 -352
  221. package/bin/download-builtin-keycloak-theme.js.map +0 -1
  222. package/bin/downloadAndUnzip.d.ts +0 -16
  223. package/bin/downloadAndUnzip.js +0 -255
  224. package/bin/downloadAndUnzip.js.map +0 -1
  225. package/bin/eject-keycloak-page.d.ts +0 -2
  226. package/bin/eject-keycloak-page.js +0 -132
  227. package/bin/eject-keycloak-page.js.map +0 -1
  228. package/bin/getThemeSrcDirPath.d.ts +0 -6
  229. package/bin/getThemeSrcDirPath.js +0 -123
  230. package/bin/getThemeSrcDirPath.js.map +0 -1
  231. package/bin/initialize-email-theme.d.ts +0 -2
  232. package/bin/initialize-email-theme.js +0 -121
  233. package/bin/initialize-email-theme.js.map +0 -1
  234. package/bin/keycloakify/buildJars/buildJar.d.ts +0 -14
  235. package/bin/keycloakify/buildJars/buildJar.js +0 -216
  236. package/bin/keycloakify/buildJars/buildJar.js.map +0 -1
  237. package/bin/keycloakify/buildJars/buildJars.d.ts +0 -10
  238. package/bin/keycloakify/buildJars/buildJars.js +0 -95
  239. package/bin/keycloakify/buildJars/buildJars.js.map +0 -1
  240. package/bin/keycloakify/buildJars/extensionVersions.d.ts +0 -12
  241. package/bin/keycloakify/buildJars/extensionVersions.js +0 -7
  242. package/bin/keycloakify/buildJars/extensionVersions.js.map +0 -1
  243. package/bin/keycloakify/buildJars/generatePom.d.ts +0 -13
  244. package/bin/keycloakify/buildJars/generatePom.js +0 -94
  245. package/bin/keycloakify/buildJars/generatePom.js.map +0 -1
  246. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.d.ts +0 -6
  247. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js +0 -35
  248. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js.map +0 -1
  249. package/bin/keycloakify/buildJars/index.d.ts +0 -1
  250. package/bin/keycloakify/buildJars/index.js +0 -18
  251. package/bin/keycloakify/buildJars/index.js.map +0 -1
  252. package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.d.ts +0 -35
  253. package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js +0 -14
  254. package/bin/keycloakify/buildOptions/UserProvidedBuildOptions.js.map +0 -1
  255. package/bin/keycloakify/buildOptions/buildOptions.d.ts +0 -25
  256. package/bin/keycloakify/buildOptions/buildOptions.js +0 -178
  257. package/bin/keycloakify/buildOptions/buildOptions.js.map +0 -1
  258. package/bin/keycloakify/buildOptions/getCacheDirPath.d.ts +0 -5
  259. package/bin/keycloakify/buildOptions/getCacheDirPath.js +0 -22
  260. package/bin/keycloakify/buildOptions/getCacheDirPath.js.map +0 -1
  261. package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.d.ts +0 -5
  262. package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js +0 -86
  263. package/bin/keycloakify/buildOptions/getNpmWorkspaceRootDirPath.js.map +0 -1
  264. package/bin/keycloakify/buildOptions/getReactAppRootDirPath.d.ts +0 -5
  265. package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js +0 -26
  266. package/bin/keycloakify/buildOptions/getReactAppRootDirPath.js.map +0 -1
  267. package/bin/keycloakify/buildOptions/index.d.ts +0 -1
  268. package/bin/keycloakify/buildOptions/index.js +0 -18
  269. package/bin/keycloakify/buildOptions/index.js.map +0 -1
  270. package/bin/keycloakify/buildOptions/parsedPackageJson.d.ts +0 -10
  271. package/bin/keycloakify/buildOptions/parsedPackageJson.js +0 -49
  272. package/bin/keycloakify/buildOptions/parsedPackageJson.js.map +0 -1
  273. package/bin/keycloakify/buildOptions/resolvedViteConfig.d.ts +0 -13
  274. package/bin/keycloakify/buildOptions/resolvedViteConfig.js +0 -77
  275. package/bin/keycloakify/buildOptions/resolvedViteConfig.js.map +0 -1
  276. package/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +0 -593
  277. package/bin/keycloakify/generateFtl/generateFtl.d.ts +0 -23
  278. package/bin/keycloakify/generateFtl/generateFtl.js +0 -169
  279. package/bin/keycloakify/generateFtl/generateFtl.js.map +0 -1
  280. package/bin/keycloakify/generateFtl/index.d.ts +0 -2
  281. package/bin/keycloakify/generateFtl/index.js +0 -19
  282. package/bin/keycloakify/generateFtl/index.js.map +0 -1
  283. package/bin/keycloakify/generateFtl/pageId.d.ts +0 -4
  284. package/bin/keycloakify/generateFtl/pageId.js +0 -41
  285. package/bin/keycloakify/generateFtl/pageId.js.map +0 -1
  286. package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +0 -11
  287. package/bin/keycloakify/generateStartKeycloakTestingContainer.js +0 -89
  288. package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +0 -1
  289. package/bin/keycloakify/generateTheme/bringInAccountV1.d.ts +0 -9
  290. package/bin/keycloakify/generateTheme/bringInAccountV1.js +0 -153
  291. package/bin/keycloakify/generateTheme/bringInAccountV1.js.map +0 -1
  292. package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.d.ts +0 -11
  293. package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js +0 -102
  294. package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +0 -1
  295. package/bin/keycloakify/generateTheme/generateMessageProperties.d.ts +0 -8
  296. package/bin/keycloakify/generateTheme/generateMessageProperties.js +0 -271
  297. package/bin/keycloakify/generateTheme/generateMessageProperties.js.map +0 -1
  298. package/bin/keycloakify/generateTheme/generateSrcMainResources.d.ts +0 -21
  299. package/bin/keycloakify/generateTheme/generateSrcMainResources.js +0 -340
  300. package/bin/keycloakify/generateTheme/generateSrcMainResources.js.map +0 -1
  301. package/bin/keycloakify/generateTheme/generateTheme.d.ts +0 -13
  302. package/bin/keycloakify/generateTheme/generateTheme.js +0 -115
  303. package/bin/keycloakify/generateTheme/generateTheme.js.map +0 -1
  304. package/bin/keycloakify/generateTheme/generateThemeVariants.d.ts +0 -5
  305. package/bin/keycloakify/generateTheme/generateThemeVariants.js +0 -67
  306. package/bin/keycloakify/generateTheme/generateThemeVariants.js.map +0 -1
  307. package/bin/keycloakify/generateTheme/index.d.ts +0 -1
  308. package/bin/keycloakify/generateTheme/index.js +0 -18
  309. package/bin/keycloakify/generateTheme/index.js.map +0 -1
  310. package/bin/keycloakify/generateTheme/readExtraPageNames.d.ts +0 -5
  311. package/bin/keycloakify/generateTheme/readExtraPageNames.js +0 -105
  312. package/bin/keycloakify/generateTheme/readExtraPageNames.js.map +0 -1
  313. package/bin/keycloakify/generateTheme/readFieldNameUsage.d.ts +0 -7
  314. package/bin/keycloakify/generateTheme/readFieldNameUsage.js +0 -142
  315. package/bin/keycloakify/generateTheme/readFieldNameUsage.js.map +0 -1
  316. package/bin/keycloakify/index.d.ts +0 -2
  317. package/bin/keycloakify/index.js +0 -23
  318. package/bin/keycloakify/index.js.map +0 -1
  319. package/bin/keycloakify/keycloakify.d.ts +0 -1
  320. package/bin/keycloakify/keycloakify.js +0 -166
  321. package/bin/keycloakify/keycloakify.js.map +0 -1
  322. package/bin/keycloakify/replacers/replaceImportsInCssCode.d.ts +0 -15
  323. package/bin/keycloakify/replacers/replaceImportsInCssCode.js +0 -88
  324. package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +0 -1
  325. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.d.ts +0 -9
  326. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +0 -38
  327. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +0 -1
  328. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +0 -1
  329. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +0 -18
  330. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +0 -1
  331. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +0 -12
  332. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +0 -70
  333. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +0 -1
  334. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +0 -13
  335. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +0 -95
  336. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +0 -1
  337. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +0 -12
  338. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +0 -103
  339. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +0 -1
  340. package/bin/promptKeycloakVersion.d.ts +0 -3
  341. package/bin/promptKeycloakVersion.js +0 -121
  342. package/bin/promptKeycloakVersion.js.map +0 -1
  343. package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
  344. package/bin/tools/OptionalIfCanBeUndefined.js +0 -3
  345. package/bin/tools/OptionalIfCanBeUndefined.js.map +0 -1
  346. package/bin/tools/SemVer.d.ts +0 -26
  347. package/bin/tools/SemVer.js +0 -119
  348. package/bin/tools/SemVer.js.map +0 -1
  349. package/bin/tools/String.prototype.replaceAll.d.ts +0 -1
  350. package/bin/tools/String.prototype.replaceAll.js +0 -29
  351. package/bin/tools/String.prototype.replaceAll.js.map +0 -1
  352. package/bin/tools/crawl.d.ts +0 -5
  353. package/bin/tools/crawl.js +0 -74
  354. package/bin/tools/crawl.js.map +0 -1
  355. package/bin/tools/crc32.d.ts +0 -9
  356. package/bin/tools/crc32.js +0 -64
  357. package/bin/tools/crc32.js.map +0 -1
  358. package/bin/tools/deflate.d.ts +0 -24
  359. package/bin/tools/deflate.js +0 -155
  360. package/bin/tools/deflate.js.map +0 -1
  361. package/bin/tools/fetchProxyOptions.d.ts +0 -5
  362. package/bin/tools/fetchProxyOptions.js +0 -172
  363. package/bin/tools/fetchProxyOptions.js.map +0 -1
  364. package/bin/tools/fs.existsAsync.d.ts +0 -1
  365. package/bin/tools/fs.existsAsync.js +0 -86
  366. package/bin/tools/fs.existsAsync.js.map +0 -1
  367. package/bin/tools/fs.rm.d.ts +0 -8
  368. package/bin/tools/fs.rm.js +0 -151
  369. package/bin/tools/fs.rm.js.map +0 -1
  370. package/bin/tools/fs.rmSync.d.ts +0 -8
  371. package/bin/tools/fs.rmSync.js +0 -58
  372. package/bin/tools/fs.rmSync.js.map +0 -1
  373. package/bin/tools/getAbsoluteAndInOsFormatPath.d.ts +0 -4
  374. package/bin/tools/getAbsoluteAndInOsFormatPath.js +0 -16
  375. package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +0 -1
  376. package/bin/tools/getThisCodebaseRootDirPath.d.ts +0 -1
  377. package/bin/tools/getThisCodebaseRootDirPath.js +0 -43
  378. package/bin/tools/getThisCodebaseRootDirPath.js.map +0 -1
  379. package/bin/tools/grant-exec-perms.d.ts +0 -1
  380. package/bin/tools/grant-exec-perms.js +0 -100
  381. package/bin/tools/grant-exec-perms.js.map +0 -1
  382. package/bin/tools/isInside.d.ts +0 -4
  383. package/bin/tools/isInside.js +0 -10
  384. package/bin/tools/isInside.js.map +0 -1
  385. package/bin/tools/kebabCaseToSnakeCase.d.ts +0 -1
  386. package/bin/tools/kebabCaseToSnakeCase.js +0 -35
  387. package/bin/tools/kebabCaseToSnakeCase.js.map +0 -1
  388. package/bin/tools/logger.d.ts +0 -12
  389. package/bin/tools/logger.js +0 -23
  390. package/bin/tools/logger.js.map +0 -1
  391. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -14
  392. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +0 -119
  393. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +0 -1
  394. package/bin/tools/octokit-addons/listTags.d.ts +0 -13
  395. package/bin/tools/octokit-addons/listTags.js +0 -154
  396. package/bin/tools/octokit-addons/listTags.js.map +0 -1
  397. package/bin/tools/partitionPromiseSettledResults.d.ts +0 -2
  398. package/bin/tools/partitionPromiseSettledResults.js +0 -41
  399. package/bin/tools/partitionPromiseSettledResults.js.map +0 -1
  400. package/bin/tools/readThisNpmProjectVersion.d.ts +0 -1
  401. package/bin/tools/readThisNpmProjectVersion.js +0 -37
  402. package/bin/tools/readThisNpmProjectVersion.js.map +0 -1
  403. package/bin/tools/tee.d.ts +0 -3
  404. package/bin/tools/tee.js +0 -37
  405. package/bin/tools/tee.js.map +0 -1
  406. package/bin/tools/transformCodebase.d.ts +0 -20
  407. package/bin/tools/transformCodebase.js +0 -97
  408. package/bin/tools/transformCodebase.js.map +0 -1
  409. package/bin/tools/trimIndent.d.ts +0 -5
  410. package/bin/tools/trimIndent.js +0 -82
  411. package/bin/tools/trimIndent.js.map +0 -1
  412. package/bin/tools/unzip.d.ts +0 -2
  413. package/bin/tools/unzip.js +0 -274
  414. package/bin/tools/unzip.js.map +0 -1
  415. package/index.d.ts +0 -1
  416. package/index.js +0 -2
  417. package/index.js.map +0 -1
  418. package/lib/keycloakJsAdapter.d.ts +0 -51
  419. package/lib/keycloakJsAdapter.js +0 -74
  420. package/lib/keycloakJsAdapter.js.map +0 -1
  421. package/src/bin/constants.ts +0 -13
  422. package/src/bin/keycloakify/buildOptions/UserProvidedBuildOptions.ts +0 -21
  423. package/src/bin/keycloakify/buildOptions/getCacheDirPath.ts +0 -25
  424. package/src/bin/keycloakify/buildOptions/getReactAppRootDirPath.ts +0 -23
  425. package/src/bin/keycloakify/buildOptions/index.ts +0 -1
  426. package/src/bin/keycloakify/buildOptions/parsedPackageJson.ts +0 -32
  427. package/src/bin/keycloakify/buildOptions/resolvedViteConfig.ts +0 -74
  428. package/src/bin/keycloakify/generateTheme/generateTheme.ts +0 -44
  429. package/src/bin/keycloakify/generateTheme/generateThemeVariants.ts +0 -50
  430. package/src/bin/keycloakify/generateTheme/index.ts +0 -1
  431. package/src/bin/promptKeycloakVersion.ts +0 -49
  432. package/src/bin/tools/grant-exec-perms.ts +0 -19
  433. package/src/bin/tools/logger.ts +0 -27
  434. package/src/index.ts +0 -1
  435. package/src/lib/keycloakJsAdapter.ts +0 -118
  436. package/vite-plugin/index.d.ts +0 -1
  437. package/vite-plugin/index.js +0 -18
  438. package/vite-plugin/index.js.map +0 -1
  439. package/vite-plugin/tsconfig.tsbuildinfo +0 -1
  440. package/vite-plugin/vite-plugin.d.ts +0 -6
  441. package/vite-plugin/vite-plugin.js +0 -158
  442. package/vite-plugin/vite-plugin.js.map +0 -1
@@ -1,280 +1,189 @@
1
1
  <script>const _=
2
- <#assign pageId="PAGE_ID_xIgLsPgGId9D8e">
3
2
  (()=>{
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
-
3
+ <#assign pageId="PAGE_ID_xIgLsPgGId9D8e">
4
+ const out = ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
5
+ out["msg"]= function(){ throw new Error("use import { useKcMessage } from 'keycloakify'"); };
6
+ out["advancedMsg"]= function(){ throw new Error("use import { useKcMessage } from 'keycloakify'"); };
7
+ out["messagesPerField"]= {
8
+ <#assign fieldNames = [ FIELD_NAMES_eKsIY4ZsZ4xeM ]>
9
+ <#attempt>
10
+ <#if profile?? && profile.attributes?? && profile.attributes?is_enumerable>
11
+ <#list profile.attributes as attribute>
12
+ <#if fieldNames?seq_contains(attribute.name)>
13
+ <#continue>
14
+ </#if>
15
+ <#assign fieldNames += [attribute.name]>
16
+ </#list>
17
+ </#if>
18
+ <#recover>
19
+ </#attempt>
20
+ "printIfExists": function (fieldName, text) {
21
+ <#if !messagesPerField?? || !(messagesPerField?is_hash)>
22
+ throw new Error("You're not supposed to use messagesPerField.printIfExists in this page");
23
+ <#else>
24
+ <#list fieldNames as fieldName>
25
+ if(fieldName === "${fieldName}" ){
26
+ <#-- https://github.com/keycloakify/keycloakify/pull/218 -->
27
+ <#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
28
+ <#assign doExistErrorOnUsernameOrPassword = "">
29
+ <#attempt>
30
+ <#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
31
+ <#recover>
32
+ <#assign doExistErrorOnUsernameOrPassword = true>
33
+ </#attempt>
34
+ <#if doExistErrorOnUsernameOrPassword>
35
+ return text;
60
36
  <#else>
61
-
62
37
  <#assign doExistMessageForField = "">
63
-
64
38
  <#attempt>
65
39
  <#assign doExistMessageForField = messagesPerField.exists('${fieldName}')>
66
40
  <#recover>
67
41
  <#assign doExistMessageForField = true>
68
42
  </#attempt>
69
-
70
43
  return <#if doExistMessageForField>text<#else>undefined</#if>;
71
-
72
44
  </#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;
45
+ <#else>
46
+ <#assign doExistMessageForField = "">
47
+ <#attempt>
48
+ <#assign doExistMessageForField = messagesPerField.exists('${fieldName}')>
49
+ <#recover>
50
+ <#assign doExistMessageForField = true>
51
+ </#attempt>
52
+ return <#if doExistMessageForField>text<#else>undefined</#if>;
53
+ </#if>
132
54
  }
133
-
134
- }
135
-
136
- return false;
137
-
138
- },
139
- "get": function (fieldName) {
140
-
141
-
55
+ </#list>
56
+ throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
57
+ </#if>
58
+ },
59
+ "existsError": function (){
60
+ function existsError_singleFieldName(fieldName) {
142
61
  <#if !messagesPerField?? || !(messagesPerField?is_hash)>
143
- throw new Error("You're not supposed to use messagesPerField.get in this page");
62
+ throw new Error("You're not supposed to use messagesPerField.printIfExists in this page");
144
63
  <#else>
145
64
  <#list fieldNames as fieldName>
146
65
  if(fieldName === "${fieldName}" ){
147
-
148
66
  <#-- https://github.com/keycloakify/keycloakify/pull/218 -->
149
67
  <#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
150
-
151
68
  <#assign doExistErrorOnUsernameOrPassword = "">
152
-
153
69
  <#attempt>
154
70
  <#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
155
71
  <#recover>
156
72
  <#assign doExistErrorOnUsernameOrPassword = true>
157
73
  </#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
-
74
+ return <#if doExistErrorOnUsernameOrPassword>true<#else>false</#if>;
177
75
  <#else>
178
-
76
+ <#assign doExistErrorMessageForField = "">
179
77
  <#attempt>
180
- return "${messagesPerField.get('${fieldName}')?no_esc}";
78
+ <#assign doExistErrorMessageForField = messagesPerField.existsError('${fieldName}')>
181
79
  <#recover>
182
- return "invalid field";
80
+ <#assign doExistErrorMessageForField = true>
183
81
  </#attempt>
184
-
82
+ return <#if doExistErrorMessageForField>true<#else>false</#if>;
185
83
  </#if>
186
-
187
84
  }
188
85
  </#list>
189
-
190
86
  throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
191
-
192
87
  </#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
-
88
+ }
89
+ for( let i = 0; i < arguments.length; i++ ){
90
+ if( existsError_singleFieldName(arguments[i]) ){
91
+ return true;
92
+ }
93
+ }
94
+ return false;
95
+ },
96
+ "get": function (fieldName) {
97
+ <#if !messagesPerField?? || !(messagesPerField?is_hash)>
98
+ throw new Error("You're not supposed to use messagesPerField.get in this page");
99
+ <#else>
100
+ <#list fieldNames as fieldName>
101
+ if(fieldName === "${fieldName}" ){
102
+ <#-- https://github.com/keycloakify/keycloakify/pull/218 -->
103
+ <#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
104
+ <#assign doExistErrorOnUsernameOrPassword = "">
105
+ <#attempt>
106
+ <#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
107
+ <#recover>
108
+ <#assign doExistErrorOnUsernameOrPassword = true>
109
+ </#attempt>
110
+ <#if doExistErrorOnUsernameOrPassword>
208
111
  <#attempt>
209
- <#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
112
+ return "${kcSanitize(msg('invalidUserMessage'))?no_esc}";
210
113
  <#recover>
211
- <#assign doExistErrorOnUsernameOrPassword = true>
114
+ return "Invalid username or password.";
212
115
  </#attempt>
213
-
214
- return <#if doExistErrorOnUsernameOrPassword>true<#else>false</#if>;
215
-
216
116
  <#else>
217
-
218
- <#assign doExistErrorMessageForField = "">
219
-
220
117
  <#attempt>
221
- <#assign doExistErrorMessageForField = messagesPerField.exists('${fieldName}')>
118
+ return "${messagesPerField.get('${fieldName}')?no_esc}";
222
119
  <#recover>
223
- <#assign doExistErrorMessageForField = true>
120
+ return "";
224
121
  </#attempt>
225
-
226
- return <#if doExistErrorMessageForField>true<#else>false</#if>;
227
-
228
122
  </#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);
123
+ <#else>
124
+ <#attempt>
125
+ return "${messagesPerField.get('${fieldName}')?no_esc}";
126
+ <#recover>
127
+ return "invalid field";
128
+ </#attempt>
129
+ </#if>
245
130
  }
246
-
131
+ </#list>
132
+ throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
133
+ </#if>
134
+ },
135
+ "exists": function (fieldName) {
136
+ <#if !messagesPerField?? || !(messagesPerField?is_hash)>
137
+ throw new Error("You're not supposed to use messagesPerField.exists in this page");
138
+ <#else>
139
+ <#list fieldNames as fieldName>
140
+ if(fieldName === "${fieldName}" ){
141
+ <#-- https://github.com/keycloakify/keycloakify/pull/218 -->
142
+ <#if ('${fieldName}' == 'username' || '${fieldName}' == 'password') && pageId != 'register.ftl' && pageId != 'register-user-profile.ftl'>
143
+ <#assign doExistErrorOnUsernameOrPassword = "">
144
+ <#attempt>
145
+ <#assign doExistErrorOnUsernameOrPassword = messagesPerField.existsError('username', 'password')>
146
+ <#recover>
147
+ <#assign doExistErrorOnUsernameOrPassword = true>
148
+ </#attempt>
149
+ return <#if doExistErrorOnUsernameOrPassword>true<#else>false</#if>;
150
+ <#else>
151
+ <#assign doExistErrorMessageForField = "">
152
+ <#attempt>
153
+ <#assign doExistErrorMessageForField = messagesPerField.exists('${fieldName}')>
154
+ <#recover>
155
+ <#assign doExistErrorMessageForField = true>
156
+ </#attempt>
157
+ return <#if doExistErrorMessageForField>true<#else>false</#if>;
158
+ </#if>
159
+ }
160
+ </#list>
161
+ throw new Error(fieldName + "is probably runtime generated, see: https://docs.keycloakify.dev/limitations#field-names-cant-be-runtime-generated");
162
+ </#if>
163
+ },
164
+ "getFirstError": function () {
165
+ for( let i = 0; i < arguments.length; i++ ){
166
+ const fieldName = arguments[i];
167
+ if( out.messagesPerField.existsError(fieldName) ){
168
+ return out.messagesPerField.get(fieldName);
247
169
  }
248
-
249
170
  }
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 {
171
+ }
172
+ };
268
173
 
269
- out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv";
174
+ out["keycloakifyVersion"] = "KEYCLOAKIFY_VERSION_xEdKd3xEdr";
175
+ out["themeVersion"] = "KEYCLOAKIFY_THEME_VERSION_sIgKd3xEdr3dx";
176
+ out["themeType"] = "KEYCLOAKIFY_THEME_TYPE_dExKd3xEdr";
177
+ out["themeName"] = "KEYCLOAKIFY_THEME_NAME_cXxKd3xEer";
178
+ out["pageId"] = "${pageId}";
270
179
 
271
- } catch(error) {
180
+ try {
181
+ out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv";
182
+ } catch(error) { }
272
183
 
273
- }
184
+ return out;
274
185
 
275
- return out;
276
-
277
- })()
186
+ })();
278
187
  <#function ftl_object_to_js_code_declaring_an_object object path>
279
188
 
280
189
  <#local isHash = "">
@@ -298,7 +207,6 @@
298
207
  <#return "ABORT: We can't list keys on this object">
299
208
  </#attempt>
300
209
 
301
-
302
210
  <#local out_seq = []>
303
211
 
304
212
  <#list keys as key>
@@ -367,23 +275,23 @@
367
275
  key == "realmAttributes"
368
276
  )
369
277
  >
370
- <#local out_seq += ["/*If you need '" + path?join(".") + "." + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
278
+ <#local out_seq += ["/*" + path?join(".") + "." + key + " excluded*/"]>
371
279
  <#continue>
372
280
  </#if>
373
281
 
374
282
  <#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
375
283
  <#if (
376
- ["register.ftl", "info.ftl", "login.ftl", "login-update-password.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
284
+ ["register.ftl", "register-user-profile.ftl", "info.ftl", "login.ftl", "login-update-password.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
377
285
  key == "attemptedUsername" && are_same_path(path, ["auth"])
378
286
  )>
379
287
  <#attempt>
380
288
  <#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
381
289
  <#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*/"]>
290
+ <#local out_seq += ["/*" + path?join(".") + "." + key + " excluded*/"]>
383
291
  <#continue>
384
292
  </#if>
385
293
  <#recover>
386
- <#local out_seq += ["/*Testing if attemptedUsername should be skipped throwed an exception */"]>
294
+ <#local out_seq += ["/*Accessing attemptedUsername throwed an exception */"]>
387
295
  </#attempt>
388
296
  </#if>
389
297
 
@@ -459,6 +367,26 @@
459
367
  </#attempt>
460
368
  </#if>
461
369
 
370
+ <#if are_same_path(path, ["url", "getLogoutUrl"])>
371
+ <#local returnValue = "">
372
+ <#attempt>
373
+ <#local returnValue = url.getLogoutUrl()>
374
+ <#recover>
375
+ <#return "ABORT: Couldn't evaluate url.getLogoutUrl()">
376
+ </#attempt>
377
+ <#return 'function(){ return "' + returnValue + '"; }'>
378
+ </#if>
379
+
380
+ <#if are_same_path(path, ["totp", "policy", "getAlgorithmKey"])>
381
+ <#local returnValue = "">
382
+ <#attempt>
383
+ <#local returnValue = totp.policy.getAlgorithmKey()>
384
+ <#recover>
385
+ <#return "ABORT: Couldn't evaluate totp.policy.getAlgorithmKey()">
386
+ </#attempt>
387
+ <#return 'function(){ return "' + returnValue + '"; }'>
388
+ </#if>
389
+
462
390
  <#return "ABORT: It's a method">
463
391
  </#if>
464
392
 
@@ -4,9 +4,10 @@ import { generateCssCodeToDefineGlobals } from "../replacers/replaceImportsInCss
4
4
  import { replaceImportsInInlineCssCode } from "../replacers/replaceImportsInInlineCssCode";
5
5
  import * as fs from "fs";
6
6
  import { join as pathJoin } from "path";
7
- import type { BuildOptions } from "../buildOptions";
7
+ import type { BuildOptions } from "../../shared/buildOptions";
8
8
  import { assert } from "tsafe/assert";
9
- import { type ThemeType, nameOfTheGlobal, basenameOfTheKeycloakifyResourcesDir, resources_common } from "../../constants";
9
+ import { type ThemeType, nameOfTheGlobal, basenameOfTheKeycloakifyResourcesDir, resources_common } from "../../shared/constants";
10
+ import { getThisCodebaseRootDirPath } from "../../tools/getThisCodebaseRootDirPath";
10
11
 
11
12
  export type BuildOptionsLike = {
12
13
  bundler: "vite" | "webpack";
@@ -96,7 +97,9 @@ export function generateFtlFilesCodeFactory(params: {
96
97
 
97
98
  //FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
98
99
  const ftlObjectToJsCodeDeclaringAnObject = fs
99
- .readFileSync(pathJoin(__dirname, "ftl_object_to_js_code_declaring_an_object.ftl"))
100
+ .readFileSync(
101
+ pathJoin(getThisCodebaseRootDirPath(), "src", "bin", "keycloakify", "generateFtl", "ftl_object_to_js_code_declaring_an_object.ftl")
102
+ )
100
103
  .toString("utf8")
101
104
  .match(/^<script>const _=((?:.|\n)+)<\/script>[\n]?$/)![1]
102
105
  .replace("FIELD_NAMES_eKsIY4ZsZ4xeM", fieldNames.map(name => `"${name}"`).join(", "))
@@ -108,7 +111,7 @@ export function generateFtlFilesCodeFactory(params: {
108
111
 
109
112
  const ftlObjectToJsCodeDeclaringAnObjectPlaceholder = '{ "x": "vIdLqMeOed9sdLdIdOxdK0d" }';
110
113
 
111
- $("head").prepend(["<script>", ` window.${nameOfTheGlobal}= ${ftlObjectToJsCodeDeclaringAnObjectPlaceholder};`, "</script>"].join("\n"));
114
+ $("head").prepend(`<script>\nwindow.${nameOfTheGlobal}=${ftlObjectToJsCodeDeclaringAnObjectPlaceholder}</script>`);
112
115
 
113
116
  // Remove part of the document marked as ignored.
114
117
  {
@@ -1,2 +1 @@
1
1
  export * from "./generateFtl";
2
- export * from "./pageId";
@@ -1,23 +1,24 @@
1
1
  import * as fs from "fs";
2
2
  import { join as pathJoin } from "path";
3
3
  import { assert } from "tsafe/assert";
4
- import type { BuildOptions } from "../buildOptions";
5
- import { resources_common, lastKeycloakVersionWithAccountV1, accountV1ThemeName } from "../../constants";
6
- import { downloadBuiltinKeycloakTheme } from "../../download-builtin-keycloak-theme";
4
+ import type { BuildOptions } from "../../shared/buildOptions";
5
+ import { resources_common, lastKeycloakVersionWithAccountV1, accountV1ThemeName } from "../../shared/constants";
6
+ import { downloadBuiltinKeycloakTheme } from "../../shared/downloadBuiltinKeycloakTheme";
7
7
  import { transformCodebase } from "../../tools/transformCodebase";
8
8
  import { rmSync } from "../../tools/fs.rmSync";
9
9
 
10
10
  type BuildOptionsLike = {
11
11
  cacheDirPath: string;
12
12
  npmWorkspaceRootDirPath: string;
13
+ keycloakifyBuildDirPath: string;
13
14
  };
14
15
 
15
16
  assert<BuildOptions extends BuildOptionsLike ? true : false>();
16
17
 
17
- export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike; srcMainResourcesDirPath: string }) {
18
- const { buildOptions, srcMainResourcesDirPath } = params;
18
+ export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike }) {
19
+ const { buildOptions } = params;
19
20
 
20
- const builtinKeycloakThemeTmpDirPath = pathJoin(srcMainResourcesDirPath, "..", "tmp_yxdE2_builtin_keycloak_theme");
21
+ const builtinKeycloakThemeTmpDirPath = pathJoin(buildOptions.cacheDirPath, "bringInAccountV1_tmp");
21
22
 
22
23
  await downloadBuiltinKeycloakTheme({
23
24
  "destDirPath": builtinKeycloakThemeTmpDirPath,
@@ -25,7 +26,7 @@ export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike;
25
26
  buildOptions
26
27
  });
27
28
 
28
- const accountV1DirPath = pathJoin(srcMainResourcesDirPath, "theme", accountV1ThemeName, "account");
29
+ const accountV1DirPath = pathJoin(buildOptions.keycloakifyBuildDirPath, "src", "main", "resources", "theme", accountV1ThemeName, "account");
29
30
 
30
31
  transformCodebase({
31
32
  "srcDirPath": pathJoin(builtinKeycloakThemeTmpDirPath, "base", "account"),
@@ -1,4 +1,4 @@
1
- import type { ThemeType } from "../../constants";
1
+ import type { ThemeType } from "../../shared/constants";
2
2
  import { crawl } from "../../tools/crawl";
3
3
  import { join as pathJoin } from "path";
4
4
  import { readFileSync } from "fs";
@@ -0,0 +1,32 @@
1
+ import type { BuildOptions } from "../../shared/buildOptions";
2
+ import { assert } from "tsafe/assert";
3
+ import {
4
+ generateSrcMainResourcesForMainTheme,
5
+ type BuildOptionsLike as BuildOptionsLike_generateSrcMainResourcesForMainTheme
6
+ } from "./generateSrcMainResourcesForMainTheme";
7
+ import { generateSrcMainResourcesForThemeVariant } from "./generateSrcMainResourcesForThemeVariant";
8
+
9
+ export type BuildOptionsLike = BuildOptionsLike_generateSrcMainResourcesForMainTheme & {
10
+ themeNames: string[];
11
+ };
12
+
13
+ assert<BuildOptions extends BuildOptionsLike ? true : false>();
14
+
15
+ export async function generateSrcMainResources(params: { buildOptions: BuildOptionsLike }): Promise<void> {
16
+ const { buildOptions } = params;
17
+
18
+ const [themeName, ...themeVariantNames] = buildOptions.themeNames;
19
+
20
+ await generateSrcMainResourcesForMainTheme({
21
+ themeName,
22
+ buildOptions
23
+ });
24
+
25
+ for (const themeVariantName of themeVariantNames) {
26
+ generateSrcMainResourcesForThemeVariant({
27
+ themeName,
28
+ themeVariantName,
29
+ buildOptions
30
+ });
31
+ }
32
+ }