@backstage/plugin-events-node 0.1.0 → 0.2.0-next.1
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 +21 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +15 -2
- package/dist/index.beta.d.ts +15 -2
- package/dist/index.d.ts +15 -2
- package/package.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-events-node
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@0.1.5-next.1
|
|
9
|
+
|
|
10
|
+
## 0.2.0-next.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- cf41eedf43: Introduce a new interface `RequestDetails` to abstract `Request`
|
|
15
|
+
providing access to request body and headers.
|
|
16
|
+
|
|
17
|
+
**BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/backend-plugin-api@0.1.5-next.0
|
|
23
|
+
|
|
3
24
|
## 0.1.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
8
|
-
import { Request as Request_2 } from 'express';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Allows a decoupled and asynchronous communication between components.
|
|
@@ -117,6 +116,20 @@ export declare interface HttpPostIngressOptions {
|
|
|
117
116
|
validator?: RequestValidator;
|
|
118
117
|
}
|
|
119
118
|
|
|
119
|
+
/**
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
export declare interface RequestDetails {
|
|
123
|
+
/**
|
|
124
|
+
* Request body. JSON payloads have been parsed already.
|
|
125
|
+
*/
|
|
126
|
+
body: unknown;
|
|
127
|
+
/**
|
|
128
|
+
* Key-value pairs of header names and values. Header names are lower-cased.
|
|
129
|
+
*/
|
|
130
|
+
headers: Record<string, string | string[] | undefined>;
|
|
131
|
+
}
|
|
132
|
+
|
|
120
133
|
/**
|
|
121
134
|
* Details for how to respond to the rejection
|
|
122
135
|
* of the received HTTP request transmitting an event payload.
|
|
@@ -154,7 +167,7 @@ export declare interface RequestValidationContext {
|
|
|
154
167
|
*
|
|
155
168
|
* @public
|
|
156
169
|
*/
|
|
157
|
-
export declare type RequestValidator = (request:
|
|
170
|
+
export declare type RequestValidator = (request: RequestDetails, context: RequestValidationContext) => Promise<void>;
|
|
158
171
|
|
|
159
172
|
/**
|
|
160
173
|
* Subscribes to the provided (generic) topic
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
8
|
-
import { Request as Request_2 } from 'express';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Allows a decoupled and asynchronous communication between components.
|
|
@@ -106,6 +105,20 @@ export declare interface HttpPostIngressOptions {
|
|
|
106
105
|
validator?: RequestValidator;
|
|
107
106
|
}
|
|
108
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export declare interface RequestDetails {
|
|
112
|
+
/**
|
|
113
|
+
* Request body. JSON payloads have been parsed already.
|
|
114
|
+
*/
|
|
115
|
+
body: unknown;
|
|
116
|
+
/**
|
|
117
|
+
* Key-value pairs of header names and values. Header names are lower-cased.
|
|
118
|
+
*/
|
|
119
|
+
headers: Record<string, string | string[] | undefined>;
|
|
120
|
+
}
|
|
121
|
+
|
|
109
122
|
/**
|
|
110
123
|
* Details for how to respond to the rejection
|
|
111
124
|
* of the received HTTP request transmitting an event payload.
|
|
@@ -143,7 +156,7 @@ export declare interface RequestValidationContext {
|
|
|
143
156
|
*
|
|
144
157
|
* @public
|
|
145
158
|
*/
|
|
146
|
-
export declare type RequestValidator = (request:
|
|
159
|
+
export declare type RequestValidator = (request: RequestDetails, context: RequestValidationContext) => Promise<void>;
|
|
147
160
|
|
|
148
161
|
/**
|
|
149
162
|
* Subscribes to the provided (generic) topic
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
8
|
-
import { Request as Request_2 } from 'express';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Allows a decoupled and asynchronous communication between components.
|
|
@@ -106,6 +105,20 @@ export declare interface HttpPostIngressOptions {
|
|
|
106
105
|
validator?: RequestValidator;
|
|
107
106
|
}
|
|
108
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export declare interface RequestDetails {
|
|
112
|
+
/**
|
|
113
|
+
* Request body. JSON payloads have been parsed already.
|
|
114
|
+
*/
|
|
115
|
+
body: unknown;
|
|
116
|
+
/**
|
|
117
|
+
* Key-value pairs of header names and values. Header names are lower-cased.
|
|
118
|
+
*/
|
|
119
|
+
headers: Record<string, string | string[] | undefined>;
|
|
120
|
+
}
|
|
121
|
+
|
|
109
122
|
/**
|
|
110
123
|
* Details for how to respond to the rejection
|
|
111
124
|
* of the received HTTP request transmitting an event payload.
|
|
@@ -143,7 +156,7 @@ export declare interface RequestValidationContext {
|
|
|
143
156
|
*
|
|
144
157
|
* @public
|
|
145
158
|
*/
|
|
146
|
-
export declare type RequestValidator = (request:
|
|
159
|
+
export declare type RequestValidator = (request: RequestDetails, context: RequestValidationContext) => Promise<void>;
|
|
147
160
|
|
|
148
161
|
/**
|
|
149
162
|
* Subscribes to the provided (generic) topic
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-events-node",
|
|
3
3
|
"description": "The plugin-events-node module for @backstage/plugin-events-backend",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-next.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -24,12 +24,10 @@
|
|
|
24
24
|
"postpack": "backstage-cli package postpack"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@backstage/backend-plugin-api": "^0.1.
|
|
28
|
-
"@types/express": "^4.17.6",
|
|
29
|
-
"express": "^4.17.1"
|
|
27
|
+
"@backstage/backend-plugin-api": "^0.1.5-next.1"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|
|
32
|
-
"@backstage/cli": "^0.21.
|
|
30
|
+
"@backstage/cli": "^0.21.2-next.1"
|
|
33
31
|
},
|
|
34
32
|
"files": [
|
|
35
33
|
"alpha",
|