@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,7 +1,6 @@
|
|
|
1
1
|
export var Scope;
|
|
2
2
|
(function (Scope) {
|
|
3
|
-
Scope[
|
|
4
|
-
Scope[
|
|
5
|
-
Scope[Scope["Transient"] = 2] = "Transient";
|
|
3
|
+
Scope["Singleton"] = "Singleton";
|
|
4
|
+
Scope["Transient"] = "Transient";
|
|
6
5
|
})(Scope || (Scope = {}));
|
|
7
6
|
//# sourceMappingURL=scope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/common/container/scope.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/common/container/scope.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,gCAAuB,CAAA;IACvB,gCAAuB,CAAA;AAC3B,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExpressionEngine } from './expression-engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* The expression engine of the application, `@Autowired(ExpressionEngine)`: CoreContextInitializer adds
|
|
4
|
+
* the `replace`, `regexp` and `eval` transforms to it; add your own transforms and functions the same way.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ApplicationExpressionEngine extends ExpressionEngine {
|
|
7
|
+
}
|
|
@@ -5,15 +5,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Component } from '../annotation/component.js';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { ExpressionEngine } from './expression-engine.js';
|
|
9
|
+
/**
|
|
10
|
+
* The expression engine of the application, `@Autowired(ExpressionEngine)`: CoreContextInitializer adds
|
|
11
|
+
* the `replace`, `regexp` and `eval` transforms to it; add your own transforms and functions the same way.
|
|
12
|
+
*/
|
|
13
|
+
let ApplicationExpressionEngine = class ApplicationExpressionEngine extends ExpressionEngine {
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
Component(
|
|
17
|
-
],
|
|
18
|
-
export {
|
|
19
|
-
//# sourceMappingURL=
|
|
15
|
+
ApplicationExpressionEngine = __decorate([
|
|
16
|
+
Component(ExpressionEngine)
|
|
17
|
+
], ApplicationExpressionEngine);
|
|
18
|
+
export { ApplicationExpressionEngine };
|
|
19
|
+
//# sourceMappingURL=application-expression-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-expression-engine.js","sourceRoot":"","sources":["../../../src/common/el/application-expression-engine.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,gBAAgB;CAAI,CAAA;AAAxD,2BAA2B;IADvC,SAAS,CAAC,gBAAgB,CAAC;GACf,2BAA2B,CAA6B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ContextInitializer, ExpressionContext
|
|
1
|
+
import { ContextInitializer, ExpressionContext } from './expression-protocol.js';
|
|
2
|
+
import { ExpressionEngine } from './expression-engine.js';
|
|
2
3
|
export declare class CoreContextInitializer implements ContextInitializer {
|
|
3
|
-
protected readonly
|
|
4
|
+
protected readonly engine: ExpressionEngine;
|
|
4
5
|
initialize(ctx: ExpressionContext): void;
|
|
5
6
|
priority: number;
|
|
6
7
|
}
|
|
@@ -9,7 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Component, Autowired } from '../annotation/index.js';
|
|
11
11
|
import { ContainerUtil } from '../container/index.js';
|
|
12
|
-
import { ContextInitializer,
|
|
12
|
+
import { ContextInitializer, ExpressionHandler } from './expression-protocol.js';
|
|
13
|
+
import { ExpressionEngine } from './expression-engine.js';
|
|
13
14
|
let CoreContextInitializer = class CoreContextInitializer {
|
|
14
15
|
constructor() {
|
|
15
16
|
this.priority = 500;
|
|
@@ -18,17 +19,18 @@ let CoreContextInitializer = class CoreContextInitializer {
|
|
|
18
19
|
if (typeof process !== 'undefined') {
|
|
19
20
|
ctx.env = { ...process.env, _ignoreEl: true };
|
|
20
21
|
}
|
|
21
|
-
const jexlEngine = this.jexlEngineProvider.provide();
|
|
22
|
-
jexlEngine.addTransform('replace', (val, searchValue, replaceValue) => val && val.replace(new RegExp(searchValue, 'g'), replaceValue));
|
|
23
|
-
jexlEngine.addTransform('regexp', (pattern, flags) => new RegExp(pattern, flags));
|
|
24
22
|
const expressionHandler = ContainerUtil.get(ExpressionHandler);
|
|
25
|
-
|
|
23
|
+
this.engine.addTransforms({
|
|
24
|
+
replace: (val, searchValue, replaceValue) => val && val.replace(new RegExp(searchValue, 'g'), replaceValue),
|
|
25
|
+
regexp: (pattern, flags) => new RegExp(pattern, flags),
|
|
26
|
+
eval: (text) => expressionHandler.handle(text)
|
|
27
|
+
});
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
30
|
__decorate([
|
|
29
|
-
Autowired(
|
|
30
|
-
__metadata("design:type",
|
|
31
|
-
], CoreContextInitializer.prototype, "
|
|
31
|
+
Autowired(ExpressionEngine),
|
|
32
|
+
__metadata("design:type", ExpressionEngine)
|
|
33
|
+
], CoreContextInitializer.prototype, "engine", void 0);
|
|
32
34
|
CoreContextInitializer = __decorate([
|
|
33
35
|
Component(ContextInitializer)
|
|
34
36
|
], CoreContextInitializer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-context-initializer.js","sourceRoot":"","sources":["../../../src/common/el/core-context-initializer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAqB,
|
|
1
|
+
{"version":3,"file":"core-context-initializer.js","sourceRoot":"","sources":["../../../src/common/el/core-context-initializer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAqB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGhD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAiBH,aAAQ,GAAG,GAAG,CAAC;IAEnB,CAAC;IAdG,UAAU,CAAC,GAAsB;QAC7B,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;YACjC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAClD,CAAC;QACD,MAAM,iBAAiB,GAAG,aAAa,CAAC,GAAG,CAAoB,iBAAiB,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YACtB,OAAO,EAAE,CAAC,GAAW,EAAE,WAA4B,EAAE,YAAoB,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC;YAC5I,MAAM,EAAE,CAAC,OAAe,EAAE,KAAc,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;YACvE,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC;SACzD,CAAC,CAAC;IACP,CAAC;CAIJ,CAAA;AAhBsB;IADlB,SAAS,CAAC,gBAAgB,CAAC;8BACD,gBAAgB;sDAAC;AAHnC,sBAAsB;IADlC,SAAS,CAAC,kBAAkB,CAAC;GACjB,sBAAsB,CAmBlC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ExpressionCompiler, ExpressionCompilerOptions
|
|
1
|
+
import { ExpressionCompiler, ExpressionCompilerOptions } from './expression-protocol.js';
|
|
2
|
+
import { Expression, ExpressionEngine } from './expression-engine.js';
|
|
2
3
|
import { ExpressionSectionCompiler } from './expression-util.js';
|
|
3
|
-
/** The {@link ExpressionSectionCompiler} on the
|
|
4
|
+
/** The {@link ExpressionSectionCompiler} on the expression engine of the container (with its transforms). */
|
|
4
5
|
export declare class ExpressionCompilerImpl implements ExpressionCompiler {
|
|
5
|
-
protected readonly
|
|
6
|
+
protected readonly engine: ExpressionEngine;
|
|
6
7
|
protected readonly sectionCompiler: ExpressionSectionCompiler;
|
|
7
|
-
compileSections(text: string, options?: ExpressionCompilerOptions):
|
|
8
|
+
compileSections(text: string, options?: ExpressionCompilerOptions): (string | Expression)[];
|
|
8
9
|
}
|
|
@@ -8,21 +8,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Component, Autowired } from '../annotation/index.js';
|
|
11
|
-
import { ExpressionCompiler
|
|
11
|
+
import { ExpressionCompiler } from './expression-protocol.js';
|
|
12
|
+
import { ExpressionEngine } from './expression-engine.js';
|
|
12
13
|
import { ExpressionSectionCompiler } from './expression-util.js';
|
|
13
|
-
/** The {@link ExpressionSectionCompiler} on the
|
|
14
|
+
/** The {@link ExpressionSectionCompiler} on the expression engine of the container (with its transforms). */
|
|
14
15
|
let ExpressionCompilerImpl = class ExpressionCompilerImpl {
|
|
15
16
|
constructor() {
|
|
16
|
-
this.sectionCompiler = new ExpressionSectionCompiler(() => this.
|
|
17
|
+
this.sectionCompiler = new ExpressionSectionCompiler(() => this.engine);
|
|
17
18
|
}
|
|
18
19
|
compileSections(text, options = {}) {
|
|
19
20
|
return this.sectionCompiler.compileSections(text, options);
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
__decorate([
|
|
23
|
-
Autowired(
|
|
24
|
-
__metadata("design:type",
|
|
25
|
-
], ExpressionCompilerImpl.prototype, "
|
|
24
|
+
Autowired(ExpressionEngine),
|
|
25
|
+
__metadata("design:type", ExpressionEngine)
|
|
26
|
+
], ExpressionCompilerImpl.prototype, "engine", void 0);
|
|
26
27
|
ExpressionCompilerImpl = __decorate([
|
|
27
28
|
Component(ExpressionCompiler)
|
|
28
29
|
], ExpressionCompilerImpl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-compiler.js","sourceRoot":"","sources":["../../../src/common/el/expression-compiler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAA6B,
|
|
1
|
+
{"version":3,"file":"expression-compiler.js","sourceRoot":"","sources":["../../../src/common/el/expression-compiler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAA6B,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAc,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,6GAA6G;AAEtG,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAKgB,oBAAe,GAAG,IAAI,yBAAyB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAM1F,CAAC;IAJG,eAAe,CAAC,IAAY,EAAE,OAAO,GAA8B,EAAE;QACjE,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CAEJ,CAAA;AARsB;IADlB,SAAS,CAAC,gBAAgB,CAAC;8BACD,gBAAgB;sDAAC;AAHnC,sBAAsB;IADlC,SAAS,CAAC,kBAAkB,CAAC;GACjB,sBAAsB,CAWlC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The expression language of Cell: what `${...}` in the configuration, `@Value` and the security
|
|
3
|
+
* policies evaluate. Its grammar is the one of jexl 2, which Cell used before:
|
|
4
|
+
*
|
|
5
|
+
* - literals: `'text'`, `"text"`, `42`, `1.5`, `true`, `false`, `[a, b]`, `{ key: value }`;
|
|
6
|
+
* - names: `cell.server.port`, `list[0]`, `map['key']`, filters `users[.age > 18]` (`.age` is a
|
|
7
|
+
* property of each element); a missing property is `undefined`, never an error; a property of an
|
|
8
|
+
* array is the property of its first element;
|
|
9
|
+
* - operators, loosest first: `a ? b : c` and `a ?: b` (`b` when `a` is falsy), `||` and `&&` (same
|
|
10
|
+
* precedence, left to right), `== != > >= < <= in`, `+ -`, `* / //` (`//` rounds down), `% ^`
|
|
11
|
+
* (`^` is power), then `!` and `-` in front;
|
|
12
|
+
* - transforms `value|name(args)` and functions `name(args)`: only the ones added to the engine.
|
|
13
|
+
*
|
|
14
|
+
* Evaluation is synchronous. Expressions cannot call methods, so they only read what the context gives.
|
|
15
|
+
*/
|
|
16
|
+
/** The code of an {@link ExpressionSyntaxError}. */
|
|
17
|
+
export type ExpressionErrorCode = 'CELL_EL_SYNTAX' | 'CELL_EL_UNKNOWN_TRANSFORM' | 'CELL_EL_UNKNOWN_FUNCTION';
|
|
18
|
+
/** An expression that cannot be parsed, or that uses a transform or function the engine does not have. */
|
|
19
|
+
export declare class ExpressionSyntaxError extends Error {
|
|
20
|
+
readonly name = "ExpressionSyntaxError";
|
|
21
|
+
readonly code: ExpressionErrorCode;
|
|
22
|
+
readonly hint: string;
|
|
23
|
+
readonly expression: string;
|
|
24
|
+
/** Where in `expression` parsing failed. */
|
|
25
|
+
readonly position?: number;
|
|
26
|
+
constructor(options: {
|
|
27
|
+
code: ExpressionErrorCode;
|
|
28
|
+
message: string;
|
|
29
|
+
hint: string;
|
|
30
|
+
expression: string;
|
|
31
|
+
position?: number;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
type Evaluate = (context: any, element: any) => any;
|
|
35
|
+
/** A compiled expression; evaluate it as many times as needed. */
|
|
36
|
+
export declare class Expression {
|
|
37
|
+
readonly source: string;
|
|
38
|
+
protected readonly run: Evaluate;
|
|
39
|
+
constructor(source: string, run: Evaluate);
|
|
40
|
+
/** The value of the expression; names are properties of `context`. */
|
|
41
|
+
evaluate(context?: object): any;
|
|
42
|
+
}
|
|
43
|
+
/** Compiles and evaluates expressions; holds the transforms and functions they may call. */
|
|
44
|
+
export declare class ExpressionEngine {
|
|
45
|
+
protected static readonly CACHE_SIZE = 1000;
|
|
46
|
+
protected readonly transforms: Map<string, Function>;
|
|
47
|
+
protected readonly functions: Map<string, Function>;
|
|
48
|
+
protected readonly cache: Map<string, Expression>;
|
|
49
|
+
/** `value|name(a, b)` calls `transform(value, a, b)`. */
|
|
50
|
+
addTransform(name: string, transform: (value: any, ...args: any[]) => any): this;
|
|
51
|
+
addTransforms(transforms: Record<string, (value: any, ...args: any[]) => any>): this;
|
|
52
|
+
/** `name(a, b)` calls `fn(a, b)`. */
|
|
53
|
+
addFunction(name: string, fn: (...args: any[]) => any): this;
|
|
54
|
+
addFunctions(functions: Record<string, (...args: any[]) => any>): this;
|
|
55
|
+
/** Compiles once per source text (the latest ones are kept). Throws an {@link ExpressionSyntaxError}. */
|
|
56
|
+
compile(source: string): Expression;
|
|
57
|
+
evaluate(source: string, context?: object): any;
|
|
58
|
+
/** @internal what the compiled expressions call */
|
|
59
|
+
call(pool: 'transform' | 'function', name: string, args: any[], source: string): any;
|
|
60
|
+
}
|
|
61
|
+
export {};
|