@opensourcekd/ng-common-libs 2.0.0 → 2.0.2

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 CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  EventBusService,
15
15
  getAuthService,
16
16
  getEventBusService,
17
- configureAuth0,
17
+ getApiUrl,
18
18
  UserInfo,
19
19
  EventBus
20
20
  } from '@opensourcekd/ng-common-libs';
@@ -50,16 +50,10 @@ import {
50
50
  AuthService,
51
51
  EventBusService,
52
52
  getAuthService,
53
- getEventBusService,
54
- configureAuth0
53
+ getEventBusService
55
54
  } from '@opensourcekd/ng-common-libs';
56
55
 
57
- // Configure Auth0 once in shell (use your environment config)
58
- configureAuth0({
59
- domain: 'your-tenant.auth0.com',
60
- clientId: 'your-client-id',
61
- audience: 'https://your-api.example.com',
62
- });
56
+ // No configuration needed - API URL is baked into the library during build
63
57
 
64
58
  export const appConfig: ApplicationConfig = {
65
59
  providers: [
@@ -88,22 +82,19 @@ export class MyComponent {
88
82
  }
89
83
  ```
90
84
 
91
- ### Configuration
85
+ ### API URL Access
92
86
 
93
- **Use your own environment configuration** (recommended):
87
+ **No configuration needed** - API URL is automatically available:
94
88
 
95
89
  ```typescript
96
- import { configureAuth0 } from '@opensourcekd/ng-common-libs';
97
- import { environment } from './environments/environment';
98
-
99
- configureAuth0({
100
- domain: environment.auth0Domain,
101
- clientId: environment.auth0ClientId,
102
- audience: environment.apiUrl,
103
- });
90
+ import { getApiUrl } from '@opensourcekd/ng-common-libs';
91
+
92
+ // API URL is baked into the library during build from GitHub repository variables
93
+ const apiUrl = getApiUrl();
94
+ const endpoint = `${apiUrl}/users`;
104
95
  ```
105
96
 
106
- > ⚠️ **Important**: Do not use `APP_CONFIG` from the library. It contains placeholder values. Always use your own environment configuration.
97
+ > ℹ️ **Note**: The API URL is configured in GitHub repository variables (API_URL) and baked into the library during the CI/CD build process. No runtime configuration is needed in consuming applications.
107
98
 
108
99
  ## 📚 Documentation
109
100
 
@@ -126,8 +117,8 @@ import {
126
117
  getAuthService,
127
118
  getEventBusService,
128
119
 
129
- // Configuration
130
- configureAuth0,
120
+ // API Access
121
+ getApiUrl,
131
122
 
132
123
  // Core Utilities
133
124
  EventBus,
@@ -150,8 +141,26 @@ npm run build
150
141
 
151
142
  # Run linter
152
143
  npm run lint
144
+
145
+ # Run tests
146
+ npm test
147
+
148
+ # Run tests with coverage
149
+ npm run test:coverage
150
+
151
+ # Run tests in watch mode
152
+ npm run test:watch
153
153
  ```
154
154
 
155
+ ## 🧪 Testing
156
+
157
+ This library maintains high test coverage:
158
+ - **99.26%** statement coverage
159
+ - **83.45%** branch coverage
160
+ - **100%** function coverage
161
+
162
+ All core utilities and services are thoroughly tested using Jest and Angular testing utilities.
163
+
155
164
  ## 📄 License
156
165
 
157
166
  MIT