@venok/core 1.1.0 → 2.0.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/dist/application/config.js +92 -0
- package/dist/application/context.js +252 -0
- package/dist/application/factory.js +136 -0
- package/dist/constants.js +100 -0
- package/dist/context/context-id.factory.js +58 -0
- package/dist/context/context.js +186 -0
- package/dist/context/creator.js +49 -0
- package/dist/context/execution-host.js +51 -0
- package/dist/context/proxy.js +55 -0
- package/dist/decorators/apply.decorator.js +33 -0
- package/dist/decorators/bind.decorator.js +28 -0
- package/dist/decorators/catch.decorator.js +29 -0
- package/dist/decorators/dependencies.decorator.js +30 -0
- package/dist/decorators/exception-filters.decorator.js +40 -0
- package/dist/decorators/global.decorator.js +28 -0
- package/dist/decorators/inject.decorator.js +42 -0
- package/dist/decorators/injectable.decorator.js +38 -0
- package/dist/decorators/module.decorator.js +42 -0
- package/dist/decorators/optional.decorator.js +35 -0
- package/dist/decorators/set-metadata.decorator.js +35 -0
- package/dist/decorators/use-guards.decorator.js +39 -0
- package/dist/decorators/use-interceptors.decorator.js +39 -0
- package/dist/decorators/use-pipes.decorator.js +38 -0
- package/dist/enums/scope.enum.js +28 -0
- package/dist/enums/shutdown-signal.enum.js +36 -0
- package/dist/errors/exceptions/circular-dependency.exception.js +30 -0
- package/dist/errors/exceptions/invalid-class-module.exception.js +30 -0
- package/dist/errors/exceptions/invalid-class-scope.exception.js +33 -0
- package/dist/errors/exceptions/invalid-class.exception.js +30 -0
- package/dist/errors/exceptions/invalid-exception-filter.exception.js +30 -0
- package/dist/errors/exceptions/invalid-module.exception.js +30 -0
- package/dist/errors/exceptions/runtime.exception.js +30 -0
- package/dist/errors/exceptions/undefined-dependency.exception.js +30 -0
- package/dist/errors/exceptions/undefined-forwardref.exception.js +30 -0
- package/dist/errors/exceptions/undefined-module.exception.js +30 -0
- package/dist/errors/exceptions/unknown-dependencies.exception.js +38 -0
- package/dist/errors/exceptions/unknown-element.exception.js +31 -0
- package/dist/errors/exceptions/unknown-export.exception.js +30 -0
- package/dist/errors/exceptions/unknown-module.exception.js +29 -0
- package/dist/errors/messages.js +134 -0
- package/dist/exceptions/handler.js +53 -0
- package/dist/exceptions/zone/handler.js +30 -0
- package/dist/exceptions/zone/zone.js +49 -0
- package/dist/filters/context-creator.js +65 -0
- package/dist/filters/context.js +58 -0
- package/dist/filters/filter.js +36 -0
- package/dist/guards/consumer.js +54 -0
- package/dist/guards/context-creator.js +76 -0
- package/dist/helpers/color.helper.js +35 -0
- package/dist/helpers/context-id-factory.helper.js +25 -0
- package/dist/helpers/context.helper.js +65 -0
- package/dist/helpers/create-param-decorator.helper.js +73 -0
- package/dist/helpers/filter-log-levels.util.js +38 -0
- package/dist/helpers/flatten.helper.js +26 -0
- package/dist/helpers/is-log-level-enabled.util.js +39 -0
- package/dist/helpers/is-log-level.util.js +26 -0
- package/dist/helpers/messages.helper.js +23 -0
- package/dist/helpers/metadata.helper.js +51 -0
- package/dist/helpers/noop.helper.js +23 -0
- package/dist/helpers/random-string-generator.helper.js +24 -0
- package/dist/helpers/rethrow.helper.js +25 -0
- package/dist/helpers/shared.helper.js +49 -0
- package/dist/helpers/silent.helper.js +34 -0
- package/dist/helpers/transient.helper.js +30 -0
- package/dist/helpers/uuid.helper.js +60 -0
- package/dist/helpers/validate-each.helper.js +42 -0
- package/dist/hooks/before-app-shutdown.hook.js +43 -0
- package/dist/hooks/on-app-bootstrap.hook.js +43 -0
- package/dist/hooks/on-app-shutdown.hook.js +43 -0
- package/dist/hooks/on-module-destroy.hook.js +43 -0
- package/dist/hooks/on-module-init.hook.js +43 -0
- package/dist/index.d.ts +3142 -0
- package/dist/index.js +115 -0
- package/dist/injector/constants.js +28 -0
- package/dist/injector/container.js +229 -0
- package/dist/injector/helpers/barrier.js +48 -0
- package/dist/injector/helpers/class-scope.helper.js +27 -0
- package/dist/injector/helpers/classifier.helper.js +35 -0
- package/dist/injector/helpers/is-durable.helper.js +27 -0
- package/dist/injector/injector.js +490 -0
- package/dist/injector/instance/links-host.js +68 -0
- package/dist/injector/instance/loader.js +95 -0
- package/dist/injector/instance/resolver.js +61 -0
- package/dist/injector/instance/wrapper.js +324 -0
- package/dist/injector/internal-core-module/core-providers.js +42 -0
- package/dist/injector/internal-core-module/internal-core-module-factory.js +66 -0
- package/dist/injector/internal-core-module/internal-core-module.js +46 -0
- package/dist/injector/module/compiler.js +47 -0
- package/dist/injector/module/container.js +33 -0
- package/dist/injector/module/lazy/loader.js +71 -0
- package/dist/injector/module/module.js +395 -0
- package/dist/injector/module/ref.js +78 -0
- package/dist/injector/module/token-factory.js +82 -0
- package/dist/injector/settlement-signal.js +50 -0
- package/dist/injector/topology-tree/topology-tree.js +68 -0
- package/dist/injector/topology-tree/tree-node.js +68 -0
- package/dist/inspector/graph-inspector.js +182 -0
- package/dist/inspector/initialize-on-preview.allowlist.js +31 -0
- package/dist/inspector/noop-graph-inspector.js +27 -0
- package/dist/inspector/partial-graph.host.js +34 -0
- package/dist/inspector/serialized-graph.js +128 -0
- package/dist/interceptors/consumer.js +54 -0
- package/dist/interceptors/context-creator.js +75 -0
- package/dist/interfaces/application/context-options.interface.js +31 -0
- package/dist/interfaces/application/context.interface.js +0 -0
- package/dist/interfaces/application/index.js +3 -0
- package/dist/interfaces/context/arguments-host.interface.js +0 -0
- package/dist/interfaces/context/context-id-factory.interface.js +0 -0
- package/dist/interfaces/context/context.interface.js +0 -0
- package/dist/interfaces/context/creator.interface.js +0 -0
- package/dist/interfaces/context/execution.interface.js +0 -0
- package/dist/interfaces/context/index.js +7 -0
- package/dist/interfaces/context/params.interface.js +0 -0
- package/dist/interfaces/features/exception-filter.interface.js +0 -0
- package/dist/interfaces/features/guards.interface.js +0 -0
- package/dist/interfaces/features/index.js +5 -0
- package/dist/interfaces/features/interceptor.interface.js +0 -0
- package/dist/interfaces/features/pipes.interface.js +0 -0
- package/dist/interfaces/helper.interface.js +0 -0
- package/dist/interfaces/hooks/before-application-shutdown.interface.js +0 -0
- package/dist/interfaces/hooks/index.js +6 -0
- package/dist/interfaces/hooks/on-application-bootstrap.interface.js +0 -0
- package/dist/interfaces/hooks/on-application-shutdown.interface.js +0 -0
- package/dist/interfaces/hooks/on-destroy.interface.js +0 -0
- package/dist/interfaces/hooks/on-init.interface.js +0 -0
- package/dist/interfaces/index.js +16 -0
- package/dist/interfaces/injectable.interface.js +0 -0
- package/dist/interfaces/injector/index.js +6 -0
- package/dist/interfaces/injector/injector.interface.js +0 -0
- package/dist/interfaces/injector/instance-wrapper.interface.js +0 -0
- package/dist/interfaces/injector/lazy-module-options.interface.js +0 -0
- package/dist/interfaces/injector/module-compiler.interface.js +0 -0
- package/dist/interfaces/injector/module-ref.interface.js +0 -0
- package/dist/interfaces/inspector/edge.interface.js +0 -0
- package/dist/interfaces/inspector/enhancer-metadata-cache-entry.interface.js +0 -0
- package/dist/interfaces/inspector/entrypoint.interface.js +0 -0
- package/dist/interfaces/inspector/extras.interface.js +0 -0
- package/dist/interfaces/inspector/index.js +8 -0
- package/dist/interfaces/inspector/node.interface.js +0 -0
- package/dist/interfaces/inspector/serialized-graph-json.interface.js +0 -0
- package/dist/interfaces/inspector/serialized-graph-metadata.interface.js +0 -0
- package/dist/interfaces/modules/definition.interface.js +0 -0
- package/dist/interfaces/modules/dynamic-module.interface.js +0 -0
- package/dist/interfaces/modules/forward-reference.interface.js +0 -0
- package/dist/interfaces/modules/index.js +10 -0
- package/dist/interfaces/modules/injection-token.interface.js +0 -0
- package/dist/interfaces/modules/introspection-result.interface.js +0 -0
- package/dist/interfaces/modules/module-metadata.interface.js +0 -0
- package/dist/interfaces/modules/module.interface.js +0 -0
- package/dist/interfaces/modules/optional-factory-dependency.interface.js +0 -0
- package/dist/interfaces/modules/override.interface.js +0 -0
- package/dist/interfaces/modules/provider.interface.js +0 -0
- package/dist/interfaces/param-decorator.interface.js +0 -0
- package/dist/interfaces/scope.interface.js +0 -0
- package/dist/interfaces/services/console.interface.js +0 -0
- package/dist/interfaces/services/index.js +4 -0
- package/dist/interfaces/services/logger.interface.js +0 -0
- package/dist/interfaces/services/reflector.interface.js +0 -0
- package/dist/interfaces/set-metadata.interface.js +0 -0
- package/dist/interfaces/type.interface.js +0 -0
- package/dist/metadata-scanner.js +50 -0
- package/dist/pipes/consumer.js +33 -0
- package/dist/pipes/context-creator.js +78 -0
- package/dist/scanner.js +371 -0
- package/dist/services/console.service.js +347 -0
- package/dist/services/logger.service.js +276 -0
- package/dist/services/reflector.service.js +82 -0
- package/dist/storage/handler-metadata.storage.js +42 -0
- package/dist/storage/meta-host.storage.js +62 -0
- package/package.json +52 -40
- package/application/config.d.ts +0 -35
- package/application/config.js +0 -85
- package/application/context.d.ts +0 -198
- package/application/context.js +0 -325
- package/application/factory.d.ts +0 -43
- package/application/factory.js +0 -147
- package/constants.d.ts +0 -44
- package/constants.js +0 -51
- package/context/context.d.ts +0 -66
- package/context/context.js +0 -156
- package/context/creator.d.ts +0 -9
- package/context/creator.js +0 -32
- package/context/execution-host.d.ts +0 -16
- package/context/execution-host.js +0 -30
- package/context/index.d.ts +0 -4
- package/context/index.js +0 -20
- package/context/proxy.d.ts +0 -6
- package/context/proxy.js +0 -33
- package/decorators/apply.decorator.d.ts +0 -10
- package/decorators/apply.decorator.js +0 -24
- package/decorators/bind.decorator.d.ts +0 -11
- package/decorators/bind.decorator.js +0 -20
- package/decorators/catch.decorator.d.ts +0 -17
- package/decorators/catch.decorator.js +0 -26
- package/decorators/create-param.decorator.d.ts +0 -29
- package/decorators/create-param.decorator.js +0 -51
- package/decorators/dependencies.decorator.d.ts +0 -6
- package/decorators/dependencies.decorator.js +0 -17
- package/decorators/exception-filters.decorator.d.ts +0 -21
- package/decorators/exception-filters.decorator.js +0 -41
- package/decorators/global.decorator.d.ts +0 -10
- package/decorators/global.decorator.js +0 -19
- package/decorators/index.d.ts +0 -15
- package/decorators/index.js +0 -31
- package/decorators/inject.decorator.d.ts +0 -26
- package/decorators/inject.decorator.js +0 -45
- package/decorators/injectable.decorator.d.ts +0 -40
- package/decorators/injectable.decorator.js +0 -51
- package/decorators/module.decorator.d.ts +0 -14
- package/decorators/module.decorator.js +0 -38
- package/decorators/optional.decorator.d.ts +0 -14
- package/decorators/optional.decorator.js +0 -30
- package/decorators/set-metadata.decorator.d.ts +0 -18
- package/decorators/set-metadata.decorator.js +0 -30
- package/decorators/use-guards.decorator.d.ts +0 -21
- package/decorators/use-guards.decorator.js +0 -40
- package/decorators/use-interceptors.decorator.d.ts +0 -21
- package/decorators/use-interceptors.decorator.js +0 -40
- package/decorators/use-pipes.decorator.d.ts +0 -21
- package/decorators/use-pipes.decorator.js +0 -39
- package/discovery/meta-host-collection.d.ts +0 -32
- package/discovery/meta-host-collection.js +0 -79
- package/discovery/module.d.ts +0 -5
- package/discovery/module.js +0 -24
- package/discovery/service.d.ts +0 -68
- package/discovery/service.js +0 -90
- package/errors/exceptions/circular-dependency.exception.d.ts +0 -4
- package/errors/exceptions/circular-dependency.exception.js +0 -11
- package/errors/exceptions/index.d.ts +0 -8
- package/errors/exceptions/index.js +0 -24
- package/errors/exceptions/invalid-class-module.exception.d.ts +0 -4
- package/errors/exceptions/invalid-class-module.exception.js +0 -11
- package/errors/exceptions/invalid-class-scope.exception.d.ts +0 -5
- package/errors/exceptions/invalid-class-scope.exception.js +0 -14
- package/errors/exceptions/invalid-class.exception.d.ts +0 -4
- package/errors/exceptions/invalid-class.exception.js +0 -11
- package/errors/exceptions/invalid-exception-filter.exception.d.ts +0 -4
- package/errors/exceptions/invalid-exception-filter.exception.js +0 -11
- package/errors/exceptions/invalid-module.exception.d.ts +0 -4
- package/errors/exceptions/invalid-module.exception.js +0 -11
- package/errors/exceptions/runtime.exception.d.ts +0 -4
- package/errors/exceptions/runtime.exception.js +0 -12
- package/errors/exceptions/undefined-dependency.exception.d.ts +0 -6
- package/errors/exceptions/undefined-dependency.exception.js +0 -11
- package/errors/exceptions/undefined-forwardref.exception.d.ts +0 -5
- package/errors/exceptions/undefined-forwardref.exception.js +0 -11
- package/errors/exceptions/undefined-module.exception.d.ts +0 -4
- package/errors/exceptions/undefined-module.exception.js +0 -11
- package/errors/exceptions/unknown-dependencies.exception.d.ts +0 -16
- package/errors/exceptions/unknown-dependencies.exception.js +0 -15
- package/errors/exceptions/unknown-element.exception.d.ts +0 -4
- package/errors/exceptions/unknown-element.exception.js +0 -12
- package/errors/exceptions/unknown-export.exception.d.ts +0 -4
- package/errors/exceptions/unknown-export.exception.js +0 -11
- package/errors/exceptions/unknown-module.exception.d.ts +0 -4
- package/errors/exceptions/unknown-module.exception.js +0 -10
- package/errors/messages.d.ts +0 -15
- package/errors/messages.js +0 -126
- package/exceptions/handler.d.ts +0 -10
- package/exceptions/handler.js +0 -34
- package/exceptions/index.d.ts +0 -2
- package/exceptions/index.js +0 -18
- package/exceptions/zone/handler.d.ts +0 -5
- package/exceptions/zone/handler.js +0 -15
- package/exceptions/zone/index.d.ts +0 -2
- package/exceptions/zone/index.js +0 -18
- package/exceptions/zone/zone.d.ts +0 -5
- package/exceptions/zone/zone.js +0 -32
- package/filters/context-creator.d.ts +0 -14
- package/filters/context-creator.js +0 -48
- package/filters/context.d.ts +0 -12
- package/filters/context.js +0 -41
- package/filters/filter.d.ts +0 -6
- package/filters/filter.js +0 -16
- package/filters/index.d.ts +0 -3
- package/filters/index.js +0 -19
- package/guards/consumer.d.ts +0 -9
- package/guards/consumer.js +0 -33
- package/guards/context-creator.d.ts +0 -17
- package/guards/context-creator.js +0 -69
- package/guards/index.d.ts +0 -2
- package/guards/index.js +0 -18
- package/helpers/color.helper.d.ts +0 -9
- package/helpers/color.helper.js +0 -14
- package/helpers/context-id-factory.helper.d.ts +0 -2
- package/helpers/context-id-factory.helper.js +0 -15
- package/helpers/context.helper.d.ts +0 -23
- package/helpers/context.helper.js +0 -49
- package/helpers/extends-metadata.helper.d.ts +0 -1
- package/helpers/extends-metadata.helper.js +0 -9
- package/helpers/flatten.helper.d.ts +0 -1
- package/helpers/flatten.helper.js +0 -9
- package/helpers/messages.helper.d.ts +0 -2
- package/helpers/messages.helper.js +0 -7
- package/helpers/noop.helper.d.ts +0 -1
- package/helpers/noop.helper.js +0 -5
- package/helpers/random-string-generator.helper.d.ts +0 -1
- package/helpers/random-string-generator.helper.js +0 -6
- package/helpers/rethrow.helper.d.ts +0 -1
- package/helpers/rethrow.helper.js +0 -7
- package/helpers/shared.helper.d.ts +0 -10
- package/helpers/shared.helper.js +0 -33
- package/helpers/silent.helper.d.ts +0 -10
- package/helpers/silent.helper.js +0 -18
- package/helpers/transient.helper.d.ts +0 -12
- package/helpers/transient.helper.js +0 -26
- package/helpers/uuid.helper.d.ts +0 -15
- package/helpers/uuid.helper.js +0 -54
- package/helpers/validate-each.helper.d.ts +0 -8
- package/helpers/validate-each.helper.js +0 -25
- package/hooks/before-app-shutdown.hook.d.ts +0 -9
- package/hooks/before-app-shutdown.hook.js +0 -45
- package/hooks/index.d.ts +0 -5
- package/hooks/index.js +0 -21
- package/hooks/on-app-bootstrap.hook.d.ts +0 -8
- package/hooks/on-app-bootstrap.hook.js +0 -45
- package/hooks/on-app-shutdown.hook.d.ts +0 -9
- package/hooks/on-app-shutdown.hook.js +0 -46
- package/hooks/on-module-destroy.hook.d.ts +0 -8
- package/hooks/on-module-destroy.hook.js +0 -45
- package/hooks/on-module-init.hook.d.ts +0 -8
- package/hooks/on-module-init.hook.js +0 -45
- package/index.d.ts +0 -10
- package/index.js +0 -32
- package/injector/constants.d.ts +0 -2
- package/injector/constants.js +0 -7
- package/injector/container.d.ts +0 -61
- package/injector/container.js +0 -194
- package/injector/helpers/class-scope.helper.d.ts +0 -2
- package/injector/helpers/class-scope.helper.js +0 -9
- package/injector/helpers/classifier.helper.d.ts +0 -4
- package/injector/helpers/classifier.helper.js +0 -17
- package/injector/helpers/is-durable.helper.d.ts +0 -2
- package/injector/helpers/is-durable.helper.js +0 -9
- package/injector/index.d.ts +0 -5
- package/injector/index.js +0 -20
- package/injector/injector.d.ts +0 -87
- package/injector/injector.js +0 -452
- package/injector/instance/links-host.d.ts +0 -22
- package/injector/instance/links-host.js +0 -50
- package/injector/instance/loader.d.ts +0 -21
- package/injector/instance/loader.js +0 -73
- package/injector/instance/resolver.d.ts +0 -16
- package/injector/instance/resolver.js +0 -43
- package/injector/instance/wrapper.d.ts +0 -90
- package/injector/instance/wrapper.js +0 -272
- package/injector/internal-core-module/core-providers.d.ts +0 -4
- package/injector/internal-core-module/core-providers.js +0 -21
- package/injector/internal-core-module/internal-core-module-factory.d.ts +0 -8
- package/injector/internal-core-module/internal-core-module-factory.js +0 -47
- package/injector/internal-core-module/internal-core-module.d.ts +0 -4
- package/injector/internal-core-module/internal-core-module.js +0 -31
- package/injector/module/compiler.d.ts +0 -19
- package/injector/module/compiler.js +0 -27
- package/injector/module/container.d.ts +0 -6
- package/injector/module/container.js +0 -24
- package/injector/module/lazy/loader.d.ts +0 -21
- package/injector/module/lazy/loader.js +0 -49
- package/injector/module/lazy/options.d.ts +0 -6
- package/injector/module/lazy/options.js +0 -2
- package/injector/module/module.d.ts +0 -74
- package/injector/module/module.js +0 -383
- package/injector/module/ref.d.ts +0 -106
- package/injector/module/ref.js +0 -62
- package/injector/module/token-factory.d.ts +0 -13
- package/injector/module/token-factory.js +0 -71
- package/injector/settlement-signal.d.ts +0 -37
- package/injector/settlement-signal.js +0 -55
- package/inspector/graph-inspector.d.ts +0 -26
- package/inspector/graph-inspector.js +0 -163
- package/inspector/initialize-on-preview.allowlist.d.ts +0 -6
- package/inspector/initialize-on-preview.allowlist.js +0 -13
- package/inspector/interfaces/edge.interface.d.ts +0 -28
- package/inspector/interfaces/edge.interface.js +0 -2
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts +0 -12
- package/inspector/interfaces/enhancer-metadata-cache-entry.interface.js +0 -2
- package/inspector/interfaces/entrypoint.interface.d.ts +0 -10
- package/inspector/interfaces/entrypoint.interface.js +0 -2
- package/inspector/interfaces/extras.interface.d.ts +0 -18
- package/inspector/interfaces/extras.interface.js +0 -2
- package/inspector/interfaces/node.interface.d.ts +0 -49
- package/inspector/interfaces/node.interface.js +0 -2
- package/inspector/interfaces/serialized-graph-json.interface.d.ts +0 -14
- package/inspector/interfaces/serialized-graph-json.interface.js +0 -2
- package/inspector/interfaces/serialized-graph-metadata.interface.d.ts +0 -10
- package/inspector/interfaces/serialized-graph-metadata.interface.js +0 -2
- package/inspector/noop-graph-inspector.d.ts +0 -2
- package/inspector/noop-graph-inspector.js +0 -8
- package/inspector/partial-graph.host.d.ts +0 -7
- package/inspector/partial-graph.host.js +0 -15
- package/inspector/serialized-graph.d.ts +0 -52
- package/inspector/serialized-graph.js +0 -121
- package/interceptors/consumer.d.ts +0 -9
- package/interceptors/consumer.js +0 -37
- package/interceptors/context-creator.d.ts +0 -17
- package/interceptors/context-creator.js +0 -67
- package/interceptors/index.d.ts +0 -2
- package/interceptors/index.js +0 -18
- package/interfaces/abstract.interface.d.ts +0 -3
- package/interfaces/abstract.interface.js +0 -2
- package/interfaces/application/context-options.interface.d.ts +0 -41
- package/interfaces/application/context-options.interface.js +0 -9
- package/interfaces/application/context.interface.d.ts +0 -162
- package/interfaces/application/context.interface.js +0 -2
- package/interfaces/application/index.d.ts +0 -1
- package/interfaces/application/index.js +0 -17
- package/interfaces/context/arguments-host.interface.d.ts +0 -22
- package/interfaces/context/arguments-host.interface.js +0 -2
- package/interfaces/context/execution.interface.d.ts +0 -18
- package/interfaces/context/execution.interface.js +0 -2
- package/interfaces/context/index.d.ts +0 -2
- package/interfaces/context/index.js +0 -18
- package/interfaces/features/exception-filter.interface.d.ts +0 -21
- package/interfaces/features/exception-filter.interface.js +0 -2
- package/interfaces/features/guards.interface.d.ts +0 -20
- package/interfaces/features/guards.interface.js +0 -2
- package/interfaces/features/index.d.ts +0 -4
- package/interfaces/features/index.js +0 -20
- package/interfaces/features/interceptor.interface.d.ts +0 -30
- package/interfaces/features/interceptor.interface.js +0 -2
- package/interfaces/features/pipes.interface.d.ts +0 -37
- package/interfaces/features/pipes.interface.js +0 -2
- package/interfaces/helper.interface.d.ts +0 -3
- package/interfaces/helper.interface.js +0 -2
- package/interfaces/hooks/before-application-shutdown.interface.d.ts +0 -3
- package/interfaces/hooks/before-application-shutdown.interface.js +0 -2
- package/interfaces/hooks/index.d.ts +0 -5
- package/interfaces/hooks/index.js +0 -21
- package/interfaces/hooks/on-application-bootstrap.interface.d.ts +0 -9
- package/interfaces/hooks/on-application-bootstrap.interface.js +0 -2
- package/interfaces/hooks/on-application-shutdown.interface.d.ts +0 -9
- package/interfaces/hooks/on-application-shutdown.interface.js +0 -2
- package/interfaces/hooks/on-destroy.interface.d.ts +0 -10
- package/interfaces/hooks/on-destroy.interface.js +0 -2
- package/interfaces/hooks/on-init.interface.d.ts +0 -8
- package/interfaces/hooks/on-init.interface.js +0 -2
- package/interfaces/index.d.ts +0 -8
- package/interfaces/index.js +0 -24
- package/interfaces/injectable.interface.d.ts +0 -1
- package/interfaces/injectable.interface.js +0 -2
- package/interfaces/modules/configurable/async-options.interface.d.ts +0 -42
- package/interfaces/modules/configurable/async-options.interface.js +0 -2
- package/interfaces/modules/configurable/cls.interface.d.ts +0 -13
- package/interfaces/modules/configurable/cls.interface.js +0 -2
- package/interfaces/modules/configurable/host.interface.d.ts +0 -62
- package/interfaces/modules/configurable/host.interface.js +0 -2
- package/interfaces/modules/configurable/index.d.ts +0 -3
- package/interfaces/modules/configurable/index.js +0 -19
- package/interfaces/modules/definition.interface.d.ts +0 -4
- package/interfaces/modules/definition.interface.js +0 -2
- package/interfaces/modules/dynamic-module.interface.d.ts +0 -23
- package/interfaces/modules/dynamic-module.interface.js +0 -2
- package/interfaces/modules/forward-reference.interface.d.ts +0 -3
- package/interfaces/modules/forward-reference.interface.js +0 -2
- package/interfaces/modules/index.d.ts +0 -9
- package/interfaces/modules/index.js +0 -25
- package/interfaces/modules/injection-token.interface.d.ts +0 -5
- package/interfaces/modules/injection-token.interface.js +0 -2
- package/interfaces/modules/introspection-result.interface.d.ts +0 -10
- package/interfaces/modules/introspection-result.interface.js +0 -2
- package/interfaces/modules/module-metadata.interface.d.ts +0 -24
- package/interfaces/modules/module-metadata.interface.js +0 -2
- package/interfaces/modules/module.interface.d.ts +0 -2
- package/interfaces/modules/module.interface.js +0 -2
- package/interfaces/modules/optional-factory-dependency.interface.d.ts +0 -8
- package/interfaces/modules/optional-factory-dependency.interface.js +0 -2
- package/interfaces/modules/override.interface.d.ts +0 -5
- package/interfaces/modules/override.interface.js +0 -2
- package/interfaces/modules/provider.interface.d.ts +0 -142
- package/interfaces/modules/provider.interface.js +0 -2
- package/interfaces/scope.interface.d.ts +0 -35
- package/interfaces/scope.interface.js +0 -23
- package/interfaces/type.interface.d.ts +0 -3
- package/interfaces/type.interface.js +0 -2
- package/metadata-scanner.d.ts +0 -4
- package/metadata-scanner.js +0 -34
- package/module/configurable-module.builder.d.ts +0 -93
- package/module/configurable-module.builder.js +0 -204
- package/module/constants.d.ts +0 -4
- package/module/constants.js +0 -7
- package/module/helpers/generate-options-injection-token.helper.d.ts +0 -1
- package/module/helpers/generate-options-injection-token.helper.js +0 -9
- package/module/helpers/get-injection-providers.helper.d.ts +0 -8
- package/module/helpers/get-injection-providers.helper.js +0 -36
- package/module/helpers/index.d.ts +0 -2
- package/module/helpers/index.js +0 -18
- package/module/index.d.ts +0 -2
- package/module/index.js +0 -18
- package/pipes/consumer.d.ts +0 -9
- package/pipes/consumer.js +0 -15
- package/pipes/context-creator.d.ts +0 -18
- package/pipes/context-creator.js +0 -70
- package/pipes/index.d.ts +0 -2
- package/pipes/index.js +0 -18
- package/scanner.d.ts +0 -81
- package/scanner.js +0 -374
- package/services/console.service.d.ts +0 -86
- package/services/console.service.js +0 -233
- package/services/index.d.ts +0 -1
- package/services/index.js +0 -17
- package/services/logger.service.d.ts +0 -157
- package/services/logger.service.js +0 -269
- package/services/reflector.service.d.ts +0 -110
- package/services/reflector.service.js +0 -87
- package/test/context/creator.spec.d.ts +0 -1
- package/test/context/creator.spec.js +0 -149
- package/test/context/execution-host.spec.d.ts +0 -1
- package/test/context/execution-host.spec.js +0 -31
- package/test/context/proxy.spec.d.ts +0 -1
- package/test/context/proxy.spec.js +0 -46
- package/test/exceptions/handler.spec.d.ts +0 -1
- package/test/exceptions/handler.spec.js +0 -90
- package/test/exceptions/messages.spec.js +0 -201
- package/test/exceptions/zona/handler.spec.d.ts +0 -1
- package/test/exceptions/zona/handler.spec.js +0 -51
- package/test/exceptions/zona/zone.spec.d.ts +0 -1
- package/test/exceptions/zona/zone.spec.js +0 -66
- package/test/filters/context-creator.spec.d.ts +0 -2
- package/test/filters/context-creator.spec.js +0 -91
- package/test/guards/consumer.spec.d.ts +0 -1
- package/test/guards/consumer.spec.js +0 -47
- package/test/guards/context-creator.spec.d.ts +0 -1
- package/test/guards/context-creator.spec.js +0 -138
- package/test/helpers/context-id-factory.spec.d.ts +0 -1
- package/test/helpers/context-id-factory.spec.js +0 -9
- package/test/helpers/shared.spec.d.ts +0 -1
- package/test/helpers/shared.spec.js +0 -122
- package/test/hooks/before-app-shutdown.hook.spec.d.ts +0 -1
- package/test/hooks/before-app-shutdown.hook.spec.js +0 -44
- package/test/hooks/on-app-bootstrap.hook.spec.d.ts +0 -1
- package/test/hooks/on-app-bootstrap.hook.spec.js +0 -43
- package/test/hooks/on-app-shutdown.hook.spec.d.ts +0 -1
- package/test/hooks/on-app-shutdown.hook.spec.js +0 -43
- package/test/hooks/on-module-destroy.hook.spec.d.ts +0 -1
- package/test/hooks/on-module-destroy.hook.spec.js +0 -43
- package/test/hooks/on-module-init.hook.spec.d.ts +0 -1
- package/test/hooks/on-module-init.hook.spec.js +0 -43
- package/test/injector/compiler.spec.d.ts +0 -1
- package/test/injector/compiler.spec.js +0 -42
- package/test/injector/container.spec.d.ts +0 -1
- package/test/injector/container.spec.js +0 -203
- package/test/injector/helpers/classifier.spec.d.ts +0 -1
- package/test/injector/helpers/classifier.spec.js +0 -102
- package/test/injector/injector.spec.d.ts +0 -1
- package/test/injector/injector.spec.js +0 -678
- package/test/injector/instance/loader.spec.d.ts +0 -1
- package/test/injector/instance/loader.spec.js +0 -108
- package/test/injector/instance/wrapper.spec.d.ts +0 -1
- package/test/injector/instance/wrapper.spec.js +0 -772
- package/test/injector/internal-core-module/internal-core-module-factory.spec.d.ts +0 -1
- package/test/injector/internal-core-module/internal-core-module-factory.spec.js +0 -27
- package/test/injector/module/lazy/loader.spec.d.ts +0 -1
- package/test/injector/module/lazy/loader.spec.js +0 -71
- package/test/injector/module/module.spec.d.ts +0 -1
- package/test/injector/module/module.spec.js +0 -410
- package/test/injector/module/token-factory.spec.d.ts +0 -1
- package/test/injector/module/token-factory.spec.js +0 -84
- package/test/interceptors/consumer.spec.d.ts +0 -1
- package/test/interceptors/consumer.spec.js +0 -136
- package/test/interceptors/context-creator.spec.d.ts +0 -1
- package/test/interceptors/context-creator.spec.js +0 -139
- package/test/metadata-scanner.spec.d.ts +0 -1
- package/test/metadata-scanner.spec.js +0 -41
- package/test/module/configurable-module.builder.spec.d.ts +0 -1
- package/test/module/configurable-module.builder.spec.js +0 -102
- package/test/module/helpers/get-injection-providers.helper.spec.d.ts +0 -1
- package/test/module/helpers/get-injection-providers.helper.spec.js +0 -49
- package/test/pipes/consumer.spec.d.ts +0 -1
- package/test/pipes/consumer.spec.js +0 -42
- package/test/pipes/context-creator.spec.d.ts +0 -1
- package/test/pipes/context-creator.spec.js +0 -108
- package/test/scanner.spec.d.ts +0 -1
- package/test/scanner.spec.js +0 -620
- package/test/services/logger.service.spec.d.ts +0 -1
- package/test/services/logger.service.spec.js +0 -487
- package/test/services/reflector.service.spec.d.ts +0 -1
- package/test/services/reflector.service.spec.js +0 -105
- package/tsconfig.tsbuildinfo +0 -1
- /package/{test/exceptions/messages.spec.d.ts → dist/interfaces/abstract.interface.js} +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractInstanceResolver = void 0;
|
|
4
|
-
const interfaces_1 = require("@venok/core/interfaces");
|
|
5
|
-
const exceptions_1 = require("@venok/core/errors/exceptions");
|
|
6
|
-
class AbstractInstanceResolver {
|
|
7
|
-
find(typeOrToken, options) {
|
|
8
|
-
const instanceLinkOrArray = this.instanceLinksHost.get(typeOrToken, options);
|
|
9
|
-
const pluckInstance = ({ wrapperRef }) => {
|
|
10
|
-
if (wrapperRef.scope === interfaces_1.Scope.REQUEST || wrapperRef.scope === interfaces_1.Scope.TRANSIENT)
|
|
11
|
-
throw new exceptions_1.InvalidClassScopeException(typeOrToken);
|
|
12
|
-
return wrapperRef.instance;
|
|
13
|
-
};
|
|
14
|
-
if (Array.isArray(instanceLinkOrArray))
|
|
15
|
-
return instanceLinkOrArray.map(pluckInstance);
|
|
16
|
-
return pluckInstance(instanceLinkOrArray);
|
|
17
|
-
}
|
|
18
|
-
async resolvePerContext(typeOrToken, contextModule, contextId, options) {
|
|
19
|
-
const instanceLinkOrArray = options?.strict
|
|
20
|
-
? this.instanceLinksHost.get(typeOrToken, {
|
|
21
|
-
moduleId: contextModule.id,
|
|
22
|
-
each: options.each,
|
|
23
|
-
})
|
|
24
|
-
: this.instanceLinksHost.get(typeOrToken, {
|
|
25
|
-
each: options?.each ? options.each : false,
|
|
26
|
-
});
|
|
27
|
-
const pluckInstance = async (instanceLink) => {
|
|
28
|
-
const { wrapperRef, collection } = instanceLink;
|
|
29
|
-
if (wrapperRef.isDependencyTreeStatic() && !wrapperRef.isTransient)
|
|
30
|
-
return this.get(typeOrToken, { strict: options?.strict });
|
|
31
|
-
const ctorHost = wrapperRef.instance || { constructor: typeOrToken };
|
|
32
|
-
const instance = await this.injector.loadPerContext(ctorHost, wrapperRef.host, collection, contextId, wrapperRef);
|
|
33
|
-
if (!instance)
|
|
34
|
-
throw new exceptions_1.UnknownElementException();
|
|
35
|
-
return instance;
|
|
36
|
-
};
|
|
37
|
-
if (Array.isArray(instanceLinkOrArray)) {
|
|
38
|
-
return Promise.all(instanceLinkOrArray.map((instanceLink) => pluckInstance(instanceLink)));
|
|
39
|
-
}
|
|
40
|
-
return pluckInstance(instanceLinkOrArray);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.AbstractInstanceResolver = AbstractInstanceResolver;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { FactoryProvider, InjectionToken, Provider } from "@venok/core/interfaces/modules";
|
|
2
|
-
import { Module } from "@venok/core/injector/module/module";
|
|
3
|
-
import { EnhancerSubtype } from "@venok/core/constants";
|
|
4
|
-
import { Scope, Type } from "@venok/core/interfaces";
|
|
5
|
-
import { SettlementSignal } from "@venok/core/injector/settlement-signal";
|
|
6
|
-
export declare const INSTANCE_METADATA_SYMBOL: unique symbol;
|
|
7
|
-
export declare const INSTANCE_ID_SYMBOL: unique symbol;
|
|
8
|
-
export interface HostComponentInfo {
|
|
9
|
-
/**
|
|
10
|
-
* Injection token (or class reference)
|
|
11
|
-
*/
|
|
12
|
-
token: InjectionToken;
|
|
13
|
-
/**
|
|
14
|
-
* Flag that indicates whether DI subtree is durable
|
|
15
|
-
*/
|
|
16
|
-
isTreeDurable: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface ContextId {
|
|
19
|
-
readonly id: number;
|
|
20
|
-
payload?: unknown;
|
|
21
|
-
getParent?(info: HostComponentInfo): ContextId;
|
|
22
|
-
}
|
|
23
|
-
export interface InstancePerContext<T> {
|
|
24
|
-
instance: T | undefined;
|
|
25
|
-
isResolved?: boolean;
|
|
26
|
-
isPending?: boolean;
|
|
27
|
-
donePromise?: Promise<unknown>;
|
|
28
|
-
[INSTANCE_ID_SYMBOL]?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface PropertyMetadata {
|
|
31
|
-
key: symbol | string;
|
|
32
|
-
wrapper: InstanceWrapper;
|
|
33
|
-
}
|
|
34
|
-
export declare class InstanceWrapper<T = any> {
|
|
35
|
-
readonly isAlias: boolean;
|
|
36
|
-
scope?: Scope;
|
|
37
|
-
readonly name: string;
|
|
38
|
-
readonly token: InjectionToken;
|
|
39
|
-
readonly async?: boolean;
|
|
40
|
-
readonly host?: Module;
|
|
41
|
-
readonly subtype?: EnhancerSubtype;
|
|
42
|
-
metatype?: Type<T> | Function | null;
|
|
43
|
-
inject?: FactoryProvider["inject"] | null;
|
|
44
|
-
forwardRef?: boolean;
|
|
45
|
-
durable?: boolean;
|
|
46
|
-
initTime?: number;
|
|
47
|
-
settlementSignal?: SettlementSignal;
|
|
48
|
-
private static logger;
|
|
49
|
-
private readonly values;
|
|
50
|
-
private readonly [INSTANCE_METADATA_SYMBOL];
|
|
51
|
-
private readonly [INSTANCE_ID_SYMBOL];
|
|
52
|
-
private transientMap;
|
|
53
|
-
private isTreeStatic;
|
|
54
|
-
private isTreeDurable;
|
|
55
|
-
constructor(metadata?: Partial<InstanceWrapper<T>> & Partial<InstancePerContext<T>>);
|
|
56
|
-
get id(): string;
|
|
57
|
-
set instance(value: T);
|
|
58
|
-
get instance(): T | undefined;
|
|
59
|
-
get isNotMetatype(): boolean;
|
|
60
|
-
get isFactory(): boolean;
|
|
61
|
-
get isTransient(): boolean;
|
|
62
|
-
getInstanceByContextId(contextId: ContextId, inquirerId?: string): InstancePerContext<T>;
|
|
63
|
-
getInstanceByInquirerId(contextId: ContextId, inquirerId: string): InstancePerContext<T>;
|
|
64
|
-
setInstanceByContextId(contextId: ContextId, value: InstancePerContext<T>, inquirerId?: string): void;
|
|
65
|
-
setInstanceByInquirerId(contextId: ContextId, inquirerId: string, value: InstancePerContext<T>): void;
|
|
66
|
-
addCtorMetadata(index: number, wrapper: InstanceWrapper): void;
|
|
67
|
-
getCtorMetadata(): InstanceWrapper[];
|
|
68
|
-
addPropertiesMetadata(key: symbol | string, wrapper: InstanceWrapper): void;
|
|
69
|
-
getPropertiesMetadata(): PropertyMetadata[];
|
|
70
|
-
addEnhancerMetadata(wrapper: InstanceWrapper): void;
|
|
71
|
-
getEnhancersMetadata(): InstanceWrapper[];
|
|
72
|
-
isDependencyTreeDurable(lookupRegistry?: string[]): boolean;
|
|
73
|
-
introspectDepsAttribute(callback: (collection: InstanceWrapper[], lookupRegistry: string[]) => boolean, lookupRegistry?: string[]): boolean;
|
|
74
|
-
isDependencyTreeStatic(lookupRegistry?: string[]): boolean;
|
|
75
|
-
cloneStaticInstance(contextId: ContextId): InstancePerContext<T>;
|
|
76
|
-
cloneTransientInstance(contextId: ContextId, inquirerId: string): InstancePerContext<T>;
|
|
77
|
-
createPrototype(contextId: ContextId): any;
|
|
78
|
-
isInRequestScope(contextId: ContextId, inquirer?: InstanceWrapper | undefined): boolean;
|
|
79
|
-
isLazyTransient(contextId: ContextId, inquirer: InstanceWrapper | undefined): boolean;
|
|
80
|
-
isExplicitlyRequested(contextId: ContextId, inquirer?: InstanceWrapper): boolean;
|
|
81
|
-
isStatic(contextId: ContextId, inquirer: InstanceWrapper | undefined): boolean;
|
|
82
|
-
getStaticTransientInstances(): InstancePerContext<T>[];
|
|
83
|
-
mergeWith(provider: Provider): void;
|
|
84
|
-
private isNewable;
|
|
85
|
-
private initialize;
|
|
86
|
-
private printIntrospectedAsRequestScoped;
|
|
87
|
-
private printIntrospectedAsDurable;
|
|
88
|
-
private isDebugMode;
|
|
89
|
-
private generateUuid;
|
|
90
|
-
}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.InstanceWrapper = exports.INSTANCE_ID_SYMBOL = exports.INSTANCE_METADATA_SYMBOL = void 0;
|
|
5
|
-
const interfaces_1 = require("@venok/core/interfaces");
|
|
6
|
-
const constants_1 = require("@venok/core/injector/constants");
|
|
7
|
-
const shared_helper_1 = require("@venok/core/helpers/shared.helper");
|
|
8
|
-
const uuid_helper_1 = require("@venok/core/helpers/uuid.helper");
|
|
9
|
-
const random_string_generator_helper_1 = require("@venok/core/helpers/random-string-generator.helper");
|
|
10
|
-
const color_helper_1 = require("@venok/core/helpers/color.helper");
|
|
11
|
-
const classifier_helper_1 = require("@venok/core/injector/helpers/classifier.helper");
|
|
12
|
-
const logger_service_1 = require("@venok/core/services/logger.service");
|
|
13
|
-
exports.INSTANCE_METADATA_SYMBOL = Symbol.for("instance_metadata:cache");
|
|
14
|
-
exports.INSTANCE_ID_SYMBOL = Symbol.for("instance_metadata:id");
|
|
15
|
-
class InstanceWrapper {
|
|
16
|
-
constructor(metadata = {}) {
|
|
17
|
-
this.isAlias = false;
|
|
18
|
-
this.scope = interfaces_1.Scope.DEFAULT;
|
|
19
|
-
this.values = new WeakMap();
|
|
20
|
-
this[_a] = {};
|
|
21
|
-
this.transientMap = new Map();
|
|
22
|
-
this.initialize(metadata);
|
|
23
|
-
this[exports.INSTANCE_ID_SYMBOL] = metadata[exports.INSTANCE_ID_SYMBOL] ?? this.generateUuid();
|
|
24
|
-
}
|
|
25
|
-
get id() {
|
|
26
|
-
return this[exports.INSTANCE_ID_SYMBOL];
|
|
27
|
-
}
|
|
28
|
-
set instance(value) {
|
|
29
|
-
this.values.set(constants_1.STATIC_CONTEXT, { instance: value });
|
|
30
|
-
}
|
|
31
|
-
get instance() {
|
|
32
|
-
const instancePerContext = this.getInstanceByContextId(constants_1.STATIC_CONTEXT);
|
|
33
|
-
return instancePerContext.instance;
|
|
34
|
-
}
|
|
35
|
-
get isNotMetatype() {
|
|
36
|
-
return !this.metatype || this.isFactory;
|
|
37
|
-
}
|
|
38
|
-
get isFactory() {
|
|
39
|
-
return !!(this.metatype && !(0, shared_helper_1.isNull)(this.inject));
|
|
40
|
-
}
|
|
41
|
-
get isTransient() {
|
|
42
|
-
return this.scope === interfaces_1.Scope.TRANSIENT;
|
|
43
|
-
}
|
|
44
|
-
getInstanceByContextId(contextId, inquirerId) {
|
|
45
|
-
if (this.scope === interfaces_1.Scope.TRANSIENT && inquirerId) {
|
|
46
|
-
return this.getInstanceByInquirerId(contextId, inquirerId);
|
|
47
|
-
}
|
|
48
|
-
const instancePerContext = this.values.get(contextId);
|
|
49
|
-
return instancePerContext ? instancePerContext : this.cloneStaticInstance(contextId);
|
|
50
|
-
}
|
|
51
|
-
getInstanceByInquirerId(contextId, inquirerId) {
|
|
52
|
-
let collectionPerContext = this.transientMap.get(inquirerId);
|
|
53
|
-
if (!collectionPerContext) {
|
|
54
|
-
collectionPerContext = new WeakMap();
|
|
55
|
-
this.transientMap.set(inquirerId, collectionPerContext);
|
|
56
|
-
}
|
|
57
|
-
const instancePerContext = collectionPerContext.get(contextId);
|
|
58
|
-
return instancePerContext ? instancePerContext : this.cloneTransientInstance(contextId, inquirerId);
|
|
59
|
-
}
|
|
60
|
-
setInstanceByContextId(contextId, value, inquirerId) {
|
|
61
|
-
if (this.scope === interfaces_1.Scope.TRANSIENT && inquirerId) {
|
|
62
|
-
return this.setInstanceByInquirerId(contextId, inquirerId, value);
|
|
63
|
-
}
|
|
64
|
-
this.values.set(contextId, value);
|
|
65
|
-
}
|
|
66
|
-
setInstanceByInquirerId(contextId, inquirerId, value) {
|
|
67
|
-
let collection = this.transientMap.get(inquirerId);
|
|
68
|
-
if (!collection) {
|
|
69
|
-
collection = new WeakMap();
|
|
70
|
-
this.transientMap.set(inquirerId, collection);
|
|
71
|
-
}
|
|
72
|
-
collection.set(contextId, value);
|
|
73
|
-
}
|
|
74
|
-
addCtorMetadata(index, wrapper) {
|
|
75
|
-
if (!this[exports.INSTANCE_METADATA_SYMBOL].dependencies) {
|
|
76
|
-
this[exports.INSTANCE_METADATA_SYMBOL].dependencies = [];
|
|
77
|
-
}
|
|
78
|
-
this[exports.INSTANCE_METADATA_SYMBOL].dependencies[index] = wrapper;
|
|
79
|
-
}
|
|
80
|
-
getCtorMetadata() {
|
|
81
|
-
return this[exports.INSTANCE_METADATA_SYMBOL].dependencies ?? [];
|
|
82
|
-
}
|
|
83
|
-
addPropertiesMetadata(key, wrapper) {
|
|
84
|
-
if (!this[exports.INSTANCE_METADATA_SYMBOL].properties) {
|
|
85
|
-
this[exports.INSTANCE_METADATA_SYMBOL].properties = [];
|
|
86
|
-
}
|
|
87
|
-
this[exports.INSTANCE_METADATA_SYMBOL].properties.push({
|
|
88
|
-
key,
|
|
89
|
-
wrapper,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
getPropertiesMetadata() {
|
|
93
|
-
return this[exports.INSTANCE_METADATA_SYMBOL].properties ?? [];
|
|
94
|
-
}
|
|
95
|
-
addEnhancerMetadata(wrapper) {
|
|
96
|
-
if (!this[exports.INSTANCE_METADATA_SYMBOL].enhancers) {
|
|
97
|
-
this[exports.INSTANCE_METADATA_SYMBOL].enhancers = [];
|
|
98
|
-
}
|
|
99
|
-
this[exports.INSTANCE_METADATA_SYMBOL].enhancers.push(wrapper);
|
|
100
|
-
}
|
|
101
|
-
getEnhancersMetadata() {
|
|
102
|
-
return this[exports.INSTANCE_METADATA_SYMBOL].enhancers ?? [];
|
|
103
|
-
}
|
|
104
|
-
isDependencyTreeDurable(lookupRegistry = []) {
|
|
105
|
-
if (!(0, shared_helper_1.isUndefined)(this.isTreeDurable)) {
|
|
106
|
-
return this.isTreeDurable;
|
|
107
|
-
}
|
|
108
|
-
if (this.scope === interfaces_1.Scope.REQUEST) {
|
|
109
|
-
this.isTreeDurable = this.durable === undefined ? false : this.durable;
|
|
110
|
-
if (this.isTreeDurable) {
|
|
111
|
-
this.printIntrospectedAsDurable();
|
|
112
|
-
}
|
|
113
|
-
return this.isTreeDurable;
|
|
114
|
-
}
|
|
115
|
-
const isStatic = this.isDependencyTreeStatic();
|
|
116
|
-
if (isStatic)
|
|
117
|
-
return false;
|
|
118
|
-
const isTreeNonDurable = this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic() && !item.isDependencyTreeDurable(registry)), lookupRegistry);
|
|
119
|
-
this.isTreeDurable = !isTreeNonDurable;
|
|
120
|
-
if (this.isTreeDurable)
|
|
121
|
-
this.printIntrospectedAsDurable();
|
|
122
|
-
return this.isTreeDurable;
|
|
123
|
-
}
|
|
124
|
-
introspectDepsAttribute(callback, lookupRegistry = []) {
|
|
125
|
-
if (lookupRegistry.includes(this[exports.INSTANCE_ID_SYMBOL])) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
lookupRegistry = lookupRegistry.concat(this[exports.INSTANCE_ID_SYMBOL]);
|
|
129
|
-
const { dependencies, properties, enhancers } = this[exports.INSTANCE_METADATA_SYMBOL];
|
|
130
|
-
let introspectionResult = dependencies ? callback(dependencies, lookupRegistry) : false;
|
|
131
|
-
if (introspectionResult || !(properties || enhancers))
|
|
132
|
-
return introspectionResult;
|
|
133
|
-
introspectionResult = properties
|
|
134
|
-
? callback(properties.map((item) => item.wrapper), lookupRegistry)
|
|
135
|
-
: false;
|
|
136
|
-
if (introspectionResult || !enhancers)
|
|
137
|
-
return introspectionResult;
|
|
138
|
-
return enhancers ? callback(enhancers, lookupRegistry) : false;
|
|
139
|
-
}
|
|
140
|
-
isDependencyTreeStatic(lookupRegistry = []) {
|
|
141
|
-
if (!(0, shared_helper_1.isUndefined)(this.isTreeStatic))
|
|
142
|
-
return this.isTreeStatic;
|
|
143
|
-
if (this.scope === interfaces_1.Scope.REQUEST) {
|
|
144
|
-
this.isTreeStatic = false;
|
|
145
|
-
this.printIntrospectedAsRequestScoped();
|
|
146
|
-
return this.isTreeStatic;
|
|
147
|
-
}
|
|
148
|
-
this.isTreeStatic = !this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic(registry)), lookupRegistry);
|
|
149
|
-
if (!this.isTreeStatic)
|
|
150
|
-
this.printIntrospectedAsRequestScoped();
|
|
151
|
-
return this.isTreeStatic;
|
|
152
|
-
}
|
|
153
|
-
cloneStaticInstance(contextId) {
|
|
154
|
-
const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT);
|
|
155
|
-
if (this.isDependencyTreeStatic())
|
|
156
|
-
return staticInstance;
|
|
157
|
-
const instancePerContext = {
|
|
158
|
-
...staticInstance,
|
|
159
|
-
instance: undefined,
|
|
160
|
-
isResolved: false,
|
|
161
|
-
isPending: false,
|
|
162
|
-
};
|
|
163
|
-
if (this.isNewable())
|
|
164
|
-
instancePerContext.instance = Object.create(this.metatype.prototype);
|
|
165
|
-
this.setInstanceByContextId(contextId, instancePerContext);
|
|
166
|
-
return instancePerContext;
|
|
167
|
-
}
|
|
168
|
-
cloneTransientInstance(contextId, inquirerId) {
|
|
169
|
-
const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT);
|
|
170
|
-
const instancePerContext = {
|
|
171
|
-
...staticInstance,
|
|
172
|
-
instance: undefined,
|
|
173
|
-
isResolved: false,
|
|
174
|
-
isPending: false,
|
|
175
|
-
};
|
|
176
|
-
if (this.isNewable()) {
|
|
177
|
-
instancePerContext.instance = Object.create(this.metatype.prototype);
|
|
178
|
-
}
|
|
179
|
-
this.setInstanceByInquirerId(contextId, inquirerId, instancePerContext);
|
|
180
|
-
return instancePerContext;
|
|
181
|
-
}
|
|
182
|
-
createPrototype(contextId) {
|
|
183
|
-
const host = this.getInstanceByContextId(contextId);
|
|
184
|
-
if (!this.isNewable() || host.isResolved)
|
|
185
|
-
return;
|
|
186
|
-
return Object.create(this.metatype.prototype);
|
|
187
|
-
}
|
|
188
|
-
isInRequestScope(contextId, inquirer) {
|
|
189
|
-
const isDependencyTreeStatic = this.isDependencyTreeStatic();
|
|
190
|
-
return (!isDependencyTreeStatic && contextId !== constants_1.STATIC_CONTEXT && (!this.isTransient || (this.isTransient && !!inquirer)));
|
|
191
|
-
}
|
|
192
|
-
isLazyTransient(contextId, inquirer) {
|
|
193
|
-
const isInquirerRequestScoped = inquirer && !inquirer.isDependencyTreeStatic();
|
|
194
|
-
return (this.isDependencyTreeStatic() && contextId !== constants_1.STATIC_CONTEXT && this.isTransient && !!isInquirerRequestScoped);
|
|
195
|
-
}
|
|
196
|
-
isExplicitlyRequested(contextId, inquirer) {
|
|
197
|
-
const isSelfRequested = inquirer === this;
|
|
198
|
-
return (this.isDependencyTreeStatic() &&
|
|
199
|
-
contextId !== constants_1.STATIC_CONTEXT &&
|
|
200
|
-
!!(isSelfRequested || (inquirer && inquirer.scope === interfaces_1.Scope.TRANSIENT)));
|
|
201
|
-
}
|
|
202
|
-
isStatic(contextId, inquirer) {
|
|
203
|
-
const isInquirerRequestScoped = inquirer && !inquirer.isDependencyTreeStatic();
|
|
204
|
-
const isStaticTransient = this.isTransient && !isInquirerRequestScoped;
|
|
205
|
-
return (this.isDependencyTreeStatic() &&
|
|
206
|
-
contextId === constants_1.STATIC_CONTEXT &&
|
|
207
|
-
(!this.isTransient || (isStaticTransient && !!inquirer && !inquirer.isTransient)));
|
|
208
|
-
}
|
|
209
|
-
getStaticTransientInstances() {
|
|
210
|
-
if (!this.transientMap)
|
|
211
|
-
return [];
|
|
212
|
-
const instances = [...this.transientMap.values()];
|
|
213
|
-
return instances.map((item) => item.get(constants_1.STATIC_CONTEXT)).filter(Boolean);
|
|
214
|
-
}
|
|
215
|
-
mergeWith(provider) {
|
|
216
|
-
if ((0, classifier_helper_1.isValueProvider)(provider)) {
|
|
217
|
-
// @ts-ignore
|
|
218
|
-
this.metatype = null;
|
|
219
|
-
this.inject = null;
|
|
220
|
-
this.scope = interfaces_1.Scope.DEFAULT;
|
|
221
|
-
this.setInstanceByContextId(constants_1.STATIC_CONTEXT, {
|
|
222
|
-
instance: provider.useValue,
|
|
223
|
-
isResolved: true,
|
|
224
|
-
isPending: false,
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
else if ((0, classifier_helper_1.isClassProvider)(provider)) {
|
|
228
|
-
this.inject = null;
|
|
229
|
-
this.metatype = provider.useClass;
|
|
230
|
-
}
|
|
231
|
-
else if ((0, classifier_helper_1.isFactoryProvider)(provider)) {
|
|
232
|
-
this.metatype = provider.useFactory;
|
|
233
|
-
this.inject = provider.inject || [];
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
isNewable() {
|
|
237
|
-
return (0, shared_helper_1.isNull)(this.inject) && this.metatype && this.metatype.prototype;
|
|
238
|
-
}
|
|
239
|
-
initialize(metadata) {
|
|
240
|
-
const { instance, isResolved, ...wrapperPartial } = metadata;
|
|
241
|
-
Object.assign(this, wrapperPartial);
|
|
242
|
-
this.setInstanceByContextId(constants_1.STATIC_CONTEXT, { instance, isResolved });
|
|
243
|
-
this.scope === interfaces_1.Scope.TRANSIENT && (this.transientMap = new Map());
|
|
244
|
-
}
|
|
245
|
-
printIntrospectedAsRequestScoped() {
|
|
246
|
-
if (!this.isDebugMode() || this.name === "REQUEST") {
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
if ((0, shared_helper_1.isString)(this.name)) {
|
|
250
|
-
InstanceWrapper.logger.log(`${color_helper_1.colors.cyanBright(this.name)}${color_helper_1.colors.green(" introspected as ")}${color_helper_1.colors.magentaBright("request-scoped")}`);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
printIntrospectedAsDurable() {
|
|
254
|
-
if (!this.isDebugMode()) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
if ((0, shared_helper_1.isString)(this.name)) {
|
|
258
|
-
InstanceWrapper.logger.log(`${color_helper_1.colors.cyanBright(this.name)}${color_helper_1.colors.green(" introspected as ")}${color_helper_1.colors.magentaBright("durable")}`);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
isDebugMode() {
|
|
262
|
-
return !!process.env.VENOK_DEBUG;
|
|
263
|
-
}
|
|
264
|
-
generateUuid() {
|
|
265
|
-
let key = this.name?.toString() ?? this.token?.toString();
|
|
266
|
-
key += this.host?.name ?? "";
|
|
267
|
-
return key ? uuid_helper_1.UuidFactory.get(key) : (0, random_string_generator_helper_1.randomStringGenerator)();
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
exports.InstanceWrapper = InstanceWrapper;
|
|
271
|
-
_a = exports.INSTANCE_METADATA_SYMBOL;
|
|
272
|
-
InstanceWrapper.logger = new logger_service_1.Logger(InstanceWrapper.name);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.inquirerProvider = exports.requestProvider = exports.ReflectorAliasProvider = void 0;
|
|
4
|
-
const services_1 = require("@venok/core/services");
|
|
5
|
-
const constants_1 = require("@venok/core/constants");
|
|
6
|
-
const interfaces_1 = require("@venok/core/interfaces");
|
|
7
|
-
const noop_helper_1 = require("@venok/core/helpers/noop.helper");
|
|
8
|
-
exports.ReflectorAliasProvider = {
|
|
9
|
-
provide: services_1.Reflector.name,
|
|
10
|
-
useExisting: services_1.Reflector,
|
|
11
|
-
};
|
|
12
|
-
exports.requestProvider = {
|
|
13
|
-
provide: constants_1.REQUEST,
|
|
14
|
-
scope: interfaces_1.Scope.REQUEST,
|
|
15
|
-
useFactory: noop_helper_1.noop,
|
|
16
|
-
};
|
|
17
|
-
exports.inquirerProvider = {
|
|
18
|
-
provide: constants_1.INQUIRER,
|
|
19
|
-
scope: interfaces_1.Scope.TRANSIENT,
|
|
20
|
-
useFactory: noop_helper_1.noop,
|
|
21
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { VenokContainer } from "@venok/core/injector/container";
|
|
2
|
-
import { DependenciesScanner } from "@venok/core/scanner";
|
|
3
|
-
import { ModuleCompiler } from "@venok/core/injector/module/compiler";
|
|
4
|
-
import { GraphInspector } from "@venok/core/inspector/graph-inspector";
|
|
5
|
-
import { ModuleOverride } from "@venok/core/interfaces/modules/override.interface";
|
|
6
|
-
export declare class InternalCoreModuleFactory {
|
|
7
|
-
static create(container: VenokContainer, scanner: DependenciesScanner, moduleCompiler: ModuleCompiler, graphInspector: GraphInspector, moduleOverrides?: ModuleOverride[]): import("../..").DynamicModule;
|
|
8
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalCoreModuleFactory = void 0;
|
|
4
|
-
const container_1 = require("@venok/core/injector/container");
|
|
5
|
-
const logger_service_1 = require("@venok/core/services/logger.service");
|
|
6
|
-
const loader_1 = require("@venok/core/injector/module/lazy/loader");
|
|
7
|
-
const injector_1 = require("@venok/core/injector/injector");
|
|
8
|
-
const loader_2 = require("@venok/core/injector/instance/loader");
|
|
9
|
-
const internal_core_module_1 = require("@venok/core/injector/internal-core-module/internal-core-module");
|
|
10
|
-
const container_2 = require("@venok/core/injector/module/container");
|
|
11
|
-
const serialized_graph_1 = require("@venok/core/inspector/serialized-graph");
|
|
12
|
-
const context_1 = require("@venok/core/context/context");
|
|
13
|
-
class InternalCoreModuleFactory {
|
|
14
|
-
static create(container, scanner, moduleCompiler, graphInspector, moduleOverrides) {
|
|
15
|
-
const lazyModuleLoaderFactory = () => {
|
|
16
|
-
const logger = new logger_service_1.Logger(loader_1.LazyModuleLoader.name, {
|
|
17
|
-
timestamp: false,
|
|
18
|
-
});
|
|
19
|
-
const injector = new injector_1.Injector();
|
|
20
|
-
const instanceLoader = new loader_2.InstanceLoader(container, injector, graphInspector, logger);
|
|
21
|
-
return new loader_1.LazyModuleLoader(scanner, instanceLoader, moduleCompiler, container.getModules(), moduleOverrides);
|
|
22
|
-
};
|
|
23
|
-
return internal_core_module_1.InternalCoreModule.register([
|
|
24
|
-
{
|
|
25
|
-
provide: container_1.VenokContainer,
|
|
26
|
-
useValue: container,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
provide: context_1.VenokContextCreator,
|
|
30
|
-
useValue: context_1.VenokContextCreator.fromContainer(container),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
provide: container_2.ModulesContainer,
|
|
34
|
-
useValue: container.getModules(),
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
provide: loader_1.LazyModuleLoader,
|
|
38
|
-
useFactory: lazyModuleLoaderFactory,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
provide: serialized_graph_1.SerializedGraph,
|
|
42
|
-
useValue: container.serializedGraph,
|
|
43
|
-
},
|
|
44
|
-
]);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.InternalCoreModuleFactory = InternalCoreModuleFactory;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var InternalCoreModule_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.InternalCoreModule = void 0;
|
|
11
|
-
const services_1 = require("@venok/core/services");
|
|
12
|
-
const global_decorator_1 = require("@venok/core/decorators/global.decorator");
|
|
13
|
-
const module_decorator_1 = require("@venok/core/decorators/module.decorator");
|
|
14
|
-
const core_providers_1 = require("@venok/core/injector/internal-core-module/core-providers");
|
|
15
|
-
let InternalCoreModule = InternalCoreModule_1 = class InternalCoreModule {
|
|
16
|
-
static register(providers) {
|
|
17
|
-
return {
|
|
18
|
-
module: InternalCoreModule_1,
|
|
19
|
-
providers: [...providers],
|
|
20
|
-
exports: [...providers.map((item) => item.provide)],
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.InternalCoreModule = InternalCoreModule;
|
|
25
|
-
exports.InternalCoreModule = InternalCoreModule = InternalCoreModule_1 = __decorate([
|
|
26
|
-
(0, global_decorator_1.Global)(),
|
|
27
|
-
(0, module_decorator_1.Module)({
|
|
28
|
-
providers: [services_1.Reflector, core_providers_1.ReflectorAliasProvider, core_providers_1.requestProvider, core_providers_1.inquirerProvider],
|
|
29
|
-
exports: [services_1.Reflector, core_providers_1.ReflectorAliasProvider, core_providers_1.requestProvider, core_providers_1.inquirerProvider],
|
|
30
|
-
})
|
|
31
|
-
], InternalCoreModule);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Type } from "@venok/core/interfaces";
|
|
2
|
-
import { DynamicModule } from "@venok/core/interfaces/modules/dynamic-module.interface";
|
|
3
|
-
import { ForwardReference } from "@venok/core/interfaces/modules/forward-reference.interface";
|
|
4
|
-
import { TokenFactory } from "@venok/core/injector/module/token-factory";
|
|
5
|
-
export interface ModuleFactory {
|
|
6
|
-
type: Type;
|
|
7
|
-
token: string;
|
|
8
|
-
dynamicMetadata?: Partial<DynamicModule>;
|
|
9
|
-
}
|
|
10
|
-
export declare class ModuleCompiler {
|
|
11
|
-
private readonly moduleTokenFactory;
|
|
12
|
-
constructor(moduleTokenFactory?: TokenFactory);
|
|
13
|
-
compile(metatype: Type | DynamicModule | Promise<DynamicModule>): Promise<ModuleFactory>;
|
|
14
|
-
extractMetadata(metatype: Type | ForwardReference | DynamicModule): {
|
|
15
|
-
type: Type;
|
|
16
|
-
dynamicMetadata?: Partial<DynamicModule> | undefined;
|
|
17
|
-
};
|
|
18
|
-
isDynamicModule(module: Type | DynamicModule | ForwardReference): module is DynamicModule;
|
|
19
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleCompiler = void 0;
|
|
4
|
-
const token_factory_1 = require("@venok/core/injector/module/token-factory");
|
|
5
|
-
class ModuleCompiler {
|
|
6
|
-
constructor(moduleTokenFactory = new token_factory_1.TokenFactory()) {
|
|
7
|
-
this.moduleTokenFactory = moduleTokenFactory;
|
|
8
|
-
}
|
|
9
|
-
async compile(metatype) {
|
|
10
|
-
const { type, dynamicMetadata } = this.extractMetadata(await metatype);
|
|
11
|
-
const token = this.moduleTokenFactory.create(type, dynamicMetadata);
|
|
12
|
-
return { type, dynamicMetadata, token };
|
|
13
|
-
}
|
|
14
|
-
extractMetadata(metatype) {
|
|
15
|
-
if (!this.isDynamicModule(metatype)) {
|
|
16
|
-
return {
|
|
17
|
-
type: metatype?.forwardRef ? metatype.forwardRef() : metatype,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const { module: type, ...dynamicMetadata } = metatype;
|
|
21
|
-
return { type, dynamicMetadata };
|
|
22
|
-
}
|
|
23
|
-
isDynamicModule(module) {
|
|
24
|
-
return !!module.module;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.ModuleCompiler = ModuleCompiler;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _ModulesContainer_applicationId;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ModulesContainer = void 0;
|
|
10
|
-
const uid_1 = require("uid");
|
|
11
|
-
class ModulesContainer extends Map {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
_ModulesContainer_applicationId.set(this, (0, uid_1.uid)(21));
|
|
15
|
-
}
|
|
16
|
-
get applicationId() {
|
|
17
|
-
return __classPrivateFieldGet(this, _ModulesContainer_applicationId, "f");
|
|
18
|
-
}
|
|
19
|
-
getById(id) {
|
|
20
|
-
return Array.from(this.values()).find((moduleRef) => moduleRef.id === id);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ModulesContainer = ModulesContainer;
|
|
24
|
-
_ModulesContainer_applicationId = new WeakMap();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { InstanceLoader } from "@venok/core/injector/instance/loader";
|
|
2
|
-
import { ModuleCompiler } from "@venok/core/injector/module/compiler";
|
|
3
|
-
import { ModulesContainer } from "@venok/core/injector/module/container";
|
|
4
|
-
import { DynamicModule } from "@venok/core/interfaces/modules";
|
|
5
|
-
import { Type } from "@venok/core/interfaces";
|
|
6
|
-
import { ModuleRef } from "@venok/core/injector/module/ref";
|
|
7
|
-
import { LazyModuleLoaderLoadOptions } from "@venok/core/injector/module/lazy/options";
|
|
8
|
-
import { ModuleOverride } from "@venok/core/interfaces/modules/override.interface";
|
|
9
|
-
import { DependenciesScanner } from "@venok/core/scanner";
|
|
10
|
-
export declare class LazyModuleLoader {
|
|
11
|
-
private readonly dependenciesScanner;
|
|
12
|
-
private readonly instanceLoader;
|
|
13
|
-
private readonly moduleCompiler;
|
|
14
|
-
private readonly modulesContainer;
|
|
15
|
-
private readonly moduleOverrides?;
|
|
16
|
-
constructor(dependenciesScanner: DependenciesScanner, instanceLoader: InstanceLoader, moduleCompiler: ModuleCompiler, modulesContainer: ModulesContainer, moduleOverrides?: ModuleOverride[] | undefined);
|
|
17
|
-
load(loaderFn: () => Promise<Type | DynamicModule> | Type | DynamicModule, loadOpts?: LazyModuleLoaderLoadOptions): Promise<ModuleRef>;
|
|
18
|
-
private registerLoggerConfiguration;
|
|
19
|
-
private createLazyModulesContainer;
|
|
20
|
-
private getTargetModuleRef;
|
|
21
|
-
}
|