From df4dcd8640f1d7ab0af5b4628ae29c85e71cbff8 Mon Sep 17 00:00:00 2001 From: Nikita Nek Dudnik Date: Fri, 29 May 2020 10:37:23 +0200 Subject: [PATCH] fix: merge errors --- .../src/database/Database.test.ts | 8 ++++---- .../src/database/DatabaseManager.test.ts | 4 ++-- plugins/catalog/src/api/types.ts | 6 +++--- plugins/catalog/src/data/utils.ts | 6 +++--- yarn.lock | 17 ++--------------- 5 files changed, 14 insertions(+), 27 deletions(-) diff --git a/plugins/catalog-backend/src/database/Database.test.ts b/plugins/catalog-backend/src/database/Database.test.ts index bb1a66ac7c..a808e7e567 100644 --- a/plugins/catalog-backend/src/database/Database.test.ts +++ b/plugins/catalog-backend/src/database/Database.test.ts @@ -19,16 +19,16 @@ import { getVoidLogger, NotFoundError, } from '@backstage/backend-common'; -import { Entity } from '@backstage/catalog-model'; import Knex from 'knex'; import path from 'path'; -import { Database } from './Database'; import { - AddDatabaseLocation, DbEntityRequest, DbEntityResponse, + Database, + AddDatabaseLocation, DbLocationsRow, -} from './types'; +} from '.'; +import { Entity } from '@backstage/catalog-model'; describe('Database', () => { let database: Knex; diff --git a/plugins/catalog-backend/src/database/DatabaseManager.test.ts b/plugins/catalog-backend/src/database/DatabaseManager.test.ts index 9a4297904a..a65bbb7811 100644 --- a/plugins/catalog-backend/src/database/DatabaseManager.test.ts +++ b/plugins/catalog-backend/src/database/DatabaseManager.test.ts @@ -15,12 +15,12 @@ */ import { getVoidLogger } from '@backstage/backend-common'; -import { Entity, EntityPolicy } from '@backstage/catalog-model'; import Knex from 'knex'; -import { IngestionModel } from '../ingestion/types'; import { Database } from './Database'; import { DatabaseManager } from './DatabaseManager'; import { DatabaseLocationUpdateLogStatus, DbLocationsRow } from './types'; +import { EntityPolicy, Entity } from '@backstage/catalog-model'; +import { IngestionModel } from '..'; describe('DatabaseManager', () => { describe('refreshLocations', () => { diff --git a/plugins/catalog/src/api/types.ts b/plugins/catalog/src/api/types.ts index 6cc1dfd6cc..eb2cdca562 100644 --- a/plugins/catalog/src/api/types.ts +++ b/plugins/catalog/src/api/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { createApiRef } from '@backstage/core'; -import { DescriptorEnvelope } from '../types'; +import { Entity } from '@backstage/catalog-model'; export const catalogApiRef = createApiRef({ id: 'plugin.catalog.service', @@ -23,6 +23,6 @@ export const catalogApiRef = createApiRef({ }); export interface CatalogApi { - getEntities(): Promise; - getEntityByName(name: string): Promise; + getEntities(): Promise; + getEntityByName(name: string): Promise; } diff --git a/plugins/catalog/src/data/utils.ts b/plugins/catalog/src/data/utils.ts index 39a84cfbca..05fb2fee46 100644 --- a/plugins/catalog/src/data/utils.ts +++ b/plugins/catalog/src/data/utils.ts @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { DescriptorEnvelope } from '../api/types'; import { Component } from './component'; +import { Entity } from '@backstage/catalog-model'; -export function envelopeToComponent(envelope: DescriptorEnvelope): Component { +export function envelopeToComponent(envelope: Entity): Component { return { name: envelope.metadata?.name ?? '', kind: envelope.kind ?? 'unknown', - description: envelope.metadata?.description ?? 'placeholder', + description: envelope.metadata?.annotations?.description ?? 'placeholder', }; } diff --git a/yarn.lock b/yarn.lock index 8439f5b0b9..b34d5505d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4290,15 +4290,7 @@ "@types/passport" "*" "@types/passport-oauth2" "*" -"@types/passport-oauth2-refresh@^1.1.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@types/passport-oauth2-refresh/-/passport-oauth2-refresh-1.1.1.tgz#cbe466d4fcac36182fd75bf55279c0b1e953c382" - integrity sha512-Tw0JvfDPv9asgFPACd9oOGCaD/0/Uyi+QF7fmrJC74cJKC6I8N8wwhJJHyfd1N2E/qaLgTh431lhOa9jicpNdg== - dependencies: - "@types/oauth" "*" - "@types/passport-oauth2" "*" - -"@types/passport-oauth2@*", "@types/passport-oauth2@^1.4.9": +"@types/passport-oauth2@*": version "1.4.9" resolved "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.4.9.tgz#134007c4b505a82548c9cb19094c5baeb2205c92" integrity sha512-QP0q+NVQOaIu2r0e10QWkiUA0Ya5mOBHRJN0UrI+LolMLOP1/VN4EVIpJ3xVwFo+xqNFRoFvFwJhBvKnk7kpUA== @@ -16110,12 +16102,7 @@ passport-google-oauth20@^2.0.0: dependencies: passport-oauth2 "1.x.x" -passport-oauth2-refresh@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/passport-oauth2-refresh/-/passport-oauth2-refresh-2.0.0.tgz#7b19c77ff3cc000819c69f6ad9e318450f57b85e" - integrity sha512-yXvCB6nem/O+WThhiyI3TlPXpzSGY+9+hy9OTx9QF8e9GInplyRHxHaaOhFylKvnof9UmWHAufQFZk8cO1Fb2g== - -passport-oauth2@1.x.x, passport-oauth2@^1.5.0: +passport-oauth2@1.x.x: version "1.5.0" resolved "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.5.0.tgz#64babbb54ac46a4dcab35e7f266ed5294e3c4108" integrity sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==