@navios/di 0.8.0 → 0.9.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.
- package/CHANGELOG.md +87 -0
- package/README.md +117 -17
- package/lib/browser/container/abstract-container.d.mts +112 -0
- package/lib/browser/container/abstract-container.d.mts.map +1 -0
- package/lib/browser/container/abstract-container.mjs +100 -0
- package/lib/browser/container/abstract-container.mjs.map +1 -0
- package/lib/browser/container/container.d.mts +100 -0
- package/lib/browser/container/container.d.mts.map +1 -0
- package/lib/browser/container/container.mjs +424 -0
- package/lib/browser/container/container.mjs.map +1 -0
- package/lib/browser/container/scoped-container.d.mts +93 -0
- package/lib/browser/container/scoped-container.d.mts.map +1 -0
- package/lib/browser/container/scoped-container.mjs +119 -0
- package/lib/browser/container/scoped-container.mjs.map +1 -0
- package/lib/browser/decorators/factory.decorator.d.mts +26 -0
- package/lib/browser/decorators/factory.decorator.d.mts.map +1 -0
- package/lib/browser/decorators/factory.decorator.mjs +20 -0
- package/lib/browser/decorators/factory.decorator.mjs.map +1 -0
- package/lib/browser/decorators/injectable.decorator.d.mts +38 -0
- package/lib/browser/decorators/injectable.decorator.d.mts.map +1 -0
- package/lib/browser/decorators/injectable.decorator.mjs +21 -0
- package/lib/browser/decorators/injectable.decorator.mjs.map +1 -0
- package/lib/browser/enums/injectable-scope.enum.d.mts +18 -0
- package/lib/browser/enums/injectable-scope.enum.d.mts.map +1 -0
- package/lib/browser/enums/injectable-scope.enum.mjs +20 -0
- package/lib/browser/enums/injectable-scope.enum.mjs.map +1 -0
- package/lib/browser/enums/injectable-type.enum.d.mts +8 -0
- package/lib/browser/enums/injectable-type.enum.d.mts.map +1 -0
- package/lib/browser/enums/injectable-type.enum.mjs +10 -0
- package/lib/browser/enums/injectable-type.enum.mjs.map +1 -0
- package/lib/browser/errors/di-error.d.mts +43 -0
- package/lib/browser/errors/di-error.d.mts.map +1 -0
- package/lib/browser/errors/di-error.mjs +98 -0
- package/lib/browser/errors/di-error.mjs.map +1 -0
- package/lib/browser/event-emitter.d.mts +16 -0
- package/lib/browser/event-emitter.d.mts.map +1 -0
- package/lib/browser/event-emitter.mjs +320 -0
- package/lib/browser/event-emitter.mjs.map +1 -0
- package/lib/browser/index.d.mts +37 -1558
- package/lib/browser/index.mjs +29 -2749
- package/lib/browser/interfaces/container.interface.d.mts +59 -0
- package/lib/browser/interfaces/container.interface.d.mts.map +1 -0
- package/lib/browser/interfaces/factory.interface.d.mts +14 -0
- package/lib/browser/interfaces/factory.interface.d.mts.map +1 -0
- package/lib/browser/interfaces/on-service-destroy.interface.d.mts +7 -0
- package/lib/browser/interfaces/on-service-destroy.interface.d.mts.map +1 -0
- package/lib/browser/interfaces/on-service-init.interface.d.mts +7 -0
- package/lib/browser/interfaces/on-service-init.interface.d.mts.map +1 -0
- package/lib/browser/internal/context/async-local-storage.browser.mjs +20 -0
- package/lib/browser/internal/context/async-local-storage.browser.mjs.map +1 -0
- package/lib/browser/internal/context/async-local-storage.d.mts +9 -0
- package/lib/browser/internal/context/async-local-storage.d.mts.map +1 -0
- package/lib/browser/internal/context/async-local-storage.types.d.mts +11 -0
- package/lib/browser/internal/context/async-local-storage.types.d.mts.map +1 -0
- package/lib/browser/internal/context/factory-context.d.mts +23 -0
- package/lib/browser/internal/context/factory-context.d.mts.map +1 -0
- package/lib/browser/internal/context/resolution-context.d.mts +43 -0
- package/lib/browser/internal/context/resolution-context.d.mts.map +1 -0
- package/lib/browser/internal/context/resolution-context.mjs +56 -0
- package/lib/browser/internal/context/resolution-context.mjs.map +1 -0
- package/lib/browser/internal/context/service-initialization-context.d.mts +48 -0
- package/lib/browser/internal/context/service-initialization-context.d.mts.map +1 -0
- package/lib/browser/internal/context/sync-local-storage.mjs +53 -0
- package/lib/browser/internal/context/sync-local-storage.mjs.map +1 -0
- package/lib/browser/internal/core/instance-resolver.d.mts +119 -0
- package/lib/browser/internal/core/instance-resolver.d.mts.map +1 -0
- package/lib/browser/internal/core/instance-resolver.mjs +306 -0
- package/lib/browser/internal/core/instance-resolver.mjs.map +1 -0
- package/lib/browser/internal/core/name-resolver.d.mts +52 -0
- package/lib/browser/internal/core/name-resolver.d.mts.map +1 -0
- package/lib/browser/internal/core/name-resolver.mjs +118 -0
- package/lib/browser/internal/core/name-resolver.mjs.map +1 -0
- package/lib/browser/internal/core/scope-tracker.d.mts +65 -0
- package/lib/browser/internal/core/scope-tracker.d.mts.map +1 -0
- package/lib/browser/internal/core/scope-tracker.mjs +120 -0
- package/lib/browser/internal/core/scope-tracker.mjs.map +1 -0
- package/lib/browser/internal/core/service-initializer.d.mts +44 -0
- package/lib/browser/internal/core/service-initializer.d.mts.map +1 -0
- package/lib/browser/internal/core/service-initializer.mjs +109 -0
- package/lib/browser/internal/core/service-initializer.mjs.map +1 -0
- package/lib/browser/internal/core/service-invalidator.d.mts +81 -0
- package/lib/browser/internal/core/service-invalidator.d.mts.map +1 -0
- package/lib/browser/internal/core/service-invalidator.mjs +142 -0
- package/lib/browser/internal/core/service-invalidator.mjs.map +1 -0
- package/lib/browser/internal/core/token-resolver.d.mts +54 -0
- package/lib/browser/internal/core/token-resolver.d.mts.map +1 -0
- package/lib/browser/internal/core/token-resolver.mjs +77 -0
- package/lib/browser/internal/core/token-resolver.mjs.map +1 -0
- package/lib/browser/internal/holder/holder-storage.interface.d.mts +99 -0
- package/lib/browser/internal/holder/holder-storage.interface.d.mts.map +1 -0
- package/lib/browser/internal/holder/instance-holder.d.mts +101 -0
- package/lib/browser/internal/holder/instance-holder.d.mts.map +1 -0
- package/lib/browser/internal/holder/instance-holder.mjs +19 -0
- package/lib/browser/internal/holder/instance-holder.mjs.map +1 -0
- package/lib/browser/internal/holder/unified-storage.d.mts +53 -0
- package/lib/browser/internal/holder/unified-storage.d.mts.map +1 -0
- package/lib/browser/internal/holder/unified-storage.mjs +144 -0
- package/lib/browser/internal/holder/unified-storage.mjs.map +1 -0
- package/lib/browser/internal/lifecycle/circular-detector.d.mts +39 -0
- package/lib/browser/internal/lifecycle/circular-detector.d.mts.map +1 -0
- package/lib/browser/internal/lifecycle/circular-detector.mjs +55 -0
- package/lib/browser/internal/lifecycle/circular-detector.mjs.map +1 -0
- package/lib/browser/internal/lifecycle/lifecycle-event-bus.d.mts +18 -0
- package/lib/browser/internal/lifecycle/lifecycle-event-bus.d.mts.map +1 -0
- package/lib/browser/internal/lifecycle/lifecycle-event-bus.mjs +43 -0
- package/lib/browser/internal/lifecycle/lifecycle-event-bus.mjs.map +1 -0
- package/lib/browser/internal/stub-factory-class.d.mts +14 -0
- package/lib/browser/internal/stub-factory-class.d.mts.map +1 -0
- package/lib/browser/internal/stub-factory-class.mjs +18 -0
- package/lib/browser/internal/stub-factory-class.mjs.map +1 -0
- package/lib/browser/symbols/injectable-token.d.mts +5 -0
- package/lib/browser/symbols/injectable-token.d.mts.map +1 -0
- package/lib/browser/symbols/injectable-token.mjs +6 -0
- package/lib/browser/symbols/injectable-token.mjs.map +1 -0
- package/lib/browser/token/injection-token.d.mts +55 -0
- package/lib/browser/token/injection-token.d.mts.map +1 -0
- package/lib/browser/token/injection-token.mjs +100 -0
- package/lib/browser/token/injection-token.mjs.map +1 -0
- package/lib/browser/token/registry.d.mts +37 -0
- package/lib/browser/token/registry.d.mts.map +1 -0
- package/lib/browser/token/registry.mjs +86 -0
- package/lib/browser/token/registry.mjs.map +1 -0
- package/lib/browser/utils/default-injectors.d.mts +12 -0
- package/lib/browser/utils/default-injectors.d.mts.map +1 -0
- package/lib/browser/utils/default-injectors.mjs +13 -0
- package/lib/browser/utils/default-injectors.mjs.map +1 -0
- package/lib/browser/utils/get-injectable-token.d.mts +9 -0
- package/lib/browser/utils/get-injectable-token.d.mts.map +1 -0
- package/lib/browser/utils/get-injectable-token.mjs +13 -0
- package/lib/browser/utils/get-injectable-token.mjs.map +1 -0
- package/lib/browser/utils/get-injectors.d.mts +55 -0
- package/lib/browser/utils/get-injectors.d.mts.map +1 -0
- package/lib/browser/utils/get-injectors.mjs +121 -0
- package/lib/browser/utils/get-injectors.mjs.map +1 -0
- package/lib/browser/utils/types.d.mts +23 -0
- package/lib/browser/utils/types.d.mts.map +1 -0
- package/lib/{container-DAKOvAgr.mjs → container-8-z89TyQ.mjs} +1325 -1462
- package/lib/container-8-z89TyQ.mjs.map +1 -0
- package/lib/{container-Bp1W-pWJ.d.mts → container-CNiqesCL.d.mts} +598 -617
- package/lib/container-CNiqesCL.d.mts.map +1 -0
- package/lib/{container-DENMeJ87.cjs → container-CaY2fDuk.cjs} +1369 -1512
- package/lib/container-CaY2fDuk.cjs.map +1 -0
- package/lib/{container-YPwvmlK2.d.cts → container-D-0Ho3qL.d.cts} +598 -612
- package/lib/container-D-0Ho3qL.d.cts.map +1 -0
- package/lib/index.cjs +13 -15
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +58 -223
- package/lib/index.d.cts.map +1 -1
- package/lib/index.d.mts +62 -222
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +5 -6
- package/lib/index.mjs.map +1 -1
- package/lib/testing/index.cjs +569 -311
- package/lib/testing/index.cjs.map +1 -1
- package/lib/testing/index.d.cts +370 -41
- package/lib/testing/index.d.cts.map +1 -1
- package/lib/testing/index.d.mts +370 -41
- package/lib/testing/index.d.mts.map +1 -1
- package/lib/testing/index.mjs +568 -305
- package/lib/testing/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/__tests__/circular-detector.spec.mts +193 -0
- package/src/__tests__/concurrent.spec.mts +368 -0
- package/src/__tests__/container.spec.mts +32 -30
- package/src/__tests__/di-error.spec.mts +351 -0
- package/src/__tests__/e2e.browser.spec.mts +0 -4
- package/src/__tests__/e2e.spec.mts +10 -19
- package/src/__tests__/event-emitter.spec.mts +232 -109
- package/src/__tests__/get-injectors.spec.mts +250 -39
- package/src/__tests__/injection-token.spec.mts +293 -349
- package/src/__tests__/library-findings.spec.mts +8 -8
- package/src/__tests__/registry.spec.mts +358 -210
- package/src/__tests__/resolution-context.spec.mts +255 -0
- package/src/__tests__/scope-tracker.spec.mts +598 -0
- package/src/__tests__/scope-upgrade.spec.mts +808 -0
- package/src/__tests__/scoped-container.spec.mts +595 -0
- package/src/__tests__/test-container.spec.mts +293 -0
- package/src/__tests__/token-resolver.spec.mts +207 -0
- package/src/__tests__/unified-storage.spec.mts +535 -0
- package/src/__tests__/unit-test-container.spec.mts +405 -0
- package/src/__type-tests__/container.spec-d.mts +180 -0
- package/src/__type-tests__/factory.spec-d.mts +15 -3
- package/src/__type-tests__/inject.spec-d.mts +115 -20
- package/src/__type-tests__/injectable.spec-d.mts +69 -52
- package/src/__type-tests__/injection-token.spec-d.mts +176 -0
- package/src/__type-tests__/scoped-container.spec-d.mts +212 -0
- package/src/container/abstract-container.mts +327 -0
- package/src/container/container.mts +142 -170
- package/src/container/scoped-container.mts +126 -208
- package/src/decorators/factory.decorator.mts +16 -11
- package/src/decorators/injectable.decorator.mts +20 -16
- package/src/enums/index.mts +2 -2
- package/src/enums/injectable-scope.enum.mts +1 -0
- package/src/enums/injectable-type.enum.mts +1 -0
- package/src/errors/di-error.mts +96 -0
- package/src/event-emitter.mts +3 -27
- package/src/index.mts +6 -153
- package/src/interfaces/container.interface.mts +13 -0
- package/src/interfaces/factory.interface.mts +1 -1
- package/src/interfaces/index.mts +1 -1
- package/src/internal/context/async-local-storage.mts +3 -2
- package/src/internal/context/async-local-storage.types.mts +1 -0
- package/src/internal/context/factory-context.mts +1 -0
- package/src/internal/context/index.mts +3 -1
- package/src/internal/context/resolution-context.mts +1 -0
- package/src/internal/context/service-initialization-context.mts +43 -0
- package/src/internal/core/index.mts +5 -4
- package/src/internal/core/instance-resolver.mts +460 -302
- package/src/internal/core/name-resolver.mts +196 -0
- package/src/internal/core/scope-tracker.mts +242 -0
- package/src/internal/core/{instantiator.mts → service-initializer.mts} +51 -29
- package/src/internal/core/service-invalidator.mts +290 -0
- package/src/internal/core/token-resolver.mts +122 -0
- package/src/internal/holder/holder-storage.interface.mts +11 -5
- package/src/internal/holder/index.mts +2 -5
- package/src/internal/holder/instance-holder.mts +1 -3
- package/src/internal/holder/unified-storage.mts +245 -0
- package/src/internal/index.mts +2 -1
- package/src/internal/lifecycle/circular-detector.mts +1 -0
- package/src/internal/lifecycle/index.mts +1 -1
- package/src/internal/lifecycle/lifecycle-event-bus.mts +1 -0
- package/src/internal/stub-factory-class.mts +16 -0
- package/src/symbols/injectable-token.mts +3 -1
- package/src/testing/index.mts +2 -0
- package/src/testing/test-container.mts +546 -85
- package/src/testing/types.mts +117 -0
- package/src/testing/unit-test-container.mts +509 -0
- package/src/token/injection-token.mts +41 -4
- package/src/token/registry.mts +75 -9
- package/src/utils/default-injectors.mts +16 -0
- package/src/utils/get-injectable-token.mts +2 -3
- package/src/utils/get-injectors.mts +26 -15
- package/src/utils/index.mts +3 -1
- package/src/utils/types.mts +1 -0
- package/tsdown.config.mts +11 -1
- package/lib/browser/index.d.mts.map +0 -1
- package/lib/browser/index.mjs.map +0 -1
- package/lib/container-Bp1W-pWJ.d.mts.map +0 -1
- package/lib/container-DAKOvAgr.mjs.map +0 -1
- package/lib/container-DENMeJ87.cjs.map +0 -1
- package/lib/container-YPwvmlK2.d.cts.map +0 -1
- package/src/__tests__/async-local-storage.browser.spec.mts +0 -166
- package/src/__tests__/async-local-storage.spec.mts +0 -333
- package/src/__tests__/errors.spec.mts +0 -87
- package/src/__tests__/factory.spec.mts +0 -137
- package/src/__tests__/injectable.spec.mts +0 -246
- package/src/__tests__/request-scope.spec.mts +0 -416
- package/src/__tests__/service-instantiator.spec.mts +0 -410
- package/src/__tests__/service-locator-event-bus.spec.mts +0 -242
- package/src/__tests__/service-locator-manager.spec.mts +0 -300
- package/src/__tests__/service-locator.spec.mts +0 -966
- package/src/__tests__/unified-api.spec.mts +0 -130
- package/src/browser.mts +0 -11
- package/src/injectors.mts +0 -18
- package/src/internal/context/request-context.mts +0 -225
- package/src/internal/core/invalidator.mts +0 -437
- package/src/internal/core/service-locator.mts +0 -202
- package/src/internal/core/token-processor.mts +0 -252
- package/src/internal/holder/base-holder-manager.mts +0 -334
- package/src/internal/holder/holder-manager.mts +0 -85
- package/src/internal/holder/request-storage.mts +0 -127
- package/src/internal/holder/singleton-storage.mts +0 -92
- package/src/testing/README.md +0 -80
- package/src/testing/__tests__/test-container.spec.mts +0 -173
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import type { z, ZodType } from 'zod/v4'
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Factorable } from '../interfaces/factory.interface.mjs'
|
|
4
4
|
import type {
|
|
5
|
-
BoundInjectionToken,
|
|
6
5
|
ClassType,
|
|
7
6
|
ClassTypeWithArgument,
|
|
8
7
|
FactoryInjectionToken,
|
|
9
|
-
InjectionToken,
|
|
10
8
|
InjectionTokenSchemaType,
|
|
11
9
|
} from '../token/injection-token.mjs'
|
|
12
|
-
import type { IContainer } from '../interfaces/container.interface.mjs'
|
|
13
|
-
import type { IHolderStorage } from '../internal/holder/holder-storage.interface.mjs'
|
|
14
|
-
import type { Factorable } from '../interfaces/factory.interface.mjs'
|
|
15
10
|
import type { Registry } from '../token/registry.mjs'
|
|
16
|
-
import type { RequestContext } from '../internal/context/request-context.mjs'
|
|
17
|
-
import type { InstanceHolder } from '../internal/holder/instance-holder.mjs'
|
|
18
11
|
import type { Join, UnionToArray } from '../utils/types.mjs'
|
|
12
|
+
import type { NameResolver } from '../internal/core/name-resolver.mjs'
|
|
13
|
+
import type { ServiceInvalidator } from '../internal/core/service-invalidator.mjs'
|
|
14
|
+
import type { TokenResolver } from '../internal/core/token-resolver.mjs'
|
|
19
15
|
|
|
20
|
-
import { BaseHolderManager } from '../internal/holder/base-holder-manager.mjs'
|
|
21
16
|
import { InjectableScope } from '../enums/index.mjs'
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
import { UnifiedStorage } from '../internal/holder/unified-storage.mjs'
|
|
18
|
+
import {
|
|
19
|
+
BoundInjectionToken,
|
|
20
|
+
InjectionToken,
|
|
21
|
+
} from '../token/injection-token.mjs'
|
|
22
|
+
import { AbstractContainer } from './abstract-container.mjs'
|
|
23
|
+
import { Container } from './container.mjs'
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* Request-scoped dependency injection container.
|
|
@@ -32,45 +30,53 @@ import { InstanceStatus } from '../internal/holder/instance-holder.mjs'
|
|
|
32
30
|
* This design eliminates race conditions that can occur with async operations
|
|
33
31
|
* when multiple requests are processed concurrently.
|
|
34
32
|
*/
|
|
35
|
-
export class ScopedContainer
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
export class ScopedContainer extends AbstractContainer {
|
|
34
|
+
protected readonly defaultScope = InjectableScope.Request
|
|
35
|
+
|
|
36
|
+
private readonly storage: UnifiedStorage
|
|
38
37
|
private disposed = false
|
|
38
|
+
private readonly metadata: Record<string, any>
|
|
39
39
|
|
|
40
40
|
constructor(
|
|
41
41
|
private readonly parent: Container,
|
|
42
42
|
private readonly registry: Registry,
|
|
43
43
|
public readonly requestId: string,
|
|
44
44
|
metadata?: Record<string, any>,
|
|
45
|
-
priority: number = 100,
|
|
46
45
|
) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
)
|
|
52
|
-
// Create storage once and reuse for all resolutions
|
|
53
|
-
this.holderStorage = new RequestStorage(
|
|
54
|
-
this.requestContextHolder,
|
|
55
|
-
this.parent.getServiceLocator().getManager(),
|
|
56
|
-
)
|
|
46
|
+
super()
|
|
47
|
+
// Create own unified storage for request-scoped services
|
|
48
|
+
this.storage = new UnifiedStorage(InjectableScope.Request)
|
|
49
|
+
this.metadata = metadata || {}
|
|
57
50
|
}
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// ABSTRACT METHOD IMPLEMENTATIONS - Delegate to parent
|
|
54
|
+
// ============================================================================
|
|
55
|
+
|
|
56
|
+
getStorage(): UnifiedStorage {
|
|
57
|
+
return this.storage
|
|
64
58
|
}
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return this.
|
|
60
|
+
protected getRegistry(): Registry {
|
|
61
|
+
return this.registry
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
protected getTokenResolver(): TokenResolver {
|
|
65
|
+
return this.parent.getTokenResolver()
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
protected getNameResolver(): NameResolver {
|
|
69
|
+
return this.parent.getNameResolver()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
protected getServiceInvalidator(): ServiceInvalidator {
|
|
73
|
+
return this.parent.getServiceInvalidator()
|
|
72
74
|
}
|
|
73
75
|
|
|
76
|
+
// ============================================================================
|
|
77
|
+
// SCOPED CONTAINER SPECIFIC METHODS
|
|
78
|
+
// ============================================================================
|
|
79
|
+
|
|
74
80
|
/**
|
|
75
81
|
* Gets the request ID for this scoped container.
|
|
76
82
|
*/
|
|
@@ -89,26 +95,19 @@ export class ScopedContainer implements IContainer {
|
|
|
89
95
|
* Gets metadata from the request context.
|
|
90
96
|
*/
|
|
91
97
|
getMetadata(key: string): any | undefined {
|
|
92
|
-
return this.
|
|
98
|
+
return this.metadata[key]
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
/**
|
|
96
102
|
* Sets metadata on the request context.
|
|
97
103
|
*/
|
|
98
104
|
setMetadata(key: string, value: any): void {
|
|
99
|
-
this.
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Adds a pre-prepared instance to the request context.
|
|
104
|
-
*/
|
|
105
|
-
addInstance(token: InjectionToken<any, undefined>, instance: any): void {
|
|
106
|
-
this.requestContextHolder.addInstance(token, instance)
|
|
105
|
+
this.metadata[key] = value
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* Gets an instance from the container.
|
|
111
|
-
* Request-scoped services are resolved from this container's
|
|
110
|
+
* Request-scoped services are resolved from this container's storage.
|
|
112
111
|
* All other services are delegated to the parent container.
|
|
113
112
|
*/
|
|
114
113
|
// #1 Simple class
|
|
@@ -150,207 +149,126 @@ export class ScopedContainer implements IContainer {
|
|
|
150
149
|
| BoundInjectionToken<any, any>
|
|
151
150
|
| FactoryInjectionToken<any, any>,
|
|
152
151
|
args?: unknown,
|
|
153
|
-
)
|
|
152
|
+
) {
|
|
154
153
|
if (this.disposed) {
|
|
155
|
-
throw
|
|
156
|
-
`ScopedContainer for request ${this.requestId} has been disposed`,
|
|
157
|
-
)
|
|
154
|
+
throw new Error('ScopedContainer has been disposed')
|
|
158
155
|
}
|
|
159
156
|
|
|
160
|
-
// Get the actual injection token using TokenProcessor for consistency
|
|
161
|
-
const tokenProcessor = this.parent.getServiceLocator().getTokenProcessor()
|
|
162
|
-
const actualToken = tokenProcessor.normalizeToken(token)
|
|
163
|
-
|
|
164
157
|
// Check if this is a request-scoped service
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
158
|
+
const tokenResolver = this.getTokenResolver()
|
|
159
|
+
const realToken = tokenResolver.getRegistryToken(token)
|
|
168
160
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
161
|
+
if (this.registry.has(realToken)) {
|
|
162
|
+
const record = this.registry.get(realToken)
|
|
163
|
+
if (record.scope === InjectableScope.Request) {
|
|
164
|
+
// Resolve request-scoped service from this container
|
|
165
|
+
const [error, instance] = await this.parent
|
|
166
|
+
.getInstanceResolver()
|
|
167
|
+
.resolveRequestScopedInstance(token, args, this)
|
|
173
168
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const holder = this.holderStorage.findByInstance(service)
|
|
181
|
-
if (holder) {
|
|
182
|
-
// Use the shared Invalidator with our request-scoped storage
|
|
183
|
-
await this.parent
|
|
184
|
-
.getServiceLocator()
|
|
185
|
-
.getInvalidator()
|
|
186
|
-
.invalidateWithStorage(holder.name, this.holderStorage, 1, {
|
|
187
|
-
emitEvents: false, // Request-scoped services don't emit global events
|
|
188
|
-
})
|
|
189
|
-
return
|
|
169
|
+
if (error) {
|
|
170
|
+
throw error
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return instance
|
|
174
|
+
}
|
|
190
175
|
}
|
|
191
176
|
|
|
192
|
-
// Delegate to parent
|
|
193
|
-
await this.parent
|
|
194
|
-
|
|
177
|
+
// Delegate singleton/transient services to parent
|
|
178
|
+
const [error, instance] = await this.parent
|
|
179
|
+
.getInstanceResolver()
|
|
180
|
+
.resolveInstance(token, args, this, this.storage, this.requestId)
|
|
195
181
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
isRegistered(token: any): boolean {
|
|
200
|
-
return this.parent.isRegistered(token)
|
|
201
|
-
}
|
|
182
|
+
if (error) {
|
|
183
|
+
throw error
|
|
184
|
+
}
|
|
202
185
|
|
|
203
|
-
|
|
204
|
-
* Disposes this scoped container and cleans up all request-scoped instances.
|
|
205
|
-
* This is an alias for endRequest() for IContainer compatibility.
|
|
206
|
-
*/
|
|
207
|
-
async dispose(): Promise<void> {
|
|
208
|
-
await this.endRequest()
|
|
186
|
+
return instance
|
|
209
187
|
}
|
|
210
188
|
|
|
211
189
|
/**
|
|
212
|
-
*
|
|
213
|
-
* Uses the invalidation system to properly cascade to dependent singletons.
|
|
190
|
+
* Invalidates a service and its dependencies.
|
|
214
191
|
*/
|
|
215
|
-
async
|
|
216
|
-
|
|
217
|
-
|
|
192
|
+
async invalidate(service: unknown): Promise<void> {
|
|
193
|
+
// Find the service by instance in request storage
|
|
194
|
+
const holder = this.storage.findByInstance(service)
|
|
195
|
+
if (!holder) {
|
|
196
|
+
// Try parent storage
|
|
197
|
+
return this.parent.invalidate(service)
|
|
218
198
|
}
|
|
219
199
|
|
|
220
|
-
this.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
await this.parent
|
|
225
|
-
.getServiceLocator()
|
|
226
|
-
.getInvalidator()
|
|
227
|
-
.clearAllWithStorage(this.holderStorage, {
|
|
228
|
-
waitForSettlement: true,
|
|
229
|
-
maxRounds: 10,
|
|
230
|
-
})
|
|
231
|
-
|
|
232
|
-
// Clear the context (any remaining holders that weren't invalidated)
|
|
233
|
-
this.requestContextHolder.clear()
|
|
234
|
-
|
|
235
|
-
// Remove from parent's active requests
|
|
236
|
-
this.parent.removeActiveRequest(this.requestId)
|
|
200
|
+
await this.getServiceInvalidator().invalidateWithStorage(
|
|
201
|
+
holder.name,
|
|
202
|
+
this.storage,
|
|
203
|
+
)
|
|
237
204
|
}
|
|
238
205
|
|
|
239
206
|
/**
|
|
240
|
-
*
|
|
207
|
+
* Disposes the container and cleans up all resources.
|
|
208
|
+
* Alias for endRequest().
|
|
241
209
|
*/
|
|
242
|
-
async
|
|
243
|
-
|
|
210
|
+
async dispose(): Promise<void> {
|
|
211
|
+
return this.endRequest()
|
|
244
212
|
}
|
|
245
213
|
|
|
246
214
|
/**
|
|
247
215
|
* @internal
|
|
248
|
-
* Attempts to get an instance synchronously if it already exists
|
|
249
|
-
*
|
|
250
|
-
* For other services, delegates to the parent container.
|
|
251
|
-
*
|
|
252
|
-
* Returns null if the instance doesn't exist or is not yet ready (still creating).
|
|
216
|
+
* Attempts to get an instance synchronously if it already exists.
|
|
217
|
+
* Checks request storage first, then delegates to parent.
|
|
253
218
|
*/
|
|
254
|
-
tryGetSync<T>(token: any, args?: any): T | null {
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
219
|
+
override tryGetSync<T>(token: any, args?: any): T | null {
|
|
220
|
+
// Check request storage first for request-scoped services
|
|
221
|
+
const tokenResolver = this.getTokenResolver()
|
|
222
|
+
const realToken = tokenResolver.getRegistryToken(token)
|
|
223
|
+
const scope = this.registry.has(realToken)
|
|
224
|
+
? this.registry.get(realToken).scope
|
|
225
|
+
: InjectableScope.Singleton
|
|
226
|
+
|
|
227
|
+
if (scope === InjectableScope.Request) {
|
|
228
|
+
const result = this.tryGetSyncFromStorage<T>(
|
|
229
|
+
token,
|
|
230
|
+
args,
|
|
231
|
+
this.storage,
|
|
232
|
+
this.requestId,
|
|
233
|
+
)
|
|
234
|
+
if (result !== null) {
|
|
235
|
+
return result
|
|
269
236
|
}
|
|
270
|
-
return null
|
|
271
237
|
}
|
|
272
238
|
|
|
273
|
-
// Delegate to parent for
|
|
274
|
-
return this.parent.tryGetSync(token, args)
|
|
239
|
+
// Delegate to parent for singleton/transient
|
|
240
|
+
return this.parent.tryGetSync<T>(token, args, this.requestId)
|
|
275
241
|
}
|
|
276
242
|
|
|
277
243
|
/**
|
|
278
|
-
*
|
|
244
|
+
* Adds an instance to the container.
|
|
245
|
+
* Overrides base class to check disposed state.
|
|
279
246
|
*/
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
return false
|
|
247
|
+
override addInstance<T>(
|
|
248
|
+
token: ClassType | InjectionToken<T, any> | BoundInjectionToken<T, any>,
|
|
249
|
+
instance: T,
|
|
250
|
+
): void {
|
|
251
|
+
if (this.disposed) {
|
|
252
|
+
throw new Error('ScopedContainer has been disposed')
|
|
287
253
|
}
|
|
288
254
|
|
|
289
|
-
|
|
290
|
-
return record.scope === InjectableScope.Request
|
|
255
|
+
super.addInstance(token, instance)
|
|
291
256
|
}
|
|
292
257
|
|
|
293
258
|
/**
|
|
294
|
-
*
|
|
295
|
-
* Uses locking to prevent duplicate initialization during concurrent resolution.
|
|
259
|
+
* Ends the request and cleans up all request-scoped services.
|
|
296
260
|
*/
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const instanceName = serviceLocator.getInstanceIdentifier(token, args)
|
|
301
|
-
|
|
302
|
-
// Check if we already have this instance (or one is being created)
|
|
303
|
-
const existingHolder = this.requestContextHolder.get(instanceName)
|
|
304
|
-
if (existingHolder) {
|
|
305
|
-
// If the holder is in error state, remove it so we can retry
|
|
306
|
-
if (existingHolder.status === InstanceStatus.Error) {
|
|
307
|
-
this.requestContextHolder.delete(instanceName)
|
|
308
|
-
// Fall through to create a new instance
|
|
309
|
-
} else {
|
|
310
|
-
// Wait for the holder to be ready if it's still being created
|
|
311
|
-
// This prevents race conditions where multiple concurrent calls
|
|
312
|
-
// might try to create the same service
|
|
313
|
-
const [error, readyHolder] =
|
|
314
|
-
await BaseHolderManager.waitForHolderReady(existingHolder)
|
|
315
|
-
if (error) {
|
|
316
|
-
throw error
|
|
317
|
-
}
|
|
318
|
-
return readyHolder.instance
|
|
319
|
-
}
|
|
261
|
+
async endRequest(): Promise<void> {
|
|
262
|
+
if (this.disposed) {
|
|
263
|
+
return
|
|
320
264
|
}
|
|
321
265
|
|
|
322
|
-
|
|
323
|
-
// but store it in our request context
|
|
324
|
-
return this.parent.resolveForRequest(token, args, this)
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Stores an instance in the request context.
|
|
329
|
-
* Called by Container during request-scoped service resolution.
|
|
330
|
-
*/
|
|
331
|
-
storeRequestInstance(
|
|
332
|
-
instanceName: string,
|
|
333
|
-
instance: any,
|
|
334
|
-
holder: InstanceHolder,
|
|
335
|
-
): void {
|
|
336
|
-
this.requestContextHolder.addInstance(instanceName, instance, holder)
|
|
337
|
-
}
|
|
266
|
+
this.disposed = true
|
|
338
267
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
* Called by Container during resolution to check for existing instances.
|
|
342
|
-
*/
|
|
343
|
-
getRequestInstance(
|
|
344
|
-
instanceName: string,
|
|
345
|
-
): InstanceHolder | undefined {
|
|
346
|
-
return this.requestContextHolder.get(instanceName)
|
|
347
|
-
}
|
|
268
|
+
// Clear all request-scoped services
|
|
269
|
+
await this.getServiceInvalidator().clearAllWithStorage(this.storage)
|
|
348
270
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
* Format: {requestId}:{instanceName}
|
|
352
|
-
*/
|
|
353
|
-
getPrefixedEventName(instanceName: string): string {
|
|
354
|
-
return `${this.requestId}:${instanceName}`
|
|
271
|
+
// Remove request ID from parent
|
|
272
|
+
this.parent.removeRequestId(this.requestId)
|
|
355
273
|
}
|
|
356
274
|
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
+
import type { Factorable, FactorableWithArgs } from '../interfaces/index.mjs'
|
|
1
2
|
import type {
|
|
2
3
|
ClassTypeWithInstance,
|
|
3
4
|
InjectionTokenSchemaType,
|
|
4
5
|
} from '../token/injection-token.mjs'
|
|
5
|
-
import type { Factorable, FactorableWithArgs } from '../interfaces/index.mjs'
|
|
6
6
|
import type { Registry } from '../token/registry.mjs'
|
|
7
7
|
|
|
8
8
|
import { InjectableScope, InjectableType } from '../enums/index.mjs'
|
|
9
|
+
import { InjectableTokenMeta } from '../symbols/index.mjs'
|
|
9
10
|
import { InjectionToken } from '../token/injection-token.mjs'
|
|
10
11
|
import { globalRegistry } from '../token/registry.mjs'
|
|
11
|
-
import { InjectableTokenMeta } from '../symbols/index.mjs'
|
|
12
12
|
|
|
13
13
|
export interface FactoryOptions {
|
|
14
14
|
scope?: InjectableScope
|
|
15
15
|
token?: InjectionToken<any, any>
|
|
16
16
|
registry?: Registry
|
|
17
|
+
priority?: number
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
// #1 Factory without arguments
|
|
20
21
|
export function Factory<R>(options?: {
|
|
21
22
|
scope?: InjectableScope
|
|
22
23
|
registry?: Registry
|
|
24
|
+
priority?: number
|
|
23
25
|
}): <T extends ClassTypeWithInstance<Factorable<R>>>(
|
|
24
26
|
target: T,
|
|
25
27
|
context?: ClassDecoratorContext,
|
|
@@ -30,24 +32,26 @@ export function Factory<R, S>(options: {
|
|
|
30
32
|
scope?: InjectableScope
|
|
31
33
|
token: InjectionToken<R, S>
|
|
32
34
|
registry?: Registry
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
priority?: number
|
|
36
|
+
}): R extends undefined
|
|
37
|
+
? never
|
|
38
|
+
: S extends InjectionTokenSchemaType
|
|
39
|
+
? <T extends ClassTypeWithInstance<FactorableWithArgs<R, S>>>(
|
|
37
40
|
target: T,
|
|
38
41
|
context?: ClassDecoratorContext,
|
|
39
42
|
) => T
|
|
40
|
-
: S extends undefined
|
|
41
|
-
? <T extends ClassTypeWithInstance<Factorable<R>>>(
|
|
43
|
+
: S extends undefined
|
|
44
|
+
? <T extends ClassTypeWithInstance<Factorable<R>>>(
|
|
42
45
|
target: T,
|
|
43
46
|
context?: ClassDecoratorContext,
|
|
44
47
|
) => T
|
|
45
|
-
: never
|
|
48
|
+
: never
|
|
46
49
|
|
|
47
50
|
export function Factory({
|
|
48
51
|
scope = InjectableScope.Singleton,
|
|
49
52
|
token,
|
|
50
53
|
registry = globalRegistry,
|
|
54
|
+
priority = 0,
|
|
51
55
|
}: FactoryOptions = {}) {
|
|
52
56
|
return <
|
|
53
57
|
T extends ClassTypeWithInstance<
|
|
@@ -62,14 +66,14 @@ export function Factory({
|
|
|
62
66
|
(target instanceof Function && !context)
|
|
63
67
|
) {
|
|
64
68
|
throw new Error(
|
|
65
|
-
'[
|
|
69
|
+
'[DI] @Factory decorator can only be used on classes.',
|
|
66
70
|
)
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
let injectableToken: InjectionToken<any, any> =
|
|
70
74
|
token ?? InjectionToken.create(target)
|
|
71
75
|
|
|
72
|
-
registry.set(injectableToken, scope, target, InjectableType.Factory)
|
|
76
|
+
registry.set(injectableToken, scope, target, InjectableType.Factory, priority)
|
|
73
77
|
|
|
74
78
|
// @ts-expect-error
|
|
75
79
|
target[InjectableTokenMeta] = injectableToken
|
|
@@ -77,3 +81,4 @@ export function Factory({
|
|
|
77
81
|
return target
|
|
78
82
|
}
|
|
79
83
|
}
|
|
84
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod/v4'
|
|
1
|
+
import type { z } from 'zod/v4'
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
BaseInjectionTokenSchemaType,
|
|
@@ -15,16 +15,18 @@ import type {
|
|
|
15
15
|
import type { Registry } from '../token/registry.mjs'
|
|
16
16
|
|
|
17
17
|
import { InjectableScope, InjectableType } from '../enums/index.mjs'
|
|
18
|
+
import { InjectableTokenMeta } from '../symbols/index.mjs'
|
|
18
19
|
import { InjectionToken } from '../token/injection-token.mjs'
|
|
19
20
|
import { globalRegistry } from '../token/registry.mjs'
|
|
20
|
-
import { InjectableTokenMeta } from '../symbols/index.mjs'
|
|
21
21
|
|
|
22
22
|
export interface InjectableOptions {
|
|
23
23
|
scope?: InjectableScope
|
|
24
24
|
token?: InjectionToken<any, any>
|
|
25
25
|
schema?: InjectionTokenSchemaType
|
|
26
26
|
registry?: Registry
|
|
27
|
+
priority?: number
|
|
27
28
|
}
|
|
29
|
+
|
|
28
30
|
// #1 Simple constructorless class
|
|
29
31
|
export function Injectable(): <T extends ClassTypeWithoutArguments>(
|
|
30
32
|
target: T,
|
|
@@ -33,12 +35,14 @@ export function Injectable(): <T extends ClassTypeWithoutArguments>(
|
|
|
33
35
|
export function Injectable(options: {
|
|
34
36
|
scope?: InjectableScope
|
|
35
37
|
registry: Registry
|
|
38
|
+
priority?: number
|
|
36
39
|
}): <T extends ClassTypeWithoutArguments>(
|
|
37
40
|
target: T,
|
|
38
41
|
context?: ClassDecoratorContext,
|
|
39
42
|
) => T
|
|
40
43
|
export function Injectable(options: {
|
|
41
44
|
scope: InjectableScope
|
|
45
|
+
priority?: number
|
|
42
46
|
}): <T extends ClassTypeWithoutArguments>(
|
|
43
47
|
target: T,
|
|
44
48
|
context?: ClassDecoratorContext,
|
|
@@ -48,6 +52,7 @@ export function Injectable<Schema extends InjectionTokenSchemaType>(options: {
|
|
|
48
52
|
scope?: InjectableScope
|
|
49
53
|
schema: Schema
|
|
50
54
|
registry?: Registry
|
|
55
|
+
priority?: number
|
|
51
56
|
}): <T extends ClassTypeWithArgument<z.output<Schema>>>(
|
|
52
57
|
target: T,
|
|
53
58
|
context?: ClassDecoratorContext,
|
|
@@ -58,24 +63,24 @@ export function Injectable<Type, Schema>(options: {
|
|
|
58
63
|
scope?: InjectableScope
|
|
59
64
|
token: InjectionToken<Type, Schema>
|
|
60
65
|
registry?: Registry
|
|
61
|
-
|
|
66
|
+
priority?: number
|
|
67
|
+
}): Schema extends BaseInjectionTokenSchemaType
|
|
62
68
|
? Type extends undefined
|
|
63
|
-
? <T extends ClassTypeWithArgument<z.output<Schema>>>(
|
|
69
|
+
? <T extends ClassTypeWithArgument<z.output<Schema>>>(
|
|
64
70
|
target: T,
|
|
65
71
|
context?: ClassDecoratorContext,
|
|
66
72
|
) => T
|
|
67
|
-
: <T extends ClassTypeWithInstanceAndArgument<Type, z.output<Schema>>>(
|
|
73
|
+
: <T extends ClassTypeWithInstanceAndArgument<Type, z.output<Schema>>>(
|
|
68
74
|
target: T,
|
|
69
75
|
context?: ClassDecoratorContext,
|
|
70
76
|
) => T
|
|
71
|
-
: Schema extends OptionalInjectionTokenSchemaType
|
|
77
|
+
: Schema extends OptionalInjectionTokenSchemaType
|
|
72
78
|
? Type extends undefined
|
|
73
|
-
? <T extends ClassTypeWithOptionalArgument<z.output<Schema>>>(
|
|
79
|
+
? <T extends ClassTypeWithOptionalArgument<z.output<Schema>>>(
|
|
74
80
|
target: T,
|
|
75
81
|
context?: ClassDecoratorContext,
|
|
76
82
|
) => T
|
|
77
83
|
: <
|
|
78
|
-
// #3.2.2 Typed token
|
|
79
84
|
T extends ClassTypeWithInstanceAndOptionalArgument<
|
|
80
85
|
Type,
|
|
81
86
|
z.output<Schema>
|
|
@@ -84,18 +89,19 @@ export function Injectable<Type, Schema>(options: {
|
|
|
84
89
|
target: T,
|
|
85
90
|
context?: ClassDecoratorContext,
|
|
86
91
|
) => T
|
|
87
|
-
: Schema extends undefined
|
|
88
|
-
? <R extends ClassTypeWithInstance<Type>>(
|
|
92
|
+
: Schema extends undefined
|
|
93
|
+
? <R extends ClassTypeWithInstance<Type>>(
|
|
89
94
|
target: R,
|
|
90
95
|
context?: ClassDecoratorContext,
|
|
91
96
|
) => R
|
|
92
|
-
: never
|
|
97
|
+
: never
|
|
93
98
|
|
|
94
99
|
export function Injectable({
|
|
95
100
|
scope = InjectableScope.Singleton,
|
|
96
101
|
token,
|
|
97
102
|
schema,
|
|
98
103
|
registry = globalRegistry,
|
|
104
|
+
priority = 0,
|
|
99
105
|
}: InjectableOptions = {}) {
|
|
100
106
|
return <T extends ClassType>(
|
|
101
107
|
target: T,
|
|
@@ -105,19 +111,17 @@ export function Injectable({
|
|
|
105
111
|
(context && context.kind !== 'class') ||
|
|
106
112
|
(target instanceof Function && !context)
|
|
107
113
|
) {
|
|
108
|
-
throw new Error(
|
|
109
|
-
'[ServiceLocator] @Injectable decorator can only be used on classes.',
|
|
110
|
-
)
|
|
114
|
+
throw new Error('[DI] @Injectable decorator can only be used on classes.')
|
|
111
115
|
}
|
|
112
116
|
if (schema && token) {
|
|
113
117
|
throw new Error(
|
|
114
|
-
'[
|
|
118
|
+
'[DI] @Injectable decorator cannot have both a token and a schema',
|
|
115
119
|
)
|
|
116
120
|
}
|
|
117
121
|
let injectableToken: InjectionToken<any, any> =
|
|
118
122
|
token ?? InjectionToken.create(target, schema as InjectionTokenSchemaType)
|
|
119
123
|
|
|
120
|
-
registry.set(injectableToken, scope, target, InjectableType.Class)
|
|
124
|
+
registry.set(injectableToken, scope, target, InjectableType.Class, priority)
|
|
121
125
|
|
|
122
126
|
// @ts-expect-error
|
|
123
127
|
target[InjectableTokenMeta] = injectableToken
|
package/src/enums/index.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { InjectableScope } from './injectable-scope.enum.mjs'
|
|
2
|
+
export { InjectableType } from './injectable-type.enum.mjs'
|