@twin.org/api-processors 0.0.2-next.6 → 0.0.2-next.7
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/dist/cjs/index.cjs +4 -4
- package/dist/esm/index.mjs +4 -4
- package/docs/changelog.md +14 -0
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -315,7 +315,7 @@ class LoggingProcessor {
|
|
|
315
315
|
* The component for logging the information.
|
|
316
316
|
* @internal
|
|
317
317
|
*/
|
|
318
|
-
|
|
318
|
+
_logging;
|
|
319
319
|
/**
|
|
320
320
|
* Include the body objects when logging the information.
|
|
321
321
|
* @internal
|
|
@@ -336,7 +336,7 @@ class LoggingProcessor {
|
|
|
336
336
|
* @param options Options for the processor.
|
|
337
337
|
*/
|
|
338
338
|
constructor(options) {
|
|
339
|
-
this.
|
|
339
|
+
this._logging = core.ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
340
340
|
this._includeBody = options?.config?.includeBody ?? false;
|
|
341
341
|
this._fullBase64 = options?.config?.fullBase64 ?? false;
|
|
342
342
|
this._obfuscateProperties = options?.config?.obfuscateProperties ?? ["password"];
|
|
@@ -366,7 +366,7 @@ class LoggingProcessor {
|
|
|
366
366
|
requestUrl = request.url;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
await this.
|
|
369
|
+
await this._logging?.log({
|
|
370
370
|
level: "info",
|
|
371
371
|
source: this.CLASS_NAME,
|
|
372
372
|
ts: Date.now(),
|
|
@@ -426,7 +426,7 @@ class LoggingProcessor {
|
|
|
426
426
|
requestUrl = request.url;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
await this.
|
|
429
|
+
await this._logging?.log({
|
|
430
430
|
level: core.Is.number(response.statusCode) && response.statusCode >= web.HttpStatusCode.badRequest
|
|
431
431
|
? "error"
|
|
432
432
|
: "info",
|
package/dist/esm/index.mjs
CHANGED
|
@@ -313,7 +313,7 @@ class LoggingProcessor {
|
|
|
313
313
|
* The component for logging the information.
|
|
314
314
|
* @internal
|
|
315
315
|
*/
|
|
316
|
-
|
|
316
|
+
_logging;
|
|
317
317
|
/**
|
|
318
318
|
* Include the body objects when logging the information.
|
|
319
319
|
* @internal
|
|
@@ -334,7 +334,7 @@ class LoggingProcessor {
|
|
|
334
334
|
* @param options Options for the processor.
|
|
335
335
|
*/
|
|
336
336
|
constructor(options) {
|
|
337
|
-
this.
|
|
337
|
+
this._logging = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
338
338
|
this._includeBody = options?.config?.includeBody ?? false;
|
|
339
339
|
this._fullBase64 = options?.config?.fullBase64 ?? false;
|
|
340
340
|
this._obfuscateProperties = options?.config?.obfuscateProperties ?? ["password"];
|
|
@@ -364,7 +364,7 @@ class LoggingProcessor {
|
|
|
364
364
|
requestUrl = request.url;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
await this.
|
|
367
|
+
await this._logging?.log({
|
|
368
368
|
level: "info",
|
|
369
369
|
source: this.CLASS_NAME,
|
|
370
370
|
ts: Date.now(),
|
|
@@ -424,7 +424,7 @@ class LoggingProcessor {
|
|
|
424
424
|
requestUrl = request.url;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
await this.
|
|
427
|
+
await this._logging?.log({
|
|
428
428
|
level: Is.number(response.statusCode) && response.statusCode >= HttpStatusCode.badRequest
|
|
429
429
|
? "error"
|
|
430
430
|
: "info",
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/api-processors - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/api/compare/api-processors-v0.0.2-next.6...api-processors-v0.0.2-next.7) (2025-08-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* logging naming consistency ([a4a6ef2](https://github.com/twinfoundation/api/commit/a4a6ef2de5049045589eb78b177ff62e744bde9d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/api-models bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
16
|
+
|
|
3
17
|
## [0.0.2-next.6](https://github.com/twinfoundation/api/compare/api-processors-v0.0.2-next.5...api-processors-v0.0.2-next.6) (2025-08-19)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/api-processors",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.7",
|
|
4
4
|
"description": "Route processors for use with API servers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-models": "0.0.2-next.
|
|
17
|
+
"@twin.org/api-models": "0.0.2-next.7",
|
|
18
18
|
"@twin.org/core": "next",
|
|
19
19
|
"@twin.org/logging-models": "next",
|
|
20
20
|
"@twin.org/nameof": "next",
|