@backstage/plugin-catalog-backend 1.23.0-next.3 → 1.23.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 CHANGED
@@ -1,5 +1,60 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.23.1
9
+ - @backstage/backend-tasks@0.5.25
10
+ - @backstage/plugin-events-node@0.3.6
11
+ - @backstage/plugin-permission-node@0.7.31
12
+ - @backstage/plugin-search-backend-module-catalog@0.1.26
13
+ - @backstage/backend-openapi-utils@0.1.13
14
+ - @backstage/backend-plugin-api@0.6.20
15
+ - @backstage/catalog-client@1.6.5
16
+ - @backstage/catalog-model@1.5.0
17
+ - @backstage/config@1.2.0
18
+ - @backstage/errors@1.2.4
19
+ - @backstage/integration@1.12.0
20
+ - @backstage/types@1.1.1
21
+ - @backstage/plugin-catalog-common@1.0.24
22
+ - @backstage/plugin-catalog-node@1.12.2
23
+ - @backstage/plugin-permission-common@0.7.14
24
+
25
+ ## 1.23.0
26
+
27
+ ### Minor Changes
28
+
29
+ - c7528b0: Pass through `EventsService` too in the new backend system
30
+
31
+ ### Patch Changes
32
+
33
+ - 8869b8e: Updated local development setup.
34
+ - 78a0b08: Internal refactor to handle `BackendFeature` contract change.
35
+ - d44a20a: Added additional plugin metadata to `package.json`.
36
+ - d779e3b: Added a regex test to check commit hash. If url is from git commit branch ignore the edit url.
37
+ - 6c5cab1: Fix bug in `getLocationByEntity`
38
+ - 0f55f5c: Ensure name and title are both indexed by the DefaultCatalogCollator
39
+ - 1779188: Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package.
40
+ - Updated dependencies
41
+ - @backstage/backend-common@0.23.0
42
+ - @backstage/backend-plugin-api@0.6.19
43
+ - @backstage/backend-tasks@0.5.24
44
+ - @backstage/integration@1.12.0
45
+ - @backstage/plugin-search-backend-module-catalog@0.1.25
46
+ - @backstage/plugin-catalog-node@1.12.1
47
+ - @backstage/plugin-events-node@0.3.5
48
+ - @backstage/plugin-permission-node@0.7.30
49
+ - @backstage/plugin-permission-common@0.7.14
50
+ - @backstage/plugin-catalog-common@1.0.24
51
+ - @backstage/backend-openapi-utils@0.1.12
52
+ - @backstage/catalog-client@1.6.5
53
+ - @backstage/catalog-model@1.5.0
54
+ - @backstage/config@1.2.0
55
+ - @backstage/errors@1.2.4
56
+ - @backstage/types@1.1.1
57
+
3
58
  ## 1.23.0-next.3
4
59
 
5
60
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.23.0-next.3",
2
+ "name": "@backstage/plugin-catalog-backend__alpha",
3
+ "version": "1.23.1",
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-D6-74CoP.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-km2G8Nmv.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');
package/dist/alpha.d.ts CHANGED
@@ -121,6 +121,6 @@ declare const permissionRules: {
121
121
  * Catalog plugin
122
122
  * @alpha
123
123
  */
124
- declare const catalogPlugin: () => _backstage_backend_plugin_api.BackendFeature;
124
+ declare const catalogPlugin: _backstage_backend_plugin_api.BackendFeatureCompat;
125
125
 
126
126
  export { type CatalogPermissionRule, catalogConditions, createCatalogConditionalDecision, createCatalogPermissionRule, catalogPlugin as default, permissionRules };
@@ -930,27 +930,27 @@ class DefaultLocationStore {
930
930
  }
931
931
  async getLocationByEntity(entityRef) {
932
932
  const entityRefString = catalogModel.stringifyEntityRef(entityRef);
933
- const [entity] = await this.db("refresh_state").where({ entity_ref: entityRefString }).select("entity_id").limit(1);
934
- if (!entity) {
933
+ const [entityRow] = await this.db("refresh_state").where({ entity_ref: entityRefString }).select("entity_id").limit(1);
934
+ if (!entityRow) {
935
935
  throw new errors.NotFoundError(`found no entity for ref ${entityRefString}`);
936
936
  }
937
- const [locationKeyValue] = await this.db("search").where({
938
- entity_id: entity.entity_id,
937
+ const [searchRow] = await this.db("search").where({
938
+ entity_id: entityRow.entity_id,
939
939
  key: `metadata.annotations.${catalogModel.ANNOTATION_ORIGIN_LOCATION}`
940
940
  }).select("value").limit(1);
941
- if (!locationKeyValue) {
941
+ if (!searchRow?.value) {
942
942
  throw new errors.NotFoundError(
943
943
  `found no origin annotation for ref ${entityRefString}`
944
944
  );
945
945
  }
946
- const { type, target } = catalogModel.parseLocationRef(entityRefString);
947
- const [location] = await this.db("locations").where({ type, target }).select().limit(1);
948
- if (!location) {
946
+ const { type, target } = catalogModel.parseLocationRef(searchRow.value);
947
+ const [locationRow] = await this.db("locations").where({ type, target }).select().limit(1);
948
+ if (!locationRow) {
949
949
  throw new errors.NotFoundError(
950
950
  `Found no location with type ${type} and target ${target}`
951
951
  );
952
952
  }
953
- return location;
953
+ return locationRow;
954
954
  }
955
955
  get connection() {
956
956
  if (!this._connection) {
@@ -7256,4 +7256,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
7256
7256
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
7257
7257
  exports.parseEntityYaml = parseEntityYaml;
7258
7258
  exports.permissionRules = permissionRules;
7259
- //# sourceMappingURL=CatalogBuilder-D6-74CoP.cjs.js.map
7259
+ //# sourceMappingURL=CatalogBuilder-km2G8Nmv.cjs.js.map