@geekmidas/logger 10.0.0-alpha.6 → 10.0.0-alpha.60

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.
Files changed (53) hide show
  1. package/dist/console.cjs +24 -25
  2. package/dist/console.cjs.map +1 -1
  3. package/dist/console.d.cts +4 -7
  4. package/dist/console.d.cts.map +1 -1
  5. package/dist/console.d.mts +4 -7
  6. package/dist/console.d.mts.map +1 -1
  7. package/dist/console.mjs +23 -25
  8. package/dist/console.mjs.map +1 -1
  9. package/dist/index.cjs +3 -3
  10. package/dist/index.d.cts +2 -2
  11. package/dist/index.d.mts +2 -2
  12. package/dist/index.mjs +2 -3
  13. package/dist/pino.cjs +49 -39
  14. package/dist/pino.cjs.map +1 -1
  15. package/dist/pino.d.cts +8 -12
  16. package/dist/pino.d.cts.map +1 -1
  17. package/dist/pino.d.mts +8 -12
  18. package/dist/pino.d.mts.map +1 -1
  19. package/dist/pino.mjs +47 -15
  20. package/dist/pino.mjs.map +1 -1
  21. package/dist/redact-paths.cjs +67 -2
  22. package/dist/redact-paths.cjs.map +1 -0
  23. package/dist/redact-paths.d.cts +17 -2
  24. package/dist/redact-paths.d.cts.map +1 -0
  25. package/dist/redact-paths.d.mts +17 -2
  26. package/dist/redact-paths.d.mts.map +1 -0
  27. package/dist/redact-paths.mjs +66 -2
  28. package/dist/redact-paths.mjs.map +1 -0
  29. package/dist/types.cjs +32 -2
  30. package/dist/types.cjs.map +1 -0
  31. package/dist/types.d.cts +175 -2
  32. package/dist/types.d.cts.map +1 -0
  33. package/dist/types.d.mts +175 -2
  34. package/dist/types.d.mts.map +1 -0
  35. package/dist/types.mjs +31 -2
  36. package/dist/types.mjs.map +1 -0
  37. package/package.json +1 -1
  38. package/dist/redact-paths-CsK0_uz-.d.cts +0 -19
  39. package/dist/redact-paths-CsK0_uz-.d.cts.map +0 -1
  40. package/dist/redact-paths-D07eTMlH.d.mts +0 -19
  41. package/dist/redact-paths-D07eTMlH.d.mts.map +0 -1
  42. package/dist/redact-paths-D0m0DIuQ.cjs +0 -73
  43. package/dist/redact-paths-D0m0DIuQ.cjs.map +0 -1
  44. package/dist/redact-paths-DQoIXhkS.mjs +0 -67
  45. package/dist/redact-paths-DQoIXhkS.mjs.map +0 -1
  46. package/dist/types-BDdpcrpy.d.mts +0 -166
  47. package/dist/types-BDdpcrpy.d.mts.map +0 -1
  48. package/dist/types-Dk_k2-f_.d.cts +0 -166
  49. package/dist/types-Dk_k2-f_.d.cts.map +0 -1
  50. package/dist/types-ag_0Cvbg.cjs +0 -38
  51. package/dist/types-ag_0Cvbg.cjs.map +0 -1
  52. package/dist/types-yQ6XOihF.mjs +0 -32
  53. package/dist/types-yQ6XOihF.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pino.d.mts","names":[],"sources":["../src/pino.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqGA;;;;AAA8D;;;;;;;;;;;iBAA9C,YAAA,WAAsB,sBAAwB,KAAA,CAAA"}
