@backstage/plugin-catalog-backend 1.14.0-next.0 → 1.14.0-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 +26 -0
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.14.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7a2e2924c7: Marked the `LocationEntityProcessor` as deprecated, as it is no longer used internally since way back and can even be harmful at this point.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-tasks@0.5.10-next.1
|
|
10
|
+
- @backstage/plugin-catalog-node@1.4.6-next.1
|
|
11
|
+
- @backstage/backend-common@0.19.7-next.1
|
|
12
|
+
- @backstage/backend-plugin-api@0.6.5-next.1
|
|
13
|
+
- @backstage/plugin-search-backend-module-catalog@0.1.9-next.1
|
|
14
|
+
- @backstage/plugin-auth-node@0.3.2-next.1
|
|
15
|
+
- @backstage/plugin-permission-node@0.7.16-next.1
|
|
16
|
+
- @backstage/config@1.1.0
|
|
17
|
+
- @backstage/backend-openapi-utils@0.0.4
|
|
18
|
+
- @backstage/catalog-client@1.4.4
|
|
19
|
+
- @backstage/catalog-model@1.4.2
|
|
20
|
+
- @backstage/errors@1.2.2
|
|
21
|
+
- @backstage/integration@1.7.1-next.0
|
|
22
|
+
- @backstage/types@1.1.1
|
|
23
|
+
- @backstage/plugin-catalog-common@1.0.16
|
|
24
|
+
- @backstage/plugin-events-node@0.2.14-next.1
|
|
25
|
+
- @backstage/plugin-permission-common@0.7.8
|
|
26
|
+
- @backstage/plugin-scaffolder-common@1.4.1
|
|
27
|
+
- @backstage/plugin-search-common@1.2.6
|
|
28
|
+
|
|
3
29
|
## 1.14.0-next.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/modules/core/AnnotateScmSlugEntityProcessor.ts","../src/modules/core/LocationEntityProcessor.ts","../src/search/DefaultCatalogCollator.ts","../src/deprecated.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright 2021 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 } from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport {\n ScmIntegrationRegistry,\n ScmIntegrations,\n} from '@backstage/integration';\nimport parseGitUrl from 'git-url-parse';\nimport { identity, merge, pickBy } from 'lodash';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\nimport { CatalogProcessor } from '@backstage/plugin-catalog-node';\n\nconst GITHUB_ACTIONS_ANNOTATION = 'github.com/project-slug';\nconst GITLAB_ACTIONS_ANNOTATION = 'gitlab.com/project-slug';\nconst AZURE_ACTIONS_ANNOTATION = 'dev.azure.com/project-repo';\n\n/** @public */\nexport class AnnotateScmSlugEntityProcessor implements CatalogProcessor {\n constructor(\n private readonly opts: {\n scmIntegrationRegistry: ScmIntegrationRegistry;\n kinds?: string[];\n },\n ) {}\n\n getProcessorName(): string {\n return 'AnnotateScmSlugEntityProcessor';\n }\n\n static fromConfig(\n config: Config,\n options?: { kinds?: string[] },\n ): AnnotateScmSlugEntityProcessor {\n return new AnnotateScmSlugEntityProcessor({\n scmIntegrationRegistry: ScmIntegrations.fromConfig(config),\n kinds: options?.kinds,\n });\n }\n\n async preProcessEntity(\n entity: Entity,\n location: LocationSpec,\n ): Promise<Entity> {\n const applicableKinds = (this.opts.kinds ?? ['Component']).map(k =>\n k.toLocaleLowerCase('en-US'),\n );\n if (\n !applicableKinds.includes(entity.kind.toLocaleLowerCase('en-US')) ||\n location.type !== 'url'\n ) {\n return entity;\n }\n\n const scmIntegration = this.opts.scmIntegrationRegistry.byUrl(\n location.target,\n );\n\n if (!scmIntegration) {\n return entity;\n }\n\n let annotation;\n switch (scmIntegration.type) {\n case 'github':\n annotation = GITHUB_ACTIONS_ANNOTATION;\n break;\n case 'gitlab':\n annotation = GITLAB_ACTIONS_ANNOTATION;\n break;\n case 'azure':\n annotation = AZURE_ACTIONS_ANNOTATION;\n break;\n default:\n return entity;\n }\n\n let projectSlug = entity.metadata.annotations?.[annotation];\n if (!projectSlug) {\n const gitUrl = parseGitUrl(location.target);\n projectSlug = `${gitUrl.owner}/${gitUrl.name}`;\n }\n\n return merge(\n {\n metadata: {\n annotations: pickBy(\n {\n [annotation]: projectSlug,\n },\n identity,\n ),\n },\n },\n entity,\n );\n }\n}\n","/*\n * Copyright 2020 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, LocationEntity } from '@backstage/catalog-model';\nimport { ScmIntegrationRegistry } from '@backstage/integration';\nimport path from 'path';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\nimport {\n processingResult,\n CatalogProcessor,\n CatalogProcessorEmit,\n} from '@backstage/plugin-catalog-node';\n\nexport function toAbsoluteUrl(\n integrations: ScmIntegrationRegistry,\n base: LocationSpec,\n target: string,\n): string {\n try {\n if (base.type === 'file') {\n if (target.startsWith('.')) {\n return path.join(path.dirname(base.target), target);\n }\n return target;\n }\n return integrations.resolveUrl({ url: target, base: base.target });\n } catch (e) {\n return target;\n }\n}\n\n/** @public */\nexport type LocationEntityProcessorOptions = {\n integrations: ScmIntegrationRegistry;\n};\n\n/** @public */\nexport class LocationEntityProcessor implements CatalogProcessor {\n constructor(private readonly options: LocationEntityProcessorOptions) {}\n\n getProcessorName(): string {\n return 'LocationEntityProcessor';\n }\n\n async postProcessEntity(\n entity: Entity,\n location: LocationSpec,\n emit: CatalogProcessorEmit,\n ): Promise<Entity> {\n if (entity.kind === 'Location') {\n const locationEntity = entity as LocationEntity;\n\n const type = locationEntity.spec.type || location.type;\n if (type === 'file' && location.target.endsWith(path.sep)) {\n emit(\n processingResult.inputError(\n location,\n `LocationEntityProcessor cannot handle ${type} type location with target ${location.target} that ends with a path separator`,\n ),\n );\n }\n\n const targets = new Array<string>();\n if (locationEntity.spec.target) {\n targets.push(locationEntity.spec.target);\n }\n if (locationEntity.spec.targets) {\n targets.push(...locationEntity.spec.targets);\n }\n\n for (const maybeRelativeTarget of targets) {\n const target = toAbsoluteUrl(\n this.options.integrations,\n location,\n maybeRelativeTarget,\n );\n emit(processingResult.location({ type, target }));\n }\n }\n\n return entity;\n }\n}\n","/*\n * Copyright 2021 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} from '@backstage/backend-common';\nimport {\n Entity,\n isUserEntity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport {\n CatalogApi,\n CatalogClient,\n GetEntitiesRequest,\n} from '@backstage/catalog-client';\nimport { catalogEntityReadPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { CatalogEntityDocument } from '@backstage/plugin-catalog-common';\nimport { Permission } from '@backstage/plugin-permission-common';\n\n/**\n * @public\n * @deprecated Upgrade to a more recent `@backstage/plugin-search-backend-node` and\n * use `DefaultCatalogCollatorFactory` instead.\n */\nexport class DefaultCatalogCollator {\n protected discovery: PluginEndpointDiscovery;\n protected locationTemplate: string;\n protected filter?: GetEntitiesRequest['filter'];\n protected readonly catalogClient: CatalogApi;\n public readonly type: string = 'software-catalog';\n public readonly visibilityPermission: Permission =\n catalogEntityReadPermission;\n protected tokenManager: TokenManager;\n\n static fromConfig(\n _config: Config,\n options: {\n discovery: PluginEndpointDiscovery;\n tokenManager: TokenManager;\n filter?: GetEntitiesRequest['filter'];\n },\n ) {\n return new DefaultCatalogCollator({\n ...options,\n });\n }\n\n constructor(options: {\n discovery: PluginEndpointDiscovery;\n tokenManager: TokenManager;\n locationTemplate?: string;\n filter?: GetEntitiesRequest['filter'];\n catalogClient?: CatalogApi;\n }) {\n const { discovery, locationTemplate, filter, catalogClient, tokenManager } =\n options;\n\n this.discovery = discovery;\n this.locationTemplate =\n locationTemplate || '/catalog/:namespace/:kind/:name';\n this.filter = filter;\n this.catalogClient =\n catalogClient || new CatalogClient({ discoveryApi: discovery });\n this.tokenManager = tokenManager;\n }\n\n protected applyArgsToFormat(\n format: string,\n args: Record<string, string>,\n ): string {\n let formatted = format;\n for (const [key, value] of Object.entries(args)) {\n formatted = formatted.replace(`:${key}`, value);\n }\n return formatted.toLowerCase();\n }\n\n private getDocumentText(entity: Entity): string {\n let documentText = entity.metadata.description || '';\n if (isUserEntity(entity)) {\n if (entity.spec?.profile?.displayName && documentText) {\n // combine displayName and description\n const displayName = entity.spec?.profile?.displayName;\n documentText = displayName.concat(' : ', documentText);\n } else {\n documentText = entity.spec?.profile?.displayName || documentText;\n }\n }\n return documentText;\n }\n\n async execute() {\n const { token } = await this.tokenManager.getToken();\n const response = await this.catalogClient.getEntities(\n {\n filter: this.filter,\n },\n { token },\n );\n return response.items.map((entity: Entity): CatalogEntityDocument => {\n return {\n title: entity.metadata.title ?? entity.metadata.name,\n location: this.applyArgsToFormat(this.locationTemplate, {\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n name: entity.metadata.name,\n }),\n text: this.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 authorization: {\n resourceRef: stringifyEntityRef(entity),\n },\n };\n });\n }\n}\n","/*\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 locationSpecToMetadataName as _locationSpecToMetadataName,\n locationSpecToLocationEntity as _locationSpecToLocationEntity,\n processingResult as _processingResult,\n type DeferredEntity as _DeferredEntity,\n type EntityRelationSpec as _EntityRelationSpec,\n type CatalogProcessor as _CatalogProcessor,\n type CatalogProcessorParser as _CatalogProcessorParser,\n type CatalogProcessorCache as _CatalogProcessorCache,\n type CatalogProcessorEmit as _CatalogProcessorEmit,\n type CatalogProcessorLocationResult as _CatalogProcessorLocationResult,\n type CatalogProcessorEntityResult as _CatalogProcessorEntityResult,\n type CatalogProcessorRelationResult as _CatalogProcessorRelationResult,\n type CatalogProcessorErrorResult as _CatalogProcessorErrorResult,\n type CatalogProcessorRefreshKeysResult as _CatalogProcessorRefreshKeysResult,\n type CatalogProcessorResult as _CatalogProcessorResult,\n type EntityProvider as _EntityProvider,\n type EntityProviderConnection as _EntityProviderConnection,\n type EntityProviderMutation as _EntityProviderMutation,\n} from '@backstage/plugin-catalog-node';\nimport { type LocationSpec as _LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const locationSpecToMetadataName = _locationSpecToMetadataName;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const locationSpecToLocationEntity = _locationSpecToLocationEntity;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const processingResult = _processingResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type DeferredEntity = _DeferredEntity;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityRelationSpec = _EntityRelationSpec;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessor = _CatalogProcessor;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorParser = _CatalogProcessorParser;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorCache = _CatalogProcessorCache;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorEmit = _CatalogProcessorEmit;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorLocationResult = _CatalogProcessorLocationResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorEntityResult = _CatalogProcessorEntityResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorRelationResult = _CatalogProcessorRelationResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorErrorResult = _CatalogProcessorErrorResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorRefreshKeysResult =\n _CatalogProcessorRefreshKeysResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorResult = _CatalogProcessorResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProvider = _EntityProvider;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProviderConnection = _EntityProviderConnection;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProviderMutation = _EntityProviderMutation;\n\n/**\n * Holds the entity location information.\n *\n * @remarks\n *\n * `presence` flag: when using repo importer plugin, location is being created before the component yaml file is merged to the main branch.\n * This flag is then set to indicate that the file can be not present.\n * default value: 'required'.\n *\n * @public\n * @deprecated use the same type from `@backstage/plugin-catalog-common` instead\n */\nexport type LocationSpec = _LocationSpec;\n","/*\n * Copyright 2020 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\n/**\n * The Backstage backend plugin that provides the Backstage catalog\n *\n * @packageDocumentation\n */\n\nexport * from './catalog';\nexport * from './ingestion';\nexport * from './modules';\nexport * from './processing';\nexport * from './search';\nexport * from './service';\nexport * from './deprecated';\nexport * from './constants';\n\nimport {\n DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory,\n defaultCatalogCollatorEntityTransformer as _defaultCatalogCollatorEntityTransformer,\n} from '@backstage/plugin-search-backend-module-catalog';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport const DefaultCatalogCollatorFactory = _DefaultCatalogCollatorFactory;\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport const defaultCatalogCollatorEntityTransformer =\n _defaultCatalogCollatorEntityTransformer;\n\nimport type {\n DefaultCatalogCollatorFactoryOptions as _DefaultCatalogCollatorFactoryOptions,\n CatalogCollatorEntityTransformer as _CatalogCollatorEntityTransformer,\n} from '@backstage/plugin-search-backend-module-catalog';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport type DefaultCatalogCollatorFactoryOptions =\n _DefaultCatalogCollatorFactoryOptions;\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport type CatalogCollatorEntityTransformer =\n _CatalogCollatorEntityTransformer;\n"],"names":["ScmIntegrations","parseGitUrl","merge","pickBy","identity","path","processingResult","catalogEntityReadPermission","catalogClient","CatalogClient","isUserEntity","stringifyEntityRef","_locationSpecToMetadataName","_locationSpecToLocationEntity","_processingResult","_DefaultCatalogCollatorFactory","_defaultCatalogCollatorEntityTransformer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,yBAA4B,GAAA,yBAAA,CAAA;AAClC,MAAM,yBAA4B,GAAA,yBAAA,CAAA;AAClC,MAAM,wBAA2B,GAAA,4BAAA,CAAA;AAG1B,MAAM,8BAA2D,CAAA;AAAA,EACtE,YACmB,IAIjB,EAAA;AAJiB,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA,CAAA;AAAA,GAIhB;AAAA,EAEH,gBAA2B,GAAA;AACzB,IAAO,OAAA,gCAAA,CAAA;AAAA,GACT;AAAA,EAEA,OAAO,UACL,CAAA,MAAA,EACA,OACgC,EAAA;AAChC,IAAA,OAAO,IAAI,8BAA+B,CAAA;AAAA,MACxC,sBAA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xC,MAAM,MAAO,CAAA,IAAA;AAAA,QACb,SAAY,EAAA,CAAA,CAAA,EAAA,GAAA,MAAA,CAAO,IAAP,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAa,SAAwB,KAAA,EAAA;AAAA,QACjD,KAAQ,EAAA,CAAA,CAAA,EAAA,GAAA,MAAA,CAAO,IAAP,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAa,KAAoB,KAAA,EAAA;AAAA,QACzC,aAAe,EAAA;AAAA,UACb,WAAA,EAAaC,gCAAmB,MAAM,CAAA;AAAA,SACxC;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF;;AC9FO,MAAM,0BAA6B,GAAAC,6CAAA;AAKnC,MAAM,4BAA+B,GAAAC,+CAAA;AAKrC,MAAM,gBAAmB,GAAAC;;ACZzB,MAAM,6BAAgC,GAAAC,+DAAA;AAMtC,MAAM,uCACX,GAAAC;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/modules/core/AnnotateScmSlugEntityProcessor.ts","../src/modules/core/LocationEntityProcessor.ts","../src/search/DefaultCatalogCollator.ts","../src/deprecated.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright 2021 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 } from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport {\n ScmIntegrationRegistry,\n ScmIntegrations,\n} from '@backstage/integration';\nimport parseGitUrl from 'git-url-parse';\nimport { identity, merge, pickBy } from 'lodash';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\nimport { CatalogProcessor } from '@backstage/plugin-catalog-node';\n\nconst GITHUB_ACTIONS_ANNOTATION = 'github.com/project-slug';\nconst GITLAB_ACTIONS_ANNOTATION = 'gitlab.com/project-slug';\nconst AZURE_ACTIONS_ANNOTATION = 'dev.azure.com/project-repo';\n\n/** @public */\nexport class AnnotateScmSlugEntityProcessor implements CatalogProcessor {\n constructor(\n private readonly opts: {\n scmIntegrationRegistry: ScmIntegrationRegistry;\n kinds?: string[];\n },\n ) {}\n\n getProcessorName(): string {\n return 'AnnotateScmSlugEntityProcessor';\n }\n\n static fromConfig(\n config: Config,\n options?: { kinds?: string[] },\n ): AnnotateScmSlugEntityProcessor {\n return new AnnotateScmSlugEntityProcessor({\n scmIntegrationRegistry: ScmIntegrations.fromConfig(config),\n kinds: options?.kinds,\n });\n }\n\n async preProcessEntity(\n entity: Entity,\n location: LocationSpec,\n ): Promise<Entity> {\n const applicableKinds = (this.opts.kinds ?? ['Component']).map(k =>\n k.toLocaleLowerCase('en-US'),\n );\n if (\n !applicableKinds.includes(entity.kind.toLocaleLowerCase('en-US')) ||\n location.type !== 'url'\n ) {\n return entity;\n }\n\n const scmIntegration = this.opts.scmIntegrationRegistry.byUrl(\n location.target,\n );\n\n if (!scmIntegration) {\n return entity;\n }\n\n let annotation;\n switch (scmIntegration.type) {\n case 'github':\n annotation = GITHUB_ACTIONS_ANNOTATION;\n break;\n case 'gitlab':\n annotation = GITLAB_ACTIONS_ANNOTATION;\n break;\n case 'azure':\n annotation = AZURE_ACTIONS_ANNOTATION;\n break;\n default:\n return entity;\n }\n\n let projectSlug = entity.metadata.annotations?.[annotation];\n if (!projectSlug) {\n const gitUrl = parseGitUrl(location.target);\n projectSlug = `${gitUrl.owner}/${gitUrl.name}`;\n }\n\n return merge(\n {\n metadata: {\n annotations: pickBy(\n {\n [annotation]: projectSlug,\n },\n identity,\n ),\n },\n },\n entity,\n );\n }\n}\n","/*\n * Copyright 2020 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, LocationEntity } from '@backstage/catalog-model';\nimport { ScmIntegrationRegistry } from '@backstage/integration';\nimport path from 'path';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\nimport {\n processingResult,\n CatalogProcessor,\n CatalogProcessorEmit,\n} from '@backstage/plugin-catalog-node';\n\nexport function toAbsoluteUrl(\n integrations: ScmIntegrationRegistry,\n base: LocationSpec,\n target: string,\n): string {\n try {\n if (base.type === 'file') {\n if (target.startsWith('.')) {\n return path.join(path.dirname(base.target), target);\n }\n return target;\n }\n return integrations.resolveUrl({ url: target, base: base.target });\n } catch (e) {\n return target;\n }\n}\n\n/**\n * @public\n * @deprecated This processor should no longer be used\n */\nexport type LocationEntityProcessorOptions = {\n integrations: ScmIntegrationRegistry;\n};\n\n/**\n * Legacy processor, should not be used.\n *\n * @remarks\n *\n * In the old catalog architecture, this processor translated Location entities\n * into URLs that should be fetched. This is no longer needed since the engine\n * handles this internally.\n *\n * @public\n * @deprecated This processor should no longer be used\n */\nexport class LocationEntityProcessor implements CatalogProcessor {\n constructor(private readonly options: LocationEntityProcessorOptions) {}\n\n getProcessorName(): string {\n return 'LocationEntityProcessor';\n }\n\n async postProcessEntity(\n entity: Entity,\n location: LocationSpec,\n emit: CatalogProcessorEmit,\n ): Promise<Entity> {\n if (entity.kind === 'Location') {\n const locationEntity = entity as LocationEntity;\n\n const type = locationEntity.spec.type || location.type;\n if (type === 'file' && location.target.endsWith(path.sep)) {\n emit(\n processingResult.inputError(\n location,\n `LocationEntityProcessor cannot handle ${type} type location with target ${location.target} that ends with a path separator`,\n ),\n );\n }\n\n const targets = new Array<string>();\n if (locationEntity.spec.target) {\n targets.push(locationEntity.spec.target);\n }\n if (locationEntity.spec.targets) {\n targets.push(...locationEntity.spec.targets);\n }\n\n for (const maybeRelativeTarget of targets) {\n const target = toAbsoluteUrl(\n this.options.integrations,\n location,\n maybeRelativeTarget,\n );\n emit(processingResult.location({ type, target }));\n }\n }\n\n return entity;\n }\n}\n","/*\n * Copyright 2021 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} from '@backstage/backend-common';\nimport {\n Entity,\n isUserEntity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { Config } from '@backstage/config';\nimport {\n CatalogApi,\n CatalogClient,\n GetEntitiesRequest,\n} from '@backstage/catalog-client';\nimport { catalogEntityReadPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { CatalogEntityDocument } from '@backstage/plugin-catalog-common';\nimport { Permission } from '@backstage/plugin-permission-common';\n\n/**\n * @public\n * @deprecated Upgrade to a more recent `@backstage/plugin-search-backend-node` and\n * use `DefaultCatalogCollatorFactory` instead.\n */\nexport class DefaultCatalogCollator {\n protected discovery: PluginEndpointDiscovery;\n protected locationTemplate: string;\n protected filter?: GetEntitiesRequest['filter'];\n protected readonly catalogClient: CatalogApi;\n public readonly type: string = 'software-catalog';\n public readonly visibilityPermission: Permission =\n catalogEntityReadPermission;\n protected tokenManager: TokenManager;\n\n static fromConfig(\n _config: Config,\n options: {\n discovery: PluginEndpointDiscovery;\n tokenManager: TokenManager;\n filter?: GetEntitiesRequest['filter'];\n },\n ) {\n return new DefaultCatalogCollator({\n ...options,\n });\n }\n\n constructor(options: {\n discovery: PluginEndpointDiscovery;\n tokenManager: TokenManager;\n locationTemplate?: string;\n filter?: GetEntitiesRequest['filter'];\n catalogClient?: CatalogApi;\n }) {\n const { discovery, locationTemplate, filter, catalogClient, tokenManager } =\n options;\n\n this.discovery = discovery;\n this.locationTemplate =\n locationTemplate || '/catalog/:namespace/:kind/:name';\n this.filter = filter;\n this.catalogClient =\n catalogClient || new CatalogClient({ discoveryApi: discovery });\n this.tokenManager = tokenManager;\n }\n\n protected applyArgsToFormat(\n format: string,\n args: Record<string, string>,\n ): string {\n let formatted = format;\n for (const [key, value] of Object.entries(args)) {\n formatted = formatted.replace(`:${key}`, value);\n }\n return formatted.toLowerCase();\n }\n\n private getDocumentText(entity: Entity): string {\n let documentText = entity.metadata.description || '';\n if (isUserEntity(entity)) {\n if (entity.spec?.profile?.displayName && documentText) {\n // combine displayName and description\n const displayName = entity.spec?.profile?.displayName;\n documentText = displayName.concat(' : ', documentText);\n } else {\n documentText = entity.spec?.profile?.displayName || documentText;\n }\n }\n return documentText;\n }\n\n async execute() {\n const { token } = await this.tokenManager.getToken();\n const response = await this.catalogClient.getEntities(\n {\n filter: this.filter,\n },\n { token },\n );\n return response.items.map((entity: Entity): CatalogEntityDocument => {\n return {\n title: entity.metadata.title ?? entity.metadata.name,\n location: this.applyArgsToFormat(this.locationTemplate, {\n namespace: entity.metadata.namespace || 'default',\n kind: entity.kind,\n name: entity.metadata.name,\n }),\n text: this.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 authorization: {\n resourceRef: stringifyEntityRef(entity),\n },\n };\n });\n }\n}\n","/*\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 locationSpecToMetadataName as _locationSpecToMetadataName,\n locationSpecToLocationEntity as _locationSpecToLocationEntity,\n processingResult as _processingResult,\n type DeferredEntity as _DeferredEntity,\n type EntityRelationSpec as _EntityRelationSpec,\n type CatalogProcessor as _CatalogProcessor,\n type CatalogProcessorParser as _CatalogProcessorParser,\n type CatalogProcessorCache as _CatalogProcessorCache,\n type CatalogProcessorEmit as _CatalogProcessorEmit,\n type CatalogProcessorLocationResult as _CatalogProcessorLocationResult,\n type CatalogProcessorEntityResult as _CatalogProcessorEntityResult,\n type CatalogProcessorRelationResult as _CatalogProcessorRelationResult,\n type CatalogProcessorErrorResult as _CatalogProcessorErrorResult,\n type CatalogProcessorRefreshKeysResult as _CatalogProcessorRefreshKeysResult,\n type CatalogProcessorResult as _CatalogProcessorResult,\n type EntityProvider as _EntityProvider,\n type EntityProviderConnection as _EntityProviderConnection,\n type EntityProviderMutation as _EntityProviderMutation,\n} from '@backstage/plugin-catalog-node';\nimport { type LocationSpec as _LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const locationSpecToMetadataName = _locationSpecToMetadataName;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const locationSpecToLocationEntity = _locationSpecToLocationEntity;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport const processingResult = _processingResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type DeferredEntity = _DeferredEntity;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityRelationSpec = _EntityRelationSpec;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessor = _CatalogProcessor;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorParser = _CatalogProcessorParser;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorCache = _CatalogProcessorCache;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorEmit = _CatalogProcessorEmit;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorLocationResult = _CatalogProcessorLocationResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorEntityResult = _CatalogProcessorEntityResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorRelationResult = _CatalogProcessorRelationResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorErrorResult = _CatalogProcessorErrorResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorRefreshKeysResult =\n _CatalogProcessorRefreshKeysResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type CatalogProcessorResult = _CatalogProcessorResult;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProvider = _EntityProvider;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProviderConnection = _EntityProviderConnection;\n/**\n * @public\n * @deprecated import from `@backstage/plugin-catalog-node` instead\n */\nexport type EntityProviderMutation = _EntityProviderMutation;\n\n/**\n * Holds the entity location information.\n *\n * @remarks\n *\n * `presence` flag: when using repo importer plugin, location is being created before the component yaml file is merged to the main branch.\n * This flag is then set to indicate that the file can be not present.\n * default value: 'required'.\n *\n * @public\n * @deprecated use the same type from `@backstage/plugin-catalog-common` instead\n */\nexport type LocationSpec = _LocationSpec;\n","/*\n * Copyright 2020 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\n/**\n * The Backstage backend plugin that provides the Backstage catalog\n *\n * @packageDocumentation\n */\n\nexport * from './catalog';\nexport * from './ingestion';\nexport * from './modules';\nexport * from './processing';\nexport * from './search';\nexport * from './service';\nexport * from './deprecated';\nexport * from './constants';\n\nimport {\n DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory,\n defaultCatalogCollatorEntityTransformer as _defaultCatalogCollatorEntityTransformer,\n} from '@backstage/plugin-search-backend-module-catalog';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport const DefaultCatalogCollatorFactory = _DefaultCatalogCollatorFactory;\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport const defaultCatalogCollatorEntityTransformer =\n _defaultCatalogCollatorEntityTransformer;\n\nimport type {\n DefaultCatalogCollatorFactoryOptions as _DefaultCatalogCollatorFactoryOptions,\n CatalogCollatorEntityTransformer as _CatalogCollatorEntityTransformer,\n} from '@backstage/plugin-search-backend-module-catalog';\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport type DefaultCatalogCollatorFactoryOptions =\n _DefaultCatalogCollatorFactoryOptions;\n\n/**\n * @public\n * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead\n */\nexport type CatalogCollatorEntityTransformer =\n _CatalogCollatorEntityTransformer;\n"],"names":["ScmIntegrations","parseGitUrl","merge","pickBy","identity","path","processingResult","catalogEntityReadPermission","catalogClient","CatalogClient","isUserEntity","stringifyEntityRef","_locationSpecToMetadataName","_locationSpecToLocationEntity","_processingResult","_DefaultCatalogCollatorFactory","_defaultCatalogCollatorEntityTransformer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,yBAA4B,GAAA,yBAAA,CAAA;AAClC,MAAM,yBAA4B,GAAA,yBAAA,CAAA;AAClC,MAAM,wBAA2B,GAAA,4BAAA,CAAA;AAG1B,MAAM,8BAA2D,CAAA;AAAA,EACtE,YACmB,IAIjB,EAAA;AAJiB,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA,CAAA;AAAA,GAIhB;AAAA,EAEH,gBAA2B,GAAA;AACzB,IAAO,OAAA,gCAAA,CAAA;AAAA,GACT;AAAA,EAEA,OAAO,UACL,CAAA,MAAA,EACA,OACgC,EAAA;AAChC,IAAA,OAAO,IAAI,8BAA+B,CAAA;AAAA,MACxC,sBAAA,EAAwBA,2BAAgB,CAAA,UAAA,CAAW,MAAM,CAAA;AAAA,MACzD,OAAO,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,KAAA;AAAA,KACjB,CAAA,CAAA;AAAA,GACH;AAAA,EAEA,MAAM,gBACJ,CAAA,MAAA,EACA,QACiB,EAAA;AAzDrB,IAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AA0DI,IAAA,MAAM,oBAAmB,EAAK,GAAA,IAAA,CAAA,IAAA,CAAK,UAAV,IAAmB,GAAA,EAAA,GAAA,CAAC,WAAW,CAAG,EAAA,GAAA;AAAA,MAAI,CAAA,CAAA,KAC7D,CAAE,CAAA,iBAAA,CAAkB,OAAO,CAAA;AAAA,KAC7B,CAAA;AACA,IACE,IAAA,CAAC,eAAgB,CAAA,QAAA,CAAS,MAAO,CAAA,IAAA,CAAK,iBAAkB,CAAA,OAAO,CAAC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AAMtC,MAAM,uCACX,GAAAC;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -138,11 +138,25 @@ declare class FileReaderProcessor implements CatalogProcessor$1 {
|
|
|
138
138
|
readLocation(location: LocationSpec$1, optional: boolean, emit: CatalogProcessorEmit$1, parser: CatalogProcessorParser$1): Promise<boolean>;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
* @deprecated This processor should no longer be used
|
|
144
|
+
*/
|
|
142
145
|
type LocationEntityProcessorOptions = {
|
|
143
146
|
integrations: ScmIntegrationRegistry;
|
|
144
147
|
};
|
|
145
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Legacy processor, should not be used.
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
*
|
|
153
|
+
* In the old catalog architecture, this processor translated Location entities
|
|
154
|
+
* into URLs that should be fetched. This is no longer needed since the engine
|
|
155
|
+
* handles this internally.
|
|
156
|
+
*
|
|
157
|
+
* @public
|
|
158
|
+
* @deprecated This processor should no longer be used
|
|
159
|
+
*/
|
|
146
160
|
declare class LocationEntityProcessor implements CatalogProcessor$1 {
|
|
147
161
|
private readonly options;
|
|
148
162
|
constructor(options: LocationEntityProcessorOptions);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend",
|
|
3
3
|
"description": "The Backstage backend plugin that provides the Backstage catalog",
|
|
4
|
-
"version": "1.14.0-next.
|
|
4
|
+
"version": "1.14.0-next.1",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
"clean": "backstage-cli package clean"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@backstage/backend-common": "^0.19.7-next.
|
|
46
|
+
"@backstage/backend-common": "^0.19.7-next.1",
|
|
47
47
|
"@backstage/backend-openapi-utils": "^0.0.4",
|
|
48
|
-
"@backstage/backend-plugin-api": "^0.6.5-next.
|
|
49
|
-
"@backstage/backend-tasks": "^0.5.10-next.
|
|
48
|
+
"@backstage/backend-plugin-api": "^0.6.5-next.1",
|
|
49
|
+
"@backstage/backend-tasks": "^0.5.10-next.1",
|
|
50
50
|
"@backstage/catalog-client": "^1.4.4",
|
|
51
51
|
"@backstage/catalog-model": "^1.4.2",
|
|
52
52
|
"@backstage/config": "^1.1.0",
|
|
53
53
|
"@backstage/errors": "^1.2.2",
|
|
54
54
|
"@backstage/integration": "^1.7.1-next.0",
|
|
55
|
-
"@backstage/plugin-auth-node": "^0.3.2-next.
|
|
55
|
+
"@backstage/plugin-auth-node": "^0.3.2-next.1",
|
|
56
56
|
"@backstage/plugin-catalog-common": "^1.0.16",
|
|
57
|
-
"@backstage/plugin-catalog-node": "^1.4.6-next.
|
|
58
|
-
"@backstage/plugin-events-node": "^0.2.14-next.
|
|
57
|
+
"@backstage/plugin-catalog-node": "^1.4.6-next.1",
|
|
58
|
+
"@backstage/plugin-events-node": "^0.2.14-next.1",
|
|
59
59
|
"@backstage/plugin-permission-common": "^0.7.8",
|
|
60
|
-
"@backstage/plugin-permission-node": "^0.7.16-next.
|
|
60
|
+
"@backstage/plugin-permission-node": "^0.7.16-next.1",
|
|
61
61
|
"@backstage/plugin-scaffolder-common": "^1.4.1",
|
|
62
|
-
"@backstage/plugin-search-backend-module-catalog": "^0.1.9-next.
|
|
62
|
+
"@backstage/plugin-search-backend-module-catalog": "^0.1.9-next.1",
|
|
63
63
|
"@backstage/plugin-search-common": "^1.2.6",
|
|
64
64
|
"@backstage/types": "^1.1.1",
|
|
65
65
|
"@opentelemetry/api": "^1.3.0",
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"zod": "^3.21.4"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@backstage/backend-test-utils": "^0.2.6-next.
|
|
90
|
-
"@backstage/cli": "^0.23.0-next.
|
|
89
|
+
"@backstage/backend-test-utils": "^0.2.6-next.1",
|
|
90
|
+
"@backstage/cli": "^0.23.0-next.1",
|
|
91
91
|
"@backstage/plugin-permission-common": "^0.7.8",
|
|
92
|
-
"@backstage/plugin-search-backend-node": "^1.2.9-next.
|
|
92
|
+
"@backstage/plugin-search-backend-node": "^1.2.9-next.1",
|
|
93
93
|
"@types/core-js": "^2.5.4",
|
|
94
94
|
"@types/git-url-parse": "^9.0.0",
|
|
95
95
|
"@types/lodash": "^4.14.151",
|