@maestro-js/log 1.0.0-alpha.23 → 1.0.0-alpha.3

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 (2) hide show
  1. package/dist/index.d.ts +11 -12
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -87,11 +87,10 @@ declare function StubTransport<LogMessageData extends any[] = any[]>(options?: {
87
87
 
88
88
  declare function withRedactions<T extends LogTransport<D>, D extends any[] = any[]>(transport: T, options: WithRedactionsOptions): T;
89
89
 
90
- type LogWithRedactionsOptions = WithRedactionsOptions;
91
90
  /**
92
91
  * Creates a new logger. By default loggers have no transports
93
92
  */
94
- declare function create<LoggerMessageData extends any[] = any[]>(config?: Log.Config<LoggerMessageData>): Log.Logger<LoggerMessageData>;
93
+ declare function create<LoggerMessageData extends any[] = any>(config?: Log.Config<LoggerMessageData>): Log.Logger<LoggerMessageData>;
95
94
  /**
96
95
  * Monkey patches the default console methods with methods
97
96
  * from the supplied logger. Returns a function that restores
@@ -137,7 +136,7 @@ declare function overrideNodeJsConsole(logger: LogFunctions): () => void;
137
136
  */
138
137
  declare namespace Log {
139
138
  /** Configuration options passed to {@link Log.create}. */
140
- interface Config<LoggerMessageData extends any[] = any[]> {
139
+ interface Config<LoggerMessageData extends any[] = any> {
141
140
  transports?: Log.Transport<LoggerMessageData>[];
142
141
  }
143
142
  /**
@@ -201,7 +200,7 @@ declare namespace Log {
201
200
  /** Destination that receives {@link Log.Message messages} from a logger. */
202
201
  type Transport<LogMessageData extends any[] = any[]> = LogTransport<LogMessageData>;
203
202
  /** Options for {@link Log.withRedactions}. */
204
- type WithRedactionsOptions = LogWithRedactionsOptions;
203
+ type WithRedactionsOptions = WithRedactionsOptions;
205
204
  }
206
205
  /**
207
206
  * Structured logging with pluggable transports.
@@ -210,14 +209,14 @@ declare namespace Log {
210
209
  declare const Log: {
211
210
  create: typeof create;
212
211
  overrideNodeJsConsole: typeof overrideNodeJsConsole;
213
- write: (message: Omit<LogMessage<any[]>, "channel">) => void;
214
- info: (...data: any[]) => void;
215
- warn: (...data: any[]) => void;
216
- error: (...data: any[]) => void;
217
- emergency: (...data: any[]) => void;
218
- addTransport: (...transport: Log.Transport<any[]>[]) => void;
219
- removeTransport: (...transport: Log.Transport<any[]>[]) => void;
220
- channel: <ChannelMessageData extends any[] = any[]>(channel: LogChannel) => Log.LogFunctions<ChannelMessageData>;
212
+ write: (message: Omit<LogMessage<any>, "channel">) => void;
213
+ info: (...data: any) => void;
214
+ warn: (...data: any) => void;
215
+ error: (...data: any) => void;
216
+ emergency: (...data: any) => void;
217
+ addTransport: (...transport: Log.Transport<any>[]) => void;
218
+ removeTransport: (...transport: Log.Transport<any>[]) => void;
219
+ channel: <ChannelMessageData extends any = any>(channel: LogChannel) => Log.LogFunctions<ChannelMessageData>;
221
220
  withRedactions: typeof withRedactions;
222
221
  commonSensitiveKeys: readonly ["password", "secret", "token", "accessToken", "refreshToken", "apiKey", "apiSecret", "authorization", "cookie", "creditCard", "ssn", "socialSecurityNumber"];
223
222
  transports: {
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "@sentry/types": "^8.30.0",
17
17
  "@types/node": "^22.19.11"
18
18
  },
19
- "version": "1.0.0-alpha.23",
19
+ "version": "1.0.0-alpha.3",
20
20
  "publishConfig": {
21
21
  "access": "restricted"
22
22
  },