1
+ {"version":3,"file":"pino.d.mts","names":[],"sources":["../src/pino.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;wBA0GgB,aAAa,UAAS,qCAAwB"}
package/dist/pino.mjs CHANGED
@@ -1,21 +1,52 @@
1
- import { DEFAULT_REDACT_PATHS } from "./redact-paths-DQoIXhkS.mjs";
1
+ import { DEFAULT_REDACT_PATHS } from "./redact-paths.mjs";
2
2
  import { pino } from "pino";
3
-
4
3
  //#region src/pino.ts
5
4
  /**
5
+ * Pino logger with built-in redaction support for sensitive data.
6
+ *
7
+ * Redaction is on by default: a logger that was never told about passwords
8
+ * and tokens still masks them. `redact: false` is the explicit opt-out.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { createLogger, DEFAULT_REDACT_PATHS } from '@geekmidas/logger/pino';
13
+ *
14
+ * // Redaction with sensible defaults — the same as `redact: true`
15
+ * const logger = createLogger();
16
+ *
17
+ * // Sensitive data is automatically masked
18
+ * logger.info({ password: 'secret123', user: 'john' }, 'Login');
19
+ * // Output: { password: '[Redacted]', user: 'john' } Login
20
+ *
21
+ * // Add custom paths (merged with defaults)
22
+ * const logger2 = createLogger({ redact: ['user.ssn'] });
23
+ *
24
+ * // Override defaults for full control
25
+ * const logger3 = createLogger({
26
+ * redact: {
27
+ * paths: ['onlyThis'],
28
+ * resolution: 'override',
29
+ * }
30
+ * });
31
+ * ```
32
+ *
33
+ * @module
34
+ */
35
+ /**
6
36
  * Resolves redaction configuration from options.
7
- * Returns undefined if redaction is disabled, or a pino-compatible redact config.
37
+ * Returns undefined only when redaction is turned off with `false`; leaving it
38
+ * unset is the same as `true`, so sensitive paths are masked unless someone
39
+ * decides they should not be.
8
40
  *
9
41
  * By default (resolution: 'merge'), custom paths are merged with DEFAULT_REDACT_PATHS.
10
42
  * With resolution: 'override', only the custom paths are used.
11
43
  */
12
44
  function resolveRedactConfig(redact) {
13
- if (redact === void 0 || redact === false) return void 0;
14
- if (redact === true) return DEFAULT_REDACT_PATHS;
45
+ if (redact === false) return;
46
+ if (redact === void 0 || redact === true) return DEFAULT_REDACT_PATHS;
15
47
  if (Array.isArray(redact)) return [...DEFAULT_REDACT_PATHS, ...redact];
16
48
  const { resolution = "merge", paths, censor, remove } = redact;
17
- const resolvedPaths = resolution === "override" ? paths : [...DEFAULT_REDACT_PATHS, ...paths];
18
- const config = { paths: resolvedPaths };
49
+ const config = { paths: resolution === "override" ? paths : [...DEFAULT_REDACT_PATHS, ...paths] };
19
50
  if (censor !== void 0) config.censor = censor;
20
51
  if (remove !== void 0) config.remove = remove;
21
52
  return config;
@@ -28,24 +59,24 @@ function resolveRedactConfig(redact) {
28
59
  *
29
60
  * @example
30
61
  * ```typescript
31
- * // Basic logger
62
+ * // Basic logger — sensitive paths are redacted by default
32
63
  * const logger = createLogger({ level: 'debug' });
33
64
  *
34
- * // With redaction enabled
35
- * const secureLogger = createLogger({ redact: true });
65
+ * // Opt out of redaction
66
+ * const rawLogger = createLogger({ redact: false });
36
67
  *
37
68
  * // Pretty printing in development
38
- * const devLogger = createLogger({ pretty: true, redact: true });
69
+ * const devLogger = createLogger({ pretty: true });
39
70
  * ```
40
71
  */
41
72
  function createLogger(options = {}) {
42
- const pretty = options?.pretty && process.NODE_ENV !== "production";
73
+ const pretty = options?.pretty && process.env.NODE_ENV !== "production";
43
74
  const baseOptions = pretty ? { transport: {
44
75
  target: "pino-pretty",
45
76
  options: { colorize: true }
46
77
  } } : {};
47
78
  const redact = resolveRedactConfig(options.redact);
48
- return pino({
79
+ const pinoOptions = {
49
80
  ...baseOptions,
50
81
  ...options.level && { level: options.level },
51
82
  ...redact && { redact },
@@ -57,9 +88,10 @@ function createLogger(options = {}) {
57
88
  return { level: label.toUpperCase() };
58
89
  }
59
90
  }
60
- });
91
+ };
92
+ return options.destination && !pretty ? pino(pinoOptions, options.destination) : pino(pinoOptions);
61
93
  }
62
-
63
94
  //#endregion
64
95
  export { DEFAULT_REDACT_PATHS, createLogger };
96
+
65
97
  //# sourceMappingURL=pino.mjs.map
package/dist/pino.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pino.mjs","names":["redact: boolean | RedactOptions | undefined","config: PinoRedactConfig","options: CreateLoggerOptions"],"sources":["../src/pino.ts"],"sourcesContent":["/**\n * Pino logger with built-in redaction support for sensitive data.\n *\n * @example\n * ```typescript\n * import { createLogger, DEFAULT_REDACT_PATHS } from '@geekmidas/logger/pino';\n *\n * // Enable redaction with sensible defaults\n * const logger = createLogger({ redact: true });\n *\n * // Sensitive data is automatically masked\n * logger.info({ password: 'secret123', user: 'john' }, 'Login');\n * // Output: { password: '[Redacted]', user: 'john' } Login\n *\n * // Add custom paths (merged with defaults)\n * const logger2 = createLogger({ redact: ['user.ssn'] });\n *\n * // Override defaults for full control\n * const logger3 = createLogger({\n * redact: {\n * paths: ['onlyThis'],\n * resolution: 'override',\n * }\n * });\n * ```\n *\n * @module\n */\nimport { pino } from 'pino';\nimport { DEFAULT_REDACT_PATHS } from './redact-paths';\nimport type { CreateLoggerOptions, RedactOptions } from './types';\n\n// Re-export for backwards compatibility\nexport { DEFAULT_REDACT_PATHS } from './redact-paths';\n\n/**\n * Type for the resolved pino redact config (without our custom resolution field).\n */\ntype PinoRedactConfig =\n\t| string[]\n\t| {\n\t\t\tpaths: string[];\n\t\t\tcensor?: string | ((value: unknown, path: string[]) => unknown);\n\t\t\tremove?: boolean;\n\t };\n\n/**\n * Resolves redaction configuration from options.\n * Returns undefined if redaction is disabled, or a pino-compatible redact config.\n *\n * By default (resolution: 'merge'), custom paths are merged with DEFAULT_REDACT_PATHS.\n * With resolution: 'override', only the custom paths are used.\n */\nfunction resolveRedactConfig(\n\tredact: boolean | RedactOptions | undefined,\n): PinoRedactConfig | undefined {\n\tif (redact === undefined || redact === false) {\n\t\treturn undefined;\n\t}\n\n\tif (redact === true) {\n\t\treturn DEFAULT_REDACT_PATHS;\n\t}\n\n\t// Array syntax - merge with defaults\n\tif (Array.isArray(redact)) {\n\t\treturn [...DEFAULT_REDACT_PATHS, ...redact];\n\t}\n\n\t// Object syntax - check resolution mode\n\tconst { resolution = 'merge', paths, censor, remove } = redact;\n\n\tconst resolvedPaths =\n\t\tresolution === 'override' ? paths : [...DEFAULT_REDACT_PATHS, ...paths];\n\n\t// Return clean pino config without our resolution field\n\tconst config: PinoRedactConfig = { paths: resolvedPaths };\n\tif (censor !== undefined) config.censor = censor;\n\tif (remove !== undefined) config.remove = remove;\n\n\treturn config;\n}\n\n/**\n * Creates a pino logger instance with optional redaction support.\n *\n * @param options - Logger configuration options\n * @returns A configured pino logger instance\n *\n * @example\n * ```typescript\n * // Basic logger\n * const logger = createLogger({ level: 'debug' });\n *\n * // With redaction enabled\n * const secureLogger = createLogger({ redact: true });\n *\n * // Pretty printing in development\n * const devLogger = createLogger({ pretty: true, redact: true });\n * ```\n */\nexport function createLogger(options: CreateLoggerOptions = {}) {\n\t// @ts-expect-error\n\tconst pretty = options?.pretty && process.NODE_ENV !== 'production';\n\tconst baseOptions = pretty\n\t\t? {\n\t\t\t\ttransport: {\n\t\t\t\t\ttarget: 'pino-pretty',\n\t\t\t\t\toptions: { colorize: true },\n\t\t\t\t},\n\t\t\t}\n\t\t: {};\n\n\tconst redact = resolveRedactConfig(options.redact);\n\n\treturn pino({\n\t\t...baseOptions,\n\t\t...(options.level && { level: options.level }),\n\t\t...(redact && { redact }),\n\t\tformatters: {\n\t\t\tbindings() {\n\t\t\t\treturn { nodeVersion: process.version };\n\t\t\t},\n\t\t\tlevel: (label) => {\n\t\t\t\treturn { level: label.toUpperCase() };\n\t\t\t},\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;;;;;;AAqDA,SAAS,oBACRA,QAC+B;AAC/B,KAAI,qBAAwB,WAAW,MACtC;AAGD,KAAI,WAAW,KACd,QAAO;AAIR,KAAI,MAAM,QAAQ,OAAO,CACxB,QAAO,CAAC,GAAG,sBAAsB,GAAG,MAAO;CAI5C,MAAM,EAAE,aAAa,SAAS,OAAO,QAAQ,QAAQ,GAAG;CAExD,MAAM,gBACL,eAAe,aAAa,QAAQ,CAAC,GAAG,sBAAsB,GAAG,KAAM;CAGxE,MAAMC,SAA2B,EAAE,OAAO,cAAe;AACzD,KAAI,kBAAsB,QAAO,SAAS;AAC1C,KAAI,kBAAsB,QAAO,SAAS;AAE1C,QAAO;AACP;;;;;;;;;;;;;;;;;;;AAoBD,SAAgB,aAAaC,UAA+B,CAAE,GAAE;CAE/D,MAAM,SAAS,SAAS,UAAU,QAAQ,aAAa;CACvD,MAAM,cAAc,SACjB,EACA,WAAW;EACV,QAAQ;EACR,SAAS,EAAE,UAAU,KAAM;CAC3B,EACD,IACA,CAAE;CAEL,MAAM,SAAS,oBAAoB,QAAQ,OAAO;AAElD,QAAO,KAAK;EACX,GAAG;EACH,GAAI,QAAQ,SAAS,EAAE,OAAO,QAAQ,MAAO;EAC7C,GAAI,UAAU,EAAE,OAAQ;EACxB,YAAY;GACX,WAAW;AACV,WAAO,EAAE,aAAa,QAAQ,QAAS;GACvC;GACD,OAAO,CAAC,UAAU;AACjB,WAAO,EAAE,OAAO,MAAM,aAAa,CAAE;GACrC;EACD;CACD,EAAC;AACF"}
1
+ {"version":3,"file":"pino.mjs","names":[],"sources":["../src/pino.ts"],"sourcesContent":["/**\n * Pino logger with built-in redaction support for sensitive data.\n *\n * Redaction is on by default: a logger that was never told about passwords\n * and tokens still masks them. `redact: false` is the explicit opt-out.\n *\n * @example\n * ```typescript\n * import { createLogger, DEFAULT_REDACT_PATHS } from '@geekmidas/logger/pino';\n *\n * // Redaction with sensible defaults — the same as `redact: true`\n * const logger = createLogger();\n *\n * // Sensitive data is automatically masked\n * logger.info({ password: 'secret123', user: 'john' }, 'Login');\n * // Output: { password: '[Redacted]', user: 'john' } Login\n *\n * // Add custom paths (merged with defaults)\n * const logger2 = createLogger({ redact: ['user.ssn'] });\n *\n * // Override defaults for full control\n * const logger3 = createLogger({\n * redact: {\n * paths: ['onlyThis'],\n * resolution: 'override',\n * }\n * });\n * ```\n *\n * @module\n */\nimport { pino } from 'pino';\nimport { DEFAULT_REDACT_PATHS } from './redact-paths';\nimport type { CreateLoggerOptions, RedactOptions } from './types';\n\n// Re-export for backwards compatibility\nexport { DEFAULT_REDACT_PATHS } from './redact-paths';\n\n/**\n * Type for the resolved pino redact config (without our custom resolution field).\n */\ntype PinoRedactConfig =\n\t| string[]\n\t| {\n\t\t\tpaths: string[];\n\t\t\tcensor?: string | ((value: unknown, path: string[]) => unknown);\n\t\t\tremove?: boolean;\n\t };\n\n/**\n * Resolves redaction configuration from options.\n * Returns undefined only when redaction is turned off with `false`; leaving it\n * unset is the same as `true`, so sensitive paths are masked unless someone\n * decides they should not be.\n *\n * By default (resolution: 'merge'), custom paths are merged with DEFAULT_REDACT_PATHS.\n * With resolution: 'override', only the custom paths are used.\n */\nfunction resolveRedactConfig(\n\tredact: boolean | RedactOptions | undefined,\n): PinoRedactConfig | undefined {\n\tif (redact === false) {\n\t\treturn undefined;\n\t}\n\n\tif (redact === undefined || redact === true) {\n\t\treturn DEFAULT_REDACT_PATHS;\n\t}\n\n\t// Array syntax - merge with defaults\n\tif (Array.isArray(redact)) {\n\t\treturn [...DEFAULT_REDACT_PATHS, ...redact];\n\t}\n\n\t// Object syntax - check resolution mode\n\tconst { resolution = 'merge', paths, censor, remove } = redact;\n\n\tconst resolvedPaths =\n\t\tresolution === 'override' ? paths : [...DEFAULT_REDACT_PATHS, ...paths];\n\n\t// Return clean pino config without our resolution field\n\tconst config: PinoRedactConfig = { paths: resolvedPaths };\n\tif (censor !== undefined) config.censor = censor;\n\tif (remove !== undefined) config.remove = remove;\n\n\treturn config;\n}\n\n/**\n * Creates a pino logger instance with optional redaction support.\n *\n * @param options - Logger configuration options\n * @returns A configured pino logger instance\n *\n * @example\n * ```typescript\n * // Basic logger — sensitive paths are redacted by default\n * const logger = createLogger({ level: 'debug' });\n *\n * // Opt out of redaction\n * const rawLogger = createLogger({ redact: false });\n *\n * // Pretty printing in development\n * const devLogger = createLogger({ pretty: true });\n * ```\n */\nexport function createLogger(options: CreateLoggerOptions = {}) {\n\t// Pretty printing spawns a transport worker and writes for humans; in\n\t// production the output is for a log pipeline, so `pretty` is ignored there.\n\tconst pretty = options?.pretty && process.env.NODE_ENV !== 'production';\n\tconst baseOptions = pretty\n\t\t? {\n\t\t\t\ttransport: {\n\t\t\t\t\ttarget: 'pino-pretty',\n\t\t\t\t\toptions: { colorize: true },\n\t\t\t\t},\n\t\t\t}\n\t\t: {};\n\n\tconst redact = resolveRedactConfig(options.redact);\n\n\tconst pinoOptions = {\n\t\t...baseOptions,\n\t\t...(options.level && { level: options.level }),\n\t\t...(redact && { redact }),\n\t\tformatters: {\n\t\t\tbindings() {\n\t\t\t\treturn { nodeVersion: process.version };\n\t\t\t},\n\t\t\tlevel: (label: string) => {\n\t\t\t\treturn { level: label.toUpperCase() };\n\t\t\t},\n\t\t},\n\t};\n\n\t// A transport writes on its own worker, so a destination only applies when\n\t// the logger is not pretty-printing.\n\treturn options.destination && !pretty\n\t\t? pino(pinoOptions, options.destination)\n\t\t: pino(pinoOptions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAAS,oBACR,QAC+B;CAC/B,IAAI,WAAW,OACd;CAGD,IAAI,WAAW,KAAA,KAAa,WAAW,MACtC,OAAO;CAIR,IAAI,MAAM,QAAQ,MAAM,GACvB,OAAO,CAAC,GAAG,sBAAsB,GAAG,MAAM;CAI3C,MAAM,EAAE,aAAa,SAAS,OAAO,QAAQ,WAAW;CAMxD,MAAM,SAA2B,EAAE,OAHlC,eAAe,aAAa,QAAQ,CAAC,GAAG,sBAAsB,GAAG,KAAK,EAGf;CACxD,IAAI,WAAW,KAAA,GAAW,OAAO,SAAS;CAC1C,IAAI,WAAW,KAAA,GAAW,OAAO,SAAS;CAE1C,OAAO;AACR;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,aAAa,UAA+B,CAAC,GAAG;CAG/D,MAAM,SAAS,SAAS,UAAU,QAAQ,IAAI,aAAa;CAC3D,MAAM,cAAc,SACjB,EACA,WAAW;EACV,QAAQ;EACR,SAAS,EAAE,UAAU,KAAK;CAC3B,EACD,IACC,CAAC;CAEJ,MAAM,SAAS,oBAAoB,QAAQ,MAAM;CAEjD,MAAM,cAAc;EACnB,GAAG;EACH,GAAI,QAAQ,SAAS,EAAE,OAAO,QAAQ,MAAM;EAC5C,GAAI,UAAU,EAAE,OAAO;EACvB,YAAY;GACX,WAAW;IACV,OAAO,EAAE,aAAa,QAAQ,QAAQ;GACvC;GACA,QAAQ,UAAkB;IACzB,OAAO,EAAE,OAAO,MAAM,YAAY,EAAE;GACrC;EACD;CACD;CAIA,OAAO,QAAQ,eAAe,CAAC,SAC5B,KAAK,aAAa,QAAQ,WAAW,IACrC,KAAK,WAAW;AACpB"}
@@ -1,3 +1,68 @@
1
- const require_redact_paths = require('./redact-paths-D0m0DIuQ.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/redact-paths.ts
3
+ /**
4
+ * Default sensitive field paths for redaction.
5
+ *
6
+ * These paths are automatically used when `redact: true` is set,
7
+ * and merged with custom paths unless `resolution: 'override'` is specified.
8
+ *
9
+ * Includes:
10
+ * - Authentication: password, token, apiKey, authorization, credentials
11
+ * - Headers: authorization, cookie, x-api-key, x-auth-token
12
+ * - Personal data: ssn, creditCard, cvv, pin
13
+ * - Secrets: secret, connectionString, databaseUrl
14
+ * - Wildcards: *.password, *.secret, *.token (catches nested fields)
15
+ */
16
+ const DEFAULT_REDACT_PATHS = [
17
+ "password",
18
+ "pass",
19
+ "passwd",
20
+ "secret",
21
+ "token",
22
+ "accessToken",
23
+ "refreshToken",
24
+ "idToken",
25
+ "apiKey",
26
+ "api_key",
27
+ "apikey",
28
+ "auth",
29
+ "authorization",
30
+ "credential",
31
+ "credentials",
32
+ "*.password",
33
+ "*.secret",
34
+ "*.token",
35
+ "*.apiKey",
36
+ "*.api_key",
37
+ "*.authorization",
38
+ "*.accessToken",
39
+ "*.refreshToken",
40
+ "headers.authorization",
41
+ "headers.Authorization",
42
+ "headers[\"authorization\"]",
43
+ "headers[\"Authorization\"]",
44
+ "headers.cookie",
45
+ "headers.Cookie",
46
+ "headers[\"x-api-key\"]",
47
+ "headers[\"X-Api-Key\"]",
48
+ "headers[\"x-auth-token\"]",
49
+ "headers[\"X-Auth-Token\"]",
50
+ "ssn",
51
+ "socialSecurityNumber",
52
+ "social_security_number",
53
+ "creditCard",
54
+ "credit_card",
55
+ "cardNumber",
56
+ "card_number",
57
+ "cvv",
58
+ "cvc",
59
+ "pin",
60
+ "connectionString",
61
+ "connection_string",
62
+ "databaseUrl",
63
+ "database_url"
64
+ ];
65
+ //#endregion
66
+ exports.DEFAULT_REDACT_PATHS = DEFAULT_REDACT_PATHS;
2
67
 
3
- exports.DEFAULT_REDACT_PATHS = require_redact_paths.DEFAULT_REDACT_PATHS;
68
+ //# sourceMappingURL=redact-paths.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact-paths.cjs","names":[],"sources":["../src/redact-paths.ts"],"sourcesContent":["/**\n * Default sensitive field paths for redaction.\n *\n * These paths are automatically used when `redact: true` is set,\n * and merged with custom paths unless `resolution: 'override'` is specified.\n *\n * Includes:\n * - Authentication: password, token, apiKey, authorization, credentials\n * - Headers: authorization, cookie, x-api-key, x-auth-token\n * - Personal data: ssn, creditCard, cvv, pin\n * - Secrets: secret, connectionString, databaseUrl\n * - Wildcards: *.password, *.secret, *.token (catches nested fields)\n */\nexport const DEFAULT_REDACT_PATHS: string[] = [\n\t// Authentication & authorization\n\t'password',\n\t'pass',\n\t'passwd',\n\t'secret',\n\t'token',\n\t'accessToken',\n\t'refreshToken',\n\t'idToken',\n\t'apiKey',\n\t'api_key',\n\t'apikey',\n\t'auth',\n\t'authorization',\n\t'credential',\n\t'credentials',\n\n\t// Common nested patterns (headers, body, etc.)\n\t'*.password',\n\t'*.secret',\n\t'*.token',\n\t'*.apiKey',\n\t'*.api_key',\n\t'*.authorization',\n\t'*.accessToken',\n\t'*.refreshToken',\n\n\t// HTTP headers (case variations)\n\t'headers.authorization',\n\t'headers.Authorization',\n\t'headers[\"authorization\"]',\n\t'headers[\"Authorization\"]',\n\t'headers.cookie',\n\t'headers.Cookie',\n\t'headers[\"x-api-key\"]',\n\t'headers[\"X-Api-Key\"]',\n\t'headers[\"x-auth-token\"]',\n\t'headers[\"X-Auth-Token\"]',\n\n\t// Common sensitive data fields\n\t'ssn',\n\t'socialSecurityNumber',\n\t'social_security_number',\n\t'creditCard',\n\t'credit_card',\n\t'cardNumber',\n\t'card_number',\n\t'cvv',\n\t'cvc',\n\t'pin',\n\n\t// Database & connection strings\n\t'connectionString',\n\t'connection_string',\n\t'databaseUrl',\n\t'database_url',\n];\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAa,uBAAiC;CAE7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;AACD"}
@@ -1,2 +1,17 @@
1
- import { DEFAULT_REDACT_PATHS } from "./redact-paths-CsK0_uz-.cjs";
2
- export { DEFAULT_REDACT_PATHS };
1
+ //#region src/redact-paths.d.ts
2
+ /**
3
+ * Default sensitive field paths for redaction.
4
+ *
5
+ * These paths are automatically used when `redact: true` is set,
6
+ * and merged with custom paths unless `resolution: 'override'` is specified.
7
+ *
8
+ * Includes:
9
+ * - Authentication: password, token, apiKey, authorization, credentials
10
+ * - Headers: authorization, cookie, x-api-key, x-auth-token
11
+ * - Personal data: ssn, creditCard, cvv, pin
12
+ * - Secrets: secret, connectionString, databaseUrl
13
+ * - Wildcards: *.password, *.secret, *.token (catches nested fields)
14
+ */
15
+ export declare const DEFAULT_REDACT_PATHS: string[];
16
+ //#endregion
17
+ //# sourceMappingURL=redact-paths.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact-paths.d.cts","names":[],"sources":["../src/redact-paths.ts"],"mappings":";;;;;;;;;;;;;;qBAaa"}
@@ -1,2 +1,17 @@
1
- import { DEFAULT_REDACT_PATHS } from "./redact-paths-D07eTMlH.mjs";
2
- export { DEFAULT_REDACT_PATHS };
1
+ //#region src/redact-paths.d.ts
2
+ /**
3
+ * Default sensitive field paths for redaction.
4
+ *
5
+ * These paths are automatically used when `redact: true` is set,
6
+ * and merged with custom paths unless `resolution: 'override'` is specified.
7
+ *
8
+ * Includes:
9
+ * - Authentication: password, token, apiKey, authorization, credentials
10
+ * - Headers: authorization, cookie, x-api-key, x-auth-token
11
+ * - Personal data: ssn, creditCard, cvv, pin
12
+ * - Secrets: secret, connectionString, databaseUrl
13
+ * - Wildcards: *.password, *.secret, *.token (catches nested fields)
14
+ */
15
+ export declare const DEFAULT_REDACT_PATHS: string[];
16
+ //#endregion
17
+ //# sourceMappingURL=redact-paths.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact-paths.d.mts","names":[],"sources":["../src/redact-paths.ts"],"mappings":";;;;;;;;;;;;;;qBAaa"}
@@ -1,3 +1,67 @@
1
- import { DEFAULT_REDACT_PATHS } from "./redact-paths-DQoIXhkS.mjs";
1
+ //#region src/redact-paths.ts
2
+ /**
3
+ * Default sensitive field paths for redaction.
4
+ *
5
+ * These paths are automatically used when `redact: true` is set,
6
+ * and merged with custom paths unless `resolution: 'override'` is specified.
7
+ *
8
+ * Includes:
9
+ * - Authentication: password, token, apiKey, authorization, credentials
10
+ * - Headers: authorization, cookie, x-api-key, x-auth-token
11
+ * - Personal data: ssn, creditCard, cvv, pin
12
+ * - Secrets: secret, connectionString, databaseUrl
13
+ * - Wildcards: *.password, *.secret, *.token (catches nested fields)
14
+ */
15
+ const DEFAULT_REDACT_PATHS = [
16
+ "password",
17
+ "pass",
18
+ "passwd",
19
+ "secret",
20
+ "token",
21
+ "accessToken",
22
+ "refreshToken",
23
+ "idToken",
24
+ "apiKey",
25
+ "api_key",
26
+ "apikey",
27
+ "auth",
28
+ "authorization",
29
+ "credential",
30
+ "credentials",
31
+ "*.password",
32
+ "*.secret",
33
+ "*.token",
34
+ "*.apiKey",
35
+ "*.api_key",
36
+ "*.authorization",
37
+ "*.accessToken",
38
+ "*.refreshToken",
39
+ "headers.authorization",
40
+ "headers.Authorization",
41
+ "headers[\"authorization\"]",
42
+ "headers[\"Authorization\"]",
43
+ "headers.cookie",
44
+ "headers.Cookie",
45
+ "headers[\"x-api-key\"]",
46
+ "headers[\"X-Api-Key\"]",
47
+ "headers[\"x-auth-token\"]",
48
+ "headers[\"X-Auth-Token\"]",
49
+ "ssn",
50
+ "socialSecurityNumber",
51
+ "social_security_number",
52
+ "creditCard",
53
+ "credit_card",
54
+ "cardNumber",
55
+ "card_number",
56
+ "cvv",
57
+ "cvc",
58
+ "pin",
59
+ "connectionString",
60
+ "connection_string",
61
+ "databaseUrl",
62
+ "database_url"
63
+ ];
64
+ //#endregion
65
+ export { DEFAULT_REDACT_PATHS };
2
66
 
3
- export { DEFAULT_REDACT_PATHS };
67
+ //# sourceMappingURL=redact-paths.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact-paths.mjs","names":[],"sources":["../src/redact-paths.ts"],"sourcesContent":["/**\n * Default sensitive field paths for redaction.\n *\n * These paths are automatically used when `redact: true` is set,\n * and merged with custom paths unless `resolution: 'override'` is specified.\n *\n * Includes:\n * - Authentication: password, token, apiKey, authorization, credentials\n * - Headers: authorization, cookie, x-api-key, x-auth-token\n * - Personal data: ssn, creditCard, cvv, pin\n * - Secrets: secret, connectionString, databaseUrl\n * - Wildcards: *.password, *.secret, *.token (catches nested fields)\n */\nexport const DEFAULT_REDACT_PATHS: string[] = [\n\t// Authentication & authorization\n\t'password',\n\t'pass',\n\t'passwd',\n\t'secret',\n\t'token',\n\t'accessToken',\n\t'refreshToken',\n\t'idToken',\n\t'apiKey',\n\t'api_key',\n\t'apikey',\n\t'auth',\n\t'authorization',\n\t'credential',\n\t'credentials',\n\n\t// Common nested patterns (headers, body, etc.)\n\t'*.password',\n\t'*.secret',\n\t'*.token',\n\t'*.apiKey',\n\t'*.api_key',\n\t'*.authorization',\n\t'*.accessToken',\n\t'*.refreshToken',\n\n\t// HTTP headers (case variations)\n\t'headers.authorization',\n\t'headers.Authorization',\n\t'headers[\"authorization\"]',\n\t'headers[\"Authorization\"]',\n\t'headers.cookie',\n\t'headers.Cookie',\n\t'headers[\"x-api-key\"]',\n\t'headers[\"X-Api-Key\"]',\n\t'headers[\"x-auth-token\"]',\n\t'headers[\"X-Auth-Token\"]',\n\n\t// Common sensitive data fields\n\t'ssn',\n\t'socialSecurityNumber',\n\t'social_security_number',\n\t'creditCard',\n\t'credit_card',\n\t'cardNumber',\n\t'card_number',\n\t'cvv',\n\t'cvc',\n\t'pin',\n\n\t// Database & connection strings\n\t'connectionString',\n\t'connection_string',\n\t'databaseUrl',\n\t'database_url',\n];\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,uBAAiC;CAE7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;AACD"}
package/dist/types.cjs CHANGED
@@ -1,3 +1,33 @@
1
- const require_types = require('./types-ag_0Cvbg.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/types.ts
3
+ /**
4
+ * Console-based logger implementation that outputs to standard console methods.
5
+ * Supports structured logging with automatic timestamp injection and context inheritance.
6
+ *
7
+ * @implements {Logger}
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const logger = new ConsoleLogger({ app: 'myApp', version: '1.0.0' });
12
+ * logger.info({ userId: 123 }, 'User action performed');
13
+ * // Output: { app: 'myApp', version: '1.0.0', userId: 123, ts: 1234567890 } User action performed
14
+ *
15
+ * const childLogger = logger.child({ module: 'auth' });
16
+ * childLogger.debug({ action: 'validate' }, 'Validating token');
17
+ * // Output: { app: 'myApp', version: '1.0.0', module: 'auth', action: 'validate', ts: 1234567891 } Validating token
18
+ * ```
19
+ */
20
+ let LogLevel = /* @__PURE__ */ function(LogLevel) {
21
+ LogLevel["Trace"] = "trace";
22
+ LogLevel["Debug"] = "debug";
23
+ LogLevel["Info"] = "info";
24
+ LogLevel["Warn"] = "warn";
25
+ LogLevel["Error"] = "error";
26
+ LogLevel["Fatal"] = "fatal";
27
+ LogLevel["Silent"] = "silent";
28
+ return LogLevel;
29
+ }({});
30
+ //#endregion
31
+ exports.LogLevel = LogLevel;
2
32
 
3
- exports.LogLevel = require_types.LogLevel;
33
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["/**\n * Logging function type that supports both structured and simple logging.\n * Can be called with an object for structured logging or just a message string.\n *\n * @example\n * ```typescript\n * // Structured logging with context object\n * logger.info({ userId: 123, action: 'login' }, 'User logged in');\n *\n * // Simple string logging\n * logger.info('Application started');\n * ```\n */\nexport type LogFn = {\n\t/** Structured logging with context object, optional message, and additional arguments */\n\t<T extends object>(obj: T, msg?: string, ...args: any[]): void;\n\t/** Simple string logging */\n\t(msg: string): void;\n};\n\n/**\n * Standard logger interface with multiple log levels and child logger support.\n * Follows common logging patterns with structured logging capabilities.\n *\n * @interface Logger\n */\nexport interface Logger {\n\t/** Debug level logging - verbose information for debugging */\n\tdebug: LogFn;\n\t/** Info level logging - general informational messages */\n\tinfo: LogFn;\n\t/** Warning level logging - potentially harmful situations */\n\twarn: LogFn;\n\t/** Error level logging - error events that might still allow the application to continue */\n\terror: LogFn;\n\t/** Fatal level logging - severe errors that will likely cause the application to abort */\n\tfatal: LogFn;\n\t/** Trace level logging - most detailed information */\n\ttrace: LogFn;\n\t/**\n\t * Creates a child logger with additional context.\n\t * Child loggers inherit parent context and add their own.\n\t *\n\t * @param obj - Additional context to include in all child logger calls\n\t * @returns A new Logger instance with merged context\n\t */\n\tchild: (obj: object) => Logger;\n}\n\n/**\n * Console-based logger implementation that outputs to standard console methods.\n * Supports structured logging with automatic timestamp injection and context inheritance.\n *\n * @implements {Logger}\n *\n * @example\n * ```typescript\n * const logger = new ConsoleLogger({ app: 'myApp', version: '1.0.0' });\n * logger.info({ userId: 123 }, 'User action performed');\n * // Output: { app: 'myApp', version: '1.0.0', userId: 123, ts: 1234567890 } User action performed\n *\n * const childLogger = logger.child({ module: 'auth' });\n * childLogger.debug({ action: 'validate' }, 'Validating token');\n * // Output: { app: 'myApp', version: '1.0.0', module: 'auth', action: 'validate', ts: 1234567891 } Validating token\n * ```\n */\nexport enum LogLevel {\n\tTrace = 'trace',\n\tDebug = 'debug',\n\tInfo = 'info',\n\tWarn = 'warn',\n\tError = 'error',\n\tFatal = 'fatal',\n\tSilent = 'silent',\n}\n\n/**\n * Redaction configuration for masking sensitive data in logs.\n * Uses pino's fast-redact library under the hood.\n *\n * By default, custom paths are merged with the default sensitive paths.\n * Use `resolution: 'override'` to use only your custom paths.\n *\n * @example\n * ```typescript\n * // Simple path array (merges with defaults)\n * redact: ['user.ssn', 'custom.field']\n *\n * // Override defaults completely\n * redact: {\n * paths: ['only.these.paths'],\n * resolution: 'override',\n * }\n *\n * // With custom censor\n * redact: {\n * paths: ['extra.secret'],\n * censor: '***',\n * }\n *\n * // Remove fields entirely\n * redact: {\n * paths: ['temporary.data'],\n * remove: true,\n * }\n * ```\n */\nexport type RedactOptions =\n\t| string[]\n\t| {\n\t\t\t/** Paths to redact using dot notation or bracket notation for special chars */\n\t\t\tpaths: string[];\n\t\t\t/** Custom replacement text (default: '[REDACTED]') */\n\t\t\tcensor?: string | ((value: unknown, path: string[]) => unknown);\n\t\t\t/** Remove the field entirely instead of replacing (default: false) */\n\t\t\tremove?: boolean;\n\t\t\t/**\n\t\t\t * How to combine custom paths with default sensitive paths.\n\t\t\t * - 'merge': Custom paths are added to default paths (default)\n\t\t\t * - 'override': Only custom paths are used, defaults are ignored\n\t\t\t */\n\t\t\tresolution?: 'merge' | 'override';\n\t };\n\nexport type CreateLoggerOptions = {\n\t/** Enable pretty printing with colors (disabled in production) */\n\tpretty?: boolean;\n\t/** Minimum log level to output */\n\tlevel?: LogLevel;\n\t/**\n\t * Redaction configuration for masking sensitive data.\n\t *\n\t * - `true` or `undefined` (the default): Uses default sensitive paths\n\t * (password, token, secret, etc.)\n\t * - `false`: No redaction applied — the explicit opt-out\n\t * - `string[]`: Custom paths merged with defaults\n\t * - `object`: Advanced config with paths, censor, remove, and resolution options\n\t *\n\t * By default, custom paths are **merged** with the default sensitive paths.\n\t * Use `resolution: 'override'` to disable defaults and use only your paths.\n\t *\n\t * @example\n\t * ```typescript\n\t * // Use defaults only (the same as leaving `redact` out)\n\t * createLogger({ redact: true });\n\t *\n\t * // Opt out\n\t * createLogger({ redact: false });\n\t *\n\t * // Add custom paths (merged with defaults)\n\t * createLogger({ redact: ['user.ssn', 'custom.field'] });\n\t *\n\t * // Override defaults completely\n\t * createLogger({\n\t * redact: {\n\t * paths: ['only.these.paths'],\n\t * resolution: 'override',\n\t * }\n\t * });\n\t *\n\t * // Merge with custom censor\n\t * createLogger({\n\t * redact: {\n\t * paths: ['extra.secret'],\n\t * censor: '***',\n\t * }\n\t * });\n\t * ```\n\t */\n\tredact?: boolean | RedactOptions;\n\t/**\n\t * Where log lines are written (pino logger only). Defaults to stdout.\n\t * Ignored when `pretty` is on, since the pretty transport owns its output.\n\t */\n\tdestination?: { write(line: string): unknown };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkEA,IAAY,WAAL,yBAAA,UAAA;CACN,SAAA,WAAA;CACA,SAAA,WAAA;CACA,SAAA,UAAA;CACA,SAAA,UAAA;CACA,SAAA,WAAA;CACA,SAAA,WAAA;CACA,SAAA,YAAA;;AACD,EAAA,CAAA,CAAA"}
package/dist/types.d.cts CHANGED
@@ -1,2 +1,175 @@
1
- import { CreateLoggerOptions, LogFn, LogLevel, Logger, RedactOptions } from "./types-Dk_k2-f_.cjs";
2
- export { CreateLoggerOptions, LogFn, LogLevel, Logger, RedactOptions };
1
+ //#region src/types.d.ts
2
+ /**
3
+ * Logging function type that supports both structured and simple logging.
4
+ * Can be called with an object for structured logging or just a message string.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * // Structured logging with context object
9
+ * logger.info({ userId: 123, action: 'login' }, 'User logged in');
10
+ *
11
+ * // Simple string logging
12
+ * logger.info('Application started');
13
+ * ```
14
+ */
15
+ export type LogFn = {
16
+ /** Structured logging with context object, optional message, and additional arguments */
17
+ <T extends object>(obj: T, msg?: string, ...args: any[]): void;
18
+ /** Simple string logging */
19
+ (msg: string): void;
20
+ };
21
+ /**
22
+ * Standard logger interface with multiple log levels and child logger support.
23
+ * Follows common logging patterns with structured logging capabilities.
24
+ *
25
+ * @interface Logger
26
+ */
27
+ export interface Logger {
28
+ /** Debug level logging - verbose information for debugging */
29
+ debug: LogFn;
30
+ /** Info level logging - general informational messages */
31
+ info: LogFn;
32
+ /** Warning level logging - potentially harmful situations */
33
+ warn: LogFn;
34
+ /** Error level logging - error events that might still allow the application to continue */
35
+ error: LogFn;
36
+ /** Fatal level logging - severe errors that will likely cause the application to abort */
37
+ fatal: LogFn;
38
+ /** Trace level logging - most detailed information */
39
+ trace: LogFn;
40
+ /**
41
+ * Creates a child logger with additional context.
42
+ * Child loggers inherit parent context and add their own.
43
+ *
44
+ * @param obj - Additional context to include in all child logger calls
45
+ * @returns A new Logger instance with merged context
46
+ */
47
+ child: (obj: object) => Logger;
48
+ }
49
+ /**
50
+ * Console-based logger implementation that outputs to standard console methods.
51
+ * Supports structured logging with automatic timestamp injection and context inheritance.
52
+ *
53
+ * @implements {Logger}
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * const logger = new ConsoleLogger({ app: 'myApp', version: '1.0.0' });
58
+ * logger.info({ userId: 123 }, 'User action performed');
59
+ * // Output: { app: 'myApp', version: '1.0.0', userId: 123, ts: 1234567890 } User action performed
60
+ *
61
+ * const childLogger = logger.child({ module: 'auth' });
62
+ * childLogger.debug({ action: 'validate' }, 'Validating token');
63
+ * // Output: { app: 'myApp', version: '1.0.0', module: 'auth', action: 'validate', ts: 1234567891 } Validating token
64
+ * ```
65
+ */
66
+ export declare enum LogLevel {
67
+ Trace = "trace",
68
+ Debug = "debug",
69
+ Info = "info",
70
+ Warn = "warn",
71
+ Error = "error",
72
+ Fatal = "fatal",
73
+ Silent = "silent"
74
+ }
75
+ /**
76
+ * Redaction configuration for masking sensitive data in logs.
77
+ * Uses pino's fast-redact library under the hood.
78
+ *
79
+ * By default, custom paths are merged with the default sensitive paths.
80
+ * Use `resolution: 'override'` to use only your custom paths.
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * // Simple path array (merges with defaults)
85
+ * redact: ['user.ssn', 'custom.field']
86
+ *
87
+ * // Override defaults completely
88
+ * redact: {
89
+ * paths: ['only.these.paths'],
90
+ * resolution: 'override',
91
+ * }
92
+ *
93
+ * // With custom censor
94
+ * redact: {
95
+ * paths: ['extra.secret'],
96
+ * censor: '***',
97
+ * }
98
+ *
99
+ * // Remove fields entirely
100
+ * redact: {
101
+ * paths: ['temporary.data'],
102
+ * remove: true,
103
+ * }
104
+ * ```
105
+ */
106
+ export type RedactOptions = string[] | {
107
+ /** Paths to redact using dot notation or bracket notation for special chars */
108
+ paths: string[];
109
+ /** Custom replacement text (default: '[REDACTED]') */
110
+ censor?: string | ((value: unknown, path: string[]) => unknown);
111
+ /** Remove the field entirely instead of replacing (default: false) */
112
+ remove?: boolean;
113
+ /**
114
+ * How to combine custom paths with default sensitive paths.
115
+ * - 'merge': Custom paths are added to default paths (default)
116
+ * - 'override': Only custom paths are used, defaults are ignored
117
+ */
118
+ resolution?: 'merge' | 'override';
119
+ };
120
+ export type CreateLoggerOptions = {
121
+ /** Enable pretty printing with colors (disabled in production) */
122
+ pretty?: boolean;
123
+ /** Minimum log level to output */
124
+ level?: LogLevel;
125
+ /**
126
+ * Redaction configuration for masking sensitive data.
127
+ *
128
+ * - `true` or `undefined` (the default): Uses default sensitive paths
129
+ * (password, token, secret, etc.)
130
+ * - `false`: No redaction applied — the explicit opt-out
131
+ * - `string[]`: Custom paths merged with defaults
132
+ * - `object`: Advanced config with paths, censor, remove, and resolution options
133
+ *
134
+ * By default, custom paths are **merged** with the default sensitive paths.
135
+ * Use `resolution: 'override'` to disable defaults and use only your paths.
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * // Use defaults only (the same as leaving `redact` out)
140
+ * createLogger({ redact: true });
141
+ *
142
+ * // Opt out
143
+ * createLogger({ redact: false });
144
+ *
145
+ * // Add custom paths (merged with defaults)
146
+ * createLogger({ redact: ['user.ssn', 'custom.field'] });
147
+ *
148
+ * // Override defaults completely
149
+ * createLogger({
150
+ * redact: {
151
+ * paths: ['only.these.paths'],
152
+ * resolution: 'override',
153
+ * }
154
+ * });
155
+ *
156
+ * // Merge with custom censor
157
+ * createLogger({
158
+ * redact: {
159
+ * paths: ['extra.secret'],
160
+ * censor: '***',
161
+ * }
162
+ * });
163
+ * ```
164
+ */
165
+ redact?: boolean | RedactOptions;
166
+ /**
167
+ * Where log lines are written (pino logger only). Defaults to stdout.
168
+ * Ignored when `pretty` is on, since the pretty transport owns its output.
169
+ */
170
+ destination?: {
171
+ write(line: string): unknown;
172
+ };
173
+ };
174
+ //#endregion
175
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;;;;;;YAaY;;GAEV,kBAAkB,KAAK,GAAG,iBAAiB;;GAE3C;;;;;;;;iBASe;;EAEhB,OAAO;;EAEP,MAAM;;EAEN,MAAM;;EAEN,OAAO;;EAEP,OAAO;;EAEP,OAAO;;;;;;;;EAQP,QAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;oBAoBb;EACX;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkCW;;EAIT;;EAEA,oBAAoB,gBAAgB;;EAEpC;;;;;;EAMA;;YAGS;;EAEX;;EAEA,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCR,mBAAmB;;;;;EAKnB;IAAgB,MAAM"}