@tsed/core 7.0.0-alpha.1 → 7.0.0-beta.10

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 (415) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/decorators/configurable.js +14 -0
  3. package/lib/cjs/decorators/configurable.js.map +1 -0
  4. package/lib/cjs/decorators/deprecated.js +44 -0
  5. package/lib/cjs/decorators/deprecated.js.map +1 -0
  6. package/lib/cjs/decorators/enumerable.js +14 -0
  7. package/lib/cjs/decorators/enumerable.js.map +1 -0
  8. package/lib/cjs/decorators/notConfigurable.js +9 -0
  9. package/lib/cjs/decorators/notConfigurable.js.map +1 -0
  10. package/lib/cjs/decorators/notEnumerable.js +9 -0
  11. package/lib/cjs/decorators/notEnumerable.js.map +1 -0
  12. package/lib/cjs/decorators/readOnly.js +9 -0
  13. package/lib/cjs/decorators/readOnly.js.map +1 -0
  14. package/lib/cjs/decorators/storeFn.js +22 -0
  15. package/lib/cjs/decorators/storeFn.js.map +1 -0
  16. package/lib/cjs/decorators/storeMerge.js +11 -0
  17. package/lib/cjs/decorators/storeMerge.js.map +1 -0
  18. package/lib/cjs/decorators/storeSet.js +11 -0
  19. package/lib/cjs/decorators/storeSet.js.map +1 -0
  20. package/lib/cjs/decorators/writable.js +14 -0
  21. package/lib/cjs/decorators/writable.js.map +1 -0
  22. package/lib/cjs/domain/AnyToPromise.js +148 -0
  23. package/lib/cjs/domain/AnyToPromise.js.map +1 -0
  24. package/lib/cjs/domain/DecoratorTypes.js +15 -0
  25. package/lib/cjs/domain/DecoratorTypes.js.map +1 -0
  26. package/lib/cjs/domain/Env.js +19 -0
  27. package/lib/cjs/domain/Env.js.map +1 -0
  28. package/lib/cjs/domain/Hooks.js +89 -0
  29. package/lib/cjs/domain/Hooks.js.map +1 -0
  30. package/lib/cjs/domain/Metadata.js +508 -0
  31. package/lib/cjs/domain/Metadata.js.map +1 -0
  32. package/lib/cjs/domain/Store.js +157 -0
  33. package/lib/cjs/domain/Store.js.map +1 -0
  34. package/lib/cjs/domain/Type.js +7 -0
  35. package/lib/cjs/domain/Type.js.map +1 -0
  36. package/lib/cjs/errors/UnsupportedDecoratorType.js +23 -0
  37. package/lib/cjs/errors/UnsupportedDecoratorType.js.map +1 -0
  38. package/lib/cjs/index.js +85 -0
  39. package/lib/cjs/index.js.map +1 -0
  40. package/lib/cjs/interfaces/AnyDecorator.js +3 -0
  41. package/lib/cjs/interfaces/AnyDecorator.js.map +1 -0
  42. package/lib/cjs/interfaces/DecoratorParameters.js +3 -0
  43. package/lib/cjs/interfaces/DecoratorParameters.js.map +1 -0
  44. package/lib/cjs/interfaces/HashOf.js +3 -0
  45. package/lib/cjs/interfaces/HashOf.js.map +1 -0
  46. package/lib/cjs/interfaces/MetadataTypes.js +3 -0
  47. package/lib/cjs/interfaces/MetadataTypes.js.map +1 -0
  48. package/lib/cjs/interfaces/ValueOf.js +3 -0
  49. package/lib/cjs/interfaces/ValueOf.js.map +1 -0
  50. package/lib/cjs/package.json +3 -0
  51. package/lib/cjs/utils/catchError.js +22 -0
  52. package/lib/cjs/utils/catchError.js.map +1 -0
  53. package/lib/cjs/utils/decorators/decorateMethodsOf.js +24 -0
  54. package/lib/cjs/utils/decorators/decorateMethodsOf.js.map +1 -0
  55. package/lib/cjs/utils/decorators/decoratorArgs.js +9 -0
  56. package/lib/cjs/utils/decorators/decoratorArgs.js.map +1 -0
  57. package/lib/cjs/utils/decorators/decoratorTypeOf.js +23 -0
  58. package/lib/cjs/utils/decorators/decoratorTypeOf.js.map +1 -0
  59. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js +15 -0
  60. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js.map +1 -0
  61. package/lib/cjs/utils/decorators/useDecorators.js +14 -0
  62. package/lib/cjs/utils/decorators/useDecorators.js.map +1 -0
  63. package/lib/cjs/utils/decorators/useMethodDecorators.js +15 -0
  64. package/lib/cjs/utils/decorators/useMethodDecorators.js.map +1 -0
  65. package/lib/cjs/utils/http/getHostInfoFromPort.js +21 -0
  66. package/lib/cjs/utils/http/getHostInfoFromPort.js.map +1 -0
  67. package/lib/cjs/utils/imports/importPackage.js +39 -0
  68. package/lib/cjs/utils/imports/importPackage.js.map +1 -0
  69. package/lib/cjs/utils/objects/ancestorOf.js +12 -0
  70. package/lib/cjs/utils/objects/ancestorOf.js.map +1 -0
  71. package/lib/cjs/utils/objects/ancestorsOf.js +22 -0
  72. package/lib/cjs/utils/objects/ancestorsOf.js.map +1 -0
  73. package/lib/cjs/utils/objects/classOf.js +23 -0
  74. package/lib/cjs/utils/objects/classOf.js.map +1 -0
  75. package/lib/cjs/utils/objects/cleanObject.js +24 -0
  76. package/lib/cjs/utils/objects/cleanObject.js.map +1 -0
  77. package/lib/cjs/utils/objects/constructorOf.js +20 -0
  78. package/lib/cjs/utils/objects/constructorOf.js.map +1 -0
  79. package/lib/cjs/utils/objects/createInstance.js +9 -0
  80. package/lib/cjs/utils/objects/createInstance.js.map +1 -0
  81. package/lib/cjs/utils/objects/deepClone.js +63 -0
  82. package/lib/cjs/utils/objects/deepClone.js.map +1 -0
  83. package/lib/cjs/utils/objects/deepMerge.js +63 -0
  84. package/lib/cjs/utils/objects/deepMerge.js.map +1 -0
  85. package/lib/cjs/utils/objects/descriptorOf.js +19 -0
  86. package/lib/cjs/utils/objects/descriptorOf.js.map +1 -0
  87. package/lib/cjs/utils/objects/getClassOrSymbol.js +10 -0
  88. package/lib/cjs/utils/objects/getClassOrSymbol.js.map +1 -0
  89. package/lib/cjs/utils/objects/getConstructorArgNames.js +14 -0
  90. package/lib/cjs/utils/objects/getConstructorArgNames.js.map +1 -0
  91. package/lib/cjs/utils/objects/getEnumerableKeys.js +20 -0
  92. package/lib/cjs/utils/objects/getEnumerableKeys.js.map +1 -0
  93. package/lib/cjs/utils/objects/getValue.js +49 -0
  94. package/lib/cjs/utils/objects/getValue.js.map +1 -0
  95. package/lib/cjs/utils/objects/isArray.js +23 -0
  96. package/lib/cjs/utils/objects/isArray.js.map +1 -0
  97. package/lib/cjs/utils/objects/isArrowFn.js +9 -0
  98. package/lib/cjs/utils/objects/isArrowFn.js.map +1 -0
  99. package/lib/cjs/utils/objects/isBoolean.js +17 -0
  100. package/lib/cjs/utils/objects/isBoolean.js.map +1 -0
  101. package/lib/cjs/utils/objects/isBuffer.js +13 -0
  102. package/lib/cjs/utils/objects/isBuffer.js.map +1 -0
  103. package/lib/cjs/utils/objects/isClass.js +28 -0
  104. package/lib/cjs/utils/objects/isClass.js.map +1 -0
  105. package/lib/cjs/utils/objects/isCollection.js +22 -0
  106. package/lib/cjs/utils/objects/isCollection.js.map +1 -0
  107. package/lib/cjs/utils/objects/isDate.js +13 -0
  108. package/lib/cjs/utils/objects/isDate.js.map +1 -0
  109. package/lib/cjs/utils/objects/isEmpty.js +14 -0
  110. package/lib/cjs/utils/objects/isEmpty.js.map +1 -0
  111. package/lib/cjs/utils/objects/isEnumerable.js +22 -0
  112. package/lib/cjs/utils/objects/isEnumerable.js.map +1 -0
  113. package/lib/cjs/utils/objects/isFunction.js +8 -0
  114. package/lib/cjs/utils/objects/isFunction.js.map +1 -0
  115. package/lib/cjs/utils/objects/isInheritedFrom.js +26 -0
  116. package/lib/cjs/utils/objects/isInheritedFrom.js.map +1 -0
  117. package/lib/cjs/utils/objects/isNil.js +8 -0
  118. package/lib/cjs/utils/objects/isNil.js.map +1 -0
  119. package/lib/cjs/utils/objects/isNumber.js +17 -0
  120. package/lib/cjs/utils/objects/isNumber.js.map +1 -0
  121. package/lib/cjs/utils/objects/isObject.js +8 -0
  122. package/lib/cjs/utils/objects/isObject.js.map +1 -0
  123. package/lib/cjs/utils/objects/isObservable.js +8 -0
  124. package/lib/cjs/utils/objects/isObservable.js.map +1 -0
  125. package/lib/cjs/utils/objects/isPlainObject.js +18 -0
  126. package/lib/cjs/utils/objects/isPlainObject.js.map +1 -0
  127. package/lib/cjs/utils/objects/isPrimitive.js +30 -0
  128. package/lib/cjs/utils/objects/isPrimitive.js.map +1 -0
  129. package/lib/cjs/utils/objects/isPromise.js +16 -0
  130. package/lib/cjs/utils/objects/isPromise.js.map +1 -0
  131. package/lib/cjs/utils/objects/isProtectedKey.js +12 -0
  132. package/lib/cjs/utils/objects/isProtectedKey.js.map +1 -0
  133. package/lib/cjs/utils/objects/isSerializable.js +13 -0
  134. package/lib/cjs/utils/objects/isSerializable.js.map +1 -0
  135. package/lib/cjs/utils/objects/isStream.js +8 -0
  136. package/lib/cjs/utils/objects/isStream.js.map +1 -0
  137. package/lib/cjs/utils/objects/isString.js +16 -0
  138. package/lib/cjs/utils/objects/isString.js.map +1 -0
  139. package/lib/cjs/utils/objects/isSymbol.js +16 -0
  140. package/lib/cjs/utils/objects/isSymbol.js.map +1 -0
  141. package/lib/cjs/utils/objects/methodsOf.js +25 -0
  142. package/lib/cjs/utils/objects/methodsOf.js.map +1 -0
  143. package/lib/cjs/utils/objects/nameOf.js +32 -0
  144. package/lib/cjs/utils/objects/nameOf.js.map +1 -0
  145. package/lib/cjs/utils/objects/objectKeys.js +9 -0
  146. package/lib/cjs/utils/objects/objectKeys.js.map +1 -0
  147. package/lib/cjs/utils/objects/primitiveOf.js +20 -0
  148. package/lib/cjs/utils/objects/primitiveOf.js.map +1 -0
  149. package/lib/cjs/utils/objects/prototypeOf.js +14 -0
  150. package/lib/cjs/utils/objects/prototypeOf.js.map +1 -0
  151. package/lib/cjs/utils/objects/setValue.js +34 -0
  152. package/lib/cjs/utils/objects/setValue.js.map +1 -0
  153. package/lib/cjs/utils/objects/toMap.js +32 -0
  154. package/lib/cjs/utils/objects/toMap.js.map +1 -0
  155. package/lib/cjs/utils/objects/toStringConstructor.js +12 -0
  156. package/lib/cjs/utils/objects/toStringConstructor.js.map +1 -0
  157. package/lib/cjs/utils/proxyDelegation.js +54 -0
  158. package/lib/cjs/utils/proxyDelegation.js.map +1 -0
  159. package/lib/cjs/utils/uniq.js +16 -0
  160. package/lib/cjs/utils/uniq.js.map +1 -0
  161. package/lib/esm/decorators/configurable.js +10 -0
  162. package/lib/esm/decorators/configurable.js.map +1 -0
  163. package/lib/esm/decorators/deprecated.js +40 -0
  164. package/lib/esm/decorators/deprecated.js.map +1 -0
  165. package/lib/esm/decorators/enumerable.js +10 -0
  166. package/lib/esm/decorators/enumerable.js.map +1 -0
  167. package/lib/esm/decorators/notConfigurable.js +5 -0
  168. package/lib/esm/decorators/notConfigurable.js.map +1 -0
  169. package/lib/esm/decorators/notEnumerable.js +5 -0
  170. package/lib/esm/decorators/notEnumerable.js.map +1 -0
  171. package/lib/esm/decorators/readOnly.js +5 -0
  172. package/lib/esm/decorators/readOnly.js.map +1 -0
  173. package/lib/esm/decorators/storeFn.js +18 -0
  174. package/lib/esm/decorators/storeFn.js.map +1 -0
  175. package/lib/esm/decorators/storeMerge.js +7 -0
  176. package/lib/esm/decorators/storeMerge.js.map +1 -0
  177. package/lib/esm/decorators/storeSet.js +7 -0
  178. package/lib/esm/decorators/storeSet.js.map +1 -0
  179. package/lib/esm/decorators/writable.js +10 -0
  180. package/lib/esm/decorators/writable.js.map +1 -0
  181. package/lib/esm/domain/AnyToPromise.js +144 -0
  182. package/lib/esm/domain/AnyToPromise.js.map +1 -0
  183. package/lib/esm/domain/DecoratorTypes.js +12 -0
  184. package/lib/esm/domain/DecoratorTypes.js.map +1 -0
  185. package/lib/esm/domain/Env.js +16 -0
  186. package/lib/esm/domain/Env.js.map +1 -0
  187. package/lib/esm/domain/Hooks.js +85 -0
  188. package/lib/esm/domain/Hooks.js.map +1 -0
  189. package/lib/esm/domain/Metadata.js +504 -0
  190. package/lib/esm/domain/Metadata.js.map +1 -0
  191. package/lib/esm/domain/Store.js +153 -0
  192. package/lib/esm/domain/Store.js.map +1 -0
  193. package/lib/esm/domain/Type.js +4 -0
  194. package/lib/esm/domain/Type.js.map +1 -0
  195. package/lib/esm/errors/UnsupportedDecoratorType.js +19 -0
  196. package/lib/esm/errors/UnsupportedDecoratorType.js.map +1 -0
  197. package/lib/esm/index.js +82 -0
  198. package/lib/esm/index.js.map +1 -0
  199. package/lib/esm/interfaces/AnyDecorator.js +2 -0
  200. package/lib/esm/interfaces/AnyDecorator.js.map +1 -0
  201. package/lib/esm/interfaces/DecoratorParameters.js +2 -0
  202. package/lib/esm/interfaces/DecoratorParameters.js.map +1 -0
  203. package/lib/esm/interfaces/HashOf.js +2 -0
  204. package/lib/esm/interfaces/HashOf.js.map +1 -0
  205. package/lib/esm/interfaces/MetadataTypes.js +2 -0
  206. package/lib/esm/interfaces/MetadataTypes.js.map +1 -0
  207. package/lib/esm/interfaces/ValueOf.js +2 -0
  208. package/lib/esm/interfaces/ValueOf.js.map +1 -0
  209. package/lib/esm/package.json +3 -0
  210. package/lib/esm/utils/catchError.js +17 -0
  211. package/lib/esm/utils/catchError.js.map +1 -0
  212. package/lib/esm/utils/decorators/decorateMethodsOf.js +20 -0
  213. package/lib/esm/utils/decorators/decorateMethodsOf.js.map +1 -0
  214. package/lib/esm/utils/decorators/decoratorArgs.js +5 -0
  215. package/lib/esm/utils/decorators/decoratorArgs.js.map +1 -0
  216. package/lib/esm/utils/decorators/decoratorTypeOf.js +19 -0
  217. package/lib/esm/utils/decorators/decoratorTypeOf.js.map +1 -0
  218. package/lib/esm/utils/decorators/inheritedDescriptorOf.js +11 -0
  219. package/lib/esm/utils/decorators/inheritedDescriptorOf.js.map +1 -0
  220. package/lib/esm/utils/decorators/useDecorators.js +10 -0
  221. package/lib/esm/utils/decorators/useDecorators.js.map +1 -0
  222. package/lib/esm/utils/decorators/useMethodDecorators.js +10 -0
  223. package/lib/esm/utils/decorators/useMethodDecorators.js.map +1 -0
  224. package/lib/esm/utils/http/getHostInfoFromPort.js +17 -0
  225. package/lib/esm/utils/http/getHostInfoFromPort.js.map +1 -0
  226. package/lib/esm/utils/imports/importPackage.js +12 -0
  227. package/lib/esm/utils/imports/importPackage.js.map +1 -0
  228. package/lib/esm/utils/objects/ancestorOf.js +7 -0
  229. package/lib/esm/utils/objects/ancestorOf.js.map +1 -0
  230. package/lib/esm/utils/objects/ancestorsOf.js +18 -0
  231. package/lib/esm/utils/objects/ancestorsOf.js.map +1 -0
  232. package/lib/esm/utils/objects/classOf.js +18 -0
  233. package/lib/esm/utils/objects/classOf.js.map +1 -0
  234. package/lib/esm/utils/objects/cleanObject.js +20 -0
  235. package/lib/esm/utils/objects/cleanObject.js.map +1 -0
  236. package/lib/esm/utils/objects/constructorOf.js +15 -0
  237. package/lib/esm/utils/objects/constructorOf.js.map +1 -0
  238. package/lib/esm/utils/objects/createInstance.js +5 -0
  239. package/lib/esm/utils/objects/createInstance.js.map +1 -0
  240. package/lib/esm/utils/objects/deepClone.js +59 -0
  241. package/lib/esm/utils/objects/deepClone.js.map +1 -0
  242. package/lib/esm/utils/objects/deepMerge.js +58 -0
  243. package/lib/esm/utils/objects/deepMerge.js.map +1 -0
  244. package/lib/esm/utils/objects/descriptorOf.js +14 -0
  245. package/lib/esm/utils/objects/descriptorOf.js.map +1 -0
  246. package/lib/esm/utils/objects/getClassOrSymbol.js +6 -0
  247. package/lib/esm/utils/objects/getClassOrSymbol.js.map +1 -0
  248. package/lib/esm/utils/objects/getConstructorArgNames.js +10 -0
  249. package/lib/esm/utils/objects/getConstructorArgNames.js.map +1 -0
  250. package/lib/esm/utils/objects/getEnumerableKeys.js +16 -0
  251. package/lib/esm/utils/objects/getEnumerableKeys.js.map +1 -0
  252. package/lib/esm/utils/objects/getValue.js +45 -0
  253. package/lib/esm/utils/objects/getValue.js.map +1 -0
  254. package/lib/esm/utils/objects/isArray.js +18 -0
  255. package/lib/esm/utils/objects/isArray.js.map +1 -0
  256. package/lib/esm/utils/objects/isArrowFn.js +5 -0
  257. package/lib/esm/utils/objects/isArrowFn.js.map +1 -0
  258. package/lib/esm/utils/objects/isBoolean.js +12 -0
  259. package/lib/esm/utils/objects/isBoolean.js.map +1 -0
  260. package/lib/esm/utils/objects/isBuffer.js +9 -0
  261. package/lib/esm/utils/objects/isBuffer.js.map +1 -0
  262. package/lib/esm/utils/objects/isClass.js +24 -0
  263. package/lib/esm/utils/objects/isClass.js.map +1 -0
  264. package/lib/esm/utils/objects/isCollection.js +18 -0
  265. package/lib/esm/utils/objects/isCollection.js.map +1 -0
  266. package/lib/esm/utils/objects/isDate.js +9 -0
  267. package/lib/esm/utils/objects/isDate.js.map +1 -0
  268. package/lib/esm/utils/objects/isEmpty.js +10 -0
  269. package/lib/esm/utils/objects/isEmpty.js.map +1 -0
  270. package/lib/esm/utils/objects/isEnumerable.js +18 -0
  271. package/lib/esm/utils/objects/isEnumerable.js.map +1 -0
  272. package/lib/esm/utils/objects/isFunction.js +4 -0
  273. package/lib/esm/utils/objects/isFunction.js.map +1 -0
  274. package/lib/esm/utils/objects/isInheritedFrom.js +22 -0
  275. package/lib/esm/utils/objects/isInheritedFrom.js.map +1 -0
  276. package/lib/esm/utils/objects/isNil.js +4 -0
  277. package/lib/esm/utils/objects/isNil.js.map +1 -0
  278. package/lib/esm/utils/objects/isNumber.js +12 -0
  279. package/lib/esm/utils/objects/isNumber.js.map +1 -0
  280. package/lib/esm/utils/objects/isObject.js +4 -0
  281. package/lib/esm/utils/objects/isObject.js.map +1 -0
  282. package/lib/esm/utils/objects/isObservable.js +4 -0
  283. package/lib/esm/utils/objects/isObservable.js.map +1 -0
  284. package/lib/esm/utils/objects/isPlainObject.js +13 -0
  285. package/lib/esm/utils/objects/isPlainObject.js.map +1 -0
  286. package/lib/esm/utils/objects/isPrimitive.js +24 -0
  287. package/lib/esm/utils/objects/isPrimitive.js.map +1 -0
  288. package/lib/esm/utils/objects/isPromise.js +12 -0
  289. package/lib/esm/utils/objects/isPromise.js.map +1 -0
  290. package/lib/esm/utils/objects/isProtectedKey.js +8 -0
  291. package/lib/esm/utils/objects/isProtectedKey.js.map +1 -0
  292. package/lib/esm/utils/objects/isSerializable.js +9 -0
  293. package/lib/esm/utils/objects/isSerializable.js.map +1 -0
  294. package/lib/esm/utils/objects/isStream.js +4 -0
  295. package/lib/esm/utils/objects/isStream.js.map +1 -0
  296. package/lib/esm/utils/objects/isString.js +11 -0
  297. package/lib/esm/utils/objects/isString.js.map +1 -0
  298. package/lib/esm/utils/objects/isSymbol.js +11 -0
  299. package/lib/esm/utils/objects/isSymbol.js.map +1 -0
  300. package/lib/esm/utils/objects/methodsOf.js +21 -0
  301. package/lib/esm/utils/objects/methodsOf.js.map +1 -0
  302. package/lib/esm/utils/objects/nameOf.js +26 -0
  303. package/lib/esm/utils/objects/nameOf.js.map +1 -0
  304. package/lib/esm/utils/objects/objectKeys.js +5 -0
  305. package/lib/esm/utils/objects/objectKeys.js.map +1 -0
  306. package/lib/esm/utils/objects/primitiveOf.js +16 -0
  307. package/lib/esm/utils/objects/primitiveOf.js.map +1 -0
  308. package/lib/esm/utils/objects/prototypeOf.js +10 -0
  309. package/lib/esm/utils/objects/prototypeOf.js.map +1 -0
  310. package/lib/esm/utils/objects/setValue.js +30 -0
  311. package/lib/esm/utils/objects/setValue.js.map +1 -0
  312. package/lib/esm/utils/objects/toMap.js +28 -0
  313. package/lib/esm/utils/objects/toMap.js.map +1 -0
  314. package/lib/esm/utils/objects/toStringConstructor.js +8 -0
  315. package/lib/esm/utils/objects/toStringConstructor.js.map +1 -0
  316. package/lib/esm/utils/proxyDelegation.js +50 -0
  317. package/lib/esm/utils/proxyDelegation.js.map +1 -0
  318. package/lib/esm/utils/uniq.js +11 -0
  319. package/lib/esm/utils/uniq.js.map +1 -0
  320. package/lib/{decorators → types/decorators}/configurable.d.ts +0 -1
  321. package/lib/{decorators → types/decorators}/deprecated.d.ts +0 -0
  322. package/lib/{decorators → types/decorators}/enumerable.d.ts +0 -1
  323. package/lib/{decorators → types/decorators}/notConfigurable.d.ts +0 -1
  324. package/lib/{decorators → types/decorators}/notEnumerable.d.ts +0 -1
  325. package/lib/{decorators → types/decorators}/readOnly.d.ts +0 -1
  326. package/lib/{decorators → types/decorators}/storeFn.d.ts +0 -0
  327. package/lib/{decorators → types/decorators}/storeMerge.d.ts +0 -0
  328. package/lib/{decorators → types/decorators}/storeSet.d.ts +0 -0
  329. package/lib/{decorators → types/decorators}/writable.d.ts +0 -1
  330. package/lib/{domain → types/domain}/AnyToPromise.d.ts +0 -0
  331. package/lib/{domain → types/domain}/DecoratorTypes.d.ts +0 -0
  332. package/lib/{domain → types/domain}/Env.d.ts +0 -0
  333. package/lib/{domain → types/domain}/Hooks.d.ts +0 -0
  334. package/lib/{domain → types/domain}/Metadata.d.ts +0 -0
  335. package/lib/{domain → types/domain}/Store.d.ts +5 -1
  336. package/lib/{domain → types/domain}/Type.d.ts +0 -0
  337. package/lib/{errors → types/errors}/UnsupportedDecoratorType.d.ts +0 -0
  338. package/lib/types/index.d.ts +81 -0
  339. package/lib/{interfaces → types/interfaces}/AnyDecorator.d.ts +0 -0
  340. package/lib/{interfaces → types/interfaces}/DecoratorParameters.d.ts +0 -0
  341. package/lib/{interfaces → types/interfaces}/HashOf.d.ts +0 -0
  342. package/lib/{interfaces → types/interfaces}/MetadataTypes.d.ts +0 -0
  343. package/lib/{interfaces → types/interfaces}/ValueOf.d.ts +0 -0
  344. package/lib/{utils → types/utils}/catchError.d.ts +0 -0
  345. package/lib/{utils → types/utils}/decorators/decorateMethodsOf.d.ts +0 -0
  346. package/lib/{utils → types/utils}/decorators/decoratorArgs.d.ts +0 -0
  347. package/lib/{utils → types/utils}/decorators/decoratorTypeOf.d.ts +0 -0
  348. package/lib/{utils → types/utils}/decorators/inheritedDescriptorOf.d.ts +0 -0
  349. package/lib/{utils → types/utils}/decorators/useDecorators.d.ts +0 -0
  350. package/lib/{utils → types/utils}/decorators/useMethodDecorators.d.ts +0 -0
  351. package/lib/types/utils/http/getHostInfoFromPort.d.ts +6 -0
  352. package/lib/types/utils/imports/importPackage.d.ts +1 -0
  353. package/lib/{utils/objects/getInheritedClass.d.ts → types/utils/objects/ancestorOf.d.ts} +1 -0
  354. package/lib/{utils/objects/ancestorOf.d.ts → types/utils/objects/ancestorsOf.d.ts} +0 -0
  355. package/lib/{utils → types/utils}/objects/classOf.d.ts +0 -0
  356. package/lib/{utils → types/utils}/objects/cleanObject.d.ts +0 -0
  357. package/lib/{utils → types/utils}/objects/constructorOf.d.ts +0 -0
  358. package/lib/{utils → types/utils}/objects/createInstance.d.ts +0 -0
  359. package/lib/types/utils/objects/deepClone.d.ts +6 -0
  360. package/lib/{utils → types/utils}/objects/deepMerge.d.ts +1 -1
  361. package/lib/{utils → types/utils}/objects/descriptorOf.d.ts +1 -0
  362. package/lib/{utils → types/utils}/objects/getClassOrSymbol.d.ts +0 -0
  363. package/lib/{utils → types/utils}/objects/getConstructorArgNames.d.ts +0 -0
  364. package/lib/{utils → types/utils}/objects/getEnumerableKeys.d.ts +0 -0
  365. package/lib/{utils → types/utils}/objects/getValue.d.ts +0 -0
  366. package/lib/{utils → types/utils}/objects/isArray.d.ts +0 -0
  367. package/lib/types/utils/objects/isArrowFn.d.ts +1 -0
  368. package/lib/{utils → types/utils}/objects/isBoolean.d.ts +0 -0
  369. package/lib/types/utils/objects/isBuffer.d.ts +7 -0
  370. package/lib/{utils → types/utils}/objects/isClass.d.ts +0 -0
  371. package/lib/{utils → types/utils}/objects/isCollection.d.ts +0 -0
  372. package/lib/{utils → types/utils}/objects/isDate.d.ts +0 -0
  373. package/lib/{utils → types/utils}/objects/isEmpty.d.ts +0 -0
  374. package/lib/{utils → types/utils}/objects/isEnumerable.d.ts +0 -0
  375. package/lib/{utils → types/utils}/objects/isFunction.d.ts +0 -0
  376. package/lib/{utils → types/utils}/objects/isInheritedFrom.d.ts +0 -0
  377. package/lib/{utils → types/utils}/objects/isNil.d.ts +0 -0
  378. package/lib/{utils → types/utils}/objects/isNumber.d.ts +0 -0
  379. package/lib/{utils → types/utils}/objects/isObject.d.ts +0 -0
  380. package/lib/{utils → types/utils}/objects/isObservable.d.ts +0 -0
  381. package/lib/{utils → types/utils}/objects/isPlainObject.d.ts +0 -0
  382. package/lib/{utils → types/utils}/objects/isPrimitive.d.ts +0 -0
  383. package/lib/{utils → types/utils}/objects/isPromise.d.ts +0 -0
  384. package/lib/{utils → types/utils}/objects/isProtectedKey.d.ts +0 -0
  385. package/lib/types/utils/objects/isSerializable.d.ts +1 -0
  386. package/lib/{utils → types/utils}/objects/isStream.d.ts +0 -0
  387. package/lib/{utils → types/utils}/objects/isString.d.ts +0 -0
  388. package/lib/{utils → types/utils}/objects/isSymbol.d.ts +0 -0
  389. package/lib/types/utils/objects/methodsOf.d.ts +9 -0
  390. package/lib/{utils → types/utils}/objects/nameOf.d.ts +0 -0
  391. package/lib/{utils → types/utils}/objects/objectKeys.d.ts +0 -0
  392. package/lib/{utils → types/utils}/objects/primitiveOf.d.ts +0 -0
  393. package/lib/{utils → types/utils}/objects/prototypeOf.d.ts +0 -0
  394. package/lib/{utils → types/utils}/objects/setValue.d.ts +0 -0
  395. package/lib/{utils → types/utils}/objects/toMap.d.ts +0 -0
  396. package/lib/{utils → types/utils}/objects/toStringConstructor.d.ts +0 -0
  397. package/lib/{utils → types/utils}/proxyDelegation.d.ts +0 -0
  398. package/lib/{utils → types/utils}/uniq.d.ts +0 -0
  399. package/package.json +15 -8
  400. package/readme.md +1 -2
  401. package/tsconfig.compile.esm.json +12 -0
  402. package/lib/decorators/index.d.ts +0 -14
  403. package/lib/domain/Entity.d.ts +0 -97
  404. package/lib/domain/index.d.ts +0 -8
  405. package/lib/index.d.ts +0 -6
  406. package/lib/index.js +0 -2271
  407. package/lib/index.js.map +0 -1
  408. package/lib/index.modern.js +0 -2185
  409. package/lib/index.modern.js.map +0 -1
  410. package/lib/interfaces/index.d.ts +0 -4
  411. package/lib/utils/index.d.ts +0 -11
  412. package/lib/utils/objects/deepClone.d.ts +0 -5
  413. package/lib/utils/objects/index.d.ts +0 -40
  414. package/lib/utils/objects/isArrowFn.d.ts +0 -1
  415. package/lib/utils/objects/methodsOf.d.ts +0 -5
