@acontplus/ng-infrastructure 1.0.3 → 1.0.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/README.md +27 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @acontplus/ng-infrastructure
|
|
2
2
|
|
|
3
|
-
Angular infrastructure library for AcontPlus applications, providing HTTP
|
|
3
|
+
Angular infrastructure library for AcontPlus applications, providing HTTP
|
|
4
|
+
interceptors, repositories, adapters, and core services for robust application
|
|
5
|
+
architecture.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -10,51 +12,66 @@ npm install @acontplus/ng-infrastructure
|
|
|
10
12
|
|
|
11
13
|
## Features
|
|
12
14
|
|
|
13
|
-
- **HTTP Interceptors**: API handling, HTTP context management, and
|
|
14
|
-
|
|
15
|
+
- **HTTP Interceptors**: API handling, HTTP context management, and
|
|
16
|
+
spinner/loading indicators
|
|
17
|
+
- **Repositories**: Generic and specific data access repositories (base HTTP,
|
|
18
|
+
user repository)
|
|
15
19
|
- **Adapters**: External integration adapters (Angular HTTP adapter)
|
|
16
|
-
- **Services**: Core configuration, correlation ID management, logging, and
|
|
20
|
+
- **Services**: Core configuration, correlation ID management, logging, and
|
|
21
|
+
tenant services
|
|
17
22
|
- **Use Cases**: Base use case patterns with commands and queries
|
|
18
23
|
- **Interfaces**: Token provider interfaces for authentication
|
|
19
|
-
- **TypeScript Support**: Full type safety with comprehensive TypeScript
|
|
24
|
+
- **TypeScript Support**: Full type safety with comprehensive TypeScript
|
|
25
|
+
definitions
|
|
20
26
|
|
|
21
27
|
## Interceptors
|
|
22
28
|
|
|
23
29
|
### API Interceptor
|
|
30
|
+
|
|
24
31
|
Handles API requests and responses.
|
|
25
32
|
|
|
26
33
|
### HTTP Context Interceptor
|
|
34
|
+
|
|
27
35
|
Manages HTTP context for requests.
|
|
28
36
|
|
|
29
37
|
### Spinner Interceptor
|
|
38
|
+
|
|
30
39
|
Manages loading spinners during HTTP operations.
|
|
31
40
|
|
|
32
41
|
## Repositories
|
|
33
42
|
|
|
34
43
|
### Base HTTP Repository
|
|
44
|
+
|
|
35
45
|
Base class for HTTP-based data access.
|
|
36
46
|
|
|
37
47
|
### Generic Repository
|
|
48
|
+
|
|
38
49
|
Generic repository implementation.
|
|
39
50
|
|
|
40
51
|
### User Repository
|
|
52
|
+
|
|
41
53
|
Specific repository for user data.
|
|
42
54
|
|
|
43
55
|
### Repository Factory
|
|
56
|
+
|
|
44
57
|
Factory for creating repository instances.
|
|
45
58
|
|
|
46
59
|
## Services
|
|
47
60
|
|
|
48
61
|
### Core Config Service
|
|
62
|
+
|
|
49
63
|
Manages core application configuration.
|
|
50
64
|
|
|
51
65
|
### Correlation Service
|
|
66
|
+
|
|
52
67
|
Handles correlation IDs for request tracing.
|
|
53
68
|
|
|
54
69
|
### Logging Service
|
|
70
|
+
|
|
55
71
|
Provides logging functionality.
|
|
56
72
|
|
|
57
73
|
### Tenant Service
|
|
74
|
+
|
|
58
75
|
Manages multi-tenant configurations.
|
|
59
76
|
|
|
60
77
|
## Usage
|
|
@@ -62,17 +79,15 @@ Manages multi-tenant configurations.
|
|
|
62
79
|
Import the desired modules and services in your Angular application.
|
|
63
80
|
|
|
64
81
|
```typescript
|
|
65
|
-
import {
|
|
82
|
+
import {
|
|
83
|
+
apiInterceptor,
|
|
84
|
+
spinnerInterceptor,
|
|
85
|
+
} from '@acontplus/ng-infrastructure';
|
|
66
86
|
|
|
67
87
|
// In app.config.ts
|
|
68
88
|
export const appConfig: ApplicationConfig = {
|
|
69
89
|
providers: [
|
|
70
|
-
provideHttpClient(
|
|
71
|
-
withInterceptors([
|
|
72
|
-
apiInterceptor,
|
|
73
|
-
spinnerInterceptor,
|
|
74
|
-
]),
|
|
75
|
-
),
|
|
90
|
+
provideHttpClient(withInterceptors([apiInterceptor, spinnerInterceptor])),
|
|
76
91
|
],
|
|
77
92
|
};
|
|
78
93
|
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acontplus/ng-infrastructure",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Acontplus Angular Infrastructure library for managing HTTP interceptors and repositories.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@acontplus/core": "^1.0.15",
|
|
7
7
|
"@acontplus/ng-config": "^1.0.3",
|
|
8
8
|
"@acontplus/ng-notifications": "^1.0.8",
|
|
9
|
-
"@acontplus/ng-components": "^1.0.
|
|
9
|
+
"@acontplus/ng-components": "^1.0.13",
|
|
10
10
|
"@angular/common": "^20.3.2",
|
|
11
11
|
"@angular/core": "^20.3.2"
|
|
12
12
|
},
|