@adviser/cement 0.3.14 → 0.3.15
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.
- package/{base-sys-abstraction-8v83VyEU.d.ts → base-sys-abstraction-BnBZ6zd0.d.ts} +2 -2
- package/{base-sys-abstraction-4Vw4QGaI.d.cts → base-sys-abstraction-DAZ8tx5F.d.cts} +2 -2
- package/cf/index.cjs +46 -18
- package/cf/index.cjs.map +1 -1
- package/cf/index.d.cts +3 -3
- package/cf/index.d.ts +3 -3
- package/cf/index.js +3 -3
- package/{chunk-W53WEZWY.js → chunk-55W4AK2Z.js} +3 -5
- package/{chunk-W53WEZWY.js.map → chunk-55W4AK2Z.js.map} +1 -1
- package/{chunk-22GI5ETU.js → chunk-H3CAVBMO.js} +41 -42
- package/chunk-H3CAVBMO.js.map +1 -0
- package/{chunk-A57BAYWU.js → chunk-LXTKPZ6M.js} +10 -8
- package/chunk-LXTKPZ6M.js.map +1 -0
- package/{chunk-KY47QBK3.js → chunk-WGRZHIFK.js} +155 -152
- package/chunk-WGRZHIFK.js.map +1 -0
- package/{chunk-GLUGMVET.js → chunk-Z3IR6QEZ.js} +3 -3
- package/deno/index.cjs +46 -18
- package/deno/index.cjs.map +1 -1
- package/deno/index.d.cts +3 -3
- package/deno/index.d.ts +3 -3
- package/deno/index.js +2 -2
- package/{get-params-result-C2cbgB78.d.ts → get-params-result-4xHM5s4_.d.cts} +14 -10
- package/{get-params-result-C2cbgB78.d.cts → get-params-result-4xHM5s4_.d.ts} +14 -10
- package/index-CMLb7JSe.d.ts +97 -0
- package/{index-DixRvifF.d.cts → index-Cp1NspHH.d.cts} +10 -10
- package/{index-D2WPDt4R.d.ts → index-D1j1fPYg.d.ts} +10 -10
- package/index-LQOsS7gM.d.cts +97 -0
- package/index.cjs +317 -317
- package/index.cjs.map +1 -1
- package/index.d.cts +9 -11
- package/index.d.ts +9 -11
- package/index.js +35 -40
- package/index.js.map +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/node/index.cjs +46 -18
- package/node/index.cjs.map +1 -1
- package/node/index.d.cts +3 -3
- package/node/index.d.ts +3 -3
- package/node/index.js +2 -2
- package/package.json +5 -4
- package/src/index.ts +3 -2
- package/src/jsr.json +1 -1
- package/src/logger.ts +8 -6
- package/src/sys-abstraction.ts +18 -15
- package/src/time.ts +7 -9
- package/src/types.ts +19 -0
- package/src/uri.ts +4 -3
- package/src/utils/get-params-result.ts +2 -18
- package/src/utils/relative-path.ts +8 -6
- package/{sys-abstraction-3OXhCVsu.d.cts → sys-abstraction-B0x6IE7r.d.ts} +27 -23
- package/{sys-abstraction-DXeSUn9x.d.ts → sys-abstraction-BTs3Vzy4.d.cts} +27 -23
- package/test/index.cjs +87 -46
- package/test/index.cjs.map +1 -1
- package/test/index.d.cts +3 -3
- package/test/index.d.ts +3 -3
- package/test/index.js +4 -4
- package/ts/src/index.d.ts +1 -2
- package/ts/src/index.d.ts.map +1 -1
- package/ts/src/index.js +1 -2
- package/ts/src/index.js.map +1 -1
- package/ts/src/logger.d.ts +7 -6
- package/ts/src/logger.d.ts.map +1 -1
- package/ts/src/logger.js +6 -7
- package/ts/src/logger.js.map +1 -1
- package/ts/src/sys-abstraction.d.ts +18 -15
- package/ts/src/sys-abstraction.d.ts.map +1 -1
- package/ts/src/sys-abstraction.js +15 -18
- package/ts/src/sys-abstraction.js.map +1 -1
- package/ts/src/sys-env.test.js +1 -2
- package/ts/src/sys-env.test.js.map +1 -1
- package/ts/src/time.d.ts +7 -6
- package/ts/src/time.d.ts.map +1 -1
- package/ts/src/time.js +6 -7
- package/ts/src/time.js.map +1 -1
- package/ts/src/types.d.ts +16 -0
- package/ts/src/types.d.ts.map +1 -0
- package/ts/src/types.js +15 -0
- package/ts/src/types.js.map +1 -0
- package/ts/src/uri.d.ts +0 -1
- package/ts/src/uri.d.ts.map +1 -1
- package/ts/src/uri.js +1 -2
- package/ts/src/uri.js.map +1 -1
- package/ts/src/utils/get-params-result.d.ts +2 -13
- package/ts/src/utils/get-params-result.d.ts.map +1 -1
- package/ts/src/utils/get-params-result.js +1 -14
- package/ts/src/utils/get-params-result.js.map +1 -1
- package/ts/src/utils/relative-path.d.ts +7 -6
- package/ts/src/utils/relative-path.d.ts.map +1 -1
- package/ts/src/utils/relative-path.js +6 -7
- package/ts/src/utils/relative-path.js.map +1 -1
- package/utils/index.cjs +9 -9
- package/utils/index.cjs.map +1 -1
- package/utils/index.d.cts +2 -2
- package/utils/index.d.ts +2 -2
- package/utils/index.js +3 -5
- package/web/index.cjs +46 -18
- package/web/index.cjs.map +1 -1
- package/web/index.d.cts +3 -3
- package/web/index.d.ts +3 -3
- package/web/index.js +3 -3
- package/chunk-22GI5ETU.js.map +0 -1
- package/chunk-A57BAYWU.js.map +0 -1
- package/chunk-KY47QBK3.js.map +0 -1
- package/index-Dpc3oVOD.d.cts +0 -99
- package/index-MWn9Xel9.d.ts +0 -99
- /package/{chunk-GLUGMVET.js.map → chunk-Z3IR6QEZ.js.map} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { K as KeysParam, R as Result } from './get-params-result-
|
1
|
+
import { K as KeysParam, R as Result } from './get-params-result-4xHM5s4_.js';
|
2
2
|
|
3
3
|
interface NamedWritableStream {
|
4
4
|
readonly name: string;
|
@@ -66,28 +66,32 @@ declare abstract class Time {
|
|
66
66
|
TimeSince(start: Date): Duration;
|
67
67
|
}
|
68
68
|
type Duration = number;
|
69
|
-
declare
|
70
|
-
Microsecond
|
71
|
-
Second
|
72
|
-
Minute
|
73
|
-
Hour
|
74
|
-
}
|
69
|
+
declare const TimeUnits: {
|
70
|
+
Microsecond: number;
|
71
|
+
Second: number;
|
72
|
+
Minute: number;
|
73
|
+
Hour: number;
|
74
|
+
};
|
75
|
+
type TimeUnit = keyof typeof TimeUnits;
|
75
76
|
|
76
|
-
declare
|
77
|
-
REAL
|
78
|
-
CONST
|
79
|
-
STEP
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
77
|
+
declare const TimeMode: {
|
78
|
+
REAL: string;
|
79
|
+
CONST: string;
|
80
|
+
STEP: string;
|
81
|
+
};
|
82
|
+
type TimeMode = (typeof TimeMode)[keyof typeof TimeMode];
|
83
|
+
declare const RandomMode: {
|
84
|
+
CONST: string;
|
85
|
+
STEP: string;
|
86
|
+
RANDOM: string;
|
87
|
+
};
|
88
|
+
type RandomMode = (typeof RandomMode)[keyof typeof RandomMode];
|
89
|
+
declare const IDMode: {
|
90
|
+
UUID: string;
|
91
|
+
CONST: string;
|
92
|
+
STEP: string;
|
93
|
+
};
|
94
|
+
type IDMode = (typeof IDMode)[keyof typeof IDMode];
|
91
95
|
declare function String2TimeMode(s?: string): TimeMode;
|
92
96
|
type VoidFunc = () => void | Promise<void>;
|
93
97
|
interface SystemService {
|
@@ -106,4 +110,4 @@ interface SysAbstraction {
|
|
106
110
|
FileSystem(): FileService;
|
107
111
|
}
|
108
112
|
|
109
|
-
export { type Duration as D, type Env as E, type FileService as F, IDMode as I, type NamedWritableStream as N, type OnSetItem as O, RandomMode as R, type SysAbstraction as S, Time as T, type VoidFunc as V, TimeMode as a, type SystemService as b, type EnvActions as c, EnvImpl as d, type EnvFactoryOpts as e, String2TimeMode as f, type EnvTuple as g, type EnvMap as h, type EnvFactoryFn as i, envFactory as j, TimeUnits as k, registerEnvAction as r };
|
113
|
+
export { type Duration as D, type Env as E, type FileService as F, IDMode as I, type NamedWritableStream as N, type OnSetItem as O, RandomMode as R, type SysAbstraction as S, Time as T, type VoidFunc as V, TimeMode as a, type SystemService as b, type EnvActions as c, EnvImpl as d, type EnvFactoryOpts as e, String2TimeMode as f, type EnvTuple as g, type EnvMap as h, type EnvFactoryFn as i, envFactory as j, TimeUnits as k, type TimeUnit as l, registerEnvAction as r };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { K as KeysParam, R as Result } from './get-params-result-
|
1
|
+
import { K as KeysParam, R as Result } from './get-params-result-4xHM5s4_.cjs';
|
2
2
|
|
3
3
|
interface NamedWritableStream {
|
4
4
|
readonly name: string;
|
@@ -66,28 +66,32 @@ declare abstract class Time {
|
|
66
66
|
TimeSince(start: Date): Duration;
|
67
67
|
}
|
68
68
|
type Duration = number;
|
69
|
-
declare
|
70
|
-
Microsecond
|
71
|
-
Second
|
72
|
-
Minute
|
73
|
-
Hour
|
74
|
-
}
|
69
|
+
declare const TimeUnits: {
|
70
|
+
Microsecond: number;
|
71
|
+
Second: number;
|
72
|
+
Minute: number;
|
73
|
+
Hour: number;
|
74
|
+
};
|
75
|
+
type TimeUnit = keyof typeof TimeUnits;
|
75
76
|
|
76
|
-
declare
|
77
|
-
REAL
|
78
|
-
CONST
|
79
|
-
STEP
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
77
|
+
declare const TimeMode: {
|
78
|
+
REAL: string;
|
79
|
+
CONST: string;
|
80
|
+
STEP: string;
|
81
|
+
};
|
82
|
+
type TimeMode = (typeof TimeMode)[keyof typeof TimeMode];
|
83
|
+
declare const RandomMode: {
|
84
|
+
CONST: string;
|
85
|
+
STEP: string;
|
86
|
+
RANDOM: string;
|
87
|
+
};
|
88
|
+
type RandomMode = (typeof RandomMode)[keyof typeof RandomMode];
|
89
|
+
declare const IDMode: {
|
90
|
+
UUID: string;
|
91
|
+
CONST: string;
|
92
|
+
STEP: string;
|
93
|
+
};
|
94
|
+
type IDMode = (typeof IDMode)[keyof typeof IDMode];
|
91
95
|
declare function String2TimeMode(s?: string): TimeMode;
|
92
96
|
type VoidFunc = () => void | Promise<void>;
|
93
97
|
interface SystemService {
|
@@ -106,4 +110,4 @@ interface SysAbstraction {
|
|
106
110
|
FileSystem(): FileService;
|
107
111
|
}
|
108
112
|
|
109
|
-
export { type Duration as D, type Env as E, type FileService as F, IDMode as I, type NamedWritableStream as N, type OnSetItem as O, RandomMode as R, type SysAbstraction as S, Time as T, type VoidFunc as V, TimeMode as a, type SystemService as b, type EnvActions as c, EnvImpl as d, type EnvFactoryOpts as e, String2TimeMode as f, type EnvTuple as g, type EnvMap as h, type EnvFactoryFn as i, envFactory as j, TimeUnits as k, registerEnvAction as r };
|
113
|
+
export { type Duration as D, type Env as E, type FileService as F, IDMode as I, type NamedWritableStream as N, type OnSetItem as O, RandomMode as R, type SysAbstraction as S, Time as T, type VoidFunc as V, TimeMode as a, type SystemService as b, type EnvActions as c, EnvImpl as d, type EnvFactoryOpts as e, String2TimeMode as f, type EnvTuple as g, type EnvMap as h, type EnvFactoryFn as i, envFactory as j, TimeUnits as k, type TimeUnit as l, registerEnvAction as r };
|
package/test/index.cjs
CHANGED
@@ -381,6 +381,12 @@ function bin2string(hex, size = 0) {
|
|
381
381
|
}
|
382
382
|
|
383
383
|
// src/logger.ts
|
384
|
+
var Level = {
|
385
|
+
WARN: "warn",
|
386
|
+
DEBUG: "debug",
|
387
|
+
INFO: "info",
|
388
|
+
ERROR: "error"
|
389
|
+
};
|
384
390
|
var LogValue = class {
|
385
391
|
constructor(fn) {
|
386
392
|
this.fn = fn;
|
@@ -551,7 +557,7 @@ var None = class extends Option {
|
|
551
557
|
// src/log-level-impl.ts
|
552
558
|
var LevelHandlerImpl = class {
|
553
559
|
constructor() {
|
554
|
-
this._globalLevels = /* @__PURE__ */ new Set([
|
560
|
+
this._globalLevels = /* @__PURE__ */ new Set([Level.INFO, Level.ERROR, Level.WARN]);
|
555
561
|
this._modules = /* @__PURE__ */ new Map();
|
556
562
|
this.ignoreAttr = Option.Some(/^_/);
|
557
563
|
this.isStackExposed = false;
|
@@ -601,9 +607,9 @@ var LevelHandlerImpl = class {
|
|
601
607
|
}
|
602
608
|
setDebug(...modules) {
|
603
609
|
this.forModules(
|
604
|
-
|
610
|
+
Level.DEBUG,
|
605
611
|
(p) => {
|
606
|
-
this._modules.set(p, /* @__PURE__ */ new Set([...this._globalLevels,
|
612
|
+
this._modules.set(p, /* @__PURE__ */ new Set([...this._globalLevels, Level.DEBUG]));
|
607
613
|
},
|
608
614
|
...modules
|
609
615
|
);
|
@@ -636,6 +642,23 @@ function LevelHandlerSingleton() {
|
|
636
642
|
// src/logger-impl.ts
|
637
643
|
var import_yaml = __toESM(require("yaml"), 1);
|
638
644
|
|
645
|
+
// src/sys-abstraction.ts
|
646
|
+
var TimeMode = {
|
647
|
+
REAL: "real",
|
648
|
+
CONST: "const",
|
649
|
+
STEP: "step"
|
650
|
+
};
|
651
|
+
var RandomMode = {
|
652
|
+
CONST: "const",
|
653
|
+
STEP: "step",
|
654
|
+
RANDOM: "random"
|
655
|
+
};
|
656
|
+
var IDMode = {
|
657
|
+
UUID: "uuid",
|
658
|
+
CONST: "const",
|
659
|
+
STEP: "step"
|
660
|
+
};
|
661
|
+
|
639
662
|
// src/time.ts
|
640
663
|
var Time = class {
|
641
664
|
TimeSince(start) {
|
@@ -643,6 +666,15 @@ var Time = class {
|
|
643
666
|
return now.getTime() - start.getTime();
|
644
667
|
}
|
645
668
|
};
|
669
|
+
var TimeUnits = {
|
670
|
+
Microsecond: 1,
|
671
|
+
Second: 1e3 * 1,
|
672
|
+
//Microsecond,
|
673
|
+
Minute: 60 * 1e3 * 1,
|
674
|
+
//Second,
|
675
|
+
Hour: 60 * 60 * 1e3 * 1
|
676
|
+
// Minute,
|
677
|
+
};
|
646
678
|
|
647
679
|
// src/base-sys-abstraction.ts
|
648
680
|
var SysTime = class extends Time {
|
@@ -688,11 +720,11 @@ var StepTime = class extends Time {
|
|
688
720
|
};
|
689
721
|
function TimeFactory(timeMode) {
|
690
722
|
switch (timeMode) {
|
691
|
-
case
|
723
|
+
case TimeMode.REAL:
|
692
724
|
return new SysTime();
|
693
|
-
case
|
725
|
+
case TimeMode.CONST:
|
694
726
|
return new ConstTime();
|
695
|
-
case
|
727
|
+
case TimeMode.STEP:
|
696
728
|
return new StepTime();
|
697
729
|
}
|
698
730
|
return new SysTime();
|
@@ -704,12 +736,12 @@ var RandomService = class {
|
|
704
736
|
}
|
705
737
|
Random0ToValue(value) {
|
706
738
|
switch (this._mode) {
|
707
|
-
case
|
739
|
+
case RandomMode.CONST:
|
708
740
|
return 0.5 * value;
|
709
|
-
case
|
741
|
+
case RandomMode.STEP:
|
710
742
|
this._step += 1e-4;
|
711
743
|
return this._step * value;
|
712
|
-
case
|
744
|
+
case RandomMode.RANDOM:
|
713
745
|
return Math.random() * value;
|
714
746
|
default:
|
715
747
|
throw new Error("Unknown RandomMode");
|
@@ -720,17 +752,17 @@ var IdService = class {
|
|
720
752
|
constructor(mode) {
|
721
753
|
this._step = 0;
|
722
754
|
if (!mode) {
|
723
|
-
mode =
|
755
|
+
mode = IDMode.UUID;
|
724
756
|
}
|
725
757
|
this._mode = mode;
|
726
758
|
}
|
727
759
|
NextId() {
|
728
760
|
switch (this._mode) {
|
729
|
-
case
|
761
|
+
case IDMode.UUID:
|
730
762
|
return crypto.randomUUID();
|
731
|
-
case
|
763
|
+
case IDMode.CONST:
|
732
764
|
return "VeryUniqueID";
|
733
|
-
case
|
765
|
+
case IDMode.STEP:
|
734
766
|
return `STEPId-${this._step++}`;
|
735
767
|
default:
|
736
768
|
throw new Error("Unknown IDMode");
|
@@ -760,7 +792,7 @@ var BaseSysAbstraction = class {
|
|
760
792
|
constructor(params) {
|
761
793
|
this._time = new SysTime();
|
762
794
|
this._idService = new IdService();
|
763
|
-
this._randomService = new RandomService(
|
795
|
+
this._randomService = new RandomService(RandomMode.RANDOM);
|
764
796
|
this._fileSystem = params.FileSystem;
|
765
797
|
this._systemService = params.SystemService;
|
766
798
|
this._txtEnDe = params.TxtEnDecoder;
|
@@ -1182,21 +1214,23 @@ var CFEnvActions = class _CFEnvActions {
|
|
1182
1214
|
}
|
1183
1215
|
};
|
1184
1216
|
|
1185
|
-
// src/
|
1186
|
-
var
|
1217
|
+
// src/types.ts
|
1218
|
+
var _Required = class {
|
1187
1219
|
constructor() {
|
1188
|
-
this.
|
1220
|
+
this.type = "REQUIRED";
|
1189
1221
|
}
|
1190
1222
|
};
|
1191
|
-
var
|
1223
|
+
var _Optional = class {
|
1192
1224
|
constructor() {
|
1193
|
-
this.
|
1225
|
+
this.type = "OPTIONAL";
|
1194
1226
|
}
|
1195
1227
|
};
|
1196
1228
|
var param = {
|
1197
|
-
REQUIRED: new
|
1198
|
-
OPTIONAL: new
|
1229
|
+
REQUIRED: new _Required(),
|
1230
|
+
OPTIONAL: new _Optional()
|
1199
1231
|
};
|
1232
|
+
|
1233
|
+
// src/utils/get-params-result.ts
|
1200
1234
|
function getParamsResult(keys, getParam) {
|
1201
1235
|
const keyDef = keys.flat().reduce(
|
1202
1236
|
(acc, i) => {
|
@@ -1454,6 +1488,13 @@ function WebSysAbstraction(param2) {
|
|
1454
1488
|
}
|
1455
1489
|
|
1456
1490
|
// src/utils/relative-path.ts
|
1491
|
+
var PartType = {
|
1492
|
+
Slash: 1,
|
1493
|
+
Root: 3,
|
1494
|
+
Up: 4,
|
1495
|
+
Noop: 8
|
1496
|
+
// RootUp = 0x8 /* ../ */,
|
1497
|
+
};
|
1457
1498
|
var Path = class {
|
1458
1499
|
constructor(parts = []) {
|
1459
1500
|
this.parts = parts;
|
@@ -1464,10 +1505,10 @@ var Path = class {
|
|
1464
1505
|
return part;
|
1465
1506
|
} else {
|
1466
1507
|
switch (part) {
|
1467
|
-
case
|
1468
|
-
case
|
1508
|
+
case PartType.Slash:
|
1509
|
+
case PartType.Root:
|
1469
1510
|
return "/";
|
1470
|
-
case
|
1511
|
+
case PartType.Up:
|
1471
1512
|
return "..";
|
1472
1513
|
default:
|
1473
1514
|
return part;
|
@@ -1476,22 +1517,22 @@ var Path = class {
|
|
1476
1517
|
}).join("");
|
1477
1518
|
}
|
1478
1519
|
add(part) {
|
1479
|
-
if (this.parts.includes(
|
1520
|
+
if (this.parts.includes(PartType.Root) && part === PartType.Root) {
|
1480
1521
|
throw new Error("Cannot add absolute part to absolute path");
|
1481
1522
|
}
|
1482
1523
|
const last = this.parts[this.parts.length - 1];
|
1483
|
-
if (last &
|
1524
|
+
if (last & PartType.Slash && part === PartType.Slash) {
|
1484
1525
|
return;
|
1485
1526
|
}
|
1486
1527
|
switch (part) {
|
1487
1528
|
case ".":
|
1488
|
-
this.parts.push(
|
1529
|
+
this.parts.push(PartType.Noop);
|
1489
1530
|
return;
|
1490
1531
|
case "..":
|
1491
|
-
part =
|
1532
|
+
part = PartType.Up;
|
1492
1533
|
}
|
1493
|
-
if (last ===
|
1494
|
-
if (last ===
|
1534
|
+
if (last === PartType.Noop && part === PartType.Slash) {
|
1535
|
+
if (last === PartType.Noop) {
|
1495
1536
|
this.parts.pop();
|
1496
1537
|
}
|
1497
1538
|
return;
|
@@ -1507,9 +1548,9 @@ function splitPath(path) {
|
|
1507
1548
|
for (let count = 0; path.length; count++) {
|
1508
1549
|
if (path.match(/^\/+/)) {
|
1509
1550
|
if (count === 0) {
|
1510
|
-
p.add(
|
1551
|
+
p.add(PartType.Root);
|
1511
1552
|
} else {
|
1512
|
-
p.add(
|
1553
|
+
p.add(PartType.Slash);
|
1513
1554
|
}
|
1514
1555
|
path = path.replace(/^\/+/, "");
|
1515
1556
|
} else {
|
@@ -1543,7 +1584,7 @@ function pathJoin(...paths) {
|
|
1543
1584
|
function relativePath(path, relative) {
|
1544
1585
|
const relativeParts = splitPath(relative);
|
1545
1586
|
let result;
|
1546
|
-
if (relativeParts.parts[0] ===
|
1587
|
+
if (relativeParts.parts[0] === PartType.Root) {
|
1547
1588
|
result = relative;
|
1548
1589
|
} else {
|
1549
1590
|
result = pathJoin(path, relative);
|
@@ -1553,13 +1594,13 @@ function relativePath(path, relative) {
|
|
1553
1594
|
let topUp = false;
|
1554
1595
|
for (const part of unoptPath.parts) {
|
1555
1596
|
switch (part) {
|
1556
|
-
case
|
1557
|
-
out.push(
|
1597
|
+
case PartType.Root:
|
1598
|
+
out.push(PartType.Root);
|
1558
1599
|
break;
|
1559
|
-
case
|
1600
|
+
case PartType.Up:
|
1560
1601
|
if (out.length && !topUp) {
|
1561
1602
|
const last = out.length - 1;
|
1562
|
-
if (typeof out[last] === "string" && out[last - 1] ==
|
1603
|
+
if (typeof out[last] === "string" && out[last - 1] == PartType.Root) {
|
1563
1604
|
out.pop();
|
1564
1605
|
} else {
|
1565
1606
|
out.pop();
|
@@ -1567,15 +1608,15 @@ function relativePath(path, relative) {
|
|
1567
1608
|
}
|
1568
1609
|
if (out.length === 0) {
|
1569
1610
|
topUp = !topUp ? true : topUp;
|
1570
|
-
out.push(
|
1611
|
+
out.push(PartType.Up);
|
1571
1612
|
}
|
1572
1613
|
} else {
|
1573
|
-
out.push(
|
1614
|
+
out.push(PartType.Up);
|
1574
1615
|
}
|
1575
1616
|
break;
|
1576
|
-
case
|
1577
|
-
if (!(out[out.length - 1] &
|
1578
|
-
out.push(
|
1617
|
+
case PartType.Slash:
|
1618
|
+
if (!(out[out.length - 1] & PartType.Slash)) {
|
1619
|
+
out.push(PartType.Slash);
|
1579
1620
|
}
|
1580
1621
|
break;
|
1581
1622
|
default:
|
@@ -2286,22 +2327,22 @@ var LoggerImpl = class _LoggerImpl {
|
|
2286
2327
|
return this;
|
2287
2328
|
}
|
2288
2329
|
Warn() {
|
2289
|
-
this._attributes["level"] = logValue(
|
2330
|
+
this._attributes["level"] = logValue(Level.WARN, toLogValueCtx(this.levelHandler));
|
2290
2331
|
return this;
|
2291
2332
|
}
|
2292
2333
|
Log() {
|
2293
2334
|
return this;
|
2294
2335
|
}
|
2295
2336
|
Debug() {
|
2296
|
-
this._attributes["level"] = logValue(
|
2337
|
+
this._attributes["level"] = logValue(Level.DEBUG, toLogValueCtx(this.levelHandler));
|
2297
2338
|
return this;
|
2298
2339
|
}
|
2299
2340
|
Error() {
|
2300
|
-
this._attributes["level"] = logValue(
|
2341
|
+
this._attributes["level"] = logValue(Level.ERROR, toLogValueCtx(this.levelHandler));
|
2301
2342
|
return this;
|
2302
2343
|
}
|
2303
2344
|
Info() {
|
2304
|
-
this._attributes["level"] = logValue(
|
2345
|
+
this._attributes["level"] = logValue(Level.INFO, toLogValueCtx(this.levelHandler));
|
2305
2346
|
return this;
|
2306
2347
|
}
|
2307
2348
|
Err(err) {
|