inversify 6.1.5-beta.0 → 6.1.5-beta.1

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 (321) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/{es → lib/cjs}/annotation/decorator_utils.d.ts +1 -0
  3. package/lib/cjs/annotation/decorator_utils.d.ts.map +1 -0
  4. package/lib/{annotation → cjs/annotation}/decorator_utils.js +8 -0
  5. package/lib/cjs/annotation/decorator_utils.js.map +1 -0
  6. package/{es → lib/cjs}/annotation/inject.d.ts +1 -0
  7. package/lib/cjs/annotation/inject.d.ts.map +1 -0
  8. package/lib/{annotation → cjs/annotation}/inject.js +1 -0
  9. package/lib/cjs/annotation/inject.js.map +1 -0
  10. package/{es → lib/cjs}/annotation/inject_base.d.ts +1 -0
  11. package/lib/cjs/annotation/inject_base.d.ts.map +1 -0
  12. package/lib/{annotation → cjs/annotation}/inject_base.js +2 -0
  13. package/lib/cjs/annotation/inject_base.js.map +1 -0
  14. package/{es → lib/cjs}/annotation/injectable.d.ts +1 -0
  15. package/lib/cjs/annotation/injectable.d.ts.map +1 -0
  16. package/lib/{annotation → cjs/annotation}/injectable.js +2 -0
  17. package/lib/cjs/annotation/injectable.js.map +1 -0
  18. package/lib/{annotation → cjs/annotation}/multi_inject.d.ts +1 -0
  19. package/lib/cjs/annotation/multi_inject.d.ts.map +1 -0
  20. package/lib/{annotation → cjs/annotation}/multi_inject.js +1 -0
  21. package/lib/cjs/annotation/multi_inject.js.map +1 -0
  22. package/{es → lib/cjs}/annotation/named.d.ts +1 -0
  23. package/lib/cjs/annotation/named.d.ts.map +1 -0
  24. package/lib/{annotation → cjs/annotation}/named.js +2 -0
  25. package/lib/cjs/annotation/named.js.map +1 -0
  26. package/{es → lib/cjs}/annotation/optional.d.ts +1 -0
  27. package/lib/cjs/annotation/optional.d.ts.map +1 -0
  28. package/lib/{annotation → cjs/annotation}/optional.js +1 -0
  29. package/lib/cjs/annotation/optional.js.map +1 -0
  30. package/{es → lib/cjs}/annotation/post_construct.d.ts +1 -0
  31. package/lib/cjs/annotation/post_construct.d.ts.map +1 -0
  32. package/lib/{annotation → cjs/annotation}/post_construct.js +1 -0
  33. package/lib/cjs/annotation/post_construct.js.map +1 -0
  34. package/{es → lib/cjs}/annotation/pre_destroy.d.ts +1 -0
  35. package/lib/cjs/annotation/pre_destroy.d.ts.map +1 -0
  36. package/lib/{annotation → cjs/annotation}/pre_destroy.js +1 -0
  37. package/lib/cjs/annotation/pre_destroy.js.map +1 -0
  38. package/lib/{annotation → cjs/annotation}/property_event_decorator.d.ts +1 -0
  39. package/lib/cjs/annotation/property_event_decorator.d.ts.map +1 -0
  40. package/lib/{annotation → cjs/annotation}/property_event_decorator.js +1 -0
  41. package/lib/cjs/annotation/property_event_decorator.js.map +1 -0
  42. package/{es → lib/cjs}/annotation/tagged.d.ts +1 -0
  43. package/lib/cjs/annotation/tagged.d.ts.map +1 -0
  44. package/lib/{annotation → cjs/annotation}/tagged.js +2 -0
  45. package/lib/cjs/annotation/tagged.js.map +1 -0
  46. package/lib/{annotation → cjs/annotation}/target_name.d.ts +1 -0
  47. package/lib/cjs/annotation/target_name.d.ts.map +1 -0
  48. package/lib/{annotation → cjs/annotation}/target_name.js +1 -0
  49. package/lib/cjs/annotation/target_name.js.map +1 -0
  50. package/lib/{annotation → cjs/annotation}/unmanaged.d.ts +1 -0
  51. package/lib/cjs/annotation/unmanaged.d.ts.map +1 -0
  52. package/lib/{annotation → cjs/annotation}/unmanaged.js +1 -0
  53. package/lib/cjs/annotation/unmanaged.js.map +1 -0
  54. package/lib/{bindings → cjs/bindings}/binding.d.ts +1 -0
  55. package/lib/cjs/bindings/binding.d.ts.map +1 -0
  56. package/lib/{bindings → cjs/bindings}/binding.js +15 -0
  57. package/lib/cjs/bindings/binding.js.map +1 -0
  58. package/lib/{bindings → cjs/bindings}/binding_count.d.ts +1 -0
  59. package/lib/cjs/bindings/binding_count.d.ts.map +1 -0
  60. package/lib/{bindings → cjs/bindings}/binding_count.js +1 -0
  61. package/lib/cjs/bindings/binding_count.js.map +1 -0
  62. package/{es → lib/cjs}/constants/error_msgs.d.ts +1 -0
  63. package/lib/cjs/constants/error_msgs.d.ts.map +1 -0
  64. package/lib/{constants → cjs/constants}/error_msgs.js +2 -0
  65. package/lib/cjs/constants/error_msgs.js.map +1 -0
  66. package/lib/{constants → cjs/constants}/literal_types.d.ts +1 -0
  67. package/lib/cjs/constants/literal_types.d.ts.map +1 -0
  68. package/lib/{constants → cjs/constants}/literal_types.js +4 -0
  69. package/lib/cjs/constants/literal_types.js.map +1 -0
  70. package/{es → lib/cjs}/constants/metadata_keys.d.ts +1 -0
  71. package/lib/cjs/constants/metadata_keys.d.ts.map +1 -0
  72. package/lib/{constants → cjs/constants}/metadata_keys.js +13 -0
  73. package/lib/cjs/constants/metadata_keys.js.map +1 -0
  74. package/lib/{container → cjs/container}/container.d.ts +1 -0
  75. package/lib/cjs/container/container.d.ts.map +1 -0
  76. package/lib/{container → cjs/container}/container.js +29 -1
  77. package/lib/cjs/container/container.js.map +1 -0
  78. package/{es → lib/cjs}/container/container_module.d.ts +1 -0
  79. package/lib/cjs/container/container_module.d.ts.map +1 -0
  80. package/lib/{container → cjs/container}/container_module.js +1 -0
  81. package/lib/cjs/container/container_module.js.map +1 -0
  82. package/lib/{container → cjs/container}/container_snapshot.d.ts +1 -0
  83. package/lib/cjs/container/container_snapshot.d.ts.map +1 -0
  84. package/lib/{container → cjs/container}/container_snapshot.js +1 -0
  85. package/lib/cjs/container/container_snapshot.js.map +1 -0
  86. package/lib/{container → cjs/container}/lookup.d.ts +1 -0
  87. package/lib/cjs/container/lookup.d.ts.map +1 -0
  88. package/lib/{container → cjs/container}/lookup.js +8 -0
  89. package/lib/cjs/container/lookup.js.map +1 -0
  90. package/{es → lib/cjs}/container/module_activation_store.d.ts +1 -0
  91. package/lib/cjs/container/module_activation_store.d.ts.map +1 -0
  92. package/lib/{container → cjs/container}/module_activation_store.js +1 -0
  93. package/lib/cjs/container/module_activation_store.js.map +1 -0
  94. package/{es/inversify.d.ts → lib/cjs/index.d.ts} +1 -0
  95. package/lib/cjs/index.d.ts.map +1 -0
  96. package/lib/{inversify.js → cjs/index.js} +2 -0
  97. package/lib/cjs/index.js.map +1 -0
  98. package/{es → lib/cjs}/interfaces/interfaces.d.ts +1 -0
  99. package/lib/cjs/interfaces/interfaces.d.ts.map +1 -0
  100. package/lib/{interfaces → cjs/interfaces}/interfaces.js +1 -0
  101. package/lib/cjs/interfaces/interfaces.js.map +1 -0
  102. package/lib/cjs/package.json +3 -0
  103. package/{es → lib/cjs}/planning/context.d.ts +1 -0
  104. package/lib/cjs/planning/context.d.ts.map +1 -0
  105. package/lib/{planning → cjs/planning}/context.js +1 -0
  106. package/lib/cjs/planning/context.js.map +1 -0
  107. package/lib/{planning → cjs/planning}/metadata.d.ts +1 -0
  108. package/lib/cjs/planning/metadata.d.ts.map +1 -0
  109. package/lib/{planning → cjs/planning}/metadata.js +1 -0
  110. package/lib/cjs/planning/metadata.js.map +1 -0
  111. package/lib/{planning → cjs/planning}/metadata_reader.d.ts +1 -0
  112. package/lib/cjs/planning/metadata_reader.d.ts.map +1 -0
  113. package/lib/{planning → cjs/planning}/metadata_reader.js +4 -0
  114. package/lib/cjs/planning/metadata_reader.js.map +1 -0
  115. package/{es → lib/cjs}/planning/plan.d.ts +1 -0
  116. package/lib/cjs/planning/plan.d.ts.map +1 -0
  117. package/lib/{planning → cjs/planning}/plan.js +1 -0
  118. package/lib/cjs/planning/plan.js.map +1 -0
  119. package/{es → lib/cjs}/planning/planner.d.ts +1 -0
  120. package/lib/cjs/planning/planner.d.ts.map +1 -0
  121. package/lib/{planning → cjs/planning}/planner.js +10 -0
  122. package/lib/cjs/planning/planner.js.map +1 -0
  123. package/{es → lib/cjs}/planning/queryable_string.d.ts +1 -0
  124. package/lib/cjs/planning/queryable_string.d.ts.map +1 -0
  125. package/lib/{planning → cjs/planning}/queryable_string.js +2 -0
  126. package/lib/cjs/planning/queryable_string.js.map +1 -0
  127. package/{es → lib/cjs}/planning/reflection_utils.d.ts +1 -0
  128. package/lib/cjs/planning/reflection_utils.d.ts.map +1 -0
  129. package/lib/{planning → cjs/planning}/reflection_utils.js +8 -1
  130. package/lib/cjs/planning/reflection_utils.js.map +1 -0
  131. package/{es → lib/cjs}/planning/request.d.ts +1 -0
  132. package/lib/cjs/planning/request.d.ts.map +1 -0
  133. package/lib/{planning → cjs/planning}/request.js +5 -1
  134. package/lib/cjs/planning/request.js.map +1 -0
  135. package/lib/{resolution → cjs/resolution}/instantiation.d.ts +1 -0
  136. package/lib/cjs/resolution/instantiation.d.ts.map +1 -0
  137. package/lib/{resolution → cjs/resolution}/instantiation.js +1 -0
  138. package/lib/cjs/resolution/instantiation.js.map +1 -0
  139. package/{es → lib/cjs}/resolution/resolver.d.ts +1 -0
  140. package/lib/cjs/resolution/resolver.d.ts.map +1 -0
  141. package/lib/{resolution → cjs/resolution}/resolver.js +18 -0
  142. package/lib/cjs/resolution/resolver.js.map +1 -0
  143. package/{es → lib/cjs}/scope/scope.d.ts +1 -0
  144. package/lib/cjs/scope/scope.d.ts.map +1 -0
  145. package/lib/{scope → cjs/scope}/scope.js +7 -0
  146. package/lib/cjs/scope/scope.js.map +1 -0
  147. package/{es → lib/cjs}/syntax/binding_in_syntax.d.ts +1 -0
  148. package/lib/cjs/syntax/binding_in_syntax.d.ts.map +1 -0
  149. package/lib/{syntax → cjs/syntax}/binding_in_syntax.js +1 -0
  150. package/lib/cjs/syntax/binding_in_syntax.js.map +1 -0
  151. package/{es → lib/cjs}/syntax/binding_in_when_on_syntax.d.ts +1 -0
  152. package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +1 -0
  153. package/lib/{syntax → cjs/syntax}/binding_in_when_on_syntax.js +1 -0
  154. package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +1 -0
  155. package/{es → lib/cjs}/syntax/binding_on_syntax.d.ts +1 -0
  156. package/lib/cjs/syntax/binding_on_syntax.d.ts.map +1 -0
  157. package/lib/{syntax → cjs/syntax}/binding_on_syntax.js +1 -0
  158. package/lib/cjs/syntax/binding_on_syntax.js.map +1 -0
  159. package/lib/{syntax → cjs/syntax}/binding_to_syntax.d.ts +1 -0
  160. package/lib/cjs/syntax/binding_to_syntax.d.ts.map +1 -0
  161. package/lib/{syntax → cjs/syntax}/binding_to_syntax.js +7 -0
  162. package/lib/cjs/syntax/binding_to_syntax.js.map +1 -0
  163. package/{es → lib/cjs}/syntax/binding_when_on_syntax.d.ts +1 -0
  164. package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +1 -0
  165. package/lib/{syntax → cjs/syntax}/binding_when_on_syntax.js +1 -0
  166. package/lib/cjs/syntax/binding_when_on_syntax.js.map +1 -0
  167. package/lib/{syntax → cjs/syntax}/binding_when_syntax.d.ts +1 -0
  168. package/lib/cjs/syntax/binding_when_syntax.d.ts.map +1 -0
  169. package/lib/{syntax → cjs/syntax}/binding_when_syntax.js +4 -1
  170. package/lib/cjs/syntax/binding_when_syntax.js.map +1 -0
  171. package/{es → lib/cjs}/syntax/constraint_helpers.d.ts +1 -0
  172. package/lib/cjs/syntax/constraint_helpers.d.ts.map +1 -0
  173. package/lib/{syntax → cjs/syntax}/constraint_helpers.js +5 -0
  174. package/lib/cjs/syntax/constraint_helpers.js.map +1 -0
  175. package/{es → lib/cjs}/utils/async.d.ts +1 -0
  176. package/lib/cjs/utils/async.d.ts.map +1 -0
  177. package/lib/{utils → cjs/utils}/async.js +1 -0
  178. package/lib/cjs/utils/async.js.map +1 -0
  179. package/{es → lib/cjs}/utils/binding_utils.d.ts +1 -0
  180. package/lib/cjs/utils/binding_utils.d.ts.map +1 -0
  181. package/lib/{utils → cjs/utils}/binding_utils.js +4 -0
  182. package/lib/cjs/utils/binding_utils.js.map +1 -0
  183. package/{es → lib/cjs}/utils/clonable.d.ts +1 -0
  184. package/lib/cjs/utils/clonable.d.ts.map +1 -0
  185. package/lib/{utils → cjs/utils}/clonable.js +1 -0
  186. package/lib/cjs/utils/clonable.js.map +1 -0
  187. package/{es → lib/cjs}/utils/exceptions.d.ts +1 -0
  188. package/lib/cjs/utils/exceptions.d.ts.map +1 -0
  189. package/lib/{utils → cjs/utils}/exceptions.js +1 -0
  190. package/lib/cjs/utils/exceptions.js.map +1 -0
  191. package/lib/{utils → cjs/utils}/factory_type.d.ts +1 -0
  192. package/lib/cjs/utils/factory_type.d.ts.map +1 -0
  193. package/lib/{utils → cjs/utils}/factory_type.js +1 -0
  194. package/lib/cjs/utils/factory_type.js.map +1 -0
  195. package/{es → lib/cjs}/utils/id.d.ts +1 -0
  196. package/lib/cjs/utils/id.d.ts.map +1 -0
  197. package/lib/{utils → cjs/utils}/id.js +1 -0
  198. package/lib/cjs/utils/id.js.map +1 -0
  199. package/{es → lib/cjs}/utils/js.d.ts +1 -0
  200. package/lib/cjs/utils/js.d.ts.map +1 -0
  201. package/lib/{utils → cjs/utils}/js.js +1 -0
  202. package/lib/cjs/utils/js.js.map +1 -0
  203. package/{es → lib/cjs}/utils/serialization.d.ts +1 -0
  204. package/lib/cjs/utils/serialization.d.ts.map +1 -0
  205. package/lib/{utils → cjs/utils}/serialization.js +6 -0
  206. package/lib/cjs/utils/serialization.js.map +1 -0
  207. package/lib/{interfaces/interfaces.d.ts → esm/index.d.ts} +205 -6
  208. package/lib/esm/index.d.ts.map +1 -0
  209. package/lib/esm/index.js +2 -0
  210. package/lib/esm/index.js.map +1 -0
  211. package/package.json +21 -24
  212. package/es/annotation/decorator_utils.js +0 -90
  213. package/es/annotation/inject.js +0 -4
  214. package/es/annotation/inject_base.js +0 -14
  215. package/es/annotation/injectable.js +0 -13
  216. package/es/annotation/lazy_service_identifier.js +0 -1
  217. package/es/annotation/multi_inject.d.ts +0 -5
  218. package/es/annotation/multi_inject.js +0 -4
  219. package/es/annotation/named.js +0 -7
  220. package/es/annotation/optional.js +0 -7
  221. package/es/annotation/post_construct.js +0 -5
  222. package/es/annotation/pre_destroy.js +0 -5
  223. package/es/annotation/property_event_decorator.d.ts +0 -4
  224. package/es/annotation/property_event_decorator.js +0 -13
  225. package/es/annotation/tagged.js +0 -6
  226. package/es/annotation/target_name.d.ts +0 -3
  227. package/es/annotation/target_name.js +0 -10
  228. package/es/annotation/unmanaged.d.ts +0 -3
  229. package/es/annotation/unmanaged.js +0 -10
  230. package/es/bindings/binding.d.ts +0 -20
  231. package/es/bindings/binding.js +0 -37
  232. package/es/bindings/binding_count.d.ts +0 -5
  233. package/es/bindings/binding_count.js +0 -6
  234. package/es/constants/error_msgs.js +0 -62
  235. package/es/constants/literal_types.d.ts +0 -5
  236. package/es/constants/literal_types.js +0 -21
  237. package/es/constants/metadata_keys.js +0 -23
  238. package/es/container/container.d.ts +0 -75
  239. package/es/container/container.js +0 -750
  240. package/es/container/container_module.js +0 -17
  241. package/es/container/container_snapshot.d.ts +0 -10
  242. package/es/container/container_snapshot.js +0 -15
  243. package/es/container/lookup.d.ts +0 -17
  244. package/es/container/lookup.js +0 -105
  245. package/es/container/module_activation_store.js +0 -47
  246. package/es/interfaces/interfaces.js +0 -1
  247. package/es/inversify.js +0 -3
  248. package/es/inversify.js.LICENSE.txt +0 -14
  249. package/es/planning/context.js +0 -15
  250. package/es/planning/metadata.d.ts +0 -8
  251. package/es/planning/metadata.js +0 -17
  252. package/es/planning/metadata_reader.d.ts +0 -6
  253. package/es/planning/metadata_reader.js +0 -21
  254. package/es/planning/plan.js +0 -8
  255. package/es/planning/planner.js +0 -168
  256. package/es/planning/queryable_string.js +0 -28
  257. package/es/planning/reflection_utils.js +0 -27
  258. package/es/planning/request.js +0 -20
  259. package/es/planning/target.js +0 -87
  260. package/es/resolution/instantiation.d.ts +0 -3
  261. package/es/resolution/instantiation.js +0 -195
  262. package/es/resolution/resolver.js +0 -214
  263. package/es/scope/scope.js +0 -88
  264. package/es/syntax/binding_in_syntax.js +0 -21
  265. package/es/syntax/binding_in_when_on_syntax.js +0 -73
  266. package/es/syntax/binding_on_syntax.js +0 -16
  267. package/es/syntax/binding_to_syntax.d.ts +0 -18
  268. package/es/syntax/binding_to_syntax.js +0 -91
  269. package/es/syntax/binding_when_on_syntax.js +0 -62
  270. package/es/syntax/binding_when_syntax.d.ts +0 -21
  271. package/es/syntax/binding_when_syntax.js +0 -104
  272. package/es/syntax/constraint_helpers.js +0 -36
  273. package/es/utils/async.js +0 -12
  274. package/es/utils/binding_utils.js +0 -58
  275. package/es/utils/clonable.js +0 -7
  276. package/es/utils/exceptions.js +0 -16
  277. package/es/utils/factory_type.d.ts +0 -5
  278. package/es/utils/factory_type.js +0 -6
  279. package/es/utils/id.js +0 -5
  280. package/es/utils/js.js +0 -13
  281. package/es/utils/serialization.js +0 -103
  282. package/lib/annotation/decorator_utils.d.ts +0 -16
  283. package/lib/annotation/inject.d.ts +0 -5
  284. package/lib/annotation/inject_base.d.ts +0 -4
  285. package/lib/annotation/injectable.d.ts +0 -2
  286. package/lib/annotation/lazy_service_identifier.d.ts +0 -3
  287. package/lib/annotation/lazy_service_identifier.js +0 -2
  288. package/lib/annotation/named.d.ts +0 -2
  289. package/lib/annotation/optional.d.ts +0 -2
  290. package/lib/annotation/post_construct.d.ts +0 -4
  291. package/lib/annotation/pre_destroy.d.ts +0 -4
  292. package/lib/annotation/tagged.d.ts +0 -2
  293. package/lib/constants/error_msgs.d.ts +0 -30
  294. package/lib/constants/metadata_keys.d.ts +0 -13
  295. package/lib/container/container_module.d.ts +0 -11
  296. package/lib/container/module_activation_store.d.ts +0 -10
  297. package/lib/inversify.d.ts +0 -25
  298. package/lib/planning/context.d.ts +0 -11
  299. package/lib/planning/plan.d.ts +0 -7
  300. package/lib/planning/planner.d.ts +0 -5
  301. package/lib/planning/queryable_string.d.ts +0 -10
  302. package/lib/planning/reflection_utils.d.ts +0 -5
  303. package/lib/planning/request.d.ts +0 -14
  304. package/lib/planning/target.d.ts +0 -23
  305. package/lib/planning/target.js +0 -113
  306. package/lib/resolution/resolver.d.ts +0 -3
  307. package/lib/scope/scope.d.ts +0 -3
  308. package/lib/syntax/binding_in_syntax.d.ts +0 -9
  309. package/lib/syntax/binding_in_when_on_syntax.d.ts +0 -29
  310. package/lib/syntax/binding_on_syntax.d.ts +0 -8
  311. package/lib/syntax/binding_when_on_syntax.d.ts +0 -25
  312. package/lib/syntax/constraint_helpers.d.ts +0 -6
  313. package/lib/tsconfig.tsbuildinfo +0 -1
  314. package/lib/utils/async.d.ts +0 -3
  315. package/lib/utils/binding_utils.d.ts +0 -4
  316. package/lib/utils/clonable.d.ts +0 -3
  317. package/lib/utils/exceptions.d.ts +0 -2
  318. package/lib/utils/id.d.ts +0 -2
  319. package/lib/utils/js.d.ts +0 -1
  320. package/lib/utils/serialization.d.ts +0 -10
  321. /package/{es → lib/esm}/package.json +0 -0
