@icd-iot-aicf/nestjs-logger 4.0.7 → 4.0.9
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/SNAPSHOT_GUIDE.md +154 -0
- package/dist/context/context.functions.d.ts +2 -2
- package/dist/context/context.functions.js +2 -2
- package/dist/context/summary-endpoint.store.d.ts +2 -2
- package/dist/formats/aicf/aicf.dto.d.ts +6 -0
- package/dist/formats/aicf/aicf.dto.js +9 -0
- package/dist/formats/aicf/aicf.dto.js.map +1 -1
- package/dist/formats/cloudron/cloudron-details-logs.service.js +7 -7
- package/dist/formats/cloudron/cloudron-manual.dto.js +3 -3
- package/dist/formats/cloudron/cloudron-summary-logs.service.js +2 -2
- package/dist/formats/cloudron/cloudron.dto.d.ts +7 -7
- package/dist/formats/cloudron/cloudron.dto.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/migration/log-snapshot-v3.e2e-spec.ts +364 -0
- package/package.json +1 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Log Snapshot — Pre-Upgrade Baseline Guide
|
|
2
|
+
|
|
3
|
+
> **AI Agent Instructions:** Read this file before doing anything in this worktree.
|
|
4
|
+
> Your job is to capture a snapshot of the current v3 log format so it can be compared against v4 after upgrading.
|
|
5
|
+
> Follow the steps below in order. Do not skip any step.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
This worktree is pinned to **v3** (`main` branch) of `@icd-iot-aicf/nestjs-logger`.
|
|
12
|
+
|
|
13
|
+
The goal is to capture a **baseline snapshot** of what the log output looks like right now — before upgrading to v4.
|
|
14
|
+
After upgrading, the same test file will be run against v4 output and Jest will diff the two, showing exactly what changed.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Step 1 — Install dependencies
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> If `@nestjs/testing` or `supertest` are missing, install them:
|
|
25
|
+
> ```bash
|
|
26
|
+
> npm install --save-dev @nestjs/testing supertest
|
|
27
|
+
> ```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Step 2 — Verify the Jest E2E config supports ESM (uuid)
|
|
32
|
+
|
|
33
|
+
Open `test/jest-e2e.json` and confirm it contains `transformIgnorePatterns`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"transformIgnorePatterns": ["node_modules/(?!(uuid)/)"]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If it is missing, add it — otherwise the test will fail with a `SyntaxError: Unexpected token 'export'` from the `uuid` package.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 3 — Copy the snapshot script into the test folder
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cp migration/log-snapshot-v3.e2e-spec.ts test/log-snapshot.e2e-spec.ts
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> **Why rename it?** Jest keys snapshots by the test file name.
|
|
52
|
+
> Using `log-snapshot.e2e-spec.ts` in both v3 and v4 means the same `.snap` file is used for comparison after upgrading.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 4 — Capture the v3 baseline snapshot
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx jest --config ./test/jest-e2e.json --testPathPatterns=log-snapshot --updateSnapshot
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This will:
|
|
63
|
+
- Spin up a minimal NestJS app using the v3 library
|
|
64
|
+
- Fire test HTTP requests
|
|
65
|
+
- Record the exact log structure and field values into `test/__snapshots__/log-snapshot.e2e-spec.ts.snap`
|
|
66
|
+
|
|
67
|
+
✅ Expected output: all tests pass, snapshot file created/updated.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 5 — Commit the snapshot
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git add test/__snapshots__/log-snapshot.e2e-spec.ts.snap
|
|
75
|
+
git commit -m "test: capture v3 log format baseline snapshot"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> This snapshot is the source of truth for comparison. Keep it committed.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 6 — Upgrade to v4
|
|
83
|
+
|
|
84
|
+
> ✅ Baseline captured. You are now ready to upgrade.
|
|
85
|
+
|
|
86
|
+
### 6.1 — Install v4
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm install @icd-iot-aicf/nestjs-logger@latest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Or for the experimental release:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install @icd-iot-aicf/nestjs-logger@experimental
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### 6.2 — Apply breaking changes
|
|
101
|
+
|
|
102
|
+
The full breaking-changes list and rename guide is in `v3-to-v4-migration.md` (available in the v4 package repo).
|
|
103
|
+
Key things to check:
|
|
104
|
+
|
|
105
|
+
| Area | What changed |
|
|
106
|
+
|------|-------------|
|
|
107
|
+
| Middleware name | `HTTPLogsMiddleware` → `HttpLogsMiddleware` |
|
|
108
|
+
| Interceptor return types | `responseInterceptor` / `errorInterceptor` are now `void` |
|
|
109
|
+
| Error log HTTP status | `responseLogError` now handles HTTP status codes in addition to error codes |
|
|
110
|
+
| Module import | Review `AppLogConfigModule.forRoot()` options for any renamed fields |
|
|
111
|
+
|
|
112
|
+
> **Tip:** Feed `v3-to-v4-migration.md` to your AI coding assistant and ask it to apply all changes automatically.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### 6.3 — Compare log output against the baseline
|
|
117
|
+
|
|
118
|
+
After upgrading and fixing any TypeScript errors, run:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx jest --config ./test/jest-e2e.json --testPathPatterns=log-snapshot
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Jest will compare v4 output against this snapshot and report any differences.
|
|
125
|
+
|
|
126
|
+
**Reading the diff:**
|
|
127
|
+
```
|
|
128
|
+
- (minus) = what v3 produced ← the baseline
|
|
129
|
+
+ (plus) = what v4 produces ← the new output
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 6.4 — Accept or investigate differences
|
|
135
|
+
|
|
136
|
+
**If the diff matches expected breaking changes** (field renames from the table above) — accept and move on:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npx jest --config ./test/jest-e2e.json --testPathPatterns=log-snapshot --updateSnapshot
|
|
140
|
+
git add test/__snapshots__/log-snapshot.e2e-spec.ts.snap
|
|
141
|
+
git commit -m "test: update log format snapshot for v4"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**If the diff shows unexpected differences** — field names that should not have changed, missing fields, or wrong values — do **not** accept the snapshot. Report the diff to the library team before proceeding.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Files in this worktree
|
|
149
|
+
|
|
150
|
+
| File | Purpose |
|
|
151
|
+
|------|---------|
|
|
152
|
+
| `migration/log-snapshot-v3.e2e-spec.ts` | The v3 snapshot test script — copy to `test/` before running |
|
|
153
|
+
| `test/log-snapshot.e2e-spec.ts` | Where the script lives after Step 3 |
|
|
154
|
+
| `test/__snapshots__/log-snapshot.e2e-spec.ts.snap` | Auto-generated baseline — commit this after Step 4 |
|
|
@@ -24,8 +24,8 @@ export declare function GetTransactionReference(): TransactionReferenceInfo;
|
|
|
24
24
|
export declare function GetCurrentEndpointSummaryLocal(): {
|
|
25
25
|
endpointSummary: {
|
|
26
26
|
no: string;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
endPointName: string;
|
|
28
|
+
endPointURL: string;
|
|
29
29
|
processTime: number;
|
|
30
30
|
responseStatus: string;
|
|
31
31
|
}[];
|
|
@@ -54,8 +54,8 @@ function GetCurrentEndpointSummaryLocal() {
|
|
|
54
54
|
endpointSummary: currentSummary.map((edrDetail, index) => {
|
|
55
55
|
return {
|
|
56
56
|
no: (index + 1).toString(),
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
endPointName: edrDetail.endPointName,
|
|
58
|
+
endPointURL: edrDetail.endPointURL,
|
|
59
59
|
processTime: edrDetail.processTime,
|
|
60
60
|
responseStatus: edrDetail.responseStatus,
|
|
61
61
|
};
|
|
@@ -70,6 +70,9 @@ export declare class AicfSummaryLog implements AICFSummary {
|
|
|
70
70
|
serviceEndTime: string;
|
|
71
71
|
serviceTime: number;
|
|
72
72
|
additionalInfo: object | null;
|
|
73
|
+
useCase?: string;
|
|
74
|
+
useCaseStep?: string;
|
|
75
|
+
useCaseSessionId?: string;
|
|
73
76
|
constructor(summaryData: SummaryData);
|
|
74
77
|
}
|
|
75
78
|
declare class BasicInfoDetail implements AICFDetail {
|
|
@@ -150,6 +153,9 @@ export interface AICFSummary {
|
|
|
150
153
|
serviceEndTime: string;
|
|
151
154
|
serviceTime: number;
|
|
152
155
|
additionalInfo?: object | null;
|
|
156
|
+
useCase?: string;
|
|
157
|
+
useCaseStep?: string;
|
|
158
|
+
useCaseSessionId?: string;
|
|
153
159
|
}
|
|
154
160
|
export interface RequestHTTPFormat {
|
|
155
161
|
method: string;
|
|
@@ -98,6 +98,15 @@ class AicfSummaryLog {
|
|
|
98
98
|
'x-session-path': originSession,
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
+
if (headers?.['x-ais-usecase']) {
|
|
102
|
+
this.useCase = headers['x-ais-usecase'];
|
|
103
|
+
}
|
|
104
|
+
if (headers?.['x-ais-usecase-step']) {
|
|
105
|
+
this.useCaseStep = headers['x-ais-usecase-step'];
|
|
106
|
+
}
|
|
107
|
+
if (headers?.['x-ais-usecase-session-id']) {
|
|
108
|
+
this.useCaseSessionId = headers['x-ais-usecase-session-id'];
|
|
109
|
+
}
|
|
101
110
|
}
|
|
102
111
|
}
|
|
103
112
|
exports.AicfSummaryLog = AicfSummaryLog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aicf.dto.js","sourceRoot":"","sources":["../../../src/formats/aicf/aicf.dto.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"aicf.dto.js","sourceRoot":"","sources":["../../../src/formats/aicf/aicf.dto.ts"],"names":[],"mappings":";;;;;;AAqNA,4CAeC;AAED,8CAMC;AA5OD,0DAAkC;AAClC,8CAI4B;AAC5B,4CAAoB;AACpB,gFAA0E;AAE1E,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wDAAqC,CAAA;IACrC,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,0CAAuB,CAAA;AACzB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;AACjB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,0CAA2B,CAAA;IAC3B,sCAAuB,CAAA;I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,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE;QACnC,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,eAAe;KACjC,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,WAAgB,EAAE;IAClD,OAAO;QACL,cAAc,EAAE,QAAQ,CAAC,MAAM;QAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,IAAI,EAAE;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -40,7 +40,7 @@ let CloudronDetailsLogsService = class CloudronDetailsLogsService {
|
|
|
40
40
|
try {
|
|
41
41
|
const headers = request.headers;
|
|
42
42
|
const customExternalData = {
|
|
43
|
-
|
|
43
|
+
endPointName: externalInfo.dependency,
|
|
44
44
|
startTime: microtime_1.default.now(),
|
|
45
45
|
subSessionId: subSessionID,
|
|
46
46
|
};
|
|
@@ -59,7 +59,7 @@ let CloudronDetailsLogsService = class CloudronDetailsLogsService {
|
|
|
59
59
|
endTime: endTime,
|
|
60
60
|
};
|
|
61
61
|
const endPointData = {
|
|
62
|
-
|
|
62
|
+
endPointName: externalInfo.dependency,
|
|
63
63
|
subSessionId: externalInfo.subSessionId,
|
|
64
64
|
sessionId: transactionRefInfo.sessionId,
|
|
65
65
|
};
|
|
@@ -72,8 +72,8 @@ let CloudronDetailsLogsService = class CloudronDetailsLogsService {
|
|
|
72
72
|
responseStatus = response.status;
|
|
73
73
|
}
|
|
74
74
|
const logEndpointSummary = {
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
endPointName: logEndpoint.custom1.endPointName || '',
|
|
76
|
+
endPointURL: config.url,
|
|
77
77
|
processTime: (0, tools_1.calculateTimeDiffMicroToMilli)(activityData.startTime, activityData.endTime),
|
|
78
78
|
responseStatus: JSON.stringify(responseStatus),
|
|
79
79
|
};
|
|
@@ -100,7 +100,7 @@ let CloudronDetailsLogsService = class CloudronDetailsLogsService {
|
|
|
100
100
|
endTime: endTime,
|
|
101
101
|
};
|
|
102
102
|
const endPointData = {
|
|
103
|
-
|
|
103
|
+
endPointName: externalInfo.dependency,
|
|
104
104
|
subSessionId: externalInfo.subSessionId,
|
|
105
105
|
sessionId: transactionRefInfo.sessionId,
|
|
106
106
|
};
|
|
@@ -114,8 +114,8 @@ let CloudronDetailsLogsService = class CloudronDetailsLogsService {
|
|
|
114
114
|
}
|
|
115
115
|
})();
|
|
116
116
|
const logEndpointSummary = {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
endPointName: logEndpoint.custom1.endPointName || '',
|
|
118
|
+
endPointURL: config?.url,
|
|
119
119
|
processTime: (0, tools_1.calculateTimeDiffMicroToMilli)(activityData.startTime, activityData.endTime),
|
|
120
120
|
responseStatus: JSON.stringify(responseStatus),
|
|
121
121
|
};
|
|
@@ -62,14 +62,14 @@ class CCustomWithAutoPushSummary {
|
|
|
62
62
|
this.requestObject = JSON.stringify(messageObject.requestObject);
|
|
63
63
|
this.responseObject = JSON.stringify(messageObject.responseObject);
|
|
64
64
|
this.activityLog = new cloudron_dto_1.CloudronActivityLog(activityData);
|
|
65
|
-
this.
|
|
65
|
+
this.endPointName = externalInfoStore.dependency;
|
|
66
66
|
this.subSessionId = externalInfoStore.subSessionId;
|
|
67
67
|
const externalInfo = (0, context_functions_1.GetExternalTransactionInfo)();
|
|
68
68
|
if (summaryInfoAdditional) {
|
|
69
69
|
this.addSummaryFunc = () => {
|
|
70
70
|
(0, summary_endpoint_store_1.pushSummaryInfo)({
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
endPointName: externalInfo.dependency,
|
|
72
|
+
endPointURL: summaryInfoAdditional.url,
|
|
73
73
|
processTime: this.activityLog.processTime,
|
|
74
74
|
responseStatus: summaryInfoAdditional.statusCode,
|
|
75
75
|
});
|
|
@@ -21,8 +21,8 @@ let CloudronSummaryLogsService = class CloudronSummaryLogsService {
|
|
|
21
21
|
endpointSummary: currentSummary.map((edrDetail, index) => {
|
|
22
22
|
return {
|
|
23
23
|
no: (index + 1).toString(),
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
endPointName: edrDetail.endPointName,
|
|
25
|
+
endPointURL: edrDetail.endPointURL,
|
|
26
26
|
processTime: edrDetail.processTime,
|
|
27
27
|
responseStatus: edrDetail.responseStatus,
|
|
28
28
|
};
|
|
@@ -58,10 +58,10 @@ export interface LogDetailEndpointCloudron {
|
|
|
58
58
|
custom1: ELogDetail;
|
|
59
59
|
}
|
|
60
60
|
export interface EndpointDetail {
|
|
61
|
-
|
|
61
|
+
endPointURL: string;
|
|
62
62
|
responseStatus: string;
|
|
63
63
|
processTime: number;
|
|
64
|
-
|
|
64
|
+
endPointName: string;
|
|
65
65
|
}
|
|
66
66
|
export interface LogSummaryEndpoint {
|
|
67
67
|
systemTimestamp: any;
|
|
@@ -77,7 +77,7 @@ export interface LogSummaryEndpoint {
|
|
|
77
77
|
method: string;
|
|
78
78
|
url: string;
|
|
79
79
|
headers: any;
|
|
80
|
-
|
|
80
|
+
endPointName: string;
|
|
81
81
|
}
|
|
82
82
|
export declare class CloudronActivityLog implements IActivityLog {
|
|
83
83
|
startTime: string;
|
|
@@ -140,7 +140,7 @@ export interface ILogCustom {
|
|
|
140
140
|
activityLog?: IActivityLog;
|
|
141
141
|
}
|
|
142
142
|
interface ELogCustom extends ILogCustom {
|
|
143
|
-
|
|
143
|
+
endPointName: string;
|
|
144
144
|
}
|
|
145
145
|
export interface ILogCustom2 {
|
|
146
146
|
'x-session-path': string;
|
|
@@ -149,7 +149,7 @@ export interface ELogDetail {
|
|
|
149
149
|
requestObject?: string;
|
|
150
150
|
responseObject?: string;
|
|
151
151
|
activityLog?: CloudronActivityLogNews;
|
|
152
|
-
|
|
152
|
+
endPointName: string;
|
|
153
153
|
subSessionId: string;
|
|
154
154
|
}
|
|
155
155
|
export interface IActivityLog {
|
|
@@ -162,7 +162,7 @@ export interface ActivityData {
|
|
|
162
162
|
endTime: number;
|
|
163
163
|
}
|
|
164
164
|
export interface EndpointData {
|
|
165
|
-
|
|
165
|
+
endPointName: string;
|
|
166
166
|
subSessionId: string;
|
|
167
167
|
sessionId: string;
|
|
168
168
|
}
|
|
@@ -176,7 +176,7 @@ export declare enum LogLevel {
|
|
|
176
176
|
}
|
|
177
177
|
export interface CloudronCustomLogsData {
|
|
178
178
|
startTime: number;
|
|
179
|
-
|
|
179
|
+
endPointName: string;
|
|
180
180
|
subSessionId: string;
|
|
181
181
|
}
|
|
182
182
|
export {};
|
|
@@ -82,7 +82,7 @@ class CCustom {
|
|
|
82
82
|
class CCustomEndpoint extends CCustom {
|
|
83
83
|
constructor(req, res, activityData, endpointData) {
|
|
84
84
|
super(req, res, activityData);
|
|
85
|
-
this.
|
|
85
|
+
this.endPointName = endpointData.endPointName;
|
|
86
86
|
this.subSessionId = endpointData.subSessionId;
|
|
87
87
|
}
|
|
88
88
|
}
|