@keycloakify/angular 20.1.2 → 20.1.4
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/187.index.js +9 -8
- package/bin/476.index.js +9 -8
- package/package.json +5 -5
- package/src/bin/update-kc-gen.ts +9 -8
package/bin/187.index.js
CHANGED
|
@@ -388,7 +388,7 @@ async function command(params) {
|
|
|
388
388
|
``,
|
|
389
389
|
`// noinspection JSUnusedGlobalSymbols`,
|
|
390
390
|
``,
|
|
391
|
-
`import type { ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
391
|
+
`import type { ApplicationRef, ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
392
392
|
``,
|
|
393
393
|
`export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(' | ')};`,
|
|
394
394
|
``,
|
|
@@ -410,18 +410,15 @@ async function command(params) {
|
|
|
410
410
|
` }`,
|
|
411
411
|
`}`,
|
|
412
412
|
``,
|
|
413
|
-
`type ApplicationRefLike = {`,
|
|
414
|
-
` components: ComponentRef<any>[];`,
|
|
415
|
-
`};`,
|
|
416
|
-
``,
|
|
417
413
|
`export async function bootstrapKcApplication(params: {`,
|
|
418
414
|
` kcContext: KcContext;`,
|
|
419
415
|
` bootstrapApplication: (params: {`,
|
|
420
416
|
` KcRootComponent: Type<unknown>;`,
|
|
421
417
|
` kcProvider: EnvironmentProviders;`,
|
|
422
|
-
` }) => Promise<
|
|
423
|
-
`}) {`,
|
|
418
|
+
` }) => Promise<ApplicationRef>;`,
|
|
419
|
+
`}): Promise<ApplicationRef> {`,
|
|
424
420
|
` const { kcContext, bootstrapApplication } = params;`,
|
|
421
|
+
` let appRef: ApplicationRef;`,
|
|
425
422
|
``,
|
|
426
423
|
` switch (kcContext.themeType) {`,
|
|
427
424
|
...['login', 'account']
|
|
@@ -450,7 +447,7 @@ async function command(params) {
|
|
|
450
447
|
` import('./${themeType}/KcPage').then(({ getKcPage }) => getKcPage(kcContext.pageId)),`,
|
|
451
448
|
` ] as const);`,
|
|
452
449
|
``,
|
|
453
|
-
`
|
|
450
|
+
` appRef = await bootstrapApplication({`,
|
|
454
451
|
` KcRootComponent: TemplateComponent,`,
|
|
455
452
|
` kcProvider: provideKeycloakifyAngular({`,
|
|
456
453
|
` kcContext,`,
|
|
@@ -483,7 +480,11 @@ async function command(params) {
|
|
|
483
480
|
` break;`
|
|
484
481
|
])
|
|
485
482
|
.flat(),
|
|
483
|
+
` default:`,
|
|
484
|
+
` throw new Error('wrong themeType');`,
|
|
486
485
|
` }`,
|
|
486
|
+
``,
|
|
487
|
+
` return appRef;`,
|
|
487
488
|
`}`,
|
|
488
489
|
``
|
|
489
490
|
].join('\n');
|
package/bin/476.index.js
CHANGED
|
@@ -245,7 +245,7 @@ async function command(params) {
|
|
|
245
245
|
``,
|
|
246
246
|
`// noinspection JSUnusedGlobalSymbols`,
|
|
247
247
|
``,
|
|
248
|
-
`import type { ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
248
|
+
`import type { ApplicationRef, ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
249
249
|
``,
|
|
250
250
|
`export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(' | ')};`,
|
|
251
251
|
``,
|
|
@@ -267,18 +267,15 @@ async function command(params) {
|
|
|
267
267
|
` }`,
|
|
268
268
|
`}`,
|
|
269
269
|
``,
|
|
270
|
-
`type ApplicationRefLike = {`,
|
|
271
|
-
` components: ComponentRef<any>[];`,
|
|
272
|
-
`};`,
|
|
273
|
-
``,
|
|
274
270
|
`export async function bootstrapKcApplication(params: {`,
|
|
275
271
|
` kcContext: KcContext;`,
|
|
276
272
|
` bootstrapApplication: (params: {`,
|
|
277
273
|
` KcRootComponent: Type<unknown>;`,
|
|
278
274
|
` kcProvider: EnvironmentProviders;`,
|
|
279
|
-
` }) => Promise<
|
|
280
|
-
`}) {`,
|
|
275
|
+
` }) => Promise<ApplicationRef>;`,
|
|
276
|
+
`}): Promise<ApplicationRef> {`,
|
|
281
277
|
` const { kcContext, bootstrapApplication } = params;`,
|
|
278
|
+
` let appRef: ApplicationRef;`,
|
|
282
279
|
``,
|
|
283
280
|
` switch (kcContext.themeType) {`,
|
|
284
281
|
...['login', 'account']
|
|
@@ -307,7 +304,7 @@ async function command(params) {
|
|
|
307
304
|
` import('./${themeType}/KcPage').then(({ getKcPage }) => getKcPage(kcContext.pageId)),`,
|
|
308
305
|
` ] as const);`,
|
|
309
306
|
``,
|
|
310
|
-
`
|
|
307
|
+
` appRef = await bootstrapApplication({`,
|
|
311
308
|
` KcRootComponent: TemplateComponent,`,
|
|
312
309
|
` kcProvider: provideKeycloakifyAngular({`,
|
|
313
310
|
` kcContext,`,
|
|
@@ -340,7 +337,11 @@ async function command(params) {
|
|
|
340
337
|
` break;`
|
|
341
338
|
])
|
|
342
339
|
.flat(),
|
|
340
|
+
` default:`,
|
|
341
|
+
` throw new Error('wrong themeType');`,
|
|
343
342
|
` }`,
|
|
343
|
+
``,
|
|
344
|
+
` return appRef;`,
|
|
344
345
|
`}`,
|
|
345
346
|
``
|
|
346
347
|
].join('\n');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloakify/angular",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.1.
|
|
4
|
+
"version": "20.1.4",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"keycloakify": "^11.9.2",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
@@ -214,10 +214,6 @@
|
|
|
214
214
|
"types": "./login/directives/kc-class/index.d.ts",
|
|
215
215
|
"default": "./fesm2022/keycloakify-angular-login-directives-kc-class.mjs"
|
|
216
216
|
},
|
|
217
|
-
"./login/providers/keycloakify-angular": {
|
|
218
|
-
"types": "./login/providers/keycloakify-angular/index.d.ts",
|
|
219
|
-
"default": "./fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs"
|
|
220
|
-
},
|
|
221
217
|
"./login/pages/code": {
|
|
222
218
|
"types": "./login/pages/code/index.d.ts",
|
|
223
219
|
"default": "./fesm2022/keycloakify-angular-login-pages-code.mjs"
|
|
@@ -362,6 +358,10 @@
|
|
|
362
358
|
"types": "./login/pages/webauthn-register/index.d.ts",
|
|
363
359
|
"default": "./fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs"
|
|
364
360
|
},
|
|
361
|
+
"./login/providers/keycloakify-angular": {
|
|
362
|
+
"types": "./login/providers/keycloakify-angular/index.d.ts",
|
|
363
|
+
"default": "./fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs"
|
|
364
|
+
},
|
|
365
365
|
"./login/services/i18n": {
|
|
366
366
|
"types": "./login/services/i18n/index.d.ts",
|
|
367
367
|
"default": "./fesm2022/keycloakify-angular-login-services-i18n.mjs"
|
package/src/bin/update-kc-gen.ts
CHANGED
|
@@ -21,7 +21,7 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
21
21
|
``,
|
|
22
22
|
`// noinspection JSUnusedGlobalSymbols`,
|
|
23
23
|
``,
|
|
24
|
-
`import type { ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
24
|
+
`import type { ApplicationRef, ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
25
25
|
``,
|
|
26
26
|
`export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(' | ')};`,
|
|
27
27
|
``,
|
|
@@ -53,18 +53,15 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
53
53
|
` }`,
|
|
54
54
|
`}`,
|
|
55
55
|
``,
|
|
56
|
-
`type ApplicationRefLike = {`,
|
|
57
|
-
` components: ComponentRef<any>[];`,
|
|
58
|
-
`};`,
|
|
59
|
-
``,
|
|
60
56
|
`export async function bootstrapKcApplication(params: {`,
|
|
61
57
|
` kcContext: KcContext;`,
|
|
62
58
|
` bootstrapApplication: (params: {`,
|
|
63
59
|
` KcRootComponent: Type<unknown>;`,
|
|
64
60
|
` kcProvider: EnvironmentProviders;`,
|
|
65
|
-
` }) => Promise<
|
|
66
|
-
`}) {`,
|
|
61
|
+
` }) => Promise<ApplicationRef>;`,
|
|
62
|
+
`}): Promise<ApplicationRef> {`,
|
|
67
63
|
` const { kcContext, bootstrapApplication } = params;`,
|
|
64
|
+
` let appRef: ApplicationRef;`,
|
|
68
65
|
``,
|
|
69
66
|
` switch (kcContext.themeType) {`,
|
|
70
67
|
...(['login', 'account'] as const)
|
|
@@ -95,7 +92,7 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
95
92
|
` import('./${themeType}/KcPage').then(({ getKcPage }) => getKcPage(kcContext.pageId)),`,
|
|
96
93
|
` ] as const);`,
|
|
97
94
|
``,
|
|
98
|
-
`
|
|
95
|
+
` appRef = await bootstrapApplication({`,
|
|
99
96
|
` KcRootComponent: TemplateComponent,`,
|
|
100
97
|
` kcProvider: provideKeycloakifyAngular({`,
|
|
101
98
|
` kcContext,`,
|
|
@@ -128,7 +125,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
128
125
|
` break;`
|
|
129
126
|
])
|
|
130
127
|
.flat(),
|
|
128
|
+
` default:`,
|
|
129
|
+
` throw new Error('wrong themeType');`,
|
|
131
130
|
` }`,
|
|
131
|
+
``,
|
|
132
|
+
` return appRef;`,
|
|
132
133
|
`}`,
|
|
133
134
|
``
|
|
134
135
|
].join('\n');
|