@adviser/cement 0.2.40 → 0.2.42

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 (83) hide show
  1. package/{chunk-USQXEZHL.js → chunk-3RHIVQAA.js} +2 -2
  2. package/{chunk-W2GV5KXV.js → chunk-N3NUTN4B.js} +3 -3
  3. package/{chunk-F5W6VELE.js → chunk-N5LQQXOU.js} +2 -2
  4. package/chunk-PPS4L4VW.js +38 -0
  5. package/{chunk-GES3MUGV.js.map → chunk-PPS4L4VW.js.map} +1 -1
  6. package/index.cjs +500 -179
  7. package/index.cjs.map +1 -1
  8. package/index.d.cts +73 -30
  9. package/index.d.ts +73 -30
  10. package/index.js +506 -141
  11. package/index.js.map +1 -1
  12. package/node/index.js +2 -2
  13. package/package.json +2 -2
  14. package/src/http_header.ts +161 -0
  15. package/src/index.ts +1 -0
  16. package/src/jsr.json +1 -1
  17. package/src/log-level-impl.ts +7 -0
  18. package/src/logger-impl.ts +70 -43
  19. package/src/logger.ts +37 -9
  20. package/src/option.ts +7 -0
  21. package/src/result.ts +7 -1
  22. package/src/uri.ts +35 -11
  23. package/src/utils/relative-path.ts +161 -0
  24. package/ts/http_header.d.ts +29 -0
  25. package/ts/http_header.d.ts.map +1 -0
  26. package/ts/http_header.js +155 -0
  27. package/ts/http_header.js.map +1 -0
  28. package/ts/http_header.test.d.ts +2 -0
  29. package/ts/http_header.test.d.ts.map +1 -0
  30. package/ts/http_header.test.js +90 -0
  31. package/ts/http_header.test.js.map +1 -0
  32. package/ts/index.d.ts +1 -0
  33. package/ts/index.d.ts.map +1 -1
  34. package/ts/index.js +1 -0
  35. package/ts/index.js.map +1 -1
  36. package/ts/log-level-impl.d.ts +3 -0
  37. package/ts/log-level-impl.d.ts.map +1 -1
  38. package/ts/log-level-impl.js +5 -0
  39. package/ts/log-level-impl.js.map +1 -1
  40. package/ts/logger-impl.d.ts +2 -1
  41. package/ts/logger-impl.d.ts.map +1 -1
  42. package/ts/logger-impl.js +66 -47
  43. package/ts/logger-impl.js.map +1 -1
  44. package/ts/logger.d.ts +10 -1
  45. package/ts/logger.d.ts.map +1 -1
  46. package/ts/logger.js +22 -8
  47. package/ts/logger.js.map +1 -1
  48. package/ts/logger.test.js +111 -58
  49. package/ts/logger.test.js.map +1 -1
  50. package/ts/option.d.ts +1 -0
  51. package/ts/option.d.ts.map +1 -1
  52. package/ts/option.js +6 -0
  53. package/ts/option.js.map +1 -1
  54. package/ts/result.d.ts +1 -1
  55. package/ts/result.d.ts.map +1 -1
  56. package/ts/result.js +6 -0
  57. package/ts/result.js.map +1 -1
  58. package/ts/result.test.js +6 -0
  59. package/ts/result.test.js.map +1 -1
  60. package/ts/tracer.js +24 -6
  61. package/ts/tracer.js.map +1 -1
  62. package/ts/uri.d.ts +3 -1
  63. package/ts/uri.d.ts.map +1 -1
  64. package/ts/uri.js +27 -10
  65. package/ts/uri.js.map +1 -1
  66. package/ts/uri.test.js +39 -10
  67. package/ts/uri.test.js.map +1 -1
  68. package/ts/utils/relative-path.d.ts +17 -0
  69. package/ts/utils/relative-path.d.ts.map +1 -0
  70. package/ts/utils/relative-path.js +148 -0
  71. package/ts/utils/relative-path.js.map +1 -0
  72. package/ts/utils/relative-path.test.d.ts +2 -0
  73. package/ts/utils/relative-path.test.d.ts.map +1 -0
  74. package/ts/utils/relative-path.test.js +187 -0
  75. package/ts/utils/relative-path.test.js.map +1 -0
  76. package/ts/utils/stripper.js +1 -1
  77. package/ts/utils/stripper.js.map +1 -1
  78. package/utils/index.js +2 -2
  79. package/web/index.js +3 -3
  80. package/chunk-GES3MUGV.js +0 -92
  81. /package/{chunk-USQXEZHL.js.map → chunk-3RHIVQAA.js.map} +0 -0
  82. /package/{chunk-W2GV5KXV.js.map → chunk-N3NUTN4B.js.map} +0 -0
  83. /package/{chunk-F5W6VELE.js.map → chunk-N5LQQXOU.js.map} +0 -0
