Merge pull request #16764 from backstage/freben/rename-catalog-modules

🧹 rename catalog modules to fit naming pattern
This commit is contained in:
Fredrik Adelöw
2023-03-09 09:55:42 +01:00
committed by GitHub
58 changed files with 228 additions and 64 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch
---
Renamed `incrementalIngestionEntityProviderCatalogModule` to `catalogModuleIncrementalIngestionEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-bitbucket-server': patch
---
Renamed `bitbucketServerEntityProviderCatalogModule` to `catalogModuleBitbucketServerEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch
---
Renamed `bitbucketCloudEntityProviderCatalogModule` to `catalogModuleBitbucketCloudEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Renamed `microsoftGraphOrgEntityProviderCatalogModule` to `catalogModuleMicrosoftGraphOrgEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-gerrit': patch
---
Renamed `gerritEntityProviderCatalogModule` to `catalogModuleGerritEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-github': patch
---
Renamed `githubEntityProviderCatalogModule` to `catalogModuleGithubEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-gitlab': patch
---
Renamed `gitlabDiscoveryEntityProviderCatalogModule` to `catalogModuleGitlabDiscoveryEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-azure': patch
---
Renamed `azureDevOpsEntityProviderCatalogModule` to `catalogModuleAzureDevOpsEntityProvider` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-aws': patch
---
Renamed `awsS3EntityProviderCatalogModule` to `catalogModuleAwsS3EntityProviders` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha
export const awsS3EntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleAwsS3EntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { awsS3EntityProviderCatalogModule } from './service/AwsS3EntityProviderCatalogModule';
export * from './module';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { awsS3EntityProviderCatalogModule } from './AwsS3EntityProviderCatalogModule';
import { catalogModuleAwsS3EntityProvider } from './catalogModuleAwsS3EntityProvider';
import { AwsS3EntityProvider } from '../providers';
describe('awsS3EntityProviderCatalogModule', () => {
describe('catalogModuleAwsS3EntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<AwsS3EntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -66,7 +66,7 @@ describe('awsS3EntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [awsS3EntityProviderCatalogModule()],
features: [catalogModuleAwsS3EntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -27,7 +27,7 @@ import { AwsS3EntityProvider } from '../providers';
*
* @alpha
*/
export const awsS3EntityProviderCatalogModule = createBackendModule({
export const catalogModuleAwsS3EntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'awsS3EntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleAwsS3EntityProvider } from './catalogModuleAwsS3EntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha
export const azureDevOpsEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleAzureDevOpsEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { azureDevOpsEntityProviderCatalogModule } from './service/AzureDevOpsEntityProviderCatalogModule';
export * from './module';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { azureDevOpsEntityProviderCatalogModule } from './AzureDevOpsEntityProviderCatalogModule';
import { catalogModuleAzureDevOpsEntityProvider } from './catalogModuleAzureDevOpsEntityProvider';
import { AzureDevOpsEntityProvider } from '../providers';
describe('azureDevOpsEntityProviderCatalogModule', () => {
describe('catalogModuleAzureDevOpsEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<AzureDevOpsEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -69,7 +69,7 @@ describe('azureDevOpsEntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [azureDevOpsEntityProviderCatalogModule()],
features: [catalogModuleAzureDevOpsEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -27,7 +27,7 @@ import { AzureDevOpsEntityProvider } from '../providers';
*
* @alpha
*/
export const azureDevOpsEntityProviderCatalogModule = createBackendModule({
export const catalogModuleAzureDevOpsEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'azureDevOpsEntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleAzureDevOpsEntityProvider } from './catalogModuleAzureDevOpsEntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha (undocumented)
export const bitbucketCloudEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleBitbucketCloudEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { bitbucketCloudEntityProviderCatalogModule } from './service/BitbucketCloudEntityProviderCatalogModule';
export * from './module';
@@ -20,4 +20,4 @@
* @packageDocumentation
*/
export { BitbucketCloudEntityProvider } from './BitbucketCloudEntityProvider';
export { BitbucketCloudEntityProvider } from './providers/BitbucketCloudEntityProvider';
@@ -23,10 +23,10 @@ import { startTestBackend, mockServices } from '@backstage/backend-test-utils';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';
import { Duration } from 'luxon';
import { bitbucketCloudEntityProviderCatalogModule } from './BitbucketCloudEntityProviderCatalogModule';
import { BitbucketCloudEntityProvider } from '../BitbucketCloudEntityProvider';
import { catalogModuleBitbucketCloudEntityProvider } from './catalogModuleBitbucketCloudEntityProvider';
import { BitbucketCloudEntityProvider } from '../providers/BitbucketCloudEntityProvider';
describe('bitbucketCloudEntityProviderCatalogModule', () => {
describe('catalogModuleBitbucketCloudEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<BitbucketCloudEntityProvider> | undefined;
let addedSubscribers: Array<BitbucketCloudEntityProvider> | undefined;
@@ -73,7 +73,7 @@ describe('bitbucketCloudEntityProviderCatalogModule', () => {
}),
[coreServices.scheduler, scheduler],
],
features: [bitbucketCloudEntityProviderCatalogModule()],
features: [catalogModuleBitbucketCloudEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -24,12 +24,12 @@ import {
catalogServiceRef,
} from '@backstage/plugin-catalog-node/alpha';
import { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';
import { BitbucketCloudEntityProvider } from '../BitbucketCloudEntityProvider';
import { BitbucketCloudEntityProvider } from '../providers/BitbucketCloudEntityProvider';
/**
* @alpha
*/
export const bitbucketCloudEntityProviderCatalogModule = createBackendModule({
export const catalogModuleBitbucketCloudEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'bitbucketCloudEntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleBitbucketCloudEntityProvider } from './catalogModuleBitbucketCloudEntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha (undocumented)
export const bitbucketServerEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleBitbucketServerEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { bitbucketServerEntityProviderCatalogModule } from './service/BitbucketServerEntityProviderCatalogModule';
export * from './module';
@@ -23,11 +23,11 @@ import {
} from '@backstage/backend-tasks';
import { startTestBackend } from '@backstage/backend-test-utils';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { bitbucketServerEntityProviderCatalogModule } from './BitbucketServerEntityProviderCatalogModule';
import { catalogModuleBitbucketServerEntityProvider } from './catalogModuleBitbucketServerEntityProvider';
import { Duration } from 'luxon';
import { BitbucketServerEntityProvider } from '../providers';
describe('bitbucketServerEntityProviderCatalogModule', () => {
describe('catalogModuleBitbucketServerEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<BitbucketServerEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -73,7 +73,7 @@ describe('bitbucketServerEntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [bitbucketServerEntityProviderCatalogModule()],
features: [catalogModuleBitbucketServerEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -25,7 +25,7 @@ import { BitbucketServerEntityProvider } from '../providers';
/**
* @alpha
*/
export const bitbucketServerEntityProviderCatalogModule = createBackendModule({
export const catalogModuleBitbucketServerEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'bitbucketServerEntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleBitbucketServerEntityProvider } from './catalogModuleBitbucketServerEntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha (undocumented)
export const gerritEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleGerritEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { gerritEntityProviderCatalogModule } from './service/GerritEntityProviderCatalogModule';
export * from './module';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { gerritEntityProviderCatalogModule } from './GerritEntityProviderCatalogModule';
import { catalogModuleGerritEntityProvider } from './catalogModuleGerritEntityProvider';
import { GerritEntityProvider } from '../providers/GerritEntityProvider';
describe('gerritEntityProviderCatalogModule', () => {
describe('catalogModuleGerritEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<GerritEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -79,7 +79,7 @@ describe('gerritEntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [gerritEntityProviderCatalogModule()],
features: [catalogModuleGerritEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -25,7 +25,7 @@ import { GerritEntityProvider } from '../providers/GerritEntityProvider';
/**
* @alpha
*/
export const gerritEntityProviderCatalogModule = createBackendModule({
export const catalogModuleGerritEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'gerritEntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleGerritEntityProvider } from './catalogModuleGerritEntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha
export const githubEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleGithubEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { githubEntityProviderCatalogModule } from './service/GithubEntityProviderCatalogModule';
export * from './module';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { githubEntityProviderCatalogModule } from './GithubEntityProviderCatalogModule';
import { catalogModuleGithubEntityProvider } from './catalogModuleGithubEntityProvider';
import { GithubEntityProvider } from '../providers/GithubEntityProvider';
describe('githubEntityProviderCatalogModule', () => {
describe('catalogModuleGithubEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<GithubEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -66,7 +66,7 @@ describe('githubEntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [githubEntityProviderCatalogModule()],
features: [catalogModuleGithubEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -27,7 +27,7 @@ import { GithubEntityProvider } from '../providers/GithubEntityProvider';
*
* @alpha
*/
export const githubEntityProviderCatalogModule = createBackendModule({
export const catalogModuleGithubEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'githubEntityProvider',
register(env) {
@@ -0,0 +1,17 @@
/*
* 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.
*/
export { catalogModuleGithubEntityProvider } from './catalogModuleGithubEntityProvider';
@@ -6,7 +6,7 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha
export const gitlabDiscoveryEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleGitlabDiscoveryEntityProvider: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { gitlabDiscoveryEntityProviderCatalogModule } from './service/GitlabDiscoveryEntityProviderCatalogModule';
export { catalogModuleGitlabDiscoveryEntityProvider } from './module/catalogModuleGitlabDiscoveryEntityProvider';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { gitlabDiscoveryEntityProviderCatalogModule } from './GitlabDiscoveryEntityProviderCatalogModule';
import { catalogModuleGitlabDiscoveryEntityProvider } from './catalogModuleGitlabDiscoveryEntityProvider';
import { GitlabDiscoveryEntityProvider } from '../providers';
describe('gitlabDiscoveryEntityProviderCatalogModule', () => {
describe('catalogModuleGitlabDiscoveryEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<GitlabDiscoveryEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -78,7 +78,7 @@ describe('gitlabDiscoveryEntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [gitlabDiscoveryEntityProviderCatalogModule()],
features: [catalogModuleGitlabDiscoveryEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('P1M'));
@@ -27,7 +27,7 @@ import { GitlabDiscoveryEntityProvider } from '../providers';
*
* @alpha
*/
export const gitlabDiscoveryEntityProviderCatalogModule = createBackendModule({
export const catalogModuleGitlabDiscoveryEntityProvider = createBackendModule({
pluginId: 'catalog',
moduleId: 'gitlabDiscoveryEntityProvider',
register(env) {
@@ -8,7 +8,7 @@ import { IncrementalEntityProvider } from '@backstage/plugin-catalog-backend-mod
import { IncrementalEntityProviderOptions } from '@backstage/plugin-catalog-backend-module-incremental-ingestion';
// @alpha
export const incrementalIngestionEntityProviderCatalogModule: (options: {
export const catalogModuleIncrementalIngestionEntityProvider: (options: {
providers: {
provider: IncrementalEntityProvider<unknown, unknown>;
options: IncrementalEntityProviderOptions;
@@ -20,9 +20,9 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { IncrementalEntityProvider } from '../types';
import { incrementalIngestionEntityProviderCatalogModule } from './incrementalIngestionEntityProviderCatalogModule';
import { catalogModuleIncrementalIngestionEntityProvider } from './catalogModuleIncrementalIngestionEntityProvider';
describe('bitbucketServerEntityProviderCatalogModule', () => {
describe('catalogModuleIncrementalIngestionEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
const provider1: IncrementalEntityProvider<number, {}> = {
getProviderName: () => 'provider1',
@@ -57,7 +57,7 @@ describe('bitbucketServerEntityProviderCatalogModule', () => {
[coreServices.scheduler, scheduler],
],
features: [
incrementalIngestionEntityProviderCatalogModule({
catalogModuleIncrementalIngestionEntityProvider({
providers: [
{
provider: provider1,
@@ -30,7 +30,7 @@ import { WrapperProviders } from './WrapperProviders';
*
* @alpha
*/
export const incrementalIngestionEntityProviderCatalogModule =
export const catalogModuleIncrementalIngestionEntityProvider =
createBackendModule(
(options: {
providers: Array<{
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { incrementalIngestionEntityProviderCatalogModule } from './incrementalIngestionEntityProviderCatalogModule';
export { catalogModuleIncrementalIngestionEntityProvider } from './catalogModuleIncrementalIngestionEntityProvider';
@@ -25,7 +25,7 @@ import {
import { ConfigReader } from '@backstage/config';
import { catalogPlugin } from '@backstage/plugin-catalog-backend/alpha';
import { IncrementalEntityProvider } from '.';
import { incrementalIngestionEntityProviderCatalogModule } from './alpha';
import { catalogModuleIncrementalIngestionEntityProvider } from './alpha';
const provider: IncrementalEntityProvider<number, {}> = {
getProviderName: () => 'test-provider',
@@ -63,7 +63,7 @@ async function main() {
backend.add(catalogPlugin());
backend.add(
incrementalIngestionEntityProviderCatalogModule({
catalogModuleIncrementalIngestionEntityProvider({
providers: [
{
provider: provider,
@@ -9,10 +9,10 @@ import { OrganizationTransformer } from '@backstage/plugin-catalog-backend-modul
import { UserTransformer } from '@backstage/plugin-catalog-backend-module-msgraph';
// @alpha
export const microsoftGraphOrgEntityProviderCatalogModule: () => BackendFeature;
export const catalogModuleMicrosoftGraphOrgEntityProvider: () => BackendFeature;
// @alpha
export interface MicrosoftGraphOrgEntityProviderCatalogModuleOptions {
export interface CatalogModuleMicrosoftGraphOrgEntityProviderOptions {
groupTransformer?: GroupTransformer | Record<string, GroupTransformer>;
organizationTransformer?:
| OrganizationTransformer
@@ -14,5 +14,4 @@
* limitations under the License.
*/
export { microsoftGraphOrgEntityProviderCatalogModule } from './service/MicrosoftGraphOrgEntityProviderCatalogModule';
export type { MicrosoftGraphOrgEntityProviderCatalogModuleOptions } from './service/MicrosoftGraphOrgEntityProviderCatalogModule';
export * from './module';
@@ -24,10 +24,10 @@ import { startTestBackend } from '@backstage/backend-test-utils';
import { ConfigReader } from '@backstage/config';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { Duration } from 'luxon';
import { microsoftGraphOrgEntityProviderCatalogModule } from './MicrosoftGraphOrgEntityProviderCatalogModule';
import { catalogModuleMicrosoftGraphOrgEntityProvider } from './catalogModuleMicrosoftGraphOrgEntityProvider';
import { MicrosoftGraphOrgEntityProvider } from '../processors';
describe('awsS3EntityProviderCatalogModule', () => {
describe('catalogModuleMicrosoftGraphOrgEntityProvider', () => {
it('should register provider at the catalog extension point', async () => {
let addedProviders: Array<MicrosoftGraphOrgEntityProvider> | undefined;
let usedSchedule: TaskScheduleDefinition | undefined;
@@ -71,7 +71,7 @@ describe('awsS3EntityProviderCatalogModule', () => {
[coreServices.logger, getVoidLogger()],
[coreServices.scheduler, scheduler],
],
features: [microsoftGraphOrgEntityProviderCatalogModule()],
features: [catalogModuleMicrosoftGraphOrgEntityProvider()],
});
expect(usedSchedule?.frequency).toEqual(Duration.fromISO('PT30M'));
@@ -28,11 +28,11 @@ import {
import { MicrosoftGraphOrgEntityProvider } from '../processors';
/**
* Options for {@link microsoftGraphOrgEntityProviderCatalogModule}.
* Options for {@link catalogModuleMicrosoftGraphOrgEntityProvider}.
*
* @alpha
*/
export interface MicrosoftGraphOrgEntityProviderCatalogModuleOptions {
export interface CatalogModuleMicrosoftGraphOrgEntityProviderOptions {
/**
* The function that transforms a user entry in msgraph to an entity.
* Optionally, you can pass separate transformers per provider ID.
@@ -59,13 +59,13 @@ export interface MicrosoftGraphOrgEntityProviderCatalogModuleOptions {
*
* @alpha
*/
export const microsoftGraphOrgEntityProviderCatalogModule = createBackendModule(
export const catalogModuleMicrosoftGraphOrgEntityProvider = createBackendModule(
{
pluginId: 'catalog',
moduleId: 'microsoftGraphOrgEntityProvider',
register(
env,
options?: MicrosoftGraphOrgEntityProviderCatalogModuleOptions,
options?: CatalogModuleMicrosoftGraphOrgEntityProviderOptions,
) {
env.registerInit({
deps: {
@@ -0,0 +1,18 @@
/*
* 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.
*/
export { catalogModuleMicrosoftGraphOrgEntityProvider } from './catalogModuleMicrosoftGraphOrgEntityProvider';
export type { CatalogModuleMicrosoftGraphOrgEntityProviderOptions } from './catalogModuleMicrosoftGraphOrgEntityProvider';