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
|
@@ -1,67 +1,8 @@
|
|
|
1
1
|
import { type Option } from '../../util/Option.js';
|
|
2
2
|
import { type ObjectFetched, type ObjectInfo, type ObjectStorageBackend, type PutOptions } from './ObjectStorageBackend.js';
|
|
3
|
-
|
|
4
|
-
* Filesystem-backed `ObjectStorageBackend` — stores each object as a file
|
|
5
|
-
* under a root directory, with the storage key mapped 1:1 to a relative
|
|
6
|
-
* path. Suitable for unit tests, local development, and "S3-API parity
|
|
7
|
-
* without the cloud", and **safe for concurrent multi-process writers**:
|
|
8
|
-
* every `put` / `delete` acquires a per-key advisory file lock (atomic
|
|
9
|
-
* `O_EXCL` create) so the CAS check + write block is serialized at the
|
|
10
|
-
* filesystem layer, and writes use a temp-file + rename so concurrent
|
|
11
|
-
* readers never observe a half-written object.
|
|
12
|
-
*
|
|
13
|
-
* The backend lazy-imports `node:fs/promises` and `node:path` so this
|
|
14
|
-
* module is harmless to include on Bun / Deno where those built-ins
|
|
15
|
-
* already exist (Node-compat layer) — only the actual operations touch
|
|
16
|
-
* them.
|
|
17
|
-
*
|
|
18
|
-
* Implementation notes:
|
|
19
|
-
*
|
|
20
|
-
* - **Disk is canonical.** Etags are content-derived
|
|
21
|
-
* ({@link computeEtag} — deterministic FNV-1a + length). No in-memory
|
|
22
|
-
* map; the file content alone determines the etag, so a fresh process
|
|
23
|
-
* sees the exact same etags every other process does. Same key, same
|
|
24
|
-
* bytes → same etag, regardless of who wrote them or when.
|
|
25
|
-
* - **Per-key advisory lock.** The lock file lives next to the target
|
|
26
|
-
* file as `<key>.lock`. Acquisition uses
|
|
27
|
-
* `fs.writeFile(lockPath, ..., { flag: 'wx' })`, which is
|
|
28
|
-
* atomic-create-only on every POSIX and NTFS filesystem the framework
|
|
29
|
-
* targets.
|
|
30
|
-
* - **Stale-lock recovery.** Lock files older than {@link staleLockMs}
|
|
31
|
-
* (default 30 s) are assumed to be left behind by a crashed writer
|
|
32
|
-
* and forcibly removed; one final acquisition retry is then made.
|
|
33
|
-
* This keeps the pathological "process died holding a lock" case from
|
|
34
|
-
* blocking the directory forever, at the cost of being technically
|
|
35
|
-
* incorrect if a real writer is taking longer than `staleLockMs` for a
|
|
36
|
-
* single `put` — which shouldn't happen for the small payloads this
|
|
37
|
-
* backend targets.
|
|
38
|
-
* - **Atomic body writes.** `put` writes to a per-process tmp file
|
|
39
|
-
* (`<key>.tmp.<pid>.<ts>.<rand>`), then renames over the target. On
|
|
40
|
-
* POSIX `rename(2)` is atomic on the same filesystem; on Windows
|
|
41
|
-
* `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` provides equivalent
|
|
42
|
-
* behaviour. Concurrent readers always see either the old body or
|
|
43
|
-
* the new body, never a truncated buffer.
|
|
44
|
-
*/
|
|
45
|
-
export interface FilesystemObjectStorageOptions {
|
|
46
|
-
/** Root directory. Will be created (recursively) if it doesn't exist. */
|
|
47
|
-
readonly dir: string;
|
|
48
|
-
/**
|
|
49
|
-
* How long to wait when contending for a per-key write lock before
|
|
50
|
-
* giving up with `ObjectStorageBackendError`. Default 5_000 ms — long
|
|
51
|
-
* enough that legitimate contenders complete first, short enough that
|
|
52
|
-
* a stuck holder gets surfaced quickly.
|
|
53
|
-
*/
|
|
54
|
-
readonly lockTimeoutMs?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Lock files older than this are assumed stale (left behind by a
|
|
57
|
-
* crashed writer) and forcibly removed. Default 30_000 ms — well
|
|
58
|
-
* above the expected duration of any single `put`, so legitimate
|
|
59
|
-
* writers never get their lock yanked.
|
|
60
|
-
*/
|
|
61
|
-
readonly staleLockMs?: number;
|
|
62
|
-
}
|
|
3
|
+
import type { FilesystemObjectStorageOptions } from './FilesystemObjectStorageOptions.js';
|
|
63
4
|
export declare class FilesystemObjectStorageBackend implements ObjectStorageBackend {
|
|
64
|
-
private readonly
|
|
5
|
+
private readonly dir;
|
|
65
6
|
private readonly lockTimeoutMs;
|
|
66
7
|
private readonly staleLockMs;
|
|
67
8
|
constructor(options: FilesystemObjectStorageOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilesystemObjectStorageBackend.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"FilesystemObjectStorageBackend.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,8BAA8B,EAAsC,MAAM,qCAAqC,CAAC;AAoG9H,qBAAa,8BAA+B,YAAW,oBAAoB;IACzE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,OAAO,EAAE,8BAA8B;IAQ7C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAyEpF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IA+BhD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBlC,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAoCrE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -3,6 +3,48 @@ import { none, some } from '../../util/Option.js';
|
|
|
3
3
|
import { wrapError } from '../../util/WrapError.js';
|
|
4
4
|
import { makeKeyValidator } from '../storage/KeyValidator.js';
|
|
5
5
|
import { ObjectStorageBackendError, ObjectStorageConcurrencyError, } from './ObjectStorageBackend.js';
|
|
6
|
+
/**
|
|
7
|
+
* Filesystem-backed `ObjectStorageBackend` — stores each object as a file
|
|
8
|
+
* under a root directory, with the storage key mapped 1:1 to a relative
|
|
9
|
+
* path. Suitable for unit tests, local development, and "S3-API parity
|
|
10
|
+
* without the cloud", and **safe for concurrent multi-process writers**:
|
|
11
|
+
* every `put` / `delete` acquires a per-key advisory file lock (atomic
|
|
12
|
+
* `O_EXCL` create) so the CAS check + write block is serialized at the
|
|
13
|
+
* filesystem layer, and writes use a temp-file + rename so concurrent
|
|
14
|
+
* readers never observe a half-written object.
|
|
15
|
+
*
|
|
16
|
+
* The backend lazy-imports `node:fs/promises` and `node:path` so this
|
|
17
|
+
* module is harmless to include on Bun / Deno where those built-ins
|
|
18
|
+
* already exist (Node-compat layer) — only the actual operations touch
|
|
19
|
+
* them.
|
|
20
|
+
*
|
|
21
|
+
* Implementation notes:
|
|
22
|
+
*
|
|
23
|
+
* - **Disk is canonical.** Etags are content-derived
|
|
24
|
+
* ({@link computeEtag} — deterministic FNV-1a + length). No in-memory
|
|
25
|
+
* map; the file content alone determines the etag, so a fresh process
|
|
26
|
+
* sees the exact same etags every other process does. Same key, same
|
|
27
|
+
* bytes → same etag, regardless of who wrote them or when.
|
|
28
|
+
* - **Per-key advisory lock.** The lock file lives next to the target
|
|
29
|
+
* file as `<key>.lock`. Acquisition uses
|
|
30
|
+
* `fs.writeFile(lockPath, ..., { flag: 'wx' })`, which is
|
|
31
|
+
* atomic-create-only on every POSIX and NTFS filesystem the framework
|
|
32
|
+
* targets.
|
|
33
|
+
* - **Stale-lock recovery.** Lock files older than {@link staleLockMs}
|
|
34
|
+
* (default 30 s) are assumed to be left behind by a crashed writer
|
|
35
|
+
* and forcibly removed; one final acquisition retry is then made.
|
|
36
|
+
* This keeps the pathological "process died holding a lock" case from
|
|
37
|
+
* blocking the directory forever, at the cost of being technically
|
|
38
|
+
* incorrect if a real writer is taking longer than `staleLockMs` for a
|
|
39
|
+
* single `put` — which shouldn't happen for the small payloads this
|
|
40
|
+
* backend targets.
|
|
41
|
+
* - **Atomic body writes.** `put` writes to a per-process tmp file
|
|
42
|
+
* (`<key>.tmp.<pid>.<ts>.<rand>`), then renames over the target. On
|
|
43
|
+
* POSIX `rename(2)` is atomic on the same filesystem; on Windows
|
|
44
|
+
* `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` provides equivalent
|
|
45
|
+
* behaviour. Concurrent readers always see either the old body or
|
|
46
|
+
* the new body, never a truncated buffer.
|
|
47
|
+
*/
|
|
6
48
|
const DEFAULT_LOCK_TIMEOUT_MS = 5_000;
|
|
7
49
|
const DEFAULT_STALE_LOCK_MS = 30_000;
|
|
8
50
|
/**
|
|
@@ -49,19 +91,22 @@ function assertWithinRoot(pathMod, root, fullPath) {
|
|
|
49
91
|
}
|
|
50
92
|
}
|
|
51
93
|
export class FilesystemObjectStorageBackend {
|
|
52
|
-
|
|
94
|
+
dir;
|
|
53
95
|
lockTimeoutMs;
|
|
54
96
|
staleLockMs;
|
|
55
97
|
constructor(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
98
|
+
const s = options;
|
|
99
|
+
if (s.dir === undefined)
|
|
100
|
+
throw new Error('FilesystemObjectStorageBackend: dir is required (call withDir()).');
|
|
101
|
+
this.dir = s.dir;
|
|
102
|
+
this.lockTimeoutMs = s.lockTimeoutMs ?? DEFAULT_LOCK_TIMEOUT_MS;
|
|
103
|
+
this.staleLockMs = s.staleLockMs ?? DEFAULT_STALE_LOCK_MS;
|
|
59
104
|
}
|
|
60
105
|
async put(key, body, opts = {}) {
|
|
61
106
|
assertSafeKey(key);
|
|
62
107
|
const { fs, path } = await fsLazy.get();
|
|
63
|
-
const fullPath = path.join(this.
|
|
64
|
-
assertWithinRoot(path, this.
|
|
108
|
+
const fullPath = path.join(this.dir, key);
|
|
109
|
+
assertWithinRoot(path, this.dir, fullPath);
|
|
65
110
|
const lockPath = fullPath + '.lock';
|
|
66
111
|
// Parent directory must exist before lock acquisition (the lock file
|
|
67
112
|
// lives there). `mkdir(recursive)` is idempotent across processes,
|
|
@@ -126,8 +171,8 @@ export class FilesystemObjectStorageBackend {
|
|
|
126
171
|
async get(key) {
|
|
127
172
|
assertSafeKey(key);
|
|
128
173
|
const { fs, path } = await fsLazy.get();
|
|
129
|
-
const fullPath = path.join(this.
|
|
130
|
-
assertWithinRoot(path, this.
|
|
174
|
+
const fullPath = path.join(this.dir, key);
|
|
175
|
+
assertWithinRoot(path, this.dir, fullPath);
|
|
131
176
|
let body;
|
|
132
177
|
let stat;
|
|
133
178
|
try {
|
|
@@ -159,8 +204,8 @@ export class FilesystemObjectStorageBackend {
|
|
|
159
204
|
async delete(key) {
|
|
160
205
|
assertSafeKey(key);
|
|
161
206
|
const { fs, path } = await fsLazy.get();
|
|
162
|
-
const fullPath = path.join(this.
|
|
163
|
-
assertWithinRoot(path, this.
|
|
207
|
+
const fullPath = path.join(this.dir, key);
|
|
208
|
+
assertWithinRoot(path, this.dir, fullPath);
|
|
164
209
|
const lockPath = fullPath + '.lock';
|
|
165
210
|
// Lock so a concurrent put doesn't see a half-deleted state mid-CAS.
|
|
166
211
|
// We may be deleting a never-written key (idempotent), but the
|
|
@@ -193,7 +238,7 @@ export class FilesystemObjectStorageBackend {
|
|
|
193
238
|
if (opts.prefix !== '')
|
|
194
239
|
assertSafeKey(opts.prefix);
|
|
195
240
|
const { fs, path } = await fsLazy.get();
|
|
196
|
-
const root = this.
|
|
241
|
+
const root = this.dir;
|
|
197
242
|
// Prefix may include a directory portion. We walk from root and filter.
|
|
198
243
|
const out = [];
|
|
199
244
|
const walk = async (rel) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilesystemObjectStorageBackend.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAe,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,6BAA6B,GAK9B,MAAM,2BAA2B,CAAC;AAgEnC,MAAM,uBAAuB,GAAG,KAAK,CAAC;AACtC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAErC;;;;;;;;;;;;;;GAcG;AACH;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG;IACzB,UAAU,EAAE,yBAAyB;IACrC,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,IAAI;IACf,mBAAmB,EAAE,IAAI;IACzB,uBAAuB,EAAE,IAAI;CACrB,CAAC;AAEX,MAAM,aAAa,GAAG,gBAAgB,CAAC,k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AAM,CAAC;IACjB,OAAO,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;AAC1E,CAAC"}
|
|
1
|
+
{"version":3,"file":"FilesystemObjectStorageBackend.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAe,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,6BAA6B,GAK9B,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,MAAM,uBAAuB,GAAG,KAAK,CAAC;AACtC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAErC;;;;;;;;;;;;;;GAcG;AACH;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG;IACzB,UAAU,EAAE,yBAAyB;IACrC,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,IAAI;IACf,mBAAmB,EAAE,IAAI;IACzB,uBAAuB,EAAE,IAAI;CACrB,CAAC;AAEX,MAAM,aAAa,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,SAAS,gBAAgB,CACvB,OAAsE,EACtE,IAAY,EACZ,QAAgB;IAEhB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,QAAQ,KAAK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C1E,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
2
|
+
export interface FilesystemObjectStorageOptionsType {
|
|
3
|
+
/** Root directory. Will be created (recursively) if it doesn't exist. */
|
|
4
|
+
readonly dir: string;
|
|
5
|
+
/**
|
|
6
|
+
* How long to wait when contending for a per-key write lock before
|
|
7
|
+
* giving up with `ObjectStorageBackendError`. Default 5_000 ms — long
|
|
8
|
+
* enough that legitimate contenders complete first, short enough that
|
|
9
|
+
* a stuck holder gets surfaced quickly.
|
|
10
|
+
*/
|
|
11
|
+
readonly lockTimeoutMs?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Lock files older than this are assumed stale (left behind by a
|
|
14
|
+
* crashed writer) and forcibly removed. Default 30_000 ms — well
|
|
15
|
+
* above the expected duration of any single `put`, so legitimate
|
|
16
|
+
* writers never get their lock yanked.
|
|
17
|
+
*/
|
|
18
|
+
readonly staleLockMs?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fluent builder for {@link FilesystemObjectStorageOptionsType}. `dir` is
|
|
22
|
+
* required by the backend:
|
|
23
|
+
*
|
|
24
|
+
* new FilesystemObjectStorageBackend(
|
|
25
|
+
* FilesystemObjectStorageOptions.create().withDir('/var/lib/actor-ts'),
|
|
26
|
+
* )
|
|
27
|
+
*/
|
|
28
|
+
export declare class FilesystemObjectStorageOptionsBuilder extends OptionsBuilder<FilesystemObjectStorageOptionsType> {
|
|
29
|
+
/** Start a fresh builder. Equivalent to `new FilesystemObjectStorageOptionsBuilder()`. */
|
|
30
|
+
static create(): FilesystemObjectStorageOptionsBuilder;
|
|
31
|
+
/** Root directory. Created recursively if it doesn't exist. */
|
|
32
|
+
withDir(dir: string): this;
|
|
33
|
+
/** How long to contend for a per-key write lock before giving up. Default 5_000 ms. */
|
|
34
|
+
withLockTimeoutMs(lockTimeoutMs: number): this;
|
|
35
|
+
/** Lock files older than this are treated as stale and forcibly removed. Default 30_000 ms. */
|
|
36
|
+
withStaleLockMs(staleLockMs: number): this;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Accepted input for the filesystem object-storage backend constructor: the fluent
|
|
40
|
+
* {@link FilesystemObjectStorageOptionsBuilder} OR a plain {@link FilesystemObjectStorageOptionsType} object.
|
|
41
|
+
*/
|
|
42
|
+
export type FilesystemObjectStorageOptions = FilesystemObjectStorageOptionsBuilder | Partial<FilesystemObjectStorageOptionsType>;
|
|
43
|
+
/** Value alias so `FilesystemObjectStorageOptions.create()` / `new FilesystemObjectStorageOptions()` resolve to the builder. */
|
|
44
|
+
export declare const FilesystemObjectStorageOptions: typeof FilesystemObjectStorageOptionsBuilder;
|
|
45
|
+
//# sourceMappingURL=FilesystemObjectStorageOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilesystemObjectStorageOptions.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,kCAAkC;IACjD,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,qCAAsC,SAAQ,cAAc,CAAC,kCAAkC,CAAC;IAC3G,2FAA2F;IAC3F,MAAM,CAAC,MAAM,IAAI,qCAAqC;IAItD,gEAAgE;IAChE,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,wFAAwF;IACxF,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IAI9C,gGAAgG;IAChG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAG3C;AAED;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,qCAAqC,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AACjI,gIAAgI;AAChI,eAAO,MAAM,8BAA8B,8CAAwC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Fluent builder for {@link FilesystemObjectStorageOptionsType}. `dir` is
|
|
4
|
+
* required by the backend:
|
|
5
|
+
*
|
|
6
|
+
* new FilesystemObjectStorageBackend(
|
|
7
|
+
* FilesystemObjectStorageOptions.create().withDir('/var/lib/actor-ts'),
|
|
8
|
+
* )
|
|
9
|
+
*/
|
|
10
|
+
export class FilesystemObjectStorageOptionsBuilder extends OptionsBuilder {
|
|
11
|
+
/** Start a fresh builder. Equivalent to `new FilesystemObjectStorageOptionsBuilder()`. */
|
|
12
|
+
static create() {
|
|
13
|
+
return new FilesystemObjectStorageOptionsBuilder();
|
|
14
|
+
}
|
|
15
|
+
/** Root directory. Created recursively if it doesn't exist. */
|
|
16
|
+
withDir(dir) {
|
|
17
|
+
return this.set('dir', dir);
|
|
18
|
+
}
|
|
19
|
+
/** How long to contend for a per-key write lock before giving up. Default 5_000 ms. */
|
|
20
|
+
withLockTimeoutMs(lockTimeoutMs) {
|
|
21
|
+
return this.set('lockTimeoutMs', lockTimeoutMs);
|
|
22
|
+
}
|
|
23
|
+
/** Lock files older than this are treated as stale and forcibly removed. Default 30_000 ms. */
|
|
24
|
+
withStaleLockMs(staleLockMs) {
|
|
25
|
+
return this.set('staleLockMs', staleLockMs);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Value alias so `FilesystemObjectStorageOptions.create()` / `new FilesystemObjectStorageOptions()` resolve to the builder. */
|
|
29
|
+
export const FilesystemObjectStorageOptions = FilesystemObjectStorageOptionsBuilder;
|
|
30
|
+
//# sourceMappingURL=FilesystemObjectStorageOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilesystemObjectStorageOptions.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAqB9D;;;;;;;GAOG;AACH,MAAM,OAAO,qCAAsC,SAAQ,cAAkD;IAC3G,2FAA2F;IAC3F,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qCAAqC,EAAE,CAAC;IACrD,CAAC;IAED,gEAAgE;IAChE,OAAO,CAAC,GAAW;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,wFAAwF;IACxF,iBAAiB,CAAC,aAAqB;QACrC,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAClD,CAAC;IAED,gGAAgG;IAChG,eAAe,CAAC,WAAmB;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF;AAOD,gIAAgI;AAChI,MAAM,CAAC,MAAM,8BAA8B,GAAG,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-SHA256 helpers for unencrypted body integrity (#116).
|
|
3
|
+
*
|
|
4
|
+
* Closes a gap in the wire format: AES-GCM's auth tag protects
|
|
5
|
+
* encrypted bodies against tampering, but `mode: 'none'` bodies (the
|
|
6
|
+
* default) had no integrity field. An attacker with write access to
|
|
7
|
+
* the object-storage backend could flip JSON bytes — including the
|
|
8
|
+
* `revision` digit used by DurableState's CAS — without detection.
|
|
9
|
+
*
|
|
10
|
+
* Fix: opt-in HMAC-SHA256 over the payload bytes, truncated to 16
|
|
11
|
+
* bytes (128-bit MAC strength), appended to the body and flagged in
|
|
12
|
+
* the manifest. Key is **separate** from the encryption master key
|
|
13
|
+
* (the threat is tampering, not confidentiality), held by the same
|
|
14
|
+
* deployment. Verification runs at the codec boundary before the
|
|
15
|
+
* payload is returned to the store layer.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to off so legacy bodies (no `FLAG_INTEGRITY_HMAC`) keep
|
|
18
|
+
* decoding cleanly. Operators opt in by setting the new
|
|
19
|
+
* `IntegrityConfig` on a `ObjectStorageDurableStateStore` (or the
|
|
20
|
+
* `integrity` option on a single call).
|
|
21
|
+
*/
|
|
22
|
+
/** Length of the HMAC key, in bytes. */
|
|
23
|
+
export declare const HMAC_KEY_LENGTH = 32;
|
|
24
|
+
/**
|
|
25
|
+
* Length of the truncated HMAC tag appended to bodies. Truncated
|
|
26
|
+
* SHA-256 stays well above the practical forgery threshold (128 bits =
|
|
27
|
+
* 2^128 attempts). Keeps the storage overhead constant at 16 bytes
|
|
28
|
+
* per body regardless of payload size.
|
|
29
|
+
*/
|
|
30
|
+
export declare const HMAC_TAG_LENGTH = 16;
|
|
31
|
+
/**
|
|
32
|
+
* Compute HMAC-SHA256 over `data` with `key`, truncated to
|
|
33
|
+
* {@link HMAC_TAG_LENGTH} bytes.
|
|
34
|
+
*/
|
|
35
|
+
export declare function hmacSha256(key: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
|
|
36
|
+
/**
|
|
37
|
+
* Constant-time comparison of two byte arrays. Avoids leaking the
|
|
38
|
+
* position of the first mismatch via timing. Returns `false` for
|
|
39
|
+
* length-mismatches as a fast-path (no information leak since length
|
|
40
|
+
* is part of the wire format).
|
|
41
|
+
*/
|
|
42
|
+
export declare function constantTimeEqual(a: Uint8Array, b: Uint8Array): boolean;
|
|
43
|
+
//# sourceMappingURL=Integrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Integrity.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/Integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wCAAwC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAalC;;;GAGG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAcvF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAKvE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-SHA256 helpers for unencrypted body integrity (#116).
|
|
3
|
+
*
|
|
4
|
+
* Closes a gap in the wire format: AES-GCM's auth tag protects
|
|
5
|
+
* encrypted bodies against tampering, but `mode: 'none'` bodies (the
|
|
6
|
+
* default) had no integrity field. An attacker with write access to
|
|
7
|
+
* the object-storage backend could flip JSON bytes — including the
|
|
8
|
+
* `revision` digit used by DurableState's CAS — without detection.
|
|
9
|
+
*
|
|
10
|
+
* Fix: opt-in HMAC-SHA256 over the payload bytes, truncated to 16
|
|
11
|
+
* bytes (128-bit MAC strength), appended to the body and flagged in
|
|
12
|
+
* the manifest. Key is **separate** from the encryption master key
|
|
13
|
+
* (the threat is tampering, not confidentiality), held by the same
|
|
14
|
+
* deployment. Verification runs at the codec boundary before the
|
|
15
|
+
* payload is returned to the store layer.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to off so legacy bodies (no `FLAG_INTEGRITY_HMAC`) keep
|
|
18
|
+
* decoding cleanly. Operators opt in by setting the new
|
|
19
|
+
* `IntegrityConfig` on a `ObjectStorageDurableStateStore` (or the
|
|
20
|
+
* `integrity` option on a single call).
|
|
21
|
+
*/
|
|
22
|
+
/** Length of the HMAC key, in bytes. */
|
|
23
|
+
export const HMAC_KEY_LENGTH = 32;
|
|
24
|
+
/**
|
|
25
|
+
* Length of the truncated HMAC tag appended to bodies. Truncated
|
|
26
|
+
* SHA-256 stays well above the practical forgery threshold (128 bits =
|
|
27
|
+
* 2^128 attempts). Keeps the storage overhead constant at 16 bytes
|
|
28
|
+
* per body regardless of payload size.
|
|
29
|
+
*/
|
|
30
|
+
export const HMAC_TAG_LENGTH = 16;
|
|
31
|
+
function getSubtle() {
|
|
32
|
+
const s = globalThis.crypto?.subtle;
|
|
33
|
+
if (!s) {
|
|
34
|
+
throw new Error('SubtleCrypto is not available in this runtime. Body integrity '
|
|
35
|
+
+ 'requires WebCrypto — Node 20+, Bun, or Deno.');
|
|
36
|
+
}
|
|
37
|
+
return s;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Compute HMAC-SHA256 over `data` with `key`, truncated to
|
|
41
|
+
* {@link HMAC_TAG_LENGTH} bytes.
|
|
42
|
+
*/
|
|
43
|
+
export async function hmacSha256(key, data) {
|
|
44
|
+
if (key.byteLength !== HMAC_KEY_LENGTH) {
|
|
45
|
+
throw new Error(`integrity key must be ${HMAC_KEY_LENGTH} bytes, got ${key.byteLength}`);
|
|
46
|
+
}
|
|
47
|
+
const subtle = getSubtle();
|
|
48
|
+
const cryptoKey = await subtle.importKey('raw', key, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
|
|
49
|
+
const sig = await subtle.sign('HMAC', cryptoKey, data);
|
|
50
|
+
return new Uint8Array(sig).subarray(0, HMAC_TAG_LENGTH);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Constant-time comparison of two byte arrays. Avoids leaking the
|
|
54
|
+
* position of the first mismatch via timing. Returns `false` for
|
|
55
|
+
* length-mismatches as a fast-path (no information leak since length
|
|
56
|
+
* is part of the wire format).
|
|
57
|
+
*/
|
|
58
|
+
export function constantTimeEqual(a, b) {
|
|
59
|
+
if (a.length !== b.length)
|
|
60
|
+
return false;
|
|
61
|
+
let diff = 0;
|
|
62
|
+
for (let i = 0; i < a.length; i++)
|
|
63
|
+
diff |= a[i] ^ b[i];
|
|
64
|
+
return diff === 0;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=Integrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Integrity.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/Integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,SAAS,SAAS;IAChB,MAAM,CAAC,GAAI,UAAU,CAAC,MAA6B,EAAE,MAAM,CAAC;IAC5D,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CACb,iEAAiE;cAC/D,8CAA8C,CACjD,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAe,EAAE,IAAgB;IAChE,IAAI,GAAG,CAAC,UAAU,KAAK,eAAe,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,eAAe,eAAe,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,SAAS,CACtC,KAAK,EACL,GAA8B,EAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EACjC,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;IACF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAA+B,CAAC,CAAC;IAClF,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAa,EAAE,CAAa;IAC5D,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IACzD,OAAO,IAAI,KAAK,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { PersistenceExtension } from '../PersistenceExtension.js';
|
|
|
2
2
|
import { ObjectStorageDurableStateStore } from '../durable-state-stores/ObjectStorageDurableStateStore.js';
|
|
3
3
|
import { type S3Credentials } from './S3ObjectStorageBackend.js';
|
|
4
4
|
import type { ObjectStorageBackend } from './ObjectStorageBackend.js';
|
|
5
|
-
import
|
|
5
|
+
import type { ObjectStoragePluginOptions } from './ObjectStoragePluginOptions.js';
|
|
6
6
|
/** Canonical plugin IDs registered by `registerObjectStoragePlugins`. */
|
|
7
7
|
export declare const OBJECT_STORAGE_SNAPSHOT_PLUGIN_ID = "actor-ts.persistence.snapshot-store.object-storage";
|
|
8
8
|
export declare const OBJECT_STORAGE_DURABLE_STATE_PLUGIN_ID = "actor-ts.persistence.durable-state.object-storage";
|
|
@@ -26,22 +26,6 @@ export type ObjectStorageBackendSpec = {
|
|
|
26
26
|
readonly kind: 'custom';
|
|
27
27
|
readonly backend: ObjectStorageBackend;
|
|
28
28
|
};
|
|
29
|
-
export interface ObjectStoragePluginOptions {
|
|
30
|
-
/** Plugin ID under which the snapshot store is registered. */
|
|
31
|
-
readonly snapshotPluginId?: string;
|
|
32
|
-
/** Plugin ID for the durable-state store. */
|
|
33
|
-
readonly durableStatePluginId?: string;
|
|
34
|
-
/** Backend definition — filesystem, S3, or custom. */
|
|
35
|
-
readonly backend: ObjectStorageBackendSpec;
|
|
36
|
-
/** Key prefix prepended to every object — e.g. `'env-prod/'`. */
|
|
37
|
-
readonly prefix?: string;
|
|
38
|
-
/** Snapshot history retention; `0` disables pruning. Default: 3. */
|
|
39
|
-
readonly keepN?: number;
|
|
40
|
-
/** Compression config or per-pid resolver. Default: gzip. */
|
|
41
|
-
readonly compression?: CompressionConfig | CompressionResolver;
|
|
42
|
-
/** Encryption config or per-pid resolver. Default: none. */
|
|
43
|
-
readonly encryption?: EncryptionConfig | EncryptionResolver;
|
|
44
|
-
}
|
|
45
29
|
export interface ObjectStoragePluginHandles {
|
|
46
30
|
/** The shared backend — both stores write through this. */
|
|
47
31
|
readonly backend: ObjectStorageBackend;
|
|
@@ -75,11 +59,11 @@ export interface ObjectStoragePluginHandles {
|
|
|
75
59
|
* Example:
|
|
76
60
|
*
|
|
77
61
|
* const ext = system.extension(PersistenceExtensionId);
|
|
78
|
-
* const { durableStateStore } = await registerObjectStoragePlugins(ext,
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
62
|
+
* const { durableStateStore } = await registerObjectStoragePlugins(ext,
|
|
63
|
+
* ObjectStoragePluginOptions.create()
|
|
64
|
+
* .withBackend({ kind: 's3', bucket: 'my-app', region: 'eu-central-1' })
|
|
65
|
+
* .withCompression({ algorithm: 'zstd' })
|
|
66
|
+
* .withEncryption(encryptionByPrefix({ default: { mode: 'sse-s3' } })));
|
|
83
67
|
* // ... and to make the snapshot plugin active:
|
|
84
68
|
* // actor-ts.persistence.snapshot-store.plugin = "actor-ts.persistence.snapshot-store.object-storage"
|
|
85
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectStoragePlugin.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/ObjectStoragePlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAK3G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BAAoB,CAAC;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CA0BrC;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -30,30 +30,35 @@ export const OBJECT_STORAGE_DURABLE_STATE_PLUGIN_ID = 'actor-ts.persistence.dura
|
|
|
30
30
|
* Example:
|
|
31
31
|
*
|
|
32
32
|
* const ext = system.extension(PersistenceExtensionId);
|
|
33
|
-
* const { durableStateStore } = await registerObjectStoragePlugins(ext,
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* const { durableStateStore } = await registerObjectStoragePlugins(ext,
|
|
34
|
+
* ObjectStoragePluginOptions.create()
|
|
35
|
+
* .withBackend({ kind: 's3', bucket: 'my-app', region: 'eu-central-1' })
|
|
36
|
+
* .withCompression({ algorithm: 'zstd' })
|
|
37
|
+
* .withEncryption(encryptionByPrefix({ default: { mode: 'sse-s3' } })));
|
|
38
38
|
* // ... and to make the snapshot plugin active:
|
|
39
39
|
* // actor-ts.persistence.snapshot-store.plugin = "actor-ts.persistence.snapshot-store.object-storage"
|
|
40
40
|
*/
|
|
41
41
|
export async function registerObjectStoragePlugins(ext, options) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
const s = options;
|
|
43
|
+
if (s.backend === undefined)
|
|
44
|
+
throw new Error('registerObjectStoragePlugins: backend is required (call withBackend()).');
|
|
45
|
+
await validateObjectStoragePeerDeps(s);
|
|
46
|
+
const backend = buildBackend(s.backend);
|
|
47
|
+
const snapshotId = s.snapshotPluginId ?? OBJECT_STORAGE_SNAPSHOT_PLUGIN_ID;
|
|
48
|
+
ext.registerSnapshotStore(snapshotId, (_system) => {
|
|
49
|
+
return new ObjectStorageSnapshotStore({
|
|
50
|
+
backend,
|
|
51
|
+
...(s.prefix !== undefined ? { prefix: s.prefix } : {}),
|
|
52
|
+
...(s.keepN !== undefined ? { keepN: s.keepN } : {}),
|
|
53
|
+
...(s.compression !== undefined ? { compression: s.compression } : {}),
|
|
54
|
+
...(s.encryption !== undefined ? { encryption: s.encryption } : {}),
|
|
55
|
+
});
|
|
56
|
+
});
|
|
52
57
|
const durableStateStore = new ObjectStorageDurableStateStore({
|
|
53
58
|
backend,
|
|
54
|
-
prefix:
|
|
55
|
-
compression:
|
|
56
|
-
encryption:
|
|
59
|
+
...(s.prefix !== undefined ? { prefix: s.prefix } : {}),
|
|
60
|
+
...(s.compression !== undefined ? { compression: s.compression } : {}),
|
|
61
|
+
...(s.encryption !== undefined ? { encryption: s.encryption } : {}),
|
|
57
62
|
});
|
|
58
63
|
return { backend, durableStateStore };
|
|
59
64
|
}
|
|
@@ -63,9 +68,10 @@ export async function registerObjectStoragePlugins(ext, options) {
|
|
|
63
68
|
* actually registering the plugin.
|
|
64
69
|
*/
|
|
65
70
|
export async function validateObjectStoragePeerDeps(options) {
|
|
71
|
+
const s = options;
|
|
66
72
|
// Compression: probe each algorithm at most once.
|
|
67
73
|
const algos = new Set();
|
|
68
|
-
for (const cfg of collectCompressionConfigs(
|
|
74
|
+
for (const cfg of collectCompressionConfigs(s.compression)) {
|
|
69
75
|
algos.add(cfg.algorithm);
|
|
70
76
|
}
|
|
71
77
|
for (const algo of algos) {
|
|
@@ -74,7 +80,7 @@ export async function validateObjectStoragePeerDeps(options) {
|
|
|
74
80
|
// Encryption: WebCrypto is needed for the client-aes256-gcm mode
|
|
75
81
|
// (HKDF + AES-GCM go through SubtleCrypto). The server-side modes
|
|
76
82
|
// — sse-s3, sse-kms — are header pass-throughs and need nothing.
|
|
77
|
-
const encConfigs = collectEncryptionConfigs(
|
|
83
|
+
const encConfigs = collectEncryptionConfigs(s.encryption);
|
|
78
84
|
if (encConfigs.some((c) => c.mode === 'client-aes256-gcm')) {
|
|
79
85
|
await probeEncryptionAvailability();
|
|
80
86
|
}
|
|
@@ -99,14 +105,16 @@ function collectEncryptionConfigs(e) {
|
|
|
99
105
|
}
|
|
100
106
|
function buildBackend(spec) {
|
|
101
107
|
switch (spec.kind) {
|
|
102
|
-
case 'filesystem':
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
case 'filesystem':
|
|
109
|
+
return new FilesystemObjectStorageBackend({ dir: spec.dir });
|
|
110
|
+
case 's3':
|
|
111
|
+
return new S3ObjectStorageBackend({
|
|
112
|
+
bucket: spec.bucket,
|
|
113
|
+
region: spec.region,
|
|
114
|
+
...(spec.endpoint !== undefined ? { endpoint: spec.endpoint } : {}),
|
|
115
|
+
...(spec.forcePathStyle !== undefined ? { forcePathStyle: spec.forcePathStyle } : {}),
|
|
116
|
+
...(spec.credentials !== undefined ? { credentials: spec.credentials } : {}),
|
|
117
|
+
});
|
|
110
118
|
case 'custom': return spec.backend;
|
|
111
119
|
}
|
|
112
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectStoragePlugin.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/ObjectStoragePlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAC3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,8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