@opensourcekd/ng-common-libs 2.0.0 → 2.0.1
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 +13 -22
- package/dist/index.cjs +105 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +70 -84
- package/dist/index.mjs +105 -199
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
EventBusService,
|
|
15
15
|
getAuthService,
|
|
16
16
|
getEventBusService,
|
|
17
|
-
|
|
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
|
-
//
|
|
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
|
-
###
|
|
85
|
+
### API URL Access
|
|
92
86
|
|
|
93
|
-
**
|
|
87
|
+
**No configuration needed** - API URL is automatically available:
|
|
94
88
|
|
|
95
89
|
```typescript
|
|
96
|
-
import {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
>
|
|
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
|
-
//
|
|
130
|
-
|
|
120
|
+
// API Access
|
|
121
|
+
getApiUrl,
|
|
131
122
|
|
|
132
123
|
// Core Utilities
|
|
133
124
|
EventBus,
|