@ddd-ts-kit/pino 0.113.2 → 0.115.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/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:4a8c6a1bc0e68219 -->
2
+ <!-- translation-of: README.md sha256:cdf16b8048155c8c -->
3
3
 
4
4
  # @ddd-ts-kit/pino
5
5
 
@@ -18,7 +18,7 @@ npm i -D pino-pretty # seulement pour le format lisible
18
18
  Écrit pour pino 10. `pino-pretty` 13 est un *peer* facultatif : il n'est chargé que lorsque le
19
19
  format `pretty` est demandé.
20
20
 
21
- ![La place du logger pino dans une application : le domaine et les gestionnaires ne journalisent rien ; les adaptateurs de l'infrastructure, les contrôleurs de la présentation et les aspects écrivent par le port Logger du noyau ; la racine de composition lie PinoLogger à ce port ; pino écrit des lignes JSON sur la sortie standard, que la plateforme collecte](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.fr.svg)
21
+ ![La place du logger pino dans une application : le domaine et les gestionnaires ne journalisent rien ; les adaptateurs de l'infrastructure, les contrôleurs de la présentation et les aspects écrivent par le port Logger du noyau ; la racine de composition lie PinoLogger à ce port ; pino écrit des lignes JSON sur la sortie standard, que la plateforme collecte](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.fr.svg)
22
22
 
23
23
  Le domaine et les gestionnaires (handlers) disent ce qui s'est passé par des événements et des
24
24
  erreurs, jamais par une ligne de journal. Ce qui écrit les entoure : les adaptateurs de
@@ -83,7 +83,7 @@ Une ligne de l'application, telle qu'elle est écrite :
83
83
  {"level":"info","time":"2026-03-01T10:00:00.000Z","service":"shop-api","environment":"production","correlationId":"9f2c","origin":"http","actorId":"user-1","tenantId":"acme","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"00f067aa0ba902b7","context":"shipping","message":"order shipped"}
84
84
  ```
85
85
 
86
- ![Le chemin d'un appel à logger.info : sous le seuil, il s'arrête après une comparaison ; sinon l'adaptateur décrit les erreurs parmi les champs et écarte les clés level et time ; pino écrit l'en-tête, puis service, environment et base, les champs des enfants, ce que renvoie fields() et les champs de la ligne ; il remplace la valeur de chaque clé de secret par [redacted] ; puis il confie la ligne JSON à sa destination : tout de suite sur la sortie standard, par un tampon de 4 Kio avec asynchronous, ou au worker de pino-pretty](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.fr.svg)
86
+ ![Le chemin d'un appel à logger.info : sous le seuil, il s'arrête après une comparaison ; sinon l'adaptateur décrit les erreurs parmi les champs et écarte les clés level et time ; pino écrit l'en-tête, puis service, environment et base, les champs des enfants, ce que renvoie fields() et les champs de la ligne ; il remplace la valeur de chaque clé de secret par [redacted] ; puis il confie la ligne JSON à sa destination : tout de suite sur la sortie standard, par un tampon de 4 Kio avec asynchronous, ou au worker de pino-pretty](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.fr.svg)
87
87
 
88
88
  **Corrélation.** `fields` est lu à chaque ligne écrite, par le `mixin` de pino : aucun point
89
89
  d'appel ne passe d'identifiant. `traceLogFields(scope)` renvoie les identifiants de trace et de
@@ -97,7 +97,7 @@ si bien qu'une clé donnée par les deux est écrite deux fois et qu'un analyseu
97
97
  `fields`. `StdoutLogger` les ordonne de la même façon ; `@ddd-ts-kit/winston` non (là, un enfant
98
98
  l'emporte sur `fields`). Ne liez pas dans un enfant une clé que `fields` renvoie.
99
99
 
100
- ![La valeur que prend une clé donnée deux fois, de la plus faible à la plus forte : avec pino et StdoutLogger, service, environment et base, puis les enfants, puis fields(), puis la ligne, qui l'emporte ; avec winston, fields(), puis les enfants, puis la ligne, puis service, environment et base, qui l'emportent](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.fr.svg)
100
+ ![La valeur que prend une clé donnée deux fois, de la plus faible à la plus forte : avec pino et StdoutLogger, service, environment et base, puis les enfants, puis fields(), puis la ligne, qui l'emporte ; avec winston, fields(), puis les enfants, puis la ligne, puis service, environment et base, qui l'emportent](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.fr.svg)
101
101
 
102
102
  **Une instance à vous.** Le projet qui configure déjà pino continue de le faire, et prend les
103
103
  pièces qu'il veut :
@@ -111,14 +111,19 @@ import { traceLogFields } from '@ddd-ts-kit/tracing';
111
111
 
112
112
  declare const scope: ExecutionScope; // celle que crée la racine de composition
113
113
 
114
+ const redact = [...CREDENTIAL_KEYS, 'iban'];
115
+
114
116
  const instance = pino({
115
- mixin: correlationMixin(() => traceLogFields(scope)),
116
- redact: credentialRedaction([...CREDENTIAL_KEYS, 'iban']),
117
+ mixin: correlationMixin(() => traceLogFields(scope), redact),
118
+ redact: credentialRedaction(redact),
117
119
  });
118
120
 
119
- export const logger = new PinoLogger(instance);
121
+ export const logger = new PinoLogger(instance, { redact });
120
122
  ```
121
123
 
124
+ Les trois prennent la même liste : pino masque une clé du premier niveau d'une ligne telle que
125
+ la liste l'écrit, l'adaptateur et le *mixin* l'y masquent dans toute autre casse.
126
+
122
127
  `createPinoLogger` écrit `level` par son nom et le message sous `message`, comme le
123
128
  `StdoutLogger` du *package* des aspects et comme `@ddd-ts-kit/winston` : un même tableau de bord
124
129
  lit les trois. Une instance à vous garde les clés que vous lui avez données (`msg` et un niveau
@@ -235,12 +240,11 @@ d'une ligne, d'un enfant et de `fields` de la même façon. La valeur de ces cl
235
240
  `refreshToken`, `idToken`, `client_secret`, `clientSecret`, `client-secret`, `private_key`,
236
241
  `privateKey`
237
242
 
238
- Ces noms sont comparés quelle que soit leur casse (`Authorization`, `X-Api-Key`), par
239
- `isCredentialKey` du noyau. `redact: ['iban', 'ssn']` complète la liste : un nom ajouté est
240
- comparé tel qu'il est écrit au premier niveau d'une ligne, quelle que soit sa casse un niveau en
241
- dessous, car pino désigne une clé du premier niveau par son chemin. Rien n'est cherché plus
242
- profond qu'un niveau, ni dans une liste : journalisez la partie que vous visez, pas une
243
- requête HTTP entière.
243
+ `redact: ['iban', 'ssn']` complète la liste. Chaque nom, de la liste ou ajouté, est comparé
244
+ quelle que soit sa casse (`Authorization`, `X-Api-Key`, `IBAN`), au premier niveau d'une ligne
245
+ et un niveau en dessous, par `hiddenKeys` du noyau : `@ddd-ts-kit/winston` et `StdoutLogger`
246
+ interrogent la même fonction. Rien n'est cherché plus profond qu'un niveau, ni dans une liste :
247
+ journalisez la partie que vous visez, pas une requête HTTP entière.
244
248
 
245
249
  **Une erreur passée en champ** (`logger.error('payment failed', { error })` : la `LogValue` du
246
250
  port admet une `Error`) est écrite telle que la décrit `describeError` du noyau, de la même façon
@@ -309,9 +313,9 @@ après le vidage ne s'exécuterait jamais. `app.stop()` l'appelle, en dernier, a
309
313
  d'erreurs : l'arrêt journalise lui aussi. Sans l'application du *package* di, appelez-le
310
314
  vous-même à cet endroit.
311
315
 
312
- Le port appelle un vidage une fois, à l'arrêt, et ne précise pas ce qui est journalisé ensuite.
313
- Ici le *logger* reste utilisable : une ligne journalisée après le vidage est écrite comme les
314
- autres, et avec `asynchronous: true` elle attend dans le tampon le crochet de sortie de pino.
316
+ Un vidage ne clôt rien, comme le dit le port : une ligne journalisée ensuite est écrite comme
317
+ les autres, et avec `asynchronous: true` elle attend dans le tampon le vidage suivant ou le
318
+ crochet de sortie de pino.
315
319
 
316
320
  ## Performances
317
321
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ npm i -D pino-pretty # only for the pretty format
16
16
  Written against pino 10. `pino-pretty` 13 is an optional peer: it is loaded only when the
17
17
  `pretty` format is asked for.
18
18
 
19
- ![Where the pino logger sits in an application: the domain and the handlers log nothing; the adapters of infrastructure, the controllers of presentation and the aspects write through the kernel Logger port; the composition root binds PinoLogger to that port; pino writes JSON lines to the standard output, which the platform collects](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.svg)
19
+ ![Where the pino logger sits in an application: the domain and the handlers log nothing; the adapters of infrastructure, the controllers of presentation and the aspects write through the kernel Logger port; the composition root binds PinoLogger to that port; pino writes JSON lines to the standard output, which the platform collects](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.svg)
20
20
 
21
21
  The domain and the handlers say what happened with events and errors, never with a log line.
22
22
  What writes is around them: the adapters of `infrastructure/`, the controllers of
@@ -79,7 +79,7 @@ One line of the application, as it is written:
79
79
  {"level":"info","time":"2026-03-01T10:00:00.000Z","service":"shop-api","environment":"production","correlationId":"9f2c","origin":"http","actorId":"user-1","tenantId":"acme","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"00f067aa0ba902b7","context":"shipping","message":"order shipped"}
80
80
  ```
81
81
 
82
- ![The path of one call to logger.info: below the threshold it stops after one comparison; otherwise the adapter describes the errors among the fields and drops the level and time keys; pino writes the header, then service, environment and base, the fields of the children, what fields() answers and the fields of the line; it replaces the value of every credential key by [redacted]; then it hands the JSON line to its destination, at once on the standard output, through a 4 KiB buffer with asynchronous, or to the pino-pretty worker](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.svg)
82
+ ![The path of one call to logger.info: below the threshold it stops after one comparison; otherwise the adapter describes the errors among the fields and drops the level and time keys; pino writes the header, then service, environment and base, the fields of the children, what fields() answers and the fields of the line; it replaces the value of every credential key by [redacted]; then it hands the JSON line to its destination, at once on the standard output, through a 4 KiB buffer with asynchronous, or to the pino-pretty worker](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.svg)
83
83
 
84
84
  **Correlation.** `fields` is read at each line that is written, through the pino `mixin`: no
85
85
  call site passes an id. `traceLogFields(scope)` answers the trace and span ids inside a span,
@@ -92,7 +92,7 @@ by both is written twice and a JSON parser reads the one of `fields`. `StdoutLog
92
92
  them the same way; `@ddd-ts-kit/winston` does not (there a child wins over `fields`). Do not
93
93
  bind in a child a key that `fields` answers.
94
94
 
95
- ![Which value a key gets when it is given twice, from the weakest to the strongest: with pino and StdoutLogger, service, environment and base, then the children, then fields(), then the line, which wins; with winston, fields(), then the children, then the line, then service, environment and base, which win](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.svg)
95
+ ![Which value a key gets when it is given twice, from the weakest to the strongest: with pino and StdoutLogger, service, environment and base, then the children, then fields(), then the line, which wins; with winston, fields(), then the children, then the line, then service, environment and base, which win](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.svg)
96
96
 
97
97
  **An instance of your own.** The project that already configures pino keeps doing so, and
98
98
  takes the pieces it wants:
@@ -106,14 +106,19 @@ import { traceLogFields } from '@ddd-ts-kit/tracing';
106
106
 
107
107
  declare const scope: ExecutionScope; // the one the composition root creates
108
108
 
109
+ const redact = [...CREDENTIAL_KEYS, 'iban'];
110
+
109
111
  const instance = pino({
110
- mixin: correlationMixin(() => traceLogFields(scope)),
111
- redact: credentialRedaction([...CREDENTIAL_KEYS, 'iban']),
112
+ mixin: correlationMixin(() => traceLogFields(scope), redact),
113
+ redact: credentialRedaction(redact),
112
114
  });
113
115
 
114
- export const logger = new PinoLogger(instance);
116
+ export const logger = new PinoLogger(instance, { redact });
115
117
  ```
116
118
 
119
+ The three take the same list: pino hides a key at the top of a line as the list writes it, and
120
+ the adapter and the mixin hide it there in any other case.
121
+
117
122
  `createPinoLogger` writes `level` by its name and the message under `message`, like the
118
123
  `StdoutLogger` of the aspects package and like `@ddd-ts-kit/winston`: one dashboard reads the
119
124
  three. An instance of your own keeps the keys you gave it (`msg` and a numeric level by default).
@@ -226,11 +231,11 @@ one level below (`headers.authorization`, `body.password`):
226
231
  `refreshToken`, `idToken`, `client_secret`, `clientSecret`, `client-secret`, `private_key`,
227
232
  `privateKey`
228
233
 
229
- These names are matched whatever their case (`Authorization`, `X-Api-Key`), by
230
- `isCredentialKey` of the kernel. `redact: ['iban', 'ssn']` adds to the list: an added name is
231
- matched as it is written at the top of a line, whatever its case one level below, since pino
232
- names a key at the top by its path. Nothing is looked for deeper than one level, nor inside a
233
- list: log the part you mean, not a whole request.
234
+ `redact: ['iban', 'ssn']` adds to the list. Every name, of the list or added, is matched
235
+ whatever its case (`Authorization`, `X-Api-Key`, `IBAN`), at the top of a line and one level
236
+ below, by `hiddenKeys` of the kernel: `@ddd-ts-kit/winston` and `StdoutLogger` ask the same
237
+ function. Nothing is looked for deeper than one level, nor inside a list: log the part you
238
+ mean, not a whole request.
234
239
 
235
240
  **An error passed as a field** (`logger.error('payment failed', { error })`: the `LogValue` of
236
241
  the port admits an `Error`) is written as `describeError` of the kernel describes it, the same
@@ -296,9 +301,8 @@ process with nothing else to do, and what the shutdown does after the flush woul
296
301
  `app.stop()` calls it, last, after the modules stopped and the error reporter was flushed:
297
302
  stopping logs too. Without the application of the di package, call it yourself at that place.
298
303
 
299
- The port calls a flush once, at shutdown, and leaves what is logged afterwards unspecified.
300
- Here the logger stays usable: a line logged after the flush is written like the others, and
301
- with `asynchronous: true` it waits in the buffer for pino's exit hook.
304
+ A flush ends nothing, as the port says: a line logged after it is written like the others, and
305
+ with `asynchronous: true` it waits in the buffer for the next flush or for pino's exit hook.
302
306
 
303
307
  ## Performance
304
308
 
@@ -1,7 +1,9 @@
1
- import type { LogFields } from '@ddd-ts-kit/kernel';
1
+ import { type LogFields } from '@ddd-ts-kit/kernel';
2
2
  /**
3
3
  * A pino `mixin` reading the fields of the work in progress at each line that is written. A
4
4
  * source that throws (no active span, no execution context) gives no field, never a lost line.
5
+ * `redact` names the keys hidden in addition to `CREDENTIAL_KEYS`, those `credentialRedaction`
6
+ * was given: among these fields they are hidden whatever their case.
5
7
  */
6
- export declare function correlationMixin(fields: () => LogFields): () => LogFields;
8
+ export declare function correlationMixin(fields: () => LogFields, redact?: readonly string[]): () => LogFields;
7
9
  //# sourceMappingURL=correlation-mixin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"correlation-mixin.d.ts","sourceRoot":"","sources":["../../src/correlation/correlation-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,MAAM,SAAS,CASzE"}
1
+ {"version":3,"file":"correlation-mixin.d.ts","sourceRoot":"","sources":["../../src/correlation/correlation-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGhE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,SAAS,EAAE,MAAM,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,SAAS,CAWzG"}
@@ -1,13 +1,17 @@
1
+ import { hiddenKeys } from '@ddd-ts-kit/kernel';
1
2
  import { withoutCredentialsAtTop } from '../redaction/without-credentials-at-top.js';
2
3
  /**
3
4
  * A pino `mixin` reading the fields of the work in progress at each line that is written. A
4
5
  * source that throws (no active span, no execution context) gives no field, never a lost line.
6
+ * `redact` names the keys hidden in addition to `CREDENTIAL_KEYS`, those `credentialRedaction`
7
+ * was given: among these fields they are hidden whatever their case.
5
8
  */
6
- export function correlationMixin(fields) {
9
+ export function correlationMixin(fields, redact = []) {
10
+ const isHidden = hiddenKeys(redact);
7
11
  return () => {
8
12
  try {
9
13
  // A copy: pino merges the fields of the line into the object the mixin answers.
10
- return withoutCredentialsAtTop({ ...fields() });
14
+ return withoutCredentialsAtTop({ ...fields() }, isHidden);
11
15
  }
12
16
  catch {
13
17
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"correlation-mixin.js","sourceRoot":"","sources":["../../src/correlation/correlation-mixin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,OAAO,GAAG,EAAE;QACV,IAAI,CAAC;YACH,gFAAgF;YAChF,OAAO,uBAAuB,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"correlation-mixin.js","sourceRoot":"","sources":["../../src/correlation/correlation-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAuB,EAAE,MAAM,GAAsB,EAAE;IACtF,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAEpC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC;YACH,gFAAgF;YAChF,OAAO,uBAAuB,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -20,8 +20,6 @@ export interface CreatePinoLoggerOptions extends PinoLoggerOptions {
20
20
  * `traceLogFields` of the tracing package or `logFieldsOf` of the current execution context.
21
21
  */
22
22
  readonly fields?: () => LogFields;
23
- /** Field names hidden in addition to `CREDENTIAL_KEYS`, at the top of a line and one level below. */
24
- readonly redact?: readonly string[];
25
23
  /**
26
24
  * Buffers the lines and writes them off the hot path. Default `false`: every line is
27
25
  * written before the call returns. See "Performance" in the README for what a crash loses.
@@ -1 +1 @@
1
- {"version":3,"file":"create-pino-logger.d.ts","sourceRoot":"","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OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGnE,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACpC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5D;AAKD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,UAAU,CAUlF"}
@@ -11,7 +11,10 @@ const BUFFERED_BYTES = 4096;
11
11
  */
12
12
  export function createPinoLogger(options = {}) {
13
13
  const instance = pino(pinoOptions(options), options.format === 'pretty' ? prettyTransport(options) : destinationOf(options));
14
- return new PinoLogger(instance, options.scrubMessages === undefined ? {} : { scrubMessages: options.scrubMessages });
14
+ return new PinoLogger(instance, {
15
+ ...(options.scrubMessages === undefined ? {} : { scrubMessages: options.scrubMessages }),
16
+ ...(options.redact === undefined ? {} : { redact: options.redact }),
17
+ });
15
18
  }
16
19
  function pinoOptions(options) {
17
20
  return {
@@ -21,7 +24,7 @@ function pinoOptions(options) {
21
24
  base: baseFields(options),
22
25
  formatters: { level: (label) => ({ level: label }) },
23
26
  redact: credentialRedaction([...CREDENTIAL_KEYS, ...(options.redact ?? [])]),
24
- ...(options.fields === undefined ? {} : { mixin: correlationMixin(options.fields) }),
27
+ ...(options.fields === undefined ? {} : { mixin: correlationMixin(options.fields, options.redact) }),
25
28
  };
26
29
  }
27
30
  function baseFields(options) {
@@ -1 +1 @@
1
- {"version":3,"file":"create-pino-logger.js","sourceRoot":"","sources":["../src/create-pino-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiC,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,IAAI,EAA8C,MAAM,MAAM,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,UAAU,EAA0B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAmCvE,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAO,GAA4B,EAAE;IACpE,MAAM,QAAQ,GAAG,IAAI,CACnB,WAAW,CAAC,OAAO,CAAC,EACpB,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAChF,CAAC;IAEF,OAAO,IAAI,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;AACvH,CAAC;AAED,SAAS,WAAW,CAAC,OAAgC;IACnD,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,MAAM;QAC9B,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO;QACxC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;QACzB,U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,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QAC5C,MAAM,IAAI,SAAS,CAAC,8FAA8F,CAAC,CAAC;IACtH,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE;YACP,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,eAAe;YACnD,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,gBAAgB;YAC/B,IAAI,EAAE,OAAO,CAAC,YAAY,KAAK,IAAI;SACpC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CAAC,OAAgC;IACrD,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QAC5C,OAAO,OAAO,CAAC,WAAW,CAAC;IAC7B,CAAC;IAED,OAAO,IAAI,CAAC,WAAW,CAAC;QACtB,IAAI,EAAE,OAAO,CAAC,WAAW,IAAI,eAAe;QAC5C,IAAI,EAAE,OAAO,CAAC,YAAY,KAAK,IAAI;QACnC,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxE,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,9 @@
1
- import { type DescribeErrorOptions, type LogFields, type LogValue } from '@ddd-ts-kit/kernel';
1
+ import { type DescribeErrorOptions, type IsHiddenKey, type LogFields, type LogValue } from '@ddd-ts-kit/kernel';
2
2
  /**
3
- * The fields as pino receives them: errors described, the value of a credential key hidden
3
+ * The fields as pino receives them: errors described, the value of a hidden key replaced
4
4
  * whatever its case, and no key that would forge the header. pino writes `level` and `time`
5
5
  * before the fields: a field of that name would be a second key of the line, and the last one
6
6
  * is read.
7
7
  */
8
- export declare function lineFields(fields: LogFields, options: DescribeErrorOptions): Record<string, LogValue>;
8
+ export declare function lineFields(fields: LogFields, options: DescribeErrorOptions, isHidden: IsHiddenKey): Record<string, LogValue>;
9
9
  //# sourceMappingURL=line-fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"line-fields.d.ts","sourceRoot":"","sources":["../../src/fields/line-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnH;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAIrG"}
1
+ {"version":3,"file":"line-fields.d.ts","sourceRoot":"","sources":["../../src/fields/line-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAG5B;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,WAAW,GACpB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAI1B"}
@@ -1,13 +1,13 @@
1
- import { describeErrorFields } from '@ddd-ts-kit/kernel';
1
+ import { describeErrorFields, } from '@ddd-ts-kit/kernel';
2
2
  import { withoutCredentialsAtTop } from '../redaction/without-credentials-at-top.js';
3
3
  /**
4
- * The fields as pino receives them: errors described, the value of a credential key hidden
4
+ * The fields as pino receives them: errors described, the value of a hidden key replaced
5
5
  * whatever its case, and no key that would forge the header. pino writes `level` and `time`
6
6
  * before the fields: a field of that name would be a second key of the line, and the last one
7
7
  * is read.
8
8
  */
9
- export function lineFields(fields, options) {
9
+ export function lineFields(fields, options, isHidden) {
10
10
  const { level: _level, time: _time, ...line } = describeErrorFields(fields, options);
11
- return withoutCredentialsAtTop(line);
11
+ return withoutCredentialsAtTop(line, isHidden);
12
12
  }
13
13
  //# sourceMappingURL=line-fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"line-fields.js","sourceRoot":"","sources":["../../src/fields/line-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA4D,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAiB,EAAE,OAA6B;IACzE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAErF,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC"}
1
+ {"version":3,"file":"line-fields.js","sourceRoot":"","sources":["../../src/fields/line-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,GAKpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,MAAiB,EACjB,OAA6B,EAC7B,QAAqB;IAErB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAErF,OAAO,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC"}
@@ -6,6 +6,12 @@ export interface PinoLoggerOptions {
6
6
  * `DomainError`. Default `false`: see "Privacy" in the README for the trade-off.
7
7
  */
8
8
  readonly scrubMessages?: boolean;
9
+ /**
10
+ * Field names hidden in addition to `CREDENTIAL_KEYS`, at the top of a line and one level
11
+ * below, whatever their case. Around an instance of yours, the keys its `credentialRedaction`
12
+ * was given: pino hides them as they are written, the adapter in any other case.
13
+ */
14
+ readonly redact?: readonly string[];
9
15
  }
10
16
  /**
11
17
  * The `Logger` port on a pino instance: the levels of the port are those of pino, a child is
@@ -16,6 +22,7 @@ export interface PinoLoggerOptions {
16
22
  export declare class PinoLogger implements Logger {
17
23
  private readonly options;
18
24
  private readonly pino;
25
+ private readonly isHidden;
19
26
  constructor(pino: Pino, options?: PinoLoggerOptions);
20
27
  debug(message: string, fields?: LogFields): void;
21
28
  info(message: string, fields?: LogFields): void;
@@ -1 +1 @@
1
- {"version":3,"file":"pino-logger.d.ts","sourceRoot":"","sources":["../src/pino-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAI3C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAKD;;;;;GAKG;AACH,qBAAa,UAAW,YAAW,MAAM;IAKrC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAE5B,YACE,IAAI,EAAE,IAAI,EACO,OAAO,GAAE,iBAAsB,EAGjD;IAED,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAE/C;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAE9C;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAE9C;IAED,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAE/C;IAED,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAMnC;IAED,6EAA6E;IAC7E,cAAc,CAAC,KAAK,EAAE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c,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAEvC;IAED;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAYrB;IAED,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,KAAK;IAYb,OAAO,CAAC,kBAAkB;CAO3B"}
@@ -1,4 +1,4 @@
1
- import { UNWRITABLE_FIELDS } from '@ddd-ts-kit/kernel';
1
+ import { UNWRITABLE_FIELDS, hiddenKeys, } from '@ddd-ts-kit/kernel';
2
2
  import { lineFields } from './fields/line-fields.js';
3
3
  import { holdWhileFlushing } from './hold-while-flushing.js';
4
4
  /** Children of an instance the adapter already prepared: they are adopted as they are. */
@@ -12,9 +12,11 @@ const adopted = new WeakSet();
12
12
  export class PinoLogger {
13
13
  options;
14
14
  pino;
15
+ isHidden;
15
16
  constructor(pino, options = {}) {
16
17
  this.options = options;
17
18
  this.pino = adopted.has(pino) ? pino : describingErrorsItself(pino);
19
+ this.isHidden = hiddenKeys(options.redact);
18
20
  }
19
21
  debug(message, fields) {
20
22
  this.write('debug', message, fields);
@@ -56,7 +58,7 @@ export class PinoLogger {
56
58
  }
57
59
  nativeChild(fields) {
58
60
  try {
59
- return this.pino.child(lineFields(fields, this.options));
61
+ return this.pino.child(lineFields(fields, this.options, this.isHidden));
60
62
  }
61
63
  catch {
62
64
  return this.pino.child(UNWRITABLE_FIELDS);
@@ -67,7 +69,7 @@ export class PinoLogger {
67
69
  return;
68
70
  }
69
71
  try {
70
- this.pino[level](lineFields(fields, this.options), message);
72
+ this.pino[level](lineFields(fields, this.options, this.isHidden), message);
71
73
  }
72
74
  catch {
73
75
  this.writeWithoutFields(level, message);
@@ -1 +1 @@
1
- {"version":3,"file":"pino-logger.js","sourceRoot":"","sources":["../src/pino-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,oBAAoB,CAAC;AAEnG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO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C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;QAC7E,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAEO,kBAAkB,CAAC,KAAe,EAAE,OAAe;QACzD,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO;QACT,CAAC;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,CAAC,WAAoB,EAAE,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACzF,CAAC"}
@@ -7,9 +7,10 @@ export interface CredentialRedaction {
7
7
  * The pino `redact` option hiding `CREDENTIAL_KEYS` and the given keys at the top of a line and
8
8
  * one level below, in the fields of an entry, of a child and of the mixin alike. At the top a
9
9
  * path names each key as it is written: pino gives the censor of a wildcard at the top no key
10
- * name, and `PinoLogger` hides the keys of the kernel whatever their case before pino sees the
11
- * line. The level below is one wildcard path whose censor compares the name of the key without
12
- * case: a wildcard path per key would cost pino as many passes over each line.
10
+ * name. `PinoLogger` and `correlationMixin`, given the same keys, hide them there whatever their
11
+ * case before pino sees the fields. The level below is one wildcard path whose censor asks
12
+ * `hiddenKeys` of the kernel, without case: a wildcard path per key would cost pino as many
13
+ * passes over each line.
13
14
  */
14
15
  export declare function credentialRedaction(keys?: readonly string[]): CredentialRedaction;
15
16
  //# sourceMappingURL=credential-redaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-redaction.d.ts","sourceRoot":"","sources":["../../src/redaction/credential-redaction.ts"],"names":[],"mappings":"AAEA,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;CAC1D;AAID;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,SAAS,MAAM,EAAoB,GAAG,mBAAmB,CAYlG"}
1
+ {"version":3,"file":"credential-redaction.d.ts","sourceRoot":"","sources":["../../src/redaction/credential-redaction.ts"],"names":[],"mappings":"AAEA,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;CAC1D;AAID;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,SAAS,MAAM,EAAoB,GAAG,mBAAmB,CAQlG"}
@@ -1,22 +1,20 @@
1
- import { CREDENTIAL_KEYS, REDACTED, isCredentialKey } from '@ddd-ts-kit/kernel';
1
+ import { CREDENTIAL_KEYS, REDACTED, hiddenKeys } from '@ddd-ts-kit/kernel';
2
2
  const ONE_LEVEL_BELOW = '*.*';
3
3
  /**
4
4
  * The pino `redact` option hiding `CREDENTIAL_KEYS` and the given keys at the top of a line and
5
5
  * one level below, in the fields of an entry, of a child and of the mixin alike. At the top a
6
6
  * path names each key as it is written: pino gives the censor of a wildcard at the top no key
7
- * name, and `PinoLogger` hides the keys of the kernel whatever their case before pino sees the
8
- * line. The level below is one wildcard path whose censor compares the name of the key without
9
- * case: a wildcard path per key would cost pino as many passes over each line.
7
+ * name. `PinoLogger` and `correlationMixin`, given the same keys, hide them there whatever their
8
+ * case before pino sees the fields. The level below is one wildcard path whose censor asks
9
+ * `hiddenKeys` of the kernel, without case: a wildcard path per key would cost pino as many
10
+ * passes over each line.
10
11
  */
11
12
  export function credentialRedaction(keys = CREDENTIAL_KEYS) {
12
13
  const named = [...new Set([...CREDENTIAL_KEYS, ...keys])];
13
- const added = new Set(keys.map((key) => key.toLowerCase()));
14
+ const isHidden = hiddenKeys(keys);
14
15
  return {
15
16
  paths: [...named.map((key) => `["${key}"]`), ONE_LEVEL_BELOW],
16
- censor: (value, path) => {
17
- const name = path.at(-1) ?? '';
18
- return isCredentialKey(name) || added.has(name.toLowerCase()) ? REDACTED : value;
19
- },
17
+ censor: (value, path) => (isHidden(path.at(-1) ?? '') ? REDACTED : value),
20
18
  };
21
19
  }
22
20
  //# sourceMappingURL=credential-redaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-redaction.js","sourceRoot":"","sources":["../../src/redaction/credential-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAQhF,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAI,GAAsB,eAAe;IAC3E,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAwB,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEjF,OAAO;QACL,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,eAAe,CAAC;QAC7D,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAE/B,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"credential-redaction.js","sourceRoot":"","sources":["../../src/redaction/credential-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQ3E,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAI,GAAsB,eAAe;IAC3E,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAElC,OAAO;QACL,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,eAAe,CAAC;QAC7D,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;KAC1E,CAAC;AACJ,CAAC"}
@@ -1,6 +1,7 @@
1
+ import { type IsHiddenKey } from '@ddd-ts-kit/kernel';
1
2
  /**
2
- * Hides, in fields the adapter owns, the value of every key `isCredentialKey` names, whatever
3
- * its case: the paths of pino name each key at the top as it is written.
3
+ * Hides, in fields the adapter owns, the value of every key that is hidden, whatever its case:
4
+ * the paths of pino name each key at the top as it is written.
4
5
  */
5
- export declare function withoutCredentialsAtTop<Fields extends object>(fields: Fields): Fields;
6
+ export declare function withoutCredentialsAtTop<Fields extends object>(fields: Fields, isHidden: IsHiddenKey): Fields;
6
7
  //# sourceMappingURL=without-credentials-at-top.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"without-credentials-at-top.d.ts","sourceRoot":"","sources":["../../src/redaction/without-credentials-at-top.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQrF"}
1
+ {"version":3,"file":"without-credentials-at-top.d.ts","sourceRoot":"","sources":["../../src/redaction/without-credentials-at-top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM,CAQ5G"}
@@ -1,11 +1,11 @@
1
- import { REDACTED, isCredentialKey } from '@ddd-ts-kit/kernel';
1
+ import { REDACTED } from '@ddd-ts-kit/kernel';
2
2
  /**
3
- * Hides, in fields the adapter owns, the value of every key `isCredentialKey` names, whatever
4
- * its case: the paths of pino name each key at the top as it is written.
3
+ * Hides, in fields the adapter owns, the value of every key that is hidden, whatever its case:
4
+ * the paths of pino name each key at the top as it is written.
5
5
  */
6
- export function withoutCredentialsAtTop(fields) {
6
+ export function withoutCredentialsAtTop(fields, isHidden) {
7
7
  for (const key of Object.keys(fields)) {
8
- if (isCredentialKey(key)) {
8
+ if (isHidden(key)) {
9
9
  Object.assign(fields, { [key]: REDACTED });
10
10
  }
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"without-credentials-at-top.js","sourceRoot":"","sources":["../../src/redaction/without-credentials-at-top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAwB,MAAc;IAC3E,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"without-credentials-at-top.js","sourceRoot":"","sources":["../../src/redaction/without-credentials-at-top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,oBAAoB,CAAC;AAEhE;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAwB,MAAc,EAAE,QAAqB;IAClG,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/pino",
3
- "version": "0.113.2",
3
+ "version": "0.115.0",
4
4
  "description": "Adapter of the kernel Logger port on pino, with trace and execution correlation on every line.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -16,11 +16,11 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
19
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
20
20
  "directory": "packages/pino"
21
21
  },
22
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/pino/",
23
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
22
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/pino/",
23
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
24
24
  "publishConfig": {
25
25
  "access": "public",
26
26
  "provenance": true
@@ -40,10 +40,10 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@ddd-ts-kit/kernel": "0.113.2"
43
+ "@ddd-ts-kit/kernel": "0.115.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@ddd-ts-kit/testing": "0.113.2",
46
+ "@ddd-ts-kit/testing": "0.115.0",
47
47
  "pino": "^10.4.0",
48
48
  "pino-pretty": "^13.2.0"
49
49
  },