@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 50854e2: Modernize the package build, validation, and release toolchain.
|
|
8
|
+
|
|
9
|
+
## 1.19.0 (2026-07-11)
|
|
10
|
+
|
|
11
|
+
Exception-handler layer (roadmap phase 3): a single branded error concept, one
|
|
12
|
+
wire-redaction seam, and a Laravel-style reporting contract layered above the
|
|
13
|
+
NestJS-style exception filters. Design spec:
|
|
14
|
+
`docs/superpowers/specs/2026-07-11-errors-package-and-exception-layer-design.md`.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`@velajs/errors` dependency** — the new sibling package vela now builds on:
|
|
19
|
+
the branded `VelaError` (own+enumerable fields so it rides any wire codec /
|
|
20
|
+
`structuredClone` / DO-RPC prop copy), error catalogs
|
|
21
|
+
(`defineErrorCatalog`/`composeCatalogs`/`CORE_CATALOG`), and the single
|
|
22
|
+
`toErrorBody` wire-redaction seam (unbranded or `internal`-coded errors never
|
|
23
|
+
echo their message). Its core surface is re-exported from `@velajs/vela` so
|
|
24
|
+
app authors need one import to throw branded errors, author handlers, and
|
|
25
|
+
define/compose catalogs.
|
|
26
|
+
- **`ExceptionHandler` contract + `resolveErrorReporter`** — an optional
|
|
27
|
+
application-wide handler (`report` / `dontReport` / `context` / `render`)
|
|
28
|
+
consulted at every transport edge (HTTP, WS, live, queue, schedule). Reporting
|
|
29
|
+
is fire-and-forget and fully contained: a broken or throwing handler (or
|
|
30
|
+
`dontReport` matcher) can never mask the original error.
|
|
31
|
+
- **`APP_EXCEPTION_HANDLER` / `ERROR_CATALOG` tokens** — provide the handler and
|
|
32
|
+
the composed catalog via module providers.
|
|
33
|
+
- **`ErrorsModule.forRoot({ catalogs?, handler? })`** — composes
|
|
34
|
+
`[CORE_CATALOG, ...catalogs]` (eager; a duplicate code across catalogs fails
|
|
35
|
+
fast with `duplicate error code`) into `ERROR_CATALOG`, and — when given —
|
|
36
|
+
registers `APP_EXCEPTION_HANDLER` (`useClass` for a handler class, `useValue`
|
|
37
|
+
for a handler object).
|
|
38
|
+
- **`app.useGlobalExceptionHandler(handler)`** — the imperative sibling of
|
|
39
|
+
`ErrorsModule.forRoot({ handler })`; registers `APP_EXCEPTION_HANDLER` on the
|
|
40
|
+
root container, taking effect on the next request without a rebuild.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- **BREAKING (sanctioned wire break): the HTTP error body is now the canonical
|
|
45
|
+
error object.** Uncaught controller/handler errors render as
|
|
46
|
+
`{ error: { code, message, hint?, docsUrl?, details? } }` with the code's
|
|
47
|
+
catalog status, replacing the prior `{ statusCode, message }` shape.
|
|
48
|
+
`HttpException` object responses still ship verbatim (crud-envelope compat).
|
|
49
|
+
Error reporting is now **report-first**: the reporter runs before any
|
|
50
|
+
exception filter, so a filter claiming an error can no longer make it
|
|
51
|
+
invisible to logging/Sentry. A new `app.onError` fallback funnels raw
|
|
52
|
+
hono-middleware throws (which previously bypassed the filter tier entirely)
|
|
53
|
+
through the same report + redaction path; hono's own `HTTPException`
|
|
54
|
+
responses are still honored verbatim. Per the compat policy, shipped under a
|
|
55
|
+
minor with no deprecation shim.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- **Live engine raw-message leak** — initial-subscribe resolver errors were sent
|
|
60
|
+
to the browser as raw `err.message` (`src/live/live.engine.ts`); they now flow
|
|
61
|
+
through `toErrorBody`, so unbranded/internal errors are redacted like every
|
|
62
|
+
other edge. The WS exception frame and the report-then-rethrow queue/schedule
|
|
63
|
+
dispatch paths were aligned to the same report-first + redacted-body invariant.
|
|
64
|
+
|
|
3
65
|
## 1.15.0 (2026-07-04)
|
|
4
66
|
|
|
5
67
|
Introspection seams for `@velajs/cli` (roadmap phase 3, CLI introspection):
|
|
@@ -40,7 +102,7 @@ machine-verified by an import audit test.
|
|
|
40
102
|
`@velajs/cloudflare` already exports an unrelated CF-binding `QueueModule`).
|
|
41
103
|
Producers: `QueueModule.forRoot({ queues: ['email'] })` + per-queue
|
|
42
104
|
`QueueClient` injected via `queueToken(name)` (`add(jobName, data,
|
|
43
|
-
|
|
105
|
+
{ delayMs? })`). Consumers: `@Processor(queue)` classes with
|
|
44
106
|
`@Process(jobName?)` handlers (named wins over wildcard; duplicates warn,
|
|
45
107
|
first-wins). Dispatch runs each job in `runInEntrypointScope`
|
|
46
108
|
(request-scoped deps rebuild per job), re-resolves processors by token
|
|
@@ -80,7 +142,7 @@ cost it nothing at bootstrap.
|
|
|
80
142
|
|
|
81
143
|
- **Lazy modules** — `@Module({ lazy: true })`, `DynamicModule.lazy`, and
|
|
82
144
|
`defineModule({ lazy: true })` (also recognized per call site like
|
|
83
|
-
`isGlobal`) defer a module
|
|
145
|
+
`isGlobal`) defer a module _instance_'s entire provider/controller group:
|
|
84
146
|
nothing constructs during `VelaFactory.create`. The first resolution of any
|
|
85
147
|
of its tokens (injection, `app.get()`, a request hitting its controller, a
|
|
86
148
|
dispatcher re-resolving an entrypoint token) claims the module; when the
|
|
@@ -100,7 +162,7 @@ cost it nothing at bootstrap.
|
|
|
100
162
|
non-triggering diagnostics (build-time probes, cold-start regression tests).
|
|
101
163
|
- **`DiscoveryFilter.deferLazy`** — discovery returns providers of
|
|
102
164
|
unmaterialized lazy modules as metadata-only entries (`instance:
|
|
103
|
-
|
|
165
|
+
undefined`, mirroring the request-scoped convention) instead of forcing the
|
|
104
166
|
group. `EntrypointRegistry.build` uses it: declared-kind entrypoints of
|
|
105
167
|
lazy modules are metadata-only in `app.entrypoints`; dispatchers that
|
|
106
168
|
re-resolve by token (cloudflare cron/queue/scheduled already do)
|
|
@@ -155,7 +217,7 @@ this version.
|
|
|
155
217
|
`includeRequestScoped`). The event-emitter, schedule, and websocket
|
|
156
218
|
bootstrap scans now all run through it.
|
|
157
219
|
- **Open entrypoint registry** — `registerEntrypointKind({ kind, metaKey,
|
|
158
|
-
|
|
220
|
+
level })`, the `ContributesEntrypoints` interface, and per-application
|
|
159
221
|
`app.entrypoints` (`ofKind`/`kinds`/`all`), built at the end of
|
|
160
222
|
`callOnApplicationBootstrap()` so slim bootstrap paths (Cloudflare Durable
|
|
161
223
|
Objects) get it too. Transports query entrypoints instead of module
|
|
@@ -264,7 +326,7 @@ The exception-filter chain now reaches into attached middlewares for full NestJS
|
|
|
264
326
|
|
|
265
327
|
### Added
|
|
266
328
|
|
|
267
|
-
- **`createLazyParamDecorator((data, ctx) => T)`.** Custom parameter decorators whose factory runs the
|
|
329
|
+
- **`createLazyParamDecorator((data, ctx) => T)`.** Custom parameter decorators whose factory runs the _first time the handler reads a property on the resolved value_ — not during argument extraction. Vela's argument resolver runs before guards by design (`extract args → guards → handler`), which means a `createParamDecorator` factory that depends on guard-populated state observes an empty slot. The lazy variant returns a `Proxy` whose traps invoke the factory on demand; the `get` trap short-circuits `prop === 'then'` so `await value` does not consider the proxy a thenable and therefore does not trigger eager resolution. Method results are auto-bound to the resolved real target so detached calls keep `this`; `ownKeys` + `getOwnPropertyDescriptor` are implemented so `JSON.stringify(value)` works after one access. Exported from the root barrel and from `@velajs/vela/internal` via the same surface as `createParamDecorator`. Documented in README under _Custom parameter decorators with deferred resolution_.
|
|
268
330
|
|
|
269
331
|
### Changed
|
|
270
332
|
|
|
@@ -283,14 +345,16 @@ A sanctioned per-request injectable lands as a framework primitive, the metadata
|
|
|
283
345
|
- **`REQUEST_CONTEXT` injectable.** A request-scoped primitive carrying a stable `id` (mirrored from inbound `x-request-id` if present, else `crypto.randomUUID()`), `receivedAt`, the raw `Request`, the Hono `Context`, and a typed `set/get/has` bag for cross-cutting metadata. Seeded by `RouteManager` into each per-request child container; resolves through `@Inject(REQUEST_CONTEXT)` from any request-scoped service. No `AsyncLocalStorage` — edge-runtime contract intact (verified live under workerd via `pnpm test:workers`).
|
|
284
346
|
|
|
285
347
|
```ts
|
|
286
|
-
import { Inject, Injectable, Scope, REQUEST_CONTEXT } from
|
|
287
|
-
import type { RequestContext } from
|
|
348
|
+
import { Inject, Injectable, Scope, REQUEST_CONTEXT } from "@velajs/vela";
|
|
349
|
+
import type { RequestContext } from "@velajs/vela";
|
|
288
350
|
|
|
289
351
|
@Injectable({ scope: Scope.REQUEST })
|
|
290
352
|
class TenantResolver {
|
|
291
|
-
constructor(
|
|
353
|
+
constructor(
|
|
354
|
+
@Inject(REQUEST_CONTEXT) private readonly ctx: RequestContext
|
|
355
|
+
) {}
|
|
292
356
|
resolve() {
|
|
293
|
-
return this.ctx.hono.req.header(
|
|
357
|
+
return this.ctx.hono.req.header("x-tenant") ?? "default";
|
|
294
358
|
}
|
|
295
359
|
}
|
|
296
360
|
```
|
|
@@ -337,7 +401,7 @@ Module boundaries are enforced. NestJS-shape: a service cannot resolve dependenc
|
|
|
337
401
|
|
|
338
402
|
### Internal cleanup
|
|
339
403
|
|
|
340
|
-
- **`Container` constructor accepts `ContainerOptions`** (`{ diagnostics? }`). Threads `requestingModuleId` through `resolve` / `resolveAsync` / `resolveAll`. Per-module scopes are tracked via `registerScope`; framework-internal globals via `markGlobalToken`. `providerOrigin: Map<Token, string>` records each provider's declaring module so constructor injections resolve from the
|
|
404
|
+
- **`Container` constructor accepts `ContainerOptions`** (`{ diagnostics? }`). Threads `requestingModuleId` through `resolve` / `resolveAsync` / `resolveAll`. Per-module scopes are tracked via `registerScope`; framework-internal globals via `markGlobalToken`. `providerOrigin: Map<Token, string>` records each provider's declaring module so constructor injections resolve from the _class's_ module, not the caller's. Visibility enforcement runs whenever a `requestingModuleId` is supplied — there is no on/off switch.
|
|
341
405
|
|
|
342
406
|
- **`ModuleLoader` registers a `ModuleScope` per module** before recursing into imports — `localProviders` includes the module class itself (so `NestModule.configure()` resolution stays inside its own scope), controllers, and every provider token. Synthetic `APP_*` tokens are marked global at mint time so RouteManager's request-time resolutions (no requester) keep working.
|
|
343
407
|
|
|
@@ -347,7 +411,7 @@ Module boundaries are enforced. NestJS-shape: a service cannot resolve dependenc
|
|
|
347
411
|
|
|
348
412
|
- **Dropped unused `Container.parent` field** (audit #10). Was assigned in `createChild()` but never read.
|
|
349
413
|
|
|
350
|
-
- **Bootstrap consolidated into `src/factory/bootstrap.ts`** — `VelaFactory.create` no longer hand-rolls the
|
|
414
|
+
- **Bootstrap consolidated into `src/factory/bootstrap.ts`** — `VelaFactory.create` no longer hand-rolls the APP\_\* / consumer-middleware / global-prefix wiring sequence. Net code reduction in `factory.ts`.
|
|
351
415
|
|
|
352
416
|
## 1.1.0 (2026-04-30)
|
|
353
417
|
|
|
@@ -424,7 +488,7 @@ Architectural remodel: one metadata model, one storage, public surface trimmed,
|
|
|
424
488
|
- **`module-loader` `new moduleClass()` footgun fixed.** `NestModule.configure()` modules are now resolved through the container, so they can have constructor-injected deps.
|
|
425
489
|
- **One path util** (`registry/paths.ts`: `normalizePath`, `joinPaths`, `toOpenApiPath`). Replaces 2× duplicated implementations in `http/decorators.ts`, `openapi/document.ts`, and `route.manager.ts`.
|
|
426
490
|
- **One `ExecutionContext` factory** (`http/execution-context.ts`: `buildExecutionContext`). Replaces 2× duplicated literal construction.
|
|
427
|
-
- **One `bindAppProviders` helper** (`pipeline/app-providers.ts`). Implements the NestJS
|
|
491
|
+
- **One `bindAppProviders` helper** (`pipeline/app-providers.ts`). Implements the NestJS APP*\* provider convention in one place; replaces 5× duplicated APP*\* wiring blocks across `factory.ts` and `testing.builder.ts`.
|
|
428
492
|
- **One module-graph walk** (`module/graph.ts`: `collectControllers`). Replaces the duplicate implementation in `openapi/document.ts`.
|
|
429
493
|
- **schedule/event-emitter/openapi decorators** now use `MetadataRegistry.appendCustomClassMeta`/`appendCustomHandlerMeta` instead of direct `Reflect.defineMetadata` calls.
|
|
430
494
|
- **Stub `pnpm-workspace.yaml` and `bunfig.toml` deleted** — they only set `onlyBuiltDependencies`, which lives in `package.json#pnpm`. `bun.lock` deleted; pnpm is the source of truth.
|
|
@@ -438,7 +502,7 @@ Edge-runtime audit and AI-drift cleanup.
|
|
|
438
502
|
- **Schedule module split.** `ScheduleExecutor`, `SCHEDULE_MODULE_OPTIONS`, and `ScheduleModuleOptions` are no longer exported from `@velajs/vela`. The `setInterval`-based timer executor moved to a new opt-in sub-export at `@velajs/vela/schedule-node`. Consumers on Node or Bun should now do:
|
|
439
503
|
|
|
440
504
|
```ts
|
|
441
|
-
import { ScheduleNodeModule } from
|
|
505
|
+
import { ScheduleNodeModule } from "@velajs/vela/schedule-node";
|
|
442
506
|
|
|
443
507
|
@Module({ imports: [ScheduleNodeModule.forRoot()], providers: [JobsService] })
|
|
444
508
|
class AppModule {}
|
|
@@ -448,7 +512,7 @@ Edge-runtime audit and AI-drift cleanup.
|
|
|
448
512
|
|
|
449
513
|
Edge runtimes without `setInterval` (Cloudflare Workers, etc.) should continue to use platform cron triggers — `@velajs/cloudflare` ≥ 0.2.0 dispatches core `@Cron` jobs via its `scheduled()` handler.
|
|
450
514
|
|
|
451
|
-
- **TypeScript enums replaced with `as const` objects** for `HttpMethod`, `ParamType`, `Scope`, `RequestMethod`, and `LogLevel`. Value access (`HttpMethod.GET`) keeps working; type-position usages (`: HttpMethod`) keep working via same-name type aliases. Code that imported the enum
|
|
515
|
+
- **TypeScript enums replaced with `as const` objects** for `HttpMethod`, `ParamType`, `Scope`, `RequestMethod`, and `LogLevel`. Value access (`HttpMethod.GET`) keeps working; type-position usages (`: HttpMethod`) keep working via same-name type aliases. Code that imported the enum _type_ with structural assumptions about enum runtime shape may need adjustment.
|
|
452
516
|
|
|
453
517
|
### Fixes
|
|
454
518
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { n as defineModule, r as stableHash } from "./define-module-NOyOZNXD.js";
|
|
2
|
+
//#region src/module/configurable-module.builder.ts
|
|
3
|
+
/**
|
|
4
|
+
* Blessed key-derivation helper for hand-written `forRoot` statics: the one
|
|
5
|
+
* documented way to derive a `DynamicModule.key` from an options bag so
|
|
6
|
+
* identical configurations dedup (HMR-idempotent) and distinct ones coexist.
|
|
7
|
+
* Alias of {@link stableHash} with a module-authoring name.
|
|
8
|
+
*/
|
|
9
|
+
const moduleKey = stableHash;
|
|
10
|
+
/**
|
|
11
|
+
* NestJS-parity builder that generates `forRoot`/`forRootAsync` (and `key`,
|
|
12
|
+
* `global`, factory-param inference) from a tiny spec — so a module is just its
|
|
13
|
+
* tokens + options type + service + a `@Module({...})` bag, while vela keeps its
|
|
14
|
+
* encapsulation (`exports`/visibility) and multi-instance `key` dedup.
|
|
15
|
+
*
|
|
16
|
+
* Since 1.11 this is a thin adapter over {@link defineModule} — the single
|
|
17
|
+
* authoring engine. Prefer `defineModule` for new modules: it additionally
|
|
18
|
+
* supports contributions (providers/controllers/imports/exports/global
|
|
19
|
+
* components) computed as functions of the options.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
|
|
24
|
+
* new ConfigurableModuleBuilder<FooOptions>({ moduleName: 'Foo' }).build();
|
|
25
|
+
*
|
|
26
|
+
* @Module({
|
|
27
|
+
* providers: [FooService], // derived providers inject MODULE_OPTIONS_TOKEN
|
|
28
|
+
* exports: [FooService],
|
|
29
|
+
* })
|
|
30
|
+
* export class FooModule extends ConfigurableModuleClass {}
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
var ConfigurableModuleBuilder = class {
|
|
34
|
+
options;
|
|
35
|
+
classMethodName = "forRoot";
|
|
36
|
+
factoryMethodName = "create";
|
|
37
|
+
extrasDefaults;
|
|
38
|
+
extrasTransform;
|
|
39
|
+
constructor(options = {}) {
|
|
40
|
+
this.options = options;
|
|
41
|
+
}
|
|
42
|
+
/** Declare extra call-site keys (e.g. `isGlobal`) + how they reshape the definition. */
|
|
43
|
+
setExtras(defaults, transform) {
|
|
44
|
+
this.extrasDefaults = defaults;
|
|
45
|
+
this.extrasTransform = transform;
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
/** Rename the sync static (default `forRoot`); the async static becomes `<name>Async`. */
|
|
49
|
+
setClassMethodName(name) {
|
|
50
|
+
this.classMethodName = name;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
/** Rename the method a `useClass`/`useExisting` options factory must implement (default `create`). */
|
|
54
|
+
setFactoryMethodName(name) {
|
|
55
|
+
this.factoryMethodName = name;
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
build() {
|
|
59
|
+
return defineModule({
|
|
60
|
+
name: this.options.moduleName ?? "ConfigurableModule",
|
|
61
|
+
optionsToken: this.options.optionsInjectionToken,
|
|
62
|
+
extras: this.extrasDefaults,
|
|
63
|
+
transform: this.extrasTransform,
|
|
64
|
+
methodName: this.classMethodName,
|
|
65
|
+
factoryMethodName: this.factoryMethodName
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Lower-level engine for cases a class-mixin can't express — chiefly a
|
|
71
|
+
* runtime-generated module class whose providers depend on a call-time arg
|
|
72
|
+
* (Cloudflare binding modules). Returns an object with a single static named by
|
|
73
|
+
* `spec.methodName` (default `forRoot`).
|
|
74
|
+
*/
|
|
75
|
+
function defineConfigurableModule(spec) {
|
|
76
|
+
return { [spec.methodName ?? "forRoot"](args) {
|
|
77
|
+
const definition = {
|
|
78
|
+
module: spec.module,
|
|
79
|
+
key: spec.keyFrom(args),
|
|
80
|
+
providers: spec.providers(args)
|
|
81
|
+
};
|
|
82
|
+
if (spec.imports) definition.imports = spec.imports(args);
|
|
83
|
+
if (spec.exports) definition.exports = spec.exports;
|
|
84
|
+
if (spec.global) definition.global = true;
|
|
85
|
+
return definition;
|
|
86
|
+
} };
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { defineConfigurableModule as n, moduleKey as r, ConfigurableModuleBuilder as t };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=configurable-module.builder-5FGMaXG6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurable-module.builder-5FGMaXG6.js","names":[],"sources":["../src/module/configurable-module.builder.ts"],"sourcesContent":["import { InjectionToken } from '../container/types';\nimport type { DynamicModule } from '../registry/types';\nimport type {\n ConfigurableModuleBuilderOptions,\n ConfigurableModuleExtras,\n ConfigurableModuleExtrasTransform,\n ConfigurableModuleHost,\n DefineConfigurableModuleSpec,\n} from './configurable-module.types';\nimport { defineModule } from './define-module';\nimport { stableHash } from './stable-hash';\n\n/**\n * Blessed key-derivation helper for hand-written `forRoot` statics: the one\n * documented way to derive a `DynamicModule.key` from an options bag so\n * identical configurations dedup (HMR-idempotent) and distinct ones coexist.\n * Alias of {@link stableHash} with a module-authoring name.\n */\nexport const moduleKey: (options: unknown) => string = stableHash;\n\n/**\n * NestJS-parity builder that generates `forRoot`/`forRootAsync` (and `key`,\n * `global`, factory-param inference) from a tiny spec — so a module is just its\n * tokens + options type + service + a `@Module({...})` bag, while vela keeps its\n * encapsulation (`exports`/visibility) and multi-instance `key` dedup.\n *\n * Since 1.11 this is a thin adapter over {@link defineModule} — the single\n * authoring engine. Prefer `defineModule` for new modules: it additionally\n * supports contributions (providers/controllers/imports/exports/global\n * components) computed as functions of the options.\n *\n * @example\n * ```ts\n * const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =\n * new ConfigurableModuleBuilder<FooOptions>({ moduleName: 'Foo' }).build();\n *\n * @Module({\n * providers: [FooService], // derived providers inject MODULE_OPTIONS_TOKEN\n * exports: [FooService],\n * })\n * export class FooModule extends ConfigurableModuleClass {}\n * ```\n */\nexport class ConfigurableModuleBuilder<\n Opts,\n MethodKey extends string = 'forRoot',\n FactoryMethodKey extends string = 'create',\n Extras extends ConfigurableModuleExtras = { isGlobal?: boolean },\n> {\n private classMethodName = 'forRoot';\n private factoryMethodName = 'create';\n private extrasDefaults: ConfigurableModuleExtras | undefined;\n private extrasTransform: ConfigurableModuleExtrasTransform<ConfigurableModuleExtras> | undefined;\n\n constructor(private readonly options: ConfigurableModuleBuilderOptions = {}) {}\n\n /** Declare extra call-site keys (e.g. `isGlobal`) + how they reshape the definition. */\n setExtras<NewExtras extends ConfigurableModuleExtras>(\n defaults: NewExtras,\n transform: ConfigurableModuleExtrasTransform<NewExtras>,\n ): ConfigurableModuleBuilder<Opts, MethodKey, FactoryMethodKey, NewExtras> {\n this.extrasDefaults = defaults;\n this.extrasTransform = transform as ConfigurableModuleExtrasTransform<ConfigurableModuleExtras>;\n return this as unknown as ConfigurableModuleBuilder<\n Opts,\n MethodKey,\n FactoryMethodKey,\n NewExtras\n >;\n }\n\n /** Rename the sync static (default `forRoot`); the async static becomes `<name>Async`. */\n setClassMethodName<NewMethodKey extends string>(\n name: NewMethodKey,\n ): ConfigurableModuleBuilder<Opts, NewMethodKey, FactoryMethodKey, Extras> {\n this.classMethodName = name;\n return this as unknown as ConfigurableModuleBuilder<\n Opts,\n NewMethodKey,\n FactoryMethodKey,\n Extras\n >;\n }\n\n /** Rename the method a `useClass`/`useExisting` options factory must implement (default `create`). */\n setFactoryMethodName<NewFactoryMethodKey extends string>(\n name: NewFactoryMethodKey,\n ): ConfigurableModuleBuilder<Opts, MethodKey, NewFactoryMethodKey, Extras> {\n this.factoryMethodName = name;\n return this as unknown as ConfigurableModuleBuilder<\n Opts,\n MethodKey,\n NewFactoryMethodKey,\n Extras\n >;\n }\n\n build(): ConfigurableModuleHost<Opts, MethodKey, FactoryMethodKey, Extras> {\n return defineModule<Opts, Extras, MethodKey, FactoryMethodKey>({\n name: this.options.moduleName ?? 'ConfigurableModule',\n optionsToken: this.options.optionsInjectionToken as InjectionToken<Opts> | undefined,\n extras: this.extrasDefaults as Extras | undefined,\n transform: this.extrasTransform as ConfigurableModuleExtrasTransform<Extras> | undefined,\n methodName: this.classMethodName as MethodKey,\n factoryMethodName: this.factoryMethodName as FactoryMethodKey,\n });\n }\n}\n\n/**\n * Lower-level engine for cases a class-mixin can't express — chiefly a\n * runtime-generated module class whose providers depend on a call-time arg\n * (Cloudflare binding modules). Returns an object with a single static named by\n * `spec.methodName` (default `forRoot`).\n */\nexport function defineConfigurableModule<Args>(\n spec: DefineConfigurableModuleSpec<Args>,\n): Record<string, (args: Args) => DynamicModule> {\n const methodName = spec.methodName ?? 'forRoot';\n return {\n [methodName](args: Args): DynamicModule {\n const definition: DynamicModule = {\n module: spec.module,\n key: spec.keyFrom(args),\n providers: spec.providers(args),\n };\n if (spec.imports) definition.imports = spec.imports(args);\n if (spec.exports) definition.exports = spec.exports;\n if (spec.global) definition.global = true;\n return definition;\n },\n };\n}\n"],"mappings":";;;;;;;;AAkBA,MAAa,YAA0C;;;;;;;;;;;;;;;;;;;;;;;;AAyBvD,IAAa,4BAAb,MAKE;CAM6B;CAL7B,kBAA0B;CAC1B,oBAA4B;CAC5B;CACA;CAEA,YAAY,UAA6D,CAAC,GAAG;EAAhD,KAAA,UAAA;CAAiD;;CAG9E,UACE,UACA,WACyE;EACzE,KAAK,iBAAiB;EACtB,KAAK,kBAAkB;EACvB,OAAO;CAMT;;CAGA,mBACE,MACyE;EACzE,KAAK,kBAAkB;EACvB,OAAO;CAMT;;CAGA,qBACE,MACyE;EACzE,KAAK,oBAAoB;EACzB,OAAO;CAMT;CAEA,QAA2E;EACzE,OAAO,aAAwD;GAC7D,MAAM,KAAK,QAAQ,cAAc;GACjC,cAAc,KAAK,QAAQ;GAC3B,QAAQ,KAAK;GACb,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,mBAAmB,KAAK;EAC1B,CAAC;CACH;AACF;;;;;;;AAQA,SAAgB,yBACd,MAC+C;CAE/C,OAAO,EACL,CAFiB,KAAK,cAAc,WAEvB,MAA2B;EACtC,MAAM,aAA4B;GAChC,QAAQ,KAAK;GACb,KAAK,KAAK,QAAQ,IAAI;GACtB,WAAW,KAAK,UAAU,IAAI;EAChC;EACA,IAAI,KAAK,SAAS,WAAW,UAAU,KAAK,QAAQ,IAAI;EACxD,IAAI,KAAK,SAAS,WAAW,UAAU,KAAK;EAC5C,IAAI,KAAK,QAAQ,WAAW,SAAS;EACrC,OAAO;CACT,EACF;AACF"}
|