keycloakify 11.7.1 → 11.7.3
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/bin/453.index.js +11 -2
- package/package.json +1 -1
- package/src/bin/eject-page.ts +16 -2
- package/src/vite-plugin/vite-plugin.ts +2 -1
- package/vite-plugin/index.js +2 -1
package/bin/453.index.js
CHANGED
@@ -87,6 +87,7 @@ async function command(params) {
|
|
87
87
|
console.log(chalk__WEBPACK_IMPORTED_MODULE_6___default().cyan("Select the page you want to customize:"));
|
88
88
|
const templateValue = "Template.tsx (Layout common to every page)";
|
89
89
|
const userProfileFormFieldsValue = "UserProfileFormFields.tsx (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)";
|
90
|
+
const otherPageValue = "The page you're looking for isn't listed here";
|
90
91
|
const { value: pageIdOrComponent } = await cli_select__WEBPACK_IMPORTED_MODULE_1___default()({
|
91
92
|
values: (() => {
|
92
93
|
switch (themeType) {
|
@@ -94,16 +95,24 @@ async function command(params) {
|
|
94
95
|
return [
|
95
96
|
templateValue,
|
96
97
|
userProfileFormFieldsValue,
|
97
|
-
..._shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .LOGIN_THEME_PAGE_IDS */ .XV
|
98
|
+
..._shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .LOGIN_THEME_PAGE_IDS */ .XV,
|
99
|
+
otherPageValue
|
98
100
|
];
|
99
101
|
case "account":
|
100
|
-
return [templateValue, ..._shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .ACCOUNT_THEME_PAGE_IDS */ .yV];
|
102
|
+
return [templateValue, ..._shared_constants__WEBPACK_IMPORTED_MODULE_2__/* .ACCOUNT_THEME_PAGE_IDS */ .yV, otherPageValue];
|
101
103
|
}
|
102
104
|
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(false);
|
103
105
|
})()
|
104
106
|
}).catch(() => {
|
105
107
|
process.exit(-1);
|
106
108
|
});
|
109
|
+
if (pageIdOrComponent === otherPageValue) {
|
110
|
+
console.log([
|
111
|
+
"To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,",
|
112
|
+
"refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak"
|
113
|
+
].join(" "));
|
114
|
+
process.exit(0);
|
115
|
+
}
|
107
116
|
console.log(`→ ${pageIdOrComponent}`);
|
108
117
|
const componentBasename = (() => {
|
109
118
|
if (pageIdOrComponent === templateValue) {
|
package/package.json
CHANGED
package/src/bin/eject-page.ts
CHANGED
@@ -92,12 +92,14 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
92
92
|
const templateValue = "Template.tsx (Layout common to every page)";
|
93
93
|
const userProfileFormFieldsValue =
|
94
94
|
"UserProfileFormFields.tsx (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)";
|
95
|
+
const otherPageValue = "The page you're looking for isn't listed here";
|
95
96
|
|
96
97
|
const { value: pageIdOrComponent } = await cliSelect<
|
97
98
|
| LoginThemePageId
|
98
99
|
| AccountThemePageId
|
99
100
|
| typeof templateValue
|
100
101
|
| typeof userProfileFormFieldsValue
|
102
|
+
| typeof otherPageValue
|
101
103
|
>({
|
102
104
|
values: (() => {
|
103
105
|
switch (themeType) {
|
@@ -105,10 +107,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
105
107
|
return [
|
106
108
|
templateValue,
|
107
109
|
userProfileFormFieldsValue,
|
108
|
-
...LOGIN_THEME_PAGE_IDS
|
110
|
+
...LOGIN_THEME_PAGE_IDS,
|
111
|
+
otherPageValue
|
109
112
|
];
|
110
113
|
case "account":
|
111
|
-
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS];
|
114
|
+
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS, otherPageValue];
|
112
115
|
}
|
113
116
|
assert<Equals<typeof themeType, never>>(false);
|
114
117
|
})()
|
@@ -116,6 +119,17 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
116
119
|
process.exit(-1);
|
117
120
|
});
|
118
121
|
|
122
|
+
if (pageIdOrComponent === otherPageValue) {
|
123
|
+
console.log(
|
124
|
+
[
|
125
|
+
"To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,",
|
126
|
+
"refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak"
|
127
|
+
].join(" ")
|
128
|
+
);
|
129
|
+
|
130
|
+
process.exit(0);
|
131
|
+
}
|
132
|
+
|
119
133
|
console.log(`→ ${pageIdOrComponent}`);
|
120
134
|
|
121
135
|
const componentBasename = (() => {
|
@@ -155,8 +155,9 @@ export function keycloakify(params: keycloakify.Params) {
|
|
155
155
|
{
|
156
156
|
const isJavascriptFile = id.endsWith(".js") || id.endsWith(".jsx");
|
157
157
|
const isTypeScriptFile = id.endsWith(".ts") || id.endsWith(".tsx");
|
158
|
+
const isSvelteFile = id.endsWith(".svelte");
|
158
159
|
|
159
|
-
if (!isTypeScriptFile && !isJavascriptFile) {
|
160
|
+
if (!isTypeScriptFile && !isJavascriptFile && !isSvelteFile) {
|
160
161
|
return;
|
161
162
|
}
|
162
163
|
}
|
package/vite-plugin/index.js
CHANGED
@@ -5819,7 +5819,8 @@ function keycloakify(params) {
|
|
5819
5819
|
{
|
5820
5820
|
const isJavascriptFile = id.endsWith(".js") || id.endsWith(".jsx");
|
5821
5821
|
const isTypeScriptFile = id.endsWith(".ts") || id.endsWith(".tsx");
|
5822
|
-
|
5822
|
+
const isSvelteFile = id.endsWith(".svelte");
|
5823
|
+
if (!isTypeScriptFile && !isJavascriptFile && !isSvelteFile) {
|
5823
5824
|
return;
|
5824
5825
|
}
|
5825
5826
|
}
|