@backstage/plugin-events-node 0.4.5-next.2 → 0.4.5

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,34 @@
1
1
  # @backstage/plugin-events-node
2
2
 
3
+ ## 0.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 4501631: Fixed an issue where subscribing to events threw an error and gave up too easily. Calling the subscribe method will cause the background polling loop to keep trying to connect to the events backend, even if the initial request fails.
8
+
9
+ By default the events service will attempt to publish and subscribe to events from the events bus API in the events backend, but if it fails due to the events backend not being installed, it will bail and never try calling the API again. There is now a new `events.useEventBus` configuration and option for the `DefaultEventsService` that lets you control this behavior. You can set it to `'never'` to disabled API calls to the events backend completely, or `'always'` to never allow it to be disabled.
10
+
11
+ - e02a02b: Fix `events.useEventBus` by propagating config to `DefaultEventsService`
12
+ - 9816f51: Add raw body information to `RequestDetails`
13
+ and use the raw body when validating incoming event requests.
14
+ - 5d74716: Remove unused backend-common dependency
15
+ - 0b57aa1: Fixed an issue where the event bus polling would duplicate and increase exponentially over time.
16
+ - Updated dependencies
17
+ - @backstage/types@1.2.0
18
+ - @backstage/backend-plugin-api@1.0.2
19
+ - @backstage/errors@1.2.5
20
+
21
+ ## 0.4.5-next.3
22
+
23
+ ### Patch Changes
24
+
25
+ - 9816f51: Add raw body information to `RequestDetails`
26
+ and use the raw body when validating incoming event requests.
27
+ - Updated dependencies
28
+ - @backstage/backend-plugin-api@1.0.2-next.2
29
+ - @backstage/errors@1.2.4
30
+ - @backstage/types@1.1.1
31
+
3
32
  ## 0.4.5-next.2
4
33
 
5
34
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
3
  import { LoggerService, RootConfigService, DiscoveryService, AuthService, LifecycleService } from '@backstage/backend-plugin-api';
3
4
 
@@ -121,6 +122,8 @@ declare class DefaultEventsService implements EventsService {
121
122
  }
122
123
 
123
124
  /**
125
+ * View on an incoming request that has to be validated.
126
+ *
124
127
  * @public
125
128
  */
126
129
  interface RequestDetails {
@@ -132,6 +135,20 @@ interface RequestDetails {
132
135
  * Key-value pairs of header names and values. Header names are lower-cased.
133
136
  */
134
137
  headers: Record<string, string | string[] | undefined>;
138
+ /**
139
+ * Raw request details.
140
+ */
141
+ raw: {
142
+ /**
143
+ * Raw request body (buffer).
144
+ */
145
+ body: Buffer;
146
+ /**
147
+ * Encoding of the raw request body.
148
+ * Can be used to decode the raw request body like `raw.body.toString(raw.encoding)`.
149
+ */
150
+ encoding: BufferEncoding;
151
+ };
135
152
  }
136
153
 
137
154
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-node",
3
- "version": "0.4.5-next.2",
3
+ "version": "0.4.5",
4
4
  "description": "The plugin-events-node module for @backstage/plugin-events-backend",
5
5
  "backstage": {
6
6
  "role": "node-library",
@@ -36,10 +36,19 @@
36
36
  },
37
37
  "main": "./dist/index.cjs.js",
38
38
  "types": "./dist/index.d.ts",
39
+ "typesVersions": {
40
+ "*": {
41
+ "index": [
42
+ "dist/index.d.ts"
43
+ ],
44
+ "alpha": [
45
+ "dist/alpha.d.ts"
46
+ ]
47
+ }
48
+ },
39
49
  "files": [
40
50
  "dist",
41
- "config.d.ts",
42
- "alpha"
51
+ "config.d.ts"
43
52
  ],
44
53
  "scripts": {
45
54
  "build": "backstage-cli package build",
@@ -51,16 +60,15 @@
51
60
  "test": "backstage-cli package test"
52
61
  },
53
62
  "dependencies": {
54
- "@backstage/backend-plugin-api": "1.0.2-next.2",
55
- "@backstage/errors": "1.2.4",
56
- "@backstage/types": "1.1.1",
63
+ "@backstage/backend-plugin-api": "^1.0.2",
64
+ "@backstage/errors": "^1.2.5",
65
+ "@backstage/types": "^1.2.0",
57
66
  "cross-fetch": "^4.0.0",
58
67
  "uri-template": "^2.0.0"
59
68
  },
60
69
  "devDependencies": {
61
- "@backstage/backend-common": "^0.25.0",
62
- "@backstage/backend-test-utils": "1.1.0-next.2",
63
- "@backstage/cli": "0.29.0-next.2",
70
+ "@backstage/backend-test-utils": "^1.1.0",
71
+ "@backstage/cli": "^0.29.0",
64
72
  "msw": "^1.0.0"
65
73
  },
66
74
  "configSchema": "config.d.ts"
@@ -1,6 +0,0 @@
1
- {
2
- "name": "@backstage/plugin-events-node__alpha",
3
- "version": "0.4.5-next.2",
4
- "main": "../dist/alpha.cjs.js",
5
- "types": "../dist/alpha.d.ts"
6
- }