package/package.json CHANGED
@@ -5,11 +5,13 @@
5
5
  },
6
6
  "description": "A powerful and lightweight inversion of control container for JavaScript and Node.js apps powered by TypeScript.",
7
7
  "dependencies": {
8
- "@inversifyjs/common": "1.3.3",
9
- "@inversifyjs/core": "1.3.4"
8
+ "@inversifyjs/common": "1.4.0",
9
+ "@inversifyjs/core": "1.3.5"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@eslint/js": "9.15.0",
13
+ "@rollup/plugin-terser": "0.4.4",
14
+ "@rollup/plugin-typescript": "12.1.1",
13
15
  "@types/chai": "4.3.20",
14
16
  "@types/mocha": "10.0.10",
15
17
  "@types/sinon": "17.0.3",
@@ -22,17 +24,14 @@
22
24
  "eslint-plugin-simple-import-sort": "12.1.1",
23
25
  "mocha": "10.8.2",
24
26
  "nyc": "17.1.0",
25
- "prettier": "3.4.0",
26
- "publish-please": "5.5.2",
27
+ "prettier": "3.4.1",
27
28
  "rimraf": "6.0.1",
29
+ "rollup-plugin-dts": "6.1.1",
28
30
  "sinon": "19.0.2",
29
31
  "ts-loader": "9.5.1",
30
32
  "ts-node": "10.9.2",
31
33
  "typescript": "5.7.2",
32
- "typescript-eslint": "8.16.0",
33
- "updates": "16.4.0",
34
- "webpack": "5.96.1",
35
- "webpack-cli": "5.1.4"
34
+ "typescript-eslint": "8.16.0"
36
35
  },
