ts-ioc-container 25.0.6 → 25.0.8
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.
- package/README.md +5 -5
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
- [Instances](#instances)
|
|
27
27
|
- [Disposing](#disposing)
|
|
28
28
|
- [Injectors](#injectors)
|
|
29
|
-
- [Reflection injector](#reflection-injector)
|
|
29
|
+
- [Reflection injector](#reflection-injector) `@inject`
|
|
30
30
|
- [Simple injector](#simple-injector)
|
|
31
31
|
- [Proxy injector](#proxy-injector)
|
|
32
32
|
- [Providers](#providers)
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
- [Basic usage](#basic-usage-1)
|
|
39
39
|
- [Registration module (Provider + DependencyKey)](#registration-module-provider--dependencykey)
|
|
40
40
|
- [Hooks](#hooks)
|
|
41
|
-
- [OnConstruct](#onconstruct)
|
|
42
|
-
- [OnDispose](#ondispose)
|
|
41
|
+
- [OnConstruct](#onconstruct) `@onConstruct`
|
|
42
|
+
- [OnDispose](#ondispose) `@onDispose`
|
|
43
43
|
- [Tests and Mocks](#tests-and-mocks)
|
|
44
44
|
- [Errors](#errors)
|
|
45
45
|
|
|
@@ -587,7 +587,7 @@ class MyInjector implements IInjector {
|
|
|
587
587
|
class Logger {
|
|
588
588
|
isReady = false;
|
|
589
589
|
|
|
590
|
-
@hook('onConstruct')
|
|
590
|
+
@hook('onConstruct') // <--- or extract it to @onConstruct
|
|
591
591
|
initialize() {
|
|
592
592
|
this.isReady = true;
|
|
593
593
|
}
|
|
@@ -645,7 +645,7 @@ class Logger {
|
|
|
645
645
|
this.messages.push(message);
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
@hook('onDispose')
|
|
648
|
+
@hook('onDispose') // <--- or extract it to @onDispose
|
|
649
649
|
async save(): Promise<void> {
|
|
650
650
|
this.logsRepo.saveLogs(this.messages);
|
|
651
651
|
this.messages = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-ioc-container",
|
|
3
|
-
"version": "25.0.
|
|
3
|
+
"version": "25.0.8",
|
|
4
4
|
"description": "Typescript IoC container",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
"container",
|
|
21
21
|
"typescript",
|
|
22
22
|
"ioc",
|
|
23
|
-
"di"
|
|
23
|
+
"di",
|
|
24
|
+
"scope",
|
|
25
|
+
"hook",
|
|
26
|
+
"inject"
|
|
24
27
|
],
|
|
25
28
|
"directories": {
|
|
26
29
|
"lib": "lib",
|
|
@@ -56,5 +59,5 @@
|
|
|
56
59
|
"ts-node": "^10.9.1",
|
|
57
60
|
"typescript": "4.4.3"
|
|
58
61
|
},
|
|
59
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "d1674a6839b175e0de745a55fa46147c4add3065"
|
|
60
63
|
}
|