actor-ts 0.9.0 → 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 +408 -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorSystem.d.ts","sourceRoot":"","sources":["../src/ActorSystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAsB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"ActorSystem.d.ts","sourceRoot":"","sources":["../src/ActorSystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAsB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EACL,UAAU,EAIX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,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AC,GAAG,CAAC,GAAG,IAAI;CAO7C"}
|
package/dist/ActorSystem.js
CHANGED
|
@@ -69,8 +69,8 @@ export class ActorSystem {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
/** Create a new actor system. */
|
|
72
|
-
static create(name = 'default',
|
|
73
|
-
return new ActorSystem(name,
|
|
72
|
+
static create(name = 'default', options = {}) {
|
|
73
|
+
return new ActorSystem(name, options);
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Convenience shortcut for `system.extensions.get(id)` — the one-liner
|
package/dist/ActorSystem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorSystem.js","sourceRoot":"","sources":["../src/ActorSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAe,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActorSystem.js","sourceRoot":"","sources":["../src/ActorSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAe,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAoC,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM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AAc;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;QACxD,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;QAC/D,CAAC,CAAC,WAAW,CAAC;IAChB,OAAO,KAAK,CAAC,IAAI,CAAC;SACf,IAAI,CAAC,WAAW,EAAG,GAAG,EAAE,CAAC,IAAI,mBAAmB,EAAgB,CAAC;SACjE,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE;QACvB,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC;YACxD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC;YACjD,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,IAAI,oBAAoB,CAAC,CAAC,CAAe,CAAC;IACnD,CAAC,CAAC;SACD,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,mBAAmB,EAAgB,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluent builder for {@link ActorSystemOptionsType}, passed to
|
|
3
|
+
* {@link ActorSystem.create}:
|
|
4
|
+
*
|
|
5
|
+
* const sys = ActorSystem.create('my-app', ActorSystemOptions.create()
|
|
6
|
+
* .withLogger(new NoopLogger())
|
|
7
|
+
* .withLogLevel(LogLevel.Off));
|
|
8
|
+
*
|
|
9
|
+
* The system name stays a positional argument to `create`; everything else
|
|
10
|
+
* is set here. `build()` yields a `Partial<ActorSystemOptionsType>` that feeds
|
|
11
|
+
* the same resolution as before (explicit code overrides > HOCON >
|
|
12
|
+
* reference defaults).
|
|
13
|
+
*/
|
|
14
|
+
import type { Config } from './config/Config.js';
|
|
15
|
+
import type { ConfigObject } from './config/HoconParser.js';
|
|
16
|
+
import type { Dispatcher } from './Dispatcher.js';
|
|
17
|
+
import type { Logger, LogLevel } from './Logger.js';
|
|
18
|
+
import type { Scheduler } from './Scheduler.js';
|
|
19
|
+
import type { Journal } from './persistence/Journal.js';
|
|
20
|
+
import type { SnapshotStore } from './persistence/SnapshotStore.js';
|
|
21
|
+
import { OptionsBuilder } from './util/OptionsBuilder.js';
|
|
22
|
+
/** Plain settings-object shape accepted by {@link ActorSystem.create}. */
|
|
23
|
+
export interface ActorSystemOptionsType {
|
|
24
|
+
readonly logger?: Logger;
|
|
25
|
+
readonly logLevel?: LogLevel;
|
|
26
|
+
readonly dispatcher?: Dispatcher;
|
|
27
|
+
/** Inject a custom scheduler — typically a ManualScheduler in tests. */
|
|
28
|
+
readonly scheduler?: Scheduler;
|
|
29
|
+
/**
|
|
30
|
+
* Application config. Accepts:
|
|
31
|
+
* - a prebuilt `Config` (highest precedence layered on top of reference);
|
|
32
|
+
* - a plain JS object of overrides (converted via Config.fromObject);
|
|
33
|
+
* - omitted — reference defaults + `application.conf` in CWD are used.
|
|
34
|
+
* Constructor settings (`logger`, `logLevel`, `dispatcher`) still win
|
|
35
|
+
* over anything in config — they are explicit code overrides.
|
|
36
|
+
*/
|
|
37
|
+
readonly config?: Config | ConfigObject;
|
|
38
|
+
/** Explicit path to `application.conf`; overrides `ACTOR_TS_CONFIG` + CWD lookup. */
|
|
39
|
+
readonly configFile?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Persistence overrides — wire a real journal / snapshot store at
|
|
42
|
+
* system creation time instead of reaching into the extension after
|
|
43
|
+
* the fact. Either field is independent; omit one to keep the
|
|
44
|
+
* in-memory default for that slot.
|
|
45
|
+
*
|
|
46
|
+
* Equivalent to:
|
|
47
|
+
* const sys = ActorSystem.create(name);
|
|
48
|
+
* sys.extension(PersistenceExtensionId).setJournal(journal);
|
|
49
|
+
* sys.extension(PersistenceExtensionId).setSnapshotStore(snapshotStore);
|
|
50
|
+
*/
|
|
51
|
+
readonly persistence?: {
|
|
52
|
+
readonly journal?: Journal;
|
|
53
|
+
readonly snapshotStore?: SnapshotStore;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export declare class ActorSystemOptionsBuilder<T extends ActorSystemOptionsType = ActorSystemOptionsType> extends OptionsBuilder<T> {
|
|
57
|
+
/** Start a fresh builder. Equivalent to `new ActorSystemOptionsBuilder()`. */
|
|
58
|
+
static create(): ActorSystemOptionsBuilder;
|
|
59
|
+
/**
|
|
60
|
+
* The `as keyof T` / `as T[keyof T]` casts keep these setters writable once
|
|
61
|
+
* against the generic `T extends ActorSystemOptionsType`, so a subclass builder
|
|
62
|
+
* (e.g. `TestKitOptionsBuilder`) inherits them for its own settings type — the same
|
|
63
|
+
* pattern as `BrokerOptionsBuilder<T>` / `LeaseOptions<T>`. Concrete callers stay
|
|
64
|
+
* type-safe because each method's argument type is concrete.
|
|
65
|
+
*/
|
|
66
|
+
/** System logger. Overrides the HOCON/console default. */
|
|
67
|
+
withLogger(logger: Logger): this;
|
|
68
|
+
/** Minimum log level for the default console logger (ignored if `withLogger` is set). */
|
|
69
|
+
withLogLevel(logLevel: LogLevel): this;
|
|
70
|
+
/** Custom dispatcher for the system's default mailbox scheduling. */
|
|
71
|
+
withDispatcher(dispatcher: Dispatcher): this;
|
|
72
|
+
/** Custom scheduler — typically a ManualScheduler in tests. */
|
|
73
|
+
withScheduler(scheduler: Scheduler): this;
|
|
74
|
+
/** Application config — a prebuilt `Config` or a plain object of overrides. */
|
|
75
|
+
withConfig(config: Config | ConfigObject): this;
|
|
76
|
+
/** Explicit path to `application.conf` (overrides `ACTOR_TS_CONFIG` + CWD lookup). */
|
|
77
|
+
withConfigFile(configFile: string): this;
|
|
78
|
+
/** Wire a real journal / snapshot store at system creation time. */
|
|
79
|
+
withPersistence(persistence: NonNullable<ActorSystemOptionsType['persistence']>): this;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Accepted input for {@link ActorSystem.create}: the fluent
|
|
83
|
+
* {@link ActorSystemOptionsBuilder} OR a plain {@link ActorSystemOptionsType}
|
|
84
|
+
* object. The union is the default (non-generic) instantiation; subclass
|
|
85
|
+
* builders (e.g. `TestKitOptionsBuilder`) still parametrize
|
|
86
|
+
* {@link ActorSystemOptionsBuilder} with their own settings type.
|
|
87
|
+
*/
|
|
88
|
+
export type ActorSystemOptions = ActorSystemOptionsBuilder<ActorSystemOptionsType> | Partial<ActorSystemOptionsType>;
|
|
89
|
+
/** Value alias so `ActorSystemOptions.create()` / `new ActorSystemOptions()` resolve to the builder. */
|
|
90
|
+
export declare const ActorSystemOptions: typeof ActorSystemOptionsBuilder;
|
|
91
|
+
//# sourceMappingURL=ActorSystemOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActorSystemOptions.d.ts","sourceRoot":"","sources":["../src/ActorSystemOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,wEAAwE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 -0,0 +1,45 @@
|
|
|
1
|
+
import { OptionsBuilder } from './util/OptionsBuilder.js';
|
|
2
|
+
export class ActorSystemOptionsBuilder extends OptionsBuilder {
|
|
3
|
+
/** Start a fresh builder. Equivalent to `new ActorSystemOptionsBuilder()`. */
|
|
4
|
+
static create() {
|
|
5
|
+
return new ActorSystemOptionsBuilder();
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The `as keyof T` / `as T[keyof T]` casts keep these setters writable once
|
|
9
|
+
* against the generic `T extends ActorSystemOptionsType`, so a subclass builder
|
|
10
|
+
* (e.g. `TestKitOptionsBuilder`) inherits them for its own settings type — the same
|
|
11
|
+
* pattern as `BrokerOptionsBuilder<T>` / `LeaseOptions<T>`. Concrete callers stay
|
|
12
|
+
* type-safe because each method's argument type is concrete.
|
|
13
|
+
*/
|
|
14
|
+
/** System logger. Overrides the HOCON/console default. */
|
|
15
|
+
withLogger(logger) {
|
|
16
|
+
return this.set('logger', logger);
|
|
17
|
+
}
|
|
18
|
+
/** Minimum log level for the default console logger (ignored if `withLogger` is set). */
|
|
19
|
+
withLogLevel(logLevel) {
|
|
20
|
+
return this.set('logLevel', logLevel);
|
|
21
|
+
}
|
|
22
|
+
/** Custom dispatcher for the system's default mailbox scheduling. */
|
|
23
|
+
withDispatcher(dispatcher) {
|
|
24
|
+
return this.set('dispatcher', dispatcher);
|
|
25
|
+
}
|
|
26
|
+
/** Custom scheduler — typically a ManualScheduler in tests. */
|
|
27
|
+
withScheduler(scheduler) {
|
|
28
|
+
return this.set('scheduler', scheduler);
|
|
29
|
+
}
|
|
30
|
+
/** Application config — a prebuilt `Config` or a plain object of overrides. */
|
|
31
|
+
withConfig(config) {
|
|
32
|
+
return this.set('config', config);
|
|
33
|
+
}
|
|
34
|
+
/** Explicit path to `application.conf` (overrides `ACTOR_TS_CONFIG` + CWD lookup). */
|
|
35
|
+
withConfigFile(configFile) {
|
|
36
|
+
return this.set('configFile', configFile);
|
|
37
|
+
}
|
|
38
|
+
/** Wire a real journal / snapshot store at system creation time. */
|
|
39
|
+
withPersistence(persistence) {
|
|
40
|
+
return this.set('persistence', persistence);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Value alias so `ActorSystemOptions.create()` / `new ActorSystemOptions()` resolve to the builder. */
|
|
44
|
+
export const ActorSystemOptions = ActorSystemOptionsBuilder;
|
|
45
|
+
//# sourceMappingURL=ActorSystemOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActorSystemOptions.js","sourceRoot":"","sources":["../src/ActorSystemOptions.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAqC1D,MAAM,OAAO,yBAAqF,SAAQ,cAAiB;IACzH,+EAA+E;IAC/E,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,yBAAyB,EAAE,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IAEH,2DAA2D;IAC3D,UAAU,CAAC,MAAc;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,QAAmB,EAAE,MAAoB,CAAC,CAAC;IAC7D,CAAC;IAED,yFAAyF;IACzF,YAAY,CAAC,QAAkB;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,UAAqB,EAAE,QAAsB,CAAC,CAAC;IACjE,CAAC;IAED,qEAAqE;IACrE,cAAc,CAAC,UAAsB;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,YAAuB,EAAE,UAAwB,CAAC,CAAC;IACrE,CAAC;IAED,+DAA+D;IAC/D,aAAa,CAAC,SAAoB;QAChC,OAAO,IAAI,CAAC,GAAG,CAAC,WAAsB,EAAE,SAAuB,CAAC,CAAC;IACnE,CAAC;IAED,+EAA+E;IAC/E,UAAU,CAAC,MAA6B;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,QAAmB,EAAE,MAAoB,CAAC,CAAC;IAC7D,CAAC;IAED,sFAAsF;IACtF,cAAc,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,YAAuB,EAAE,UAAwB,CAAC,CAAC;IACrE,CAAC;IAED,oEAAoE;IACpE,eAAe,CAAC,WAA+D;QAC7E,OAAO,IAAI,CAAC,GAAG,CAAC,aAAwB,EAAE,WAAyB,CAAC,CAAC;IACvE,CAAC;CACF;AAUD,wGAAwG;AACxG,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC"}
|
package/dist/Logger.d.ts
CHANGED
|
@@ -54,4 +54,67 @@ export declare class NoopLogger implements Logger {
|
|
|
54
54
|
withSource(): Logger;
|
|
55
55
|
withFields(): Logger;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Where a `JsonLogger` writes its records — by default `process.stdout`,
|
|
59
|
+
* a `'\n'`-delimited stream that `jq`, `vector`, `fluent-bit`, the
|
|
60
|
+
* Docker logging driver, and the Kubernetes log scraper all consume
|
|
61
|
+
* out of the box. Inject a custom sink in tests (capturing array) or
|
|
62
|
+
* to route to `process.stderr` / a file descriptor.
|
|
63
|
+
*/
|
|
64
|
+
export interface JsonLogSink {
|
|
65
|
+
write(line: string): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Structured-logging logger that emits one **`\n`-delimited JSON object
|
|
69
|
+
* per record** to `process.stdout` (or an injected `JsonLogSink`).
|
|
70
|
+
*
|
|
71
|
+
* Each record always carries the four core fields — `ts`, `level`,
|
|
72
|
+
* `source`, and `msg` — followed by the merged static + dynamic MDC
|
|
73
|
+
* (static from `withFields`, dynamic from `LogContext.run`, with
|
|
74
|
+
* dynamic winning on key collision to match the "innermost scope wins"
|
|
75
|
+
* intuition). Extra positional `...args` from
|
|
76
|
+
* `log.info(msg, extra1, extra2)` go under an `args` array; the common
|
|
77
|
+
* shape `log.info('processed', { items: 42 })` simply puts `{items:42}`
|
|
78
|
+
* into `args[0]` so log aggregators can index nested keys.
|
|
79
|
+
*
|
|
80
|
+
* Wire it in at system construction:
|
|
81
|
+
*
|
|
82
|
+
* const system = ActorSystem.create('my-app', ActorSystemOptions.create().withLogger(new JsonLogger()));
|
|
83
|
+
*
|
|
84
|
+
* Output (one line, line-wrapped here for readability):
|
|
85
|
+
*
|
|
86
|
+
* {"ts":"2026-05-14T12:34:56.789Z","level":"info",
|
|
87
|
+
* "source":"actor-ts://my-app/user/order",
|
|
88
|
+
* "msg":"placing order",
|
|
89
|
+
* "correlationId":"abc-123","userId":"user-42",
|
|
90
|
+
* "args":[{"items":42}]}
|
|
91
|
+
*
|
|
92
|
+
* No pretty-printing, no colour codes, no level-prefix shorthand —
|
|
93
|
+
* machine-readable by design. For human-readable text logs use the
|
|
94
|
+
* default `ConsoleLogger`; for OTel-pipeline ingestion bridge a
|
|
95
|
+
* `JsonLogger`-equivalent via `otelLogger({ api })`.
|
|
96
|
+
*
|
|
97
|
+
* **Error rendering.** Pass an `Error` and the logger serialises
|
|
98
|
+
* `name`, `message`, and `stack` (the bare object would otherwise
|
|
99
|
+
* become `"{}"` because `Error`'s own enumerable surface is empty).
|
|
100
|
+
*
|
|
101
|
+
* **JSON-safety.** Values are sent through `JSON.stringify` with a
|
|
102
|
+
* replacer that handles `BigInt`, circular references, and
|
|
103
|
+
* `undefined`/function values gracefully — a log call never throws.
|
|
104
|
+
*/
|
|
105
|
+
export declare class JsonLogger implements Logger {
|
|
106
|
+
level: LogLevel;
|
|
107
|
+
private readonly source;
|
|
108
|
+
private readonly staticFields;
|
|
109
|
+
private readonly sink;
|
|
110
|
+
constructor(level?: LogLevel, source?: string, staticFields?: LogContextData, sink?: JsonLogSink);
|
|
111
|
+
private enabled;
|
|
112
|
+
private emit;
|
|
113
|
+
debug(msg: string, ...args: unknown[]): void;
|
|
114
|
+
info(msg: string, ...args: unknown[]): void;
|
|
115
|
+
warn(msg: string, ...args: unknown[]): void;
|
|
116
|
+
error(msg: string, ...args: unknown[]): void;
|
|
117
|
+
withSource(source: string): Logger;
|
|
118
|
+
withFields(fields: LogContextData): Logger;
|
|
119
|
+
}
|
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AAM,GAAG,IAAI,CAAC;CAC3B;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,UAAW,YAAW,MAAM;IAE9B,KAAK,EAAE,QAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAHd,KAAK,GAAE,QAAwB,EACrB,MAAM,GAAE,MAAW,EACnB,YAAY,GAAE,cAAmB,EACjC,IAAI,GAAE,WAAwB;IAGjD,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,IAAI;IA0BZ,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAC5C,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAC3C,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAC3C,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAE5C,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIlC,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;CAG3C"}
|
package/dist/Logger.js
CHANGED
|
@@ -71,6 +71,152 @@ export class NoopLogger {
|
|
|
71
71
|
withSource() { return this; }
|
|
72
72
|
withFields() { return this; }
|
|
73
73
|
}
|
|
74
|
+
const stdoutSink = {
|
|
75
|
+
write(line) {
|
|
76
|
+
if (typeof process !== 'undefined' && process.stdout && typeof process.stdout.write === 'function') {
|
|
77
|
+
process.stdout.write(line);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// Browser / non-Node fallback — drop to console so the records
|
|
81
|
+
// are still observable somewhere.
|
|
82
|
+
console.log(line.endsWith('\n') ? line.slice(0, -1) : line);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const LEVEL_TAG = {
|
|
87
|
+
[LogLevel.Debug]: 'debug',
|
|
88
|
+
[LogLevel.Info]: 'info',
|
|
89
|
+
[LogLevel.Warn]: 'warn',
|
|
90
|
+
[LogLevel.Error]: 'error',
|
|
91
|
+
[LogLevel.Off]: 'off',
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Structured-logging logger that emits one **`\n`-delimited JSON object
|
|
95
|
+
* per record** to `process.stdout` (or an injected `JsonLogSink`).
|
|
96
|
+
*
|
|
97
|
+
* Each record always carries the four core fields — `ts`, `level`,
|
|
98
|
+
* `source`, and `msg` — followed by the merged static + dynamic MDC
|
|
99
|
+
* (static from `withFields`, dynamic from `LogContext.run`, with
|
|
100
|
+
* dynamic winning on key collision to match the "innermost scope wins"
|
|
101
|
+
* intuition). Extra positional `...args` from
|
|
102
|
+
* `log.info(msg, extra1, extra2)` go under an `args` array; the common
|
|
103
|
+
* shape `log.info('processed', { items: 42 })` simply puts `{items:42}`
|
|
104
|
+
* into `args[0]` so log aggregators can index nested keys.
|
|
105
|
+
*
|
|
106
|
+
* Wire it in at system construction:
|
|
107
|
+
*
|
|
108
|
+
* const system = ActorSystem.create('my-app', ActorSystemOptions.create().withLogger(new JsonLogger()));
|
|
109
|
+
*
|
|
110
|
+
* Output (one line, line-wrapped here for readability):
|
|
111
|
+
*
|
|
112
|
+
* {"ts":"2026-05-14T12:34:56.789Z","level":"info",
|
|
113
|
+
* "source":"actor-ts://my-app/user/order",
|
|
114
|
+
* "msg":"placing order",
|
|
115
|
+
* "correlationId":"abc-123","userId":"user-42",
|
|
116
|
+
* "args":[{"items":42}]}
|
|
117
|
+
*
|
|
118
|
+
* No pretty-printing, no colour codes, no level-prefix shorthand —
|
|
119
|
+
* machine-readable by design. For human-readable text logs use the
|
|
120
|
+
* default `ConsoleLogger`; for OTel-pipeline ingestion bridge a
|
|
121
|
+
* `JsonLogger`-equivalent via `otelLogger({ api })`.
|
|
122
|
+
*
|
|
123
|
+
* **Error rendering.** Pass an `Error` and the logger serialises
|
|
124
|
+
* `name`, `message`, and `stack` (the bare object would otherwise
|
|
125
|
+
* become `"{}"` because `Error`'s own enumerable surface is empty).
|
|
126
|
+
*
|
|
127
|
+
* **JSON-safety.** Values are sent through `JSON.stringify` with a
|
|
128
|
+
* replacer that handles `BigInt`, circular references, and
|
|
129
|
+
* `undefined`/function values gracefully — a log call never throws.
|
|
130
|
+
*/
|
|
131
|
+
export class JsonLogger {
|
|
132
|
+
level;
|
|
133
|
+
source;
|
|
134
|
+
staticFields;
|
|
135
|
+
sink;
|
|
136
|
+
constructor(level = LogLevel.Info, source = '', staticFields = {}, sink = stdoutSink) {
|
|
137
|
+
this.level = level;
|
|
138
|
+
this.source = source;
|
|
139
|
+
this.staticFields = staticFields;
|
|
140
|
+
this.sink = sink;
|
|
141
|
+
}
|
|
142
|
+
enabled(target) {
|
|
143
|
+
return target >= this.level;
|
|
144
|
+
}
|
|
145
|
+
emit(level, msg, args) {
|
|
146
|
+
if (!this.enabled(level))
|
|
147
|
+
return;
|
|
148
|
+
const record = {
|
|
149
|
+
ts: new Date().toISOString(),
|
|
150
|
+
level: LEVEL_TAG[level],
|
|
151
|
+
...(this.source ? { source: this.source } : {}),
|
|
152
|
+
msg,
|
|
153
|
+
...this.staticFields,
|
|
154
|
+
...LogContext.get(),
|
|
155
|
+
};
|
|
156
|
+
if (args.length > 0) {
|
|
157
|
+
record['args'] = args.map(normaliseArg);
|
|
158
|
+
}
|
|
159
|
+
let line;
|
|
160
|
+
try {
|
|
161
|
+
line = JSON.stringify(record, jsonSafeReplacer());
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
// Replacer should already handle everything we hit; this is the
|
|
165
|
+
// last-ditch "the user did something truly weird" path. Drop
|
|
166
|
+
// the args, keep the core record so the log line still appears.
|
|
167
|
+
const { args: _drop, ...core } = record;
|
|
168
|
+
line = JSON.stringify(core);
|
|
169
|
+
}
|
|
170
|
+
this.sink.write(line + '\n');
|
|
171
|
+
}
|
|
172
|
+
debug(msg, ...args) { this.emit(LogLevel.Debug, msg, args); }
|
|
173
|
+
info(msg, ...args) { this.emit(LogLevel.Info, msg, args); }
|
|
174
|
+
warn(msg, ...args) { this.emit(LogLevel.Warn, msg, args); }
|
|
175
|
+
error(msg, ...args) { this.emit(LogLevel.Error, msg, args); }
|
|
176
|
+
withSource(source) {
|
|
177
|
+
return new JsonLogger(this.level, source, this.staticFields, this.sink);
|
|
178
|
+
}
|
|
179
|
+
withFields(fields) {
|
|
180
|
+
return new JsonLogger(this.level, this.source, { ...this.staticFields, ...fields }, this.sink);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Turn an `Error` into a plain object so `JSON.stringify` doesn't
|
|
185
|
+
* collapse it to `"{}"` (Error's enumerable surface is empty).
|
|
186
|
+
* Other values pass through unchanged — the replacer handles
|
|
187
|
+
* remaining quirks (BigInt, circular).
|
|
188
|
+
*/
|
|
189
|
+
function normaliseArg(v) {
|
|
190
|
+
if (v instanceof Error) {
|
|
191
|
+
return {
|
|
192
|
+
name: v.name,
|
|
193
|
+
message: v.message,
|
|
194
|
+
...(v.stack ? { stack: v.stack } : {}),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
return v;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* JSON.stringify replacer:
|
|
201
|
+
* - BigInt → string (BigInt can't be JSON-serialised natively)
|
|
202
|
+
* - circular → `'[Circular]'`
|
|
203
|
+
* - function → undefined (drop)
|
|
204
|
+
*/
|
|
205
|
+
function jsonSafeReplacer() {
|
|
206
|
+
const seen = new WeakSet();
|
|
207
|
+
return function (_key, value) {
|
|
208
|
+
if (typeof value === 'bigint')
|
|
209
|
+
return value.toString();
|
|
210
|
+
if (typeof value === 'function')
|
|
211
|
+
return undefined;
|
|
212
|
+
if (value !== null && typeof value === 'object') {
|
|
213
|
+
if (seen.has(value))
|
|
214
|
+
return '[Circular]';
|
|
215
|
+
seen.add(value);
|
|
216
|
+
}
|
|
217
|
+
return value;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
74
220
|
function formatValue(v) {
|
|
75
221
|
if (typeof v === 'string')
|
|
76
222
|
return v;
|
package/dist/Logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../src/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,iBAAiB,CAAC;AAElE,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,yCAAS,CAAA;IACT,uCAAQ,CAAA;IACR,uCAAQ,CAAA;IACR,yCAAS,CAAA;IACT,uCAAS,CAAA;AACX,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAoBD,MAAM,OAAO,aAAa;IAEf;IACU;IACA;IAHnB,YACS,QAAkB,QAAQ,CAAC,IAAI,EACrB,SAAiB,EAAE,EACnB,eAA+B,EAAE;QAF3C,UAAK,GAAL,KAAK,CAA0B;QACrB,WAAM,GAAN,MAAM,CAAa;QACnB,iBAAY,GAAZ,YAAY,CAAqB;IACjD,CAAC;IAEI,OAAO,CAAC,MAAgB;QAC9B,OAAO,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;;;;;OAMG;IACK,MAAM,CAAC,GAAW,EAAE,GAAW;QACrC,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM;YACtB,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,MAAM,GAAG,EAAE;YAC1C,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,YAA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;;;;GAKG;AACH,SAAS,gBAAgB;IACvB,MAAM,IAAI,GAAG,IAAI,OAAO,EAAU,CAAC;IACnC,OAAO,UAAU,IAAI,EAAE,KAAK;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvD,IAAI,OAAO,KAAK,KAAK,UAAU;YAAE,OAAO,SAAS,CAAC;QAClD,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAChD,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;gBAAE,OAAO,YAAY,CAAC;YACzC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,CAAU;IAC7B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACpC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Option } from '../util/Option.js';
|
|
2
2
|
import { type Cache } from './Cache.js';
|
|
3
|
+
import type { MemcachedCacheOptions } from './MemcachedCacheOptions.js';
|
|
3
4
|
/**
|
|
4
5
|
* Memcached-backed `Cache` — wraps `memjs` (pure-JS memcached client,
|
|
5
6
|
* tiny, well-maintained). Useful for shops with existing memcached
|
|
@@ -20,17 +21,6 @@ import { type Cache } from './Cache.js';
|
|
|
20
21
|
* transient errors; `incr` and `setIfAbsent` propagate so callers can
|
|
21
22
|
* detect lost atomicity.
|
|
22
23
|
*/
|
|
23
|
-
export interface MemcachedCacheOptions {
|
|
24
|
-
/** Comma-separated server list, e.g. `'localhost:11211'`. Default: `'localhost:11211'`. */
|
|
25
|
-
readonly servers?: string;
|
|
26
|
-
/** Optional username/password for SASL auth. */
|
|
27
|
-
readonly username?: string;
|
|
28
|
-
readonly password?: string;
|
|
29
|
-
/** Optional key prefix (server-side, applied to every operation). */
|
|
30
|
-
readonly keyPrefix?: string;
|
|
31
|
-
/** Pre-built memjs client — bypass internal construction. */
|
|
32
|
-
readonly client?: MemcachedClientLike;
|
|
33
|
-
}
|
|
34
24
|
/** Subset of `memjs.Client` we use. memjs uses Buffer; we always pass strings. */
|
|
35
25
|
export interface MemcachedClientLike {
|
|
36
26
|
get(key: string): Promise<{
|
|
@@ -56,7 +46,7 @@ export declare class MemcachedCache implements Cache {
|
|
|
56
46
|
private readonly clientLazy;
|
|
57
47
|
private readonly keyPrefix;
|
|
58
48
|
private closed;
|
|
59
|
-
constructor(
|
|
49
|
+
constructor(options?: MemcachedCacheOptions);
|
|
60
50
|
get<V>(key: string): Promise<Option<V>>;
|
|
61
51
|
set<V>(key: string, value: V, ttlMs?: number): Promise<void>;
|
|
62
52
|
incr(key: string, ttlMs?: number): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemcachedCache.d.ts","sourceRoot":"","sources":["../../src/cache/MemcachedCache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"MemcachedCache.d.ts","sourceRoot":"","sources":["../../src/cache/MemcachedCache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAA6B,MAAM,4BAA4B,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mFAA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,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe5D,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAyBlD,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBvE,MAAM,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAaxC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IA6B7D,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBvE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B,OAAO,CAAC,CAAC;CAIV;AAyCD,eAAO,MAAM,sBAAsB,uBAAsC,CAAC"}
|
|
@@ -7,7 +7,8 @@ export class MemcachedCache {
|
|
|
7
7
|
clientLazy;
|
|
8
8
|
keyPrefix;
|
|
9
9
|
closed = false;
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(options = {}) {
|
|
11
|
+
const opts = options;
|
|
11
12
|
this.keyPrefix = opts.keyPrefix ?? '';
|
|
12
13
|
this.clientLazy = Lazy.of(async () => {
|
|
13
14
|
if (opts.client)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemcachedCache.js","sourceRoot":"","sources":["../../src/cache/MemcachedCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,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,SAAS,GAA2B,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE;IAC3D,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,OAAO,CAAC;QACrB,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAClB,kFAAkF,EAClF,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../util/OptionsBuilder.js';
|
|
2
|
+
import type { MemcachedClientLike } from './MemcachedCache.js';
|
|
3
|
+
/** Plain settings-object shape accepted by a {@link MemcachedCache}. */
|
|
4
|
+
export interface MemcachedCacheOptionsType {
|
|
5
|
+
/** Comma-separated server list, e.g. `'localhost:11211'`. Default: `'localhost:11211'`. */
|
|
6
|
+
readonly servers?: string;
|
|
7
|
+
/** Optional username/password for SASL auth. */
|
|
8
|
+
readonly username?: string;
|
|
9
|
+
readonly password?: string;
|
|
10
|
+
/** Optional key prefix (server-side, applied to every operation). */
|
|
11
|
+
readonly keyPrefix?: string;
|
|
12
|
+
/** Pre-built memjs client — bypass internal construction. */
|
|
13
|
+
readonly client?: MemcachedClientLike;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Fluent builder for {@link MemcachedCacheOptionsType}:
|
|
17
|
+
*
|
|
18
|
+
* new MemcachedCache(MemcachedCacheOptions.create().withServers('localhost:11211').withKeyPrefix('app:'))
|
|
19
|
+
*/
|
|
20
|
+
export declare class MemcachedCacheOptionsBuilder extends OptionsBuilder<MemcachedCacheOptionsType> {
|
|
21
|
+
/** Start a fresh builder. Equivalent to `new MemcachedCacheOptionsBuilder()`. */
|
|
22
|
+
static create(): MemcachedCacheOptionsBuilder;
|
|
23
|
+
/** Comma-separated server list, e.g. `'localhost:11211'`. Default: `'localhost:11211'`. */
|
|
24
|
+
withServers(servers: string): this;
|
|
25
|
+
/** Username / password for SASL auth. */
|
|
26
|
+
withCredentials(username: string, password: string): this;
|
|
27
|
+
/** Key prefix applied server-side to every operation. */
|
|
28
|
+
withKeyPrefix(prefix: string): this;
|
|
29
|
+
/** Pre-built memjs client — bypass internal construction. */
|
|
30
|
+
withClient(client: MemcachedClientLike): this;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Accepted input for the {@link MemcachedCache} constructor: the fluent
|
|
34
|
+
* {@link MemcachedCacheOptionsBuilder} OR a plain
|
|
35
|
+
* {@link MemcachedCacheOptionsType} object.
|
|
36
|
+
*/
|
|
37
|
+
export type MemcachedCacheOptions = MemcachedCacheOptionsBuilder | Partial<MemcachedCacheOptionsType>;
|
|
38
|
+
/** Value alias so `MemcachedCacheOptions.create()` / `new MemcachedCacheOptions()` resolve to the builder. */
|
|
39
|
+
export declare const MemcachedCacheOptions: typeof MemcachedCacheOptionsBuilder;
|
|
40
|
+
//# sourceMappingURL=MemcachedCacheOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemcachedCacheOptions.d.ts","sourceRoot":"","sources":["../../src/cache/MemcachedCacheOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,yBAAyB,CAAC;IACzF,kFAAkF;IAClF,MAAM,CAAC,MAAM,IAAI,4BAA4B;IAI7C,4FAA4F;IAC5F,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIlC,yCAAyC;IACzC,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKzD,yDAAyD;IACzD,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAInC,6DAA6D;IAC7D,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;CAG9C;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACtG,8GAA8G;AAC9G,eAAO,MAAM,qBAAqB,qCAA+B,CAAC"}
|