@wgtechlabs/log-engine 1.2.0 → 1.3.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.
Files changed (52) hide show
  1. package/README.md +283 -18
  2. package/dist/formatter/colors.d.ts +32 -0
  3. package/dist/formatter/colors.d.ts.map +1 -0
  4. package/dist/formatter/colors.js +34 -0
  5. package/dist/formatter/data-formatter.d.ts +25 -0
  6. package/dist/formatter/data-formatter.d.ts.map +1 -0
  7. package/dist/formatter/data-formatter.js +53 -0
  8. package/dist/formatter/index.d.ts +10 -0
  9. package/dist/formatter/index.d.ts.map +1 -0
  10. package/dist/formatter/index.js +21 -0
  11. package/dist/formatter/message-formatter.d.ts +41 -0
  12. package/dist/formatter/message-formatter.d.ts.map +1 -0
  13. package/dist/formatter/message-formatter.js +87 -0
  14. package/dist/formatter/timestamp.d.ts +27 -0
  15. package/dist/formatter/timestamp.d.ts.map +1 -0
  16. package/dist/formatter/timestamp.js +39 -0
  17. package/dist/formatter.d.ts +10 -2
  18. package/dist/formatter.d.ts.map +1 -1
  19. package/dist/formatter.js +42 -5
  20. package/dist/index.d.ts +143 -41
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +155 -71
  23. package/dist/logger/config.d.ts +42 -0
  24. package/dist/logger/config.d.ts.map +1 -0
  25. package/dist/logger/config.js +101 -0
  26. package/dist/logger/core.d.ts +108 -0
  27. package/dist/logger/core.d.ts.map +1 -0
  28. package/dist/logger/core.js +185 -0
  29. package/dist/logger/environment.d.ts +36 -0
  30. package/dist/logger/environment.d.ts.map +1 -0
  31. package/dist/logger/environment.js +61 -0
  32. package/dist/logger/filtering.d.ts +36 -0
  33. package/dist/logger/filtering.d.ts.map +1 -0
  34. package/dist/logger/filtering.js +65 -0
  35. package/dist/logger/index.d.ts +10 -0
  36. package/dist/logger/index.d.ts.map +1 -0
  37. package/dist/logger/index.js +18 -0
  38. package/dist/logger.d.ts +61 -5
  39. package/dist/logger.d.ts.map +1 -1
  40. package/dist/logger.js +117 -10
  41. package/dist/redaction/config.d.ts +29 -0
  42. package/dist/redaction/config.d.ts.map +1 -0
  43. package/dist/redaction/config.js +95 -0
  44. package/dist/redaction/index.d.ts +8 -0
  45. package/dist/redaction/index.d.ts.map +1 -0
  46. package/dist/redaction/index.js +12 -0
  47. package/dist/redaction/redactor.d.ts +99 -0
  48. package/dist/redaction/redactor.d.ts.map +1 -0
  49. package/dist/redaction/redactor.js +257 -0
  50. package/dist/types/index.d.ts +164 -0
  51. package/dist/types/index.d.ts.map +1 -1
  52. package/package.json +11 -4
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+ /**
3
+ * Core data redaction engine
4
+ * Handles automatic detection and redaction of sensitive information in log data
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DataRedactor = void 0;
8
+ const config_1 = require("./config");
9
+ /**
10
+ * DataRedactor class - Core redaction logic for processing log data
11
+ * Automatically detects and redacts sensitive information while preserving structure
12
+ */
13
+ class DataRedactor {
14
+ /**
15
+ * Update the redaction configuration with new settings
16
+ * Merges provided config with existing settings and reloads environment variables
17
+ * @param newConfig - Partial configuration to merge with current settings
18
+ */
19
+ static updateConfig(newConfig) {
20
+ // Reload environment configuration to pick up any changes
21
+ const envConfig = config_1.RedactionController.getEnvironmentConfig();
22
+ this.config = {
23
+ ...config_1.defaultRedactionConfig,
24
+ ...envConfig,
25
+ ...newConfig
26
+ };
27
+ }
28
+ /**
29
+ * Get the current redaction configuration
30
+ * @returns Deep copy of current redaction configuration
31
+ */
32
+ static getConfig() {
33
+ return {
34
+ ...this.config,
35
+ sensitiveFields: [...this.config.sensitiveFields],
36
+ contentFields: [...this.config.contentFields],
37
+ customPatterns: this.config.customPatterns ? [...this.config.customPatterns] : undefined
38
+ };
39
+ }
40
+ /**
41
+ * Refresh configuration from environment variables
42
+ * Useful for picking up runtime environment changes
43
+ */
44
+ static refreshConfig() {
45
+ const envConfig = config_1.RedactionController.getEnvironmentConfig();
46
+ this.config = {
47
+ ...config_1.defaultRedactionConfig,
48
+ ...envConfig
49
+ };
50
+ }
51
+ /**
52
+ * Add custom regex patterns for advanced field detection
53
+ * @param patterns - Array of regex patterns to add
54
+ */
55
+ static addCustomPatterns(patterns) {
56
+ const currentPatterns = this.config.customPatterns || [];
57
+ this.config = {
58
+ ...this.config,
59
+ customPatterns: [...currentPatterns, ...patterns]
60
+ };
61
+ }
62
+ /**
63
+ * Clear all custom regex patterns
64
+ */
65
+ static clearCustomPatterns() {
66
+ this.config = {
67
+ ...this.config,
68
+ customPatterns: []
69
+ };
70
+ }
71
+ /**
72
+ * Add custom sensitive field names to the existing list
73
+ * @param fields - Array of field names to add
74
+ */
75
+ static addSensitiveFields(fields) {
76
+ this.config = {
77
+ ...this.config,
78
+ sensitiveFields: [...this.config.sensitiveFields, ...fields]
79
+ };
80
+ }
81
+ /**
82
+ * Test if a field name would be redacted with current configuration
83
+ * @param fieldName - Field name to test
84
+ * @returns true if field would be redacted, false otherwise
85
+ */
86
+ static testFieldRedaction(fieldName) {
87
+ const testObj = { [fieldName]: 'test-value' };
88
+ const result = this.redactData(testObj);
89
+ return result[fieldName] !== 'test-value';
90
+ }
91
+ /**
92
+ * Main entry point for data redaction
93
+ * Processes any type of data and returns a redacted version
94
+ * @param data - Data to be processed for redaction
95
+ * @returns Redacted version of the data
96
+ */
97
+ static redactData(data) {
98
+ // Skip processing if redaction is disabled or data is null/undefined
99
+ if (!this.config.enabled || data === null || data === undefined) {
100
+ return data;
101
+ }
102
+ return this.processValue(data, new WeakSet(), 0);
103
+ }
104
+ /**
105
+ * Process a value of any type (primitive, object, array)
106
+ * Recursively handles nested structures when deepRedaction is enabled
107
+ * Includes circular reference protection and recursion depth limiting
108
+ * @param value - Value to process
109
+ * @param visited - Set to track visited objects (prevents circular references)
110
+ * @param depth - Current recursion depth (prevents stack overflow)
111
+ * @returns Processed value with redaction applied
112
+ */
113
+ static processValue(value, visited = new WeakSet(), depth = 0) {
114
+ // Check recursion depth limit to prevent stack overflow
115
+ if (depth >= this.MAX_RECURSION_DEPTH) {
116
+ return '[Max Depth Exceeded]';
117
+ }
118
+ // Handle null and undefined
119
+ if (value === null || value === undefined) {
120
+ return value;
121
+ }
122
+ // Handle arrays - process each element
123
+ if (Array.isArray(value)) {
124
+ // Check for circular reference
125
+ if (visited.has(value)) {
126
+ return '[Circular Array]';
127
+ }
128
+ visited.add(value);
129
+ const result = value.map(item => this.processValue(item, visited, depth + 1));
130
+ // Keep value in visited set to detect circular references across branches
131
+ return result;
132
+ }
133
+ // Handle objects - process each property
134
+ if (typeof value === 'object') {
135
+ // Check for circular reference
136
+ if (visited.has(value)) {
137
+ return '[Circular Object]';
138
+ }
139
+ visited.add(value);
140
+ const result = this.redactObject(value, visited, depth + 1);
141
+ // Keep value in visited set to detect circular references across branches
142
+ return result;
143
+ }
144
+ // Handle primitives (string, number, boolean) - return as-is
145
+ return value;
146
+ }
147
+ /**
148
+ * Process an object and redact sensitive fields
149
+ * Handles field-level redaction and content truncation
150
+ * @param obj - Object to process
151
+ * @param visited - Set to track visited objects (prevents circular references)
152
+ * @param depth - Current recursion depth (prevents stack overflow)
153
+ * @returns Object with sensitive fields redacted
154
+ */
155
+ static redactObject(obj, visited = new WeakSet(), depth = 0) {
156
+ // Check recursion depth limit to prevent stack overflow
157
+ if (depth >= this.MAX_REDACT_OBJECT_DEPTH) {
158
+ return { '[Max Depth Exceeded]': '[Max Depth Exceeded]' };
159
+ }
160
+ const redacted = {};
161
+ for (const [key, value] of Object.entries(obj)) {
162
+ // Check if this field should be completely redacted
163
+ if (this.isSensitiveField(key)) {
164
+ redacted[key] = this.config.redactionText;
165
+ }
166
+ // Check if this field should be truncated (for large content)
167
+ else if (this.isContentField(key) && typeof value === 'string') {
168
+ redacted[key] = this.truncateContent(value);
169
+ }
170
+ // Recursively process nested objects/arrays if deep redaction is enabled
171
+ else if (this.config.deepRedaction && (typeof value === 'object' && value !== null)) {
172
+ redacted[key] = this.processValue(value, visited, depth + 1);
173
+ }
174
+ // Keep the value unchanged
175
+ else {
176
+ redacted[key] = value;
177
+ }
178
+ }
179
+ return redacted;
180
+ }
181
+ /**
182
+ * Check if a field name indicates sensitive information
183
+ * Uses case-insensitive matching with exact and partial matches
184
+ * Includes smart filtering to avoid false positives and custom patterns
185
+ * @param fieldName - Field name to check
186
+ * @returns true if field should be redacted, false otherwise
187
+ */
188
+ static isSensitiveField(fieldName) {
189
+ const lowerField = fieldName.toLowerCase();
190
+ // Check custom regex patterns first (highest priority)
191
+ if (this.config.customPatterns && this.config.customPatterns.length > 0) {
192
+ for (const pattern of this.config.customPatterns) {
193
+ if (pattern.test(fieldName)) {
194
+ return true;
195
+ }
196
+ }
197
+ }
198
+ return this.config.sensitiveFields.some(sensitive => {
199
+ const lowerSensitive = sensitive.toLowerCase();
200
+ // Exact match (highest confidence)
201
+ if (lowerField === lowerSensitive) {
202
+ return true;
203
+ }
204
+ // Field ends with sensitive term (e.g., "userPassword" ends with "password")
205
+ if (lowerField.endsWith(lowerSensitive)) {
206
+ return true;
207
+ }
208
+ // Field starts with sensitive term (e.g., "passwordHash" starts with "password")
209
+ if (lowerField.startsWith(lowerSensitive)) {
210
+ return true;
211
+ }
212
+ // Whitelist of short sensitive terms that should always trigger substring matching
213
+ const shortSensitiveWhitelist = ['pin', 'cvv', 'cvc', 'ssn', 'pwd', 'key', 'jwt', 'dob', 'pii', 'auth', 'csrf'];
214
+ // Field contains sensitive term - either from whitelist or length >= 5 to avoid false positives
215
+ if ((shortSensitiveWhitelist.includes(lowerSensitive) || lowerSensitive.length >= 5) &&
216
+ lowerField.includes(lowerSensitive)) {
217
+ return true;
218
+ }
219
+ // Handle compound words with underscores or camelCase
220
+ if (lowerField.includes('_' + lowerSensitive) || lowerField.includes(lowerSensitive + '_')) {
221
+ return true;
222
+ }
223
+ return false;
224
+ });
225
+ }
226
+ /**
227
+ * Check if a field name indicates content that should be truncated
228
+ * Uses exact case-insensitive matching for content fields
229
+ * @param fieldName - Field name to check
230
+ * @returns true if field is a content field, false otherwise
231
+ */
232
+ static isContentField(fieldName) {
233
+ const lowerField = fieldName.toLowerCase();
234
+ return this.config.contentFields.some(content => content.toLowerCase() === lowerField);
235
+ }
236
+ /**
237
+ * Truncate content that exceeds the maximum length
238
+ * Preserves readability while preventing log bloat
239
+ * @param content - Content string to potentially truncate
240
+ * @returns Original content or truncated version with indicator
241
+ */
242
+ static truncateContent(content) {
243
+ if (content.length <= this.config.maxContentLength) {
244
+ return content;
245
+ }
246
+ return content.substring(0, this.config.maxContentLength) + this.config.truncationText;
247
+ }
248
+ }
249
+ exports.DataRedactor = DataRedactor;
250
+ DataRedactor.config = {
251
+ ...config_1.defaultRedactionConfig,
252
+ ...config_1.RedactionController.getEnvironmentConfig()
253
+ };
254
+ // Maximum recursion depth to prevent stack overflow attacks
255
+ DataRedactor.MAX_RECURSION_DEPTH = 100;
256
+ // Slightly lower limit for redactObject to ensure it can be reached
257
+ DataRedactor.MAX_REDACT_OBJECT_DEPTH = 99;
@@ -61,4 +61,168 @@ export interface LoggerConfig {
61
61
  /** Optional environment identifier for context (e.g., 'production', 'staging') */
62
62
  environment?: string;
63
63
  }
