@velajs/vela 1.18.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 +78 -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 -66
- package/dist/index.js +14 -71
- 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 +67 -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 -91
- package/dist/application.js +0 -308
- 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 -62
- package/dist/errors/http-exception.js +0 -134
- 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/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 -108
- 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 -111
- 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 -81
- package/dist/live/live.engine.js +0 -448
- 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 -33
- package/dist/pipeline/tokens.js +0 -27
- 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 -53
- 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 -102
- 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 -107
- 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 -322
- package/dist/websocket/ws-exception.d.ts +0 -16
- package/dist/websocket/ws-exception.js +0 -32
- 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
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export type ExceptionResponse = string | Record<string, unknown>;
|
|
2
|
-
export declare class HttpException extends Error {
|
|
3
|
-
readonly statusCode: number;
|
|
4
|
-
private readonly _response;
|
|
5
|
-
constructor(response: ExceptionResponse, statusCode: number);
|
|
6
|
-
getStatus(): number;
|
|
7
|
-
getResponse(): Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export declare class BadRequestException extends HttpException {
|
|
10
|
-
constructor(message?: ExceptionResponse);
|
|
11
|
-
}
|
|
12
|
-
export declare class UnauthorizedException extends HttpException {
|
|
13
|
-
constructor(message?: ExceptionResponse);
|
|
14
|
-
}
|
|
15
|
-
export declare class ForbiddenException extends HttpException {
|
|
16
|
-
constructor(message?: ExceptionResponse);
|
|
17
|
-
}
|
|
18
|
-
export declare class NotFoundException extends HttpException {
|
|
19
|
-
constructor(message?: ExceptionResponse);
|
|
20
|
-
}
|
|
21
|
-
export declare class MethodNotAllowedException extends HttpException {
|
|
22
|
-
constructor(message?: ExceptionResponse);
|
|
23
|
-
}
|
|
24
|
-
export declare class NotAcceptableException extends HttpException {
|
|
25
|
-
constructor(message?: ExceptionResponse);
|
|
26
|
-
}
|
|
27
|
-
export declare class RequestTimeoutException extends HttpException {
|
|
28
|
-
constructor(message?: ExceptionResponse);
|
|
29
|
-
}
|
|
30
|
-
export declare class ConflictException extends HttpException {
|
|
31
|
-
constructor(message?: ExceptionResponse);
|
|
32
|
-
}
|
|
33
|
-
export declare class GoneException extends HttpException {
|
|
34
|
-
constructor(message?: ExceptionResponse);
|
|
35
|
-
}
|
|
36
|
-
export declare class PayloadTooLargeException extends HttpException {
|
|
37
|
-
constructor(message?: ExceptionResponse);
|
|
38
|
-
}
|
|
39
|
-
export declare class UnsupportedMediaTypeException extends HttpException {
|
|
40
|
-
constructor(message?: ExceptionResponse);
|
|
41
|
-
}
|
|
42
|
-
export declare class UnprocessableEntityException extends HttpException {
|
|
43
|
-
constructor(message?: ExceptionResponse);
|
|
44
|
-
}
|
|
45
|
-
export declare class TooManyRequestsException extends HttpException {
|
|
46
|
-
constructor(message?: ExceptionResponse);
|
|
47
|
-
}
|
|
48
|
-
export declare class InternalServerErrorException extends HttpException {
|
|
49
|
-
constructor(message?: ExceptionResponse);
|
|
50
|
-
}
|
|
51
|
-
export declare class NotImplementedException extends HttpException {
|
|
52
|
-
constructor(message?: ExceptionResponse);
|
|
53
|
-
}
|
|
54
|
-
export declare class BadGatewayException extends HttpException {
|
|
55
|
-
constructor(message?: ExceptionResponse);
|
|
56
|
-
}
|
|
57
|
-
export declare class ServiceUnavailableException extends HttpException {
|
|
58
|
-
constructor(message?: ExceptionResponse);
|
|
59
|
-
}
|
|
60
|
-
export declare class GatewayTimeoutException extends HttpException {
|
|
61
|
-
constructor(message?: ExceptionResponse);
|
|
62
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
export class HttpException extends Error {
|
|
2
|
-
statusCode;
|
|
3
|
-
_response;
|
|
4
|
-
constructor(response, statusCode){
|
|
5
|
-
const message = typeof response === 'string' ? response : JSON.stringify(response);
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = 'HttpException';
|
|
8
|
-
this.statusCode = statusCode;
|
|
9
|
-
this._response = response;
|
|
10
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
11
|
-
}
|
|
12
|
-
getStatus() {
|
|
13
|
-
return this.statusCode;
|
|
14
|
-
}
|
|
15
|
-
getResponse() {
|
|
16
|
-
if (typeof this._response === 'string') {
|
|
17
|
-
return {
|
|
18
|
-
statusCode: this.statusCode,
|
|
19
|
-
message: this._response
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return this._response;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
// 4xx
|
|
26
|
-
export class BadRequestException extends HttpException {
|
|
27
|
-
constructor(message = 'Bad Request'){
|
|
28
|
-
super(message, 400);
|
|
29
|
-
this.name = 'BadRequestException';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export class UnauthorizedException extends HttpException {
|
|
33
|
-
constructor(message = 'Unauthorized'){
|
|
34
|
-
super(message, 401);
|
|
35
|
-
this.name = 'UnauthorizedException';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export class ForbiddenException extends HttpException {
|
|
39
|
-
constructor(message = 'Forbidden'){
|
|
40
|
-
super(message, 403);
|
|
41
|
-
this.name = 'ForbiddenException';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export class NotFoundException extends HttpException {
|
|
45
|
-
constructor(message = 'Not Found'){
|
|
46
|
-
super(message, 404);
|
|
47
|
-
this.name = 'NotFoundException';
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export class MethodNotAllowedException extends HttpException {
|
|
51
|
-
constructor(message = 'Method Not Allowed'){
|
|
52
|
-
super(message, 405);
|
|
53
|
-
this.name = 'MethodNotAllowedException';
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
export class NotAcceptableException extends HttpException {
|
|
57
|
-
constructor(message = 'Not Acceptable'){
|
|
58
|
-
super(message, 406);
|
|
59
|
-
this.name = 'NotAcceptableException';
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export class RequestTimeoutException extends HttpException {
|
|
63
|
-
constructor(message = 'Request Timeout'){
|
|
64
|
-
super(message, 408);
|
|
65
|
-
this.name = 'RequestTimeoutException';
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
export class ConflictException extends HttpException {
|
|
69
|
-
constructor(message = 'Conflict'){
|
|
70
|
-
super(message, 409);
|
|
71
|
-
this.name = 'ConflictException';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export class GoneException extends HttpException {
|
|
75
|
-
constructor(message = 'Gone'){
|
|
76
|
-
super(message, 410);
|
|
77
|
-
this.name = 'GoneException';
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export class PayloadTooLargeException extends HttpException {
|
|
81
|
-
constructor(message = 'Payload Too Large'){
|
|
82
|
-
super(message, 413);
|
|
83
|
-
this.name = 'PayloadTooLargeException';
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export class UnsupportedMediaTypeException extends HttpException {
|
|
87
|
-
constructor(message = 'Unsupported Media Type'){
|
|
88
|
-
super(message, 415);
|
|
89
|
-
this.name = 'UnsupportedMediaTypeException';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export class UnprocessableEntityException extends HttpException {
|
|
93
|
-
constructor(message = 'Unprocessable Entity'){
|
|
94
|
-
super(message, 422);
|
|
95
|
-
this.name = 'UnprocessableEntityException';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
export class TooManyRequestsException extends HttpException {
|
|
99
|
-
constructor(message = 'Too Many Requests'){
|
|
100
|
-
super(message, 429);
|
|
101
|
-
this.name = 'TooManyRequestsException';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
// 5xx
|
|
105
|
-
export class InternalServerErrorException extends HttpException {
|
|
106
|
-
constructor(message = 'Internal Server Error'){
|
|
107
|
-
super(message, 500);
|
|
108
|
-
this.name = 'InternalServerErrorException';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
export class NotImplementedException extends HttpException {
|
|
112
|
-
constructor(message = 'Not Implemented'){
|
|
113
|
-
super(message, 501);
|
|
114
|
-
this.name = 'NotImplementedException';
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
export class BadGatewayException extends HttpException {
|
|
118
|
-
constructor(message = 'Bad Gateway'){
|
|
119
|
-
super(message, 502);
|
|
120
|
-
this.name = 'BadGatewayException';
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
export class ServiceUnavailableException extends HttpException {
|
|
124
|
-
constructor(message = 'Service Unavailable'){
|
|
125
|
-
super(message, 503);
|
|
126
|
-
this.name = 'ServiceUnavailableException';
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
export class GatewayTimeoutException extends HttpException {
|
|
130
|
-
constructor(message = 'Gateway Timeout'){
|
|
131
|
-
super(message, 504);
|
|
132
|
-
this.name = 'GatewayTimeoutException';
|
|
133
|
-
}
|
|
134
|
-
}
|
package/dist/errors/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { HttpException, BadRequestException, UnauthorizedException, ForbiddenException, NotFoundException, MethodNotAllowedException, NotAcceptableException, RequestTimeoutException, ConflictException, GoneException, PayloadTooLargeException, UnsupportedMediaTypeException, UnprocessableEntityException, TooManyRequestsException, InternalServerErrorException, NotImplementedException, BadGatewayException, ServiceUnavailableException, GatewayTimeoutException, } from './http-exception';
|
package/dist/errors/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { HttpException, BadRequestException, UnauthorizedException, ForbiddenException, NotFoundException, MethodNotAllowedException, NotAcceptableException, RequestTimeoutException, ConflictException, GoneException, PayloadTooLargeException, UnsupportedMediaTypeException, UnprocessableEntityException, TooManyRequestsException, InternalServerErrorException, NotImplementedException, BadGatewayException, ServiceUnavailableException, GatewayTimeoutException } from "./http-exception.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function OnEvent(event: string): MethodDecorator;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MetadataRegistry } from "../registry/metadata.registry.js";
|
|
2
|
-
import { ON_EVENT_METADATA } from "./event-emitter.tokens.js";
|
|
3
|
-
export function OnEvent(event) {
|
|
4
|
-
return (target, propertyKey)=>{
|
|
5
|
-
MetadataRegistry.appendCustomClassMeta(target.constructor, ON_EVENT_METADATA, {
|
|
6
|
-
event,
|
|
7
|
-
methodName: String(propertyKey)
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
7
|
-
import { Module } from "../module/index.js";
|
|
8
|
-
import { EventEmitter } from "./event-emitter.service.js";
|
|
9
|
-
import { EventEmitterSubscriber } from "./event-emitter.subscriber.js";
|
|
10
|
-
export class EventEmitterModule {
|
|
11
|
-
}
|
|
12
|
-
EventEmitterModule = _ts_decorate([
|
|
13
|
-
Module({
|
|
14
|
-
lazy: true,
|
|
15
|
-
providers: [
|
|
16
|
-
EventEmitter,
|
|
17
|
-
EventEmitterSubscriber
|
|
18
|
-
],
|
|
19
|
-
exports: [
|
|
20
|
-
EventEmitter
|
|
21
|
-
]
|
|
22
|
-
})
|
|
23
|
-
], EventEmitterModule);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EventHandler } from './event-emitter.types';
|
|
2
|
-
export declare class EventEmitter {
|
|
3
|
-
private exactListeners;
|
|
4
|
-
private exactOnceListeners;
|
|
5
|
-
private wildcardListeners;
|
|
6
|
-
on(event: string, handler: EventHandler): this;
|
|
7
|
-
once(event: string, handler: EventHandler): this;
|
|
8
|
-
off(event: string, handler: EventHandler): this;
|
|
9
|
-
emit(event: string, ...args: unknown[]): Promise<void>;
|
|
10
|
-
removeAllListeners(event?: string): this;
|
|
11
|
-
listenerCount(event: string): number;
|
|
12
|
-
private getOrCreateWildcard;
|
|
13
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
7
|
-
import { Injectable } from "../container/index.js";
|
|
8
|
-
function isWildcard(pattern) {
|
|
9
|
-
return pattern.includes('*');
|
|
10
|
-
}
|
|
11
|
-
function compilePattern(pattern) {
|
|
12
|
-
const regexStr = pattern.split('.').map((segment)=>{
|
|
13
|
-
if (segment === '**') return '.*';
|
|
14
|
-
if (segment === '*') return '[^.]+';
|
|
15
|
-
return segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
16
|
-
}).join('\\.');
|
|
17
|
-
return new RegExp(`^${regexStr}$`);
|
|
18
|
-
}
|
|
19
|
-
export class EventEmitter {
|
|
20
|
-
exactListeners = new Map();
|
|
21
|
-
exactOnceListeners = new Map();
|
|
22
|
-
wildcardListeners = new Map();
|
|
23
|
-
on(event, handler) {
|
|
24
|
-
if (isWildcard(event)) {
|
|
25
|
-
this.getOrCreateWildcard(event).handlers.add(handler);
|
|
26
|
-
} else {
|
|
27
|
-
const handlers = this.exactListeners.get(event) ?? new Set();
|
|
28
|
-
handlers.add(handler);
|
|
29
|
-
this.exactListeners.set(event, handlers);
|
|
30
|
-
}
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
once(event, handler) {
|
|
34
|
-
this.on(event, handler);
|
|
35
|
-
if (isWildcard(event)) {
|
|
36
|
-
this.getOrCreateWildcard(event).onceHandlers.add(handler);
|
|
37
|
-
} else {
|
|
38
|
-
const onceSet = this.exactOnceListeners.get(event) ?? new Set();
|
|
39
|
-
onceSet.add(handler);
|
|
40
|
-
this.exactOnceListeners.set(event, onceSet);
|
|
41
|
-
}
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
off(event, handler) {
|
|
45
|
-
if (isWildcard(event)) {
|
|
46
|
-
const entry = this.wildcardListeners.get(event);
|
|
47
|
-
if (entry) {
|
|
48
|
-
entry.handlers.delete(handler);
|
|
49
|
-
entry.onceHandlers.delete(handler);
|
|
50
|
-
if (entry.handlers.size === 0) this.wildcardListeners.delete(event);
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
const handlers = this.exactListeners.get(event);
|
|
54
|
-
if (handlers) {
|
|
55
|
-
handlers.delete(handler);
|
|
56
|
-
this.exactOnceListeners.get(event)?.delete(handler);
|
|
57
|
-
if (handlers.size === 0) this.exactListeners.delete(event);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
async emit(event, ...args) {
|
|
63
|
-
const toRemove = [];
|
|
64
|
-
// Exact match
|
|
65
|
-
const exactHandlers = this.exactListeners.get(event);
|
|
66
|
-
if (exactHandlers) {
|
|
67
|
-
const onceSet = this.exactOnceListeners.get(event);
|
|
68
|
-
await Promise.all([
|
|
69
|
-
...exactHandlers
|
|
70
|
-
].map(async (handler)=>{
|
|
71
|
-
await handler(...args);
|
|
72
|
-
if (onceSet?.has(handler)) {
|
|
73
|
-
toRemove.push(()=>this.off(event, handler));
|
|
74
|
-
}
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
// Wildcard match (regex pre-compiled at registration)
|
|
78
|
-
for (const [pattern, entry] of this.wildcardListeners){
|
|
79
|
-
if (!entry.regex.test(event)) continue;
|
|
80
|
-
await Promise.all([
|
|
81
|
-
...entry.handlers
|
|
82
|
-
].map(async (handler)=>{
|
|
83
|
-
await handler(...args);
|
|
84
|
-
if (entry.onceHandlers.has(handler)) {
|
|
85
|
-
toRemove.push(()=>this.off(pattern, handler));
|
|
86
|
-
}
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
for (const remove of toRemove)remove();
|
|
90
|
-
}
|
|
91
|
-
removeAllListeners(event) {
|
|
92
|
-
if (event) {
|
|
93
|
-
if (isWildcard(event)) {
|
|
94
|
-
this.wildcardListeners.delete(event);
|
|
95
|
-
} else {
|
|
96
|
-
this.exactListeners.delete(event);
|
|
97
|
-
this.exactOnceListeners.delete(event);
|
|
98
|
-
}
|
|
99
|
-
} else {
|
|
100
|
-
this.exactListeners.clear();
|
|
101
|
-
this.exactOnceListeners.clear();
|
|
102
|
-
this.wildcardListeners.clear();
|
|
103
|
-
}
|
|
104
|
-
return this;
|
|
105
|
-
}
|
|
106
|
-
listenerCount(event) {
|
|
107
|
-
let count = this.exactListeners.get(event)?.size ?? 0;
|
|
108
|
-
for (const entry of this.wildcardListeners.values()){
|
|
109
|
-
if (entry.regex.test(event)) count += entry.handlers.size;
|
|
110
|
-
}
|
|
111
|
-
return count;
|
|
112
|
-
}
|
|
113
|
-
getOrCreateWildcard(pattern) {
|
|
114
|
-
const existing = this.wildcardListeners.get(pattern);
|
|
115
|
-
if (existing) return existing;
|
|
116
|
-
const entry = {
|
|
117
|
-
regex: compilePattern(pattern),
|
|
118
|
-
handlers: new Set(),
|
|
119
|
-
onceHandlers: new Set()
|
|
120
|
-
};
|
|
121
|
-
this.wildcardListeners.set(pattern, entry);
|
|
122
|
-
return entry;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
EventEmitter = _ts_decorate([
|
|
126
|
-
Injectable()
|
|
127
|
-
], EventEmitter);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DiscoveryService } from '../discovery/discovery.service';
|
|
2
|
-
import type { OnApplicationBootstrap } from '../lifecycle/index';
|
|
3
|
-
import { EventEmitter } from './event-emitter.service';
|
|
4
|
-
export declare class EventEmitterSubscriber implements OnApplicationBootstrap {
|
|
5
|
-
private readonly discovery;
|
|
6
|
-
private emitter;
|
|
7
|
-
constructor(discovery: DiscoveryService, emitter: EventEmitter);
|
|
8
|
-
onApplicationBootstrap(): void;
|
|
9
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
7
|
-
function _ts_metadata(k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
}
|
|
10
|
-
function _ts_param(paramIndex, decorator) {
|
|
11
|
-
return function(target, key) {
|
|
12
|
-
decorator(target, key, paramIndex);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
import { Injectable, Inject } from "../container/index.js";
|
|
16
|
-
import { DiscoveryService } from "../discovery/discovery.service.js";
|
|
17
|
-
import { EventEmitter } from "./event-emitter.service.js";
|
|
18
|
-
import { ON_EVENT_METADATA } from "./event-emitter.tokens.js";
|
|
19
|
-
export class EventEmitterSubscriber {
|
|
20
|
-
discovery;
|
|
21
|
-
emitter;
|
|
22
|
-
constructor(discovery, emitter){
|
|
23
|
-
this.discovery = discovery;
|
|
24
|
-
this.emitter = emitter;
|
|
25
|
-
}
|
|
26
|
-
onApplicationBootstrap() {
|
|
27
|
-
for (const found of this.discovery.methodsWithMeta(ON_EVENT_METADATA)){
|
|
28
|
-
const instance = found.class.instance;
|
|
29
|
-
if (!instance) continue;
|
|
30
|
-
const method = instance[found.methodName];
|
|
31
|
-
if (typeof method === 'function') {
|
|
32
|
-
this.emitter.on(found.meta.event, (...args)=>method.apply(instance, args));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
EventEmitterSubscriber = _ts_decorate([
|
|
38
|
-
Injectable(),
|
|
39
|
-
_ts_param(0, Inject(DiscoveryService)),
|
|
40
|
-
_ts_metadata("design:type", Function),
|
|
41
|
-
_ts_metadata("design:paramtypes", [
|
|
42
|
-
typeof DiscoveryService === "undefined" ? Object : DiscoveryService,
|
|
43
|
-
typeof EventEmitter === "undefined" ? Object : EventEmitter
|
|
44
|
-
])
|
|
45
|
-
], EventEmitterSubscriber);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ON_EVENT_METADATA = "vela:on-event";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const ON_EVENT_METADATA = 'vela:on-event';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { EventEmitterModule } from './event-emitter.module';
|
|
2
|
-
export { EventEmitter } from './event-emitter.service';
|
|
3
|
-
export { EventEmitterSubscriber } from './event-emitter.subscriber';
|
|
4
|
-
export { OnEvent } from './event-emitter.decorators';
|
|
5
|
-
export { ON_EVENT_METADATA } from './event-emitter.tokens';
|
|
6
|
-
export type { EventHandler, OnEventMetadata } from './event-emitter.types';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { EventEmitterModule } from "./event-emitter.module.js";
|
|
2
|
-
export { EventEmitter } from "./event-emitter.service.js";
|
|
3
|
-
export { EventEmitterSubscriber } from "./event-emitter.subscriber.js";
|
|
4
|
-
export { OnEvent } from "./event-emitter.decorators.js";
|
|
5
|
-
export { ON_EVENT_METADATA } from "./event-emitter.tokens.js";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { MiddlewareHandler } from 'hono';
|
|
2
|
-
import type { VelaApplication } from '../application';
|
|
3
|
-
import type { Container } from '../container/container';
|
|
4
|
-
import type { DiscoveryService } from '../discovery/discovery.service';
|
|
5
|
-
import type { RouteManager } from '../http/route.manager';
|
|
6
|
-
/** The framework's resolved world, handed to adapter hooks. */
|
|
7
|
-
export interface AdapterContext {
|
|
8
|
-
app: VelaApplication;
|
|
9
|
-
container: Container;
|
|
10
|
-
routeManager: RouteManager;
|
|
11
|
-
discovery: DiscoveryService;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The contract a runtime binding implements to plug a platform into a Vela
|
|
15
|
-
* app — what `@velajs/cloudflare` (bindings + Durable Object WebSocket) and
|
|
16
|
-
* the Node/Bun WebSocket transport do, made first-class:
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* const app = await VelaFactory.create(AppModule, {
|
|
20
|
-
* adapters: [cloudflareAdapter({ bindings })],
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* - `requestMiddleware` is prepended to the global middleware chain (runs
|
|
25
|
-
* before consumer middleware — e.g. capture `c.env` for binding services).
|
|
26
|
-
* - `onBootstrap` runs after DI + lifecycle hooks, with `app.entrypoints`
|
|
27
|
-
* available, BEFORE routes are built — register platform services here.
|
|
28
|
-
* - `onRoutesBuilt` runs after the Hono app exists — mount platform routes
|
|
29
|
-
* (WebSocket upgrades, health endpoints) here via `ctx.app.getHonoApp()`.
|
|
30
|
-
*/
|
|
31
|
-
export interface RuntimeAdapter {
|
|
32
|
-
name: string;
|
|
33
|
-
requestMiddleware?: MiddlewareHandler[];
|
|
34
|
-
onBootstrap?(ctx: AdapterContext): void | Promise<void>;
|
|
35
|
-
onRoutesBuilt?(ctx: AdapterContext): void | Promise<void>;
|
|
36
|
-
}
|
package/dist/factory/adapter.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The contract a runtime binding implements to plug a platform into a Vela
|
|
3
|
-
* app — what `@velajs/cloudflare` (bindings + Durable Object WebSocket) and
|
|
4
|
-
* the Node/Bun WebSocket transport do, made first-class:
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* const app = await VelaFactory.create(AppModule, {
|
|
8
|
-
* adapters: [cloudflareAdapter({ bindings })],
|
|
9
|
-
* });
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* - `requestMiddleware` is prepended to the global middleware chain (runs
|
|
13
|
-
* before consumer middleware — e.g. capture `c.env` for binding services).
|
|
14
|
-
* - `onBootstrap` runs after DI + lifecycle hooks, with `app.entrypoints`
|
|
15
|
-
* available, BEFORE routes are built — register platform services here.
|
|
16
|
-
* - `onRoutesBuilt` runs after the Hono app exists — mount platform routes
|
|
17
|
-
* (WebSocket upgrades, health endpoints) here via `ctx.app.getHonoApp()`.
|
|
18
|
-
*/ export { };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Container } from '../container/container';
|
|
2
|
-
import type { Diagnostics, Type } from '../container/types';
|
|
3
|
-
import { RouteManager } from '../http/route.manager';
|
|
4
|
-
import type { RouteManagerOptions } from '../http/route.manager';
|
|
5
|
-
import { ModuleLoader } from '../module/module-loader';
|
|
6
|
-
export interface BootstrapOptions extends RouteManagerOptions {
|
|
7
|
-
diagnostics?: Diagnostics;
|
|
8
|
-
}
|
|
9
|
-
export interface BootstrapResult {
|
|
10
|
-
container: Container;
|
|
11
|
-
routeManager: RouteManager;
|
|
12
|
-
loader: ModuleLoader;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Wire the DI graph for `rootModule` and prepare the route manager — without
|
|
16
|
-
* running lifecycle hooks or building the Hono app. The single primitive
|
|
17
|
-
* shared by `VelaFactory.create` (HTTP), `@velajs/testing` (test), and any
|
|
18
|
-
* non-HTTP consumer (CLI tools, custom runtimes).
|
|
19
|
-
*
|
|
20
|
-
* Framework-internal tokens (`Container`, `ModuleRef`, `APP_*`) are marked
|
|
21
|
-
* global so they are resolvable from any module.
|
|
22
|
-
*/
|
|
23
|
-
export declare function bootstrap(rootModule: Type, options?: BootstrapOptions): Promise<BootstrapResult>;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Scope } from "../constants.js";
|
|
2
|
-
import { Container } from "../container/container.js";
|
|
3
|
-
import { ModuleRef } from "../container/module-ref.js";
|
|
4
|
-
import { DiscoveryService } from "../discovery/discovery.service.js";
|
|
5
|
-
import { REQUEST_CONTEXT } from "../http/request-context.js";
|
|
6
|
-
import { RouteManager } from "../http/route.manager.js";
|
|
7
|
-
import { UrlGeneratorService } from "../http/url/url-generator.service.js";
|
|
8
|
-
import { SignedUrlGuard } from "../http/url/signed-url.guard.js";
|
|
9
|
-
import { ModuleLoader } from "../module/module-loader.js";
|
|
10
|
-
import { bindAppProviders } from "../pipeline/app-providers.js";
|
|
11
|
-
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_MIDDLEWARE, APP_PIPE } from "../pipeline/tokens.js";
|
|
12
|
-
/**
|
|
13
|
-
* Wire the DI graph for `rootModule` and prepare the route manager — without
|
|
14
|
-
* running lifecycle hooks or building the Hono app. The single primitive
|
|
15
|
-
* shared by `VelaFactory.create` (HTTP), `@velajs/testing` (test), and any
|
|
16
|
-
* non-HTTP consumer (CLI tools, custom runtimes).
|
|
17
|
-
*
|
|
18
|
-
* Framework-internal tokens (`Container`, `ModuleRef`, `APP_*`) are marked
|
|
19
|
-
* global so they are resolvable from any module.
|
|
20
|
-
*/ export async function bootstrap(rootModule, options = {}) {
|
|
21
|
-
const container = new Container({
|
|
22
|
-
diagnostics: options.diagnostics
|
|
23
|
-
});
|
|
24
|
-
container.register({
|
|
25
|
-
provide: Container,
|
|
26
|
-
useValue: container
|
|
27
|
-
});
|
|
28
|
-
container.markGlobalToken(Container);
|
|
29
|
-
container.register({
|
|
30
|
-
provide: ModuleRef,
|
|
31
|
-
useFactory: (c)=>new ModuleRef(c),
|
|
32
|
-
inject: [
|
|
33
|
-
Container
|
|
34
|
-
]
|
|
35
|
-
});
|
|
36
|
-
container.markGlobalToken(ModuleRef);
|
|
37
|
-
// Decorator-driven discovery — global so any provider can inject it.
|
|
38
|
-
container.register({
|
|
39
|
-
provide: DiscoveryService,
|
|
40
|
-
useFactory: (c)=>new DiscoveryService(c),
|
|
41
|
-
inject: [
|
|
42
|
-
Container
|
|
43
|
-
]
|
|
44
|
-
});
|
|
45
|
-
container.markGlobalToken(DiscoveryService);
|
|
46
|
-
for (const t of [
|
|
47
|
-
APP_GUARD,
|
|
48
|
-
APP_PIPE,
|
|
49
|
-
APP_INTERCEPTOR,
|
|
50
|
-
APP_FILTER,
|
|
51
|
-
APP_MIDDLEWARE
|
|
52
|
-
]){
|
|
53
|
-
container.markGlobalToken(t);
|
|
54
|
-
}
|
|
55
|
-
// REQUEST_CONTEXT is seeded into each request-scoped child by RouteManager
|
|
56
|
-
// before any handler resolves it (see route.manager.ts:getRequestContainer).
|
|
57
|
-
// The factory throws so misuse outside the request path surfaces immediately
|
|
58
|
-
// instead of materializing a phantom context.
|
|
59
|
-
container.register({
|
|
60
|
-
provide: REQUEST_CONTEXT,
|
|
61
|
-
scope: Scope.REQUEST,
|
|
62
|
-
useFactory: ()=>{
|
|
63
|
-
throw new Error('REQUEST_CONTEXT can only be resolved inside a request — ' + 'it is seeded by RouteManager when the request enters the pipeline.');
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
container.markGlobalToken(REQUEST_CONTEXT);
|
|
67
|
-
const routeManager = new RouteManager(container, options);
|
|
68
|
-
// Resolvable so non-HTTP transports (the WebSocket dispatcher) can read the
|
|
69
|
-
// same global-tier components (APP_* + app.useGlobalX()).
|
|
70
|
-
container.register({
|
|
71
|
-
provide: RouteManager,
|
|
72
|
-
useValue: routeManager
|
|
73
|
-
});
|
|
74
|
-
container.markGlobalToken(RouteManager);
|
|
75
|
-
// Named-route URL generation + signed-URL verification are app-level
|
|
76
|
-
// singletons: injectable from any module, and (for the guard) instantiable by
|
|
77
|
-
// the pipeline when a route opts in via `@SignedUrl()`. Both read their secret
|
|
78
|
-
// lazily and never force controllers/lazy modules to materialize.
|
|
79
|
-
container.register(UrlGeneratorService);
|
|
80
|
-
container.markGlobalToken(UrlGeneratorService);
|
|
81
|
-
container.register(SignedUrlGuard);
|
|
82
|
-
container.markGlobalToken(SignedUrlGuard);
|
|
83
|
-
const loader = new ModuleLoader(container, routeManager);
|
|
84
|
-
// loader.load() also arms the deferred-init seam (LazyModuleManager) — kept
|
|
85
|
-
// inside the loader so hand-rolled bootstrap paths that never call this
|
|
86
|
-
// function (@velajs/testing's TestingModuleBuilder.compile) get identical
|
|
87
|
-
// lazy semantics.
|
|
88
|
-
loader.load(rootModule);
|
|
89
|
-
bindAppProviders(routeManager, container, loader);
|
|
90
|
-
routeManager.registerConsumerMiddleware(loader.getConsumerMiddlewareDefinitions());
|
|
91
|
-
if (options.globalPrefix) {
|
|
92
|
-
routeManager.setGlobalPrefix(options.globalPrefix);
|
|
93
|
-
}
|
|
94
|
-
for (const handler of options.middleware ?? []){
|
|
95
|
-
const mw = {
|
|
96
|
-
use: handler
|
|
97
|
-
};
|
|
98
|
-
routeManager.useGlobalMiddleware(mw);
|
|
99
|
-
}
|
|
100
|
-
// All providers are registered — compute request-scope bubbling so effective
|
|
101
|
-
// scopes are known before eager instantiation and request resolution.
|
|
102
|
-
container.computeEffectiveScopes();
|
|
103
|
-
return {
|
|
104
|
-
container,
|
|
105
|
-
routeManager,
|
|
106
|
-
loader
|
|
107
|
-
};
|
|
108
|
-
}
|