@@ -0,0 +1,24 @@
1
+ import { isBoolean, isBooleanOrBooleanClass } from "./isBoolean.js";
2
+ import { isNumber, isNumberOrNumberClass } from "./isNumber.js";
3
+ import { isString, isStringOrStringClass } from "./isString.js";
4
+ /**
5
+ * Return true if the given obj is a primitive.
6
+ * @param target
7
+ * @returns {boolean}
8
+ * @ignore
9
+ */
10
+ export function isPrimitiveOrPrimitiveClass(target) {
11
+ return isStringOrStringClass(target) || isNumberOrNumberClass(target) || isBooleanOrBooleanClass(target);
12
+ }
13
+ /**
14
+ * Return true if the given obj is a primitive.
15
+ * @param target
16
+ * @returns {boolean}
17
+ */
18
+ export function isPrimitive(target) {
19
+ return isString(target) || isNumber(target) || isBoolean(target);
20
+ }
21
+ export function isPrimitiveClass(target) {
22
+ return [String, Number, Boolean].includes(target);
23
+ }
24
+ //# sourceMappingURL=isPrimitive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPrimitive.js","sourceRoot":"","sources":["../../../../src/utils/objects/isPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAW;IACrD,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;AAC3G,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAW;IAC1C,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import {isBoolean, isBooleanOrBooleanClass} from \"./isBoolean\";\nimport {isNumber, isNumberOrNumberClass} from \"./isNumber\";\nimport {isString, isStringOrStringClass} from \"./isString\";\n\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n * @ignore\n */\nexport function isPrimitiveOrPrimitiveClass(target: any): boolean {\n return isStringOrStringClass(target) || isNumberOrNumberClass(target) || isBooleanOrBooleanClass(target);\n}\n\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n */\nexport function isPrimitive(target: any): boolean {\n return isString(target) || isNumber(target) || isBoolean(target);\n}\n\nexport function isPrimitiveClass(target: any) {\n return [String, Number, Boolean].includes(target);\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Tests to see if the object is an ES2015 (ES6) Promise
3
+ * @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}
4
+ * @param target
5
+ * @returns {boolean}
6
+ */
7
+ export function isPromise(target) {
8
+ return (target === Promise ||
9
+ target instanceof Promise ||
10
+ (!!target && typeof target.subscribe !== "function" && typeof target.then === "function"));
11
+ }
12
+ //# sourceMappingURL=isPromise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/utils/objects/isPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAU,MAAW;IAC5C,OAAO,CACL,MAAM,KAAK,OAAO;QAClB,MAAM,YAAY,OAAO;QACzB,CAAC,CAAC,CAAC,MAAM,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAC1F,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Tests to see if the object is an ES2015 (ES6) Promise\n * @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}\n * @param target\n * @returns {boolean}\n */\nexport function isPromise<T = any>(target: any): target is Promise<T> {\n return (\n target === Promise ||\n target instanceof Promise ||\n (!!target && typeof target.subscribe !== \"function\" && typeof target.then === \"function\")\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Prevent prototype pollution vulnerability
3
+ * @param key
4
+ */
5
+ export function isProtectedKey(key) {
6
+ return ["__proto__", "constructor", "prototype"].includes(key);
7
+ }
8
+ //# sourceMappingURL=isProtectedKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isProtectedKey.js","sourceRoot":"","sources":["../../../../src/utils/objects/isProtectedKey.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC","sourcesContent":["/**\n * Prevent prototype pollution vulnerability\n * @param key\n */\nexport function isProtectedKey(key: string) {\n return [\"__proto__\", \"constructor\", \"prototype\"].includes(key);\n}\n"]}
@@ -0,0 +1,9 @@
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
+ export function isSerializable(data) {
7
+ return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data));
8
+ }
9
+ //# sourceMappingURL=isSerializable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSerializable.js","sourceRoot":"","sources":["../../../../src/utils/objects/isSerializable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,MAAM,UAAU,cAAc,CAAC,IAAS;IACtC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1H,CAAC","sourcesContent":["import {isStream} from \"./isStream\";\nimport {isBoolean} from \"./isBoolean\";\nimport {isNumber} from \"./isNumber\";\nimport {isString} from \"./isString\";\nimport {isNil} from \"./isNil\";\n\nexport function isSerializable(data: any) {\n return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data));\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export function isStream(obj) {
2
+ return obj !== null && typeof obj === "object" && typeof obj.pipe === "function";
3
+ }
4
+ //# sourceMappingURL=isStream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isStream.js","sourceRoot":"","sources":["../../../../src/utils/objects/isStream.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,GAAQ;IAC/B,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC;AACnF,CAAC","sourcesContent":["export function isStream(obj: any): boolean {\n return obj !== null && typeof obj === \"object\" && typeof obj.pipe === \"function\";\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @param target
3
+ * @returns {boolean}
4
+ */
5
+ export function isString(target) {
6
+ return typeof target === "string";
7
+ }
8
+ export function isStringOrStringClass(target) {
9
+ return typeof target === "string" || target instanceof String || target === String;
10
+ }
11
+ //# sourceMappingURL=isString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isString.js","sourceRoot":"","sources":["../../../../src/utils/objects/isString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC;AACrF,CAAC","sourcesContent":["/**\n * @param target\n * @returns {boolean}\n */\nexport function isString(target: any): target is string {\n return typeof target === \"string\";\n}\n\nexport function isStringOrStringClass(target: any): target is string {\n return typeof target === \"string\" || target instanceof String || target === String;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @param target
4
+ */
5
+ export function isSymbol(target) {
6
+ return typeof target === "symbol";
7
+ }
8
+ export function isSymbolOrSymbolClass(target) {
9
+ return typeof target === "symbol" || target instanceof Symbol || target === Symbol;
10
+ }
11
+ //# sourceMappingURL=isSymbol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSymbol.js","sourceRoot":"","sources":["../../../../src/utils/objects/isSymbol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC;AACrF,CAAC","sourcesContent":["/**\n *\n * @param target\n */\nexport function isSymbol(target: any): target is symbol {\n return typeof target === \"symbol\";\n}\n\nexport function isSymbolOrSymbolClass(target: any): target is symbol {\n return typeof target === \"symbol\" || target instanceof Symbol || target === Symbol;\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { classOf } from "./classOf.js";
2
+ import { ancestorsOf } from "./ancestorsOf.js";
3
+ import { prototypeOf } from "./prototypeOf.js";
4
+ /**
5
+ * Return all methods for a given class.
6
+ * @param target
7
+ */
8
+ export function methodsOf(target) {
9
+ const methods = new Map();
10
+ target = classOf(target);
11
+ ancestorsOf(target).forEach((target) => {
12
+ const keys = Reflect.ownKeys(prototypeOf(target));
13
+ keys.forEach((propertyKey) => {
14
+ if (propertyKey !== "constructor") {
15
+ methods.set(propertyKey, { target, propertyKey });
16
+ }
17
+ });
18
+ });
19
+ return Array.from(methods.values());
20
+ }
21
+ //# sourceMappingURL=methodsOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methodsOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/methodsOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAW;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzB,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,CAAC,WAAmB,EAAE,EAAE;YACnC,IAAI,WAAW,KAAK,aAAa,EAAE;gBACjC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC,CAAC,CAAC;aACjD;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\nimport {ancestorsOf} from \"./ancestorsOf\";\nimport {prototypeOf} from \"./prototypeOf\";\nimport {Type} from \"../../domain/Type\";\n\n/**\n * Return all methods for a given class.\n * @param target\n */\nexport function methodsOf(target: any): {target: Type; propertyKey: string}[] {\n const methods = new Map();\n target = classOf(target);\n\n ancestorsOf(target).forEach((target) => {\n const keys = Reflect.ownKeys(prototypeOf(target));\n\n keys.forEach((propertyKey: string) => {\n if (propertyKey !== \"constructor\") {\n methods.set(propertyKey, {target, propertyKey});\n }\n });\n });\n\n return Array.from(methods.values());\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Get the provide name.
3
+ * @param targetClass
4
+ */
5
+ export function nameOfClass(targetClass) {
6
+ return typeof targetClass === "function" ? targetClass.name : targetClass.constructor.name;
7
+ }
8
+ /**
9
+ * Get symbol name.
10
+ * @param sym
11
+ */
12
+ export const nameOfSymbol = (sym) => sym.toString().replace("Symbol(", "").replace(")", "");
13
+ /**
14
+ * Get object name
15
+ */
16
+ export function nameOf(obj) {
17
+ switch (typeof obj) {
18
+ default:
19
+ return "" + obj;
20
+ case "symbol":
21
+ return nameOfSymbol(obj);
22
+ case "function":
23
+ return nameOfClass(obj);
24
+ }
25
+ }
26
+ //# sourceMappingURL=nameOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nameOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/nameOf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,WAAgB;IAC1C,OAAO,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC;AAC7F,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE5G;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,GAAQ;IAC7B,QAAQ,OAAO,GAAG,EAAE;QAClB;YACE,OAAO,EAAE,GAAG,GAAG,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;QAC3B,KAAK,UAAU;YACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;KAC3B;AACH,CAAC","sourcesContent":["/**\n * Get the provide name.\n * @param targetClass\n */\nexport function nameOfClass(targetClass: any): string {\n return typeof targetClass === \"function\" ? targetClass.name : targetClass.constructor.name;\n}\n\n/**\n * Get symbol name.\n * @param sym\n */\nexport const nameOfSymbol = (sym: symbol): string => sym.toString().replace(\"Symbol(\", \"\").replace(\")\", \"\");\n\n/**\n * Get object name\n */\nexport function nameOf(obj: any): string {\n switch (typeof obj) {\n default:\n return \"\" + obj;\n case \"symbol\":\n return nameOfSymbol(obj);\n case \"function\":\n return nameOfClass(obj);\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { isProtectedKey } from "./isProtectedKey.js";
2
+ export function objectKeys(obj) {
3
+ return Object.keys(obj).filter((key) => !isProtectedKey(key));
4
+ }
5
+ //# sourceMappingURL=objectKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectKeys.js","sourceRoot":"","sources":["../../../../src/utils/objects/objectKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import {isProtectedKey} from \"./isProtectedKey\";\n\nexport function objectKeys(obj: any): string[] {\n return Object.keys(obj).filter((key) => !isProtectedKey(key));\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { isBooleanOrBooleanClass } from "./isBoolean.js";
2
+ import { isNumberOrNumberClass } from "./isNumber.js";
3
+ import { isStringOrStringClass } from "./isString.js";
4
+ export function primitiveOf(target) {
5
+ if (isStringOrStringClass(target)) {
6
+ return "string";
7
+ }
8
+ if (isNumberOrNumberClass(target)) {
9
+ return "number";
10
+ }
11
+ if (isBooleanOrBooleanClass(target)) {
12
+ return "boolean";
13
+ }
14
+ return "any";
15
+ }
16
+ //# sourceMappingURL=primitiveOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitiveOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/primitiveOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAW,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAW,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,QAAQ,CAAC;KACjB;IAED,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,QAAQ,CAAC;KACjB;IAED,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE;QACnC,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import {isBoolean, isBooleanOrBooleanClass} from \"./isBoolean\";\nimport {isNumber, isNumberOrNumberClass} from \"./isNumber\";\nimport {isString, isStringOrStringClass} from \"./isString\";\n\nexport function primitiveOf(target: any): \"string\" | \"number\" | \"boolean\" | \"any\" {\n if (isStringOrStringClass(target)) {\n return \"string\";\n }\n\n if (isNumberOrNumberClass(target)) {\n return \"number\";\n }\n\n if (isBooleanOrBooleanClass(target)) {\n return \"boolean\";\n }\n\n return \"any\";\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { classOf } from "./classOf.js";
2
+ /**
3
+ * Return the prototype of the given class.
4
+ * @param target
5
+ * @returns {any}
6
+ */
7
+ export function prototypeOf(target) {
8
+ return classOf(target) === target ? target.prototype : target;
9
+ }
10
+ //# sourceMappingURL=prototypeOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototypeOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/prototypeOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;AAChE,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\n\n/**\n * Return the prototype of the given class.\n * @param target\n * @returns {any}\n */\nexport function prototypeOf(target: any) {\n return classOf(target) === target ? target.prototype : target;\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { isProtectedKey } from "./isProtectedKey.js";
2
+ export function setValue(scope, expression, value, separator = ".") {
3
+ const keys = expression.split(separator);
4
+ const setValue = (key, add) => {
5
+ if (isProtectedKey(key)) {
6
+ return false;
7
+ }
8
+ if (add) {
9
+ if (typeof scope.set === "function") {
10
+ scope.set(key, value);
11
+ }
12
+ else {
13
+ scope[key] = value;
14
+ }
15
+ return false;
16
+ }
17
+ if (typeof scope.set === "function") {
18
+ if (!scope.has(key)) {
19
+ scope.set(key, {});
20
+ }
21
+ scope = scope.get(key);
22
+ }
23
+ else {
24
+ scope = scope[key] = scope[key] || {};
25
+ }
26
+ return true;
27
+ };
28
+ while (setValue(keys.shift(), !keys.length)) { }
29
+ }
30
+ //# sourceMappingURL=setValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setValue.js","sourceRoot":"","sources":["../../../../src/utils/objects/setValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,KAAU,EAAE,UAAkB,EAAE,KAAU,EAAE,SAAS,GAAG,GAAG;IAClF,MAAM,IAAI,GAAa,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,GAAY,EAAE,EAAE;QAC7C,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,GAAG,EAAE;YACP,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU,EAAE;gBACnC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACvB;iBAAM;gBACL,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACpB;YAED,OAAO,KAAK,CAAC;SACd;QAED,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU,EAAE;YACnC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACnB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;aACpB;YAED,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACxB;aAAM;YACL,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACvC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAE;AAClD,CAAC","sourcesContent":["import {isProtectedKey} from \"./isProtectedKey\";\n\nexport function setValue(scope: any, expression: string, value: any, separator = \".\") {\n const keys: string[] = expression.split(separator);\n\n const setValue = (key: string, add: boolean) => {\n if (isProtectedKey(key)) {\n return false;\n }\n\n if (add) {\n if (typeof scope.set === \"function\") {\n scope.set(key, value);\n } else {\n scope[key] = value;\n }\n\n return false;\n }\n\n if (typeof scope.set === \"function\") {\n if (!scope.has(key)) {\n scope.set(key, {});\n }\n\n scope = scope.get(key);\n } else {\n scope = scope[key] = scope[key] || {};\n }\n\n return true;\n };\n\n while (setValue(keys.shift()!, !keys.length)) {}\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { isArray } from "./isArray.js";
2
+ import { isString } from "./isString.js";
3
+ function createIdentityFn(keyOrFn) {
4
+ if (!keyOrFn) {
5
+ return (v, k) => String(k);
6
+ }
7
+ if (isString(keyOrFn)) {
8
+ return (item) => {
9
+ return item[keyOrFn];
10
+ };
11
+ }
12
+ return keyOrFn;
13
+ }
14
+ export function toMap(input, keyOrFn) {
15
+ if (isArray(input)) {
16
+ const identity = createIdentityFn(keyOrFn || "id");
17
+ return input.reduce((map, value, index) => {
18
+ const ids = [].concat(identity(value, index));
19
+ ids.forEach((id) => map.set(id, value));
20
+ return map;
21
+ }, new Map());
22
+ }
23
+ const identity = createIdentityFn(keyOrFn);
24
+ return Object.entries(input).reduce((map, [key, value]) => {
25
+ return map.set(identity(value, key), value);
26
+ }, new Map());
27
+ }
28
+ //# sourceMappingURL=toMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toMap.js","sourceRoot":"","sources":["../../../../src/utils/objects/toMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAKpC,SAAS,gBAAgB,CAAI,OAA0B;IACrD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC5B;IAED,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;QACrB,OAAO,CAAC,IAAS,EAAE,EAAE;YACnB,OAAO,IAAI,CAAC,OAAiB,CAAC,CAAC;QACjC,CAAC,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,KAAK,CAAqC,KAAyB,EAAE,OAA0B;IAC7G,IAAI,OAAO,CAAI,KAAK,CAAC,EAAE;QACrB,MAAM,QAAQ,GAAG,gBAAgB,CAAI,OAAO,IAAI,IAAI,CAAC,CAAC;QACtD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACxC,MAAM,GAAG,GAAI,EAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;YAE5D,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;YAExC,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAI,OAAO,CAAC,CAAC;IAE9C,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACxD,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAU,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAChB,CAAC","sourcesContent":["import {isArray} from \"./isArray\";\nimport {isString} from \"./isString\";\n\nexport type ToMapIdentityCB<V> = (item: V, index: string | number) => string | string[];\nexport type ToMapIdentity<V> = string | ToMapIdentityCB<V>;\n\nfunction createIdentityFn<V>(keyOrFn?: ToMapIdentity<V>): ToMapIdentityCB<V> {\n if (!keyOrFn) {\n return (v, k) => String(k);\n }\n\n if (isString(keyOrFn)) {\n return (item: any) => {\n return item[keyOrFn as string];\n };\n }\n\n return keyOrFn;\n}\n\nexport function toMap<K extends keyof any = any, V = any>(input: Record<K, V> | V[], keyOrFn?: ToMapIdentity<V>): Map<K, V> {\n if (isArray<V>(input)) {\n const identity = createIdentityFn<V>(keyOrFn || \"id\");\n return input.reduce((map, value, index) => {\n const ids = ([] as string[]).concat(identity(value, index));\n\n ids.forEach((id) => map.set(id, value));\n\n return map;\n }, new Map());\n }\n\n const identity = createIdentityFn<V>(keyOrFn);\n\n return Object.entries(input).reduce((map, [key, value]) => {\n return map.set(identity(value as V, key), value);\n }, new Map());\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { constructorOf } from "./constructorOf.js";
2
+ export function toStringConstructor(target) {
3
+ const ctr = constructorOf(target);
4
+ const strings = ctr.toString().split("\n");
5
+ const ctrString = strings.find((s) => s.indexOf("constructor(") > -1) || "constructor()";
6
+ return `${ctrString.replace("{", "").trim()}`;
7
+ }
8
+ //# sourceMappingURL=toStringConstructor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toStringConstructor.js","sourceRoot":"","sources":["../../../../src/utils/objects/toStringConstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,mBAAmB,CAAC,MAAW;IAC7C,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC;IAEzF,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import {constructorOf} from \"./constructorOf\";\n\nexport function toStringConstructor(target: any): string {\n const ctr = constructorOf(target);\n const strings = ctr.toString().split(\"\\n\");\n const ctrString = strings.find((s) => s.indexOf(\"constructor(\") > -1) || \"constructor()\";\n\n return `${ctrString.replace(\"{\", \"\").trim()}`;\n}\n"]}
@@ -0,0 +1,50 @@
1
+ import { uniq } from "./uniq.js";
2
+ /**
3
+ * Create a complete and iterable trap.
4
+ * @param self
5
+ * @param options
6
+ * @ignore
7
+ */
8
+ export function proxyDelegation(self, options = {}) {
9
+ const { handlers = {}, remove, ownKeys } = options;
10
+ const get = options.getter || ((target, propertyKey) => target.get(propertyKey));
11
+ const set = options.setter || ((target, propertyKey, value) => !!target.set(propertyKey, value));
12
+ const itsOwnProp = (target, p) => Reflect.has(target, p) || typeof p === "symbol";
13
+ return new Proxy(self, {
14
+ getOwnPropertyDescriptor(target, p) {
15
+ return Reflect.getOwnPropertyDescriptor(target, p);
16
+ },
17
+ has(target, p) {
18
+ if (itsOwnProp(target, p)) {
19
+ return Reflect.has(target, p);
20
+ }
21
+ return get(target, p) !== undefined;
22
+ },
23
+ get(target, p, receiver) {
24
+ if (itsOwnProp(target, p)) {
25
+ return Reflect.get(target, p, receiver);
26
+ }
27
+ return get(target, p);
28
+ },
29
+ set(target, p, value, receiver) {
30
+ if (itsOwnProp(target, p)) {
31
+ return Reflect.set(target, p, value, receiver);
32
+ }
33
+ return !!set(target, p, value, receiver);
34
+ },
35
+ deleteProperty(target, p) {
36
+ if (itsOwnProp(target, p) || !remove) {
37
+ return Reflect.deleteProperty(target, p);
38
+ }
39
+ return remove(target, p);
40
+ },
41
+ defineProperty(target, p, attributes) {
42
+ return Reflect.defineProperty(target, p, attributes);
43
+ },
44
+ ownKeys(target) {
45
+ return uniq(Reflect.ownKeys(target).concat((ownKeys && ownKeys(target)) || []));
46
+ },
47
+ ...handlers
48
+ });
49
+ }
50
+ //# sourceMappingURL=proxyDelegation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxyDelegation.js","sourceRoot":"","sources":["../../../src/utils/proxyDelegation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AA4B5B;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAyB,IAAS,EAAE,UAA8B,EAAE;IACjG,MAAM,EAAC,QAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC;IACjD,MAAM,GAAG,GAA0B,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1H,MAAM,GAAG,GACP,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;IAE9G,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;IAEpG,OAAO,IAAI,KAAK,CAAI,IAAI,EAAE;QACxB,wBAAwB,CAAC,MAAW,EAAE,CAAc;YAClD,OAAO,OAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc;YAC7B,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aAC/B;YAED,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;QACtC,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,QAAa;YAC5C,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;aACzC;YAED,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACxB,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,KAAU,EAAE,QAAa;YACxD,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;aAChD;YAED,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;QAED,cAAc,CAAC,MAAW,EAAE,CAAc;YACxC,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;gBACpC,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aAC1C;YAED,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,cAAc,CAAC,MAAW,EAAE,CAAc,EAAE,UAA8B;YACxE,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,CAAC,MAAW;YACjB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAClF,CAAC;QACD,GAAG,QAAQ;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {uniq} from \"./uniq\";\n/**\n * @ignore\n */\nexport type ProxyDelegationGetter<T = any> = (target: T, property: PropertyKey) => any | undefined;\n/**\n * @ignore\n */\nexport type ProxyDelegationRemove<T = any> = (target: T, property: PropertyKey) => any;\n/**\n * @ignore\n */\nexport type ProxyDelegationSetter<T = any> = (target: T, property: PropertyKey, value: any, receiver: any) => any;\n/**\n * @ignore\n */\nexport type ProxyDelegationOwnKeys<T = any> = (target: T) => (string | symbol)[];\n/**\n * @ignore\n */\nexport interface ProxyDelegation<T extends object> {\n handlers?: ProxyHandler<T>;\n getter?: ProxyDelegationGetter<T>;\n setter?: ProxyDelegationSetter<T>;\n remove?: ProxyDelegationRemove<T>;\n ownKeys?: ProxyDelegationOwnKeys<T>;\n}\n\n/**\n * Create a complete and iterable trap.\n * @param self\n * @param options\n * @ignore\n */\nexport function proxyDelegation<T extends object = any>(self: any, options: ProxyDelegation<T> = {}) {\n const {handlers = {}, remove, ownKeys} = options;\n const get: ProxyDelegationGetter = options.getter || ((target: any, propertyKey: PropertyKey) => target.get(propertyKey));\n const set: ProxyDelegationSetter =\n options.setter || ((target: any, propertyKey: PropertyKey, value: any) => !!target.set(propertyKey, value));\n\n const itsOwnProp = (target: any, p: PropertyKey) => Reflect.has(target, p) || typeof p === \"symbol\";\n\n return new Proxy<T>(self, {\n getOwnPropertyDescriptor(target: any, p: PropertyKey): PropertyDescriptor | undefined {\n return Reflect.getOwnPropertyDescriptor(target, p);\n },\n\n has(target: any, p: PropertyKey): boolean {\n if (itsOwnProp(target, p)) {\n return Reflect.has(target, p);\n }\n\n return get(target, p) !== undefined;\n },\n\n get(target: any, p: PropertyKey, receiver: any): any {\n if (itsOwnProp(target, p)) {\n return Reflect.get(target, p, receiver);\n }\n\n return get(target, p);\n },\n\n set(target: any, p: PropertyKey, value: any, receiver: any): boolean {\n if (itsOwnProp(target, p)) {\n return Reflect.set(target, p, value, receiver);\n }\n\n return !!set(target, p as any, value, receiver);\n },\n\n deleteProperty(target: any, p: PropertyKey): boolean {\n if (itsOwnProp(target, p) || !remove) {\n return Reflect.deleteProperty(target, p);\n }\n\n return remove(target, p);\n },\n\n defineProperty(target: any, p: PropertyKey, attributes: PropertyDescriptor): boolean {\n return Reflect.defineProperty(target, p, attributes);\n },\n\n ownKeys(target: any) {\n return uniq(Reflect.ownKeys(target).concat((ownKeys && ownKeys(target)) || []));\n },\n ...handlers\n });\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export function uniq(list) {
2
+ return Array.from(new Set(list).values());
3
+ }
4
+ export function uniqBy(list, key = "id") {
5
+ const map = new Map();
6
+ list.forEach((item) => {
7
+ map.set(item[key], item);
8
+ });
9
+ return Array.from(map.values());
10
+ }
11
+ //# sourceMappingURL=uniq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uniq.js","sourceRoot":"","sources":["../../../src/utils/uniq.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAU,IAAS;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,MAAM,CAAU,IAAS,EAAE,GAAG,GAAG,IAAI;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAEtB,IAAI,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;QACzB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC","sourcesContent":["export function uniq<T = any>(list: T[]): T[] {\n return Array.from(new Set(list).values());\n}\n\nexport function uniqBy<T = any>(list: T[], key = \"id\"): T[] {\n const map = new Map();\n\n list.forEach((item: any) => {\n map.set(item[key], item);\n });\n\n return Array.from(map.values());\n}\n"]}
@@ -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;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,4 @@
1
+ import type { Type } from "./Type";
1
2
  /**
2
3
  * @ignore
3
4
  */
