logixia 2.0.4 → 2.0.7

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 (218) hide show
  1. package/README.md +172 -2614
  2. package/dist/{async-context-B05ArHgM.mjs → async-context-COuvmwsS.mjs} +4 -6
  3. package/dist/async-context-COuvmwsS.mjs.map +1 -0
  4. package/dist/{async-context-DTQgi8f7.js → async-context-Dv0bmPC-.js} +4 -6
  5. package/dist/async-context-Dv0bmPC-.js.map +1 -0
  6. package/dist/{azure-monitor.transport-DV03Z5P4.d.ts → azure-monitor.transport-Bvf7Xegt.d.ts} +2 -2
  7. package/dist/{azure-monitor.transport-DV03Z5P4.d.ts.map → azure-monitor.transport-Bvf7Xegt.d.ts.map} +1 -1
  8. package/dist/{azure-monitor.transport-C7kYyZUW.d.mts → azure-monitor.transport-CbSHOnNX.d.mts} +2 -2
  9. package/dist/{azure-monitor.transport-C7kYyZUW.d.mts.map → azure-monitor.transport-CbSHOnNX.d.mts.map} +1 -1
  10. package/dist/{azure-monitor.transport-BPbgjATu.mjs → azure-monitor.transport-Coz5Gesu.mjs} +5 -5
  11. package/dist/azure-monitor.transport-Coz5Gesu.mjs.map +1 -0
  12. package/dist/{azure-monitor.transport-CwbOLZHB.js → azure-monitor.transport-D6ryi8rA.js} +5 -5
  13. package/dist/azure-monitor.transport-D6ryi8rA.js.map +1 -0
  14. package/dist/azure.d.mts +1 -1
  15. package/dist/azure.d.ts +1 -1
  16. package/dist/azure.js +1 -1
  17. package/dist/azure.mjs +1 -1
  18. package/dist/{batch-buffer-DT4gdXmf.js → batch-buffer-CFzKnuNZ.js} +3 -3
  19. package/dist/{batch-buffer-DT4gdXmf.js.map → batch-buffer-CFzKnuNZ.js.map} +1 -1
  20. package/dist/{batch-buffer-0fgLmIPn.mjs → batch-buffer-CQUWDMYq.mjs} +3 -3
  21. package/dist/{batch-buffer-0fgLmIPn.mjs.map → batch-buffer-CQUWDMYq.mjs.map} +1 -1
  22. package/dist/browser.d.mts +5 -5
  23. package/dist/browser.d.mts.map +1 -1
  24. package/dist/browser.d.ts +5 -5
  25. package/dist/browser.d.ts.map +1 -1
  26. package/dist/browser.js +72 -13
  27. package/dist/browser.js.map +1 -1
  28. package/dist/browser.mjs +72 -13
  29. package/dist/browser.mjs.map +1 -1
  30. package/dist/{builder-D70z6kjj.mjs → builder-C_TgxEOW.mjs} +106 -153
  31. package/dist/builder-C_TgxEOW.mjs.map +1 -0
  32. package/dist/{builder-M7NoaugM.js → builder-CzmM_4Ub.js} +110 -180
  33. package/dist/builder-CzmM_4Ub.js.map +1 -0
  34. package/dist/cli/index.js +157 -66
  35. package/dist/cloudwatch.d.mts +1 -1
  36. package/dist/cloudwatch.d.ts +1 -1
  37. package/dist/cloudwatch.js +1 -1
  38. package/dist/cloudwatch.mjs +1 -1
  39. package/dist/{cloudwatch.transport-Bf7L4I59.d.ts → cloudwatch.transport-CQyT6U91.d.ts} +2 -2
  40. package/dist/{cloudwatch.transport-Bf7L4I59.d.ts.map → cloudwatch.transport-CQyT6U91.d.ts.map} +1 -1
  41. package/dist/{cloudwatch.transport-Rj4yTpRn.d.mts → cloudwatch.transport-CjVrI6S4.d.mts} +2 -2
  42. package/dist/{cloudwatch.transport-Rj4yTpRn.d.mts.map → cloudwatch.transport-CjVrI6S4.d.mts.map} +1 -1
  43. package/dist/{cloudwatch.transport-BTvYfLs9.mjs → cloudwatch.transport-Cr1aeTGj.mjs} +6 -6
  44. package/dist/cloudwatch.transport-Cr1aeTGj.mjs.map +1 -0
  45. package/dist/{cloudwatch.transport-B2wKQFF7.js → cloudwatch.transport-D4G5xYfG.js} +6 -6
  46. package/dist/cloudwatch.transport-D4G5xYfG.js.map +1 -0
  47. package/dist/correlation.d.mts +10 -55
  48. package/dist/correlation.d.mts.map +1 -1
  49. package/dist/correlation.d.ts +10 -55
  50. package/dist/correlation.d.ts.map +1 -1
  51. package/dist/correlation.js +15 -13
  52. package/dist/correlation.js.map +1 -1
  53. package/dist/correlation.mjs +15 -13
  54. package/dist/correlation.mjs.map +1 -1
  55. package/dist/{entry-fields-RLd1jCoR.js → entry-fields-CVwoQplO.js} +8 -3
  56. package/dist/entry-fields-CVwoQplO.js.map +1 -0
  57. package/dist/{entry-fields-CGuvT2R0.mjs → entry-fields-DNTKQxoU.mjs} +8 -3
  58. package/dist/entry-fields-DNTKQxoU.mjs.map +1 -0
  59. package/dist/gcp.d.mts +1 -1
  60. package/dist/gcp.d.ts +1 -1
  61. package/dist/gcp.js +1 -1
  62. package/dist/gcp.mjs +1 -1
  63. package/dist/{gcp.transport-CFQfdAOK.d.ts → gcp.transport-BCIvdFV-.d.ts} +4 -4
  64. package/dist/{gcp.transport-CFQfdAOK.d.ts.map → gcp.transport-BCIvdFV-.d.ts.map} +1 -1
  65. package/dist/{gcp.transport-KZe9hCAR.js → gcp.transport-CVuRpchl.js} +20 -16
  66. package/dist/gcp.transport-CVuRpchl.js.map +1 -0
  67. package/dist/{gcp.transport-C5D72b1g.d.mts → gcp.transport-D9SdLPwP.d.mts} +4 -4
  68. package/dist/{gcp.transport-C5D72b1g.d.mts.map → gcp.transport-D9SdLPwP.d.mts.map} +1 -1
  69. package/dist/{gcp.transport-CGKopAhQ.mjs → gcp.transport-LLK2bw2-.mjs} +20 -16
  70. package/dist/gcp.transport-LLK2bw2-.mjs.map +1 -0
  71. package/dist/http-shapes-BnBkJcid.d.mts +32 -0
  72. package/dist/http-shapes-BnBkJcid.d.mts.map +1 -0
  73. package/dist/http-shapes-BnBkJcid.d.ts +32 -0
  74. package/dist/http-shapes-BnBkJcid.d.ts.map +1 -0
  75. package/dist/{index-xqaJtAZn.d.mts → index-BAkPHp5D.d.mts} +150 -8
  76. package/dist/index-BAkPHp5D.d.mts.map +1 -0
  77. package/dist/{index-DwozbmB4.d.ts → index-e7LowmAu.d.ts} +150 -8
  78. package/dist/index-e7LowmAu.d.ts.map +1 -0
  79. package/dist/index.d.mts +21 -65
  80. package/dist/index.d.mts.map +1 -1
  81. package/dist/index.d.ts +21 -65
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +26 -26
  84. package/dist/index.js.map +1 -1
  85. package/dist/index.mjs +21 -21
  86. package/dist/index.mjs.map +1 -1
  87. package/dist/{internal-log-uCSd1PMc.mjs → internal-log-Cy5nF1ZL.mjs} +2 -81
  88. package/dist/internal-log-Cy5nF1ZL.mjs.map +1 -0
  89. package/dist/{internal-log-b0Vp4qrB.js → internal-log-DwqTjhpb.js} +1 -104
  90. package/dist/internal-log-DwqTjhpb.js.map +1 -0
  91. package/dist/{logitron-logger-D2B75Oc7.d.ts → logitron-logger-Qh3y9-WH.d.ts} +13 -100
  92. package/dist/logitron-logger-Qh3y9-WH.d.ts.map +1 -0
  93. package/dist/{logitron-logger-oEd6wNhf.d.mts → logitron-logger-sYuk8fOb.d.mts} +13 -100
  94. package/dist/logitron-logger-sYuk8fOb.d.mts.map +1 -0
  95. package/dist/middleware.d.mts +4 -17
  96. package/dist/middleware.d.mts.map +1 -1
  97. package/dist/middleware.d.ts +4 -17
  98. package/dist/middleware.d.ts.map +1 -1
  99. package/dist/middleware.js +9 -39
  100. package/dist/middleware.js.map +1 -1
  101. package/dist/middleware.mjs +7 -37
  102. package/dist/middleware.mjs.map +1 -1
  103. package/dist/nest.d.mts +24 -8
  104. package/dist/nest.d.mts.map +1 -1
  105. package/dist/nest.d.ts +24 -8
  106. package/dist/nest.d.ts.map +1 -1
  107. package/dist/nest.js +140 -27
  108. package/dist/nest.js.map +1 -1
  109. package/dist/nest.mjs +140 -27
  110. package/dist/nest.mjs.map +1 -1
  111. package/dist/{transport.manager-DkcEOlqV.js → otel-ChnVYRLA.js} +214 -23
  112. package/dist/otel-ChnVYRLA.js.map +1 -0
  113. package/dist/{transport.manager-eZ_EeC00.mjs → otel-DOuwGPCd.mjs} +173 -24
  114. package/dist/otel-DOuwGPCd.mjs.map +1 -0
  115. package/dist/{request-trace-C_fvIDv4.mjs → request-trace-BgNykH9M.mjs} +1 -5
  116. package/dist/{request-trace-C_fvIDv4.mjs.map → request-trace-BgNykH9M.mjs.map} +1 -1
  117. package/dist/{request-trace-wTJdKp6-.js → request-trace-ByujsUZk.js} +1 -5
  118. package/dist/{request-trace-wTJdKp6-.js.map → request-trace-ByujsUZk.js.map} +1 -1
  119. package/dist/{safe-stringify-BMRl3EX3.mjs → safe-stringify--7gbe95n.mjs} +37 -12
  120. package/dist/safe-stringify--7gbe95n.mjs.map +1 -0
  121. package/dist/{safe-stringify-DLz1Kz3o.js → safe-stringify-CN7icp8S.js} +37 -12
  122. package/dist/safe-stringify-CN7icp8S.js.map +1 -0
  123. package/dist/{search-DUfWuzFP.js → search-CRjhHxe9.js} +269 -25
  124. package/dist/search-CRjhHxe9.js.map +1 -0
  125. package/dist/{search-CazwyX5Z.d.ts → search-D-8HJADE.d.mts} +5 -2
  126. package/dist/search-D-8HJADE.d.mts.map +1 -0
  127. package/dist/{search-CWMVYC-R.mjs → search-DAXKE-P9.mjs} +269 -25
  128. package/dist/search-DAXKE-P9.mjs.map +1 -0
  129. package/dist/{search-BH33XhuU.d.mts → search-DPwTKPve.d.ts} +5 -2
  130. package/dist/search-DPwTKPve.d.ts.map +1 -0
  131. package/dist/search.d.mts +1 -1
  132. package/dist/search.d.ts +1 -1
  133. package/dist/search.js +1 -1
  134. package/dist/search.mjs +1 -1
  135. package/dist/{secret-config-CBZBs0p1.js → secret-config-BvFl2dC8.js} +7 -7
  136. package/dist/secret-config-BvFl2dC8.js.map +1 -0
  137. package/dist/{secret-config-BegMLkYl.mjs → secret-config-ByGq7kJd.mjs} +5 -5
  138. package/dist/secret-config-ByGq7kJd.mjs.map +1 -0
  139. package/dist/sensitive-names-CHMowujD.js +276 -0
  140. package/dist/sensitive-names-CHMowujD.js.map +1 -0
  141. package/dist/sensitive-names-o__1PUUR.mjs +217 -0
  142. package/dist/sensitive-names-o__1PUUR.mjs.map +1 -0
  143. package/dist/{slack.transport-DxHOXlLu.d.mts → slack.transport-BDyENuR0.d.mts} +2 -2
  144. package/dist/{slack.transport-DxHOXlLu.d.mts.map → slack.transport-BDyENuR0.d.mts.map} +1 -1
  145. package/dist/{slack.transport-DrirgDNy.d.ts → slack.transport-C6E0l4kw.d.ts} +2 -2
  146. package/dist/{slack.transport-DrirgDNy.d.ts.map → slack.transport-C6E0l4kw.d.ts.map} +1 -1
  147. package/dist/{slack.transport-Ce96JBDk.mjs → slack.transport-CSj1j0_X.mjs} +66 -15
  148. package/dist/slack.transport-CSj1j0_X.mjs.map +1 -0
  149. package/dist/{slack.transport-Dlx3xvb7.js → slack.transport-zLQ9MGxS.js} +67 -16
  150. package/dist/slack.transport-zLQ9MGxS.js.map +1 -0
  151. package/dist/testing.d.mts +11 -4
  152. package/dist/testing.d.mts.map +1 -1
  153. package/dist/testing.d.ts +11 -4
  154. package/dist/testing.d.ts.map +1 -1
  155. package/dist/testing.js +38 -3
  156. package/dist/testing.js.map +1 -1
  157. package/dist/testing.mjs +38 -3
  158. package/dist/testing.mjs.map +1 -1
  159. package/dist/{transport.types-BJVL1QQl.d.ts → transport.types-CzJq4IrF.d.mts} +14 -3
  160. package/dist/transport.types-CzJq4IrF.d.mts.map +1 -0
  161. package/dist/{transport.types-BJVL1QQl.d.mts → transport.types-CzJq4IrF.d.ts} +14 -3
  162. package/dist/transport.types-CzJq4IrF.d.ts.map +1 -0
  163. package/dist/transports.d.mts +25 -13
  164. package/dist/transports.d.mts.map +1 -1
  165. package/dist/transports.d.ts +25 -13
  166. package/dist/transports.d.ts.map +1 -1
  167. package/dist/transports.js +15 -15
  168. package/dist/transports.mjs +6 -6
  169. package/dist/worker-entry.js +130 -25
  170. package/dist/worker.d.mts +1 -1
  171. package/dist/worker.d.ts +1 -1
  172. package/dist/worker.js +1 -1
  173. package/dist/worker.mjs +1 -1
  174. package/dist/{worker.transport-BuPwBi3d.d.ts → worker.transport-B9mCQSM1.d.ts} +7 -2
  175. package/dist/worker.transport-B9mCQSM1.d.ts.map +1 -0
  176. package/dist/{worker.transport-hJay1wxA.d.mts → worker.transport-Bl8lFRck.d.mts} +7 -2
  177. package/dist/worker.transport-Bl8lFRck.d.mts.map +1 -0
  178. package/dist/{worker.transport-DLVA4y2e.mjs → worker.transport-D78xhNhB.mjs} +13 -10
  179. package/dist/worker.transport-D78xhNhB.mjs.map +1 -0
  180. package/dist/{worker.transport-C6GNl_r2.js → worker.transport-DQDv1nAJ.js} +13 -10
  181. package/dist/worker.transport-DQDv1nAJ.js.map +1 -0
  182. package/package.json +33 -65
  183. package/dist/async-context-B05ArHgM.mjs.map +0 -1
  184. package/dist/async-context-DTQgi8f7.js.map +0 -1
  185. package/dist/azure-monitor.transport-BPbgjATu.mjs.map +0 -1
  186. package/dist/azure-monitor.transport-CwbOLZHB.js.map +0 -1
  187. package/dist/builder-D70z6kjj.mjs.map +0 -1
  188. package/dist/builder-M7NoaugM.js.map +0 -1
  189. package/dist/cloudwatch.transport-B2wKQFF7.js.map +0 -1
  190. package/dist/cloudwatch.transport-BTvYfLs9.mjs.map +0 -1
  191. package/dist/entry-fields-CGuvT2R0.mjs.map +0 -1
  192. package/dist/entry-fields-RLd1jCoR.js.map +0 -1
  193. package/dist/gcp.transport-CGKopAhQ.mjs.map +0 -1
  194. package/dist/gcp.transport-KZe9hCAR.js.map +0 -1
  195. package/dist/index-DwozbmB4.d.ts.map +0 -1
  196. package/dist/index-xqaJtAZn.d.mts.map +0 -1
  197. package/dist/internal-log-b0Vp4qrB.js.map +0 -1
  198. package/dist/internal-log-uCSd1PMc.mjs.map +0 -1
  199. package/dist/logitron-logger-D2B75Oc7.d.ts.map +0 -1
  200. package/dist/logitron-logger-oEd6wNhf.d.mts.map +0 -1
  201. package/dist/safe-stringify-BMRl3EX3.mjs.map +0 -1
  202. package/dist/safe-stringify-DLz1Kz3o.js.map +0 -1
  203. package/dist/search-BH33XhuU.d.mts.map +0 -1
  204. package/dist/search-CWMVYC-R.mjs.map +0 -1
  205. package/dist/search-CazwyX5Z.d.ts.map +0 -1
  206. package/dist/search-DUfWuzFP.js.map +0 -1
  207. package/dist/secret-config-BegMLkYl.mjs.map +0 -1
  208. package/dist/secret-config-CBZBs0p1.js.map +0 -1
  209. package/dist/slack.transport-Ce96JBDk.mjs.map +0 -1
  210. package/dist/slack.transport-Dlx3xvb7.js.map +0 -1
  211. package/dist/transport.manager-DkcEOlqV.js.map +0 -1
  212. package/dist/transport.manager-eZ_EeC00.mjs.map +0 -1
  213. package/dist/transport.types-BJVL1QQl.d.mts.map +0 -1
  214. package/dist/transport.types-BJVL1QQl.d.ts.map +0 -1
  215. package/dist/worker.transport-BuPwBi3d.d.ts.map +0 -1
  216. package/dist/worker.transport-C6GNl_r2.js.map +0 -1
  217. package/dist/worker.transport-DLVA4y2e.mjs.map +0 -1
  218. package/dist/worker.transport-hJay1wxA.d.mts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- import { A as HttpResponse, C as RequestContext, D as TraceIdExtractorConfig, E as TraceIdConfig, M as RequestTiming, O as HttpError, S as RedactConfig, T as TimingEntry, _ as LogLevel, a as DEFAULT_LOG_LEVELS, b as LoggerWithLevels, c as ExtractLevels, d as ILogFormatter, f as ILogger, g as LogFieldKey, h as LogEntry, i as DEFAULT_LOG_COLORS, j as RequestMetrics, k as HttpRequest, l as GracefulShutdownConfig, m as LogColor, n as ContextData, o as Environment, p as ILoggerDefault, r as CustomLevelMethods, s as ErrorSerializationOptions, t as AdaptiveSamplingConfig, u as IBaseLogger, v as LogLevelString, w as SamplingConfig, x as NamespaceLevels, y as LoggerConfig } from "./index-DwozbmB4.js";
