@adviser/cement 0.2.27 → 0.2.29
Sign up to get free protection for your applications and to get access to all the features.
- package/{base-sys-abstraction-C9WW3w57.d.cts → base-sys-abstraction-BkEiLHl0.d.ts} +8 -4
- package/{base-sys-abstraction-C9WW3w57.d.ts → base-sys-abstraction-Qj7pkY1N.d.cts} +8 -4
- package/{chunk-OXD3YZZ7.js → chunk-7KFVMTOS.js} +3 -47
- package/chunk-7KFVMTOS.js.map +1 -0
- package/{chunk-P5RXA4C4.js → chunk-GES3MUGV.js} +24 -27
- package/{chunk-LCPYQVWT.js.map → chunk-GES3MUGV.js.map} +1 -1
- package/{chunk-YDIUMYIE.js → chunk-Q65HLCNL.js} +8 -7
- package/chunk-Q65HLCNL.js.map +1 -0
- package/{chunk-DPIL5UIL.js → chunk-WMMUXBDX.js} +6 -2
- package/chunk-WMMUXBDX.js.map +1 -0
- package/{index-Dhb2fQiw.d.cts → index-Q3phXzYr.d.cts} +2 -21
- package/{index-CcsGcehs.d.ts → index-tIGZMHTc.d.ts} +2 -21
- package/index.cjs +265 -7343
- package/index.cjs.map +1 -1
- package/index.d.cts +73 -12
- package/index.d.ts +73 -12
- package/index.js +218 -7265
- package/index.js.map +1 -1
- package/node/index.cjs +220 -39
- package/node/index.cjs.map +1 -1
- package/node/index.d.cts +22 -4
- package/node/index.d.ts +22 -4
- package/node/index.js +201 -25
- package/node/index.js.map +1 -1
- package/package.json +23 -12
- package/src/LICENSE +201 -0
- package/src/README.md +39 -0
- package/src/base-sys-abstraction.test.ts +95 -0
- package/src/base-sys-abstraction.ts +242 -0
- package/src/bin2text.test.ts +59 -0
- package/src/bin2text.ts +47 -0
- package/src/crypto.test.ts +15 -0
- package/src/crypto.ts +125 -0
- package/src/file-service.ts +24 -0
- package/src/future.test.ts +32 -0
- package/src/future.ts +27 -0
- package/src/index.ts +22 -0
- package/src/jsr.json +20 -0
- package/src/log-level-impl.ts +87 -0
- package/src/log-writer-impl.ts +58 -0
- package/src/logger-impl.ts +498 -0
- package/src/logger.test.ts +1132 -0
- package/src/logger.ts +208 -0
- package/src/node/deno-file-service.ts +92 -0
- package/src/node/deno-sys-abstraction.ts +133 -0
- package/src/node/index.ts +4 -0
- package/src/node/mock-file-service.ts +45 -0
- package/src/node/node-file-service.ts +91 -0
- package/src/node/node-sys-abstraction.ts +121 -0
- package/src/option.ts +60 -0
- package/src/resolve-once.test.ts +321 -0
- package/src/resolve-once.ts +179 -0
- package/src/result.test.ts +102 -0
- package/src/result.ts +165 -0
- package/src/runtime.ts +36 -0
- package/src/sys-abstraction.ts +53 -0
- package/src/sys-env.test.ts +53 -0
- package/src/sys-env.ts +216 -0
- package/src/test/log-write-stream.ts +95 -0
- package/src/test/mock-logger.ts +40 -0
- package/src/time.ts +20 -0
- package/src/tracer.test.ts +314 -0
- package/src/tracer.ts +222 -0
- package/src/txt-en-decoder.ts +21 -0
- package/src/uri.test.ts +155 -0
- package/src/uri.ts +421 -0
- package/src/utils/console-write-stream.ts +72 -0
- package/src/utils/fanout-write-stream.ts +32 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/rebuffer.ts +75 -0
- package/src/utils/stream-map.ts +67 -0
- package/src/utils/stream2string.ts +47 -0
- package/src/utils/string2stream.ts +14 -0
- package/src/version.ts +3 -0
- package/src/web/index.ts +1 -0
- package/src/web/web-sys-abstraction.ts +80 -0
- package/ts/base-sys-abstraction.d.ts +84 -0
- package/ts/base-sys-abstraction.d.ts.map +1 -0
- package/ts/base-sys-abstraction.js +178 -0
- package/ts/base-sys-abstraction.js.map +1 -0
- package/ts/base-sys-abstraction.test.d.ts +2 -0
- package/ts/base-sys-abstraction.test.d.ts.map +1 -0
- package/ts/base-sys-abstraction.test.js +82 -0
- package/ts/base-sys-abstraction.test.js.map +1 -0
- package/ts/bin2text.d.ts +3 -0
- package/ts/bin2text.d.ts.map +1 -0
- package/ts/bin2text.js +43 -0
- package/ts/bin2text.js.map +1 -0
- package/ts/bin2text.test.d.ts +2 -0
- package/ts/bin2text.test.d.ts.map +1 -0
- package/ts/bin2text.test.js +51 -0
- package/ts/bin2text.test.js.map +1 -0
- package/ts/crypto.d.ts +76 -0
- package/ts/crypto.d.ts.map +1 -0
- package/ts/crypto.js +22 -0
- package/ts/crypto.js.map +1 -0
- package/ts/crypto.test.d.ts +2 -0
- package/ts/crypto.test.d.ts.map +1 -0
- package/ts/crypto.test.js +14 -0
- package/ts/crypto.test.js.map +1 -0
- package/ts/file-service.d.ts +17 -0
- package/ts/file-service.d.ts.map +1 -0
- package/ts/file-service.js +2 -0
- package/ts/file-service.js.map +1 -0
- package/ts/future.d.ts +8 -0
- package/ts/future.d.ts.map +1 -0
- package/ts/future.js +38 -0
- package/ts/future.js.map +1 -0
- package/ts/future.test.d.ts +2 -0
- package/ts/future.test.d.ts.map +1 -0
- package/ts/future.test.js +28 -0
- package/ts/future.test.js.map +1 -0
- package/ts/index.d.ts +23 -0
- package/ts/index.d.ts.map +1 -0
- package/ts/index.js +23 -0
- package/ts/index.js.map +1 -0
- package/ts/log-level-impl.d.ts +14 -0
- package/ts/log-level-impl.d.ts.map +1 -0
- package/ts/log-level-impl.js +72 -0
- package/ts/log-level-impl.js.map +1 -0
- package/ts/log-writer-impl.d.ts +10 -0
- package/ts/log-writer-impl.d.ts.map +1 -0
- package/ts/log-writer-impl.js +45 -0
- package/ts/log-writer-impl.js.map +1 -0
- package/ts/logger-impl.d.ts +71 -0
- package/ts/logger-impl.d.ts.map +1 -0
- package/ts/logger-impl.js +412 -0
- package/ts/logger-impl.js.map +1 -0
- package/ts/logger.d.ts +84 -0
- package/ts/logger.d.ts.map +1 -0
- package/ts/logger.js +114 -0
- package/ts/logger.js.map +1 -0
- package/ts/logger.test.d.ts +2 -0
- package/ts/logger.test.d.ts.map +1 -0
- package/ts/logger.test.js +1023 -0
- package/ts/logger.test.js.map +1 -0
- package/ts/node/deno-file-service.d.ts +17 -0
- package/ts/node/deno-file-service.d.ts.map +1 -0
- package/ts/node/deno-file-service.js +65 -0
- package/ts/node/deno-file-service.js.map +1 -0
- package/ts/node/deno-sys-abstraction.d.ts +22 -0
- package/ts/node/deno-sys-abstraction.d.ts.map +1 -0
- package/ts/node/deno-sys-abstraction.js +101 -0
- package/ts/node/deno-sys-abstraction.js.map +1 -0
- package/ts/node/index.d.ts +5 -0
- package/ts/node/index.d.ts.map +1 -0
- package/ts/node/index.js +5 -0
- package/ts/node/index.js.map +1 -0
- package/ts/node/mock-file-service.d.ts +11 -0
- package/ts/node/mock-file-service.d.ts.map +1 -0
- package/ts/node/mock-file-service.js +34 -0
- package/ts/node/mock-file-service.js.map +1 -0
- package/ts/node/mock-file-service.test.d.ts +2 -0
- package/ts/node/mock-file-service.test.d.ts.map +1 -0
- package/ts/node/mock-file-service.test.js +31 -0
- package/ts/node/mock-file-service.test.js.map +1 -0
- package/ts/node/node-file-service.d.ts +16 -0
- package/ts/node/node-file-service.d.ts.map +1 -0
- package/ts/node/node-file-service.js +71 -0
- package/ts/node/node-file-service.js.map +1 -0
- package/ts/node/node-sys-abstraction.d.ts +22 -0
- package/ts/node/node-sys-abstraction.d.ts.map +1 -0
- package/ts/node/node-sys-abstraction.js +99 -0
- package/ts/node/node-sys-abstraction.js.map +1 -0
- package/ts/node/node-sys-abstraction.test.d.ts +2 -0
- package/ts/node/node-sys-abstraction.test.d.ts.map +1 -0
- package/ts/node/node-sys-abstraction.test.js +87 -0
- package/ts/node/node-sys-abstraction.test.js.map +1 -0
- package/ts/option.d.ts +25 -0
- package/ts/option.d.ts.map +1 -0
- package/ts/option.js +47 -0
- package/ts/option.js.map +1 -0
- package/ts/resolve-once.d.ts +46 -0
- package/ts/resolve-once.d.ts.map +1 -0
- package/ts/resolve-once.js +152 -0
- package/ts/resolve-once.js.map +1 -0
- package/ts/resolve-once.test.d.ts +2 -0
- package/ts/resolve-once.test.d.ts.map +1 -0
- package/ts/resolve-once.test.js +283 -0
- package/ts/resolve-once.test.js.map +1 -0
- package/ts/result.d.ts +34 -0
- package/ts/result.d.ts.map +1 -0
- package/ts/result.js +85 -0
- package/ts/result.js.map +1 -0
- package/ts/result.test.d.ts +2 -0
- package/ts/result.test.d.ts.map +1 -0
- package/ts/result.test.js +79 -0
- package/ts/result.test.js.map +1 -0
- package/ts/runtime.d.ts +8 -0
- package/ts/runtime.d.ts.map +1 -0
- package/ts/runtime.js +26 -0
- package/ts/runtime.js.map +1 -0
- package/ts/sys-abstraction.d.ts +36 -0
- package/ts/sys-abstraction.d.ts.map +1 -0
- package/ts/sys-abstraction.js +31 -0
- package/ts/sys-abstraction.js.map +1 -0
- package/ts/sys-env.d.ts +48 -0
- package/ts/sys-env.d.ts.map +1 -0
- package/ts/sys-env.js +176 -0
- package/ts/sys-env.js.map +1 -0
- package/ts/sys-env.test.d.ts +2 -0
- package/ts/sys-env.test.d.ts.map +1 -0
- package/ts/sys-env.test.js +51 -0
- package/ts/sys-env.test.js.map +1 -0
- package/ts/test/log-write-stream.d.ts +27 -0
- package/ts/test/log-write-stream.d.ts.map +1 -0
- package/ts/test/log-write-stream.js +74 -0
- package/ts/test/log-write-stream.js.map +1 -0
- package/ts/test/mock-logger.d.ts +14 -0
- package/ts/test/mock-logger.d.ts.map +1 -0
- package/ts/test/mock-logger.js +29 -0
- package/ts/test/mock-logger.js.map +1 -0
- package/ts/test/mock-logger.test.d.ts +2 -0
- package/ts/test/mock-logger.test.d.ts.map +1 -0
- package/ts/test/mock-logger.test.js +63 -0
- package/ts/test/mock-logger.test.js.map +1 -0
- package/ts/test/test-exit-handler.d.ts +2 -0
- package/ts/test/test-exit-handler.d.ts.map +1 -0
- package/ts/test/test-exit-handler.js +57 -0
- package/ts/test/test-exit-handler.js.map +1 -0
- package/ts/time.d.ts +13 -0
- package/ts/time.d.ts.map +1 -0
- package/ts/time.js +14 -0
- package/ts/time.js.map +1 -0
- package/ts/tracer.d.ts +59 -0
- package/ts/tracer.d.ts.map +1 -0
- package/ts/tracer.js +148 -0
- package/ts/tracer.js.map +1 -0
- package/ts/tracer.test.d.ts +2 -0
- package/ts/tracer.test.d.ts.map +1 -0
- package/ts/tracer.test.js +311 -0
- package/ts/tracer.test.js.map +1 -0
- package/ts/txt-en-decoder.d.ts +10 -0
- package/ts/txt-en-decoder.d.ts.map +1 -0
- package/ts/txt-en-decoder.js +15 -0
- package/ts/txt-en-decoder.js.map +1 -0
- package/ts/uri.d.ts +67 -0
- package/ts/uri.d.ts.map +1 -0
- package/ts/uri.js +283 -0
- package/ts/uri.js.map +1 -0
- package/ts/uri.test.d.ts +2 -0
- package/ts/uri.test.d.ts.map +1 -0
- package/ts/uri.test.js +119 -0
- package/ts/uri.test.js.map +1 -0
- package/ts/utils/console-write-stream.d.ts +21 -0
- package/ts/utils/console-write-stream.d.ts.map +1 -0
- package/ts/utils/console-write-stream.js +62 -0
- package/ts/utils/console-write-stream.js.map +1 -0
- package/ts/utils/fanout-write-stream.d.ts +12 -0
- package/ts/utils/fanout-write-stream.d.ts.map +1 -0
- package/ts/utils/fanout-write-stream.js +24 -0
- package/ts/utils/fanout-write-stream.js.map +1 -0
- package/ts/utils/index.d.ts +7 -0
- package/ts/utils/index.d.ts.map +1 -0
- package/ts/utils/index.js +7 -0
- package/ts/utils/index.js.map +1 -0
- package/ts/utils/rebuffer.d.ts +3 -0
- package/ts/utils/rebuffer.d.ts.map +1 -0
- package/ts/utils/rebuffer.js +60 -0
- package/ts/utils/rebuffer.js.map +1 -0
- package/ts/utils/rebuffer.test.d.ts +2 -0
- package/ts/utils/rebuffer.test.d.ts.map +1 -0
- package/ts/utils/rebuffer.test.js +77 -0
- package/ts/utils/rebuffer.test.js.map +1 -0
- package/ts/utils/stream-map.d.ts +9 -0
- package/ts/utils/stream-map.d.ts.map +1 -0
- package/ts/utils/stream-map.js +62 -0
- package/ts/utils/stream-map.js.map +1 -0
- package/ts/utils/stream-map.test.d.ts +2 -0
- package/ts/utils/stream-map.test.d.ts.map +1 -0
- package/ts/utils/stream-map.test.js +87 -0
- package/ts/utils/stream-map.test.js.map +1 -0
- package/ts/utils/stream-test-helper.d.ts +17 -0
- package/ts/utils/stream-test-helper.d.ts.map +1 -0
- package/ts/utils/stream-test-helper.js +37 -0
- package/ts/utils/stream-test-helper.js.map +1 -0
- package/ts/utils/stream2string.d.ts +3 -0
- package/ts/utils/stream2string.d.ts.map +1 -0
- package/ts/utils/stream2string.js +48 -0
- package/ts/utils/stream2string.js.map +1 -0
- package/ts/utils/stream2string.test.d.ts +2 -0
- package/ts/utils/stream2string.test.d.ts.map +1 -0
- package/ts/utils/stream2string.test.js +29 -0
- package/ts/utils/stream2string.test.js.map +1 -0
- package/ts/utils/string2stream.d.ts +4 -0
- package/ts/utils/string2stream.d.ts.map +1 -0
- package/ts/utils/string2stream.js +13 -0
- package/ts/utils/string2stream.js.map +1 -0
- package/ts/utils/string2stream.test.d.ts +2 -0
- package/ts/utils/string2stream.test.d.ts.map +1 -0
- package/ts/utils/string2stream.test.js +6 -0
- package/ts/utils/string2stream.test.js.map +1 -0
- package/ts/version.d.ts +2 -0
- package/ts/version.d.ts.map +1 -0
- package/ts/version.js +4 -0
- package/ts/version.js.map +1 -0
- package/ts/web/index.d.ts +2 -0
- package/ts/web/index.d.ts.map +1 -0
- package/ts/web/index.js +2 -0
- package/ts/web/index.js.map +1 -0
- package/ts/web/web-sys-abstraction.d.ts +4 -0
- package/ts/web/web-sys-abstraction.d.ts.map +1 -0
- package/ts/web/web-sys-abstraction.js +64 -0
- package/ts/web/web-sys-abstraction.js.map +1 -0
- package/utils/index.cjs +0 -42
- package/utils/index.cjs.map +1 -1
- package/utils/index.d.cts +1 -2
- package/utils/index.d.ts +1 -2
- package/utils/index.js +2 -7
- package/web/index.cjs +25 -7
- package/web/index.cjs.map +1 -1
- package/web/index.d.cts +2 -1
- package/web/index.d.ts +2 -1
- package/web/index.js +3 -3
- package/chunk-DPIL5UIL.js.map +0 -1
- package/chunk-LCPYQVWT.js +0 -21
- package/chunk-OXD3YZZ7.js.map +0 -1
- package/chunk-P5RXA4C4.js.map +0 -1
- package/chunk-YDIUMYIE.js.map +0 -1
package/index.d.cts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import { S as SysAbstraction } from './base-sys-abstraction-
|
2
|
-
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration,
|
1
|
+
import { S as SysAbstraction, T as Time } from './base-sys-abstraction-Qj7pkY1N.cjs';
|
2
|
+
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration, f as Env, d as EnvActions, e as EnvFactoryOpts, h 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, b as String2TimeMode, j as SysTime, c as SystemService, l as TimeFactory, a as TimeMode, i as TimeUnits, V as VoidFunc, s as WrapperSysAbstraction, W as WrapperSysAbstractionParams, g as envFactory } from './base-sys-abstraction-Qj7pkY1N.cjs';
|
3
3
|
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
|
-
export { i as utils } from './index-
|
6
|
-
import 'vitest';
|
5
|
+
export { i as utils } from './index-Q3phXzYr.cjs';
|
7
6
|
|
8
7
|
declare abstract class Result<T, E = Error> {
|
9
8
|
static Ok<T = void>(t: T): Result<T, Error>;
|
@@ -65,13 +64,15 @@ declare class BuildURI {
|
|
65
64
|
private constructor();
|
66
65
|
static is(value: unknown): value is BuildURI;
|
67
66
|
static from(strURLUri?: CoerceURI, defaultProtocol?: string): BuildURI;
|
68
|
-
port(p: string):
|
69
|
-
hostname(h: string):
|
70
|
-
protocol(p: string):
|
71
|
-
pathname(p: string):
|
72
|
-
delParam(key: string):
|
73
|
-
defParam(key: string, str: string):
|
74
|
-
setParam(key: string, str: string):
|
67
|
+
port(p: string): BuildURI;
|
68
|
+
hostname(h: string): BuildURI;
|
69
|
+
protocol(p: string): BuildURI;
|
70
|
+
pathname(p: string): BuildURI;
|
71
|
+
delParam(key: string): BuildURI;
|
72
|
+
defParam(key: string, str: string): BuildURI;
|
73
|
+
setParam(key: string, str: string): BuildURI;
|
74
|
+
hasParam(key: string): boolean;
|
75
|
+
getParam(key: string): string | undefined;
|
75
76
|
toString(): string;
|
76
77
|
toJSON(): string;
|
77
78
|
URI(): URI;
|
@@ -339,6 +340,63 @@ declare class None<T> extends Option<T> {
|
|
339
340
|
}
|
340
341
|
type WithoutOption<T> = T extends Option<infer U> ? U : T;
|
341
342
|
|
343
|
+
type TraceCtx = {
|
344
|
+
readonly spanId: string;
|
345
|
+
readonly time: Time;
|
346
|
+
readonly parent: TraceNode;
|
347
|
+
readonly metrics: Map<string, Metric<unknown>>;
|
348
|
+
readonly logger?: Logger;
|
349
|
+
} & Record<string, unknown>;
|
350
|
+
type CleanCtx = {
|
351
|
+
readonly spanId: string;
|
352
|
+
} & Record<string, unknown>;
|
353
|
+
type TraceCtxParam = {
|
354
|
+
readonly spanId: string;
|
355
|
+
} & Partial<{
|
356
|
+
readonly time: Time;
|
357
|
+
readonly parent: TraceNode;
|
358
|
+
readonly logger: Logger;
|
359
|
+
}> & Record<string, unknown>;
|
360
|
+
declare class Metric<T> {
|
361
|
+
value?: T;
|
362
|
+
readonly path: string;
|
363
|
+
constructor(path: string);
|
364
|
+
set(value: T): void;
|
365
|
+
add<R extends number | ArrayLike<T>>(value: R): void;
|
366
|
+
}
|
367
|
+
type MetricMap = Map<string, Metric<unknown>>;
|
368
|
+
declare class Metrics {
|
369
|
+
readonly tracenode: TraceNode;
|
370
|
+
private readonly map;
|
371
|
+
readonly spanRefs: MetricMap;
|
372
|
+
constructor(tracenode: TraceNode);
|
373
|
+
toJSON(): Record<string, unknown>;
|
374
|
+
get<T>(ipath: string): Metric<T>;
|
375
|
+
}
|
376
|
+
interface Invokaction {
|
377
|
+
readonly result: "success" | "error";
|
378
|
+
readonly start: number;
|
379
|
+
readonly end: number;
|
380
|
+
readonly metrics?: Metrics;
|
381
|
+
}
|
382
|
+
type TraceNodeMap = Map<string, TraceNode>;
|
383
|
+
declare class TraceNode {
|
384
|
+
readonly childs: TraceNodeMap;
|
385
|
+
readonly invokations: Invokaction[];
|
386
|
+
readonly spanId: string;
|
387
|
+
readonly ctx: TraceCtx;
|
388
|
+
readonly metrics: Metrics;
|
389
|
+
static root(time: Time, logger?: Logger): TraceNode;
|
390
|
+
constructor(ctx: TraceCtx);
|
391
|
+
getRootPath(rpath?: string[]): string;
|
392
|
+
invokes(): {
|
393
|
+
ctx: CleanCtx;
|
394
|
+
invokations: Invokaction[];
|
395
|
+
};
|
396
|
+
ctxWith(spanId: string, logger?: Logger): TraceCtxParam;
|
397
|
+
span<V extends (trace: TraceNode) => Promise<T> | T, T>(inSpanId: string | TraceCtxParam, fn: V): ReturnType<V>;
|
398
|
+
}
|
399
|
+
|
342
400
|
interface ResolveSeqItem<T, C> {
|
343
401
|
readonly future: Future<T>;
|
344
402
|
readonly fn: (c: C) => Promise<T>;
|
@@ -450,6 +508,7 @@ interface CTArrayBufferView {
|
|
450
508
|
type CTBufferSource = CTArrayBufferView | ArrayBuffer;
|
451
509
|
interface CryptoRuntime {
|
452
510
|
importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
|
511
|
+
exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
|
453
512
|
decrypt(algo: {
|
454
513
|
name: string;
|
455
514
|
iv: Uint8Array;
|
@@ -468,4 +527,6 @@ declare function toCryptoRuntime(cryptoOpts?: Partial<CryptoRuntime>): CryptoRun
|
|
468
527
|
declare function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size?: number): void;
|
469
528
|
declare function bin2string(hex: ArrayBufferView, size?: number): string;
|
470
529
|
|
471
|
-
|
530
|
+
declare const VERSION: string;
|
531
|
+
|
532
|
+
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 Invokaction, 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, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, MutableURL, None, Option, 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, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, isURL, logValue, protocols, removeSelfRef, runtimeFn, toCryptoRuntime };
|
package/index.d.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import { S as SysAbstraction } from './base-sys-abstraction-
|
2
|
-
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration,
|
1
|
+
import { S as SysAbstraction, T as Time } from './base-sys-abstraction-BkEiLHl0.js';
|
2
|
+
export { r as BaseSysAbstraction, o as BaseSysAbstractionParams, B as BrowserEnvActions, C as ConstTime, D as Duration, f as Env, d as EnvActions, e as EnvFactoryOpts, h 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, b as String2TimeMode, j as SysTime, c as SystemService, l as TimeFactory, a as TimeMode, i as TimeUnits, V as VoidFunc, s as WrapperSysAbstraction, W as WrapperSysAbstractionParams, g as envFactory } from './base-sys-abstraction-BkEiLHl0.js';
|
3
3
|
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
|
-
export { i as utils } from './index-
|
6
|
-
import 'vitest';
|
5
|
+
export { i as utils } from './index-tIGZMHTc.js';
|
7
6
|
|
8
7
|
declare abstract class Result<T, E = Error> {
|
9
8
|
static Ok<T = void>(t: T): Result<T, Error>;
|
@@ -65,13 +64,15 @@ declare class BuildURI {
|
|
65
64
|
private constructor();
|
66
65
|
static is(value: unknown): value is BuildURI;
|
67
66
|
static from(strURLUri?: CoerceURI, defaultProtocol?: string): BuildURI;
|
68
|
-
port(p: string):
|
69
|
-
hostname(h: string):
|
70
|
-
protocol(p: string):
|
71
|
-
pathname(p: string):
|
72
|
-
delParam(key: string):
|
73
|
-
defParam(key: string, str: string):
|
74
|
-
setParam(key: string, str: string):
|
67
|
+
port(p: string): BuildURI;
|
68
|
+
hostname(h: string): BuildURI;
|
69
|
+
protocol(p: string): BuildURI;
|
70
|
+
pathname(p: string): BuildURI;
|
71
|
+
delParam(key: string): BuildURI;
|
72
|
+
defParam(key: string, str: string): BuildURI;
|
73
|
+
setParam(key: string, str: string): BuildURI;
|
74
|
+
hasParam(key: string): boolean;
|
75
|
+
getParam(key: string): string | undefined;
|
75
76
|
toString(): string;
|
76
77
|
toJSON(): string;
|
77
78
|
URI(): URI;
|
@@ -339,6 +340,63 @@ declare class None<T> extends Option<T> {
|
|
339
340
|
}
|
340
341
|
type WithoutOption<T> = T extends Option<infer U> ? U : T;
|
341
342
|
|
343
|
+
type TraceCtx = {
|
344
|
+
readonly spanId: string;
|
345
|
+
readonly time: Time;
|
346
|
+
readonly parent: TraceNode;
|
347
|
+
readonly metrics: Map<string, Metric<unknown>>;
|
348
|
+
readonly logger?: Logger;
|
349
|
+
} & Record<string, unknown>;
|
350
|
+
type CleanCtx = {
|
351
|
+
readonly spanId: string;
|
352
|
+
} & Record<string, unknown>;
|
353
|
+
type TraceCtxParam = {
|
354
|
+
readonly spanId: string;
|
355
|
+
} & Partial<{
|
356
|
+
readonly time: Time;
|
357
|
+
readonly parent: TraceNode;
|
358
|
+
readonly logger: Logger;
|
359
|
+
}> & Record<string, unknown>;
|
360
|
+
declare class Metric<T> {
|
361
|
+
value?: T;
|
362
|
+
readonly path: string;
|
363
|
+
constructor(path: string);
|
364
|
+
set(value: T): void;
|
365
|
+
add<R extends number | ArrayLike<T>>(value: R): void;
|
366
|
+
}
|
367
|
+
type MetricMap = Map<string, Metric<unknown>>;
|
368
|
+
declare class Metrics {
|
369
|
+
readonly tracenode: TraceNode;
|
370
|
+
private readonly map;
|
371
|
+
readonly spanRefs: MetricMap;
|
372
|
+
constructor(tracenode: TraceNode);
|
373
|
+
toJSON(): Record<string, unknown>;
|
374
|
+
get<T>(ipath: string): Metric<T>;
|
375
|
+
}
|
376
|
+
interface Invokaction {
|
377
|
+
readonly result: "success" | "error";
|
378
|
+
readonly start: number;
|
379
|
+
readonly end: number;
|
380
|
+
readonly metrics?: Metrics;
|
381
|
+
}
|
382
|
+
type TraceNodeMap = Map<string, TraceNode>;
|
383
|
+
declare class TraceNode {
|
384
|
+
readonly childs: TraceNodeMap;
|
385
|
+
readonly invokations: Invokaction[];
|
386
|
+
readonly spanId: string;
|
387
|
+
readonly ctx: TraceCtx;
|
388
|
+
readonly metrics: Metrics;
|
389
|
+
static root(time: Time, logger?: Logger): TraceNode;
|
390
|
+
constructor(ctx: TraceCtx);
|
391
|
+
getRootPath(rpath?: string[]): string;
|
392
|
+
invokes(): {
|
393
|
+
ctx: CleanCtx;
|
394
|
+
invokations: Invokaction[];
|
395
|
+
};
|
396
|
+
ctxWith(spanId: string, logger?: Logger): TraceCtxParam;
|
397
|
+
span<V extends (trace: TraceNode) => Promise<T> | T, T>(inSpanId: string | TraceCtxParam, fn: V): ReturnType<V>;
|
398
|
+
}
|
399
|
+
|
342
400
|
interface ResolveSeqItem<T, C> {
|
343
401
|
readonly future: Future<T>;
|
344
402
|
readonly fn: (c: C) => Promise<T>;
|
@@ -450,6 +508,7 @@ interface CTArrayBufferView {
|
|
450
508
|
type CTBufferSource = CTArrayBufferView | ArrayBuffer;
|
451
509
|
interface CryptoRuntime {
|
452
510
|
importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
|
511
|
+
exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
|
453
512
|
decrypt(algo: {
|
454
513
|
name: string;
|
455
514
|
iv: Uint8Array;
|
@@ -468,4 +527,6 @@ declare function toCryptoRuntime(cryptoOpts?: Partial<CryptoRuntime>): CryptoRun
|
|
468
527
|
declare function bin2text(hex: ArrayBufferView, lineFn: (line: string) => void, size?: number): void;
|
469
528
|
declare function bin2string(hex: ArrayBufferView, size?: number): string;
|
470
529
|
|
471
|
-
|
530
|
+
declare const VERSION: string;
|
531
|
+
|
532
|
+
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 Invokaction, 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, Metric, type MetricMap, Metrics, MockLogger, type MockLoggerReturn, MutableURL, None, Option, 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, VERSION, type WithLogger, type WithoutOption, type WithoutResult, YAMLFormatter, asyncLogValue, bin2string, bin2text, exception2Result, isURL, logValue, protocols, removeSelfRef, runtimeFn, toCryptoRuntime };
|