@tsed/core 6.102.6 → 6.102.8-rc.3

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.
Files changed (112) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/decorators/configurable.js +2 -6
  3. package/lib/cjs/decorators/configurable.js.map +1 -1
  4. package/lib/cjs/decorators/deprecated.js.map +1 -1
  5. package/lib/cjs/decorators/enumerable.js +2 -6
  6. package/lib/cjs/decorators/enumerable.js.map +1 -1
  7. package/lib/cjs/decorators/notConfigurable.js +0 -4
  8. package/lib/cjs/decorators/notConfigurable.js.map +1 -1
  9. package/lib/cjs/decorators/notEnumerable.js +0 -4
  10. package/lib/cjs/decorators/notEnumerable.js.map +1 -1
  11. package/lib/cjs/decorators/readOnly.js +0 -4
  12. package/lib/cjs/decorators/readOnly.js.map +1 -1
  13. package/lib/cjs/decorators/writable.js +2 -6
  14. package/lib/cjs/decorators/writable.js.map +1 -1
  15. package/lib/cjs/errors/UnsupportedDecoratorType.js +5 -3
  16. package/lib/cjs/errors/UnsupportedDecoratorType.js.map +1 -1
  17. package/lib/cjs/index.js +80 -4
  18. package/lib/cjs/index.js.map +1 -1
  19. package/lib/cjs/package.json +3 -0
  20. package/lib/cjs/utils/objects/getConstructorArgNames.js +6 -1
  21. package/lib/cjs/utils/objects/getConstructorArgNames.js.map +1 -1
  22. package/lib/esm/decorators/configurable.js +1 -5
  23. package/lib/esm/decorators/configurable.js.map +1 -1
  24. package/lib/esm/decorators/deprecated.js.map +1 -1
  25. package/lib/esm/decorators/enumerable.js +1 -5
  26. package/lib/esm/decorators/enumerable.js.map +1 -1
  27. package/lib/esm/decorators/notConfigurable.js +1 -5
  28. package/lib/esm/decorators/notConfigurable.js.map +1 -1
  29. package/lib/esm/decorators/notEnumerable.js +1 -5
  30. package/lib/esm/decorators/notEnumerable.js.map +1 -1
  31. package/lib/esm/decorators/readOnly.js +1 -5
  32. package/lib/esm/decorators/readOnly.js.map +1 -1
  33. package/lib/esm/decorators/storeFn.js +1 -1
  34. package/lib/esm/decorators/storeMerge.js +1 -1
  35. package/lib/esm/decorators/storeSet.js +1 -1
  36. package/lib/esm/decorators/writable.js +1 -5
  37. package/lib/esm/decorators/writable.js.map +1 -1
  38. package/lib/esm/domain/AnyToPromise.js +3 -3
  39. package/lib/esm/domain/Metadata.js +1 -1
  40. package/lib/esm/domain/Store.js +8 -8
  41. package/lib/esm/errors/UnsupportedDecoratorType.js +3 -1
  42. package/lib/esm/errors/UnsupportedDecoratorType.js.map +1 -1
  43. package/lib/esm/index.js +81 -5
  44. package/lib/esm/index.js.map +1 -1
  45. package/lib/esm/package.json +3 -0
  46. package/lib/esm/utils/decorators/decorateMethodsOf.js +5 -5
  47. package/lib/esm/utils/decorators/decoratorArgs.js +1 -1
  48. package/lib/esm/utils/decorators/decoratorTypeOf.js +2 -2
  49. package/lib/esm/utils/decorators/inheritedDescriptorOf.js +1 -1
  50. package/lib/esm/utils/decorators/useMethodDecorators.js +1 -1
  51. package/lib/esm/utils/objects/ancestorsOf.js +3 -3
  52. package/lib/esm/utils/objects/cleanObject.js +1 -1
  53. package/lib/esm/utils/objects/createInstance.js +1 -1
  54. package/lib/esm/utils/objects/deepClone.js +6 -6
  55. package/lib/esm/utils/objects/deepExtends.js +4 -4
  56. package/lib/esm/utils/objects/deepMerge.js +5 -5
  57. package/lib/esm/utils/objects/getClassOrSymbol.js +2 -2
  58. package/lib/esm/utils/objects/getConstructorArgNames.js +7 -2
  59. package/lib/esm/utils/objects/getConstructorArgNames.js.map +1 -1
  60. package/lib/esm/utils/objects/getEnumerableKeys.js +2 -2
  61. package/lib/esm/utils/objects/getValue.js +3 -3
  62. package/lib/esm/utils/objects/isArrowFn.js +1 -1
  63. package/lib/esm/utils/objects/isClass.js +7 -7
  64. package/lib/esm/utils/objects/isCollection.js +1 -1
  65. package/lib/esm/utils/objects/isEmpty.js +1 -1
  66. package/lib/esm/utils/objects/isEnumerable.js +2 -2
  67. package/lib/esm/utils/objects/isInheritedFrom.js +3 -3
  68. package/lib/esm/utils/objects/isPlainObject.js +1 -1
  69. package/lib/esm/utils/objects/isPrimitive.js +3 -3
  70. package/lib/esm/utils/objects/isSerializable.js +5 -5
  71. package/lib/esm/utils/objects/methodsOf.js +3 -3
  72. package/lib/esm/utils/objects/objectKeys.js +1 -1
  73. package/lib/esm/utils/objects/primitiveOf.js +3 -3
  74. package/lib/esm/utils/objects/prototypeOf.js +1 -1
  75. package/lib/esm/utils/objects/setValue.js +1 -1
  76. package/lib/esm/utils/objects/toMap.js +2 -2
  77. package/lib/esm/utils/objects/toStringConstructor.js +1 -1
  78. package/lib/esm/utils/proxyDelegation.js +1 -1
  79. package/lib/types/decorators/configurable.d.ts +0 -1
  80. package/lib/types/decorators/enumerable.d.ts +0 -1
  81. package/lib/types/decorators/notConfigurable.d.ts +0 -1
  82. package/lib/types/decorators/notEnumerable.d.ts +0 -1
  83. package/lib/types/decorators/readOnly.d.ts +0 -1
  84. package/lib/types/decorators/writable.d.ts +0 -1
  85. package/lib/types/index.d.ts +80 -5
  86. package/package.json +11 -5
  87. package/tsconfig.compile.esm.json +1 -1
  88. package/lib/cjs/decorators/index.js +0 -18
  89. package/lib/cjs/decorators/index.js.map +0 -1
  90. package/lib/cjs/domain/index.js +0 -11
  91. package/lib/cjs/domain/index.js.map +0 -1
  92. package/lib/cjs/interfaces/index.js +0 -3
  93. package/lib/cjs/interfaces/index.js.map +0 -1
  94. package/lib/cjs/utils/index.js +0 -19
  95. package/lib/cjs/utils/index.js.map +0 -1
  96. package/lib/cjs/utils/objects/index.js +0 -47
  97. package/lib/cjs/utils/objects/index.js.map +0 -1
  98. package/lib/esm/decorators/index.js +0 -15
  99. package/lib/esm/decorators/index.js.map +0 -1
  100. package/lib/esm/domain/index.js +0 -8
  101. package/lib/esm/domain/index.js.map +0 -1
  102. package/lib/esm/interfaces/index.js +0 -2
  103. package/lib/esm/interfaces/index.js.map +0 -1
  104. package/lib/esm/utils/index.js +0 -16
  105. package/lib/esm/utils/index.js.map +0 -1
  106. package/lib/esm/utils/objects/index.js +0 -44
  107. package/lib/esm/utils/objects/index.js.map +0 -1
  108. package/lib/types/decorators/index.d.ts +0 -14
  109. package/lib/types/domain/index.d.ts +0 -7
  110. package/lib/types/interfaces/index.d.ts +0 -4
  111. package/lib/types/utils/index.d.ts +0 -13
  112. package/lib/types/utils/objects/index.d.ts +0 -43
