@backstage/plugin-catalog-backend 1.24.1-next.2 → 1.25.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 CHANGED
@@ -1,5 +1,61 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 163ba08: Deprecated `RouterOptions`, `CatalogBuilder`, and `CatalogEnvironment`. Please make sure to upgrade to the new backend system.
8
+ - fc24d9e: Stop using `@backstage/backend-tasks` as it will be deleted in near future.
9
+
10
+ ### Patch Changes
11
+
12
+ - 776eb56: `ProcessorOutputCollector` returns an error when receiving deferred entities that have an invalid `metadata.annotations` format.
13
+
14
+ This allows to return an error on an actual validation issue instead of reporting that the location annotations are missing afterwards, which is misleading for the users.
15
+
16
+ - 389f5a4: Update deprecated url-reader-related imports.
17
+ - 93095ee: Make sure node-fetch is version 2.7.0 or greater
18
+ - a629fb2: Added setAllowedLocationTypes while introducing a new extension point called CatalogLocationsExtensionPoint
19
+ - 51240ee: Preserve default `allowedLocationTypes` when `setAllowedLocationTypes()` of `CatalogLocationsExtensionPoint` is not called.
20
+ - Updated dependencies
21
+ - @backstage/backend-plugin-api@0.8.0
22
+ - @backstage/backend-common@0.24.0
23
+ - @backstage/plugin-permission-common@0.8.1
24
+ - @backstage/plugin-permission-node@0.8.1
25
+ - @backstage/plugin-search-backend-module-catalog@0.2.0
26
+ - @backstage/plugin-catalog-node@1.12.5
27
+ - @backstage/integration@1.14.0
28
+ - @backstage/catalog-model@1.6.0
29
+ - @backstage/backend-openapi-utils@0.1.16
30
+ - @backstage/catalog-client@1.6.6
31
+ - @backstage/config@1.2.0
32
+ - @backstage/errors@1.2.4
33
+ - @backstage/types@1.1.1
34
+ - @backstage/plugin-catalog-common@1.0.26
35
+ - @backstage/plugin-events-node@0.3.9
36
+
37
+ ## 1.24.1-next.3
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies
42
+ - @backstage/backend-plugin-api@0.8.0-next.3
43
+ - @backstage/backend-common@0.23.4-next.3
44
+ - @backstage/catalog-model@1.6.0-next.0
45
+ - @backstage/backend-openapi-utils@0.1.16-next.3
46
+ - @backstage/backend-tasks@0.5.28-next.3
47
+ - @backstage/catalog-client@1.6.6-next.0
48
+ - @backstage/config@1.2.0
49
+ - @backstage/errors@1.2.4
50
+ - @backstage/integration@1.14.0-next.0
51
+ - @backstage/types@1.1.1
52
+ - @backstage/plugin-catalog-common@1.0.26-next.2
53
+ - @backstage/plugin-catalog-node@1.12.5-next.3
54
+ - @backstage/plugin-events-node@0.3.9-next.3
55
+ - @backstage/plugin-permission-common@0.8.1-next.1
56
+ - @backstage/plugin-permission-node@0.8.1-next.3
57
+ - @backstage/plugin-search-backend-module-catalog@0.1.29-next.3
58
+
3
59
  ## 1.24.1-next.2
4
60
 
5
61
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend__alpha",
3
- "version": "1.24.1-next.2",
3
+ "version": "1.25.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var alpha = require('@backstage/plugin-catalog-common/alpha');
6
6
  var pluginPermissionNode = require('@backstage/plugin-permission-node');
7
- var CatalogBuilder = require('./cjs/CatalogBuilder-D0vAEZa8.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-BYL3AykR.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var pluginEventsNode = require('@backstage/plugin-events-node');
10
10
  var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
@@ -2787,20 +2787,24 @@ class ProcessorOutputCollector {
2787
2787
  return;
2788
2788
  }
2789
2789
  const annotations = entity.metadata.annotations || {};
2790
- if (typeof annotations === "object" && !Array.isArray(annotations)) {
2791
- const originLocation = getEntityOriginLocationRef(this.parentEntity);
2792
- entity = {
2793
- ...entity,
2794
- metadata: {
2795
- ...entity.metadata,
2796
- annotations: {
2797
- ...annotations,
2798
- [catalogModel.ANNOTATION_ORIGIN_LOCATION]: originLocation,
2799
- [catalogModel.ANNOTATION_LOCATION]: location
2800
- }
2801
- }
2802
- };
2790
+ if (typeof annotations !== "object" || Array.isArray(annotations)) {
2791
+ this.errors.push(
2792
+ new Error("metadata.annotations must be a valid object")
2793
+ );
2794
+ return;
2803
2795
  }
2796
+ const originLocation = getEntityOriginLocationRef(this.parentEntity);
2797
+ entity = {
2798
+ ...entity,
2799
+ metadata: {
2800
+ ...entity.metadata,
2801
+ annotations: {
2802
+ ...annotations,
2803
+ [catalogModel.ANNOTATION_ORIGIN_LOCATION]: originLocation,
2804
+ [catalogModel.ANNOTATION_LOCATION]: location
2805
+ }
2806
+ }
2807
+ };
2804
2808
  this.deferredEntities.push({ entity, locationKey: location });
2805
2809
  } else if (i.type === "location") {
2806
2810
  const entity = locationSpecToLocationEntity({
@@ -7255,4 +7259,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
7255
7259
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
7256
7260
  exports.parseEntityYaml = parseEntityYaml;
7257
7261
  exports.permissionRules = permissionRules;
7258
- //# sourceMappingURL=CatalogBuilder-D0vAEZa8.cjs.js.map
7262
+ //# sourceMappingURL=CatalogBuilder-BYL3AykR.cjs.js.map