@tsed/core 8.0.0-alpha.4 → 8.0.0-alpha.6

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 (257) hide show
  1. package/lib/types/utils/objects/isBuffer.d.ts +1 -1
  2. package/package.json +6 -7
  3. package/lib/cjs/decorators/configurable.js +0 -14
  4. package/lib/cjs/decorators/configurable.js.map +0 -1
  5. package/lib/cjs/decorators/deprecated.js +0 -71
  6. package/lib/cjs/decorators/deprecated.js.map +0 -1
  7. package/lib/cjs/decorators/enumerable.js +0 -14
  8. package/lib/cjs/decorators/enumerable.js.map +0 -1
  9. package/lib/cjs/decorators/notConfigurable.js +0 -9
  10. package/lib/cjs/decorators/notConfigurable.js.map +0 -1
  11. package/lib/cjs/decorators/notEnumerable.js +0 -9
  12. package/lib/cjs/decorators/notEnumerable.js.map +0 -1
  13. package/lib/cjs/decorators/readOnly.js +0 -9
  14. package/lib/cjs/decorators/readOnly.js.map +0 -1
  15. package/lib/cjs/decorators/storeFn.js +0 -22
  16. package/lib/cjs/decorators/storeFn.js.map +0 -1
  17. package/lib/cjs/decorators/storeMerge.js +0 -11
  18. package/lib/cjs/decorators/storeMerge.js.map +0 -1
  19. package/lib/cjs/decorators/storeSet.js +0 -11
  20. package/lib/cjs/decorators/storeSet.js.map +0 -1
  21. package/lib/cjs/decorators/writable.js +0 -14
  22. package/lib/cjs/decorators/writable.js.map +0 -1
  23. package/lib/cjs/domain/AnyToPromise.js +0 -147
  24. package/lib/cjs/domain/AnyToPromise.js.map +0 -1
  25. package/lib/cjs/domain/DecoratorTypes.js +0 -15
  26. package/lib/cjs/domain/DecoratorTypes.js.map +0 -1
  27. package/lib/cjs/domain/Env.js +0 -19
  28. package/lib/cjs/domain/Env.js.map +0 -1
  29. package/lib/cjs/domain/Hooks.js +0 -99
  30. package/lib/cjs/domain/Hooks.js.map +0 -1
  31. package/lib/cjs/domain/Metadata.js +0 -508
  32. package/lib/cjs/domain/Metadata.js.map +0 -1
  33. package/lib/cjs/domain/Store.js +0 -157
  34. package/lib/cjs/domain/Store.js.map +0 -1
  35. package/lib/cjs/domain/Type.js +0 -7
  36. package/lib/cjs/domain/Type.js.map +0 -1
  37. package/lib/cjs/errors/UnsupportedDecoratorType.js +0 -23
  38. package/lib/cjs/errors/UnsupportedDecoratorType.js.map +0 -1
  39. package/lib/cjs/index.js +0 -90
  40. package/lib/cjs/index.js.map +0 -1
  41. package/lib/cjs/interfaces/AnyDecorator.js +0 -3
  42. package/lib/cjs/interfaces/AnyDecorator.js.map +0 -1
  43. package/lib/cjs/interfaces/DecoratorParameters.js +0 -3
  44. package/lib/cjs/interfaces/DecoratorParameters.js.map +0 -1
  45. package/lib/cjs/interfaces/MetadataTypes.js +0 -3
  46. package/lib/cjs/interfaces/MetadataTypes.js.map +0 -1
  47. package/lib/cjs/interfaces/Relation.js +0 -3
  48. package/lib/cjs/interfaces/Relation.js.map +0 -1
  49. package/lib/cjs/interfaces/ValueOf.js +0 -3
  50. package/lib/cjs/interfaces/ValueOf.js.map +0 -1
  51. package/lib/cjs/package.json +0 -3
  52. package/lib/cjs/utils/catchError.js +0 -22
  53. package/lib/cjs/utils/catchError.js.map +0 -1
  54. package/lib/cjs/utils/decorators/decorateMethodsOf.js +0 -29
  55. package/lib/cjs/utils/decorators/decorateMethodsOf.js.map +0 -1
  56. package/lib/cjs/utils/decorators/decoratorArgs.js +0 -9
  57. package/lib/cjs/utils/decorators/decoratorArgs.js.map +0 -1
  58. package/lib/cjs/utils/decorators/decoratorTypeOf.js +0 -23
  59. package/lib/cjs/utils/decorators/decoratorTypeOf.js.map +0 -1
  60. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js +0 -15
  61. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js.map +0 -1
  62. package/lib/cjs/utils/decorators/useDecorators.js +0 -14
  63. package/lib/cjs/utils/decorators/useDecorators.js.map +0 -1
  64. package/lib/cjs/utils/decorators/useMethodDecorators.js +0 -15
  65. package/lib/cjs/utils/decorators/useMethodDecorators.js.map +0 -1
  66. package/lib/cjs/utils/getRandomId.js +0 -8
  67. package/lib/cjs/utils/getRandomId.js.map +0 -1
  68. package/lib/cjs/utils/http/getHostInfoFromPort.js +0 -21
  69. package/lib/cjs/utils/http/getHostInfoFromPort.js.map +0 -1
  70. package/lib/cjs/utils/imports/importPackage.js +0 -39
  71. package/lib/cjs/utils/imports/importPackage.js.map +0 -1
  72. package/lib/cjs/utils/objects/ancestorOf.js +0 -12
  73. package/lib/cjs/utils/objects/ancestorOf.js.map +0 -1
  74. package/lib/cjs/utils/objects/ancestorsOf.js +0 -22
  75. package/lib/cjs/utils/objects/ancestorsOf.js.map +0 -1
  76. package/lib/cjs/utils/objects/classOf.js +0 -23
  77. package/lib/cjs/utils/objects/classOf.js.map +0 -1
  78. package/lib/cjs/utils/objects/cleanObject.js +0 -24
  79. package/lib/cjs/utils/objects/cleanObject.js.map +0 -1
  80. package/lib/cjs/utils/objects/constructorOf.js +0 -20
  81. package/lib/cjs/utils/objects/constructorOf.js.map +0 -1
  82. package/lib/cjs/utils/objects/createInstance.js +0 -9
  83. package/lib/cjs/utils/objects/createInstance.js.map +0 -1
  84. package/lib/cjs/utils/objects/deepClone.js +0 -77
  85. package/lib/cjs/utils/objects/deepClone.js.map +0 -1
  86. package/lib/cjs/utils/objects/deepMerge.js +0 -63
  87. package/lib/cjs/utils/objects/deepMerge.js.map +0 -1
  88. package/lib/cjs/utils/objects/descriptorOf.js +0 -18
  89. package/lib/cjs/utils/objects/descriptorOf.js.map +0 -1
  90. package/lib/cjs/utils/objects/getClassOrSymbol.js +0 -10
  91. package/lib/cjs/utils/objects/getClassOrSymbol.js.map +0 -1
  92. package/lib/cjs/utils/objects/getConstructorArgNames.js +0 -14
  93. package/lib/cjs/utils/objects/getConstructorArgNames.js.map +0 -1
  94. package/lib/cjs/utils/objects/getEnumerableKeys.js +0 -20
  95. package/lib/cjs/utils/objects/getEnumerableKeys.js.map +0 -1
  96. package/lib/cjs/utils/objects/getValue.js +0 -49
  97. package/lib/cjs/utils/objects/getValue.js.map +0 -1
  98. package/lib/cjs/utils/objects/hasJsonMethod.js +0 -8
  99. package/lib/cjs/utils/objects/hasJsonMethod.js.map +0 -1
  100. package/lib/cjs/utils/objects/isArray.js +0 -23
  101. package/lib/cjs/utils/objects/isArray.js.map +0 -1
  102. package/lib/cjs/utils/objects/isArrowFn.js +0 -9
  103. package/lib/cjs/utils/objects/isArrowFn.js.map +0 -1
  104. package/lib/cjs/utils/objects/isBoolean.js +0 -17
  105. package/lib/cjs/utils/objects/isBoolean.js.map +0 -1
  106. package/lib/cjs/utils/objects/isBuffer.js +0 -21
  107. package/lib/cjs/utils/objects/isBuffer.js.map +0 -1
  108. package/lib/cjs/utils/objects/isClass.js +0 -28
  109. package/lib/cjs/utils/objects/isClass.js.map +0 -1
  110. package/lib/cjs/utils/objects/isCollection.js +0 -22
  111. package/lib/cjs/utils/objects/isCollection.js.map +0 -1
  112. package/lib/cjs/utils/objects/isDate.js +0 -13
  113. package/lib/cjs/utils/objects/isDate.js.map +0 -1
  114. package/lib/cjs/utils/objects/isEmpty.js +0 -14
  115. package/lib/cjs/utils/objects/isEmpty.js.map +0 -1
  116. package/lib/cjs/utils/objects/isEnumerable.js +0 -22
  117. package/lib/cjs/utils/objects/isEnumerable.js.map +0 -1
  118. package/lib/cjs/utils/objects/isFunction.js +0 -8
  119. package/lib/cjs/utils/objects/isFunction.js.map +0 -1
  120. package/lib/cjs/utils/objects/isInheritedFrom.js +0 -26
  121. package/lib/cjs/utils/objects/isInheritedFrom.js.map +0 -1
  122. package/lib/cjs/utils/objects/isMomentObject.js +0 -8
  123. package/lib/cjs/utils/objects/isMomentObject.js.map +0 -1
  124. package/lib/cjs/utils/objects/isMongooseObject.js +0 -13
  125. package/lib/cjs/utils/objects/isMongooseObject.js.map +0 -1
  126. package/lib/cjs/utils/objects/isNil.js +0 -8
  127. package/lib/cjs/utils/objects/isNil.js.map +0 -1
  128. package/lib/cjs/utils/objects/isNumber.js +0 -17
  129. package/lib/cjs/utils/objects/isNumber.js.map +0 -1
  130. package/lib/cjs/utils/objects/isObject.js +0 -8
  131. package/lib/cjs/utils/objects/isObject.js.map +0 -1
  132. package/lib/cjs/utils/objects/isObservable.js +0 -8
  133. package/lib/cjs/utils/objects/isObservable.js.map +0 -1
  134. package/lib/cjs/utils/objects/isPlainObject.js +0 -18
  135. package/lib/cjs/utils/objects/isPlainObject.js.map +0 -1
  136. package/lib/cjs/utils/objects/isPrimitive.js +0 -30
  137. package/lib/cjs/utils/objects/isPrimitive.js.map +0 -1
  138. package/lib/cjs/utils/objects/isPromise.js +0 -16
  139. package/lib/cjs/utils/objects/isPromise.js.map +0 -1
  140. package/lib/cjs/utils/objects/isProtectedKey.js +0 -12
  141. package/lib/cjs/utils/objects/isProtectedKey.js.map +0 -1
  142. package/lib/cjs/utils/objects/isRegExp.js +0 -8
  143. package/lib/cjs/utils/objects/isRegExp.js.map +0 -1
  144. package/lib/cjs/utils/objects/isSerializable.js +0 -13
  145. package/lib/cjs/utils/objects/isSerializable.js.map +0 -1
  146. package/lib/cjs/utils/objects/isStream.js +0 -8
  147. package/lib/cjs/utils/objects/isStream.js.map +0 -1
  148. package/lib/cjs/utils/objects/isString.js +0 -16
  149. package/lib/cjs/utils/objects/isString.js.map +0 -1
  150. package/lib/cjs/utils/objects/isSymbol.js +0 -16
  151. package/lib/cjs/utils/objects/isSymbol.js.map +0 -1
  152. package/lib/cjs/utils/objects/methodsOf.js +0 -25
  153. package/lib/cjs/utils/objects/methodsOf.js.map +0 -1
  154. package/lib/cjs/utils/objects/nameOf.js +0 -32
  155. package/lib/cjs/utils/objects/nameOf.js.map +0 -1
  156. package/lib/cjs/utils/objects/objectKeys.js +0 -9
  157. package/lib/cjs/utils/objects/objectKeys.js.map +0 -1
  158. package/lib/cjs/utils/objects/primitiveOf.js +0 -20
  159. package/lib/cjs/utils/objects/primitiveOf.js.map +0 -1
  160. package/lib/cjs/utils/objects/prototypeOf.js +0 -14
  161. package/lib/cjs/utils/objects/prototypeOf.js.map +0 -1
  162. package/lib/cjs/utils/objects/setValue.js +0 -34
  163. package/lib/cjs/utils/objects/setValue.js.map +0 -1
  164. package/lib/cjs/utils/objects/toMap.js +0 -36
  165. package/lib/cjs/utils/objects/toMap.js.map +0 -1
  166. package/lib/cjs/utils/objects/toStringConstructor.js +0 -12
  167. package/lib/cjs/utils/objects/toStringConstructor.js.map +0 -1
  168. package/lib/cjs/utils/proxyDelegation.js +0 -54
  169. package/lib/cjs/utils/proxyDelegation.js.map +0 -1
  170. package/lib/cjs/utils/uniq.js +0 -19
  171. package/lib/cjs/utils/uniq.js.map +0 -1
  172. package/lib/esm/package.json +0 -3
  173. package/lib/types-esm/decorators/configurable.d.ts +0 -1
  174. package/lib/types-esm/decorators/deprecated.d.ts +0 -32
  175. package/lib/types-esm/decorators/enumerable.d.ts +0 -1
  176. package/lib/types-esm/decorators/notConfigurable.d.ts +0 -1
  177. package/lib/types-esm/decorators/notEnumerable.d.ts +0 -1
  178. package/lib/types-esm/decorators/readOnly.d.ts +0 -1
  179. package/lib/types-esm/decorators/storeFn.d.ts +0 -9
  180. package/lib/types-esm/decorators/storeMerge.d.ts +0 -1
  181. package/lib/types-esm/decorators/storeSet.d.ts +0 -1
  182. package/lib/types-esm/decorators/writable.d.ts +0 -1
  183. package/lib/types-esm/domain/AnyToPromise.d.ts +0 -42
  184. package/lib/types-esm/domain/DecoratorTypes.d.ts +0 -10
  185. package/lib/types-esm/domain/Env.d.ts +0 -13
  186. package/lib/types-esm/domain/Hooks.d.ts +0 -47
  187. package/lib/types-esm/domain/Metadata.d.ts +0 -442
  188. package/lib/types-esm/domain/Store.d.ts +0 -69
  189. package/lib/types-esm/domain/Type.d.ts +0 -14
  190. package/lib/types-esm/errors/UnsupportedDecoratorType.d.ts +0 -5
  191. package/lib/types-esm/index.d.ts +0 -86
  192. package/lib/types-esm/interfaces/AnyDecorator.d.ts +0 -1
  193. package/lib/types-esm/interfaces/DecoratorParameters.d.ts +0 -3
  194. package/lib/types-esm/interfaces/MetadataTypes.d.ts +0 -5
  195. package/lib/types-esm/interfaces/Relation.d.ts +0 -1
  196. package/lib/types-esm/interfaces/ValueOf.d.ts +0 -1
  197. package/lib/types-esm/utils/catchError.d.ts +0 -2
  198. package/lib/types-esm/utils/decorators/decorateMethodsOf.d.ts +0 -1
  199. package/lib/types-esm/utils/decorators/decoratorArgs.d.ts +0 -2
  200. package/lib/types-esm/utils/decorators/decoratorTypeOf.d.ts +0 -2
  201. package/lib/types-esm/utils/decorators/inheritedDescriptorOf.d.ts +0 -1
  202. package/lib/types-esm/utils/decorators/useDecorators.d.ts +0 -2
  203. package/lib/types-esm/utils/decorators/useMethodDecorators.d.ts +0 -3
  204. package/lib/types-esm/utils/getRandomId.d.ts +0 -1
  205. package/lib/types-esm/utils/http/getHostInfoFromPort.d.ts +0 -7
  206. package/lib/types-esm/utils/imports/importPackage.d.ts +0 -1
  207. package/lib/types-esm/utils/objects/ancestorOf.d.ts +0 -2
  208. package/lib/types-esm/utils/objects/ancestorsOf.d.ts +0 -6
  209. package/lib/types-esm/utils/objects/classOf.d.ts +0 -13
  210. package/lib/types-esm/utils/objects/cleanObject.d.ts +0 -6
  211. package/lib/types-esm/utils/objects/constructorOf.d.ts +0 -11
  212. package/lib/types-esm/utils/objects/createInstance.d.ts +0 -1
  213. package/lib/types-esm/utils/objects/deepClone.d.ts +0 -6
  214. package/lib/types-esm/utils/objects/deepMerge.d.ts +0 -9
  215. package/lib/types-esm/utils/objects/descriptorOf.d.ts +0 -8
  216. package/lib/types-esm/utils/objects/getClassOrSymbol.d.ts +0 -1
  217. package/lib/types-esm/utils/objects/getConstructorArgNames.d.ts +0 -1
  218. package/lib/types-esm/utils/objects/getEnumerableKeys.d.ts +0 -5
  219. package/lib/types-esm/utils/objects/getValue.d.ts +0 -32
  220. package/lib/types-esm/utils/objects/hasJsonMethod.d.ts +0 -1
  221. package/lib/types-esm/utils/objects/isArray.d.ts +0 -13
  222. package/lib/types-esm/utils/objects/isArrowFn.d.ts +0 -1
  223. package/lib/types-esm/utils/objects/isBoolean.d.ts +0 -7
  224. package/lib/types-esm/utils/objects/isBuffer.d.ts +0 -8
  225. package/lib/types-esm/utils/objects/isClass.d.ts +0 -1
  226. package/lib/types-esm/utils/objects/isCollection.d.ts +0 -6
  227. package/lib/types-esm/utils/objects/isDate.d.ts +0 -6
  228. package/lib/types-esm/utils/objects/isEmpty.d.ts +0 -6
  229. package/lib/types-esm/utils/objects/isEnumerable.d.ts +0 -6
  230. package/lib/types-esm/utils/objects/isFunction.d.ts +0 -1
  231. package/lib/types-esm/utils/objects/isInheritedFrom.d.ts +0 -1
  232. package/lib/types-esm/utils/objects/isMomentObject.d.ts +0 -1
  233. package/lib/types-esm/utils/objects/isMongooseObject.d.ts +0 -2
  234. package/lib/types-esm/utils/objects/isNil.d.ts +0 -1
  235. package/lib/types-esm/utils/objects/isNumber.d.ts +0 -7
  236. package/lib/types-esm/utils/objects/isObject.d.ts +0 -1
  237. package/lib/types-esm/utils/objects/isObservable.d.ts +0 -1
  238. package/lib/types-esm/utils/objects/isPlainObject.d.ts +0 -7
  239. package/lib/types-esm/utils/objects/isPrimitive.d.ts +0 -14
  240. package/lib/types-esm/utils/objects/isPromise.d.ts +0 -7
  241. package/lib/types-esm/utils/objects/isProtectedKey.d.ts +0 -5
  242. package/lib/types-esm/utils/objects/isRegExp.d.ts +0 -1
  243. package/lib/types-esm/utils/objects/isSerializable.d.ts +0 -1
  244. package/lib/types-esm/utils/objects/isStream.d.ts +0 -1
  245. package/lib/types-esm/utils/objects/isString.d.ts +0 -6
  246. package/lib/types-esm/utils/objects/isSymbol.d.ts +0 -6
  247. package/lib/types-esm/utils/objects/methodsOf.d.ts +0 -9
  248. package/lib/types-esm/utils/objects/nameOf.d.ts +0 -14
  249. package/lib/types-esm/utils/objects/objectKeys.d.ts +0 -1
  250. package/lib/types-esm/utils/objects/primitiveOf.d.ts +0 -1
  251. package/lib/types-esm/utils/objects/prototypeOf.d.ts +0 -6
  252. package/lib/types-esm/utils/objects/setValue.d.ts +0 -1
  253. package/lib/types-esm/utils/objects/toMap.d.ts +0 -3
  254. package/lib/types-esm/utils/objects/toStringConstructor.d.ts +0 -1
  255. package/lib/types-esm/utils/proxyDelegation.d.ts +0 -33
  256. package/lib/types-esm/utils/uniq.d.ts +0 -5
  257. /package/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,4 +1,4 @@