package/index.d.cts CHANGED
@@ -4,9 +4,35 @@ import { T as TxtEnDecoder } from './txt-en-decoder-CZYJUju2.cjs';
4
4
  export { U as Utf8EnDecoder, a as Utf8EnDecoderSingleton } from './txt-en-decoder-CZYJUju2.cjs';
5
5
  export { i as utils } from './index-Q3phXzYr.cjs';
6
6
 
7
+ declare abstract class Option<T> {
8
+ static Some<T>(t: T): Option<T>;
9
+ static None<T>(): Option<T>;
10
+ static Is<T>(t: unknown): t is Option<T>;
11
+ static From<T>(t?: T): Option<T>;
12
+ IsNone(): boolean;
13
+ IsSome(): boolean;
14
+ Unwrap(): T;
15
+ abstract is_none(): boolean;
16
+ abstract is_some(): boolean;
17
+ abstract unwrap(): T;
18
+ }
19
+ declare class Some<T> extends Option<T> {
20
+ private _t;
21
+ constructor(_t: T);
22
+ is_none(): boolean;
23
+ is_some(): boolean;
24
+ unwrap(): T;
25
+ }
26
+ declare class None<T> extends Option<T> {
27
+ is_none(): boolean;
28
+ is_some(): boolean;
29
+ unwrap(): T;
30
+ }
31
+ type WithoutOption<T> = T extends Option<infer U> ? U : T;
32
+
7
33
  declare abstract class Result<T, E = Error> {
8
34
  static Ok<T = void>(t: T): Result<T, Error>;
9
- static Err<T, E extends Error = Error>(t: E | string): Result<T, E>;
35
+ static Err<T, E extends Error = Error>(t: E | string | Result<unknown, E>): Result<T, E>;
10
36
  static Is<T>(t: unknown): t is Result<T>;
11
37
  isOk(): boolean;
12
38
  isErr(): boolean;
@@ -42,7 +68,8 @@ type StripCommand = string | RegExp;
42
68
  type NullOrUndef = null | undefined;
43
69
  type OneKey<K extends string, V = string> = Record<K, V>;
44
70
  type MsgFn = (...keys: string[]) => string;
45
- type KeysParam = (string | MsgFn | Record<string, unknown>)[];
71
+ declare const REQUIRED = 4711;
72
+ type KeysParam = (string | MsgFn | Record<string, typeof REQUIRED | unknown>)[];
46
73
  interface URIInterface<R extends URIInterface<R>> {
47
74
  readonly getParams: Iterable<[string, string]>;
48
75
  hasParam(key: string): boolean;
@@ -99,6 +126,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
99
126
  hostname(h: string): BuildURI;
100
127
  protocol(p: string): BuildURI;
101
128
  pathname(p: string): BuildURI;
129
+ resolve(p: CoerceURI): BuildURI;
102
130
  appendRelative(p: CoerceURI): BuildURI;
103
131
  cleanParams(): BuildURI;
104
132
  delParam(key: string): BuildURI;
@@ -161,7 +189,11 @@ declare class LogValue {
161
189
  type LogSerializable = Record<string, LogValue | Promise<LogValue>>;
162
190
  declare function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue>;
163
191
  type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;
164
- declare function logValue(val: LogValueArg, state?: Set<unknown>): LogValue;
192
+ interface LogValueState {
193
+ readonly state?: Set<unknown>;
194
+ readonly ignoreAttr: Option<RegExp>;
195
+ }
196
+ declare function logValue(val: LogValueArg, ctx: LogValueState): LogValue;
165
197
  interface Sized {
166
198
  size: number;
167
199
  }
@@ -176,18 +208,22 @@ interface LevelHandler {
176
208
  enableLevel(level: Level, ...modules: string[]): void;
177
209
  disableLevel(level: Level, ...modules: string[]): void;
178
210
  setExposeStack(enable?: boolean): void;
211
+ setIgnoreAttr(re?: RegExp): void;
212
+ ignoreAttr: Option<RegExp>;
179
213
  isStackExposed: boolean;
180
214
  setDebug(...modules: (string | string[])[]): void;
181
215
  isEnabled(ilevel: unknown, module: unknown): boolean;
182
216
  }
183
217
  type HttpType = Response | Result<Response> | Request | Result<Request>;
184
218
  interface LoggerInterface<R> {
219
+ readonly levelHandler: LevelHandler;
185
220
  TxtEnDe(): TxtEnDecoder;
186
221
  Module(key: string): R;
187
222
  EnableLevel(level: Level, ...modules: string[]): R;
188
223
  DisableLevel(level: Level, ...modules: string[]): R;
189
224
  Attributes(): Record<string, unknown>;
190
225
  SetDebug(...modules: (string | string[])[]): R;
226
+ SetIgnoreAttribute(re?: RegExp): R;
191
227
  SetExposeStack(enable?: boolean): R;
192
228
  SetFormatter(fmt: LogFormatter): R;
193
229
  Ref(key: string, action: {
@@ -264,7 +300,7 @@ declare class LoggerImpl implements Logger {
264
300
  readonly _attributes: LogSerializable;
265
301
  readonly _withAttributes: LogSerializable;
266
302
  readonly _logWriter: LogWriterStream;
267
- readonly _levelHandler: LevelHandler;
303
+ readonly levelHandler: LevelHandler;
268
304
  readonly _txtEnDe: TxtEnDecoder;
269
305
  _formatter: LogFormatter;
270
306
  constructor(params?: LoggerImplParams);
@@ -275,6 +311,7 @@ declare class LoggerImpl implements Logger {
275
311
  DisableLevel(level: Level, ...modules: string[]): Logger;
276
312
  Module(key: string): Logger;
277
313
  SetDebug(...modules: (string | string[])[]): Logger;
314
+ SetIgnoreAttribute(re?: RegExp): Logger;
278
315
  SetFormatter(formatter: LogFormatter): Logger;
279
316
  Timestamp(): Logger;
280
317
  Warn(): Logger;
@@ -353,41 +390,18 @@ declare function MockLogger(params?: {
353
390
  declare class LevelHandlerImpl implements LevelHandler {
354
391
  readonly _globalLevels: Set<Level>;
355
392
  readonly _modules: Map<string, Set<Level>>;
393
+ ignoreAttr: Option<RegExp>;
356
394
  isStackExposed: boolean;
357
395
  enableLevel(level: Level, ...modules: string[]): void;
358
396
  disableLevel(level: Level, ...modules: string[]): void;
359
397
  setExposeStack(enable?: boolean): void;
398
+ setIgnoreAttr(re?: RegExp): void;
360
399
  forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
361
400
  setDebug(...modules: (string | string[])[]): void;
362
401
  isEnabled(ilevel: unknown, module: unknown): boolean;
363
402
  }
364
403
  declare function LevelHandlerSingleton(): LevelHandler;
365
404
 
366
- declare abstract class Option<T> {
367
- static Some<T>(t: T): Option<T>;
368
- static None<T>(): Option<T>;
369
- static Is<T>(t: unknown): t is Option<T>;
370
- IsNone(): boolean;
371
- IsSome(): boolean;
372
- Unwrap(): T;
373
- abstract is_none(): boolean;
374
- abstract is_some(): boolean;
375
- abstract unwrap(): T;
376
- }
377
- declare class Some<T> extends Option<T> {
378
- private _t;
379
- constructor(_t: T);
380
- is_none(): boolean;
381
- is_some(): boolean;
382
- unwrap(): T;
383
- }
384
- declare class None<T> extends Option<T> {
385
- is_none(): boolean;
386
- is_some(): boolean;
387
- unwrap(): T;
388
- }
389
- type WithoutOption<T> = T extends Option<infer U> ? U : T;
390
-
391
405
  type TraceCtx = {
392
406
  readonly spanId: string;
393
407
  readonly time: Time;
@@ -577,4 +591,33 @@ declare function bin2string(hex: ArrayBufferView, size?: number): string;
577
591
 
578
592
  declare const VERSION: string;
579
593
 
580
- export { type AsError, BuildURI, type CTAesKeyAlgorithm, type CTAlgorithm, type CTAlgorithmIdentifier, type CTArrayBufferView, type CTBufferSource, type CTCryptoKey, type CTEcKeyImportParams, type CTHmacImportParams, type CTJsonWebKey, type CTKeyFormat, type CTKeyType, type CTKeyUsage, type CTNamedCurve, type CTRsaHashedImportParams, type CleanCtx, type CoerceURI, type CryptoRuntime, type FnSerialized, Future, type HostURIObject, type HttpType, type Invokaction, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type KeysParam, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, type MsgFn, MutableURL, None, Option, type PathURIObject, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, Time, type TraceCtx, type TraceCtxParam, TraceNode, type TraceNodeMap, TxtEnDecoder, URI, type URIInterface, type URIObject, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, hasHostPartProtocols, isURL, logValue, runtimeFn, toCryptoRuntime };
594
+ declare class HeadersImpl extends Headers {
595
+ readonly _headers: Map<string, string>;
596
+ constructor(init: Map<string, string>);
597
+ [Symbol.iterator](): HeadersIterator<[string, string]>;
598
+ entries(): HeadersIterator<[string, string]>;
599
+ keys(): HeadersIterator<string>;
600
+ values(): HeadersIterator<string>;
601
+ append(key: string, value: string | string[] | undefined): HeadersImpl;
602
+ }
603
+ declare class HttpHeader {
604
+ readonly _headers: Map<string, string[]>;
605
+ static from(headers?: HeadersInit | NodeJS.Dict<string | string[]> | Headers): HttpHeader;
606
+ _asStringString(): Map<string, string>;
607
+ _key(key: string): string;
608
+ Values(key: string): string[];
609
+ Get(key: string): string | undefined;
610
+ Set(key: string, valueOr: string | string[]): HttpHeader;
611
+ Add(key: string, value: string | string[] | undefined): HttpHeader;
612
+ Del(ey: string): HttpHeader;
613
+ Items(): [string, string[]][];
614
+ SortItems(): [string, string[]][];
615
+ Clone(): HttpHeader;
616
+ AsRecordStringStringArray(): Record<string, string[]>;
617
+ AsRecordStringString(): Record<string, string>;
618
+ AsHeaderInit(): HeadersInit;
619
+ AsHeaders(): Headers;
620
+ Merge(other?: HttpHeader): HttpHeader;
621
+ }
622
+
623
+ export { type AsError, BuildURI, type CTAesKeyAlgorithm, type CTAlgorithm, type CTAlgorithmIdentifier, type CTArrayBufferView, type CTBufferSource, type CTCryptoKey, type CTEcKeyImportParams, type CTHmacImportParams, type CTJsonWebKey, type CTKeyFormat, type CTKeyType, type CTKeyUsage, type CTNamedCurve, type CTRsaHashedImportParams, type CleanCtx, type CoerceURI, type CryptoRuntime, type FnSerialized, Future, HeadersImpl, type HostURIObject, HttpHeader, type HttpType, type Invokaction, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type KeysParam, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, type LogValueState, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, type MsgFn, MutableURL, None, Option, type PathURIObject, REQUIRED, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, Time, type TraceCtx, type TraceCtxParam, TraceNode, type TraceNodeMap, TxtEnDecoder, URI, type URIInterface, type URIObject, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, hasHostPartProtocols, isURL, logValue, runtimeFn, toCryptoRuntime };
package/index.d.ts CHANGED
@@ -4,9 +4,35 @@ import { T as TxtEnDecoder } from './txt-en-decoder-CZYJUju2.js';
4
4
  export { U as Utf8EnDecoder, a as Utf8EnDecoderSingleton } from './txt-en-decoder-CZYJUju2.js';
5
5
  export { i as utils } from './index-tIGZMHTc.js';
6
6
 
7
+ declare abstract class Option<T> {
8
+ static Some<T>(t: T): Option<T>;
9
+ static None<T>(): Option<T>;
10
+ static Is<T>(t: unknown): t is Option<T>;
11
+ static From<T>(t?: T): Option<T>;
12
+ IsNone(): boolean;
13
+ IsSome(): boolean;
14
+ Unwrap(): T;
15
+ abstract is_none(): boolean;
16
+ abstract is_some(): boolean;
17
+ abstract unwrap(): T;
18
+ }
19
+ declare class Some<T> extends Option<T> {
20
+ private _t;
21
+ constructor(_t: T);
22
+ is_none(): boolean;
23
+ is_some(): boolean;
24
+ unwrap(): T;
25
+ }
26
+ declare class None<T> extends Option<T> {
27
+ is_none(): boolean;
28
+ is_some(): boolean;
29
+ unwrap(): T;
30
+ }
31
+ type WithoutOption<T> = T extends Option<infer U> ? U : T;
32
+
7
33
  declare abstract class Result<T, E = Error> {
8
34
  static Ok<T = void>(t: T): Result<T, Error>;
9
- static Err<T, E extends Error = Error>(t: E | string): Result<T, E>;
35
+ static Err<T, E extends Error = Error>(t: E | string | Result<unknown, E>): Result<T, E>;
10
36
  static Is<T>(t: unknown): t is Result<T>;
11
37
  isOk(): boolean;
12
38
  isErr(): boolean;
@@ -42,7 +68,8 @@ type StripCommand = string | RegExp;
42
68
  type NullOrUndef = null | undefined;
43
69
  type OneKey<K extends string, V = string> = Record<K, V>;
44
70
  type MsgFn = (...keys: string[]) => string;
45
- type KeysParam = (string | MsgFn | Record<string, unknown>)[];
71
+ declare const REQUIRED = 4711;
72
+ type KeysParam = (string | MsgFn | Record<string, typeof REQUIRED | unknown>)[];
46
73
  interface URIInterface<R extends URIInterface<R>> {
47
74
  readonly getParams: Iterable<[string, string]>;
48
75
  hasParam(key: string): boolean;
@@ -99,6 +126,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
99
126
  hostname(h: string): BuildURI;
100
127
  protocol(p: string): BuildURI;
101
128
  pathname(p: string): BuildURI;
129
+ resolve(p: CoerceURI): BuildURI;
102
130
  appendRelative(p: CoerceURI): BuildURI;
103
131
  cleanParams(): BuildURI;
104
132
  delParam(key: string): BuildURI;
@@ -161,7 +189,11 @@ declare class LogValue {
161
189
  type LogSerializable = Record<string, LogValue | Promise<LogValue>>;
162
190
  declare function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue>;
163
191
  type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;
164
- declare function logValue(val: LogValueArg, state?: Set<unknown>): LogValue;
192
+ interface LogValueState {
193
+ readonly state?: Set<unknown>;
194
+ readonly ignoreAttr: Option<RegExp>;
195
+ }
196
+ declare function logValue(val: LogValueArg, ctx: LogValueState): LogValue;
165
197
  interface Sized {
166
198
  size: number;
167
199
  }
@@ -176,18 +208,22 @@ interface LevelHandler {
176
208
  enableLevel(level: Level, ...modules: string[]): void;
177
209
  disableLevel(level: Level, ...modules: string[]): void;
178
210
  setExposeStack(enable?: boolean): void;
211
+ setIgnoreAttr(re?: RegExp): void;
212
+ ignoreAttr: Option<RegExp>;
179
213
  isStackExposed: boolean;
180
214
  setDebug(...modules: (string | string[])[]): void;
181
215
  isEnabled(ilevel: unknown, module: unknown): boolean;
182
216
  }
183
217
  type HttpType = Response | Result<Response> | Request | Result<Request>;
184
218
  interface LoggerInterface<R> {
219
+ readonly levelHandler: LevelHandler;
185
220
  TxtEnDe(): TxtEnDecoder;
186
221
  Module(key: string): R;
187
222
  EnableLevel(level: Level, ...modules: string[]): R;
188
223
  DisableLevel(level: Level, ...modules: string[]): R;
189
224
  Attributes(): Record<string, unknown>;
190
225
  SetDebug(...modules: (string | string[])[]): R;
226
+ SetIgnoreAttribute(re?: RegExp): R;
191
227
  SetExposeStack(enable?: boolean): R;
192
228
  SetFormatter(fmt: LogFormatter): R;
193
229
  Ref(key: string, action: {
@@ -264,7 +300,7 @@ declare class LoggerImpl implements Logger {
264
300
  readonly _attributes: LogSerializable;
265
301
  readonly _withAttributes: LogSerializable;
266
302
  readonly _logWriter: LogWriterStream;
267
- readonly _levelHandler: LevelHandler;
303
+ readonly levelHandler: LevelHandler;
268
304
  readonly _txtEnDe: TxtEnDecoder;
269
305
  _formatter: LogFormatter;
270
306
  constructor(params?: LoggerImplParams);
@@ -275,6 +311,7 @@ declare class LoggerImpl implements Logger {
275
311
  DisableLevel(level: Level, ...modules: string[]): Logger;
276
312
  Module(key: string): Logger;
277
313
  SetDebug(...modules: (string | string[])[]): Logger;
314
+ SetIgnoreAttribute(re?: RegExp): Logger;
278
315
  SetFormatter(formatter: LogFormatter): Logger;
279
316
  Timestamp(): Logger;
280
317
  Warn(): Logger;
@@ -353,41 +390,18 @@ declare function MockLogger(params?: {
353
390
  declare class LevelHandlerImpl implements LevelHandler {
354
391
  readonly _globalLevels: Set<Level>;
355
392
  readonly _modules: Map<string, Set<Level>>;
393
+ ignoreAttr: Option<RegExp>;
356
394
  isStackExposed: boolean;
357
395
  enableLevel(level: Level, ...modules: string[]): void;
358
396
  disableLevel(level: Level, ...modules: string[]): void;
359
397
  setExposeStack(enable?: boolean): void;
398
+ setIgnoreAttr(re?: RegExp): void;
360
399
  forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
361
400
  setDebug(...modules: (string | string[])[]): void;
362
401
  isEnabled(ilevel: unknown, module: unknown): boolean;
363
402
  }
364
403
  declare function LevelHandlerSingleton(): LevelHandler;
365
404
 
366
- declare abstract class Option<T> {
367
- static Some<T>(t: T): Option<T>;
368
- static None<T>(): Option<T>;
369
- static Is<T>(t: unknown): t is Option<T>;
370
- IsNone(): boolean;
371
- IsSome(): boolean;
372
- Unwrap(): T;
373
- abstract is_none(): boolean;
374
- abstract is_some(): boolean;
375
- abstract unwrap(): T;
376
- }
377
- declare class Some<T> extends Option<T> {
378
- private _t;
379
- constructor(_t: T);
380
- is_none(): boolean;
381
- is_some(): boolean;
382
- unwrap(): T;
383
- }
384
- declare class None<T> extends Option<T> {
385
- is_none(): boolean;
386
- is_some(): boolean;
387
- unwrap(): T;
388
- }
389
- type WithoutOption<T> = T extends Option<infer U> ? U : T;
390
-
391
405
  type TraceCtx = {
392
406
  readonly spanId: string;
393
407
  readonly time: Time;
@@ -577,4 +591,33 @@ declare function bin2string(hex: ArrayBufferView, size?: number): string;
577
591
 
578
592
  declare const VERSION: string;
579
593
 
580
- export { type AsError, BuildURI, type CTAesKeyAlgorithm, type CTAlgorithm, type CTAlgorithmIdentifier, type CTArrayBufferView, type CTBufferSource, type CTCryptoKey, type CTEcKeyImportParams, type CTHmacImportParams, type CTJsonWebKey, type CTKeyFormat, type CTKeyType, type CTKeyUsage, type CTNamedCurve, type CTRsaHashedImportParams, type CleanCtx, type CoerceURI, type CryptoRuntime, type FnSerialized, Future, type HostURIObject, type HttpType, type Invokaction, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type KeysParam, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, type MsgFn, MutableURL, None, Option, type PathURIObject, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, Time, type TraceCtx, type TraceCtxParam, TraceNode, type TraceNodeMap, TxtEnDecoder, URI, type URIInterface, type URIObject, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, hasHostPartProtocols, isURL, logValue, runtimeFn, toCryptoRuntime };
594
+ declare class HeadersImpl extends Headers {
595
+ readonly _headers: Map<string, string>;
596
+ constructor(init: Map<string, string>);
597
+ [Symbol.iterator](): HeadersIterator<[string, string]>;
598
+ entries(): HeadersIterator<[string, string]>;
599
+ keys(): HeadersIterator<string>;
600
+ values(): HeadersIterator<string>;
601
+ append(key: string, value: string | string[] | undefined): HeadersImpl;
602
+ }
603
+ declare class HttpHeader {
604
+ readonly _headers: Map<string, string[]>;
605
+ static from(headers?: HeadersInit | NodeJS.Dict<string | string[]> | Headers): HttpHeader;
606
+ _asStringString(): Map<string, string>;
607
+ _key(key: string): string;
608
+ Values(key: string): string[];
609
+ Get(key: string): string | undefined;
610
+ Set(key: string, valueOr: string | string[]): HttpHeader;
611
+ Add(key: string, value: string | string[] | undefined): HttpHeader;
612
+ Del(ey: string): HttpHeader;
613
+ Items(): [string, string[]][];
614
+ SortItems(): [string, string[]][];
615
+ Clone(): HttpHeader;
616
+ AsRecordStringStringArray(): Record<string, string[]>;
617
+ AsRecordStringString(): Record<string, string>;
618
+ AsHeaderInit(): HeadersInit;
619
+ AsHeaders(): Headers;
620
+ Merge(other?: HttpHeader): HttpHeader;
621
+ }
622
+
623
+ export { type AsError, BuildURI, type CTAesKeyAlgorithm, type CTAlgorithm, type CTAlgorithmIdentifier, type CTArrayBufferView, type CTBufferSource, type CTCryptoKey, type CTEcKeyImportParams, type CTHmacImportParams, type CTJsonWebKey, type CTKeyFormat, type CTKeyType, type CTKeyUsage, type CTNamedCurve, type CTRsaHashedImportParams, type CleanCtx, type CoerceURI, type CryptoRuntime, type FnSerialized, Future, HeadersImpl, type HostURIObject, HttpHeader, type HttpType, type Invokaction, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type KeysParam, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, type LogValueState, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, type MsgFn, MutableURL, None, Option, type PathURIObject, REQUIRED, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, Time, type TraceCtx, type TraceCtxParam, TraceNode, type TraceNodeMap, TxtEnDecoder, URI, type URIInterface, type URIObject, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, hasHostPartProtocols, isURL, logValue, runtimeFn, toCryptoRuntime };