@adviser/cement 0.2.24 → 0.2.25
Sign up to get free protection for your applications and to get access to all the features.
- package/{chunk-2L33RPFJ.js → chunk-DPIL5UIL.js} +2 -2
- package/chunk-LCPYQVWT.js +21 -0
- package/chunk-LCPYQVWT.js.map +1 -0
- package/{chunk-AO7BGISE.js → chunk-OXD3YZZ7.js} +7 -5
- package/chunk-OXD3YZZ7.js.map +1 -0
- package/{chunk-I4NUGWZ6.js → chunk-P5RXA4C4.js} +26 -1
- package/{chunk-JYUQZNDZ.js → chunk-YDIUMYIE.js} +7 -2
- package/chunk-YDIUMYIE.js.map +1 -0
- package/{index-_GuS2IT4.d.cts → index-CcsGcehs.d.ts} +2 -1
- package/{index-_GuS2IT4.d.ts → index-Dhb2fQiw.d.cts} +2 -1
- package/index.cjs +7479 -115
- package/index.cjs.map +1 -1
- package/index.d.cts +59 -28
- package/index.d.ts +59 -28
- package/index.js +7432 -101
- package/index.js.map +1 -1
- package/node/index.cjs +25 -7
- package/node/index.cjs.map +1 -1
- package/node/index.d.cts +2 -1
- package/node/index.d.ts +2 -1
- package/node/index.js +7 -4
- package/node/index.js.map +1 -1
- package/package.json +3 -2
- package/txt-en-decoder-CZYJUju2.d.cts +11 -0
- package/txt-en-decoder-CZYJUju2.d.ts +11 -0
- package/utils/index.cjs +20 -5
- package/utils/index.cjs.map +1 -1
- package/utils/index.d.cts +2 -1
- package/utils/index.d.ts +2 -1
- package/utils/index.js +3 -2
- package/web/index.cjs.map +1 -1
- package/web/index.js +3 -3
- package/chunk-AO7BGISE.js.map +0 -1
- package/chunk-JYUQZNDZ.js.map +0 -1
- /package/{chunk-2L33RPFJ.js.map → chunk-DPIL5UIL.js.map} +0 -0
- /package/{chunk-I4NUGWZ6.js.map → chunk-P5RXA4C4.js.map} +0 -0
package/index.d.cts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { S as SysAbstraction } from './base-sys-abstraction-C9WW3w57.cjs';
|
2
2
|
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration, e as Env, c as EnvActions, d as EnvFactoryOpts, g as EnvImpl, E as EnvMap, p as ExitHandler, q as ExitService, F as FileService, I as IDMode, n as IdService, N as NamedWritableStream, O as OnSetItem, R as RandomMode, m as RandomService, k as StepTime, a as String2TimeMode, j as SysTime, b as SystemService, h as Time, l as TimeFactory, T as TimeMode, i as TimeUnits, V as VoidFunc, s as WrapperSysAbstraction, W as WrapperSysAbstractionParams, f as envFactory } from './base-sys-abstraction-C9WW3w57.cjs';
|
3
|
-
|
3
|
+
import { T as TxtEnDecoder } from './txt-en-decoder-CZYJUju2.cjs';
|
4
|
+
export { U as Utf8EnDecoder, a as Utf8EnDecoderSingleton } from './txt-en-decoder-CZYJUju2.cjs';
|
5
|
+
export { i as utils } from './index-Dhb2fQiw.cjs';
|
4
6
|
import 'vitest';
|
5
7
|
|
6
8
|
declare abstract class Result<T, E = Error> {
|
@@ -75,7 +77,7 @@ declare class BuildURI {
|
|
75
77
|
URI(): URI;
|
76
78
|
}
|
77
79
|
type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef;
|
78
|
-
declare const protocols:
|
80
|
+
declare const protocols: Set<string>;
|
79
81
|
declare class URI {
|
80
82
|
static protocolHasHostpart(protocol: string): () => void;
|
81
83
|
static merge(into: CoerceURI, from: CoerceURI, defaultProtocol?: string): URI;
|
@@ -114,9 +116,10 @@ declare class LogValue {
|
|
114
116
|
toJSON(): Serialized | Serialized[];
|
115
117
|
}
|
116
118
|
type LogSerializable = Record<string, LogValue | Promise<LogValue>>;
|
117
|
-
declare function removeSelfRef(): (key: unknown, val: unknown) => unknown;
|
119
|
+
declare function removeSelfRef(lineEnd?: string): (key: unknown, val: unknown) => unknown;
|
118
120
|
declare function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue>;
|
119
|
-
|
121
|
+
type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;
|
122
|
+
declare function logValue(val: LogValueArg, state?: Set<unknown>): LogValue;
|
120
123
|
interface Sized {
|
121
124
|
size: number;
|
122
125
|
}
|
@@ -124,7 +127,19 @@ interface Lengthed {
|
|
124
127
|
length: number;
|
125
128
|
}
|
126
129
|
type SizeOrLength = Sized | Lengthed;
|
130
|
+
interface LogFormatter {
|
131
|
+
format(attr: LogSerializable): Uint8Array;
|
132
|
+
}
|
133
|
+
interface LevelHandler {
|
134
|
+
enableLevel(level: Level, ...modules: string[]): void;
|
135
|
+
disableLevel(level: Level, ...modules: string[]): void;
|
136
|
+
setExposeStack(enable?: boolean): void;
|
137
|
+
isStackExposed: boolean;
|
138
|
+
setDebug(...modules: (string | string[])[]): void;
|
139
|
+
isEnabled(ilevel: unknown, module: unknown): boolean;
|
140
|
+
}
|
127
141
|
interface LoggerInterface<R> {
|
142
|
+
TxtEnDe(): TxtEnDecoder;
|
128
143
|
Module(key: string): R;
|
129
144
|
EnableLevel(level: Level, ...modules: string[]): R;
|
130
145
|
DisableLevel(level: Level, ...modules: string[]): R;
|
@@ -166,25 +181,6 @@ interface Logger extends LoggerInterface<Logger> {
|
|
166
181
|
Flush(): Promise<void>;
|
167
182
|
}
|
168
183
|
|
169
|
-
interface LevelHandler {
|
170
|
-
enableLevel(level: Level, ...modules: string[]): void;
|
171
|
-
disableLevel(level: Level, ...modules: string[]): void;
|
172
|
-
setExposeStack(enable?: boolean): void;
|
173
|
-
isStackExposed: boolean;
|
174
|
-
setDebug(...modules: (string | string[])[]): void;
|
175
|
-
isEnabled(ilevel: unknown, module: unknown): boolean;
|
176
|
-
}
|
177
|
-
declare class LevelHandlerImpl implements LevelHandler {
|
178
|
-
readonly _globalLevels: Set<Level>;
|
179
|
-
readonly _modules: Map<string, Set<Level>>;
|
180
|
-
isStackExposed: boolean;
|
181
|
-
enableLevel(level: Level, ...modules: string[]): void;
|
182
|
-
disableLevel(level: Level, ...modules: string[]): void;
|
183
|
-
setExposeStack(enable?: boolean): void;
|
184
|
-
forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
|
185
|
-
setDebug(...modules: (string | string[])[]): void;
|
186
|
-
isEnabled(ilevel: unknown, module: unknown): boolean;
|
187
|
-
}
|
188
184
|
declare class LogWriterStream {
|
189
185
|
readonly _out: WritableStream<Uint8Array>;
|
190
186
|
readonly _toFlush: (() => Promise<void>)[];
|
@@ -194,12 +190,27 @@ declare class LogWriterStream {
|
|
194
190
|
_flushDoneFns: (() => void)[];
|
195
191
|
_flush(toFlush?: (() => Promise<void>)[] | undefined, done?: () => void): void;
|
196
192
|
}
|
193
|
+
|
194
|
+
declare class JSONFormatter implements LogFormatter {
|
195
|
+
private readonly _txtEnDe;
|
196
|
+
private readonly _space?;
|
197
|
+
constructor(txtEnde: TxtEnDecoder, space?: number);
|
198
|
+
format(attr: LogSerializable): Uint8Array;
|
199
|
+
}
|
200
|
+
declare class YAMLFormatter implements LogFormatter {
|
201
|
+
private readonly _txtEnDe;
|
202
|
+
private readonly _space?;
|
203
|
+
constructor(txtEnde: TxtEnDecoder, space?: number);
|
204
|
+
format(attr: LogSerializable): Uint8Array;
|
205
|
+
}
|
197
206
|
interface LoggerImplParams {
|
198
207
|
readonly out?: WritableStream<Uint8Array>;
|
199
208
|
readonly logWriter?: LogWriterStream;
|
200
209
|
readonly sys?: SysAbstraction;
|
201
210
|
readonly withAttributes?: LogSerializable;
|
202
211
|
readonly levelHandler?: LevelHandler;
|
212
|
+
readonly txtEnDe?: TxtEnDecoder;
|
213
|
+
readonly formatter?: LogFormatter;
|
203
214
|
}
|
204
215
|
declare class LoggerImpl implements Logger {
|
205
216
|
readonly _sys: SysAbstraction;
|
@@ -207,7 +218,10 @@ declare class LoggerImpl implements Logger {
|
|
207
218
|
readonly _withAttributes: LogSerializable;
|
208
219
|
readonly _logWriter: LogWriterStream;
|
209
220
|
readonly _levelHandler: LevelHandler;
|
221
|
+
readonly _txtEnDe: TxtEnDecoder;
|
222
|
+
readonly _formatter: LogFormatter;
|
210
223
|
constructor(params?: LoggerImplParams);
|
224
|
+
TxtEnDe(): TxtEnDecoder;
|
211
225
|
Attributes(): Record<string, unknown>;
|
212
226
|
SetExposeStack(enable?: boolean): Logger;
|
213
227
|
EnableLevel(level: Level, ...modules: string[]): Logger;
|
@@ -237,8 +251,7 @@ declare class LoggerImpl implements Logger {
|
|
237
251
|
Int(key: string, value: number): Logger;
|
238
252
|
Flush(): Promise<void>;
|
239
253
|
With(): WithLogger;
|
240
|
-
_resetAttributes(fn: () => () =>
|
241
|
-
_produceError(attr: LogSerializable, ...args: string[]): string;
|
254
|
+
_resetAttributes(fn: () => () => Uint8Array): () => Uint8Array;
|
242
255
|
Msg(...args: string[]): AsError;
|
243
256
|
}
|
244
257
|
|
@@ -267,11 +280,12 @@ declare class LogCollector implements WritableStream<Uint8Array> {
|
|
267
280
|
private _writer?;
|
268
281
|
private readonly _pass?;
|
269
282
|
private readonly _bufferArr;
|
270
|
-
|
283
|
+
private readonly _txtEnDe;
|
284
|
+
constructor(pass?: WritableStreamDefaultWriter<Uint8Array>, txtEnDe?: TxtEnDecoder);
|
271
285
|
abort(reason?: Uint8Array): Promise<void>;
|
272
286
|
close(): Promise<void>;
|
273
287
|
getWriter(): WritableStreamDefaultWriter<Uint8Array>;
|
274
|
-
Logs(): any[];
|
288
|
+
Logs(notJsonLine?: boolean): any[];
|
275
289
|
}
|
276
290
|
|
277
291
|
interface MockLoggerReturn {
|
@@ -285,6 +299,19 @@ declare function MockLogger(params?: {
|
|
285
299
|
readonly disableDebug?: boolean;
|
286
300
|
}): MockLoggerReturn;
|
287
301
|
|
302
|
+
declare class LevelHandlerImpl implements LevelHandler {
|
303
|
+
readonly _globalLevels: Set<Level>;
|
304
|
+
readonly _modules: Map<string, Set<Level>>;
|
305
|
+
isStackExposed: boolean;
|
306
|
+
enableLevel(level: Level, ...modules: string[]): void;
|
307
|
+
disableLevel(level: Level, ...modules: string[]): void;
|
308
|
+
setExposeStack(enable?: boolean): void;
|
309
|
+
forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
|
310
|
+
setDebug(...modules: (string | string[])[]): void;
|
311
|
+
isEnabled(ilevel: unknown, module: unknown): boolean;
|
312
|
+
}
|
313
|
+
declare function LevelHandlerSingleton(): LevelHandler;
|
314
|
+
|
288
315
|
declare abstract class Option<T> {
|
289
316
|
static Some<T>(t: T): Option<T>;
|
290
317
|
static None<T>(): Option<T>;
|
@@ -344,6 +371,7 @@ declare class Keyed<T extends {
|
|
344
371
|
constructor(factory: (key: K) => T);
|
345
372
|
asyncGet(key: () => Promise<K>): Promise<T>;
|
346
373
|
get(key: K | (() => K)): T;
|
374
|
+
unget(key: K): void;
|
347
375
|
reset(): void;
|
348
376
|
}
|
349
377
|
declare class KeyedResolvOnce<T, K = string> extends Keyed<ResolveOnce<T, K>, K> {
|
@@ -435,4 +463,7 @@ interface CryptoRuntime {
|
|
435
463
|
}
|
436
464
|
declare function toCryptoRuntime(cryptoOpts?: Partial<CryptoRuntime>): CryptoRuntime;
|
437
465
|
|
438
|
-
|
466
|
+
declare function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size?: number): void;
|
467
|
+
declare function bin2string(hex: ArrayBufferView, size?: number): string;
|
468
|
+
|
469
|
+
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 CoerceURI, type CryptoRuntime, type FnSerialized, Future, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, MockLogger, type MockLoggerReturn, MutableURL, None, Option, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, TxtEnDecoder, URI, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, isURL, logValue, protocols, removeSelfRef, runtimeFn, toCryptoRuntime };
|
package/index.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { S as SysAbstraction } from './base-sys-abstraction-C9WW3w57.js';
|
2
2
|
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration, e as Env, c as EnvActions, d as EnvFactoryOpts, g as EnvImpl, E as EnvMap, p as ExitHandler, q as ExitService, F as FileService, I as IDMode, n as IdService, N as NamedWritableStream, O as OnSetItem, R as RandomMode, m as RandomService, k as StepTime, a as String2TimeMode, j as SysTime, b as SystemService, h as Time, l as TimeFactory, T as TimeMode, i as TimeUnits, V as VoidFunc, s as WrapperSysAbstraction, W as WrapperSysAbstractionParams, f as envFactory } from './base-sys-abstraction-C9WW3w57.js';
|
3
|
-
|
3
|
+
import { T as TxtEnDecoder } from './txt-en-decoder-CZYJUju2.js';
|
4
|
+
export { U as Utf8EnDecoder, a as Utf8EnDecoderSingleton } from './txt-en-decoder-CZYJUju2.js';
|
5
|
+
export { i as utils } from './index-CcsGcehs.js';
|
4
6
|
import 'vitest';
|
5
7
|
|
6
8
|
declare abstract class Result<T, E = Error> {
|
@@ -75,7 +77,7 @@ declare class BuildURI {
|
|
75
77
|
URI(): URI;
|
76
78
|
}
|
77
79
|
type CoerceURI = string | URI | MutableURL | URL | BuildURI | NullOrUndef;
|
78
|
-
declare const protocols:
|
80
|
+
declare const protocols: Set<string>;
|
79
81
|
declare class URI {
|
80
82
|
static protocolHasHostpart(protocol: string): () => void;
|
81
83
|
static merge(into: CoerceURI, from: CoerceURI, defaultProtocol?: string): URI;
|
@@ -114,9 +116,10 @@ declare class LogValue {
|
|
114
116
|
toJSON(): Serialized | Serialized[];
|
115
117
|
}
|
116
118
|
type LogSerializable = Record<string, LogValue | Promise<LogValue>>;
|
117
|
-
declare function removeSelfRef(): (key: unknown, val: unknown) => unknown;
|
119
|
+
declare function removeSelfRef(lineEnd?: string): (key: unknown, val: unknown) => unknown;
|
118
120
|
declare function asyncLogValue(val: () => Promise<Serialized>): Promise<LogValue>;
|
119
|
-
|
121
|
+
type LogValueArg = LogValue | Serialized | Serialized[] | FnSerialized | undefined | null;
|
122
|
+
declare function logValue(val: LogValueArg, state?: Set<unknown>): LogValue;
|
120
123
|
interface Sized {
|
121
124
|
size: number;
|
122
125
|
}
|
@@ -124,7 +127,19 @@ interface Lengthed {
|
|
124
127
|
length: number;
|
125
128
|
}
|
126
129
|
type SizeOrLength = Sized | Lengthed;
|
130
|
+
interface LogFormatter {
|
131
|
+
format(attr: LogSerializable): Uint8Array;
|
132
|
+
}
|
133
|
+
interface LevelHandler {
|
134
|
+
enableLevel(level: Level, ...modules: string[]): void;
|
135
|
+
disableLevel(level: Level, ...modules: string[]): void;
|
136
|
+
setExposeStack(enable?: boolean): void;
|
137
|
+
isStackExposed: boolean;
|
138
|
+
setDebug(...modules: (string | string[])[]): void;
|
139
|
+
isEnabled(ilevel: unknown, module: unknown): boolean;
|
140
|
+
}
|
127
141
|
interface LoggerInterface<R> {
|
142
|
+
TxtEnDe(): TxtEnDecoder;
|
128
143
|
Module(key: string): R;
|
129
144
|
EnableLevel(level: Level, ...modules: string[]): R;
|
130
145
|
DisableLevel(level: Level, ...modules: string[]): R;
|
@@ -166,25 +181,6 @@ interface Logger extends LoggerInterface<Logger> {
|
|
166
181
|
Flush(): Promise<void>;
|
167
182
|
}
|
168
183
|
|
169
|
-
interface LevelHandler {
|
170
|
-
enableLevel(level: Level, ...modules: string[]): void;
|
171
|
-
disableLevel(level: Level, ...modules: string[]): void;
|
172
|
-
setExposeStack(enable?: boolean): void;
|
173
|
-
isStackExposed: boolean;
|
174
|
-
setDebug(...modules: (string | string[])[]): void;
|
175
|
-
isEnabled(ilevel: unknown, module: unknown): boolean;
|
176
|
-
}
|
177
|
-
declare class LevelHandlerImpl implements LevelHandler {
|
178
|
-
readonly _globalLevels: Set<Level>;
|
179
|
-
readonly _modules: Map<string, Set<Level>>;
|
180
|
-
isStackExposed: boolean;
|
181
|
-
enableLevel(level: Level, ...modules: string[]): void;
|
182
|
-
disableLevel(level: Level, ...modules: string[]): void;
|
183
|
-
setExposeStack(enable?: boolean): void;
|
184
|
-
forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
|
185
|
-
setDebug(...modules: (string | string[])[]): void;
|
186
|
-
isEnabled(ilevel: unknown, module: unknown): boolean;
|
187
|
-
}
|
188
184
|
declare class LogWriterStream {
|
189
185
|
readonly _out: WritableStream<Uint8Array>;
|
190
186
|
readonly _toFlush: (() => Promise<void>)[];
|
@@ -194,12 +190,27 @@ declare class LogWriterStream {
|
|
194
190
|
_flushDoneFns: (() => void)[];
|
195
191
|
_flush(toFlush?: (() => Promise<void>)[] | undefined, done?: () => void): void;
|
196
192
|
}
|
193
|
+
|
194
|
+
declare class JSONFormatter implements LogFormatter {
|
195
|
+
private readonly _txtEnDe;
|
196
|
+
private readonly _space?;
|
197
|
+
constructor(txtEnde: TxtEnDecoder, space?: number);
|
198
|
+
format(attr: LogSerializable): Uint8Array;
|
199
|
+
}
|
200
|
+
declare class YAMLFormatter implements LogFormatter {
|
201
|
+
private readonly _txtEnDe;
|
202
|
+
private readonly _space?;
|
203
|
+
constructor(txtEnde: TxtEnDecoder, space?: number);
|
204
|
+
format(attr: LogSerializable): Uint8Array;
|
205
|
+
}
|
197
206
|
interface LoggerImplParams {
|
198
207
|
readonly out?: WritableStream<Uint8Array>;
|
199
208
|
readonly logWriter?: LogWriterStream;
|
200
209
|
readonly sys?: SysAbstraction;
|
201
210
|
readonly withAttributes?: LogSerializable;
|
202
211
|
readonly levelHandler?: LevelHandler;
|
212
|
+
readonly txtEnDe?: TxtEnDecoder;
|
213
|
+
readonly formatter?: LogFormatter;
|
203
214
|
}
|
204
215
|
declare class LoggerImpl implements Logger {
|
205
216
|
readonly _sys: SysAbstraction;
|
@@ -207,7 +218,10 @@ declare class LoggerImpl implements Logger {
|
|
207
218
|
readonly _withAttributes: LogSerializable;
|
208
219
|
readonly _logWriter: LogWriterStream;
|
209
220
|
readonly _levelHandler: LevelHandler;
|
221
|
+
readonly _txtEnDe: TxtEnDecoder;
|
222
|
+
readonly _formatter: LogFormatter;
|
210
223
|
constructor(params?: LoggerImplParams);
|
224
|
+
TxtEnDe(): TxtEnDecoder;
|
211
225
|
Attributes(): Record<string, unknown>;
|
212
226
|
SetExposeStack(enable?: boolean): Logger;
|
213
227
|
EnableLevel(level: Level, ...modules: string[]): Logger;
|
@@ -237,8 +251,7 @@ declare class LoggerImpl implements Logger {
|
|
237
251
|
Int(key: string, value: number): Logger;
|
238
252
|
Flush(): Promise<void>;
|
239
253
|
With(): WithLogger;
|
240
|
-
_resetAttributes(fn: () => () =>
|
241
|
-
_produceError(attr: LogSerializable, ...args: string[]): string;
|
254
|
+
_resetAttributes(fn: () => () => Uint8Array): () => Uint8Array;
|
242
255
|
Msg(...args: string[]): AsError;
|
243
256
|
}
|
244
257
|
|
@@ -267,11 +280,12 @@ declare class LogCollector implements WritableStream<Uint8Array> {
|
|
267
280
|
private _writer?;
|
268
281
|
private readonly _pass?;
|
269
282
|
private readonly _bufferArr;
|
270
|
-
|
283
|
+
private readonly _txtEnDe;
|
284
|
+
constructor(pass?: WritableStreamDefaultWriter<Uint8Array>, txtEnDe?: TxtEnDecoder);
|
271
285
|
abort(reason?: Uint8Array): Promise<void>;
|
272
286
|
close(): Promise<void>;
|
273
287
|
getWriter(): WritableStreamDefaultWriter<Uint8Array>;
|
274
|
-
Logs(): any[];
|
288
|
+
Logs(notJsonLine?: boolean): any[];
|
275
289
|
}
|
276
290
|
|
277
291
|
interface MockLoggerReturn {
|
@@ -285,6 +299,19 @@ declare function MockLogger(params?: {
|
|
285
299
|
readonly disableDebug?: boolean;
|
286
300
|
}): MockLoggerReturn;
|
287
301
|
|
302
|
+
declare class LevelHandlerImpl implements LevelHandler {
|
303
|
+
readonly _globalLevels: Set<Level>;
|
304
|
+
readonly _modules: Map<string, Set<Level>>;
|
305
|
+
isStackExposed: boolean;
|
306
|
+
enableLevel(level: Level, ...modules: string[]): void;
|
307
|
+
disableLevel(level: Level, ...modules: string[]): void;
|
308
|
+
setExposeStack(enable?: boolean): void;
|
309
|
+
forModules(level: Level, fnAction: (p: string) => void, ...modules: (string | string[])[]): void;
|
310
|
+
setDebug(...modules: (string | string[])[]): void;
|
311
|
+
isEnabled(ilevel: unknown, module: unknown): boolean;
|
312
|
+
}
|
313
|
+
declare function LevelHandlerSingleton(): LevelHandler;
|
314
|
+
|
288
315
|
declare abstract class Option<T> {
|
289
316
|
static Some<T>(t: T): Option<T>;
|
290
317
|
static None<T>(): Option<T>;
|
@@ -344,6 +371,7 @@ declare class Keyed<T extends {
|
|
344
371
|
constructor(factory: (key: K) => T);
|
345
372
|
asyncGet(key: () => Promise<K>): Promise<T>;
|
346
373
|
get(key: K | (() => K)): T;
|
374
|
+
unget(key: K): void;
|
347
375
|
reset(): void;
|
348
376
|
}
|
349
377
|
declare class KeyedResolvOnce<T, K = string> extends Keyed<ResolveOnce<T, K>, K> {
|
@@ -435,4 +463,7 @@ interface CryptoRuntime {
|
|
435
463
|
}
|
436
464
|
declare function toCryptoRuntime(cryptoOpts?: Partial<CryptoRuntime>): CryptoRuntime;
|
437
465
|
|
438
|
-
|
466
|
+
declare function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size?: number): void;
|
467
|
+
declare function bin2string(hex: ArrayBufferView, size?: number): string;
|
468
|
+
|
469
|
+
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 CoerceURI, type CryptoRuntime, type FnSerialized, Future, IsLogger, JSONFormatter, Keyed, KeyedResolvOnce, KeyedResolvSeq, type Lengthed, Level, type LevelHandler, LevelHandlerImpl, LevelHandlerSingleton, LogCollector, type LogFormatter, type LogSerializable, LogValue, type LogValueArg, LogWriteStream, type Logger, LoggerImpl, type LoggerImplParams, type LoggerInterface, MockLogger, type MockLoggerReturn, MutableURL, None, Option, ResolveOnce, ResolveSeq, Result, ResultError, ResultOK, type Runtime, type Serialized, type SizeOrLength, type Sized, Some, SysAbstraction, TxtEnDecoder, URI, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, isURL, logValue, protocols, removeSelfRef, runtimeFn, toCryptoRuntime };
|