@backstage/plugin-catalog-backend-module-incremental-ingestion 0.6.4 → 0.6.5-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.
Files changed (3) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +12 -3
  3. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @backstage/plugin-catalog-backend-module-incremental-ingestion
2
2
 
3
+ ## 0.6.5-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-defaults@0.9.0-next.1
9
+ - @backstage/plugin-catalog-backend@1.32.1-next.0
10
+ - @backstage/backend-plugin-api@1.2.1
11
+ - @backstage/catalog-model@1.7.3
12
+ - @backstage/config@1.3.2
13
+ - @backstage/errors@1.2.7
14
+ - @backstage/types@1.2.1
15
+ - @backstage/plugin-catalog-node@1.16.1
16
+ - @backstage/plugin-events-node@0.4.9
17
+ - @backstage/plugin-permission-common@0.8.4
18
+
19
+ ## 0.6.5-next.0
20
+
21
+ ### Patch Changes
22
+
23
+ - 27d1031: fixed misleading example location annotations in docs
24
+ - Updated dependencies
25
+ - @backstage/backend-defaults@0.9.0-next.0
26
+ - @backstage/plugin-catalog-backend@1.32.0
27
+ - @backstage/backend-plugin-api@1.2.1
28
+ - @backstage/catalog-model@1.7.3
29
+ - @backstage/config@1.3.2
30
+ - @backstage/errors@1.2.7
31
+ - @backstage/types@1.2.1
32
+ - @backstage/plugin-catalog-node@1.16.1
33
+ - @backstage/plugin-events-node@0.4.9
34
+ - @backstage/plugin-permission-common@0.8.4
35
+
3
36
  ## 0.6.4
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]: this.getProviderName(),
253
- [ANNOTATION_ORIGIN_LOCATION]: this.getProviderName(),
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.4",
3
+ "version": "0.6.5-next.1",
4
4
  "description": "An entity provider for streaming large asset sources into the catalog",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -65,16 +65,16 @@
65
65
  "test": "backstage-cli package test"
66
66
  },
67
67
  "dependencies": {
68
- "@backstage/backend-defaults": "^0.8.2",
69
- "@backstage/backend-plugin-api": "^1.2.1",
70
- "@backstage/catalog-model": "^1.7.3",
71
- "@backstage/config": "^1.3.2",
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",
76
- "@backstage/plugin-permission-common": "^0.8.4",
77
- "@backstage/types": "^1.2.1",
68
+ "@backstage/backend-defaults": "0.9.0-next.1",
69
+ "@backstage/backend-plugin-api": "1.2.1",
70
+ "@backstage/catalog-model": "1.7.3",
71
+ "@backstage/config": "1.3.2",
72
+ "@backstage/errors": "1.2.7",
73
+ "@backstage/plugin-catalog-backend": "1.32.1-next.0",
74
+ "@backstage/plugin-catalog-node": "1.16.1",
75
+ "@backstage/plugin-events-node": "0.4.9",
76
+ "@backstage/plugin-permission-common": "0.8.4",
77
+ "@backstage/types": "1.2.1",
78
78
  "@opentelemetry/api": "^1.9.0",
79
79
  "@types/express": "^4.17.6",
80
80
  "express": "^4.17.1",
@@ -84,8 +84,8 @@
84
84
  "uuid": "^11.0.0"
85
85
  },
86
86
  "devDependencies": {
87
- "@backstage/backend-test-utils": "^1.3.1",
88
- "@backstage/cli": "^0.31.0",
87
+ "@backstage/backend-test-utils": "1.3.2-next.1",
88
+ "@backstage/cli": "0.32.0-next.1",
89
89
  "@types/luxon": "^3.0.0"
90
90
  }
91
91
  }