@@ -15,7 +16,7 @@ export declare const PROPERTY_STORE = "tsed:property:store";
15
16
  */
16
17
  export declare const PARAM_STORE = "tsed:param:store";
17
18
  export declare class Store {
18
- #private;
19
+ private _entries;
19
20
  /**
20
21
  * Create or get a Store from args {target + methodName + descriptor}
21
22
  * @param args
@@ -29,6 +30,8 @@ export declare class Store {
29
30
  * @returns {Store}
30
31
  */
31
32
  static fromMethod(target: any, propertyKey: string | symbol): Store;
33
+ static mergeStoreFrom(target: Type<any>, source: Type<any>, ...args: any[]): Store;
34
+ static mergeStoreMethodFrom(target: Type<any>, source: Type<any>, propertyKey: string | symbol): Store;
32
35
  /**
33
36
  * The get() method returns a specified element from a Map object.
34
37
  * @param key Required. The key of the element to return from the Map object.
@@ -62,4 +65,5 @@ export declare class Store {
62
65
  * @returns {Store}
63
66
  */
64
67
  merge(key: any, value: any, inverse?: boolean): Store;
68
+ toJson(): {};
65
69
  }
File without changes
@@ -0,0 +1,81 @@
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";
21
+ export * from "./errors/UnsupportedDecoratorType";
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/deepMerge";
46
+ export * from "./utils/objects/descriptorOf";
47
+ export * from "./utils/objects/getClassOrSymbol";
48
+ export * from "./utils/objects/getConstructorArgNames";
49
+ export * from "./utils/objects/getEnumerableKeys";
50
+ export * from "./utils/objects/getValue";
51
+ export * from "./utils/objects/isArray";
52
+ export * from "./utils/objects/isArrowFn";
53
+ export * from "./utils/objects/isBoolean";
54
+ export * from "./utils/objects/isBuffer";
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";
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ export declare function getHostInfoFromPort(protocol: string, addressPort: any): {
2
+ protocol: string;
3
+ address: string;
4
+ port: number;
5
+ toString(): string;
6
+ };
@@ -0,0 +1 @@
1
+ export declare function importPackage(packageName: string, loaderFn?: Function, optional?: boolean): Promise<any>;
@@ -1 +1,2 @@
1
+ export declare function ancestorOf(target: any): any;
1
2
  export declare function getInheritedClass(target: any): any;