@backstage/plugin-catalog-backend-module-incremental-ingestion 0.6.4-next.2 → 0.6.5-next.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 +33 -0
- package/README.md +12 -3
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-incremental-ingestion
|
|
2
2
|
|
|
3
|
+
## 0.6.5-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 27d1031: fixed misleading example location annotations in docs
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-defaults@0.9.0-next.0
|
|
10
|
+
- @backstage/plugin-catalog-backend@1.32.0
|
|
11
|
+
- @backstage/backend-plugin-api@1.2.1
|
|
12
|
+
- @backstage/catalog-model@1.7.3
|
|
13
|
+
- @backstage/config@1.3.2
|
|
14
|
+
- @backstage/errors@1.2.7
|
|
15
|
+
- @backstage/types@1.2.1
|
|
16
|
+
- @backstage/plugin-catalog-node@1.16.1
|
|
17
|
+
- @backstage/plugin-events-node@0.4.9
|
|
18
|
+
- @backstage/plugin-permission-common@0.8.4
|
|
19
|
+
|
|
20
|
+
## 0.6.4
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/backend-defaults@0.8.2
|
|
26
|
+
- @backstage/plugin-catalog-backend@1.32.0
|
|
27
|
+
- @backstage/plugin-events-node@0.4.9
|
|
28
|
+
- @backstage/backend-plugin-api@1.2.1
|
|
29
|
+
- @backstage/catalog-model@1.7.3
|
|
30
|
+
- @backstage/config@1.3.2
|
|
31
|
+
- @backstage/errors@1.2.7
|
|
32
|
+
- @backstage/types@1.2.1
|
|
33
|
+
- @backstage/plugin-catalog-node@1.16.1
|
|
34
|
+
- @backstage/plugin-permission-common@0.8.4
|
|
35
|
+
|
|
3
36
|
## 0.6.4-next.2
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -208,12 +208,20 @@ export class MyIncrementalEntityProvider
|
|
|
208
208
|
The last step is to implement the actual `next` method that will accept the cursor, call the API, process the result and return the result.
|
|
209
209
|
|
|
210
210
|
```ts
|
|
211
|
+
import {
|
|
212
|
+
ANNOTATION_LOCATION,
|
|
213
|
+
ANNOTATION_ORIGIN_LOCATION,
|
|
214
|
+
} from '@backstage/catalog-model';
|
|
215
|
+
import { IncrementalEntityProvider } from '@backstage/plugin-catalog-backend-module-incremental-ingestion';
|
|
216
|
+
|
|
211
217
|
export class MyIncrementalEntityProvider implements IncrementalEntityProvider<Cursor, Context> {
|
|
212
218
|
|
|
213
219
|
token: string;
|
|
220
|
+
mySource: string;
|
|
214
221
|
|
|
215
|
-
constructor(token: string) {
|
|
222
|
+
constructor(token: string, mySource: string) {
|
|
216
223
|
this.token = token;
|
|
224
|
+
this.mySource = mySource;
|
|
217
225
|
}
|
|
218
226
|
|
|
219
227
|
getProviderName() {
|
|
@@ -230,6 +238,7 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider<Cu
|
|
|
230
238
|
|
|
231
239
|
async next(context: Context, cursor?: Cursor = { page: 1 }): Promise<EntityIteratorResult<Cursor>> {
|
|
232
240
|
const { apiClient } = context;
|
|
241
|
+
const location = `${this.getProviderName()}:${this.mySource}`;
|
|
233
242
|
|
|
234
243
|
// call your API with the current cursor
|
|
235
244
|
const data = await apiClient.getServices(cursor);
|
|
@@ -249,8 +258,8 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider<Cu
|
|
|
249
258
|
name: item.name,
|
|
250
259
|
annotations: {
|
|
251
260
|
// You need to define these, otherwise they'll fail validation
|
|
252
|
-
[ANNOTATION_LOCATION]:
|
|
253
|
-
[ANNOTATION_ORIGIN_LOCATION]:
|
|
261
|
+
[ANNOTATION_LOCATION]: location,
|
|
262
|
+
[ANNOTATION_ORIGIN_LOCATION]: location,
|
|
254
263
|
}
|
|
255
264
|
}
|
|
256
265
|
spec: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend-module-incremental-ingestion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5-next.0",
|
|
4
4
|
"description": "An entity provider for streaming large asset sources into the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"test": "backstage-cli package test"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@backstage/backend-defaults": "0.
|
|
69
|
-
"@backstage/backend-plugin-api": "1.2.1
|
|
68
|
+
"@backstage/backend-defaults": "0.9.0-next.0",
|
|
69
|
+
"@backstage/backend-plugin-api": "1.2.1",
|
|
70
70
|
"@backstage/catalog-model": "1.7.3",
|
|
71
71
|
"@backstage/config": "1.3.2",
|
|
72
72
|
"@backstage/errors": "1.2.7",
|
|
73
|
-
"@backstage/plugin-catalog-backend": "1.32.0
|
|
74
|
-
"@backstage/plugin-catalog-node": "1.16.1
|
|
75
|
-
"@backstage/plugin-events-node": "0.4.9
|
|
73
|
+
"@backstage/plugin-catalog-backend": "1.32.0",
|
|
74
|
+
"@backstage/plugin-catalog-node": "1.16.1",
|
|
75
|
+
"@backstage/plugin-events-node": "0.4.9",
|
|
76
76
|
"@backstage/plugin-permission-common": "0.8.4",
|
|
77
77
|
"@backstage/types": "1.2.1",
|
|
78
78
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"uuid": "^11.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@backstage/backend-test-utils": "1.3.
|
|
88
|
-
"@backstage/cli": "0.
|
|
87
|
+
"@backstage/backend-test-utils": "1.3.2-next.0",
|
|
88
|
+
"@backstage/cli": "0.32.0-next.0",
|
|
89
89
|
"@types/luxon": "^3.0.0"
|
|
90
90
|
}
|
|
91
91
|
}
|