37
36
  "peerDependencies": {
38
37
  "reflect-metadata": "~0.2.2"
@@ -51,12 +50,12 @@
51
50
  "typescript"
52
51
  ],
53
52
  "license": "MIT",
54
- "main": "lib/inversify.js",
55
- "module": "es/inversify.js",
53
+ "main": "lib/cjs/index.js",
54
+ "module": "lib/esm/index.js",
56
55
  "exports": {
57
56
  ".": {
58
- "import": "./es/inversify.js",
59
- "require": "./lib/inversify.js"
57
+ "import": "./lib/esm/index.js",
58
+ "require": "./lib/cjs/index.js"
60
59
  }
61
60
  },
62
61
  "name": "inversify",
@@ -65,18 +64,16 @@
65
64
  "url": "https://github.com/inversify/InversifyJS.git"
66
65
  },
67
66
  "scripts": {
68
- "build": "npm run build:lib && npm run build:es",
69
- "build:es": "webpack && node ./scripts/writeEsmPackageJson.mjs ./es",
70
- "build:lib": "tsc -p src/tsconfig.json",
71
- "clean": "rimraf es lib",
72
- "format": "prettier --write ./src/*.ts ./src/**/*.ts ./test/*.ts ./test/**/*.ts",
73
- "lint": "eslint ./src ./test",
74
- "postupdate": "git diff-files --quiet package-lock.json || npm test",
75
- "prepublish": "npm run build && publish-please guard",
76
- "publish-please": "publish-please",
77
- "test": "nyc --reporter=lcov --require ts-node/register mocha ./test/*.test.ts test/**/*.test.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js' --exit",
78
- "update": "updates --update --minor && npm install"
67
+ "build": "npm run build:cjs && npm run build:esm",
68
+ "build:cjs": "tsc --build tsconfig.cjs.json && node ./scripts/writeCommonJsPackageJson.mjs ./lib/cjs",
69
+ "build:esm": "rollup -c ./rollup.config.mjs && node ./scripts/writeEsmPackageJson.mjs ./lib/esm",
70
+ "build:clean": "rimraf lib",
71
+ "format": "prettier --write ./src/**/*.ts",
72
+ "lint": "eslint ./src",
73
+ "prebuild": "npm run build:clean",
74
+ "prepublish": "npm run build",
75
+ "test": "nyc --reporter=lcov --require ts-node/register mocha ./test/*.test.ts test/**/*.test.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js' --exit"
79
76
  },
