catalog: properly deprecate symbols that were moved over to the node package
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Add deprecations for symbols that were moved to `@backstage/plugin-catalog-node` a long time ago:
|
||||
|
||||
- `CatalogProcessor`
|
||||
- `CatalogProcessorCache`
|
||||
- `CatalogProcessorEmit`
|
||||
- `CatalogProcessorEntityResult`
|
||||
- `CatalogProcessorErrorResult`
|
||||
- `CatalogProcessorLocationResult`
|
||||
- `CatalogProcessorParser`
|
||||
- `CatalogProcessorRefreshKeysResult`
|
||||
- `CatalogProcessorRelationResult`
|
||||
- `CatalogProcessorResult`
|
||||
- `DeferredEntity`
|
||||
- `EntityProvider`
|
||||
- `EntityProviderConnection`
|
||||
- `EntityProviderMutation`
|
||||
- `EntityRelationSpec`
|
||||
- `processingResult`
|
||||
|
||||
Also moved over and deprecated the following symbols:
|
||||
|
||||
- `locationSpecToLocationEntity`
|
||||
- `locationSpecToMetadataName`
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket-server': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket': patch
|
||||
'@backstage/plugin-catalog-backend-module-puppetdb': patch
|
||||
'@backstage/plugin-catalog-backend-module-msgraph': patch
|
||||
'@backstage/plugin-catalog-backend-module-gerrit': patch
|
||||
'@backstage/plugin-catalog-backend-module-github': patch
|
||||
'@backstage/plugin-catalog-backend-module-gitlab': patch
|
||||
'@backstage/plugin-catalog-backend-module-azure': patch
|
||||
'@backstage/plugin-catalog-backend-module-ldap': patch
|
||||
'@backstage/plugin-catalog-backend-module-aws': patch
|
||||
---
|
||||
|
||||
Make sure to not use deprecated exports from `@backstage/plugin-catalog-backend`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-node': patch
|
||||
---
|
||||
|
||||
Added `locationSpecToMetadataName` and `locationSpecToLocationEntity` as their new home, moved over from the backend package where they now are marked as deprecated.
|
||||
@@ -3,13 +3,13 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorParser } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorParser } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { Credentials } from 'aws-sdk';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-common": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/plugin-kubernetes-common": "workspace:^",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import {
|
||||
CatalogProcessor,
|
||||
CatalogProcessorEmit,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import {
|
||||
ANNOTATION_KUBERNETES_API_SERVER,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
CatalogProcessor,
|
||||
CatalogProcessorEmit,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import AWS, { Credentials, Organizations } from 'aws-sdk';
|
||||
import { Account, ListAccountsResponse } from 'aws-sdk/clients/organizations';
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
CatalogProcessorEntityResult,
|
||||
CatalogProcessorResult,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import {
|
||||
S3Client,
|
||||
ListObjectsV2Command,
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
CatalogProcessorParser,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import limiterFactory from 'p-limit';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
TaskRunner,
|
||||
} from '@backstage/backend-tasks';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { AwsS3EntityProvider } from './AwsS3EntityProvider';
|
||||
import aws from 'aws-sdk';
|
||||
import AWSMock from 'aws-sdk-mock';
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import { AwsCredentials } from '../credentials/AwsCredentials';
|
||||
import { readAwsS3Configs } from './config';
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import {
|
||||
AzureDevOpsDiscoveryProcessor,
|
||||
parseUrl,
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { codeSearch } from '../lib';
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import {
|
||||
TaskRunner,
|
||||
} from '@backstage/backend-tasks';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { CodeSearchResultItem } from '../lib';
|
||||
import { AzureDevOpsEntityProvider } from './AzureDevOpsEntityProvider';
|
||||
import { codeSearch } from '../lib';
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
EntityProviderConnection,
|
||||
LocationSpec,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { readAzureDevOpsConfigs } from './config';
|
||||
import { Logger } from 'winston';
|
||||
import { AzureDevOpsConfig } from './types';
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
```ts
|
||||
import { CatalogApi } from '@backstage/catalog-client';
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import { Events } from '@backstage/plugin-bitbucket-cloud-common';
|
||||
import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-bitbucket-cloud-common": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-common": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/plugin-events-node": "workspace:^",
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import { ConfigReader } from '@backstage/config';
|
||||
import {
|
||||
EntityProviderConnection,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Events } from '@backstage/plugin-bitbucket-cloud-common';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import { EventParams, EventSubscriber } from '@backstage/plugin-events-node';
|
||||
import {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
import { BitbucketServerIntegrationConfig } from '@backstage/integration';
|
||||
import { Config } from '@backstage/config';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
import { Response as Response_2 } from 'node-fetch';
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@types/node-fetch": "^2.5.12",
|
||||
"node-fetch": "^2.6.7",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import {
|
||||
} from '@backstage/backend-tasks';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { BitbucketServerEntityProvider } from './BitbucketServerEntityProvider';
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import * as uuid from 'uuid';
|
||||
import { BitbucketServerClient, paginated } from '../lib';
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
import {
|
||||
LocationSpec,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { Logger } from 'winston';
|
||||
import { BitbucketServerClient } from '../lib';
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
```ts
|
||||
import { BitbucketIntegration } from '@backstage/integration';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorResult } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorResult } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-bitbucket-cloud-common": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"lodash": "^4.17.21",
|
||||
"node-fetch": "^2.6.7",
|
||||
|
||||
@@ -18,10 +18,7 @@ import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { Models } from '@backstage/plugin-bitbucket-cloud-common';
|
||||
import {
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec, processingResult } from '@backstage/plugin-catalog-node';
|
||||
import { RequestHandler, rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { BitbucketDiscoveryProcessor } from './BitbucketDiscoveryProcessor';
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
CatalogProcessor,
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
BitbucketRepository,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { processingResult } from '@backstage/plugin-catalog-backend';
|
||||
import { processingResult } from '@backstage/plugin-catalog-node';
|
||||
import { defaultRepositoryParser } from './BitbucketRepositoryParser';
|
||||
|
||||
describe('BitbucketRepositoryParser', () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ import { BitbucketIntegration } from '@backstage/integration';
|
||||
import {
|
||||
CatalogProcessorResult,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
import { TaskRunner } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"fs-extra": "10.1.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from '@backstage/backend-tasks';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import fs from 'fs-extra';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
EntityProviderConnection,
|
||||
LocationSpec,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import fetch, { Response } from 'node-fetch';
|
||||
import {
|
||||
GerritIntegration,
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
```ts
|
||||
import { AnalyzeOptions } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
import { GithubCredentialsProvider } from '@backstage/integration';
|
||||
import { GithubIntegrationConfig } from '@backstage/integration';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { GroupEntity } from '@backstage/catalog-model';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Config } from '@backstage/config';
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { GithubEntityProvider } from './providers/GithubEntityProvider';
|
||||
import {
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from './defaultTransformers';
|
||||
import { withLocations } from '../providers/GithubOrgEntityProvider';
|
||||
|
||||
import { DeferredEntity } from '@backstage/plugin-catalog-backend';
|
||||
import { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
|
||||
// Graphql types
|
||||
|
||||
@@ -195,7 +195,7 @@ export async function getOrganizationTeams(
|
||||
parentTeam { slug }
|
||||
members(first: 100, membership: IMMEDIATE) {
|
||||
pageInfo { hasNextPage }
|
||||
nodes {
|
||||
nodes {
|
||||
avatarUrl,
|
||||
bio,
|
||||
email,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
DefaultGithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { GithubDiscoveryProcessor, parseUrl } from './GithubDiscoveryProcessor';
|
||||
import { getOrganizationRepositories } from '../lib';
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { Logger } from 'winston';
|
||||
import { getOrganizationRepositories } from '../lib';
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
GithubCredentialsProvider,
|
||||
ScmIntegrations,
|
||||
} from '@backstage/integration';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { GithubOrgReaderProcessor } from './GithubOrgReaderProcessor';
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
TaskRunner,
|
||||
} from '@backstage/backend-tasks';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { GithubEntityProvider } from './GithubEntityProvider';
|
||||
import * as helpers from '../lib/github';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
GithubCredentialsProvider,
|
||||
GithubIntegrationConfig,
|
||||
} from '@backstage/integration';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import {
|
||||
|
||||
@@ -33,7 +33,7 @@ import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import {
|
||||
OrganizationEvent,
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
import { TaskRunner } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { rest, RestRequest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { GitLabDiscoveryProcessor, parseUrl } from './GitLabDiscoveryProcessor';
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { GitLabClient, GitLabProject, paginated } from './lib';
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import {
|
||||
} from '@backstage/backend-tasks';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { GitlabDiscoveryEntityProvider } from './GitlabDiscoveryEntityProvider';
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import {
|
||||
EntityProviderConnection,
|
||||
LocationSpec,
|
||||
locationSpecToLocationEntity,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import * as uuid from 'uuid';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import {
|
||||
} from '@backstage/backend-tasks';
|
||||
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { GitlabOrgDiscoveryEntityProvider } from './GitlabOrgDiscoveryEntityProvider';
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import { GitLabIntegration, ScmIntegrations } from '@backstage/integration';
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import * as uuid from 'uuid';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
|
||||
import type { Config } from '@backstage/config';
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-backend';
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
import type { DurationObjectUnits } from 'luxon';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
|
||||
@@ -69,8 +69,7 @@
|
||||
"@backstage/backend-app-api": "workspace:^",
|
||||
"@backstage/backend-defaults": "workspace:^",
|
||||
"@backstage/backend-test-utils": "workspace:^",
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/cli": "workspace:^"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Knex } from 'knex';
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-backend';
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
import { stringifyEntityRef } from '@backstage/catalog-model';
|
||||
import { Duration } from 'luxon';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-backend';
|
||||
import type { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
import { IterationEngine, IterationEngineOptions } from '../types';
|
||||
import { IncrementalIngestionDatabaseManager } from '../database/IncrementalIngestionDatabaseManager';
|
||||
import { performance } from 'perf_hooks';
|
||||
|
||||
+1
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
IncrementalEntityProvider,
|
||||
IncrementalEntityProviderOptions,
|
||||
|
||||
@@ -26,7 +26,7 @@ import type { Config } from '@backstage/config';
|
||||
import type {
|
||||
DeferredEntity,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { EventParams } from '@backstage/plugin-events-node';
|
||||
import type { PermissionEvaluator } from '@backstage/plugin-permission-common';
|
||||
import type { DurationObjectUnits } from 'luxon';
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { Client } from 'ldapjs';
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { GroupEntity } from '@backstage/catalog-model';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { SearchEntry } from 'ldapjs';
|
||||
import { SearchOptions } from 'ldapjs';
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"@backstage/catalog-model": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@types/ldapjs": "^2.2.0",
|
||||
"ldapjs": "^2.2.0",
|
||||
|
||||
@@ -24,7 +24,7 @@ import { Config } from '@backstage/config';
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { merge } from 'lodash';
|
||||
import * as uuid from 'uuid';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
|
||||
/**
|
||||
* Extracts teams and users out of an LDAP server.
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { GroupEntity } from '@backstage/catalog-model';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-backend';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
"@backstage/backend-tasks": "workspace:^",
|
||||
"@backstage/catalog-model": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@microsoft/microsoft-graph-types": "^2.6.0",
|
||||
"@types/node-fetch": "^2.5.12",
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import {
|
||||
GroupEntity,
|
||||
UserEntity,
|
||||
} from '@backstage/catalog-model';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import {
|
||||
MicrosoftGraphClient,
|
||||
MICROSOFT_GRAPH_USER_ID_ANNOTATION,
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import { Config } from '@backstage/config';
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { merge } from 'lodash';
|
||||
import * as uuid from 'uuid';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
CatalogProcessorEmit,
|
||||
LocationSpec,
|
||||
processingResult,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
GroupTransformer,
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginTaskScheduler } from '@backstage/backend-tasks';
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"@backstage/catalog-model": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/plugin-catalog-backend": "workspace:^",
|
||||
"@backstage/plugin-catalog-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.0.0",
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { PuppetDbEntityProvider } from './PuppetDbEntityProvider';
|
||||
import {
|
||||
DeferredEntity,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import * as puppetFunctions from '../puppet/read';
|
||||
import { ANNOTATION_PUPPET_CERTNAME } from '../puppet';
|
||||
import {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import {
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
PuppetDbEntityProviderConfig,
|
||||
|
||||
@@ -12,29 +12,30 @@ import { AnalyzeLocationRequest as AnalyzeLocationRequest_2 } from '@backstage/p
|
||||
import { AnalyzeLocationResponse as AnalyzeLocationResponse_2 } from '@backstage/plugin-catalog-common';
|
||||
import { CatalogApi } from '@backstage/catalog-client';
|
||||
import { CatalogEntityDocument } from '@backstage/plugin-catalog-common';
|
||||
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorCache } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEntityResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorErrorResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorLocationResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorParser } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorRefreshKeysResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorRelationResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorResult } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessor as CatalogProcessor_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorCache as CatalogProcessorCache_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEmit as CatalogProcessorEmit_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorEntityResult as CatalogProcessorEntityResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorErrorResult as CatalogProcessorErrorResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorLocationResult as CatalogProcessorLocationResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorParser as CatalogProcessorParser_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorRefreshKeysResult as CatalogProcessorRefreshKeysResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorRelationResult as CatalogProcessorRelationResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { CatalogProcessorResult as CatalogProcessorResult_2 } from '@backstage/plugin-catalog-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
import { DeferredEntity as DeferredEntity_2 } from '@backstage/plugin-catalog-node';
|
||||
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPolicy } from '@backstage/catalog-model';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderMutation } from '@backstage/plugin-catalog-node';
|
||||
import { EntityRelationSpec } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProvider as EntityProvider_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderConnection as EntityProviderConnection_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EntityProviderMutation as EntityProviderMutation_2 } from '@backstage/plugin-catalog-node';
|
||||
import { EntityRelationSpec as EntityRelationSpec_2 } from '@backstage/plugin-catalog-node';
|
||||
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LocationEntityV1alpha1 } from '@backstage/catalog-model';
|
||||
import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common';
|
||||
import { locationSpecToLocationEntity as locationSpecToLocationEntity_2 } from '@backstage/plugin-catalog-node';
|
||||
import { locationSpecToMetadataName as locationSpecToMetadataName_2 } from '@backstage/plugin-catalog-node';
|
||||
import { Logger } from 'winston';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
|
||||
@@ -43,7 +44,6 @@ import { PermissionRule } from '@backstage/plugin-permission-node';
|
||||
import { PermissionRuleParams } from '@backstage/plugin-permission-common';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
import { processingResult } from '@backstage/plugin-catalog-node';
|
||||
import { Readable } from 'stream';
|
||||
import { Router } from 'express';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
@@ -73,7 +73,7 @@ export type AnalyzeOptions = {
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export class AnnotateLocationEntityProcessor implements CatalogProcessor {
|
||||
export class AnnotateLocationEntityProcessor implements CatalogProcessor_2 {
|
||||
constructor(options: { integrations: ScmIntegrationRegistry });
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
@@ -81,13 +81,13 @@ export class AnnotateLocationEntityProcessor implements CatalogProcessor {
|
||||
preProcessEntity(
|
||||
entity: Entity,
|
||||
location: LocationSpec_2,
|
||||
_: CatalogProcessorEmit,
|
||||
_: CatalogProcessorEmit_2,
|
||||
originLocation: LocationSpec_2,
|
||||
): Promise<Entity>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class AnnotateScmSlugEntityProcessor implements CatalogProcessor {
|
||||
export class AnnotateScmSlugEntityProcessor implements CatalogProcessor_2 {
|
||||
constructor(opts: { scmIntegrationRegistry: ScmIntegrationRegistry });
|
||||
// (undocumented)
|
||||
static fromConfig(config: Config): AnnotateScmSlugEntityProcessor;
|
||||
@@ -98,14 +98,14 @@ export class AnnotateScmSlugEntityProcessor implements CatalogProcessor {
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
||||
export class BuiltinKindsEntityProcessor implements CatalogProcessor_2 {
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
// (undocumented)
|
||||
postProcessEntity(
|
||||
entity: Entity,
|
||||
_location: LocationSpec_2,
|
||||
emit: CatalogProcessorEmit,
|
||||
emit: CatalogProcessorEmit_2,
|
||||
): Promise<Entity>;
|
||||
// (undocumented)
|
||||
validateEntityKind(entity: Entity): Promise<boolean>;
|
||||
@@ -117,7 +117,7 @@ export class CatalogBuilder {
|
||||
...policies: Array<EntityPolicy | Array<EntityPolicy>>
|
||||
): CatalogBuilder;
|
||||
addEntityProvider(
|
||||
...providers: Array<EntityProvider | Array<EntityProvider>>
|
||||
...providers: Array<EntityProvider_2 | Array<EntityProvider_2>>
|
||||
): CatalogBuilder;
|
||||
addLocationAnalyzers(
|
||||
...analyzers: Array<ScmLocationAnalyzer | Array<ScmLocationAnalyzer>>
|
||||
@@ -128,18 +128,18 @@ export class CatalogBuilder {
|
||||
>
|
||||
): this;
|
||||
addProcessor(
|
||||
...processors: Array<CatalogProcessor | Array<CatalogProcessor>>
|
||||
...processors: Array<CatalogProcessor_2 | Array<CatalogProcessor_2>>
|
||||
): CatalogBuilder;
|
||||
build(): Promise<{
|
||||
processingEngine: CatalogProcessingEngine;
|
||||
router: Router;
|
||||
}>;
|
||||
static create(env: CatalogEnvironment): CatalogBuilder;
|
||||
getDefaultProcessors(): CatalogProcessor[];
|
||||
getDefaultProcessors(): CatalogProcessor_2[];
|
||||
replaceEntityPolicies(policies: EntityPolicy[]): CatalogBuilder;
|
||||
replaceProcessors(processors: CatalogProcessor[]): CatalogBuilder;
|
||||
replaceProcessors(processors: CatalogProcessor_2[]): CatalogBuilder;
|
||||
setAllowedLocationTypes(allowedLocationTypes: string[]): CatalogBuilder;
|
||||
setEntityDataParser(parser: CatalogProcessorParser): CatalogBuilder;
|
||||
setEntityDataParser(parser: CatalogProcessorParser_2): CatalogBuilder;
|
||||
setFieldFormatValidators(validators: Partial<Validators>): CatalogBuilder;
|
||||
setLocationAnalyzer(locationAnalyzer: LocationAnalyzer): CatalogBuilder;
|
||||
setPlaceholderResolver(
|
||||
@@ -187,28 +187,39 @@ export interface CatalogProcessingEngine {
|
||||
stop(): Promise<void>;
|
||||
}
|
||||
|
||||
export { CatalogProcessor };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessor = CatalogProcessor_2;
|
||||
|
||||
export { CatalogProcessorCache };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorCache = CatalogProcessorCache_2;
|
||||
|
||||
export { CatalogProcessorEmit };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorEmit = CatalogProcessorEmit_2;
|
||||
|
||||
export { CatalogProcessorEntityResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorEntityResult = CatalogProcessorEntityResult_2;
|
||||
|
||||
export { CatalogProcessorErrorResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorErrorResult = CatalogProcessorErrorResult_2;
|
||||
|
||||
export { CatalogProcessorLocationResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorLocationResult = CatalogProcessorLocationResult_2;
|
||||
|
||||
export { CatalogProcessorParser };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorParser = CatalogProcessorParser_2;
|
||||
|
||||
export { CatalogProcessorRefreshKeysResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorRefreshKeysResult =
|
||||
CatalogProcessorRefreshKeysResult_2;
|
||||
|
||||
export { CatalogProcessorRelationResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorRelationResult = CatalogProcessorRelationResult_2;
|
||||
|
||||
export { CatalogProcessorResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export type CatalogProcessorResult = CatalogProcessorResult_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export class CodeOwnersProcessor implements CatalogProcessor {
|
||||
export class CodeOwnersProcessor implements CatalogProcessor_2 {
|
||||
constructor(options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
logger: Logger;
|
||||
@@ -304,7 +315,8 @@ export type DefaultCatalogCollatorFactoryOptions = {
|
||||
entityTransformer?: CatalogCollatorEntityTransformer;
|
||||
};
|
||||
|
||||
export { DeferredEntity };
|
||||
// @public @deprecated (undocumented)
|
||||
export type DeferredEntity = DeferredEntity_2;
|
||||
|
||||
// @public
|
||||
export type EntitiesSearchFilter = {
|
||||
@@ -325,24 +337,28 @@ export type EntityFilter =
|
||||
}
|
||||
| EntitiesSearchFilter;
|
||||
|
||||
export { EntityProvider };
|
||||
// @public @deprecated (undocumented)
|
||||
export type EntityProvider = EntityProvider_2;
|
||||
|
||||
export { EntityProviderConnection };
|
||||
// @public @deprecated (undocumented)
|
||||
export type EntityProviderConnection = EntityProviderConnection_2;
|
||||
|
||||
export { EntityProviderMutation };
|
||||
// @public @deprecated (undocumented)
|
||||
export type EntityProviderMutation = EntityProviderMutation_2;
|
||||
|
||||
export { EntityRelationSpec };
|
||||
// @public @deprecated (undocumented)
|
||||
export type EntityRelationSpec = EntityRelationSpec_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export class FileReaderProcessor implements CatalogProcessor {
|
||||
export class FileReaderProcessor implements CatalogProcessor_2 {
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
// (undocumented)
|
||||
readLocation(
|
||||
location: LocationSpec_2,
|
||||
optional: boolean,
|
||||
emit: CatalogProcessorEmit,
|
||||
parser: CatalogProcessorParser,
|
||||
emit: CatalogProcessorEmit_2,
|
||||
parser: CatalogProcessorParser_2,
|
||||
): Promise<boolean>;
|
||||
}
|
||||
|
||||
@@ -354,7 +370,7 @@ export type LocationAnalyzer = {
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export class LocationEntityProcessor implements CatalogProcessor {
|
||||
export class LocationEntityProcessor implements CatalogProcessor_2 {
|
||||
constructor(options: LocationEntityProcessorOptions);
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
@@ -362,7 +378,7 @@ export class LocationEntityProcessor implements CatalogProcessor {
|
||||
postProcessEntity(
|
||||
entity: Entity,
|
||||
location: LocationSpec_2,
|
||||
emit: CatalogProcessorEmit,
|
||||
emit: CatalogProcessorEmit_2,
|
||||
): Promise<Entity>;
|
||||
}
|
||||
|
||||
@@ -374,20 +390,20 @@ export type LocationEntityProcessorOptions = {
|
||||
// @public @deprecated
|
||||
export type LocationSpec = LocationSpec_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export function locationSpecToLocationEntity(opts: {
|
||||
location: LocationSpec_2;
|
||||
parentEntity?: Entity;
|
||||
}): LocationEntityV1alpha1;
|
||||
// @public @deprecated (undocumented)
|
||||
export const locationSpecToLocationEntity: typeof locationSpecToLocationEntity_2;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export const locationSpecToMetadataName: typeof locationSpecToMetadataName_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export function parseEntityYaml(
|
||||
data: Buffer,
|
||||
location: LocationSpec_2,
|
||||
): Iterable<CatalogProcessorResult>;
|
||||
): Iterable<CatalogProcessorResult_2>;
|
||||
|
||||
// @public
|
||||
export class PlaceholderProcessor implements CatalogProcessor {
|
||||
export class PlaceholderProcessor implements CatalogProcessor_2 {
|
||||
constructor(options: PlaceholderProcessorOptions);
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
@@ -395,7 +411,7 @@ export class PlaceholderProcessor implements CatalogProcessor {
|
||||
preProcessEntity(
|
||||
entity: Entity,
|
||||
location: LocationSpec_2,
|
||||
emit: CatalogProcessorEmit,
|
||||
emit: CatalogProcessorEmit_2,
|
||||
): Promise<Entity>;
|
||||
}
|
||||
|
||||
@@ -418,7 +434,7 @@ export type PlaceholderResolverParams = {
|
||||
baseUrl: string;
|
||||
read: PlaceholderResolverRead;
|
||||
resolveUrl: PlaceholderResolverResolveUrl;
|
||||
emit: CatalogProcessorEmit;
|
||||
emit: CatalogProcessorEmit_2;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
@@ -433,7 +449,32 @@ export type PlaceholderResolverResolveUrl = (
|
||||
// @public
|
||||
export type ProcessingIntervalFunction = () => number;
|
||||
|
||||
export { processingResult };
|
||||
// @public @deprecated (undocumented)
|
||||
export const processingResult: Readonly<{
|
||||
readonly notFoundError: (
|
||||
atLocation: LocationSpec_2,
|
||||
message: string,
|
||||
) => CatalogProcessorResult_2;
|
||||
readonly inputError: (
|
||||
atLocation: LocationSpec_2,
|
||||
message: string,
|
||||
) => CatalogProcessorResult_2;
|
||||
readonly generalError: (
|
||||
atLocation: LocationSpec_2,
|
||||
message: string,
|
||||
) => CatalogProcessorResult_2;
|
||||
readonly location: (newLocation: LocationSpec_2) => CatalogProcessorResult_2;
|
||||
readonly entity: (
|
||||
atLocation: LocationSpec_2,
|
||||
newEntity: Entity,
|
||||
) => CatalogProcessorResult_2;
|
||||
readonly relation: (spec: EntityRelationSpec_2) => CatalogProcessorResult_2
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/;
|
||||
readonly refresh: (key: string) => CatalogProcessorResult_2;
|
||||
}>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScmLocationAnalyzer = {
|
||||
@@ -444,7 +485,7 @@ export type ScmLocationAnalyzer = {
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export class UrlReaderProcessor implements CatalogProcessor {
|
||||
export class UrlReaderProcessor implements CatalogProcessor_2 {
|
||||
constructor(options: { reader: UrlReader; logger: Logger });
|
||||
// (undocumented)
|
||||
getProcessorName(): string;
|
||||
@@ -452,9 +493,9 @@ export class UrlReaderProcessor implements CatalogProcessor {
|
||||
readLocation(
|
||||
location: LocationSpec_2,
|
||||
optional: boolean,
|
||||
emit: CatalogProcessorEmit,
|
||||
parser: CatalogProcessorParser,
|
||||
cache: CatalogProcessorCache,
|
||||
emit: CatalogProcessorEmit_2,
|
||||
parser: CatalogProcessorParser_2,
|
||||
cache: CatalogProcessorCache_2,
|
||||
): Promise<boolean>;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright 2023 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
locationSpecToMetadataName as nodeLocationSpecToMetadataName,
|
||||
locationSpecToLocationEntity as nodeLocationSpecToLocationEntity,
|
||||
processingResult as nodeProcessingResult,
|
||||
type DeferredEntity as NodeDeferredEntity,
|
||||
type EntityRelationSpec as NodeEntityRelationSpec,
|
||||
type CatalogProcessor as NodeCatalogProcessor,
|
||||
type CatalogProcessorParser as NodeCatalogProcessorParser,
|
||||
type CatalogProcessorCache as NodeCatalogProcessorCache,
|
||||
type CatalogProcessorEmit as NodeCatalogProcessorEmit,
|
||||
type CatalogProcessorLocationResult as NodeCatalogProcessorLocationResult,
|
||||
type CatalogProcessorEntityResult as NodeCatalogProcessorEntityResult,
|
||||
type CatalogProcessorRelationResult as NodeCatalogProcessorRelationResult,
|
||||
type CatalogProcessorErrorResult as NodeCatalogProcessorErrorResult,
|
||||
type CatalogProcessorRefreshKeysResult as NodeCatalogProcessorRefreshKeysResult,
|
||||
type CatalogProcessorResult as NodeCatalogProcessorResult,
|
||||
type EntityProvider as NodeEntityProvider,
|
||||
type EntityProviderConnection as NodeEntityProviderConnection,
|
||||
type EntityProviderMutation as NodeEntityProviderMutation,
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { type LocationSpec as CommonLocationSpec } from '@backstage/plugin-catalog-common';
|
||||
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export const locationSpecToMetadataName = nodeLocationSpecToMetadataName;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export const locationSpecToLocationEntity = nodeLocationSpecToLocationEntity;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export const processingResult = nodeProcessingResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type DeferredEntity = NodeDeferredEntity;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type EntityRelationSpec = NodeEntityRelationSpec;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessor = NodeCatalogProcessor;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorParser = NodeCatalogProcessorParser;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorCache = NodeCatalogProcessorCache;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorEmit = NodeCatalogProcessorEmit;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorLocationResult = NodeCatalogProcessorLocationResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorEntityResult = NodeCatalogProcessorEntityResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorRelationResult = NodeCatalogProcessorRelationResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorErrorResult = NodeCatalogProcessorErrorResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorRefreshKeysResult =
|
||||
NodeCatalogProcessorRefreshKeysResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type CatalogProcessorResult = NodeCatalogProcessorResult;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type EntityProvider = NodeEntityProvider;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type EntityProviderConnection = NodeEntityProviderConnection;
|
||||
/**
|
||||
* @public
|
||||
* @deprecated import from `@backstage/plugin-catalog-node` instead
|
||||
*/
|
||||
export type EntityProviderMutation = NodeEntityProviderMutation;
|
||||
|
||||
/**
|
||||
* Holds the entity location information.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* `presence` flag: when using repo importer plugin, location is being created before the component yaml file is merged to the main branch.
|
||||
* This flag is then set to indicate that the file can be not present.
|
||||
* default value: 'required'.
|
||||
*
|
||||
* @public
|
||||
* @deprecated use the same type from `@backstage/plugin-catalog-common` instead
|
||||
*/
|
||||
export type LocationSpec = CommonLocationSpec;
|
||||
@@ -20,45 +20,10 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export type {
|
||||
DeferredEntity,
|
||||
EntityRelationSpec,
|
||||
CatalogProcessor,
|
||||
CatalogProcessorParser,
|
||||
CatalogProcessorCache,
|
||||
CatalogProcessorEmit,
|
||||
CatalogProcessorLocationResult,
|
||||
CatalogProcessorEntityResult,
|
||||
CatalogProcessorRelationResult,
|
||||
CatalogProcessorErrorResult,
|
||||
CatalogProcessorRefreshKeysResult,
|
||||
CatalogProcessorResult,
|
||||
EntityProvider,
|
||||
EntityProviderConnection,
|
||||
EntityProviderMutation,
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
export { processingResult } from '@backstage/plugin-catalog-node';
|
||||
|
||||
export * from './catalog';
|
||||
export * from './ingestion';
|
||||
export * from './modules';
|
||||
export * from './processing';
|
||||
export * from './search';
|
||||
export * from './service';
|
||||
export * from './util';
|
||||
|
||||
import { LocationSpec as NonDeprecatedLocationSpec } from '@backstage/plugin-catalog-common';
|
||||
|
||||
/**
|
||||
* Holds the entity location information.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* `presence` flag: when using repo importer plugin, location is being created before the component yaml file is merged to the main branch.
|
||||
* This flag is then set to indicate that the file can be not present.
|
||||
* default value: 'required'.
|
||||
*
|
||||
* @public
|
||||
* @deprecated use the same type from `@backstage/plugin-catalog-common` instead
|
||||
*/
|
||||
export type LocationSpec = NonDeprecatedLocationSpec;
|
||||
export * from './deprecated';
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { locationSpecToLocationEntity } from './conversion';
|
||||
@@ -8,6 +8,7 @@
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LocationEntityV1alpha1 } from '@backstage/catalog-model';
|
||||
import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common';
|
||||
|
||||
// @public (undocumented)
|
||||
@@ -142,6 +143,15 @@ export type EntityRelationSpec = {
|
||||
// @public @deprecated
|
||||
export type LocationSpec = LocationSpec_2;
|
||||
|
||||
// @public
|
||||
export function locationSpecToLocationEntity(opts: {
|
||||
location: LocationSpec_2;
|
||||
parentEntity?: Entity;
|
||||
}): LocationEntityV1alpha1;
|
||||
|
||||
// @public
|
||||
export function locationSpecToMetadataName(location: LocationSpec_2): string;
|
||||
|
||||
// @public
|
||||
export const processingResult: Readonly<{
|
||||
readonly notFoundError: (
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright 2021 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
Entity,
|
||||
LocationEntityV1alpha1,
|
||||
ANNOTATION_LOCATION,
|
||||
ANNOTATION_ORIGIN_LOCATION,
|
||||
stringifyEntityRef,
|
||||
stringifyLocationRef,
|
||||
} from '@backstage/catalog-model';
|
||||
import { createHash } from 'crypto';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
|
||||
/**
|
||||
* A standard way of producing a machine generated name for a location.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function locationSpecToMetadataName(location: LocationSpec) {
|
||||
const hash = createHash('sha1')
|
||||
.update(`${location.type}:${location.target}`)
|
||||
.digest('hex');
|
||||
return `generated-${hash}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* A standard way of producing a machine generated Location kind entity for a
|
||||
* location.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function locationSpecToLocationEntity(opts: {
|
||||
location: LocationSpec;
|
||||
parentEntity?: Entity;
|
||||
}): LocationEntityV1alpha1 {
|
||||
const location = opts.location;
|
||||
const parentEntity = opts.parentEntity;
|
||||
|
||||
let ownLocation: string;
|
||||
let originLocation: string;
|
||||
if (parentEntity) {
|
||||
const maybeOwnLocation =
|
||||
parentEntity.metadata.annotations?.[ANNOTATION_LOCATION];
|
||||
if (!maybeOwnLocation) {
|
||||
throw new Error(
|
||||
`Parent entity '${stringifyEntityRef(
|
||||
parentEntity,
|
||||
)}' of location '${stringifyLocationRef(
|
||||
location,
|
||||
)}' does not have a location annotation`,
|
||||
);
|
||||
}
|
||||
ownLocation = maybeOwnLocation;
|
||||
const maybeOriginLocation =
|
||||
parentEntity.metadata.annotations?.[ANNOTATION_ORIGIN_LOCATION];
|
||||
if (!maybeOriginLocation) {
|
||||
throw new Error(
|
||||
`Parent entity '${stringifyEntityRef(
|
||||
parentEntity,
|
||||
)}' of location '${stringifyLocationRef(
|
||||
location,
|
||||
)}' does not have an origin location annotation`,
|
||||
);
|
||||
}
|
||||
originLocation = maybeOriginLocation;
|
||||
} else {
|
||||
ownLocation = stringifyLocationRef(location);
|
||||
originLocation = ownLocation;
|
||||
}
|
||||
|
||||
const result: LocationEntityV1alpha1 = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Location',
|
||||
metadata: {
|
||||
name: locationSpecToMetadataName(location),
|
||||
annotations: {
|
||||
[ANNOTATION_LOCATION]: ownLocation,
|
||||
[ANNOTATION_ORIGIN_LOCATION]: originLocation,
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: location.type,
|
||||
target: location.target,
|
||||
presence: location.presence,
|
||||
},
|
||||
};
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -21,4 +21,5 @@
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './conversion';
|
||||
export * from './processing';
|
||||
|
||||
@@ -4949,7 +4949,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-common": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/plugin-kubernetes-common": "workspace:^"
|
||||
@@ -4980,7 +4979,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/lodash": ^4.14.151
|
||||
@@ -5007,7 +5005,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-bitbucket-cloud-common": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-common": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/plugin-events-node": "workspace:^"
|
||||
@@ -5031,7 +5028,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@types/node-fetch": ^2.5.12
|
||||
luxon: ^3.0.0
|
||||
@@ -5054,7 +5050,7 @@ __metadata:
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-bitbucket-cloud-common": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/lodash": ^4.14.151
|
||||
lodash: ^4.17.21
|
||||
@@ -5077,7 +5073,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@types/fs-extra": ^9.0.1
|
||||
fs-extra: 10.1.0
|
||||
@@ -5135,7 +5130,6 @@ __metadata:
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/lodash": ^4.14.151
|
||||
@@ -5188,7 +5182,7 @@ __metadata:
|
||||
"@backstage/cli": "workspace:^"
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/ldapjs": ^2.2.0
|
||||
"@types/lodash": ^4.14.151
|
||||
@@ -5211,7 +5205,6 @@ __metadata:
|
||||
"@backstage/catalog-model": "workspace:^"
|
||||
"@backstage/cli": "workspace:^"
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@microsoft/microsoft-graph-types": ^2.6.0
|
||||
"@types/lodash": ^4.14.151
|
||||
@@ -5258,7 +5251,7 @@ __metadata:
|
||||
"@backstage/cli": "workspace:^"
|
||||
"@backstage/config": "workspace:^"
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/plugin-catalog-backend": "workspace:^"
|
||||
"@backstage/plugin-catalog-node": "workspace:^"
|
||||
"@backstage/types": "workspace:^"
|
||||
"@types/lodash": ^4.14.151
|
||||
lodash: ^4.17.21
|
||||
|
||||
Reference in New Issue
Block a user