@celljs/core 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/README.md +49 -62
  2. package/esm/browser/static-module.d.ts +1 -1
  3. package/esm/common/annotation/aspect.d.ts +2 -1
  4. package/esm/common/annotation/aspect.js.map +1 -1
  5. package/esm/common/annotation/autowired-provider.d.ts +0 -2
  6. package/esm/common/annotation/autowired-provider.js +4 -13
  7. package/esm/common/annotation/autowired-provider.js.map +1 -1
  8. package/esm/common/annotation/autowired.d.ts +1 -1
  9. package/esm/common/annotation/autowired.js +11 -3
  10. package/esm/common/annotation/autowired.js.map +1 -1
  11. package/esm/common/annotation/component.d.ts +4 -8
  12. package/esm/common/annotation/component.js +0 -6
  13. package/esm/common/annotation/component.js.map +1 -1
  14. package/esm/common/annotation/constant.d.ts +1 -1
  15. package/esm/common/annotation/constant.js +6 -3
  16. package/esm/common/annotation/constant.js.map +1 -1
  17. package/esm/common/annotation/detached/autowired-provider.js +2 -2
  18. package/esm/common/annotation/detached/autowired-provider.js.map +1 -1
  19. package/esm/common/annotation/index.d.ts +0 -6
  20. package/esm/common/annotation/index.js +0 -6
  21. package/esm/common/annotation/index.js.map +1 -1
  22. package/esm/common/annotation/named.d.ts +2 -1
  23. package/esm/common/annotation/named.js +5 -1
  24. package/esm/common/annotation/named.js.map +1 -1
  25. package/esm/common/annotation/optional.d.ts +2 -1
  26. package/esm/common/annotation/optional.js +5 -1
  27. package/esm/common/annotation/optional.js.map +1 -1
  28. package/esm/common/annotation/post-construct.d.ts +2 -1
  29. package/esm/common/annotation/post-construct.js +5 -1
  30. package/esm/common/annotation/post-construct.js.map +1 -1
  31. package/esm/common/annotation/tagged.d.ts +2 -1
  32. package/esm/common/annotation/tagged.js +6 -1
  33. package/esm/common/annotation/tagged.js.map +1 -1
  34. package/esm/common/annotation/value.d.ts +3 -2
  35. package/esm/common/annotation/value.js +7 -10
  36. package/esm/common/annotation/value.js.map +1 -1
  37. package/esm/common/aop/aop-proxy-factory.d.ts +6 -2
  38. package/esm/common/aop/aop-proxy-factory.js +44 -28
  39. package/esm/common/aop/aop-proxy-factory.js.map +1 -1
  40. package/esm/common/aop/class-filter.js +6 -6
  41. package/esm/common/aop/class-filter.js.map +1 -1
  42. package/esm/common/application/application-factory.d.ts +1 -1
  43. package/esm/common/application/application-factory.js +4 -4
  44. package/esm/common/application/application-factory.js.map +1 -1
  45. package/esm/common/container/auto-bind.d.ts +7 -3
  46. package/esm/common/container/auto-bind.js +49 -80
  47. package/esm/common/container/auto-bind.js.map +1 -1
  48. package/esm/common/container/container-error.d.ts +21 -0
  49. package/esm/common/container/container-error.js +22 -0
  50. package/esm/common/container/container-error.js.map +1 -0
  51. package/esm/common/container/container-provider.d.ts +5 -4
  52. package/esm/common/container/container-provider.js +2 -1
  53. package/esm/common/container/container-provider.js.map +1 -1
  54. package/esm/common/container/container-util.d.ts +5 -7
  55. package/esm/common/container/container-util.js +8 -19
  56. package/esm/common/container/container-util.js.map +1 -1
  57. package/esm/common/container/container.d.ts +104 -0
  58. package/esm/common/container/container.js +299 -0
  59. package/esm/common/container/container.js.map +1 -0
  60. package/esm/common/container/dynamic-container.d.ts +1 -1
  61. package/esm/common/container/dynamic-container.js +2 -2
  62. package/esm/common/container/dynamic-container.js.map +1 -1
  63. package/esm/common/container/index.d.ts +5 -6
  64. package/esm/common/container/index.js +5 -3
  65. package/esm/common/container/index.js.map +1 -1
  66. package/esm/common/container/injection.d.ts +40 -0
  67. package/esm/common/container/injection.js +109 -0
  68. package/esm/common/container/injection.js.map +1 -0
  69. package/esm/common/container/scope.d.ts +2 -3
  70. package/esm/common/container/scope.js +2 -3
  71. package/esm/common/container/scope.js.map +1 -1
  72. package/esm/common/el/application-expression-engine.d.ts +7 -0
  73. package/esm/common/{provider/provider-creator.js → el/application-expression-engine.js} +11 -11
  74. package/esm/common/el/application-expression-engine.js.map +1 -0
  75. package/esm/common/el/core-context-initializer.d.ts +3 -2
  76. package/esm/common/el/core-context-initializer.js +10 -8
  77. package/esm/common/el/core-context-initializer.js.map +1 -1
  78. package/esm/common/el/expression-compiler.d.ts +5 -4
  79. package/esm/common/el/expression-compiler.js +7 -6
  80. package/esm/common/el/expression-compiler.js.map +1 -1
  81. package/esm/common/el/expression-engine.d.ts +61 -0
  82. package/esm/common/el/expression-engine.js +459 -0
  83. package/esm/common/el/expression-engine.js.map +1 -0
  84. package/esm/common/el/expression-handler.d.ts +1 -2
  85. package/esm/common/el/expression-handler.js +1 -5
  86. package/esm/common/el/expression-handler.js.map +1 -1
  87. package/esm/common/el/expression-protocol.d.ts +3 -5
  88. package/esm/common/el/expression-protocol.js +0 -1
  89. package/esm/common/el/expression-protocol.js.map +1 -1
  90. package/esm/common/el/expression-util.d.ts +9 -8
  91. package/esm/common/el/expression-util.js +8 -9
  92. package/esm/common/el/expression-util.js.map +1 -1
  93. package/esm/common/el/index.d.ts +2 -1
  94. package/esm/common/el/index.js +2 -1
  95. package/esm/common/el/index.js.map +1 -1
  96. package/esm/common/provider/index.d.ts +0 -1
  97. package/esm/common/provider/index.js +0 -1
  98. package/esm/common/provider/index.js.map +1 -1
  99. package/esm/common/provider/provider-protocol.d.ts +5 -9
  100. package/esm/common/provider/provider-protocol.js +0 -1
  101. package/esm/common/provider/provider-protocol.js.map +1 -1
  102. package/esm/common/provider/provider-util.d.ts +1 -1
  103. package/esm/common/provider/provider-util.js +2 -2
  104. package/esm/common/provider/provider-util.js.map +1 -1
  105. package/esm/common/provider/provider.d.ts +7 -6
  106. package/esm/common/provider/provider.js +15 -26
  107. package/esm/common/provider/provider.js.map +1 -1
  108. package/esm/common/static-module.d.ts +1 -1
  109. package/esm/common/static-module.js +1 -1
  110. package/esm/common/static-module.js.map +1 -1
  111. package/esm/common/test/mock-logger.js +2 -13
  112. package/esm/common/test/mock-logger.js.map +1 -1
  113. package/esm/common/test/test-module.d.ts +1 -1
  114. package/esm/common/test/test-module.js +1 -1
  115. package/esm/common/test/test-module.js.map +1 -1
  116. package/esm/common/utils/annotation-util.js +2 -1
  117. package/esm/common/utils/annotation-util.js.map +1 -1
  118. package/esm/common/utils/proxy-util.d.ts +5 -2
  119. package/esm/common/utils/proxy-util.js +10 -28
  120. package/esm/common/utils/proxy-util.js.map +1 -1
  121. package/esm/node/static-module.d.ts +1 -1
  122. package/lib/browser/static-module.d.ts +1 -1
  123. package/lib/common/annotation/aspect.d.ts +2 -1
  124. package/lib/common/annotation/aspect.d.ts.map +1 -1
  125. package/lib/common/annotation/aspect.js.map +1 -1
  126. package/lib/common/annotation/autowired-provider.d.ts +0 -2
  127. package/lib/common/annotation/autowired-provider.d.ts.map +1 -1
  128. package/lib/common/annotation/autowired-provider.js +4 -14
  129. package/lib/common/annotation/autowired-provider.js.map +1 -1
  130. package/lib/common/annotation/autowired.d.ts +1 -1
  131. package/lib/common/annotation/autowired.d.ts.map +1 -1
  132. package/lib/common/annotation/autowired.js +11 -3
  133. package/lib/common/annotation/autowired.js.map +1 -1
  134. package/lib/common/annotation/component.d.ts +4 -8
  135. package/lib/common/annotation/component.d.ts.map +1 -1
  136. package/lib/common/annotation/component.js +0 -6
  137. package/lib/common/annotation/component.js.map +1 -1
  138. package/lib/common/annotation/constant.d.ts +1 -1
  139. package/lib/common/annotation/constant.d.ts.map +1 -1
  140. package/lib/common/annotation/constant.js +6 -3
  141. package/lib/common/annotation/constant.js.map +1 -1
  142. package/lib/common/annotation/detached/autowired-provider.js +2 -2
  143. package/lib/common/annotation/detached/autowired-provider.js.map +1 -1
  144. package/lib/common/annotation/index.d.ts +0 -6
  145. package/lib/common/annotation/index.d.ts.map +1 -1
  146. package/lib/common/annotation/index.js +0 -6
  147. package/lib/common/annotation/index.js.map +1 -1
  148. package/lib/common/annotation/named.d.ts +2 -1
  149. package/lib/common/annotation/named.d.ts.map +1 -1
  150. package/lib/common/annotation/named.js +6 -2
  151. package/lib/common/annotation/named.js.map +1 -1
  152. package/lib/common/annotation/optional.d.ts +2 -1
  153. package/lib/common/annotation/optional.d.ts.map +1 -1
  154. package/lib/common/annotation/optional.js +6 -2
  155. package/lib/common/annotation/optional.js.map +1 -1
  156. package/lib/common/annotation/post-construct.d.ts +2 -1
  157. package/lib/common/annotation/post-construct.d.ts.map +1 -1
  158. package/lib/common/annotation/post-construct.js +6 -2
  159. package/lib/common/annotation/post-construct.js.map +1 -1
  160. package/lib/common/annotation/tagged.d.ts +2 -1
  161. package/lib/common/annotation/tagged.d.ts.map +1 -1
  162. package/lib/common/annotation/tagged.js +7 -2
  163. package/lib/common/annotation/tagged.js.map +1 -1
  164. package/lib/common/annotation/value.d.ts +3 -2
  165. package/lib/common/annotation/value.d.ts.map +1 -1
  166. package/lib/common/annotation/value.js +7 -10
  167. package/lib/common/annotation/value.js.map +1 -1
  168. package/lib/common/aop/aop-proxy-factory.d.ts +6 -2
  169. package/lib/common/aop/aop-proxy-factory.d.ts.map +1 -1
  170. package/lib/common/aop/aop-proxy-factory.js +45 -29
  171. package/lib/common/aop/aop-proxy-factory.js.map +1 -1
  172. package/lib/common/aop/class-filter.js +7 -7
  173. package/lib/common/aop/class-filter.js.map +1 -1
  174. package/lib/common/application/application-factory.d.ts +1 -1
  175. package/lib/common/application/application-factory.d.ts.map +1 -1
  176. package/lib/common/application/application-factory.js +4 -4
  177. package/lib/common/application/application-factory.js.map +1 -1
  178. package/lib/common/container/assembly.spec.js +11 -11
  179. package/lib/common/container/assembly.spec.js.map +1 -1
  180. package/lib/common/container/auto-bind.d.ts +7 -3
  181. package/lib/common/container/auto-bind.d.ts.map +1 -1
  182. package/lib/common/container/auto-bind.js +49 -81
  183. package/lib/common/container/auto-bind.js.map +1 -1
  184. package/lib/common/container/container-error.d.ts +22 -0
  185. package/lib/common/container/container-error.d.ts.map +1 -0
  186. package/lib/common/container/container-error.js +26 -0
  187. package/lib/common/container/container-error.js.map +1 -0
  188. package/lib/common/container/container-provider.d.ts +5 -4
  189. package/lib/common/container/container-provider.d.ts.map +1 -1
  190. package/lib/common/container/container-provider.js +3 -2
  191. package/lib/common/container/container-provider.js.map +1 -1
  192. package/lib/common/container/container-util.d.ts +5 -7
  193. package/lib/common/container/container-util.d.ts.map +1 -1
  194. package/lib/common/container/container-util.js +8 -19
  195. package/lib/common/container/container-util.js.map +1 -1
  196. package/lib/common/container/container.d.ts +105 -0
  197. package/lib/common/container/container.d.ts.map +1 -0
  198. package/lib/common/container/container.js +305 -0
  199. package/lib/common/container/container.js.map +1 -0
  200. package/lib/common/container/container.spec.d.ts +2 -0
  201. package/lib/common/container/container.spec.d.ts.map +1 -0
  202. package/lib/common/container/container.spec.js +334 -0
  203. package/lib/common/container/container.spec.js.map +1 -0
  204. package/lib/common/container/dynamic-container.d.ts +1 -1
  205. package/lib/common/container/dynamic-container.d.ts.map +1 -1
  206. package/lib/common/container/dynamic-container.js +3 -3
  207. package/lib/common/container/dynamic-container.js.map +1 -1
  208. package/lib/common/container/index.d.ts +5 -6
  209. package/lib/common/container/index.d.ts.map +1 -1
  210. package/lib/common/container/index.js +5 -3
  211. package/lib/common/container/index.js.map +1 -1
  212. package/lib/common/container/injection.d.ts +41 -0
  213. package/lib/common/container/injection.d.ts.map +1 -0
  214. package/lib/common/container/injection.js +112 -0
  215. package/lib/common/container/injection.js.map +1 -0
  216. package/lib/common/container/scope.d.ts +2 -3
  217. package/lib/common/container/scope.d.ts.map +1 -1
  218. package/lib/common/container/scope.js +2 -3
  219. package/lib/common/container/scope.js.map +1 -1
  220. package/lib/common/el/application-expression-engine.d.ts +8 -0
  221. package/lib/common/el/application-expression-engine.d.ts.map +1 -0
  222. package/lib/common/el/application-expression-engine.js +22 -0
  223. package/lib/common/el/application-expression-engine.js.map +1 -0
  224. package/lib/common/el/core-context-initializer.d.ts +3 -2
  225. package/lib/common/el/core-context-initializer.d.ts.map +1 -1
  226. package/lib/common/el/core-context-initializer.js +9 -7
  227. package/lib/common/el/core-context-initializer.js.map +1 -1
  228. package/lib/common/el/expression-compiler.d.ts +5 -4
  229. package/lib/common/el/expression-compiler.d.ts.map +1 -1
  230. package/lib/common/el/expression-compiler.js +6 -5
  231. package/lib/common/el/expression-compiler.js.map +1 -1
  232. package/lib/common/el/expression-engine.d.ts +62 -0
  233. package/lib/common/el/expression-engine.d.ts.map +1 -0
  234. package/lib/common/el/expression-engine.js +465 -0
  235. package/lib/common/el/expression-engine.js.map +1 -0
  236. package/lib/common/el/expression-engine.spec.d.ts +2 -0
  237. package/lib/common/el/expression-engine.spec.d.ts.map +1 -0
  238. package/lib/common/el/expression-engine.spec.js +100 -0
  239. package/lib/common/el/expression-engine.spec.js.map +1 -0
  240. package/lib/common/el/expression-handler.d.ts +1 -2
  241. package/lib/common/el/expression-handler.d.ts.map +1 -1
  242. package/lib/common/el/expression-handler.js +0 -4
  243. package/lib/common/el/expression-handler.js.map +1 -1
  244. package/lib/common/el/expression-handler.spec.js +5 -6
  245. package/lib/common/el/expression-handler.spec.js.map +1 -1
  246. package/lib/common/el/expression-protocol.d.ts +3 -5
  247. package/lib/common/el/expression-protocol.d.ts.map +1 -1
  248. package/lib/common/el/expression-protocol.js +1 -2
  249. package/lib/common/el/expression-protocol.js.map +1 -1
  250. package/lib/common/el/expression-util.d.ts +9 -8
  251. package/lib/common/el/expression-util.d.ts.map +1 -1
  252. package/lib/common/el/expression-util.js +8 -9
  253. package/lib/common/el/expression-util.js.map +1 -1
  254. package/lib/common/el/index.d.ts +2 -1
  255. package/lib/common/el/index.d.ts.map +1 -1
  256. package/lib/common/el/index.js +2 -1
  257. package/lib/common/el/index.js.map +1 -1
  258. package/lib/common/el/value-and-el.spec.js +2 -2
  259. package/lib/common/el/value-and-el.spec.js.map +1 -1
  260. package/lib/common/provider/index.d.ts +0 -1
  261. package/lib/common/provider/index.d.ts.map +1 -1
  262. package/lib/common/provider/index.js +0 -1
  263. package/lib/common/provider/index.js.map +1 -1
  264. package/lib/common/provider/provider-protocol.d.ts +5 -9
  265. package/lib/common/provider/provider-protocol.d.ts.map +1 -1
  266. package/lib/common/provider/provider-protocol.js +1 -2
  267. package/lib/common/provider/provider-protocol.js.map +1 -1
  268. package/lib/common/provider/provider-util.d.ts +1 -1
  269. package/lib/common/provider/provider-util.d.ts.map +1 -1
  270. package/lib/common/provider/provider-util.js +2 -2
  271. package/lib/common/provider/provider-util.js.map +1 -1
  272. package/lib/common/provider/provider.d.ts +7 -6
  273. package/lib/common/provider/provider.d.ts.map +1 -1
  274. package/lib/common/provider/provider.js +16 -26
  275. package/lib/common/provider/provider.js.map +1 -1
  276. package/lib/common/static-module.d.ts +1 -1
  277. package/lib/common/static-module.js +2 -2
  278. package/lib/common/static-module.js.map +1 -1
  279. package/lib/common/test/mock-logger.d.ts.map +1 -1
  280. package/lib/common/test/mock-logger.js +2 -12
  281. package/lib/common/test/mock-logger.js.map +1 -1
  282. package/lib/common/test/test-module.d.ts +1 -1
  283. package/lib/common/test/test-module.d.ts.map +1 -1
  284. package/lib/common/test/test-module.js +2 -2
  285. package/lib/common/test/test-module.js.map +1 -1
  286. package/lib/common/utils/annotation-util.js +2 -1
  287. package/lib/common/utils/annotation-util.js.map +1 -1
  288. package/lib/common/utils/proxy-util.d.ts +5 -2
  289. package/lib/common/utils/proxy-util.d.ts.map +1 -1
  290. package/lib/common/utils/proxy-util.js +12 -30
  291. package/lib/common/utils/proxy-util.js.map +1 -1
  292. package/lib/node/static-module.d.ts +1 -1
  293. package/package.json +4 -6
  294. package/src/common/annotation/aspect.ts +2 -1
  295. package/src/common/annotation/autowired-provider.ts +4 -17
  296. package/src/common/annotation/autowired.ts +14 -6
  297. package/src/common/annotation/component.ts +6 -26
  298. package/src/common/annotation/constant.ts +10 -7
  299. package/src/common/annotation/detached/autowired-provider.ts +2 -2
  300. package/src/common/annotation/index.ts +0 -6
  301. package/src/common/annotation/named.ts +7 -1
  302. package/src/common/annotation/optional.ts +6 -1
  303. package/src/common/annotation/post-construct.ts +6 -1
  304. package/src/common/annotation/tagged.ts +8 -1
  305. package/src/common/annotation/value.ts +9 -11
  306. package/src/common/aop/aop-proxy-factory.ts +52 -30
  307. package/src/common/aop/class-filter.ts +6 -6
  308. package/src/common/application/application-factory.ts +4 -5
  309. package/src/common/container/assembly.spec.ts +7 -12
  310. package/src/common/container/auto-bind.ts +54 -85
  311. package/src/common/container/container-error.ts +31 -0
  312. package/src/common/container/container-provider.ts +9 -7
  313. package/src/common/container/container-util.ts +8 -19
  314. package/src/common/container/container.spec.ts +262 -0
  315. package/src/common/container/container.ts +363 -0
  316. package/src/common/container/dynamic-container.ts +2 -2
  317. package/src/common/container/index.ts +5 -7
  318. package/src/common/container/injection.ts +135 -0
  319. package/src/common/container/scope.ts +2 -1
  320. package/src/common/el/application-expression-engine.ts +9 -0
  321. package/src/common/el/core-context-initializer.ts +9 -8
  322. package/src/common/el/expression-compiler.ts +7 -6
  323. package/src/common/el/expression-engine.spec.ts +107 -0
  324. package/src/common/el/expression-engine.ts +487 -0
  325. package/src/common/el/expression-handler.spec.ts +6 -7
  326. package/src/common/el/expression-handler.ts +2 -5
  327. package/src/common/el/expression-protocol.ts +4 -8
  328. package/src/common/el/expression-util.ts +12 -13
  329. package/src/common/el/index.ts +3 -2
  330. package/src/common/el/value-and-el.spec.ts +2 -2
  331. package/src/common/provider/index.ts +0 -2
  332. package/src/common/provider/provider-protocol.ts +5 -11
  333. package/src/common/provider/provider-util.ts +3 -3
  334. package/src/common/provider/provider.ts +17 -29
  335. package/src/common/static-module.ts +1 -1
  336. package/src/common/test/mock-logger.ts +0 -2
  337. package/src/common/test/test-module.ts +1 -1
  338. package/src/common/utils/annotation-util.ts +2 -2
  339. package/src/common/utils/proxy-util.ts +8 -28
  340. package/esm/common/annotation/decorate.d.ts +0 -1
  341. package/esm/common/annotation/decorate.js +0 -2
  342. package/esm/common/annotation/decorate.js.map +0 -1
  343. package/esm/common/annotation/inject.d.ts +0 -1
  344. package/esm/common/annotation/inject.js +0 -2
  345. package/esm/common/annotation/inject.js.map +0 -1
  346. package/esm/common/annotation/injectable.d.ts +0 -1
  347. package/esm/common/annotation/injectable.js +0 -2
  348. package/esm/common/annotation/injectable.js.map +0 -1
  349. package/esm/common/annotation/pre-destroy.d.ts +0 -1
  350. package/esm/common/annotation/pre-destroy.js +0 -2
  351. package/esm/common/annotation/pre-destroy.js.map +0 -1
  352. package/esm/common/annotation/target-name.d.ts +0 -1
  353. package/esm/common/annotation/target-name.js +0 -2
  354. package/esm/common/annotation/target-name.js.map +0 -1
  355. package/esm/common/annotation/unmanaged.d.ts +0 -1
  356. package/esm/common/annotation/unmanaged.js +0 -2
  357. package/esm/common/annotation/unmanaged.js.map +0 -1
  358. package/esm/common/container/container-factory.d.ts +0 -4
  359. package/esm/common/container/container-factory.js +0 -9
  360. package/esm/common/container/container-factory.js.map +0 -1
  361. package/esm/common/el/jexl-engine-provider.d.ts +0 -5
  362. package/esm/common/el/jexl-engine-provider.js +0 -22
  363. package/esm/common/el/jexl-engine-provider.js.map +0 -1
  364. package/esm/common/provider/provider-creator.d.ts +0 -6
  365. package/esm/common/provider/provider-creator.js.map +0 -1
  366. package/lib/common/annotation/decorate.d.ts +0 -2
  367. package/lib/common/annotation/decorate.d.ts.map +0 -1
  368. package/lib/common/annotation/decorate.js +0 -6
  369. package/lib/common/annotation/decorate.js.map +0 -1
  370. package/lib/common/annotation/inject.d.ts +0 -2
  371. package/lib/common/annotation/inject.d.ts.map +0 -1
  372. package/lib/common/annotation/inject.js +0 -6
  373. package/lib/common/annotation/inject.js.map +0 -1
  374. package/lib/common/annotation/injectable.d.ts +0 -2
  375. package/lib/common/annotation/injectable.d.ts.map +0 -1
  376. package/lib/common/annotation/injectable.js +0 -6
  377. package/lib/common/annotation/injectable.js.map +0 -1
  378. package/lib/common/annotation/pre-destroy.d.ts +0 -2
  379. package/lib/common/annotation/pre-destroy.d.ts.map +0 -1
  380. package/lib/common/annotation/pre-destroy.js +0 -6
  381. package/lib/common/annotation/pre-destroy.js.map +0 -1
  382. package/lib/common/annotation/target-name.d.ts +0 -2
  383. package/lib/common/annotation/target-name.d.ts.map +0 -1
  384. package/lib/common/annotation/target-name.js +0 -6
  385. package/lib/common/annotation/target-name.js.map +0 -1
  386. package/lib/common/annotation/unmanaged.d.ts +0 -2
  387. package/lib/common/annotation/unmanaged.d.ts.map +0 -1
  388. package/lib/common/annotation/unmanaged.js +0 -6
  389. package/lib/common/annotation/unmanaged.js.map +0 -1
  390. package/lib/common/container/container-factory.d.ts +0 -5
  391. package/lib/common/container/container-factory.d.ts.map +0 -1
  392. package/lib/common/container/container-factory.js +0 -13
  393. package/lib/common/container/container-factory.js.map +0 -1
  394. package/lib/common/el/jexl-engine-provider.d.ts +0 -6
  395. package/lib/common/el/jexl-engine-provider.d.ts.map +0 -1
  396. package/lib/common/el/jexl-engine-provider.js +0 -25
  397. package/lib/common/el/jexl-engine-provider.js.map +0 -1
  398. package/lib/common/provider/provider-creator.d.ts +0 -7
  399. package/lib/common/provider/provider-creator.d.ts.map +0 -1
  400. package/lib/common/provider/provider-creator.js +0 -22
  401. package/lib/common/provider/provider-creator.js.map +0 -1
  402. package/src/common/annotation/decorate.ts +0 -1
  403. package/src/common/annotation/inject.ts +0 -1
  404. package/src/common/annotation/injectable.ts +0 -1
  405. package/src/common/annotation/pre-destroy.ts +0 -1
  406. package/src/common/annotation/target-name.ts +0 -1
  407. package/src/common/annotation/unmanaged.ts +0 -1
  408. package/src/common/container/container-factory.ts +0 -9
  409. package/src/common/el/jexl-engine-provider.ts +0 -18
  410. package/src/common/provider/provider-creator.ts +0 -12
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/common/provider/provider.ts"],"names":[],"mappings":";;;AACA,2DAAwE;AAExE,oCAA0C;AAE1C,MAAM,oBAAoB,GAAwC,KAAK,CAAC,EAAE;IACtE,IAAI,KAAK,EAAE,CAAC;QACR,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC,QAAQ,CAAC;QAC1B,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,KAAK,CAAC;QACvB,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC;AACL,CAAC,CAAC;AAEF;IAII,YACuB,WAA2B,EAC3B,SAAoB;2BADpB,WAAW;yBACX,SAAS;IAC5B,CAAC;IAEL,GAAG,CAAC,SAAmB;QACnB,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,iBAAiB,GAAQ,EAAE,CAAC;YAClC,IAAI,cAAmD,CAAC;YACxD,IAAI,gBAAgB,GAAqB,IAAI,CAAC,SAAS,CAAC;YACxD,2CAA2C;YAC3C,OAAO,gBAAgB,KAAK,IAAI,EAAE,CAAC;gBAC/B,IAAI,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;oBAC7C,IAAI,CAAC;wBACD,iBAAiB,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;oBACzE,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACzB,CAAC;gBACL,CAAC;gBACD,IAAI,cAAc,KAAK,SAAS,IAAI,gBAAgB,CAAC,OAAO,CAAC,2CAAuB,CAAC,EAAE,CAAC;oBACpF,cAAc,GAAG,gBAAgB,CAAC,GAAG,CAAC,2CAAuB,CAAC,CAAC;gBACnE,CAAC;gBACD,2CAA2C;gBAC3C,gBAAgB,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAC3E,CAAC;YAED,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,iBAAiB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC;QAE5H,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,WAAW,GAAsC,oBAAoB,EAAE,SAAmB;QAC/F,IAAI,CAAC,UAAU,GAAG,sBAAc,CAAC,iBAAiB,CAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1G,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAW,GAAkC,oBAAoB,EAAE,SAAmB;QAC7F,MAAM,MAAM,GAAG,MAAM,sBAAc,CAAC,aAAa,CAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;QACvF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ"}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/common/provider/provider.ts"],"names":[],"mappings":";;;;AACA,2DAAwE;AACxE,4DAAyD;AACzD,yEAAoE;AAEpE,MAAM,oBAAoB,GAAwC,KAAK,CAAC,EAAE;IACtE,IAAI,KAAK,EAAE,CAAC;QACR,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC,QAAQ,CAAC;QAC1B,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,KAAK,CAAC;QACvB,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC;AACL,CAAC,CAAC;AAEF;IAII,YACuB,WAA2B,EAC3B,SAAoB;2BADpB,WAAW;yBACX,SAAS;IAC5B,CAAC;IAEL,GAAG;QACC,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9G,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,2CAAuB,CAAC;gBAClE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAA0B,2CAAuB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAC9G,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,WAAW,GAAsC,oBAAoB;QAC1E,IAAI,CAAC,UAAU,GAAG,+BAAc,CAAC,iBAAiB,CAAI,IAAI,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACjG,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAW,GAAkC,oBAAoB;QACxE,MAAM,MAAM,GAAG,MAAM,+BAAc,CAAC,aAAa,CAAI,IAAI,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;QAC9E,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;;AAED,+GAA+G;AAC/G,+BAAsC,IAA2C;IAC7E,IAAI,CAAC,6BAAQ,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAK,CAAC,2BAAM,CAAwB,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;AACrI,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import './index';
2
- declare const _default: import("inversify").interfaces.ContainerModule;
2
+ declare const _default: import("./index").ContainerModule;
3
3
  export default _default;
