@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/dist/i18n/index.d.ts
CHANGED
|
@@ -1,10 +1,138 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import "../schedule.registry-DVm7Jp5w.js";
|
|
2
|
+
import { U as InjectionToken, f as DynamicModule, j as NestMiddleware } from "../discovery.service-Cpf1QcZ5.js";
|
|
3
|
+
import { yi as RequestContext, zt as ConfigurableModuleClassType } from "../index-DhShDLCM.js";
|
|
4
|
+
import { Context, Next } from "hono";
|
|
5
|
+
//#region src/i18n/i18n.options.d.ts
|
|
6
|
+
/** How the request locale is detected. */
|
|
7
|
+
type DetectionStrategy = 'header' | 'query' | 'cookie';
|
|
8
|
+
interface I18nModuleOptions {
|
|
9
|
+
/** Default locale. @default 'en' */
|
|
10
|
+
defaultLocale?: string;
|
|
11
|
+
/** Fallback when a translation is missing. @default defaultLocale */
|
|
12
|
+
fallbackLocale?: string;
|
|
13
|
+
/** Supported locales; request locales outside this list fall back to default. @default ['en'] */
|
|
14
|
+
locales?: string[];
|
|
15
|
+
/** Locale detection config. */
|
|
16
|
+
detection?: {
|
|
17
|
+
/** Set false to disable detection (always use defaultLocale). @default true */
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
/** @default 'header' (Accept-Language) */
|
|
20
|
+
strategy?: DetectionStrategy;
|
|
21
|
+
/** Cookie/query parameter name. @default 'locale' */
|
|
22
|
+
lookupKey?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface ResolvedI18nOptions {
|
|
26
|
+
defaultLocale: string;
|
|
27
|
+
fallbackLocale: string;
|
|
28
|
+
locales: string[];
|
|
29
|
+
detection: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
strategy: DetectionStrategy;
|
|
32
|
+
lookupKey: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
declare function resolveI18nOptions(options?: I18nModuleOptions): ResolvedI18nOptions;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/i18n/i18n.module.d.ts
|
|
38
|
+
declare const ConfigurableModuleClass: ConfigurableModuleClassType<I18nModuleOptions, "forRoot", "create", {
|
|
39
|
+
isGlobal?: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
declare class I18nModule extends ConfigurableModuleClass {
|
|
42
|
+
/**
|
|
43
|
+
* forFeature-style: contribute a message tree (`{ [locale]: { ...messages } }`).
|
|
44
|
+
* Contributions are collected statically at module-load and deep-merged.
|
|
45
|
+
*/
|
|
46
|
+
static registerMessages(messages: Record<string, Record<string, unknown>>): DynamicModule;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/i18n/i18n.types.d.ts
|
|
50
|
+
interface II18nService {
|
|
51
|
+
/** Translate `key` (dot-path into the message tree) with optional ICU params. */
|
|
52
|
+
t(key: string, params?: Record<string, unknown>): string;
|
|
53
|
+
/** The resolved locale for the current request. */
|
|
54
|
+
getLocale(): string;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/i18n/message-registry.d.ts
|
|
58
|
+
type Contribution = Record<string, Record<string, unknown>>;
|
|
59
|
+
/**
|
|
60
|
+
* Accumulates i18n messages from multiple `I18nModule.registerMessages()` calls
|
|
61
|
+
* (statically, at module import time), deep-merged on read by
|
|
62
|
+
* {@link MessageLoaderService}. Later registrations override earlier ones at the
|
|
63
|
+
* leaf level.
|
|
64
|
+
*/
|
|
65
|
+
declare class MessageRegistry {
|
|
66
|
+
/** Called by `I18nModule.registerMessages()`. */
|
|
67
|
+
static addMessages(messages: Contribution): void;
|
|
68
|
+
/** All contributions deep-merged, per locale, in registration order. */
|
|
69
|
+
getMergedMessages(): Record<string, Record<string, unknown>>;
|
|
70
|
+
/** @internal — testing */
|
|
71
|
+
static reset(): void;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/i18n/message-loader.service.d.ts
|
|
75
|
+
/**
|
|
76
|
+
* Compiles and caches ICU messages (via `intl-messageformat`). Singleton: reads
|
|
77
|
+
* the merged registry once at construction (all `registerMessages` calls run at
|
|
78
|
+
* module-load, before providers are instantiated), flattens each locale to
|
|
79
|
+
* dot-paths, and compiles lazily per locale.
|
|
80
|
+
*/
|
|
81
|
+
declare class MessageLoaderService {
|
|
82
|
+
private readonly cache;
|
|
83
|
+
private readonly compiledCache;
|
|
84
|
+
private readonly defaultLocale;
|
|
85
|
+
private readonly fallbackLocale;
|
|
86
|
+
constructor(registry: MessageRegistry, options: I18nModuleOptions);
|
|
87
|
+
translate(locale: string, key: string, params?: Record<string, unknown>): string;
|
|
88
|
+
getAvailableLocales(): string[];
|
|
89
|
+
isLocaleSupported(locale: string): boolean;
|
|
90
|
+
getDefaultLocale(): string;
|
|
91
|
+
private getCompiledMessages;
|
|
92
|
+
private flattenMessages;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/i18n/i18n.service.d.ts
|
|
96
|
+
/**
|
|
97
|
+
* Request-scoped translation facade. Reads the locale resolved by
|
|
98
|
+
* {@link I18nLocaleMiddleware} from the per-request RequestContext.
|
|
99
|
+
*
|
|
100
|
+
* Injecting it into a controller/service is safe: vela's request-scope bubbling
|
|
101
|
+
* promotes the consumer to request scope automatically, so no captive-dependency
|
|
102
|
+
* hazard and no `ambientContainer` flag required.
|
|
103
|
+
*/
|
|
104
|
+
declare class I18nService implements II18nService {
|
|
105
|
+
private readonly loader;
|
|
106
|
+
private readonly ctx;
|
|
107
|
+
private readonly options;
|
|
108
|
+
constructor(loader: MessageLoaderService, ctx: RequestContext, options: I18nModuleOptions);
|
|
109
|
+
t(key: string, params?: Record<string, unknown>): string;
|
|
110
|
+
getLocale(): string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/i18n/i18n.middleware.d.ts
|
|
114
|
+
/**
|
|
115
|
+
* Detects the request locale and stashes it on the per-request RequestContext
|
|
116
|
+
* bag under {@link I18N_LOCALE_KEY}, where {@link I18nService} reads it.
|
|
117
|
+
* Registered globally via APP_MIDDLEWARE by {@link I18nModule}. Holds no
|
|
118
|
+
* per-request state (reads the RequestContext off the request container each
|
|
119
|
+
* call), so a singleton instance is safe.
|
|
120
|
+
*/
|
|
121
|
+
declare class I18nLocaleMiddleware implements NestMiddleware {
|
|
122
|
+
private readonly resolved;
|
|
123
|
+
constructor(options: I18nModuleOptions);
|
|
124
|
+
use(c: Context, next: Next): Promise<Response | void>;
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/i18n/i18n.tokens.d.ts
|
|
128
|
+
/** Options bag from `I18nModule.forRoot()` (the ConfigurableModuleBuilder options token). */
|
|
129
|
+
declare const I18N_OPTIONS: InjectionToken<I18nModuleOptions>;
|
|
130
|
+
/** Key under which the resolved locale is stashed on the per-request RequestContext bag. */
|
|
131
|
+
declare const I18N_LOCALE_KEY: unique symbol;
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/i18n/deep-merge.d.ts
|
|
134
|
+
/** Deep-merge two message trees; source overrides target at the leaf level. */
|
|
135
|
+
declare function deepMerge(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
|
|
136
|
+
//#endregion
|
|
137
|
+
export { type DetectionStrategy, I18N_LOCALE_KEY, I18N_OPTIONS, I18nLocaleMiddleware, I18nModule, type I18nModuleOptions, I18nService, type II18nService, MessageLoaderService, MessageRegistry, type ResolvedI18nOptions, deepMerge, resolveI18nOptions };
|
|
138
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,8 +1,270 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { C as InjectionToken, a as Injectable, i as Inject, m as Scope, n as __decorateParam, r as __decorateMetadata, t as __decorate, y as APP_MIDDLEWARE } from "../decorate-GcSMAbKn.js";
|
|
2
|
+
import { t as REQUEST_CONTEXT } from "../request-context-C3nCGJNd.js";
|
|
3
|
+
import { n as Module } from "../decorators-C8YBFCIk.js";
|
|
4
|
+
import { r as stableHash } from "../define-module-NOyOZNXD.js";
|
|
5
|
+
import { t as ConfigurableModuleBuilder } from "../configurable-module.builder-5FGMaXG6.js";
|
|
6
|
+
import IntlMessageFormat from "intl-messageformat";
|
|
7
|
+
//#region src/i18n/i18n.options.ts
|
|
8
|
+
function resolveI18nOptions(options) {
|
|
9
|
+
const detection = options?.detection;
|
|
10
|
+
const defaultLocale = options?.defaultLocale ?? "en";
|
|
11
|
+
return {
|
|
12
|
+
defaultLocale,
|
|
13
|
+
fallbackLocale: options?.fallbackLocale ?? defaultLocale,
|
|
14
|
+
locales: options?.locales ?? ["en"],
|
|
15
|
+
detection: {
|
|
16
|
+
enabled: detection?.enabled !== false,
|
|
17
|
+
strategy: detection?.strategy ?? "header",
|
|
18
|
+
lookupKey: detection?.lookupKey ?? "locale"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/i18n/i18n.tokens.ts
|
|
24
|
+
/** Options bag from `I18nModule.forRoot()` (the ConfigurableModuleBuilder options token). */
|
|
25
|
+
const I18N_OPTIONS = new InjectionToken("I18N_OPTIONS");
|
|
26
|
+
/** Key under which the resolved locale is stashed on the per-request RequestContext bag. */
|
|
27
|
+
const I18N_LOCALE_KEY = Symbol.for("vela:i18n:locale");
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/i18n/i18n.middleware.ts
|
|
30
|
+
let I18nLocaleMiddleware = class I18nLocaleMiddleware {
|
|
31
|
+
resolved;
|
|
32
|
+
constructor(options) {
|
|
33
|
+
this.resolved = resolveI18nOptions(options);
|
|
34
|
+
}
|
|
35
|
+
async use(c, next) {
|
|
36
|
+
const container = c.get("container");
|
|
37
|
+
if (container) container.resolve(REQUEST_CONTEXT).set(I18N_LOCALE_KEY, detectLocale(c, this.resolved));
|
|
38
|
+
return next();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
I18nLocaleMiddleware = __decorate([
|
|
42
|
+
Injectable(),
|
|
43
|
+
__decorateParam(0, Inject(I18N_OPTIONS)),
|
|
44
|
+
__decorateMetadata("design:paramtypes", [Object])
|
|
45
|
+
], I18nLocaleMiddleware);
|
|
46
|
+
function detectLocale(c, resolved) {
|
|
47
|
+
if (!resolved.detection.enabled) return resolved.defaultLocale;
|
|
48
|
+
const { strategy, lookupKey } = resolved.detection;
|
|
49
|
+
const candidates = strategy === "query" ? [new URL(c.req.url).searchParams.get(lookupKey) ?? ""] : strategy === "cookie" ? [readCookie(c.req.raw.headers.get("cookie"), lookupKey) ?? ""] : parseAcceptLanguage(c.req.raw.headers.get("accept-language"));
|
|
50
|
+
for (const candidate of candidates) {
|
|
51
|
+
const match = matchLocale(candidate, resolved.locales);
|
|
52
|
+
if (match) return match;
|
|
53
|
+
}
|
|
54
|
+
return resolved.defaultLocale;
|
|
55
|
+
}
|
|
56
|
+
/** Case-insensitive locale match with region fallback (en-US -> en); returns the configured casing. */
|
|
57
|
+
function matchLocale(candidate, locales) {
|
|
58
|
+
if (!candidate) return void 0;
|
|
59
|
+
const lc = candidate.toLowerCase();
|
|
60
|
+
const exact = locales.find((l) => l.toLowerCase() === lc);
|
|
61
|
+
if (exact) return exact;
|
|
62
|
+
const base = lc.split("-")[0];
|
|
63
|
+
return locales.find((l) => l.toLowerCase().split("-")[0] === base);
|
|
64
|
+
}
|
|
65
|
+
/** Parse Accept-Language into tags ordered by descending q-value (RFC 7231). */
|
|
66
|
+
function parseAcceptLanguage(header) {
|
|
67
|
+
if (!header) return [];
|
|
68
|
+
return header.split(",").map((part) => {
|
|
69
|
+
const [tag, ...params] = part.trim().split(";");
|
|
70
|
+
let q = 1;
|
|
71
|
+
for (const p of params) {
|
|
72
|
+
const m = p.trim().match(/^q=([\d.]+)$/);
|
|
73
|
+
if (m) q = Number.parseFloat(m[1]);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
tag: (tag ?? "").trim(),
|
|
77
|
+
q: Number.isNaN(q) ? 0 : q
|
|
78
|
+
};
|
|
79
|
+
}).filter((e) => e.tag && e.tag !== "*").sort((a, b) => b.q - a.q).map((e) => e.tag);
|
|
80
|
+
}
|
|
81
|
+
function readCookie(header, name) {
|
|
82
|
+
if (!header) return void 0;
|
|
83
|
+
for (const part of header.split(";")) {
|
|
84
|
+
const [rawKey, ...rest] = part.split("=");
|
|
85
|
+
if (rawKey?.trim() === name) {
|
|
86
|
+
const raw = rest.join("=").trim();
|
|
87
|
+
try {
|
|
88
|
+
return decodeURIComponent(raw);
|
|
89
|
+
} catch {
|
|
90
|
+
return raw;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/i18n/deep-merge.ts
|
|
97
|
+
/** Deep-merge two message trees; source overrides target at the leaf level. */
|
|
98
|
+
function deepMerge(target, source) {
|
|
99
|
+
const result = { ...target };
|
|
100
|
+
for (const key of Object.keys(source)) {
|
|
101
|
+
const targetValue = target[key];
|
|
102
|
+
const sourceValue = source[key];
|
|
103
|
+
if (typeof targetValue === "object" && targetValue !== null && !Array.isArray(targetValue) && typeof sourceValue === "object" && sourceValue !== null && !Array.isArray(sourceValue)) result[key] = deepMerge(targetValue, sourceValue);
|
|
104
|
+
else result[key] = sourceValue;
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/i18n/message-registry.ts
|
|
110
|
+
const CONTRIBUTIONS_KEY = Symbol.for("vela:i18n:message-registry:contributions");
|
|
111
|
+
function getContributions() {
|
|
112
|
+
const g = globalThis;
|
|
113
|
+
return g[CONTRIBUTIONS_KEY] ??= /* @__PURE__ */ new Map();
|
|
114
|
+
}
|
|
115
|
+
function contentKey(value) {
|
|
116
|
+
if (Array.isArray(value)) return `[${value.map(contentKey).join(",")}]`;
|
|
117
|
+
if (typeof value === "object" && value !== null) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${contentKey(value[key])}`).join(",")}}`;
|
|
118
|
+
return JSON.stringify(value) ?? "undefined";
|
|
119
|
+
}
|
|
120
|
+
let MessageRegistry = class MessageRegistry {
|
|
121
|
+
/** Called by `I18nModule.registerMessages()`. */
|
|
122
|
+
static addMessages(messages) {
|
|
123
|
+
if (messages && typeof messages === "object" && Object.keys(messages).length > 0) getContributions().set(contentKey(messages), messages);
|
|
124
|
+
}
|
|
125
|
+
/** All contributions deep-merged, per locale, in registration order. */
|
|
126
|
+
getMergedMessages() {
|
|
127
|
+
const merged = {};
|
|
128
|
+
for (const contribution of getContributions().values()) for (const locale of Object.keys(contribution)) merged[locale] = deepMerge(merged[locale] ?? {}, contribution[locale]);
|
|
129
|
+
return merged;
|
|
130
|
+
}
|
|
131
|
+
/** @internal — testing */
|
|
132
|
+
static reset() {
|
|
133
|
+
globalThis[CONTRIBUTIONS_KEY] = /* @__PURE__ */ new Map();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
MessageRegistry = __decorate([Injectable()], MessageRegistry);
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/i18n/message-loader.service.ts
|
|
139
|
+
let MessageLoaderService = class MessageLoaderService {
|
|
140
|
+
cache = /* @__PURE__ */ new Map();
|
|
141
|
+
compiledCache = /* @__PURE__ */ new Map();
|
|
142
|
+
defaultLocale;
|
|
143
|
+
fallbackLocale;
|
|
144
|
+
constructor(registry, options) {
|
|
145
|
+
this.defaultLocale = options?.defaultLocale ?? "en";
|
|
146
|
+
this.fallbackLocale = options?.fallbackLocale ?? this.defaultLocale;
|
|
147
|
+
const merged = registry.getMergedMessages();
|
|
148
|
+
for (const locale of Object.keys(merged)) this.cache.set(locale, merged[locale]);
|
|
149
|
+
}
|
|
150
|
+
translate(locale, key, params) {
|
|
151
|
+
const primary = this.getCompiledMessages(locale)[key];
|
|
152
|
+
if (primary) return primary(params);
|
|
153
|
+
if (this.fallbackLocale !== locale) {
|
|
154
|
+
const fallback = this.getCompiledMessages(this.fallbackLocale)[key];
|
|
155
|
+
if (fallback) return fallback(params);
|
|
156
|
+
}
|
|
157
|
+
return key;
|
|
158
|
+
}
|
|
159
|
+
getAvailableLocales() {
|
|
160
|
+
return [...this.cache.keys()];
|
|
161
|
+
}
|
|
162
|
+
isLocaleSupported(locale) {
|
|
163
|
+
return this.cache.has(locale);
|
|
164
|
+
}
|
|
165
|
+
getDefaultLocale() {
|
|
166
|
+
return this.defaultLocale;
|
|
167
|
+
}
|
|
168
|
+
getCompiledMessages(locale) {
|
|
169
|
+
const effectiveLocale = this.cache.has(locale) ? locale : this.defaultLocale;
|
|
170
|
+
const cached = this.compiledCache.get(effectiveLocale);
|
|
171
|
+
if (cached) return cached;
|
|
172
|
+
const flattened = this.flattenMessages(this.cache.get(effectiveLocale) ?? {});
|
|
173
|
+
const compiled = {};
|
|
174
|
+
for (const [key, value] of Object.entries(flattened)) {
|
|
175
|
+
const msg = new IntlMessageFormat(value, effectiveLocale);
|
|
176
|
+
compiled[key] = (params) => String(msg.format(params));
|
|
177
|
+
}
|
|
178
|
+
this.compiledCache.set(effectiveLocale, compiled);
|
|
179
|
+
return compiled;
|
|
180
|
+
}
|
|
181
|
+
flattenMessages(messages, prefix = "") {
|
|
182
|
+
const result = {};
|
|
183
|
+
for (const key of Object.keys(messages)) {
|
|
184
|
+
const value = messages[key];
|
|
185
|
+
const newKey = prefix ? `${prefix}.${key}` : key;
|
|
186
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) Object.assign(result, this.flattenMessages(value, newKey));
|
|
187
|
+
else result[newKey] = String(value);
|
|
188
|
+
}
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
MessageLoaderService = __decorate([
|
|
193
|
+
Injectable(),
|
|
194
|
+
__decorateParam(0, Inject(MessageRegistry)),
|
|
195
|
+
__decorateParam(1, Inject(I18N_OPTIONS)),
|
|
196
|
+
__decorateMetadata("design:paramtypes", [typeof MessageRegistry === "undefined" ? Object : MessageRegistry, Object])
|
|
197
|
+
], MessageLoaderService);
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/i18n/i18n.service.ts
|
|
200
|
+
let I18nService = class I18nService {
|
|
201
|
+
loader;
|
|
202
|
+
ctx;
|
|
203
|
+
options;
|
|
204
|
+
constructor(loader, ctx, options) {
|
|
205
|
+
this.loader = loader;
|
|
206
|
+
this.ctx = ctx;
|
|
207
|
+
this.options = options;
|
|
208
|
+
}
|
|
209
|
+
t(key, params) {
|
|
210
|
+
return this.loader.translate(this.getLocale(), key, params);
|
|
211
|
+
}
|
|
212
|
+
getLocale() {
|
|
213
|
+
return this.ctx.get(I18N_LOCALE_KEY) ?? this.options.defaultLocale ?? "en";
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
I18nService = __decorate([
|
|
217
|
+
Injectable({ scope: Scope.REQUEST }),
|
|
218
|
+
__decorateParam(0, Inject(MessageLoaderService)),
|
|
219
|
+
__decorateParam(1, Inject(REQUEST_CONTEXT)),
|
|
220
|
+
__decorateParam(2, Inject(I18N_OPTIONS)),
|
|
221
|
+
__decorateMetadata("design:paramtypes", [
|
|
222
|
+
typeof MessageLoaderService === "undefined" ? Object : MessageLoaderService,
|
|
223
|
+
Object,
|
|
224
|
+
Object
|
|
225
|
+
])
|
|
226
|
+
], I18nService);
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/i18n/i18n.module.ts
|
|
229
|
+
const { ConfigurableModuleClass } = new ConfigurableModuleBuilder({
|
|
230
|
+
moduleName: "I18n",
|
|
231
|
+
optionsInjectionToken: I18N_OPTIONS
|
|
232
|
+
}).build();
|
|
233
|
+
let I18nMessagesModule = class I18nMessagesModule {};
|
|
234
|
+
I18nMessagesModule = __decorate([Module({})], I18nMessagesModule);
|
|
235
|
+
let I18nModule = class I18nModule extends ConfigurableModuleClass {
|
|
236
|
+
/**
|
|
237
|
+
* forFeature-style: contribute a message tree (`{ [locale]: { ...messages } }`).
|
|
238
|
+
* Contributions are collected statically at module-load and deep-merged.
|
|
239
|
+
*/
|
|
240
|
+
static registerMessages(messages) {
|
|
241
|
+
MessageRegistry.addMessages(messages);
|
|
242
|
+
return {
|
|
243
|
+
module: I18nMessagesModule,
|
|
244
|
+
key: `messages:${stableHash(messages)}`,
|
|
245
|
+
providers: []
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
I18nModule = __decorate([Module({
|
|
250
|
+
lazy: true,
|
|
251
|
+
providers: [
|
|
252
|
+
MessageRegistry,
|
|
253
|
+
MessageLoaderService,
|
|
254
|
+
I18nService,
|
|
255
|
+
I18nLocaleMiddleware,
|
|
256
|
+
{
|
|
257
|
+
provide: APP_MIDDLEWARE,
|
|
258
|
+
useExisting: I18nLocaleMiddleware
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
exports: [
|
|
262
|
+
I18nService,
|
|
263
|
+
MessageLoaderService,
|
|
264
|
+
I18N_OPTIONS
|
|
265
|
+
]
|
|
266
|
+
})], I18nModule);
|
|
267
|
+
//#endregion
|
|
268
|
+
export { I18N_LOCALE_KEY, I18N_OPTIONS, I18nLocaleMiddleware, I18nModule, I18nService, MessageLoaderService, MessageRegistry, deepMerge, resolveI18nOptions };
|
|
269
|
+
|
|
270
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/i18n/i18n.options.ts","../../src/i18n/i18n.tokens.ts","../../src/i18n/i18n.middleware.ts","../../src/i18n/deep-merge.ts","../../src/i18n/message-registry.ts","../../src/i18n/message-loader.service.ts","../../src/i18n/i18n.service.ts","../../src/i18n/i18n.module.ts"],"sourcesContent":["/** How the request locale is detected. */\nexport type DetectionStrategy = 'header' | 'query' | 'cookie';\n\nexport interface I18nModuleOptions {\n /** Default locale. @default 'en' */\n defaultLocale?: string;\n /** Fallback when a translation is missing. @default defaultLocale */\n fallbackLocale?: string;\n /** Supported locales; request locales outside this list fall back to default. @default ['en'] */\n locales?: string[];\n /** Locale detection config. */\n detection?: {\n /** Set false to disable detection (always use defaultLocale). @default true */\n enabled?: boolean;\n /** @default 'header' (Accept-Language) */\n strategy?: DetectionStrategy;\n /** Cookie/query parameter name. @default 'locale' */\n lookupKey?: string;\n };\n}\n\nexport interface ResolvedI18nOptions {\n defaultLocale: string;\n fallbackLocale: string;\n locales: string[];\n detection: { enabled: boolean; strategy: DetectionStrategy; lookupKey: string };\n}\n\nexport function resolveI18nOptions(options?: I18nModuleOptions): ResolvedI18nOptions {\n const detection = options?.detection;\n const defaultLocale = options?.defaultLocale ?? 'en';\n return {\n defaultLocale,\n fallbackLocale: options?.fallbackLocale ?? defaultLocale,\n locales: options?.locales ?? ['en'],\n detection: {\n enabled: detection?.enabled !== false,\n strategy: detection?.strategy ?? 'header',\n lookupKey: detection?.lookupKey ?? 'locale',\n },\n };\n}\n","import { InjectionToken } from '../container/types';\nimport type { I18nModuleOptions } from './i18n.options';\n\n/** Options bag from `I18nModule.forRoot()` (the ConfigurableModuleBuilder options token). */\nexport const I18N_OPTIONS = new InjectionToken<I18nModuleOptions>('I18N_OPTIONS');\n\n/** Key under which the resolved locale is stashed on the per-request RequestContext bag. */\nexport const I18N_LOCALE_KEY = Symbol.for('vela:i18n:locale');\n","import type { Context, Next } from 'hono';\nimport type { Container } from '../container/container';\nimport { Inject, Injectable } from '../container/decorators';\nimport { REQUEST_CONTEXT, type RequestContext } from '../http/request-context';\nimport type { NestMiddleware } from '../pipeline/types';\nimport {\n resolveI18nOptions,\n type I18nModuleOptions,\n type ResolvedI18nOptions,\n} from './i18n.options';\nimport { I18N_LOCALE_KEY, I18N_OPTIONS } from './i18n.tokens';\n\n/**\n * Detects the request locale and stashes it on the per-request RequestContext\n * bag under {@link I18N_LOCALE_KEY}, where {@link I18nService} reads it.\n * Registered globally via APP_MIDDLEWARE by {@link I18nModule}. Holds no\n * per-request state (reads the RequestContext off the request container each\n * call), so a singleton instance is safe.\n */\n@Injectable()\nexport class I18nLocaleMiddleware implements NestMiddleware {\n private readonly resolved: ResolvedI18nOptions;\n\n constructor(@Inject(I18N_OPTIONS) options: I18nModuleOptions) {\n this.resolved = resolveI18nOptions(options);\n }\n\n async use(c: Context, next: Next): Promise<Response | void> {\n const container = c.get('container') as Container | undefined;\n if (container) {\n const ctx = container.resolve<RequestContext>(REQUEST_CONTEXT);\n ctx.set(I18N_LOCALE_KEY, detectLocale(c, this.resolved));\n }\n return next();\n }\n}\n\nfunction detectLocale(c: Context, resolved: ResolvedI18nOptions): string {\n if (!resolved.detection.enabled) return resolved.defaultLocale;\n\n const { strategy, lookupKey } = resolved.detection;\n // Candidate tags in preference order.\n const candidates: string[] =\n strategy === 'query'\n ? [new URL(c.req.url).searchParams.get(lookupKey) ?? '']\n : strategy === 'cookie'\n ? [readCookie(c.req.raw.headers.get('cookie'), lookupKey) ?? '']\n : parseAcceptLanguage(c.req.raw.headers.get('accept-language'));\n\n for (const candidate of candidates) {\n const match = matchLocale(candidate, resolved.locales);\n if (match) return match;\n }\n return resolved.defaultLocale;\n}\n\n/** Case-insensitive locale match with region fallback (en-US -> en); returns the configured casing. */\nfunction matchLocale(candidate: string, locales: string[]): string | undefined {\n if (!candidate) return undefined;\n const lc = candidate.toLowerCase();\n const exact = locales.find((l) => l.toLowerCase() === lc);\n if (exact) return exact;\n const base = lc.split('-')[0];\n return locales.find((l) => l.toLowerCase().split('-')[0] === base);\n}\n\n/** Parse Accept-Language into tags ordered by descending q-value (RFC 7231). */\nfunction parseAcceptLanguage(header: string | null): string[] {\n if (!header) return [];\n return header\n .split(',')\n .map((part) => {\n const [tag, ...params] = part.trim().split(';');\n let q = 1;\n for (const p of params) {\n const m = p.trim().match(/^q=([\\d.]+)$/);\n if (m) q = Number.parseFloat(m[1]!);\n }\n return { tag: (tag ?? '').trim(), q: Number.isNaN(q) ? 0 : q };\n })\n .filter((e) => e.tag && e.tag !== '*')\n .sort((a, b) => b.q - a.q)\n .map((e) => e.tag);\n}\n\nfunction readCookie(header: string | null, name: string): string | undefined {\n if (!header) return undefined;\n for (const part of header.split(';')) {\n const [rawKey, ...rest] = part.split('=');\n if (rawKey?.trim() === name) {\n const raw = rest.join('=').trim();\n try {\n return decodeURIComponent(raw);\n } catch {\n // Malformed percent-encoding must not crash locale detection.\n return raw;\n }\n }\n }\n return undefined;\n}\n","/** Deep-merge two message trees; source overrides target at the leaf level. */\nexport function deepMerge(\n target: Record<string, unknown>,\n source: Record<string, unknown>,\n): Record<string, unknown> {\n const result: Record<string, unknown> = { ...target };\n\n for (const key of Object.keys(source)) {\n const targetValue = target[key];\n const sourceValue = source[key];\n\n if (\n typeof targetValue === 'object' &&\n targetValue !== null &&\n !Array.isArray(targetValue) &&\n typeof sourceValue === 'object' &&\n sourceValue !== null &&\n !Array.isArray(sourceValue)\n ) {\n result[key] = deepMerge(\n targetValue as Record<string, unknown>,\n sourceValue as Record<string, unknown>,\n );\n } else {\n result[key] = sourceValue;\n }\n }\n\n return result;\n}\n","import { Injectable } from '../container/decorators';\nimport { deepMerge } from './deep-merge';\n\n// Shared contributions store anchored on globalThis so bundler-inlined copies\n// (portal/symlink) and Vite HMR re-eval share ONE store. Content-keyed so\n// re-registering identical messages (HMR) dedups instead of accumulating.\nconst CONTRIBUTIONS_KEY = Symbol.for('vela:i18n:message-registry:contributions');\n\ntype Contribution = Record<string, Record<string, unknown>>;\ntype Contributions = Map<string, Contribution>;\n\nfunction getContributions(): Contributions {\n const g = globalThis as unknown as Record<symbol, Contributions | undefined>;\n return (g[CONTRIBUTIONS_KEY] ??= new Map());\n}\n\nfunction contentKey(value: unknown): string {\n if (Array.isArray(value)) return `[${value.map(contentKey).join(',')}]`;\n if (typeof value === 'object' && value !== null) {\n const entries = Object.keys(value)\n .sort()\n .map(\n (key) => `${JSON.stringify(key)}:${contentKey((value as Record<string, unknown>)[key])}`,\n );\n return `{${entries.join(',')}}`;\n }\n return JSON.stringify(value) ?? 'undefined';\n}\n\n/**\n * Accumulates i18n messages from multiple `I18nModule.registerMessages()` calls\n * (statically, at module import time), deep-merged on read by\n * {@link MessageLoaderService}. Later registrations override earlier ones at the\n * leaf level.\n */\n@Injectable()\nexport class MessageRegistry {\n /** Called by `I18nModule.registerMessages()`. */\n static addMessages(messages: Contribution): void {\n if (messages && typeof messages === 'object' && Object.keys(messages).length > 0) {\n // set() dedups by content-key AND preserves insertion order for an existing\n // key. (A prior delete+set moved re-registered content to the end, flipping\n // deep-merge precedence under HMR re-eval.)\n getContributions().set(contentKey(messages), messages);\n }\n }\n\n /** All contributions deep-merged, per locale, in registration order. */\n getMergedMessages(): Record<string, Record<string, unknown>> {\n const merged: Record<string, Record<string, unknown>> = {};\n for (const contribution of getContributions().values()) {\n for (const locale of Object.keys(contribution)) {\n merged[locale] = deepMerge(merged[locale] ?? {}, contribution[locale]!);\n }\n }\n return merged;\n }\n\n /** @internal — testing */\n static reset(): void {\n (globalThis as unknown as Record<symbol, Contributions>)[CONTRIBUTIONS_KEY] = new Map();\n }\n}\n","import IntlMessageFormat from 'intl-messageformat';\nimport { Inject, Injectable } from '../container/decorators';\nimport type { I18nModuleOptions } from './i18n.options';\nimport { I18N_OPTIONS } from './i18n.tokens';\nimport { MessageRegistry } from './message-registry';\n\ntype CompiledMessages = Record<string, (params?: Record<string, unknown>) => string>;\n\n/**\n * Compiles and caches ICU messages (via `intl-messageformat`). Singleton: reads\n * the merged registry once at construction (all `registerMessages` calls run at\n * module-load, before providers are instantiated), flattens each locale to\n * dot-paths, and compiles lazily per locale.\n */\n@Injectable()\nexport class MessageLoaderService {\n private readonly cache = new Map<string, Record<string, unknown>>();\n private readonly compiledCache = new Map<string, CompiledMessages>();\n private readonly defaultLocale: string;\n private readonly fallbackLocale: string;\n\n constructor(\n @Inject(MessageRegistry) registry: MessageRegistry,\n @Inject(I18N_OPTIONS) options: I18nModuleOptions,\n ) {\n this.defaultLocale = options?.defaultLocale ?? 'en';\n this.fallbackLocale = options?.fallbackLocale ?? this.defaultLocale;\n const merged = registry.getMergedMessages();\n for (const locale of Object.keys(merged)) {\n this.cache.set(locale, merged[locale]!);\n }\n }\n\n translate(locale: string, key: string, params?: Record<string, unknown>): string {\n const primary = this.getCompiledMessages(locale)[key];\n if (primary) return primary(params);\n // Per-key fallback: a supported locale missing an individual key falls back\n // to fallbackLocale before giving up (returning the raw key).\n if (this.fallbackLocale !== locale) {\n const fallback = this.getCompiledMessages(this.fallbackLocale)[key];\n if (fallback) return fallback(params);\n }\n return key; // missing everywhere → return the key (dev-friendly)\n }\n\n getAvailableLocales(): string[] {\n return [...this.cache.keys()];\n }\n\n isLocaleSupported(locale: string): boolean {\n return this.cache.has(locale);\n }\n\n getDefaultLocale(): string {\n return this.defaultLocale;\n }\n\n private getCompiledMessages(locale: string): CompiledMessages {\n const effectiveLocale = this.cache.has(locale) ? locale : this.defaultLocale;\n const cached = this.compiledCache.get(effectiveLocale);\n if (cached) return cached;\n\n const flattened = this.flattenMessages(this.cache.get(effectiveLocale) ?? {});\n const compiled: CompiledMessages = {};\n for (const [key, value] of Object.entries(flattened)) {\n const msg = new IntlMessageFormat(value, effectiveLocale);\n compiled[key] = (params) =>\n String(msg.format(params as Record<string, string | number | boolean>));\n }\n this.compiledCache.set(effectiveLocale, compiled);\n return compiled;\n }\n\n private flattenMessages(messages: Record<string, unknown>, prefix = ''): Record<string, string> {\n const result: Record<string, string> = {};\n for (const key of Object.keys(messages)) {\n const value = messages[key];\n const newKey = prefix ? `${prefix}.${key}` : key;\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n Object.assign(result, this.flattenMessages(value as Record<string, unknown>, newKey));\n } else {\n result[newKey] = String(value);\n }\n }\n return result;\n }\n}\n","import { Scope } from '../constants';\nimport { Inject, Injectable } from '../container/decorators';\nimport { REQUEST_CONTEXT, type RequestContext } from '../http/request-context';\nimport type { I18nModuleOptions } from './i18n.options';\nimport { I18N_LOCALE_KEY, I18N_OPTIONS } from './i18n.tokens';\nimport type { II18nService } from './i18n.types';\nimport { MessageLoaderService } from './message-loader.service';\n\n/**\n * Request-scoped translation facade. Reads the locale resolved by\n * {@link I18nLocaleMiddleware} from the per-request RequestContext.\n *\n * Injecting it into a controller/service is safe: vela's request-scope bubbling\n * promotes the consumer to request scope automatically, so no captive-dependency\n * hazard and no `ambientContainer` flag required.\n */\n@Injectable({ scope: Scope.REQUEST })\nexport class I18nService implements II18nService {\n constructor(\n @Inject(MessageLoaderService) private readonly loader: MessageLoaderService,\n @Inject(REQUEST_CONTEXT) private readonly ctx: RequestContext,\n @Inject(I18N_OPTIONS) private readonly options: I18nModuleOptions,\n ) {}\n\n t(key: string, params?: Record<string, unknown>): string {\n return this.loader.translate(this.getLocale(), key, params);\n }\n\n getLocale(): string {\n return this.ctx.get<string>(I18N_LOCALE_KEY) ?? this.options.defaultLocale ?? 'en';\n }\n}\n","import type { DynamicModule } from '../module/types';\nimport { Module } from '../module/decorators';\nimport { ConfigurableModuleBuilder } from '../module/configurable-module.builder';\nimport { stableHash } from '../module/stable-hash';\nimport { APP_MIDDLEWARE } from '../pipeline/tokens';\nimport { I18nLocaleMiddleware } from './i18n.middleware';\nimport type { I18nModuleOptions } from './i18n.options';\nimport { I18nService } from './i18n.service';\nimport { I18N_OPTIONS } from './i18n.tokens';\nimport { MessageLoaderService } from './message-loader.service';\nimport { MessageRegistry } from './message-registry';\n\nconst { ConfigurableModuleClass } = new ConfigurableModuleBuilder<I18nModuleOptions>({\n moduleName: 'I18n',\n optionsInjectionToken: I18N_OPTIONS,\n}).build();\n\n// Empty marker module for `registerMessages`. The contribution is a side-effect\n// on the global MessageRegistry; this carries NO providers so it never\n// duplicates I18nModule's providers (which would trip vela's multi-instance\n// encapsulation → MultipleProvidersFoundError). New modules whose contribution\n// is providers (not an external registry) should use `sideEffectModule` from\n// the authoring kit; this predates it and keeps a shared-class identity so\n// identical message trees dedup as one module instance.\n@Module({})\nclass I18nMessagesModule {}\n\n@Module({\n // Lazy: the merged-message snapshot (MessageLoaderService constructor) and\n // locale middleware materialize on the first request that reaches them —\n // message registration itself is import-time and unaffected. Safe because\n // the route-build priority probe skips lazy-pending APP_MIDDLEWARE tokens.\n lazy: true,\n providers: [\n MessageRegistry,\n MessageLoaderService,\n I18nService,\n I18nLocaleMiddleware,\n // Register the locale middleware globally (NestJS APP_MIDDLEWARE convention).\n { provide: APP_MIDDLEWARE, useExisting: I18nLocaleMiddleware },\n ],\n exports: [I18nService, MessageLoaderService, I18N_OPTIONS],\n})\nexport class I18nModule extends ConfigurableModuleClass {\n /**\n * forFeature-style: contribute a message tree (`{ [locale]: { ...messages } }`).\n * Contributions are collected statically at module-load and deep-merged.\n */\n static registerMessages(messages: Record<string, Record<string, unknown>>): DynamicModule {\n MessageRegistry.addMessages(messages);\n return { module: I18nMessagesModule, key: `messages:${stableHash(messages)}`, providers: [] };\n }\n}\n"],"mappings":";;;;;;;AA4BA,SAAgB,mBAAmB,SAAkD;CACnF,MAAM,YAAY,SAAS;CAC3B,MAAM,gBAAgB,SAAS,iBAAiB;CAChD,OAAO;EACL;EACA,gBAAgB,SAAS,kBAAkB;EAC3C,SAAS,SAAS,WAAW,CAAC,IAAI;EAClC,WAAW;GACT,SAAS,WAAW,YAAY;GAChC,UAAU,WAAW,YAAY;GACjC,WAAW,WAAW,aAAa;EACrC;CACF;AACF;;;;ACrCA,MAAa,eAAe,IAAI,eAAkC,cAAc;;AAGhF,MAAa,kBAAkB,OAAO,IAAI,kBAAkB;;;ACarD,IAAA,uBAAA,MAAM,qBAA+C;CAC1D;CAEA,YAAY,SAAkD;EAC5D,KAAK,WAAW,mBAAmB,OAAO;CAC5C;CA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