@backstage/plugin-catalog-backend 1.2.0 → 1.2.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,52 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.2.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 679b32172e: Updated dependency `knex` to `^2.0.0`.
8
+ - e2d7b76f43: Upgrade git-url-parse to 12.0.0.
9
+
10
+ Motivation for upgrade is transitively upgrading parse-url which is vulnerable
11
+ to several CVEs detected by Snyk.
12
+
13
+ - SNYK-JS-PARSEURL-2935944
14
+ - SNYK-JS-PARSEURL-2935947
15
+ - SNYK-JS-PARSEURL-2936249
16
+
17
+ - Updated dependencies
18
+ - @backstage/catalog-model@1.1.0-next.2
19
+ - @backstage/backend-common@0.14.1-next.2
20
+ - @backstage/integration@1.2.2-next.2
21
+
22
+ ## 1.2.1-next.1
23
+
24
+ ### Patch Changes
25
+
26
+ - f1dcc6f3c6: Use entity type predicates from catalog-model
27
+ - Updated dependencies
28
+ - @backstage/catalog-model@1.1.0-next.1
29
+ - @backstage/backend-common@0.14.1-next.1
30
+ - @backstage/errors@1.1.0-next.0
31
+ - @backstage/catalog-client@1.0.4-next.1
32
+ - @backstage/integration@1.2.2-next.1
33
+ - @backstage/plugin-catalog-common@1.0.4-next.0
34
+ - @backstage/plugin-permission-common@0.6.3-next.0
35
+ - @backstage/plugin-permission-node@0.6.3-next.1
36
+ - @backstage/plugin-search-common@0.3.6-next.0
37
+
38
+ ## 1.2.1-next.0
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies
43
+ - @backstage/backend-common@0.14.1-next.0
44
+ - @backstage/catalog-model@1.1.0-next.0
45
+ - @backstage/integration@1.2.2-next.0
46
+ - @backstage/plugin-permission-node@0.6.3-next.0
47
+ - @backstage/catalog-client@1.0.4-next.0
48
+ - @backstage/plugin-scaffolder-common@1.1.2-next.0
49
+
3
50
  ## 1.2.0
4
51
 
5
52
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-next.2",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
@@ -555,7 +555,6 @@ export declare class DefaultCatalogCollator {
555
555
  catalogClient?: CatalogApi;
556
556
  });
557
557
  protected applyArgsToFormat(format: string, args: Record<string, string>): string;
558
- private isUserEntity;
559
558
  private getDocumentText;
560
559
  execute(): Promise<CatalogEntityDocument[]>;
561
560
  }
@@ -489,7 +489,6 @@ export declare class DefaultCatalogCollator {
489
489
  catalogClient?: CatalogApi;
490
490
  });
491
491
  protected applyArgsToFormat(format: string, args: Record<string, string>): string;
492
- private isUserEntity;
493
492
  private getDocumentText;
494
493
  execute(): Promise<CatalogEntityDocument[]>;
495
494
  }
package/dist/index.cjs.js CHANGED
@@ -781,17 +781,11 @@ function createRandomProcessingInterval(options) {
781
781
  };
782
782
  }
783
783
 
784
- function isUserEntity(entity) {
785
- return entity.kind.toLocaleUpperCase("en-US") === "USER";
786
- }
787
- function isGroupEntity(entity) {
788
- return entity.kind.toLocaleUpperCase("en-US") === "GROUP";
789
- }
790
784
  function getDocumentText(entity) {
791
785
  var _a, _b;
792
786
  const documentTexts = [];
793
787
  documentTexts.push(entity.metadata.description || "");
794
- if (isUserEntity(entity) || isGroupEntity(entity)) {
788
+ if (catalogModel.isUserEntity(entity) || catalogModel.isGroupEntity(entity)) {
795
789
  if ((_b = (_a = entity.spec) == null ? void 0 : _a.profile) == null ? void 0 : _b.displayName) {
796
790
  documentTexts.push(entity.spec.profile.displayName);
797
791
  }
@@ -890,13 +884,10 @@ class DefaultCatalogCollator {
890
884
  }
891
885
  return formatted.toLowerCase();
892
886
  }
893
- isUserEntity(entity) {
894
- return entity.kind.toLocaleUpperCase("en-US") === "USER";
895
- }
896
887
  getDocumentText(entity) {
897
888
  var _a, _b, _c, _d, _e, _f;
898
889
  let documentText = entity.metadata.description || "";
899
- if (this.isUserEntity(entity)) {
890
+ if (catalogModel.isUserEntity(entity)) {
900
891
  if (((_b = (_a = entity.spec) == null ? void 0 : _a.profile) == null ? void 0 : _b.displayName) && documentText) {
901
892
  const displayName = (_d = (_c = entity.spec) == null ? void 0 : _c.profile) == null ? void 0 : _d.displayName;
902
893
  documentText = displayName.concat(" : ", documentText);