@backstage/plugin-search-backend-module-catalog 0.1.24 → 0.1.25-next.0
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 +18 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/cjs/{config-MJ2duTVN.cjs.js → config-A_If_NLd.cjs.js} +5 -6
- package/dist/cjs/{config-MJ2duTVN.cjs.js.map → config-A_If_NLd.cjs.js.map} +1 -1
- package/dist/index.cjs.js +34 -43
- package/dist/index.cjs.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @backstage/plugin-search-backend-module-catalog
|
|
2
2
|
|
|
3
|
+
## 0.1.25-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-tasks@0.5.24-next.0
|
|
9
|
+
- @backstage/backend-common@0.22.1-next.0
|
|
10
|
+
- @backstage/plugin-search-backend-node@1.2.24-next.0
|
|
11
|
+
- @backstage/backend-plugin-api@0.6.19-next.0
|
|
12
|
+
- @backstage/plugin-catalog-node@1.12.1-next.0
|
|
13
|
+
- @backstage/catalog-client@1.6.5
|
|
14
|
+
- @backstage/catalog-model@1.5.0
|
|
15
|
+
- @backstage/config@1.2.0
|
|
16
|
+
- @backstage/errors@1.2.4
|
|
17
|
+
- @backstage/plugin-catalog-common@1.0.23
|
|
18
|
+
- @backstage/plugin-permission-common@0.7.13
|
|
19
|
+
- @backstage/plugin-search-common@1.2.11
|
|
20
|
+
|
|
3
21
|
## 0.1.24
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
|
6
6
|
var alpha$2 = require('@backstage/plugin-catalog-node/alpha');
|
|
7
7
|
var pluginSearchBackendModuleCatalog = require('@backstage/plugin-search-backend-module-catalog');
|
|
8
8
|
var alpha$1 = require('@backstage/plugin-search-backend-node/alpha');
|
|
9
|
-
var config = require('./cjs/config-
|
|
9
|
+
var config = require('./cjs/config-A_If_NLd.cjs.js');
|
|
10
10
|
require('@backstage/backend-tasks');
|
|
11
11
|
require('@backstage/errors');
|
|
12
12
|
|
|
@@ -29,21 +29,20 @@ function readScheduleConfigOptions(configRoot) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
return schedule
|
|
32
|
+
return schedule ?? defaults.schedule;
|
|
33
33
|
}
|
|
34
34
|
function readCollatorConfigOptions(configRoot) {
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
35
|
const config = configRoot.getOptionalConfig(configKey);
|
|
37
36
|
if (!config) {
|
|
38
37
|
return defaults.collatorOptions;
|
|
39
38
|
}
|
|
40
39
|
return {
|
|
41
|
-
locationTemplate:
|
|
42
|
-
filter:
|
|
43
|
-
batchSize:
|
|
40
|
+
locationTemplate: config.getOptionalString("locationTemplate") ?? defaults.collatorOptions.locationTemplate,
|
|
41
|
+
filter: config.getOptionalConfig("filter")?.get() ?? defaults.collatorOptions.filter,
|
|
42
|
+
batchSize: config.getOptionalNumber("batchSize") ?? defaults.collatorOptions.batchSize
|
|
44
43
|
};
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
exports.readCollatorConfigOptions = readCollatorConfigOptions;
|
|
48
47
|
exports.readScheduleConfigOptions = readScheduleConfigOptions;
|
|
49
|
-
//# sourceMappingURL=config-
|
|
48
|
+
//# sourceMappingURL=config-A_If_NLd.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-A_If_NLd.cjs.js","sources":["../../src/collators/config.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n readTaskScheduleDefinitionFromConfig,\n TaskScheduleDefinition,\n} from '@backstage/backend-tasks';\nimport { EntityFilterQuery } from '@backstage/catalog-client';\nimport { Config } from '@backstage/config';\nimport { InputError } from '@backstage/errors';\n\nconst configKey = 'search.collators.catalog';\n\nexport const defaults = {\n schedule: {\n frequency: { minutes: 10 },\n timeout: { minutes: 15 },\n initialDelay: { seconds: 3 },\n },\n collatorOptions: {\n locationTemplate: '/catalog/:namespace/:kind/:name',\n filter: undefined,\n batchSize: 500,\n },\n};\n\nexport function readScheduleConfigOptions(\n configRoot: Config,\n): TaskScheduleDefinition {\n let schedule: TaskScheduleDefinition | undefined = undefined;\n\n const config = configRoot.getOptionalConfig(configKey);\n if (config) {\n const scheduleConfig = config.getOptionalConfig('schedule');\n if (scheduleConfig) {\n try {\n schedule = readTaskScheduleDefinitionFromConfig(scheduleConfig);\n } catch (error) {\n throw new InputError(`Invalid schedule at ${configKey}, ${error}`);\n }\n }\n }\n\n return schedule ?? defaults.schedule;\n}\n\nexport function readCollatorConfigOptions(configRoot: Config): {\n locationTemplate: string;\n filter: EntityFilterQuery | undefined;\n batchSize: number;\n} {\n const config = configRoot.getOptionalConfig(configKey);\n if (!config) {\n return defaults.collatorOptions;\n }\n\n return {\n locationTemplate:\n config.getOptionalString('locationTemplate') ??\n defaults.collatorOptions.locationTemplate,\n filter:\n config.getOptionalConfig('filter')?.get<EntityFilterQuery>() ??\n defaults.collatorOptions.filter,\n batchSize:\n config.getOptionalNumber('batchSize') ??\n defaults.collatorOptions.batchSize,\n };\n}\n"],"names":["readTaskScheduleDefinitionFromConfig","InputError"],"mappings":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IACL,kBACE,MAAO,CAAA,iBAAA,CAAkB,kBAAkB,CAAA,IAC3C,SAAS,eAAgB,CAAA,gBAAA;AAAA,IAC3B,MAAA,EACE,OAAO,iBAAkB,CAAA,QAAQ,GAAG,GAAuB,EAAA,IAC3D,SAAS,eAAgB,CAAA,MAAA;AAAA,IAC3B,WACE,MAAO,CAAA,iBAAA,CAAkB,WAAW,CAAA,IACpC,SAAS,eAAgB,CAAA,SAAA;AAAA,GAC7B,CAAA;AACF;;;;;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -5,56 +5,65 @@ var catalogClient = require('@backstage/catalog-client');
|
|
|
5
5
|
var catalogModel = require('@backstage/catalog-model');
|
|
6
6
|
var alpha = require('@backstage/plugin-catalog-common/alpha');
|
|
7
7
|
var stream = require('stream');
|
|
8
|
-
var config = require('./cjs/config-
|
|
8
|
+
var config = require('./cjs/config-A_If_NLd.cjs.js');
|
|
9
9
|
require('@backstage/backend-tasks');
|
|
10
10
|
require('@backstage/errors');
|
|
11
11
|
|
|
12
12
|
const getDocumentText = (entity) => {
|
|
13
|
-
var _a, _b, _c, _d;
|
|
14
13
|
const documentTexts = [];
|
|
15
14
|
documentTexts.push(entity.metadata.description || "");
|
|
16
15
|
if (catalogModel.isUserEntity(entity) || catalogModel.isGroupEntity(entity)) {
|
|
17
|
-
if (
|
|
16
|
+
if (entity.spec?.profile?.displayName) {
|
|
18
17
|
documentTexts.push(entity.spec.profile.displayName);
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
if (catalogModel.isUserEntity(entity)) {
|
|
22
|
-
if (
|
|
21
|
+
if (entity.spec?.profile?.email) {
|
|
23
22
|
documentTexts.push(entity.spec.profile.email);
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
return documentTexts.join(" : ");
|
|
27
26
|
};
|
|
28
27
|
const defaultCatalogCollatorEntityTransformer = (entity) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
30
28
|
return {
|
|
31
|
-
title:
|
|
29
|
+
title: entity.metadata.title ?? entity.metadata.name,
|
|
32
30
|
text: getDocumentText(entity),
|
|
33
|
-
componentType:
|
|
34
|
-
type:
|
|
31
|
+
componentType: entity.spec?.type?.toString() || "other",
|
|
32
|
+
type: entity.spec?.type?.toString() || "other",
|
|
35
33
|
namespace: entity.metadata.namespace || "default",
|
|
36
34
|
kind: entity.kind,
|
|
37
|
-
lifecycle:
|
|
38
|
-
owner:
|
|
35
|
+
lifecycle: entity.spec?.lifecycle || "",
|
|
36
|
+
owner: entity.spec?.owner || ""
|
|
39
37
|
};
|
|
40
38
|
};
|
|
41
39
|
|
|
42
|
-
var __defProp = Object.defineProperty;
|
|
43
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
44
|
-
var __publicField = (obj, key, value) => {
|
|
45
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
46
|
-
return value;
|
|
47
|
-
};
|
|
48
40
|
class DefaultCatalogCollatorFactory {
|
|
41
|
+
type = "software-catalog";
|
|
42
|
+
visibilityPermission = alpha.catalogEntityReadPermission;
|
|
43
|
+
locationTemplate;
|
|
44
|
+
filter;
|
|
45
|
+
batchSize;
|
|
46
|
+
catalogClient;
|
|
47
|
+
entityTransformer;
|
|
48
|
+
auth;
|
|
49
|
+
static fromConfig(configRoot, options) {
|
|
50
|
+
const configOptions = config.readCollatorConfigOptions(configRoot);
|
|
51
|
+
const { auth: adaptedAuth } = backendCommon.createLegacyAuthAdapters({
|
|
52
|
+
auth: options.auth,
|
|
53
|
+
discovery: options.discovery,
|
|
54
|
+
tokenManager: options.tokenManager
|
|
55
|
+
});
|
|
56
|
+
return new DefaultCatalogCollatorFactory({
|
|
57
|
+
locationTemplate: options.locationTemplate ?? configOptions.locationTemplate,
|
|
58
|
+
filter: options.filter ?? configOptions.filter,
|
|
59
|
+
batchSize: options.batchSize ?? configOptions.batchSize,
|
|
60
|
+
entityTransformer: options.entityTransformer,
|
|
61
|
+
auth: adaptedAuth,
|
|
62
|
+
discovery: options.discovery,
|
|
63
|
+
catalogClient: options.catalogClient
|
|
64
|
+
});
|
|
65
|
+
}
|
|
49
66
|
constructor(options) {
|
|
50
|
-
__publicField(this, "type", "software-catalog");
|
|
51
|
-
__publicField(this, "visibilityPermission", alpha.catalogEntityReadPermission);
|
|
52
|
-
__publicField(this, "locationTemplate");
|
|
53
|
-
__publicField(this, "filter");
|
|
54
|
-
__publicField(this, "batchSize");
|
|
55
|
-
__publicField(this, "catalogClient");
|
|
56
|
-
__publicField(this, "entityTransformer");
|
|
57
|
-
__publicField(this, "auth");
|
|
58
67
|
const {
|
|
59
68
|
auth,
|
|
60
69
|
batchSize,
|
|
@@ -68,27 +77,9 @@ class DefaultCatalogCollatorFactory {
|
|
|
68
77
|
this.filter = filter;
|
|
69
78
|
this.batchSize = batchSize;
|
|
70
79
|
this.catalogClient = catalogClient$1 || new catalogClient.CatalogClient({ discoveryApi: discovery });
|
|
71
|
-
this.entityTransformer = entityTransformer
|
|
80
|
+
this.entityTransformer = entityTransformer ?? defaultCatalogCollatorEntityTransformer;
|
|
72
81
|
this.auth = auth;
|
|
73
82
|
}
|
|
74
|
-
static fromConfig(configRoot, options) {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
-
const configOptions = config.readCollatorConfigOptions(configRoot);
|
|
77
|
-
const { auth: adaptedAuth } = backendCommon.createLegacyAuthAdapters({
|
|
78
|
-
auth: options.auth,
|
|
79
|
-
discovery: options.discovery,
|
|
80
|
-
tokenManager: options.tokenManager
|
|
81
|
-
});
|
|
82
|
-
return new DefaultCatalogCollatorFactory({
|
|
83
|
-
locationTemplate: (_a = options.locationTemplate) != null ? _a : configOptions.locationTemplate,
|
|
84
|
-
filter: (_b = options.filter) != null ? _b : configOptions.filter,
|
|
85
|
-
batchSize: (_c = options.batchSize) != null ? _c : configOptions.batchSize,
|
|
86
|
-
entityTransformer: options.entityTransformer,
|
|
87
|
-
auth: adaptedAuth,
|
|
88
|
-
discovery: options.discovery,
|
|
89
|
-
catalogClient: options.catalogClient
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
83
|
async getCollator() {
|
|
93
84
|
return stream.Readable.from(this.execute());
|
|
94
85
|
}
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/collators/defaultCatalogCollatorEntityTransformer.ts","../src/collators/DefaultCatalogCollatorFactory.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, isGroupEntity, isUserEntity } from '@backstage/catalog-model';\nimport { CatalogCollatorEntityTransformer } from './CatalogCollatorEntityTransformer';\n\nconst getDocumentText = (entity: Entity): string => {\n const documentTexts: string[] = [];\n documentTexts.push(entity.metadata.description || '');\n\n if (isUserEntity(entity) || isGroupEntity(entity)) {\n if (entity.spec?.profile?.displayName) {\n documentTexts.push(entity.spec.profile.displayName);\n }\n }\n\n if (isUserEntity(entity)) {\n if (entity.spec?.profile?.email) {\n documentTexts.push(entity.spec.profile.email);\n }\n }\n\n return documentTexts.join(' : ');\n};\n\n/** @public */\nexport const defaultCatalogCollatorEntityTransformer: CatalogCollatorEntityTransformer =\n (entity: Entity) => {\n return {\n title: entity.metadata.title ?? entity.metadata.name,\n text: getDocumentText(entity),\n componentType: entity.spec?.type?.toString() || 'other',\n type: entity.spec?.type?.toString() || 'other',\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n lifecycle: (entity.spec?.lifecycle as string) || '',\n owner: (entity.spec?.owner as string) || '',\n };\n };\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n PluginEndpointDiscovery,\n TokenManager,\n createLegacyAuthAdapters,\n} from '@backstage/backend-common';\nimport {\n CatalogApi,\n CatalogClient,\n GetEntitiesRequest,\n} from '@backstage/catalog-client';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport { CatalogEntityDocument } from '@backstage/plugin-catalog-common';\nimport { catalogEntityReadPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { Permission } from '@backstage/plugin-permission-common';\nimport { DocumentCollatorFactory } from '@backstage/plugin-search-common';\nimport { Readable } from 'stream';\nimport { CatalogCollatorEntityTransformer } from './CatalogCollatorEntityTransformer';\nimport { readCollatorConfigOptions } from './config';\nimport { defaultCatalogCollatorEntityTransformer } from './defaultCatalogCollatorEntityTransformer';\nimport { AuthService } from '@backstage/backend-plugin-api';\n\n/** @public */\nexport type DefaultCatalogCollatorFactoryOptions = {\n auth?: AuthService;\n discovery: PluginEndpointDiscovery;\n tokenManager?: TokenManager;\n /**\n * @deprecated Use the config key `search.collators.catalog.locationTemplate` instead.\n */\n locationTemplate?: string;\n /**\n * @deprecated Use the config key `search.collators.catalog.filter` instead.\n */\n filter?: GetEntitiesRequest['filter'];\n /**\n * @deprecated Use the config key `search.collators.catalog.batchSize` instead.\n */\n batchSize?: number;\n catalogClient?: CatalogApi;\n /**\n * Allows you to customize how entities are shaped into documents.\n */\n entityTransformer?: CatalogCollatorEntityTransformer;\n};\n\n/**\n * Collates entities from the Catalog into documents for the search backend.\n *\n * @public\n */\nexport class DefaultCatalogCollatorFactory implements DocumentCollatorFactory {\n public readonly type = 'software-catalog';\n public readonly visibilityPermission: Permission =\n catalogEntityReadPermission;\n\n private locationTemplate: string;\n private filter?: GetEntitiesRequest['filter'];\n private batchSize: number;\n private readonly catalogClient: CatalogApi;\n private entityTransformer: CatalogCollatorEntityTransformer;\n private auth: AuthService;\n\n static fromConfig(\n configRoot: Config,\n options: DefaultCatalogCollatorFactoryOptions,\n ) {\n const configOptions = readCollatorConfigOptions(configRoot);\n const { auth: adaptedAuth } = createLegacyAuthAdapters({\n auth: options.auth,\n discovery: options.discovery,\n tokenManager: options.tokenManager,\n });\n return new DefaultCatalogCollatorFactory({\n locationTemplate:\n options.locationTemplate ?? configOptions.locationTemplate,\n filter: options.filter ?? configOptions.filter,\n batchSize: options.batchSize ?? configOptions.batchSize,\n entityTransformer: options.entityTransformer,\n auth: adaptedAuth,\n discovery: options.discovery,\n catalogClient: options.catalogClient,\n });\n }\n\n private constructor(options: {\n locationTemplate: string;\n filter: GetEntitiesRequest['filter'];\n batchSize: number;\n entityTransformer?: CatalogCollatorEntityTransformer;\n auth: AuthService;\n discovery: PluginEndpointDiscovery;\n catalogClient?: CatalogApi;\n }) {\n const {\n auth,\n batchSize,\n discovery,\n locationTemplate,\n filter,\n catalogClient,\n entityTransformer,\n } = options;\n\n this.locationTemplate = locationTemplate;\n this.filter = filter;\n this.batchSize = batchSize;\n this.catalogClient =\n catalogClient || new CatalogClient({ discoveryApi: discovery });\n this.entityTransformer =\n entityTransformer ?? defaultCatalogCollatorEntityTransformer;\n this.auth = auth;\n }\n\n async getCollator(): Promise<Readable> {\n return Readable.from(this.execute());\n }\n\n private async *execute(): AsyncGenerator<CatalogEntityDocument> {\n let entitiesRetrieved = 0;\n let moreEntitiesToGet = true;\n\n // Offset/limit pagination is used on the Catalog Client in order to\n // limit (and allow some control over) memory used by the search backend\n // at index-time.\n while (moreEntitiesToGet) {\n const { token } = await this.auth.getPluginRequestToken({\n onBehalfOf: await this.auth.getOwnServiceCredentials(),\n targetPluginId: 'catalog',\n });\n const entities = (\n await this.catalogClient.getEntities(\n {\n filter: this.filter,\n limit: this.batchSize,\n offset: entitiesRetrieved,\n },\n { token },\n )\n ).items;\n\n // Control looping through entity batches.\n moreEntitiesToGet = entities.length === this.batchSize;\n entitiesRetrieved += entities.length;\n\n for (const entity of entities) {\n yield {\n ...this.entityTransformer(entity),\n authorization: {\n resourceRef: stringifyEntityRef(entity),\n },\n location: this.applyArgsToFormat(this.locationTemplate, {\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n name: entity.metadata.name,\n }),\n };\n }\n }\n }\n\n private applyArgsToFormat(\n format: string,\n args: Record<string, string>,\n ): string {\n let formatted = format;\n\n for (const [key, value] of Object.entries(args)) {\n formatted = formatted.replace(`:${key}`, value);\n }\n\n return formatted.toLowerCase();\n }\n}\n"],"names":["isUserEntity","isGroupEntity","catalogEntityReadPermission","catalogClient","CatalogClient","readCollatorConfigOptions","createLegacyAuthAdapters","Readable","stringifyEntityRef"],"mappings":";;;;;;;;;;;AAmBA,MAAM,eAAA,GAAkB,CAAC,MAA2B,KAAA;AAnBpD,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAoBE,EAAA,MAAM,gBAA0B,EAAC,CAAA;AACjC,EAAA,aAAA,CAAc,IAAK,CAAA,MAAA,CAAO,QAAS,CAAA,WAAA,IAAe,EAAE,CAAA,CAAA;AAEpD,EAAA,IAAIA,yBAAa,CAAA,MAAM,CAAK,IAAAC,0BAAA,CAAc,MAAM,CAAG,EAAA;AACjD,IAAA,IAAA,CAAI,EAAO,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,IAAA,KAAP,IAAa,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAb,mBAAsB,WAAa,EAAA;AACrC,MAAA,aAAA,CAAc,IAAK,CAAA,MAAA,CAAO,IAAK,CAAA,OAAA,CAA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AAA,CAAA;AAEhB,IAAA,KAAA,MAAW,CAAC,GAAK,EAAA,KAAK,KAAK,MAAO,CAAA,OAAA,CAAQ,IAAI,CAAG,EAAA;AAC/C,MAAA,SAAA,GAAY,SAAU,CAAA,OAAA,CAAQ,CAAI,CAAA,EAAA,GAAG,IAAI,KAAK,CAAA,CAAA;AAAA,KAChD;AAEA,IAAA,OAAO,UAAU,WAAY,EAAA,CAAA;AAAA,GAC/B;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/collators/defaultCatalogCollatorEntityTransformer.ts","../src/collators/DefaultCatalogCollatorFactory.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, isGroupEntity, isUserEntity } from '@backstage/catalog-model';\nimport { CatalogCollatorEntityTransformer } from './CatalogCollatorEntityTransformer';\n\nconst getDocumentText = (entity: Entity): string => {\n const documentTexts: string[] = [];\n documentTexts.push(entity.metadata.description || '');\n\n if (isUserEntity(entity) || isGroupEntity(entity)) {\n if (entity.spec?.profile?.displayName) {\n documentTexts.push(entity.spec.profile.displayName);\n }\n }\n\n if (isUserEntity(entity)) {\n if (entity.spec?.profile?.email) {\n documentTexts.push(entity.spec.profile.email);\n }\n }\n\n return documentTexts.join(' : ');\n};\n\n/** @public */\nexport const defaultCatalogCollatorEntityTransformer: CatalogCollatorEntityTransformer =\n (entity: Entity) => {\n return {\n title: entity.metadata.title ?? entity.metadata.name,\n text: getDocumentText(entity),\n componentType: entity.spec?.type?.toString() || 'other',\n type: entity.spec?.type?.toString() || 'other',\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n lifecycle: (entity.spec?.lifecycle as string) || '',\n owner: (entity.spec?.owner as string) || '',\n };\n };\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n PluginEndpointDiscovery,\n TokenManager,\n createLegacyAuthAdapters,\n} from '@backstage/backend-common';\nimport {\n CatalogApi,\n CatalogClient,\n GetEntitiesRequest,\n} from '@backstage/catalog-client';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport { CatalogEntityDocument } from '@backstage/plugin-catalog-common';\nimport { catalogEntityReadPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { Permission } from '@backstage/plugin-permission-common';\nimport { DocumentCollatorFactory } from '@backstage/plugin-search-common';\nimport { Readable } from 'stream';\nimport { CatalogCollatorEntityTransformer } from './CatalogCollatorEntityTransformer';\nimport { readCollatorConfigOptions } from './config';\nimport { defaultCatalogCollatorEntityTransformer } from './defaultCatalogCollatorEntityTransformer';\nimport { AuthService } from '@backstage/backend-plugin-api';\n\n/** @public */\nexport type DefaultCatalogCollatorFactoryOptions = {\n auth?: AuthService;\n discovery: PluginEndpointDiscovery;\n tokenManager?: TokenManager;\n /**\n * @deprecated Use the config key `search.collators.catalog.locationTemplate` instead.\n */\n locationTemplate?: string;\n /**\n * @deprecated Use the config key `search.collators.catalog.filter` instead.\n */\n filter?: GetEntitiesRequest['filter'];\n /**\n * @deprecated Use the config key `search.collators.catalog.batchSize` instead.\n */\n batchSize?: number;\n catalogClient?: CatalogApi;\n /**\n * Allows you to customize how entities are shaped into documents.\n */\n entityTransformer?: CatalogCollatorEntityTransformer;\n};\n\n/**\n * Collates entities from the Catalog into documents for the search backend.\n *\n * @public\n */\nexport class DefaultCatalogCollatorFactory implements DocumentCollatorFactory {\n public readonly type = 'software-catalog';\n public readonly visibilityPermission: Permission =\n catalogEntityReadPermission;\n\n private locationTemplate: string;\n private filter?: GetEntitiesRequest['filter'];\n private batchSize: number;\n private readonly catalogClient: CatalogApi;\n private entityTransformer: CatalogCollatorEntityTransformer;\n private auth: AuthService;\n\n static fromConfig(\n configRoot: Config,\n options: DefaultCatalogCollatorFactoryOptions,\n ) {\n const configOptions = readCollatorConfigOptions(configRoot);\n const { auth: adaptedAuth } = createLegacyAuthAdapters({\n auth: options.auth,\n discovery: options.discovery,\n tokenManager: options.tokenManager,\n });\n return new DefaultCatalogCollatorFactory({\n locationTemplate:\n options.locationTemplate ?? configOptions.locationTemplate,\n filter: options.filter ?? configOptions.filter,\n batchSize: options.batchSize ?? configOptions.batchSize,\n entityTransformer: options.entityTransformer,\n auth: adaptedAuth,\n discovery: options.discovery,\n catalogClient: options.catalogClient,\n });\n }\n\n private constructor(options: {\n locationTemplate: string;\n filter: GetEntitiesRequest['filter'];\n batchSize: number;\n entityTransformer?: CatalogCollatorEntityTransformer;\n auth: AuthService;\n discovery: PluginEndpointDiscovery;\n catalogClient?: CatalogApi;\n }) {\n const {\n auth,\n batchSize,\n discovery,\n locationTemplate,\n filter,\n catalogClient,\n entityTransformer,\n } = options;\n\n this.locationTemplate = locationTemplate;\n this.filter = filter;\n this.batchSize = batchSize;\n this.catalogClient =\n catalogClient || new CatalogClient({ discoveryApi: discovery });\n this.entityTransformer =\n entityTransformer ?? defaultCatalogCollatorEntityTransformer;\n this.auth = auth;\n }\n\n async getCollator(): Promise<Readable> {\n return Readable.from(this.execute());\n }\n\n private async *execute(): AsyncGenerator<CatalogEntityDocument> {\n let entitiesRetrieved = 0;\n let moreEntitiesToGet = true;\n\n // Offset/limit pagination is used on the Catalog Client in order to\n // limit (and allow some control over) memory used by the search backend\n // at index-time.\n while (moreEntitiesToGet) {\n const { token } = await this.auth.getPluginRequestToken({\n onBehalfOf: await this.auth.getOwnServiceCredentials(),\n targetPluginId: 'catalog',\n });\n const entities = (\n await this.catalogClient.getEntities(\n {\n filter: this.filter,\n limit: this.batchSize,\n offset: entitiesRetrieved,\n },\n { token },\n )\n ).items;\n\n // Control looping through entity batches.\n moreEntitiesToGet = entities.length === this.batchSize;\n entitiesRetrieved += entities.length;\n\n for (const entity of entities) {\n yield {\n ...this.entityTransformer(entity),\n authorization: {\n resourceRef: stringifyEntityRef(entity),\n },\n location: this.applyArgsToFormat(this.locationTemplate, {\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n name: entity.metadata.name,\n }),\n };\n }\n }\n }\n\n private applyArgsToFormat(\n format: string,\n args: Record<string, string>,\n ): string {\n let formatted = format;\n\n for (const [key, value] of Object.entries(args)) {\n formatted = formatted.replace(`:${key}`, value);\n }\n\n return formatted.toLowerCase();\n }\n}\n"],"names":["isUserEntity","isGroupEntity","catalogEntityReadPermission","readCollatorConfigOptions","createLegacyAuthAdapters","catalogClient","CatalogClient","Readable","stringifyEntityRef"],"mappings":";;;;;;;;;;;AAmBA,MAAM,eAAA,GAAkB,CAAC,MAA2B,KAAA;AAClD,EAAA,MAAM,gBAA0B,EAAC,CAAA;AACjC,EAAA,aAAA,CAAc,IAAK,CAAA,MAAA,CAAO,QAAS,CAAA,WAAA,IAAe,EAAE,CAAA,CAAA;AAEpD,EAAA,IAAIA,yBAAa,CAAA,MAAM,CAAK,IAAAC,0BAAA,CAAc,MAAM,CAAG,EAAA;AACjD,IAAI,IAAA,MAAA,CAAO,IAAM,EAAA,OAAA,EAAS,WAAa,EAAA;AACrC,MAAA,aAAA,CAAc,IAAK,CAAA,MAAA,CAAO,IAAK,CAAA,OAAA,CAAQ,WAAW,CAAA,CAAA;AAAA,KACpD;AAAA,GACF;AAEA,EAAI,IAAAD,yBAAA,CAAa,MAAM,C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A,IAAA;AAAA,WACvB,CAAA;AAAA,SACH,CAAA;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAAA,EAEQ,iBAAA,CACN,QACA,IACQ,EAAA;AACR,IAAA,IAAI,SAAY,GAAA,MAAA,CAAA;AAEhB,IAAA,KAAA,MAAW,CAAC,GAAK,EAAA,KAAK,KAAK,MAAO,CAAA,OAAA,CAAQ,IAAI,CAAG,EAAA;AAC/C,MAAA,SAAA,GAAY,SAAU,CAAA,OAAA,CAAQ,CAAI,CAAA,EAAA,GAAG,IAAI,KAAK,CAAA,CAAA;AAAA,KAChD;AAEA,IAAA,OAAO,UAAU,WAAY,EAAA,CAAA;AAAA,GAC/B;AACF;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-search-backend-module-catalog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25-next.0",
|
|
4
4
|
"description": "A module for the search backend that exports catalog modules",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module"
|
|
@@ -45,23 +45,23 @@
|
|
|
45
45
|
"test": "backstage-cli package test"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@backstage/backend-common": "^0.22.0",
|
|
49
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
50
|
-
"@backstage/backend-tasks": "^0.5.
|
|
48
|
+
"@backstage/backend-common": "^0.22.1-next.0",
|
|
49
|
+
"@backstage/backend-plugin-api": "^0.6.19-next.0",
|
|
50
|
+
"@backstage/backend-tasks": "^0.5.24-next.0",
|
|
51
51
|
"@backstage/catalog-client": "^1.6.5",
|
|
52
52
|
"@backstage/catalog-model": "^1.5.0",
|
|
53
53
|
"@backstage/config": "^1.2.0",
|
|
54
54
|
"@backstage/errors": "^1.2.4",
|
|
55
55
|
"@backstage/plugin-catalog-common": "^1.0.23",
|
|
56
|
-
"@backstage/plugin-catalog-node": "^1.12.0",
|
|
56
|
+
"@backstage/plugin-catalog-node": "^1.12.1-next.0",
|
|
57
57
|
"@backstage/plugin-permission-common": "^0.7.13",
|
|
58
|
-
"@backstage/plugin-search-backend-node": "^1.2.
|
|
58
|
+
"@backstage/plugin-search-backend-node": "^1.2.24-next.0",
|
|
59
59
|
"@backstage/plugin-search-common": "^1.2.11"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@backstage/backend-common": "^0.22.0",
|
|
63
|
-
"@backstage/backend-test-utils": "^0.3.
|
|
64
|
-
"@backstage/cli": "^0.26.
|
|
62
|
+
"@backstage/backend-common": "^0.22.1-next.0",
|
|
63
|
+
"@backstage/backend-test-utils": "^0.3.9-next.0",
|
|
64
|
+
"@backstage/cli": "^0.26.6-next.0",
|
|
65
65
|
"msw": "^1.0.0"
|
|
66
66
|
},
|
|
67
67
|
"configSchema": "config.d.ts"
|