@celljs/core 4.1.0 → 4.3.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-util.js","sourceRoot":"","sources":["../../../src/common/container/container-util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,KAAW,aAAa,
|
|
1
|
+
{"version":3,"file":"container-util.js","sourceRoot":"","sources":["../../../src/common/container/container-util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,2FAA2F;AAC3F,MAAM,KAAW,aAAa,CAY7B;AAZD,WAAiB,aAAa;IAC1B,SAAgB,GAAG,CAAI,EAAkB,EAAE,KAAoB;QAC3D,OAAO,iBAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC;IAFe,cAAA,GAAG,MAElB,CAAA;IAED,SAAgB,MAAM,CAAI,EAAkB,EAAE,KAAoB;QAC9D,OAAO,iBAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IAFe,cAAA,MAAM,SAErB,CAAA;IAED,SAAgB,OAAO,CAAC,EAAe,EAAE,KAAoB;QACzD,OAAO,iBAAiB,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IAFe,cAAA,OAAO,UAEtB,CAAA;AACL,CAAC,EAZgB,aAAa,KAAb,aAAa,QAY7B"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { Abstract, Newable } from '../utils/types.js';
|
|
2
|
+
import { ContainerError } from './container-error.js';
|
|
3
|
+
import { InjectionTarget } from './injection.js';
|
|
4
|
+
import { Scope } from './scope.js';
|
|
5
|
+
/** What identifies a component: a class, or a symbol or string that stands for an interface. */
|
|
6
|
+
export type ComponentId<T = any> = string | symbol | Newable<T> | Abstract<T>;
|
|
7
|
+
/** What a dynamic value, a service alias or an activation handler gets. */
|
|
8
|
+
export interface ResolveContext {
|
|
9
|
+
readonly container: Container;
|
|
10
|
+
/** What is being resolved; with `owner` and `key` when it is injected into a class. */
|
|
11
|
+
readonly target: InjectionTarget;
|
|
12
|
+
}
|
|
13
|
+
/** Selects a binding among those of an identifier: `{ name }` for `@Named`, `{ tags }` for `@Tagged`. */
|
|
14
|
+
export interface BindingQuery {
|
|
15
|
+
name?: string | number | symbol;
|
|
16
|
+
tags?: Record<string | number | symbol, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export type BindingConstraint = (target: InjectionTarget) => boolean;
|
|
19
|
+
export type ActivationHandler<T = any> = (context: ResolveContext, instance: T) => T;
|
|
20
|
+
/** How an identifier is resolved: a class, a constant, a factory or another identifier. */
|
|
21
|
+
export declare class Binding<T = any> {
|
|
22
|
+
readonly id: ComponentId<T>;
|
|
23
|
+
type?: 'class' | 'constant' | 'factory' | 'service';
|
|
24
|
+
implementation?: Newable<T>;
|
|
25
|
+
factory?: (context: ResolveContext) => T;
|
|
26
|
+
/** The identifier a `service` binding resolves to. */
|
|
27
|
+
service?: ComponentId;
|
|
28
|
+
scope: Scope;
|
|
29
|
+
constraint?: BindingConstraint;
|
|
30
|
+
/** The constraint for people and tools: `named redis`, `tagged region=eu`, `default`. */
|
|
31
|
+
condition?: string;
|
|
32
|
+
activation?: ActivationHandler<T>;
|
|
33
|
+
/** Singletons and constants once created. */
|
|
34
|
+
resolved: boolean;
|
|
35
|
+
value?: T;
|
|
36
|
+
constructor(id: ComponentId<T>);
|
|
37
|
+
to(implementation: Newable<T>): this;
|
|
38
|
+
toConstantValue(value: T): this;
|
|
39
|
+
toDynamicValue(factory: (context: ResolveContext) => T): this;
|
|
40
|
+
/** Resolves another identifier: an alias, the same instance when that one is a singleton. */
|
|
41
|
+
toService(id: ComponentId<T>): this;
|
|
42
|
+
inSingletonScope(): this;
|
|
43
|
+
inTransientScope(): this;
|
|
44
|
+
when(constraint: BindingConstraint, condition?: string): this;
|
|
45
|
+
whenTargetNamed(name: string | number | symbol): this;
|
|
46
|
+
whenTargetTagged(key: string | number | symbol, value: unknown): this;
|
|
47
|
+
/** Only where nothing is asked for by name or tag. */
|
|
48
|
+
whenTargetIsDefault(): this;
|
|
49
|
+
/** Called with each new instance (once for singletons); returns the instance to use, e.g. a proxy. */
|
|
50
|
+
onActivation(handler: ActivationHandler<T>): this;
|
|
51
|
+
}
|
|
52
|
+
export type ContainerModuleRegistry = (bind: <T>(id: ComponentId<T>) => Binding<T>, unbind: (id: ComponentId) => void, isBound: (id: ComponentId, query?: BindingQuery) => boolean, rebind: <T>(id: ComponentId<T>) => Binding<T>) => void;
|
|
53
|
+
/** A set of bindings that {@link Container.load} adds; what a DI module file exports by default. */
|
|
54
|
+
export declare class ContainerModule {
|
|
55
|
+
readonly registry: ContainerModuleRegistry;
|
|
56
|
+
constructor(registry: ContainerModuleRegistry);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The dependency injection container: bindings by identifier, resolved synchronously. Classes get their
|
|
60
|
+
* constructor parameters and properties from the decorators (`@Autowired`, `@Value`, `@Optional`,
|
|
61
|
+
* `@Named`, `@Tagged`) and `@PostConstruct` is called once they are injected.
|
|
62
|
+
*/
|
|
63
|
+
export declare class Container {
|
|
64
|
+
protected readonly map: Map<ComponentId<any>, Binding<any>[]>;
|
|
65
|
+
/** The bindings being resolved and what asked for them, outermost first; for cycles and error messages. */
|
|
66
|
+
protected readonly resolving: Binding[];
|
|
67
|
+
protected readonly requests: InjectionTarget[];
|
|
68
|
+
constructor(...modules: ContainerModule[]);
|
|
69
|
+
load(...modules: ContainerModule[]): void;
|
|
70
|
+
bind<T>(id: ComponentId<T>): Binding<T>;
|
|
71
|
+
/** Replaces the bindings of the identifier. */
|
|
72
|
+
rebind<T>(id: ComponentId<T>): Binding<T>;
|
|
73
|
+
unbind(id: ComponentId): void;
|
|
74
|
+
/** Whether the identifier has a binding; with a query, one that matches it. */
|
|
75
|
+
isBound(id: ComponentId, query?: BindingQuery): boolean;
|
|
76
|
+
/** The one binding of the identifier that matches the query; throws when there is none or more than one. */
|
|
77
|
+
get<T>(id: ComponentId<T>, query?: BindingQuery): T;
|
|
78
|
+
/**
|
|
79
|
+
* Every binding of the identifier, whatever its constraint; with a query, the ones that match it.
|
|
80
|
+
* Throws when there is none.
|
|
81
|
+
*/
|
|
82
|
+
getAll<T>(id: ComponentId<T>, query?: BindingQuery): T[];
|
|
83
|
+
/** Resolves an injection point: one instance, all of them (`multi`), or none when it is `optional`. */
|
|
84
|
+
resolve<T>(target: InjectionTarget): T;
|
|
85
|
+
/** Every binding by identifier, in the order they were bound; for tools (`cell check`, the dev MCP endpoint). */
|
|
86
|
+
bindings(): ReadonlyMap<ComponentId, readonly Binding[]>;
|
|
87
|
+
protected resolveAll<T>(target: InjectionTarget, unconstrained?: boolean): T[];
|
|
88
|
+
protected matching(target: InjectionTarget): readonly Binding[];
|
|
89
|
+
protected instance<T>(binding: Binding<T>, target: InjectionTarget): T;
|
|
90
|
+
protected construct<T>(type: Newable<T>): T;
|
|
91
|
+
/** The identifiers being resolved, outermost first, then the one of `target`. */
|
|
92
|
+
protected path(target?: InjectionTarget): string[];
|
|
93
|
+
protected neededBy(target: InjectionTarget): string;
|
|
94
|
+
protected noBinding(target: InjectionTarget): ContainerError;
|
|
95
|
+
protected ambiguous(target: InjectionTarget, bindings: readonly Binding[]): ContainerError;
|
|
96
|
+
protected circular(target: InjectionTarget): ContainerError;
|
|
97
|
+
protected static chain(path: string[]): string;
|
|
98
|
+
protected static query(target: InjectionTarget): BindingQuery;
|
|
99
|
+
/** `RedisStore [named redis]`, `Symbol(Store) named redis`. */
|
|
100
|
+
static describe(binding: Binding | (BindingQuery & {
|
|
101
|
+
id: ComponentId;
|
|
102
|
+
})): string;
|
|
103
|
+
static idName(id: unknown): string;
|
|
104
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { ContainerError } from './container-error.js';
|
|
2
|
+
import { InjectionUtil } from './injection.js';
|
|
3
|
+
import { Scope } from './scope.js';
|
|
4
|
+
/** How an identifier is resolved: a class, a constant, a factory or another identifier. */
|
|
5
|
+
export class Binding {
|
|
6
|
+
constructor(id) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.scope = Scope.Transient;
|
|
9
|
+
/** Singletons and constants once created. */
|
|
10
|
+
this.resolved = false;
|
|
11
|
+
}
|
|
12
|
+
to(implementation) {
|
|
13
|
+
this.type = 'class';
|
|
14
|
+
this.implementation = implementation;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
toConstantValue(value) {
|
|
18
|
+
this.type = 'constant';
|
|
19
|
+
this.value = value;
|
|
20
|
+
this.resolved = true;
|
|
21
|
+
this.scope = Scope.Singleton;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
toDynamicValue(factory) {
|
|
25
|
+
this.type = 'factory';
|
|
26
|
+
this.factory = factory;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
/** Resolves another identifier: an alias, the same instance when that one is a singleton. */
|
|
30
|
+
toService(id) {
|
|
31
|
+
this.type = 'service';
|
|
32
|
+
this.service = id;
|
|
33
|
+
this.factory = context => context.container.get(id);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
inSingletonScope() {
|
|
37
|
+
this.scope = Scope.Singleton;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
inTransientScope() {
|
|
41
|
+
this.scope = Scope.Transient;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
when(constraint, condition = 'when') {
|
|
45
|
+
this.constraint = constraint;
|
|
46
|
+
this.condition = condition;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
whenTargetNamed(name) {
|
|
50
|
+
return this.when(target => target.name === name, `named ${String(name)}`);
|
|
51
|
+
}
|
|
52
|
+
whenTargetTagged(key, value) {
|
|
53
|
+
return this.when(target => target.tags !== undefined && target.tags[key] === value, `tagged ${String(key)}=${String(value)}`);
|
|
54
|
+
}
|
|
55
|
+
/** Only where nothing is asked for by name or tag. */
|
|
56
|
+
whenTargetIsDefault() {
|
|
57
|
+
return this.when(target => target.name === undefined && target.tags === undefined, 'default');
|
|
58
|
+
}
|
|
59
|
+
/** Called with each new instance (once for singletons); returns the instance to use, e.g. a proxy. */
|
|
60
|
+
onActivation(handler) {
|
|
61
|
+
this.activation = handler;
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** A set of bindings that {@link Container.load} adds; what a DI module file exports by default. */
|
|
66
|
+
export class ContainerModule {
|
|
67
|
+
constructor(registry) {
|
|
68
|
+
this.registry = registry;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const EMPTY = [];
|
|
72
|
+
/**
|
|
73
|
+
* The dependency injection container: bindings by identifier, resolved synchronously. Classes get their
|
|
74
|
+
* constructor parameters and properties from the decorators (`@Autowired`, `@Value`, `@Optional`,
|
|
75
|
+
* `@Named`, `@Tagged`) and `@PostConstruct` is called once they are injected.
|
|
76
|
+
*/
|
|
77
|
+
export class Container {
|
|
78
|
+
constructor(...modules) {
|
|
79
|
+
this.map = new Map();
|
|
80
|
+
/** The bindings being resolved and what asked for them, outermost first; for cycles and error messages. */
|
|
81
|
+
this.resolving = [];
|
|
82
|
+
this.requests = [];
|
|
83
|
+
this.load(...modules);
|
|
84
|
+
}
|
|
85
|
+
load(...modules) {
|
|
86
|
+
const bind = (id) => this.bind(id);
|
|
87
|
+
const unbind = (id) => this.unbind(id);
|
|
88
|
+
const isBound = (id, query) => this.isBound(id, query);
|
|
89
|
+
const rebind = (id) => this.rebind(id);
|
|
90
|
+
for (const module of modules) {
|
|
91
|
+
module.registry(bind, unbind, isBound, rebind);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
bind(id) {
|
|
95
|
+
const binding = new Binding(id);
|
|
96
|
+
const bindings = this.map.get(id);
|
|
97
|
+
if (bindings) {
|
|
98
|
+
bindings.push(binding);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.map.set(id, [binding]);
|
|
102
|
+
}
|
|
103
|
+
return binding;
|
|
104
|
+
}
|
|
105
|
+
/** Replaces the bindings of the identifier. */
|
|
106
|
+
rebind(id) {
|
|
107
|
+
this.unbind(id);
|
|
108
|
+
return this.bind(id);
|
|
109
|
+
}
|
|
110
|
+
unbind(id) {
|
|
111
|
+
this.map.delete(id);
|
|
112
|
+
}
|
|
113
|
+
/** Whether the identifier has a binding; with a query, one that matches it. */
|
|
114
|
+
isBound(id, query) {
|
|
115
|
+
return query ? this.matching({ ...query, id }).length > 0 : this.map.has(id);
|
|
116
|
+
}
|
|
117
|
+
/** The one binding of the identifier that matches the query; throws when there is none or more than one. */
|
|
118
|
+
get(id, query) {
|
|
119
|
+
return this.resolve(query ? { ...query, id } : { id });
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Every binding of the identifier, whatever its constraint; with a query, the ones that match it.
|
|
123
|
+
* Throws when there is none.
|
|
124
|
+
*/
|
|
125
|
+
getAll(id, query) {
|
|
126
|
+
return this.resolveAll(query ? { ...query, id } : { id }, !query);
|
|
127
|
+
}
|
|
128
|
+
/** Resolves an injection point: one instance, all of them (`multi`), or none when it is `optional`. */
|
|
129
|
+
resolve(target) {
|
|
130
|
+
if (target.multi) {
|
|
131
|
+
return this.resolveAll(target);
|
|
132
|
+
}
|
|
133
|
+
const bindings = this.matching(target);
|
|
134
|
+
if (bindings.length === 1) {
|
|
135
|
+
return this.instance(bindings[0], target);
|
|
136
|
+
}
|
|
137
|
+
if (bindings.length === 0 && target.optional) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
throw bindings.length === 0 ? this.noBinding(target) : this.ambiguous(target, bindings);
|
|
141
|
+
}
|
|
142
|
+
/** Every binding by identifier, in the order they were bound; for tools (`cell check`, the dev MCP endpoint). */
|
|
143
|
+
bindings() {
|
|
144
|
+
return this.map;
|
|
145
|
+
}
|
|
146
|
+
resolveAll(target, unconstrained = false) {
|
|
147
|
+
var _a;
|
|
148
|
+
const bindings = unconstrained ? (_a = this.map.get(target.id)) !== null && _a !== void 0 ? _a : EMPTY : this.matching(target);
|
|
149
|
+
if (bindings.length === 0 && !target.optional) {
|
|
150
|
+
throw this.noBinding(target);
|
|
151
|
+
}
|
|
152
|
+
const instances = new Array(bindings.length);
|
|
153
|
+
for (let i = 0; i < bindings.length; i++) {
|
|
154
|
+
instances[i] = this.instance(bindings[i], target);
|
|
155
|
+
}
|
|
156
|
+
return instances;
|
|
157
|
+
}
|
|
158
|
+
matching(target) {
|
|
159
|
+
const bindings = this.map.get(target.id);
|
|
160
|
+
if (!bindings) {
|
|
161
|
+
return EMPTY;
|
|
162
|
+
}
|
|
163
|
+
for (const binding of bindings) {
|
|
164
|
+
if (binding.constraint && !binding.constraint(target)) {
|
|
165
|
+
return bindings.filter(b => !b.constraint || b.constraint(target));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return bindings;
|
|
169
|
+
}
|
|
170
|
+
instance(binding, target) {
|
|
171
|
+
if (binding.resolved) {
|
|
172
|
+
return binding.value;
|
|
173
|
+
}
|
|
174
|
+
if (this.resolving.includes(binding)) {
|
|
175
|
+
throw this.circular(target);
|
|
176
|
+
}
|
|
177
|
+
this.resolving.push(binding);
|
|
178
|
+
this.requests.push(target);
|
|
179
|
+
try {
|
|
180
|
+
const context = { container: this, target };
|
|
181
|
+
let value;
|
|
182
|
+
if (binding.type === 'class') {
|
|
183
|
+
value = this.construct(binding.implementation);
|
|
184
|
+
}
|
|
185
|
+
else if (binding.factory) {
|
|
186
|
+
value = binding.factory(context);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
throw new ContainerError({
|
|
190
|
+
code: 'CELL_DI_INCOMPLETE_BINDING',
|
|
191
|
+
message: `The binding of ${Container.idName(binding.id)} says nothing to resolve it to.`,
|
|
192
|
+
hint: 'Complete bind(id) with .to(Class), .toConstantValue(value), .toDynamicValue(factory) or .toService(id).',
|
|
193
|
+
path: this.path()
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
if (binding.activation) {
|
|
197
|
+
value = binding.activation(context, value);
|
|
198
|
+
}
|
|
199
|
+
if (binding.scope === Scope.Singleton) {
|
|
200
|
+
binding.value = value;
|
|
201
|
+
binding.resolved = true;
|
|
202
|
+
}
|
|
203
|
+
return value;
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
this.resolving.pop();
|
|
207
|
+
this.requests.pop();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
construct(type) {
|
|
211
|
+
const plan = InjectionUtil.plan(type);
|
|
212
|
+
const parameters = plan.parameters;
|
|
213
|
+
const args = new Array(parameters.length);
|
|
214
|
+
for (let i = 0; i < parameters.length; i++) {
|
|
215
|
+
args[i] = this.resolve(parameters[i]);
|
|
216
|
+
}
|
|
217
|
+
const instance = new type(...args);
|
|
218
|
+
for (const property of plan.properties) {
|
|
219
|
+
const value = this.resolve(property);
|
|
220
|
+
// Like a default parameter: an optional property that nothing is bound to keeps its initial value.
|
|
221
|
+
if (value !== undefined || !property.optional) {
|
|
222
|
+
instance[property.key] = value;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (plan.postConstruct !== undefined) {
|
|
226
|
+
instance[plan.postConstruct]();
|
|
227
|
+
}
|
|
228
|
+
return instance;
|
|
229
|
+
}
|
|
230
|
+
/** The identifiers being resolved, outermost first, then the one of `target`. */
|
|
231
|
+
path(target) {
|
|
232
|
+
const path = this.requests.map(request => Container.idName(request.id));
|
|
233
|
+
return target ? [...path, Container.idName(target.id)] : path;
|
|
234
|
+
}
|
|
235
|
+
neededBy(target) {
|
|
236
|
+
return target.owner ? `, needed by ${InjectionUtil.describe(target)}` : '';
|
|
237
|
+
}
|
|
238
|
+
noBinding(target) {
|
|
239
|
+
var _a;
|
|
240
|
+
const path = this.path(target);
|
|
241
|
+
const name = Container.idName(target.id);
|
|
242
|
+
const bound = (_a = this.map.get(target.id)) !== null && _a !== void 0 ? _a : [];
|
|
243
|
+
let candidates = '';
|
|
244
|
+
if (bound.length > 0) {
|
|
245
|
+
candidates = ` The bindings of ${name} do not match: ${bound.map(Container.describe).join(', ')}.`;
|
|
246
|
+
}
|
|
247
|
+
else if ([...this.map.keys()].some(id => id !== target.id && Container.idName(id) === name)) {
|
|
248
|
+
candidates = ` Another identifier is also named ${name}: two copies of the module that declares it are loaded.`;
|
|
249
|
+
}
|
|
250
|
+
return new ContainerError({
|
|
251
|
+
code: 'CELL_DI_NO_BINDING',
|
|
252
|
+
message: `No binding for ${Container.describe({ id: target.id, ...Container.query(target) })}${this.neededBy(target)}${Container.chain(path)}.${candidates}`,
|
|
253
|
+
hint: 'Bind the identifier in a DI module (@Component(<id>) in a file the module imports), or mark the injection @Optional().',
|
|
254
|
+
path
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
ambiguous(target, bindings) {
|
|
258
|
+
const path = this.path(target);
|
|
259
|
+
return new ContainerError({
|
|
260
|
+
code: 'CELL_DI_AMBIGUOUS',
|
|
261
|
+
message: `${bindings.length} bindings match ${Container.idName(target.id)}${this.neededBy(target)}${Container.chain(path)}: ${bindings.map(Container.describe).join(', ')}.`,
|
|
262
|
+
hint: 'Inject all of them with @Autowired on an array, give one rebind: true to replace the others, or select one with @Named / @Tagged.',
|
|
263
|
+
path
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
circular(target) {
|
|
267
|
+
const path = this.path(target);
|
|
268
|
+
return new ContainerError({
|
|
269
|
+
code: 'CELL_DI_CIRCULAR',
|
|
270
|
+
message: `Circular dependency: ${path.join(' → ')}.`,
|
|
271
|
+
hint: 'Break the cycle: get one side lazily (a Provider, or @Autowired({ detached: true }) on a property), or move the shared part into another component.',
|
|
272
|
+
path
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
static chain(path) {
|
|
276
|
+
return path.length > 1 ? ` (${path.join(' → ')})` : '';
|
|
277
|
+
}
|
|
278
|
+
static query(target) {
|
|
279
|
+
return { name: target.name, tags: target.tags };
|
|
280
|
+
}
|
|
281
|
+
/** `RedisStore [named redis]`, `Symbol(Store) named redis`. */
|
|
282
|
+
static describe(binding) {
|
|
283
|
+
var _a;
|
|
284
|
+
if (binding instanceof Binding) {
|
|
285
|
+
const what = binding.type === 'class' ? binding.implementation.name || '(anonymous class)'
|
|
286
|
+
: binding.type === 'service' ? `→ ${Container.idName(binding.service)}` : ((_a = binding.type) !== null && _a !== void 0 ? _a : 'incomplete');
|
|
287
|
+
return binding.condition ? `${what} [${binding.condition}]` : what;
|
|
288
|
+
}
|
|
289
|
+
const tags = binding.tags ? Reflect.ownKeys(binding.tags).map(key => ` tagged ${String(key)}=${String(binding.tags[key])}`).join('') : '';
|
|
290
|
+
return `${Container.idName(binding.id)}${binding.name !== undefined ? ` named ${String(binding.name)}` : ''}${tags}`;
|
|
291
|
+
}
|
|
292
|
+
static idName(id) {
|
|
293
|
+
if (typeof id === 'function') {
|
|
294
|
+
return id.name || '(anonymous class)';
|
|
295
|
+
}
|
|
296
|
+
return String(id);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/common/container/container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAmB,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAsBhC,2FAA2F;AAC3F,MAAM,OAAO,OAAO;IAehB,YAAqB,EAAkB;QAAlB,OAAE,GAAF,EAAE,CAAgB;QATvC,UAAK,GAAG,KAAK,CAAC,SAAS,CAAC;QAKxB,6CAA6C;QAC7C,aAAQ,GAAG,KAAK,CAAC;IAG0B,CAAC;IAE5C,EAAE,CAAC,cAA0B;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,OAAO,IAAI,CAAC;IAChB,CAAC;I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KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IACzH,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,EAAW;QACrB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,EAAE,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAC1C,CAAC;QACD,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Container } from '
|
|
1
|
+
import { Container } from './container.js';
|
|
2
2
|
export declare const container: Promise<Container>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container } from '
|
|
2
|
-
//
|
|
1
|
+
import { Container } from './container.js';
|
|
2
|
+
// The toolchain replaces this file with the DI modules of the application (@celljs/vite ContainerGenerator).
|
|
3
3
|
export const container = Promise.resolve(new Container());
|
|
4
4
|
//# sourceMappingURL=dynamic-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-container.js","sourceRoot":"","sources":["../../../src/common/container/dynamic-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dynamic-container.js","sourceRoot":"","sources":["../../../src/common/container/dynamic-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,6GAA6G;AAC7G,MAAM,CAAC,MAAM,SAAS,GAAuB,OAAO,CAAC,OAAO,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from './container
|
|
1
|
+
export * from './container.js';
|
|
2
|
+
export * from './container-error.js';
|
|
3
|
+
export * from './injection.js';
|
|
4
|
+
export * from './scope.js';
|
|
2
5
|
export * from './auto-bind.js';
|
|
6
|
+
export * from './container-provider.js';
|
|
3
7
|
export * from './container-util.js';
|
|
4
|
-
export * from './scope.js';
|
|
5
|
-
export * from './container-factory.js';
|
|
6
|
-
import { interfaces } from 'inversify';
|
|
7
|
-
export type Container = interfaces.Container;
|
|
8
|
-
export type ContainerModule = interfaces.ContainerModule;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from './container
|
|
1
|
+
export * from './container.js';
|
|
2
|
+
export * from './container-error.js';
|
|
3
|
+
export * from './injection.js';
|
|
4
|
+
export * from './scope.js';
|
|
2
5
|
export * from './auto-bind.js';
|
|
6
|
+
export * from './container-provider.js';
|
|
3
7
|
export * from './container-util.js';
|
|
4
|
-
export * from './scope.js';
|
|
5
|
-
export * from './container-factory.js';
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ComponentId } from './container.js';
|
|
2
|
+
/**
|
|
3
|
+
* A constructor parameter or property to inject: what to inject (`id`, all of them with `multi`,
|
|
4
|
+
* nothing when `optional` and unbound) and which binding (`name`, `tags`). Also what a dynamic value
|
|
5
|
+
* or constraint gets to see; `owner` and `key` are absent when the container is asked directly.
|
|
6
|
+
*/
|
|
7
|
+
export interface InjectionTarget {
|
|
8
|
+
readonly id: ComponentId;
|
|
9
|
+
readonly multi?: boolean;
|
|
10
|
+
readonly optional?: boolean;
|
|
11
|
+
readonly name?: string | number | symbol;
|
|
12
|
+
readonly tags?: Readonly<Record<string | number | symbol, unknown>>;
|
|
13
|
+
/** The class that declares the parameter or property. */
|
|
14
|
+
readonly owner?: Function;
|
|
15
|
+
/** The property, or the index of the constructor parameter. */
|
|
16
|
+
readonly key?: string | symbol | number;
|
|
17
|
+
}
|
|
18
|
+
/** How the container creates instances of a class; computed once per class. */
|
|
19
|
+
export interface InjectionPlan {
|
|
20
|
+
readonly parameters: readonly InjectionTarget[];
|
|
21
|
+
readonly properties: readonly InjectionTarget[];
|
|
22
|
+
readonly postConstruct?: string | symbol;
|
|
23
|
+
}
|
|
24
|
+
type Point = {
|
|
25
|
+
-readonly [K in keyof InjectionTarget]?: InjectionTarget[K];
|
|
26
|
+
};
|
|
27
|
+
export declare namespace InjectionUtil {
|
|
28
|
+
/**
|
|
29
|
+
* The injection point of a parameter or property decorator (`@Autowired`, `@Optional`, `@Named`...):
|
|
30
|
+
* the first decorator creates it, the others complete it. Subclasses inherit the properties.
|
|
31
|
+
*/
|
|
32
|
+
function point(target: any, key: string | symbol | undefined, index?: number): Point;
|
|
33
|
+
/** Forgets a property: its value does not come from the container (`detached` injections). */
|
|
34
|
+
function remove(target: any, key: string | symbol): void;
|
|
35
|
+
function setPostConstruct(target: any, key: string | symbol): void;
|
|
36
|
+
function plan(type: Function): InjectionPlan;
|
|
37
|
+
/** `UserService.repository` or `UserService constructor parameter #0`. */
|
|
38
|
+
function describe(target: Partial<InjectionTarget>): string;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ContainerError } from './container-error.js';
|
|
2
|
+
const PARAMETERS = 'cell:di:parameters';
|
|
3
|
+
const PROPERTIES = 'cell:di:properties';
|
|
4
|
+
const POST_CONSTRUCT = 'cell:di:post-construct';
|
|
5
|
+
/** What TypeScript writes for parameters whose type is an interface, a union or a primitive. */
|
|
6
|
+
const NOT_AN_ID = [Object, Function, Array, String, Number, Boolean, Symbol, BigInt, Promise];
|
|
7
|
+
export var InjectionUtil;
|
|
8
|
+
(function (InjectionUtil) {
|
|
9
|
+
const plans = new WeakMap();
|
|
10
|
+
/**
|
|
11
|
+
* The injection point of a parameter or property decorator (`@Autowired`, `@Optional`, `@Named`...):
|
|
12
|
+
* the first decorator creates it, the others complete it. Subclasses inherit the properties.
|
|
13
|
+
*/
|
|
14
|
+
function point(target, key, index) {
|
|
15
|
+
var _a;
|
|
16
|
+
if (index !== undefined) {
|
|
17
|
+
if (key !== undefined) {
|
|
18
|
+
throw new Error(`${target.constructor.name}.${String(key)}: only constructor parameters and properties can be injected.`);
|
|
19
|
+
}
|
|
20
|
+
let parameters = Reflect.getOwnMetadata(PARAMETERS, target);
|
|
21
|
+
if (!parameters) {
|
|
22
|
+
parameters = [];
|
|
23
|
+
Reflect.defineMetadata(PARAMETERS, parameters, target);
|
|
24
|
+
}
|
|
25
|
+
return (_a = parameters[index]) !== null && _a !== void 0 ? _a : (parameters[index] = { owner: target, key: index });
|
|
26
|
+
}
|
|
27
|
+
const owner = target.constructor;
|
|
28
|
+
let properties = Reflect.getOwnMetadata(PROPERTIES, owner);
|
|
29
|
+
if (!properties) {
|
|
30
|
+
properties = new Map(Reflect.getMetadata(PROPERTIES, owner));
|
|
31
|
+
Reflect.defineMetadata(PROPERTIES, properties, owner);
|
|
32
|
+
}
|
|
33
|
+
let point = properties.get(key);
|
|
34
|
+
if (!point || point.owner !== owner) {
|
|
35
|
+
point = { owner, key };
|
|
36
|
+
properties.set(key, point);
|
|
37
|
+
}
|
|
38
|
+
return point;
|
|
39
|
+
}
|
|
40
|
+
InjectionUtil.point = point;
|
|
41
|
+
/** Forgets a property: its value does not come from the container (`detached` injections). */
|
|
42
|
+
function remove(target, key) {
|
|
43
|
+
const properties = Reflect.getOwnMetadata(PROPERTIES, target.constructor);
|
|
44
|
+
properties === null || properties === void 0 ? void 0 : properties.delete(key);
|
|
45
|
+
}
|
|
46
|
+
InjectionUtil.remove = remove;
|
|
47
|
+
function setPostConstruct(target, key) {
|
|
48
|
+
Reflect.defineMetadata(POST_CONSTRUCT, key, target.constructor);
|
|
49
|
+
}
|
|
50
|
+
InjectionUtil.setPostConstruct = setPostConstruct;
|
|
51
|
+
function plan(type) {
|
|
52
|
+
var _a;
|
|
53
|
+
var _b;
|
|
54
|
+
let plan = plans.get(type);
|
|
55
|
+
if (!plan) {
|
|
56
|
+
plan = {
|
|
57
|
+
parameters: parameters(type),
|
|
58
|
+
properties: [...(_b = (_a = Reflect.getMetadata(PROPERTIES, type)) === null || _a === void 0 ? void 0 : _a.values()) !== null && _b !== void 0 ? _b : []].map(complete),
|
|
59
|
+
postConstruct: Reflect.getMetadata(POST_CONSTRUCT, type)
|
|
60
|
+
};
|
|
61
|
+
plans.set(type, plan);
|
|
62
|
+
}
|
|
63
|
+
return plan;
|
|
64
|
+
}
|
|
65
|
+
InjectionUtil.plan = plan;
|
|
66
|
+
/** The parameters of the nearest constructor in the class hierarchy that TypeScript or a decorator described. */
|
|
67
|
+
function parameters(type) {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
for (let c = type; c && c !== Function.prototype; c = Object.getPrototypeOf(c)) {
|
|
70
|
+
const points = Reflect.getOwnMetadata(PARAMETERS, c);
|
|
71
|
+
const types = Reflect.getOwnMetadata('design:paramtypes', c);
|
|
72
|
+
if (points || types) {
|
|
73
|
+
const count = Math.max((_a = points === null || points === void 0 ? void 0 : points.length) !== null && _a !== void 0 ? _a : 0, (_b = types === null || types === void 0 ? void 0 : types.length) !== null && _b !== void 0 ? _b : 0);
|
|
74
|
+
const result = [];
|
|
75
|
+
for (let i = 0; i < count; i++) {
|
|
76
|
+
const point = (_c = points === null || points === void 0 ? void 0 : points[i]) !== null && _c !== void 0 ? _c : { owner: c, key: i };
|
|
77
|
+
const declared = types === null || types === void 0 ? void 0 : types[i];
|
|
78
|
+
result.push(complete(point.id === undefined && typeof declared === 'function' && !NOT_AN_ID.includes(declared)
|
|
79
|
+
? { ...point, id: declared } : point));
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
function complete(point) {
|
|
87
|
+
if (point.id === undefined) {
|
|
88
|
+
throw missing(point);
|
|
89
|
+
}
|
|
90
|
+
return point;
|
|
91
|
+
}
|
|
92
|
+
function missing(point) {
|
|
93
|
+
const where = describe(point);
|
|
94
|
+
return new ContainerError({
|
|
95
|
+
code: 'CELL_DI_MISSING_INJECT',
|
|
96
|
+
message: `${where} has no @Autowired (or @Value), so the container does not know what to inject.`,
|
|
97
|
+
hint: 'Add @Autowired(<id>) to the constructor parameter or property; an interface type needs the id explicitly.',
|
|
98
|
+
path: [where]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/** `UserService.repository` or `UserService constructor parameter #0`. */
|
|
102
|
+
function describe(target) {
|
|
103
|
+
var _a;
|
|
104
|
+
const owner = ((_a = target.owner) === null || _a === void 0 ? void 0 : _a.name) || '(anonymous class)';
|
|
105
|
+
return typeof target.key === 'number' ? `${owner} constructor parameter #${target.key}` : `${owner}.${String(target.key)}`;
|
|
106
|
+
}
|
|
107
|
+
InjectionUtil.describe = describe;
|
|
108
|
+
})(InjectionUtil || (InjectionUtil = {}));
|
|
109
|
+
//# sourceMappingURL=injection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injection.js","sourceRoot":"","sources":["../../../src/common/container/injection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA4BnD,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAChD,gGAAgG;AAChG,MAAM,SAAS,GAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,E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