@tsed/core 6.69.0 → 6.70.0
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/lib/domain/AnyToPromise.d.ts +1 -1
- package/lib/index.js +14 -29
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +15 -29
- package/lib/index.modern.js.map +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/package.json +2 -3
- package/lib/utils/path/normalizePath.d.ts +0 -2
package/lib/index.modern.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import { join } from 'path';
|
|
3
2
|
|
|
4
3
|
function catchError(cb) {
|
|
5
4
|
try {
|
|
@@ -802,12 +801,14 @@ function getValue(...args) {
|
|
|
802
801
|
const keys = expression.split(separator);
|
|
803
802
|
|
|
804
803
|
const getValue = key => {
|
|
805
|
-
if (scope
|
|
806
|
-
|
|
807
|
-
|
|
804
|
+
if (scope) {
|
|
805
|
+
if (scope[key] !== undefined || key in scope) {
|
|
806
|
+
return scope[key];
|
|
807
|
+
}
|
|
808
808
|
|
|
809
|
-
|
|
810
|
-
|
|
809
|
+
if (isFunction(scope.get)) {
|
|
810
|
+
return scope.get(key);
|
|
811
|
+
}
|
|
811
812
|
}
|
|
812
813
|
};
|
|
813
814
|
|
|
@@ -949,21 +950,6 @@ function toMap(input, keyOrFn) {
|
|
|
949
950
|
}, new Map());
|
|
950
951
|
}
|
|
951
952
|
|
|
952
|
-
const fixPath = require("normalize-path");
|
|
953
|
-
|
|
954
|
-
function normalizePath(item, ...paths) {
|
|
955
|
-
if (isString(item)) {
|
|
956
|
-
const path = join(item, ...paths);
|
|
957
|
-
return fixPath(path);
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
if (isArray(item)) {
|
|
961
|
-
return item.map(item => normalizePath(item));
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
return item;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
953
|
class Entity {
|
|
968
954
|
constructor({
|
|
969
955
|
target,
|
|
@@ -1970,14 +1956,14 @@ class AnyToPromise {
|
|
|
1970
1956
|
});
|
|
1971
1957
|
}
|
|
1972
1958
|
|
|
1973
|
-
|
|
1959
|
+
isDone() {
|
|
1974
1960
|
return this.status !== AnyToPromiseStatus.PENDING;
|
|
1975
1961
|
}
|
|
1976
1962
|
|
|
1977
1963
|
get next() {
|
|
1978
1964
|
_classPrivateFieldLooseBase(this, _hasNextFunction)[_hasNextFunction] = true;
|
|
1979
1965
|
return error => {
|
|
1980
|
-
if (this.isDone) {
|
|
1966
|
+
if (this.isDone()) {
|
|
1981
1967
|
return;
|
|
1982
1968
|
}
|
|
1983
1969
|
|
|
@@ -1992,7 +1978,7 @@ class AnyToPromise {
|
|
|
1992
1978
|
|
|
1993
1979
|
|
|
1994
1980
|
async call(cb) {
|
|
1995
|
-
if (this.isDone) {
|
|
1981
|
+
if (this.isDone()) {
|
|
1996
1982
|
return this;
|
|
1997
1983
|
}
|
|
1998
1984
|
|
|
@@ -2006,7 +1992,7 @@ class AnyToPromise {
|
|
|
2006
1992
|
}
|
|
2007
1993
|
|
|
2008
1994
|
reject(er) {
|
|
2009
|
-
if (this.isDone) {
|
|
1995
|
+
if (this.isDone()) {
|
|
2010
1996
|
return;
|
|
2011
1997
|
}
|
|
2012
1998
|
|
|
@@ -2016,7 +2002,7 @@ class AnyToPromise {
|
|
|
2016
2002
|
}
|
|
2017
2003
|
|
|
2018
2004
|
resolve(response = {}) {
|
|
2019
|
-
if (this.isDone) {
|
|
2005
|
+
if (this.isDone()) {
|
|
2020
2006
|
return;
|
|
2021
2007
|
}
|
|
2022
2008
|
|
|
@@ -2030,7 +2016,7 @@ class AnyToPromise {
|
|
|
2030
2016
|
destroy() {}
|
|
2031
2017
|
|
|
2032
2018
|
cancel() {
|
|
2033
|
-
if (this.isDone) {
|
|
2019
|
+
if (this.isDone()) {
|
|
2034
2020
|
return;
|
|
2035
2021
|
}
|
|
2036
2022
|
|
|
@@ -2046,7 +2032,7 @@ class AnyToPromise {
|
|
|
2046
2032
|
}
|
|
2047
2033
|
|
|
2048
2034
|
handle(process, additionalProps = {}) {
|
|
2049
|
-
if (this.isDone) {
|
|
2035
|
+
if (this.isDone()) {
|
|
2050
2036
|
return;
|
|
2051
2037
|
}
|
|
2052
2038
|
|
|
@@ -2274,5 +2260,5 @@ function StoreMerge(key, value) {
|
|
|
2274
2260
|
});
|
|
2275
2261
|
}
|
|
2276
2262
|
|
|
2277
|
-
export { AnyToPromise, AnyToPromiseResponseTypes, AnyToPromiseStatus, CLASS_STORE, Configurable, DecoratorTypes, Deprecated, Entity, Enumerable, Env, EnvTypes, Hooks, METHOD_STORE, Metadata, NotConfigurable, NotEnumerable, PARAM_STORE, PROPERTY_STORE, Readonly, Store, StoreFn, StoreMerge, StoreSet, Type, UnsupportedDecoratorType, Writable, ancestorsOf, catchAsyncError, catchError, classOf, cleanObject, constructorOf, decorateMethodsOf, decoratorArgs, decoratorTypeOf, deepClone, deepExtends, deepMerge, descriptorOf, getClass, getClassOrSymbol, getConstructor, getConstructorArgNames, getEnumerableKeys, getInheritedClass, getValue, inheritedDescriptorOf, isArray, isArrayOrArrayClass, isArrowFn, isBoolean, isBooleanOrBooleanClass, isClass, isClassObject, isCollection, isDate, isEmpty, isEnumerable, isFunction, isInheritedFrom, isNil, isNumber, isNumberOrNumberClass, isObject, isObservable, isPlainObject, isPrimitive, isPrimitiveClass, isPrimitiveOrPrimitiveClass, isPromise, isProtectedKey, isStream, isString, isStringOrStringClass, isSymbol, isSymbolOrSymbolClass, mergeReducerBuilder, methodsOf, nameOf, nameOfClass, nameOfSymbol,
|
|
2263
|
+
export { AnyToPromise, AnyToPromiseResponseTypes, AnyToPromiseStatus, CLASS_STORE, Configurable, DecoratorTypes, Deprecated, Entity, Enumerable, Env, EnvTypes, Hooks, METHOD_STORE, Metadata, NotConfigurable, NotEnumerable, PARAM_STORE, PROPERTY_STORE, Readonly, Store, StoreFn, StoreMerge, StoreSet, Type, UnsupportedDecoratorType, Writable, ancestorsOf, catchAsyncError, catchError, classOf, cleanObject, constructorOf, decorateMethodsOf, decoratorArgs, decoratorTypeOf, deepClone, deepExtends, deepMerge, descriptorOf, getClass, getClassOrSymbol, getConstructor, getConstructorArgNames, getEnumerableKeys, getInheritedClass, getValue, inheritedDescriptorOf, isArray, isArrayOrArrayClass, isArrowFn, isBoolean, isBooleanOrBooleanClass, isClass, isClassObject, isCollection, isDate, isEmpty, isEnumerable, isFunction, isInheritedFrom, isNil, isNumber, isNumberOrNumberClass, isObject, isObservable, isPlainObject, isPrimitive, isPrimitiveClass, isPrimitiveOrPrimitiveClass, isPromise, isProtectedKey, isStream, isString, isStringOrStringClass, isSymbol, isSymbolOrSymbolClass, mergeReducerBuilder, methodsOf, nameOf, nameOfClass, nameOfSymbol, objectKeys, primitiveOf, prototypeOf, proxyDelegation, setValue, toMap, toStringConstructor, uniq, uniqBy, useDecorators, useMethodDecorator, useMethodDecorators };
|
|
2278
2264
|
//# sourceMappingURL=index.modern.js.map
|