@velajs/vela 1.19.0 → 1.19.1
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/CHANGELOG.md +22 -14
- package/dist/configurable-module.builder-5FGMaXG6.js +91 -0
- package/dist/configurable-module.builder-5FGMaXG6.js.map +1 -0
- package/dist/container-BqUHID4l.js +645 -0
- package/dist/container-BqUHID4l.js.map +1 -0
- package/dist/cron-matcher-C9qv5OUA.js +113 -0
- package/dist/cron-matcher-C9qv5OUA.js.map +1 -0
- package/dist/decorate-GcSMAbKn.js +528 -0
- package/dist/decorate-GcSMAbKn.js.map +1 -0
- package/dist/decorators-C8YBFCIk.js +53 -0
- package/dist/decorators-C8YBFCIk.js.map +1 -0
- package/dist/define-module-NOyOZNXD.js +235 -0
- package/dist/define-module-NOyOZNXD.js.map +1 -0
- package/dist/discovery.service-BYm95SSD.js +368 -0
- package/dist/discovery.service-BYm95SSD.js.map +1 -0
- package/dist/discovery.service-Cpf1QcZ5.d.ts +648 -0
- package/dist/i18n/index.d.ts +138 -10
- package/dist/i18n/index.js +270 -8
- package/dist/i18n/index.js.map +1 -0
- package/dist/index-D72EQfcC.d.ts +430 -0
- package/dist/index-DhShDLCM.d.ts +2310 -0
- package/dist/index.d.ts +6 -70
- package/dist/index.js +14 -76
- package/dist/internal.d.ts +13 -17
- package/dist/internal.js +6 -19
- package/dist/live/index.d.ts +2 -12
- package/dist/live/index.js +826 -16
- package/dist/live/index.js.map +1 -0
- package/dist/metadata.registry-D1od8ZBt.d.ts +842 -0
- package/dist/plugin-ByBlVOve.js +1387 -0
- package/dist/plugin-ByBlVOve.js.map +1 -0
- package/dist/queue/index.d.ts +247 -10
- package/dist/queue/index.js +384 -12
- package/dist/queue/index.js.map +1 -0
- package/dist/request-context-C3nCGJNd.js +26 -0
- package/dist/request-context-C3nCGJNd.js.map +1 -0
- package/dist/route.manager-DRAZ5X04.js +991 -0
- package/dist/route.manager-DRAZ5X04.js.map +1 -0
- package/dist/schedule-node/index.d.ts +32 -3
- package/dist/schedule-node/index.js +97 -3
- package/dist/schedule-node/index.js.map +1 -0
- package/dist/schedule.registry-DVm7Jp5w.d.ts +55 -0
- package/dist/seeder/index.d.ts +75 -5
- package/dist/seeder/index.js +105 -4
- package/dist/seeder/index.js.map +1 -0
- package/dist/signed-url-CMmi0SIb.js +56 -0
- package/dist/signed-url-CMmi0SIb.js.map +1 -0
- package/dist/signed-url-DKhgja4U.d.ts +16 -0
- package/dist/src-eb5CI6Xn.js +2151 -0
- package/dist/src-eb5CI6Xn.js.map +1 -0
- package/dist/storage/index.d.ts +57 -4
- package/dist/storage/index.js +22 -5
- package/dist/storage/index.js.map +1 -0
- package/dist/streaming/index.d.ts +2 -2
- package/dist/streaming/index.js +2 -1
- package/dist/websocket/index.d.ts +3 -12
- package/dist/websocket/index.js +2 -16
- package/dist/websocket-DXmB-MWJ.js +697 -0
- package/dist/websocket-DXmB-MWJ.js.map +1 -0
- package/dist/websocket-node/index.d.ts +108 -6
- package/dist/websocket-node/index.js +228 -6
- package/dist/websocket-node/index.js.map +1 -0
- package/package.json +66 -53
- package/dist/__tests__/workers/entry.d.ts +0 -9
- package/dist/__tests__/workers-als/entry-als.d.ts +0 -9
- package/dist/application.d.ts +0 -104
- package/dist/application.js +0 -364
- package/dist/cache/cache.decorators.d.ts +0 -2
- package/dist/cache/cache.decorators.js +0 -4
- package/dist/cache/cache.interceptor.d.ts +0 -9
- package/dist/cache/cache.interceptor.js +0 -60
- package/dist/cache/cache.module.d.ts +0 -7
- package/dist/cache/cache.module.js +0 -58
- package/dist/cache/cache.service.d.ts +0 -9
- package/dist/cache/cache.service.js +0 -42
- package/dist/cache/cache.store.d.ts +0 -12
- package/dist/cache/cache.store.js +0 -51
- package/dist/cache/cache.tokens.d.ts +0 -6
- package/dist/cache/cache.tokens.js +0 -5
- package/dist/cache/cache.types.d.ts +0 -41
- package/dist/cache/cache.types.js +0 -1
- package/dist/cache/index.d.ts +0 -8
- package/dist/cache/index.js +0 -7
- package/dist/cache/tiered-cache.store.d.ts +0 -19
- package/dist/cache/tiered-cache.store.js +0 -40
- package/dist/config/config.module.d.ts +0 -19
- package/dist/config/config.module.js +0 -98
- package/dist/config/config.service.d.ts +0 -20
- package/dist/config/config.service.js +0 -43
- package/dist/config/config.store.d.ts +0 -46
- package/dist/config/config.store.js +0 -119
- package/dist/config/config.tokens.d.ts +0 -13
- package/dist/config/config.tokens.js +0 -14
- package/dist/config/config.types.d.ts +0 -41
- package/dist/config/config.types.js +0 -4
- package/dist/config/index.d.ts +0 -7
- package/dist/config/index.js +0 -5
- package/dist/config/register-as.d.ts +0 -52
- package/dist/config/register-as.js +0 -39
- package/dist/constants.d.ts +0 -44
- package/dist/constants.js +0 -46
- package/dist/container/container.d.ts +0 -154
- package/dist/container/container.js +0 -849
- package/dist/container/decorators.d.ts +0 -17
- package/dist/container/decorators.js +0 -57
- package/dist/container/disposable.d.ts +0 -5
- package/dist/container/disposable.js +0 -33
- package/dist/container/index.d.ts +0 -6
- package/dist/container/index.js +0 -5
- package/dist/container/mixin.d.ts +0 -24
- package/dist/container/mixin.js +0 -26
- package/dist/container/module-ref.d.ts +0 -21
- package/dist/container/module-ref.js +0 -48
- package/dist/container/types.d.ts +0 -154
- package/dist/container/types.js +0 -49
- package/dist/cors/cors.module.d.ts +0 -7
- package/dist/cors/cors.module.js +0 -37
- package/dist/cors/cors.tokens.d.ts +0 -3
- package/dist/cors/cors.tokens.js +0 -2
- package/dist/cors/cors.types.d.ts +0 -8
- package/dist/cors/cors.types.js +0 -1
- package/dist/cors/index.d.ts +0 -3
- package/dist/cors/index.js +0 -2
- package/dist/crypto/signed-url.d.ts +0 -12
- package/dist/crypto/signed-url.js +0 -60
- package/dist/discovery/discoverable.decorator.d.ts +0 -38
- package/dist/discovery/discoverable.decorator.js +0 -42
- package/dist/discovery/discovery.service.d.ts +0 -102
- package/dist/discovery/discovery.service.js +0 -177
- package/dist/discovery/index.d.ts +0 -2
- package/dist/discovery/index.js +0 -2
- package/dist/entrypoint/entrypoint.registry.d.ts +0 -42
- package/dist/entrypoint/entrypoint.registry.js +0 -112
- package/dist/entrypoint/entrypoint.types.d.ts +0 -41
- package/dist/entrypoint/entrypoint.types.js +0 -3
- package/dist/entrypoint/execution-context.d.ts +0 -15
- package/dist/entrypoint/execution-context.js +0 -21
- package/dist/entrypoint/execution-scope.d.ts +0 -21
- package/dist/entrypoint/execution-scope.js +0 -28
- package/dist/entrypoint/index.d.ts +0 -4
- package/dist/entrypoint/index.js +0 -4
- package/dist/errors/http-exception.d.ts +0 -63
- package/dist/errors/http-exception.js +0 -142
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/index.js +0 -1
- package/dist/event-emitter/event-emitter.decorators.d.ts +0 -1
- package/dist/event-emitter/event-emitter.decorators.js +0 -10
- package/dist/event-emitter/event-emitter.module.d.ts +0 -2
- package/dist/event-emitter/event-emitter.module.js +0 -23
- package/dist/event-emitter/event-emitter.service.d.ts +0 -13
- package/dist/event-emitter/event-emitter.service.js +0 -127
- package/dist/event-emitter/event-emitter.subscriber.d.ts +0 -9
- package/dist/event-emitter/event-emitter.subscriber.js +0 -45
- package/dist/event-emitter/event-emitter.tokens.d.ts +0 -1
- package/dist/event-emitter/event-emitter.tokens.js +0 -1
- package/dist/event-emitter/event-emitter.types.d.ts +0 -5
- package/dist/event-emitter/event-emitter.types.js +0 -1
- package/dist/event-emitter/index.d.ts +0 -6
- package/dist/event-emitter/index.js +0 -5
- package/dist/exceptions/errors.module.d.ts +0 -40
- package/dist/exceptions/errors.module.js +0 -46
- package/dist/exceptions/exception-handler.d.ts +0 -56
- package/dist/exceptions/exception-handler.js +0 -17
- package/dist/exceptions/index.d.ts +0 -6
- package/dist/exceptions/index.js +0 -3
- package/dist/exceptions/reporter.d.ts +0 -21
- package/dist/exceptions/reporter.js +0 -70
- package/dist/factory/adapter.d.ts +0 -36
- package/dist/factory/adapter.js +0 -18
- package/dist/factory/bootstrap.d.ts +0 -23
- package/dist/factory/bootstrap.js +0 -110
- package/dist/factory.d.ts +0 -16
- package/dist/factory.js +0 -36
- package/dist/fetch/fetch.module.d.ts +0 -7
- package/dist/fetch/fetch.module.js +0 -31
- package/dist/fetch/fetch.service.d.ts +0 -24
- package/dist/fetch/fetch.service.js +0 -145
- package/dist/fetch/fetch.types.d.ts +0 -24
- package/dist/fetch/fetch.types.js +0 -1
- package/dist/fetch/index.d.ts +0 -3
- package/dist/fetch/index.js +0 -2
- package/dist/health/health.http.d.ts +0 -14
- package/dist/health/health.http.js +0 -75
- package/dist/health/health.indicator.d.ts +0 -9
- package/dist/health/health.indicator.js +0 -32
- package/dist/health/health.module.d.ts +0 -2
- package/dist/health/health.module.js +0 -26
- package/dist/health/health.service.d.ts +0 -7
- package/dist/health/health.service.js +0 -69
- package/dist/health/health.types.d.ts +0 -15
- package/dist/health/health.types.js +0 -1
- package/dist/health/index.d.ts +0 -6
- package/dist/health/index.js +0 -4
- package/dist/http/ambient.d.ts +0 -17
- package/dist/http/ambient.js +0 -44
- package/dist/http/argument-resolver.d.ts +0 -10
- package/dist/http/argument-resolver.js +0 -89
- package/dist/http/decorators.d.ts +0 -198
- package/dist/http/decorators.js +0 -321
- package/dist/http/execution-context.d.ts +0 -8
- package/dist/http/execution-context.js +0 -35
- package/dist/http/handler-executor.d.ts +0 -20
- package/dist/http/handler-executor.js +0 -133
- package/dist/http/index.d.ts +0 -12
- package/dist/http/index.js +0 -7
- package/dist/http/instantiate.d.ts +0 -4
- package/dist/http/instantiate.js +0 -45
- package/dist/http/lazy-param.decorator.d.ts +0 -37
- package/dist/http/lazy-param.decorator.js +0 -117
- package/dist/http/request-container.d.ts +0 -16
- package/dist/http/request-container.js +0 -19
- package/dist/http/request-context.d.ts +0 -13
- package/dist/http/request-context.js +0 -22
- package/dist/http/response-mapper.d.ts +0 -8
- package/dist/http/response-mapper.js +0 -42
- package/dist/http/route-contributor.d.ts +0 -68
- package/dist/http/route-contributor.js +0 -22
- package/dist/http/route-map.d.ts +0 -30
- package/dist/http/route-map.js +0 -27
- package/dist/http/route.manager.d.ts +0 -92
- package/dist/http/route.manager.js +0 -481
- package/dist/http/types.d.ts +0 -37
- package/dist/http/types.js +0 -1
- package/dist/http/url/index.d.ts +0 -4
- package/dist/http/url/index.js +0 -3
- package/dist/http/url/signed-url.guard.d.ts +0 -27
- package/dist/http/url/signed-url.guard.js +0 -62
- package/dist/http/url/signing-secret.d.ts +0 -20
- package/dist/http/url/signing-secret.js +0 -24
- package/dist/http/url/url-generator.service.d.ts +0 -52
- package/dist/http/url/url-generator.service.js +0 -104
- package/dist/i18n/deep-merge.d.ts +0 -2
- package/dist/i18n/deep-merge.js +0 -15
- package/dist/i18n/i18n.middleware.d.ts +0 -15
- package/dist/i18n/i18n.middleware.js +0 -94
- package/dist/i18n/i18n.module.d.ts +0 -13
- package/dist/i18n/i18n.module.js +0 -69
- package/dist/i18n/i18n.options.d.ts +0 -30
- package/dist/i18n/i18n.options.js +0 -16
- package/dist/i18n/i18n.service.d.ts +0 -20
- package/dist/i18n/i18n.service.js +0 -49
- package/dist/i18n/i18n.tokens.d.ts +0 -6
- package/dist/i18n/i18n.tokens.js +0 -3
- package/dist/i18n/i18n.types.d.ts +0 -6
- package/dist/i18n/i18n.types.js +0 -1
- package/dist/i18n/message-loader.service.d.ts +0 -21
- package/dist/i18n/message-loader.service.js +0 -90
- package/dist/i18n/message-registry.d.ts +0 -16
- package/dist/i18n/message-registry.js +0 -49
- package/dist/lifecycle/index.d.ts +0 -20
- package/dist/lifecycle/index.js +0 -15
- package/dist/live/live.cursor.d.ts +0 -22
- package/dist/live/live.cursor.js +0 -56
- package/dist/live/live.decorators.d.ts +0 -32
- package/dist/live/live.decorators.js +0 -46
- package/dist/live/live.delta.d.ts +0 -15
- package/dist/live/live.delta.js +0 -51
- package/dist/live/live.engine.d.ts +0 -88
- package/dist/live/live.engine.js +0 -471
- package/dist/live/live.invalidation.d.ts +0 -45
- package/dist/live/live.invalidation.js +0 -99
- package/dist/live/live.module.d.ts +0 -28
- package/dist/live/live.module.js +0 -87
- package/dist/live/live.tokens.d.ts +0 -9
- package/dist/live/live.tokens.js +0 -8
- package/dist/live/live.types.d.ts +0 -138
- package/dist/live/live.types.js +0 -1
- package/dist/live/presence.d.ts +0 -44
- package/dist/live/presence.js +0 -130
- package/dist/metadata.d.ts +0 -10
- package/dist/metadata.js +0 -20
- package/dist/module/configurable-module.builder.d.ts +0 -56
- package/dist/module/configurable-module.builder.js +0 -84
- package/dist/module/configurable-module.types.d.ts +0 -93
- package/dist/module/configurable-module.types.js +0 -5
- package/dist/module/decorators.d.ts +0 -10
- package/dist/module/decorators.js +0 -47
- package/dist/module/define-module.d.ts +0 -112
- package/dist/module/define-module.js +0 -232
- package/dist/module/graph.d.ts +0 -10
- package/dist/module/graph.js +0 -35
- package/dist/module/index.d.ts +0 -10
- package/dist/module/index.js +0 -7
- package/dist/module/lazy-modules.d.ts +0 -82
- package/dist/module/lazy-modules.js +0 -231
- package/dist/module/lazy-provider.d.ts +0 -65
- package/dist/module/lazy-provider.js +0 -111
- package/dist/module/middleware.d.ts +0 -30
- package/dist/module/middleware.js +0 -67
- package/dist/module/module-loader.d.ts +0 -58
- package/dist/module/module-loader.js +0 -484
- package/dist/module/stable-hash.d.ts +0 -15
- package/dist/module/stable-hash.js +0 -52
- package/dist/module/types.d.ts +0 -1
- package/dist/module/types.js +0 -1
- package/dist/openapi/decorators.d.ts +0 -34
- package/dist/openapi/decorators.js +0 -66
- package/dist/openapi/document.d.ts +0 -3
- package/dist/openapi/document.js +0 -316
- package/dist/openapi/index.d.ts +0 -7
- package/dist/openapi/index.js +0 -6
- package/dist/openapi/redoc-ui.d.ts +0 -1
- package/dist/openapi/redoc-ui.js +0 -19
- package/dist/openapi/scalar-ui.d.ts +0 -1
- package/dist/openapi/scalar-ui.js +0 -19
- package/dist/openapi/swagger-ui.d.ts +0 -1
- package/dist/openapi/swagger-ui.js +0 -23
- package/dist/openapi/types.d.ts +0 -182
- package/dist/openapi/types.js +0 -4
- package/dist/openapi/zod-to-json-schema.d.ts +0 -4
- package/dist/openapi/zod-to-json-schema.js +0 -57
- package/dist/pipeline/app-providers.d.ts +0 -10
- package/dist/pipeline/app-providers.js +0 -43
- package/dist/pipeline/component.manager.d.ts +0 -25
- package/dist/pipeline/component.manager.js +0 -66
- package/dist/pipeline/decorators.d.ts +0 -10
- package/dist/pipeline/decorators.js +0 -42
- package/dist/pipeline/index.d.ts +0 -12
- package/dist/pipeline/index.js +0 -7
- package/dist/pipeline/pipeline-runner.d.ts +0 -31
- package/dist/pipeline/pipeline-runner.js +0 -40
- package/dist/pipeline/pipes.d.ts +0 -48
- package/dist/pipeline/pipes.js +0 -104
- package/dist/pipeline/reflector.d.ts +0 -86
- package/dist/pipeline/reflector.js +0 -121
- package/dist/pipeline/scoped-components.d.ts +0 -26
- package/dist/pipeline/scoped-components.js +0 -27
- package/dist/pipeline/tokens.d.ts +0 -57
- package/dist/pipeline/tokens.js +0 -47
- package/dist/pipeline/types.d.ts +0 -64
- package/dist/pipeline/types.js +0 -1
- package/dist/plugin/plugin.d.ts +0 -31
- package/dist/plugin/plugin.js +0 -111
- package/dist/queue/inline.driver.d.ts +0 -30
- package/dist/queue/inline.driver.js +0 -58
- package/dist/queue/queue.binding.d.ts +0 -23
- package/dist/queue/queue.binding.js +0 -60
- package/dist/queue/queue.client.d.ts +0 -20
- package/dist/queue/queue.client.js +0 -33
- package/dist/queue/queue.decorators.d.ts +0 -23
- package/dist/queue/queue.decorators.js +0 -46
- package/dist/queue/queue.dispatch.d.ts +0 -36
- package/dist/queue/queue.dispatch.js +0 -109
- package/dist/queue/queue.module.d.ts +0 -32
- package/dist/queue/queue.module.js +0 -80
- package/dist/queue/queue.tokens.d.ts +0 -21
- package/dist/queue/queue.tokens.js +0 -34
- package/dist/queue/queue.types.d.ts +0 -61
- package/dist/queue/queue.types.js +0 -4
- package/dist/registry/index.d.ts +0 -2
- package/dist/registry/index.js +0 -1
- package/dist/registry/metadata.registry.d.ts +0 -73
- package/dist/registry/metadata.registry.js +0 -357
- package/dist/registry/paths.d.ts +0 -3
- package/dist/registry/paths.js +0 -15
- package/dist/registry/types.d.ts +0 -116
- package/dist/registry/types.js +0 -1
- package/dist/registry/util.d.ts +0 -3
- package/dist/registry/util.js +0 -8
- package/dist/schedule/cron-matcher.d.ts +0 -2
- package/dist/schedule/cron-matcher.js +0 -62
- package/dist/schedule/index.d.ts +0 -8
- package/dist/schedule/index.js +0 -5
- package/dist/schedule/schedule.decorators.d.ts +0 -2
- package/dist/schedule/schedule.decorators.js +0 -18
- package/dist/schedule/schedule.module.d.ts +0 -9
- package/dist/schedule/schedule.module.js +0 -28
- package/dist/schedule/schedule.registry.d.ts +0 -23
- package/dist/schedule/schedule.registry.js +0 -63
- package/dist/schedule/schedule.tokens.d.ts +0 -2
- package/dist/schedule/schedule.tokens.js +0 -2
- package/dist/schedule/schedule.types.d.ts +0 -8
- package/dist/schedule/schedule.types.js +0 -1
- package/dist/schedule-node/schedule-node.module.d.ts +0 -9
- package/dist/schedule-node/schedule-node.module.js +0 -28
- package/dist/schedule-node/schedule.executor.d.ts +0 -19
- package/dist/schedule-node/schedule.executor.js +0 -112
- package/dist/seeder/seeder.decorator.d.ts +0 -7
- package/dist/seeder/seeder.decorator.js +0 -15
- package/dist/seeder/seeder.module.d.ts +0 -16
- package/dist/seeder/seeder.module.js +0 -44
- package/dist/seeder/seeder.registry.d.ts +0 -23
- package/dist/seeder/seeder.registry.js +0 -83
- package/dist/seeder/seeder.tokens.d.ts +0 -2
- package/dist/seeder/seeder.tokens.js +0 -1
- package/dist/seeder/seeder.types.d.ts +0 -20
- package/dist/seeder/seeder.types.js +0 -1
- package/dist/serialization/index.d.ts +0 -2
- package/dist/serialization/index.js +0 -2
- package/dist/serialization/serialize.decorator.d.ts +0 -6
- package/dist/serialization/serialize.decorator.js +0 -7
- package/dist/serialization/serializer.interceptor.d.ts +0 -4
- package/dist/serialization/serializer.interceptor.js +0 -16
- package/dist/services/index.d.ts +0 -2
- package/dist/services/index.js +0 -1
- package/dist/services/logger.d.ts +0 -59
- package/dist/services/logger.js +0 -159
- package/dist/storage/path-template.d.ts +0 -9
- package/dist/storage/path-template.js +0 -20
- package/dist/storage/storage.types.d.ts +0 -41
- package/dist/storage/storage.types.js +0 -5
- package/dist/throttler/index.d.ts +0 -6
- package/dist/throttler/index.js +0 -5
- package/dist/throttler/throttler.decorators.d.ts +0 -3
- package/dist/throttler/throttler.decorators.js +0 -4
- package/dist/throttler/throttler.guard.d.ts +0 -9
- package/dist/throttler/throttler.guard.js +0 -72
- package/dist/throttler/throttler.module.d.ts +0 -7
- package/dist/throttler/throttler.module.js +0 -41
- package/dist/throttler/throttler.storage.d.ts +0 -10
- package/dist/throttler/throttler.storage.js +0 -44
- package/dist/throttler/throttler.tokens.d.ts +0 -6
- package/dist/throttler/throttler.tokens.js +0 -5
- package/dist/throttler/throttler.types.d.ts +0 -25
- package/dist/throttler/throttler.types.js +0 -1
- package/dist/validation/create-zod-dto.d.ts +0 -13
- package/dist/validation/create-zod-dto.js +0 -18
- package/dist/validation/index.d.ts +0 -3
- package/dist/validation/index.js +0 -2
- package/dist/validation/validation.pipe.d.ts +0 -4
- package/dist/validation/validation.pipe.js +0 -19
- package/dist/websocket/websocket.decorators.d.ts +0 -47
- package/dist/websocket/websocket.decorators.js +0 -80
- package/dist/websocket/websocket.module.d.ts +0 -35
- package/dist/websocket/websocket.module.js +0 -63
- package/dist/websocket/websocket.tokens.d.ts +0 -30
- package/dist/websocket/websocket.tokens.js +0 -27
- package/dist/websocket/websocket.types.d.ts +0 -102
- package/dist/websocket/websocket.types.js +0 -4
- package/dist/websocket/ws-argument-resolver.d.ts +0 -13
- package/dist/websocket/ws-argument-resolver.js +0 -40
- package/dist/websocket/ws-dispatcher.d.ts +0 -54
- package/dist/websocket/ws-dispatcher.js +0 -343
- package/dist/websocket/ws-exception.d.ts +0 -25
- package/dist/websocket/ws-exception.js +0 -42
- package/dist/websocket/ws-execution-context.d.ts +0 -9
- package/dist/websocket/ws-execution-context.js +0 -24
- package/dist/websocket/ws-server.d.ts +0 -31
- package/dist/websocket/ws-server.js +0 -74
- package/dist/websocket/ws-sync.d.ts +0 -47
- package/dist/websocket/ws-sync.js +0 -74
- package/dist/websocket-node/node-ws-client.d.ts +0 -24
- package/dist/websocket-node/node-ws-client.js +0 -49
- package/dist/websocket-node/redis-live.d.ts +0 -24
- package/dist/websocket-node/redis-live.js +0 -57
- package/dist/websocket-node/redis-sync.d.ts +0 -33
- package/dist/websocket-node/redis-sync.js +0 -56
- package/dist/websocket-node/register-gateways.d.ts +0 -20
- package/dist/websocket-node/register-gateways.js +0 -61
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
import { A as NestInterceptor, C as RouteDefinition, D as ExceptionFilter, E as CanActivate, F as Constructor, L as Diagnostics, M as PipeTransform, O as ExecutionContext, P as Container, S as PipeType, U as InjectionToken, V as InjectMetadata, X as Token, Z as Type, _ as MiddlewareType, b as ModuleOptions, d as ComponentTypeMap, et as HttpMethod, f as DynamicModule, g as InterceptorType, h as HttpHandlerMeta, i as DiscoveryService, j as NestMiddleware, m as GuardType, p as FilterType, rt as Scope, u as ComponentType, w as ArgumentMetadata, x as ParameterMetadata, y as ModuleMetadata } from "./discovery.service-Cpf1QcZ5.js";
|
|
2
|
+
import { Catalog, ErrorBodyResult } from "@velajs/errors";
|
|
3
|
+
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
4
|
+
//#region src/exceptions/exception-handler.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A predicate for classifying an error, used by {@link ExceptionHandler.dontReport}.
|
|
7
|
+
*
|
|
8
|
+
* Three shapes are accepted:
|
|
9
|
+
* - `string` — a Vela error code; matches when the error is a branded
|
|
10
|
+
* `VelaError` whose `code` equals the string.
|
|
11
|
+
* - a predicate `(error: unknown) => boolean` — **must be an arrow function**.
|
|
12
|
+
* A class and a predicate are both `typeof 'function'`; {@link matchesAny}
|
|
13
|
+
* discriminates on `prototype`, which arrow functions do not have.
|
|
14
|
+
* - an error class constructor — matches via `instanceof`.
|
|
15
|
+
*
|
|
16
|
+
* Bound functions (e.g. `SomeClass.bind(null)`) also lack `.prototype`, so they
|
|
17
|
+
* are treated as predicates and invoked — never as class matchers. Since a bound
|
|
18
|
+
* constructor cannot be called without `new`, using one here throws; pass the
|
|
19
|
+
* unbound class instead.
|
|
20
|
+
*/
|
|
21
|
+
type ErrorMatcher = string | ((error: unknown) => boolean) | (new (...args: never[]) => Error);
|
|
22
|
+
/**
|
|
23
|
+
* Ambient context handed to every reporting/rendering hook. `edge` names the
|
|
24
|
+
* transport that caught the error; open-ended extra keys (via the index
|
|
25
|
+
* signature) let a handler's `context()` enrich the payload.
|
|
26
|
+
*/
|
|
27
|
+
interface ErrorReportContext {
|
|
28
|
+
edge: 'http' | 'ws' | 'live' | 'queue' | 'schedule' | 'hono';
|
|
29
|
+
/** e.g. `'CatsController.findAll'` or a query name. */
|
|
30
|
+
source?: string;
|
|
31
|
+
/** e.g. `'exception filter threw'`. */
|
|
32
|
+
note?: string;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The application-wide exception handler contract. Provide an implementation
|
|
37
|
+
* under {@link APP_EXCEPTION_HANDLER} to customize how errors are reported and
|
|
38
|
+
* rendered. Every member is optional — an empty object is a valid handler.
|
|
39
|
+
*/
|
|
40
|
+
interface ExceptionHandler {
|
|
41
|
+
/** Fire-and-forget reporting (logging, Sentry, …). May be async. */
|
|
42
|
+
report?(error: unknown, ctx: ErrorReportContext): void | Promise<void>;
|
|
43
|
+
/** Errors matching any of these are never reported. */
|
|
44
|
+
dontReport?: ErrorMatcher[];
|
|
45
|
+
/** Extra fields merged into the report context. Must be side-effect free. */
|
|
46
|
+
context?(error: unknown, ctx: ErrorReportContext): Record<string, unknown>;
|
|
47
|
+
/** Override the client-bound response for an error. */
|
|
48
|
+
render?(error: unknown, ctx: unknown): Response | ErrorBodyResult | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* True when `error` matches any of `matchers`. A string matches a branded
|
|
52
|
+
* {@link VelaError} by `code`; an arrow-function predicate is called; anything
|
|
53
|
+
* else with a `prototype` is treated as an error class and matched via
|
|
54
|
+
* `instanceof`. Predicates therefore MUST be arrow functions — a regular
|
|
55
|
+
* `function` expression has a `prototype` and would be mistaken for a class.
|
|
56
|
+
* Bound functions (e.g. `SomeClass.bind(null)`) lack `.prototype` too, so they
|
|
57
|
+
* are invoked as predicates — don't pass a bound class as a class matcher.
|
|
58
|
+
*/
|
|
59
|
+
declare const matchesAny: (matchers: ErrorMatcher[] | undefined, error: unknown) => boolean;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/entrypoint/entrypoint.types.d.ts
|
|
62
|
+
/**
|
|
63
|
+
* A declared entrypoint kind: a named category of non-HTTP (or non-standard)
|
|
64
|
+
* entry surface that some module knows how to dispatch — WebSocket gateways,
|
|
65
|
+
* queue consumers, scheduled jobs, CLI commands. Core ships NO fixed set;
|
|
66
|
+
* any module registers its own kind and any runtime adapter can query it.
|
|
67
|
+
*
|
|
68
|
+
* `metaKey` binds the kind to a decorator's metadata key: every provider
|
|
69
|
+
* carrying that metadata becomes an entrypoint of this kind at bootstrap.
|
|
70
|
+
*/
|
|
71
|
+
interface EntrypointKind {
|
|
72
|
+
kind: string;
|
|
73
|
+
metaKey: string;
|
|
74
|
+
/**
|
|
75
|
+
* 'class': one entrypoint per decorated provider (`@WebSocketGateway`).
|
|
76
|
+
* 'method': one entrypoint per decorated method (`@Cron`, `@QueueConsumer`
|
|
77
|
+
* handler methods) — flattened from the class-level list convention.
|
|
78
|
+
*/
|
|
79
|
+
level: 'class' | 'method';
|
|
80
|
+
}
|
|
81
|
+
/** One concrete entrypoint discovered at bootstrap. */
|
|
82
|
+
interface Entrypoint<M = unknown> {
|
|
83
|
+
kind: string;
|
|
84
|
+
token: Token;
|
|
85
|
+
/** The resolved provider backing the entrypoint (undefined if request-scoped). */
|
|
86
|
+
instance: unknown;
|
|
87
|
+
/** Present for method-level kinds. */
|
|
88
|
+
methodName?: string | symbol;
|
|
89
|
+
meta: M;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Escape hatch for providers whose entrypoints are computed rather than purely
|
|
93
|
+
* decorator-declared (e.g. `WsDispatcher` aggregates per-gateway routing state
|
|
94
|
+
* before contributing). Implementers are detected among the app's eagerly
|
|
95
|
+
* instantiated providers after `onApplicationBootstrap` hooks have run.
|
|
96
|
+
*/
|
|
97
|
+
interface ContributesEntrypoints {
|
|
98
|
+
collectEntrypoints(discovery: DiscoveryService): Entrypoint[] | Promise<Entrypoint[]>;
|
|
99
|
+
}
|
|
100
|
+
declare function contributesEntrypoints(x: unknown): x is ContributesEntrypoints;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/entrypoint/entrypoint.registry.d.ts
|
|
103
|
+
/**
|
|
104
|
+
* Declare an entrypoint kind. Idempotent per `kind` (last declaration wins so
|
|
105
|
+
* an HMR-re-evaluated module can re-declare); typically called at module
|
|
106
|
+
* import time next to the decorator definition:
|
|
107
|
+
*
|
|
108
|
+
* ```ts
|
|
109
|
+
* export const WS_GATEWAY_METADATA = 'vela:ws:gateway';
|
|
110
|
+
* registerEntrypointKind({ kind: 'websocket', metaKey: WS_GATEWAY_METADATA, level: 'class' });
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
declare function registerEntrypointKind(k: EntrypointKind): void;
|
|
114
|
+
/** All declared kinds (registration order). */
|
|
115
|
+
declare function getEntrypointKinds(): EntrypointKind[];
|
|
116
|
+
/**
|
|
117
|
+
* The per-application view of every entrypoint: built once after
|
|
118
|
+
* `onApplicationBootstrap` hooks have run (so `ContributesEntrypoints`
|
|
119
|
+
* providers have finished their own discovery), queried by runtime adapters:
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* for (const ep of app.entrypoints.ofKind('websocket')) { ... }
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* Per-app (never global): two applications in one process each build their
|
|
126
|
+
* own registry from their own container.
|
|
127
|
+
*/
|
|
128
|
+
declare class EntrypointRegistry {
|
|
129
|
+
private readonly byKind;
|
|
130
|
+
static build(discovery: DiscoveryService, eagerInstances: readonly unknown[], options?: {
|
|
131
|
+
deferLazy?: boolean;
|
|
132
|
+
}): Promise<EntrypointRegistry>;
|
|
133
|
+
private add;
|
|
134
|
+
ofKind<M = unknown>(kind: string): Entrypoint<M>[];
|
|
135
|
+
kinds(): string[];
|
|
136
|
+
all(): Entrypoint[];
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/module/middleware.d.ts
|
|
140
|
+
interface RouteInfo {
|
|
141
|
+
path: string;
|
|
142
|
+
method?: HttpMethod;
|
|
143
|
+
}
|
|
144
|
+
interface MiddlewareRouteDefinition {
|
|
145
|
+
middleware: Array<Type<NestMiddleware> | NestMiddleware>;
|
|
146
|
+
routes: RouteInfo[];
|
|
147
|
+
excludes: RouteInfo[];
|
|
148
|
+
/** Stable-sort key; lower runs first. Default 0. */
|
|
149
|
+
priority?: number;
|
|
150
|
+
}
|
|
151
|
+
interface MiddlewareConfigProxy {
|
|
152
|
+
exclude(...routes: Array<string | RouteInfo>): MiddlewareConfigProxy;
|
|
153
|
+
withPriority(priority: number): MiddlewareConfigProxy;
|
|
154
|
+
forRoutes(...routes: Array<string | Constructor | RouteInfo>): MiddlewareConsumer;
|
|
155
|
+
}
|
|
156
|
+
interface MiddlewareConsumer {
|
|
157
|
+
apply(...middleware: Array<Type<NestMiddleware> | NestMiddleware>): MiddlewareConfigProxy;
|
|
158
|
+
}
|
|
159
|
+
interface NestModule {
|
|
160
|
+
configure(consumer: MiddlewareConsumer): void;
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/http/types.d.ts
|
|
164
|
+
interface RouteMetadata {
|
|
165
|
+
method: HttpMethod;
|
|
166
|
+
path: string;
|
|
167
|
+
handlerName: string | symbol;
|
|
168
|
+
version?: number | number[];
|
|
169
|
+
/** Route name for URL generation / OpenAPI operationId (`@Get(path, { name })`). */
|
|
170
|
+
name?: string;
|
|
171
|
+
}
|
|
172
|
+
interface ControllerOptions$1 {
|
|
173
|
+
path?: string;
|
|
174
|
+
version?: number | number[];
|
|
175
|
+
}
|
|
176
|
+
interface ControllerMetadata {
|
|
177
|
+
prefix: string;
|
|
178
|
+
version?: number | number[];
|
|
179
|
+
}
|
|
180
|
+
interface ControllerRegistration {
|
|
181
|
+
controller: Type;
|
|
182
|
+
metadata: ControllerMetadata;
|
|
183
|
+
routes: RouteMetadata[];
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/http/route.manager.d.ts
|
|
187
|
+
/**
|
|
188
|
+
* One explicit controller route as the framework registered it — recorded by
|
|
189
|
+
* `build()` with the SAME composed path handed to Hono (global prefix +
|
|
190
|
+
* version segment + controller prefix + route path), so introspection tooling
|
|
191
|
+
* (`vela route list`) never re-derives composition. Contributed routes
|
|
192
|
+
* (`RouteContributor`, e.g. `@velajs/crud`) mount directly on the Hono app
|
|
193
|
+
* and are not described here — diff `app.getHonoApp().routes` for those.
|
|
194
|
+
*/
|
|
195
|
+
interface RouteDescription {
|
|
196
|
+
/** As declared on the handler — `@Head()` reports HEAD (Hono serves it under GET). */
|
|
197
|
+
method: string;
|
|
198
|
+
/** Fully composed path exactly as registered. */
|
|
199
|
+
path: string;
|
|
200
|
+
controller: string;
|
|
201
|
+
handler: string;
|
|
202
|
+
version?: number;
|
|
203
|
+
/** Route name (`@Get(path, { name })`) — the URL-generation / `operationId` key. */
|
|
204
|
+
name?: string;
|
|
205
|
+
}
|
|
206
|
+
interface RouteManagerOptions {
|
|
207
|
+
getClientIp?: (c: Context) => string | null;
|
|
208
|
+
middleware?: MiddlewareHandler[];
|
|
209
|
+
globalPrefix?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Opt into ambient request-container access (`getCurrentContainer()` /
|
|
212
|
+
* `getCurrentRequestContext()`). Registers Hono's `contextStorage()` as the
|
|
213
|
+
* first middleware. Off by default — the explicit child container is unchanged.
|
|
214
|
+
*/
|
|
215
|
+
ambientContainer?: boolean;
|
|
216
|
+
}
|
|
217
|
+
declare class RouteManager {
|
|
218
|
+
private container;
|
|
219
|
+
private static readonly METHOD_REGISTRAR;
|
|
220
|
+
private controllers;
|
|
221
|
+
private globalMiddleware;
|
|
222
|
+
private globalPipes;
|
|
223
|
+
private globalGuards;
|
|
224
|
+
private globalInterceptors;
|
|
225
|
+
private globalFilters;
|
|
226
|
+
private globalPrefix;
|
|
227
|
+
private consumerMiddlewareDefinitions;
|
|
228
|
+
private routeDescriptions;
|
|
229
|
+
private readonly handlerExecutor;
|
|
230
|
+
private readonly ambientContainer;
|
|
231
|
+
constructor(container: Container, options?: RouteManagerOptions);
|
|
232
|
+
/**
|
|
233
|
+
* The global-tier components (`APP_*` provider tokens + imperative
|
|
234
|
+
* `app.useGlobalX()` instances). Exposed so non-HTTP transports (the
|
|
235
|
+
* WebSocket dispatcher) can apply the same app-wide guards/pipes/interceptors/
|
|
236
|
+
* filters as HTTP routes, read live so late registrations propagate.
|
|
237
|
+
*/
|
|
238
|
+
getGlobalComponents(): {
|
|
239
|
+
guards: Array<GuardType | Token<CanActivate>>;
|
|
240
|
+
pipes: Array<PipeType | Token<PipeTransform>>;
|
|
241
|
+
interceptors: Array<InterceptorType | Token<NestInterceptor>>;
|
|
242
|
+
filters: Array<FilterType | Token<ExceptionFilter>>;
|
|
243
|
+
};
|
|
244
|
+
registerConsumerMiddleware(definitions: MiddlewareRouteDefinition[]): this;
|
|
245
|
+
setGlobalPrefix(prefix: string): this;
|
|
246
|
+
useGlobalMiddleware(...middleware: MiddlewareType[]): this;
|
|
247
|
+
useGlobalMiddlewareTokens(...middlewareTokens: Array<Token<NestMiddleware>>): this;
|
|
248
|
+
useGlobalPipes(...pipes: PipeType[]): this;
|
|
249
|
+
useGlobalPipeTokens(...pipeTokens: Array<Token<PipeTransform>>): this;
|
|
250
|
+
useGlobalGuards(...guards: GuardType[]): this;
|
|
251
|
+
useGlobalGuardTokens(...guardTokens: Array<Token<CanActivate>>): this;
|
|
252
|
+
useGlobalInterceptors(...interceptors: InterceptorType[]): this;
|
|
253
|
+
useGlobalInterceptorTokens(...interceptorTokens: Array<Token<NestInterceptor>>): this;
|
|
254
|
+
useGlobalFilters(...filters: FilterType[]): this;
|
|
255
|
+
useGlobalFilterTokens(...filterTokens: Array<Token<ExceptionFilter>>): this;
|
|
256
|
+
private getMiddlewarePriority;
|
|
257
|
+
private getRequestContainer;
|
|
258
|
+
private wrapMiddlewareWithFilters;
|
|
259
|
+
private mapMiddlewareError;
|
|
260
|
+
registerController(controller: Type): this;
|
|
261
|
+
/** The explicit controller routes recorded by the last `build()`. */
|
|
262
|
+
getRouteDescriptions(): RouteDescription[];
|
|
263
|
+
/** The global prefix in effect (set at bootstrap; '' when none). */
|
|
264
|
+
getGlobalPrefix(): string;
|
|
265
|
+
build(): Promise<Hono>;
|
|
266
|
+
private registerRoute;
|
|
267
|
+
private buildVersionedPaths;
|
|
268
|
+
private compilePathMatcher;
|
|
269
|
+
private compileRouteMatcher;
|
|
270
|
+
getControllers(): ControllerRegistration[];
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/openapi/types.d.ts
|
|
274
|
+
interface OpenApiInfo {
|
|
275
|
+
title: string;
|
|
276
|
+
version: string;
|
|
277
|
+
description?: string;
|
|
278
|
+
}
|
|
279
|
+
interface JsonSchema {
|
|
280
|
+
type?: string | string[];
|
|
281
|
+
format?: string;
|
|
282
|
+
enum?: Array<string | number | boolean | null>;
|
|
283
|
+
const?: unknown;
|
|
284
|
+
description?: string;
|
|
285
|
+
nullable?: boolean;
|
|
286
|
+
default?: unknown;
|
|
287
|
+
items?: JsonSchema;
|
|
288
|
+
properties?: Record<string, JsonSchema>;
|
|
289
|
+
required?: string[];
|
|
290
|
+
additionalProperties?: boolean | JsonSchema;
|
|
291
|
+
oneOf?: JsonSchema[];
|
|
292
|
+
anyOf?: JsonSchema[];
|
|
293
|
+
allOf?: JsonSchema[];
|
|
294
|
+
minimum?: number;
|
|
295
|
+
maximum?: number;
|
|
296
|
+
minLength?: number;
|
|
297
|
+
maxLength?: number;
|
|
298
|
+
pattern?: string;
|
|
299
|
+
$ref?: string;
|
|
300
|
+
[key: string]: unknown;
|
|
301
|
+
}
|
|
302
|
+
interface OpenApiParameter {
|
|
303
|
+
name: string;
|
|
304
|
+
in: 'path' | 'query' | 'header' | 'cookie';
|
|
305
|
+
required?: boolean;
|
|
306
|
+
description?: string;
|
|
307
|
+
schema?: JsonSchema;
|
|
308
|
+
}
|
|
309
|
+
interface OpenApiRequestBody {
|
|
310
|
+
description?: string;
|
|
311
|
+
required?: boolean;
|
|
312
|
+
content?: Record<string, {
|
|
313
|
+
schema: JsonSchema;
|
|
314
|
+
}>;
|
|
315
|
+
}
|
|
316
|
+
interface OpenApiResponse {
|
|
317
|
+
description: string;
|
|
318
|
+
content?: Record<string, {
|
|
319
|
+
schema: JsonSchema;
|
|
320
|
+
}>;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* A single security requirement: maps a securityScheme name to the scopes it
|
|
324
|
+
* requires (empty array for apiKey/http schemes). An operation- or document-
|
|
325
|
+
* level array is an OR of these objects. Kept as a plain record so callers can
|
|
326
|
+
* build them inline (`{ cookieAuth: [] }`).
|
|
327
|
+
*/
|
|
328
|
+
type OpenApiSecurityRequirement = Record<string, string[]>;
|
|
329
|
+
interface OpenApiOperation {
|
|
330
|
+
summary?: string;
|
|
331
|
+
description?: string;
|
|
332
|
+
operationId?: string;
|
|
333
|
+
deprecated?: boolean;
|
|
334
|
+
tags?: string[];
|
|
335
|
+
parameters?: OpenApiParameter[];
|
|
336
|
+
requestBody?: OpenApiRequestBody;
|
|
337
|
+
responses: Record<string, OpenApiResponse>;
|
|
338
|
+
/** Per-operation security requirements (overrides the document-level array). */
|
|
339
|
+
security?: OpenApiSecurityRequirement[];
|
|
340
|
+
}
|
|
341
|
+
/** An OpenAPI Server Object. Kept loose so callers can add `variables`. */
|
|
342
|
+
interface OpenApiServer {
|
|
343
|
+
url: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
variables?: Record<string, {
|
|
346
|
+
enum?: string[];
|
|
347
|
+
default: string;
|
|
348
|
+
description?: string;
|
|
349
|
+
}>;
|
|
350
|
+
[key: string]: unknown;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* An OpenAPI Security Scheme Object (apiKey / http / oauth2 / openIdConnect /
|
|
354
|
+
* mutualTLS). Index signature keeps it open so any valid scheme shape passes
|
|
355
|
+
* without fighting the types (mirrors JsonSchema above).
|
|
356
|
+
*/
|
|
357
|
+
interface OpenApiSecurityScheme {
|
|
358
|
+
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'mutualTLS';
|
|
359
|
+
description?: string;
|
|
360
|
+
name?: string;
|
|
361
|
+
in?: 'query' | 'header' | 'cookie';
|
|
362
|
+
scheme?: string;
|
|
363
|
+
bearerFormat?: string;
|
|
364
|
+
flows?: Record<string, unknown>;
|
|
365
|
+
openIdConnectUrl?: string;
|
|
366
|
+
[key: string]: unknown;
|
|
367
|
+
}
|
|
368
|
+
type HttpVerb = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'head';
|
|
369
|
+
type OpenApiPathItem = { [verb in HttpVerb]?: OpenApiOperation; };
|
|
370
|
+
interface OpenApiDocument {
|
|
371
|
+
openapi: '3.1.0';
|
|
372
|
+
info: OpenApiInfo;
|
|
373
|
+
servers?: OpenApiServer[];
|
|
374
|
+
paths: Record<string, OpenApiPathItem>;
|
|
375
|
+
components?: {
|
|
376
|
+
schemas?: Record<string, JsonSchema>;
|
|
377
|
+
securitySchemes?: Record<string, OpenApiSecurityScheme>;
|
|
378
|
+
};
|
|
379
|
+
security?: OpenApiSecurityRequirement[];
|
|
380
|
+
tags?: Array<{
|
|
381
|
+
name: string;
|
|
382
|
+
description?: string;
|
|
383
|
+
}>;
|
|
384
|
+
}
|
|
385
|
+
interface ApiDocMetadata {
|
|
386
|
+
summary?: string;
|
|
387
|
+
description?: string;
|
|
388
|
+
operationId?: string;
|
|
389
|
+
deprecated?: boolean;
|
|
390
|
+
tags?: string[];
|
|
391
|
+
}
|
|
392
|
+
interface ApiResponseOptions {
|
|
393
|
+
description: string;
|
|
394
|
+
/** Zod schema, DTO class (from createZodDto), or raw JSON Schema. */
|
|
395
|
+
schema?: unknown;
|
|
396
|
+
}
|
|
397
|
+
interface ApiResponseEntry extends ApiResponseOptions {
|
|
398
|
+
status: number | string;
|
|
399
|
+
}
|
|
400
|
+
interface CreateOpenApiDocumentOptions {
|
|
401
|
+
info?: Partial<OpenApiInfo>;
|
|
402
|
+
globalPrefix?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Declare top-level tag groups with descriptions and an explicit order
|
|
405
|
+
* (mirrors NestJS `DocumentBuilder().addTag(name, description)`). Tags
|
|
406
|
+
* actually used by operations but NOT declared here are still emitted —
|
|
407
|
+
* appended after the declared ones in first-seen order. Declared tags
|
|
408
|
+
* with no operations are kept (lets you pre-declare ordering/description).
|
|
409
|
+
*/
|
|
410
|
+
tags?: Array<{
|
|
411
|
+
name: string;
|
|
412
|
+
description?: string;
|
|
413
|
+
}>;
|
|
414
|
+
/**
|
|
415
|
+
* Top-level `servers` array (base URLs the API is served from). Emitted
|
|
416
|
+
* verbatim between `info` and `paths` when non-empty; omitted otherwise.
|
|
417
|
+
*/
|
|
418
|
+
servers?: OpenApiServer[];
|
|
419
|
+
/**
|
|
420
|
+
* Named security schemes, emitted under `components.securitySchemes` (merged
|
|
421
|
+
* with generated `components.schemas`). Reference them from `security`.
|
|
422
|
+
*/
|
|
423
|
+
securitySchemes?: Record<string, OpenApiSecurityScheme>;
|
|
424
|
+
/**
|
|
425
|
+
* Document-level default security requirements (applies to every operation
|
|
426
|
+
* unless the operation overrides it). Emitted verbatim when non-empty.
|
|
427
|
+
*/
|
|
428
|
+
security?: OpenApiSecurityRequirement[];
|
|
429
|
+
}
|
|
430
|
+
type OpenApiUi = 'swagger' | 'scalar' | 'redoc';
|
|
431
|
+
interface MountOpenApiOptions {
|
|
432
|
+
/** Pre-built OpenAPI document to serve. */
|
|
433
|
+
document: OpenApiDocument;
|
|
434
|
+
/** OpenAPI JSON spec path. @default '/openapi.json' */
|
|
435
|
+
specPath?: string;
|
|
436
|
+
/**
|
|
437
|
+
* UI(s) to mount. 'all' mounts swagger + scalar + redoc.
|
|
438
|
+
* @default 'scalar'
|
|
439
|
+
*/
|
|
440
|
+
ui?: OpenApiUi | OpenApiUi[] | 'all';
|
|
441
|
+
/** Swagger UI path. @default '/docs' */
|
|
442
|
+
swaggerPath?: string;
|
|
443
|
+
/** Scalar path. @default '/scalar' */
|
|
444
|
+
scalarPath?: string;
|
|
445
|
+
/** ReDoc path. @default '/redoc' */
|
|
446
|
+
redocPath?: string;
|
|
447
|
+
/** Page title for the UIs. */
|
|
448
|
+
title?: string;
|
|
449
|
+
/** @deprecated use `specPath`. Back-compat alias; if set, overrides specPath default. */
|
|
450
|
+
path?: string;
|
|
451
|
+
/** @deprecated single-UI path override; applies to the single `ui` when a string. */
|
|
452
|
+
uiPath?: string;
|
|
453
|
+
}
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region src/application.d.ts
|
|
456
|
+
declare class VelaApplication {
|
|
457
|
+
private readonly container;
|
|
458
|
+
private readonly routeManager;
|
|
459
|
+
private instances;
|
|
460
|
+
private honoApp;
|
|
461
|
+
private entrypointRegistry;
|
|
462
|
+
private disposed;
|
|
463
|
+
private readonly lazyManager;
|
|
464
|
+
private readonly knownInstances;
|
|
465
|
+
constructor(container: Container, routeManager: RouteManager);
|
|
466
|
+
private trackNew;
|
|
467
|
+
/** Pre-build routes (handles async CRUD imports). Called by VelaFactory. */
|
|
468
|
+
initRoutes(): Promise<void>;
|
|
469
|
+
private getApp;
|
|
470
|
+
get fetch(): Hono['fetch'];
|
|
471
|
+
getInstances(): unknown[];
|
|
472
|
+
getContainer(): Container;
|
|
473
|
+
setInstances(instances: unknown[]): void;
|
|
474
|
+
get<T>(token: Token<T>): T;
|
|
475
|
+
getHonoApp(): Hono;
|
|
476
|
+
/**
|
|
477
|
+
* Every explicit controller route as the framework registered it (fully
|
|
478
|
+
* composed paths — the `vela route list` seam). Requires built routes;
|
|
479
|
+
* contributed routes (`@velajs/crud`) mount directly on Hono and are
|
|
480
|
+
* observable via `getHonoApp().routes` instead.
|
|
481
|
+
*/
|
|
482
|
+
describeRoutes(): RouteDescription[];
|
|
483
|
+
/** The global route prefix in effect ('' when none). */
|
|
484
|
+
getGlobalPrefix(): string;
|
|
485
|
+
useGlobalPipes(...pipes: PipeType[]): this;
|
|
486
|
+
useGlobalGuards(...guards: GuardType[]): this;
|
|
487
|
+
useGlobalInterceptors(...interceptors: InterceptorType[]): this;
|
|
488
|
+
useGlobalFilters(...filters: FilterType[]): this;
|
|
489
|
+
/**
|
|
490
|
+
* Register the application-wide {@link ExceptionHandler} imperatively — the
|
|
491
|
+
* sibling of `ErrorsModule.forRoot({ handler })`. A class is constructed
|
|
492
|
+
* through DI (`useClass`); a plain handler object is registered verbatim
|
|
493
|
+
* (`useValue`). Consumed by `resolveErrorReporter` at every transport edge,
|
|
494
|
+
* so it takes effect on the next request without a rebuild.
|
|
495
|
+
*
|
|
496
|
+
* ```ts
|
|
497
|
+
* app.useGlobalExceptionHandler({ report: (e) => sentry.capture(e) });
|
|
498
|
+
* ```
|
|
499
|
+
*/
|
|
500
|
+
useGlobalExceptionHandler(handler: Type<ExceptionHandler> | ExceptionHandler): this;
|
|
501
|
+
/**
|
|
502
|
+
* Serve a pre-built OpenAPI document and one or more interactive doc UIs
|
|
503
|
+
* (Swagger UI, Scalar, ReDoc) on the underlying Hono app, mirroring the
|
|
504
|
+
* hono-crud docs convention. Edge-safe: each UI is a tiny self-contained
|
|
505
|
+
* HTML shell that loads its renderer from a CDN at runtime so nothing is
|
|
506
|
+
* bundled server-side and no extra dependency is required.
|
|
507
|
+
*
|
|
508
|
+
* Defaults: spec at `/openapi.json`, Scalar at `/scalar`, Swagger UI at
|
|
509
|
+
* `/docs`, ReDoc at `/redoc`. The deprecated `path` / `uiPath` aliases are
|
|
510
|
+
* retained for migration from the previous single-UI shape.
|
|
511
|
+
*
|
|
512
|
+
* ```ts
|
|
513
|
+
* const doc = createOpenApiDocument(AppModule);
|
|
514
|
+
* app.mountOpenApi({ document: doc }); // Scalar @ /scalar
|
|
515
|
+
* app.mountOpenApi({ document: doc, ui: 'all' }); // swagger + scalar + redoc
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
mountOpenApi(options: MountOpenApiOptions): this;
|
|
519
|
+
/**
|
|
520
|
+
* Pull instances materialized during the bootstrap phase (lazy modules
|
|
521
|
+
* dragged in by eager consumers) into the front of the instance list —
|
|
522
|
+
* dependency-before-consumer: a group absorbed because an eager provider
|
|
523
|
+
* injected it must be initialized before that consumer's hooks read it.
|
|
524
|
+
*/
|
|
525
|
+
private absorbLazyInstances;
|
|
526
|
+
callOnModuleInit(): Promise<void>;
|
|
527
|
+
callOnApplicationBootstrap(): Promise<void>;
|
|
528
|
+
/**
|
|
529
|
+
* Materialize every still-pending lazy module (async-safe): construct the
|
|
530
|
+
* groups, replay their lifecycle hooks, and add their instances to the
|
|
531
|
+
* shutdown flow. Warmup escape hatch for tests and node runtimes that want
|
|
532
|
+
* eager-everything semantics back after bootstrap.
|
|
533
|
+
*/
|
|
534
|
+
materializeLazyModules(): Promise<void>;
|
|
535
|
+
/**
|
|
536
|
+
* Every entrypoint contributed by the module graph, grouped by kind —
|
|
537
|
+
* what runtime adapters/transports query instead of re-scanning providers:
|
|
538
|
+
* `app.entrypoints.ofKind('websocket')`.
|
|
539
|
+
*/
|
|
540
|
+
get entrypoints(): EntrypointRegistry;
|
|
541
|
+
close(signal?: string): Promise<void>;
|
|
542
|
+
/**
|
|
543
|
+
* Full teardown: run shutdown lifecycle hooks ({@link close}) then dispose
|
|
544
|
+
* container-held instances (LIFO) and clear cached singletons. Use for
|
|
545
|
+
* graceful shutdown and dev HMR so old and new DI graphs never coexist.
|
|
546
|
+
*
|
|
547
|
+
* On runtimes/TS supporting explicit resource management this is also exposed
|
|
548
|
+
* as `Symbol.asyncDispose`, enabling `await using app = await VelaFactory.create(...)`.
|
|
549
|
+
*/
|
|
550
|
+
dispose(signal?: string): Promise<void>;
|
|
551
|
+
}
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region src/module/module-loader.d.ts
|
|
554
|
+
/** What the loader records per lazy module instance (see LazyModuleManager). */
|
|
555
|
+
interface LazyModuleGroupSpec {
|
|
556
|
+
moduleId: string;
|
|
557
|
+
tokens: Token[];
|
|
558
|
+
hasEntrypointContributor: boolean;
|
|
559
|
+
}
|
|
560
|
+
declare class ModuleLoader {
|
|
561
|
+
private container;
|
|
562
|
+
private router;
|
|
563
|
+
private processedModules;
|
|
564
|
+
private processingStack;
|
|
565
|
+
private collectedControllers;
|
|
566
|
+
private registeredProviders;
|
|
567
|
+
private moduleExportsCache;
|
|
568
|
+
private globalExports;
|
|
569
|
+
private consumerMiddlewareDefinitions;
|
|
570
|
+
private appProviderCounter;
|
|
571
|
+
private appProviderTokens;
|
|
572
|
+
private moduleIdByClassKey;
|
|
573
|
+
private seenModuleIds;
|
|
574
|
+
private lazyModuleIds;
|
|
575
|
+
private lazyGroups;
|
|
576
|
+
constructor(container: Container, router: RouteManager);
|
|
577
|
+
load(rootModule: Type): void;
|
|
578
|
+
private getModuleId;
|
|
579
|
+
private isProcessed;
|
|
580
|
+
private markProcessed;
|
|
581
|
+
private getCachedExports;
|
|
582
|
+
private cacheExports;
|
|
583
|
+
private processModule;
|
|
584
|
+
private warnOnMixedDefaultAndKeyed;
|
|
585
|
+
/** Registers the provider and returns the token it was registered under. */
|
|
586
|
+
private registerProvider;
|
|
587
|
+
private isAppToken;
|
|
588
|
+
private buildExportSet;
|
|
589
|
+
getControllers(): Type[];
|
|
590
|
+
getRegisteredProviders(): Token[];
|
|
591
|
+
getAppProviderTokens(token: Token): Token[];
|
|
592
|
+
getConsumerMiddlewareDefinitions(): MiddlewareRouteDefinition[];
|
|
593
|
+
/**
|
|
594
|
+
* Every lazy module instance recorded during load. Handed to the
|
|
595
|
+
* LazyModuleManager at bootstrap; empty when no module opted in.
|
|
596
|
+
*/
|
|
597
|
+
getLazyGroups(): LazyModuleGroupSpec[];
|
|
598
|
+
/**
|
|
599
|
+
* A token is deferred iff EVERY module bucket holding it belongs to a lazy
|
|
600
|
+
* module instance — a token also registered by a non-lazy module stays on
|
|
601
|
+
* the eager pass (and resolving it there claims the lazy sibling, which is
|
|
602
|
+
* the "any use = init" semantic, not a bug).
|
|
603
|
+
*/
|
|
604
|
+
private isLazyOnlyToken;
|
|
605
|
+
resolveAllInstances(): Promise<unknown[]>;
|
|
606
|
+
private routeError;
|
|
607
|
+
}
|
|
608
|
+
//#endregion
|
|
609
|
+
//#region src/factory/bootstrap.d.ts
|
|
610
|
+
interface BootstrapOptions extends RouteManagerOptions {
|
|
611
|
+
diagnostics?: Diagnostics;
|
|
612
|
+
}
|
|
613
|
+
interface BootstrapResult {
|
|
614
|
+
container: Container;
|
|
615
|
+
routeManager: RouteManager;
|
|
616
|
+
loader: ModuleLoader;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Wire the DI graph for `rootModule` and prepare the route manager — without
|
|
620
|
+
* running lifecycle hooks or building the Hono app. The single primitive
|
|
621
|
+
* shared by `VelaFactory.create` (HTTP), `@velajs/testing` (test), and any
|
|
622
|
+
* non-HTTP consumer (CLI tools, custom runtimes).
|
|
623
|
+
*
|
|
624
|
+
* Framework-internal tokens (`Container`, `ModuleRef`, `APP_*`) are marked
|
|
625
|
+
* global so they are resolvable from any module.
|
|
626
|
+
*/
|
|
627
|
+
declare function bootstrap(rootModule: Type, options?: BootstrapOptions): Promise<BootstrapResult>;
|
|
628
|
+
//#endregion
|
|
629
|
+
//#region src/container/module-ref.d.ts
|
|
630
|
+
declare class ModuleRef {
|
|
631
|
+
private readonly container;
|
|
632
|
+
constructor(container: Container);
|
|
633
|
+
/**
|
|
634
|
+
* Retrieve a provider instance from the DI container.
|
|
635
|
+
* Returns the existing singleton (or cached value) for the token.
|
|
636
|
+
*/
|
|
637
|
+
get<T>(token: Token<T>): T;
|
|
638
|
+
/**
|
|
639
|
+
* Resolve a provider, creating a new instance for TRANSIENT-scoped providers.
|
|
640
|
+
* For SINGLETON-scoped providers this is equivalent to get().
|
|
641
|
+
*/
|
|
642
|
+
resolve<T>(token: Token<T>): T;
|
|
643
|
+
/**
|
|
644
|
+
* Instantiate a class outside of the DI container's singleton cache.
|
|
645
|
+
* Dependencies are resolved from the container. Each call returns a new instance.
|
|
646
|
+
*/
|
|
647
|
+
create<T>(type: Type<T>): T;
|
|
648
|
+
}
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/module/decorators.d.ts
|
|
651
|
+
declare function Global(): ClassDecorator;
|
|
652
|
+
declare function Module(options?: ModuleOptions): ClassDecorator;
|
|
653
|
+
declare function isModule(target: Constructor): boolean;
|
|
654
|
+
/**
|
|
655
|
+
* Normalize a DynamicModule, defaulting `key` to `"default"`. Module authors
|
|
656
|
+
* call this from `forRoot()` so the loader always sees an explicit key.
|
|
657
|
+
*/
|
|
658
|
+
declare function defineDynamicModule(input: DynamicModule): DynamicModule;
|
|
659
|
+
declare function getModuleMetadata(target: Constructor): ModuleMetadata | undefined;
|
|
660
|
+
//#endregion
|
|
661
|
+
//#region src/plugin/plugin.d.ts
|
|
662
|
+
interface Plugin {
|
|
663
|
+
id: string;
|
|
664
|
+
version: string;
|
|
665
|
+
module: Type | DynamicModule;
|
|
666
|
+
dependsOn?: string[];
|
|
667
|
+
metadata?: Record<string, unknown>;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Freeze and validate a plugin manifest. Returns the same object so it can
|
|
671
|
+
* be used in `composePlugins([definePlugin(...), ...])`.
|
|
672
|
+
*/
|
|
673
|
+
declare function definePlugin(plugin: Plugin): Plugin;
|
|
674
|
+
declare class PluginRegistry {
|
|
675
|
+
private byId;
|
|
676
|
+
constructor(plugins: readonly Plugin[]);
|
|
677
|
+
list(): Plugin[];
|
|
678
|
+
get(id: string): Plugin | undefined;
|
|
679
|
+
dependents(id: string): Plugin[];
|
|
680
|
+
}
|
|
681
|
+
declare const PLUGIN_REGISTRY_TOKEN: InjectionToken<PluginRegistry>;
|
|
682
|
+
declare class PluginRootModule {}
|
|
683
|
+
/**
|
|
684
|
+
* Compose a list of plugins into a single dynamic module that imports each
|
|
685
|
+
* plugin's module in dependency order, registers a `PluginRegistry`, and
|
|
686
|
+
* exposes it globally so any plugin can introspect peers.
|
|
687
|
+
*/
|
|
688
|
+
declare function composePlugins(plugins: readonly Plugin[]): DynamicModule;
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/pipeline/component.manager.d.ts
|
|
691
|
+
/**
|
|
692
|
+
* Component registration + resolution for the controller/handler tiers.
|
|
693
|
+
* App-wide (global) components have exactly ONE source: the per-app
|
|
694
|
+
* `RouteManager` (`APP_*` provider tokens + `useGlobalX()`) — callers merge
|
|
695
|
+
* `routeManager.getGlobalComponents()` with {@link getScopedComponents}.
|
|
696
|
+
*
|
|
697
|
+
* Stateless by design: no process-global container (two apps in one process
|
|
698
|
+
* never cross-talk) — every `resolve*` takes the resolving container.
|
|
699
|
+
*/
|
|
700
|
+
declare class ComponentManager {
|
|
701
|
+
static registerController<T extends ComponentType>(type: T, controller: Constructor, ...components: ComponentTypeMap[T][]): void;
|
|
702
|
+
static registerHandler<T extends ComponentType>(type: T, controller: Constructor, handlerName: string | symbol, ...components: ComponentTypeMap[T][]): void;
|
|
703
|
+
static getScopedComponents<T extends ComponentType>(type: T, controller: Constructor, handlerName: string | symbol): ComponentTypeMap[T][];
|
|
704
|
+
private static resolveAll;
|
|
705
|
+
static resolveMiddleware(items: MiddlewareType[], container: Container): NestMiddleware[];
|
|
706
|
+
static resolveGuards(items: GuardType[], container: Container): CanActivate[];
|
|
707
|
+
static resolvePipes(items: PipeType[], container: Container): PipeTransform[];
|
|
708
|
+
static resolveInterceptors(items: InterceptorType[], container: Container): NestInterceptor[];
|
|
709
|
+
static resolveFilters(items: FilterType[], container: Container): ExceptionFilter[];
|
|
710
|
+
static executePipes(value: unknown, metadata: ArgumentMetadata, pipes: PipeTransform[]): Promise<unknown>;
|
|
711
|
+
static runInterceptorChain(interceptors: NestInterceptor[], context: ExecutionContext, coreHandler: () => Promise<unknown>): Promise<unknown>;
|
|
712
|
+
}
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region src/pipeline/tokens.d.ts
|
|
715
|
+
/**
|
|
716
|
+
* Register global guards via module providers instead of app.useGlobalGuards().
|
|
717
|
+
*
|
|
718
|
+
* @example
|
|
719
|
+
* ```ts
|
|
720
|
+
* @Module({
|
|
721
|
+
* providers: [
|
|
722
|
+
* AuthGuard,
|
|
723
|
+
* { provide: APP_GUARD, useClass: AuthGuard },
|
|
724
|
+
* ],
|
|
725
|
+
* })
|
|
726
|
+
* class AppModule {}
|
|
727
|
+
* ```
|
|
728
|
+
*/
|
|
729
|
+
declare const APP_GUARD: InjectionToken<CanActivate>;
|
|
730
|
+
/**
|
|
731
|
+
* Register global pipes via module providers.
|
|
732
|
+
*/
|
|
733
|
+
declare const APP_PIPE: InjectionToken<PipeTransform<unknown, unknown>>;
|
|
734
|
+
/**
|
|
735
|
+
* Register global interceptors via module providers.
|
|
736
|
+
*/
|
|
737
|
+
declare const APP_INTERCEPTOR: InjectionToken<NestInterceptor>;
|
|
738
|
+
/**
|
|
739
|
+
* Register global filters via module providers.
|
|
740
|
+
*/
|
|
741
|
+
declare const APP_FILTER: InjectionToken<ExceptionFilter<unknown>>;
|
|
742
|
+
/**
|
|
743
|
+
* Register global middleware via module providers.
|
|
744
|
+
*/
|
|
745
|
+
declare const APP_MIDDLEWARE: InjectionToken<NestMiddleware>;
|
|
746
|
+
/**
|
|
747
|
+
* Register the application-wide exception handler via module providers.
|
|
748
|
+
* Consumed by the shared error reporter (`resolveErrorReporter`) at every
|
|
749
|
+
* transport edge to customize how errors are reported and rendered.
|
|
750
|
+
*
|
|
751
|
+
* @example
|
|
752
|
+
* ```ts
|
|
753
|
+
* @Module({
|
|
754
|
+
* providers: [
|
|
755
|
+
* { provide: APP_EXCEPTION_HANDLER, useValue: { report: (e) => sentry.capture(e) } },
|
|
756
|
+
* ],
|
|
757
|
+
* })
|
|
758
|
+
* class AppModule {}
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
declare const APP_EXCEPTION_HANDLER: InjectionToken<ExceptionHandler>;
|
|
762
|
+
/**
|
|
763
|
+
* Provide the composed error catalog (`composeCatalogs(CORE_CATALOG, …)`)
|
|
764
|
+
* consulted when rendering wire-bound error bodies. Defaults to the core
|
|
765
|
+
* catalog when unset.
|
|
766
|
+
*/
|
|
767
|
+
declare const ERROR_CATALOG: InjectionToken<Catalog<string>>;
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region src/registry/metadata.registry.d.ts
|
|
770
|
+
interface ControllerOptions {
|
|
771
|
+
version?: number | number[];
|
|
772
|
+
}
|
|
773
|
+
declare class MetadataRegistry {
|
|
774
|
+
private static get routes();
|
|
775
|
+
private static get controllers();
|
|
776
|
+
private static get controllerOptions();
|
|
777
|
+
private static get modules();
|
|
778
|
+
private static get parameters();
|
|
779
|
+
private static get injectables();
|
|
780
|
+
private static get scopes();
|
|
781
|
+
private static get injectTokens();
|
|
782
|
+
private static get handlerHttpMeta();
|
|
783
|
+
private static get catchTypes();
|
|
784
|
+
private static get routeVersions();
|
|
785
|
+
private static get classMeta();
|
|
786
|
+
private static get handlerMeta();
|
|
787
|
+
private static get classMetaIndex();
|
|
788
|
+
private static get handlerMetaIndex();
|
|
789
|
+
private static get controllerComponents();
|
|
790
|
+
private static get handlerComponents();
|
|
791
|
+
static getRoutes(controller: Constructor): RouteDefinition[];
|
|
792
|
+
static addRoute(controller: Constructor, route: RouteDefinition): void;
|
|
793
|
+
static getControllerPath(controller: Constructor): string;
|
|
794
|
+
static setControllerPath(controller: Constructor, path: string): void;
|
|
795
|
+
static getControllerOptions(controller: Constructor): ControllerOptions;
|
|
796
|
+
static setControllerOptions(controller: Constructor, options: ControllerOptions): void;
|
|
797
|
+
static getModuleOptions(module: Constructor): ModuleOptions | undefined;
|
|
798
|
+
static setModuleOptions(module: Constructor, options: ModuleOptions): void;
|
|
799
|
+
static getParameters(controller: Constructor): Map<string | symbol, ParameterMetadata[]>;
|
|
800
|
+
static addParameter(controller: Constructor, methodName: string | symbol, param: ParameterMetadata): void;
|
|
801
|
+
static registerController<T extends ComponentType>(type: T, controller: Constructor, component: ComponentTypeMap[T]): void;
|
|
802
|
+
static getController<T extends ComponentType>(type: T, controller: Constructor): ComponentTypeMap[T][];
|
|
803
|
+
static registerHandler<T extends ComponentType>(type: T, controller: Constructor, methodName: string | symbol, component: ComponentTypeMap[T]): void;
|
|
804
|
+
static getHandler<T extends ComponentType>(type: T, controller: Constructor, methodName: string | symbol): ComponentTypeMap[T][];
|
|
805
|
+
static markInjectable(target: object): void;
|
|
806
|
+
static hasInjectable(target: object): boolean;
|
|
807
|
+
static setScope(target: object, scope: Scope): void;
|
|
808
|
+
static getScope(target: object): Scope | undefined;
|
|
809
|
+
static setInjectTokens(target: object, tokens: InjectMetadata[]): void;
|
|
810
|
+
static getInjectTokens(target: object): InjectMetadata[] | undefined;
|
|
811
|
+
static setHandlerHttpMeta(controller: Constructor, method: string | symbol, meta: HttpHandlerMeta): void;
|
|
812
|
+
static getHandlerHttpMeta(controller: Constructor, method: string | symbol): HttpHandlerMeta | undefined;
|
|
813
|
+
static setCatchTypes(filter: Constructor, types: Type<Error>[]): void;
|
|
814
|
+
static getCatchTypes(filter: Constructor): Type<Error>[] | undefined;
|
|
815
|
+
static hasCatchTypes(filter: Constructor): boolean;
|
|
816
|
+
static setRouteVersion(controller: Constructor, method: string | symbol, version: number | number[]): void;
|
|
817
|
+
static getRouteVersion(controller: Constructor, method: string | symbol): number | number[] | undefined;
|
|
818
|
+
static setCustomClassMeta(target: object, key: string, value: unknown): void;
|
|
819
|
+
static getCustomClassMeta(target: object, key: string): unknown;
|
|
820
|
+
static getCustomClassMetaAll(target: object): Map<string, unknown> | undefined;
|
|
821
|
+
static setCustomHandlerMeta(target: object, handler: string | symbol, key: string, value: unknown): void;
|
|
822
|
+
static getCustomHandlerMeta(target: object, handler: string | symbol, key: string): unknown;
|
|
823
|
+
static getCustomHandlerMetaAll(target: object, handler: string | symbol): Map<string, unknown> | undefined;
|
|
824
|
+
static appendCustomClassMeta<T>(target: object, key: string, item: T): void;
|
|
825
|
+
static appendCustomHandlerMeta<T>(target: object, handler: string | symbol, key: string, item: T): void;
|
|
826
|
+
static getClassesWithClassMeta(key: string): ReadonlySet<object>;
|
|
827
|
+
static getClassesWithHandlerMeta(key: string): ReadonlySet<object>;
|
|
828
|
+
/** Every (handler, value) pair on `target` carrying metadata under `key`. */
|
|
829
|
+
static getHandlersWithMeta(target: object, key: string): Array<{
|
|
830
|
+
handler: string | symbol;
|
|
831
|
+
value: unknown;
|
|
832
|
+
}>;
|
|
833
|
+
static setReflectMetadata(target: object, key: string, value: unknown, propertyKey?: string | symbol): void;
|
|
834
|
+
static getReflectMetadata<T = unknown>(target: object, key: string, propertyKey?: string | symbol): T | undefined;
|
|
835
|
+
static getParamTypes(target: object, propertyKey?: string | symbol): unknown[] | undefined;
|
|
836
|
+
static propagateControllerComponents(from: Constructor, to: Constructor): void;
|
|
837
|
+
static clear(): void;
|
|
838
|
+
static reset(): void;
|
|
839
|
+
}
|
|
840
|
+
//#endregion
|
|
841
|
+
export { contributesEntrypoints as $, CreateOpenApiDocumentOptions as A, RouteDescription as B, BootstrapResult as C, ApiDocMetadata as D, VelaApplication as E, OpenApiOperation as F, NestModule as G, RouteManagerOptions as H, OpenApiParameter as I, getEntrypointKinds as J, RouteInfo as K, OpenApiPathItem as L, JsonSchema as M, OpenApiDocument as N, ApiResponseEntry as O, OpenApiInfo as P, EntrypointKind as Q, OpenApiRequestBody as R, BootstrapOptions as S, ModuleLoader as T, ControllerOptions$1 as U, RouteManager as V, MiddlewareConsumer as W, ContributesEntrypoints as X, registerEntrypointKind as Y, Entrypoint as Z, Module as _, APP_INTERCEPTOR as a, isModule as b, ERROR_CATALOG as c, Plugin as d, ErrorMatcher as et, PluginRegistry as f, Global as g, definePlugin as h, APP_GUARD as i, HttpVerb as j, ApiResponseOptions as k, ComponentManager as l, composePlugins as m, APP_EXCEPTION_HANDLER as n, ExceptionHandler as nt, APP_MIDDLEWARE as o, PluginRootModule as p, EntrypointRegistry as q, APP_FILTER as r, matchesAny as rt, APP_PIPE as s, MetadataRegistry as t, ErrorReportContext as tt, PLUGIN_REGISTRY_TOKEN as u, defineDynamicModule as v, bootstrap as w, ModuleRef as x, getModuleMetadata as y, OpenApiResponse as z };
|
|
842
|
+
//# sourceMappingURL=metadata.registry-D1od8ZBt.d.ts.map
|