@adviser/cement 0.2.35 → 0.2.37

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@ import {
17
17
  LevelHandler,
18
18
  LogFormatter,
19
19
  LogValueArg,
20
+ HttpType,
20
21
  } from "./logger.js";
21
22
  import { WebSysAbstraction } from "./web/web-sys-abstraction.js";
22
23
  import { SysAbstraction } from "./sys-abstraction.js";
@@ -265,24 +266,39 @@ export class LoggerImpl implements Logger {
265
266
  }
266
267
  return this;
267
268
  }
268
- Bool(key: string, value: unknown): Logger {
269
- this._attributes[key] = logValue(!!value);
269
+ Bool(key: string | Record<string, unknown>, value: unknown): Logger {
270
+ this.coerceKey(key, !!value);
271
+ // this._attributes[key] = logValue(!!value);
270
272
  return this;
271
273
  }
272
274
 
273
- Http(res: Response | Result<Response>, req?: Request, key?: string): Logger {
274
- if (Result.Is(res)) {
275
- if (res.isErr()) {
276
- this.Err(res.Err());
277
- return this;
278
- }
279
- res = res.Ok();
275
+ Http(...mix: (HttpType | string)[]): Logger {
276
+ const key: string | undefined = mix.find((x) => typeof x === "string");
277
+ mix = mix.filter((x) => typeof x !== "string");
278
+ const resErrors = mix.filter((x) => Result.Is(x) && x.isErr()) as Result<unknown, Error>[];
279
+ if (resErrors.length) {
280
+ this.Err(resErrors.map((x) => x.Err().message).join("\n"));
281
+ return this;
282
+ }
283
+ const req = mix
284
+ .map((reqOrResult) => (Result.Is(reqOrResult) ? reqOrResult.Ok() : reqOrResult))
285
+ .find((req) => typeof (req as Response).status !== "number") as Request | undefined;
286
+ const res = mix
287
+ .map((resOrResult) => (Result.Is(resOrResult) ? resOrResult.Ok() : resOrResult))
288
+ .find((res) => typeof (res as Response).status === "number") as Response | undefined;
289
+ let reqAndOrres: { res: Response; req: Request } | Response | Request | undefined;
290
+ if (res && req) {
291
+ reqAndOrres = { res, req };
292
+ } else if (!res && !req) {
293
+ reqAndOrres = undefined;
294
+ } else if (res) {
295
+ reqAndOrres = res;
296
+ } else if (req) {
297
+ reqAndOrres = req;
280
298
  }
281
- let reqRes: Response | { res: Response; req: Request } = res;
282
- if (req) {
283
- reqRes = { res, req };
299
+ if (reqAndOrres) {
300
+ this.Any(key || "Http", reqAndOrres as unknown as LogSerializable);
284
301
  }
285
- this.Any(key || "Http", reqRes as unknown as LogSerializable);
286
302
  return this;
287
303
  }
288
304
  Pair(x: Record<string, unknown>): Logger {
@@ -325,13 +341,22 @@ export class LoggerImpl implements Logger {
325
341
  return this;
326
342
  }
327
343
 
328
- Str(key: string, value?: string): Logger {
329
- this._attributes[key] = logValue(value);
344
+ private coerceKey(key: string | Record<string, unknown>, value?: unknown): void {
345
+ if (typeof key === "string") {
346
+ this._attributes[key] = logValue(value as LogValueArg);
347
+ } else {
348
+ this.Pair(key);
349
+ }
350
+ }
351
+
352
+ Str(key: string | Record<string, string>, value?: string): Logger {
353
+ this.coerceKey(key, value);
330
354
  return this;
331
355
  }
332
356
 
333
- Any(key: string, value?: string | number | boolean | LogSerializable): Logger {
334
- this._attributes[key] = logValue(value as LogValueArg);
357
+ Any(key: string | Record<string, unknown>, value?: unknown): Logger {
358
+ this.coerceKey(key, value);
359
+ //this._attributes[coerceKey(key)] = logValue(value as LogValueArg);
335
360
  return this;
336
361
  }
337
362
  Dur(key: string, nsec: number): Logger {
@@ -339,11 +364,12 @@ export class LoggerImpl implements Logger {
339
364
  // new Intl.DurationFormat("en", { style: "narrow" }).format(nsec);
340
365
  return this;
341
366
  }
342
- Uint64(key: string, value: number): Logger {
343
- this._attributes[key] = logValue(value);
367
+ Uint64(key: string | Record<string, number>, value?: number): Logger {
368
+ this.coerceKey(key, value);
369
+ //this._attributes[coerceKey(key)] = logValue(value);
344
370
  return this;
345
371
  }
346
- Int(key: string, value: number): Logger {
372
+ Int(key: string | Record<string, number>, value?: number): Logger {
347
373
  return this.Uint64(key, value);
348
374
  }
349
375
 
@@ -453,8 +479,8 @@ class WithLoggerBuilder implements WithLogger {
453
479
  return this;
454
480
  }
455
481
 
456
- Http(res: Response | Result<Response>, req?: Request, key?: string): WithLogger {
457
- this._li.Http(res, req, key);
482
+ Http(...mix: (HttpType | string)[]): WithLogger {
483
+ this._li.Http(...mix);
458
484
  return this;
459
485
  }
460
486
  Pair(x: Record<string, unknown>): WithLogger {
@@ -462,7 +488,7 @@ class WithLoggerBuilder implements WithLogger {
462
488
  return this;
463
489
  }
464
490
 
465
- Str(key: string, value?: string): WithLogger {
491
+ Str(key: string | Record<string, string>, value?: string): WithLogger {
466
492
  this._li.Str(key, value);
467
493
  return this;
468
494
  }
@@ -481,7 +507,7 @@ class WithLoggerBuilder implements WithLogger {
481
507
  this._li.Ref(key, action);
482
508
  return this;
483
509
  }
484
- Bool(key: string, value: unknown): WithLogger {
510
+ Bool(key: string | Record<string, unknown>, value?: unknown): WithLogger {
485
511
  this._li.Bool(key, value);
486
512
  return this;
487
513
  }
@@ -493,7 +519,7 @@ class WithLoggerBuilder implements WithLogger {
493
519
  this._li.Url(url, key);
494
520
  return this;
495
521
  }
496
- Int(key: string, value: number): WithLogger {
522
+ Int(key: string | Record<string, number>, value?: number): WithLogger {
497
523
  this._li.Int(key, value);
498
524
  return this;
499
525
  }
@@ -532,7 +558,7 @@ class WithLoggerBuilder implements WithLogger {
532
558
  this._li.Timestamp();
533
559
  return this;
534
560
  }
535
- Any(key: string, value: LogSerializable): WithLogger {
561
+ Any(key: string | Record<string, unknown>, value?: unknown | LogSerializable): WithLogger {
536
562
  this._li.Any(key, value);
537
563
  return this;
538
564
  }
@@ -540,7 +566,7 @@ class WithLoggerBuilder implements WithLogger {
540
566
  this._li.Dur(key, nsec);
541
567
  return this;
542
568
  }
543
- Uint64(key: string, value: number): WithLogger {
569
+ Uint64(key: string | Record<string, number>, value?: number): WithLogger {
544
570
  this._li.Uint64(key, value);
545
571
  return this;
546
572
  }
package/src/logger.ts CHANGED
@@ -153,6 +153,8 @@ export interface LevelHandler {
153
153
  isEnabled(ilevel: unknown, module: unknown): boolean;
154
154
  }
155
155
 
156
+ export type HttpType = Response | Result<Response> | Request | Result<Request>;
157
+
156
158
  export interface LoggerInterface<R> {
157
159
  TxtEnDe(): TxtEnDecoder;
158
160
  Module(key: string): R;
@@ -175,9 +177,16 @@ export interface LoggerInterface<R> {
175
177
 
176
178
  Hash(value: unknown, key?: string): R;
177
179
 
178
- Str(key: string, value?: string): R;
180
+ Str<T extends string | Record<string, string>>(key: T, value?: T extends string ? string : undefined): R;
181
+ Uint64<T extends string | Record<string, number>>(key: T, value?: T extends string ? number : undefined): R;
182
+ Int<T extends string | Record<string, number>>(key: T, value?: T extends string ? number : undefined): R;
183
+ Bool<T extends string | Record<string, unknown>>(key: T, value?: T extends string ? unknown : undefined): R;
184
+ Any<T extends string | Record<string, unknown>>(key: T, value?: T extends string ? unknown : undefined): R;
179
185
 
180
- Http(res: Response | Result<Response>, req?: Request, key?: string): R;
186
+ // first string is the key
187
+ // first response is Response
188
+ // first request is Request
189
+ Http(...mix: (HttpType | string)[]): R;
181
190
  Pair(x: Record<string, unknown>): R;
182
191
 
183
192
  Error(): R;
@@ -189,11 +198,7 @@ export interface LoggerInterface<R> {
189
198
  Err(err: unknown | Result<unknown> | Error): R; // could be Error, or something which coerces to string
190
199
  Info(): R;
191
200
  Timestamp(): R;
192
- Any(key: string, value: unknown): R;
193
201
  Dur(key: string, nsec: number): R;
194
- Uint64(key: string, value: number): R;
195
- Int(key: string, value: number): R;
196
- Bool(key: string, value: unknown): R;
197
202
  }
198
203
 
199
204
  export function IsLogger(obj: unknown): obj is Logger {
package/src/uri.ts CHANGED
@@ -3,6 +3,38 @@ import { StripCommand, stripper } from "./utils/stripper.js";
3
3
 
4
4
  type NullOrUndef = null | undefined;
5
5
 
6
+ type OneKey<K extends string, V = string> = Record<K, V>;
7
+
8
+ export interface URIInterface<R extends URIInterface<R>> {
9
+ // readonly hostname: string;
10
+ // readonly port: string;
11
+ // readonly host: string;
12
+ // readonly protocol: string;
13
+ // readonly pathname: string;
14
+ readonly getParams: Iterable<[string, string]>;
15
+
16
+ hasParam(key: string): boolean;
17
+ getParam<T extends string | undefined>(key: string | OneKey<string>, def?: T): T extends string ? string : string | undefined;
18
+ getParamResult(key: string, msgFn?: (key: string) => string): Result<string>;
19
+ getParamsResult(...keys: keysParam): Result<Record<string, string>>;
20
+ clone(): R;
21
+ asURL(): URL;
22
+ toString(): string;
23
+ toJSON(): string;
24
+ asObj(...strips: StripCommand[]): Partial<HostURIObject | PathURIObject>;
25
+ }
26
+
27
+ function coerceKey(key: string | OneKey<string>, def?: string): { key: string; def?: string } {
28
+ if (typeof key === "object") {
29
+ const keys = Object.keys(key);
30
+ if (keys.length !== 1) {
31
+ throw new Error(`Invalid key: ${JSON.stringify(key)}`);
32
+ }
33
+ return { key: keys[0], def: key[keys[0]] };
34
+ }
35
+ return { key, def: def };
36
+ }
37
+
6
38
  export interface URIObject {
7
39
  readonly style: "host" | "path";
8
40
  readonly protocol: string;
@@ -205,13 +237,26 @@ function getParamResult(
205
237
  return Result.Ok(val);
206
238
  }
207
239
 
208
- type keysParam = (string | ((...keys: string[]) => string))[];
240
+ type msgFn = (...keys: string[]) => string;
241
+ // if right head of Record is string the key used and the value is the default value
242
+ type keysParam = (string | msgFn | Record<string, unknown>)[];
209
243
 
210
244
  function getParamsResult(
211
245
  keys: keysParam,
212
246
  getParam: { getParam: (key: string) => string | undefined },
213
247
  ): Result<Record<string, string>> {
214
- const keyStrs = keys.flat().filter((k) => typeof k === "string");
248
+ const keyDef = keys.flat().reduce(
249
+ (acc, i) => {
250
+ if (typeof i === "string") {
251
+ acc.push({ key: i });
252
+ } else if (typeof i === "object") {
253
+ acc.push(...Object.keys(i).map((k) => ({ key: k, def: typeof i[k] === "string" ? i[k] : undefined })));
254
+ }
255
+ return acc;
256
+ },
257
+ [] as { key: string; def?: string }[],
258
+ );
259
+ //.filter((k) => typeof k === "string");
215
260
  const msgFn =
216
261
  keys.find((k) => typeof k === "function") ||
217
262
  ((...keys: string[]): string => {
@@ -220,12 +265,16 @@ function getParamsResult(
220
265
  });
221
266
  const errors: string[] = [];
222
267
  const result: Record<string, string> = {};
223
- for (const key of keyStrs) {
224
- const val = getParam.getParam(key);
268
+ for (const kd of keyDef) {
269
+ const val = getParam.getParam(kd.key);
225
270
  if (val === undefined) {
226
- errors.push(key);
271
+ if (typeof kd.def === "string") {
272
+ result[kd.key] = kd.def;
273
+ } else {
274
+ errors.push(kd.key);
275
+ }
227
276
  } else {
228
- result[key] = val;
277
+ result[kd.key] = val;
229
278
  }
230
279
  }
231
280
  if (errors.length) {
@@ -234,7 +283,7 @@ function getParamsResult(
234
283
  return Result.Ok(result);
235
284
  }
236
285
 
237
- export class BuildURI {
286
+ export class BuildURI implements URIInterface<BuildURI> {
238
287
  _url: MutableURL; // pathname needs this
239
288
  private constructor(url: MutableURL) {
240
289
  this._url = url;
@@ -359,10 +408,15 @@ export class BuildURI {
359
408
  return this._url.searchParams.has(key);
360
409
  }
361
410
 
362
- getParam<T extends string | undefined>(key: string, def?: T): T extends string ? string : string | undefined {
363
- let val = this._url.searchParams.get(key);
364
- if (!falsy2undef(val) && def) {
365
- val = def;
411
+ get getParams(): Iterable<[string, string]> {
412
+ return this._url.searchParams.entries();
413
+ }
414
+
415
+ getParam<T extends string | undefined>(key: string | OneKey<string>, def?: T): T extends string ? string : string | undefined {
416
+ const { key: k, def: d } = coerceKey(key, def);
417
+ let val = this._url.searchParams.get(k);
418
+ if (!falsy2undef(val) && d) {
419
+ val = d;
366
420
  }
367
421
  return falsy2undef(val) as T extends string ? string : string | undefined;
368
422
  }
@@ -391,6 +445,10 @@ export class BuildURI {
391
445
  return this.URI().asObj(...strips);
392
446
  }
393
447
 
448
+ clone(): BuildURI {
449
+ return BuildURI.from(this.toString());
450
+ }
451
+
394
452
  URI(): URI {
395
453
  return URI.from(this._url);
396
454
  }
@@ -401,7 +459,7 @@ export type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef
401
459
  export const hasHostPartProtocols: Set<string> = new Set<string>(["http", "https", "ws", "wss"]);
402
460
 
403
461
  // non mutable URL Implementation
404
- export class URI {
462
+ export class URI implements URIInterface<URI> {
405
463
  static protocolHasHostpart(protocol: string): () => void {
406
464
  protocol = protocol.replace(/:$/, "");
407
465
  hasHostPartProtocols.add(protocol);
@@ -506,10 +564,11 @@ export class URI {
506
564
  return this._url.searchParams.has(key);
507
565
  }
508
566
 
509
- getParam<T extends string | undefined>(key: string, def?: T): T extends string ? string : string | undefined {
510
- let val = this._url.searchParams.get(key);
511
- if (!falsy2undef(val) && def) {
512
- val = def;
567
+ getParam<T extends string | undefined>(key: string | OneKey<string>, def?: T): T extends string ? string : string | undefined {
568
+ const { key: k, def: d } = coerceKey(key, def);
569
+ let val = this._url.searchParams.get(k);
570
+ if (!falsy2undef(val) && d) {
571
+ val = d;
513
572
  }
514
573
  return falsy2undef(val) as T extends string ? string : string | undefined;
515
574
  }
@@ -24,11 +24,11 @@ export class ConsoleWriterStreamDefaultWriter implements WritableStreamDefaultWr
24
24
  this.closed = Promise.resolve(undefined);
25
25
  }
26
26
  async write(chunk?: Uint8Array | undefined): Promise<void> {
27
- const str = this.decoder.decode(chunk).trimEnd();
27
+ let strObj: string | { level: string } = this.decoder.decode(chunk).trimEnd();
28
28
  let output = "log";
29
29
  try {
30
- const decode = JSON.parse(str);
31
- output = decode.level;
30
+ strObj = JSON.parse(strObj) as { level: string };
31
+ output = strObj.level;
32
32
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
33
  } catch (e) {
34
34
  /* noop */
@@ -36,15 +36,15 @@ export class ConsoleWriterStreamDefaultWriter implements WritableStreamDefaultWr
36
36
  switch (output) {
37
37
  case "error":
38
38
  // eslint-disable-next-line no-console
39
- console.error(str);
39
+ console.error(strObj);
40
40
  break;
41
41
  case "warn":
42
42
  // eslint-disable-next-line no-console
43
- console.warn(str);
43
+ console.warn(strObj);
44
44
  break;
45
45
  default:
46
46
  // eslint-disable-next-line no-console
47
- console.log(str);
47
+ console.log(strObj);
48
48
  }
49
49
  }
50
50
  }
@@ -1,4 +1,4 @@
1
- import { AsError, FnSerialized, LogSerializable, Level, Logger, WithLogger, LevelHandler, LogFormatter } from "./logger.js";
1
+ import { AsError, FnSerialized, LogSerializable, Level, Logger, WithLogger, LevelHandler, LogFormatter, HttpType } from "./logger.js";
2
2
  import { SysAbstraction } from "./sys-abstraction.js";
3
3
  import { Result } from "./result.js";
4
4
  import { CoerceURI } from "./uri.js";
@@ -53,18 +53,19 @@ export declare class LoggerImpl implements Logger {
53
53
  Ref(key: string, action: {
54
54
  toString: () => string;
55
55
  } | FnSerialized): Logger;
56
- Bool(key: string, value: unknown): Logger;
57
- Http(res: Response | Result<Response>, req?: Request, key?: string): Logger;
56
+ Bool(key: string | Record<string, unknown>, value: unknown): Logger;
57
+ Http(...mix: (HttpType | string)[]): Logger;
58
58
  Pair(x: Record<string, unknown>): Logger;
59
59
  Result<T>(key: string, res: Result<T, Error>): Logger;
60
60
  Len(value: unknown, key?: string): Logger;
61
61
  Hash(value: unknown, key?: string): Logger;
62
62
  Url(url: CoerceURI, key?: string): Logger;
63
- Str(key: string, value?: string): Logger;
64
- Any(key: string, value?: string | number | boolean | LogSerializable): Logger;
63
+ private coerceKey;
64
+ Str(key: string | Record<string, string>, value?: string): Logger;
65
+ Any(key: string | Record<string, unknown>, value?: unknown): Logger;
65
66
  Dur(key: string, nsec: number): Logger;
66
- Uint64(key: string, value: number): Logger;
67
- Int(key: string, value: number): Logger;
67
+ Uint64(key: string | Record<string, number>, value?: number): Logger;
68
+ Int(key: string | Record<string, number>, value?: number): Logger;
68
69
  Flush(): Promise<void>;
69
70
  With(): WithLogger;
70
71
  _resetAttributes(fn: () => () => Uint8Array): () => Uint8Array;
@@ -1 +1 @@
1
- {"version":3,"file":"logger-impl.d.ts","sourceRoot":"","sources":["../../src/logger-impl.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,eAAe,EACf,KAAK,EACL,MAAM,EAGN,UAAU,EAMV,YAAY,EACZ,YAAY,EAEb,MAAM,aAAa,CAAC;AAErB,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EAAE,MAAM,GAAG,MAAM;IAI3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,IAAI,IAAI,UAAU;IAgBlB,gBAAgB,CAAC,EAAE,EAAE,MAAM,MAAM,UAAU,GAAG,MAAM,UAAU;IAU9D,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO;CAyBhC"}
package/ts/logger-impl.js CHANGED
@@ -214,22 +214,39 @@ export class LoggerImpl {
214
214
  return this;
215
215
  }
216
216
  Bool(key, value) {
217
- this._attributes[key] = logValue(!!value);
217
+ this.coerceKey(key, !!value);
218
218
  return this;
219
219
  }
220
- Http(res, req, key) {
221
- if (Result.Is(res)) {
222
- if (res.isErr()) {
223
- this.Err(res.Err());
224
- return this;
225
- }
226
- res = res.Ok();
220
+ Http(...mix) {
221
+ const key = mix.find((x) => typeof x === "string");
222
+ mix = mix.filter((x) => typeof x !== "string");
223
+ const resErrors = mix.filter((x) => Result.Is(x) && x.isErr());
224
+ if (resErrors.length) {
225
+ this.Err(resErrors.map((x) => x.Err().message).join("\n"));
226
+ return this;
227
+ }
228
+ const req = mix
229
+ .map((reqOrResult) => (Result.Is(reqOrResult) ? reqOrResult.Ok() : reqOrResult))
230
+ .find((req) => typeof req.status !== "number");
231
+ const res = mix
232
+ .map((resOrResult) => (Result.Is(resOrResult) ? resOrResult.Ok() : resOrResult))
233
+ .find((res) => typeof res.status === "number");
234
+ let reqAndOrres;
235
+ if (res && req) {
236
+ reqAndOrres = { res, req };
237
+ }
238
+ else if (!res && !req) {
239
+ reqAndOrres = undefined;
240
+ }
241
+ else if (res) {
242
+ reqAndOrres = res;
243
+ }
244
+ else if (req) {
245
+ reqAndOrres = req;
227
246
  }
228
- let reqRes = res;
229
- if (req) {
230
- reqRes = { res, req };
247
+ if (reqAndOrres) {
248
+ this.Any(key || "Http", reqAndOrres);
231
249
  }
232
- this.Any(key || "Http", reqRes);
233
250
  return this;
234
251
  }
235
252
  Pair(x) {
@@ -268,12 +285,20 @@ export class LoggerImpl {
268
285
  this.Ref(key, () => URI.from(url).toString());
269
286
  return this;
270
287
  }
288
+ coerceKey(key, value) {
289
+ if (typeof key === "string") {
290
+ this._attributes[key] = logValue(value);
291
+ }
292
+ else {
293
+ this.Pair(key);
294
+ }
295
+ }
271
296
  Str(key, value) {
272
- this._attributes[key] = logValue(value);
297
+ this.coerceKey(key, value);
273
298
  return this;
274
299
  }
275
300
  Any(key, value) {
276
- this._attributes[key] = logValue(value);
301
+ this.coerceKey(key, value);
277
302
  return this;
278
303
  }
279
304
  Dur(key, nsec) {
@@ -281,7 +306,7 @@ export class LoggerImpl {
281
306
  return this;
282
307
  }
283
308
  Uint64(key, value) {
284
- this._attributes[key] = logValue(value);
309
+ this.coerceKey(key, value);
285
310
  return this;
286
311
  }
287
312
  Int(key, value) {
@@ -371,8 +396,8 @@ class WithLoggerBuilder {
371
396
  this._li.SetDebug(...modules);
372
397
  return this;
373
398
  }
374
- Http(res, req, key) {
375
- this._li.Http(res, req, key);
399
+ Http(...mix) {
400
+ this._li.Http(...mix);
376
401
  return this;
377
402
  }
378
403
  Pair(x) {
@@ -1 +1 @@
1
- {"version":3,"file":"logger-impl.js","sourceRoot":"","sources":["../../src/logger-impl.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,KAAK,EAEL,QAAQ,EAMR,QAAQ,EACR,aAAa,GAId,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAa,GAAG,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAgB,sBAAsB,E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AAC;IACD,GAAG,CAAC,GAAY;QACd,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI;QACF,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,SAAS;QACP,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,GAAG,CAAC,GAAqC,EAAE,KAAiC;QAC1E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,GAAG,CAAC,GAAW,EAAE,IAAY;QAC3B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,CAAC,GAAoC,EAAE,KAAc;QACzD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
package/ts/logger.d.ts CHANGED
@@ -37,6 +37,7 @@ export interface LevelHandler {
37
37
  setDebug(...modules: (string | string[])[]): void;
38
38
  isEnabled(ilevel: unknown, module: unknown): boolean;
39
39
  }
40
+ export type HttpType = Response | Result<Response> | Request | Result<Request>;
40
41
  export interface LoggerInterface<R> {
41
42
  TxtEnDe(): TxtEnDecoder;
42
43
  Module(key: string): R;
@@ -53,8 +54,12 @@ export interface LoggerInterface<R> {
53
54
  Url(url: CoerceURI, key?: string): R;
54
55
  Len(value: unknown, key?: string): R;
55
56
  Hash(value: unknown, key?: string): R;
56
- Str(key: string, value?: string): R;
57
- Http(res: Response | Result<Response>, req?: Request, key?: string): R;
57
+ Str<T extends string | Record<string, string>>(key: T, value?: T extends string ? string : undefined): R;
58
+ Uint64<T extends string | Record<string, number>>(key: T, value?: T extends string ? number : undefined): R;
59
+ Int<T extends string | Record<string, number>>(key: T, value?: T extends string ? number : undefined): R;
60
+ Bool<T extends string | Record<string, unknown>>(key: T, value?: T extends string ? unknown : undefined): R;
61
+ Any<T extends string | Record<string, unknown>>(key: T, value?: T extends string ? unknown : undefined): R;
62
+ Http(...mix: (HttpType | string)[]): R;
58
63
  Pair(x: Record<string, unknown>): R;
59
64
  Error(): R;
60
65
  Warn(): R;
@@ -64,11 +69,7 @@ export interface LoggerInterface<R> {
64
69
  Err(err: unknown | Result<unknown> | Error): R;
65
70
  Info(): R;
66
71
  Timestamp(): R;
67
- Any(key: string, value: unknown): R;
68
72
  Dur(key: string, nsec: number): R;
69
- Uint64(key: string, value: number): R;
70
- Int(key: string, value: number): R;
71
- Bool(key: string, value: unknown): R;
72
73
  }
73
74
  export declare function IsLogger(obj: unknown): obj is Logger;
74
75
  export interface WithLogger extends LoggerInterface<WithLogger> {