keycloakify 10.0.0-rc.37 → 10.0.0-rc.39
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/account/Fallback.d.ts +1 -2
- package/account/Fallback.js.map +1 -1
- package/account/KcContext/KcContext.d.ts +6 -6
- package/account/KcContext/getKcContextMock.d.ts +9 -9
- package/account/KcContext/getKcContextMock.js +3 -3
- package/account/KcContext/getKcContextMock.js.map +1 -1
- package/account/Template.d.ts +1 -2
- package/account/Template.js +7 -6
- package/account/Template.js.map +1 -1
- package/account/TemplateProps.d.ts +1 -3
- package/account/i18n/i18n.d.ts +9 -4
- package/account/i18n/i18n.js +132 -87
- package/account/i18n/i18n.js.map +1 -1
- package/account/i18n/index.d.ts +9 -2
- package/account/i18n/index.js +5 -1
- package/account/i18n/index.js.map +1 -1
- package/account/lib/kcClsx.d.ts +9 -0
- package/account/lib/{useGetClassName.js → kcClsx.js} +3 -3
- package/account/lib/kcClsx.js.map +1 -0
- package/account/pages/Account.d.ts +1 -2
- package/account/pages/Account.js +9 -7
- package/account/pages/Account.js.map +1 -1
- package/account/pages/Applications.d.ts +1 -2
- package/account/pages/Applications.js +7 -7
- package/account/pages/Applications.js.map +1 -1
- package/account/pages/FederatedIdentity.d.ts +1 -2
- package/account/pages/FederatedIdentity.js +4 -3
- package/account/pages/FederatedIdentity.js.map +1 -1
- package/account/pages/Log.d.ts +1 -2
- package/account/pages/Log.js +6 -5
- package/account/pages/Log.js.map +1 -1
- package/account/pages/PageProps.d.ts +2 -4
- package/account/pages/Password.d.ts +1 -2
- package/account/pages/Password.js +10 -9
- package/account/pages/Password.js.map +1 -1
- package/account/pages/Sessions.d.ts +1 -2
- package/account/pages/Sessions.js +6 -6
- package/account/pages/Sessions.js.map +1 -1
- package/account/pages/Totp.d.ts +1 -2
- package/account/pages/Totp.js +6 -5
- package/account/pages/Totp.js.map +1 -1
- package/bin/193.index.js +13 -13
- package/bin/{430.index.js → 214.index.js} +161 -2
- package/bin/3.index.js +165 -149
- package/bin/322.index.js +595 -0
- package/bin/453.index.js +3 -3
- package/bin/526.index.js +42 -632
- package/bin/538.index.js +563 -0
- package/bin/932.index.js +7 -7
- package/bin/{890.index.js → 941.index.js} +2 -159
- package/bin/944.index.js +621 -0
- package/bin/961.index.js +5 -5
- package/bin/97.index.js +3 -3
- package/bin/{314.index.js → 98.index.js} +217 -48
- package/bin/main.js +20 -8
- package/lib/getKcClsx.d.ts +11 -0
- package/lib/getKcClsx.js +55 -0
- package/lib/getKcClsx.js.map +1 -0
- package/login/Fallback.d.ts +2 -2
- package/login/Fallback.js.map +1 -1
- package/login/KcContext/KcContext.d.ts +6 -6
- package/login/KcContext/getKcContextMock.d.ts +9 -9
- package/login/KcContext/getKcContextMock.js +3 -3
- package/login/KcContext/getKcContextMock.js.map +1 -1
- package/login/Template.d.ts +1 -2
- package/login/Template.js +10 -9
- package/login/Template.js.map +1 -1
- package/login/TemplateProps.d.ts +1 -3
- package/login/UserProfileFormFields.d.ts +6 -5
- package/login/UserProfileFormFields.js +35 -36
- package/login/UserProfileFormFields.js.map +1 -1
- package/login/i18n/i18n.d.ts +9 -4
- package/login/i18n/i18n.js +136 -91
- package/login/i18n/i18n.js.map +1 -1
- package/login/i18n/index.d.ts +9 -2
- package/login/i18n/index.js +5 -1
- package/login/i18n/index.js.map +1 -1
- package/login/lib/kcClsx.d.ts +9 -0
- package/login/lib/{useGetClassName.js → kcClsx.js} +3 -3
- package/login/lib/kcClsx.js.map +1 -0
- package/login/lib/useUserProfileForm.d.ts +9 -6
- package/login/lib/useUserProfileForm.js +7 -5
- package/login/lib/useUserProfileForm.js.map +1 -1
- package/login/pages/Code.d.ts +1 -2
- package/login/pages/Code.js +6 -5
- package/login/pages/Code.js.map +1 -1
- package/login/pages/DeleteAccountConfirm.d.ts +1 -2
- package/login/pages/DeleteAccountConfirm.js +7 -7
- package/login/pages/DeleteAccountConfirm.js.map +1 -1
- package/login/pages/DeleteCredential.d.ts +1 -2
- package/login/pages/DeleteCredential.js +6 -6
- package/login/pages/DeleteCredential.js.map +1 -1
- package/login/pages/Error.d.ts +1 -2
- package/login/pages/Error.js +4 -3
- package/login/pages/Error.js.map +1 -1
- package/login/pages/FrontchannelLogout.d.ts +1 -2
- package/login/pages/FrontchannelLogout.js +4 -3
- package/login/pages/FrontchannelLogout.js.map +1 -1
- package/login/pages/IdpReviewUserProfile.d.ts +2 -2
- package/login/pages/IdpReviewUserProfile.js +6 -6
- package/login/pages/IdpReviewUserProfile.js.map +1 -1
- package/login/pages/Info.d.ts +1 -2
- package/login/pages/Info.js +4 -3
- package/login/pages/Info.js.map +1 -1
- package/login/pages/Login.d.ts +1 -2
- package/login/pages/Login.js +10 -8
- package/login/pages/Login.js.map +1 -1
- package/login/pages/LoginConfigTotp.d.ts +1 -2
- package/login/pages/LoginConfigTotp.js +8 -7
- package/login/pages/LoginConfigTotp.js.map +1 -1
- package/login/pages/LoginIdpLinkConfirm.d.ts +1 -2
- package/login/pages/LoginIdpLinkConfirm.js +6 -6
- package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
- package/login/pages/LoginIdpLinkEmail.d.ts +1 -2
- package/login/pages/LoginIdpLinkEmail.js +4 -3
- package/login/pages/LoginIdpLinkEmail.js.map +1 -1
- package/login/pages/LoginOauth2DeviceVerifyUserCode.d.ts +1 -2
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js +6 -6
- package/login/pages/LoginOauth2DeviceVerifyUserCode.js.map +1 -1
- package/login/pages/LoginOauthGrant.d.ts +1 -2
- package/login/pages/LoginOauthGrant.js +7 -7
- package/login/pages/LoginOauthGrant.js.map +1 -1
- package/login/pages/LoginOtp.d.ts +1 -2
- package/login/pages/LoginOtp.js +6 -6
- package/login/pages/LoginOtp.js.map +1 -1
- package/login/pages/LoginPageExpired.d.ts +1 -2
- package/login/pages/LoginPageExpired.js +4 -3
- package/login/pages/LoginPageExpired.js.map +1 -1
- package/login/pages/LoginPassword.d.ts +1 -2
- package/login/pages/LoginPassword.js +9 -7
- package/login/pages/LoginPassword.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeConfig.d.ts +1 -2
- package/login/pages/LoginRecoveryAuthnCodeConfig.js +9 -7
- package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
- package/login/pages/LoginRecoveryAuthnCodeInput.d.ts +1 -2
- package/login/pages/LoginRecoveryAuthnCodeInput.js +6 -6
- package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
- package/login/pages/LoginResetOtp.d.ts +1 -2
- package/login/pages/LoginResetOtp.js +6 -6
- package/login/pages/LoginResetOtp.js.map +1 -1
- package/login/pages/LoginResetPassword.d.ts +1 -2
- package/login/pages/LoginResetPassword.js +7 -7
- package/login/pages/LoginResetPassword.js.map +1 -1
- package/login/pages/LoginUpdatePassword.d.ts +1 -2
- package/login/pages/LoginUpdatePassword.js +10 -9
- package/login/pages/LoginUpdatePassword.js.map +1 -1
- package/login/pages/LoginUpdateProfile.d.ts +2 -2
- package/login/pages/LoginUpdateProfile.js +7 -12
- package/login/pages/LoginUpdateProfile.js.map +1 -1
- package/login/pages/LoginUsername.d.ts +1 -2
- package/login/pages/LoginUsername.js +8 -7
- package/login/pages/LoginUsername.js.map +1 -1
- package/login/pages/LoginVerifyEmail.d.ts +1 -2
- package/login/pages/LoginVerifyEmail.js +4 -3
- package/login/pages/LoginVerifyEmail.js.map +1 -1
- package/login/pages/LoginX509Info.d.ts +1 -2
- package/login/pages/LoginX509Info.js +6 -6
- package/login/pages/LoginX509Info.js.map +1 -1
- package/login/pages/LogoutConfirm.d.ts +1 -2
- package/login/pages/LogoutConfirm.js +6 -6
- package/login/pages/LogoutConfirm.js.map +1 -1
- package/login/pages/PageProps.d.ts +2 -4
- package/login/pages/Register.d.ts +2 -2
- package/login/pages/Register.js +8 -16
- package/login/pages/Register.js.map +1 -1
- package/login/pages/SamlPostForm.d.ts +1 -2
- package/login/pages/SamlPostForm.js +4 -3
- package/login/pages/SamlPostForm.js.map +1 -1
- package/login/pages/SelectAuthenticator.d.ts +1 -2
- package/login/pages/SelectAuthenticator.js +6 -9
- package/login/pages/SelectAuthenticator.js.map +1 -1
- package/login/pages/Terms.d.ts +1 -2
- package/login/pages/Terms.js +6 -6
- package/login/pages/Terms.js.map +1 -1
- package/login/pages/UpdateEmail.d.ts +2 -2
- package/login/pages/UpdateEmail.js +8 -12
- package/login/pages/UpdateEmail.js.map +1 -1
- package/login/pages/WebauthnAuthenticate.d.ts +1 -2
- package/login/pages/WebauthnAuthenticate.js +13 -12
- package/login/pages/WebauthnAuthenticate.js.map +1 -1
- package/login/pages/WebauthnError.d.ts +1 -2
- package/login/pages/WebauthnError.js +7 -7
- package/login/pages/WebauthnError.js.map +1 -1
- package/login/pages/WebauthnRegister.d.ts +1 -2
- package/login/pages/WebauthnRegister.js +9 -8
- package/login/pages/WebauthnRegister.js.map +1 -1
- package/package.json +27 -22
- package/src/account/Fallback.tsx +1 -2
- package/src/account/KcContext/KcContext.ts +7 -7
- package/src/account/KcContext/getKcContextMock.ts +13 -24
- package/src/account/Template.tsx +8 -8
- package/src/account/TemplateProps.ts +1 -6
- package/src/account/i18n/i18n.tsx +204 -125
- package/src/account/i18n/index.ts +10 -2
- package/src/account/lib/{useGetClassName.ts → kcClsx.ts} +6 -2
- package/src/account/pages/Account.tsx +15 -21
- package/src/account/pages/Applications.tsx +8 -9
- package/src/account/pages/FederatedIdentity.tsx +5 -5
- package/src/account/pages/Log.tsx +8 -8
- package/src/account/pages/PageProps.ts +2 -4
- package/src/account/pages/Password.tsx +13 -16
- package/src/account/pages/Sessions.tsx +9 -10
- package/src/account/pages/Totp.tsx +19 -28
- package/src/bin/add-story.ts +3 -3
- package/src/bin/copy-keycloak-resources-to-public.ts +3 -3
- package/src/bin/download-keycloak-default-theme.ts +5 -5
- package/src/bin/eject-page.ts +3 -3
- package/src/bin/initialize-email-theme.ts +5 -5
- package/src/bin/keycloakify/buildJars/buildJar.ts +14 -14
- package/src/bin/keycloakify/buildJars/buildJars.ts +8 -8
- package/src/bin/keycloakify/buildJars/generatePom.ts +9 -9
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +12 -12
- package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +7 -7
- package/src/bin/keycloakify/generateSrcMainResources/generateMessageProperties.ts +2 -66
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +9 -9
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +30 -24
- package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +8 -8
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +9 -9
- package/src/bin/keycloakify/keycloakify.ts +11 -11
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +6 -6
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +7 -7
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +10 -10
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +13 -13
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +11 -11
- package/src/bin/main.ts +17 -2
- package/src/bin/shared/{buildOptions.ts → buildContext.ts} +65 -51
- package/src/bin/shared/copyKeycloakResourcesToPublic.ts +12 -12
- package/src/bin/shared/downloadKeycloakDefaultTheme.ts +7 -7
- package/src/bin/shared/downloadKeycloakStaticResources.ts +7 -7
- package/src/bin/shared/generateKcGenTs.ts +61 -0
- package/src/bin/shared/getThemeSrcDirPath.ts +3 -3
- package/src/bin/start-keycloak/appBuild.ts +11 -11
- package/src/bin/start-keycloak/keycloakifyBuild.ts +7 -7
- package/src/bin/start-keycloak/start-keycloak.ts +34 -22
- package/src/bin/tools/escapeStringForPropertiesFile.ts +64 -0
- package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +3 -3
- package/src/bin/update-kc-gen.ts +13 -0
- package/src/lib/getKcClsx.ts +89 -0
- package/src/login/Fallback.tsx +2 -2
- package/src/login/KcContext/KcContext.ts +7 -7
- package/src/login/KcContext/getKcContextMock.ts +13 -24
- package/src/login/Template.tsx +36 -37
- package/src/login/TemplateProps.ts +1 -6
- package/src/login/UserProfileFormFields.tsx +67 -84
- package/src/login/i18n/i18n.tsx +208 -129
- package/src/login/i18n/index.ts +10 -2
- package/src/login/lib/{useGetClassName.ts → kcClsx.ts} +6 -2
- package/src/login/lib/useUserProfileForm.tsx +29 -21
- package/src/login/pages/Code.tsx +10 -8
- package/src/login/pages/DeleteAccountConfirm.tsx +9 -10
- package/src/login/pages/DeleteCredential.tsx +11 -10
- package/src/login/pages/Error.tsx +5 -5
- package/src/login/pages/FrontchannelLogout.tsx +7 -5
- package/src/login/pages/IdpReviewUserProfile.tsx +18 -21
- package/src/login/pages/Info.tsx +7 -5
- package/src/login/pages/Login.tsx +34 -53
- package/src/login/pages/LoginConfigTotp.tsx +30 -38
- package/src/login/pages/LoginIdpLinkConfirm.tsx +10 -21
- package/src/login/pages/LoginIdpLinkEmail.tsx +5 -5
- package/src/login/pages/LoginOauth2DeviceVerifyUserCode.tsx +19 -24
- package/src/login/pages/LoginOauthGrant.tsx +14 -21
- package/src/login/pages/LoginOtp.tsx +29 -33
- package/src/login/pages/LoginPageExpired.tsx +5 -5
- package/src/login/pages/LoginPassword.tsx +23 -33
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +21 -25
- package/src/login/pages/LoginRecoveryAuthnCodeInput.tsx +21 -25
- package/src/login/pages/LoginResetOtp.tsx +21 -25
- package/src/login/pages/LoginResetPassword.tsx +21 -25
- package/src/login/pages/LoginUpdatePassword.tsx +42 -52
- package/src/login/pages/LoginUpdateProfile.tsx +29 -30
- package/src/login/pages/LoginUsername.tsx +23 -35
- package/src/login/pages/LoginVerifyEmail.tsx +7 -5
- package/src/login/pages/LoginX509Info.tsx +27 -36
- package/src/login/pages/LogoutConfirm.tsx +11 -17
- package/src/login/pages/PageProps.ts +2 -4
- package/src/login/pages/Register.tsx +27 -46
- package/src/login/pages/SamlPostForm.tsx +5 -5
- package/src/login/pages/SelectAuthenticator.tsx +24 -26
- package/src/login/pages/Terms.tsx +9 -16
- package/src/login/pages/UpdateEmail.tsx +29 -33
- package/src/login/pages/WebauthnAuthenticate.tsx +26 -32
- package/src/login/pages/WebauthnError.tsx +11 -22
- package/src/login/pages/WebauthnRegister.tsx +20 -28
- package/src/tools/clsx.ts +6 -48
- package/src/tools/clsx_withTransform.ts +55 -0
- package/src/vite-plugin/vite-plugin.ts +29 -21
- package/tools/clsx.d.ts +3 -2
- package/tools/clsx.js +5 -41
- package/tools/clsx.js.map +1 -1
- package/tools/clsx_withTransform.d.ts +5 -0
- package/tools/clsx_withTransform.js +43 -0
- package/tools/clsx_withTransform.js.map +1 -0
- package/vite-plugin/index.js +243 -102
- package/vite-plugin/vite-plugin.d.ts +3 -3
- package/account/lib/useGetClassName.d.ts +0 -7
- package/account/lib/useGetClassName.js.map +0 -1
- package/bin/795.index.js +0 -1197
- package/lib/isStorybook.d.ts +0 -1
- package/lib/isStorybook.js +0 -3
- package/lib/isStorybook.js.map +0 -1
- package/lib/useGetClassName.d.ts +0 -10
- package/lib/useGetClassName.js +0 -14
- package/lib/useGetClassName.js.map +0 -1
- package/login/lib/useGetClassName.d.ts +0 -7
- package/login/lib/useGetClassName.js.map +0 -1
- package/src/lib/isStorybook.ts +0 -3
- package/src/lib/useGetClassName.ts +0 -27
package/vite-plugin/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
2
2
|
/******/ var __webpack_modules__ = ({
|
3
3
|
|
4
|
-
/***/
|
4
|
+
/***/ 8355:
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
6
6
|
|
7
7
|
"use strict";
|
@@ -10,7 +10,7 @@ __nccwpck_require__.r(__webpack_exports__);
|
|
10
10
|
|
11
11
|
// EXPORTS
|
12
12
|
__nccwpck_require__.d(__webpack_exports__, {
|
13
|
-
"
|
13
|
+
"getBuildContext": () => (/* binding */ getBuildContext)
|
14
14
|
});
|
15
15
|
|
16
16
|
// EXTERNAL MODULE: external "url"
|
@@ -49,9 +49,9 @@ var external_fs_ = __nccwpck_require__(7147);
|
|
49
49
|
|
50
50
|
|
51
51
|
function getNpmWorkspaceRootDirPath(params) {
|
52
|
-
const {
|
52
|
+
const { projectDirPath, dependencyExpected } = params;
|
53
53
|
const npmWorkspaceRootDirPath = (function callee(depth) {
|
54
|
-
const cwd = (0,external_path_.resolve)((0,external_path_.join)(...[
|
54
|
+
const cwd = (0,external_path_.resolve)((0,external_path_.join)(...[projectDirPath, ...Array(depth).fill("..")]));
|
55
55
|
(0,assert.assert)(cwd !== external_path_.sep, "NPM workspace not found");
|
56
56
|
try {
|
57
57
|
external_child_process_.execSync("npm config get", {
|
@@ -4053,7 +4053,7 @@ var z = /*#__PURE__*/Object.freeze({
|
|
4053
4053
|
var tsafe = __nccwpck_require__(1666);
|
4054
4054
|
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
4055
4055
|
var constants = __nccwpck_require__(173);
|
4056
|
-
;// CONCATENATED MODULE: ./dist/bin/shared/
|
4056
|
+
;// CONCATENATED MODULE: ./dist/bin/shared/buildContext.js
|
4057
4057
|
|
4058
4058
|
|
4059
4059
|
|
@@ -4063,26 +4063,26 @@ var constants = __nccwpck_require__(173);
|
|
4063
4063
|
|
4064
4064
|
|
4065
4065
|
|
4066
|
-
function
|
4067
|
-
var _a, _b, _c, _d, _e;
|
4066
|
+
function getBuildContext(params) {
|
4067
|
+
var _a, _b, _c, _d, _e, _f;
|
4068
4068
|
const { cliCommandOptions } = params;
|
4069
|
-
const
|
4070
|
-
if (cliCommandOptions.
|
4069
|
+
const projectDirPath = (() => {
|
4070
|
+
if (cliCommandOptions.projectDirPath === undefined) {
|
4071
4071
|
return process.cwd();
|
4072
4072
|
}
|
4073
4073
|
return getAbsoluteAndInOsFormatPath({
|
4074
|
-
pathIsh: cliCommandOptions.
|
4074
|
+
pathIsh: cliCommandOptions.projectDirPath,
|
4075
4075
|
cwd: process.cwd()
|
4076
4076
|
});
|
4077
4077
|
})();
|
4078
4078
|
const { resolvedViteConfig } = (() => {
|
4079
|
-
if (external_fs_.readdirSync(
|
4079
|
+
if (external_fs_.readdirSync(projectDirPath)
|
4080
4080
|
.find(fileBasename => fileBasename.startsWith("vite.config")) ===
|
4081
4081
|
undefined) {
|
4082
4082
|
return { resolvedViteConfig: undefined };
|
4083
4083
|
}
|
4084
4084
|
const output = external_child_process_.execSync("npx vite", {
|
4085
|
-
cwd:
|
4085
|
+
cwd: projectDirPath,
|
4086
4086
|
env: Object.assign(Object.assign({}, process.env), { [constants.vitePluginSubScriptEnvNames.resolveViteConfig]: "true" })
|
4087
4087
|
})
|
4088
4088
|
.toString("utf8");
|
@@ -4103,7 +4103,7 @@ function readBuildOptions(params) {
|
|
4103
4103
|
artifactId: z.string().optional(),
|
4104
4104
|
groupId: z.string().optional(),
|
4105
4105
|
loginThemeResourcesFromKeycloakVersion: z.string().optional(),
|
4106
|
-
|
4106
|
+
projectBuildDirPath: z.string().optional(),
|
4107
4107
|
keycloakifyBuildDirPath: z.string().optional(),
|
4108
4108
|
themeName: z.union([z.string(), z.array(z.string())]).optional()
|
4109
4109
|
})
|
@@ -4113,12 +4113,11 @@ function readBuildOptions(params) {
|
|
4113
4113
|
(0,tsafe.assert)();
|
4114
4114
|
(0,tsafe.assert)();
|
4115
4115
|
}
|
4116
|
-
return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(
|
4117
|
-
.toString("utf8")));
|
4116
|
+
return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(projectDirPath, "package.json")).toString("utf8")));
|
4118
4117
|
})();
|
4119
|
-
const
|
4118
|
+
const buildOptions = Object.assign(Object.assign({}, parsedPackageJson.keycloakify), resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildOptions);
|
4120
4119
|
const themeNames = (() => {
|
4121
|
-
if (
|
4120
|
+
if (buildOptions.themeName === undefined) {
|
4122
4121
|
return [
|
4123
4122
|
parsedPackageJson.name
|
4124
4123
|
.replace(/^@(.*)/, "$1")
|
@@ -4126,56 +4125,56 @@ function readBuildOptions(params) {
|
|
4126
4125
|
.join("-")
|
4127
4126
|
];
|
4128
4127
|
}
|
4129
|
-
if (typeof
|
4130
|
-
return [
|
4128
|
+
if (typeof buildOptions.themeName === "string") {
|
4129
|
+
return [buildOptions.themeName];
|
4131
4130
|
}
|
4132
|
-
return
|
4131
|
+
return buildOptions.themeName;
|
4133
4132
|
})();
|
4134
|
-
const
|
4133
|
+
const projectBuildDirPath = (() => {
|
4135
4134
|
var _a;
|
4136
4135
|
webpack: {
|
4137
4136
|
if (resolvedViteConfig !== undefined) {
|
4138
4137
|
break webpack;
|
4139
4138
|
}
|
4140
|
-
if (((_a = parsedPackageJson.keycloakify) === null || _a === void 0 ? void 0 : _a.
|
4139
|
+
if (((_a = parsedPackageJson.keycloakify) === null || _a === void 0 ? void 0 : _a.projectBuildDirPath) !== undefined) {
|
4141
4140
|
return getAbsoluteAndInOsFormatPath({
|
4142
|
-
pathIsh: parsedPackageJson.keycloakify.
|
4143
|
-
cwd:
|
4141
|
+
pathIsh: parsedPackageJson.keycloakify.projectBuildDirPath,
|
4142
|
+
cwd: projectDirPath
|
4144
4143
|
});
|
4145
4144
|
}
|
4146
|
-
return (0,external_path_.join)(
|
4145
|
+
return (0,external_path_.join)(projectDirPath, "build");
|
4147
4146
|
}
|
4148
|
-
return (0,external_path_.join)(
|
4147
|
+
return (0,external_path_.join)(projectDirPath, resolvedViteConfig.buildDir);
|
4149
4148
|
})();
|
4150
4149
|
const { npmWorkspaceRootDirPath } = getNpmWorkspaceRootDirPath({
|
4151
|
-
|
4150
|
+
projectDirPath,
|
4152
4151
|
dependencyExpected: "keycloakify"
|
4153
4152
|
});
|
4154
4153
|
return {
|
4155
4154
|
bundler: resolvedViteConfig !== undefined ? "vite" : "webpack",
|
4156
4155
|
themeVersion: (_b = (_a = process.env.KEYCLOAKIFY_THEME_VERSION) !== null && _a !== void 0 ? _a : parsedPackageJson.version) !== null && _b !== void 0 ? _b : "0.0.0",
|
4157
4156
|
themeNames,
|
4158
|
-
extraThemeProperties:
|
4157
|
+
extraThemeProperties: buildOptions.extraThemeProperties,
|
4159
4158
|
groupId: (() => {
|
4160
4159
|
var _a, _b, _c, _d, _e;
|
4161
4160
|
const fallbackGroupId = `${themeNames[0]}.keycloak`;
|
4162
|
-
return ((_b = (_a = process.env.KEYCLOAKIFY_GROUP_ID) !== null && _a !== void 0 ? _a :
|
4161
|
+
return ((_b = (_a = process.env.KEYCLOAKIFY_GROUP_ID) !== null && _a !== void 0 ? _a : buildOptions.groupId) !== null && _b !== void 0 ? _b : (parsedPackageJson.homepage === undefined
|
4163
4162
|
? fallbackGroupId
|
4164
4163
|
: (_e = (_d = (_c = (0,external_url_.parse)(parsedPackageJson.homepage)
|
4165
4164
|
.host) === null || _c === void 0 ? void 0 : _c.replace(/:[0-9]+$/, "")) === null || _d === void 0 ? void 0 : _d.split(".").reverse().join(".")) !== null && _e !== void 0 ? _e : fallbackGroupId) + ".keycloak");
|
4166
4165
|
})(),
|
4167
|
-
artifactId: (_d = (_c = process.env.KEYCLOAKIFY_ARTIFACT_ID) !== null && _c !== void 0 ? _c :
|
4168
|
-
loginThemeResourcesFromKeycloakVersion: (_e =
|
4169
|
-
|
4170
|
-
|
4166
|
+
artifactId: (_d = (_c = process.env.KEYCLOAKIFY_ARTIFACT_ID) !== null && _c !== void 0 ? _c : buildOptions.artifactId) !== null && _d !== void 0 ? _d : `${themeNames[0]}-keycloak-theme`,
|
4167
|
+
loginThemeResourcesFromKeycloakVersion: (_e = buildOptions.loginThemeResourcesFromKeycloakVersion) !== null && _e !== void 0 ? _e : "24.0.4",
|
4168
|
+
projectDirPath,
|
4169
|
+
projectBuildDirPath,
|
4171
4170
|
keycloakifyBuildDirPath: (() => {
|
4172
|
-
if (
|
4171
|
+
if (buildOptions.keycloakifyBuildDirPath !== undefined) {
|
4173
4172
|
return getAbsoluteAndInOsFormatPath({
|
4174
|
-
pathIsh:
|
4175
|
-
cwd:
|
4173
|
+
pathIsh: buildOptions.keycloakifyBuildDirPath,
|
4174
|
+
cwd: projectDirPath
|
4176
4175
|
});
|
4177
4176
|
}
|
4178
|
-
return (0,external_path_.join)(
|
4177
|
+
return (0,external_path_.join)(projectDirPath, (resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildDir) === undefined
|
4179
4178
|
? "build_keycloak"
|
4180
4179
|
: `${resolvedViteConfig.buildDir}_keycloak`);
|
4181
4180
|
})(),
|
@@ -4187,12 +4186,12 @@ function readBuildOptions(params) {
|
|
4187
4186
|
if (process.env.PUBLIC_DIR_PATH !== undefined) {
|
4188
4187
|
return getAbsoluteAndInOsFormatPath({
|
4189
4188
|
pathIsh: process.env.PUBLIC_DIR_PATH,
|
4190
|
-
cwd:
|
4189
|
+
cwd: projectDirPath
|
4191
4190
|
});
|
4192
4191
|
}
|
4193
|
-
return (0,external_path_.join)(
|
4192
|
+
return (0,external_path_.join)(projectDirPath, "public");
|
4194
4193
|
}
|
4195
|
-
return (0,external_path_.join)(
|
4194
|
+
return (0,external_path_.join)(projectDirPath, resolvedViteConfig.publicDir);
|
4196
4195
|
})(),
|
4197
4196
|
cacheDirPath: (() => {
|
4198
4197
|
const cacheDirPath = (0,external_path_.join)((() => {
|
@@ -4229,15 +4228,28 @@ function readBuildOptions(params) {
|
|
4229
4228
|
if (resolvedViteConfig !== undefined) {
|
4230
4229
|
break webpack;
|
4231
4230
|
}
|
4232
|
-
return (0,external_path_.join)(
|
4231
|
+
return (0,external_path_.join)(projectBuildDirPath, "static");
|
4233
4232
|
}
|
4234
|
-
return (0,external_path_.join)(
|
4233
|
+
return (0,external_path_.join)(projectBuildDirPath, resolvedViteConfig.assetsDir);
|
4235
4234
|
})(),
|
4236
4235
|
npmWorkspaceRootDirPath,
|
4237
|
-
kcContextExclusionsFtlCode:
|
4236
|
+
kcContextExclusionsFtlCode: (() => {
|
4237
|
+
if (buildOptions.kcContextExclusionsFtl === undefined) {
|
4238
|
+
return undefined;
|
4239
|
+
}
|
4240
|
+
if (buildOptions.kcContextExclusionsFtl.endsWith(".ftl")) {
|
4241
|
+
const kcContextExclusionsFtlPath = getAbsoluteAndInOsFormatPath({
|
4242
|
+
pathIsh: buildOptions.kcContextExclusionsFtl,
|
4243
|
+
cwd: projectDirPath
|
4244
|
+
});
|
4245
|
+
return external_fs_.readFileSync(kcContextExclusionsFtlPath).toString("utf8");
|
4246
|
+
}
|
4247
|
+
return buildOptions.kcContextExclusionsFtl;
|
4248
|
+
})(),
|
4249
|
+
environmentVariables: (_f = buildOptions.environmentVariables) !== null && _f !== void 0 ? _f : []
|
4238
4250
|
};
|
4239
4251
|
}
|
4240
|
-
//# sourceMappingURL=
|
4252
|
+
//# sourceMappingURL=buildContext.js.map
|
4241
4253
|
|
4242
4254
|
/***/ }),
|
4243
4255
|
|
@@ -4324,7 +4336,7 @@ const containerName = "keycloak-keycloakify";
|
|
4324
4336
|
|
4325
4337
|
/***/ }),
|
4326
4338
|
|
4327
|
-
/***/
|
4339
|
+
/***/ 8047:
|
4328
4340
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
4329
4341
|
|
4330
4342
|
"use strict";
|
@@ -4341,32 +4353,8 @@ var external_fs_ = __nccwpck_require__(7147);
|
|
4341
4353
|
var external_fs_default = /*#__PURE__*/__nccwpck_require__.n(external_fs_);
|
4342
4354
|
// EXTERNAL MODULE: external "path"
|
4343
4355
|
var external_path_ = __nccwpck_require__(1017);
|
4344
|
-
|
4345
|
-
|
4346
|
-
|
4347
|
-
const crawlRec = (dirPath, filePaths) => {
|
4348
|
-
for (const basename of external_fs_.readdirSync(dirPath)) {
|
4349
|
-
const fileOrDirPath = (0,external_path_.join)(dirPath, basename);
|
4350
|
-
if (external_fs_.lstatSync(fileOrDirPath).isDirectory()) {
|
4351
|
-
crawlRec(fileOrDirPath, filePaths);
|
4352
|
-
continue;
|
4353
|
-
}
|
4354
|
-
filePaths.push(fileOrDirPath);
|
4355
|
-
}
|
4356
|
-
};
|
4357
|
-
/** List all files in a given directory return paths relative to the dir_path */
|
4358
|
-
function crawl(params) {
|
4359
|
-
const { dirPath, returnedPathsType } = params;
|
4360
|
-
const filePaths = [];
|
4361
|
-
crawlRec(dirPath, filePaths);
|
4362
|
-
switch (returnedPathsType) {
|
4363
|
-
case "absolute":
|
4364
|
-
return filePaths;
|
4365
|
-
case "relative to dirPath":
|
4366
|
-
return filePaths.map(filePath => (0,external_path_.relative)(dirPath, filePath));
|
4367
|
-
}
|
4368
|
-
}
|
4369
|
-
//# sourceMappingURL=crawl.js.map
|
4356
|
+
// EXTERNAL MODULE: ./dist/bin/tools/crawl.js
|
4357
|
+
var crawl = __nccwpck_require__(3036);
|
4370
4358
|
// EXTERNAL MODULE: ./dist/bin/tools/SemVer.js
|
4371
4359
|
var SemVer = __nccwpck_require__(2171);
|
4372
4360
|
;// CONCATENATED MODULE: ./dist/bin/tools/fs.rmSync.js
|
@@ -4418,7 +4406,7 @@ function transformCodebase(params) {
|
|
4418
4406
|
external_fs_.mkdirSync(destDirPath, {
|
4419
4407
|
recursive: true
|
4420
4408
|
});
|
4421
|
-
for (const fileRelativePath of crawl({
|
4409
|
+
for (const fileRelativePath of (0,crawl/* crawl */.J)({
|
4422
4410
|
dirPath: srcDirPath,
|
4423
4411
|
returnedPathsType: "relative to dirPath"
|
4424
4412
|
})) {
|
@@ -4833,11 +4821,11 @@ function isInside(params) {
|
|
4833
4821
|
|
4834
4822
|
(0,assert.assert)();
|
4835
4823
|
async function downloadKeycloakDefaultTheme(params) {
|
4836
|
-
const { keycloakVersion,
|
4824
|
+
const { keycloakVersion, buildContext } = params;
|
4837
4825
|
const { extractedDirPath } = await downloadAndExtractArchive({
|
4838
4826
|
url: `https://repo1.maven.org/maven2/org/keycloak/keycloak-themes/${keycloakVersion}/keycloak-themes-${keycloakVersion}.jar`,
|
4839
|
-
cacheDirPath:
|
4840
|
-
npmWorkspaceRootDirPath:
|
4827
|
+
cacheDirPath: buildContext.cacheDirPath,
|
4828
|
+
npmWorkspaceRootDirPath: buildContext.npmWorkspaceRootDirPath,
|
4841
4829
|
uniqueIdOfOnOnArchiveFile: "downloadKeycloakDefaultTheme",
|
4842
4830
|
onArchiveFile: async (params) => {
|
4843
4831
|
if (!isInside({ dirPath: "theme", filePath: params.fileRelativePath })) {
|
@@ -4952,10 +4940,10 @@ async function downloadKeycloakDefaultTheme(params) {
|
|
4952
4940
|
|
4953
4941
|
(0,assert.assert)();
|
4954
4942
|
async function downloadKeycloakStaticResources(params) {
|
4955
|
-
const { themeType, themeDirPath, keycloakVersion,
|
4943
|
+
const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
|
4956
4944
|
const { defaultThemeDirPath } = await downloadKeycloakDefaultTheme({
|
4957
4945
|
keycloakVersion,
|
4958
|
-
|
4946
|
+
buildContext
|
4959
4947
|
});
|
4960
4948
|
const resourcesDirPath = (0,external_path_.join)(themeDirPath, themeType, "resources");
|
4961
4949
|
repatriate_base_resources: {
|
@@ -5017,16 +5005,16 @@ function readThisNpmPackageVersion() {
|
|
5017
5005
|
|
5018
5006
|
(0,assert.assert)();
|
5019
5007
|
async function copyKeycloakResourcesToPublic(params) {
|
5020
|
-
const {
|
5021
|
-
const destDirPath = (0,external_path_.join)(
|
5008
|
+
const { buildContext } = params;
|
5009
|
+
const destDirPath = (0,external_path_.join)(buildContext.publicDirPath, constants.keycloak_resources);
|
5022
5010
|
const keycloakifyBuildinfoFilePath = (0,external_path_.join)(destDirPath, "keycloakify.buildinfo");
|
5023
5011
|
const keycloakifyBuildinfoRaw = JSON.stringify({
|
5024
5012
|
destDirPath,
|
5025
5013
|
keycloakifyVersion: readThisNpmPackageVersion(),
|
5026
|
-
|
5014
|
+
buildContext: {
|
5027
5015
|
loginThemeResourcesFromKeycloakVersion: readThisNpmPackageVersion(),
|
5028
|
-
cacheDirPath: (0,external_path_.relative)(destDirPath,
|
5029
|
-
npmWorkspaceRootDirPath: (0,external_path_.relative)(destDirPath,
|
5016
|
+
cacheDirPath: (0,external_path_.relative)(destDirPath, buildContext.cacheDirPath),
|
5017
|
+
npmWorkspaceRootDirPath: (0,external_path_.relative)(destDirPath, buildContext.npmWorkspaceRootDirPath)
|
5030
5018
|
}
|
5031
5019
|
}, null, 2);
|
5032
5020
|
skip_if_already_done: {
|
@@ -5048,14 +5036,14 @@ async function copyKeycloakResourcesToPublic(params) {
|
|
5048
5036
|
keycloakVersion: (() => {
|
5049
5037
|
switch (themeType) {
|
5050
5038
|
case "login":
|
5051
|
-
return
|
5039
|
+
return buildContext.loginThemeResourcesFromKeycloakVersion;
|
5052
5040
|
case "account":
|
5053
5041
|
return constants.lastKeycloakVersionWithAccountV1;
|
5054
5042
|
}
|
5055
5043
|
})(),
|
5056
5044
|
themeType,
|
5057
5045
|
themeDirPath: destDirPath,
|
5058
|
-
|
5046
|
+
buildContext
|
5059
5047
|
});
|
5060
5048
|
}
|
5061
5049
|
external_fs_.writeFileSync((0,external_path_.join)(destDirPath, "README.txt"), Buffer.from(
|
@@ -5071,6 +5059,113 @@ async function copyKeycloakResourcesToPublic(params) {
|
|
5071
5059
|
|
5072
5060
|
/***/ }),
|
5073
5061
|
|
5062
|
+
/***/ 7733:
|
5063
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5064
|
+
|
5065
|
+
"use strict";
|
5066
|
+
// ESM COMPAT FLAG
|
5067
|
+
__nccwpck_require__.r(__webpack_exports__);
|
5068
|
+
|
5069
|
+
// EXPORTS
|
5070
|
+
__nccwpck_require__.d(__webpack_exports__, {
|
5071
|
+
"generateKcGenTs": () => (/* binding */ generateKcGenTs)
|
5072
|
+
});
|
5073
|
+
|
5074
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/assert.js
|
5075
|
+
var assert = __nccwpck_require__(8078);
|
5076
|
+
// EXTERNAL MODULE: external "fs"
|
5077
|
+
var external_fs_ = __nccwpck_require__(7147);
|
5078
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/index.js
|
5079
|
+
var tsafe = __nccwpck_require__(1666);
|
5080
|
+
// EXTERNAL MODULE: ./dist/bin/tools/crawl.js
|
5081
|
+
var crawl = __nccwpck_require__(3036);
|
5082
|
+
// EXTERNAL MODULE: external "path"
|
5083
|
+
var external_path_ = __nccwpck_require__(1017);
|
5084
|
+
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
5085
|
+
var constants = __nccwpck_require__(173);
|
5086
|
+
;// CONCATENATED MODULE: ./dist/bin/shared/getThemeSrcDirPath.js
|
5087
|
+
|
5088
|
+
|
5089
|
+
|
5090
|
+
|
5091
|
+
|
5092
|
+
const themeSrcDirBasenames = ["keycloak-theme", "keycloak_theme"];
|
5093
|
+
/** Can't catch error, if the directory isn't found, this function will just exit the process with an error message. */
|
5094
|
+
function getThemeSrcDirPath(params) {
|
5095
|
+
const { projectDirPath } = params;
|
5096
|
+
const srcDirPath = (0,external_path_.join)(projectDirPath, "src");
|
5097
|
+
const themeSrcDirPath = (0,crawl/* crawl */.J)({
|
5098
|
+
dirPath: srcDirPath,
|
5099
|
+
returnedPathsType: "relative to dirPath"
|
5100
|
+
})
|
5101
|
+
.map(fileRelativePath => {
|
5102
|
+
for (const themeSrcDirBasename of themeSrcDirBasenames) {
|
5103
|
+
const split = fileRelativePath.split(themeSrcDirBasename);
|
5104
|
+
if (split.length === 2) {
|
5105
|
+
return (0,external_path_.join)(srcDirPath, split[0] + themeSrcDirBasename);
|
5106
|
+
}
|
5107
|
+
}
|
5108
|
+
return undefined;
|
5109
|
+
})
|
5110
|
+
.filter((0,tsafe.exclude)(undefined))[0];
|
5111
|
+
if (themeSrcDirPath !== undefined) {
|
5112
|
+
return { themeSrcDirPath };
|
5113
|
+
}
|
5114
|
+
for (const themeType of [...constants.themeTypes, "email"]) {
|
5115
|
+
if (!external_fs_.existsSync((0,external_path_.join)(srcDirPath, themeType))) {
|
5116
|
+
continue;
|
5117
|
+
}
|
5118
|
+
return { themeSrcDirPath: srcDirPath };
|
5119
|
+
}
|
5120
|
+
console.error([
|
5121
|
+
"Can't locate your theme source directory. It should be either: ",
|
5122
|
+
"src/ or src/keycloak-theme or src/keycloak_theme.",
|
5123
|
+
"Example in the starter: https://github.com/keycloakify/keycloakify-starter/tree/main/src/keycloak-theme"
|
5124
|
+
].join("\n"));
|
5125
|
+
process.exit(-1);
|
5126
|
+
}
|
5127
|
+
//# sourceMappingURL=getThemeSrcDirPath.js.map
|
5128
|
+
// EXTERNAL MODULE: external "fs/promises"
|
5129
|
+
var promises_ = __nccwpck_require__(3292);
|
5130
|
+
;// CONCATENATED MODULE: ./dist/bin/shared/generateKcGenTs.js
|
5131
|
+
|
5132
|
+
|
5133
|
+
|
5134
|
+
|
5135
|
+
(0,assert.assert)();
|
5136
|
+
async function generateKcGenTs(params) {
|
5137
|
+
const { buildContext } = params;
|
5138
|
+
const { themeSrcDirPath } = getThemeSrcDirPath({
|
5139
|
+
projectDirPath: buildContext.projectDirPath
|
5140
|
+
});
|
5141
|
+
await promises_.writeFile((0,external_path_.join)(themeSrcDirPath, "kc.gen.ts"), Buffer.from([
|
5142
|
+
`/* prettier-ignore-start */`,
|
5143
|
+
``,
|
5144
|
+
`/* eslint-disable */`,
|
5145
|
+
``,
|
5146
|
+
`// @ts-nocheck`,
|
5147
|
+
``,
|
5148
|
+
`// noinspection JSUnusedGlobalSymbols`,
|
5149
|
+
``,
|
5150
|
+
`// This file is auto-generated by Keycloakify`,
|
5151
|
+
``,
|
5152
|
+
`export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(" | ")};`,
|
5153
|
+
``,
|
5154
|
+
`export const themeNames: ThemeName[] = [${buildContext.themeNames.map(themeName => `"${themeName}"`).join(", ")}];`,
|
5155
|
+
``,
|
5156
|
+
`export type KcEnvName = ${buildContext.environmentVariables.length === 0 ? "never" : buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(" | ")};`,
|
5157
|
+
``,
|
5158
|
+
`export const KcEnvNames: KcEnvName[] = [${buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(", ")}];`,
|
5159
|
+
``,
|
5160
|
+
`export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(Object.fromEntries(buildContext.environmentVariables.map(({ name, default: defaultValue }) => [name, defaultValue])), null, 2)};`,
|
5161
|
+
``,
|
5162
|
+
`/* prettier-ignore-end */`
|
5163
|
+
].join("\n"), "utf8"));
|
5164
|
+
}
|
5165
|
+
//# sourceMappingURL=generateKcGenTs.js.map
|
5166
|
+
|
5167
|
+
/***/ }),
|
5168
|
+
|
5074
5169
|
/***/ 2171:
|
5075
5170
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5076
5171
|
|
@@ -5157,6 +5252,45 @@ var SemVer;
|
|
5157
5252
|
|
5158
5253
|
/***/ }),
|
5159
5254
|
|
5255
|
+
/***/ 3036:
|
5256
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5257
|
+
|
5258
|
+
"use strict";
|
5259
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
5260
|
+
/* harmony export */ "J": () => (/* binding */ crawl)
|
5261
|
+
/* harmony export */ });
|
5262
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7147);
|
5263
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
5264
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(1017);
|
5265
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
5266
|
+
|
5267
|
+
|
5268
|
+
const crawlRec = (dirPath, filePaths) => {
|
5269
|
+
for (const basename of fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync(dirPath)) {
|
5270
|
+
const fileOrDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(dirPath, basename);
|
5271
|
+
if (fs__WEBPACK_IMPORTED_MODULE_0__.lstatSync(fileOrDirPath).isDirectory()) {
|
5272
|
+
crawlRec(fileOrDirPath, filePaths);
|
5273
|
+
continue;
|
5274
|
+
}
|
5275
|
+
filePaths.push(fileOrDirPath);
|
5276
|
+
}
|
5277
|
+
};
|
5278
|
+
/** List all files in a given directory return paths relative to the dir_path */
|
5279
|
+
function crawl(params) {
|
5280
|
+
const { dirPath, returnedPathsType } = params;
|
5281
|
+
const filePaths = [];
|
5282
|
+
crawlRec(dirPath, filePaths);
|
5283
|
+
switch (returnedPathsType) {
|
5284
|
+
case "absolute":
|
5285
|
+
return filePaths;
|
5286
|
+
case "relative to dirPath":
|
5287
|
+
return filePaths.map(filePath => (0,path__WEBPACK_IMPORTED_MODULE_1__.relative)(dirPath, filePath));
|
5288
|
+
}
|
5289
|
+
}
|
5290
|
+
//# sourceMappingURL=crawl.js.map
|
5291
|
+
|
5292
|
+
/***/ }),
|
5293
|
+
|
5160
5294
|
/***/ 8699:
|
5161
5295
|
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
|
5162
5296
|
|
@@ -5248,13 +5382,14 @@ const path_1 = __nccwpck_require__(1017);
|
|
5248
5382
|
const constants_1 = __nccwpck_require__(173);
|
5249
5383
|
const id_1 = __nccwpck_require__(3047);
|
5250
5384
|
const fs_rm_1 = __nccwpck_require__(8699);
|
5251
|
-
const copyKeycloakResourcesToPublic_1 = __nccwpck_require__(
|
5385
|
+
const copyKeycloakResourcesToPublic_1 = __nccwpck_require__(8047);
|
5252
5386
|
const assert_1 = __nccwpck_require__(8078);
|
5253
|
-
const
|
5387
|
+
const buildContext_1 = __nccwpck_require__(8355);
|
5254
5388
|
const magic_string_1 = __importDefault(__nccwpck_require__(5734));
|
5389
|
+
const generateKcGenTs_1 = __nccwpck_require__(7733);
|
5255
5390
|
function keycloakify(params) {
|
5256
|
-
const { postBuild, ...
|
5257
|
-
let
|
5391
|
+
const { postBuild, ...buildOptions } = params !== null && params !== void 0 ? params : {};
|
5392
|
+
let projectDirPath = undefined;
|
5258
5393
|
let urlPathname = undefined;
|
5259
5394
|
let buildDirPath = undefined;
|
5260
5395
|
let command = undefined;
|
@@ -5268,12 +5403,12 @@ function keycloakify(params) {
|
|
5268
5403
|
if (envValue === undefined) {
|
5269
5404
|
break run_post_build_script_case;
|
5270
5405
|
}
|
5271
|
-
const
|
5272
|
-
await (postBuild === null || postBuild === void 0 ? void 0 : postBuild(
|
5406
|
+
const buildContext = JSON.parse(envValue);
|
5407
|
+
await (postBuild === null || postBuild === void 0 ? void 0 : postBuild(buildContext));
|
5273
5408
|
process.exit(0);
|
5274
5409
|
}
|
5275
5410
|
command = resolvedConfig.command;
|
5276
|
-
|
5411
|
+
projectDirPath = resolvedConfig.root;
|
5277
5412
|
urlPathname = (() => {
|
5278
5413
|
var _a;
|
5279
5414
|
let out = resolvedConfig.env.BASE_URL;
|
@@ -5296,7 +5431,7 @@ function keycloakify(params) {
|
|
5296
5431
|
}
|
5297
5432
|
return out;
|
5298
5433
|
})();
|
5299
|
-
buildDirPath = (0, path_1.join)(
|
5434
|
+
buildDirPath = (0, path_1.join)(projectDirPath, resolvedConfig.build.outDir);
|
5300
5435
|
resolve_vite_config_case: {
|
5301
5436
|
const envValue = process.env[constants_1.vitePluginSubScriptEnvNames.resolveViteConfig];
|
5302
5437
|
if (envValue === undefined) {
|
@@ -5304,21 +5439,27 @@ function keycloakify(params) {
|
|
5304
5439
|
}
|
5305
5440
|
console.log(constants_1.vitePluginSubScriptEnvNames.resolveViteConfig);
|
5306
5441
|
console.log(JSON.stringify((0, id_1.id)({
|
5307
|
-
publicDir: (0, path_1.relative)(
|
5442
|
+
publicDir: (0, path_1.relative)(projectDirPath, resolvedConfig.publicDir),
|
5308
5443
|
assetsDir: resolvedConfig.build.assetsDir,
|
5309
5444
|
buildDir: resolvedConfig.build.outDir,
|
5310
5445
|
urlPathname,
|
5311
|
-
|
5446
|
+
buildOptions
|
5312
5447
|
})));
|
5313
5448
|
process.exit(0);
|
5314
5449
|
}
|
5315
|
-
|
5316
|
-
|
5317
|
-
|
5318
|
-
|
5319
|
-
}
|
5320
|
-
})
|
5450
|
+
const buildContext = (0, buildContext_1.getBuildContext)({
|
5451
|
+
cliCommandOptions: {
|
5452
|
+
projectDirPath
|
5453
|
+
}
|
5321
5454
|
});
|
5455
|
+
await Promise.all([
|
5456
|
+
(0, copyKeycloakResourcesToPublic_1.copyKeycloakResourcesToPublic)({
|
5457
|
+
buildContext
|
5458
|
+
}),
|
5459
|
+
(0, generateKcGenTs_1.generateKcGenTs)({
|
5460
|
+
buildContext
|
5461
|
+
})
|
5462
|
+
]);
|
5322
5463
|
},
|
5323
5464
|
transform: (code, id) => {
|
5324
5465
|
(0, assert_1.assert)(command !== undefined);
|
@@ -5326,9 +5467,9 @@ function keycloakify(params) {
|
|
5326
5467
|
if (command !== "build") {
|
5327
5468
|
return;
|
5328
5469
|
}
|
5329
|
-
(0, assert_1.assert)(
|
5470
|
+
(0, assert_1.assert)(projectDirPath !== undefined);
|
5330
5471
|
{
|
5331
|
-
const isWithinSourceDirectory = id.startsWith((0, path_1.join)(
|
5472
|
+
const isWithinSourceDirectory = id.startsWith((0, path_1.join)(projectDirPath, "src") + path_1.sep);
|
5332
5473
|
if (!isWithinSourceDirectory) {
|
5333
5474
|
return;
|
5334
5475
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { type
|
2
|
-
export type Params =
|
3
|
-
postBuild?: (
|
1
|
+
import { type BuildContext, type BuildOptions } from "../bin/shared/buildContext";
|
2
|
+
export type Params = BuildOptions & {
|
3
|
+
postBuild?: (buildContext: Omit<BuildContext, "bundler">) => Promise<void>;
|
4
4
|
};
|
5
5
|
export declare function keycloakify(params?: Params): any;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useGetClassName.js","sourceRoot":"","sources":["../../src/account/lib/useGetClassName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,kBAAkB,CAAW;IAC5D,cAAc,EAAE;QACZ,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,SAAS;QACtB,aAAa,EAAE,KAAK;QACpB,qBAAqB,EAAE,KAAK;QAC5B,oBAAoB,EAAE,aAAa;QACnC,kBAAkB,EAAE,QAAQ;QAC5B,oBAAoB,EAAE,aAAa;QACnC,WAAW,EAAE,iBAAiB;QAC9B,gBAAgB,EAAE,YAAY;QAC9B,mBAAmB,EAAE,yCAAyC;QAC9D,YAAY,EAAE,eAAe;QAC7B,YAAY,EAAE,cAAc;QAC5B,wBAAwB,EACpB,6DAA6D;KACpE;CACJ,CAAC,CAAC"}
|