4
4
  //# sourceMappingURL=static-module.d.ts.map
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("./index");
4
4
  const value_1 = require("./annotation/value");
5
- const autowired_provider_1 = require("./annotation/autowired-provider");
5
+ const provider_1 = require("./provider/provider");
6
6
  const auto_bind_1 = require("./container/auto-bind");
7
7
  exports.default = (0, auto_bind_1.autoBind)(bind => {
8
8
  (0, value_1.bindValue)(bind);
9
- (0, autowired_provider_1.bindAutowiredProvider)(bind);
9
+ (0, provider_1.bindAutowiredProvider)(bind);
10
10
  });
11
11
  //# sourceMappingURL=static-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static-module.js","sourceRoot":"","sources":["../../src/common/static-module.ts"],"names":[],"mappings":";;AAAA,mBAAiB;AACjB,8CAA+C;AAC/C,wEAAwE;AACxE,qDAAiD;kBAElC,IAAA,oBAAQ,EAAC,IAAI,CAAC,EAAE;IAC3B,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;IAChB,IAAA,0CAAqB,EAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC"}
1
+ {"version":3,"file":"static-module.js","sourceRoot":"","sources":["../../src/common/static-module.ts"],"names":[],"mappings":";;AAAA,mBAAiB;AACjB,8CAA+C;AAC/C,kDAA4D;AAC5D,qDAAiD;kBAElC,IAAA,oBAAQ,EAAC,IAAI,CAAC,EAAE;IAC3B,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;IAChB,IAAA,gCAAqB,EAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mock-logger.d.ts","sourceRoot":"","sources":["../../../src/common/test/mock-logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBACa,UAAW,YAAW,MAAM;IACrC,KAAK,EAAE,QAAQ,CAAU;IACzB,SAAS,CAAC,QAAQ,CAAC,YAAY,sBAA6B;IAC5D,KAAK,uCAA2B;IAChC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAExB;IACD,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;IACD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEjC;IACD,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEzC;IACD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAE1C;IACD,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEzC;IACD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAE1C;IACD,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAElC;CACJ"}
1
+ {"version":3,"file":"mock-logger.d.ts","sourceRoot":"","sources":["../../../src/common/test/mock-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,UAAW,YAAW,MAAM;IACrC,KAAK,EAAE,QAAQ,CAAU;IACzB,SAAS,CAAC,QAAQ,CAAC,YAAY,sBAA6B;IAC5D,KAAK,uCAA2B;IAChC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAExB;IACD,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;IACD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEjC;IACD,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEzC;IACD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAE1C;IACD,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAEzC;IACD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAE1C;IACD,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAElC;CACJ"}
@@ -1,15 +1,8 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  exports.MockLogger = void 0;
10
- const annotation_1 = require("../annotation");
11
4
  const utils_1 = require("../utils");
12
- let MockLogger = class MockLogger {
5
+ class MockLogger {
13
6
  constructor() {
14
7
  this.level = 'info';
15
8
  this.onLogEmitter = new utils_1.Emitter();
@@ -39,9 +32,6 @@ let MockLogger = class MockLogger {
39
32
  isEnabled(level) {
40
33
  return false;
41
34
  }
42
- };
35
+ }
43
36
  exports.MockLogger = MockLogger;
44
- exports.MockLogger = MockLogger = __decorate([
45
- (0, annotation_1.Injectable)()
46
- ], MockLogger);
47
37
  //# sourceMappingURL=mock-logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock-logger.js","sourceRoot":"","sources":["../../../src/common/test/mock-logger.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8CAA2C;AAE3C,oCAAmC;AAG5B,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QACH,UAAK,GAAa,MAAM,CAAC;QACN,iBAAY,GAAG,IAAI,eAAO,EAAc,CAAC;QAC5D,UAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IAyBpC,CAAC;IAxBG,IAAI,CAAC,KAAa;QACd,aAAa;IACjB,CAAC;IACD,OAAO,CAAC,KAAa,EAAE,OAAgB;QACnC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,UAAU,CAAC,OAAgB;QACvB,aAAa;IACjB,CAAC;IACD,IAAI,CAAC,OAAY,EAAE,OAAgB;QAC/B,aAAa;IACjB,CAAC;IACD,KAAK,CAAC,OAAY,EAAE,OAAgB;QAChC,aAAa;IACjB,CAAC;IACD,IAAI,CAAC,OAAY,EAAE,OAAgB;QAC/B,aAAa;IACjB,CAAC;IACD,KAAK,CAAC,OAAY,EAAE,OAAgB;QAChC,aAAa;IACjB,CAAC;IACD,SAAS,CAAC,KAAe;QACrB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;;qBA5BY,UAAU;IADtB,IAAA,uBAAU,GAAE;GACA,UAAU,CA4BtB"}
1
+ {"version":3,"file":"mock-logger.js","sourceRoot":"","sources":["../../../src/common/test/mock-logger.ts"],"names":[],"mappings":";;;AACA,oCAAmC;AAEnC;IAAA;QACI,UAAK,GAAa,MAAM,CAAC;QACN,iBAAY,GAAG,IAAI,eAAO,EAAc,CAAC;QAC5D,UAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IAyBpC,CAAC;IAxBG,IAAI,CAAC,KAAa;QACd,aAAa;IACjB,CAAC;IACD,OAAO,CAAC,KAAa,EAAE,OAAgB;QACnC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,UAAU,CAAC,OAAgB;QACvB,aAAa;IACjB,CAAC;IACD,IAAI,CAAC,OAAY,EAAE,OAAgB;QAC/B,aAAa;IACjB,CAAC;IACD,KAAK,CAAC,OAAY,EAAE,OAAgB;QAChC,aAAa;IACjB,CAAC;IACD,IAAI,CAAC,OAAY,EAAE,OAAgB;QAC/B,aAAa;IACjB,CAAC;IACD,KAAK,CAAC,OAAY,EAAE,OAAgB;QAChC,aAAa;IACjB,CAAC;IACD,SAAS,CAAC,KAAe;QACrB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
@@ -1,3 +1,3 @@
1
1
  import '../index';
2
- export declare const coreTestModule: import("inversify").interfaces.ContainerModule;
2
+ export declare const coreTestModule: import("../container").ContainerModule;
3
3
  //# sourceMappingURL=test-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-module.d.ts","sourceRoot":"","sources":["../../../src/common/test/test-module.ts"],"names":[],"mappings":"AAKA,OAAO,UAAU,CAAC;AAElB,eAAO,MAAM,cAAc,gDAIzB,CAAC"}
1
+ {"version":3,"file":"test-module.d.ts","sourceRoot":"","sources":["../../../src/common/test/test-module.ts"],"names":[],"mappings":"AAKA,OAAO,UAAU,CAAC;AAElB,eAAO,MAAM,cAAc,wCAIzB,CAAC"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.coreTestModule = void 0;
4
- const autowired_provider_1 = require("../annotation/autowired-provider");
5
4
  const value_1 = require("../annotation/value");
5
+ const provider_1 = require("../provider/provider");
6
6
  const container_1 = require("../container");
7
7
  const logger_1 = require("../logger");
8
8
  const mock_logger_1 = require("./mock-logger");
9
9
  require("../index");
10
10
  exports.coreTestModule = (0, container_1.autoBind)((bind, unbind, isBound, rebind) => {
11
11
  (0, value_1.bindValue)(bind);
12
- (0, autowired_provider_1.bindAutowiredProvider)(bind);
12
+ (0, provider_1.bindAutowiredProvider)(bind);
13
13
  rebind(logger_1.Logger).to(mock_logger_1.MockLogger).inSingletonScope();
14
14
  });
15
15
  //# sourceMappingURL=test-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-module.js","sourceRoot":"","sources":["../../../src/common/test/test-module.ts"],"names":[],"mappings":";;;AAAA,yEAAyE;AACzE,+CAAgD;AAChD,4CAAwC;AACxC,sCAAmC;AACnC,+CAA2C;AAC3C,oBAAkB;AAEL,QAAA,cAAc,GAAG,IAAA,oBAAQ,EAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACrE,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;IAChB,IAAA,0CAAqB,EAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,CAAC,eAAM,CAAC,CAAC,EAAE,CAAC,wBAAU,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACrD,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"test-module.js","sourceRoot":"","sources":["../../../src/common/test/test-module.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,mDAA6D;AAC7D,4CAAwC;AACxC,sCAAmC;AACnC,+CAA2C;AAC3C,oBAAkB;AAEL,QAAA,cAAc,GAAG,IAAA,oBAAQ,EAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACrE,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;IAChB,IAAA,gCAAqB,EAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,CAAC,eAAM,CAAC,CAAC,EAAE,CAAC,wBAAU,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACrD,CAAC,CAAC,CAAC"}
@@ -15,8 +15,9 @@ var AnnotationUtil;
15
15
  }
16
16
  AnnotationUtil.getValueOrOption = getValueOrOption;
17
17
  function getType(target, targetKey, index) {
18
+ var _a;
18
19
  if (index !== undefined) {
19
- return Reflect.getMetadata('design:paramtypes', target, targetKey)[index];
20
+ return (_a = Reflect.getMetadata('design:paramtypes', target, targetKey)) === null || _a === void 0 ? void 0 : _a[index];
20
21
  }
21
22
  else {
22
23
  return Reflect.getMetadata('design:type', target, targetKey);
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-util.js","sourceRoot":"","sources":["../../../src/common/utils/annotation-util.ts"],"names":[],"mappings":";;;AAAA,IAAiB,cAAc,CAoB9B;AApBD,WAAiB,cAAc;IAE3B,SAAgB,gBAAgB,CAAI,aAAmB,EAAE,eAAe,GAAG,IAAI;QAC3E,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YACrE,MAAM,GAAG,aAAa,CAAC;QAC3B,CAAC;aAAM,IAAI,aAAa,EAAE,CAAC;YACvB,MAAM,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;QAClD,CAAC;QACD,OAAO,MAAW,CAAC;IACvB,CAAC;IARe,eAAA,gBAAgB,mBAQ/B,CAAA;IAED,SAAgB,OAAO,CAAC,MAAW,EAAE,SAA0B,EAAE,KAAc;QAC3E,IAAI,KAAK,KAAK,SAAS,EAAG,CAAC;YACvB,OAAO,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC;aAAM,CAAC;YACJ,OAAO,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IANe,eAAA,OAAO,UAMtB,CAAA;AAEL,CAAC,EApBgB,cAAc,aAAd,cAAc,GAAd,cAAc,QAoB9B"}
1
+ {"version":3,"file":"annotation-util.js","sourceRoot":"","sources":["../../../src/common/utils/annotation-util.ts"],"names":[],"mappings":";;;AAAA,IAAiB,cAAc,CAoB9B;AApBD,WAAiB,cAAc;IAE3B,SAAgB,gBAAgB,CAAI,aAAmB,EAAE,eAAe,GAAG,IAAI;QAC3E,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YACrE,MAAM,GAAG,aAAa,CAAC;QAC3B,CAAC;aAAM,IAAI,aAAa,EAAE,CAAC;YACvB,MAAM,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;QAClD,CAAC;QACD,OAAO,MAAW,CAAC;IACvB,CAAC;IARe,eAAA,gBAAgB,mBAQ/B,CAAA;IAED,SAAgB,OAAO,CAAC,MAAW,EAAE,SAA0B,EAAE,KAAc;;QAC3E,IAAI,KAAK,KAAK,SAAS,EAAG,CAAC;YACvB,OAAO,MAAA,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,MAAM,EAAE,SAAS,CAAC,0CAAG,KAAK,CAAC,CAAC;QAChF,CAAC;aAAM,CAAC;YACJ,OAAO,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IANe,eAAA,OAAO,UAMtB,CAAA;AAEL,CAAC,EApBgB,cAAc,aAAd,cAAc,GAAd,cAAc,QAoB9B"}
@@ -1,5 +1,8 @@
1
- export declare function isResolveMode(): boolean;
2
- export declare function getTargetClass(obj: any): any;
1
+ /** What a proxy of a component (AOP) answers with the object it wraps. */
2
+ export declare const PROXY_TARGET: unique symbol;
3
+ /** The object behind a component proxy, or the object itself. */
3
4
  export declare function getTarget(obj: any): any;
5
+ /** The class of the object behind a component proxy, or of the object itself. */
6
+ export declare function getTargetClass(obj: any): any;
4
7
  export declare function isProxy(obj: any): boolean;
5
8
  //# sourceMappingURL=proxy-util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-util.d.ts","sourceRoot":"","sources":["../../../src/common/utils/proxy-util.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAS5C;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASvC;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAOzC"}
1
+ {"version":3,"file":"proxy-util.d.ts","sourceRoot":"","sources":["../../../src/common/utils/proxy-util.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,YAAY,eAA0C,CAAC;AAEpE,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAEvC;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAE5C;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAEzC"}
@@ -1,40 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isResolveMode = isResolveMode;
4
- exports.getTargetClass = getTargetClass;
3
+ exports.PROXY_TARGET = void 0;
5
4
  exports.getTarget = getTarget;
5
+ exports.getTargetClass = getTargetClass;
6
6
  exports.isProxy = isProxy;
7
- let resolveMode = false;
8
- function isResolveMode() {
9
- return resolveMode;
7
+ /** What a proxy of a component (AOP) answers with the object it wraps. */
8
+ exports.PROXY_TARGET = Symbol.for('@celljs/core/proxy-target');
9
+ /** The object behind a component proxy, or the object itself. */
10
+ function getTarget(obj) {
11
+ var _a;
12
+ return (_a = obj === null || obj === void 0 ? void 0 : obj[exports.PROXY_TARGET]) !== null && _a !== void 0 ? _a : obj;
10
13
  }
14
+ /** The class of the object behind a component proxy, or of the object itself. */
11
15
  function getTargetClass(obj) {
12
- try {
13
- resolveMode = true;
14
- const target = obj.target;
15
- return target ? target.constructor : obj.constructor;
16
- }
17
- finally {
18
- resolveMode = false;
19
- }
20
- }
21
- function getTarget(obj) {
22
- try {
23
- resolveMode = true;
24
- const target = obj.target;
25
- return target || obj;
26
- }
27
- finally {
28
- resolveMode = false;
29
- }
16
+ var _a;
17
+ return (_a = getTarget(obj)) === null || _a === void 0 ? void 0 : _a.constructor;
30
18
  }
31
19
  function isProxy(obj) {
32
- try {
33
- resolveMode = true;
34
- return !!obj.target;
35
- }
36
- finally {
37
- resolveMode = false;
38
- }
20
+ return (obj === null || obj === void 0 ? void 0 : obj[exports.PROXY_TARGET]) !== undefined;
39
21
  }
40
22
  //# sourceMappingURL=proxy-util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-util.js","sourceRoot":"","sources":["../../../src/common/utils/proxy-util.ts"],"names":[],"mappings":";;;;;;AAAA,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;IACI,OAAO,WAAW,CAAC;AACvB,CAAC;AAED,wBAA+B,GAAQ;IACnC,IAAI,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;QACnB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC;IAEzD,CAAC;YAAS,CAAC;QACP,WAAW,GAAG,KAAK,CAAC;IACxB,CAAC;AACL,CAAC;AAED,mBAA0B,GAAQ;IAC9B,IAAI,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;QACnB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,OAAO,MAAM,IAAI,GAAG,CAAC;IAEzB,CAAC;YAAS,CAAC;QACP,WAAW,GAAG,KAAK,CAAC;IACxB,CAAC;AACL,CAAC;AAED,iBAAwB,GAAQ;IAC5B,IAAI,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;QACnB,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACxB,CAAC;YAAS,CAAC;QACP,WAAW,GAAG,KAAK,CAAC;IACxB,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"proxy-util.js","sourceRoot":"","sources":["../../../src/common/utils/proxy-util.ts"],"names":[],"mappings":";;;;;;AAAA,0EAA0E;AAC7D,QAAA,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAEpE,iEAAiE;AACjE,mBAA0B,GAAQ;;IAC9B,aAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,QAAA,YAAY,CAAC,mCAAI,GAAG,CAAC;AACtC,CAAC;AAED,iFAAiF;AACjF,wBAA+B,GAAQ;;IACnC,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,0CAAE,WAAW,CAAC;AACvC,CAAC;AAED,iBAAwB,GAAQ;IAC5B,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,QAAA,YAAY,CAAC,MAAK,SAAS,CAAC;AAC7C,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import './index';
2
- declare const _default: import("inversify").interfaces.ContainerModule;
2
+ declare const _default: import("../common").ContainerModule;
3
3
  export default _default;
4
4
  //# sourceMappingURL=static-module.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/core",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -14,6 +14,9 @@
14
14
  "url": "https://github.com/cellbang/cell.git"
15
15
  },
16
16
  "license": "MIT",
17
+ "engines": {
18
+ "node": ">=18.0.0"
19
+ },
17
20
  "main": "lib/common/index.js",
18
21
  "typings": "lib/common/index.d.ts",
19
22
  "files": [
@@ -30,13 +33,8 @@
30
33
  "watch": "tsc -b -w --preserveWatchOutput"
31
34
  },
32
35
  "dependencies": {
33
- "inversify": "6.1.4",
34
- "jexl": "2.3.0",
35
36
  "reflect-metadata": "^0.1.13"
36
37
  },
37
- "devDependencies": {
38
- "@types/jexl": "^2.2.0"
39
- },
40
38
  "publishConfig": {
41
39
  "access": "public"
42
40
  },
@@ -1,5 +1,6 @@
1
1
  import { AOP_TAG } from '../aop/aop-protocol';
2
- import { ComponentOption, applyComponentDecorator, COMPONENT_TAG, ComponentId, parseComponentOption } from './component';
2
+ import { ComponentOption, applyComponentDecorator, COMPONENT_TAG, parseComponentOption } from './component';
3
+ import type { ComponentId } from '../container/container';
3
4
 
4
5
  export interface AspectOption extends ComponentOption {
5
6
  id: ComponentId;
@@ -1,9 +1,5 @@
1
- import { interfaces } from 'inversify';
2
1
  import { applyAutowiredDecorator, DoInject, parseAutowiredOption, IdOrAutowiredOptionWithoutMulti } from './autowired';
3
- import { Inject } from './inject';
4
- import { Tagged } from './tagged';
5
- import { ProviderCreator } from '../provider/provider-protocol';
6
- import { ComponentId } from './component';
2
+ import { InjectionUtil } from '../container/injection';
7
3
 
8
4
  export const PROVIDER = Symbol('PROVIDER');
9
5
  export const ID_KEY = Symbol('ID_KEY');
@@ -16,16 +12,7 @@ export const AutowiredProvider = function (idOrOption?: IdOrAutowiredOptionWitho
16
12
  };
17
13
 
18
14
  export const doInjectForAutowiredProvider: DoInject = (option, t, k, i) => {
19
- Inject(PROVIDER)(t, k, i);
20
- Tagged(ID_KEY, option.id!)(t, k, i);
15
+ const point = InjectionUtil.point(t, k, i);
16
+ point.id = PROVIDER;
17
+ point.tags = { ...point.tags, [ID_KEY]: option.id };
21
18
  };
22
-
23
- export function bindAutowiredProvider(bind: interfaces.Bind): any {
24
- bind(PROVIDER).toDynamicValue(ctx => {
25
- const id = ctx.currentRequest.target.getCustomTags()?.find(m => m.key === ID_KEY)!.value as ComponentId;
26
- const providerCreator = ctx.container.get<ProviderCreator<any>>(ProviderCreator);
27
-
28
- return providerCreator.create(id, ctx.container);
29
- });
30
- }
31
-
@@ -1,6 +1,6 @@
1
- import { inject, multiInject } from 'inversify';
2
- import { ContainerUtil } from '../container';
3
- import { ComponentId } from './component';
1
+ import { ContainerUtil } from '../container/container-util';
2
+ import { InjectionUtil } from '../container/injection';
3
+ import type { ComponentId } from '../container/container';
4
4
  import { AnnotationUtil } from '../utils';
5
5
 
6
6
  export interface AutowiredOption {
@@ -44,18 +44,26 @@ export function parseAutowiredOption(target: any, targetKey: string, index?: num
44
44
  return { ...defaultAutowiredOption, ...option };
45
45
  }
46
46
 
47
+ const doInjectDefault: DoInject = ({ id, multi }, t, k, i) => {
48
+ const point = InjectionUtil.point(t, k, i);
49
+ point.id = id;
50
+ point.multi = multi;
51
+ };
52
+
53
+ const doGetValueDefault: DoGetValue = ({ id, multi }) => multi ? ContainerUtil.getAll(id!) : ContainerUtil.get(id!);
54
+
47
55
  export function applyAutowiredDecorator(option: AutowiredOption, target: any, targetKey: string, index?: number,
48
- doInject: DoInject = ({ id, multi }, t: any, k, i) => multi ? multiInject(id!)(t, k, i) : inject(id!)(t, k, i),
49
- doGetValue: DoGetValue = ({ id, multi }, t, property) => multi ? ContainerUtil.getAll(id!) : ContainerUtil.get(id!)) {
56
+ doInject: DoInject = doInjectDefault, doGetValue: DoGetValue = doGetValueDefault) {
50
57
 
51
58
  if (option.detached) {
52
59
  if (index !== undefined) {
53
60
  throw new Error(`The ${target.constructor.name} itself is not injected into the container, so the parameter injection of the constructor is not supported.`);
54
61
  }
62
+ // The value comes from the getter: the container leaves the property alone.
63
+ InjectionUtil.remove(target, targetKey);
55
64
  createAutowiredProperty(option, doGetValue, target, targetKey);
56
65
  } else {
57
66
  doInject(option, target, targetKey, index);
58
-
59
67
  }
60
68
  return option;
61
69
  }
@@ -1,10 +1,8 @@
1
- import { decorate, injectable, interfaces, METADATA_KEY as inversify_METADATA_KEY } from 'inversify';
2
1
  import { METADATA_KEY } from '../constants';
3
2
  import { ConfigUtil } from '../config/config-util';
4
3
  import { AnnotationUtil } from '../utils';
5
4
  import { Scope } from '../container/scope';
6
-
7
- export type ComponentId<T = any> = interfaces.ServiceIdentifier<T>;
5
+ import type { ActivationHandler, ComponentId } from '../container/container';
8
6
 
9
7
  export const COMPONENT_TAG = 'Component';
10
8
 
@@ -14,24 +12,22 @@ export interface ComponentOption {
14
12
  name?: string | number | symbol;
15
13
  tag?: { tag: string | number | symbol, value: any };
16
14
  default?: boolean;
17
- when?: (request: interfaces.Request) => boolean;
18
15
  rebind?: boolean;
19
16
  proxy?: boolean;
20
17
  sysTags?: string[];
21
- onActivation?: (context: interfaces.Context, t: any) => any;
18
+ onActivation?: ActivationHandler;
22
19
  }
23
20
 
24
21
  export interface ComponentMetadata {
25
- ids: ComponentId[];
22
+ ids: ComponentId[];
26
23
  scope: Scope;
27
24
  name?: string | number | symbol;
28
25
  tag?: { tag: string | number | symbol, value: any },
29
26
  default?: boolean;
30
- when?: (request: interfaces.Request) => boolean
31
27
  rebind: boolean;
32
28
  proxy: boolean;
33
29
  sysTags: string[]
34
- onActivation?: (context: interfaces.Context, t: any) => any;
30
+ onActivation?: ActivationHandler;
35
31
  target: any;
36
32
  }
37
33
 
@@ -81,13 +77,6 @@ export function parseComponentOption(target: any, idOrOption: any) {
81
77
  }
82
78
 
83
79
  export function applyComponentDecorator(option: ComponentOption, target: any) {
84
-
85
- const isAlreadyDecorated = Reflect.hasOwnMetadata(inversify_METADATA_KEY.PARAM_TYPES, target);
86
-
87
- if (!isAlreadyDecorated) {
88
- decorate(injectable(), target);
89
- }
90
-
91
80
  const metadata: ComponentMetadata = {
92
81
  target,
93
82
  ids: Array.isArray(option.id) ? option.id : [ option.id || target ],
@@ -98,22 +87,13 @@ export function applyComponentDecorator(option: ComponentOption, target: any) {
98
87
  name: option.name,
99
88
  tag: option.tag,
100
89
  default: option.default,
101
- when: option.when,
102
90
  onActivation: option.onActivation
103
91
  };
104
92
 
105
- let metadatas: ComponentMetadata[] = Reflect.getMetadata(
106
- METADATA_KEY.component,
107
- Reflect
108
- );
109
-
93
+ let metadatas: ComponentMetadata[] = Reflect.getMetadata(METADATA_KEY.component, Reflect);
110
94
  if (!metadatas) {
111
95
  metadatas = [];
112
- Reflect.defineMetadata(
113
- METADATA_KEY.component,
114
- metadatas,
115
- Reflect
116
- );
96
+ Reflect.defineMetadata(METADATA_KEY.component, metadatas, Reflect);
117
97
  }
118
98
  metadatas.push(metadata);
119
99
  return metadata;
@@ -1,5 +1,5 @@
1
1
  import { METADATA_KEY } from '../constants';
2
- import { ComponentId } from './component';
2
+ import type { ComponentId } from '../container/container';
3
3
 
4
4
  export interface ConstantOption {
5
5
  id: ComponentId | ComponentId[];
@@ -8,13 +8,16 @@ export interface ConstantOption {
8
8
  }
9
9
 
10
10
  export const Constant = function (id: ComponentId | ComponentId[], constantValue: any, rebind = false): ClassDecorator {
11
- return (t: any) => {
12
- applyConstantDecorator({ id, constantValue, rebind }, t);
13
- };
11
+ return (t: any) => {
12
+ applyConstantDecorator({ id, constantValue, rebind }, t);
14
13
  };
14
+ };
15
15
 
16
16
  export function applyConstantDecorator(option: ConstantOption, target: any): void {
17
- const previousMetadata = Reflect.getMetadata(METADATA_KEY.constantValue, Reflect) || [];
18
- const newMetadata = [option].concat(previousMetadata);
19
- Reflect.defineMetadata(METADATA_KEY.constantValue, newMetadata, Reflect);
17
+ let metadata: ConstantOption[] = Reflect.getMetadata(METADATA_KEY.constantValue, Reflect);
18
+ if (!metadata) {
19
+ metadata = [];
20
+ Reflect.defineMetadata(METADATA_KEY.constantValue, metadata, Reflect);
21
+ }
22
+ metadata.push(option);
20
23
  }
@@ -6,8 +6,8 @@ export const AutowiredProvider = function (idOrOption?: IdOrAutowiredOptionWitho
6
6
  return (target: any, targetKey: string, index?: number) => {
7
7
  const option = parseAutowiredOption(target, targetKey, index, idOrOption);
8
8
  option.detached = true;
9
- applyAutowiredDecorator(option, target, targetKey, index, doInjectForAutowiredProvider, doGetValueForAutorpc);
9
+ applyAutowiredDecorator(option, target, targetKey, index, doInjectForAutowiredProvider, doGetValueForProvider);
10
10
  };
11
11
  };
12
12
 
13
- const doGetValueForAutorpc: DoGetValue = (option, t, property) => ContainerUtil.getTagged(PROVIDER, ID_KEY, option.id!);
13
+ const doGetValueForProvider: DoGetValue = option => ContainerUtil.get(PROVIDER, { tags: { [ID_KEY]: option.id } });
@@ -6,12 +6,6 @@ export * from './constant';
6
6
  export * from './named';
7
7
  export * from './tagged';
8
8
  export * from './post-construct';
9
- export * from './pre-destroy';
10
- export * from './target-name';
11
- export * from './injectable';
12
- export * from './inject';
13
9
  export * from './aspect';
14
10
  export * from './service';
15
- export * from './unmanaged';
16
- export * from './decorate';
17
11
  export * from './autowired-provider';
@@ -1 +1,7 @@
1
- export { named as Named } from 'inversify';
1
+ import { InjectionUtil } from '../container/injection';
2
+
3
+ /** Injects the binding with this name (`@Component({ id, name })`, `whenTargetNamed`). */
4
+ export const Named = (name: string | number | symbol): PropertyDecorator & ParameterDecorator =>
5
+ (target: any, key: string | symbol | undefined, index?: number) => {
6
+ InjectionUtil.point(target, key, index).name = name;
7
+ };
@@ -1 +1,6 @@
1
- export { optional as Optional } from 'inversify';
1
+ import { InjectionUtil } from '../container/injection';
2
+
3
+ /** The parameter or property gets `undefined` (or `[]` for an array) when nothing is bound. */
4
+ export const Optional = (): PropertyDecorator & ParameterDecorator => (target: any, key: string | symbol | undefined, index?: number) => {
5
+ InjectionUtil.point(target, key, index).optional = true;
6
+ };
@@ -1 +1,6 @@
1
- export { postConstruct as PostConstruct } from 'inversify';
1
+ import { InjectionUtil } from '../container/injection';
2
+
3
+ /** Called once the container has injected the properties; one method per class, subclasses inherit it. */
4
+ export const PostConstruct = (): MethodDecorator => (target: any, key: string | symbol) => {
5
+ InjectionUtil.setPostConstruct(target, key);
6
+ };
@@ -1 +1,8 @@
1
- export { tagged as Tagged } from 'inversify';
1
+ import { InjectionUtil } from '../container/injection';
2
+
3
+ /** Injects the binding with this tag (`@Component({ id, tag })`, `whenTargetTagged`). */
4
+ export const Tagged = (key: string | number | symbol, value: unknown): PropertyDecorator & ParameterDecorator =>
5
+ (target: any, propertyKey: string | symbol | undefined, index?: number) => {
6
+ const point = InjectionUtil.point(target, propertyKey, index);
7
+ point.tags = { ...point.tags, [key]: value };
8
+ };
@@ -1,7 +1,8 @@
1
- import { inject, named, interfaces } from 'inversify';
2
1
  import { ConfigUtil } from '../config/config-util';
3
2
  import { AnnotationUtil } from '../utils';
4
3
  import { ConfigProvider } from '../config/config-protocol';
4
+ import { InjectionUtil } from '../container/injection';
5
+ import type { Binding, ComponentId } from '../container/container';
5
6
 
6
7
  export const VALUE = Symbol('Value');
7
8
 
@@ -34,13 +35,14 @@ export function applyValueDecorator(option: ValueOption, target: any, targetKey:
34
35
  if (index !== undefined) {
35
36
  throw new Error(`The ${target.constructor.name} itself is not injected into the container, so the parameter injection of the constructor is not supported.`);
36
37
  }
38
+ InjectionUtil.remove(target, targetKey);
37
39
  createValueProperty(option, target, targetKey);
38
40
  return;
39
41
  }
40
42
 
41
- const el = option.el!;
42
- inject(VALUE)(target, targetKey, index);
43
- named(el)(target, targetKey, index);
43
+ const point = InjectionUtil.point(target, targetKey, index);
44
+ point.id = VALUE;
45
+ point.name = option.el!;
44
46
  return option;
45
47
  }
46
48
 
@@ -54,11 +56,7 @@ export function createValueProperty(option: ValueOption, target: any, property:
54
56
  });
55
57
  }
56
58
 
57
- export function bindValue(bind: interfaces.Bind): any {
58
- bind(VALUE).toDynamicValue(ctx => {
59
- const namedMetadata = ctx.currentRequest.target.getNamedTag();
60
- const el = namedMetadata!.value.toString();
61
- const configProvider = ctx.container.get<ConfigProvider>(ConfigProvider);
62
- return configProvider.get(el);
63
- });
59
+ /** `@Value('a.b')` is an injection of `VALUE` named `a.b`: the configuration value of that key. */
60
+ export function bindValue(bind: <T>(id: ComponentId<T>) => Binding<T>): void {
61
+ bind(VALUE).toDynamicValue(ctx => ctx.container.get<ConfigProvider>(ConfigProvider).get(String(ctx.target.name)));
64
62
  }