@expressots/core 3.0.0 → 4.0.0-preview.3
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/LICENSE.md +21 -21
- package/README.md +66 -118
- package/lib/CHANGELOG.md +774 -739
- package/lib/README.md +66 -118
- package/lib/cjs/application/application-container.js +467 -33
- package/lib/cjs/application/application-factory.js +111 -5
- package/lib/cjs/application/application.types.js +32 -2
- package/lib/cjs/application/bootstrap.js +716 -0
- package/lib/cjs/application/index.js +10 -7
- package/lib/cjs/authorization/authorization-config.interface.js +2 -0
- package/lib/cjs/authorization/decorators/convenience.js +80 -0
- package/lib/cjs/authorization/guard-constants.js +12 -0
- package/lib/cjs/authorization/guard-decorators.js +159 -0
- package/lib/cjs/authorization/guard-executor.js +101 -0
- package/lib/cjs/authorization/guard-registry.js +133 -0
- package/lib/cjs/authorization/guard.interface.js +75 -0
- package/lib/cjs/authorization/guards/attribute-based.guard.js +109 -0
- package/lib/cjs/authorization/guards/authenticated.guard.js +49 -0
- package/lib/cjs/authorization/guards/composition.guard.js +67 -0
- package/lib/cjs/authorization/guards/conditional.guard.js +41 -0
- package/lib/cjs/authorization/guards/index.js +24 -0
- package/lib/cjs/authorization/guards/permission.guard.js +82 -0
- package/lib/cjs/authorization/guards/resource-owner.guard.js +61 -0
- package/lib/cjs/authorization/guards/role.guard.js +64 -0
- package/lib/cjs/authorization/index.js +40 -0
- package/lib/cjs/authorization/services/guard-cache.interface.js +2 -0
- package/lib/cjs/authorization/services/guard-cache.js +56 -0
- package/lib/cjs/authorization/services/permission-hierarchy.interface.js +2 -0
- package/lib/cjs/authorization/services/permission-hierarchy.js +54 -0
- package/lib/cjs/authorization/services/permission-service.interface.js +2 -0
- package/lib/cjs/authorization/services/permission-service.js +58 -0
- package/lib/cjs/authorization/services/security-context.interface.js +2 -0
- package/lib/cjs/authorization/services/security-context.js +75 -0
- package/lib/cjs/authorization/setup.js +141 -0
- package/lib/cjs/config/config-resolver.js +719 -0
- package/lib/cjs/config/config.interfaces.js +14 -0
- package/lib/cjs/config/define-config.js +495 -0
- package/lib/cjs/config/env-field-builders.js +449 -0
- package/lib/cjs/config/index.js +89 -0
- package/lib/cjs/config/secret-value.js +201 -0
- package/lib/cjs/console/color-codes.js +4 -0
- package/lib/cjs/console/console.js +72 -9
- package/lib/cjs/console/index.js +2 -2
- package/lib/cjs/container-module/container-module.js +257 -26
- package/lib/cjs/container-module/index.js +6 -4
- package/lib/cjs/decorator/index.js +1 -1
- package/lib/cjs/decorator/scope-binding.js +307 -16
- package/lib/cjs/di/annotation/decorator_utils.js +4 -4
- package/lib/cjs/di/annotation/inject.js +3 -3
- package/lib/cjs/di/annotation/inject_base.js +5 -5
- package/lib/cjs/di/annotation/injectable.js +2 -2
- package/lib/cjs/di/annotation/multi_inject.js +3 -3
- package/lib/cjs/di/annotation/named.js +4 -4
- package/lib/cjs/di/annotation/optional.js +4 -4
- package/lib/cjs/di/annotation/post_construct.js +4 -4
- package/lib/cjs/di/annotation/pre_destroy.js +4 -4
- package/lib/cjs/di/annotation/property_event_decorator.js +2 -2
- package/lib/cjs/di/annotation/tagged.js +3 -3
- package/lib/cjs/di/annotation/target_name.js +5 -5
- package/lib/cjs/di/annotation/unmanaged.js +5 -5
- package/lib/cjs/di/binding-decorator/constants.js +3 -0
- package/lib/cjs/di/binding-decorator/decorator/fluent_provide.js +7 -7
- package/lib/cjs/di/binding-decorator/decorator/provide.js +7 -7
- package/lib/cjs/di/binding-decorator/factory/module_factory.js +23 -4
- package/lib/cjs/di/binding-decorator/index.js +11 -9
- package/lib/cjs/di/binding-decorator/syntax/provide_done_syntax.js +7 -7
- package/lib/cjs/di/binding-decorator/syntax/provide_in_syntax.js +19 -12
- package/lib/cjs/di/binding-decorator/syntax/provide_in_when_on_syntax.js +3 -0
- package/lib/cjs/di/binding-decorator/syntax/provide_on_syntax.js +4 -4
- package/lib/cjs/di/binding-decorator/syntax/provide_when_syntax.js +30 -30
- package/lib/cjs/di/binding-decorator/utils/auto_wire.js +4 -4
- package/lib/cjs/di/bindings/binding.js +5 -6
- package/lib/cjs/di/constants/error_msgs.js +6 -2
- package/lib/cjs/di/constants/literal_types.js +3 -3
- package/lib/cjs/di/container/container.js +44 -44
- package/lib/cjs/di/container/container_module.js +3 -3
- package/lib/cjs/di/container/lookup.js +3 -3
- package/lib/cjs/di/container/module_activation_store.js +3 -3
- package/lib/cjs/di/container-introspection.js +42 -0
- package/lib/cjs/di/inversify.js +85 -52
- package/lib/cjs/di/planning/context.js +2 -2
- package/lib/cjs/di/planning/metadata.js +1 -1
- package/lib/cjs/di/planning/metadata_reader.js +1 -1
- package/lib/cjs/di/planning/planner.js +37 -37
- package/lib/cjs/di/planning/reflection_utils.js +12 -12
- package/lib/cjs/di/planning/request.js +2 -2
- package/lib/cjs/di/planning/target.js +10 -10
- package/lib/cjs/di/resolution/instantiation.js +13 -13
- package/lib/cjs/di/resolution/resolver.js +22 -22
- package/lib/cjs/di/scope/scope-registry.js +115 -0
- package/lib/cjs/di/scope/scope.js +38 -8
- package/lib/cjs/di/syntax/binding_in_syntax.js +18 -8
- package/lib/cjs/di/syntax/binding_in_when_on_syntax.js +9 -6
- package/lib/cjs/di/syntax/binding_on_syntax.js +3 -3
- package/lib/cjs/di/syntax/binding_to_syntax.js +27 -27
- package/lib/cjs/di/syntax/binding_when_on_syntax.js +4 -4
- package/lib/cjs/di/syntax/binding_when_syntax.js +30 -30
- package/lib/cjs/di/syntax/constraint_helpers.js +3 -3
- package/lib/cjs/di/utils/binding_utils.js +18 -18
- package/lib/cjs/di/utils/exceptions.js +1 -1
- package/lib/cjs/di/utils/serialization.js +1 -1
- package/lib/cjs/error/app-error.js +152 -8
- package/lib/cjs/error/base-exception-filter.js +135 -0
- package/lib/cjs/error/error-handler-middleware.js +7 -7
- package/lib/cjs/error/exception-filter-constants.js +12 -0
- package/lib/cjs/error/exception-filter-decorators.js +161 -0
- package/lib/cjs/error/exception-filter-registry.js +163 -0
- package/lib/cjs/error/exception-filter.interface.js +2 -0
- package/lib/cjs/error/exception-handler-middleware.js +378 -0
- package/lib/cjs/error/filters/app-error.filter.js +31 -0
- package/lib/cjs/error/filters/global-exception.filter.js +39 -0
- package/lib/cjs/error/filters/not-found.filter.js +35 -0
- package/lib/cjs/error/filters/validation-error.filter.js +35 -0
- package/lib/cjs/error/index.js +28 -7
- package/lib/cjs/error/not-found.error.js +17 -0
- package/lib/cjs/error/report.js +104 -9
- package/lib/cjs/error/status-code.js +20 -0
- package/lib/cjs/error/utils.js +247 -33
- package/lib/cjs/error/validation.error.js +18 -0
- package/lib/cjs/event/event-decorators.js +280 -0
- package/lib/cjs/event/event-emitter.js +373 -0
- package/lib/cjs/event/event-flow-tracker.js +236 -0
- package/lib/cjs/event/event-recorder.js +289 -0
- package/lib/cjs/event/event-registry.js +207 -0
- package/lib/cjs/event/event.interfaces.js +54 -0
- package/lib/cjs/event/index.js +80 -0
- package/lib/cjs/framework-version.js +10 -0
- package/lib/cjs/index.js +29 -8
- package/lib/cjs/interceptor/conditional-interceptor.js +108 -0
- package/lib/cjs/interceptor/execution-context.js +66 -0
- package/lib/cjs/interceptor/index.js +64 -0
- package/lib/cjs/interceptor/interceptor-composition.js +130 -0
- package/lib/cjs/interceptor/interceptor-constants.js +20 -0
- package/lib/cjs/interceptor/interceptor-decorators.js +155 -0
- package/lib/cjs/interceptor/interceptor-executor.js +140 -0
- package/lib/cjs/interceptor/interceptor-registry.js +159 -0
- package/lib/cjs/interceptor/interceptor.interface.js +20 -0
- package/lib/cjs/interceptor/interceptors/index.js +22 -0
- package/lib/cjs/interceptor/interceptors/logging.interceptor.js +70 -0
- package/lib/cjs/interceptor/interceptors/performance.interceptor.js +251 -0
- package/lib/cjs/interceptor/interceptors/timeout.interceptor.js +66 -0
- package/lib/cjs/lazy-loading/index.js +77 -0
- package/lib/cjs/lazy-loading/lazy-load-metrics.js +355 -0
- package/lib/cjs/lazy-loading/lazy-module-helpers.js +49 -0
- package/lib/cjs/lazy-loading/lazy-module-loader.js +311 -0
- package/lib/cjs/lazy-loading/lazy-module-manager.js +244 -0
- package/lib/cjs/lazy-loading/lazy-module-warmup.js +294 -0
- package/lib/cjs/lazy-loading/lazy-module.js +380 -0
- package/lib/cjs/lazy-loading/lazy.interfaces.js +18 -0
- package/lib/cjs/lifecycle/index.js +15 -0
- package/lib/cjs/lifecycle/lifecycle-registry.js +301 -0
- package/lib/cjs/lifecycle/lifecycle.interface.js +37 -0
- package/lib/cjs/middleware/content-negotiation/accept-header-parser.js +110 -0
- package/lib/cjs/middleware/content-negotiation/content-negotiation-service.js +288 -0
- package/lib/cjs/middleware/content-negotiation/formatter-registry.js +168 -0
- package/lib/cjs/middleware/content-negotiation/formatters/csv-formatter.js +114 -0
- package/lib/cjs/middleware/content-negotiation/formatters/index.js +16 -0
- package/lib/cjs/middleware/content-negotiation/formatters/json-formatter.js +34 -0
- package/lib/cjs/middleware/content-negotiation/formatters/plain-text-formatter.js +44 -0
- package/lib/cjs/middleware/content-negotiation/formatters/xml-formatter.js +124 -0
- package/lib/cjs/middleware/content-negotiation/formatters/yaml-formatter.js +134 -0
- package/lib/cjs/middleware/content-negotiation/index.js +27 -0
- package/lib/cjs/middleware/index.js +58 -30
- package/lib/cjs/middleware/interfaces/content-negotiation.interface.js +7 -0
- package/lib/cjs/middleware/middleware-config.js +10 -0
- package/lib/cjs/middleware/middleware-profiler.js +310 -0
- package/lib/cjs/middleware/middleware-registry.js +160 -0
- package/lib/cjs/middleware/middleware-resolver.js +318 -57
- package/lib/cjs/middleware/middleware-service.js +1692 -308
- package/lib/cjs/middleware/middleware-utils.js +280 -0
- package/lib/cjs/middleware/presets-standalone.js +93 -0
- package/lib/cjs/middleware/upload-registry.js +91 -0
- package/lib/cjs/path-resolver/index.js +252 -0
- package/lib/cjs/provider/db-in-memory/adapter/adapter.interface.js +10 -0
- package/lib/cjs/provider/db-in-memory/adapter/in-memory.adapter.js +688 -0
- package/lib/cjs/provider/db-in-memory/adapter/index.js +10 -0
- package/lib/cjs/provider/db-in-memory/base-repo.repository.js +4 -4
- package/lib/cjs/provider/db-in-memory/db-in-memory.provider.js +14 -18
- package/lib/cjs/provider/db-in-memory/db.provider.js +402 -0
- package/lib/cjs/provider/db-in-memory/index.js +125 -9
- package/lib/cjs/provider/db-in-memory/query/index.js +24 -0
- package/lib/cjs/provider/db-in-memory/query/query-engine.js +601 -0
- package/lib/cjs/provider/db-in-memory/query/query.types.js +10 -0
- package/lib/cjs/provider/db-in-memory/schema/decorators.js +420 -0
- package/lib/cjs/provider/db-in-memory/schema/entity.interface.js +9 -0
- package/lib/cjs/provider/db-in-memory/schema/index.js +21 -0
- package/lib/cjs/provider/db-in-memory/storage/index.js +16 -0
- package/lib/cjs/provider/db-in-memory/storage/memory-store.js +777 -0
- package/lib/cjs/provider/dto-validator/dto-validator.provider.js +8 -8
- package/lib/cjs/provider/dto-validator/package-resolver.js +2 -2
- package/lib/cjs/provider/index.js +14 -10
- package/lib/cjs/provider/logger/decorators/index.js +17 -0
- package/lib/cjs/provider/logger/decorators/log-performance.decorator.js +178 -0
- package/lib/cjs/provider/logger/index.js +35 -0
- package/lib/cjs/provider/logger/logger.banner.js +482 -0
- package/lib/cjs/provider/logger/logger.config.js +32 -0
- package/lib/cjs/provider/logger/logger.context.js +341 -0
- package/lib/cjs/provider/logger/logger.flow.js +255 -0
- package/lib/cjs/provider/logger/logger.formatter.js +697 -0
- package/lib/cjs/provider/logger/logger.grouping.js +319 -0
- package/lib/cjs/provider/logger/logger.health.js +295 -0
- package/lib/cjs/provider/logger/logger.metrics-collector.js +184 -0
- package/lib/cjs/provider/logger/logger.metrics.js +91 -0
- package/lib/cjs/provider/logger/logger.performance.js +300 -0
- package/lib/cjs/provider/logger/logger.provider.js +746 -73
- package/lib/cjs/provider/logger/logger.query.js +532 -0
- package/lib/cjs/provider/logger/logger.redaction.js +456 -0
- package/lib/cjs/provider/logger/logger.suggestions.js +480 -0
- package/lib/cjs/provider/logger/transports/console.transport.js +141 -0
- package/lib/cjs/provider/logger/transports/file.transport.js +296 -0
- package/lib/cjs/provider/logger/transports/http-server.js +141 -0
- package/lib/cjs/provider/logger/transports/http.transport.js +151 -0
- package/lib/cjs/provider/logger/transports/index.js +21 -0
- package/lib/cjs/provider/logger/transports/transport.interface.js +2 -0
- package/lib/cjs/provider/logger/utils/index.js +18 -0
- package/lib/cjs/provider/logger/utils/log-entry.js +26 -0
- package/lib/cjs/provider/logger/utils/log-levels.js +107 -0
- package/lib/cjs/provider/provider-manager.js +209 -16
- package/lib/cjs/provider/provider-registry.js +414 -0
- package/lib/cjs/provider/provider.interface.js +49 -0
- package/lib/cjs/provider/validation/adapters/class-validator.adapter.js +264 -0
- package/lib/cjs/provider/validation/adapters/index.js +21 -0
- package/lib/cjs/provider/validation/adapters/yup.adapter.js +118 -0
- package/lib/cjs/provider/validation/adapters/zod.adapter.js +137 -0
- package/lib/cjs/provider/validation/helpful-error-formatter.js +228 -0
- package/lib/cjs/provider/validation/index.js +39 -0
- package/lib/cjs/provider/validation/smart-field-detector.js +543 -0
- package/lib/cjs/provider/validation/type-inference.js +192 -0
- package/lib/cjs/provider/validation/validation-registry.js +220 -0
- package/lib/cjs/provider/validation/validation.interface.js +9 -0
- package/lib/cjs/render/adapters/base-adapter.js +134 -0
- package/lib/cjs/render/adapters/ejs-adapter.js +172 -0
- package/lib/cjs/render/adapters/handlebars-adapter.js +191 -0
- package/lib/cjs/render/adapters/index.js +20 -0
- package/lib/cjs/render/adapters/pug-adapter.js +164 -0
- package/lib/cjs/render/adapters/react-adapter.js +336 -0
- package/lib/cjs/render/features/auto-detection.js +228 -0
- package/lib/cjs/render/features/hot-reload.js +155 -0
- package/lib/cjs/render/features/index.js +20 -0
- package/lib/cjs/render/features/streaming.js +106 -0
- package/lib/cjs/render/features/type-generator.js +221 -0
- package/lib/cjs/render/features/view-debugger.js +194 -0
- package/lib/cjs/render/index.js +80 -0
- package/lib/cjs/render/presets/index.js +216 -0
- package/lib/cjs/render/render-config.js +10 -0
- package/lib/cjs/render/render-interface.js +2 -0
- package/lib/cjs/render/render-registry.js +130 -0
- package/lib/cjs/render/render-service.js +418 -0
- package/lib/cjs/render/utils/cache-manager.js +199 -0
- package/lib/cjs/render/utils/index.js +20 -0
- package/lib/cjs/render/utils/package-resolver.js +121 -0
- package/lib/cjs/render/utils/view-scanner.js +208 -0
- package/lib/cjs/testing/create-test-app.js +366 -0
- package/lib/cjs/testing/create-test-database.js +416 -0
- package/lib/cjs/testing/fluent-request.js +461 -0
- package/lib/cjs/testing/index.js +142 -0
- package/lib/cjs/testing/load-test.js +484 -0
- package/lib/cjs/testing/matchers.js +444 -0
- package/lib/cjs/testing/mock-context.js +406 -0
- package/lib/cjs/testing/mock-provider.js +339 -0
- package/lib/cjs/testing/snapshot-request.js +380 -0
- package/lib/cjs/testing/testing.interfaces.js +10 -0
- package/lib/cjs/types/application/application-container.d.ts +320 -20
- package/lib/cjs/types/application/application-factory.d.ts +105 -3
- package/lib/cjs/types/application/application.types.d.ts +177 -2
- package/lib/cjs/types/application/bootstrap.d.ts +656 -0
- package/lib/cjs/types/application/index.d.ts +4 -3
- package/lib/cjs/types/authorization/authorization-config.interface.d.ts +45 -0
- package/lib/cjs/types/authorization/decorators/convenience.d.ts +64 -0
- package/lib/cjs/types/authorization/guard-constants.d.ts +9 -0
- package/lib/cjs/types/authorization/guard-decorators.d.ts +128 -0
- package/lib/cjs/types/authorization/guard-executor.d.ts +26 -0
- package/lib/cjs/types/authorization/guard-registry.d.ts +35 -0
- package/lib/cjs/types/authorization/guard.interface.d.ts +335 -0
- package/lib/cjs/types/authorization/guards/attribute-based.guard.d.ts +60 -0
- package/lib/cjs/types/authorization/guards/authenticated.guard.d.ts +26 -0
- package/lib/cjs/types/authorization/guards/composition.guard.d.ts +42 -0
- package/lib/cjs/types/authorization/guards/conditional.guard.d.ts +21 -0
- package/lib/cjs/types/authorization/guards/index.d.ts +7 -0
- package/lib/cjs/types/authorization/guards/permission.guard.d.ts +29 -0
- package/lib/cjs/types/authorization/guards/resource-owner.guard.d.ts +29 -0
- package/lib/cjs/types/authorization/guards/role.guard.d.ts +28 -0
- package/lib/cjs/types/authorization/index.d.ts +18 -0
- package/lib/cjs/types/authorization/services/guard-cache.d.ts +26 -0
- package/lib/cjs/types/authorization/services/guard-cache.interface.d.ts +29 -0
- package/lib/cjs/types/authorization/services/permission-hierarchy.d.ts +21 -0
- package/lib/cjs/types/authorization/services/permission-hierarchy.interface.d.ts +22 -0
- package/lib/cjs/types/authorization/services/permission-service.d.ts +21 -0
- package/lib/cjs/types/authorization/services/permission-service.interface.d.ts +19 -0
- package/lib/cjs/types/authorization/services/security-context.d.ts +32 -0
- package/lib/cjs/types/authorization/services/security-context.interface.d.ts +25 -0
- package/lib/cjs/types/authorization/setup.d.ts +84 -0
- package/lib/cjs/types/config/config-resolver.d.ts +40 -0
- package/lib/cjs/types/config/config.interfaces.d.ts +576 -0
- package/lib/cjs/types/config/define-config.d.ts +109 -0
- package/lib/cjs/types/config/env-field-builders.d.ts +327 -0
- package/lib/cjs/types/config/index.d.ts +61 -0
- package/lib/cjs/types/config/secret-value.d.ts +99 -0
- package/lib/cjs/types/console/color-codes.d.ts +1 -1
- package/lib/cjs/types/console/console.d.ts +65 -2
- package/lib/cjs/types/console/index.d.ts +1 -1
- package/lib/cjs/types/container-module/container-module.d.ts +215 -8
- package/lib/cjs/types/container-module/index.d.ts +1 -1
- package/lib/cjs/types/decorator/index.d.ts +1 -1
- package/lib/cjs/types/decorator/scope-binding.d.ts +339 -11
- package/lib/cjs/types/di/annotation/decorator_utils.d.ts +1 -1
- package/lib/cjs/types/di/annotation/inject.d.ts +1 -1
- package/lib/cjs/types/di/annotation/inject_base.d.ts +2 -2
- package/lib/cjs/types/di/annotation/lazy_service_identifier.d.ts +1 -1
- package/lib/cjs/types/di/annotation/multi_inject.d.ts +1 -1
- package/lib/cjs/types/di/annotation/named.d.ts +1 -1
- package/lib/cjs/types/di/annotation/target_name.d.ts +1 -1
- package/lib/cjs/types/di/annotation/unmanaged.d.ts +1 -1
- package/lib/cjs/types/di/binding-decorator/constants.d.ts +3 -0
- package/lib/cjs/types/di/binding-decorator/decorator/fluent_provide.d.ts +2 -2
- package/lib/cjs/types/di/binding-decorator/decorator/provide.d.ts +1 -1
- package/lib/cjs/types/di/binding-decorator/factory/module_factory.d.ts +20 -1
- package/lib/cjs/types/di/binding-decorator/index.d.ts +6 -4
- package/lib/cjs/types/di/binding-decorator/interfaces/interfaces.d.ts +2 -1
- package/lib/cjs/types/di/binding-decorator/syntax/provide_done_syntax.d.ts +1 -1
- package/lib/cjs/types/di/binding-decorator/syntax/provide_in_syntax.d.ts +3 -2
- package/lib/cjs/types/di/binding-decorator/syntax/provide_in_when_on_syntax.d.ts +3 -2
- package/lib/cjs/types/di/binding-decorator/syntax/provide_on_syntax.d.ts +2 -2
- package/lib/cjs/types/di/binding-decorator/syntax/provide_when_on_syntax.d.ts +2 -2
- package/lib/cjs/types/di/binding-decorator/syntax/provide_when_syntax.d.ts +2 -2
- package/lib/cjs/types/di/binding-decorator/utils/auto_wire.d.ts +1 -1
- package/lib/cjs/types/di/bindings/binding.d.ts +1 -1
- package/lib/cjs/types/di/constants/literal_types.d.ts +3 -3
- package/lib/cjs/types/di/container/container.d.ts +1 -1
- package/lib/cjs/types/di/container/container_module.d.ts +1 -1
- package/lib/cjs/types/di/container/container_snapshot.d.ts +1 -1
- package/lib/cjs/types/di/container/lookup.d.ts +1 -1
- package/lib/cjs/types/di/container/module_activation_store.d.ts +1 -1
- package/lib/cjs/types/di/container-introspection.d.ts +25 -0
- package/lib/cjs/types/di/interfaces/interfaces.d.ts +4 -3
- package/lib/cjs/types/di/inversify.d.ts +53 -24
- package/lib/cjs/types/di/planning/context.d.ts +1 -1
- package/lib/cjs/types/di/planning/metadata.d.ts +1 -1
- package/lib/cjs/types/di/planning/metadata_reader.d.ts +1 -1
- package/lib/cjs/types/di/planning/plan.d.ts +1 -1
- package/lib/cjs/types/di/planning/planner.d.ts +1 -1
- package/lib/cjs/types/di/planning/queryable_string.d.ts +1 -1
- package/lib/cjs/types/di/planning/reflection_utils.d.ts +2 -2
- package/lib/cjs/types/di/planning/request.d.ts +1 -1
- package/lib/cjs/types/di/planning/target.d.ts +2 -2
- package/lib/cjs/types/di/resolution/instantiation.d.ts +1 -1
- package/lib/cjs/types/di/resolution/resolver.d.ts +1 -1
- package/lib/cjs/types/di/scope/scope-registry.d.ts +91 -0
- package/lib/cjs/types/di/scope/scope.d.ts +1 -1
- package/lib/cjs/types/di/syntax/binding_in_syntax.d.ts +2 -1
- package/lib/cjs/types/di/syntax/binding_in_when_on_syntax.d.ts +2 -1
- package/lib/cjs/types/di/syntax/binding_on_syntax.d.ts +1 -1
- package/lib/cjs/types/di/syntax/binding_to_syntax.d.ts +2 -2
- package/lib/cjs/types/di/syntax/binding_when_on_syntax.d.ts +1 -1
- package/lib/cjs/types/di/syntax/binding_when_syntax.d.ts +1 -1
- package/lib/cjs/types/di/syntax/constraint_helpers.d.ts +1 -1
- package/lib/cjs/types/di/utils/binding_utils.d.ts +1 -1
- package/lib/cjs/types/di/utils/clonable.d.ts +1 -1
- package/lib/cjs/types/di/utils/serialization.d.ts +1 -1
- package/lib/cjs/types/error/app-error.d.ts +155 -7
- package/lib/cjs/types/error/base-exception-filter.d.ts +73 -0
- package/lib/cjs/types/error/exception-filter-constants.d.ts +9 -0
- package/lib/cjs/types/error/exception-filter-decorators.d.ts +126 -0
- package/lib/cjs/types/error/exception-filter-registry.d.ts +38 -0
- package/lib/cjs/types/error/exception-filter.interface.d.ts +82 -0
- package/lib/cjs/types/error/exception-handler-middleware.d.ts +35 -0
- package/lib/cjs/types/error/filters/app-error.filter.d.ts +10 -0
- package/lib/cjs/types/error/filters/global-exception.filter.d.ts +9 -0
- package/lib/cjs/types/error/filters/not-found.filter.d.ts +10 -0
- package/lib/cjs/types/error/filters/validation-error.filter.d.ts +10 -0
- package/lib/cjs/types/error/index.d.ts +14 -3
- package/lib/cjs/types/error/not-found.error.d.ts +7 -0
- package/lib/cjs/types/error/report.d.ts +84 -6
- package/lib/cjs/types/error/status-code.d.ts +20 -0
- package/lib/cjs/types/error/utils.d.ts +16 -0
- package/lib/cjs/types/error/validation.error.d.ts +8 -0
- package/lib/cjs/types/event/event-decorators.d.ts +199 -0
- package/lib/cjs/types/event/event-emitter.d.ts +109 -0
- package/lib/cjs/types/event/event-flow-tracker.d.ts +88 -0
- package/lib/cjs/types/event/event-recorder.d.ts +121 -0
- package/lib/cjs/types/event/event-registry.d.ts +84 -0
- package/lib/cjs/types/event/event.interfaces.d.ts +528 -0
- package/lib/cjs/types/event/index.d.ts +55 -0
- package/lib/cjs/types/framework-version.d.ts +7 -0
- package/lib/cjs/types/index.d.ts +27 -8
- package/lib/cjs/types/interceptor/conditional-interceptor.d.ts +91 -0
- package/lib/cjs/types/interceptor/execution-context.d.ts +41 -0
- package/lib/cjs/types/interceptor/index.d.ts +41 -0
- package/lib/cjs/types/interceptor/interceptor-composition.d.ts +115 -0
- package/lib/cjs/types/interceptor/interceptor-constants.d.ts +17 -0
- package/lib/cjs/types/interceptor/interceptor-decorators.d.ts +124 -0
- package/lib/cjs/types/interceptor/interceptor-executor.d.ts +46 -0
- package/lib/cjs/types/interceptor/interceptor-registry.d.ts +65 -0
- package/lib/cjs/types/interceptor/interceptor.interface.d.ts +281 -0
- package/lib/cjs/types/interceptor/interceptors/index.d.ts +6 -0
- package/lib/cjs/types/interceptor/interceptors/logging.interceptor.d.ts +28 -0
- package/lib/cjs/types/interceptor/interceptors/performance.interceptor.d.ts +197 -0
- package/lib/cjs/types/interceptor/interceptors/timeout.interceptor.d.ts +42 -0
- package/lib/cjs/types/lazy-loading/index.d.ts +43 -0
- package/lib/cjs/types/lazy-loading/lazy-load-metrics.d.ts +139 -0
- package/lib/cjs/types/lazy-loading/lazy-module-helpers.d.ts +42 -0
- package/lib/cjs/types/lazy-loading/lazy-module-loader.d.ts +169 -0
- package/lib/cjs/types/lazy-loading/lazy-module-manager.d.ts +148 -0
- package/lib/cjs/types/lazy-loading/lazy-module-warmup.d.ts +130 -0
- package/lib/cjs/types/lazy-loading/lazy-module.d.ts +168 -0
- package/lib/cjs/types/lazy-loading/lazy.interfaces.d.ts +480 -0
- package/lib/cjs/types/lifecycle/index.d.ts +9 -0
- package/lib/cjs/types/lifecycle/lifecycle-registry.d.ts +213 -0
- package/lib/cjs/types/lifecycle/lifecycle.interface.d.ts +191 -0
- package/lib/cjs/types/middleware/content-negotiation/accept-header-parser.d.ts +26 -0
- package/lib/cjs/types/middleware/content-negotiation/content-negotiation-service.d.ts +64 -0
- package/lib/cjs/types/middleware/content-negotiation/formatter-registry.d.ts +60 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/csv-formatter.d.ts +34 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/index.d.ts +8 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/json-formatter.d.ts +14 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/plain-text-formatter.d.ts +12 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/xml-formatter.d.ts +26 -0
- package/lib/cjs/types/middleware/content-negotiation/formatters/yaml-formatter.d.ts +26 -0
- package/lib/cjs/types/middleware/content-negotiation/index.d.ts +7 -0
- package/lib/cjs/types/middleware/index.d.ts +25 -15
- package/lib/cjs/types/middleware/interfaces/content-negotiation.interface.d.ts +142 -0
- package/lib/cjs/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts +1 -1
- package/lib/cjs/types/middleware/middleware-config.d.ts +574 -0
- package/lib/cjs/types/middleware/middleware-interface.d.ts +594 -88
- package/lib/cjs/types/middleware/middleware-profiler.d.ts +199 -0
- package/lib/cjs/types/middleware/middleware-registry.d.ts +103 -0
- package/lib/cjs/types/middleware/middleware-resolver.d.ts +156 -8
- package/lib/cjs/types/middleware/middleware-service.d.ts +654 -111
- package/lib/cjs/types/middleware/middleware-utils.d.ts +145 -0
- package/lib/cjs/types/middleware/presets-standalone.d.ts +75 -0
- package/lib/cjs/types/middleware/upload-registry.d.ts +50 -0
- package/lib/cjs/types/path-resolver/index.d.ts +80 -0
- package/lib/cjs/types/provider/db-in-memory/adapter/adapter.interface.d.ts +222 -0
- package/lib/cjs/types/provider/db-in-memory/adapter/in-memory.adapter.d.ts +241 -0
- package/lib/cjs/types/provider/db-in-memory/adapter/index.d.ts +6 -0
- package/lib/cjs/types/provider/db-in-memory/base-repo.repository.d.ts +1 -1
- package/lib/cjs/types/provider/db-in-memory/db-in-memory.interface.d.ts +1 -1
- package/lib/cjs/types/provider/db-in-memory/db-in-memory.provider.d.ts +8 -2
- package/lib/cjs/types/provider/db-in-memory/db.provider.d.ts +281 -0
- package/lib/cjs/types/provider/db-in-memory/index.d.ts +71 -4
- package/lib/cjs/types/provider/db-in-memory/query/index.d.ts +6 -0
- package/lib/cjs/types/provider/db-in-memory/query/query-engine.d.ts +114 -0
- package/lib/cjs/types/provider/db-in-memory/query/query.types.d.ts +318 -0
- package/lib/cjs/types/provider/db-in-memory/schema/decorators.d.ts +328 -0
- package/lib/cjs/types/provider/db-in-memory/schema/entity.interface.d.ts +60 -0
- package/lib/cjs/types/provider/db-in-memory/schema/index.d.ts +6 -0
- package/lib/cjs/types/provider/db-in-memory/storage/index.d.ts +5 -0
- package/lib/cjs/types/provider/db-in-memory/storage/memory-store.d.ts +360 -0
- package/lib/cjs/types/provider/index.d.ts +7 -5
- package/lib/cjs/types/provider/logger/decorators/index.d.ts +1 -0
- package/lib/cjs/types/provider/logger/decorators/log-performance.decorator.d.ts +49 -0
- package/lib/cjs/types/provider/logger/index.d.ts +17 -0
- package/lib/cjs/types/provider/logger/logger.banner.d.ts +94 -0
- package/lib/cjs/types/provider/logger/logger.config.d.ts +62 -0
- package/lib/cjs/types/provider/logger/logger.context.d.ts +189 -0
- package/lib/cjs/types/provider/logger/logger.flow.d.ts +165 -0
- package/lib/cjs/types/provider/logger/logger.formatter.d.ts +54 -0
- package/lib/cjs/types/provider/logger/logger.grouping.d.ts +124 -0
- package/lib/cjs/types/provider/logger/logger.health.d.ts +123 -0
- package/lib/cjs/types/provider/logger/logger.metrics-collector.d.ts +44 -0
- package/lib/cjs/types/provider/logger/logger.metrics.d.ts +162 -0
- package/lib/cjs/types/provider/logger/logger.performance.d.ts +179 -0
- package/lib/cjs/types/provider/logger/logger.provider.d.ts +332 -28
- package/lib/cjs/types/provider/logger/logger.query.d.ts +232 -0
- package/lib/cjs/types/provider/logger/logger.redaction.d.ts +169 -0
- package/lib/cjs/types/provider/logger/logger.suggestions.d.ts +124 -0
- package/lib/cjs/types/provider/logger/transports/console.transport.d.ts +56 -0
- package/lib/cjs/types/provider/logger/transports/file.transport.d.ts +87 -0
- package/lib/cjs/types/provider/logger/transports/http-server.d.ts +88 -0
- package/lib/cjs/types/provider/logger/transports/http.transport.d.ts +74 -0
- package/lib/cjs/types/provider/logger/transports/index.d.ts +5 -0
- package/lib/cjs/types/provider/logger/transports/transport.interface.d.ts +31 -0
- package/lib/cjs/types/provider/logger/utils/index.d.ts +2 -0
- package/lib/cjs/types/provider/logger/utils/log-entry.d.ts +82 -0
- package/lib/cjs/types/provider/logger/utils/log-levels.d.ts +53 -0
- package/lib/cjs/types/provider/provider-manager.d.ts +165 -13
- package/lib/cjs/types/provider/provider-registry.d.ts +192 -0
- package/lib/cjs/types/provider/provider.interface.d.ts +337 -0
- package/lib/cjs/types/provider/validation/adapters/class-validator.adapter.d.ts +68 -0
- package/lib/cjs/types/provider/validation/adapters/index.d.ts +13 -0
- package/lib/cjs/types/provider/validation/adapters/yup.adapter.d.ts +65 -0
- package/lib/cjs/types/provider/validation/adapters/zod.adapter.d.ts +84 -0
- package/lib/cjs/types/provider/validation/helpful-error-formatter.d.ts +110 -0
- package/lib/cjs/types/provider/validation/index.d.ts +19 -0
- package/lib/cjs/types/provider/validation/smart-field-detector.d.ts +91 -0
- package/lib/cjs/types/provider/validation/type-inference.d.ts +81 -0
- package/lib/cjs/types/provider/validation/validation-registry.d.ts +105 -0
- package/lib/cjs/types/provider/validation/validation.interface.d.ts +178 -0
- package/lib/cjs/types/render/adapters/base-adapter.d.ts +95 -0
- package/lib/cjs/types/render/adapters/ejs-adapter.d.ts +57 -0
- package/lib/cjs/types/render/adapters/handlebars-adapter.d.ts +74 -0
- package/lib/cjs/types/render/adapters/index.d.ts +12 -0
- package/lib/cjs/types/render/adapters/pug-adapter.d.ts +57 -0
- package/lib/cjs/types/render/adapters/react-adapter.d.ts +99 -0
- package/lib/cjs/types/render/features/auto-detection.d.ts +58 -0
- package/lib/cjs/types/render/features/hot-reload.d.ts +65 -0
- package/lib/cjs/types/render/features/index.d.ts +12 -0
- package/lib/cjs/types/render/features/streaming.d.ts +39 -0
- package/lib/cjs/types/render/features/type-generator.d.ts +64 -0
- package/lib/cjs/types/render/features/view-debugger.d.ts +52 -0
- package/lib/cjs/types/render/index.d.ts +50 -0
- package/lib/cjs/types/render/presets/index.d.ts +119 -0
- package/lib/cjs/types/render/render-config.d.ts +213 -0
- package/lib/cjs/types/render/render-interface.d.ts +126 -0
- package/lib/cjs/types/render/render-registry.d.ts +86 -0
- package/lib/cjs/types/render/render-service.d.ts +157 -0
- package/lib/cjs/types/render/utils/cache-manager.d.ts +106 -0
- package/lib/cjs/types/render/utils/index.d.ts +11 -0
- package/lib/cjs/types/render/utils/package-resolver.d.ts +57 -0
- package/lib/cjs/types/render/utils/view-scanner.d.ts +74 -0
- package/lib/cjs/types/testing/create-test-app.d.ts +71 -0
- package/lib/cjs/types/testing/create-test-database.d.ts +100 -0
- package/lib/cjs/types/testing/fluent-request.d.ts +37 -0
- package/lib/cjs/types/testing/index.d.ts +93 -0
- package/lib/cjs/types/testing/load-test.d.ts +139 -0
- package/lib/cjs/types/testing/matchers.d.ts +184 -0
- package/lib/cjs/types/testing/mock-context.d.ts +117 -0
- package/lib/cjs/types/testing/mock-provider.d.ts +93 -0
- package/lib/cjs/types/testing/snapshot-request.d.ts +46 -0
- package/lib/cjs/types/testing/testing.interfaces.d.ts +973 -0
- package/lib/cjs/types/utils/node-require.d.ts +11 -0
- package/lib/cjs/utils/node-require.js +59 -0
- package/lib/esm/application/application-container.js +526 -0
- package/lib/esm/application/application-factory.js +140 -0
- package/lib/esm/application/application.types.js +41 -0
- package/lib/esm/application/bootstrap.js +709 -0
- package/lib/esm/application/index.js +4 -0
- package/lib/esm/authorization/authorization-config.interface.js +1 -0
- package/lib/esm/authorization/decorators/convenience.js +74 -0
- package/lib/esm/authorization/guard-constants.js +9 -0
- package/lib/esm/authorization/guard-decorators.js +155 -0
- package/lib/esm/authorization/guard-executor.js +101 -0
- package/lib/esm/authorization/guard-registry.js +132 -0
- package/lib/esm/authorization/guard.interface.js +73 -0
- package/lib/esm/authorization/guards/attribute-based.guard.js +106 -0
- package/lib/esm/authorization/guards/authenticated.guard.js +45 -0
- package/lib/esm/authorization/guards/composition.guard.js +63 -0
- package/lib/esm/authorization/guards/conditional.guard.js +38 -0
- package/lib/esm/authorization/guards/index.js +8 -0
- package/lib/esm/authorization/guards/permission.guard.js +80 -0
- package/lib/esm/authorization/guards/resource-owner.guard.js +58 -0
- package/lib/esm/authorization/guards/role.guard.js +61 -0
- package/lib/esm/authorization/index.js +24 -0
- package/lib/esm/authorization/services/guard-cache.interface.js +1 -0
- package/lib/esm/authorization/services/guard-cache.js +51 -0
- package/lib/esm/authorization/services/permission-hierarchy.interface.js +1 -0
- package/lib/esm/authorization/services/permission-hierarchy.js +49 -0
- package/lib/esm/authorization/services/permission-service.interface.js +1 -0
- package/lib/esm/authorization/services/permission-service.js +56 -0
- package/lib/esm/authorization/services/security-context.interface.js +1 -0
- package/lib/esm/authorization/services/security-context.js +74 -0
- package/lib/esm/authorization/setup.js +137 -0
- package/lib/esm/config/config-resolver.js +714 -0
- package/lib/esm/config/config.interfaces.js +13 -0
- package/lib/esm/config/define-config.js +492 -0
- package/lib/esm/config/env-field-builders.js +440 -0
- package/lib/esm/config/index.js +72 -0
- package/lib/esm/config/secret-value.js +175 -0
- package/lib/esm/console/color-codes.js +46 -0
- package/lib/esm/console/console.js +107 -0
- package/lib/esm/console/index.js +1 -0
- package/lib/esm/container-module/container-module.js +322 -0
- package/lib/esm/container-module/index.js +1 -0
- package/lib/esm/decorator/index.js +1 -0
- package/lib/esm/decorator/scope-binding.js +344 -0
- package/lib/esm/di/annotation/decorator_utils.js +93 -0
- package/lib/esm/di/annotation/inject.js +18 -0
- package/lib/esm/di/annotation/inject_base.js +14 -0
- package/lib/esm/di/annotation/injectable.js +19 -0
- package/lib/esm/di/annotation/lazy_service_identifier.js +9 -0
- package/lib/esm/di/annotation/multi_inject.js +4 -0
- package/lib/esm/di/annotation/named.js +9 -0
- package/lib/esm/di/annotation/optional.js +7 -0
- package/lib/esm/di/annotation/post_construct.js +5 -0
- package/lib/esm/di/annotation/pre_destroy.js +5 -0
- package/lib/esm/di/annotation/property_event_decorator.js +13 -0
- package/lib/esm/di/annotation/tagged.js +7 -0
- package/lib/esm/di/annotation/target_name.js +10 -0
- package/lib/esm/di/annotation/unmanaged.js +10 -0
- package/lib/esm/di/binding-decorator/constants.js +7 -0
- package/lib/esm/di/binding-decorator/decorator/fluent_provide.js +15 -0
- package/lib/esm/di/binding-decorator/decorator/provide.js +35 -0
- package/lib/esm/di/binding-decorator/factory/module_factory.js +34 -0
- package/lib/esm/di/binding-decorator/index.js +10 -0
- package/lib/esm/di/binding-decorator/interfaces/interfaces.js +1 -0
- package/lib/esm/di/binding-decorator/syntax/provide_done_syntax.js +41 -0
- package/lib/esm/di/binding-decorator/syntax/provide_in_syntax.js +37 -0
- package/lib/esm/di/binding-decorator/syntax/provide_in_when_on_syntax.js +68 -0
- package/lib/esm/di/binding-decorator/syntax/provide_on_syntax.js +19 -0
- package/lib/esm/di/binding-decorator/syntax/provide_when_on_syntax.js +57 -0
- package/lib/esm/di/binding-decorator/syntax/provide_when_syntax.js +86 -0
- package/lib/esm/di/binding-decorator/utils/auto_wire.js +13 -0
- package/lib/esm/di/bindings/binding.js +64 -0
- package/lib/esm/di/bindings/binding_count.js +5 -0
- package/lib/esm/di/constants/error_msgs.js +54 -0
- package/lib/esm/di/constants/literal_types.js +21 -0
- package/lib/esm/di/constants/metadata_keys.js +35 -0
- package/lib/esm/di/container/container.js +505 -0
- package/lib/esm/di/container/container_module.js +17 -0
- package/lib/esm/di/container/container_snapshot.js +17 -0
- package/lib/esm/di/container/lookup.js +108 -0
- package/lib/esm/di/container/module_activation_store.js +43 -0
- package/lib/esm/di/container-introspection.js +38 -0
- package/lib/esm/di/interfaces/interfaces.js +1 -0
- package/lib/esm/di/inversify.js +53 -0
- package/lib/esm/di/planning/context.js +18 -0
- package/lib/esm/di/planning/metadata.js +18 -0
- package/lib/esm/di/planning/metadata_reader.js +19 -0
- package/lib/esm/di/planning/plan.js +9 -0
- package/lib/esm/di/planning/planner.js +159 -0
- package/lib/esm/di/planning/queryable_string.js +25 -0
- package/lib/esm/di/planning/reflection_utils.js +150 -0
- package/lib/esm/di/planning/request.js +28 -0
- package/lib/esm/di/planning/target.js +89 -0
- package/lib/esm/di/resolution/instantiation.js +125 -0
- package/lib/esm/di/resolution/resolver.js +163 -0
- package/lib/esm/di/scope/scope-registry.js +109 -0
- package/lib/esm/di/scope/scope.js +75 -0
- package/lib/esm/di/syntax/binding_in_syntax.js +31 -0
- package/lib/esm/di/syntax/binding_in_when_on_syntax.js +79 -0
- package/lib/esm/di/syntax/binding_on_syntax.js +16 -0
- package/lib/esm/di/syntax/binding_to_syntax.js +89 -0
- package/lib/esm/di/syntax/binding_when_on_syntax.js +64 -0
- package/lib/esm/di/syntax/binding_when_syntax.js +82 -0
- package/lib/esm/di/syntax/constraint_helpers.js +39 -0
- package/lib/esm/di/utils/async.js +12 -0
- package/lib/esm/di/utils/binding_utils.js +48 -0
- package/lib/esm/di/utils/clonable.js +7 -0
- package/lib/esm/di/utils/exceptions.js +18 -0
- package/lib/esm/di/utils/factory_type.js +6 -0
- package/lib/esm/di/utils/id.js +5 -0
- package/lib/esm/di/utils/js.js +12 -0
- package/lib/esm/di/utils/serialization.js +102 -0
- package/lib/esm/error/app-error.js +209 -0
- package/lib/esm/error/base-exception-filter.js +134 -0
- package/lib/esm/error/error-handler-middleware.js +34 -0
- package/lib/esm/error/exception-filter-constants.js +9 -0
- package/lib/esm/error/exception-filter-decorators.js +157 -0
- package/lib/esm/error/exception-filter-registry.js +162 -0
- package/lib/esm/error/exception-filter.interface.js +1 -0
- package/lib/esm/error/exception-handler-middleware.js +378 -0
- package/lib/esm/error/filters/app-error.filter.js +28 -0
- package/lib/esm/error/filters/global-exception.filter.js +36 -0
- package/lib/esm/error/filters/not-found.filter.js +32 -0
- package/lib/esm/error/filters/validation-error.filter.js +32 -0
- package/lib/esm/error/index.js +13 -0
- package/lib/esm/error/not-found.error.js +13 -0
- package/lib/esm/error/report.js +153 -0
- package/lib/esm/error/status-code.js +106 -0
- package/lib/esm/error/utils.js +252 -0
- package/lib/esm/error/validation.error.js +15 -0
- package/lib/esm/event/event-decorators.js +268 -0
- package/lib/esm/event/event-emitter.js +376 -0
- package/lib/esm/event/event-flow-tracker.js +230 -0
- package/lib/esm/event/event-recorder.js +286 -0
- package/lib/esm/event/event-registry.js +201 -0
- package/lib/esm/event/event.interfaces.js +51 -0
- package/lib/esm/event/index.js +58 -0
- package/lib/esm/framework-version.js +7 -0
- package/lib/esm/index.mjs +27 -0
- package/lib/esm/interceptor/conditional-interceptor.js +104 -0
- package/lib/esm/interceptor/execution-context.js +66 -0
- package/lib/esm/interceptor/index.js +48 -0
- package/lib/esm/interceptor/interceptor-composition.js +126 -0
- package/lib/esm/interceptor/interceptor-constants.js +17 -0
- package/lib/esm/interceptor/interceptor-decorators.js +151 -0
- package/lib/esm/interceptor/interceptor-executor.js +139 -0
- package/lib/esm/interceptor/interceptor-registry.js +158 -0
- package/lib/esm/interceptor/interceptor.interface.js +16 -0
- package/lib/esm/interceptor/interceptors/index.js +6 -0
- package/lib/esm/interceptor/interceptors/logging.interceptor.js +68 -0
- package/lib/esm/interceptor/interceptors/performance.interceptor.js +253 -0
- package/lib/esm/interceptor/interceptors/timeout.interceptor.js +65 -0
- package/lib/esm/lazy-loading/index.js +58 -0
- package/lib/esm/lazy-loading/lazy-load-metrics.js +352 -0
- package/lib/esm/lazy-loading/lazy-module-helpers.js +45 -0
- package/lib/esm/lazy-loading/lazy-module-loader.js +305 -0
- package/lib/esm/lazy-loading/lazy-module-manager.js +241 -0
- package/lib/esm/lazy-loading/lazy-module-warmup.js +291 -0
- package/lib/esm/lazy-loading/lazy-module.js +352 -0
- package/lib/esm/lazy-loading/lazy.interfaces.js +17 -0
- package/lib/esm/lifecycle/index.js +9 -0
- package/lib/esm/lifecycle/lifecycle-registry.js +298 -0
- package/lib/esm/lifecycle/lifecycle.interface.js +33 -0
- package/lib/esm/middleware/content-negotiation/accept-header-parser.js +106 -0
- package/lib/esm/middleware/content-negotiation/content-negotiation-service.js +286 -0
- package/lib/esm/middleware/content-negotiation/formatter-registry.js +165 -0
- package/lib/esm/middleware/content-negotiation/formatters/csv-formatter.js +111 -0
- package/lib/esm/middleware/content-negotiation/formatters/index.js +8 -0
- package/lib/esm/middleware/content-negotiation/formatters/json-formatter.js +30 -0
- package/lib/esm/middleware/content-negotiation/formatters/plain-text-formatter.js +40 -0
- package/lib/esm/middleware/content-negotiation/formatters/xml-formatter.js +121 -0
- package/lib/esm/middleware/content-negotiation/formatters/yaml-formatter.js +131 -0
- package/lib/esm/middleware/content-negotiation/index.js +7 -0
- package/lib/esm/middleware/index.js +20 -0
- package/lib/esm/middleware/interfaces/body-parser.interface.js +1 -0
- package/lib/esm/middleware/interfaces/compression.interface.js +1 -0
- package/lib/esm/middleware/interfaces/content-negotiation.interface.js +6 -0
- package/lib/esm/middleware/interfaces/cookie-parser.interface.js +1 -0
- package/lib/esm/middleware/interfaces/cookie-session/cookie-session.interface.js +1 -0
- package/lib/esm/middleware/interfaces/cookie-session/keygrip.interface.js +1 -0
- package/lib/esm/middleware/interfaces/cors.interface.js +1 -0
- package/lib/esm/middleware/interfaces/express-rate-limit.interface.js +1 -0
- package/lib/esm/middleware/interfaces/express-session.interface.js +1 -0
- package/lib/esm/middleware/interfaces/helmet.interface.js +1 -0
- package/lib/esm/middleware/interfaces/morgan.interface.js +1 -0
- package/lib/esm/middleware/interfaces/multer.interface.js +1 -0
- package/lib/esm/middleware/interfaces/serve-favicon.interface.js +1 -0
- package/lib/esm/middleware/interfaces/serve-static.interface.js +1 -0
- package/lib/esm/middleware/interfaces/url-encoded.interface.js +1 -0
- package/lib/esm/middleware/middleware-config.js +9 -0
- package/lib/esm/middleware/middleware-interface.js +1 -0
- package/lib/esm/middleware/middleware-profiler.js +307 -0
- package/lib/esm/middleware/middleware-registry.js +152 -0
- package/lib/esm/middleware/middleware-resolver.js +320 -0
- package/lib/esm/middleware/middleware-service.js +1853 -0
- package/lib/esm/middleware/middleware-utils.js +273 -0
- package/lib/esm/middleware/presets-standalone.js +87 -0
- package/lib/esm/middleware/upload-registry.js +84 -0
- package/lib/esm/package.json +3 -0
- package/lib/esm/path-resolver/index.js +224 -0
- package/lib/esm/provider/db-in-memory/adapter/adapter.interface.js +9 -0
- package/lib/esm/provider/db-in-memory/adapter/in-memory.adapter.js +690 -0
- package/lib/esm/provider/db-in-memory/adapter/index.js +5 -0
- package/lib/esm/provider/db-in-memory/base-repo.repository.js +54 -0
- package/lib/esm/provider/db-in-memory/db-in-memory.interface.js +1 -0
- package/lib/esm/provider/db-in-memory/db-in-memory.provider.js +104 -0
- package/lib/esm/provider/db-in-memory/db-in-memory.types.js +20 -0
- package/lib/esm/provider/db-in-memory/db.provider.js +405 -0
- package/lib/esm/provider/db-in-memory/index.js +98 -0
- package/lib/esm/provider/db-in-memory/query/index.js +6 -0
- package/lib/esm/provider/db-in-memory/query/query-engine.js +598 -0
- package/lib/esm/provider/db-in-memory/query/query.types.js +9 -0
- package/lib/esm/provider/db-in-memory/schema/decorators.js +405 -0
- package/lib/esm/provider/db-in-memory/schema/entity.interface.js +8 -0
- package/lib/esm/provider/db-in-memory/schema/index.js +5 -0
- package/lib/esm/provider/db-in-memory/storage/index.js +5 -0
- package/lib/esm/provider/db-in-memory/storage/memory-store.js +784 -0
- package/lib/esm/provider/dto-validator/dto-validator.provider.js +49 -0
- package/lib/esm/provider/dto-validator/package-resolver.js +30 -0
- package/lib/esm/provider/index.js +7 -0
- package/lib/esm/provider/logger/decorators/index.js +1 -0
- package/lib/esm/provider/logger/decorators/log-performance.decorator.js +175 -0
- package/lib/esm/provider/logger/index.js +17 -0
- package/lib/esm/provider/logger/logger.banner.js +480 -0
- package/lib/esm/provider/logger/logger.config.js +29 -0
- package/lib/esm/provider/logger/logger.context.js +334 -0
- package/lib/esm/provider/logger/logger.flow.js +248 -0
- package/lib/esm/provider/logger/logger.formatter.js +691 -0
- package/lib/esm/provider/logger/logger.grouping.js +314 -0
- package/lib/esm/provider/logger/logger.health.js +291 -0
- package/lib/esm/provider/logger/logger.metrics-collector.js +180 -0
- package/lib/esm/provider/logger/logger.metrics.js +85 -0
- package/lib/esm/provider/logger/logger.performance.js +299 -0
- package/lib/esm/provider/logger/logger.provider.js +797 -0
- package/lib/esm/provider/logger/logger.query.js +529 -0
- package/lib/esm/provider/logger/logger.redaction.js +450 -0
- package/lib/esm/provider/logger/logger.suggestions.js +471 -0
- package/lib/esm/provider/logger/transports/console.transport.js +144 -0
- package/lib/esm/provider/logger/transports/file.transport.js +300 -0
- package/lib/esm/provider/logger/transports/http-server.js +141 -0
- package/lib/esm/provider/logger/transports/http.transport.js +157 -0
- package/lib/esm/provider/logger/transports/index.js +5 -0
- package/lib/esm/provider/logger/transports/transport.interface.js +1 -0
- package/lib/esm/provider/logger/utils/index.js +2 -0
- package/lib/esm/provider/logger/utils/log-entry.js +23 -0
- package/lib/esm/provider/logger/utils/log-levels.js +101 -0
- package/lib/esm/provider/provider-manager.js +283 -0
- package/lib/esm/provider/provider-registry.js +411 -0
- package/lib/esm/provider/provider.interface.js +44 -0
- package/lib/esm/provider/validation/adapters/class-validator.adapter.js +258 -0
- package/lib/esm/provider/validation/adapters/index.js +13 -0
- package/lib/esm/provider/validation/adapters/yup.adapter.js +111 -0
- package/lib/esm/provider/validation/adapters/zod.adapter.js +130 -0
- package/lib/esm/provider/validation/helpful-error-formatter.js +225 -0
- package/lib/esm/provider/validation/index.js +21 -0
- package/lib/esm/provider/validation/smart-field-detector.js +539 -0
- package/lib/esm/provider/validation/type-inference.js +183 -0
- package/lib/esm/provider/validation/validation-registry.js +214 -0
- package/lib/esm/provider/validation/validation.interface.js +8 -0
- package/lib/esm/render/adapters/base-adapter.js +131 -0
- package/lib/esm/render/adapters/ejs-adapter.js +142 -0
- package/lib/esm/render/adapters/handlebars-adapter.js +161 -0
- package/lib/esm/render/adapters/index.js +12 -0
- package/lib/esm/render/adapters/pug-adapter.js +134 -0
- package/lib/esm/render/adapters/react-adapter.js +303 -0
- package/lib/esm/render/features/auto-detection.js +202 -0
- package/lib/esm/render/features/hot-reload.js +153 -0
- package/lib/esm/render/features/index.js +12 -0
- package/lib/esm/render/features/streaming.js +103 -0
- package/lib/esm/render/features/type-generator.js +195 -0
- package/lib/esm/render/features/view-debugger.js +192 -0
- package/lib/esm/render/index.js +54 -0
- package/lib/esm/render/presets/index.js +207 -0
- package/lib/esm/render/render-config.js +9 -0
- package/lib/esm/render/render-interface.js +1 -0
- package/lib/esm/render/render-registry.js +124 -0
- package/lib/esm/render/render-service.js +394 -0
- package/lib/esm/render/utils/cache-manager.js +196 -0
- package/lib/esm/render/utils/index.js +10 -0
- package/lib/esm/render/utils/package-resolver.js +118 -0
- package/lib/esm/render/utils/view-scanner.js +178 -0
- package/lib/esm/testing/create-test-app.js +365 -0
- package/lib/esm/testing/create-test-database.js +411 -0
- package/lib/esm/testing/fluent-request.js +459 -0
- package/lib/esm/testing/index.js +102 -0
- package/lib/esm/testing/load-test.js +479 -0
- package/lib/esm/testing/matchers.js +440 -0
- package/lib/esm/testing/mock-context.js +400 -0
- package/lib/esm/testing/mock-provider.js +333 -0
- package/lib/esm/testing/snapshot-request.js +358 -0
- package/lib/esm/testing/testing.interfaces.js +9 -0
- package/lib/esm/types/application/application-container.d.ts +352 -0
- package/lib/esm/types/application/application-factory.d.ts +124 -0
- package/lib/esm/types/application/application.types.d.ts +185 -0
- package/lib/esm/types/application/bootstrap.d.ts +656 -0
- package/lib/esm/types/application/index.d.ts +4 -0
- package/lib/esm/types/authorization/authorization-config.interface.d.ts +45 -0
- package/lib/esm/types/authorization/decorators/convenience.d.ts +64 -0
- package/lib/esm/types/authorization/guard-constants.d.ts +9 -0
- package/lib/esm/types/authorization/guard-decorators.d.ts +128 -0
- package/lib/esm/types/authorization/guard-executor.d.ts +26 -0
- package/lib/esm/types/authorization/guard-registry.d.ts +35 -0
- package/lib/esm/types/authorization/guard.interface.d.ts +335 -0
- package/lib/esm/types/authorization/guards/attribute-based.guard.d.ts +60 -0
- package/lib/esm/types/authorization/guards/authenticated.guard.d.ts +26 -0
- package/lib/esm/types/authorization/guards/composition.guard.d.ts +42 -0
- package/lib/esm/types/authorization/guards/conditional.guard.d.ts +21 -0
- package/lib/esm/types/authorization/guards/index.d.ts +7 -0
- package/lib/esm/types/authorization/guards/permission.guard.d.ts +29 -0
- package/lib/esm/types/authorization/guards/resource-owner.guard.d.ts +29 -0
- package/lib/esm/types/authorization/guards/role.guard.d.ts +28 -0
- package/lib/esm/types/authorization/index.d.ts +18 -0
- package/lib/esm/types/authorization/services/guard-cache.d.ts +26 -0
- package/lib/esm/types/authorization/services/guard-cache.interface.d.ts +29 -0
- package/lib/esm/types/authorization/services/permission-hierarchy.d.ts +21 -0
- package/lib/esm/types/authorization/services/permission-hierarchy.interface.d.ts +22 -0
- package/lib/esm/types/authorization/services/permission-service.d.ts +21 -0
- package/lib/esm/types/authorization/services/permission-service.interface.d.ts +19 -0
- package/lib/esm/types/authorization/services/security-context.d.ts +32 -0
- package/lib/esm/types/authorization/services/security-context.interface.d.ts +25 -0
- package/lib/esm/types/authorization/setup.d.ts +84 -0
- package/lib/esm/types/config/config-resolver.d.ts +40 -0
- package/lib/esm/types/config/config.interfaces.d.ts +576 -0
- package/lib/esm/types/config/define-config.d.ts +109 -0
- package/lib/esm/types/config/env-field-builders.d.ts +327 -0
- package/lib/esm/types/config/index.d.ts +61 -0
- package/lib/esm/types/config/secret-value.d.ts +99 -0
- package/lib/esm/types/console/color-codes.d.ts +29 -0
- package/lib/esm/types/console/console.d.ts +83 -0
- package/lib/esm/types/console/index.d.ts +2 -0
- package/lib/esm/types/container-module/container-module.d.ts +242 -0
- package/lib/esm/types/container-module/index.d.ts +1 -0
- package/lib/esm/types/decorator/index.d.ts +1 -0
- package/lib/esm/types/decorator/scope-binding.d.ts +374 -0
- package/lib/esm/types/di/annotation/decorator_utils.d.ts +16 -0
- package/lib/esm/types/di/annotation/inject.d.ts +16 -0
- package/lib/esm/types/di/annotation/inject_base.d.ts +3 -0
- package/lib/esm/types/di/annotation/injectable.d.ts +7 -0
- package/lib/esm/types/di/annotation/lazy_service_identifier.d.ts +7 -0
- package/lib/esm/types/di/annotation/multi_inject.d.ts +2 -0
- package/lib/esm/types/di/annotation/named.d.ts +2 -0
- package/lib/esm/types/di/annotation/optional.d.ts +2 -0
- package/lib/esm/types/di/annotation/post_construct.d.ts +4 -0
- package/lib/esm/types/di/annotation/pre_destroy.d.ts +4 -0
- package/lib/esm/types/di/annotation/property_event_decorator.d.ts +4 -0
- package/lib/esm/types/di/annotation/tagged.d.ts +2 -0
- package/lib/esm/types/di/annotation/target_name.d.ts +3 -0
- package/lib/esm/types/di/annotation/unmanaged.d.ts +3 -0
- package/lib/esm/types/di/binding-decorator/constants.d.ts +7 -0
- package/lib/esm/types/di/binding-decorator/decorator/fluent_provide.d.ts +4 -0
- package/lib/esm/types/di/binding-decorator/decorator/provide.d.ts +4 -0
- package/lib/esm/types/di/binding-decorator/factory/module_factory.d.ts +23 -0
- package/lib/esm/types/di/binding-decorator/index.d.ts +10 -0
- package/lib/esm/types/di/binding-decorator/interfaces/interfaces.d.ts +40 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_done_syntax.d.ts +7 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_in_syntax.d.ts +12 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_in_when_on_syntax.d.ts +28 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_on_syntax.d.ts +10 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_when_on_syntax.d.ts +24 -0
- package/lib/esm/types/di/binding-decorator/syntax/provide_when_syntax.d.ts +23 -0
- package/lib/esm/types/di/binding-decorator/utils/auto_wire.d.ts +3 -0
- package/lib/esm/types/di/bindings/binding.d.ts +20 -0
- package/lib/esm/types/di/bindings/binding_count.d.ts +5 -0
- package/lib/esm/types/di/constants/error_msgs.d.ts +32 -0
- package/lib/esm/types/di/constants/literal_types.d.ts +5 -0
- package/lib/esm/types/di/constants/metadata_keys.d.ts +13 -0
- package/lib/esm/types/di/container/container.d.ts +73 -0
- package/lib/esm/types/di/container/container_module.d.ts +11 -0
- package/lib/esm/types/di/container/container_snapshot.d.ts +10 -0
- package/lib/esm/types/di/container/lookup.d.ts +16 -0
- package/lib/esm/types/di/container/module_activation_store.d.ts +10 -0
- package/lib/esm/types/di/container-introspection.d.ts +25 -0
- package/lib/esm/types/di/interfaces/interfaces.d.ts +300 -0
- package/lib/esm/types/di/inversify.d.ts +54 -0
- package/lib/esm/types/di/planning/context.d.ts +11 -0
- package/lib/esm/types/di/planning/metadata.d.ts +8 -0
- package/lib/esm/types/di/planning/metadata_reader.d.ts +6 -0
- package/lib/esm/types/di/planning/plan.d.ts +7 -0
- package/lib/esm/types/di/planning/planner.d.ts +5 -0
- package/lib/esm/types/di/planning/queryable_string.d.ts +11 -0
- package/lib/esm/types/di/planning/reflection_utils.d.ts +5 -0
- package/lib/esm/types/di/planning/request.d.ts +14 -0
- package/lib/esm/types/di/planning/target.d.ts +23 -0
- package/lib/esm/types/di/resolution/instantiation.d.ts +3 -0
- package/lib/esm/types/di/resolution/resolver.d.ts +3 -0
- package/lib/esm/types/di/scope/scope-registry.d.ts +91 -0
- package/lib/esm/types/di/scope/scope.d.ts +3 -0
- package/lib/esm/types/di/syntax/binding_in_syntax.d.ts +10 -0
- package/lib/esm/types/di/syntax/binding_in_when_on_syntax.d.ts +30 -0
- package/lib/esm/types/di/syntax/binding_on_syntax.d.ts +8 -0
- package/lib/esm/types/di/syntax/binding_to_syntax.d.ts +18 -0
- package/lib/esm/types/di/syntax/binding_when_on_syntax.d.ts +25 -0
- package/lib/esm/types/di/syntax/binding_when_syntax.d.ts +21 -0
- package/lib/esm/types/di/syntax/constraint_helpers.d.ts +6 -0
- package/lib/esm/types/di/utils/async.d.ts +3 -0
- package/lib/esm/types/di/utils/binding_utils.d.ts +4 -0
- package/lib/esm/types/di/utils/clonable.d.ts +3 -0
- package/lib/esm/types/di/utils/exceptions.d.ts +2 -0
- package/lib/esm/types/di/utils/factory_type.d.ts +5 -0
- package/lib/esm/types/di/utils/id.d.ts +2 -0
- package/lib/esm/types/di/utils/js.d.ts +1 -0
- package/lib/esm/types/di/utils/serialization.d.ts +10 -0
- package/lib/esm/types/error/app-error.d.ts +177 -0
- package/lib/esm/types/error/base-exception-filter.d.ts +73 -0
- package/lib/esm/types/error/error-handler-middleware.d.ts +11 -0
- package/lib/esm/types/error/exception-filter-constants.d.ts +9 -0
- package/lib/esm/types/error/exception-filter-decorators.d.ts +126 -0
- package/lib/esm/types/error/exception-filter-registry.d.ts +38 -0
- package/lib/esm/types/error/exception-filter.interface.d.ts +82 -0
- package/lib/esm/types/error/exception-handler-middleware.d.ts +35 -0
- package/lib/esm/types/error/filters/app-error.filter.d.ts +10 -0
- package/lib/esm/types/error/filters/global-exception.filter.d.ts +9 -0
- package/lib/esm/types/error/filters/not-found.filter.d.ts +10 -0
- package/lib/esm/types/error/filters/validation-error.filter.d.ts +10 -0
- package/lib/esm/types/error/index.d.ts +14 -0
- package/lib/esm/types/error/not-found.error.d.ts +7 -0
- package/lib/esm/types/error/report.d.ts +105 -0
- package/lib/esm/types/error/status-code.d.ts +156 -0
- package/lib/esm/types/error/utils.d.ts +17 -0
- package/lib/esm/types/error/validation.error.d.ts +8 -0
- package/lib/esm/types/event/event-decorators.d.ts +199 -0
- package/lib/esm/types/event/event-emitter.d.ts +109 -0
- package/lib/esm/types/event/event-flow-tracker.d.ts +88 -0
- package/lib/esm/types/event/event-recorder.d.ts +121 -0
- package/lib/esm/types/event/event-registry.d.ts +84 -0
- package/lib/esm/types/event/event.interfaces.d.ts +528 -0
- package/lib/esm/types/event/index.d.ts +55 -0
- package/lib/esm/types/framework-version.d.ts +7 -0
- package/lib/esm/types/index.d.ts +27 -0
- package/lib/esm/types/interceptor/conditional-interceptor.d.ts +91 -0
- package/lib/esm/types/interceptor/execution-context.d.ts +41 -0
- package/lib/esm/types/interceptor/index.d.ts +41 -0
- package/lib/esm/types/interceptor/interceptor-composition.d.ts +115 -0
- package/lib/esm/types/interceptor/interceptor-constants.d.ts +17 -0
- package/lib/esm/types/interceptor/interceptor-decorators.d.ts +124 -0
- package/lib/esm/types/interceptor/interceptor-executor.d.ts +46 -0
- package/lib/esm/types/interceptor/interceptor-registry.d.ts +65 -0
- package/lib/esm/types/interceptor/interceptor.interface.d.ts +281 -0
- package/lib/esm/types/interceptor/interceptors/index.d.ts +6 -0
- package/lib/esm/types/interceptor/interceptors/logging.interceptor.d.ts +28 -0
- package/lib/esm/types/interceptor/interceptors/performance.interceptor.d.ts +197 -0
- package/lib/esm/types/interceptor/interceptors/timeout.interceptor.d.ts +42 -0
- package/lib/esm/types/lazy-loading/index.d.ts +43 -0
- package/lib/esm/types/lazy-loading/lazy-load-metrics.d.ts +139 -0
- package/lib/esm/types/lazy-loading/lazy-module-helpers.d.ts +42 -0
- package/lib/esm/types/lazy-loading/lazy-module-loader.d.ts +169 -0
- package/lib/esm/types/lazy-loading/lazy-module-manager.d.ts +148 -0
- package/lib/esm/types/lazy-loading/lazy-module-warmup.d.ts +130 -0
- package/lib/esm/types/lazy-loading/lazy-module.d.ts +168 -0
- package/lib/esm/types/lazy-loading/lazy.interfaces.d.ts +480 -0
- package/lib/esm/types/lifecycle/index.d.ts +9 -0
- package/lib/esm/types/lifecycle/lifecycle-registry.d.ts +213 -0
- package/lib/esm/types/lifecycle/lifecycle.interface.d.ts +191 -0
- package/lib/esm/types/middleware/content-negotiation/accept-header-parser.d.ts +26 -0
- package/lib/esm/types/middleware/content-negotiation/content-negotiation-service.d.ts +64 -0
- package/lib/esm/types/middleware/content-negotiation/formatter-registry.d.ts +60 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/csv-formatter.d.ts +34 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/index.d.ts +8 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/json-formatter.d.ts +14 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/plain-text-formatter.d.ts +12 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/xml-formatter.d.ts +26 -0
- package/lib/esm/types/middleware/content-negotiation/formatters/yaml-formatter.d.ts +26 -0
- package/lib/esm/types/middleware/content-negotiation/index.d.ts +7 -0
- package/lib/esm/types/middleware/index.d.ts +25 -0
- package/lib/esm/types/middleware/interfaces/body-parser.interface.d.ts +31 -0
- package/lib/esm/types/middleware/interfaces/compression.interface.d.ts +98 -0
- package/lib/esm/types/middleware/interfaces/content-negotiation.interface.d.ts +142 -0
- package/lib/esm/types/middleware/interfaces/cookie-parser.interface.d.ts +9 -0
- package/lib/esm/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts +57 -0
- package/lib/esm/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts +27 -0
- package/lib/esm/types/middleware/interfaces/cors.interface.d.ts +57 -0
- package/lib/esm/types/middleware/interfaces/express-rate-limit.interface.d.ts +292 -0
- package/lib/esm/types/middleware/interfaces/express-session.interface.d.ts +207 -0
- package/lib/esm/types/middleware/interfaces/helmet.interface.d.ts +210 -0
- package/lib/esm/types/middleware/interfaces/morgan.interface.d.ts +39 -0
- package/lib/esm/types/middleware/interfaces/multer.interface.d.ts +253 -0
- package/lib/esm/types/middleware/interfaces/serve-favicon.interface.d.ts +11 -0
- package/lib/esm/types/middleware/interfaces/serve-static.interface.d.ts +69 -0
- package/lib/esm/types/middleware/interfaces/url-encoded.interface.d.ts +37 -0
- package/lib/esm/types/middleware/middleware-config.d.ts +574 -0
- package/lib/esm/types/middleware/middleware-interface.d.ts +691 -0
- package/lib/esm/types/middleware/middleware-profiler.d.ts +199 -0
- package/lib/esm/types/middleware/middleware-registry.d.ts +103 -0
- package/lib/esm/types/middleware/middleware-resolver.d.ts +159 -0
- package/lib/esm/types/middleware/middleware-service.d.ts +788 -0
- package/lib/esm/types/middleware/middleware-utils.d.ts +145 -0
- package/lib/esm/types/middleware/presets-standalone.d.ts +75 -0
- package/lib/esm/types/middleware/upload-registry.d.ts +50 -0
- package/lib/esm/types/path-resolver/index.d.ts +80 -0
- package/lib/esm/types/provider/db-in-memory/adapter/adapter.interface.d.ts +222 -0
- package/lib/esm/types/provider/db-in-memory/adapter/in-memory.adapter.d.ts +241 -0
- package/lib/esm/types/provider/db-in-memory/adapter/index.d.ts +6 -0
- package/lib/esm/types/provider/db-in-memory/base-repo.repository.d.ts +18 -0
- package/lib/esm/types/provider/db-in-memory/db-in-memory.interface.d.ts +43 -0
- package/lib/esm/types/provider/db-in-memory/db-in-memory.provider.d.ts +39 -0
- package/lib/esm/types/provider/db-in-memory/db-in-memory.types.d.ts +14 -0
- package/lib/esm/types/provider/db-in-memory/db.provider.d.ts +281 -0
- package/lib/esm/types/provider/db-in-memory/index.d.ts +71 -0
- package/lib/esm/types/provider/db-in-memory/query/index.d.ts +6 -0
- package/lib/esm/types/provider/db-in-memory/query/query-engine.d.ts +114 -0
- package/lib/esm/types/provider/db-in-memory/query/query.types.d.ts +318 -0
- package/lib/esm/types/provider/db-in-memory/schema/decorators.d.ts +328 -0
- package/lib/esm/types/provider/db-in-memory/schema/entity.interface.d.ts +60 -0
- package/lib/esm/types/provider/db-in-memory/schema/index.d.ts +6 -0
- package/lib/esm/types/provider/db-in-memory/storage/index.d.ts +5 -0
- package/lib/esm/types/provider/db-in-memory/storage/memory-store.d.ts +360 -0
- package/lib/esm/types/provider/dto-validator/dto-validator.provider.d.ts +10 -0
- package/lib/esm/types/provider/dto-validator/package-resolver.d.ts +7 -0
- package/lib/esm/types/provider/index.d.ts +7 -0
- package/lib/esm/types/provider/logger/decorators/index.d.ts +1 -0
- package/lib/esm/types/provider/logger/decorators/log-performance.decorator.d.ts +49 -0
- package/lib/esm/types/provider/logger/index.d.ts +17 -0
- package/lib/esm/types/provider/logger/logger.banner.d.ts +94 -0
- package/lib/esm/types/provider/logger/logger.config.d.ts +62 -0
- package/lib/esm/types/provider/logger/logger.context.d.ts +189 -0
- package/lib/esm/types/provider/logger/logger.flow.d.ts +165 -0
- package/lib/esm/types/provider/logger/logger.formatter.d.ts +54 -0
- package/lib/esm/types/provider/logger/logger.grouping.d.ts +124 -0
- package/lib/esm/types/provider/logger/logger.health.d.ts +123 -0
- package/lib/esm/types/provider/logger/logger.metrics-collector.d.ts +44 -0
- package/lib/esm/types/provider/logger/logger.metrics.d.ts +162 -0
- package/lib/esm/types/provider/logger/logger.performance.d.ts +179 -0
- package/lib/esm/types/provider/logger/logger.provider.d.ts +363 -0
- package/lib/esm/types/provider/logger/logger.query.d.ts +232 -0
- package/lib/esm/types/provider/logger/logger.redaction.d.ts +169 -0
- package/lib/esm/types/provider/logger/logger.suggestions.d.ts +124 -0
- package/lib/esm/types/provider/logger/transports/console.transport.d.ts +56 -0
- package/lib/esm/types/provider/logger/transports/file.transport.d.ts +87 -0
- package/lib/esm/types/provider/logger/transports/http-server.d.ts +88 -0
- package/lib/esm/types/provider/logger/transports/http.transport.d.ts +74 -0
- package/lib/esm/types/provider/logger/transports/index.d.ts +5 -0
- package/lib/esm/types/provider/logger/transports/transport.interface.d.ts +31 -0
- package/lib/esm/types/provider/logger/utils/index.d.ts +2 -0
- package/lib/esm/types/provider/logger/utils/log-entry.d.ts +82 -0
- package/lib/esm/types/provider/logger/utils/log-levels.d.ts +53 -0
- package/lib/esm/types/provider/provider-manager.d.ts +208 -0
- package/lib/esm/types/provider/provider-registry.d.ts +192 -0
- package/lib/esm/types/provider/provider.interface.d.ts +337 -0
- package/lib/esm/types/provider/validation/adapters/class-validator.adapter.d.ts +68 -0
- package/lib/esm/types/provider/validation/adapters/index.d.ts +13 -0
- package/lib/esm/types/provider/validation/adapters/yup.adapter.d.ts +65 -0
- package/lib/esm/types/provider/validation/adapters/zod.adapter.d.ts +84 -0
- package/lib/esm/types/provider/validation/helpful-error-formatter.d.ts +110 -0
- package/lib/esm/types/provider/validation/index.d.ts +19 -0
- package/lib/esm/types/provider/validation/smart-field-detector.d.ts +91 -0
- package/lib/esm/types/provider/validation/type-inference.d.ts +81 -0
- package/lib/esm/types/provider/validation/validation-registry.d.ts +105 -0
- package/lib/esm/types/provider/validation/validation.interface.d.ts +178 -0
- package/lib/esm/types/render/adapters/base-adapter.d.ts +95 -0
- package/lib/esm/types/render/adapters/ejs-adapter.d.ts +57 -0
- package/lib/esm/types/render/adapters/handlebars-adapter.d.ts +74 -0
- package/lib/esm/types/render/adapters/index.d.ts +12 -0
- package/lib/esm/types/render/adapters/pug-adapter.d.ts +57 -0
- package/lib/esm/types/render/adapters/react-adapter.d.ts +99 -0
- package/lib/esm/types/render/features/auto-detection.d.ts +58 -0
- package/lib/esm/types/render/features/hot-reload.d.ts +65 -0
- package/lib/esm/types/render/features/index.d.ts +12 -0
- package/lib/esm/types/render/features/streaming.d.ts +39 -0
- package/lib/esm/types/render/features/type-generator.d.ts +64 -0
- package/lib/esm/types/render/features/view-debugger.d.ts +52 -0
- package/lib/esm/types/render/index.d.ts +50 -0
- package/lib/esm/types/render/presets/index.d.ts +119 -0
- package/lib/esm/types/render/render-config.d.ts +213 -0
- package/lib/esm/types/render/render-interface.d.ts +126 -0
- package/lib/esm/types/render/render-registry.d.ts +86 -0
- package/lib/esm/types/render/render-service.d.ts +157 -0
- package/lib/esm/types/render/utils/cache-manager.d.ts +106 -0
- package/lib/esm/types/render/utils/index.d.ts +11 -0
- package/lib/esm/types/render/utils/package-resolver.d.ts +57 -0
- package/lib/esm/types/render/utils/view-scanner.d.ts +74 -0
- package/lib/esm/types/testing/create-test-app.d.ts +71 -0
- package/lib/esm/types/testing/create-test-database.d.ts +100 -0
- package/lib/esm/types/testing/fluent-request.d.ts +37 -0
- package/lib/esm/types/testing/index.d.ts +93 -0
- package/lib/esm/types/testing/load-test.d.ts +139 -0
- package/lib/esm/types/testing/matchers.d.ts +184 -0
- package/lib/esm/types/testing/mock-context.d.ts +117 -0
- package/lib/esm/types/testing/mock-provider.d.ts +93 -0
- package/lib/esm/types/testing/snapshot-request.d.ts +46 -0
- package/lib/esm/types/testing/testing.interfaces.d.ts +973 -0
- package/lib/esm/types/utils/node-require.d.ts +11 -0
- package/lib/esm/utils/node-require.js +56 -0
- package/lib/package.json +167 -151
- package/package.json +167 -151
- package/lib/cjs/provider/environment/env-validator.provider.js +0 -100
- package/lib/cjs/types/provider/environment/env-validator.provider.d.ts +0 -39
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { FactoryType } from "../utils/factory_type.js";
|
|
2
|
+
declare namespace interfaces {
|
|
3
|
+
export type DynamicValue<T> = (context: interfaces.Context) => T | Promise<T>;
|
|
4
|
+
export type ContainerResolution<T> = T | Promise<T> | Array<T | Promise<T>>;
|
|
5
|
+
type AsyncCallback<TCallback> = TCallback extends (...args: infer TArgs) => infer TResult ? (...args: TArgs) => Promise<TResult> : never;
|
|
6
|
+
export type BindingScope = "Singleton" | "Transient" | "Request" | string;
|
|
7
|
+
export type BindingType = "ConstantValue" | "Constructor" | "DynamicValue" | "Factory" | "Function" | "Instance" | "Invalid" | "Provider";
|
|
8
|
+
export type TargetType = "ConstructorArgument" | "ClassProperty" | "Variable";
|
|
9
|
+
export interface Scope {
|
|
10
|
+
Request: interfaces.BindingScope;
|
|
11
|
+
Singleton: interfaces.BindingScope;
|
|
12
|
+
Transient: interfaces.BindingScope;
|
|
13
|
+
}
|
|
14
|
+
export interface BindingTypeEnum {
|
|
15
|
+
ConstantValue: interfaces.BindingType;
|
|
16
|
+
Constructor: interfaces.BindingType;
|
|
17
|
+
DynamicValue: interfaces.BindingType;
|
|
18
|
+
Factory: interfaces.BindingType;
|
|
19
|
+
Function: interfaces.BindingType;
|
|
20
|
+
Instance: interfaces.BindingType;
|
|
21
|
+
Invalid: interfaces.BindingType;
|
|
22
|
+
Provider: interfaces.BindingType;
|
|
23
|
+
}
|
|
24
|
+
export interface TargetTypeEnum {
|
|
25
|
+
ConstructorArgument: interfaces.TargetType;
|
|
26
|
+
ClassProperty: interfaces.TargetType;
|
|
27
|
+
Variable: interfaces.TargetType;
|
|
28
|
+
}
|
|
29
|
+
export type Newable<T> = new (...args: Array<unknown>) => T;
|
|
30
|
+
export type Instance<T> = T & Record<string, () => void>;
|
|
31
|
+
export interface Abstract<T> {
|
|
32
|
+
prototype: T;
|
|
33
|
+
}
|
|
34
|
+
export type ServiceIdentifier<T = unknown> = string | symbol | Newable<T> | Abstract<T>;
|
|
35
|
+
export interface Clonable<T> {
|
|
36
|
+
clone(): T;
|
|
37
|
+
}
|
|
38
|
+
export type BindingActivation<T = unknown> = (context: interfaces.Context, injectable: T) => T | Promise<T>;
|
|
39
|
+
export type BindingDeactivation<T = unknown> = (injectable: T) => void | Promise<void>;
|
|
40
|
+
export interface Binding<TActivated = unknown> extends Clonable<Binding<TActivated>> {
|
|
41
|
+
id: number;
|
|
42
|
+
moduleId: ContainerModuleBase["id"];
|
|
43
|
+
activated: boolean;
|
|
44
|
+
serviceIdentifier: ServiceIdentifier<TActivated>;
|
|
45
|
+
constraint: ConstraintFunction;
|
|
46
|
+
dynamicValue: DynamicValue<TActivated> | null;
|
|
47
|
+
scope: BindingScope;
|
|
48
|
+
type: BindingType;
|
|
49
|
+
implementationType: Newable<TActivated> | TActivated | null;
|
|
50
|
+
factory: FactoryCreator<unknown> | null;
|
|
51
|
+
provider: ProviderCreator<unknown> | null;
|
|
52
|
+
onActivation: BindingActivation<TActivated> | null;
|
|
53
|
+
onDeactivation: BindingDeactivation<TActivated> | null;
|
|
54
|
+
cache: null | TActivated | Promise<TActivated>;
|
|
55
|
+
}
|
|
56
|
+
export type SimpleFactory<T, U extends Array<unknown> = Array<unknown>> = (...args: U) => T;
|
|
57
|
+
export type MultiFactory<T, U extends Array<unknown> = Array<unknown>, V extends Array<unknown> = Array<unknown>> = (...args: U) => SimpleFactory<T, V>;
|
|
58
|
+
export type Factory<T, U extends Array<unknown> = Array<unknown>, V extends Array<unknown> = Array<unknown>> = SimpleFactory<T, U> | MultiFactory<T, U, V>;
|
|
59
|
+
export type FactoryCreator<T, U extends Array<unknown> = Array<unknown>, V extends Array<unknown> = Array<unknown>> = (context: Context) => Factory<T, U, V>;
|
|
60
|
+
export type AutoNamedFactory<T> = SimpleFactory<T, [string]>;
|
|
61
|
+
export type AutoFactory<T> = SimpleFactory<T, []>;
|
|
62
|
+
export type FactoryTypeFunction<T = unknown> = (context: interfaces.Context) => T | Promise<T>;
|
|
63
|
+
export interface FactoryDetails {
|
|
64
|
+
factoryType: FactoryType;
|
|
65
|
+
factory: FactoryTypeFunction | null;
|
|
66
|
+
}
|
|
67
|
+
export type Provider<T> = (...args: Array<unknown>) => ((...args: Array<unknown>) => Promise<T>) | Promise<T>;
|
|
68
|
+
export type ProviderCreator<T> = (context: Context) => Provider<T>;
|
|
69
|
+
export interface NextArgs<T = unknown> {
|
|
70
|
+
avoidConstraints: boolean;
|
|
71
|
+
contextInterceptor: (contexts: Context) => Context;
|
|
72
|
+
isMultiInject: boolean;
|
|
73
|
+
targetType: TargetType;
|
|
74
|
+
serviceIdentifier: interfaces.ServiceIdentifier<T>;
|
|
75
|
+
key?: string | number | symbol | undefined;
|
|
76
|
+
value?: unknown;
|
|
77
|
+
}
|
|
78
|
+
export type Next = (args: NextArgs) => unknown | Array<unknown>;
|
|
79
|
+
export type Middleware = (next: Next) => Next;
|
|
80
|
+
export type ContextInterceptor = (context: interfaces.Context) => interfaces.Context;
|
|
81
|
+
export interface Context {
|
|
82
|
+
id: number;
|
|
83
|
+
container: Container;
|
|
84
|
+
plan: Plan;
|
|
85
|
+
currentRequest: Request;
|
|
86
|
+
addPlan(plan: Plan): void;
|
|
87
|
+
setCurrentRequest(request: Request): void;
|
|
88
|
+
}
|
|
89
|
+
export type MetadataOrMetadataArray = Metadata | Array<Metadata>;
|
|
90
|
+
export interface Metadata<TValue = unknown> {
|
|
91
|
+
key: string | number | symbol;
|
|
92
|
+
value: TValue;
|
|
93
|
+
}
|
|
94
|
+
export interface Plan {
|
|
95
|
+
parentContext: Context;
|
|
96
|
+
rootRequest: Request;
|
|
97
|
+
}
|
|
98
|
+
export interface QueryableString {
|
|
99
|
+
startsWith(searchString: string): boolean;
|
|
100
|
+
endsWith(searchString: string): boolean;
|
|
101
|
+
contains(searchString: string): boolean;
|
|
102
|
+
equals(compareString: string): boolean;
|
|
103
|
+
value(): string;
|
|
104
|
+
}
|
|
105
|
+
export type ResolveRequestHandler = (request: interfaces.Request) => unknown;
|
|
106
|
+
export type RequestScope = Map<unknown, unknown>;
|
|
107
|
+
export interface Request {
|
|
108
|
+
id: number;
|
|
109
|
+
serviceIdentifier: ServiceIdentifier;
|
|
110
|
+
parentContext: Context;
|
|
111
|
+
parentRequest: Request | null;
|
|
112
|
+
childRequests: Array<Request>;
|
|
113
|
+
target: Target;
|
|
114
|
+
bindings: Array<Binding<unknown>>;
|
|
115
|
+
requestScope: RequestScope | null;
|
|
116
|
+
addChildRequest(serviceIdentifier: ServiceIdentifier, bindings: Binding<unknown> | Array<Binding<unknown>>, target: Target): Request;
|
|
117
|
+
}
|
|
118
|
+
export interface Target {
|
|
119
|
+
id: number;
|
|
120
|
+
serviceIdentifier: ServiceIdentifier;
|
|
121
|
+
type: TargetType;
|
|
122
|
+
name: QueryableString;
|
|
123
|
+
identifier: string | symbol;
|
|
124
|
+
metadata: Array<Metadata>;
|
|
125
|
+
getNamedTag(): interfaces.Metadata<string> | null;
|
|
126
|
+
getCustomTags(): Array<interfaces.Metadata> | null;
|
|
127
|
+
hasTag(key: string | number | symbol): boolean;
|
|
128
|
+
isArray(): boolean;
|
|
129
|
+
matchesArray(name: interfaces.ServiceIdentifier): boolean;
|
|
130
|
+
isNamed(): boolean;
|
|
131
|
+
isTagged(): boolean;
|
|
132
|
+
isOptional(): boolean;
|
|
133
|
+
matchesNamedTag(name: string): boolean;
|
|
134
|
+
matchesTag(key: string | number | symbol): (value: unknown) => boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Interface for container options that can be passed to the AppContainer class.
|
|
138
|
+
* @public API
|
|
139
|
+
*/
|
|
140
|
+
export interface ContainerOptions {
|
|
141
|
+
/**
|
|
142
|
+
* Allows auto-binding of injectable classes.
|
|
143
|
+
*/
|
|
144
|
+
autoBindInjectable?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* The default scope for bindings in the container.
|
|
147
|
+
* It can be set to Request (default), Singleton, or Transient.
|
|
148
|
+
*/
|
|
149
|
+
defaultScope?: BindingScope | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Allows skipping of base class checks when working with derived classes.
|
|
152
|
+
*/
|
|
153
|
+
skipBaseClassChecks?: boolean;
|
|
154
|
+
}
|
|
155
|
+
export interface Container {
|
|
156
|
+
id: number;
|
|
157
|
+
parent: Container | null;
|
|
158
|
+
options: ContainerOptions;
|
|
159
|
+
bind<T>(serviceIdentifier: ServiceIdentifier<T>): BindingToSyntax<T>;
|
|
160
|
+
rebind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
|
|
161
|
+
rebindAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<interfaces.BindingToSyntax<T>>;
|
|
162
|
+
unbind(serviceIdentifier: ServiceIdentifier): void;
|
|
163
|
+
unbindAsync(serviceIdentifier: interfaces.ServiceIdentifier): Promise<void>;
|
|
164
|
+
unbindAll(): void;
|
|
165
|
+
unbindAllAsync(): Promise<void>;
|
|
166
|
+
isBound(serviceIdentifier: ServiceIdentifier): boolean;
|
|
167
|
+
isCurrentBound<T>(serviceIdentifier: ServiceIdentifier<T>): boolean;
|
|
168
|
+
isBoundNamed(serviceIdentifier: ServiceIdentifier, named: string | number | symbol): boolean;
|
|
169
|
+
isBoundTagged(serviceIdentifier: ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
|
|
170
|
+
get<T>(serviceIdentifier: ServiceIdentifier<T>): T;
|
|
171
|
+
getNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): T;
|
|
172
|
+
getTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T;
|
|
173
|
+
getAll<T>(serviceIdentifier: ServiceIdentifier<T>): Array<T>;
|
|
174
|
+
getAllTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Array<T>;
|
|
175
|
+
getAllNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Array<T>;
|
|
176
|
+
getAsync<T>(serviceIdentifier: ServiceIdentifier<T>): Promise<T>;
|
|
177
|
+
getNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<T>;
|
|
178
|
+
getTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T>;
|
|
179
|
+
getAllAsync<T>(serviceIdentifier: ServiceIdentifier<T>): Promise<Array<T>>;
|
|
180
|
+
getAllTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<Array<T>>;
|
|
181
|
+
getAllNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<Array<T>>;
|
|
182
|
+
onActivation<T>(serviceIdentifier: ServiceIdentifier<T>, onActivation: BindingActivation<T>): void;
|
|
183
|
+
onDeactivation<T>(serviceIdentifier: ServiceIdentifier<T>, onDeactivation: BindingDeactivation<T>): void;
|
|
184
|
+
resolve<T>(constructorFunction: interfaces.Newable<T>): T;
|
|
185
|
+
load(...modules: Array<ContainerModule>): void;
|
|
186
|
+
loadAsync(...modules: Array<AsyncContainerModule>): Promise<void>;
|
|
187
|
+
unload(...modules: Array<ContainerModuleBase>): void;
|
|
188
|
+
unloadAsync(...modules: Array<ContainerModuleBase>): Promise<void>;
|
|
189
|
+
applyCustomMetadataReader(metadataReader: MetadataReader): void;
|
|
190
|
+
applyMiddleware(...middleware: Array<Middleware>): void;
|
|
191
|
+
snapshot(): void;
|
|
192
|
+
restore(): void;
|
|
193
|
+
createChild(): Container;
|
|
194
|
+
}
|
|
195
|
+
export type Bind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
196
|
+
export type Rebind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
|
|
197
|
+
export type Unbind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => void;
|
|
198
|
+
export type UnbindAsync = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => Promise<void>;
|
|
199
|
+
export type IsBound = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
|
|
200
|
+
export interface ContainerModuleBase {
|
|
201
|
+
id: number;
|
|
202
|
+
}
|
|
203
|
+
export interface ContainerModule extends ContainerModuleBase {
|
|
204
|
+
registry: ContainerModuleCallBack;
|
|
205
|
+
}
|
|
206
|
+
export interface AsyncContainerModule extends ContainerModuleBase {
|
|
207
|
+
registry: AsyncContainerModuleCallBack;
|
|
208
|
+
}
|
|
209
|
+
export interface ModuleActivationHandlers {
|
|
210
|
+
onActivations: Lookup<BindingActivation<unknown>>;
|
|
211
|
+
onDeactivations: Lookup<BindingDeactivation<unknown>>;
|
|
212
|
+
}
|
|
213
|
+
export interface ModuleActivationStore extends Clonable<ModuleActivationStore> {
|
|
214
|
+
addDeactivation(moduleId: ContainerModuleBase["id"], serviceIdentifier: ServiceIdentifier<unknown>, onDeactivation: interfaces.BindingDeactivation<unknown>): void;
|
|
215
|
+
addActivation(moduleId: ContainerModuleBase["id"], serviceIdentifier: ServiceIdentifier<unknown>, onActivation: interfaces.BindingActivation<unknown>): void;
|
|
216
|
+
remove(moduleId: ContainerModuleBase["id"]): ModuleActivationHandlers;
|
|
217
|
+
}
|
|
218
|
+
export type ContainerModuleCallBack = (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind, unbindAsync: interfaces.UnbindAsync, onActivation: interfaces.Container["onActivation"], onDeactivation: interfaces.Container["onDeactivation"]) => void;
|
|
219
|
+
export type AsyncContainerModuleCallBack = AsyncCallback<ContainerModuleCallBack>;
|
|
220
|
+
export interface ContainerSnapshot {
|
|
221
|
+
bindings: Lookup<Binding<unknown>>;
|
|
222
|
+
activations: Lookup<BindingActivation<unknown>>;
|
|
223
|
+
deactivations: Lookup<BindingDeactivation<unknown>>;
|
|
224
|
+
middleware: Next | null;
|
|
225
|
+
moduleActivationStore: interfaces.ModuleActivationStore;
|
|
226
|
+
}
|
|
227
|
+
export interface Lookup<T> extends Clonable<Lookup<T>> {
|
|
228
|
+
[x: string]: any;
|
|
229
|
+
add(serviceIdentifier: ServiceIdentifier, value: T): void;
|
|
230
|
+
getMap(): Map<interfaces.ServiceIdentifier, Array<T>>;
|
|
231
|
+
get(serviceIdentifier: ServiceIdentifier): Array<T>;
|
|
232
|
+
remove(serviceIdentifier: interfaces.ServiceIdentifier): void;
|
|
233
|
+
removeByCondition(condition: (item: T) => boolean): Array<T>;
|
|
234
|
+
removeIntersection(lookup: interfaces.Lookup<T>): void;
|
|
235
|
+
hasKey(serviceIdentifier: ServiceIdentifier): boolean;
|
|
236
|
+
clone(): Lookup<T>;
|
|
237
|
+
traverse(func: (key: interfaces.ServiceIdentifier, value: Array<T>) => void): void;
|
|
238
|
+
}
|
|
239
|
+
export interface BindingOnSyntax<T> {
|
|
240
|
+
onActivation(fn: (context: Context, injectable: T) => T | Promise<T>): BindingWhenSyntax<T>;
|
|
241
|
+
onDeactivation(fn: (injectable: T) => void | Promise<void>): BindingWhenSyntax<T>;
|
|
242
|
+
}
|
|
243
|
+
export interface BindingWhenSyntax<T> {
|
|
244
|
+
when(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
245
|
+
whenTargetNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
246
|
+
whenTargetIsDefault(): BindingOnSyntax<T>;
|
|
247
|
+
whenTargetTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
248
|
+
whenInjectedInto(parent: NewableFunction | string): BindingOnSyntax<T>;
|
|
249
|
+
whenParentNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
250
|
+
whenParentTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
251
|
+
whenAnyAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
|
|
252
|
+
whenNoAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
|
|
253
|
+
whenAnyAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
254
|
+
whenAnyAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
255
|
+
whenNoAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
|
|
256
|
+
whenNoAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
|
|
257
|
+
whenAnyAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
258
|
+
whenNoAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
|
|
259
|
+
}
|
|
260
|
+
export interface BindingWhenOnSyntax<T> extends BindingWhenSyntax<T>, BindingOnSyntax<T> {
|
|
261
|
+
}
|
|
262
|
+
export interface BindingInSyntax<T> {
|
|
263
|
+
inSingletonScope(): BindingWhenOnSyntax<T>;
|
|
264
|
+
inTransientScope(): BindingWhenOnSyntax<T>;
|
|
265
|
+
inRequestScope(): BindingWhenOnSyntax<T>;
|
|
266
|
+
inScope(scope: string): BindingWhenOnSyntax<T>;
|
|
267
|
+
}
|
|
268
|
+
export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> {
|
|
269
|
+
}
|
|
270
|
+
export interface BindingToSyntax<T> {
|
|
271
|
+
to(constructor: Newable<T>): BindingInWhenOnSyntax<T>;
|
|
272
|
+
toSelf(): BindingInWhenOnSyntax<T>;
|
|
273
|
+
toConstantValue(value: T): BindingWhenOnSyntax<T>;
|
|
274
|
+
toDynamicValue(func: DynamicValue<T>): BindingInWhenOnSyntax<T>;
|
|
275
|
+
toConstructor<T2>(constructor: Newable<T2>): BindingWhenOnSyntax<T>;
|
|
276
|
+
toFactory<T2, T3 extends Array<unknown> = Array<unknown>, T4 extends Array<unknown> = Array<unknown>>(factory: FactoryCreator<T2, T3, T4>): BindingWhenOnSyntax<T>;
|
|
277
|
+
toFunction(func: T): BindingWhenOnSyntax<T>;
|
|
278
|
+
toAutoFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
|
|
279
|
+
toAutoNamedFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
|
|
280
|
+
toProvider<T2>(provider: ProviderCreator<T2>): BindingWhenOnSyntax<T>;
|
|
281
|
+
toService(service: ServiceIdentifier<T>): void;
|
|
282
|
+
}
|
|
283
|
+
export interface ConstraintFunction {
|
|
284
|
+
metaData?: Metadata;
|
|
285
|
+
(request: Request | null): boolean;
|
|
286
|
+
}
|
|
287
|
+
export interface MetadataReader {
|
|
288
|
+
getConstructorMetadata(constructorFunc: NewableFunction): ConstructorMetadata;
|
|
289
|
+
getPropertiesMetadata(constructorFunc: NewableFunction): MetadataMap;
|
|
290
|
+
}
|
|
291
|
+
export interface MetadataMap {
|
|
292
|
+
[propertyNameOrArgumentIndex: string | symbol]: Array<Metadata>;
|
|
293
|
+
}
|
|
294
|
+
export interface ConstructorMetadata {
|
|
295
|
+
compilerGeneratedMetadata: Array<NewableFunction> | undefined;
|
|
296
|
+
userGeneratedMetadata: MetadataMap;
|
|
297
|
+
}
|
|
298
|
+
export {};
|
|
299
|
+
}
|
|
300
|
+
export { interfaces };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InversifyJS Dependency Injection Library
|
|
3
|
+
*
|
|
4
|
+
* @layer public
|
|
5
|
+
* @audience application-developers
|
|
6
|
+
* @concept dependency-injection
|
|
7
|
+
* @difficulty intermediate
|
|
8
|
+
*
|
|
9
|
+
* @summary Quick Start
|
|
10
|
+
* ExpressoTS uses InversifyJS for dependency injection. Most InversifyJS APIs are available here.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { Container, injectable, inject } from "@expressots/core";
|
|
15
|
+
*
|
|
16
|
+
* @injectable()
|
|
17
|
+
* export class MyService {
|
|
18
|
+
* constructor(@inject("IDependency") private dep: IDependency) {}
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @note
|
|
23
|
+
* This module re-exports InversifyJS APIs. For full InversifyJS documentation,
|
|
24
|
+
* see: https://github.com/inversify/InversifyJS
|
|
25
|
+
*
|
|
26
|
+
* @public API
|
|
27
|
+
*/
|
|
28
|
+
import * as keys from "./constants/metadata_keys.js";
|
|
29
|
+
export declare const METADATA_KEY: typeof keys;
|
|
30
|
+
export { Container } from "./container/container.js";
|
|
31
|
+
export { Scope, BindingTypeEnum, TargetTypeEnum, } from "./constants/literal_types.js";
|
|
32
|
+
export { AsyncContainerModule, ContainerModule, } from "./container/container_module.js";
|
|
33
|
+
export { createTaggedDecorator } from "./annotation/decorator_utils.js";
|
|
34
|
+
export { injectable } from "./annotation/injectable.js";
|
|
35
|
+
export { tagged } from "./annotation/tagged.js";
|
|
36
|
+
export { named } from "./annotation/named.js";
|
|
37
|
+
export { inject } from "./annotation/inject.js";
|
|
38
|
+
export { LazyServiceIdentifier } from "./annotation/lazy_service_identifier.js";
|
|
39
|
+
export { LazyServiceIdentifier as LazyServiceIdentifer } from "./annotation/lazy_service_identifier.js";
|
|
40
|
+
export { optional } from "./annotation/optional.js";
|
|
41
|
+
export { unmanaged } from "./annotation/unmanaged.js";
|
|
42
|
+
export { multiInject } from "./annotation/multi_inject.js";
|
|
43
|
+
export { targetName } from "./annotation/target_name.js";
|
|
44
|
+
export { postConstruct } from "./annotation/post_construct.js";
|
|
45
|
+
export { preDestroy } from "./annotation/pre_destroy.js";
|
|
46
|
+
export { MetadataReader } from "./planning/metadata_reader.js";
|
|
47
|
+
export { id } from "./utils/id.js";
|
|
48
|
+
export { interfaces } from "./interfaces/interfaces.js";
|
|
49
|
+
export { decorate } from "./annotation/decorator_utils.js";
|
|
50
|
+
export { forEachBinding, getBoundImplementations, } from "./container-introspection.js";
|
|
51
|
+
export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, } from "./syntax/constraint_helpers.js";
|
|
52
|
+
export { getServiceIdentifierAsString } from "./utils/serialization.js";
|
|
53
|
+
export { multiBindToService } from "./utils/binding_utils.js";
|
|
54
|
+
export { ScopeRegistry, globalScopeRegistry } from "./scope/scope-registry.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class Context implements interfaces.Context {
|
|
3
|
+
id: number;
|
|
4
|
+
container: interfaces.Container;
|
|
5
|
+
plan: interfaces.Plan;
|
|
6
|
+
currentRequest: interfaces.Request;
|
|
7
|
+
constructor(container: interfaces.Container);
|
|
8
|
+
addPlan(plan: interfaces.Plan): void;
|
|
9
|
+
setCurrentRequest(currentRequest: interfaces.Request): void;
|
|
10
|
+
}
|
|
11
|
+
export { Context };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class Metadata implements interfaces.Metadata {
|
|
3
|
+
key: string | number | symbol;
|
|
4
|
+
value: unknown;
|
|
5
|
+
constructor(key: string | number | symbol, value: unknown);
|
|
6
|
+
toString(): string;
|
|
7
|
+
}
|
|
8
|
+
export { Metadata };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class MetadataReader implements interfaces.MetadataReader {
|
|
3
|
+
getConstructorMetadata(constructorFunc: NewableFunction): interfaces.ConstructorMetadata;
|
|
4
|
+
getPropertiesMetadata(constructorFunc: NewableFunction): interfaces.MetadataMap;
|
|
5
|
+
}
|
|
6
|
+
export { MetadataReader };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class Plan implements interfaces.Plan {
|
|
3
|
+
parentContext: interfaces.Context;
|
|
4
|
+
rootRequest: interfaces.Request;
|
|
5
|
+
constructor(parentContext: interfaces.Context, rootRequest: interfaces.Request);
|
|
6
|
+
}
|
|
7
|
+
export { Plan };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare function getBindingDictionary(cntnr: interfaces.Container): interfaces.Lookup<interfaces.Binding<unknown>>;
|
|
3
|
+
declare function plan(metadataReader: interfaces.MetadataReader, container: interfaces.Container, isMultiInject: boolean, targetType: interfaces.TargetType, serviceIdentifier: interfaces.ServiceIdentifier, key?: string | number | symbol, value?: unknown, avoidConstraints?: boolean): interfaces.Context;
|
|
4
|
+
declare function createMockRequest(container: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): interfaces.Request;
|
|
5
|
+
export { plan, createMockRequest, getBindingDictionary };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class QueryableString implements interfaces.QueryableString {
|
|
3
|
+
private str;
|
|
4
|
+
constructor(str: string);
|
|
5
|
+
startsWith(searchString: string): boolean;
|
|
6
|
+
endsWith(searchString: string): boolean;
|
|
7
|
+
contains(searchString: string): boolean;
|
|
8
|
+
equals(compareString: string): boolean;
|
|
9
|
+
value(): string;
|
|
10
|
+
}
|
|
11
|
+
export { QueryableString };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
import { getFunctionName } from "../utils/serialization.js";
|
|
3
|
+
declare function getDependencies(metadataReader: interfaces.MetadataReader, func: NewableFunction): Array<interfaces.Target>;
|
|
4
|
+
declare function getBaseClassDependencyCount(metadataReader: interfaces.MetadataReader, func: NewableFunction): number;
|
|
5
|
+
export { getDependencies, getBaseClassDependencyCount, getFunctionName };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class Request implements interfaces.Request {
|
|
3
|
+
id: number;
|
|
4
|
+
serviceIdentifier: interfaces.ServiceIdentifier;
|
|
5
|
+
parentContext: interfaces.Context;
|
|
6
|
+
parentRequest: interfaces.Request | null;
|
|
7
|
+
bindings: Array<interfaces.Binding<unknown>>;
|
|
8
|
+
childRequests: Array<interfaces.Request>;
|
|
9
|
+
target: interfaces.Target;
|
|
10
|
+
requestScope: interfaces.RequestScope | null;
|
|
11
|
+
constructor(serviceIdentifier: interfaces.ServiceIdentifier, parentContext: interfaces.Context, parentRequest: interfaces.Request | null, bindings: interfaces.Binding<unknown> | Array<interfaces.Binding<unknown>>, target: interfaces.Target);
|
|
12
|
+
addChildRequest(serviceIdentifier: interfaces.ServiceIdentifier, bindings: interfaces.Binding<unknown> | Array<interfaces.Binding<unknown>>, target: interfaces.Target): interfaces.Request;
|
|
13
|
+
}
|
|
14
|
+
export { Request };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
import { Metadata } from "./metadata.js";
|
|
3
|
+
declare class Target implements interfaces.Target {
|
|
4
|
+
id: number;
|
|
5
|
+
type: interfaces.TargetType;
|
|
6
|
+
serviceIdentifier: interfaces.ServiceIdentifier;
|
|
7
|
+
name: interfaces.QueryableString;
|
|
8
|
+
identifier: string | symbol;
|
|
9
|
+
key: string | symbol;
|
|
10
|
+
metadata: Array<Metadata>;
|
|
11
|
+
constructor(type: interfaces.TargetType, identifier: string | symbol, serviceIdentifier: interfaces.ServiceIdentifier, namedOrTagged?: string | Metadata);
|
|
12
|
+
hasTag(key: string): boolean;
|
|
13
|
+
isArray(): boolean;
|
|
14
|
+
matchesArray(name: interfaces.ServiceIdentifier<unknown>): boolean;
|
|
15
|
+
isNamed(): boolean;
|
|
16
|
+
isTagged(): boolean;
|
|
17
|
+
isOptional(): boolean;
|
|
18
|
+
getNamedTag(): interfaces.Metadata<string> | null;
|
|
19
|
+
getCustomTags(): Array<interfaces.Metadata> | null;
|
|
20
|
+
matchesNamedTag(name: string): boolean;
|
|
21
|
+
matchesTag(key: string): (value: unknown) => boolean;
|
|
22
|
+
}
|
|
23
|
+
export { Target };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare function resolveInstance<T>(binding: interfaces.Binding<T>, constr: interfaces.Newable<T>, childRequests: Array<interfaces.Request>, resolveRequest: interfaces.ResolveRequestHandler): T | Promise<T>;
|
|
3
|
+
export { resolveInstance };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry for managing custom scope stores in dependency injection.
|
|
3
|
+
*
|
|
4
|
+
* @layer public
|
|
5
|
+
* @audience application-developers
|
|
6
|
+
* @concept scope-management
|
|
7
|
+
* @difficulty advanced
|
|
8
|
+
*
|
|
9
|
+
* @summary Quick Start
|
|
10
|
+
* Manages custom scope stores for multi-tenant or transaction-scoped services.
|
|
11
|
+
* Typically used internally by the framework.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const registry = new ScopeRegistry();
|
|
16
|
+
* const tenantScope = registry.getScopeStore("tenant");
|
|
17
|
+
* tenantScope.set(bindingId, instance);
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @layer internal
|
|
21
|
+
* @audience framework-developers
|
|
22
|
+
*
|
|
23
|
+
* **Internal Architecture**
|
|
24
|
+
*
|
|
25
|
+
* ScopeRegistry maintains separate stores for each custom scope:
|
|
26
|
+
* - Each scope has its own Map of binding IDs to instances
|
|
27
|
+
* - Instances are cached per scope value
|
|
28
|
+
* - Used by InversifyJS container for custom scope resolution
|
|
29
|
+
*
|
|
30
|
+
* **Use Cases**
|
|
31
|
+
* - Multi-tenant applications (tenant scope)
|
|
32
|
+
* - Transaction management (transaction scope)
|
|
33
|
+
* - Workflow orchestration (workflow scope)
|
|
34
|
+
*
|
|
35
|
+
* @see {@link provideInScope} for registering services with custom scopes
|
|
36
|
+
*
|
|
37
|
+
* @public API
|
|
38
|
+
*/
|
|
39
|
+
export declare class ScopeRegistry {
|
|
40
|
+
private stores;
|
|
41
|
+
/**
|
|
42
|
+
* Get or create a scope store for the given scope name.
|
|
43
|
+
*
|
|
44
|
+
* @layer public
|
|
45
|
+
* @audience application-developers
|
|
46
|
+
*
|
|
47
|
+
* @param scopeName - The name of the custom scope (e.g., "tenant", "transaction")
|
|
48
|
+
* @returns The scope store Map for the given scope name
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const registry = new ScopeRegistry();
|
|
53
|
+
* const tenantScope = registry.getScopeStore("tenant");
|
|
54
|
+
* // Use tenantScope to store/retrieve instances
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @public API
|
|
58
|
+
*/
|
|
59
|
+
getScopeStore(scopeName: string): Map<number, unknown>;
|
|
60
|
+
/**
|
|
61
|
+
* Check if a scope store exists for the given scope name.
|
|
62
|
+
* @param scopeName - The name of the custom scope
|
|
63
|
+
* @returns True if the scope store exists, false otherwise
|
|
64
|
+
*/
|
|
65
|
+
hasScope(scopeName: string): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Clear all instances from a specific scope store.
|
|
68
|
+
* @param scopeName - The name of the custom scope to clear
|
|
69
|
+
*/
|
|
70
|
+
clearScope(scopeName: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Remove a scope store entirely.
|
|
73
|
+
* @param scopeName - The name of the custom scope to remove
|
|
74
|
+
*/
|
|
75
|
+
removeScope(scopeName: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Clear all scope stores.
|
|
78
|
+
*/
|
|
79
|
+
clearAll(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Get all registered scope names.
|
|
82
|
+
* @returns Array of scope names
|
|
83
|
+
*/
|
|
84
|
+
getScopeNames(): Array<string>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Global scope registry instance.
|
|
88
|
+
* This is used by the container to manage custom scopes.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export declare const globalScopeRegistry: ScopeRegistry;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
export declare const tryGetFromScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>) => T | Promise<T> | null;
|
|
3
|
+
export declare const saveToScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>, result: T | Promise<T>) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class BindingInSyntax<T> implements interfaces.BindingInSyntax<T> {
|
|
3
|
+
private _binding;
|
|
4
|
+
constructor(binding: interfaces.Binding<T>);
|
|
5
|
+
inRequestScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
6
|
+
inSingletonScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
7
|
+
inTransientScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
8
|
+
inScope(scope: string): interfaces.BindingWhenOnSyntax<T>;
|
|
9
|
+
}
|
|
10
|
+
export { BindingInSyntax };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class BindingInWhenOnSyntax<T> implements interfaces.BindingInSyntax<T>, interfaces.BindingWhenSyntax<T>, interfaces.BindingOnSyntax<T> {
|
|
3
|
+
private _bindingInSyntax;
|
|
4
|
+
private _bindingWhenSyntax;
|
|
5
|
+
private _bindingOnSyntax;
|
|
6
|
+
private _binding;
|
|
7
|
+
constructor(binding: interfaces.Binding<T>);
|
|
8
|
+
inRequestScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
9
|
+
inSingletonScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
10
|
+
inTransientScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
11
|
+
inScope(scope: string): interfaces.BindingWhenOnSyntax<T>;
|
|
12
|
+
when(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
13
|
+
whenTargetNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
14
|
+
whenTargetIsDefault(): interfaces.BindingOnSyntax<T>;
|
|
15
|
+
whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
16
|
+
whenInjectedInto(parent: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
17
|
+
whenParentNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
18
|
+
whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
19
|
+
whenAnyAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
20
|
+
whenNoAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
21
|
+
whenAnyAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
22
|
+
whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
23
|
+
whenNoAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
24
|
+
whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
25
|
+
whenAnyAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
26
|
+
whenNoAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
27
|
+
onActivation(handler: (context: interfaces.Context, injectable: T) => T | Promise<T>): interfaces.BindingWhenSyntax<T>;
|
|
28
|
+
onDeactivation(handler: (injectable: T) => void | Promise<void>): interfaces.BindingWhenSyntax<T>;
|
|
29
|
+
}
|
|
30
|
+
export { BindingInWhenOnSyntax };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
declare class BindingOnSyntax<T> implements interfaces.BindingOnSyntax<T> {
|
|
3
|
+
private _binding;
|
|
4
|
+
constructor(binding: interfaces.Binding<T>);
|
|
5
|
+
onActivation(handler: interfaces.BindingActivation<T>): interfaces.BindingWhenSyntax<T>;
|
|
6
|
+
onDeactivation(handler: interfaces.BindingDeactivation<T>): interfaces.BindingWhenSyntax<T>;
|
|
7
|
+
}
|
|
8
|
+
export { BindingOnSyntax };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { interfaces } from "../interfaces/interfaces.js";
|
|
2
|
+
import { BindingWhenOnSyntax } from "./binding_when_on_syntax.js";
|
|
3
|
+
declare class BindingToSyntax<T> implements interfaces.BindingToSyntax<T> {
|
|
4
|
+
private _binding;
|
|
5
|
+
constructor(binding: interfaces.Binding<T>);
|
|
6
|
+
to(constructor: interfaces.Newable<T>): interfaces.BindingInWhenOnSyntax<T>;
|
|
7
|
+
toSelf(): interfaces.BindingInWhenOnSyntax<T>;
|
|
8
|
+
toConstantValue(value: T): interfaces.BindingWhenOnSyntax<T>;
|
|
9
|
+
toDynamicValue(func: interfaces.DynamicValue<T>): interfaces.BindingInWhenOnSyntax<T>;
|
|
10
|
+
toConstructor<T2>(constructor: interfaces.Newable<T2>): interfaces.BindingWhenOnSyntax<T>;
|
|
11
|
+
toFactory<T2>(factory: interfaces.FactoryCreator<T2>): interfaces.BindingWhenOnSyntax<T>;
|
|
12
|
+
toFunction(func: T): interfaces.BindingWhenOnSyntax<T>;
|
|
13
|
+
toAutoFactory<T2>(serviceIdentifier: interfaces.ServiceIdentifier<T2>): interfaces.BindingWhenOnSyntax<T>;
|
|
14
|
+
toAutoNamedFactory<T2>(serviceIdentifier: interfaces.ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
|
|
15
|
+
toProvider<T2>(provider: interfaces.ProviderCreator<T2>): interfaces.BindingWhenOnSyntax<T>;
|
|
16
|
+
toService(service: string | symbol | interfaces.Newable<T> | interfaces.Abstract<T>): void;
|
|
17
|
+
}
|
|
18
|
+
export { BindingToSyntax };
|