2
- import { a as globalPluginRegistry, i as PluginRegistry, n as createLogger$1, o as usePlugin, r as LogixiaPlugin, t as LogixiaLogger } from "./logitron-logger-D2B75Oc7.js";
3
- import { a as DiscordTransport, c as OtlpLogTransportConfig, i as DiscordEmbed, l as toOtelSeverity, n as SlackTransport, o as DiscordTransportConfig, r as SlackTransportConfig, s as OtlpLogTransport, t as SlackMessage } from "./slack.transport-DrirgDNy.js";
4
- import { A as SearchStats, C as SearchFilters, D as SearchPreset, E as SearchOptions, F as SuggestionType, I as TimeRange, L as TimelineEvent, M as SemanticIndex, N as SimilarLog, O as SearchQuery, P as SortField, S as RelativeTime, T as SearchMatch, _ as ParsedNLQuery, a as ILogSearchEngine, b as RelatedLog, c as SearchManager, d as CorrelatedLogs, f as EntityType, g as LogPattern, h as LogCorrelationSummary, i as BasicSearchEngine, j as SearchSuggestion, k as SearchResult, l as SearchManagerConfig, m as LogCluster, n as NLPSearchEngine, o as BasicLogIndexer, p as ExportOptions, r as CorrelationEngine, s as ILogIndexer, t as PatternRecognitionEngine, u as AnomalyDetection, v as QueryEntity, w as SearchHighlight, x as RelationshipType, y as QueryIntent } from "./search-CazwyX5Z.js";
1
+ import { _ as TransportLogEntry, d as ITransport, h as TransportConfig } from "./transport.types-CzJq4IrF.js";
2
+ import { n as HttpResponseShape, t as HttpRequestShape } from "./http-shapes-BnBkJcid.js";
3
+ import { A as TraceIdConfig, B as usePlugin, C as LogixiaLoggerInstance, D as ReservedLevelName, E as RequestContext, F as RequestMetrics, I as RequestTiming, L as LogixiaPlugin, M as HttpError, N as HttpRequest, O as SamplingConfig, P as HttpResponse, R as PluginRegistry, S as LogixiaLoggerDefault, T as RedactConfig, _ as LogFieldKey, a as DEFAULT_LOG_LEVELS, b as LoggerConfig, c as ExtractLevels, d as ILogFormatter, f as ILogger, g as LogEntry, h as LogColor, i as DEFAULT_LOG_COLORS, j as TraceIdExtractorConfig, k as TimingEntry, l as GracefulShutdownConfig, m as ILoggerRuntimeControls, n as ContextData, o as Environment, p as ILoggerDefault, r as CustomLevelMethods, s as ErrorSerializationOptions, t as AdaptiveSamplingConfig, u as IBaseLogger, v as LogLevel, w as NamespaceLevels, x as LoggerWithLevels, y as LogLevelString, z as globalPluginRegistry } from "./index-e7LowmAu.js";
4
+ import { n as createLogger$1, t as LogixiaLogger } from "./logitron-logger-Qh3y9-WH.js";
5
+ import { a as DiscordTransport, c as OtlpLogTransportConfig, i as DiscordEmbed, l as toOtelSeverity, n as SlackTransport, o as DiscordTransportConfig, r as SlackTransportConfig, s as OtlpLogTransport, t as SlackMessage } from "./slack.transport-C6E0l4kw.js";
6
+ import { A as SearchStats, C as SearchFilters, D as SearchPreset, E as SearchOptions, F as SuggestionType, I as TimeRange, L as TimelineEvent, M as SemanticIndex, N as SimilarLog, O as SearchQuery, P as SortField, S as RelativeTime, T as SearchMatch, _ as ParsedNLQuery, a as ILogSearchEngine, b as RelatedLog, c as SearchManager, d as CorrelatedLogs, f as EntityType, g as LogPattern, h as LogCorrelationSummary, i as BasicSearchEngine, j as SearchSuggestion, k as SearchResult, l as SearchManagerConfig, m as LogCluster, n as NLPSearchEngine, o as BasicLogIndexer, p as ExportOptions, r as CorrelationEngine, s as ILogIndexer, t as PatternRecognitionEngine, u as AnomalyDetection, v as QueryEntity, w as SearchHighlight, x as RelationshipType, y as QueryIntent } from "./search-DPwTKPve.js";
5
7
  import { AsyncLocalStorage } from "node:async_hooks";