64
+ /**
65
+ * Configuration options for automatic data redaction
66
+ * Controls how sensitive information is processed in log messages
67
+ */
68
+ export interface RedactionConfig {
69
+ /** Whether redaction is enabled globally */
70
+ enabled: boolean;
71
+ /** List of field names that should be redacted (case-insensitive partial matching) */
72
+ sensitiveFields: string[];
73
+ /** List of field names that should be truncated if they exceed maxContentLength */
74
+ contentFields: string[];
75
+ /** Maximum length for content fields before truncation occurs */
76
+ maxContentLength: number;
77
+ /** Text to replace sensitive field values with */
78
+ redactionText: string;
79
+ /** Text to append when content is truncated */
80
+ truncationText: string;
81
+ /** Whether to recursively scan nested objects and arrays */
82
+ deepRedaction: boolean;
83
+ /** Optional custom regex patterns for advanced field detection */
84
+ customPatterns?: RegExp[];
85
+ }
86
+ /**
87
+ * Interface for the LogEngine singleton object
88
+ * Provides all logging methods with comprehensive TypeScript support
89
+ */
90
+ export interface ILogEngine {
91
+ /** Configure the logger with new settings */
92
+ configure(config: Partial<LoggerConfig>): void;
93
+ /** Log a debug message with automatic data redaction */
94
+ debug(message: string, data?: any): void;
95
+ /** Log an info message with automatic data redaction */
96
+ info(message: string, data?: any): void;
97
+ /** Log a warn message with automatic data redaction */
98
+ warn(message: string, data?: any): void;
99
+ /** Log an error message with automatic data redaction */
100
+ error(message: string, data?: any): void;
101
+ /** Log a message with automatic data redaction */
102
+ log(message: string, data?: any): void;
103
+ /** Log a debug message without redaction */
104
+ debugRaw(message: string, data?: any): void;
105
+ /** Log an info message without redaction */
106
+ infoRaw(message: string, data?: any): void;
107
+ /** Log a warn message without redaction */
108
+ warnRaw(message: string, data?: any): void;
109
+ /** Log an error message without redaction */
110
+ errorRaw(message: string, data?: any): void;
111
+ /** Log a message without redaction */
112
+ logRaw(message: string, data?: any): void;
113
+ /** Configure redaction settings */
114
+ configureRedaction(config: Partial<RedactionConfig>): void;
115
+ /** Reset redaction configuration to defaults */
116
+ resetRedactionConfig(): void;
117
+ /** Refresh redaction configuration from environment variables */
118
+ refreshRedactionConfig(): void;
119
+ /** Get current redaction configuration */
120
+ getRedactionConfig(): RedactionConfig;
121
+ /** Add custom regex patterns for advanced field detection */
122
+ addCustomRedactionPatterns(patterns: RegExp[]): void;
123
+ /** Clear all custom redaction patterns */
124
+ clearCustomRedactionPatterns(): void;
125
+ /** Add custom sensitive field names to the existing list */
126
+ addSensitiveFields(fields: string[]): void;
127
+ /** Test if a field name would be redacted with current configuration */
128
+ testFieldRedaction(fieldName: string): boolean;
129
+ /** Temporarily disable redaction for a specific logging call */
130
+ withoutRedaction(): ILogEngineWithoutRedaction;
131
+ }
132
+ /**
133
+ * Interface for LogEngine methods without redaction
134
+ * Returned by withoutRedaction() method
135
+ */
136
+ export interface ILogEngineWithoutRedaction {
137
+ /** Log a debug message without redaction */
138
+ debug(message: string, data?: any): void;
139
+ /** Log an info message without redaction */
140
+ info(message: string, data?: any): void;
141
+ /** Log a warn message without redaction */
142
+ warn(message: string, data?: any): void;
143
+ /** Log an error message without redaction */
144
+ error(message: string, data?: any): void;
145
+ /** Log a message without redaction */
146
+ log(message: string, data?: any): void;
147
+ }
148
+ /**
149
+ * Interface for the DataRedactor static class methods
150
+ * Provides type safety for all redaction operations
151
+ */
152
+ export interface IDataRedactor {
153
+ /** Update redaction configuration */
154
+ updateConfig(newConfig: Partial<RedactionConfig>): void;
155
+ /** Get current redaction configuration */
156
+ getConfig(): RedactionConfig;
157
+ /** Refresh configuration from environment variables */
158
+ refreshConfig(): void;
159
+ /** Add custom regex patterns for field detection */
160
+ addCustomPatterns(patterns: RegExp[]): void;
161
+ /** Clear all custom regex patterns */
162
+ clearCustomPatterns(): void;
163
+ /** Add sensitive field names to the existing list */
164
+ addSensitiveFields(fields: string[]): void;
165
+ /** Test if a field name would be redacted */
166
+ testFieldRedaction(fieldName: string): boolean;
167
+ /** Redact sensitive data from any value */
168
+ redactData(data: any): any;
169
+ }
170
+ /**
171
+ * Interface for the RedactionController methods
172
+ * Provides environment-based configuration management
173
+ */
174
+ export interface IRedactionController {
175
+ /** Load configuration from environment variables */
176
+ loadFromEnvironment(): RedactionConfig;
177
+ /** Reset configuration to default values */
178
+ resetToDefaults(): RedactionConfig;
179
+ /** Get currently active configuration */
180
+ getCurrentConfig(): RedactionConfig;
181
+ }
182
+ /**
183
+ * Options for configuring redaction behavior
184
+ * Used for advanced redaction scenarios
185
+ */
186
+ export interface RedactionOptions {
187
+ /** Whether to enable deep scanning of nested objects */
188
+ deep?: boolean;
189
+ /** Custom patterns to use for this operation */
190
+ customPatterns?: RegExp[];
191
+ /** Additional sensitive fields for this operation */
192
+ additionalSensitiveFields?: string[];
193
+ /** Override default redaction text */
194
+ redactionText?: string;
195
+ }
196
+ /**
197
+ * Result type for field redaction testing
198
+ * Provides detailed information about redaction decisions
199
+ */
200
+ export interface FieldRedactionResult {
201
+ /** Whether the field would be redacted */
202
+ wouldRedact: boolean;
203
+ /** Reason for the redaction decision */
204
+ reason: 'sensitive_field' | 'custom_pattern' | 'not_sensitive';
205
+ /** Pattern that matched (if applicable) */
206
+ matchedPattern?: RegExp;
207
+ }
208
+ /**
209
+ * Environment variable configuration mapping
210
+ * Documents all supported environment variables
211
+ */
212
+ export interface EnvironmentConfig {
213
+ /** LOG_REDACTION_DISABLED - Disable all redaction */
214
+ LOG_REDACTION_DISABLED?: string;
215
+ /** LOG_REDACTION_TEXT - Custom redaction text */
216
+ LOG_REDACTION_TEXT?: string;
217
+ /** LOG_REDACTION_SENSITIVE_FIELDS - Comma-separated sensitive field names */
218
+ LOG_REDACTION_SENSITIVE_FIELDS?: string;
219
+ /** LOG_REDACTION_CONTENT_FIELDS - Comma-separated content field names */
220
+ LOG_REDACTION_CONTENT_FIELDS?: string;
221
+ /** LOG_REDACTION_MAX_CONTENT_LENGTH - Maximum length for content fields */
222
+ LOG_REDACTION_MAX_CONTENT_LENGTH?: string;
223
+ /** LOG_REDACTION_TRUNCATION_TEXT - Text for truncated content */
224
+ LOG_REDACTION_TRUNCATION_TEXT?: string;
225
+ /** LOG_REDACTION_DEEP - Enable deep redaction */
226
+ LOG_REDACTION_DEEP?: string;
227
+ }
64
228
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,QAAQ;IAChB,qFAAqF;IACrF,KAAK,IAAI;IACT,2DAA2D;IAC3D,IAAI,IAAI;IACR,kEAAkE;IAClE,IAAI,IAAI;IACR,sEAAsE;IACtE,KAAK,IAAI;IACT,kGAAkG;IAClG,GAAG,KAAK;CACX;AAED;;;GAGG;AACH,oBAAY,OAAO;IACf,kEAAkE;IAClE,KAAK,IAAI;IACT,uDAAuD;IACvD,IAAI,IAAI;IACR,gDAAgD;IAChD,IAAI,IAAI;IACR,0CAA0C;IAC1C,KAAK,IAAI;IACT,8CAA8C;IAC9C,MAAM,IAAI;IACV,kDAAkD;IAClD,GAAG,IAAI;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,qCAAqC;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,QAAQ,CAAC;IAChB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;0EACsE;IACtE,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,QAAQ;IAChB,qFAAqF;IACrF,KAAK,IAAI;IACT,2DAA2D;IAC3D,IAAI,IAAI;IACR,kEAAkE;IAClE,IAAI,IAAI;IACR,sEAAsE;IACtE,KAAK,IAAI;IACT,kGAAkG;IAClG,GAAG,KAAK;CACX;AAED;;;GAGG;AACH,oBAAY,OAAO;IACf,kEAAkE;IAClE,KAAK,IAAI;IACT,uDAAuD;IACvD,IAAI,IAAI;IACR,gDAAgD;IAChD,IAAI,IAAI;IACR,0CAA0C;IAC1C,KAAK,IAAI;IACT,8CAA8C;IAC9C,MAAM,IAAI;IACV,kDAAkD;IAClD,GAAG,IAAI;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,qCAAqC;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,QAAQ,CAAC;IAChB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;0EACsE;IACtE,KA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EAAE,MAAM,EAAE,CAAC;IACrC,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC,0CAA0C;IAC1C,WAAW,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,eAAe,CAAC;IAC/D,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,qDAAqD;IACrD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,2EAA2E;IAC3E,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,iEAAiE;IACjE,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B"}
package/package.json CHANGED
@@ -1,14 +1,21 @@
1
1
  {
2
2
  "name": "@wgtechlabs/log-engine",
3
- "version": "1.2.0",
4
- "description": "A lightweight and efficient logging utility designed specifically for bot applications running on Node.js.",
3
+ "version": "1.3.0",
4
+ "description": "A lightweight, security-first logging utility with automatic data redaction for Node.js applications - the first logging library with built-in PII protection.",
5
5
  "keywords": [
6
6
  "logging",
7
+ "security",
8
+ "redaction",
9
+ "pii-protection",
10
+ "data-redaction",
11
+ "typescript",
12
+ "nodejs",
7
13
  "bot",
8
14
  "discord",
9
15
  "telegram",
10
- "nodejs",
11
- "typescript"
16
+ "privacy",
17
+ "gdpr",
18
+ "compliance"
12
19
  ],
13
20
  "license": "AGPL-3.0",
14
21
  "author": "WG Tech Labs <opensource@wgtechlabs.com> (https://wgtechlabs.com)",