@backstage/plugin-catalog-backend 1.2.1-next.0 → 1.2.1-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 +16 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +0 -1
- package/dist/index.beta.d.ts +0 -1
- package/dist/index.cjs.js +2 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.2.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f1dcc6f3c6: Use entity type predicates from catalog-model
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@1.1.0-next.1
|
|
10
|
+
- @backstage/backend-common@0.14.1-next.1
|
|
11
|
+
- @backstage/errors@1.1.0-next.0
|
|
12
|
+
- @backstage/catalog-client@1.0.4-next.1
|
|
13
|
+
- @backstage/integration@1.2.2-next.1
|
|
14
|
+
- @backstage/plugin-catalog-common@1.0.4-next.0
|
|
15
|
+
- @backstage/plugin-permission-common@0.6.3-next.0
|
|
16
|
+
- @backstage/plugin-permission-node@0.6.3-next.1
|
|
17
|
+
- @backstage/plugin-search-common@0.3.6-next.0
|
|
18
|
+
|
|
3
19
|
## 1.2.1-next.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -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 (
|
|
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);
|