@acontplus/ng-config 1.1.0 → 1.1.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
CHANGED
|
@@ -6,7 +6,11 @@ interfaces, and configuration constants for AcontPlus applications.
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
+
# Using npm
|
|
9
10
|
npm install @acontplus/ng-config
|
|
11
|
+
|
|
12
|
+
# Using pnpm
|
|
13
|
+
pnpm add @acontplus/ng-config
|
|
10
14
|
```
|
|
11
15
|
|
|
12
16
|
## Features
|
|
@@ -260,15 +264,11 @@ export class UserRepository extends BaseRepository<User, number> {
|
|
|
260
264
|
}
|
|
261
265
|
|
|
262
266
|
async create(user: Omit<User, 'id'>): Promise<User> {
|
|
263
|
-
return this.http
|
|
264
|
-
.post<User>('/api/users', user)
|
|
265
|
-
.toPromise() as Promise<User>;
|
|
267
|
+
return this.http.post<User>('/api/users', user).toPromise() as Promise<User>;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
270
|
async update(id: number, user: Partial<User>): Promise<User> {
|
|
269
|
-
return this.http
|
|
270
|
-
.put<User>(`/api/users/${id}`, user)
|
|
271
|
-
.toPromise() as Promise<User>;
|
|
271
|
+
return this.http.put<User>(`/api/users/${id}`, user).toPromise() as Promise<User>;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
async delete(id: number): Promise<void> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acontplus-ng-config.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"acontplus-ng-config.mjs","sources":["../../../../packages/ng-config/src/lib/constants/auth.constants.ts","../../../../packages/ng-config/src/lib/constants/config.constants.ts","../../../../packages/ng-config/src/lib/constants/index.ts","../../../../packages/ng-config/src/lib/tokens/auth-token.ts","../../../../packages/ng-config/src/lib/tokens/core-config-token.ts","../../../../packages/ng-config/src/lib/tokens/environment-token.ts","../../../../packages/ng-config/src/acontplus-ng-config.ts"],"sourcesContent":["// src/lib/constants/auth.app.constants.ts\nexport const AUTH_API = {\n AUTH: 'auth/',\n} as const;\n","import { CoreConfig } from '@acontplus/core';\n\nexport const DEFAULT_CONFIG: Required<CoreConfig> = {\n apiBaseUrl: '',\n apiTimeout: 30000,\n retryAttempts: 2,\n retryDelay: 1000,\n enableCorrelationTracking: true,\n enableRequestLogging: false,\n enableErrorLogging: true,\n enableToastNotifications: true,\n includeAuthToken: true,\n authTokenHeader: 'Authorization',\n enableMultiTenancy: true,\n tenantIdHeader: 'Tenant-Id',\n logLevel: 'info',\n enableConsoleLogging: true,\n customHeaders: {},\n excludeUrls: [],\n excludeMethods: [],\n};\n","// src/lib/constants/index.ts\nexport * from './auth.constants';\nexport * from './config.constants';\n","import { InjectionToken } from '@angular/core';\nimport { AuthTokenRepository } from '../repositories';\n\nexport const AUTH_TOKEN = new InjectionToken<AuthTokenRepository>('AUTH_TOKEN_PROVIDER');\n","import { InjectionToken } from '@angular/core';\nimport { CoreConfig } from '@acontplus/core';\nimport { DEFAULT_CONFIG } from '../constants';\n\nexport const CORE_CONFIG = new InjectionToken<CoreConfig>('CORE_CONFIG', {\n factory: () => DEFAULT_CONFIG,\n});\n","import { InjectionToken } from '@angular/core';\nimport { Environment } from '@acontplus/core';\n\n/**\n * @const ENVIRONMENT\n * Injection token for the environment interface to be provided by the applications.\n */\nexport const ENVIRONMENT = new InjectionToken<Environment>('ENVIRONMENT', {\n factory: () => ({\n isProduction: false,\n apiBaseUrl: 'http://localhost:4200/api/',\n tokenKey: 'access_token',\n refreshTokenKey: 'refresh_token',\n clientId: 'angular-app',\n loginRoute: 'auth',\n }),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACO,MAAM,QAAQ,GAAG;AACtB,IAAA,IAAI,EAAE,OAAO;;;ACAR,MAAM,cAAc,GAAyB;AAClD,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,yBAAyB,EAAE,IAAI;AAC/B,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,kBAAkB,EAAE,IAAI;AACxB,IAAA,wBAAwB,EAAE,IAAI;AAC9B,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,eAAe,EAAE,eAAe;AAChC,IAAA,kBAAkB,EAAE,IAAI;AACxB,IAAA,cAAc,EAAE,WAAW;AAC3B,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,oBAAoB,EAAE,IAAI;AAC1B,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,cAAc,EAAE,EAAE;;;ACnBpB;;MCGa,UAAU,GAAG,IAAI,cAAc,CAAsB,qBAAqB;;MCC1E,WAAW,GAAG,IAAI,cAAc,CAAa,aAAa,EAAE;AACvE,IAAA,OAAO,EAAE,MAAM,cAAc;AAC9B,CAAA;;ACHD;;;AAGG;MACU,WAAW,GAAG,IAAI,cAAc,CAAc,aAAa,EAAE;AACxE,IAAA,OAAO,EAAE,OAAO;AACd,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,UAAU,EAAE,4BAA4B;AACxC,QAAA,QAAQ,EAAE,cAAc;AACxB,QAAA,eAAe,EAAE,eAAe;AAChC,QAAA,QAAQ,EAAE,aAAa;AACvB,QAAA,UAAU,EAAE,MAAM;KACnB,CAAC;AACH,CAAA;;AChBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acontplus/ng-config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Angular configuration management library providing environment tokens, application settings, dependency injection patterns, and runtime configuration services for enterprise applications.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@acontplus/core": "^1.1.
|
|
7
|
-
"@angular/common": "^20.3.
|
|
8
|
-
"@angular/core": "^20.3.
|
|
6
|
+
"@acontplus/core": "^1.1.1",
|
|
7
|
+
"@angular/common": "^20.3.9",
|
|
8
|
+
"@angular/core": "^20.3.9"
|
|
9
9
|
},
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"main": "fesm2022/acontplus-ng-config.mjs",
|