@beignet/provider-event-bus-memory 0.0.1 → 0.0.2
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 +11 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +16 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @beignet/provider-event-bus-memory
|
|
2
2
|
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [90b29ad]
|
|
8
|
+
- Updated dependencies [07fa19c]
|
|
9
|
+
- Updated dependencies [08bae67]
|
|
10
|
+
- Updated dependencies [730a818]
|
|
11
|
+
- Updated dependencies [a79f60c]
|
|
12
|
+
- @beignet/core@0.0.2
|
|
13
|
+
|
|
3
14
|
## 0.0.1
|
|
4
15
|
|
|
5
16
|
- Initial Beignet release under the `@beignet` npm scope.
|
package/dist/index.d.ts
CHANGED
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
import type { EventBusPort } from "@beignet/core/ports";
|
|
29
29
|
import { type ProviderInstrumentationTarget } from "@beignet/core/providers";
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Delivery mode for the in-memory event bus.
|
|
32
32
|
*/
|
|
33
33
|
export type InMemoryEventBusDelivery = "await-handlers" | "fire-and-forget";
|
|
34
|
+
/**
|
|
35
|
+
* Options for the in-memory event bus.
|
|
36
|
+
*/
|
|
34
37
|
export interface InMemoryEventBusOptions {
|
|
35
38
|
/**
|
|
36
39
|
* Optional instrumentation target. Providers pass existing app ports here
|
|
@@ -59,13 +62,22 @@ export interface InMemoryEventBusOptions {
|
|
|
59
62
|
*/
|
|
60
63
|
onHandlerError?: (error: unknown, eventName: string, payload: unknown) => void;
|
|
61
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Options for the in-memory event bus provider.
|
|
67
|
+
*/
|
|
62
68
|
export interface InMemoryEventBusProviderOptions extends Omit<InMemoryEventBusOptions, "instrumentation"> {
|
|
63
69
|
/**
|
|
64
70
|
* Provider name. Defaults to "event-bus-memory".
|
|
65
71
|
*/
|
|
66
72
|
name?: string;
|
|
67
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Ports contributed by the in-memory event bus provider.
|
|
76
|
+
*/
|
|
68
77
|
export interface InMemoryEventBusProviderPorts {
|
|
78
|
+
/**
|
|
79
|
+
* Beignet event bus port.
|
|
80
|
+
*/
|
|
69
81
|
eventBus: EventBusPort;
|
|
70
82
|
}
|
|
71
83
|
/**
|
|
@@ -97,6 +109,9 @@ export interface InMemoryEventBusProviderPorts {
|
|
|
97
109
|
* ```
|
|
98
110
|
*/
|
|
99
111
|
export declare function createInMemoryEventBus(options?: InMemoryEventBusOptions): EventBusPort;
|
|
112
|
+
/**
|
|
113
|
+
* Create a provider that contributes an in-memory event bus.
|
|
114
|
+
*/
|
|
100
115
|
export declare function createInMemoryEventBusProvider(options?: InMemoryEventBusProviderOptions): import("@beignet/core/providers").ServiceProvider<unknown, import("@standard-schema/spec").StandardSchemaV1<void, void>, {
|
|
101
116
|
eventBus: EventBusPort;
|
|
102
117
|
}>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,eAAe,CAAC,EA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EAAE,iBAAiB,CAAC;IACxD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,uBAA4B,GACpC,YAAY,CAoFd;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,+BAAoC;;GAiB9C"}
|
package/dist/index.js
CHANGED
|
@@ -123,6 +123,9 @@ export function createInMemoryEventBus(options = {}) {
|
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Create a provider that contributes an in-memory event bus.
|
|
128
|
+
*/
|
|
126
129
|
export function createInMemoryEventBusProvider(options = {}) {
|
|
127
130
|
const { name = "event-bus-memory", ...eventBusOptions } = options;
|
|
128
131
|
return createProvider({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EACL,cAAc,EACd,6BAA6B,GAE9B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EACL,cAAc,EACd,6BAA6B,GAE9B,MAAM,yBAAyB,CAAC;AAkEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAmC,EAAE;IAErC,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,CAAC;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAC;IAC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,KAAK,EAAE;YACb,OAAO;gBACL,KAAK,EAAE;oBACL,QAAQ,EAAE,sBAAsB,CAAC;wBAC/B,GAAG,eAAe;wBAClB,eAAe,EAAE,KAAK;qBACvB,CAAC;iBACqC;aAC1C,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -34,10 +34,13 @@ import {
|
|
|
34
34
|
} from "@beignet/core/providers";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Delivery mode for the in-memory event bus.
|
|
38
38
|
*/
|
|
39
39
|
export type InMemoryEventBusDelivery = "await-handlers" | "fire-and-forget";
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Options for the in-memory event bus.
|
|
43
|
+
*/
|
|
41
44
|
export interface InMemoryEventBusOptions {
|
|
42
45
|
/**
|
|
43
46
|
* Optional instrumentation target. Providers pass existing app ports here
|
|
@@ -73,6 +76,9 @@ export interface InMemoryEventBusOptions {
|
|
|
73
76
|
) => void;
|
|
74
77
|
}
|
|
75
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Options for the in-memory event bus provider.
|
|
81
|
+
*/
|
|
76
82
|
export interface InMemoryEventBusProviderOptions
|
|
77
83
|
extends Omit<InMemoryEventBusOptions, "instrumentation"> {
|
|
78
84
|
/**
|
|
@@ -81,7 +87,13 @@ export interface InMemoryEventBusProviderOptions
|
|
|
81
87
|
name?: string;
|
|
82
88
|
}
|
|
83
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Ports contributed by the in-memory event bus provider.
|
|
92
|
+
*/
|
|
84
93
|
export interface InMemoryEventBusProviderPorts {
|
|
94
|
+
/**
|
|
95
|
+
* Beignet event bus port.
|
|
96
|
+
*/
|
|
85
97
|
eventBus: EventBusPort;
|
|
86
98
|
}
|
|
87
99
|
|
|
@@ -201,6 +213,9 @@ export function createInMemoryEventBus(
|
|
|
201
213
|
};
|
|
202
214
|
}
|
|
203
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Create a provider that contributes an in-memory event bus.
|
|
218
|
+
*/
|
|
204
219
|
export function createInMemoryEventBusProvider(
|
|
205
220
|
options: InMemoryEventBusProviderOptions = {},
|
|
206
221
|
) {
|