@keycloakify/angular 0.2.11 → 0.2.13

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@keycloakify/angular",
3
3
  "type": "module",
4
- "version": "0.2.11",
4
+ "version": "0.2.13",
5
5
  "peerDependencies": {
6
- "keycloakify": "^11.5.0",
6
+ "keycloakify": "^11.7.0",
7
7
  "@angular/core": "^19.0.0",
8
8
  "@angular/common": "^19.0.0",
9
9
  "@angular/platform-browser": "^19.0.0"
@@ -68,12 +68,14 @@ export async function command(params: { buildContext: BuildContext }) {
68
68
  const templateValue = 'template.ftl (Layout common to every page)';
69
69
  const userProfileFormFieldsValue =
70
70
  'user-profile-commons.ftl (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)';
71
+ const otherPageValue = "The page you're looking for isn't listed here";
71
72
 
72
73
  const { value: pageIdOrComponent } = await cliSelect<
73
74
  | LoginThemePageId
74
75
  | AccountThemePageId
75
76
  | typeof templateValue
76
77
  | typeof userProfileFormFieldsValue
78
+ | typeof otherPageValue
77
79
  >({
78
80
  values: (() => {
79
81
  switch (themeType) {
@@ -81,10 +83,11 @@ export async function command(params: { buildContext: BuildContext }) {
81
83
  return [
82
84
  templateValue,
83
85
  userProfileFormFieldsValue,
84
- ...LOGIN_THEME_PAGE_IDS
86
+ ...LOGIN_THEME_PAGE_IDS,
87
+ otherPageValue
85
88
  ];
86
89
  case 'account':
87
- return [templateValue, ...ACCOUNT_THEME_PAGE_IDS];
90
+ return [templateValue, ...ACCOUNT_THEME_PAGE_IDS, otherPageValue];
88
91
  case 'admin':
89
92
  return [];
90
93
  }
@@ -94,6 +97,17 @@ export async function command(params: { buildContext: BuildContext }) {
94
97
  process.exit(-1);
95
98
  });
96
99
 
100
+ if (pageIdOrComponent === otherPageValue) {
101
+ console.log(
102
+ [
103
+ 'To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,',
104
+ 'refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak'
105
+ ].join(' ')
106
+ );
107
+
108
+ process.exit(0);
109
+ }
110
+
97
111
  console.log(`→ ${pageIdOrComponent}`);
98
112
 
99
113
  const componentRelativeDirPath_posix_to_componentRelativeFilePath_posix = (params: {
package/src/bin/main.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { readParams, NOT_IMPLEMENTED_EXIT_CODE } from './core';
4
+ import chalk from 'chalk';
4
5
 
5
6
  const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
6
7
 
@@ -30,6 +31,14 @@ const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
30
31
  command({ buildContext });
31
32
  }
32
33
  return;
34
+ case 'initialize-admin-theme':
35
+ {
36
+ console.log(
37
+ chalk.red('Cannot create an admin theme when using Angular.')
38
+ );
39
+ process.exit(1);
40
+ }
41
+ return;
33
42
  default:
34
43
  process.exit(NOT_IMPLEMENTED_EXIT_CODE);
35
44
  }
@@ -18,6 +18,6 @@
18
18
  "include": ["**/*.ts"],
19
19
  "exclude": ["initialize-account-theme/boilerplate"],
20
20
  "ts-node": {
21
- "esm": true
21
+ "esm": true
22
22
  }
23
23
  }