@tc-libs/debugger 3.14.0 → 4.0.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 CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tc-libs/debugger",
3
- "version": "3.14.0",
3
+ "version": "4.0.0",
4
4
  "dependencies": {
5
- "@tc-libs/errors": "3.14.0",
5
+ "@tc-libs/errors": "4.0.0",
6
6
  "@nestjs/common": "^11.0.12",
7
7
  "@aws-sdk/client-cloudwatch-logs": "^3.779.0",
8
8
  "winston": "^3.17.0",
@@ -14,5 +14,5 @@
14
14
  "type": "commonjs",
15
15
  "main": "./src/index.js",
16
16
  "typings": "./src/index.d.ts",
17
- "types": "./src/index.d.ts"
17
+ "types": "./../packages/debugger/src/index.d.ts"
18
18
  }
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './debugger.module';
2
+ export * from './debugger.module.options';
2
3
  export * from './services';
3
4
  export * from './interfaces';
4
5
  export * from './constants';
package/src/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./debugger.module"), exports);
5
+ tslib_1.__exportStar(require("./debugger.module.options"), exports);
5
6
  tslib_1.__exportStar(require("./services"), exports);
6
7
  tslib_1.__exportStar(require("./interfaces"), exports);
7
8
  tslib_1.__exportStar(require("./constants"), exports);
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/debugger/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,qDAA2B;AAC3B,uDAA6B;AAC7B,sDAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/debugger/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,oEAA0C;AAC1C,qDAA2B;AAC3B,uDAA6B;AAC7B,sDAA4B"}
package/README.md DELETED
@@ -1,67 +0,0 @@
1
- # @tc-libs/debugger
2
-
3
- Layer di logging/debug operativo basato su `winston`, separato dal package `@tc-libs/logger`.
4
-
5
- Questo package e orientato soprattutto a:
6
-
7
- - log applicativi generici
8
- - log HTTP strutturati
9
- - output su console, file e Telegram
10
-
11
- ## Registrazione
12
-
13
- ```ts
14
- DebuggerModule.register(
15
- {
16
- system: {
17
- writeIntoConsole: true,
18
- writeIntoTelegram: false,
19
- writeIntoFile: true,
20
- maxSize: '10M',
21
- maxFiles: '14d',
22
- },
23
- telegram: {
24
- chatId: process.env.DEBUG_TELEGRAM_CHAT_ID!,
25
- apiToken: process.env.DEBUG_TELEGRAM_BOT_TOKEN!,
26
- },
27
- },
28
- true,
29
- );
30
- ```
31
-
32
- ## Servizio
33
-
34
- `DebuggerService` espone:
35
-
36
- - `info`, `debug`, `warn`, `error`
37
- - `infoHttp`, `debugHttp`, `warnHttp`, `errorHttp`
38
-
39
- Esempio:
40
-
41
- ```ts
42
- this.debuggerService.info('Cache warmed', { keys: 12 });
43
- ```
44
-
45
- Per HTTP:
46
-
47
- ```ts
48
- this.debuggerService.errorHttp(requestId, {
49
- description: 'Unhandled exception',
50
- class: 'UserController',
51
- function: 'create',
52
- path: '/api/v1/users',
53
- data: payload,
54
- }, error);
55
- ```
56
-
57
- ## Differenza rispetto a `@tc-libs/logger`
58
-
59
- - `logger`: factory di logger contestuali, piu semplice
60
- - `debugger`: pipeline piu strutturata con output multipli e metodi HTTP dedicati
61
-
62
- ## Sviluppo
63
-
64
- ```bash
65
- nx build debugger
66
- nx test debugger
67
- ```