@beignet/provider-event-bus-memory 0.0.3 → 0.0.4
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 +25 -0
- package/README.md +14 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +26 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @beignet/provider-event-bus-memory
|
|
2
2
|
|
|
3
|
+
## 0.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8bcb31f: Mark package READMEs with Beignet's experimental alpha status and 0.0.x stability expectations.
|
|
8
|
+
- d137044: Declare `@beignet/core` as a peer dependency with a lockstep version range in
|
|
9
|
+
every integration and provider package instead of a regular `"*"` dependency.
|
|
10
|
+
Installs now always resolve a single shared copy of core, so `instanceof`
|
|
11
|
+
checks such as `isContractError` and upload error identity keep working, and
|
|
12
|
+
mixed Beignet versions fail loudly at install time instead of at runtime.
|
|
13
|
+
|
|
14
|
+
If your package manager does not install peer dependencies automatically, add
|
|
15
|
+
`@beignet/core` to your app alongside these packages. `@beignet/nuqs` now also
|
|
16
|
+
declares `@beignet/react-query` as a peer dependency, and
|
|
17
|
+
`@beignet/provider-storage-s3` now expects you to install
|
|
18
|
+
`@aws-sdk/client-s3` and `@aws-sdk/s3-request-presigner` yourself, matching
|
|
19
|
+
how other providers treat their SDKs.
|
|
20
|
+
|
|
21
|
+
- 1a79090: Emit Node-compatible ESM: all relative imports in published packages now carry explicit .js extensions, fixing ERR_MODULE_NOT_FOUND when running the CLI or importing package dist files under plain Node.
|
|
22
|
+
- 44f1192: Move first-party provider diagnostics to package-owned `beignet.provider`
|
|
23
|
+
manifest metadata and have doctor read installed provider package manifests.
|
|
24
|
+
- 2aa77ca: Add static provider metadata and provider wiring diagnostics for generated apps.
|
|
25
|
+
- 03b1743: Document durable workflow provider conventions for retries, backoff, dead-letter state, and unsupported provider semantics.
|
|
26
|
+
- 8063d38: Rename the contract front door to `defineContract`/`defineContractGroup`, rename operational commands to tasks (`@beignet/core/tasks`, `defineTasks`, `runTask`, `beignet task run`, `beignet make task`, `server/tasks.ts`, `features/<feature>/tasks/`, `paths.tasks`), and standardize context binding: context-free declarations stay top-level (`defineEvent`), while context-bound definitions come from per-capability factories (`createListeners`, `createJobs`, `createSchedules`, `createNotifications`, `createTasks`) called once in `lib/`. Top-level context-generic `defineListener`, `defineJob`, `defineSchedule`, and `defineNotification` are removed.
|
|
27
|
+
|
|
3
28
|
## 0.0.3
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
# @beignet/provider-event-bus-memory
|
|
2
2
|
|
|
3
|
+
> [!CAUTION]
|
|
4
|
+
> Beignet is experimental alpha software. The `0.0.x` package line is for early
|
|
5
|
+
> evaluation, and APIs may change between releases while the framework settles.
|
|
6
|
+
|
|
3
7
|
In-memory `EventBusPort` adapter for Beignet applications.
|
|
4
8
|
|
|
5
9
|
Use it for tests, local development, and single-process apps. Distributed
|
|
6
10
|
systems should adapt a queue, stream, outbox, or message broker behind the same
|
|
7
11
|
`EventBusPort` interface.
|
|
8
12
|
|
|
13
|
+
This provider is not a durable delivery provider. It does not store attempts,
|
|
14
|
+
compute retry backoff, or dead-letter failed handlers. Use it when losing
|
|
15
|
+
in-flight events on process shutdown is acceptable, or put a durable outbox or
|
|
16
|
+
queue-backed event bus behind `EventBusPort` for production delivery.
|
|
17
|
+
|
|
9
18
|
## Install
|
|
10
19
|
|
|
11
20
|
```bash
|
|
12
|
-
bun add @beignet/provider-event-bus-memory
|
|
21
|
+
bun add @beignet/provider-event-bus-memory @beignet/core
|
|
13
22
|
```
|
|
14
23
|
|
|
15
24
|
## Direct setup
|
|
@@ -57,7 +66,7 @@ import { routes } from "@/server/routes";
|
|
|
57
66
|
export const server = await createNextServer({
|
|
58
67
|
ports: appPorts,
|
|
59
68
|
providers: [createInMemoryEventBusProvider()],
|
|
60
|
-
|
|
69
|
+
context: ({ ports }) => ({
|
|
61
70
|
ports,
|
|
62
71
|
}),
|
|
63
72
|
routes,
|
|
@@ -136,7 +145,9 @@ await eventBus.publish(UserRegistered, {
|
|
|
136
145
|
By default, the in-memory bus awaits handlers so local development and tests are
|
|
137
146
|
deterministic. Handler errors are rethrown unless `onHandlerError` is provided.
|
|
138
147
|
Use `delivery: "fire-and-forget"` when you intentionally want detached
|
|
139
|
-
in-process delivery.
|
|
148
|
+
in-process delivery. Fire-and-forget delivery reports handler errors through
|
|
149
|
+
`onHandlerError` when provided, but it still does not retry or dead-letter
|
|
150
|
+
failed work.
|
|
140
151
|
|
|
141
152
|
### `subscribe<E>(event: E, handler: (payload) => void | Promise<void>): () => void`
|
|
142
153
|
|
package/dist/index.d.ts
CHANGED
|
@@ -114,5 +114,5 @@ export declare function createInMemoryEventBus(options?: InMemoryEventBusOptions
|
|
|
114
114
|
*/
|
|
115
115
|
export declare function createInMemoryEventBusProvider(options?: InMemoryEventBusProviderOptions): import("@beignet/core/providers").ServiceProvider<unknown, import("@standard-schema/spec").StandardSchemaV1<void, void>, {
|
|
116
116
|
eventBus: EventBusPort;
|
|
117
|
-
}>;
|
|
117
|
+
}, unknown, void>;
|
|
118
118
|
//# sourceMappingURL=index.d.ts.map
|
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;;GAEG;AACH,MAAM,WAAW,uBAAuB;IAC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C;CACX;AAED;;GAEG;AACH,MAAM,WAAW,+BACf,SAAQ,IAAI,CAAC,uBAAuB,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;;kBAiB9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beignet/provider-event-bus-memory",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "In-memory event bus provider for Beignet - implements EventBusPort for single-process applications",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18.0.0"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
55
|
-
"@beignet/core": "
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@beignet/core": ">=0.0.3 <1.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@beignet/devtools": "*",
|
|
@@ -60,5 +60,28 @@
|
|
|
60
60
|
"@types/node": "^20.10.0",
|
|
61
61
|
"typescript": "^5.3.0",
|
|
62
62
|
"zod": "^4.0.0"
|
|
63
|
+
},
|
|
64
|
+
"beignet": {
|
|
65
|
+
"provider": {
|
|
66
|
+
"displayName": "Memory event bus provider",
|
|
67
|
+
"ports": [
|
|
68
|
+
"eventBus"
|
|
69
|
+
],
|
|
70
|
+
"appPorts": [
|
|
71
|
+
{
|
|
72
|
+
"name": "eventBus",
|
|
73
|
+
"type": "EventBusPort"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"watchers": [
|
|
77
|
+
"eventBus"
|
|
78
|
+
],
|
|
79
|
+
"registration": {
|
|
80
|
+
"required": false,
|
|
81
|
+
"tokens": [
|
|
82
|
+
"createInMemoryEventBus"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
63
86
|
}
|
|
64
87
|
}
|