@backstage/plugin-catalog-backend 1.1.0 → 1.1.2-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.1.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ccbe081cc: Minor internal tweak to support TypeScript 4.6
8
+ - Updated dependencies
9
+ - @backstage/backend-common@0.13.3-next.1
10
+
11
+ ## 1.1.2-next.0
12
+
13
+ ### Patch Changes
14
+
15
+ - 55e09b29dd: Fixing broken types for `knex` when checking returned rows
16
+ - cfc0f19699: Updated dependency `fs-extra` to `10.1.0`.
17
+ - 8cc75993a6: Fixed issue in `PermissionEvaluator` instance check that would cause unexpected "invalid union" errors.
18
+ - Updated dependencies
19
+ - @backstage/backend-common@0.13.3-next.0
20
+ - @backstage/integration@1.2.0-next.0
21
+ - @backstage/plugin-permission-node@0.6.1-next.0
22
+
3
23
  ## 1.1.0
4
24
 
5
25
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.1.0",
3
+ "version": "1.1.2-next.1",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -2079,11 +2079,11 @@ class DefaultEntitiesCatalog {
2079
2079
  }
2080
2080
  async entities(request) {
2081
2081
  const db = this.database;
2082
- let entitiesQuery = db("final_entities");
2082
+ let entitiesQuery = db("final_entities").select("final_entities.*");
2083
2083
  if (request == null ? void 0 : request.filter) {
2084
2084
  entitiesQuery = parseFilter(request.filter, entitiesQuery, db);
2085
2085
  }
2086
- entitiesQuery = entitiesQuery.select("final_entities.*").whereNotNull("final_entities.final_entity").orderBy("entity_id", "asc");
2086
+ entitiesQuery = entitiesQuery.whereNotNull("final_entities.final_entity").orderBy("entity_id", "asc");
2087
2087
  const { limit, offset } = parsePagination(request == null ? void 0 : request.pagination);
2088
2088
  if (limit !== void 0) {
2089
2089
  entitiesQuery = entitiesQuery.limit(limit + 1);
@@ -2703,11 +2703,11 @@ class Stitcher {
2703
2703
  entity.metadata.etag = hash;
2704
2704
  }
2705
2705
  const searchEntries = buildEntitySearch(entityId, entity);
2706
- const rowsChanged = await this.database("final_entities").update({
2706
+ const amountOfRowsChanged = await this.database("final_entities").update({
2707
2707
  final_entity: JSON.stringify(entity),
2708
2708
  hash
2709
2709
  }).where("entity_id", entityId).where("stitch_ticket", ticket).onConflict("entity_id").merge(["final_entity", "hash"]);
2710
- if (rowsChanged.length === 0) {
2710
+ if (amountOfRowsChanged === 0) {
2711
2711
  this.logger.debug(`Entity ${entityRef} is already processed, skipping write.`);
2712
2712
  return;
2713
2713
  }
@@ -3475,7 +3475,7 @@ class CatalogBuilder {
3475
3475
  });
3476
3476
  const unauthorizedEntitiesCatalog = new DefaultEntitiesCatalog(dbClient);
3477
3477
  let permissionEvaluator;
3478
- if ("query" in permissions) {
3478
+ if ("authorizeConditional" in permissions) {
3479
3479
  permissionEvaluator = permissions;
3480
3480
  } else {
3481
3481
  logger.warn("PermissionAuthorizer is deprecated. Please use an instance of PermissionEvaluator instead of PermissionAuthorizer in PluginEnvironment#permissions");