@daiso-tech/core 0.27.0 → 0.28.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/README.md +10 -10
- package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +57 -19
- package/dist/async/utilities/lazy-promise/lazy-promise.js +93 -52
- package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
- package/dist/async/utilities/retry/retry-or-fail.d.ts +2 -0
- package/dist/async/utilities/retry/retry-or-fail.js.map +1 -1
- package/dist/cache/contracts/cache.contract.d.ts +98 -14
- package/dist/cache/implementations/adapters/_module-exports.d.ts +1 -0
- package/dist/cache/implementations/adapters/_module-exports.js +1 -0
- package/dist/cache/implementations/adapters/_module-exports.js.map +1 -1
- package/dist/cache/implementations/adapters/no-op-cache-adapter/_module.d.ts +1 -0
- package/dist/cache/implementations/adapters/no-op-cache-adapter/_module.js +2 -0
- package/dist/cache/implementations/adapters/no-op-cache-adapter/_module.js.map +1 -0
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +23 -0
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +41 -0
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +2 -3
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/cache.d.ts +250 -45
- package/dist/cache/implementations/derivables/cache/cache.js +256 -28
- package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.d.ts +20 -17
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js +33 -19
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +4 -20
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +7 -4
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +1 -1
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +21 -36
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +24 -17
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.d.ts +57 -14
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js +61 -13
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js.map +1 -1
- package/dist/lock/contracts/lock-provider.contract.d.ts +19 -5
- package/dist/lock/contracts/lock.contract.d.ts +37 -8
- package/dist/lock/implementations/adapters/_module-exports.d.ts +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js.map +1 -1
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.d.ts +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js +2 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js.map +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.d.ts +17 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js +24 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js.map +1 -0
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.d.ts +2 -3
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +130 -62
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +134 -44
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +238 -0
- package/dist/lock/implementations/derivables/lock-provider/lock.js +258 -0
- package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.d.ts +75 -9
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js +85 -7
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js +162 -8
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js.map +1 -1
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.d.ts +1 -0
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js +1 -0
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js.map +1 -1
- package/dist/utilities/_module-exports.d.ts +1 -1
- package/dist/utilities/_module-exports.js +1 -1
- package/dist/utilities/_module-exports.js.map +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.js +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -1
- package/dist/utilities/{_constants.d.ts → constants.d.ts} +0 -3
- package/dist/utilities/constants.js +5 -0
- package/dist/utilities/constants.js.map +1 -0
- package/dist/utilities/contracts/_module.d.ts +2 -1
- package/dist/utilities/contracts/_module.js +2 -1
- package/dist/utilities/contracts/_module.js.map +1 -1
- package/dist/utilities/contracts/sqlite-database.contract.d.ts +26 -0
- package/dist/utilities/contracts/sqlite-database.contract.js +5 -0
- package/dist/utilities/contracts/sqlite-database.contract.js.map +1 -0
- package/dist/utilities/functions.d.ts +4 -0
- package/dist/utilities/functions.js +10 -4
- package/dist/utilities/functions.js.map +1 -1
- package/dist/utilities/types.d.ts +4 -4
- package/package.json +1 -1
- package/dist/utilities/_constants.js +0 -8
- package/dist/utilities/_constants.js.map +0 -1
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* @module EventBus
|
|
3
3
|
*/
|
|
4
4
|
import type { BackoffPolicy, RetryPolicy } from "../../../../async/_module-exports.js";
|
|
5
|
-
import { type
|
|
6
|
-
import { type EventBusSettingsBase } from "../../../../event-bus/implementations/derivables/event-bus/
|
|
5
|
+
import { type IGroupableEventBus, type IEventBusFactory, type BaseEvent } from "../../../../event-bus/contracts/_module-exports.js";
|
|
6
|
+
import { type EventBusAdapterFactoryable, type EventBusSettingsBase } from "../../../../event-bus/implementations/derivables/event-bus/_module.js";
|
|
7
7
|
import type { KeyPrefixer, TimeSpan } from "../../../../utilities/_module-exports.js";
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* IMPORT_PATH: ```"@daiso-tech/core/event-bus"```
|
|
11
11
|
* @group Derivables
|
|
12
12
|
*/
|
|
13
|
-
export type EventBusAdapters<TAdapters extends string = string> = Partial<Record<TAdapters,
|
|
13
|
+
export type EventBusAdapters<TAdapters extends string = string> = Partial<Record<TAdapters, EventBusAdapterFactoryable>>;
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
* IMPORT_PATH: ```"@daiso-tech/core/event-bus"```
|
|
@@ -27,28 +27,70 @@ export type EventBusFactorySettings<TAdapters extends string = string> = EventBu
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class EventBusFactory<TAdapters extends string = string> implements IEventBusFactory<TAdapters> {
|
|
29
29
|
private readonly settings;
|
|
30
|
+
/**
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { type IEventBusAdapter, BaseEvent } from "@daiso-tech/core/event-bus/contracts";
|
|
34
|
+
* import { EventBusFactory } from "@daiso-tech/core/event-bus";
|
|
35
|
+
* import { MemoryEventBusAdapter, RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
36
|
+
* import { KeyPrefixer, type IFactoryObject, type Promiseable, type FactoryFn } from "@daiso-tech/utilities";
|
|
37
|
+
* import { Serde } from "@daiso-tech/core/serde";
|
|
38
|
+
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
39
|
+
* import Redis from "ioredis";
|
|
40
|
+
*
|
|
41
|
+
* type Store = Partial<Record<string, IEventBusAdapter>> = {};
|
|
42
|
+
*
|
|
43
|
+
* async function cahceAdapterFactory(store: Store): FactoryFn<string, IEventBusAdapter> {
|
|
44
|
+
* return (prefix) => {
|
|
45
|
+
* let adapter = store[prefix];
|
|
46
|
+
* if (adapter === undefined) {
|
|
47
|
+
* adapter = new MemoryEventBusAdapter();
|
|
48
|
+
* store[prefix] = adapter;
|
|
49
|
+
* }
|
|
50
|
+
* return adapter;
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
*
|
|
54
|
+
* const serde = new Serde(new SuperJsonSerdeAdapter());
|
|
55
|
+
* const store: Store = {};
|
|
56
|
+
* const eventBusFactory = new EventBusFactory({
|
|
57
|
+
* keyPrefixer: new KeyPrefixer("event-bus"),
|
|
58
|
+
* adapters: {
|
|
59
|
+
* memory: new MemoryEventBusAdapter(),
|
|
60
|
+
* memoryFactory: cahceAdapterFactory(store),
|
|
61
|
+
* redis: new RedisPubSubEventBusAdapter({
|
|
62
|
+
* serde,
|
|
63
|
+
* dispatcherClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
64
|
+
* listenerClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
65
|
+
* }),
|
|
66
|
+
* },
|
|
67
|
+
* defaultAdapter: "memory"
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
30
71
|
constructor(settings: EventBusFactorySettings<TAdapters>);
|
|
31
72
|
setKeyPrefixer(keyPrefixer: KeyPrefixer): EventBusFactory<TAdapters>;
|
|
32
73
|
setRetryAttempts(attempts: number): EventBusFactory<TAdapters>;
|
|
33
74
|
setBackoffPolicy(policy: BackoffPolicy): EventBusFactory<TAdapters>;
|
|
34
75
|
setRetryPolicy(policy: RetryPolicy): EventBusFactory<TAdapters>;
|
|
35
|
-
|
|
76
|
+
setRetryTimeout(timeout: TimeSpan): EventBusFactory<TAdapters>;
|
|
77
|
+
setTotalTimeout(timeout: TimeSpan): EventBusFactory<TAdapters>;
|
|
36
78
|
/**
|
|
37
79
|
* @example
|
|
38
80
|
* ```ts
|
|
39
81
|
* import { type IEventBusAdapter, BaseEvent } from "@daiso-tech/core/event-bus/contracts";
|
|
40
82
|
* import { EventBusFactory } from "@daiso-tech/core/event-bus";
|
|
41
83
|
* import { MemoryEventBusAdapter, RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
42
|
-
* import { KeyPrefixer, type IFactoryObject, type Promiseable } from "@daiso-tech/utilities";
|
|
84
|
+
* import { KeyPrefixer, type IFactoryObject, type Promiseable, type FactoryFn } from "@daiso-tech/utilities";
|
|
43
85
|
* import { Serde } from "@daiso-tech/core/serde";
|
|
44
86
|
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
45
87
|
* import Redis from "ioredis";
|
|
46
88
|
*
|
|
47
|
-
*
|
|
48
|
-
* private store: Partial<Record<string, IEventBusAdapter>> = {};
|
|
89
|
+
* type Store = Partial<Record<string, IEventBusAdapter>> = {};
|
|
49
90
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
91
|
+
* async function cahceAdapterFactory(store: Store): FactoryFn<string, IEventBusAdapter> {
|
|
92
|
+
* return (prefix) => {
|
|
93
|
+
* let adapter = store[prefix];
|
|
52
94
|
* if (adapter === undefined) {
|
|
53
95
|
* adapter = new MemoryEventBusAdapter();
|
|
54
96
|
* store[prefix] = adapter;
|
|
@@ -60,15 +102,16 @@ export declare class EventBusFactory<TAdapters extends string = string> implemen
|
|
|
60
102
|
* const dispatcherClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
61
103
|
* const listenerClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
62
104
|
* const serde = new Serde(new SuperJsonSerdeAdapter());
|
|
105
|
+
* const store: Store = {};
|
|
63
106
|
* const eventBusFactory = new EventBusFactory({
|
|
64
107
|
* keyPrefixer: new KeyPrefixer("event-bus"),
|
|
65
108
|
* adapters: {
|
|
66
109
|
* memory: new MemoryEventBusAdapter(),
|
|
67
|
-
*
|
|
110
|
+
* memoryFactory: cahceAdapterFactory(store),
|
|
68
111
|
* redis: new RedisPubSubEventBusAdapter({
|
|
69
112
|
* serde,
|
|
70
|
-
* dispatcherClient,
|
|
71
|
-
* listenerClient,
|
|
113
|
+
* dispatcherClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
114
|
+
* listenerClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
72
115
|
* }),
|
|
73
116
|
* },
|
|
74
117
|
* defaultAdapter: "memory"
|
|
@@ -89,7 +132,7 @@ export declare class EventBusFactory<TAdapters extends string = string> implemen
|
|
|
89
132
|
* // You can change the default settings of the returned EventBus instance.
|
|
90
133
|
* await eventBusFactory
|
|
91
134
|
* .setRetryAttempts(4)
|
|
92
|
-
* .use("
|
|
135
|
+
* .use("memoryFactory")
|
|
93
136
|
* .dispatch(new AddEvent({ a: 1, b: 2 }));
|
|
94
137
|
*
|
|
95
138
|
* // You can reuse the settings
|
|
@@ -102,7 +145,7 @@ export declare class EventBusFactory<TAdapters extends string = string> implemen
|
|
|
102
145
|
*
|
|
103
146
|
* // You can extend the settings
|
|
104
147
|
* const extendedEventBusFactory = retryableEventBusFactory
|
|
105
|
-
* .
|
|
148
|
+
* .setRetryTimeout(TimeSpan.fromSeconds(1));
|
|
106
149
|
*
|
|
107
150
|
* await extendedEventBusFactory
|
|
108
151
|
* .use()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module EventBus
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../event-bus/contracts/_module-exports.js";
|
|
5
|
-
import { EventBus, } from "../../../../event-bus/implementations/derivables/event-bus/
|
|
5
|
+
import { EventBus, } from "../../../../event-bus/implementations/derivables/event-bus/_module.js";
|
|
6
6
|
import { DefaultAdapterNotDefinedError, UnregisteredAdapterError, } from "../../../../utilities/_module-exports.js";
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -11,6 +11,47 @@ import { DefaultAdapterNotDefinedError, UnregisteredAdapterError, } from "../../
|
|
|
11
11
|
*/
|
|
12
12
|
export class EventBusFactory {
|
|
13
13
|
settings;
|
|
14
|
+
/**
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { type IEventBusAdapter, BaseEvent } from "@daiso-tech/core/event-bus/contracts";
|
|
18
|
+
* import { EventBusFactory } from "@daiso-tech/core/event-bus";
|
|
19
|
+
* import { MemoryEventBusAdapter, RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
20
|
+
* import { KeyPrefixer, type IFactoryObject, type Promiseable, type FactoryFn } from "@daiso-tech/utilities";
|
|
21
|
+
* import { Serde } from "@daiso-tech/core/serde";
|
|
22
|
+
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
23
|
+
* import Redis from "ioredis";
|
|
24
|
+
*
|
|
25
|
+
* type Store = Partial<Record<string, IEventBusAdapter>> = {};
|
|
26
|
+
*
|
|
27
|
+
* async function cahceAdapterFactory(store: Store): FactoryFn<string, IEventBusAdapter> {
|
|
28
|
+
* return (prefix) => {
|
|
29
|
+
* let adapter = store[prefix];
|
|
30
|
+
* if (adapter === undefined) {
|
|
31
|
+
* adapter = new MemoryEventBusAdapter();
|
|
32
|
+
* store[prefix] = adapter;
|
|
33
|
+
* }
|
|
34
|
+
* return adapter;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* const serde = new Serde(new SuperJsonSerdeAdapter());
|
|
39
|
+
* const store: Store = {};
|
|
40
|
+
* const eventBusFactory = new EventBusFactory({
|
|
41
|
+
* keyPrefixer: new KeyPrefixer("event-bus"),
|
|
42
|
+
* adapters: {
|
|
43
|
+
* memory: new MemoryEventBusAdapter(),
|
|
44
|
+
* memoryFactory: cahceAdapterFactory(store),
|
|
45
|
+
* redis: new RedisPubSubEventBusAdapter({
|
|
46
|
+
* serde,
|
|
47
|
+
* dispatcherClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
48
|
+
* listenerClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
49
|
+
* }),
|
|
50
|
+
* },
|
|
51
|
+
* defaultAdapter: "memory"
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
14
55
|
constructor(settings) {
|
|
15
56
|
this.settings = settings;
|
|
16
57
|
}
|
|
@@ -38,10 +79,16 @@ export class EventBusFactory {
|
|
|
38
79
|
retryPolicy: policy,
|
|
39
80
|
});
|
|
40
81
|
}
|
|
41
|
-
|
|
82
|
+
setRetryTimeout(timeout) {
|
|
83
|
+
return new EventBusFactory({
|
|
84
|
+
...this.settings,
|
|
85
|
+
retryTimeout: timeout,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
setTotalTimeout(timeout) {
|
|
42
89
|
return new EventBusFactory({
|
|
43
90
|
...this.settings,
|
|
44
|
-
timeout,
|
|
91
|
+
totalTimeout: timeout,
|
|
45
92
|
});
|
|
46
93
|
}
|
|
47
94
|
/**
|
|
@@ -50,16 +97,16 @@ export class EventBusFactory {
|
|
|
50
97
|
* import { type IEventBusAdapter, BaseEvent } from "@daiso-tech/core/event-bus/contracts";
|
|
51
98
|
* import { EventBusFactory } from "@daiso-tech/core/event-bus";
|
|
52
99
|
* import { MemoryEventBusAdapter, RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
53
|
-
* import { KeyPrefixer, type IFactoryObject, type Promiseable } from "@daiso-tech/utilities";
|
|
100
|
+
* import { KeyPrefixer, type IFactoryObject, type Promiseable, type FactoryFn } from "@daiso-tech/utilities";
|
|
54
101
|
* import { Serde } from "@daiso-tech/core/serde";
|
|
55
102
|
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
56
103
|
* import Redis from "ioredis";
|
|
57
104
|
*
|
|
58
|
-
*
|
|
59
|
-
* private store: Partial<Record<string, IEventBusAdapter>> = {};
|
|
105
|
+
* type Store = Partial<Record<string, IEventBusAdapter>> = {};
|
|
60
106
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
107
|
+
* async function cahceAdapterFactory(store: Store): FactoryFn<string, IEventBusAdapter> {
|
|
108
|
+
* return (prefix) => {
|
|
109
|
+
* let adapter = store[prefix];
|
|
63
110
|
* if (adapter === undefined) {
|
|
64
111
|
* adapter = new MemoryEventBusAdapter();
|
|
65
112
|
* store[prefix] = adapter;
|
|
@@ -71,15 +118,16 @@ export class EventBusFactory {
|
|
|
71
118
|
* const dispatcherClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
72
119
|
* const listenerClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
73
120
|
* const serde = new Serde(new SuperJsonSerdeAdapter());
|
|
121
|
+
* const store: Store = {};
|
|
74
122
|
* const eventBusFactory = new EventBusFactory({
|
|
75
123
|
* keyPrefixer: new KeyPrefixer("event-bus"),
|
|
76
124
|
* adapters: {
|
|
77
125
|
* memory: new MemoryEventBusAdapter(),
|
|
78
|
-
*
|
|
126
|
+
* memoryFactory: cahceAdapterFactory(store),
|
|
79
127
|
* redis: new RedisPubSubEventBusAdapter({
|
|
80
128
|
* serde,
|
|
81
|
-
* dispatcherClient,
|
|
82
|
-
* listenerClient,
|
|
129
|
+
* dispatcherClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
130
|
+
* listenerClient: new Redis("YOUR_REDIS_CONNECTION_STRING"),
|
|
83
131
|
* }),
|
|
84
132
|
* },
|
|
85
133
|
* defaultAdapter: "memory"
|
|
@@ -100,7 +148,7 @@ export class EventBusFactory {
|
|
|
100
148
|
* // You can change the default settings of the returned EventBus instance.
|
|
101
149
|
* await eventBusFactory
|
|
102
150
|
* .setRetryAttempts(4)
|
|
103
|
-
* .use("
|
|
151
|
+
* .use("memoryFactory")
|
|
104
152
|
* .dispatch(new AddEvent({ a: 1, b: 2 }));
|
|
105
153
|
*
|
|
106
154
|
* // You can reuse the settings
|
|
@@ -113,7 +161,7 @@ export class EventBusFactory {
|
|
|
113
161
|
*
|
|
114
162
|
* // You can extend the settings
|
|
115
163
|
* const extendedEventBusFactory = retryableEventBusFactory
|
|
116
|
-
* .
|
|
164
|
+
* .setRetryTimeout(TimeSpan.fromSeconds(1));
|
|
117
165
|
*
|
|
118
166
|
* await extendedEventBusFactory
|
|
119
167
|
* .use()
|
package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAIN,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACH,QAAQ,GAGX,MAAM,6DAA6D,CAAC;AAErE,OAAO,EACH,6BAA6B,EAC7B,wBAAwB,GAC3B,MAAM,gCAAgC,CAAC;AAuBxC;;;;GAIG;AACH,MAAM,OAAO,eAAe;IA6CH;IA1CrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,YACqB,QAA4C;QAA5C,aAAQ,GAAR,QAAQ,CAAoC;IAC9D,CAAC;IAEJ,cAAc,CAAC,WAAwB;QACnC,OAAO,IAAI,eAAe,CAAC;YACvB,GAAG,IAAI,CAAC,QAAQ;YAChB,WAAW;SACd,CAAC,CAAC;IACP,CAAC;IAED,gBAAgB,CAAC,QAAgB;QAC7B,OAAO,IAAI,eAAe,CAAC;YACvB,GAAG,I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ock, ILockListenable } from "../../lock/contracts/lock.contract.
|
|
|
9
9
|
* @group Contracts
|
|
10
10
|
*/
|
|
11
11
|
export type LockProviderCreateSettings = {
|
|
12
|
+
/**
|
|
13
|
+
* You can also provide a <i>settings.ttl</i> value using. If not specified it defaults to null, meaning no TTL is applied.
|
|
14
|
+
*/
|
|
12
15
|
ttl?: TimeSpan | null;
|
|
16
|
+
/**
|
|
17
|
+
* You can provide a custom owner. If not specified a unique owner will be generated by default.
|
|
18
|
+
*/
|
|
13
19
|
owner?: OneOrMore<string>;
|
|
14
20
|
};
|
|
15
21
|
/**
|
|
16
|
-
* The <i>ILockProvider</i> contract defines a way for managing locks independent of the underlying technology.
|
|
17
|
-
* It commes with more convient methods compared to <i>ILockAdapter</i>.
|
|
18
22
|
*
|
|
19
23
|
* IMPORT_PATH: ```"@daiso-tech/core/lock/contracts"```
|
|
20
24
|
* @group Contracts
|
|
21
25
|
*/
|
|
22
|
-
export type
|
|
26
|
+
export type ILockProviderBase = {
|
|
23
27
|
/**
|
|
24
28
|
* The <i>create</i> method is used to create an instance of <i>{@link ILock}</i>.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* @param key - can be a string or an <i>Iterable</i> of strings.
|
|
31
|
+
* If it's an <i>Iterable</i>, it will be joined into a single string.
|
|
32
|
+
* Think of an <i>Iterable</i> as representing a path.
|
|
27
33
|
*/
|
|
28
34
|
create(key: OneOrMore<string>, settings?: LockProviderCreateSettings): ILock;
|
|
29
35
|
/**
|
|
@@ -31,6 +37,14 @@ export type ILockProvider = ILockListenable & {
|
|
|
31
37
|
*/
|
|
32
38
|
getGroup(): string | null;
|
|
33
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* The <i>ILockProvider</i> contract defines a way for managing locks independent of the underlying technology.
|
|
42
|
+
* It commes with more convient methods compared to <i>ILockAdapter</i>.
|
|
43
|
+
*
|
|
44
|
+
* IMPORT_PATH: ```"@daiso-tech/core/lock/contracts"```
|
|
45
|
+
* @group Contracts
|
|
46
|
+
*/
|
|
47
|
+
export type ILockProvider = ILockListenable & ILockProviderBase;
|
|
34
48
|
/**
|
|
35
49
|
* The <i>IGroupableLockProvider</i> contract defines a way for managing locks independent of the underlying technology.
|
|
36
50
|
* It commes with one extra method which is useful for multitennat applications compared to <i>{@link ILockProvider}</i>.
|
|
@@ -13,6 +13,11 @@ import type { LockEvents } from "../../lock/contracts/lock.events.js";
|
|
|
13
13
|
* @group Contracts
|
|
14
14
|
*/
|
|
15
15
|
export type ILockListenable = IEventListenable<LockEvents>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* IMPORT_PATH: ```"@daiso-tech/core/lock/contracts"```
|
|
19
|
+
* @group Contracts
|
|
20
|
+
*/
|
|
16
21
|
export type AquireBlockingSettings = {
|
|
17
22
|
time?: TimeSpan;
|
|
18
23
|
interval?: TimeSpan;
|
|
@@ -24,37 +29,57 @@ export type AquireBlockingSettings = {
|
|
|
24
29
|
*/
|
|
25
30
|
export type ILock = ILockListenable & {
|
|
26
31
|
/**
|
|
27
|
-
* The <i>run</i> method wraps an async function or <i>{@link LazyPromise}</i> with the <i>acquire</i> and <i>release</i> method.
|
|
32
|
+
* The <i>run</i> method wraps an function, async function or <i>{@link LazyPromise}</i> with the <i>acquire</i> and <i>release</i> method.
|
|
28
33
|
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
29
34
|
* @throws {UnableToReleaseLockError} {@link UnableToReleaseLockError}
|
|
30
35
|
*/
|
|
31
36
|
run<TValue = void>(asyncFn: LazyPromiseable<TValue>): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
|
|
32
37
|
/**
|
|
33
|
-
* The <i>runOrFail</i> method wraps an async function or <i>{@link LazyPromise}</i> with the <i>acquireOrFail</i> and <i>release</i> method.
|
|
38
|
+
* The <i>runOrFail</i> method wraps an function, async function or <i>{@link LazyPromise}</i> with the <i>acquireOrFail</i> and <i>release</i> method.
|
|
34
39
|
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
35
40
|
* @throws {UnableToReleaseLockError} {@link UnableToReleaseLockError}
|
|
36
41
|
* @throws {KeyAlreadyAcquiredLockError} {@link KeyAlreadyAcquiredLockError}
|
|
37
42
|
*/
|
|
38
43
|
runOrFail<TValue = void>(asyncFn: LazyPromiseable<TValue>): LazyPromise<TValue>;
|
|
39
44
|
/**
|
|
40
|
-
* The <i>runBlocking</i> method wraps an async function or <i>{@link LazyPromise}</i> with the <i>acquireBlocking</i> and <i>release</i> method.
|
|
45
|
+
* The <i>runBlocking</i> method wraps an function, async function or <i>{@link LazyPromise}</i> with the <i>acquireBlocking</i> and <i>release</i> method.
|
|
41
46
|
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
42
47
|
* @throws {UnableToReleaseLockError} {@link UnableToReleaseLockError}
|
|
43
48
|
*/
|
|
44
49
|
runBlocking<TValue = void>(asyncFn: LazyPromiseable<TValue>, settings?: AquireBlockingSettings): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
|
|
50
|
+
/**
|
|
51
|
+
* The <i>runBlockingOrFail</i> method wraps an function, async function or <i>{@link LazyPromise}</i> with the <i>acquireBlockingOrFail</i> and <i>release</i> method.
|
|
52
|
+
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
53
|
+
* @throws {UnableToReleaseLockError} {@link UnableToReleaseLockError}
|
|
54
|
+
* @throws {KeyAlreadyAcquiredLockError} {@link KeyAlreadyAcquiredLockError}
|
|
55
|
+
*/
|
|
56
|
+
runBlockingOrFail<TValue = void>(asyncFn: LazyPromiseable<TValue>, settings?: AquireBlockingSettings): LazyPromise<TValue>;
|
|
45
57
|
/**
|
|
46
58
|
* The <i>acquire</i> method acquires a lock only if the lock is not already acquired.
|
|
47
|
-
*
|
|
59
|
+
*
|
|
60
|
+
* @returns true if the lock is already acquired otherwise false is returned.
|
|
61
|
+
*
|
|
48
62
|
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
49
63
|
*/
|
|
50
64
|
acquire(): LazyPromise<boolean>;
|
|
51
65
|
/**
|
|
52
66
|
* The <i>acquireBlocking</i> method acquires a lock only if the lock is not already acquired.
|
|
53
67
|
* If the lock is acquired, it retries every <i>settings.interval</i> until <i>settings.time</i> is reached.
|
|
54
|
-
*
|
|
68
|
+
*
|
|
69
|
+
* @returns true if the lock is already acquired otherwise false is returned.
|
|
70
|
+
*
|
|
55
71
|
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
56
72
|
*/
|
|
57
73
|
acquireBlocking(settings?: AquireBlockingSettings): LazyPromise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* The <i>acquireBlockingOrFail</i> method acquires a lock only if the lock is not already acquired.
|
|
76
|
+
* If the lock is acquired, it retries every <i>settings.interval</i> until <i>settings.time</i> is reached.
|
|
77
|
+
* Throws an error if not lock cannot be acquired after the given <i>settings.time</i>.
|
|
78
|
+
*
|
|
79
|
+
* @throws {UnableToAquireLockError} {@link UnableToAquireLockError}
|
|
80
|
+
* @throws {KeyAlreadyAcquiredLockError} {@link KeyAlreadyAcquiredLockError}
|
|
81
|
+
*/
|
|
82
|
+
acquireBlockingOrFail(settings?: AquireBlockingSettings): LazyPromise<void>;
|
|
58
83
|
/**
|
|
59
84
|
* The <i>acquireOrFail</i> method acquires a lock only if the lock is not already acquired.
|
|
60
85
|
* Throws an error if already acquired.
|
|
@@ -64,7 +89,9 @@ export type ILock = ILockListenable & {
|
|
|
64
89
|
acquireOrFail(): LazyPromise<void>;
|
|
65
90
|
/**
|
|
66
91
|
* The <i>release</i> method releases a lock if owned by the same owner.
|
|
67
|
-
*
|
|
92
|
+
*
|
|
93
|
+
* @returns true if the lock is released otherwise false is returned.
|
|
94
|
+
*
|
|
68
95
|
* @throws {UnableToReleaseLockError} {@link UnableToReleaseLockError}
|
|
69
96
|
*/
|
|
70
97
|
release(): LazyPromise<boolean>;
|
|
@@ -90,7 +117,8 @@ export type ILock = ILockListenable & {
|
|
|
90
117
|
isLocked(): LazyPromise<boolean>;
|
|
91
118
|
/**
|
|
92
119
|
* The <i>refresh</i> method updates the TTL of the lock if owned by the same owner.
|
|
93
|
-
*
|
|
120
|
+
*
|
|
121
|
+
* @returns true if the lock is refreshed occurs otherwise false is returned.
|
|
94
122
|
*/
|
|
95
123
|
refresh(ttl?: TimeSpan): LazyPromise<boolean>;
|
|
96
124
|
/**
|
|
@@ -101,7 +129,8 @@ export type ILock = ILockListenable & {
|
|
|
101
129
|
refreshOrFail(ttl?: TimeSpan): LazyPromise<void>;
|
|
102
130
|
/**
|
|
103
131
|
* The <i>getRemainingTime</i> return the reaming time as <i>{@link TimeSpan}</i>.
|
|
104
|
-
*
|
|
132
|
+
*
|
|
133
|
+
* @returns null if the key doesnt exist, key has no expiration and key has expired.
|
|
105
134
|
*/
|
|
106
135
|
getRemainingTime(): LazyPromise<TimeSpan | null>;
|
|
107
136
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "../../../lock/implementations/adapters/libsql-lock-adapter/_module.js";
|
|
2
2
|
export * from "../../../lock/implementations/adapters/memory-lock-adapter/_module.js";
|
|
3
3
|
export * from "../../../lock/implementations/adapters/mongodb-lock-adapter/_module.js";
|
|
4
|
+
export * from "../../../lock/implementations/adapters/no-op-lock-adapter/_module.js";
|
|
4
5
|
export * from "../../../lock/implementations/adapters/redis-lock-adapter/_module.js";
|
|
5
6
|
export * from "../../../lock/implementations/adapters/sqlite-lock-adapter/_module.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "../../../lock/implementations/adapters/libsql-lock-adapter/_module.js";
|
|
2
2
|
export * from "../../../lock/implementations/adapters/memory-lock-adapter/_module.js";
|
|
3
3
|
export * from "../../../lock/implementations/adapters/mongodb-lock-adapter/_module.js";
|
|
4
|
+
export * from "../../../lock/implementations/adapters/no-op-lock-adapter/_module.js";
|
|
4
5
|
export * from "../../../lock/implementations/adapters/redis-lock-adapter/_module.js";
|
|
5
6
|
export * from "../../../lock/implementations/adapters/sqlite-lock-adapter/_module.js";
|
|
6
7
|
//# sourceMappingURL=_module-exports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_module-exports.js","sourceRoot":"","sources":["../../../../src/lock/implementations/adapters/_module-exports.ts"],"names":[],"mappings":"AAAA,cAAc,gEAAgE,CAAC;AAC/E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,iEAAiE,CAAC;AAChF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,gEAAgE,CAAC"}
|
|
1
|
+
{"version":3,"file":"_module-exports.js","sourceRoot":"","sources":["../../../../src/lock/implementations/adapters/_module-exports.ts"],"names":[],"mappings":"AAAA,cAAc,gEAAgE,CAAC;AAC/E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,iEAAiE,CAAC;AAChF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,gEAAgE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/adapters/no-op-lock-adapter/_module.ts"],"names":[],"mappings":"AAAA,cAAc,0EAA0E,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Lock
|
|
3
|
+
*/
|
|
4
|
+
import type { TimeSpan } from "../../../../utilities/_module-exports.js";
|
|
5
|
+
import type { ILockAdapter } from "../../../../lock/contracts/_module-exports.js";
|
|
6
|
+
/**
|
|
7
|
+
* This <i>NoOpLockAdapter</i> will do nothing and is used for easily mocking <i>{@link ILockProvider}</i> for testing.
|
|
8
|
+
*
|
|
9
|
+
* IMPORT_PATH: ```"@daiso-tech/core/lock/adapters"```
|
|
10
|
+
* @group Adapters
|
|
11
|
+
*/
|
|
12
|
+
export declare class NoOpLockAdapter implements ILockAdapter {
|
|
13
|
+
acquire(_key: string, _owner: string, _ttl: TimeSpan | null): PromiseLike<boolean>;
|
|
14
|
+
release(_key: string, _owner: string): PromiseLike<boolean>;
|
|
15
|
+
forceRelease(_key: string): PromiseLike<void>;
|
|
16
|
+
refresh(_key: string, _owner: string, _ttl: TimeSpan): PromiseLike<boolean>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Lock
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* This <i>NoOpLockAdapter</i> will do nothing and is used for easily mocking <i>{@link ILockProvider}</i> for testing.
|
|
6
|
+
*
|
|
7
|
+
* IMPORT_PATH: ```"@daiso-tech/core/lock/adapters"```
|
|
8
|
+
* @group Adapters
|
|
9
|
+
*/
|
|
10
|
+
export class NoOpLockAdapter {
|
|
11
|
+
acquire(_key, _owner, _ttl) {
|
|
12
|
+
return Promise.resolve(true);
|
|
13
|
+
}
|
|
14
|
+
release(_key, _owner) {
|
|
15
|
+
return Promise.resolve(true);
|
|
16
|
+
}
|
|
17
|
+
forceRelease(_key) {
|
|
18
|
+
return Promise.resolve();
|
|
19
|
+
}
|
|
20
|
+
refresh(_key, _owner, _ttl) {
|
|
21
|
+
return Promise.resolve(true);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=no-op-lock-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-op-lock-adapter.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IACxB,OAAO,CACH,IAAY,EACZ,MAAc,EACd,IAAqB;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CAAC,IAAY,EAAE,MAAc;QAChC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,YAAY,CAAC,IAAY;QACrB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,CACH,IAAY,EACZ,MAAc,EACd,IAAc;QAEd,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACJ"}
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
* @module Lock
|
|
3
3
|
*/
|
|
4
4
|
import type { IDatabaseLockAdapter, ILockData } from "../../../../lock/contracts/_module-exports.js";
|
|
5
|
-
import { type IDeinitizable, type IInitizable, TimeSpan } from "../../../../utilities/_module-exports.js";
|
|
6
|
-
import type { SqliteDatabase } from "kysely";
|
|
5
|
+
import { type IDeinitizable, type IInitizable, type ISqliteDatabase, TimeSpan } from "../../../../utilities/_module-exports.js";
|
|
7
6
|
/**
|
|
8
7
|
*
|
|
9
8
|
* IMPORT_PATH: ```"@daiso-tech/core/lock/adapters"```
|
|
10
9
|
* @group Adapters
|
|
11
10
|
*/
|
|
12
11
|
export type SqliteLockAdapterSettings = {
|
|
13
|
-
database:
|
|
12
|
+
database: ISqliteDatabase;
|
|
14
13
|
tableName?: string;
|
|
15
14
|
expiredKeysRemovalInterval?: TimeSpan;
|
|
16
15
|
shouldRemoveExpiredKeys?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-lock-adapter.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,
|
|
1
|
+
{"version":3,"file":"sqlite-lock-adapter.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EAIH,QAAQ,GACX,MAAM,gCAAgC,CAAC;AACxC,OAA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