@infrab4a/connect 4.9.1 → 4.9.2-beta.1
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/index.cjs.js +17 -17
- package/index.esm.js +18 -18
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -1492,6 +1492,20 @@ exports.DebugNamespaces = void 0;
|
|
|
1492
1492
|
})(exports.DebugNamespaces || (exports.DebugNamespaces = {}));
|
|
1493
1493
|
const Logger = debug.debug(exports.DebugNamespaces.ROOT);
|
|
1494
1494
|
|
|
1495
|
+
class ClassNameHelper {
|
|
1496
|
+
static get(clazz) {
|
|
1497
|
+
if (!clazz)
|
|
1498
|
+
return null;
|
|
1499
|
+
const prototype = Object.getPrototypeOf(clazz);
|
|
1500
|
+
const names = lodash.compact([
|
|
1501
|
+
lodash.get(clazz, 'constructor.name'),
|
|
1502
|
+
lodash.get(prototype, 'constructor.name'),
|
|
1503
|
+
lodash.get(prototype, '__proto__.constructor.name'),
|
|
1504
|
+
]);
|
|
1505
|
+
return names.find((name) => name !== 'class_1');
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1495
1509
|
class ReflectHelper {
|
|
1496
1510
|
static get items() {
|
|
1497
1511
|
return this._items;
|
|
@@ -1672,20 +1686,6 @@ class DebugDecoratorHelper {
|
|
|
1672
1686
|
}
|
|
1673
1687
|
DebugDecoratorHelper.DebugNamingMetadataKey = 'model:naming:decorator';
|
|
1674
1688
|
|
|
1675
|
-
class ClassNameHelper {
|
|
1676
|
-
static get(clazz) {
|
|
1677
|
-
if (!clazz)
|
|
1678
|
-
return null;
|
|
1679
|
-
const prototype = Object.getPrototypeOf(clazz);
|
|
1680
|
-
const names = lodash.compact([
|
|
1681
|
-
lodash.get(clazz, 'constructor.name'),
|
|
1682
|
-
lodash.get(prototype, 'constructor.name'),
|
|
1683
|
-
lodash.get(prototype, '__proto__.constructor.name'),
|
|
1684
|
-
]);
|
|
1685
|
-
return names.find((name) => name !== 'class_1');
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
1689
|
const isDebuggable = (object) => {
|
|
1690
1690
|
return 'debug' in object;
|
|
1691
1691
|
};
|
|
@@ -1754,17 +1754,17 @@ class DebugHelper {
|
|
|
1754
1754
|
return lodash.compact(lodash.flatten(this.entries)).join(':');
|
|
1755
1755
|
}
|
|
1756
1756
|
log(message, ...args) {
|
|
1757
|
-
this.logger(JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1757
|
+
this.logger(typeof message === 'string' ? message : JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1758
1758
|
DebugHelper.logs$.next({ namespace: this.namespace, message, args });
|
|
1759
1759
|
return this;
|
|
1760
1760
|
}
|
|
1761
1761
|
trace(message, ...args) {
|
|
1762
|
-
this.logger.extend(exports.DebugNamespaces.TRACE)(message, ...args);
|
|
1762
|
+
this.logger.extend(exports.DebugNamespaces.TRACE)(typeof message === 'string' ? message : JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1763
1763
|
DebugHelper.traces$.next({ namespace: this.namespace, message, args });
|
|
1764
1764
|
return this;
|
|
1765
1765
|
}
|
|
1766
1766
|
error(error, ...args) {
|
|
1767
|
-
this.logger.extend(exports.DebugNamespaces.ERROR)(JSON.stringify(error), ...args.map((element) => JSON.stringify(element)));
|
|
1767
|
+
this.logger.extend(exports.DebugNamespaces.ERROR)(typeof error === 'string' ? error : JSON.stringify(error), ...args.map((element) => JSON.stringify(element)));
|
|
1768
1768
|
DebugHelper.errors$.next({ namespace: this.namespace, error, args });
|
|
1769
1769
|
return this;
|
|
1770
1770
|
}
|
package/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __decorate, __metadata, __rest } from 'tslib';
|
|
|
4
4
|
import { plainToInstance, instanceToPlain, Type, Expose } from 'class-transformer';
|
|
5
5
|
import { parseISO } from 'date-fns';
|
|
6
6
|
export { add, addBusinessDays, addDays, addMonths, addYears, endOfDay, format, formatISO9075, parseISO, startOfDay, sub } from 'date-fns';
|
|
7
|
-
import { isNil, isArray as isArray$1, first, last, flatten,
|
|
7
|
+
import { compact, get, isNil, isArray as isArray$1, first, last, flatten, isString, each, unset, isObject as isObject$1, set, isNumber, chunk, isEmpty, isDate, isBoolean, isInteger, isNaN as isNaN$1, sortBy, omit } from 'lodash';
|
|
8
8
|
export { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
9
9
|
import { debug } from 'debug';
|
|
10
10
|
import { CustomError } from 'ts-custom-error';
|
|
@@ -1468,6 +1468,20 @@ var DebugNamespaces;
|
|
|
1468
1468
|
})(DebugNamespaces || (DebugNamespaces = {}));
|
|
1469
1469
|
const Logger = debug(DebugNamespaces.ROOT);
|
|
1470
1470
|
|
|
1471
|
+
class ClassNameHelper {
|
|
1472
|
+
static get(clazz) {
|
|
1473
|
+
if (!clazz)
|
|
1474
|
+
return null;
|
|
1475
|
+
const prototype = Object.getPrototypeOf(clazz);
|
|
1476
|
+
const names = compact([
|
|
1477
|
+
get(clazz, 'constructor.name'),
|
|
1478
|
+
get(prototype, 'constructor.name'),
|
|
1479
|
+
get(prototype, '__proto__.constructor.name'),
|
|
1480
|
+
]);
|
|
1481
|
+
return names.find((name) => name !== 'class_1');
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1471
1485
|
class ReflectHelper {
|
|
1472
1486
|
static get items() {
|
|
1473
1487
|
return this._items;
|
|
@@ -1648,20 +1662,6 @@ class DebugDecoratorHelper {
|
|
|
1648
1662
|
}
|
|
1649
1663
|
DebugDecoratorHelper.DebugNamingMetadataKey = 'model:naming:decorator';
|
|
1650
1664
|
|
|
1651
|
-
class ClassNameHelper {
|
|
1652
|
-
static get(clazz) {
|
|
1653
|
-
if (!clazz)
|
|
1654
|
-
return null;
|
|
1655
|
-
const prototype = Object.getPrototypeOf(clazz);
|
|
1656
|
-
const names = compact([
|
|
1657
|
-
get(clazz, 'constructor.name'),
|
|
1658
|
-
get(prototype, 'constructor.name'),
|
|
1659
|
-
get(prototype, '__proto__.constructor.name'),
|
|
1660
|
-
]);
|
|
1661
|
-
return names.find((name) => name !== 'class_1');
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
1665
|
const isDebuggable = (object) => {
|
|
1666
1666
|
return 'debug' in object;
|
|
1667
1667
|
};
|
|
@@ -1730,17 +1730,17 @@ class DebugHelper {
|
|
|
1730
1730
|
return compact(flatten(this.entries)).join(':');
|
|
1731
1731
|
}
|
|
1732
1732
|
log(message, ...args) {
|
|
1733
|
-
this.logger(JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1733
|
+
this.logger(typeof message === 'string' ? message : JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1734
1734
|
DebugHelper.logs$.next({ namespace: this.namespace, message, args });
|
|
1735
1735
|
return this;
|
|
1736
1736
|
}
|
|
1737
1737
|
trace(message, ...args) {
|
|
1738
|
-
this.logger.extend(DebugNamespaces.TRACE)(message, ...args);
|
|
1738
|
+
this.logger.extend(DebugNamespaces.TRACE)(typeof message === 'string' ? message : JSON.stringify(message), ...args.map((element) => JSON.stringify(element)));
|
|
1739
1739
|
DebugHelper.traces$.next({ namespace: this.namespace, message, args });
|
|
1740
1740
|
return this;
|
|
1741
1741
|
}
|
|
1742
1742
|
error(error, ...args) {
|
|
1743
|
-
this.logger.extend(DebugNamespaces.ERROR)(JSON.stringify(error), ...args.map((element) => JSON.stringify(element)));
|
|
1743
|
+
this.logger.extend(DebugNamespaces.ERROR)(typeof error === 'string' ? error : JSON.stringify(error), ...args.map((element) => JSON.stringify(element)));
|
|
1744
1744
|
DebugHelper.errors$.next({ namespace: this.namespace, error, args });
|
|
1745
1745
|
return this;
|
|
1746
1746
|
}
|