6
8
  import { IncomingMessage, ServerResponse } from "node:http";
7
9
  /**
@@ -593,8 +595,8 @@ interface LogFieldDef {
593
595
  /** Custom validator — return a string to emit it as a warning message. */
594
596
  validate?: (value: unknown) => string | undefined;
595
597
  }
596
- type LogSchema<TFields extends Record<string, unknown>> = { [K in keyof TFields]: LogFieldDef; };
597
- interface CompiledSchema<TFields extends Record<string, unknown>> {
598
+ type LogSchema<TFields extends object> = { [K in keyof TFields]: LogFieldDef; };
599
+ interface CompiledSchema<TFields extends object> {
598
600
  readonly fields: LogSchema<TFields>;
599
601
  /**
600
602
  * Validate a payload against the schema.
@@ -609,7 +611,7 @@ interface CompiledSchema<TFields extends Record<string, unknown>> {
609
611
  * Call this once at module initialisation and pass it to `createTypedLogger`.
610
612
  * In development, every log call is validated against the schema.
611
613
  */
612
- export declare function defineLogSchema<TFields extends Record<string, unknown>>(fields: LogSchema<TFields>): CompiledSchema<TFields>;
614
+ export declare function defineLogSchema<TFields extends object>(fields: LogSchema<TFields>): CompiledSchema<TFields>;
613
615
  /** IBaseLogger-compatible subset used by TypedLogger */
614
616
  interface LoggerLike {
615
617
  error(message: string | Error, data?: Record<string, unknown>): Promise<void>;
@@ -625,7 +627,7 @@ interface LoggerLike {
625
627
  * The `error` overload still accepts a plain `Error` object as the first arg
626
628
  * (with optional `TFields` data) so the typed logger remains a drop-in replacement.
627
629
  */
628
- interface TypedLogger<TFields extends Record<string, unknown>> {
630
+ interface TypedLogger<TFields extends object> {
629
631
  error(error: Error, data?: Partial<TFields>): Promise<void>;
630
632
  error(message: string, data?: Partial<TFields>): Promise<void>;
631
633
  warn(message: string, data?: Partial<TFields>): Promise<void>;
@@ -642,40 +644,7 @@ interface TypedLogger<TFields extends Record<string, unknown>> {
642
644
  * @param logger Any object that implements `IBaseLogger` (e.g. the result of `createLogger()`)
643
645
  * @param schema Optional schema for dev-time validation. Created with `defineLogSchema()`.
644
646
  */
645
- export declare function createTypedLogger<TFields extends Record<string, unknown>>(logger: LoggerLike, schema?: CompiledSchema<TFields>): TypedLogger<TFields>;
646
- /**
647
- * logixia — Canonical Log Lines / Wide Events.
648
- *
649
- * Emit ONE dense, structured event per unit of work (usually a request) instead
650
- * of scattering details across many narrow log lines. Fields are accumulated as
651
- * the request flows through middleware and business logic, then the whole event
652
- * is emitted ONCE — in a `finally`/teardown path so it fires even on errors.
653
- *
654
- * This is the "canonical log line" pattern (Stripe) / "wide events" /
655
- * "Observability 2.0" (Honeycomb): one pre-joined, queryable record per request,
656
- * so operators never JOIN across log lines during an incident. It composes with
657
- * logixia's existing trace correlation — when a trace is active, the event
658
- * carries `traceId`/`spanId`, making it OTel-friendly.
659
- *
660
- * @example Manual scope
661
- * ```ts
662
- * import { withWideEvent, addEventFields } from 'logixia';
663
- *
664
- * await withWideEvent(logger, { route: '/checkout' }, async () => {
665
- * addEventFields({ userId, planTier }); // from anywhere in the call tree
666
- * addEventFields({ dbQueries: 4, cacheHit });
667
- * // ...one wide event is emitted automatically when this callback settles,
668
- * // even if it throws.
669
- * });
670
- * ```
671
- *
672
- * @example Express middleware (auto-emit on response finish/close)
673
- * ```ts
674
- * import { wideEventMiddleware } from 'logixia';
675
- * app.use(wideEventMiddleware(logger));
676
- * app.get('/x', (req, res) => { addEventFields({ handled: 'x' }); res.json({}); });
677
- * ```
678
- */
647
+ export declare function createTypedLogger<TFields extends object>(logger: LoggerLike, schema?: CompiledSchema<TFields>): TypedLogger<TFields>;
679
648
  /** The accumulating event fields for the current scope. */
680
649
  type WideEventFields = Record<string, unknown>;
681
650
  /** Minimal logger surface a wide event needs to emit itself. */
@@ -712,23 +681,17 @@ export declare function getEventFields(): WideEventFields | undefined;
712
681
  * finally" guarantee). On error, `error` + `errorMessage` fields are added.
713
682
  */
714
683
  export declare function withWideEvent<T>(logger: WideEventLogger, initialFields: WideEventFields, callback: () => Promise<T> | T, options?: WideEventOptions): Promise<T>;
715
- interface MwReq {
716
- method?: string | undefined;
717
- url?: string | undefined;
718
- originalUrl?: string | undefined;
719
- ip?: string | undefined;
720
- headers?: Record<string, unknown> | undefined;
721
- socket?: {
722
- remoteAddress?: string;
723
- } | undefined;
724
- }
725
- interface MwRes {
726
- statusCode?: number;
727
- once?: (event: string, cb: () => void) => void;
728
- }
684
+ type MwReq = HttpRequestShape;
685
+ type MwRes = HttpResponseShape;
729
686
  interface WideEventMiddlewareOptions extends WideEventOptions {
730
687
  /** Derive extra initial fields from the request. */
731
688
  enrich?: (req: MwReq) => WideEventFields;
689
+ /**
690
+ * Additional query-string parameter names whose values are redacted from the
691
+ * logged `url`. Merged with the defaults (token, access_token, refresh_token,
692
+ * code, password, secret, api_key, apikey, key, signature, sig, auth).
693
+ */
694
+ redactQueryParams?: string[];
732
695
  /** Skip wide-event emission for a request (e.g. health checks). */
733
696
  skip?: (req: MwReq) => boolean;
734
697
  }
@@ -740,16 +703,9 @@ interface WideEventMiddlewareOptions extends WideEventOptions {
740
703
  * request duration.
741
704
  */
742
705
  export declare function wideEventMiddleware(logger: WideEventLogger, options?: WideEventMiddlewareOptions): (req: MwReq, res: MwRes, next: () => void) => void;
743
- /**
744
- * Per-request trace ID resolution shared by the HTTP logger middleware and the
745
- * context helpers. Internal: not re-exported from the package entry points.
746
- */
747
706
  type TraceHeaderOption = string | readonly string[];
748
707
  /** Minimal structural request shape; Express and Fastify requests satisfy it. */
749
- interface ContextRequestLike {
750
- headers?: Record<string, string | string[] | undefined>;
751
- id?: unknown;
752
- }
708
+ type ContextRequestLike = HttpRequestShape;
753
709
  interface LogContext {
754
710
  traceId?: string;
755
711
  spanId?: string;
@@ -1369,5 +1325,5 @@ export declare const logger: LogixiaLogger<{
1369
1325
  /**
1370
1326
  * Export default configuration for reference
1371
1327
  */
1372
- export { AdaptiveSamplingConfig, type AnomalyDetection, BasicLogIndexer, BasicSearchEngine, type BuildParams, type CompiledSchema, ContextData, type CorrelatedLogs, CorrelationEngine, type CounterConfig, CustomLevelMethods, DEFAULT_LOG_COLORS, DEFAULT_LOG_LEVELS, type DiscordEmbed, DiscordTransport, type DiscordTransportConfig, type EntityType, Environment, type ErrorDetail, ErrorSerializationOptions, type ExportOptions, ExtractLevels, type GaugeConfig, GracefulShutdownConfig, type HistogramConfig, HttpError, HttpRequest, HttpResponse, IBaseLogger, ILogFormatter, type ILogIndexer, type ILogSearchEngine, ILogger, ILoggerDefault, type LevelSignalOptions, type LogCluster, LogColor, type LogContext, type LogCorrelationSummary, LogEntry, type LogFieldDef, LogFieldKey, type LogFieldType, LogLevel, LogLevelString, type LogPattern, type LogSchema, LoggerConfig, type LoggerConfig as LoggerConfigInterface, type LoggerLike, LoggerWithLevels, type LogixiaErrorResponse, type LogixiaExceptionOptions, LogixiaLogger, type LogixiaPlugin, type MetricConfig, type MetricsMap, type MetricsPluginOptions, NLPSearchEngine, NamespaceLevels, type OtelBridgeOptions, type OtelSpanContext, OtlpLogTransport, type OtlpLogTransportConfig, type ParsedNLQuery, PatternRecognitionEngine, PluginRegistry, type QueryEntity, type QueryIntent, type ReconfigurableLogger, RedactConfig, type RelatedLog, type RelationshipType, type RelativeTime, RequestContext, RequestMetrics, RequestTiming, type SafeStringifyOptions, SamplingConfig, type SamplingStats, type SearchFilters, type SearchHighlight, SearchManager, type SearchManagerConfig, type SearchMatch, type SearchOptions, type SearchPreset, type SearchQuery, type SearchResult, type SearchStats, type SearchSuggestion, type SemanticIndex, type SimilarLog, type SlackMessage, SlackTransport, type SlackTransportConfig, type SortField, type SuggestionType, type TimeRange, type TimelineEvent, TimingEntry, TraceIdConfig, TraceIdExtractorConfig, type TypedLogger, type WideEventFields, type WideEventLogger, type WideEventMiddlewareOptions, type WideEventOptions, globalPluginRegistry, toOtelSeverity, usePlugin };
1328
+ export { AdaptiveSamplingConfig, type AnomalyDetection, BasicLogIndexer, BasicSearchEngine, type BuildParams, type CompiledSchema, ContextData, type CorrelatedLogs, CorrelationEngine, type CounterConfig, CustomLevelMethods, DEFAULT_LOG_COLORS, DEFAULT_LOG_LEVELS, type DiscordEmbed, DiscordTransport, type DiscordTransportConfig, type EntityType, Environment, type ErrorDetail, ErrorSerializationOptions, type ExportOptions, ExtractLevels, type GaugeConfig, GracefulShutdownConfig, type HistogramConfig, HttpError, HttpRequest, HttpResponse, IBaseLogger, ILogFormatter, type ILogIndexer, type ILogSearchEngine, ILogger, ILoggerDefault, ILoggerRuntimeControls, type ITransport, type LevelSignalOptions, type LogCluster, LogColor, type LogContext, type LogCorrelationSummary, LogEntry, type LogFieldDef, LogFieldKey, type LogFieldType, LogLevel, LogLevelString, type LogPattern, type LogSchema, LoggerConfig, type LoggerConfig as LoggerConfigInterface, type LoggerLike, LoggerWithLevels, type LogixiaErrorResponse, type LogixiaExceptionOptions, LogixiaLogger, LogixiaLoggerDefault, LogixiaLoggerInstance, type LogixiaPlugin, type MetricConfig, type MetricsMap, type MetricsPluginOptions, NLPSearchEngine, NamespaceLevels, type OtelBridgeOptions, type OtelSpanContext, OtlpLogTransport, type OtlpLogTransportConfig, type ParsedNLQuery, PatternRecognitionEngine, PluginRegistry, type QueryEntity, type QueryIntent, type ReconfigurableLogger, RedactConfig, type RelatedLog, type RelationshipType, type RelativeTime, RequestContext, RequestMetrics, RequestTiming, ReservedLevelName, type SafeStringifyOptions, SamplingConfig, type SamplingStats, type SearchFilters, type SearchHighlight, SearchManager, type SearchManagerConfig, type SearchMatch, type SearchOptions, type SearchPreset, type SearchQuery, type SearchResult, type SearchStats, type SearchSuggestion, type SemanticIndex, type SimilarLog, type SlackMessage, SlackTransport, type SlackTransportConfig, type SortField, type SuggestionType, type TimeRange, type TimelineEvent, TimingEntry, TraceIdConfig, TraceIdExtractorConfig, type TransportConfig, type TransportLogEntry, type TypedLogger, type WideEventFields, type WideEventLogger, type WideEventMiddlewareOptions, type WideEventOptions, globalPluginRegistry, toOtelSeverity, usePlugin };
1373
1329
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["createLoggerFromCore","_$__types0.Environment","_$__types0.LogColor"],"sources":["../src/core/default-config.ts","../src/formatters/json.formatter.ts","../src/formatters/text.formatter.ts","../src/utils/error.utils.ts","../src/utils/otel.ts","../src/utils/redact.utils.ts","../src/utils/runtime-control.ts","../src/utils/safe-stringify.ts","../src/utils/shutdown.utils.ts","../src/utils/trace.utils.ts","../src/utils/typed-logger.ts","../src/wide-events.ts","../src/utils/request-trace.ts","../src/context/async-context.ts","../src/utils/sampling.utils.ts","../src/exceptions/types.ts","../src/exceptions/builder.ts","../src/exceptions/exception.ts","../src/metrics.ts","../src/index.ts"],"mappings":";;;;;;;;;qBAMa;;EAEmB,aAAA;;;;;;;;;;;;;;;;;;IAyBvB,QAAA,eAAe;;;;;;;;;;;;;qBCVX,yBAAyB;UAC5B;UACA;UACA;UACA;UACA;UACA;EAGN,YAAA;IACE;IACA;IACA;IACA;IACA;IACA;;EAWJ,OAAO,OAAO;UA0DN;;qBC9FG,yBAAyB;UAC5B;UACA;UACA;UACA;UACA;UACA;UACA;EAGN,YAAA;IACE;IACA;IACA;IACA;IACA;IACA;IACA,SA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e;EACf;;EAEA;;EAEA;EACA;;;;;EAKA;;;;;;;;;;UAWe;EACf;;EAEA;;EAEA;EACA;;KAGU,eAAe,gBAAgB,kBAAkB;KACjD,aAAa,eAAe;;qBAkC3B;UAEI;;;;;;;;EAQf;;;;;;;;;;;;;;;;;qBAsEW,yBAAyB;WACpB;mBAEC;mBACA;mBACA;mBAEA;EAEL,YAAA,KAAK,YAAY,UAAS;EAYtC;EAIA,MAAM,OAAO,WAAW;;;;;;;;;;;;;;EAsExB;;;;;EAwDA;;;;;;;;;;;EAeA,mBACE,cACA;IAAO,IAAI,WAAW;IAAqB,IAAI;;;;;;;;;;;;;EAmBjD,gBAAgB,KAAK,iBAAiB,KAAK;;;;;UAsBnC;UAKA;UAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkDM,oBACd,KAAK,YACL,UAAU,uBACT;;;;;;qBCvYU,qBAAYA;;;;qBAKZ,QAAM;;E,aAANC"}
1
+ {"version":3,"file":"index.d.ts","names":["createLoggerFromCore","_$__types0.Environment","_$__types0.LogColor"],"sources":["../src/core/default-config.ts","../src/formatters/json.formatter.ts","../src/formatters/text.formatter.ts","../src/utils/error.utils.ts","../src/utils/otel.ts","../src/utils/redact.utils.ts","../src/utils/runtime-control.ts","../src/utils/safe-stringify.ts","../src/utils/shutdown.utils.ts","../src/utils/trace.utils.ts","../src/utils/typed-logger.ts","../src/wide-events.ts","../src/utils/request-trace.ts","../src/context/async-context.ts","../src/utils/sampling.utils.ts","../src/exceptions/types.ts","../src/exceptions/builder.ts","../src/exceptions/exception.ts","../src/metrics.ts","../src/index.ts"],"mappings":";;;;;;;;;;;qBAMa;;EAEmB,aAAA;;;;;;;;;;;;;;;;;;IAyBvB,QAAA,eAAe;;;;;;;;;;;;;qBCTX,yBAAyB;UAC5B;UACA;UACA;UACA;UACA;UACA;EAGN,YAAA;IACE;IACA;IACA;IACA;IACA;IACA;;EAWJ,OAAO,OAAO;UA0DN;;qBC/FG,yBAAyB;UAC5B;UACA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EA;;EAEA;EACA;;KAGU,eAAe,gBAAgB,kBAAkB;KACjD,aAAa,eAAe;;qBAkC3B;UAEI;;;;;;;;EAQf;;;;;;;;;;;;;;;;;qBAsEW,yBAAyB;WACpB;mBAEC;mBACA;mBACA;mBAEA;EAEL,YAAA,KAAK,YAAY,UAAS;EAYtC;EAIA,MAAM,OAAO,WAAW;;;;;;;;;;;;;;EAsExB;;;;;EAwDA;;;;;;;;;;;EAeA,mBACE,cACA;IAAO,IAAI,WAAW;IAAqB,IAAI;;;;;;;;;;;;;EAmBjD,gBAAgB,KAAK,iBAAiB,KAAK;;;;;UAsBnC;UAKA;UAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkDM,oBACd,KAAK,YACL,UAAU,uBACT;;;;;;qBCtYU,qBAAYA;;;;qBAKZ,QAAM;;E,aAANC"}
package/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_builder = require("./builder-M7NoaugM.js");
3
- const require_request_trace = require("./request-trace-wTJdKp6-.js");
4
- const require_async_context = require("./async-context-DTQgi8f7.js");
5
- const require_internal_log = require("./internal-log-b0Vp4qrB.js");
2
+ const require_builder = require("./builder-CzmM_4Ub.js");
3
+ const require_sensitive_names = require("./sensitive-names-CHMowujD.js");
4
+ const require_request_trace = require("./request-trace-ByujsUZk.js");
5
+ const require_async_context = require("./async-context-Dv0bmPC-.js");
6
+ const require_internal_log = require("./internal-log-DwqTjhpb.js");
6
7
  const require_coerce_utils = require("./coerce.utils-C1C5sIX0.js");
7
- const require_safe_stringify = require("./safe-stringify-DLz1Kz3o.js");
8
- const require_transport_manager = require("./transport.manager-DkcEOlqV.js");
9
- const require_slack_transport = require("./slack.transport-Dlx3xvb7.js");
10
- const require_search = require("./search-DUfWuzFP.js");
8
+ const require_safe_stringify = require("./safe-stringify-CN7icp8S.js");
9
+ const require_otel = require("./otel-ChnVYRLA.js");
10
+ const require_slack_transport = require("./slack.transport-zLQ9MGxS.js");
11
+ const require_search = require("./search-CRjhHxe9.js");
11
12
  let node_async_hooks = require("node:async_hooks");
12
13
  // src/formatters/json.formatter.ts
13
14
  /**
@@ -57,24 +58,21 @@ var JsonFormatter = class {
57
58
  }
58
59
  serializePayload(payload) {
59
60
  const serialized = {};
60
- for (const [key, value] of Object.entries(payload)) {
61
- if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
62
- try {
63
- if (value instanceof Error) serialized[key] = require_builder.serializeError(value);
64
- else if (value instanceof Date) serialized[key] = value.toISOString();
65
- else if (typeof value === "function") serialized[key] = "[Function]";
66
- else if (typeof value === "symbol") serialized[key] = value.toString();
67
- else if (value === void 0) serialized[key] = null;
68
- else serialized[key] = value;
69
- } catch {
70
- serialized[key] = "[Unserializable]";
71
- }
61
+ for (const [key, value] of Object.entries(payload)) try {
62
+ if (value instanceof Error) require_sensitive_names.assignOwn(serialized, key, require_builder.serializeError(value));
63
+ else if (value instanceof Date) require_sensitive_names.assignOwn(serialized, key, value.toISOString());
64
+ else if (typeof value === "function") require_sensitive_names.assignOwn(serialized, key, "[Function]");
65
+ else if (typeof value === "symbol") require_sensitive_names.assignOwn(serialized, key, value.toString());
66
+ else if (value === void 0) require_sensitive_names.assignOwn(serialized, key, null);
67
+ else require_sensitive_names.assignOwn(serialized, key, value);
68
+ } catch {
69
+ require_sensitive_names.assignOwn(serialized, key, "[Unserializable]");
72
70
  }
73
71
  return serialized;
74
72
  }
75
73
  };
76
74
  // src/formatters/text.formatter.ts
77
- const stripControls = (value) => require_transport_manager.stripControlChars(require_coerce_utils.safeToString(value));
75
+ const stripControls = (value) => require_otel.stripControlChars(require_coerce_utils.safeToString(value));
78
76
  var TextFormatter = class TextFormatter {
79
77
  constructor(options = {}) {
80
78
  this.colorize = options.colorize ?? true;
@@ -585,16 +583,18 @@ async function withWideEvent(logger, initialFields, callback, options = {}) {
585
583
  * request duration.
586
584
  */
587
585
  function wideEventMiddleware(logger, options = {}) {
586
+ const redactParams = require_sensitive_names.buildNameSet(require_sensitive_names.DEFAULT_REDACT_QUERY_PARAMS, options.redactQueryParams);
588
587
  return function logixiaWideEventMiddleware(req, res, next) {
589
588
  var _options$skip, _req$socket, _res$once, _res$once2;
590
589
  if ((_options$skip = options.skip) === null || _options$skip === void 0 ? void 0 : _options$skip.call(options, req)) {
591
590
  next();
592
591
  return;
593
592
  }
593
+ const rawUrl = req.originalUrl ?? req.url;
594
594
  const state = {
595
595
  fields: {
596
596
  method: req.method,
597
- url: req.originalUrl ?? req.url,
597
+ url: rawUrl === void 0 ? void 0 : require_sensitive_names.redactUrlQuery(rawUrl, redactParams),
598
598
  ip: req.ip ?? ((_req$socket = req.socket) === null || _req$socket === void 0 ? void 0 : _req$socket.remoteAddress),
599
599
  ...options.enrich ? options.enrich(req) : {}
600
600
  },
@@ -959,18 +959,18 @@ exports.createTypedLogger = createTypedLogger;
959
959
  exports.decycleValue = require_safe_stringify.decycleValue;
960
960
  exports.defineLogSchema = defineLogSchema;
961
961
  exports.deregisterFromShutdown = require_builder.deregisterFromShutdown;
962
- exports.disableOtelBridge = require_builder.disableOtelBridge;
962
+ exports.disableOtelBridge = require_otel.disableOtelBridge;
963
963
  exports.extractTraceId = require_request_trace.extractTraceId;
964
964
  exports.flushOnExit = require_builder.flushOnExit;
965
965
  exports.generateRequestId = require_builder.generateRequestId;
966
966
  exports.generateTraceId = require_builder.generateTraceId;
967
- exports.getActiveOtelContext = require_builder.getActiveOtelContext;
967
+ exports.getActiveOtelContext = require_otel.getActiveOtelContext;
968
968
  exports.getCurrentTraceId = require_request_trace.getCurrentTraceId;
969
969
  exports.getEventFields = getEventFields;
970
- exports.getOtelMetaFields = require_builder.getOtelMetaFields;
970
+ exports.getOtelMetaFields = require_otel.getOtelMetaFields;
971
971
  exports.getTraceContextKey = require_request_trace.getTraceContextKey;
972
972
  exports.globalPluginRegistry = require_builder.globalPluginRegistry;
973
- exports.initOtelBridge = require_builder.initOtelBridge;
973
+ exports.initOtelBridge = require_otel.initOtelBridge;
974
974
  exports.isError = require_builder.isError;
975
975
  exports.isLogixiaException = require_builder.isLogixiaException;
976
976
  exports.logger = logger;