@backstage/plugin-catalog-backend 1.8.1-next.1 → 1.8.1-next.2

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,28 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.8.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 62a725e3a94: Use the `LocationSpec` type from the `catalog-common` package in place of the deprecated `LocationSpec` from the `catalog-node` package.
8
+ - c36b89f2af3: Fixed bug in the `DefaultCatalogProcessingEngine` where entities that contained multiple different types of relations for the same source entity would not properly trigger stitching for that source entity.
9
+ - Updated dependencies
10
+ - @backstage/backend-common@0.18.4-next.2
11
+ - @backstage/catalog-client@1.4.1-next.0
12
+ - @backstage/plugin-permission-node@0.7.7-next.2
13
+ - @backstage/backend-plugin-api@0.5.1-next.2
14
+ - @backstage/catalog-model@1.2.1
15
+ - @backstage/config@1.0.7
16
+ - @backstage/errors@1.1.5
17
+ - @backstage/integration@1.4.4-next.0
18
+ - @backstage/types@1.0.2
19
+ - @backstage/plugin-catalog-common@1.0.13-next.0
20
+ - @backstage/plugin-catalog-node@1.3.5-next.2
21
+ - @backstage/plugin-permission-common@0.7.5-next.0
22
+ - @backstage/plugin-scaffolder-common@1.2.7-next.1
23
+ - @backstage/plugin-search-backend-module-catalog@0.1.0-next.1
24
+ - @backstage/plugin-search-common@1.2.3-next.0
25
+
3
26
  ## 1.8.1-next.1
4
27
 
5
28
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.8.1-next.1",
3
+ "version": "1.8.1-next.2",
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-adbbf6ff.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-d0919a35.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
10
10
  var backendCommon = require('@backstage/backend-common');
package/dist/alpha.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as EntitiesSearchFilter } from './types/types.d-681f9283.js';
2
- export { E as EntitiesSearchFilter } from './types/types.d-681f9283.js';
1
+ import { E as EntitiesSearchFilter } from './types/types.d-c2093007.js';
2
+ export { E as EntitiesSearchFilter } from './types/types.d-c2093007.js';
3
3
  import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
4
4
  import { PermissionRuleParams } from '@backstage/plugin-permission-common';
5
5
  import * as _backstage_plugin_permission_node from '@backstage/plugin-permission-node';
@@ -68,7 +68,7 @@ declare const catalogConditions: _backstage_plugin_permission_node.Conditions<{
68
68
  *
69
69
  * @alpha
70
70
  */
71
- declare const createCatalogConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"catalog-entity">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"catalog-entity", _backstage_plugin_permission_common.PermissionRuleParams>>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
71
+ declare const createCatalogConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"catalog-entity">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"catalog-entity">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
72
72
 
73
73
  /**
74
74
  * Convenience type for {@link @backstage/plugin-permission-node#PermissionRule}
@@ -77,7 +77,7 @@ declare const createCatalogConditionalDecision: (permission: _backstage_plugin_p
77
77
  *
78
78
  * @alpha
79
79
  */
80
- declare type CatalogPermissionRule<TParams extends PermissionRuleParams = PermissionRuleParams> = PermissionRule<Entity, EntitiesSearchFilter, 'catalog-entity', TParams>;
80
+ type CatalogPermissionRule<TParams extends PermissionRuleParams = PermissionRuleParams> = PermissionRule<Entity, EntitiesSearchFilter, 'catalog-entity', TParams>;
81
81
  /**
82
82
  * Helper function for creating correctly-typed
83
83
  * {@link @backstage/plugin-permission-node#PermissionRule}s for the
@@ -1589,26 +1589,30 @@ class DefaultCatalogProcessingEngine {
1589
1589
  locationKey,
1590
1590
  refreshKeys: result.refreshKeys
1591
1591
  });
1592
- oldRelationSources = new Set(
1593
- previous.relations.map((r) => r.source_entity_ref)
1592
+ oldRelationSources = new Map(
1593
+ previous.relations.map((r) => [
1594
+ `${r.source_entity_ref}:${r.type}`,
1595
+ r.source_entity_ref
1596
+ ])
1594
1597
  );
1595
1598
  });
1596
- const newRelationSources = new Set(
1597
- result.relations.map(
1598
- (relation) => catalogModel.stringifyEntityRef(relation.source)
1599
- )
1599
+ const newRelationSources = new Map(
1600
+ result.relations.map((relation) => {
1601
+ const sourceEntityRef = catalogModel.stringifyEntityRef(relation.source);
1602
+ return [`${sourceEntityRef}:${relation.type}`, sourceEntityRef];
1603
+ })
1600
1604
  );
1601
1605
  const setOfThingsToStitch = /* @__PURE__ */ new Set([
1602
1606
  catalogModel.stringifyEntityRef(result.completedEntity)
1603
1607
  ]);
1604
- newRelationSources.forEach((r) => {
1605
- if (!oldRelationSources.has(r)) {
1606
- setOfThingsToStitch.add(r);
1608
+ newRelationSources.forEach((sourceEntityRef, uniqueKey) => {
1609
+ if (!oldRelationSources.has(uniqueKey)) {
1610
+ setOfThingsToStitch.add(sourceEntityRef);
1607
1611
  }
1608
1612
  });
1609
- oldRelationSources.forEach((r) => {
1610
- if (!newRelationSources.has(r)) {
1611
- setOfThingsToStitch.add(r);
1613
+ oldRelationSources.forEach((sourceEntityRef, uniqueKey) => {
1614
+ if (!newRelationSources.has(uniqueKey)) {
1615
+ setOfThingsToStitch.add(sourceEntityRef);
1612
1616
  }
1613
1617
  });
1614
1618
  await this.stitcher.stitch(setOfThingsToStitch);
@@ -4962,4 +4966,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
4962
4966
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
4963
4967
  exports.parseEntityYaml = parseEntityYaml;
4964
4968
  exports.permissionRules = permissionRules;
4965
- //# sourceMappingURL=CatalogBuilder-adbbf6ff.cjs.js.map
4969
+ //# sourceMappingURL=CatalogBuilder-d0919a35.cjs.js.map