@tsed/di 6.86.0 → 6.87.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.
- package/lib/domain/Container.d.ts +1 -1
- package/lib/domain/Provider.d.ts +3 -0
- package/lib/index.js +7 -4
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +7 -4
- package/lib/index.modern.js.map +1 -1
- package/lib/interfaces/RegistrySettings.d.ts +6 -2
- package/lib/interfaces/ResolvedInvokeOptions.d.ts +12 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/registries/GlobalProviders.d.ts +5 -1
- package/package.json +3 -3
package/lib/index.modern.js
CHANGED
|
@@ -286,11 +286,11 @@ class GlobalProviderRegistry extends Map {
|
|
|
286
286
|
return this;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
onInvoke(provider, locals,
|
|
289
|
+
onInvoke(provider, locals, options) {
|
|
290
290
|
const settings = _classPrivateFieldLooseBase(this, _settings)[_settings].get(provider.type);
|
|
291
291
|
|
|
292
292
|
if (settings != null && settings.onInvoke) {
|
|
293
|
-
settings.onInvoke(provider, locals,
|
|
293
|
+
settings.onInvoke(provider, locals, options);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
@@ -2174,16 +2174,19 @@ let InjectorService = InjectorService_1 = class InjectorService extends Containe
|
|
|
2174
2174
|
|
|
2175
2175
|
|
|
2176
2176
|
resolve(target, locals, options = {}) {
|
|
2177
|
+
const resolvedOpts = this.mapInvokeOptions(target, locals, options);
|
|
2177
2178
|
const {
|
|
2178
2179
|
token,
|
|
2179
2180
|
deps,
|
|
2180
2181
|
construct,
|
|
2181
2182
|
imports,
|
|
2182
2183
|
provider
|
|
2183
|
-
} =
|
|
2184
|
+
} = resolvedOpts;
|
|
2184
2185
|
|
|
2185
2186
|
if (provider) {
|
|
2186
|
-
GlobalProviders.onInvoke(provider, locals,
|
|
2187
|
+
GlobalProviders.onInvoke(provider, locals, _extends({}, resolvedOpts, {
|
|
2188
|
+
injector: this
|
|
2189
|
+
}));
|
|
2187
2190
|
}
|
|
2188
2191
|
|
|
2189
2192
|
let instance;
|