actor-ts 0.9.1 → 0.10.0
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 +382 -0
- package/README.md +285 -269
- package/dist/ActorSystem.d.ts +3 -38
- package/dist/ActorSystem.d.ts.map +1 -1
- package/dist/ActorSystem.js +2 -2
- package/dist/ActorSystem.js.map +1 -1
- package/dist/ActorSystemOptions.d.ts +91 -0
- package/dist/ActorSystemOptions.d.ts.map +1 -0
- package/dist/ActorSystemOptions.js +45 -0
- package/dist/ActorSystemOptions.js.map +1 -0
- package/dist/Logger.d.ts +63 -0
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +146 -0
- package/dist/Logger.js.map +1 -1
- package/dist/cache/MemcachedCache.d.ts +2 -12
- package/dist/cache/MemcachedCache.d.ts.map +1 -1
- package/dist/cache/MemcachedCache.js +2 -1
- package/dist/cache/MemcachedCache.js.map +1 -1
- package/dist/cache/MemcachedCacheOptions.d.ts +40 -0
- package/dist/cache/MemcachedCacheOptions.d.ts.map +1 -0
- package/dist/cache/MemcachedCacheOptions.js +32 -0
- package/dist/cache/MemcachedCacheOptions.js.map +1 -0
- package/dist/cache/RedisCache.d.ts +2 -22
- package/dist/cache/RedisCache.d.ts.map +1 -1
- package/dist/cache/RedisCache.js +2 -1
- package/dist/cache/RedisCache.js.map +1 -1
- package/dist/cache/RedisCacheOptions.d.ts +56 -0
- package/dist/cache/RedisCacheOptions.d.ts.map +1 -0
- package/dist/cache/RedisCacheOptions.js +43 -0
- package/dist/cache/RedisCacheOptions.js.map +1 -0
- package/dist/cache/index.d.ts +6 -2
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +2 -0
- package/dist/cache/index.js.map +1 -1
- package/dist/cluster/Cluster.d.ts +4 -63
- package/dist/cluster/Cluster.d.ts.map +1 -1
- package/dist/cluster/Cluster.js +10 -5
- package/dist/cluster/Cluster.js.map +1 -1
- package/dist/cluster/ClusterBootstrap.d.ts +6 -84
- package/dist/cluster/ClusterBootstrap.d.ts.map +1 -1
- package/dist/cluster/ClusterBootstrap.js +33 -21
- package/dist/cluster/ClusterBootstrap.js.map +1 -1
- package/dist/cluster/ClusterBootstrapOptions.d.ts +152 -0
- package/dist/cluster/ClusterBootstrapOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterBootstrapOptions.js +103 -0
- package/dist/cluster/ClusterBootstrapOptions.js.map +1 -0
- package/dist/cluster/ClusterClient.d.ts +21 -31
- package/dist/cluster/ClusterClient.d.ts.map +1 -1
- package/dist/cluster/ClusterClient.js +21 -6
- package/dist/cluster/ClusterClient.js.map +1 -1
- package/dist/cluster/ClusterClientOptions.d.ts +65 -0
- package/dist/cluster/ClusterClientOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientOptions.js +43 -0
- package/dist/cluster/ClusterClientOptions.js.map +1 -0
- package/dist/cluster/ClusterClientReceptionist.d.ts +2 -8
- package/dist/cluster/ClusterClientReceptionist.d.ts.map +1 -1
- package/dist/cluster/ClusterClientReceptionist.js +3 -1
- package/dist/cluster/ClusterClientReceptionist.js.map +1 -1
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts +32 -0
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js +22 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js.map +1 -0
- package/dist/cluster/ClusterOptions.d.ts +116 -0
- package/dist/cluster/ClusterOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterOptions.js +77 -0
- package/dist/cluster/ClusterOptions.js.map +1 -0
- package/dist/cluster/FailureDetector.d.ts +4 -11
- package/dist/cluster/FailureDetector.d.ts.map +1 -1
- package/dist/cluster/FailureDetector.js +4 -3
- package/dist/cluster/FailureDetector.js.map +1 -1
- package/dist/cluster/FailureDetectorOptions.d.ts +38 -0
- package/dist/cluster/FailureDetectorOptions.d.ts.map +1 -0
- package/dist/cluster/FailureDetectorOptions.js +31 -0
- package/dist/cluster/FailureDetectorOptions.js.map +1 -0
- package/dist/cluster/PhiAccrualFailureDetector.d.ts +3 -19
- package/dist/cluster/PhiAccrualFailureDetector.d.ts.map +1 -1
- package/dist/cluster/PhiAccrualFailureDetector.js +2 -2
- package/dist/cluster/PhiAccrualFailureDetector.js.map +1 -1
- package/dist/cluster/PhiAccrualOptions.d.ts +53 -0
- package/dist/cluster/PhiAccrualOptions.d.ts.map +1 -0
- package/dist/cluster/PhiAccrualOptions.js +43 -0
- package/dist/cluster/PhiAccrualOptions.js.map +1 -0
- package/dist/cluster/downing/KeepOldest.d.ts +2 -11
- package/dist/cluster/downing/KeepOldest.d.ts.map +1 -1
- package/dist/cluster/downing/KeepOldest.js +2 -2
- package/dist/cluster/downing/KeepOldest.js.map +1 -1
- package/dist/cluster/downing/KeepOldestOptions.d.ts +34 -0
- package/dist/cluster/downing/KeepOldestOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepOldestOptions.js +23 -0
- package/dist/cluster/downing/KeepOldestOptions.js.map +1 -0
- package/dist/cluster/downing/KeepReferee.d.ts +2 -10
- package/dist/cluster/downing/KeepReferee.d.ts.map +1 -1
- package/dist/cluster/downing/KeepReferee.js +3 -3
- package/dist/cluster/downing/KeepReferee.js.map +1 -1
- package/dist/cluster/downing/KeepRefereeOptions.d.ts +35 -0
- package/dist/cluster/downing/KeepRefereeOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepRefereeOptions.js +25 -0
- package/dist/cluster/downing/KeepRefereeOptions.js.map +1 -0
- package/dist/cluster/downing/LeaseMajority.d.ts +63 -21
- package/dist/cluster/downing/LeaseMajority.d.ts.map +1 -1
- package/dist/cluster/downing/LeaseMajority.js +132 -9
- package/dist/cluster/downing/LeaseMajority.js.map +1 -1
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts +49 -0
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts.map +1 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js +31 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js.map +1 -0
- package/dist/cluster/downing/StaticQuorum.d.ts +2 -7
- package/dist/cluster/downing/StaticQuorum.d.ts.map +1 -1
- package/dist/cluster/downing/StaticQuorum.js +3 -3
- package/dist/cluster/downing/StaticQuorum.js.map +1 -1
- package/dist/cluster/downing/StaticQuorumOptions.d.ts +30 -0
- package/dist/cluster/downing/StaticQuorumOptions.d.ts.map +1 -0
- package/dist/cluster/downing/StaticQuorumOptions.js +23 -0
- package/dist/cluster/downing/StaticQuorumOptions.js.map +1 -0
- package/dist/cluster/downing/index.d.ts +8 -4
- package/dist/cluster/downing/index.d.ts.map +1 -1
- package/dist/cluster/downing/index.js +4 -0
- package/dist/cluster/downing/index.js.map +1 -1
- package/dist/cluster/index.d.ts +34 -19
- package/dist/cluster/index.d.ts.map +1 -1
- package/dist/cluster/index.js +15 -4
- package/dist/cluster/index.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts +2 -2
- package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubExtension.js +5 -2
- package/dist/cluster/pubsub/DistributedPubSubExtension.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts +3 -7
- package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubMediator.js +3 -3
- package/dist/cluster/pubsub/DistributedPubSubMediator.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts +29 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts.map +1 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js +23 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js.map +1 -0
- package/dist/cluster/pubsub/index.d.ts +2 -1
- package/dist/cluster/pubsub/index.d.ts.map +1 -1
- package/dist/cluster/pubsub/index.js +1 -0
- package/dist/cluster/pubsub/index.js.map +1 -1
- package/dist/cluster/router/ClusterRouter.d.ts +12 -32
- package/dist/cluster/router/ClusterRouter.d.ts.map +1 -1
- package/dist/cluster/router/ClusterRouter.js +4 -2
- package/dist/cluster/router/ClusterRouter.js.map +1 -1
- package/dist/cluster/router/ClusterRouterOptions.d.ts +60 -0
- package/dist/cluster/router/ClusterRouterOptions.d.ts.map +1 -0
- package/dist/cluster/router/ClusterRouterOptions.js +41 -0
- package/dist/cluster/router/ClusterRouterOptions.js.map +1 -0
- package/dist/cluster/router/index.d.ts +3 -1
- package/dist/cluster/router/index.d.ts.map +1 -1
- package/dist/cluster/router/index.js +1 -0
- package/dist/cluster/router/index.js.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts +1 -15
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.js +35 -2
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.js.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts +63 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js +63 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js.map +1 -0
- package/dist/cluster/sharding/ClusterSharding.d.ts +18 -64
- package/dist/cluster/sharding/ClusterSharding.d.ts.map +1 -1
- package/dist/cluster/sharding/ClusterSharding.js +44 -20
- package/dist/cluster/sharding/ClusterSharding.js.map +1 -1
- package/dist/cluster/sharding/CoordinatorState.d.ts +1 -1
- package/dist/cluster/sharding/CoordinatorState.js +1 -1
- package/dist/cluster/sharding/ShardCoordinator.d.ts +3 -63
- package/dist/cluster/sharding/ShardCoordinator.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardCoordinator.js +3 -3
- package/dist/cluster/sharding/ShardCoordinator.js.map +1 -1
- package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts +111 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.js +69 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardRegion.d.ts +2 -33
- package/dist/cluster/sharding/ShardRegion.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardRegion.js.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcess.d.ts +2 -22
- package/dist/cluster/sharding/ShardedDaemonProcess.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcess.js +14 -11
- package/dist/cluster/sharding/ShardedDaemonProcess.js.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts +51 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js +35 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts +84 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.js +62 -0
- package/dist/cluster/sharding/ShardingOptions.js.map +1 -0
- package/dist/cluster/sharding/StartShardingOptions.d.ts +98 -0
- package/dist/cluster/sharding/StartShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/StartShardingOptions.js +52 -0
- package/dist/cluster/sharding/StartShardingOptions.js.map +1 -0
- package/dist/cluster/singleton/ClusterSingleton.d.ts +2 -30
- package/dist/cluster/singleton/ClusterSingleton.d.ts.map +1 -1
- package/dist/cluster/singleton/ClusterSingleton.js +15 -9
- package/dist/cluster/singleton/ClusterSingleton.js.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts +3 -18
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.js +3 -3
- package/dist/cluster/singleton/ClusterSingletonManager.js.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts +49 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts.map +1 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.js +40 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.js.map +1 -0
- package/dist/cluster/singleton/StartSingletonOptions.d.ts +64 -0
- package/dist/cluster/singleton/StartSingletonOptions.d.ts.map +1 -0
- package/dist/cluster/singleton/StartSingletonOptions.js +40 -0
- package/dist/cluster/singleton/StartSingletonOptions.js.map +1 -0
- package/dist/cluster/singleton/index.d.ts +6 -2
- package/dist/cluster/singleton/index.d.ts.map +1 -1
- package/dist/cluster/singleton/index.js +2 -0
- package/dist/cluster/singleton/index.js.map +1 -1
- package/dist/config/ConfigKeys.d.ts +5 -0
- package/dist/config/ConfigKeys.d.ts.map +1 -1
- package/dist/config/ConfigKeys.js +5 -0
- package/dist/config/ConfigKeys.js.map +1 -1
- package/dist/coordination/Lease.d.ts +32 -14
- package/dist/coordination/Lease.d.ts.map +1 -1
- package/dist/coordination/LeaseOptions.d.ts +61 -0
- package/dist/coordination/LeaseOptions.d.ts.map +1 -0
- package/dist/coordination/LeaseOptions.js +50 -0
- package/dist/coordination/LeaseOptions.js.map +1 -0
- package/dist/coordination/index.d.ts +5 -2
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +2 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/leases/InMemoryLease.d.ts +18 -5
- package/dist/coordination/leases/InMemoryLease.d.ts.map +1 -1
- package/dist/coordination/leases/InMemoryLease.js +23 -11
- package/dist/coordination/leases/InMemoryLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLease.d.ts +19 -24
- package/dist/coordination/leases/KubernetesLease.d.ts.map +1 -1
- package/dist/coordination/leases/KubernetesLease.js +28 -9
- package/dist/coordination/leases/KubernetesLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts +58 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts.map +1 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js +42 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js.map +1 -0
- package/dist/crdt/DistributedData.d.ts +2 -22
- package/dist/crdt/DistributedData.d.ts.map +1 -1
- package/dist/crdt/DistributedData.js +3 -2
- package/dist/crdt/DistributedData.js.map +1 -1
- package/dist/crdt/DistributedDataOptions.d.ts +50 -0
- package/dist/crdt/DistributedDataOptions.d.ts.map +1 -0
- package/dist/crdt/DistributedDataOptions.js +28 -0
- package/dist/crdt/DistributedDataOptions.js.map +1 -0
- package/dist/crdt/index.d.ts +3 -1
- package/dist/crdt/index.d.ts.map +1 -1
- package/dist/crdt/index.js +1 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/delivery/ProducerController.d.ts +4 -19
- package/dist/delivery/ProducerController.d.ts.map +1 -1
- package/dist/delivery/ProducerController.js +4 -3
- package/dist/delivery/ProducerController.js.map +1 -1
- package/dist/delivery/ProducerControllerOptions.d.ts +50 -0
- package/dist/delivery/ProducerControllerOptions.d.ts.map +1 -0
- package/dist/delivery/ProducerControllerOptions.js +36 -0
- package/dist/delivery/ProducerControllerOptions.js.map +1 -0
- package/dist/delivery/ReliableDelivery.d.ts +3 -2
- package/dist/delivery/ReliableDelivery.d.ts.map +1 -1
- package/dist/delivery/ReliableDelivery.js +2 -2
- package/dist/delivery/ReliableDelivery.js.map +1 -1
- package/dist/delivery/index.d.ts +3 -1
- package/dist/delivery/index.d.ts.map +1 -1
- package/dist/delivery/index.js +1 -0
- package/dist/delivery/index.js.map +1 -1
- package/dist/discovery/AutoDiscoveryOptions.d.ts +72 -0
- package/dist/discovery/AutoDiscoveryOptions.d.ts.map +1 -0
- package/dist/discovery/AutoDiscoveryOptions.js +34 -0
- package/dist/discovery/AutoDiscoveryOptions.js.map +1 -0
- package/dist/discovery/ConfigSeedProvider.d.ts +2 -7
- package/dist/discovery/ConfigSeedProvider.d.ts.map +1 -1
- package/dist/discovery/ConfigSeedProvider.js +4 -3
- package/dist/discovery/ConfigSeedProvider.js.map +1 -1
- package/dist/discovery/ConfigSeedProviderOptions.d.ts +34 -0
- package/dist/discovery/ConfigSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/ConfigSeedProviderOptions.js +27 -0
- package/dist/discovery/ConfigSeedProviderOptions.js.map +1 -0
- package/dist/discovery/DnsSeedProvider.d.ts +3 -27
- package/dist/discovery/DnsSeedProvider.d.ts.map +1 -1
- package/dist/discovery/DnsSeedProvider.js +4 -4
- package/dist/discovery/DnsSeedProvider.js.map +1 -1
- package/dist/discovery/DnsSeedProviderOptions.d.ts +67 -0
- package/dist/discovery/DnsSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/DnsSeedProviderOptions.js +48 -0
- package/dist/discovery/DnsSeedProviderOptions.js.map +1 -0
- package/dist/discovery/KubernetesApiSeedProvider.d.ts +2 -13
- package/dist/discovery/KubernetesApiSeedProvider.d.ts.map +1 -1
- package/dist/discovery/KubernetesApiSeedProvider.js +2 -2
- package/dist/discovery/KubernetesApiSeedProvider.js.map +1 -1
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts +46 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.js +39 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.js.map +1 -0
- package/dist/discovery/Receptionist.d.ts +3 -6
- package/dist/discovery/Receptionist.d.ts.map +1 -1
- package/dist/discovery/Receptionist.js +10 -3
- package/dist/discovery/Receptionist.js.map +1 -1
- package/dist/discovery/ReceptionistOptions.d.ts +30 -0
- package/dist/discovery/ReceptionistOptions.d.ts.map +1 -0
- package/dist/discovery/ReceptionistOptions.js +24 -0
- package/dist/discovery/ReceptionistOptions.js.map +1 -0
- package/dist/discovery/autoDiscovery.d.ts +3 -44
- package/dist/discovery/autoDiscovery.d.ts.map +1 -1
- package/dist/discovery/autoDiscovery.js +31 -32
- package/dist/discovery/autoDiscovery.js.map +1 -1
- package/dist/discovery/index.d.ts +10 -5
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +5 -0
- package/dist/discovery/index.js.map +1 -1
- package/dist/http/HttpExtension.d.ts.map +1 -1
- package/dist/http/HttpExtension.js +69 -8
- package/dist/http/HttpExtension.js.map +1 -1
- package/dist/http/Route.d.ts +76 -4
- package/dist/http/Route.d.ts.map +1 -1
- package/dist/http/Route.js +74 -1
- package/dist/http/Route.js.map +1 -1
- package/dist/http/backend/ExpressBackend.d.ts +18 -12
- package/dist/http/backend/ExpressBackend.d.ts.map +1 -1
- package/dist/http/backend/ExpressBackend.js +134 -8
- package/dist/http/backend/ExpressBackend.js.map +1 -1
- package/dist/http/backend/ExpressBackendOptions.d.ts +47 -0
- package/dist/http/backend/ExpressBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/ExpressBackendOptions.js +35 -0
- package/dist/http/backend/ExpressBackendOptions.js.map +1 -0
- package/dist/http/backend/FastifyBackend.d.ts +4 -1
- package/dist/http/backend/FastifyBackend.d.ts.map +1 -1
- package/dist/http/backend/FastifyBackend.js +71 -1
- package/dist/http/backend/FastifyBackend.js.map +1 -1
- package/dist/http/backend/HonoBackend.d.ts +19 -13
- package/dist/http/backend/HonoBackend.d.ts.map +1 -1
- package/dist/http/backend/HonoBackend.js +152 -5
- package/dist/http/backend/HonoBackend.js.map +1 -1
- package/dist/http/backend/HonoBackendOptions.d.ts +47 -0
- package/dist/http/backend/HonoBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/HonoBackendOptions.js +35 -0
- package/dist/http/backend/HonoBackendOptions.js.map +1 -0
- package/dist/http/backend/HttpServerBackend.d.ts +24 -0
- package/dist/http/backend/HttpServerBackend.d.ts.map +1 -1
- package/dist/http/index.d.ts +11 -5
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +8 -1
- package/dist/http/index.js.map +1 -1
- package/dist/http/middleware/BearerToken.d.ts +44 -0
- package/dist/http/middleware/BearerToken.d.ts.map +1 -0
- package/dist/http/middleware/BearerToken.js +72 -0
- package/dist/http/middleware/BearerToken.js.map +1 -0
- package/dist/http/middleware/IpAllowlist.d.ts +45 -0
- package/dist/http/middleware/IpAllowlist.d.ts.map +1 -0
- package/dist/http/middleware/IpAllowlist.js +148 -0
- package/dist/http/middleware/IpAllowlist.js.map +1 -0
- package/dist/http/middleware/index.d.ts +5 -0
- package/dist/http/middleware/index.d.ts.map +1 -0
- package/dist/http/middleware/index.js +3 -0
- package/dist/http/middleware/index.js.map +1 -0
- package/dist/http/types.d.ts +9 -0
- package/dist/http/types.d.ts.map +1 -1
- package/dist/http/types.js.map +1 -1
- package/dist/http/ws/ConnectionWiring.d.ts +59 -0
- package/dist/http/ws/ConnectionWiring.d.ts.map +1 -0
- package/dist/http/ws/ConnectionWiring.js +112 -0
- package/dist/http/ws/ConnectionWiring.js.map +1 -0
- package/dist/http/ws/SocketAdapter.d.ts +72 -0
- package/dist/http/ws/SocketAdapter.d.ts.map +1 -0
- package/dist/http/ws/SocketAdapter.js +97 -0
- package/dist/http/ws/SocketAdapter.js.map +1 -0
- package/dist/http/ws/WebSocketClientActor.d.ts +66 -0
- package/dist/http/ws/WebSocketClientActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketClientActor.js +194 -0
- package/dist/http/ws/WebSocketClientActor.js.map +1 -0
- package/dist/http/ws/WebSocketClientOptions.d.ts +77 -0
- package/dist/http/ws/WebSocketClientOptions.d.ts.map +1 -0
- package/dist/http/ws/WebSocketClientOptions.js +69 -0
- package/dist/http/ws/WebSocketClientOptions.js.map +1 -0
- package/dist/http/ws/WebSocketConnectionActor.d.ts +51 -0
- package/dist/http/ws/WebSocketConnectionActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketConnectionActor.js +170 -0
- package/dist/http/ws/WebSocketConnectionActor.js.map +1 -0
- package/dist/http/ws/WebSocketRoute.d.ts +20 -0
- package/dist/http/ws/WebSocketRoute.d.ts.map +1 -0
- package/dist/http/ws/WebSocketRoute.js +44 -0
- package/dist/http/ws/WebSocketRoute.js.map +1 -0
- package/dist/http/ws/WebSocketRouteOptions.d.ts +54 -0
- package/dist/http/ws/WebSocketRouteOptions.d.ts.map +1 -0
- package/dist/http/ws/WebSocketRouteOptions.js +55 -0
- package/dist/http/ws/WebSocketRouteOptions.js.map +1 -0
- package/dist/http/ws/WebSocketServerActor.d.ts +65 -0
- package/dist/http/ws/WebSocketServerActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketServerActor.js +133 -0
- package/dist/http/ws/WebSocketServerActor.js.map +1 -0
- package/dist/http/ws/WsCodec.d.ts +65 -0
- package/dist/http/ws/WsCodec.d.ts.map +1 -0
- package/dist/http/ws/WsCodec.js +82 -0
- package/dist/http/ws/WsCodec.js.map +1 -0
- package/dist/http/ws/WsConnection.d.ts +59 -0
- package/dist/http/ws/WsConnection.d.ts.map +1 -0
- package/dist/http/ws/WsConnection.js +45 -0
- package/dist/http/ws/WsConnection.js.map +1 -0
- package/dist/http/ws/WsMessages.d.ts +91 -0
- package/dist/http/ws/WsMessages.d.ts.map +1 -0
- package/dist/http/ws/WsMessages.js +90 -0
- package/dist/http/ws/WsMessages.js.map +1 -0
- package/dist/http/ws/WsPolicy.d.ts +32 -0
- package/dist/http/ws/WsPolicy.d.ts.map +1 -0
- package/dist/http/ws/WsPolicy.js +43 -0
- package/dist/http/ws/WsPolicy.js.map +1 -0
- package/dist/http/ws/index.d.ts +22 -0
- package/dist/http/ws/index.d.ts.map +1 -0
- package/dist/http/ws/index.js +15 -0
- package/dist/http/ws/index.js.map +1 -0
- package/dist/http/ws/matchPattern.d.ts +12 -0
- package/dist/http/ws/matchPattern.d.ts.map +1 -0
- package/dist/http/ws/matchPattern.js +29 -0
- package/dist/http/ws/matchPattern.js.map +1 -0
- package/dist/http/ws/rawResponse.d.ts +15 -0
- package/dist/http/ws/rawResponse.d.ts.map +1 -0
- package/dist/http/ws/rawResponse.js +54 -0
- package/dist/http/ws/rawResponse.js.map +1 -0
- package/dist/http/ws/types.d.ts +70 -0
- package/dist/http/ws/types.d.ts.map +1 -0
- package/dist/http/ws/types.js +81 -0
- package/dist/http/ws/types.js.map +1 -0
- package/dist/http/ws/wsCtor.d.ts +34 -0
- package/dist/http/ws/wsCtor.d.ts.map +1 -0
- package/dist/http/ws/wsCtor.js +38 -0
- package/dist/http/ws/wsCtor.js.map +1 -0
- package/dist/index.d.ts +25 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/ActorCell.d.ts +16 -1
- package/dist/internal/ActorCell.d.ts.map +1 -1
- package/dist/internal/ActorCell.js +32 -2
- package/dist/internal/ActorCell.js.map +1 -1
- package/dist/io/broker/AmqpActor.d.ts +19 -16
- package/dist/io/broker/AmqpActor.d.ts.map +1 -1
- package/dist/io/broker/AmqpActor.js +13 -5
- package/dist/io/broker/AmqpActor.js.map +1 -1
- package/dist/io/broker/AmqpOptions.d.ts +41 -0
- package/dist/io/broker/AmqpOptions.d.ts.map +1 -0
- package/dist/io/broker/AmqpOptions.js +34 -0
- package/dist/io/broker/AmqpOptions.js.map +1 -0
- package/dist/io/broker/BrokerActor.d.ts +4 -3
- package/dist/io/broker/BrokerActor.d.ts.map +1 -1
- package/dist/io/broker/BrokerActor.js +4 -2
- package/dist/io/broker/BrokerActor.js.map +1 -1
- package/dist/io/broker/BrokerOptions.d.ts +24 -0
- package/dist/io/broker/BrokerOptions.d.ts.map +1 -0
- package/dist/io/broker/BrokerOptions.js +29 -0
- package/dist/io/broker/BrokerOptions.js.map +1 -0
- package/dist/io/broker/BrokerSettings.d.ts +2 -2
- package/dist/io/broker/BrokerSettings.d.ts.map +1 -1
- package/dist/io/broker/BrokerSettings.js.map +1 -1
- package/dist/io/broker/GrpcClientActor.d.ts +6 -19
- package/dist/io/broker/GrpcClientActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcClientActor.js +1 -1
- package/dist/io/broker/GrpcClientActor.js.map +1 -1
- package/dist/io/broker/GrpcClientOptions.d.ts +48 -0
- package/dist/io/broker/GrpcClientOptions.d.ts.map +1 -0
- package/dist/io/broker/GrpcClientOptions.js +42 -0
- package/dist/io/broker/GrpcClientOptions.js.map +1 -0
- package/dist/io/broker/GrpcServerActor.d.ts +3 -24
- package/dist/io/broker/GrpcServerActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcServerActor.js +3 -3
- package/dist/io/broker/GrpcServerActor.js.map +1 -1
- package/dist/io/broker/GrpcServerOptions.d.ts +58 -0
- package/dist/io/broker/GrpcServerOptions.d.ts.map +1 -0
- package/dist/io/broker/GrpcServerOptions.js +44 -0
- package/dist/io/broker/GrpcServerOptions.js.map +1 -0
- package/dist/io/broker/JetStreamActor.d.ts +13 -35
- package/dist/io/broker/JetStreamActor.d.ts.map +1 -1
- package/dist/io/broker/JetStreamActor.js +2 -2
- package/dist/io/broker/JetStreamActor.js.map +1 -1
- package/dist/io/broker/JetStreamOptions.d.ts +64 -0
- package/dist/io/broker/JetStreamOptions.d.ts.map +1 -0
- package/dist/io/broker/JetStreamOptions.js +54 -0
- package/dist/io/broker/JetStreamOptions.js.map +1 -0
- package/dist/io/broker/KafkaActor.d.ts +13 -54
- package/dist/io/broker/KafkaActor.d.ts.map +1 -1
- package/dist/io/broker/KafkaActor.js +20 -8
- package/dist/io/broker/KafkaActor.js.map +1 -1
- package/dist/io/broker/KafkaOptions.d.ts +82 -0
- package/dist/io/broker/KafkaOptions.d.ts.map +1 -0
- package/dist/io/broker/KafkaOptions.js +50 -0
- package/dist/io/broker/KafkaOptions.js.map +1 -0
- package/dist/io/broker/MqttActor.d.ts +174 -114
- package/dist/io/broker/MqttActor.d.ts.map +1 -1
- package/dist/io/broker/MqttActor.js +328 -103
- package/dist/io/broker/MqttActor.js.map +1 -1
- package/dist/io/broker/MqttCodec.d.ts +70 -0
- package/dist/io/broker/MqttCodec.d.ts.map +1 -0
- package/dist/io/broker/MqttCodec.js +98 -0
- package/dist/io/broker/MqttCodec.js.map +1 -0
- package/dist/io/broker/MqttMessages.d.ts +145 -0
- package/dist/io/broker/MqttMessages.d.ts.map +1 -0
- package/dist/io/broker/MqttMessages.js +102 -0
- package/dist/io/broker/MqttMessages.js.map +1 -0
- package/dist/io/broker/MqttOptions.d.ts +100 -0
- package/dist/io/broker/MqttOptions.d.ts.map +1 -0
- package/dist/io/broker/MqttOptions.js +73 -0
- package/dist/io/broker/MqttOptions.js.map +1 -0
- package/dist/io/broker/NatsActor.d.ts +6 -21
- package/dist/io/broker/NatsActor.d.ts.map +1 -1
- package/dist/io/broker/NatsActor.js +1 -1
- package/dist/io/broker/NatsActor.js.map +1 -1
- package/dist/io/broker/NatsOptions.d.ts +51 -0
- package/dist/io/broker/NatsOptions.d.ts.map +1 -0
- package/dist/io/broker/NatsOptions.js +42 -0
- package/dist/io/broker/NatsOptions.js.map +1 -0
- package/dist/io/broker/RedisStreamsActor.d.ts +6 -24
- package/dist/io/broker/RedisStreamsActor.d.ts.map +1 -1
- package/dist/io/broker/RedisStreamsActor.js +1 -1
- package/dist/io/broker/RedisStreamsActor.js.map +1 -1
- package/dist/io/broker/RedisStreamsOptions.d.ts +51 -0
- package/dist/io/broker/RedisStreamsOptions.d.ts.map +1 -0
- package/dist/io/broker/RedisStreamsOptions.js +38 -0
- package/dist/io/broker/RedisStreamsOptions.js.map +1 -0
- package/dist/io/broker/SseActor.d.ts +6 -15
- package/dist/io/broker/SseActor.d.ts.map +1 -1
- package/dist/io/broker/SseActor.js +1 -1
- package/dist/io/broker/SseActor.js.map +1 -1
- package/dist/io/broker/SseOptions.d.ts +38 -0
- package/dist/io/broker/SseOptions.d.ts.map +1 -0
- package/dist/io/broker/SseOptions.js +30 -0
- package/dist/io/broker/SseOptions.js.map +1 -0
- package/dist/io/broker/TcpSocketActor.d.ts +6 -21
- package/dist/io/broker/TcpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/TcpSocketActor.js +1 -1
- package/dist/io/broker/TcpSocketActor.js.map +1 -1
- package/dist/io/broker/TcpSocketOptions.d.ts +46 -0
- package/dist/io/broker/TcpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/TcpSocketOptions.js +34 -0
- package/dist/io/broker/TcpSocketOptions.js.map +1 -0
- package/dist/io/broker/UdpSocketActor.d.ts +6 -17
- package/dist/io/broker/UdpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/UdpSocketActor.js +1 -1
- package/dist/io/broker/UdpSocketActor.js.map +1 -1
- package/dist/io/broker/UdpSocketOptions.d.ts +42 -0
- package/dist/io/broker/UdpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/UdpSocketOptions.js +34 -0
- package/dist/io/broker/UdpSocketOptions.js.map +1 -0
- package/dist/io/broker/index.d.ts +39 -19
- package/dist/io/broker/index.d.ts.map +1 -1
- package/dist/io/broker/index.js +21 -4
- package/dist/io/broker/index.js.map +1 -1
- package/dist/mailbox/BoundedMailbox.d.ts +12 -0
- package/dist/mailbox/BoundedMailbox.d.ts.map +1 -1
- package/dist/mailbox/BoundedMailbox.js +7 -1
- package/dist/mailbox/BoundedMailbox.js.map +1 -1
- package/dist/management/HttpManagement.d.ts +34 -1
- package/dist/management/HttpManagement.d.ts.map +1 -1
- package/dist/management/HttpManagement.js +30 -4
- package/dist/management/HttpManagement.js.map +1 -1
- package/dist/metrics/PromClientAdapter.d.ts +2 -12
- package/dist/metrics/PromClientAdapter.d.ts.map +1 -1
- package/dist/metrics/PromClientAdapter.js +2 -2
- package/dist/metrics/PromClientAdapter.js.map +1 -1
- package/dist/metrics/PromClientAdapterOptions.d.ts +46 -0
- package/dist/metrics/PromClientAdapterOptions.d.ts.map +1 -0
- package/dist/metrics/PromClientAdapterOptions.js +35 -0
- package/dist/metrics/PromClientAdapterOptions.js.map +1 -0
- package/dist/metrics/index.d.ts +3 -1
- package/dist/metrics/index.d.ts.map +1 -1
- package/dist/metrics/index.js +1 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/persistence/DurableStateActor.d.ts +4 -9
- package/dist/persistence/DurableStateActor.d.ts.map +1 -1
- package/dist/persistence/DurableStateActor.js +3 -3
- package/dist/persistence/DurableStateActor.js.map +1 -1
- package/dist/persistence/DurableStateOptions.d.ts +40 -0
- package/dist/persistence/DurableStateOptions.d.ts.map +1 -0
- package/dist/persistence/DurableStateOptions.js +36 -0
- package/dist/persistence/DurableStateOptions.js.map +1 -0
- package/dist/persistence/PersistenceOptions.d.ts +45 -0
- package/dist/persistence/PersistenceOptions.d.ts.map +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.d.ts.map +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.js +2 -2
- package/dist/persistence/ReplicatedEventSourcedActor.js.map +1 -1
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts +32 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js +120 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts +38 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js +38 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts +4 -9
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js +49 -7
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts +61 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js +42 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js +121 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/index.d.ts +59 -16
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +33 -2
- package/dist/persistence/index.js.map +1 -1
- package/dist/persistence/journals/CassandraJournal.d.ts +1 -48
- package/dist/persistence/journals/CassandraJournal.d.ts.map +1 -1
- package/dist/persistence/journals/CassandraJournal.js +2 -2
- package/dist/persistence/journals/CassandraJournal.js.map +1 -1
- package/dist/persistence/journals/CassandraJournalOptions.d.ts +107 -0
- package/dist/persistence/journals/CassandraJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/CassandraJournalOptions.js +90 -0
- package/dist/persistence/journals/CassandraJournalOptions.js.map +1 -0
- package/dist/persistence/journals/CassandraPlugin.d.ts +1 -16
- package/dist/persistence/journals/CassandraPlugin.d.ts.map +1 -1
- package/dist/persistence/journals/CassandraPlugin.js +9 -4
- package/dist/persistence/journals/CassandraPlugin.js.map +1 -1
- package/dist/persistence/journals/CassandraPluginOptions.d.ts +51 -0
- package/dist/persistence/journals/CassandraPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/CassandraPluginOptions.js +37 -0
- package/dist/persistence/journals/CassandraPluginOptions.js.map +1 -0
- package/dist/persistence/journals/MariaDbClient.d.ts +54 -0
- package/dist/persistence/journals/MariaDbClient.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbClient.js +40 -0
- package/dist/persistence/journals/MariaDbClient.js.map +1 -0
- package/dist/persistence/journals/MariaDbJournal.d.ts +29 -0
- package/dist/persistence/journals/MariaDbJournal.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbJournal.js +161 -0
- package/dist/persistence/journals/MariaDbJournal.js.map +1 -0
- package/dist/persistence/journals/MariaDbJournalOptions.d.ts +43 -0
- package/dist/persistence/journals/MariaDbJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbJournalOptions.js +43 -0
- package/dist/persistence/journals/MariaDbJournalOptions.js.map +1 -0
- package/dist/persistence/journals/MariaDbPlugin.d.ts +27 -0
- package/dist/persistence/journals/MariaDbPlugin.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbPlugin.js +30 -0
- package/dist/persistence/journals/MariaDbPlugin.js.map +1 -0
- package/dist/persistence/journals/MariaDbPluginOptions.d.ts +52 -0
- package/dist/persistence/journals/MariaDbPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbPluginOptions.js +38 -0
- package/dist/persistence/journals/MariaDbPluginOptions.js.map +1 -0
- package/dist/persistence/journals/PostgresClient.d.ts +56 -0
- package/dist/persistence/journals/PostgresClient.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresClient.js +35 -0
- package/dist/persistence/journals/PostgresClient.js.map +1 -0
- package/dist/persistence/journals/PostgresJournal.d.ts +41 -0
- package/dist/persistence/journals/PostgresJournal.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresJournal.js +176 -0
- package/dist/persistence/journals/PostgresJournal.js.map +1 -0
- package/dist/persistence/journals/PostgresJournalOptions.d.ts +44 -0
- package/dist/persistence/journals/PostgresJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresJournalOptions.js +44 -0
- package/dist/persistence/journals/PostgresJournalOptions.js.map +1 -0
- package/dist/persistence/journals/PostgresPlugin.d.ts +32 -0
- package/dist/persistence/journals/PostgresPlugin.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresPlugin.js +35 -0
- package/dist/persistence/journals/PostgresPlugin.js.map +1 -0
- package/dist/persistence/journals/PostgresPluginOptions.d.ts +54 -0
- package/dist/persistence/journals/PostgresPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresPluginOptions.js +39 -0
- package/dist/persistence/journals/PostgresPluginOptions.js.map +1 -0
- package/dist/persistence/journals/SqliteJournal.d.ts +5 -19
- package/dist/persistence/journals/SqliteJournal.d.ts.map +1 -1
- package/dist/persistence/journals/SqliteJournal.js +10 -9
- package/dist/persistence/journals/SqliteJournal.js.map +1 -1
- package/dist/persistence/journals/SqliteJournalOptions.d.ts +41 -0
- package/dist/persistence/journals/SqliteJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/SqliteJournalOptions.js +31 -0
- package/dist/persistence/journals/SqliteJournalOptions.js.map +1 -0
- package/dist/persistence/object-storage/BodyCodec.d.ts +43 -0
- package/dist/persistence/object-storage/BodyCodec.d.ts.map +1 -1
- package/dist/persistence/object-storage/BodyCodec.js +78 -20
- package/dist/persistence/object-storage/BodyCodec.js.map +1 -1
- package/dist/persistence/object-storage/Compression.d.ts +21 -7
- package/dist/persistence/object-storage/Compression.d.ts.map +1 -1
- package/dist/persistence/object-storage/Compression.js +79 -29
- package/dist/persistence/object-storage/Compression.js.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts +2 -61
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js +56 -11
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts +45 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js +30 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js.map +1 -0
- package/dist/persistence/object-storage/Integrity.d.ts +43 -0
- package/dist/persistence/object-storage/Integrity.d.ts.map +1 -0
- package/dist/persistence/object-storage/Integrity.js +66 -0
- package/dist/persistence/object-storage/Integrity.js.map +1 -0
- package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts +6 -22
- package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePlugin.js +36 -28
- package/dist/persistence/object-storage/ObjectStoragePlugin.js.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts +60 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.js +52 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.js.map +1 -0
- package/dist/persistence/object-storage/PluginConfig.d.ts +5 -2
- package/dist/persistence/object-storage/PluginConfig.d.ts.map +1 -1
- package/dist/persistence/object-storage/PluginConfig.js +8 -0
- package/dist/persistence/object-storage/PluginConfig.js.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts +1 -30
- package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageBackend.js +12 -7
- package/dist/persistence/object-storage/S3ObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts +64 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.js +42 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.js.map +1 -0
- package/dist/persistence/object-storage/reEncryptionSweep.d.ts +72 -0
- package/dist/persistence/object-storage/reEncryptionSweep.d.ts.map +1 -1
- package/dist/persistence/object-storage/reEncryptionSweep.js +82 -2
- package/dist/persistence/object-storage/reEncryptionSweep.js.map +1 -1
- package/dist/persistence/projection/ProjectionActor.d.ts +4 -24
- package/dist/persistence/projection/ProjectionActor.d.ts.map +1 -1
- package/dist/persistence/projection/ProjectionActor.js +36 -2
- package/dist/persistence/projection/ProjectionActor.js.map +1 -1
- package/dist/persistence/projection/ProjectionOptions.d.ts +109 -0
- package/dist/persistence/projection/ProjectionOptions.d.ts.map +1 -0
- package/dist/persistence/projection/ProjectionOptions.js +108 -0
- package/dist/persistence/projection/ProjectionOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts +2 -10
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.js +12 -6
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts +37 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js +31 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts +1 -11
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js +3 -3
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts +61 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js +73 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts +30 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js +102 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts +42 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js +42 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts +2 -15
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js +10 -6
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts +45 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js +38 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts +31 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js +101 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts +42 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js +42 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts +2 -15
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js +7 -6
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts +40 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js +31 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js.map +1 -0
- package/dist/runtime/http/BunHonoRunner.d.ts +7 -1
- package/dist/runtime/http/BunHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/BunHonoRunner.js +22 -0
- package/dist/runtime/http/BunHonoRunner.js.map +1 -1
- package/dist/runtime/http/DenoHonoRunner.d.ts +5 -2
- package/dist/runtime/http/DenoHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/DenoHonoRunner.js +19 -2
- package/dist/runtime/http/DenoHonoRunner.js.map +1 -1
- package/dist/runtime/http/HonoServerRunner.d.ts +39 -0
- package/dist/runtime/http/HonoServerRunner.d.ts.map +1 -1
- package/dist/runtime/http/NodeHonoRunner.d.ts +3 -1
- package/dist/runtime/http/NodeHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/NodeHonoRunner.js +22 -0
- package/dist/runtime/http/NodeHonoRunner.js.map +1 -1
- package/dist/runtime/http/index.d.ts +1 -1
- package/dist/runtime/http/index.d.ts.map +1 -1
- package/dist/runtime/http/index.js.map +1 -1
- package/dist/testkit/ManualScheduler.d.ts +2 -1
- package/dist/testkit/ManualScheduler.d.ts.map +1 -1
- package/dist/testkit/ManualScheduler.js +2 -1
- package/dist/testkit/ManualScheduler.js.map +1 -1
- package/dist/testkit/MockCluster.d.ts +74 -0
- package/dist/testkit/MockCluster.d.ts.map +1 -0
- package/dist/testkit/MockCluster.js +163 -0
- package/dist/testkit/MockCluster.js.map +1 -0
- package/dist/testkit/MultiNodeClusterFixture.d.ts +62 -0
- package/dist/testkit/MultiNodeClusterFixture.d.ts.map +1 -0
- package/dist/testkit/MultiNodeClusterFixture.js +43 -0
- package/dist/testkit/MultiNodeClusterFixture.js.map +1 -0
- package/dist/testkit/MultiNodeSpec.d.ts +45 -3
- package/dist/testkit/MultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/MultiNodeSpec.js +108 -14
- package/dist/testkit/MultiNodeSpec.js.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpec.d.ts +12 -2
- package/dist/testkit/ParallelMultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpec.js +49 -4
- package/dist/testkit/ParallelMultiNodeSpec.js.map +1 -1
- package/dist/testkit/SnapshotMigrationTest.d.ts +86 -0
- package/dist/testkit/SnapshotMigrationTest.d.ts.map +1 -0
- package/dist/testkit/SnapshotMigrationTest.js +77 -0
- package/dist/testkit/SnapshotMigrationTest.js.map +1 -0
- package/dist/testkit/TestKit.d.ts +6 -8
- package/dist/testkit/TestKit.d.ts.map +1 -1
- package/dist/testkit/TestKit.js +10 -6
- package/dist/testkit/TestKit.js.map +1 -1
- package/dist/testkit/TestKitOptions.d.ts +26 -0
- package/dist/testkit/TestKitOptions.d.ts.map +1 -0
- package/dist/testkit/TestKitOptions.js +19 -0
- package/dist/testkit/TestKitOptions.js.map +1 -0
- package/dist/testkit/TestProbe.d.ts +2 -7
- package/dist/testkit/TestProbe.d.ts.map +1 -1
- package/dist/testkit/TestProbe.js +2 -1
- package/dist/testkit/TestProbe.js.map +1 -1
- package/dist/testkit/TestProbeOptions.d.ts +26 -0
- package/dist/testkit/TestProbeOptions.d.ts.map +1 -0
- package/dist/testkit/TestProbeOptions.js +19 -0
- package/dist/testkit/TestProbeOptions.js.map +1 -0
- package/dist/testkit/index.d.ts +10 -2
- package/dist/testkit/index.d.ts.map +1 -1
- package/dist/testkit/index.js +5 -0
- package/dist/testkit/index.js.map +1 -1
- package/dist/testkit/internal/parallel-multi-node-bootstrap.d.ts.map +1 -1
- package/dist/testkit/internal/parallel-multi-node-bootstrap.js +16 -12
- package/dist/testkit/internal/parallel-multi-node-bootstrap.js.map +1 -1
- package/dist/tracing/OtelAdapter.d.ts +4 -12
- package/dist/tracing/OtelAdapter.d.ts.map +1 -1
- package/dist/tracing/OtelAdapter.js +4 -2
- package/dist/tracing/OtelAdapter.js.map +1 -1
- package/dist/tracing/OtelAdapterOptions.d.ts +42 -0
- package/dist/tracing/OtelAdapterOptions.d.ts.map +1 -0
- package/dist/tracing/OtelAdapterOptions.js +34 -0
- package/dist/tracing/OtelAdapterOptions.js.map +1 -0
- package/dist/tracing/OtelLogsAdapter.d.ts +100 -0
- package/dist/tracing/OtelLogsAdapter.d.ts.map +1 -0
- package/dist/tracing/OtelLogsAdapter.js +130 -0
- package/dist/tracing/OtelLogsAdapter.js.map +1 -0
- package/dist/tracing/index.d.ts +5 -1
- package/dist/tracing/index.d.ts.map +1 -1
- package/dist/tracing/index.js +2 -0
- package/dist/tracing/index.js.map +1 -1
- package/dist/util/Constants.d.ts +23 -0
- package/dist/util/Constants.d.ts.map +1 -1
- package/dist/util/Constants.js +23 -0
- package/dist/util/Constants.js.map +1 -1
- package/dist/util/Lazy.d.ts +31 -0
- package/dist/util/Lazy.d.ts.map +1 -1
- package/dist/util/Lazy.js +70 -0
- package/dist/util/Lazy.js.map +1 -1
- package/dist/util/OptionsBuilder.d.ts +48 -0
- package/dist/util/OptionsBuilder.d.ts.map +1 -0
- package/dist/util/OptionsBuilder.js +53 -0
- package/dist/util/OptionsBuilder.js.map +1 -0
- package/dist/worker/WorkerCluster.d.ts +2 -11
- package/dist/worker/WorkerCluster.d.ts.map +1 -1
- package/dist/worker/WorkerCluster.js +2 -1
- package/dist/worker/WorkerCluster.js.map +1 -1
- package/dist/worker/WorkerClusterOptions.d.ts +55 -0
- package/dist/worker/WorkerClusterOptions.d.ts.map +1 -0
- package/dist/worker/WorkerClusterOptions.js +55 -0
- package/dist/worker/WorkerClusterOptions.js.map +1 -0
- package/dist/worker/index.d.ts +3 -1
- package/dist/worker/index.d.ts.map +1 -1
- package/dist/worker/index.js +1 -0
- package/dist/worker/index.js.map +1 -1
- package/package.json +56 -13
- package/dist/io/broker/ServerWebSocketActor.d.ts +0 -109
- package/dist/io/broker/ServerWebSocketActor.d.ts.map +0 -1
- package/dist/io/broker/ServerWebSocketActor.js +0 -128
- package/dist/io/broker/ServerWebSocketActor.js.map +0 -1
- package/dist/io/broker/WebSocketActor.d.ts +0 -77
- package/dist/io/broker/WebSocketActor.d.ts.map +0 -1
- package/dist/io/broker/WebSocketActor.js +0 -217
- package/dist/io/broker/WebSocketActor.js.map +0 -1
- package/dist/io/broker/WebSocketServerAdapters.d.ts +0 -140
- package/dist/io/broker/WebSocketServerAdapters.d.ts.map +0 -1
- package/dist/io/broker/WebSocketServerAdapters.js +0 -155
- package/dist/io/broker/WebSocketServerAdapters.js.map +0 -1
package/dist/http/Route.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../src/http/Route.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../src/http/Route.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAa,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAU,MAAM,YAAY,CAAC;AACrG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;CAC9E;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB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AM,GAAG,SAAS,CAK7E;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
package/dist/http/Route.js
CHANGED
|
@@ -12,6 +12,29 @@ export function path(segment, child) {
|
|
|
12
12
|
export function pathPrefix(segment, child) {
|
|
13
13
|
return { kind: 'path', segment: normalizeSegment(segment), child };
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Wrap every handler in `child`'s subtree with the given `Middleware`.
|
|
17
|
+
* The middleware runs **before** the handler; it can short-circuit
|
|
18
|
+
* (return without calling `next()`) or transform the response.
|
|
19
|
+
*
|
|
20
|
+
* Nesting composes outside-in: `withMiddleware(a, withMiddleware(b,
|
|
21
|
+
* get(h)))` runs `a` first, then if it calls `next()`, `b` runs, and
|
|
22
|
+
* if `b` calls `next()`, the handler `h` runs.
|
|
23
|
+
*
|
|
24
|
+
* const protectedRoutes = withMiddleware(
|
|
25
|
+
* BearerTokenAuth({ tokens: [process.env.MGMT_TOKEN!] }),
|
|
26
|
+
* withMiddleware(
|
|
27
|
+
* IpAllowlist({ allow: ['10.0.0.0/8'] }),
|
|
28
|
+
* path('cluster', concat(
|
|
29
|
+
* path('down', post(handleDown)),
|
|
30
|
+
* path('leave', post(handleLeave)),
|
|
31
|
+
* )),
|
|
32
|
+
* ),
|
|
33
|
+
* );
|
|
34
|
+
*/
|
|
35
|
+
export function withMiddleware(middleware, child) {
|
|
36
|
+
return { kind: 'middleware', middleware, child };
|
|
37
|
+
}
|
|
15
38
|
function normalizeSegment(s) {
|
|
16
39
|
const trimmed = s.replace(/^\/+|\/+$/g, '');
|
|
17
40
|
return trimmed;
|
|
@@ -49,18 +72,68 @@ export function reject(status, message, extra) {
|
|
|
49
72
|
throw new HttpError(status, message, extra);
|
|
50
73
|
}
|
|
51
74
|
/* ------------------------------- Compilation ----------------------------- */
|
|
52
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Sentinel returned by a WS route's inner `authorize` to mean "proceed
|
|
77
|
+
* with the upgrade". Middleware that calls `next()` and passes the
|
|
78
|
+
* result through untouched yields this exact frozen object (identity
|
|
79
|
+
* check) → accept; anything else → reject the upgrade with that response.
|
|
80
|
+
*/
|
|
81
|
+
const WS_ACCEPT = Object.freeze({ status: 101, body: null });
|
|
82
|
+
/** Flatten a Route tree into the list of concrete endpoint registrations. */
|
|
53
83
|
export function compile(route, prefix = []) {
|
|
54
84
|
return match(route)
|
|
55
85
|
.with({ kind: 'terminal' }, (r) => [{
|
|
86
|
+
kind: 'http',
|
|
56
87
|
method: r.method,
|
|
57
88
|
pattern: buildPattern(prefix),
|
|
58
89
|
handler: r.handler,
|
|
59
90
|
}])
|
|
91
|
+
.with({ kind: 'websocket' }, (r) => [{
|
|
92
|
+
kind: 'websocket',
|
|
93
|
+
method: 'GET',
|
|
94
|
+
pattern: buildPattern(prefix),
|
|
95
|
+
connect: r.connect,
|
|
96
|
+
// Innermost default: accept unconditionally. Enclosing
|
|
97
|
+
// withMiddleware() nodes fold their checks into this below.
|
|
98
|
+
authorize: async () => null,
|
|
99
|
+
}])
|
|
60
100
|
.with({ kind: 'path' }, (r) => compile(r.child, [...prefix, r.segment]))
|
|
61
101
|
.with({ kind: 'concat' }, (r) => r.routes.flatMap((child) => compile(child, prefix)))
|
|
102
|
+
.with({ kind: 'middleware' }, (r) => {
|
|
103
|
+
// Compile the subtree, then fold the middleware in. For HTTP
|
|
104
|
+
// children it wraps the handler (nested middlewares stack
|
|
105
|
+
// outside-in). For WebSocket children it folds into `authorize`:
|
|
106
|
+
// the middleware runs once, against the upgrade request.
|
|
107
|
+
return compile(r.child, prefix).map((c) => {
|
|
108
|
+
if (c.kind === 'http') {
|
|
109
|
+
return { ...c, handler: wrapHandler(r.middleware, c.handler) };
|
|
110
|
+
}
|
|
111
|
+
const inner = c.authorize;
|
|
112
|
+
const authorize = async (req) => {
|
|
113
|
+
try {
|
|
114
|
+
const res = await r.middleware(req, async () => (await inner(req)) ?? WS_ACCEPT);
|
|
115
|
+
// Identity: middleware passed the sentinel through → accept.
|
|
116
|
+
// Any other response (short-circuit or transform) → reject.
|
|
117
|
+
return res === WS_ACCEPT ? null : res;
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
if (err instanceof HttpError) {
|
|
121
|
+
return { status: err.status, body: { error: err.message, ...(err.extra ?? {}) } };
|
|
122
|
+
}
|
|
123
|
+
return { status: Status.InternalServerError, body: { error: 'Internal Server Error' } };
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
return { ...c, authorize };
|
|
127
|
+
});
|
|
128
|
+
})
|
|
62
129
|
.exhaustive();
|
|
63
130
|
}
|
|
131
|
+
function wrapHandler(middleware, handler) {
|
|
132
|
+
return async (req) => {
|
|
133
|
+
const next = async () => Promise.resolve(handler(req));
|
|
134
|
+
return Promise.resolve(middleware(req, next));
|
|
135
|
+
};
|
|
136
|
+
}
|
|
64
137
|
function buildPattern(segments) {
|
|
65
138
|
const cleaned = segments
|
|
66
139
|
.flatMap(s => s.split('/'))
|
package/dist/http/Route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/http/Route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/http/Route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAwD,MAAM,EAAE,MAAM,YAAY,CAAC;AA6ErG,2EAA2E;AAC3E,MAAM,UAAU,MAAM,CAAC,GAAG,MAAe;IACvC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,IAAI,CAAC,OAAe,EAAE,KAAY;IAChD,OA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IACtD,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,SAAS;QAAE,MAAM,IAAI,SAAS,CAAC,GAAG,EAAE,2BAA2B,IAAI,GAAG,CAAC,CAAC;IAClF,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Server } from 'node:http';
|
|
2
2
|
import { type HttpRequest, type HttpResponse } from '../types.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ExpressBackendOptions } from './ExpressBackendOptions.js';
|
|
4
|
+
import type { HttpServerBackend, RouteRegistration, ServerBinding, WebSocketRouteRegistration } from './HttpServerBackend.js';
|
|
4
5
|
/** Minimal shape of the Express Request we rely on. */
|
|
5
6
|
interface ExpressRequestLike {
|
|
6
7
|
method: string;
|
|
@@ -12,6 +13,16 @@ interface ExpressRequestLike {
|
|
|
12
13
|
/** Populated by our raw-body middleware. */
|
|
13
14
|
rawBody?: Uint8Array | null;
|
|
14
15
|
body?: unknown;
|
|
16
|
+
/**
|
|
17
|
+
* Express's IP accessor — by default the socket peer; when
|
|
18
|
+
* `app.set('trust proxy', ...)` is configured, the leftmost
|
|
19
|
+
* `X-Forwarded-For` entry. Forwarded into `HttpRequest.remoteAddress`.
|
|
20
|
+
*/
|
|
21
|
+
ip?: string;
|
|
22
|
+
/** Raw socket — fallback when `req.ip` isn't populated. */
|
|
23
|
+
socket?: {
|
|
24
|
+
remoteAddress?: string;
|
|
25
|
+
};
|
|
15
26
|
}
|
|
16
27
|
/** Minimal shape of the Express Response we rely on. */
|
|
17
28
|
interface ExpressResponseLike {
|
|
@@ -23,7 +34,7 @@ type ExpressNext = (err?: unknown) => void;
|
|
|
23
34
|
type ExpressHandler = (req: ExpressRequestLike, res: ExpressResponseLike, next: ExpressNext) => void | Promise<void>;
|
|
24
35
|
type ExpressErrorHandler = (err: unknown, req: ExpressRequestLike, res: ExpressResponseLike, next: ExpressNext) => void | Promise<void>;
|
|
25
36
|
/** Subset of the Express app API we touch. Covers v4 and v5. */
|
|
26
|
-
interface ExpressAppLike {
|
|
37
|
+
export interface ExpressAppLike {
|
|
27
38
|
get(path: string, handler: ExpressHandler): void;
|
|
28
39
|
post(path: string, handler: ExpressHandler): void;
|
|
29
40
|
put(path: string, handler: ExpressHandler): void;
|
|
@@ -34,16 +45,6 @@ interface ExpressAppLike {
|
|
|
34
45
|
use(mw: ExpressHandler | ExpressErrorHandler): void;
|
|
35
46
|
listen(port: number, hostname: string, cb: (err?: Error) => void): Server;
|
|
36
47
|
}
|
|
37
|
-
export interface ExpressBackendOptions {
|
|
38
|
-
/**
|
|
39
|
-
* Bring-your-own app — useful when you already attach custom middleware
|
|
40
|
-
* (CORS, sessions, metrics, …) outside the DSL. When omitted, a fresh
|
|
41
|
-
* Express app is created via the installed `express` package.
|
|
42
|
-
*/
|
|
43
|
-
readonly app?: ExpressAppLike;
|
|
44
|
-
/** Maximum allowed body size in bytes (default: 10 MiB). Exceeding it returns 413. */
|
|
45
|
-
readonly maxBodyBytes?: number;
|
|
46
|
-
}
|
|
47
48
|
/**
|
|
48
49
|
* Express-backed HTTP backend — drop-in alternative to the Fastify
|
|
49
50
|
* default. Intended for teams that already have an Express-based plugin
|
|
@@ -60,15 +61,20 @@ export declare class ExpressBackend implements HttpServerBackend {
|
|
|
60
61
|
private readonly ownsApp;
|
|
61
62
|
private readonly maxBodyBytes;
|
|
62
63
|
private readonly registered;
|
|
64
|
+
private readonly wsRegistered;
|
|
65
|
+
private wss;
|
|
63
66
|
private notFoundHandler;
|
|
64
67
|
private errorHandler;
|
|
65
68
|
constructor(options?: ExpressBackendOptions);
|
|
66
69
|
/** Inject / access the underlying Express app — useful for native middleware. */
|
|
67
70
|
getApp(): ExpressAppLike;
|
|
68
71
|
registerRoute(route: RouteRegistration): void;
|
|
72
|
+
registerWebSocket(reg: WebSocketRouteRegistration): void;
|
|
69
73
|
setNotFound(handler: (req: HttpRequest) => Promise<HttpResponse> | HttpResponse): void;
|
|
70
74
|
setErrorHandler(handler: (err: unknown, req: HttpRequest) => Promise<HttpResponse> | HttpResponse): void;
|
|
71
75
|
listen(host: string, port: number): Promise<ServerBinding>;
|
|
76
|
+
private attachUpgradeHandling;
|
|
77
|
+
private adaptUpgradeRequest;
|
|
72
78
|
private attachRoute;
|
|
73
79
|
/**
|
|
74
80
|
* Read the whole request body into a single Uint8Array on `req.rawBody`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressBackend.d.ts","sourceRoot":"","sources":["../../../src/http/backend/ExpressBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ExpressBackend.d.ts","sourceRoot":"","sources":["../../../src/http/backend/ExpressBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,MAAM,EAAE,MAAM,WAAW,CAAC;AAIzD,OAAO,EAA8B,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,KAAK,EAAE,qBAAqB,EAA6B,MAAM,4BAA4B,CAAC;AACnG,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AA2ChC,uDAAuD;AACvD,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACvD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,O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AE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;YAkElD,qBAAqB;IAuCnC,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,WAAW;IAqBnB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;YAwBP,gBAAgB;CAiB/B"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { match } from 'ts-pattern';
|
|
2
|
+
import { Lazy } from '../../util/Lazy.js';
|
|
2
3
|
import { HttpError } from '../types.js';
|
|
4
|
+
import { wsPackageAdapter } from '../ws/SocketAdapter.js';
|
|
5
|
+
import { matchWsPattern } from '../ws/matchPattern.js';
|
|
6
|
+
import { writeRawHttpResponse } from '../ws/rawResponse.js';
|
|
7
|
+
// `ws` is an optional peer dep — lazy-import its WebSocketServer (cached).
|
|
8
|
+
const wsServerCtorLazy = Lazy.of(async () => {
|
|
9
|
+
try {
|
|
10
|
+
const name = 'ws';
|
|
11
|
+
const mod = (await import(name));
|
|
12
|
+
const Ctor = mod.WebSocketServer ?? mod.default?.WebSocketServer;
|
|
13
|
+
if (!Ctor)
|
|
14
|
+
throw new Error('ws: WebSocketServer not exported');
|
|
15
|
+
return Ctor;
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
throw new Error('websocket() routes on the Express backend require the "ws" package. '
|
|
19
|
+
+ 'Install it with: bun add ws\nOriginal error: '
|
|
20
|
+
+ (e instanceof Error ? e.message : String(e)));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
3
23
|
/**
|
|
4
24
|
* Express-backed HTTP backend — drop-in alternative to the Fastify
|
|
5
25
|
* default. Intended for teams that already have an Express-based plugin
|
|
@@ -16,12 +36,15 @@ export class ExpressBackend {
|
|
|
16
36
|
ownsApp;
|
|
17
37
|
maxBodyBytes;
|
|
18
38
|
registered = [];
|
|
39
|
+
wsRegistered = [];
|
|
40
|
+
wss = null;
|
|
19
41
|
notFoundHandler = null;
|
|
20
42
|
errorHandler = null;
|
|
21
43
|
constructor(options = {}) {
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
44
|
+
const settings = options;
|
|
45
|
+
this.app = settings.app ?? null;
|
|
46
|
+
this.ownsApp = settings.app == null;
|
|
47
|
+
this.maxBodyBytes = settings.maxBodyBytes ?? 10 * 1024 * 1024;
|
|
25
48
|
}
|
|
26
49
|
/** Inject / access the underlying Express app — useful for native middleware. */
|
|
27
50
|
getApp() {
|
|
@@ -32,6 +55,12 @@ export class ExpressBackend {
|
|
|
32
55
|
registerRoute(route) {
|
|
33
56
|
this.registered.push(route);
|
|
34
57
|
}
|
|
58
|
+
registerWebSocket(reg) {
|
|
59
|
+
if (this.wsRegistered.some((r) => r.pattern === reg.pattern)) {
|
|
60
|
+
throw new Error(`ExpressBackend: duplicate websocket route for pattern "${reg.pattern}".`);
|
|
61
|
+
}
|
|
62
|
+
this.wsRegistered.push(reg);
|
|
63
|
+
}
|
|
35
64
|
setNotFound(handler) {
|
|
36
65
|
this.notFoundHandler = handler;
|
|
37
66
|
}
|
|
@@ -77,6 +106,9 @@ export class ExpressBackend {
|
|
|
77
106
|
server.once('error', reject);
|
|
78
107
|
this.server = server;
|
|
79
108
|
});
|
|
109
|
+
if (this.wsRegistered.length > 0 && this.server) {
|
|
110
|
+
await this.attachUpgradeHandling(this.server);
|
|
111
|
+
}
|
|
80
112
|
return {
|
|
81
113
|
host,
|
|
82
114
|
port: actualPort,
|
|
@@ -85,16 +117,104 @@ export class ExpressBackend {
|
|
|
85
117
|
if (!srv)
|
|
86
118
|
return;
|
|
87
119
|
this.server = null;
|
|
120
|
+
// Force-terminate live WebSocket connections first — otherwise
|
|
121
|
+
// server.close() waits on them forever (a long-lived socket never
|
|
122
|
+
// drains) and shutdown hangs.
|
|
123
|
+
if (this.wss?.clients) {
|
|
124
|
+
for (const c of this.wss.clients) {
|
|
125
|
+
try {
|
|
126
|
+
c.terminate?.();
|
|
127
|
+
}
|
|
128
|
+
catch { /* already gone */ }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
88
131
|
await new Promise((resolve) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
132
|
+
let done = false;
|
|
133
|
+
const finish = () => { if (!done) {
|
|
134
|
+
done = true;
|
|
135
|
+
resolve();
|
|
136
|
+
} };
|
|
137
|
+
const grace = gracePeriodMs && gracePeriodMs > 0 ? gracePeriodMs : 1000;
|
|
138
|
+
// Bound the wait — on some runtimes (Bun) close() can hang after
|
|
139
|
+
// WS upgrades even once sockets are terminated. This one-shot
|
|
140
|
+
// timer is intentionally NOT unref'd: it must fire to guarantee
|
|
141
|
+
// unbind resolves; it clears itself once close() or the deadline
|
|
142
|
+
// wins, so it never keeps the process alive afterwards.
|
|
143
|
+
const hard = setTimeout(() => { try {
|
|
144
|
+
srv.closeAllConnections?.();
|
|
145
|
+
}
|
|
146
|
+
catch { /* best-effort */ } finish(); }, grace);
|
|
147
|
+
srv.close(() => { clearTimeout(hard); finish(); });
|
|
94
148
|
});
|
|
95
149
|
},
|
|
96
150
|
};
|
|
97
151
|
}
|
|
152
|
+
async attachUpgradeHandling(server) {
|
|
153
|
+
const WebSocketServerCtor = await wsServerCtorLazy.get();
|
|
154
|
+
const wss = new WebSocketServerCtor({ noServer: true });
|
|
155
|
+
this.wss = wss;
|
|
156
|
+
server.on('upgrade', (req, socket, head) => {
|
|
157
|
+
void (async () => {
|
|
158
|
+
const url = new URL(req.url ?? '/', 'http://localhost');
|
|
159
|
+
let hit = null;
|
|
160
|
+
for (const reg of this.wsRegistered) {
|
|
161
|
+
const params = matchWsPattern(reg.pattern, url.pathname);
|
|
162
|
+
if (params) {
|
|
163
|
+
hit = { reg, params };
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (!hit) {
|
|
168
|
+
writeRawHttpResponse(socket, { status: 404, body: 'Not Found' });
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const adapted = this.adaptUpgradeRequest(req, url, hit.params);
|
|
172
|
+
// Guard against the peer vanishing mid-authorize (unhandled
|
|
173
|
+
// 'error' on the raw socket would otherwise crash the process).
|
|
174
|
+
socket.on('error', () => { });
|
|
175
|
+
let reject;
|
|
176
|
+
try {
|
|
177
|
+
reject = await hit.reg.authorize(adapted);
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
reject = { status: 500, body: 'Internal Server Error' };
|
|
181
|
+
}
|
|
182
|
+
if (reject) {
|
|
183
|
+
writeRawHttpResponse(socket, reject);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
187
|
+
// Keep wss.clients populated so the unbind terminate-walk works.
|
|
188
|
+
wss.emit('connection', ws, req);
|
|
189
|
+
hit.reg.onConnection(adapted, wsPackageAdapter(ws, { remoteAddress: adapted.remoteAddress }));
|
|
190
|
+
});
|
|
191
|
+
})();
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
adaptUpgradeRequest(req, url, params) {
|
|
195
|
+
const headers = {};
|
|
196
|
+
for (const [k, v] of Object.entries(req.headers)) {
|
|
197
|
+
if (typeof v === 'string')
|
|
198
|
+
headers[k] = v;
|
|
199
|
+
else if (Array.isArray(v))
|
|
200
|
+
headers[k] = v.join(',');
|
|
201
|
+
}
|
|
202
|
+
const query = {};
|
|
203
|
+
for (const key of new Set(url.searchParams.keys())) {
|
|
204
|
+
const all = url.searchParams.getAll(key);
|
|
205
|
+
query[key] = all.length > 1 ? all : all[0];
|
|
206
|
+
}
|
|
207
|
+
const remoteAddress = req.socket?.remoteAddress;
|
|
208
|
+
return {
|
|
209
|
+
method: 'GET',
|
|
210
|
+
path: url.pathname,
|
|
211
|
+
headers,
|
|
212
|
+
query,
|
|
213
|
+
params,
|
|
214
|
+
body: null,
|
|
215
|
+
...(remoteAddress ? { remoteAddress } : {}),
|
|
216
|
+
};
|
|
217
|
+
}
|
|
98
218
|
/* ============================ internals ============================ */
|
|
99
219
|
attachRoute(route) {
|
|
100
220
|
const method = route.method.toLowerCase();
|
|
@@ -187,6 +307,11 @@ export class ExpressBackend {
|
|
|
187
307
|
headers[k] = v.join(',');
|
|
188
308
|
}
|
|
189
309
|
const body = req.rawBody ?? null;
|
|
310
|
+
// Express's `req.ip` is the standard accessor — also honours
|
|
311
|
+
// `app.set('trust proxy', ...)` when the operator has configured
|
|
312
|
+
// it. Fall back to the raw socket peer if `req.ip` isn't set
|
|
313
|
+
// (test-double / barebones Express setup).
|
|
314
|
+
const remoteAddress = req.ip ?? req.socket?.remoteAddress;
|
|
190
315
|
return {
|
|
191
316
|
method: req.method.toUpperCase(),
|
|
192
317
|
path: req.path ?? req.url,
|
|
@@ -194,6 +319,7 @@ export class ExpressBackend {
|
|
|
194
319
|
query: this.normaliseQuery(req.query),
|
|
195
320
|
params: { ...req.params },
|
|
196
321
|
body,
|
|
322
|
+
...(remoteAddress ? { remoteAddress } : {}),
|
|
197
323
|
};
|
|
198
324
|
}
|
|
199
325
|
normaliseQuery(raw) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressBackend.js","sourceRoot":"","sources":["../../../src/http/backend/ExpressBackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAwD,MAAM,aAAa,CAAC;AA6D9F;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAChB,IAAI,GAAG,SAAS,CAAC;IAElB,GAAG,CAAwB;IAC3B,MAAM,GAAkB,IAAI,CAAC;IACpB,OAAO,CAAU;IACjB,YAAY,CAAS;IACrB,UAAU,GAAwB,EAAE,CAAC;IAC9C,eAAe,GAAwE,IAAI,CAAC;IAC5F,YAAY,GAAsF,IAAI,CAAC;IAE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xE,MAAM,OAAO,GACX,OAAO,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,GAA2B;gBACvD,CAAC,CAAE,GAAyC,CAAC,OAAO,CAAC;YACvD,OAAO,OAAO,EAAE,CAAC;QACnB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,mEAAmE;kBACjE,mCAAmC,GAAG,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CACrF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All Express-backend option-relevant types live here:
|
|
3
|
+
*
|
|
4
|
+
* - {@link ExpressBackendOptionsType} — the plain settings-object shape
|
|
5
|
+
* (what you may also pass as a bare `{ … }` object).
|
|
6
|
+
* - {@link ExpressBackendOptionsBuilder} — the fluent builder
|
|
7
|
+
* (`ExpressBackendOptions.create()…`).
|
|
8
|
+
* - {@link ExpressBackendOptions} — the accepted-input **union**
|
|
9
|
+
* (`ExpressBackendOptionsBuilder | ExpressBackendOptionsType`), plus a
|
|
10
|
+
* value alias to the builder so `ExpressBackendOptions.create()` /
|
|
11
|
+
* `new ExpressBackendOptions()` keep working.
|
|
12
|
+
*
|
|
13
|
+
* const backendOptions = ExpressBackendOptions.create()
|
|
14
|
+
* .withMaxBodyBytes(1 << 20);
|
|
15
|
+
* new ExpressBackend(backendOptions);
|
|
16
|
+
*/
|
|
17
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
18
|
+
import type { ExpressAppLike } from './ExpressBackend.js';
|
|
19
|
+
/** Plain settings-object shape accepted by an {@link ExpressBackend}. */
|
|
20
|
+
export interface ExpressBackendOptionsType {
|
|
21
|
+
/**
|
|
22
|
+
* Bring-your-own app — useful when you already attach custom middleware
|
|
23
|
+
* (CORS, sessions, metrics, …) outside the DSL. When omitted, a fresh
|
|
24
|
+
* Express app is created via the installed `express` package.
|
|
25
|
+
*/
|
|
26
|
+
readonly app?: ExpressAppLike;
|
|
27
|
+
/** Maximum allowed body size in bytes (default: 10 MiB). Exceeding it returns 413. */
|
|
28
|
+
readonly maxBodyBytes?: number;
|
|
29
|
+
}
|
|
30
|
+
/** Fluent builder for {@link ExpressBackendOptionsType}. */
|
|
31
|
+
export declare class ExpressBackendOptionsBuilder extends OptionsBuilder<ExpressBackendOptionsType> {
|
|
32
|
+
/** Start a fresh builder. Equivalent to `new ExpressBackendOptionsBuilder()`. */
|
|
33
|
+
static create(): ExpressBackendOptionsBuilder;
|
|
34
|
+
/** Bring-your-own Express app (skips the internal `express` import). */
|
|
35
|
+
withApp(app: ExpressAppLike): this;
|
|
36
|
+
/** Maximum request body size in bytes. Default 10 MiB; exceeding it returns 413. */
|
|
37
|
+
withMaxBodyBytes(bytes: number): this;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Accepted input for the {@link ExpressBackend} constructor: the fluent
|
|
41
|
+
* {@link ExpressBackendOptionsBuilder} OR a plain
|
|
42
|
+
* {@link ExpressBackendOptionsType} object.
|
|
43
|
+
*/
|
|
44
|
+
export type ExpressBackendOptions = ExpressBackendOptionsBuilder | Partial<ExpressBackendOptionsType>;
|
|
45
|
+
/** Value alias so `ExpressBackendOptions.create()` / `new ExpressBackendOptions()` resolve to the builder. */
|
|
46
|
+
export declare const ExpressBackendOptions: typeof ExpressBackendOptionsBuilder;
|
|
47
|
+
//# sourceMappingURL=ExpressBackendOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressBackendOptions.d.ts","sourceRoot":"","sources":["../../../src/http/backend/ExpressBackendOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,4DAA4D;AAC5D,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,yBAAyB,CAAC;IACzF,kFAAkF;IAClF,MAAM,CAAC,MAAM,IAAI,4BAA4B;IAI7C,wEAAwE;IACxE,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAIlC,qFAAqF;IACrF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGtC;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACtG,8GAA8G;AAC9G,eAAO,MAAM,qBAAqB,qCAA+B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All Express-backend option-relevant types live here:
|
|
3
|
+
*
|
|
4
|
+
* - {@link ExpressBackendOptionsType} — the plain settings-object shape
|
|
5
|
+
* (what you may also pass as a bare `{ … }` object).
|
|
6
|
+
* - {@link ExpressBackendOptionsBuilder} — the fluent builder
|
|
7
|
+
* (`ExpressBackendOptions.create()…`).
|
|
8
|
+
* - {@link ExpressBackendOptions} — the accepted-input **union**
|
|
9
|
+
* (`ExpressBackendOptionsBuilder | ExpressBackendOptionsType`), plus a
|
|
10
|
+
* value alias to the builder so `ExpressBackendOptions.create()` /
|
|
11
|
+
* `new ExpressBackendOptions()` keep working.
|
|
12
|
+
*
|
|
13
|
+
* const backendOptions = ExpressBackendOptions.create()
|
|
14
|
+
* .withMaxBodyBytes(1 << 20);
|
|
15
|
+
* new ExpressBackend(backendOptions);
|
|
16
|
+
*/
|
|
17
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
18
|
+
/** Fluent builder for {@link ExpressBackendOptionsType}. */
|
|
19
|
+
export class ExpressBackendOptionsBuilder extends OptionsBuilder {
|
|
20
|
+
/** Start a fresh builder. Equivalent to `new ExpressBackendOptionsBuilder()`. */
|
|
21
|
+
static create() {
|
|
22
|
+
return new ExpressBackendOptionsBuilder();
|
|
23
|
+
}
|
|
24
|
+
/** Bring-your-own Express app (skips the internal `express` import). */
|
|
25
|
+
withApp(app) {
|
|
26
|
+
return this.set('app', app);
|
|
27
|
+
}
|
|
28
|
+
/** Maximum request body size in bytes. Default 10 MiB; exceeding it returns 413. */
|
|
29
|
+
withMaxBodyBytes(bytes) {
|
|
30
|
+
return this.set('maxBodyBytes', bytes);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Value alias so `ExpressBackendOptions.create()` / `new ExpressBackendOptions()` resolve to the builder. */
|
|
34
|
+
export const ExpressBackendOptions = ExpressBackendOptionsBuilder;
|
|
35
|
+
//# sourceMappingURL=ExpressBackendOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressBackendOptions.js","sourceRoot":"","sources":["../../../src/http/backend/ExpressBackendOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAe9D,4DAA4D;AAC5D,MAAM,OAAO,4BAA6B,SAAQ,cAAyC;IACzF,kFAAkF;IAClF,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,4BAA4B,EAAE,CAAC;IAC5C,CAAC;IAED,wEAAwE;IACxE,OAAO,CAAC,GAAmB;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,qFAAqF;IACrF,gBAAgB,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AAQD,8GAA8G;AAC9G,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Fastify from 'fastify';
|
|
2
2
|
import { type HttpRequest, type HttpResponse } from '../types.js';
|
|
3
|
-
import type { HttpServerBackend, RouteRegistration, ServerBinding } from './HttpServerBackend.js';
|
|
3
|
+
import type { HttpServerBackend, RouteRegistration, ServerBinding, WebSocketRouteRegistration } from './HttpServerBackend.js';
|
|
4
4
|
type FastifyLike = ReturnType<typeof Fastify>;
|
|
5
5
|
/**
|
|
6
6
|
* Fastify-based default HTTP backend. Leans on Fastify for fast routing,
|
|
@@ -13,15 +13,18 @@ export declare class FastifyBackend implements HttpServerBackend {
|
|
|
13
13
|
readonly name = "fastify";
|
|
14
14
|
private readonly app;
|
|
15
15
|
private readonly registered;
|
|
16
|
+
private readonly wsRegistered;
|
|
16
17
|
constructor(opts?: object);
|
|
17
18
|
/** Escape hatch: register a native Fastify plugin (e.g. @fastify/cors). */
|
|
18
19
|
withPlugin(plugin: unknown, options?: object): Promise<void>;
|
|
19
20
|
registerRoute(route: RouteRegistration): void;
|
|
21
|
+
registerWebSocket(reg: WebSocketRouteRegistration): void;
|
|
20
22
|
setNotFound(handler: (req: HttpRequest) => Promise<HttpResponse> | HttpResponse): void;
|
|
21
23
|
setErrorHandler(handler: (err: unknown, req: HttpRequest) => Promise<HttpResponse> | HttpResponse): void;
|
|
22
24
|
listen(host: string, port: number): Promise<ServerBinding>;
|
|
23
25
|
/** @internal — used by tests that inspect Fastify state. */
|
|
24
26
|
get fastify(): FastifyLike;
|
|
27
|
+
private attachWebSocketRoute;
|
|
25
28
|
private adaptRequest;
|
|
26
29
|
private asBytes;
|
|
27
30
|
private writeResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FastifyBackend.d.ts","sourceRoot":"","sources":["../../../src/http/backend/FastifyBackend.ts"],"names":[],"mappings":"AAAA,OAAO,OAAmD,MAAM,SAAS,CAAC;AAC1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