1
- /// <reference types="node" />
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  /**
3
3
  * Tests to see if the object is Buffer
4
4
  * @param target
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tsed/core",
3
3
  "description": "Core module for Ts.ED Framework",
4
- "type": "commonjs",
5
- "version": "8.0.0-alpha.4",
4
+ "type": "module",
5
+ "version": "8.0.0-alpha.6",
6
6
  "source": "./src/index.ts",
7
- "main": "./lib/cjs/index.js",
7
+ "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
9
  "typings": "./lib/types/index.d.ts",
10
10
  "browser": "./lib/browser/core.umd.min.js",
@@ -13,7 +13,6 @@
13
13
  "types": "./lib/types/index.d.ts",
14
14
  "browser": "./lib/browser/core.umd.min.js",
15
15
  "import": "./lib/esm/index.js",
16
- "require": "./lib/cjs/index.js",
17
16
  "default": "./lib/cjs/index.js"
18
17
  }
19
18
  },
@@ -30,10 +29,10 @@
30
29
  "tslib": "2.6.1"
31
30
  },
32
31
  "devDependencies": {
33
- "@tsed/barrels": "8.0.0-alpha.4",
32
+ "@tsed/barrels": "8.0.0-alpha.6",
34
33
  "@tsed/monorepo-utils": "2.3.5",
35
- "@tsed/typescript": "8.0.0-alpha.4",
36
- "@tsed/vitest": "8.0.0-alpha.4",
34
+ "@tsed/typescript": "8.0.0-alpha.6",
35
+ "@tsed/vitest": "8.0.0-alpha.6",
37
36
  "@vitest/coverage-v8": "^2.0.5",
38
37
  "eslint": "^8.57.0",
39
38
  "typescript": "4.9.5",
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Configurable = void 0;
4
- const descriptorOf_js_1 = require("../utils/objects/descriptorOf.js");
5
- function Configurable(value = true) {
6
- return (target, propertyKey) => {
7
- const descriptor = (0, descriptorOf_js_1.descriptorOf)(target, propertyKey) || { writable: true, enumerable: true };
8
- descriptor.configurable = value;
9
- Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
10
- return descriptor;
11
- };
12
- }
13
- exports.Configurable = Configurable;
14
- //# sourceMappingURL=configurable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurable.js","sourceRoot":"","sources":["../../../src/decorators/configurable.ts"],"names":[],"mappings":";;;AAAA,sEAA8D;AAE9D,SAAgB,YAAY,CAAC,QAAiB,IAAI;IAChD,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,IAAA,8BAAY,EAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;QAC3F,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;QAChC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AARD,oCAQC"}
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Deprecated = void 0;
4
- function deprecate(fn, msg) {
5
- if (typeof process !== "undefined" && process.noDeprecation === true) {
6
- return fn;
7
- }
8
- // Allow for deprecating things in the process of starting up.
9
- if (typeof process === "undefined") {
10
- return function (...args) {
11
- return deprecate(fn, msg).apply(this, args);
12
- };
13
- }
14
- let warned = false;
15
- function deprecated(...args) {
16
- if (!warned) {
17
- if (process.throwDeprecation) {
18
- throw new Error(msg);
19
- }
20
- else if (process.traceDeprecation) {
21
- console.trace(msg);
22
- }
23
- else {
24
- console.error(msg);
25
- }
26
- warned = true;
27
- }
28
- return fn.apply(this, args);
29
- }
30
- return deprecated;
31
- }
32
- /**
33
- * The `@Deprecated()` decorators wraps the given method in such a way that it is marked as deprecated.
34
- *
35
- * ```typescript
36
- * provide Foo {
37
- *
38
- * @Deprecated("Foo.method: Use Foo.method2 instead")
39
- * public method() {
40
- *
41
- * }
42
- * ```
43
- *
44
- * When called, @Deprecated() will return a function that will emit a `DeprecationWarning` using the `process.on('warning')` event.
45
- * By default, this warning will be emitted and printed to `stderr` exactly once, the first time it is called. After the warning is emitted, the wrapped method is called.
46
- *
47
- * If either the `--no-deprecation` or `--no-warnings` command line flags are used, or if the `process.noDeprecation`
48
- * property is set to `true` prior to the first deprecation warning, the `@Deprecated()` decorators does nothing.
49
- *
50
- * If the `--trace-deprecation` or `--trace-warnings` command line flags are set, or the `process.traceDeprecation`
51
- * property is set to `true`, a warning and a stack trace are printed to stderr the first time the deprecated function is called.
52
- *
53
- * If the `--throw-deprecation` command line flag is set, or the `process.throwDeprecation` property is set to `true`,
54
- * then an exception will be thrown when the deprecated function is called.
55
- *
56
- * The `--throw-deprecation` command line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation`
57
- * and `process.traceDeprecation`.
58
- *
59
- * @param message
60
- * @returns {Function}
61
- * @decorator
62
- */
63
- function Deprecated(message) {
64
- return (target, targetKey, descriptor) => {
65
- const originalMethod = descriptor.value;
66
- descriptor.value = deprecate(originalMethod, message);
67
- return descriptor;
68
- };
69
- }
70
- exports.Deprecated = Deprecated;
71
- //# sourceMappingURL=deprecated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/decorators/deprecated.ts"],"names":[],"mappings":";;;AAEA,SAAS,SAAS,CAAC,EAAO,EAAE,GAAW;IACrC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAK,OAAe,CAAC,aAAa,KAAK,IAAI,EAAE;QAC7E,OAAO,EAAE,CAAC;KACX;IAED,8DAA8D;IAC9D,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAClC,OAAO,UAAU,GAAG,IAAW;YAC7B,OAAO,SAAS,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAC;KACH;IAED,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,SAAS,UAAU,CAAC,GAAG,IAAW;QAChC,IAAI,CAAC,MAAM,EAAE;YACX,IAAK,OAAe,CAAC,gBAAgB,EAAE;gBACrC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;aACtB;iBAAM,IAAI,OAAO,CAAC,gBAAgB,EAAE;gBACnC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACpB;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACpB;YACD,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,UAAU,CAAC,OAAe;IACxC,OAAO,CAAC,MAAiB,EAAE,SAAiB,EAAE,UAAwC,EAAE,EAAE;QACxF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAEtD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AARD,gCAQC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Enumerable = void 0;
4
- const descriptorOf_js_1 = require("../utils/objects/descriptorOf.js");
5
- function Enumerable(value = true) {
6
- return (target, propertyKey) => {
7
- const descriptor = (0, descriptorOf_js_1.descriptorOf)(target, propertyKey) || { writable: true, configurable: true };
8
- descriptor.enumerable = value;
9
- Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
10
- return descriptor;
11
- };
12
- }
13
- exports.Enumerable = Enumerable;
14
- //# sourceMappingURL=enumerable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enumerable.js","sourceRoot":"","sources":["../../../src/decorators/enumerable.ts"],"names":[],"mappings":";;;AAAA,sEAA8D;AAE9D,SAAgB,UAAU,CAAC,QAAiB,IAAI;IAC9C,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,IAAA,8BAAY,EAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC;QAC7F,UAAU,CAAC,UAAU,GAAG,KAAK,CAAC;QAC9B,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AARD,gCAQC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotConfigurable = void 0;
4
- const configurable_js_1 = require("./configurable.js");
5
- function NotConfigurable() {
6
- return (0, configurable_js_1.Configurable)(false);
7
- }
8
- exports.NotConfigurable = NotConfigurable;
9
- //# sourceMappingURL=notConfigurable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notConfigurable.js","sourceRoot":"","sources":["../../../src/decorators/notConfigurable.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAE/C,SAAgB,eAAe;IAC7B,OAAO,IAAA,8BAAY,EAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAFD,0CAEC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotEnumerable = void 0;
4
- const enumerable_js_1 = require("./enumerable.js");
5
- function NotEnumerable() {
6
- return (0, enumerable_js_1.Enumerable)(false);
7
- }
8
- exports.NotEnumerable = NotEnumerable;
9
- //# sourceMappingURL=notEnumerable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notEnumerable.js","sourceRoot":"","sources":["../../../src/decorators/notEnumerable.ts"],"names":[],"mappings":";;;AAAA,mDAA2C;AAE3C,SAAgB,aAAa;IAC3B,OAAO,IAAA,0BAAU,EAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAFD,sCAEC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Readonly = void 0;
4
- const writable_js_1 = require("./writable.js");
5
- function Readonly() {
6
- return (0, writable_js_1.Writable)(false);
7
- }
8
- exports.Readonly = Readonly;
9
- //# sourceMappingURL=readOnly.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readOnly.js","sourceRoot":"","sources":["../../../src/decorators/readOnly.ts"],"names":[],"mappings":";;;AAAA,+CAAuC;AAEvC,SAAgB,QAAQ;IACtB,OAAO,IAAA,sBAAQ,EAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAFD,4BAEC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoreFn = void 0;
4
- const Store_js_1 = require("../domain/Store.js");
5
- /**
6
- * Create a store correctly configured from the parameters given by the decorator.
7
- * The `fn` can return a decorator that will be initialized with the parameters (target, propertyKey, descriptor).
8
- * @param {(store: Store, parameters: DecoratorParameters) => void} fn
9
- * @returns {Function}
10
- */
11
- function StoreFn(fn) {
12
- return (...parameters) => {
13
- const store = Store_js_1.Store.from(...parameters);
14
- const result = fn(store, parameters);
15
- if (typeof result === "function") {
16
- result(...parameters);
17
- }
18
- return parameters[2];
19
- };
20
- }
21
- exports.StoreFn = StoreFn;
22
- //# sourceMappingURL=storeFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storeFn.js","sourceRoot":"","sources":["../../../src/decorators/storeFn.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAGzC;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,EAA2D;IACjF,OAAO,CAAC,GAAG,UAAiB,EAAO,EAAE;QACnC,MAAM,KAAK,GAAG,gBAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QACxC,MAAM,MAAM,GAAQ,EAAE,CAAC,KAAK,EAAE,UAAiC,CAAC,CAAC;QACjE,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC;SACvB;QAED,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC;AAVD,0BAUC"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoreMerge = void 0;
4
- const storeFn_js_1 = require("./storeFn.js");
5
- function StoreMerge(key, value) {
6
- return (0, storeFn_js_1.StoreFn)((store) => {
7
- store.merge(key, value);
8
- });
9
- }
10
- exports.StoreMerge = StoreMerge;
11
- //# sourceMappingURL=storeMerge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storeMerge.js","sourceRoot":"","sources":["../../../src/decorators/storeMerge.ts"],"names":[],"mappings":";;;AACA,6CAAqC;AAErC,SAAgB,UAAU,CAAC,GAAQ,EAAE,KAAU;IAC7C,OAAO,IAAA,oBAAO,EAAC,CAAC,KAAY,EAAE,EAAE;QAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,gCAIC"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoreSet = void 0;
4
- const storeFn_js_1 = require("./storeFn.js");
5
- function StoreSet(key, value) {
6
- return (0, storeFn_js_1.StoreFn)((store) => {
7
- store.set(key, value);
8
- });
9
- }
10
- exports.StoreSet = StoreSet;
11
- //# sourceMappingURL=storeSet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storeSet.js","sourceRoot":"","sources":["../../../src/decorators/storeSet.ts"],"names":[],"mappings":";;;AACA,6CAAqC;AAErC,SAAgB,QAAQ,CAAC,GAAQ,EAAE,KAAU;IAC3C,OAAO,IAAA,oBAAO,EAAC,CAAC,KAAY,EAAE,EAAE;QAC9B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,4BAIC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Writable = void 0;
4
- const descriptorOf_js_1 = require("../utils/objects/descriptorOf.js");
5
- function Writable(value = true) {
6
- return (target, propertyKey) => {
7
- const descriptor = (0, descriptorOf_js_1.descriptorOf)(target, propertyKey) || { configurable: true, enumerable: true };
8
- descriptor.writable = value;
9
- Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
10
- return descriptor;
11
- };
12
- }
13
- exports.Writable = Writable;
14
- //# sourceMappingURL=writable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writable.js","sourceRoot":"","sources":["../../../src/decorators/writable.ts"],"names":[],"mappings":";;;AAAA,sEAA8D;AAE9D,SAAgB,QAAQ,CAAC,QAAiB,IAAI;IAC5C,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,IAAA,8BAAY,EAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;QAC/F,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC5B,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AARD,4BAQC"}
@@ -1,147 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnyToPromise = exports.AnyToPromiseResponseTypes = exports.AnyToPromiseStatus = void 0;
4
- const isObject_js_1 = require("../utils/objects/isObject.js");
5
- const isObservable_js_1 = require("../utils/objects/isObservable.js");
6
- const isPromise_js_1 = require("../utils/objects/isPromise.js");
7
- const isStream_js_1 = require("../utils/objects/isStream.js");
8
- /**
9
- * @ignore
10
- */
11
- function isResponse(obj) {
12
- return (0, isObject_js_1.isObject)(obj) && "data" in obj && "headers" in obj && "status" in obj && "statusText" in obj;
13
- }
14
- /**
15
- * @ignore
16
- */
17
- var AnyToPromiseStatus;
18
- (function (AnyToPromiseStatus) {
19
- AnyToPromiseStatus["PENDING"] = "PENDING";
20
- AnyToPromiseStatus["CANCELED"] = "CANCELED";
21
- AnyToPromiseStatus["RESOLVED"] = "RESOLVED";
22
- AnyToPromiseStatus["REJECTED"] = "REJECTED";
23
- })(AnyToPromiseStatus = exports.AnyToPromiseStatus || (exports.AnyToPromiseStatus = {}));
24
- var AnyToPromiseResponseTypes;
25
- (function (AnyToPromiseResponseTypes) {
26
- AnyToPromiseResponseTypes["STREAM"] = "STREAM";
27
- AnyToPromiseResponseTypes["BUFFER"] = "BUFFER";
28
- AnyToPromiseResponseTypes["DATA"] = "DATA";
29
- })(AnyToPromiseResponseTypes = exports.AnyToPromiseResponseTypes || (exports.AnyToPromiseResponseTypes = {}));
30
- class AnyToPromise {
31
- #resolves;
32
- #rejects;
33
- #hasNextFunction;
34
- #promise;
35
- constructor({ hasNextFunction = false } = {}) {
36
- this.status = AnyToPromiseStatus.PENDING;
37
- this.#hasNextFunction = false;
38
- this.#hasNextFunction = hasNextFunction;
39
- this.#promise = new Promise((resolve, reject) => {
40
- this.#resolves = resolve;
41
- this.#rejects = reject;
42
- });
43
- }
44
- isDone() {
45
- return this.status !== AnyToPromiseStatus.PENDING;
46
- }
47
- get next() {
48
- this.#hasNextFunction = true;
49
- return (error) => {
50
- if (this.isDone()) {
51
- return;
52
- }
53
- return error ? this.reject(error) : this.resolve({ type: AnyToPromiseResponseTypes.DATA });
54
- };
55
- }
56
- /**
57
- *
58
- */
59
- call(cb) {
60
- if (this.isDone()) {
61
- return Promise.resolve(this);
62
- }
63
- try {
64
- this.handle(cb());
65
- }
66
- catch (er) {
67
- this.reject(er);
68
- }
69
- return this.#promise;
70
- }
71
- reject(er) {
72
- if (this.isDone()) {
73
- return;
74
- }
75
- this.done(AnyToPromiseStatus.REJECTED);
76
- this.#rejects(er);
77
- }
78
- resolve(response = {}) {
79
- if (this.isDone()) {
80
- return;
81
- }
82
- this.done(AnyToPromiseStatus.RESOLVED);
83
- this.#resolves({ ...response, state: AnyToPromiseStatus.RESOLVED });
84
- }
85
- destroy() { }
86
- cancel() {
87
- if (this.isDone()) {
88
- return;
89
- }
90
- this.done(AnyToPromiseStatus.CANCELED);
91
- return this.#resolves({ state: AnyToPromiseStatus.CANCELED });
92
- }
93
- done(status) {
94
- this.destroy();
95
- this.status = status;
96
- }
97
- handle(process, additionalProps = {}) {
98
- if (this.isDone()) {
99
- return;
100
- }
101
- if (process) {
102
- if (this.isCanceledResponse(process)) {
103
- // ABANDON
104
- return this.cancel();
105
- }
106
- if ((0, isObservable_js_1.isObservable)(process)) {
107
- process = process.toPromise();
108
- }
109
- if (isResponse(process)) {
110
- return this.handle(process.data, {
111
- ...additionalProps,
112
- status: process.status,
113
- headers: process.headers
114
- });
115
- }
116
- if ((0, isStream_js_1.isStream)(process)) {
117
- return this.resolve({ ...additionalProps, type: AnyToPromiseResponseTypes.STREAM, data: process });
118
- }
119
- if ((0, isStream_js_1.isStream)(process) || Buffer.isBuffer(process)) {
120
- return this.resolve({ ...additionalProps, type: AnyToPromiseResponseTypes.BUFFER, data: process });
121
- }
122
- if ((0, isPromise_js_1.isPromise)(process)) {
123
- return process
124
- .then((result) => this.handle(result, additionalProps))
125
- .catch((error) => {
126
- if (error.response && isResponse(error.response)) {
127
- return this.handle(error.response);
128
- }
129
- return this.reject(error);
130
- });
131
- }
132
- }
133
- if (!this.#hasNextFunction) {
134
- // no next function and empty response
135
- return this.resolve({
136
- ...additionalProps,
137
- data: process,
138
- type: AnyToPromiseResponseTypes.DATA
139
- });
140
- }
141
- }
142
- isCanceledResponse(process) {
143
- return process === AnyToPromiseStatus.CANCELED;
144
- }
145
- }
146
- exports.AnyToPromise = AnyToPromise;
147
- //# sourceMappingURL=AnyToPromise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnyToPromise.js","sourceRoot":"","sources":["../../../src/domain/AnyToPromise.ts"],"names":[],"mappings":";;;AAAA,8DAAsD;AACtD,sEAA8D;AAC9D,gEAAwD;AACxD,8DAAsD;AAEtD;;GAEG;AACH,SAAS,UAAU,CAAC,GAAQ;IAC1B,OAAO,IAAA,sBAAQ,EAAC,GAAG,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,QAAQ,IAAI,GAAG,IAAI,YAAY,IAAI,GAAG,CAAC;AACtG,CAAC;AAED;;GAEG;AACH,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;AACvB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AAED,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACf,CAAC,EAJW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAIpC;AAU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AAE,OAAO;gBACb,IAAI,EAAE,yBAAyB,CAAC,IAAI;aACrC,CAAC,CAAC;SACJ;IACH,CAAC;IAES,kBAAkB,CAAC,OAAY;QACvC,OAAO,OAAO,KAAK,kBAAkB,CAAC,QAAQ,CAAC;IACjD,CAAC;CACF;AAhJD,oCAgJC"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DecoratorTypes = void 0;
4
- var DecoratorTypes;
5
- (function (DecoratorTypes) {
6
- DecoratorTypes["PARAM"] = "parameter";
7
- DecoratorTypes["PARAM_CTOR"] = "parameter.constructor";
8
- DecoratorTypes["PARAM_STC"] = "parameter.static";
9
- DecoratorTypes["PROP"] = "property";
10
- DecoratorTypes["PROP_STC"] = "property.static";
11
- DecoratorTypes["METHOD"] = "method";
12
- DecoratorTypes["METHOD_STC"] = "method.static";
13
- DecoratorTypes["CLASS"] = "class";
14
- })(DecoratorTypes = exports.DecoratorTypes || (exports.DecoratorTypes = {}));
15
- //# sourceMappingURL=DecoratorTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecoratorTypes.js","sourceRoot":"","sources":["../../../src/domain/DecoratorTypes.ts"],"names":[],"mappings":";;;AAAA,IAAY,cASX;AATD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,sDAAoC,CAAA;IACpC,gDAA8B,CAAA;IAC9B,mCAAiB,CAAA;IACjB,8CAA4B,CAAA;IAC5B,mCAAiB,CAAA;IACjB,8CAA4B,CAAA;IAC5B,iCAAe,CAAA;AACjB,CAAC,EATW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QASzB"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnvTypes = exports.Env = void 0;
4
- /**
5
- *
6
- */
7
- var Env;
8
- (function (Env) {
9
- Env["PROD"] = "production";
10
- Env["DEV"] = "development";
11
- Env["TEST"] = "test";
12
- })(Env = exports.Env || (exports.Env = {}));
13
- /**
14
- * Fallback
15
- * @type {Env}
16
- */
17
- // tslint:disable-next-line: variable-name
18
- exports.EnvTypes = Env;
19
- //# sourceMappingURL=Env.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Env.js","sourceRoot":"","sources":["../../../src/domain/Env.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,GAIX;AAJD,WAAY,GAAG;IACb,0BAAmB,CAAA;IACnB,0BAAmB,CAAA;IACnB,oBAAa,CAAA;AACf,CAAC,EAJW,GAAG,GAAH,WAAG,KAAH,WAAG,QAId;AAED;;;GAGG;AACH,0CAA0C;AAC7B,QAAA,QAAQ,GAAG,GAAG,CAAC"}
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Hooks = void 0;
4
- class Hooks {
5
- constructor() {
6
- this.#listeners = {};
7
- }
8
- #listeners;
9
- has(event) {
10
- return !!this.#listeners[event];
11
- }
12
- /**
13
- * Listen a hook event
14
- * @param event
15
- * @param cb
16
- */
17
- on(event, cb) {
18
- if (!this.#listeners[event]) {
19
- this.#listeners[event] = [];
20
- }
21
- this.#listeners[event].push(cb);
22
- return this;
23
- }
24
- /**
25
- * Remove a listener attached to an event
26
- * @param event
27
- * @param cb
28
- */
29
- off(event, cb) {
30
- if (this.#listeners[event]) {
31
- this.#listeners[event] = this.#listeners[event].filter((item) => item === cb);
32
- }
33
- return this;
34
- }
35
- /**
36
- * Trigger an event and call listener.
37
- * @param event
38
- * @param args
39
- * @param callThis
40
- */
41
- emit(event, args = [], callThis = null) {
42
- const listeners = this.#listeners[event];
43
- if (listeners?.length) {
44
- for (const cb of listeners) {
45
- cb.call(callThis, ...args);
46
- }
47
- }
48
- }
49
- /**
50
- * Trigger an event, listener alter given value and return it.
51
- * @param event
52
- * @param value
53
- * @param args
54
- * @param callThis
55
- */
56
- alter(event, value, args = [], callThis = null) {
57
- const listeners = this.#listeners[event];
58
- if (listeners?.length) {
59
- for (const cb of listeners) {
60
- value = cb.call(callThis, value, ...args);
61
- }
62
- }
63
- return value;
64
- }
65
- /**
66
- * Trigger an event and call async listener.
67
- * @param event
68
- * @param args
69
- * @param callThis
70
- */
71
- async asyncEmit(event, args = [], callThis = null) {
72
- const listeners = this.#listeners[event];
73
- if (listeners?.length) {
74
- const promises = listeners.map((cb) => cb.call(callThis, ...args));
75
- await Promise.all(promises);
76
- }
77
- }
78
- /**
79
- * Trigger an event, async listener alter given value and return it.
80
- * @param event
81
- * @param value
82
- * @param args
83
- * @param callThis
84
- */
85
- async asyncAlter(event, value, args = [], callThis = null) {
86
- const listeners = this.#listeners[event];
87
- if (listeners?.length) {
88
- for (const cb of listeners) {
89
- value = await cb.call(callThis, value, ...args);
90
- }
91
- }
92
- return value;
93
- }
94
- destroy() {
95
- this.#listeners = {};
96
- }
97
- }
98
- exports.Hooks = Hooks;
99
- //# sourceMappingURL=Hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Hooks.js","sourceRoot":"","sources":["../../../src/domain/Hooks.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAAlB;QACE,eAAU,GAA+B,EAAE,CAAC;IA0G9C,CAAC;IA1GC,UAAU,CAAkC;IAE5C,GAAG,CAAC,KAAa;QACf,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IACD;;;;OAIG;IACH,EAAE,CAAC,KAAa,EAAE,EAAY;QAC5B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YAC3B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SAC7B;QAED,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEhC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,KAAa,EAAE,EAAY;QAC7B,IAAI,IAAI,CAAC,UAAU,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