@opensourcekd/ng-common-libs 1.2.5 → 1.2.6
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/README.md +38 -4
- package/dist/angular/index.cjs +89 -7
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.ts +8 -4
- package/dist/angular/index.mjs +89 -7
- package/dist/angular/index.mjs.map +1 -1
- package/dist/core/index.cjs +22 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +22 -1
- package/dist/core/index.mjs +22 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/index.cjs +111 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +30 -5
- package/dist/index.mjs +111 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
2
|
import { EventType } from 'mitt';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -55,6 +54,27 @@ declare class EventBus {
|
|
|
55
54
|
onAll(): Observable<EventPayload>;
|
|
56
55
|
}
|
|
57
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Framework-agnostic Configuration
|
|
59
|
+
* Centralized configuration for all consuming applications
|
|
60
|
+
*
|
|
61
|
+
* This configuration can be used across different frameworks (Angular, React, Vue, etc.)
|
|
62
|
+
* and by various Micro-Frontends (MFEs) and shell applications.
|
|
63
|
+
*
|
|
64
|
+
* Values are statically configured during build time from GitHub repository variables.
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* Application configuration object
|
|
68
|
+
* Contains all environment-specific variables
|
|
69
|
+
*
|
|
70
|
+
* These values are replaced during build time with actual values from GitHub repository variables.
|
|
71
|
+
*/
|
|
72
|
+
declare const APP_CONFIG: {
|
|
73
|
+
auth0Domain: string;
|
|
74
|
+
auth0ClientId: string;
|
|
75
|
+
apiUrl: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
58
78
|
/**
|
|
59
79
|
* EventBusService - Angular service for cross-application event communication
|
|
60
80
|
* Uses mitt library for efficient event handling and RxJS ReplaySubject for observable stream
|
|
@@ -173,15 +193,13 @@ interface UserData {
|
|
|
173
193
|
* To enable navigation after auth operations, uncomment the marked sections in consuming components.
|
|
174
194
|
*/
|
|
175
195
|
declare class AuthService {
|
|
176
|
-
private http;
|
|
177
196
|
private eventBus;
|
|
178
|
-
id: string;
|
|
179
197
|
private readonly STANDARD_JWT_CLAIMS;
|
|
180
198
|
private auth0Client;
|
|
181
199
|
private initializationPromise;
|
|
182
200
|
private userSubject;
|
|
183
201
|
user$: Observable<UserInfo | null>;
|
|
184
|
-
constructor(
|
|
202
|
+
constructor(eventBus: EventBusService);
|
|
185
203
|
/**
|
|
186
204
|
* Initialize Auth0 client
|
|
187
205
|
*/
|
|
@@ -215,6 +233,13 @@ declare class AuthService {
|
|
|
215
233
|
success: boolean;
|
|
216
234
|
appState?: any;
|
|
217
235
|
}>;
|
|
236
|
+
/**
|
|
237
|
+
* Decode and log the access token to console
|
|
238
|
+
* NOTE: This logs sensitive token information to console for debugging purposes.
|
|
239
|
+
* In production environments, consider disabling this or filtering console logs.
|
|
240
|
+
* @param token - The JWT access token
|
|
241
|
+
*/
|
|
242
|
+
private decodeAndLogToken;
|
|
218
243
|
/**
|
|
219
244
|
* Log all user claims for debugging
|
|
220
245
|
* @param user - User info from Auth0
|
|
@@ -398,5 +423,5 @@ declare function removeStorageItem(key: string, storageType?: 'localStorage' | '
|
|
|
398
423
|
*/
|
|
399
424
|
declare function configureAuth0(config: Partial<typeof AUTH0_CONFIG>): void;
|
|
400
425
|
|
|
401
|
-
export { AUTH0_CONFIG, AuthService, EventBus, EventBusService, STORAGE_CONFIG, STORAGE_KEYS, configureAuth0, getStorageItem, removeStorageItem, setStorageItem };
|
|
426
|
+
export { APP_CONFIG, AUTH0_CONFIG, AuthService, EventBus, EventBusService, STORAGE_CONFIG, STORAGE_KEYS, configureAuth0, getStorageItem, removeStorageItem, setStorageItem };
|
|
402
427
|
export type { EventPayload, UserData, UserInfo };
|