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

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,16 @@
1
1
  # @backstage/plugin-events-node
2
2
 
3
+ ## 0.4.5-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 9816f51: Add raw body information to `RequestDetails`
8
+ and use the raw body when validating incoming event requests.
9
+ - Updated dependencies
10
+ - @backstage/backend-plugin-api@1.0.2-next.2
11
+ - @backstage/errors@1.2.4
12
+ - @backstage/types@1.1.1
13
+
3
14
  ## 0.4.5-next.2
4
15
 
5
16
  ### 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-next.3",
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",
@@ -59,8 +68,8 @@
59
68
  },
60
69
  "devDependencies": {
61
70
  "@backstage/backend-common": "^0.25.0",
62
- "@backstage/backend-test-utils": "1.1.0-next.2",
63
- "@backstage/cli": "0.29.0-next.2",
71
+ "@backstage/backend-test-utils": "1.1.0-next.3",
72
+ "@backstage/cli": "0.29.0-next.3",
64
73
  "msw": "^1.0.0"
65
74
  },
66
75
  "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
- }