@nsshunt/stsappframework 3.0.170 → 3.0.172
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/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/winstonTransport.js +34 -0
- package/dist/winstonTransport.js.map +1 -0
- package/package.json +16 -15
- package/src/index.ts +1 -0
- package/src/winstonTransport.ts +39 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/winstonTransport.d.ts +14 -0
- package/types/winstonTransport.d.ts.map +1 -0
package/dist/index.js
CHANGED
|
@@ -36,4 +36,5 @@ __exportStar(require("./influxdb/influxDBManagerService"), exports);
|
|
|
36
36
|
__exportStar(require("./influxdb/influxDBManagerAgent"), exports);
|
|
37
37
|
__exportStar(require("./publishertransports/publishTransportUtils"), exports);
|
|
38
38
|
__exportStar(require("./instrumentationsubscriber"), exports);
|
|
39
|
+
__exportStar(require("./winstonTransport"), exports);
|
|
39
40
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,mDAAgC;AAChC,6CAA0B;AAC1B,kDAA+B;AAC/B,kDAA+B;AAC/B,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,yDAAsC;AACtC,oDAAiC;AACjC,uDAAoC;AACpC,wDAAqC;AACrC,wDAAqC;AACrC,yDAAsC;AACtC,6DAA0C;AAC1C,iEAA8C;AAC9C,oEAAiD;AACjD,kEAA+C;AAC/C,8EAA2D;AAC3D,8DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,mDAAgC;AAChC,6CAA0B;AAC1B,kDAA+B;AAC/B,kDAA+B;AAC/B,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,yDAAsC;AACtC,oDAAiC;AACjC,uDAAoC;AACpC,wDAAqC;AACrC,wDAAqC;AACrC,yDAAsC;AACtC,6DAA0C;AAC1C,iEAA8C;AAC9C,oEAAiD;AACjD,kEAA+C;AAC/C,8EAA2D;AAC3D,8DAA2C;AAC3C,qDAAkC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.STSWinstonTransport = void 0;
|
|
7
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
8
|
+
const winston_transport_1 = __importDefault(require("winston-transport"));
|
|
9
|
+
class STSWinstonTransport extends winston_transport_1.default {
|
|
10
|
+
myopts;
|
|
11
|
+
constructor(opts) {
|
|
12
|
+
super(opts);
|
|
13
|
+
this.myopts = opts;
|
|
14
|
+
}
|
|
15
|
+
get debugger() {
|
|
16
|
+
return this.myopts.debugger;
|
|
17
|
+
}
|
|
18
|
+
set debugger(newDebugger) {
|
|
19
|
+
this.myopts.debugger = newDebugger;
|
|
20
|
+
}
|
|
21
|
+
log(info, callback) {
|
|
22
|
+
//setImmediate(() => {
|
|
23
|
+
if (info[Symbol.for('level')] == 'debug') {
|
|
24
|
+
if (this.myopts.debugger) {
|
|
25
|
+
this.myopts.debugger(info.message);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
this.emit('logged', info);
|
|
29
|
+
callback();
|
|
30
|
+
//});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.STSWinstonTransport = STSWinstonTransport;
|
|
34
|
+
//# sourceMappingURL=winstonTransport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"winstonTransport.js","sourceRoot":"","sources":["../src/winstonTransport.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,0EAAqE;AASrE,MAAa,mBAAoB,SAAQ,2BAAS;IAE9C,MAAM,CAAuB;IAE7B,YAAY,IAA0B;QAClC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED,IAAI,QAAQ,CAAC,WAAiC;QAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,IAAS,EAAE,QAAa;QACxB,sBAAsB;QACtB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACvB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,QAAQ,EAAE,CAAC;QACX,KAAK;IACT,CAAC;CACJ;AA5BD,kDA4BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nsshunt/stsappframework",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.172",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/nsshunt/stsappframework#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@babel/preset-env": "^7.23.
|
|
28
|
+
"@babel/preset-env": "^7.23.9",
|
|
29
29
|
"@babel/preset-typescript": "^7.23.3",
|
|
30
30
|
"@tsconfig/node20": "^20.1.2",
|
|
31
31
|
"@types/cookie-parser": "^1.4.6",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@types/jest": "^29.5.11",
|
|
35
35
|
"@types/jsonwebtoken": "^9.0.5",
|
|
36
36
|
"@types/lodash": "^4.14.202",
|
|
37
|
-
"@types/pg": "^8.
|
|
38
|
-
"@types/uuid": "^9.0.
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
40
|
-
"@typescript-eslint/parser": "^6.
|
|
37
|
+
"@types/pg": "^8.11.0",
|
|
38
|
+
"@types/uuid": "^9.0.8",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
|
40
|
+
"@typescript-eslint/parser": "^6.20.0",
|
|
41
41
|
"eslint": "^8.56.0",
|
|
42
42
|
"jest": "^29.7.0",
|
|
43
43
|
"supertest": "^6.3.4",
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@influxdata/influxdb-client": "^1.33.2",
|
|
50
50
|
"@influxdata/influxdb-client-apis": "^1.33.2",
|
|
51
|
-
"@nsshunt/stsconfig": "^1.25.
|
|
52
|
-
"@nsshunt/stsdatamanagement": "^1.17.
|
|
53
|
-
"@nsshunt/stsinstrumentation": "^7.0.
|
|
54
|
-
"@nsshunt/stspublisherserver": "^2.0.
|
|
55
|
-
"@nsshunt/stssocketio-client": "^1.0.
|
|
56
|
-
"@nsshunt/stsutils": "^1.16.
|
|
51
|
+
"@nsshunt/stsconfig": "^1.25.80",
|
|
52
|
+
"@nsshunt/stsdatamanagement": "^1.17.156",
|
|
53
|
+
"@nsshunt/stsinstrumentation": "^7.0.21",
|
|
54
|
+
"@nsshunt/stspublisherserver": "^2.0.55",
|
|
55
|
+
"@nsshunt/stssocketio-client": "^1.0.7",
|
|
56
|
+
"@nsshunt/stsutils": "^1.16.44",
|
|
57
57
|
"@socket.io/cluster-adapter": "^0.2.2",
|
|
58
58
|
"@socket.io/redis-streams-adapter": "^0.1.0",
|
|
59
59
|
"@types/on-headers": "^1.0.3",
|
|
60
60
|
"@types/pidusage": "^2.0.5",
|
|
61
61
|
"@types/tough-cookie": "^4.0.5",
|
|
62
|
-
"axios": "^1.6.
|
|
62
|
+
"axios": "^1.6.7",
|
|
63
63
|
"chalk": "^4.1.2",
|
|
64
64
|
"cookie-parser": "^1.4.6",
|
|
65
65
|
"cors": "^2.8.5",
|
|
@@ -77,10 +77,11 @@
|
|
|
77
77
|
"redis": "^4.6.12",
|
|
78
78
|
"socket.io": "^4.7.4",
|
|
79
79
|
"socket.io-client": "^4.7.4",
|
|
80
|
-
"systeminformation": "^5.21.
|
|
80
|
+
"systeminformation": "^5.21.24",
|
|
81
81
|
"tiny-emitter": "^2.1.0",
|
|
82
82
|
"tough-cookie": "^4.1.3",
|
|
83
83
|
"uuid": "^9.0.1",
|
|
84
|
-
"vitest": "^1.2.
|
|
84
|
+
"vitest": "^1.2.2",
|
|
85
|
+
"winston": "^3.11.0"
|
|
85
86
|
}
|
|
86
87
|
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
2
|
+
import Transport, { TransportStreamOptions } from 'winston-transport'
|
|
3
|
+
|
|
4
|
+
import debugModule from 'debug'
|
|
5
|
+
|
|
6
|
+
export interface ISTSWinstonTransport extends TransportStreamOptions {
|
|
7
|
+
stsContext: string
|
|
8
|
+
debugger?: debugModule.Debugger
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class STSWinstonTransport extends Transport {
|
|
12
|
+
|
|
13
|
+
myopts: ISTSWinstonTransport;
|
|
14
|
+
|
|
15
|
+
constructor(opts: ISTSWinstonTransport) {
|
|
16
|
+
super(opts);
|
|
17
|
+
this.myopts = opts;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get debugger() : debugModule.Debugger | undefined {
|
|
21
|
+
return this.myopts.debugger;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
set debugger(newDebugger: debugModule.Debugger) {
|
|
25
|
+
this.myopts.debugger = newDebugger;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
log(info: any, callback: any) {
|
|
29
|
+
//setImmediate(() => {
|
|
30
|
+
if (info[Symbol.for('level')] == 'debug') {
|
|
31
|
+
if (this.myopts.debugger) {
|
|
32
|
+
this.myopts.debugger(info.message);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
this.emit('logged', info);
|
|
36
|
+
callback();
|
|
37
|
+
//});
|
|
38
|
+
}
|
|
39
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export * from './influxdb/influxDBManagerService';
|
|
|
20
20
|
export * from './influxdb/influxDBManagerAgent';
|
|
21
21
|
export * from './publishertransports/publishTransportUtils';
|
|
22
22
|
export * from './instrumentationsubscriber';
|
|
23
|
+
export * from './winstonTransport';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6BAA6B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Transport, { TransportStreamOptions } from 'winston-transport';
|
|
2
|
+
import debugModule from 'debug';
|
|
3
|
+
export interface ISTSWinstonTransport extends TransportStreamOptions {
|
|
4
|
+
stsContext: string;
|
|
5
|
+
debugger?: debugModule.Debugger;
|
|
6
|
+
}
|
|
7
|
+
export declare class STSWinstonTransport extends Transport {
|
|
8
|
+
myopts: ISTSWinstonTransport;
|
|
9
|
+
constructor(opts: ISTSWinstonTransport);
|
|
10
|
+
get debugger(): debugModule.Debugger | undefined;
|
|
11
|
+
set debugger(newDebugger: debugModule.Debugger);
|
|
12
|
+
log(info: any, callback: any): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=winstonTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"winstonTransport.d.ts","sourceRoot":"","sources":["../src/winstonTransport.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAErE,OAAO,WAAW,MAAM,OAAO,CAAA;AAE/B,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAChE,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;CAClC;AAED,qBAAa,mBAAoB,SAAQ,SAAS;IAE9C,MAAM,EAAE,oBAAoB,CAAC;gBAEjB,IAAI,EAAE,oBAAoB;IAKtC,IAAI,QAAQ,IAAK,WAAW,CAAC,QAAQ,GAAG,SAAS,CAEhD;IAED,IAAI,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAE7C;IAED,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAW/B"}
|