@tsed/di 6.87.1 → 6.87.2
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/lib/domain/Container.d.ts +1 -2
- package/lib/index.js +142 -83
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +142 -83
- package/lib/index.modern.js.map +1 -1
- package/lib/services/InjectorService.d.ts +23 -1
- package/package.json +3 -3
|
@@ -26,6 +26,7 @@ import { DIConfiguration } from "./DIConfiguration";
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
export declare class InjectorService extends Container {
|
|
29
|
+
#private;
|
|
29
30
|
settings: TsED.Configuration & DIConfiguration;
|
|
30
31
|
logger: DILogger;
|
|
31
32
|
private resolvedConfiguration;
|
|
@@ -45,6 +46,7 @@ export declare class InjectorService extends Container {
|
|
|
45
46
|
* Clone a provider from GlobalProviders and the given token. forkProvider method build automatically the provider if the instance parameter ins't given.
|
|
46
47
|
* @param token
|
|
47
48
|
* @param settings
|
|
49
|
+
* @deprecated
|
|
48
50
|
*/
|
|
49
51
|
forkProvider(token: TokenProvider, settings?: Partial<IProvider<any>>): Provider;
|
|
50
52
|
/**
|
|
@@ -103,7 +105,7 @@ export declare class InjectorService extends Container {
|
|
|
103
105
|
/**
|
|
104
106
|
* Build only providers which are asynchronous.
|
|
105
107
|
*/
|
|
106
|
-
loadAsync(locals?: LocalsContainer
|
|
108
|
+
loadAsync(locals?: LocalsContainer): Promise<LocalsContainer<any>>;
|
|
107
109
|
loadSync(locals?: LocalsContainer<any>): LocalsContainer<any>;
|
|
108
110
|
/**
|
|
109
111
|
* Boostrap injector from container and resolve configuration.
|
|
@@ -177,6 +179,26 @@ export declare class InjectorService extends Container {
|
|
|
177
179
|
*/
|
|
178
180
|
runInContext(ctx: DIContext, cb: any): any;
|
|
179
181
|
lazyInvoke(token: TokenProvider): Promise<any>;
|
|
182
|
+
/**
|
|
183
|
+
* Emit an event to all service. See service [lifecycle hooks](/docs/services.md#lifecycle-hooks).
|
|
184
|
+
* @param eventName The event name to emit at all services.
|
|
185
|
+
* @param args List of the parameters to give to each services.
|
|
186
|
+
* @returns {Promise<any[]>} A list of promises.
|
|
187
|
+
*/
|
|
188
|
+
emit(eventName: string, ...args: any[]): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* @param eventName
|
|
191
|
+
* @param value
|
|
192
|
+
* @param args
|
|
193
|
+
*/
|
|
194
|
+
alter<T = any>(eventName: string, value: any, ...args: any[]): T;
|
|
195
|
+
/**
|
|
196
|
+
* @param eventName
|
|
197
|
+
* @param value
|
|
198
|
+
* @param args
|
|
199
|
+
*/
|
|
200
|
+
alterAsync<T = any>(eventName: string, value: any, ...args: any[]): Promise<T>;
|
|
201
|
+
destroy(): Promise<void>;
|
|
180
202
|
protected ensureProvider(token: TokenProvider): Provider | undefined;
|
|
181
203
|
protected getInstance(token: any): any;
|
|
182
204
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/di",
|
|
3
|
-
"version": "6.87.
|
|
3
|
+
"version": "6.87.2",
|
|
4
4
|
"description": "DI module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"build": "microbundle --target node --no-compress --format modern,cjs --tsconfig ./tsconfig.compile.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@tsed/core": "6.87.
|
|
18
|
-
"@tsed/schema": "6.87.
|
|
17
|
+
"@tsed/core": "6.87.2",
|
|
18
|
+
"@tsed/schema": "6.87.2",
|
|
19
19
|
"tslib": "2.2.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|