@backstage/plugin-events-backend 0.3.0-next.1 → 0.3.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 CHANGED
@@ -1,5 +1,93 @@
1
1
  # @backstage/plugin-events-backend
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c4bd794: BREAKING CHANGE: Migrate `HttpPostIngressEventPublisher` and `eventsPlugin` to use `EventsService`.
8
+
9
+ Uses the `EventsService` instead of `EventBroker` at `HttpPostIngressEventPublisher`,
10
+ dropping the use of `EventPublisher` including `setEventBroker(..)`.
11
+
12
+ Now, `HttpPostIngressEventPublisher.fromConfig` requires `events: EventsService` as option.
13
+
14
+ ```diff
15
+ const http = HttpPostIngressEventPublisher.fromConfig({
16
+ config: env.config,
17
+ + events: env.events,
18
+ logger: env.logger,
19
+ });
20
+ http.bind(eventsRouter);
21
+
22
+ // e.g. at packages/backend/src/plugins/events.ts
23
+ - await new EventsBackend(env.logger)
24
+ - .setEventBroker(env.eventBroker)
25
+ - .addPublishers(http)
26
+ - .start();
27
+
28
+ // or for other kinds of setups
29
+ - await Promise.all(http.map(publisher => publisher.setEventBroker(eventBroker)));
30
+ ```
31
+
32
+ `eventsPlugin` uses the `eventsServiceRef` as dependency.
33
+ Unsupported (and deprecated) extension point methods will throw an error to prevent unintended behavior.
34
+
35
+ ```ts
36
+ import { eventsServiceRef } from '@backstage/plugin-events-node';
37
+ ```
38
+
39
+ ### Patch Changes
40
+
41
+ - 56969b6: Add new `EventsService` as well as `eventsServiceRef` for the new backend system.
42
+
43
+ **Summary:**
44
+
45
+ - new:
46
+ `EventsService`, `eventsServiceRef`, `TestEventsService`
47
+ - deprecated:
48
+ `EventBroker`, `EventPublisher`, `EventSubscriber`, `DefaultEventBroker`, `EventsBackend`,
49
+ most parts of `EventsExtensionPoint` (alpha),
50
+ `TestEventBroker`, `TestEventPublisher`, `TestEventSubscriber`
51
+
52
+ Add the `eventsServiceRef` as dependency to your backend plugins
53
+ or backend plugin modules.
54
+
55
+ **Details:**
56
+
57
+ The previous implementation using the `EventsExtensionPoint` was added in the early stages
58
+ of the new backend system and does not respect the plugin isolation.
59
+ This made it not compatible anymore with the new backend system.
60
+
61
+ Additionally, the previous interfaces had some room for simplification,
62
+ supporting less exposure of internal concerns as well.
63
+
64
+ Hereby, this change adds a new `EventsService` interface as replacement for the now deprecated `EventBroker`.
65
+ The new interface does not require any `EventPublisher` or `EventSubscriber` interfaces anymore.
66
+ Instead, it is expected that the `EventsService` gets passed into publishers and subscribers,
67
+ and used internally. There is no need to expose anything of that at their own interfaces.
68
+
69
+ Most parts of `EventsExtensionPoint` (alpha) are deprecated as well and were not usable
70
+ (by other plugins or their modules) anyway.
71
+
72
+ The `DefaultEventBroker` implementation is deprecated and wraps the new `DefaultEventsService` implementation.
73
+ Optionally, an instance can be passed as argument to allow mixed setups to operate alongside.
74
+
75
+ - Updated dependencies
76
+ - @backstage/plugin-events-node@0.3.0
77
+ - @backstage/backend-common@0.21.4
78
+ - @backstage/config@1.2.0
79
+ - @backstage/backend-plugin-api@0.6.14
80
+
81
+ ## 0.3.0-next.2
82
+
83
+ ### Patch Changes
84
+
85
+ - Updated dependencies
86
+ - @backstage/backend-common@0.21.4-next.2
87
+ - @backstage/backend-plugin-api@0.6.14-next.2
88
+ - @backstage/config@1.2.0-next.1
89
+ - @backstage/plugin-events-node@0.3.0-next.2
90
+
3
91
  ## 0.3.0-next.1
4
92
 
5
93
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend",
3
- "version": "0.3.0-next.1",
3
+ "version": "0.3.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend",
3
- "version": "0.3.0-next.1",
3
+ "version": "0.3.0",
4
4
  "backstage": {
5
5
  "role": "backend-plugin"
6
6
  },
@@ -44,20 +44,20 @@
44
44
  "test": "backstage-cli package test"
45
45
  },
46
46
  "dependencies": {
47
- "@backstage/backend-common": "^0.21.4-next.1",
48
- "@backstage/backend-plugin-api": "^0.6.14-next.1",
49
- "@backstage/config": "^1.2.0-next.1",
50
- "@backstage/plugin-events-node": "^0.3.0-next.1",
47
+ "@backstage/backend-common": "^0.21.4",
48
+ "@backstage/backend-plugin-api": "^0.6.14",
49
+ "@backstage/config": "^1.2.0",
50
+ "@backstage/plugin-events-node": "^0.3.0",
51
51
  "@types/express": "^4.17.6",
52
52
  "express": "^4.17.1",
53
53
  "express-promise-router": "^4.1.0",
54
54
  "winston": "^3.2.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@backstage/backend-common": "^0.21.4-next.1",
58
- "@backstage/backend-test-utils": "^0.3.4-next.1",
59
- "@backstage/cli": "^0.25.3-next.1",
60
- "@backstage/plugin-events-backend-test-utils": "^0.1.24-next.1",
57
+ "@backstage/backend-common": "^0.21.4",
58
+ "@backstage/backend-test-utils": "^0.3.4",
59
+ "@backstage/cli": "^0.26.0",
60
+ "@backstage/plugin-events-backend-test-utils": "^0.1.24",
61
61
  "supertest": "^6.1.3"
62
62
  },
63
63
  "configSchema": "config.d.ts"