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/bin/526.index.js
CHANGED
@@ -3,353 +3,6 @@ exports.id = 526;
|
|
3
3
|
exports.ids = [526];
|
4
4
|
exports.modules = {
|
5
5
|
|
6
|
-
/***/ 54659:
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
8
|
-
|
9
|
-
|
10
|
-
// EXPORTS
|
11
|
-
__webpack_require__.d(__webpack_exports__, {
|
12
|
-
"d": () => (/* binding */ readBuildOptions)
|
13
|
-
});
|
14
|
-
|
15
|
-
// EXTERNAL MODULE: external "url"
|
16
|
-
var external_url_ = __webpack_require__(57310);
|
17
|
-
// EXTERNAL MODULE: external "path"
|
18
|
-
var external_path_ = __webpack_require__(71017);
|
19
|
-
// EXTERNAL MODULE: ./dist/bin/tools/getAbsoluteAndInOsFormatPath.js
|
20
|
-
var getAbsoluteAndInOsFormatPath = __webpack_require__(86644);
|
21
|
-
// EXTERNAL MODULE: external "child_process"
|
22
|
-
var external_child_process_ = __webpack_require__(32081);
|
23
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/assert.js
|
24
|
-
var assert = __webpack_require__(88078);
|
25
|
-
// EXTERNAL MODULE: external "fs"
|
26
|
-
var external_fs_ = __webpack_require__(57147);
|
27
|
-
;// CONCATENATED MODULE: ./dist/bin/tools/getNpmWorkspaceRootDirPath.js
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
function getNpmWorkspaceRootDirPath(params) {
|
33
|
-
const { reactAppRootDirPath, dependencyExpected } = params;
|
34
|
-
const npmWorkspaceRootDirPath = (function callee(depth) {
|
35
|
-
const cwd = (0,external_path_.resolve)((0,external_path_.join)(...[reactAppRootDirPath, ...Array(depth).fill("..")]));
|
36
|
-
(0,assert.assert)(cwd !== external_path_.sep, "NPM workspace not found");
|
37
|
-
try {
|
38
|
-
external_child_process_.execSync("npm config get", {
|
39
|
-
cwd,
|
40
|
-
stdio: "ignore"
|
41
|
-
});
|
42
|
-
}
|
43
|
-
catch (error) {
|
44
|
-
if (String(error).includes("ENOWORKSPACES")) {
|
45
|
-
return callee(depth + 1);
|
46
|
-
}
|
47
|
-
throw error;
|
48
|
-
}
|
49
|
-
const packageJsonFilePath = (0,external_path_.join)(cwd, "package.json");
|
50
|
-
if (!external_fs_.existsSync(packageJsonFilePath)) {
|
51
|
-
return callee(depth + 1);
|
52
|
-
}
|
53
|
-
(0,assert.assert)(external_fs_.existsSync(packageJsonFilePath));
|
54
|
-
const parsedPackageJson = JSON.parse(external_fs_.readFileSync(packageJsonFilePath).toString("utf8"));
|
55
|
-
let isExpectedDependencyFound = false;
|
56
|
-
for (const dependenciesOrDevDependencies of [
|
57
|
-
"dependencies",
|
58
|
-
"devDependencies"
|
59
|
-
]) {
|
60
|
-
const dependencies = parsedPackageJson[dependenciesOrDevDependencies];
|
61
|
-
if (dependencies === undefined) {
|
62
|
-
continue;
|
63
|
-
}
|
64
|
-
(0,assert.assert)(dependencies instanceof Object);
|
65
|
-
if (dependencies[dependencyExpected] === undefined) {
|
66
|
-
continue;
|
67
|
-
}
|
68
|
-
isExpectedDependencyFound = true;
|
69
|
-
}
|
70
|
-
if (!isExpectedDependencyFound && parsedPackageJson.name !== dependencyExpected) {
|
71
|
-
return callee(depth + 1);
|
72
|
-
}
|
73
|
-
return cwd;
|
74
|
-
})(0);
|
75
|
-
return { npmWorkspaceRootDirPath };
|
76
|
-
}
|
77
|
-
//# sourceMappingURL=getNpmWorkspaceRootDirPath.js.map
|
78
|
-
// EXTERNAL MODULE: ./node_modules/zod/lib/index.mjs
|
79
|
-
var lib = __webpack_require__(52300);
|
80
|
-
// EXTERNAL MODULE: ./node_modules/tsafe/index.js
|
81
|
-
var tsafe = __webpack_require__(1666);
|
82
|
-
// EXTERNAL MODULE: ./dist/bin/shared/constants.js
|
83
|
-
var constants = __webpack_require__(173);
|
84
|
-
;// CONCATENATED MODULE: ./dist/bin/shared/buildOptions.js
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
function readBuildOptions(params) {
|
95
|
-
var _a, _b, _c, _d, _e;
|
96
|
-
const { cliCommandOptions } = params;
|
97
|
-
const reactAppRootDirPath = (() => {
|
98
|
-
if (cliCommandOptions.reactAppRootDirPath === undefined) {
|
99
|
-
return process.cwd();
|
100
|
-
}
|
101
|
-
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
102
|
-
pathIsh: cliCommandOptions.reactAppRootDirPath,
|
103
|
-
cwd: process.cwd()
|
104
|
-
});
|
105
|
-
})();
|
106
|
-
const { resolvedViteConfig } = (() => {
|
107
|
-
if (external_fs_.readdirSync(reactAppRootDirPath)
|
108
|
-
.find(fileBasename => fileBasename.startsWith("vite.config")) ===
|
109
|
-
undefined) {
|
110
|
-
return { resolvedViteConfig: undefined };
|
111
|
-
}
|
112
|
-
const output = external_child_process_.execSync("npx vite", {
|
113
|
-
cwd: reactAppRootDirPath,
|
114
|
-
env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.resolveViteConfig */.fe.resolveViteConfig]: "true" })
|
115
|
-
})
|
116
|
-
.toString("utf8");
|
117
|
-
(0,tsafe.assert)(output.includes(constants/* vitePluginSubScriptEnvNames.resolveViteConfig */.fe.resolveViteConfig), "Seems like the Keycloakify's Vite plugin is not installed.");
|
118
|
-
const resolvedViteConfigStr = output
|
119
|
-
.split(constants/* vitePluginSubScriptEnvNames.resolveViteConfig */.fe.resolveViteConfig)
|
120
|
-
.reverse()[0];
|
121
|
-
const resolvedViteConfig = JSON.parse(resolvedViteConfigStr);
|
122
|
-
return { resolvedViteConfig };
|
123
|
-
})();
|
124
|
-
const parsedPackageJson = (() => {
|
125
|
-
const zParsedPackageJson = lib.z.object({
|
126
|
-
name: lib.z.string(),
|
127
|
-
version: lib.z.string().optional(),
|
128
|
-
homepage: lib.z.string().optional(),
|
129
|
-
keycloakify: lib.z.object({
|
130
|
-
extraThemeProperties: lib.z.array(lib.z.string()).optional(),
|
131
|
-
artifactId: lib.z.string().optional(),
|
132
|
-
groupId: lib.z.string().optional(),
|
133
|
-
loginThemeResourcesFromKeycloakVersion: lib.z.string().optional(),
|
134
|
-
reactAppBuildDirPath: lib.z.string().optional(),
|
135
|
-
keycloakifyBuildDirPath: lib.z.string().optional(),
|
136
|
-
themeName: lib.z.union([lib.z.string(), lib.z.array(lib.z.string())]).optional()
|
137
|
-
})
|
138
|
-
.optional()
|
139
|
-
});
|
140
|
-
{
|
141
|
-
(0,tsafe.assert)();
|
142
|
-
(0,tsafe.assert)();
|
143
|
-
}
|
144
|
-
return zParsedPackageJson.parse(JSON.parse(external_fs_.readFileSync((0,external_path_.join)(reactAppRootDirPath, "package.json"))
|
145
|
-
.toString("utf8")));
|
146
|
-
})();
|
147
|
-
const userProvidedBuildOptions = Object.assign(Object.assign({}, parsedPackageJson.keycloakify), resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.userProvidedBuildOptions);
|
148
|
-
const themeNames = (() => {
|
149
|
-
if (userProvidedBuildOptions.themeName === undefined) {
|
150
|
-
return [
|
151
|
-
parsedPackageJson.name
|
152
|
-
.replace(/^@(.*)/, "$1")
|
153
|
-
.split("/")
|
154
|
-
.join("-")
|
155
|
-
];
|
156
|
-
}
|
157
|
-
if (typeof userProvidedBuildOptions.themeName === "string") {
|
158
|
-
return [userProvidedBuildOptions.themeName];
|
159
|
-
}
|
160
|
-
return userProvidedBuildOptions.themeName;
|
161
|
-
})();
|
162
|
-
const reactAppBuildDirPath = (() => {
|
163
|
-
var _a;
|
164
|
-
webpack: {
|
165
|
-
if (resolvedViteConfig !== undefined) {
|
166
|
-
break webpack;
|
167
|
-
}
|
168
|
-
if (((_a = parsedPackageJson.keycloakify) === null || _a === void 0 ? void 0 : _a.reactAppBuildDirPath) !== undefined) {
|
169
|
-
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
170
|
-
pathIsh: parsedPackageJson.keycloakify.reactAppBuildDirPath,
|
171
|
-
cwd: reactAppRootDirPath
|
172
|
-
});
|
173
|
-
}
|
174
|
-
return (0,external_path_.join)(reactAppRootDirPath, "build");
|
175
|
-
}
|
176
|
-
return (0,external_path_.join)(reactAppRootDirPath, resolvedViteConfig.buildDir);
|
177
|
-
})();
|
178
|
-
const { npmWorkspaceRootDirPath } = getNpmWorkspaceRootDirPath({
|
179
|
-
reactAppRootDirPath,
|
180
|
-
dependencyExpected: "keycloakify"
|
181
|
-
});
|
182
|
-
return {
|
183
|
-
bundler: resolvedViteConfig !== undefined ? "vite" : "webpack",
|
184
|
-
themeVersion: (_b = (_a = process.env.KEYCLOAKIFY_THEME_VERSION) !== null && _a !== void 0 ? _a : parsedPackageJson.version) !== null && _b !== void 0 ? _b : "0.0.0",
|
185
|
-
themeNames,
|
186
|
-
extraThemeProperties: userProvidedBuildOptions.extraThemeProperties,
|
187
|
-
groupId: (() => {
|
188
|
-
var _a, _b, _c, _d, _e;
|
189
|
-
const fallbackGroupId = `${themeNames[0]}.keycloak`;
|
190
|
-
return ((_b = (_a = process.env.KEYCLOAKIFY_GROUP_ID) !== null && _a !== void 0 ? _a : userProvidedBuildOptions.groupId) !== null && _b !== void 0 ? _b : (parsedPackageJson.homepage === undefined
|
191
|
-
? fallbackGroupId
|
192
|
-
: (_e = (_d = (_c = (0,external_url_.parse)(parsedPackageJson.homepage)
|
193
|
-
.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");
|
194
|
-
})(),
|
195
|
-
artifactId: (_d = (_c = process.env.KEYCLOAKIFY_ARTIFACT_ID) !== null && _c !== void 0 ? _c : userProvidedBuildOptions.artifactId) !== null && _d !== void 0 ? _d : `${themeNames[0]}-keycloak-theme`,
|
196
|
-
loginThemeResourcesFromKeycloakVersion: (_e = userProvidedBuildOptions.loginThemeResourcesFromKeycloakVersion) !== null && _e !== void 0 ? _e : "24.0.4",
|
197
|
-
reactAppRootDirPath,
|
198
|
-
reactAppBuildDirPath,
|
199
|
-
keycloakifyBuildDirPath: (() => {
|
200
|
-
if (userProvidedBuildOptions.keycloakifyBuildDirPath !== undefined) {
|
201
|
-
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
202
|
-
pathIsh: userProvidedBuildOptions.keycloakifyBuildDirPath,
|
203
|
-
cwd: reactAppRootDirPath
|
204
|
-
});
|
205
|
-
}
|
206
|
-
return (0,external_path_.join)(reactAppRootDirPath, (resolvedViteConfig === null || resolvedViteConfig === void 0 ? void 0 : resolvedViteConfig.buildDir) === undefined
|
207
|
-
? "build_keycloak"
|
208
|
-
: `${resolvedViteConfig.buildDir}_keycloak`);
|
209
|
-
})(),
|
210
|
-
publicDirPath: (() => {
|
211
|
-
webpack: {
|
212
|
-
if (resolvedViteConfig !== undefined) {
|
213
|
-
break webpack;
|
214
|
-
}
|
215
|
-
if (process.env.PUBLIC_DIR_PATH !== undefined) {
|
216
|
-
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
217
|
-
pathIsh: process.env.PUBLIC_DIR_PATH,
|
218
|
-
cwd: reactAppRootDirPath
|
219
|
-
});
|
220
|
-
}
|
221
|
-
return (0,external_path_.join)(reactAppRootDirPath, "public");
|
222
|
-
}
|
223
|
-
return (0,external_path_.join)(reactAppRootDirPath, resolvedViteConfig.publicDir);
|
224
|
-
})(),
|
225
|
-
cacheDirPath: (() => {
|
226
|
-
const cacheDirPath = (0,external_path_.join)((() => {
|
227
|
-
if (process.env.XDG_CACHE_HOME !== undefined) {
|
228
|
-
return (0,getAbsoluteAndInOsFormatPath/* getAbsoluteAndInOsFormatPath */.c)({
|
229
|
-
pathIsh: process.env.XDG_CACHE_HOME,
|
230
|
-
cwd: process.cwd()
|
231
|
-
});
|
232
|
-
}
|
233
|
-
return (0,external_path_.join)(npmWorkspaceRootDirPath, "node_modules", ".cache");
|
234
|
-
})(), "keycloakify");
|
235
|
-
return cacheDirPath;
|
236
|
-
})(),
|
237
|
-
urlPathname: (() => {
|
238
|
-
webpack: {
|
239
|
-
if (resolvedViteConfig !== undefined) {
|
240
|
-
break webpack;
|
241
|
-
}
|
242
|
-
const { homepage } = parsedPackageJson;
|
243
|
-
let url = undefined;
|
244
|
-
if (homepage !== undefined) {
|
245
|
-
url = new URL(homepage);
|
246
|
-
}
|
247
|
-
if (url === undefined) {
|
248
|
-
return undefined;
|
249
|
-
}
|
250
|
-
const out = url.pathname.replace(/([^/])$/, "$1/");
|
251
|
-
return out === "/" ? undefined : out;
|
252
|
-
}
|
253
|
-
return resolvedViteConfig.urlPathname;
|
254
|
-
})(),
|
255
|
-
assetsDirPath: (() => {
|
256
|
-
webpack: {
|
257
|
-
if (resolvedViteConfig !== undefined) {
|
258
|
-
break webpack;
|
259
|
-
}
|
260
|
-
return (0,external_path_.join)(reactAppBuildDirPath, "static");
|
261
|
-
}
|
262
|
-
return (0,external_path_.join)(reactAppBuildDirPath, resolvedViteConfig.assetsDir);
|
263
|
-
})(),
|
264
|
-
npmWorkspaceRootDirPath,
|
265
|
-
kcContextExclusionsFtlCode: userProvidedBuildOptions.kcContextExclusionsFtlCode
|
266
|
-
};
|
267
|
-
}
|
268
|
-
//# sourceMappingURL=buildOptions.js.map
|
269
|
-
|
270
|
-
/***/ }),
|
271
|
-
|
272
|
-
/***/ 173:
|
273
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
274
|
-
|
275
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
276
|
-
/* harmony export */ "M": () => (/* binding */ basenameOfTheKeycloakifyResourcesDir),
|
277
|
-
/* harmony export */ "N$": () => (/* binding */ keycloak_resources),
|
278
|
-
/* harmony export */ "UX": () => (/* binding */ accountThemePageIds),
|
279
|
-
/* harmony export */ "X4": () => (/* binding */ nameOfTheGlobal),
|
280
|
-
/* harmony export */ "fe": () => (/* binding */ vitePluginSubScriptEnvNames),
|
281
|
-
/* harmony export */ "h6": () => (/* binding */ containerName),
|
282
|
-
/* harmony export */ "lg": () => (/* binding */ nameOfTheLocalizationRealmOverridesUserProfileProperty),
|
283
|
-
/* harmony export */ "rO": () => (/* binding */ themeTypes),
|
284
|
-
/* harmony export */ "sj": () => (/* binding */ loginThemePageIds),
|
285
|
-
/* harmony export */ "uo": () => (/* binding */ skipBuildJarsEnvName),
|
286
|
-
/* harmony export */ "v$": () => (/* binding */ lastKeycloakVersionWithAccountV1),
|
287
|
-
/* harmony export */ "y_": () => (/* binding */ accountV1ThemeName),
|
288
|
-
/* harmony export */ "z0": () => (/* binding */ resources_common)
|
289
|
-
/* harmony export */ });
|
290
|
-
const nameOfTheGlobal = "kcContext";
|
291
|
-
const nameOfTheLocalizationRealmOverridesUserProfileProperty = "__localizationRealmOverridesUserProfile";
|
292
|
-
const keycloak_resources = "keycloak-resources";
|
293
|
-
const resources_common = "resources-common";
|
294
|
-
const lastKeycloakVersionWithAccountV1 = "21.1.2";
|
295
|
-
const basenameOfTheKeycloakifyResourcesDir = "build";
|
296
|
-
const themeTypes = ["login", "account"];
|
297
|
-
const accountV1ThemeName = "account-v1";
|
298
|
-
const vitePluginSubScriptEnvNames = {
|
299
|
-
runPostBuildScript: "KEYCLOAKIFY_RUN_POST_BUILD_SCRIPT",
|
300
|
-
resolveViteConfig: "KEYCLOAKIFY_RESOLVE_VITE_CONFIG"
|
301
|
-
};
|
302
|
-
const skipBuildJarsEnvName = "KEYCLOAKIFY_SKIP_BUILD_JAR";
|
303
|
-
const loginThemePageIds = [
|
304
|
-
"login.ftl",
|
305
|
-
"login-username.ftl",
|
306
|
-
"login-password.ftl",
|
307
|
-
"webauthn-authenticate.ftl",
|
308
|
-
"webauthn-register.ftl",
|
309
|
-
"register.ftl",
|
310
|
-
"info.ftl",
|
311
|
-
"error.ftl",
|
312
|
-
"login-reset-password.ftl",
|
313
|
-
"login-verify-email.ftl",
|
314
|
-
"terms.ftl",
|
315
|
-
"login-oauth2-device-verify-user-code.ftl",
|
316
|
-
"login-oauth-grant.ftl",
|
317
|
-
"login-otp.ftl",
|
318
|
-
"login-update-profile.ftl",
|
319
|
-
"login-update-password.ftl",
|
320
|
-
"login-idp-link-confirm.ftl",
|
321
|
-
"login-idp-link-email.ftl",
|
322
|
-
"login-page-expired.ftl",
|
323
|
-
"login-config-totp.ftl",
|
324
|
-
"logout-confirm.ftl",
|
325
|
-
"idp-review-user-profile.ftl",
|
326
|
-
"update-email.ftl",
|
327
|
-
"select-authenticator.ftl",
|
328
|
-
"saml-post-form.ftl",
|
329
|
-
"delete-credential.ftl",
|
330
|
-
"code.ftl",
|
331
|
-
"delete-account-confirm.ftl",
|
332
|
-
"frontchannel-logout.ftl",
|
333
|
-
"login-recovery-authn-code-config.ftl",
|
334
|
-
"login-recovery-authn-code-input.ftl",
|
335
|
-
"login-reset-otp.ftl",
|
336
|
-
"login-x509-info.ftl",
|
337
|
-
"webauthn-error.ftl"
|
338
|
-
];
|
339
|
-
const accountThemePageIds = [
|
340
|
-
"password.ftl",
|
341
|
-
"account.ftl",
|
342
|
-
"sessions.ftl",
|
343
|
-
"totp.ftl",
|
344
|
-
"applications.ftl",
|
345
|
-
"log.ftl",
|
346
|
-
"federatedIdentity.ftl"
|
347
|
-
];
|
348
|
-
const containerName = "keycloak-keycloakify";
|
349
|
-
//# sourceMappingURL=constants.js.map
|
350
|
-
|
351
|
-
/***/ }),
|
352
|
-
|
353
6
|
/***/ 2323:
|
354
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
355
8
|
|
@@ -622,8 +275,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
622
275
|
"command": () => (/* reexport */ command)
|
623
276
|
});
|
624
277
|
|
625
|
-
// EXTERNAL MODULE: ./dist/bin/shared/
|
626
|
-
var
|
278
|
+
// EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
|
279
|
+
var shared_buildContext = __webpack_require__(87751);
|
280
|
+
// EXTERNAL MODULE: ./node_modules/tsafe/exclude.js
|
281
|
+
var exclude = __webpack_require__(41370);
|
627
282
|
// EXTERNAL MODULE: ./dist/bin/shared/promptKeycloakVersion.js + 2 modules
|
628
283
|
var promptKeycloakVersion = __webpack_require__(95781);
|
629
284
|
// EXTERNAL MODULE: ./dist/bin/shared/metaInfKeycloakThemes.js
|
@@ -673,8 +328,8 @@ var is = __webpack_require__(94655);
|
|
673
328
|
|
674
329
|
(0,assert.assert)();
|
675
330
|
async function appBuild(params) {
|
676
|
-
const {
|
677
|
-
const { bundler } =
|
331
|
+
const { buildContext } = params;
|
332
|
+
const { bundler } = buildContext;
|
678
333
|
const { command, args, cwd } = (() => {
|
679
334
|
var _a;
|
680
335
|
switch (bundler) {
|
@@ -682,12 +337,12 @@ async function appBuild(params) {
|
|
682
337
|
return {
|
683
338
|
command: "npx",
|
684
339
|
args: ["vite", "build"],
|
685
|
-
cwd:
|
340
|
+
cwd: buildContext.projectDirPath
|
686
341
|
};
|
687
342
|
case "webpack": {
|
688
343
|
for (const dirPath of [
|
689
|
-
|
690
|
-
|
344
|
+
buildContext.projectDirPath,
|
345
|
+
buildContext.npmWorkspaceRootDirPath
|
691
346
|
]) {
|
692
347
|
try {
|
693
348
|
const parsedPackageJson = JSON.parse(external_fs_.readFileSync((0,external_path_.join)(dirPath, "package.json"))
|
@@ -754,10 +409,10 @@ async function appBuild(params) {
|
|
754
409
|
|
755
410
|
(0,assert.assert)();
|
756
411
|
async function keycloakifyBuild(params) {
|
757
|
-
const {
|
412
|
+
const { buildContext, doSkipBuildJars } = params;
|
758
413
|
const dResult = new Deferred.Deferred();
|
759
414
|
const child = external_child_process_.spawn("npx", ["keycloakify", "build"], {
|
760
|
-
cwd:
|
415
|
+
cwd: buildContext.projectDirPath,
|
761
416
|
env: Object.assign(Object.assign({}, process.env), (doSkipBuildJars ? { [constants/* skipBuildJarsEnvName */.uo]: "true" } : {}))
|
762
417
|
});
|
763
418
|
child.stdout.on("data", data => process.stdout.write(data));
|
@@ -787,6 +442,7 @@ async function keycloakifyBuild(params) {
|
|
787
442
|
|
788
443
|
|
789
444
|
|
445
|
+
|
790
446
|
|
791
447
|
async function command(params) {
|
792
448
|
exit_if_docker_not_installed: {
|
@@ -826,10 +482,10 @@ async function command(params) {
|
|
826
482
|
process.exit(1);
|
827
483
|
}
|
828
484
|
const { cliCommandOptions } = params;
|
829
|
-
const
|
485
|
+
const buildContext = (0,shared_buildContext/* getBuildContext */.s)({ cliCommandOptions });
|
830
486
|
{
|
831
487
|
const { isAppBuildSuccess } = await appBuild({
|
832
|
-
|
488
|
+
buildContext
|
833
489
|
});
|
834
490
|
if (!isAppBuildSuccess) {
|
835
491
|
console.log(source_default().red(`App build failed, exiting. Try running 'yarn build-keycloak-theme' and see what's wrong.`));
|
@@ -837,7 +493,7 @@ async function command(params) {
|
|
837
493
|
}
|
838
494
|
const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
|
839
495
|
doSkipBuildJars: false,
|
840
|
-
|
496
|
+
buildContext
|
841
497
|
});
|
842
498
|
if (!isKeycloakifyBuildSuccess) {
|
843
499
|
console.log(source_default().red(`Keycloakify build failed, exiting. Try running 'yarn build-keycloak-theme' and see what's wrong.`));
|
@@ -845,7 +501,7 @@ async function command(params) {
|
|
845
501
|
}
|
846
502
|
}
|
847
503
|
const metaInfKeycloakThemes = (0,shared_metaInfKeycloakThemes/* readMetaInfKeycloakThemes */.As)({
|
848
|
-
keycloakifyBuildDirPath:
|
504
|
+
keycloakifyBuildDirPath: buildContext.keycloakifyBuildDirPath
|
849
505
|
});
|
850
506
|
const doesImplementAccountTheme = metaInfKeycloakThemes.themes.some(({ name }) => name === constants/* accountV1ThemeName */.y_);
|
851
507
|
const { keycloakVersion, keycloakMajorNumber: keycloakMajorVersionNumber } = await (async function getKeycloakMajor() {
|
@@ -859,7 +515,7 @@ async function command(params) {
|
|
859
515
|
console.log(source_default().cyan("On which version of Keycloak do you want to test your theme?"));
|
860
516
|
const { keycloakVersion } = await (0,promptKeycloakVersion/* promptKeycloakVersion */.s)({
|
861
517
|
startingFromMajor: 17,
|
862
|
-
cacheDirPath:
|
518
|
+
cacheDirPath: buildContext.cacheDirPath
|
863
519
|
});
|
864
520
|
console.log(`→ ${keycloakVersion}`);
|
865
521
|
const keycloakMajorNumber = SemVer/* SemVer.parse */.h.parse(keycloakVersion).major;
|
@@ -929,13 +585,13 @@ async function command(params) {
|
|
929
585
|
}
|
930
586
|
return (0,external_path_.join)(dirPath, value);
|
931
587
|
})();
|
932
|
-
const jarFilePath = (0,external_path_.join)(
|
588
|
+
const jarFilePath = (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, jarFileBasename);
|
933
589
|
const { doUseBuiltInAccountV1Theme } = await (async () => {
|
934
590
|
let doUseBuiltInAccountV1Theme = false;
|
935
591
|
await (0,extractArchive/* extractArchive */.N)({
|
936
592
|
archiveFilePath: jarFilePath,
|
937
593
|
onArchiveFile: async ({ relativeFilePathInArchive, readFile, earlyExit }) => {
|
938
|
-
for (const themeName of
|
594
|
+
for (const themeName of buildContext.themeNames) {
|
939
595
|
if (relativeFilePathInArchive ===
|
940
596
|
(0,external_path_.join)("theme", themeName, "account", "theme.properties")) {
|
941
597
|
if ((await readFile())
|
@@ -953,8 +609,8 @@ async function command(params) {
|
|
953
609
|
const accountThemePropertyPatch = !doUseBuiltInAccountV1Theme
|
954
610
|
? undefined
|
955
611
|
: () => {
|
956
|
-
for (const themeName of
|
957
|
-
const filePath = (0,external_path_.join)(
|
612
|
+
for (const themeName of buildContext.themeNames) {
|
613
|
+
const filePath = (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "src", "main", "resources", "theme", themeName, "account", "theme.properties");
|
958
614
|
const sourceCode = external_fs_.readFileSync(filePath);
|
959
615
|
const modifiedSourceCode = Buffer.from(sourceCode
|
960
616
|
.toString("utf8")
|
@@ -989,11 +645,11 @@ async function command(params) {
|
|
989
645
|
? ["-e", "JAVA_OPTS=-Dkeycloak.profile=preview"]
|
990
646
|
: []),
|
991
647
|
...[
|
992
|
-
...
|
648
|
+
...buildContext.themeNames,
|
993
649
|
...(doUseBuiltInAccountV1Theme ? [] : [constants/* accountV1ThemeName */.y_])
|
994
650
|
]
|
995
651
|
.map(themeName => ({
|
996
|
-
localDirPath: (0,external_path_.join)(
|
652
|
+
localDirPath: (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "src", "main", "resources", "theme", themeName),
|
997
653
|
containerDirPath: `/opt/keycloak/themes/${themeName}`
|
998
654
|
}))
|
999
655
|
.map(({ localDirPath, containerDirPath }) => [
|
@@ -1001,6 +657,15 @@ async function command(params) {
|
|
1001
657
|
`${localDirPath}:${containerDirPath}:rw`
|
1002
658
|
])
|
1003
659
|
.flat(),
|
660
|
+
...buildContext.environmentVariables
|
661
|
+
.map(({ name }) => ({ name, envValue: process.env[name] }))
|
662
|
+
.map(({ name, envValue }) => envValue === undefined ? undefined : { name, envValue })
|
663
|
+
.filter((0,exclude.exclude)(undefined))
|
664
|
+
.map(({ name, envValue }) => [
|
665
|
+
"--env",
|
666
|
+
`${name}='${envValue.replace(/'/g, "'\\''")}'`
|
667
|
+
])
|
668
|
+
.flat(),
|
1004
669
|
`quay.io/keycloak/keycloak:${keycloakVersion}`,
|
1005
670
|
"start-dev",
|
1006
671
|
...(21 <= keycloakMajorVersionNumber && keycloakMajorVersionNumber < 24
|
@@ -1009,14 +674,14 @@ async function command(params) {
|
|
1009
674
|
...(realmJsonFilePath === undefined ? [] : ["--import-realm"])
|
1010
675
|
],
|
1011
676
|
{
|
1012
|
-
cwd:
|
677
|
+
cwd: buildContext.keycloakifyBuildDirPath
|
1013
678
|
}
|
1014
679
|
];
|
1015
680
|
const child = external_child_process_.spawn(...spawnArgs);
|
1016
681
|
child.stdout.on("data", data => process.stdout.write(data));
|
1017
682
|
child.stderr.on("data", data => process.stderr.write(data));
|
1018
683
|
child.on("exit", process.exit);
|
1019
|
-
const srcDirPath = (0,external_path_.join)(
|
684
|
+
const srcDirPath = (0,external_path_.join)(buildContext.projectDirPath, "src");
|
1020
685
|
{
|
1021
686
|
const handler = async (data) => {
|
1022
687
|
if (!data.toString("utf8").includes("Listening on: http://0.0.0.0:8080")) {
|
@@ -1038,7 +703,7 @@ async function command(params) {
|
|
1038
703
|
`- username: ${source_default().cyan.bold("testuser")}`,
|
1039
704
|
`- password: ${source_default().cyan.bold("password123")}`,
|
1040
705
|
"",
|
1041
|
-
`Watching for changes in ${source_default().bold(`.${external_path_.sep}${(0,external_path_.relative)(process.cwd(),
|
706
|
+
`Watching for changes in ${source_default().bold(`.${external_path_.sep}${(0,external_path_.relative)(process.cwd(), buildContext.projectDirPath)}`)}`
|
1042
707
|
].join("\n"));
|
1043
708
|
};
|
1044
709
|
child.stdout.on("data", handler);
|
@@ -1047,14 +712,14 @@ async function command(params) {
|
|
1047
712
|
const runFullBuild = runExclusive.build(async () => {
|
1048
713
|
console.log(source_default().cyan("Detected changes in the theme. Rebuilding ..."));
|
1049
714
|
const { isAppBuildSuccess } = await appBuild({
|
1050
|
-
|
715
|
+
buildContext
|
1051
716
|
});
|
1052
717
|
if (!isAppBuildSuccess) {
|
1053
718
|
return;
|
1054
719
|
}
|
1055
720
|
const { isKeycloakifyBuildSuccess } = await keycloakifyBuild({
|
1056
721
|
doSkipBuildJars: true,
|
1057
|
-
|
722
|
+
buildContext
|
1058
723
|
});
|
1059
724
|
if (!isKeycloakifyBuildSuccess) {
|
1060
725
|
return;
|
@@ -1065,11 +730,11 @@ async function command(params) {
|
|
1065
730
|
const { waitForDebounce } = (0,tools_waitForDebounce/* waitForDebounceFactory */.z)({ delay: 400 });
|
1066
731
|
chokidar.watch([
|
1067
732
|
srcDirPath,
|
1068
|
-
|
1069
|
-
(0,external_path_.join)(
|
1070
|
-
(0,external_path_.join)(
|
1071
|
-
(0,external_path_.join)(
|
1072
|
-
(0,external_path_.join)(
|
733
|
+
buildContext.publicDirPath,
|
734
|
+
(0,external_path_.join)(buildContext.projectDirPath, "package.json"),
|
735
|
+
(0,external_path_.join)(buildContext.projectDirPath, "vite.config.ts"),
|
736
|
+
(0,external_path_.join)(buildContext.projectDirPath, "vite.config.js"),
|
737
|
+
(0,external_path_.join)(buildContext.projectDirPath, "index.html"),
|
1073
738
|
(0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "src")
|
1074
739
|
], {
|
1075
740
|
ignoreInitial: true
|
@@ -1086,261 +751,6 @@ async function command(params) {
|
|
1086
751
|
|
1087
752
|
//# sourceMappingURL=index.js.map
|
1088
753
|
|
1089
|
-
/***/ }),
|
1090
|
-
|
1091
|
-
/***/ 12171:
|
1092
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1093
|
-
|
1094
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1095
|
-
/* harmony export */ "h": () => (/* binding */ SemVer)
|
1096
|
-
/* harmony export */ });
|
1097
|
-
var SemVer;
|
1098
|
-
(function (SemVer) {
|
1099
|
-
const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
|
1100
|
-
function parse(versionStr) {
|
1101
|
-
const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
|
1102
|
-
if (!match) {
|
1103
|
-
throw new Error(`${versionStr} is not a valid semantic version`);
|
1104
|
-
}
|
1105
|
-
const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
|
1106
|
-
const str = match[3];
|
1107
|
-
return str === undefined ? 0 : parseInt(str);
|
1108
|
-
})() }, (() => {
|
1109
|
-
const str = match[4];
|
1110
|
-
return str === undefined ? {} : { rc: parseInt(str) };
|
1111
|
-
})());
|
1112
|
-
const initialStr = stringify(semVer);
|
1113
|
-
Object.defineProperty(semVer, "parsedFrom", {
|
1114
|
-
enumerable: true,
|
1115
|
-
get: function () {
|
1116
|
-
const currentStr = stringify(this);
|
1117
|
-
if (currentStr !== initialStr) {
|
1118
|
-
throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
|
1119
|
-
}
|
1120
|
-
return versionStr;
|
1121
|
-
}
|
1122
|
-
});
|
1123
|
-
return semVer;
|
1124
|
-
}
|
1125
|
-
SemVer.parse = parse;
|
1126
|
-
function stringify(v) {
|
1127
|
-
return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
|
1128
|
-
}
|
1129
|
-
SemVer.stringify = stringify;
|
1130
|
-
/**
|
1131
|
-
*
|
1132
|
-
* v1 < v2 => -1
|
1133
|
-
* v1 === v2 => 0
|
1134
|
-
* v1 > v2 => 1
|
1135
|
-
*
|
1136
|
-
*/
|
1137
|
-
function compare(v1, v2) {
|
1138
|
-
const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
|
1139
|
-
const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
|
1140
|
-
for (const level of ["major", "minor", "patch", "rc"]) {
|
1141
|
-
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
1142
|
-
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
1143
|
-
}
|
1144
|
-
}
|
1145
|
-
return 0;
|
1146
|
-
}
|
1147
|
-
SemVer.compare = compare;
|
1148
|
-
/*
|
1149
|
-
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
|
1150
|
-
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
|
1151
|
-
console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
|
1152
|
-
*/
|
1153
|
-
function bumpType(params) {
|
1154
|
-
const versionAhead = typeof params.versionAhead === "string"
|
1155
|
-
? parse(params.versionAhead)
|
1156
|
-
: params.versionAhead;
|
1157
|
-
const versionBehind = typeof params.versionBehind === "string"
|
1158
|
-
? parse(params.versionBehind)
|
1159
|
-
: params.versionBehind;
|
1160
|
-
if (compare(versionBehind, versionAhead) === 1) {
|
1161
|
-
throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
|
1162
|
-
}
|
1163
|
-
for (const level of ["major", "minor", "patch", "rc"]) {
|
1164
|
-
if (versionBehind[level] !== versionAhead[level]) {
|
1165
|
-
return level;
|
1166
|
-
}
|
1167
|
-
}
|
1168
|
-
return "no bump";
|
1169
|
-
}
|
1170
|
-
SemVer.bumpType = bumpType;
|
1171
|
-
})(SemVer || (SemVer = {}));
|
1172
|
-
//# sourceMappingURL=SemVer.js.map
|
1173
|
-
|
1174
|
-
/***/ }),
|
1175
|
-
|
1176
|
-
/***/ 29121:
|
1177
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1178
|
-
|
1179
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1180
|
-
/* harmony export */ "N": () => (/* binding */ extractArchive)
|
1181
|
-
/* harmony export */ });
|
1182
|
-
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73292);
|
1183
|
-
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__);
|
1184
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57147);
|
1185
|
-
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
1186
|
-
/* harmony import */ var yauzl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78781);
|
1187
|
-
/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12781);
|
1188
|
-
/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(stream__WEBPACK_IMPORTED_MODULE_3__);
|
1189
|
-
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50689);
|
1190
|
-
/* harmony import */ var evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_4__);
|
1191
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71017);
|
1192
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_5__);
|
1193
|
-
/* harmony import */ var _fs_existsAsync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43765);
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
async function extractArchive(params) {
|
1202
|
-
const { archiveFilePath, onArchiveFile } = params;
|
1203
|
-
const zipFile = await new Promise((resolve, reject) => {
|
1204
|
-
yauzl__WEBPACK_IMPORTED_MODULE_2__.open(archiveFilePath, { lazyEntries: true }, async (error, zipFile) => {
|
1205
|
-
if (error) {
|
1206
|
-
reject(error);
|
1207
|
-
return;
|
1208
|
-
}
|
1209
|
-
resolve(zipFile);
|
1210
|
-
});
|
1211
|
-
});
|
1212
|
-
const dDone = new evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_4__.Deferred();
|
1213
|
-
zipFile.once("end", () => {
|
1214
|
-
zipFile.close();
|
1215
|
-
dDone.resolve();
|
1216
|
-
});
|
1217
|
-
const writeFile = async (entry, params) => {
|
1218
|
-
const { filePath, modifiedData } = params;
|
1219
|
-
{
|
1220
|
-
const dirPath = (0,path__WEBPACK_IMPORTED_MODULE_5__.dirname)(filePath);
|
1221
|
-
if (!(await (0,_fs_existsAsync__WEBPACK_IMPORTED_MODULE_6__/* .existsAsync */ .o)(dirPath))) {
|
1222
|
-
await fs_promises__WEBPACK_IMPORTED_MODULE_0___default().mkdir(dirPath, { recursive: true });
|
1223
|
-
}
|
1224
|
-
}
|
1225
|
-
if (modifiedData !== undefined) {
|
1226
|
-
await fs_promises__WEBPACK_IMPORTED_MODULE_0___default().writeFile(filePath, modifiedData);
|
1227
|
-
return;
|
1228
|
-
}
|
1229
|
-
const readStream = await new Promise(resolve => zipFile.openReadStream(entry, async (error, readStream) => {
|
1230
|
-
if (error) {
|
1231
|
-
dDone.reject(error);
|
1232
|
-
return;
|
1233
|
-
}
|
1234
|
-
resolve(readStream);
|
1235
|
-
}));
|
1236
|
-
const dDoneWithFile = new evt_tools_Deferred__WEBPACK_IMPORTED_MODULE_4__.Deferred();
|
1237
|
-
stream__WEBPACK_IMPORTED_MODULE_3___default().pipeline(readStream, fs__WEBPACK_IMPORTED_MODULE_1___default().createWriteStream(filePath), error => {
|
1238
|
-
if (error) {
|
1239
|
-
dDone.reject(error);
|
1240
|
-
return;
|
1241
|
-
}
|
1242
|
-
dDoneWithFile.resolve();
|
1243
|
-
});
|
1244
|
-
await dDoneWithFile.pr;
|
1245
|
-
};
|
1246
|
-
const readFile = (entry) => new Promise(resolve => zipFile.openReadStream(entry, async (error, readStream) => {
|
1247
|
-
if (error) {
|
1248
|
-
dDone.reject(error);
|
1249
|
-
return;
|
1250
|
-
}
|
1251
|
-
const chunks = [];
|
1252
|
-
readStream.on("data", chunk => {
|
1253
|
-
chunks.push(chunk);
|
1254
|
-
});
|
1255
|
-
readStream.on("end", () => {
|
1256
|
-
resolve(Buffer.concat(chunks));
|
1257
|
-
});
|
1258
|
-
readStream.on("error", error => {
|
1259
|
-
dDone.reject(error);
|
1260
|
-
});
|
1261
|
-
}));
|
1262
|
-
zipFile.on("entry", async (entry) => {
|
1263
|
-
handle_file: {
|
1264
|
-
// NOTE: Skip directories
|
1265
|
-
if (entry.fileName.endsWith(path__WEBPACK_IMPORTED_MODULE_5__.sep)) {
|
1266
|
-
break handle_file;
|
1267
|
-
}
|
1268
|
-
let hasEarlyExitBeenCalled = false;
|
1269
|
-
await onArchiveFile({
|
1270
|
-
relativeFilePathInArchive: entry.fileName.split("/").join(path__WEBPACK_IMPORTED_MODULE_5__.sep),
|
1271
|
-
readFile: () => readFile(entry),
|
1272
|
-
writeFile: params => writeFile(entry, params),
|
1273
|
-
earlyExit: () => {
|
1274
|
-
hasEarlyExitBeenCalled = true;
|
1275
|
-
}
|
1276
|
-
});
|
1277
|
-
if (hasEarlyExitBeenCalled) {
|
1278
|
-
zipFile.close();
|
1279
|
-
dDone.resolve();
|
1280
|
-
return;
|
1281
|
-
}
|
1282
|
-
}
|
1283
|
-
zipFile.readEntry();
|
1284
|
-
});
|
1285
|
-
zipFile.readEntry();
|
1286
|
-
await dDone.pr;
|
1287
|
-
}
|
1288
|
-
//# sourceMappingURL=extractArchive.js.map
|
1289
|
-
|
1290
|
-
/***/ }),
|
1291
|
-
|
1292
|
-
/***/ 43765:
|
1293
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1294
|
-
|
1295
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1296
|
-
/* harmony export */ "o": () => (/* binding */ existsAsync)
|
1297
|
-
/* harmony export */ });
|
1298
|
-
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73292);
|
1299
|
-
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__);
|
1300
|
-
|
1301
|
-
async function existsAsync(path) {
|
1302
|
-
try {
|
1303
|
-
await fs_promises__WEBPACK_IMPORTED_MODULE_0__.stat(path);
|
1304
|
-
return true;
|
1305
|
-
}
|
1306
|
-
catch (error) {
|
1307
|
-
if (error.code === "ENOENT")
|
1308
|
-
return false;
|
1309
|
-
throw error;
|
1310
|
-
}
|
1311
|
-
}
|
1312
|
-
//# sourceMappingURL=fs.existsAsync.js.map
|
1313
|
-
|
1314
|
-
/***/ }),
|
1315
|
-
|
1316
|
-
/***/ 86644:
|
1317
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
1318
|
-
|
1319
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1320
|
-
/* harmony export */ "c": () => (/* binding */ getAbsoluteAndInOsFormatPath)
|
1321
|
-
/* harmony export */ });
|
1322
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
|
1323
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
1324
|
-
/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22037);
|
1325
|
-
/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_1__);
|
1326
|
-
|
1327
|
-
|
1328
|
-
function getAbsoluteAndInOsFormatPath(params) {
|
1329
|
-
const { pathIsh, cwd } = params;
|
1330
|
-
let pathOut = pathIsh;
|
1331
|
-
pathOut = pathOut.replace(/\//g, path__WEBPACK_IMPORTED_MODULE_0__.sep);
|
1332
|
-
if (pathOut.startsWith("~")) {
|
1333
|
-
pathOut = pathOut.replace("~", os__WEBPACK_IMPORTED_MODULE_1__.homedir());
|
1334
|
-
}
|
1335
|
-
pathOut = pathOut.endsWith(path__WEBPACK_IMPORTED_MODULE_0__.sep) ? pathOut.slice(0, -1) : pathOut;
|
1336
|
-
if (!(0,path__WEBPACK_IMPORTED_MODULE_0__.isAbsolute)(pathOut)) {
|
1337
|
-
pathOut = (0,path__WEBPACK_IMPORTED_MODULE_0__.join)(cwd, pathOut);
|
1338
|
-
}
|
1339
|
-
pathOut = (0,path__WEBPACK_IMPORTED_MODULE_0__.resolve)(pathOut);
|
1340
|
-
return pathOut;
|
1341
|
-
}
|
1342
|
-
//# sourceMappingURL=getAbsoluteAndInOsFormatPath.js.map
|
1343
|
-
|
1344
754
|
/***/ })
|
1345
755
|
|
1346
756
|
};
|