@celljs/core 4.1.0 → 4.2.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/README.md +49 -62
- package/esm/browser/static-module.d.ts +1 -1
- package/esm/common/annotation/aspect.d.ts +2 -1
- package/esm/common/annotation/aspect.js.map +1 -1
- package/esm/common/annotation/autowired-provider.d.ts +0 -2
- package/esm/common/annotation/autowired-provider.js +4 -13
- package/esm/common/annotation/autowired-provider.js.map +1 -1
- package/esm/common/annotation/autowired.d.ts +1 -1
- package/esm/common/annotation/autowired.js +11 -3
- package/esm/common/annotation/autowired.js.map +1 -1
- package/esm/common/annotation/component.d.ts +4 -8
- package/esm/common/annotation/component.js +0 -6
- package/esm/common/annotation/component.js.map +1 -1
- package/esm/common/annotation/constant.d.ts +1 -1
- package/esm/common/annotation/constant.js +6 -3
- package/esm/common/annotation/constant.js.map +1 -1
- package/esm/common/annotation/detached/autowired-provider.js +2 -2
- package/esm/common/annotation/detached/autowired-provider.js.map +1 -1
- package/esm/common/annotation/index.d.ts +0 -6
- package/esm/common/annotation/index.js +0 -6
- package/esm/common/annotation/index.js.map +1 -1
- package/esm/common/annotation/named.d.ts +2 -1
- package/esm/common/annotation/named.js +5 -1
- package/esm/common/annotation/named.js.map +1 -1
- package/esm/common/annotation/optional.d.ts +2 -1
- package/esm/common/annotation/optional.js +5 -1
- package/esm/common/annotation/optional.js.map +1 -1
- package/esm/common/annotation/post-construct.d.ts +2 -1
- package/esm/common/annotation/post-construct.js +5 -1
- package/esm/common/annotation/post-construct.js.map +1 -1
- package/esm/common/annotation/tagged.d.ts +2 -1
- package/esm/common/annotation/tagged.js +6 -1
- package/esm/common/annotation/tagged.js.map +1 -1
- package/esm/common/annotation/value.d.ts +3 -2
- package/esm/common/annotation/value.js +7 -10
- package/esm/common/annotation/value.js.map +1 -1
- package/esm/common/aop/aop-proxy-factory.d.ts +6 -2
- package/esm/common/aop/aop-proxy-factory.js +44 -28
- package/esm/common/aop/aop-proxy-factory.js.map +1 -1
- package/esm/common/aop/class-filter.js +6 -6
- package/esm/common/aop/class-filter.js.map +1 -1
- package/esm/common/application/application-factory.d.ts +1 -1
- package/esm/common/application/application-factory.js +4 -4
- package/esm/common/application/application-factory.js.map +1 -1
- package/esm/common/container/auto-bind.d.ts +7 -3
- package/esm/common/container/auto-bind.js +49 -80
- package/esm/common/container/auto-bind.js.map +1 -1
- package/esm/common/container/container-error.d.ts +21 -0
- package/esm/common/container/container-error.js +22 -0
- package/esm/common/container/container-error.js.map +1 -0
- package/esm/common/container/container-provider.d.ts +5 -4
- package/esm/common/container/container-provider.js +2 -1
- package/esm/common/container/container-provider.js.map +1 -1
- package/esm/common/container/container-util.d.ts +5 -7
- package/esm/common/container/container-util.js +8 -19
- package/esm/common/container/container-util.js.map +1 -1
- package/esm/common/container/container.d.ts +104 -0
- package/esm/common/container/container.js +299 -0
- package/esm/common/container/container.js.map +1 -0
- package/esm/common/container/dynamic-container.d.ts +1 -1
- package/esm/common/container/dynamic-container.js +2 -2
- package/esm/common/container/dynamic-container.js.map +1 -1
- package/esm/common/container/index.d.ts +5 -6
- package/esm/common/container/index.js +5 -3
- package/esm/common/container/index.js.map +1 -1
- package/esm/common/container/injection.d.ts +40 -0
- package/esm/common/container/injection.js +109 -0
- package/esm/common/container/injection.js.map +1 -0
- package/esm/common/container/scope.d.ts +2 -3
- package/esm/common/container/scope.js +2 -3
- package/esm/common/container/scope.js.map +1 -1
- package/esm/common/el/application-expression-engine.d.ts +7 -0
- package/esm/common/{provider/provider-creator.js → el/application-expression-engine.js} +11 -11
- package/esm/common/el/application-expression-engine.js.map +1 -0
- package/esm/common/el/core-context-initializer.d.ts +3 -2
- package/esm/common/el/core-context-initializer.js +10 -8
- package/esm/common/el/core-context-initializer.js.map +1 -1
- package/esm/common/el/expression-compiler.d.ts +5 -4
- package/esm/common/el/expression-compiler.js +7 -6
- package/esm/common/el/expression-compiler.js.map +1 -1
- package/esm/common/el/expression-engine.d.ts +61 -0
- package/esm/common/el/expression-engine.js +459 -0
- package/esm/common/el/expression-engine.js.map +1 -0
- package/esm/common/el/expression-handler.d.ts +1 -2
- package/esm/common/el/expression-handler.js +1 -5
- package/esm/common/el/expression-handler.js.map +1 -1
- package/esm/common/el/expression-protocol.d.ts +3 -5
- package/esm/common/el/expression-protocol.js +0 -1
- package/esm/common/el/expression-protocol.js.map +1 -1
- package/esm/common/el/expression-util.d.ts +9 -8
- package/esm/common/el/expression-util.js +8 -9
- package/esm/common/el/expression-util.js.map +1 -1
- package/esm/common/el/index.d.ts +2 -1
- package/esm/common/el/index.js +2 -1
- package/esm/common/el/index.js.map +1 -1
- package/esm/common/provider/index.d.ts +0 -1
- package/esm/common/provider/index.js +0 -1
- package/esm/common/provider/index.js.map +1 -1
- package/esm/common/provider/provider-protocol.d.ts +5 -9
- package/esm/common/provider/provider-protocol.js +0 -1
- package/esm/common/provider/provider-protocol.js.map +1 -1
- package/esm/common/provider/provider-util.d.ts +1 -1
- package/esm/common/provider/provider-util.js +2 -2
- package/esm/common/provider/provider-util.js.map +1 -1
- package/esm/common/provider/provider.d.ts +7 -6
- package/esm/common/provider/provider.js +15 -26
- package/esm/common/provider/provider.js.map +1 -1
- package/esm/common/static-module.d.ts +1 -1
- package/esm/common/static-module.js +1 -1
- package/esm/common/static-module.js.map +1 -1
- package/esm/common/test/mock-logger.js +2 -13
- package/esm/common/test/mock-logger.js.map +1 -1
- package/esm/common/test/test-module.d.ts +1 -1
- package/esm/common/test/test-module.js +1 -1
- package/esm/common/test/test-module.js.map +1 -1
- package/esm/common/utils/annotation-util.js +2 -1
- package/esm/common/utils/annotation-util.js.map +1 -1
- package/esm/common/utils/proxy-util.d.ts +5 -2
- package/esm/common/utils/proxy-util.js +10 -28
- package/esm/common/utils/proxy-util.js.map +1 -1
- package/esm/node/static-module.d.ts +1 -1
- package/lib/browser/static-module.d.ts +1 -1
- package/lib/common/annotation/aspect.d.ts +2 -1
- package/lib/common/annotation/aspect.d.ts.map +1 -1
- package/lib/common/annotation/aspect.js.map +1 -1
- package/lib/common/annotation/autowired-provider.d.ts +0 -2
- package/lib/common/annotation/autowired-provider.d.ts.map +1 -1
- package/lib/common/annotation/autowired-provider.js +4 -14
- package/lib/common/annotation/autowired-provider.js.map +1 -1
- package/lib/common/annotation/autowired.d.ts +1 -1
- package/lib/common/annotation/autowired.d.ts.map +1 -1
- package/lib/common/annotation/autowired.js +11 -3
- package/lib/common/annotation/autowired.js.map +1 -1
- package/lib/common/annotation/component.d.ts +4 -8
- package/lib/common/annotation/component.d.ts.map +1 -1
- package/lib/common/annotation/component.js +0 -6
- package/lib/common/annotation/component.js.map +1 -1
- package/lib/common/annotation/constant.d.ts +1 -1
- package/lib/common/annotation/constant.d.ts.map +1 -1
- package/lib/common/annotation/constant.js +6 -3
- package/lib/common/annotation/constant.js.map +1 -1
- package/lib/common/annotation/detached/autowired-provider.js +2 -2
- package/lib/common/annotation/detached/autowired-provider.js.map +1 -1
- package/lib/common/annotation/index.d.ts +0 -6
- package/lib/common/annotation/index.d.ts.map +1 -1
- package/lib/common/annotation/index.js +0 -6
- package/lib/common/annotation/index.js.map +1 -1
- package/lib/common/annotation/named.d.ts +2 -1
- package/lib/common/annotation/named.d.ts.map +1 -1
- package/lib/common/annotation/named.js +6 -2
- package/lib/common/annotation/named.js.map +1 -1
- package/lib/common/annotation/optional.d.ts +2 -1
- package/lib/common/annotation/optional.d.ts.map +1 -1
- package/lib/common/annotation/optional.js +6 -2
- package/lib/common/annotation/optional.js.map +1 -1
- package/lib/common/annotation/post-construct.d.ts +2 -1
- package/lib/common/annotation/post-construct.d.ts.map +1 -1
- package/lib/common/annotation/post-construct.js +6 -2
- package/lib/common/annotation/post-construct.js.map +1 -1
- package/lib/common/annotation/tagged.d.ts +2 -1
- package/lib/common/annotation/tagged.d.ts.map +1 -1
- package/lib/common/annotation/tagged.js +7 -2
- package/lib/common/annotation/tagged.js.map +1 -1
- package/lib/common/annotation/value.d.ts +3 -2
- package/lib/common/annotation/value.d.ts.map +1 -1
- package/lib/common/annotation/value.js +7 -10
- package/lib/common/annotation/value.js.map +1 -1
- package/lib/common/aop/aop-proxy-factory.d.ts +6 -2
- package/lib/common/aop/aop-proxy-factory.d.ts.map +1 -1
- package/lib/common/aop/aop-proxy-factory.js +45 -29
- package/lib/common/aop/aop-proxy-factory.js.map +1 -1
- package/lib/common/aop/class-filter.js +7 -7
- package/lib/common/aop/class-filter.js.map +1 -1
- package/lib/common/application/application-factory.d.ts +1 -1
- package/lib/common/application/application-factory.d.ts.map +1 -1
- package/lib/common/application/application-factory.js +4 -4
- package/lib/common/application/application-factory.js.map +1 -1
- package/lib/common/container/assembly.spec.js +11 -11
- package/lib/common/container/assembly.spec.js.map +1 -1
- package/lib/common/container/auto-bind.d.ts +7 -3
- package/lib/common/container/auto-bind.d.ts.map +1 -1
- package/lib/common/container/auto-bind.js +49 -81
- package/lib/common/container/auto-bind.js.map +1 -1
- package/lib/common/container/container-error.d.ts +22 -0
- package/lib/common/container/container-error.d.ts.map +1 -0
- package/lib/common/container/container-error.js +26 -0
- package/lib/common/container/container-error.js.map +1 -0
- package/lib/common/container/container-provider.d.ts +5 -4
- package/lib/common/container/container-provider.d.ts.map +1 -1
- package/lib/common/container/container-provider.js +3 -2
- package/lib/common/container/container-provider.js.map +1 -1
- package/lib/common/container/container-util.d.ts +5 -7
- package/lib/common/container/container-util.d.ts.map +1 -1
- package/lib/common/container/container-util.js +8 -19
- package/lib/common/container/container-util.js.map +1 -1
- package/lib/common/container/container.d.ts +105 -0
- package/lib/common/container/container.d.ts.map +1 -0
- package/lib/common/container/container.js +305 -0
- package/lib/common/container/container.js.map +1 -0
- package/lib/common/container/container.spec.d.ts +2 -0
- package/lib/common/container/container.spec.d.ts.map +1 -0
- package/lib/common/container/container.spec.js +334 -0
- package/lib/common/container/container.spec.js.map +1 -0
- package/lib/common/container/dynamic-container.d.ts +1 -1
- package/lib/common/container/dynamic-container.d.ts.map +1 -1
- package/lib/common/container/dynamic-container.js +3 -3
- package/lib/common/container/dynamic-container.js.map +1 -1
- package/lib/common/container/index.d.ts +5 -6
- package/lib/common/container/index.d.ts.map +1 -1
- package/lib/common/container/index.js +5 -3
- package/lib/common/container/index.js.map +1 -1
- package/lib/common/container/injection.d.ts +41 -0
- package/lib/common/container/injection.d.ts.map +1 -0
- package/lib/common/container/injection.js +112 -0
- package/lib/common/container/injection.js.map +1 -0
- package/lib/common/container/scope.d.ts +2 -3
- package/lib/common/container/scope.d.ts.map +1 -1
- package/lib/common/container/scope.js +2 -3
- package/lib/common/container/scope.js.map +1 -1
- package/lib/common/el/application-expression-engine.d.ts +8 -0
- package/lib/common/el/application-expression-engine.d.ts.map +1 -0
- package/lib/common/el/application-expression-engine.js +22 -0
- package/lib/common/el/application-expression-engine.js.map +1 -0
- package/lib/common/el/core-context-initializer.d.ts +3 -2
- package/lib/common/el/core-context-initializer.d.ts.map +1 -1
- package/lib/common/el/core-context-initializer.js +9 -7
- package/lib/common/el/core-context-initializer.js.map +1 -1
- package/lib/common/el/expression-compiler.d.ts +5 -4
- package/lib/common/el/expression-compiler.d.ts.map +1 -1
- package/lib/common/el/expression-compiler.js +6 -5
- package/lib/common/el/expression-compiler.js.map +1 -1
- package/lib/common/el/expression-engine.d.ts +62 -0
- package/lib/common/el/expression-engine.d.ts.map +1 -0
- package/lib/common/el/expression-engine.js +465 -0
- package/lib/common/el/expression-engine.js.map +1 -0
- package/lib/common/el/expression-engine.spec.d.ts +2 -0
- package/lib/common/el/expression-engine.spec.d.ts.map +1 -0
- package/lib/common/el/expression-engine.spec.js +100 -0
- package/lib/common/el/expression-engine.spec.js.map +1 -0
- package/lib/common/el/expression-handler.d.ts +1 -2
- package/lib/common/el/expression-handler.d.ts.map +1 -1
- package/lib/common/el/expression-handler.js +0 -4
- package/lib/common/el/expression-handler.js.map +1 -1
- package/lib/common/el/expression-handler.spec.js +5 -6
- package/lib/common/el/expression-handler.spec.js.map +1 -1
- package/lib/common/el/expression-protocol.d.ts +3 -5
- package/lib/common/el/expression-protocol.d.ts.map +1 -1
- package/lib/common/el/expression-protocol.js +1 -2
- package/lib/common/el/expression-protocol.js.map +1 -1
- package/lib/common/el/expression-util.d.ts +9 -8
- package/lib/common/el/expression-util.d.ts.map +1 -1
- package/lib/common/el/expression-util.js +8 -9
- package/lib/common/el/expression-util.js.map +1 -1
- package/lib/common/el/index.d.ts +2 -1
- package/lib/common/el/index.d.ts.map +1 -1
- package/lib/common/el/index.js +2 -1
- package/lib/common/el/index.js.map +1 -1
- package/lib/common/el/value-and-el.spec.js +2 -2
- package/lib/common/el/value-and-el.spec.js.map +1 -1
- package/lib/common/provider/index.d.ts +0 -1
- package/lib/common/provider/index.d.ts.map +1 -1
- package/lib/common/provider/index.js +0 -1
- package/lib/common/provider/index.js.map +1 -1
- package/lib/common/provider/provider-protocol.d.ts +5 -9
- package/lib/common/provider/provider-protocol.d.ts.map +1 -1
- package/lib/common/provider/provider-protocol.js +1 -2
- package/lib/common/provider/provider-protocol.js.map +1 -1
- package/lib/common/provider/provider-util.d.ts +1 -1
- package/lib/common/provider/provider-util.d.ts.map +1 -1
- package/lib/common/provider/provider-util.js +2 -2
- package/lib/common/provider/provider-util.js.map +1 -1
- package/lib/common/provider/provider.d.ts +7 -6
- package/lib/common/provider/provider.d.ts.map +1 -1
- package/lib/common/provider/provider.js +16 -26
- package/lib/common/provider/provider.js.map +1 -1
- package/lib/common/static-module.d.ts +1 -1
- package/lib/common/static-module.js +2 -2
- package/lib/common/static-module.js.map +1 -1
- package/lib/common/test/mock-logger.d.ts.map +1 -1
- package/lib/common/test/mock-logger.js +2 -12
- package/lib/common/test/mock-logger.js.map +1 -1
- package/lib/common/test/test-module.d.ts +1 -1
- package/lib/common/test/test-module.d.ts.map +1 -1
- package/lib/common/test/test-module.js +2 -2
- package/lib/common/test/test-module.js.map +1 -1
- package/lib/common/utils/annotation-util.js +2 -1
- package/lib/common/utils/annotation-util.js.map +1 -1
- package/lib/common/utils/proxy-util.d.ts +5 -2
- package/lib/common/utils/proxy-util.d.ts.map +1 -1
- package/lib/common/utils/proxy-util.js +12 -30
- package/lib/common/utils/proxy-util.js.map +1 -1
- package/lib/node/static-module.d.ts +1 -1
- package/package.json +4 -6
- package/src/common/annotation/aspect.ts +2 -1
- package/src/common/annotation/autowired-provider.ts +4 -17
- package/src/common/annotation/autowired.ts +14 -6
- package/src/common/annotation/component.ts +6 -26
- package/src/common/annotation/constant.ts +10 -7
- package/src/common/annotation/detached/autowired-provider.ts +2 -2
- package/src/common/annotation/index.ts +0 -6
- package/src/common/annotation/named.ts +7 -1
- package/src/common/annotation/optional.ts +6 -1
- package/src/common/annotation/post-construct.ts +6 -1
- package/src/common/annotation/tagged.ts +8 -1
- package/src/common/annotation/value.ts +9 -11
- package/src/common/aop/aop-proxy-factory.ts +52 -30
- package/src/common/aop/class-filter.ts +6 -6
- package/src/common/application/application-factory.ts +4 -5
- package/src/common/container/assembly.spec.ts +7 -12
- package/src/common/container/auto-bind.ts +54 -85
- package/src/common/container/container-error.ts +31 -0
- package/src/common/container/container-provider.ts +9 -7
- package/src/common/container/container-util.ts +8 -19
- package/src/common/container/container.spec.ts +262 -0
- package/src/common/container/container.ts +363 -0
- package/src/common/container/dynamic-container.ts +2 -2
- package/src/common/container/index.ts +5 -7
- package/src/common/container/injection.ts +135 -0
- package/src/common/container/scope.ts +2 -1
- package/src/common/el/application-expression-engine.ts +9 -0
- package/src/common/el/core-context-initializer.ts +9 -8
- package/src/common/el/expression-compiler.ts +7 -6
- package/src/common/el/expression-engine.spec.ts +107 -0
- package/src/common/el/expression-engine.ts +487 -0
- package/src/common/el/expression-handler.spec.ts +6 -7
- package/src/common/el/expression-handler.ts +2 -5
- package/src/common/el/expression-protocol.ts +4 -8
- package/src/common/el/expression-util.ts +12 -13
- package/src/common/el/index.ts +3 -2
- package/src/common/el/value-and-el.spec.ts +2 -2
- package/src/common/provider/index.ts +0 -2
- package/src/common/provider/provider-protocol.ts +5 -11
- package/src/common/provider/provider-util.ts +3 -3
- package/src/common/provider/provider.ts +17 -29
- package/src/common/static-module.ts +1 -1
- package/src/common/test/mock-logger.ts +0 -2
- package/src/common/test/test-module.ts +1 -1
- package/src/common/utils/annotation-util.ts +2 -2
- package/src/common/utils/proxy-util.ts +8 -28
- package/esm/common/annotation/decorate.d.ts +0 -1
- package/esm/common/annotation/decorate.js +0 -2
- package/esm/common/annotation/decorate.js.map +0 -1
- package/esm/common/annotation/inject.d.ts +0 -1
- package/esm/common/annotation/inject.js +0 -2
- package/esm/common/annotation/inject.js.map +0 -1
- package/esm/common/annotation/injectable.d.ts +0 -1
- package/esm/common/annotation/injectable.js +0 -2
- package/esm/common/annotation/injectable.js.map +0 -1
- package/esm/common/annotation/pre-destroy.d.ts +0 -1
- package/esm/common/annotation/pre-destroy.js +0 -2
- package/esm/common/annotation/pre-destroy.js.map +0 -1
- package/esm/common/annotation/target-name.d.ts +0 -1
- package/esm/common/annotation/target-name.js +0 -2
- package/esm/common/annotation/target-name.js.map +0 -1
- package/esm/common/annotation/unmanaged.d.ts +0 -1
- package/esm/common/annotation/unmanaged.js +0 -2
- package/esm/common/annotation/unmanaged.js.map +0 -1
- package/esm/common/container/container-factory.d.ts +0 -4
- package/esm/common/container/container-factory.js +0 -9
- package/esm/common/container/container-factory.js.map +0 -1
- package/esm/common/el/jexl-engine-provider.d.ts +0 -5
- package/esm/common/el/jexl-engine-provider.js +0 -22
- package/esm/common/el/jexl-engine-provider.js.map +0 -1
- package/esm/common/provider/provider-creator.d.ts +0 -6
- package/esm/common/provider/provider-creator.js.map +0 -1
- package/lib/common/annotation/decorate.d.ts +0 -2
- package/lib/common/annotation/decorate.d.ts.map +0 -1
- package/lib/common/annotation/decorate.js +0 -6
- package/lib/common/annotation/decorate.js.map +0 -1
- package/lib/common/annotation/inject.d.ts +0 -2
- package/lib/common/annotation/inject.d.ts.map +0 -1
- package/lib/common/annotation/inject.js +0 -6
- package/lib/common/annotation/inject.js.map +0 -1
- package/lib/common/annotation/injectable.d.ts +0 -2
- package/lib/common/annotation/injectable.d.ts.map +0 -1
- package/lib/common/annotation/injectable.js +0 -6
- package/lib/common/annotation/injectable.js.map +0 -1
- package/lib/common/annotation/pre-destroy.d.ts +0 -2
- package/lib/common/annotation/pre-destroy.d.ts.map +0 -1
- package/lib/common/annotation/pre-destroy.js +0 -6
- package/lib/common/annotation/pre-destroy.js.map +0 -1
- package/lib/common/annotation/target-name.d.ts +0 -2
- package/lib/common/annotation/target-name.d.ts.map +0 -1
- package/lib/common/annotation/target-name.js +0 -6
- package/lib/common/annotation/target-name.js.map +0 -1
- package/lib/common/annotation/unmanaged.d.ts +0 -2
- package/lib/common/annotation/unmanaged.d.ts.map +0 -1
- package/lib/common/annotation/unmanaged.js +0 -6
- package/lib/common/annotation/unmanaged.js.map +0 -1
- package/lib/common/container/container-factory.d.ts +0 -5
- package/lib/common/container/container-factory.d.ts.map +0 -1
- package/lib/common/container/container-factory.js +0 -13
- package/lib/common/container/container-factory.js.map +0 -1
- package/lib/common/el/jexl-engine-provider.d.ts +0 -6
- package/lib/common/el/jexl-engine-provider.d.ts.map +0 -1
- package/lib/common/el/jexl-engine-provider.js +0 -25
- package/lib/common/el/jexl-engine-provider.js.map +0 -1
- package/lib/common/provider/provider-creator.d.ts +0 -7
- package/lib/common/provider/provider-creator.d.ts.map +0 -1
- package/lib/common/provider/provider-creator.js +0 -22
- package/lib/common/provider/provider-creator.js.map +0 -1
- package/src/common/annotation/decorate.ts +0 -1
- package/src/common/annotation/inject.ts +0 -1
- package/src/common/annotation/injectable.ts +0 -1
- package/src/common/annotation/pre-destroy.ts +0 -1
- package/src/common/annotation/target-name.ts +0 -1
- package/src/common/annotation/unmanaged.ts +0 -1
- package/src/common/container/container-factory.ts +0 -9
- package/src/common/el/jexl-engine-provider.ts +0 -18
- package/src/common/provider/provider-creator.ts +0 -12
|
@@ -1,54 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ContainerProvider } from '../container';
|
|
1
|
+
import { PROXY_TARGET } from '../utils/proxy-util';
|
|
2
|
+
import { ContainerProvider } from '../container/container-provider';
|
|
3
|
+
import type { ComponentId } from '../container/container';
|
|
3
4
|
import { AfterReturningAdvice, AfterThrowsAdvice, AopProxy, AopProxyFactory, AOP_TAG, MethodBeforeAdvice, ProxyConfig } from './aop-protocol';
|
|
4
5
|
import { Component } from '../annotation';
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
interface Advices {
|
|
8
|
+
before: MethodBeforeAdvice[];
|
|
9
|
+
afterReturning: AfterReturningAdvice[];
|
|
10
|
+
afterThrows: AfterThrowsAdvice[];
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
@Component({ id: AopProxyFactory, proxy: false })
|
|
8
14
|
export class AopProxyFactoryImpl implements AopProxyFactory {
|
|
9
15
|
|
|
10
|
-
protected getAdvices<T>(id:
|
|
16
|
+
protected getAdvices<T>(id: ComponentId<T>, tagValues: string[]): T[] {
|
|
11
17
|
const container = ContainerProvider.provide();
|
|
12
18
|
const advices: T[] = [];
|
|
13
19
|
for (const tagValue of tagValues) {
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
const query = { tags: { [AOP_TAG]: tagValue } };
|
|
21
|
+
if (container.isBound(id, query)) {
|
|
22
|
+
advices.push(...container.getAll<T>(id, query));
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
return advices;
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Methods become async: they await the before advices, the method, then the after advices. The
|
|
30
|
+
* advices are looked up on the first call and the wrapped methods are created once per method.
|
|
31
|
+
*/
|
|
21
32
|
create(config: ProxyConfig): AopProxy {
|
|
22
33
|
const { metadata: { sysTags } } = config;
|
|
34
|
+
let advices: Advices | undefined;
|
|
35
|
+
const getAdvices = () => advices ??= {
|
|
36
|
+
before: this.getAdvices<MethodBeforeAdvice>(MethodBeforeAdvice, sysTags),
|
|
37
|
+
afterReturning: this.getAdvices<AfterReturningAdvice>(AfterReturningAdvice, sysTags),
|
|
38
|
+
afterThrows: this.getAdvices<AfterThrowsAdvice>(AfterThrowsAdvice, sysTags)
|
|
39
|
+
};
|
|
40
|
+
const wrappers = new Map<PropertyKey, { func: Function, wrapper: Function }>();
|
|
23
41
|
const proxy = new Proxy(config.target, {
|
|
24
|
-
get: (target, method
|
|
25
|
-
if (
|
|
42
|
+
get: (target, method) => {
|
|
43
|
+
if (method === PROXY_TARGET) {
|
|
26
44
|
return target;
|
|
27
45
|
}
|
|
28
46
|
const func = target[method];
|
|
29
|
-
if (typeof func
|
|
30
|
-
return
|
|
31
|
-
try {
|
|
32
|
-
const beforeAdvices = this.getAdvices<MethodBeforeAdvice>(MethodBeforeAdvice, sysTags!);
|
|
33
|
-
for (const advice of beforeAdvices) {
|
|
34
|
-
await advice.before(method, args, target);
|
|
35
|
-
}
|
|
36
|
-
const returnValue = await func.apply(target, args);
|
|
37
|
-
const afterReturningAdvices = this.getAdvices<AfterReturningAdvice>(AfterReturningAdvice, sysTags!);
|
|
38
|
-
for (const advice of afterReturningAdvices) {
|
|
39
|
-
await advice.afterReturning(returnValue, method, args, target);
|
|
40
|
-
}
|
|
41
|
-
return returnValue;
|
|
42
|
-
} catch (error) {
|
|
43
|
-
const afterThrowsAdvices = this.getAdvices<AfterThrowsAdvice>(AfterThrowsAdvice, sysTags!);
|
|
44
|
-
for (const advice of afterThrowsAdvices) {
|
|
45
|
-
await advice.afterThrows(error, method, args, target);
|
|
46
|
-
}
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
47
|
+
if (typeof func !== 'function') {
|
|
48
|
+
return func;
|
|
50
49
|
}
|
|
51
|
-
|
|
50
|
+
const cached = wrappers.get(method);
|
|
51
|
+
if (cached && cached.func === func) {
|
|
52
|
+
return cached.wrapper;
|
|
53
|
+
}
|
|
54
|
+
const wrapper = async (...args: any[]) => {
|
|
55
|
+
const { before, afterReturning, afterThrows } = getAdvices();
|
|
56
|
+
try {
|
|
57
|
+
for (const advice of before) {
|
|
58
|
+
await advice.before(method, args, target);
|
|
59
|
+
}
|
|
60
|
+
const returnValue = await func.apply(target, args);
|
|
61
|
+
for (const advice of afterReturning) {
|
|
62
|
+
await advice.afterReturning(returnValue, method, args, target);
|
|
63
|
+
}
|
|
64
|
+
return returnValue;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
for (const advice of afterThrows) {
|
|
67
|
+
await advice.afterThrows(error, method, args, target);
|
|
68
|
+
}
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
wrappers.set(method, { func, wrapper });
|
|
73
|
+
return wrapper;
|
|
52
74
|
}
|
|
53
75
|
});
|
|
54
76
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Newable } from '../utils';
|
|
2
|
-
import { ContainerProvider } from '../container';
|
|
2
|
+
import { ContainerProvider } from '../container/container-provider';
|
|
3
3
|
import { AfterReturningAdvice, AfterThrowsAdvice, AOP_TAG, ClassFilter, MethodBeforeAdvice } from './aop-protocol';
|
|
4
4
|
import { Component, ComponentMetadata } from '../annotation';
|
|
5
5
|
|
|
@@ -8,11 +8,11 @@ export class ClassFilterImpl implements ClassFilter {
|
|
|
8
8
|
|
|
9
9
|
matches(clazz: Newable<any>, metadata: ComponentMetadata): boolean {
|
|
10
10
|
const container = ContainerProvider.provide();
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
if (container.
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
for (const tagValue of metadata.sysTags) {
|
|
12
|
+
const query = { tags: { [AOP_TAG]: tagValue } };
|
|
13
|
+
if (container.isBound(MethodBeforeAdvice, query)
|
|
14
|
+
|| container.isBound(AfterThrowsAdvice, query)
|
|
15
|
+
|| container.isBound(AfterReturningAdvice, query)) {
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -6,15 +6,14 @@ import './application-state';
|
|
|
6
6
|
import { autoBind } from '../container/auto-bind';
|
|
7
7
|
import commonModule from '../static-module';
|
|
8
8
|
import { currentThis } from '../utils';
|
|
9
|
-
import { ContainerModule } from '
|
|
10
|
-
import { ContainerFactory } from '../container/container-factory';
|
|
9
|
+
import { Container, ContainerModule } from '../container/container';
|
|
11
10
|
|
|
12
11
|
export class ApplicationFactory {
|
|
13
12
|
static async create(applicationProps: ApplicationProps, ...modules: ContainerModule[]): Promise<Application> {
|
|
14
13
|
currentThis.cellProps = applicationProps;
|
|
15
|
-
const container =
|
|
14
|
+
const container = new Container();
|
|
15
|
+
container.load(commonModule, autoBind(), ...modules);
|
|
16
16
|
ContainerProvider.set(container);
|
|
17
|
-
|
|
18
|
-
return application;
|
|
17
|
+
return container.get<Application>(Application);
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -156,8 +156,8 @@ describe('core 组件装配', () => {
|
|
|
156
156
|
await boot();
|
|
157
157
|
const c = ContainerUtil.get(Consumer);
|
|
158
158
|
expect([c.redis.kind, c.eu.kind, c.fallback.kind]).to.deep.equal(['redis', 'eu', 'memory']);
|
|
159
|
-
expect(ContainerUtil.
|
|
160
|
-
expect(ContainerUtil.
|
|
159
|
+
expect(ContainerUtil.get<{ kind: string }>(Store, { name: 'redis' })).to.equal(ContainerUtil.get(RedisStore));
|
|
160
|
+
expect(ContainerUtil.get<{ kind: string }>(Store, { tags: { region: 'eu' } })).to.equal(ContainerUtil.get(EuStore));
|
|
161
161
|
expect(ContainerUtil.get(Store)).to.equal(ContainerUtil.get(MemoryStore));
|
|
162
162
|
});
|
|
163
163
|
|
|
@@ -174,19 +174,14 @@ describe('core 组件装配', () => {
|
|
|
174
174
|
expect([DefaultMailer, CustomMailer]).to.have.length(2);
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
it('
|
|
177
|
+
it('同一批 autoBind 里也可以 rebind 本批先定义的组件(按定义顺序登记)', async () => {
|
|
178
178
|
const Mailer = Symbol('SameBatchMailer');
|
|
179
179
|
@Component(Mailer)
|
|
180
|
-
class DefaultMailer { }
|
|
180
|
+
class DefaultMailer { readonly who = 'default'; }
|
|
181
181
|
@Component({ id: Mailer, rebind: true })
|
|
182
|
-
class CustomMailer { }
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
await boot();
|
|
186
|
-
} catch (e) {
|
|
187
|
-
error = e as Error;
|
|
188
|
-
}
|
|
189
|
-
expect(error?.message).to.match(/unbind.*SameBatchMailer/i);
|
|
182
|
+
class CustomMailer { readonly who = 'custom'; }
|
|
183
|
+
await boot();
|
|
184
|
+
expect(ContainerUtil.getAll<{ who: string }>(Mailer).map(m => m.who)).to.deep.equal(['custom']);
|
|
190
185
|
expect([DefaultMailer, CustomMailer]).to.have.length(2);
|
|
191
186
|
});
|
|
192
187
|
|
|
@@ -1,114 +1,83 @@
|
|
|
1
|
-
import { interfaces, ContainerModule } from 'inversify';
|
|
2
1
|
import { METADATA_KEY } from '../constants';
|
|
3
|
-
import { ComponentMetadata, ConstantOption } from '../annotation';
|
|
2
|
+
import type { ComponentMetadata, ConstantOption } from '../annotation';
|
|
4
3
|
import { ConfigUtil } from '../config/config-util';
|
|
5
4
|
import { AopProxyFactory, ClassFilter } from '../aop/aop-protocol';
|
|
6
|
-
import {
|
|
5
|
+
import { Binding, ComponentId, Container, ContainerModule, ContainerModuleRegistry } from './container';
|
|
7
6
|
import { Scope } from './scope';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
return new ContainerModule((bind, unbind, isBound, rebind, ...rest) => {
|
|
11
|
-
if (registry) {
|
|
12
|
-
registry(bind, unbind, isBound, rebind, ...rest);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
8
|
+
type Bind = <T>(id: ComponentId<T>) => Binding<T>;
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
/**
|
|
11
|
+
* A module of the components registered (`@Component`, `@Constant` and the decorators built on them)
|
|
12
|
+
* since the previous `autoBind()`, in the order they were defined; `registry` adds bindings by hand.
|
|
13
|
+
* A DI module file imports its components, then exports `autoBind()`.
|
|
14
|
+
*/
|
|
15
|
+
export function autoBind(registry?: ContainerModuleRegistry): ContainerModule {
|
|
16
|
+
const components: ComponentMetadata[] = Reflect.getMetadata(METADATA_KEY.component, Reflect) || [];
|
|
17
|
+
const constants: ConstantOption[] = Reflect.getMetadata(METADATA_KEY.constantValue, Reflect) || [];
|
|
20
18
|
Reflect.defineMetadata(METADATA_KEY.component, [], Reflect);
|
|
21
19
|
Reflect.defineMetadata(METADATA_KEY.constantValue, [], Reflect);
|
|
22
|
-
return new ContainerModule((bind, unbind, isBound, rebind
|
|
23
|
-
for (
|
|
24
|
-
|
|
25
|
-
resolve(metadata, bind, rebind);
|
|
20
|
+
return new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
21
|
+
for (const metadata of components) {
|
|
22
|
+
bindComponent(metadata, bind, rebind);
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (registry) {
|
|
30
|
-
registry(bind, unbind, isBound, rebind, ...rest);
|
|
24
|
+
for (const metadata of constants) {
|
|
25
|
+
bindConstant(metadata, bind, rebind);
|
|
31
26
|
}
|
|
27
|
+
registry?.(bind, unbind, isBound, rebind);
|
|
32
28
|
});
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (target.constructor && classFilter.matches(target.constructor, metadata)) {
|
|
40
|
-
const aopProxyFactory = ContainerUtil.get<AopProxyFactory>(AopProxyFactory);
|
|
41
|
-
return aopProxyFactory.create({
|
|
42
|
-
target,
|
|
43
|
-
metadata
|
|
44
|
-
}).getProxy();
|
|
31
|
+
function proxyIfNeeded(container: Container, metadata: ComponentMetadata, instance: any) {
|
|
32
|
+
if (ConfigUtil.getRaw().cell?.aop?.enabled && instance?.constructor) {
|
|
33
|
+
if (container.get<ClassFilter>(ClassFilter).matches(instance.constructor, metadata)) {
|
|
34
|
+
return container.get<AopProxyFactory>(AopProxyFactory).create({ target: instance, metadata }).getProxy();
|
|
45
35
|
}
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
return target;
|
|
37
|
+
return instance;
|
|
49
38
|
}
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
mid = rebind(id2 || id).to(target);
|
|
59
|
-
} else {
|
|
60
|
-
mid = bind(id).to(target);
|
|
61
|
-
}
|
|
40
|
+
/**
|
|
41
|
+
* The first identifier (the class itself unless the decorator says otherwise) is bound to the class,
|
|
42
|
+
* the others resolve to it. `rebind` replaces the bindings of the first other identifier.
|
|
43
|
+
*/
|
|
44
|
+
function bindComponent(metadata: ComponentMetadata, bind: Bind, rebind: Bind): void {
|
|
45
|
+
const { ids: [primary, ...aliases], scope, name, tag, proxy, onActivation, target } = metadata;
|
|
46
|
+
const main = (metadata.rebind && aliases.length === 0 ? rebind : bind)(primary).to(target);
|
|
62
47
|
if (scope === Scope.Singleton) {
|
|
63
|
-
|
|
64
|
-
} else if (scope === Scope.Transient) {
|
|
65
|
-
mid = mid.inTransientScope();
|
|
48
|
+
main.inSingletonScope();
|
|
66
49
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
if (onActivation) {
|
|
51
|
+
main.onActivation(onActivation);
|
|
52
|
+
} else if (proxy) {
|
|
53
|
+
main.onActivation((context, instance) => proxyIfNeeded(context.container, metadata, instance));
|
|
54
|
+
}
|
|
55
|
+
const constrain = (binding: Binding) => {
|
|
56
|
+
if (name !== undefined) {
|
|
57
|
+
binding.whenTargetNamed(name);
|
|
71
58
|
} else if (tag) {
|
|
72
|
-
|
|
59
|
+
binding.whenTargetTagged(tag.tag, tag.value);
|
|
73
60
|
} else if (metadata.default) {
|
|
74
|
-
|
|
75
|
-
} else if (when) {
|
|
76
|
-
return syntax.when(when);
|
|
61
|
+
binding.whenTargetIsDefault();
|
|
77
62
|
}
|
|
78
|
-
return syntax;
|
|
79
63
|
};
|
|
80
|
-
// name / tag / default / when choose among the implementations of an id, so they go on the bindings of
|
|
81
|
-
// the ids (`@Component({ id, name })`); the class itself stays reachable without them.
|
|
82
|
-
const aliases = !metadata.rebind && (name || tag || metadata.default || when) ? _ids : [];
|
|
83
64
|
if (aliases.length === 0) {
|
|
84
|
-
|
|
65
|
+
constrain(main);
|
|
85
66
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (const item of _ids) {
|
|
94
|
-
if (aliases.includes(item)) {
|
|
95
|
-
constrain(bind(item).toDynamicValue(context => context.container.get(id)));
|
|
96
|
-
} else {
|
|
97
|
-
bind(item).toService(id);
|
|
67
|
+
aliases.forEach((alias, index) => {
|
|
68
|
+
const binding = (metadata.rebind && index === 0 ? rebind : bind)(alias).toService(primary);
|
|
69
|
+
// An alias of a singleton is that singleton: it is cached too.
|
|
70
|
+
if (scope === Scope.Singleton) {
|
|
71
|
+
binding.inSingletonScope();
|
|
98
72
|
}
|
|
99
|
-
|
|
73
|
+
constrain(binding);
|
|
74
|
+
});
|
|
100
75
|
}
|
|
101
76
|
|
|
102
|
-
function
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else {
|
|
108
|
-
bind(id!).toConstantValue(metadata.constantValue);
|
|
77
|
+
function bindConstant(metadata: ConstantOption, bind: Bind, rebind: Bind): void {
|
|
78
|
+
const [first, ...others] = Array.isArray(metadata.id) ? metadata.id : [metadata.id];
|
|
79
|
+
(metadata.rebind ? rebind : bind)(first).toConstantValue(metadata.constantValue);
|
|
80
|
+
for (const id of others) {
|
|
81
|
+
bind(id).toConstantValue(metadata.constantValue);
|
|
109
82
|
}
|
|
110
|
-
|
|
111
|
-
for (const item of ids) {
|
|
112
|
-
bind(item!).toService(id!);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why the container could not give a component. `code` is stable (the same codes `cell check` reports),
|
|
3
|
+
* `hint` says how to fix it in one sentence and `path` is the chain of identifiers being resolved,
|
|
4
|
+
* outermost first (docs/design/agent-first.md R5).
|
|
5
|
+
*/
|
|
6
|
+
export class ContainerError extends Error {
|
|
7
|
+
override readonly name = 'ContainerError';
|
|
8
|
+
readonly code: ContainerError.Code;
|
|
9
|
+
readonly hint: string;
|
|
10
|
+
readonly path: string[];
|
|
11
|
+
|
|
12
|
+
constructor(options: { code: ContainerError.Code, message: string, hint: string, path?: string[] }) {
|
|
13
|
+
super(options.message);
|
|
14
|
+
this.code = options.code;
|
|
15
|
+
this.hint = options.hint;
|
|
16
|
+
this.path = options.path ?? [];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace ContainerError {
|
|
21
|
+
export type Code =
|
|
22
|
+
| 'CELL_DI_NO_BINDING'
|
|
23
|
+
| 'CELL_DI_AMBIGUOUS'
|
|
24
|
+
| 'CELL_DI_CIRCULAR'
|
|
25
|
+
| 'CELL_DI_MISSING_INJECT'
|
|
26
|
+
| 'CELL_DI_INCOMPLETE_BINDING';
|
|
27
|
+
|
|
28
|
+
export function is(error: unknown, code?: Code): error is ContainerError {
|
|
29
|
+
return error instanceof ContainerError && (code === undefined || error.code === code);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Deferred } from '../utils';
|
|
1
|
+
import type { Container } from './container';
|
|
2
|
+
import { Deferred } from '../utils/promise-util';
|
|
3
3
|
|
|
4
|
-
let _container:
|
|
4
|
+
let _container: Container | undefined;
|
|
5
5
|
|
|
6
|
-
const _containerDeferred = new Deferred<
|
|
6
|
+
const _containerDeferred = new Deferred<Container>();
|
|
7
7
|
|
|
8
|
+
/** The container of the running application, for code that is not a component. */
|
|
8
9
|
export namespace ContainerProvider {
|
|
9
|
-
export function set(container:
|
|
10
|
+
export function set(container: Container): void {
|
|
10
11
|
_container = container;
|
|
11
12
|
_containerDeferred.resolve(container);
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
export function provide(): Container {
|
|
14
16
|
if (!_container) {
|
|
15
17
|
throw new Error('Container is not ready yet, the timing is incorrect.');
|
|
16
18
|
}
|
|
17
19
|
return _container;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export function asyncProvide(): Promise<
|
|
22
|
+
export function asyncProvide(): Promise<Container> {
|
|
21
23
|
return _containerDeferred.promise;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BindingQuery, ComponentId } from './container';
|
|
2
2
|
import { ContainerProvider } from './container-provider';
|
|
3
3
|
|
|
4
|
+
/** Components of the running application's container, for code that is not a component. */
|
|
4
5
|
export namespace ContainerUtil {
|
|
5
|
-
export function get<T>(
|
|
6
|
-
return ContainerProvider.provide().get(
|
|
6
|
+
export function get<T>(id: ComponentId<T>, query?: BindingQuery): T {
|
|
7
|
+
return ContainerProvider.provide().get(id, query);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export function getAll<T>(
|
|
10
|
-
return ContainerProvider.provide().getAll(
|
|
10
|
+
export function getAll<T>(id: ComponentId<T>, query?: BindingQuery): T[] {
|
|
11
|
+
return ContainerProvider.provide().getAll(id, query);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export function
|
|
14
|
-
return ContainerProvider.provide().
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function getNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T {
|
|
18
|
-
return ContainerProvider.provide().getNamed(serviceIdentifier, named);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function getAllTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: any): T[] {
|
|
22
|
-
return ContainerProvider.provide().getAllTagged(serviceIdentifier, key, value);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function getTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: any): T {
|
|
26
|
-
return ContainerProvider.provide().getTagged(serviceIdentifier, key, value);
|
|
14
|
+
export function isBound(id: ComponentId, query?: BindingQuery): boolean {
|
|
15
|
+
return ContainerProvider.provide().isBound(id, query);
|
|
27
16
|
}
|
|
28
17
|
}
|