@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.
@@ -26,7 +26,7 @@ export declare class AnyToPromise<T = any> {
26
26
  constructor({ hasNextFunction }?: {
27
27
  hasNextFunction?: boolean;
28
28
  });
29
- get isDone(): boolean;
29
+ isDone(): boolean;
30
30
  get next(): (error?: any) => void;
31
31
  /**
32
32
  *
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  require('reflect-metadata');
2
- var path = require('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[key] !== undefined || key in scope) {
806
- return scope[key];
807
- }
804
+ if (scope) {
805
+ if (scope[key] !== undefined || key in scope) {
806
+ return scope[key];
807
+ }
808
808
 
809
- if (isFunction(scope.get)) {
810
- return scope.get(key);
809
+ if (isFunction(scope.get)) {
810
+ return scope.get(key);
811
+ }
811
812
  }
812
813
  };
813
814
 
@@ -948,21 +949,6 @@ function toMap(input, keyOrFn) {
948
949
  }, new Map());
949
950
  }
950
951
 
951
- const fixPath = require("normalize-path");
952
-
953
- function normalizePath(item, ...paths) {
954
- if (isString(item)) {
955
- const path$1 = path.join(item, ...paths);
956
- return fixPath(path$1);
957
- }
958
-
959
- if (isArray(item)) {
960
- return item.map(item => normalizePath(item));
961
- }
962
-
963
- return item;
964
- }
965
-
966
952
  class Entity {
967
953
  constructor({
968
954
  target,
@@ -1969,14 +1955,14 @@ class AnyToPromise {
1969
1955
  });
1970
1956
  }
1971
1957
 
1972
- get isDone() {
1958
+ isDone() {
1973
1959
  return this.status !== exports.AnyToPromiseStatus.PENDING;
1974
1960
  }
1975
1961
 
1976
1962
  get next() {
1977
1963
  _classPrivateFieldLooseBase(this, _hasNextFunction)[_hasNextFunction] = true;
1978
1964
  return error => {
1979
- if (this.isDone) {
1965
+ if (this.isDone()) {
1980
1966
  return;
1981
1967
  }
1982
1968
 
@@ -1991,7 +1977,7 @@ class AnyToPromise {
1991
1977
 
1992
1978
 
1993
1979
  async call(cb) {
1994
- if (this.isDone) {
1980
+ if (this.isDone()) {
1995
1981
  return this;
1996
1982
  }
1997
1983
 
@@ -2005,7 +1991,7 @@ class AnyToPromise {
2005
1991
  }
2006
1992
 
2007
1993
  reject(er) {
2008
- if (this.isDone) {
1994
+ if (this.isDone()) {
2009
1995
  return;
2010
1996
  }
2011
1997
 
@@ -2015,7 +2001,7 @@ class AnyToPromise {
2015
2001
  }
2016
2002
 
2017
2003
  resolve(response = {}) {
2018
- if (this.isDone) {
2004
+ if (this.isDone()) {
2019
2005
  return;
2020
2006
  }
2021
2007
 
@@ -2029,7 +2015,7 @@ class AnyToPromise {
2029
2015
  destroy() {}
2030
2016
 
2031
2017
  cancel() {
2032
- if (this.isDone) {
2018
+ if (this.isDone()) {
2033
2019
  return;
2034
2020
  }
2035
2021
 
@@ -2045,7 +2031,7 @@ class AnyToPromise {
2045
2031
  }
2046
2032
 
2047
2033
  handle(process, additionalProps = {}) {
2048
- if (this.isDone) {
2034
+ if (this.isDone()) {
2049
2035
  return;
2050
2036
  }
2051
2037
 
@@ -2350,7 +2336,6 @@ exports.methodsOf = methodsOf;
2350
2336
  exports.nameOf = nameOf;
2351
2337
  exports.nameOfClass = nameOfClass;
2352
2338
  exports.nameOfSymbol = nameOfSymbol;
2353
- exports.normalizePath = normalizePath;
2354
2339
  exports.objectKeys = objectKeys;
2355
2340
  exports.primitiveOf = primitiveOf;
2356
2341
  exports.prototypeOf = prototypeOf;