@kronos-integration/endpoint 11.1.9 → 11.2.0
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/package.json +2 -2
- package/src/endpoint.mjs +26 -7
- package/types/endpoint.d.mts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronos-integration/endpoint",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"typescript": "^7.0.2"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
|
-
"node": ">=26.
|
|
53
|
+
"node": ">=26.7.0"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
package/src/endpoint.mjs
CHANGED
|
@@ -364,20 +364,39 @@ export class Endpoint {
|
|
|
364
364
|
return [];
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
log(level, arg1) {
|
|
368
|
+
if (this.owner.passingLogLevel(level)) {
|
|
369
|
+
if (typeof arg1 === "object") {
|
|
370
|
+
arg1.endpoint = this.name;
|
|
371
|
+
this.owner.log(level, arg1);
|
|
372
|
+
}
|
|
373
|
+
this.owner.log(level, { endpoint: this.name, message: arg1 });
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
trace(...args) {
|
|
378
|
+
this.log("trace", ...args);
|
|
379
|
+
}
|
|
380
|
+
debug(...args) {
|
|
381
|
+
this.log("debug", ...args);
|
|
382
|
+
}
|
|
367
383
|
info(...args) {
|
|
368
|
-
this.
|
|
384
|
+
this.log("info", ...args);
|
|
385
|
+
}
|
|
386
|
+
notice(...args) {
|
|
387
|
+
this.log("notice", ...args);
|
|
369
388
|
}
|
|
370
389
|
warn(...args) {
|
|
371
|
-
this.
|
|
390
|
+
this.log("warn", ...args);
|
|
372
391
|
}
|
|
373
392
|
error(...args) {
|
|
374
|
-
this.
|
|
393
|
+
this.log("error", ...args);
|
|
375
394
|
}
|
|
376
|
-
|
|
377
|
-
this.
|
|
395
|
+
crit(...args) {
|
|
396
|
+
this.log("crit", ...args);
|
|
378
397
|
}
|
|
379
|
-
|
|
380
|
-
this.
|
|
398
|
+
alert(...args) {
|
|
399
|
+
this.log("alert", ...args);
|
|
381
400
|
}
|
|
382
401
|
}
|
|
383
402
|
|
package/types/endpoint.d.mts
CHANGED
|
@@ -153,11 +153,15 @@ export declare class Endpoint {
|
|
|
153
153
|
*/
|
|
154
154
|
didConnect(endpoint: Endpoint, other: Endpoint): void;
|
|
155
155
|
get receivingInterceptors(): never[];
|
|
156
|
+
log(level: any, arg1: any): void;
|
|
157
|
+
trace(...args: any[]): void;
|
|
158
|
+
debug(...args: any[]): void;
|
|
156
159
|
info(...args: any[]): void;
|
|
160
|
+
notice(...args: any[]): void;
|
|
157
161
|
warn(...args: any[]): void;
|
|
158
162
|
error(...args: any[]): void;
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
crit(...args: any[]): void;
|
|
164
|
+
alert(...args: any[]): void;
|
|
161
165
|
}
|
|
162
166
|
/**
|
|
163
167
|
* Check for Endpoint.
|