80
77
  "sideEffects": false,
81
- "version": "6.1.5-beta.0"
78
+ "version": "6.1.5-beta.1"
82
79
  }
@@ -1,90 +0,0 @@
1
- import * as ERROR_MSGS from '../constants/error_msgs';
2
- import * as METADATA_KEY from '../constants/metadata_keys';
3
- import { getFirstArrayDuplicate } from '../utils/js';
4
- function targetIsConstructorFunction(target) {
5
- return target.prototype !== undefined;
6
- }
7
- function _throwIfMethodParameter(parameterName) {
8
- if (parameterName !== undefined) {
9
- throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
10
- }
11
- }
12
- function tagParameter(annotationTarget, parameterName, parameterIndex, metadata) {
13
- _throwIfMethodParameter(parameterName);
14
- _tagParameterOrProperty(METADATA_KEY.TAGGED, annotationTarget, parameterIndex.toString(), metadata);
15
- }
16
- function tagProperty(annotationTarget, propertyName, metadata) {
17
- if (targetIsConstructorFunction(annotationTarget)) {
18
- throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
19
- }
20
- _tagParameterOrProperty(METADATA_KEY.TAGGED_PROP, annotationTarget.constructor, propertyName, metadata);
21
- }
22
- function _ensureNoMetadataKeyDuplicates(metadata) {
23
- var metadatas = [];
24
- if (Array.isArray(metadata)) {
25
- metadatas = metadata;
26
- var duplicate = getFirstArrayDuplicate(metadatas.map(function (md) { return md.key; }));
27
- if (duplicate !== undefined) {
28
- throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(duplicate.toString()));
29
- }
30
- }
31
- else {
32
- metadatas = [metadata];
33
- }
34
- return metadatas;
35
- }
36
- function _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) {
37
- var metadatas = _ensureNoMetadataKeyDuplicates(metadata);
38
- var paramsOrPropertiesMetadata = {};
39
- if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) {
40
- paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget);
41
- }
42
- var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];
43
- if (paramOrPropertyMetadata === undefined) {
44
- paramOrPropertyMetadata = [];
45
- }
46
- else {
47
- var _loop_1 = function (m) {
48
- if (metadatas.some(function (md) { return md.key === m.key; })) {
49
- throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(m.key.toString()));
50
- }
51
- };
52
- for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) {
53
- var m = paramOrPropertyMetadata_1[_i];
54
- _loop_1(m);
55
- }
56
- }
57
- paramOrPropertyMetadata.push.apply(paramOrPropertyMetadata, metadatas);
58
- paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata;
59
- Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);
60
- }
61
- function createTaggedDecorator(metadata) {
62
- return function (target, targetKey, indexOrPropertyDescriptor) {
63
- if (typeof indexOrPropertyDescriptor === 'number') {
64
- tagParameter(target, targetKey, indexOrPropertyDescriptor, metadata);
65
- }
66
- else {
67
- tagProperty(target, targetKey, metadata);
68
- }
69
- };
70
- }
71
- function _decorate(decorators, target) {
72
- Reflect.decorate(decorators, target);
73
- }
74
- function _param(paramIndex, decorator) {
75
- return function (target, key) {
76
- decorator(target, key, paramIndex);
77
- };
78
- }
79
- function decorate(decorator, target, parameterIndexOrProperty) {
80
- if (typeof parameterIndexOrProperty === 'number') {
81
- _decorate([_param(parameterIndexOrProperty, decorator)], target);
82
- }
83
- else if (typeof parameterIndexOrProperty === 'string') {
84
- Reflect.decorate([decorator], target, parameterIndexOrProperty);
85
- }
86
- else {
87
- _decorate([decorator], target);
88
- }
89
- }
90
- export { decorate, tagParameter, tagProperty, createTaggedDecorator };
@@ -1,4 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { injectBase } from './inject_base';
3
- var inject = injectBase(METADATA_KEY.INJECT_TAG);
4
- export { inject };
@@ -1,14 +0,0 @@
1
- import { UNDEFINED_INJECT_ANNOTATION } from '../constants/error_msgs';
2
- import { Metadata } from '../planning/metadata';
3
- import { createTaggedDecorator } from './decorator_utils';
4
- export function injectBase(metadataKey) {
5
- return function (serviceIdentifier) {
6
- return function (target, targetKey, indexOrPropertyDescriptor) {
7
- if (serviceIdentifier === undefined) {
8
- var className = typeof target === 'function' ? target.name : target.constructor.name;
9
- throw new Error(UNDEFINED_INJECT_ANNOTATION(className));
10
- }
11
- createTaggedDecorator(new Metadata(metadataKey, serviceIdentifier))(target, targetKey, indexOrPropertyDescriptor);
12
- };
13
- };
14
- }
@@ -1,13 +0,0 @@
1
- import * as ERRORS_MSGS from '../constants/error_msgs';
2
- import * as METADATA_KEY from '../constants/metadata_keys';
3
- function injectable() {
4
- return function (target) {
5
- if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) {
6
- throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR);
7
- }
8
- var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || [];
9
- Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target);
10
- return target;
11
- };
12
- }
13
- export { injectable };
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { LazyServiceIdentifier } from '@inversifyjs/common';
2
- import { interfaces } from '../interfaces/interfaces';
3
- import { DecoratorTarget } from './decorator_utils';
4
- declare const multiInject: <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
5
- export { multiInject };
@@ -1,4 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { injectBase } from './inject_base';
3
- var multiInject = injectBase(METADATA_KEY.MULTI_INJECT_TAG);
4
- export { multiInject };
@@ -1,7 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { Metadata } from '../planning/metadata';
3
- import { createTaggedDecorator } from './decorator_utils';
4
- function named(name) {
5
- return createTaggedDecorator(new Metadata(METADATA_KEY.NAMED_TAG, name));
6
- }
7
- export { named };
@@ -1,7 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { Metadata } from '../planning/metadata';
3
- import { createTaggedDecorator } from './decorator_utils';
4
- function optional() {
5
- return createTaggedDecorator(new Metadata(METADATA_KEY.OPTIONAL_TAG, true));
6
- }
7
- export { optional };
@@ -1,5 +0,0 @@
1
- import * as ERRORS_MSGS from '../constants/error_msgs';
2
- import * as METADATA_KEY from '../constants/metadata_keys';
3
- import { propertyEventDecorator } from './property_event_decorator';
4
- var postConstruct = propertyEventDecorator(METADATA_KEY.POST_CONSTRUCT, ERRORS_MSGS.MULTIPLE_POST_CONSTRUCT_METHODS);
5
- export { postConstruct };
@@ -1,5 +0,0 @@
1
- import * as ERRORS_MSGS from '../constants/error_msgs';
2
- import * as METADATA_KEY from '../constants/metadata_keys';
3
- import { propertyEventDecorator } from './property_event_decorator';
4
- var preDestroy = propertyEventDecorator(METADATA_KEY.PRE_DESTROY, ERRORS_MSGS.MULTIPLE_PRE_DESTROY_METHODS);
5
- export { preDestroy };
@@ -1,4 +0,0 @@
1
- declare function propertyEventDecorator(eventKey: string, errorMessage: string): () => (target: {
2
- constructor: NewableFunction;
3
- }, propertyKey: string) => void;
4
- export { propertyEventDecorator };
@@ -1,13 +0,0 @@
1
- import { Metadata } from '../planning/metadata';
2
- function propertyEventDecorator(eventKey, errorMessage) {
3
- return function () {
4
- return function (target, propertyKey) {
5
- var metadata = new Metadata(eventKey, propertyKey);
6
- if (Reflect.hasOwnMetadata(eventKey, target.constructor)) {
7
- throw new Error(errorMessage);
8
- }
9
- Reflect.defineMetadata(eventKey, metadata, target.constructor);
10
- };
11
- };
12
- }
13
- export { propertyEventDecorator };
@@ -1,6 +0,0 @@
1
- import { Metadata } from '../planning/metadata';
2
- import { createTaggedDecorator } from './decorator_utils';
3
- function tagged(metadataKey, metadataValue) {
4
- return createTaggedDecorator(new Metadata(metadataKey, metadataValue));
5
- }
6
- export { tagged };
@@ -1,3 +0,0 @@
1
- import { DecoratorTarget } from './decorator_utils';
2
- declare function targetName(name: string): (target: DecoratorTarget, targetKey: string | undefined, index: number) => void;
3
- export { targetName };
@@ -1,10 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { Metadata } from '../planning/metadata';
3
- import { tagParameter } from './decorator_utils';
4
- function targetName(name) {
5
- return function (target, targetKey, index) {
6
- var metadata = new Metadata(METADATA_KEY.NAME_TAG, name);
7
- tagParameter(target, targetKey, index, metadata);
8
- };
9
- }
10
- export { targetName };
@@ -1,3 +0,0 @@
1
- import { DecoratorTarget } from './decorator_utils';
2
- declare function unmanaged(): (target: DecoratorTarget, targetKey: string | undefined, index: number) => void;
3
- export { unmanaged };
@@ -1,10 +0,0 @@
1
- import * as METADATA_KEY from '../constants/metadata_keys';
2
- import { Metadata } from '../planning/metadata';
3
- import { tagParameter } from './decorator_utils';
4
- function unmanaged() {
5
- return function (target, targetKey, index) {
6
- var metadata = new Metadata(METADATA_KEY.UNMANAGED_TAG, true);
7
- tagParameter(target, targetKey, index, metadata);
8
- };
9
- }
10
- export { unmanaged };
@@ -1,20 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class Binding<TActivated> implements interfaces.Binding<TActivated> {
3
- id: number;
4
- moduleId: interfaces.ContainerModuleBase['id'];
5
- activated: boolean;
6
- serviceIdentifier: interfaces.ServiceIdentifier<TActivated>;
7
- implementationType: interfaces.Newable<TActivated> | TActivated | null;
8
- cache: TActivated | Promise<TActivated> | null;
9
- dynamicValue: interfaces.DynamicValue<TActivated> | null;
10
- scope: interfaces.BindingScope;
11
- type: interfaces.BindingType;
12
- factory: interfaces.FactoryCreator<unknown> | null;
13
- provider: interfaces.ProviderCreator<unknown> | null;
14
- constraint: interfaces.ConstraintFunction;
15
- onActivation: interfaces.BindingActivation<TActivated> | null;
16
- onDeactivation: interfaces.BindingDeactivation<TActivated> | null;
17
- constructor(serviceIdentifier: interfaces.ServiceIdentifier<TActivated>, scope: interfaces.BindingScope);
18
- clone(): interfaces.Binding<TActivated>;
19
- }
20
- export { Binding };
@@ -1,37 +0,0 @@
1
- import { BindingScopeEnum, BindingTypeEnum } from '../constants/literal_types';
2
- import { id } from '../utils/id';
3
- var Binding = (function () {
4
- function Binding(serviceIdentifier, scope) {
5
- this.id = id();
6
- this.activated = false;
7
- this.serviceIdentifier = serviceIdentifier;
8
- this.scope = scope;
9
- this.type = BindingTypeEnum.Invalid;
10
- this.constraint = function (_request) { return true; };
11
- this.implementationType = null;
12
- this.cache = null;
13
- this.factory = null;
14
- this.provider = null;
15
- this.onActivation = null;
16
- this.onDeactivation = null;
17
- this.dynamicValue = null;
18
- }
19
- Binding.prototype.clone = function () {
20
- var clone = new Binding(this.serviceIdentifier, this.scope);
21
- clone.activated =
22
- clone.scope === BindingScopeEnum.Singleton ? this.activated : false;
23
- clone.implementationType = this.implementationType;
24
- clone.dynamicValue = this.dynamicValue;
25
- clone.scope = this.scope;
26
- clone.type = this.type;
27
- clone.factory = this.factory;
28
- clone.provider = this.provider;
29
- clone.constraint = this.constraint;
30
- clone.onActivation = this.onActivation;
31
- clone.onDeactivation = this.onDeactivation;
32
- clone.cache = this.cache;
33
- return clone;
34
- };
35
- return Binding;
36
- }());
37
- export { Binding };
@@ -1,5 +0,0 @@
1
- export declare enum BindingCount {
2
- MultipleBindingsAvailable = 2,
3
- NoBindingsAvailable = 0,
4
- OnlyOneBindingAvailable = 1
5
- }
@@ -1,6 +0,0 @@
1
- export var BindingCount;
2
- (function (BindingCount) {
3
- BindingCount[BindingCount["MultipleBindingsAvailable"] = 2] = "MultipleBindingsAvailable";
4
- BindingCount[BindingCount["NoBindingsAvailable"] = 0] = "NoBindingsAvailable";
5
- BindingCount[BindingCount["OnlyOneBindingAvailable"] = 1] = "OnlyOneBindingAvailable";
6
- })(BindingCount || (BindingCount = {}));
@@ -1,62 +0,0 @@
1
- export var DUPLICATED_INJECTABLE_DECORATOR = 'Cannot apply @injectable decorator multiple times.';
2
- export var DUPLICATED_METADATA = 'Metadata key was used more than once in a parameter:';
3
- export var NULL_ARGUMENT = 'NULL argument';
4
- export var KEY_NOT_FOUND = 'Key Not Found';
5
- export var AMBIGUOUS_MATCH = 'Ambiguous match found for serviceIdentifier:';
6
- export var CANNOT_UNBIND = 'Could not unbind serviceIdentifier:';
7
- export var NOT_REGISTERED = 'No matching bindings found for serviceIdentifier:';
8
- export var TRYING_TO_RESOLVE_BINDINGS = function (name) { return "Trying to resolve bindings for \"".concat(name, "\""); };
9
- export var UNDEFINED_INJECT_ANNOTATION = function (name) {
10
- return "@inject called with undefined this could mean that the class ".concat(name, " has ") +
11
- 'a circular dependency problem. You can use a LazyServiceIdentifer to ' +
12
- 'overcome this limitation.';
13
- };
14
- export var CIRCULAR_DEPENDENCY = 'Circular dependency found:';
15
- export var INVALID_BINDING_TYPE = 'Invalid binding type:';
16
- export var NO_MORE_SNAPSHOTS_AVAILABLE = 'No snapshot available to restore.';
17
- export var INVALID_MIDDLEWARE_RETURN = 'Invalid return type in middleware. Middleware must return!';
18
- export var INVALID_FUNCTION_BINDING = 'Value provided to function binding must be a function!';
19
- export var LAZY_IN_SYNC = function (key) {
20
- return "You are attempting to construct ".concat(keyToString(key), " in a synchronous way ") +
21
- 'but it has asynchronous dependencies.';
22
- };
23
- export var INVALID_TO_SELF_VALUE = 'The toSelf function can only be applied when a constructor is ' +
24
- 'used as service identifier';
25
- export var INVALID_DECORATOR_OPERATION = 'The @inject @multiInject @tagged and @named decorators ' +
26
- 'must be applied to the parameters of a class constructor or a class property.';
27
- export var ARGUMENTS_LENGTH_MISMATCH = function (name) {
28
- return 'The number of constructor arguments in the derived class ' +
29
- "".concat(name, " must be >= than the number of constructor arguments of its base class.");
30
- };
31
- export var CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = 'Invalid Container constructor argument. Container options ' +
32
- 'must be an object.';
33
- export var CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = 'Invalid Container option. Default scope must ' +
34
- 'be a string ("singleton" or "transient").';
35
- export var CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = 'Invalid Container option. Auto bind injectable must ' + 'be a boolean';
36
- export var CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = 'Invalid Container option. Skip base check must ' + 'be a boolean';
37
- export var MULTIPLE_PRE_DESTROY_METHODS = 'Cannot apply @preDestroy decorator multiple times in the same class';
38
- export var MULTIPLE_POST_CONSTRUCT_METHODS = 'Cannot apply @postConstruct decorator multiple times in the same class';
39
- export var ASYNC_UNBIND_REQUIRED = 'Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)';
40
- export var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) {
41
- return "@postConstruct error in class ".concat(clazz, ": ").concat(errorMessage);
42
- };
43
- export var PRE_DESTROY_ERROR = function (clazz, errorMessage) {
44
- return "@preDestroy error in class ".concat(clazz, ": ").concat(errorMessage);
45
- };
46
- export var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) {
47
- return "onDeactivation() error in class ".concat(clazz, ": ").concat(errorMessage);
48
- };
49
- export var CIRCULAR_DEPENDENCY_IN_FACTORY = function (factoryType, serviceIdentifier) {
50
- return "It looks like there is a circular dependency in one of the '".concat(factoryType, "' bindings. Please investigate bindings with ") +
51
- "service identifier '".concat(serviceIdentifier, "'.");
52
- };
53
- export var STACK_OVERFLOW = 'Maximum call stack size exceeded';
54
- function keyToString(key) {
55
- if (typeof key === 'function') {
56
- return "[function/class ".concat(key.name || '<anonymous>', "]");
57
- }
58
- if (typeof key === 'symbol') {
59
- return key.toString();
60
- }
61
- return "'".concat(key, "'");
62
- }
@@ -1,5 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare const BindingScopeEnum: interfaces.BindingScopeEnum;
3
- declare const BindingTypeEnum: interfaces.BindingTypeEnum;
4
- declare const TargetTypeEnum: interfaces.TargetTypeEnum;
5
- export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum };
@@ -1,21 +0,0 @@
1
- var BindingScopeEnum = {
2
- Request: 'Request',
3
- Singleton: 'Singleton',
4
- Transient: 'Transient',
5
- };
6
- var BindingTypeEnum = {
7
- ConstantValue: 'ConstantValue',
8
- Constructor: 'Constructor',
9
- DynamicValue: 'DynamicValue',
10
- Factory: 'Factory',
11
- Function: 'Function',
12
- Instance: 'Instance',
13
- Invalid: 'Invalid',
14
- Provider: 'Provider',
15
- };
16
- var TargetTypeEnum = {
17
- ClassProperty: 'ClassProperty',
18
- ConstructorArgument: 'ConstructorArgument',
19
- Variable: 'Variable',
20
- };
21
- export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum };
@@ -1,23 +0,0 @@
1
- export var NAMED_TAG = 'named';
2
- export var NAME_TAG = 'name';
3
- export var UNMANAGED_TAG = 'unmanaged';
4
- export var OPTIONAL_TAG = 'optional';
5
- export var INJECT_TAG = 'inject';
6
- export var MULTI_INJECT_TAG = 'multi_inject';
7
- export var TAGGED = 'inversify:tagged';
8
- export var TAGGED_PROP = 'inversify:tagged_props';
9
- export var PARAM_TYPES = 'inversify:paramtypes';
10
- export var DESIGN_PARAM_TYPES = 'design:paramtypes';
11
- export var POST_CONSTRUCT = 'post_construct';
12
- export var PRE_DESTROY = 'pre_destroy';
13
- function getNonCustomTagKeys() {
14
- return [
15
- INJECT_TAG,
16
- MULTI_INJECT_TAG,
17
- NAME_TAG,
18
- UNMANAGED_TAG,
19
- NAMED_TAG,
20
- OPTIONAL_TAG,
21
- ];
22
- }
23
- export var NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys();
@@ -1,75 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class Container implements interfaces.Container {
3
- id: number;
4
- parent: interfaces.Container | null;
5
- readonly options: interfaces.ContainerOptions;
6
- private _middleware;
7
- private _bindingDictionary;
8
- private _activations;
9
- private _deactivations;
10
- private readonly _snapshots;
11
- private _metadataReader;
12
- private _moduleActivationStore;
13
- constructor(containerOptions?: interfaces.ContainerOptions);
14
- static merge(container1: interfaces.Container, container2: interfaces.Container, ...containers: interfaces.Container[]): interfaces.Container;
15
- load(...modules: interfaces.ContainerModule[]): void;
16
- loadAsync(...modules: interfaces.AsyncContainerModule[]): Promise<void>;
17
- unload(...modules: interfaces.ContainerModuleBase[]): void;
18
- unloadAsync(...modules: interfaces.ContainerModuleBase[]): Promise<void>;
19
- bind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
20
- rebind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
21
- rebindAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<interfaces.BindingToSyntax<T>>;
22
- unbind(serviceIdentifier: interfaces.ServiceIdentifier): void;
23
- unbindAsync(serviceIdentifier: interfaces.ServiceIdentifier): Promise<void>;
24
- unbindAll(): void;
25
- unbindAllAsync(): Promise<void>;
26
- onActivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onActivation: interfaces.BindingActivation<T>): void;
27
- onDeactivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onDeactivation: interfaces.BindingDeactivation<T>): void;
28
- isBound(serviceIdentifier: interfaces.ServiceIdentifier<unknown>): boolean;
29
- isCurrentBound<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): boolean;
30
- isBoundNamed(serviceIdentifier: interfaces.ServiceIdentifier, named: string | number | symbol): boolean;
31
- isBoundTagged(serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
32
- snapshot(): void;
33
- restore(): void;
34
- createChild(containerOptions?: interfaces.ContainerOptions): Container;
35
- applyMiddleware(...middlewares: interfaces.Middleware[]): void;
36
- applyCustomMetadataReader(metadataReader: interfaces.MetadataReader): void;
37
- get<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T;
38
- getAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<T>;
39
- getTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T;
40
- getTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T>;
41
- getNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T;
42
- getNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T>;
43
- getAll<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T[];
44
- getAllAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<T[]>;
45
- getAllTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T[];
46
- getAllTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T[]>;
47
- getAllNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T[];
48
- getAllNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T[]>;
49
- resolve<T>(constructorFunction: interfaces.Newable<T>): T;
50
- private _preDestroy;
51
- private _removeModuleHandlers;
52
- private _removeModuleBindings;
53
- private _deactivate;
54
- private _handleDeactivationError;
55
- private _deactivateContainer;
56
- private _deactivateContainerAsync;
57
- private _getContainerModuleHelpersFactory;
58
- private _bind;
59
- private _buildBinding;
60
- private _getAll;
61
- private _get;
62
- private _getButThrowIfAsync;
63
- private _getAllArgs;
64
- private _getNotAllArgs;
65
- private _planAndResolve;
66
- private _deactivateIfSingleton;
67
- private _deactivateSingletons;
68
- private _deactivateSingletonsAsync;
69
- private _propagateContainerDeactivationThenBindingAndPreDestroy;
70
- private _propagateContainerDeactivationThenBindingAndPreDestroyAsync;
71
- private _removeServiceFromDictionary;
72
- private _bindingDeactivationAndPreDestroy;
73
- private _bindingDeactivationAndPreDestroyAsync;
74
- }
75
- export { Container };