package/lib/esm/index.js CHANGED
@@ -1,6 +1,82 @@
1
- import "reflect-metadata";
2
- export * from "./utils";
3
- export * from "./domain";
4
- export * from "./errors/UnsupportedDecoratorType";
5
- export * from "./decorators";
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+ export * from "./decorators/configurable.js";
5
+ export * from "./decorators/deprecated.js";
6
+ export * from "./decorators/enumerable.js";
7
+ export * from "./decorators/notConfigurable.js";
8
+ export * from "./decorators/notEnumerable.js";
9
+ export * from "./decorators/readOnly.js";
10
+ export * from "./decorators/storeFn.js";
11
+ export * from "./decorators/storeMerge.js";
12
+ export * from "./decorators/storeSet.js";
13
+ export * from "./decorators/writable.js";
14
+ export * from "./domain/AnyToPromise.js";
15
+ export * from "./domain/DecoratorTypes.js";
16
+ export * from "./domain/Env.js";
17
+ export * from "./domain/Hooks.js";
18
+ export * from "./domain/Metadata.js";
19
+ export * from "./domain/Store.js";
20
+ export * from "./domain/Type.js";
21
+ export * from "./errors/UnsupportedDecoratorType.js";
22
+ export * from "./interfaces/AnyDecorator.js";
23
+ export * from "./interfaces/DecoratorParameters.js";
24
+ export * from "./interfaces/HashOf.js";
25
+ export * from "./interfaces/MetadataTypes.js";
26
+ export * from "./interfaces/ValueOf.js";
27
+ export * from "./utils/catchError.js";
28
+ export * from "./utils/proxyDelegation.js";
29
+ export * from "./utils/uniq.js";
30
+ export * from "./utils/decorators/decorateMethodsOf.js";
31
+ export * from "./utils/decorators/decoratorArgs.js";
32
+ export * from "./utils/decorators/decoratorTypeOf.js";
33
+ export * from "./utils/decorators/inheritedDescriptorOf.js";
34
+ export * from "./utils/decorators/useDecorators.js";
35
+ export * from "./utils/decorators/useMethodDecorators.js";
36
+ export * from "./utils/http/getHostInfoFromPort.js";
37
+ export * from "./utils/imports/importPackage.js";
38
+ export * from "./utils/objects/ancestorOf.js";
39
+ export * from "./utils/objects/ancestorsOf.js";
40
+ export * from "./utils/objects/classOf.js";
41
+ export * from "./utils/objects/cleanObject.js";
42
+ export * from "./utils/objects/constructorOf.js";
43
+ export * from "./utils/objects/createInstance.js";
44
+ export * from "./utils/objects/deepClone.js";
45
+ export * from "./utils/objects/deepExtends.js";
46
+ export * from "./utils/objects/deepMerge.js";
47
+ export * from "./utils/objects/descriptorOf.js";
48
+ export * from "./utils/objects/getClassOrSymbol.js";
49
+ export * from "./utils/objects/getConstructorArgNames.js";
50
+ export * from "./utils/objects/getEnumerableKeys.js";
51
+ export * from "./utils/objects/getValue.js";
52
+ export * from "./utils/objects/isArray.js";
53
+ export * from "./utils/objects/isArrowFn.js";
54
+ export * from "./utils/objects/isBoolean.js";
55
+ export * from "./utils/objects/isClass.js";
56
+ export * from "./utils/objects/isCollection.js";
57
+ export * from "./utils/objects/isDate.js";
58
+ export * from "./utils/objects/isEmpty.js";
59
+ export * from "./utils/objects/isEnumerable.js";
60
+ export * from "./utils/objects/isFunction.js";
61
+ export * from "./utils/objects/isInheritedFrom.js";
62
+ export * from "./utils/objects/isNil.js";
63
+ export * from "./utils/objects/isNumber.js";
64
+ export * from "./utils/objects/isObject.js";
65
+ export * from "./utils/objects/isObservable.js";
66
+ export * from "./utils/objects/isPlainObject.js";
67
+ export * from "./utils/objects/isPrimitive.js";
68
+ export * from "./utils/objects/isPromise.js";
69
+ export * from "./utils/objects/isProtectedKey.js";
70
+ export * from "./utils/objects/isSerializable.js";
71
+ export * from "./utils/objects/isStream.js";
72
+ export * from "./utils/objects/isString.js";
73
+ export * from "./utils/objects/isSymbol.js";
74
+ export * from "./utils/objects/methodsOf.js";
75
+ export * from "./utils/objects/nameOf.js";
76
+ export * from "./utils/objects/objectKeys.js";
77
+ export * from "./utils/objects/primitiveOf.js";
78
+ export * from "./utils/objects/prototypeOf.js";
79
+ export * from "./utils/objects/setValue.js";
80
+ export * from "./utils/objects/toMap.js";
81
+ export * from "./utils/objects/toStringConstructor.js";
6
82
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,cAAc,CAAC","sourcesContent":["import \"reflect-metadata\";\n\nexport type {DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator, MetadataTypes, ValueOf, HashOf} from \"./interfaces\";\nexport * from \"./utils\";\nexport * from \"./domain\";\nexport * from \"./errors/UnsupportedDecoratorType\";\nexport * from \"./decorators\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./decorators/configurable\";\nexport * from \"./decorators/deprecated\";\nexport * from \"./decorators/enumerable\";\nexport * from \"./decorators/notConfigurable\";\nexport * from \"./decorators/notEnumerable\";\nexport * from \"./decorators/readOnly\";\nexport * from \"./decorators/storeFn\";\nexport * from \"./decorators/storeMerge\";\nexport * from \"./decorators/storeSet\";\nexport * from \"./decorators/writable\";\nexport * from \"./domain/AnyToPromise\";\nexport * from \"./domain/DecoratorTypes\";\nexport * from \"./domain/Env\";\nexport * from \"./domain/Hooks\";\nexport * from \"./domain/Metadata\";\nexport * from \"./domain/Store\";\nexport * from \"./domain/Type\";\nexport * from \"./errors/UnsupportedDecoratorType\";\nexport * from \"./interfaces/AnyDecorator\";\nexport * from \"./interfaces/DecoratorParameters\";\nexport * from \"./interfaces/HashOf\";\nexport * from \"./interfaces/MetadataTypes\";\nexport * from \"./interfaces/ValueOf\";\nexport * from \"./utils/catchError\";\nexport * from \"./utils/proxyDelegation\";\nexport * from \"./utils/uniq\";\nexport * from \"./utils/decorators/decorateMethodsOf\";\nexport * from \"./utils/decorators/decoratorArgs\";\nexport * from \"./utils/decorators/decoratorTypeOf\";\nexport * from \"./utils/decorators/inheritedDescriptorOf\";\nexport * from \"./utils/decorators/useDecorators\";\nexport * from \"./utils/decorators/useMethodDecorators\";\nexport * from \"./utils/http/getHostInfoFromPort\";\nexport * from \"./utils/imports/importPackage\";\nexport * from \"./utils/objects/ancestorOf\";\nexport * from \"./utils/objects/ancestorsOf\";\nexport * from \"./utils/objects/classOf\";\nexport * from \"./utils/objects/cleanObject\";\nexport * from \"./utils/objects/constructorOf\";\nexport * from \"./utils/objects/createInstance\";\nexport * from \"./utils/objects/deepClone\";\nexport * from \"./utils/objects/deepExtends\";\nexport * from \"./utils/objects/deepMerge\";\nexport * from \"./utils/objects/descriptorOf\";\nexport * from \"./utils/objects/getClassOrSymbol\";\nexport * from \"./utils/objects/getConstructorArgNames\";\nexport * from \"./utils/objects/getEnumerableKeys\";\nexport * from \"./utils/objects/getValue\";\nexport * from \"./utils/objects/isArray\";\nexport * from \"./utils/objects/isArrowFn\";\nexport * from \"./utils/objects/isBoolean\";\nexport * from \"./utils/objects/isClass\";\nexport * from \"./utils/objects/isCollection\";\nexport * from \"./utils/objects/isDate\";\nexport * from \"./utils/objects/isEmpty\";\nexport * from \"./utils/objects/isEnumerable\";\nexport * from \"./utils/objects/isFunction\";\nexport * from \"./utils/objects/isInheritedFrom\";\nexport * from \"./utils/objects/isNil\";\nexport * from \"./utils/objects/isNumber\";\nexport * from \"./utils/objects/isObject\";\nexport * from \"./utils/objects/isObservable\";\nexport * from \"./utils/objects/isPlainObject\";\nexport * from \"./utils/objects/isPrimitive\";\nexport * from \"./utils/objects/isPromise\";\nexport * from \"./utils/objects/isProtectedKey\";\nexport * from \"./utils/objects/isSerializable\";\nexport * from \"./utils/objects/isStream\";\nexport * from \"./utils/objects/isString\";\nexport * from \"./utils/objects/isSymbol\";\nexport * from \"./utils/objects/methodsOf\";\nexport * from \"./utils/objects/nameOf\";\nexport * from \"./utils/objects/objectKeys\";\nexport * from \"./utils/objects/primitiveOf\";\nexport * from \"./utils/objects/prototypeOf\";\nexport * from \"./utils/objects/setValue\";\nexport * from \"./utils/objects/toMap\";\nexport * from \"./utils/objects/toStringConstructor\";\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,8 +1,8 @@
1
- import { classOf } from "../objects/classOf";
2
- import { methodsOf } from "../objects/methodsOf";
3
- import { prototypeOf } from "../objects/prototypeOf";
4
- import { descriptorOf } from "../objects/descriptorOf";
5
- import { Store } from "../../domain/Store";
1
+ import { classOf } from "../objects/classOf.js";
2
+ import { methodsOf } from "../objects/methodsOf.js";
3
+ import { prototypeOf } from "../objects/prototypeOf.js";
4
+ import { descriptorOf } from "../objects/descriptorOf.js";
5
+ import { Store } from "../../domain/Store.js";
6
6
  export function decorateMethodsOf(klass, decorator) {
7
7
  methodsOf(klass).forEach(({ target, propertyKey }) => {
8
8
  if (target !== classOf(klass)) {
@@ -1,4 +1,4 @@
1
- import { descriptorOf } from "../objects/descriptorOf";
1
+ import { descriptorOf } from "../objects/descriptorOf.js";
2
2
  export function decoratorArgs(target, propertyKey) {
3
3
  return [target, propertyKey, descriptorOf(target, propertyKey)];
4
4
  }
@@ -1,5 +1,5 @@
1
- import { DecoratorTypes } from "../../domain/DecoratorTypes";
2
- import { classOf } from "../objects/classOf";
1
+ import { DecoratorTypes } from "../../domain/DecoratorTypes.js";
2
+ import { classOf } from "../objects/classOf.js";
3
3
  export function decoratorTypeOf(args) {
4
4
  const [target, propertyKey, descriptor] = args;
5
5
  const staticType = (type) => {
@@ -1,4 +1,4 @@
1
- import { ancestorsOf } from "../objects/ancestorsOf";
1
+ import { ancestorsOf } from "../objects/ancestorsOf.js";
2
2
  export function inheritedDescriptorOf(target, propertyKey) {
3
3
  for (const klass of ancestorsOf(target)) {
4
4
  const descriptor = Object.getOwnPropertyDescriptor((klass && klass.prototype) || klass, propertyKey);
@@ -1,4 +1,4 @@
1
- import { descriptorOf } from "../objects/descriptorOf";
1
+ import { descriptorOf } from "../objects/descriptorOf.js";
2
2
  export function useMethodDecorator(decorator) {
3
3
  return (target, propertyKey) => decorator(target, propertyKey, descriptorOf(target, propertyKey));
4
4
  }
@@ -1,6 +1,6 @@
1
- import { classOf } from "./classOf";
2
- import { getInheritedClass } from "./ancestorOf";
3
- import { nameOf } from "./nameOf";
1
+ import { classOf } from "./classOf.js";
2
+ import { getInheritedClass } from "./ancestorOf.js";
3
+ import { nameOf } from "./nameOf.js";
4
4
  /**
5
5
  *
6
6
  * @param target
@@ -1,4 +1,4 @@
1
- import { isProtectedKey } from "./isProtectedKey";
1
+ import { isProtectedKey } from "./isProtectedKey.js";
2
2
  /**
3
3
  * Remove undefined value
4
4
  * @param obj
@@ -1,4 +1,4 @@
1
- import { classOf } from "./classOf";
1
+ import { classOf } from "./classOf.js";
2
2
  export function createInstance(obj) {
3
3
  return obj ? (classOf(obj) !== Object ? Object.create(obj) : {}) : {};
4
4
  }
@@ -1,9 +1,9 @@
1
- import { isArray } from "./isArray";
2
- import { isDate } from "./isDate";
3
- import { isFunction } from "./isFunction";
4
- import { isNil } from "./isNil";
5
- import { isPrimitive } from "./isPrimitive";
6
- import { isSymbol } from "./isSymbol";
1
+ import { isArray } from "./isArray.js";
2
+ import { isDate } from "./isDate.js";
3
+ import { isFunction } from "./isFunction.js";
4
+ import { isNil } from "./isNil.js";
5
+ import { isPrimitive } from "./isPrimitive.js";
6
+ import { isSymbol } from "./isSymbol.js";
7
7
  const isBasicType = (source) => isNil(source) || isPrimitive(source) || isSymbol(source) || isFunction(source);
8
8
  /**
9
9
  * Return a cloned value
@@ -1,7 +1,7 @@
1
- import { createInstance } from "./createInstance";
2
- import { isArrayOrArrayClass } from "./isArray";
3
- import { isPrimitive } from "./isPrimitive";
4
- import { objectKeys } from "./objectKeys";
1
+ import { createInstance } from "./createInstance.js";
2
+ import { isArrayOrArrayClass } from "./isArray.js";
3
+ import { isPrimitive } from "./isPrimitive.js";
4
+ import { objectKeys } from "./objectKeys.js";
5
5
  function reducer() {
6
6
  return (collection, value) => {
7
7
  collection.indexOf(value) === -1 && collection.push(value);
@@ -1,8 +1,8 @@
1
- import { createInstance } from "./createInstance";
2
- import { isFunction } from "./isFunction";
3
- import { isPrimitive } from "./isPrimitive";
4
- import { isSymbol } from "./isSymbol";
5
- import { objectKeys } from "./objectKeys";
1
+ import { createInstance } from "./createInstance.js";
2
+ import { isFunction } from "./isFunction.js";
3
+ import { isPrimitive } from "./isPrimitive.js";
4
+ import { isSymbol } from "./isSymbol.js";
5
+ import { objectKeys } from "./objectKeys.js";
6
6
  export function mergeReducerBuilder(cb) {
7
7
  return (collection, value, options) => {
8
8
  const index = collection.findIndex((item) => cb(item, value));
@@ -1,5 +1,5 @@
1
- import { classOf } from "./classOf";
2
- import { isClass } from "./isClass";
1
+ import { classOf } from "./classOf.js";
2
+ import { isClass } from "./isClass.js";
3
3
  export function getClassOrSymbol(target) {
4
4
  return isClass(target) ? classOf(target) : target;
5
5
  }
@@ -1,5 +1,10 @@
1
- import { toStringConstructor } from "./toStringConstructor";
1
+ import { toStringConstructor } from "./toStringConstructor.js";
2
2
  export function getConstructorArgNames(target) {
3
- return toStringConstructor(target).replace("constructor(", "").replace(")", "").split(", ").filter(Boolean);
3
+ return toStringConstructor(target)
4
+ .split("constructor(")[1]
5
+ .split(")")[0]
6
+ .split(", ")
7
+ .filter(Boolean)
8
+ .map((s) => s.trim());
4
9
  }
5
10
  //# sourceMappingURL=getConstructorArgNames.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getConstructorArgNames.js","sourceRoot":"","sources":["../../../../src/utils/objects/getConstructorArgNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,UAAU,sBAAsB,CAAC,MAAW;IAChD,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC9G,CAAC","sourcesContent":["import {toStringConstructor} from \"./toStringConstructor\";\n\nexport function getConstructorArgNames(target: any) {\n return toStringConstructor(target).replace(\"constructor(\", \"\").replace(\")\", \"\").split(\", \").filter(Boolean);\n}\n"]}
1
+ {"version":3,"file":"getConstructorArgNames.js","sourceRoot":"","sources":["../../../../src/utils/objects/getConstructorArgNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,UAAU,sBAAsB,CAAC,MAAW;IAChD,OAAO,mBAAmB,CAAC,MAAM,CAAC;SAC/B,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;SACxB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACb,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["import {toStringConstructor} from \"./toStringConstructor\";\n\nexport function getConstructorArgNames(target: any) {\n return toStringConstructor(target)\n .split(\"constructor(\")[1]\n .split(\")\")[0]\n .split(\", \")\n .filter(Boolean)\n .map((s) => s.trim());\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { isEnumerable } from "./isEnumerable";
2
- import { isProtectedKey } from "./isProtectedKey";
1
+ import { isEnumerable } from "./isEnumerable.js";
2
+ import { isProtectedKey } from "./isProtectedKey.js";
3
3
  /**
4
4
  * Return all enumerable keys of the given object
5
5
  * @param obj
@@ -1,6 +1,6 @@
1
- import { isFunction } from "./isFunction";
2
- import { isObject } from "./isObject";
3
- import { isString } from "./isString";
1
+ import { isFunction } from "./isFunction.js";
2
+ import { isObject } from "./isObject.js";
3
+ import { isString } from "./isString.js";
4
4
  const mapOptions = (args) => {
5
5
  const [expression, scope, defaultValue, separator = "."] = args;
6
6
  if (isObject(scope) || isString(expression)) {
@@ -1,4 +1,4 @@
1
- import { isFunction } from "./isFunction";
1
+ import { isFunction } from "./isFunction.js";
2
2
  export function isArrowFn(target) {
3
3
  return target && isFunction(target) && !target.prototype;
4
4
  }
@@ -1,10 +1,10 @@
1
- import { isArrayOrArrayClass } from "./isArray";
2
- import { isArrowFn } from "./isArrowFn";
3
- import { isDate } from "./isDate";
4
- import { isClassObject } from "./isPlainObject";
5
- import { isPrimitiveOrPrimitiveClass } from "./isPrimitive";
6
- import { isPromise } from "./isPromise";
7
- import { isSymbol } from "./isSymbol";
1
+ import { isArrayOrArrayClass } from "./isArray.js";
2
+ import { isArrowFn } from "./isArrowFn.js";
3
+ import { isDate } from "./isDate.js";
4
+ import { isClassObject } from "./isPlainObject.js";
5
+ import { isPrimitiveOrPrimitiveClass } from "./isPrimitive.js";
6
+ import { isPromise } from "./isPromise.js";
7
+ import { isSymbol } from "./isSymbol.js";
8
8
  export function isClass(target) {
9
9
  if (!target) {
10
10
  return false;
@@ -1,4 +1,4 @@
1
- import { isArrayOrArrayClass } from "./isArray";
1
+ import { isArrayOrArrayClass } from "./isArray.js";
2
2
  /**
3
3
  * Return true if the target.
4
4
  * @param target
@@ -1,4 +1,4 @@
1
- import { isNil } from "./isNil";
1
+ import { isNil } from "./isNil.js";
2
2
  /**
3
3
  * Return true if the value is an empty string, null or undefined.
4
4
  * @param value
@@ -1,5 +1,5 @@
1
- import { inheritedDescriptorOf } from "../decorators/inheritedDescriptorOf";
2
- import { classOf } from "./classOf";
1
+ import { inheritedDescriptorOf } from "../decorators/inheritedDescriptorOf.js";
2
+ import { classOf } from "./classOf.js";
3
3
  /**
4
4
  *
5
5
  * @param obj
@@ -1,6 +1,6 @@
1
- import { classOf } from "./classOf";
2
- import { ancestorOf } from "./ancestorOf";
3
- import { nameOf } from "./nameOf";
1
+ import { classOf } from "./classOf.js";
2
+ import { ancestorOf } from "./ancestorOf.js";
3
+ import { nameOf } from "./nameOf.js";
4
4
  export function isInheritedFrom(target, from, deep = 5) {
5
5
  if (!target || !from) {
6
6
  return false;
@@ -1,4 +1,4 @@
1
- import { classOf } from "./classOf";
1
+ import { classOf } from "./classOf.js";
2
2
  /**
3
3
  *
4
4
  * @param target
@@ -1,6 +1,6 @@
1
- import { isBoolean, isBooleanOrBooleanClass } from "./isBoolean";
2
- import { isNumber, isNumberOrNumberClass } from "./isNumber";
3
- import { isString, isStringOrStringClass } from "./isString";
1
+ import { isBoolean, isBooleanOrBooleanClass } from "./isBoolean.js";
2
+ import { isNumber, isNumberOrNumberClass } from "./isNumber.js";
3
+ import { isString, isStringOrStringClass } from "./isString.js";
4
4
  /**
5
5
  * Return true if the given obj is a primitive.
6
6
  * @param target
@@ -1,8 +1,8 @@
1
- import { isStream } from "./isStream";
2
- import { isBoolean } from "./isBoolean";
3
- import { isNumber } from "./isNumber";
4
- import { isString } from "./isString";
5
- import { isNil } from "./isNil";
1
+ import { isStream } from "./isStream.js";
2
+ import { isBoolean } from "./isBoolean.js";
3
+ import { isNumber } from "./isNumber.js";
4
+ import { isString } from "./isString.js";
5
+ import { isNil } from "./isNil.js";
6
6
  export function isSerializable(data) {
7
7
  return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data));
8
8
  }
@@ -1,6 +1,6 @@
1
- import { classOf } from "./classOf";
2
- import { ancestorsOf } from "./ancestorsOf";
3
- import { prototypeOf } from "./prototypeOf";
1
+ import { classOf } from "./classOf.js";
2
+ import { ancestorsOf } from "./ancestorsOf.js";
3
+ import { prototypeOf } from "./prototypeOf.js";
4
4
  /**
5
5
  * Return all methods for a given class.
6
6
  * @param target
@@ -1,4 +1,4 @@
1
- import { isProtectedKey } from "./isProtectedKey";
1
+ import { isProtectedKey } from "./isProtectedKey.js";
2
2
  export function objectKeys(obj) {
3
3
  return Object.keys(obj).filter((key) => !isProtectedKey(key));
4
4
  }
@@ -1,6 +1,6 @@
1
- import { isBooleanOrBooleanClass } from "./isBoolean";
2
- import { isNumberOrNumberClass } from "./isNumber";
3
- import { isStringOrStringClass } from "./isString";
1
+ import { isBooleanOrBooleanClass } from "./isBoolean.js";
2
+ import { isNumberOrNumberClass } from "./isNumber.js";
3
+ import { isStringOrStringClass } from "./isString.js";
4
4
  export function primitiveOf(target) {
5
5
  if (isStringOrStringClass(target)) {
6
6
  return "string";
@@ -1,4 +1,4 @@
1
- import { classOf } from "./classOf";
1
+ import { classOf } from "./classOf.js";
2
2
  /**
3
3
  * Return the prototype of the given class.
4
4
  * @param target
@@ -1,4 +1,4 @@
1
- import { isProtectedKey } from "./isProtectedKey";
1
+ import { isProtectedKey } from "./isProtectedKey.js";
2
2
  export function setValue(scope, expression, value, separator = ".") {
3
3
  const keys = expression.split(separator);
4
4
  const setValue = (key, add) => {
@@ -1,5 +1,5 @@
1
- import { isArray } from "./isArray";
2
- import { isString } from "./isString";
1
+ import { isArray } from "./isArray.js";
2
+ import { isString } from "./isString.js";
3
3
  function createIdentityFn(keyOrFn) {
4
4
  if (!keyOrFn) {
5
5
  return (v, k) => String(k);
@@ -1,4 +1,4 @@
1
- import { constructorOf } from "./constructorOf";
1
+ import { constructorOf } from "./constructorOf.js";
2
2
  export function toStringConstructor(target) {
3
3
  const ctr = constructorOf(target);
4
4
  const strings = ctr.toString().split("\n");
@@ -1,4 +1,4 @@
1
- import { uniq } from "./uniq";
1
+ import { uniq } from "./uniq.js";
2
2
  /**
3
3
  * Create a complete and iterable trap.
4
4
  * @param self
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function Configurable(value?: boolean): Function;
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function Enumerable(value?: boolean): Function;
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function NotConfigurable(): Function;
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function NotEnumerable(): Function;
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function Readonly(): Function;
@@ -1,2 +1 @@
1
- /** */
2
1
  export declare function Writable(value?: boolean): Function;
@@ -1,6 +1,81 @@
1
- import "reflect-metadata";
2
- export type { DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator, MetadataTypes, ValueOf, HashOf } from "./interfaces";
3
- export * from "./utils";
4
- export * from "./domain";
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+ export * from "./decorators/configurable";
5
+ export * from "./decorators/deprecated";
6
+ export * from "./decorators/enumerable";
7
+ export * from "./decorators/notConfigurable";
8
+ export * from "./decorators/notEnumerable";
9
+ export * from "./decorators/readOnly";
10
+ export * from "./decorators/storeFn";
11
+ export * from "./decorators/storeMerge";
12
+ export * from "./decorators/storeSet";
13
+ export * from "./decorators/writable";
14
+ export * from "./domain/AnyToPromise";
15
+ export * from "./domain/DecoratorTypes";
16
+ export * from "./domain/Env";
17
+ export * from "./domain/Hooks";
18
+ export * from "./domain/Metadata";
19
+ export * from "./domain/Store";
20
+ export * from "./domain/Type";
5
21
  export * from "./errors/UnsupportedDecoratorType";
6
- export * from "./decorators";
22
+ export * from "./interfaces/AnyDecorator";
23
+ export * from "./interfaces/DecoratorParameters";
24
+ export * from "./interfaces/HashOf";
25
+ export * from "./interfaces/MetadataTypes";
26
+ export * from "./interfaces/ValueOf";
27
+ export * from "./utils/catchError";
28
+ export * from "./utils/proxyDelegation";
29
+ export * from "./utils/uniq";
30
+ export * from "./utils/decorators/decorateMethodsOf";
31
+ export * from "./utils/decorators/decoratorArgs";
32
+ export * from "./utils/decorators/decoratorTypeOf";
33
+ export * from "./utils/decorators/inheritedDescriptorOf";
34
+ export * from "./utils/decorators/useDecorators";
35
+ export * from "./utils/decorators/useMethodDecorators";
36
+ export * from "./utils/http/getHostInfoFromPort";
37
+ export * from "./utils/imports/importPackage";
38
+ export * from "./utils/objects/ancestorOf";
39
+ export * from "./utils/objects/ancestorsOf";
40
+ export * from "./utils/objects/classOf";
41
+ export * from "./utils/objects/cleanObject";
42
+ export * from "./utils/objects/constructorOf";
43
+ export * from "./utils/objects/createInstance";
44
+ export * from "./utils/objects/deepClone";
45
+ export * from "./utils/objects/deepExtends";
46
+ export * from "./utils/objects/deepMerge";
47
+ export * from "./utils/objects/descriptorOf";
48
+ export * from "./utils/objects/getClassOrSymbol";
49
+ export * from "./utils/objects/getConstructorArgNames";
50
+ export * from "./utils/objects/getEnumerableKeys";
51
+ export * from "./utils/objects/getValue";
52
+ export * from "./utils/objects/isArray";
53
+ export * from "./utils/objects/isArrowFn";
54
+ export * from "./utils/objects/isBoolean";
55
+ export * from "./utils/objects/isClass";
56
+ export * from "./utils/objects/isCollection";
57
+ export * from "./utils/objects/isDate";
58
+ export * from "./utils/objects/isEmpty";
59
+ export * from "./utils/objects/isEnumerable";
60
+ export * from "./utils/objects/isFunction";
61
+ export * from "./utils/objects/isInheritedFrom";
62
+ export * from "./utils/objects/isNil";
63
+ export * from "./utils/objects/isNumber";
64
+ export * from "./utils/objects/isObject";
65
+ export * from "./utils/objects/isObservable";
66
+ export * from "./utils/objects/isPlainObject";
67
+ export * from "./utils/objects/isPrimitive";
68
+ export * from "./utils/objects/isPromise";
69
+ export * from "./utils/objects/isProtectedKey";
70
+ export * from "./utils/objects/isSerializable";
71
+ export * from "./utils/objects/isStream";
72
+ export * from "./utils/objects/isString";
73
+ export * from "./utils/objects/isSymbol";
74
+ export * from "./utils/objects/methodsOf";
75
+ export * from "./utils/objects/nameOf";
76
+ export * from "./utils/objects/objectKeys";
77
+ export * from "./utils/objects/primitiveOf";
78
+ export * from "./utils/objects/prototypeOf";
79
+ export * from "./utils/objects/setValue";
80
+ export * from "./utils/objects/toMap";
81
+ export * from "./utils/objects/toStringConstructor";
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/core",
3
- "version": "6.102.6",
3
+ "version": "6.102.8-rc.3",
4
4
  "description": "Core module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
11
  "types": "./lib/types/index.d.ts",
@@ -13,9 +14,11 @@
13
14
  "default": "./lib/esm/index.js"
14
15
  },
15
16
  "scripts": {
16
- "build": "yarn run build:esm && yarn run build:cjs",
17
+ "build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
18
+ "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\"",
17
19
  "build:cjs": "tsc --build tsconfig.compile.json",
18
- "build:esm": "tsc --build tsconfig.compile.esm.json"
20
+ "build:esm": "tsc --build tsconfig.compile.esm.json",
21
+ "test": "cross-env NODE_ENV=test yarn jest --max-workers=2"
19
22
  },
20
23
  "dependencies": {
21
24
  "reflect-metadata": "^0.1.13",
@@ -27,7 +30,10 @@
27
30
  "bugs": {
28
31
  "url": "https://github.com/tsedio/tsed/issues"
29
32
  },
30
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/core",
33
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/core",
31
34
  "author": "Romain Lenzotti",
32
- "license": "MIT"
35
+ "license": "MIT",
36
+ "publishConfig": {
37
+ "tag": "rc"
38
+ }
33
39
  }
@@ -8,5 +8,5 @@
8
8
  "declaration": true,
9
9
  "declarationDir": "./lib/types"
10
10
  },
11
- "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
11
+ "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts", "jest.config.js"]
12
12
  }