@backstage/plugin-catalog-backend 0.24.0-next.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +1 -168
- package/dist/index.beta.d.ts +1 -168
- package/dist/index.cjs.js +32 -878
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -168
- package/package.json +12 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 0.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 66ba5d9023: **BREAKING**: Removed `GithubDiscoveryProcessor`, `GithubMultiOrgReaderProcessor`, `GitHubOrgEntityProvider`, `GithubOrgReaderProcessor`, and `GithubMultiOrgConfig` which now instead should be imported from `@backstage/plugin-catalog-backend-module-github`. NOTE THAT the `GithubDiscoveryProcessor` and `GithubOrgReaderProcessor` were part of the default set of processors in the catalog backend, and if you are a user of discovery or location based org ingestion on GitLab, you MUST now add them manually in the catalog initialization code of your backend.
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
11
|
+
+import {
|
|
12
|
+
+ GithubDiscoveryProcessor,
|
|
13
|
+
+ GithubOrgReaderProcessor,
|
|
14
|
+
+} from '@backstage/plugin-catalog-backend-module-github';
|
|
15
|
+
+import {
|
|
16
|
+
+ ScmIntegrations,
|
|
17
|
+
+ DefaultGithubCredentialsProvider
|
|
18
|
+
+} from '@backstage/integration';
|
|
19
|
+
|
|
20
|
+
export default async function createPlugin(
|
|
21
|
+
env: PluginEnvironment,
|
|
22
|
+
): Promise<Router> {
|
|
23
|
+
const builder = await CatalogBuilder.create(env);
|
|
24
|
+
+ const integrations = ScmIntegrations.fromConfig(config);
|
|
25
|
+
+ const githubCredentialsProvider =
|
|
26
|
+
+ DefaultGithubCredentialsProvider.fromIntegrations(integrations);
|
|
27
|
+
+ builder.addProcessor(
|
|
28
|
+
+ GithubDiscoveryProcessor.fromConfig(config, {
|
|
29
|
+
+ logger,
|
|
30
|
+
+ githubCredentialsProvider,
|
|
31
|
+
+ }),
|
|
32
|
+
+ GithubOrgReaderProcessor.fromConfig(config, {
|
|
33
|
+
+ logger,
|
|
34
|
+
+ githubCredentialsProvider,
|
|
35
|
+
+ }),
|
|
36
|
+
+ );
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**BREAKING**: Removed `GitLabDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-gitlab`. NOTE THAT this processor was part of the default set of processors in the catalog backend, and if you are a user of discovery on GitLab, you MUST now add it manually in the catalog initialization code of your backend.
|
|
40
|
+
|
|
41
|
+
```diff
|
|
42
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
43
|
+
+import { GitLabDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-gitlab';
|
|
44
|
+
|
|
45
|
+
export default async function createPlugin(
|
|
46
|
+
env: PluginEnvironment,
|
|
47
|
+
): Promise<Router> {
|
|
48
|
+
const builder = await CatalogBuilder.create(env);
|
|
49
|
+
+ builder.addProcessor(
|
|
50
|
+
+ GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
51
|
+
+ );
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**BREAKING**: Removed `BitbucketDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-bitbucket`. NOTE THAT this processor was part of the default set of processors in the catalog backend, and if you are a user of discovery on Bitbucket, you MUST now add it manually in the catalog initialization code of your backend.
|
|
55
|
+
|
|
56
|
+
```diff
|
|
57
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
58
|
+
+import { BitbucketDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-bitbucket';
|
|
59
|
+
|
|
60
|
+
export default async function createPlugin(
|
|
61
|
+
env: PluginEnvironment,
|
|
62
|
+
): Promise<Router> {
|
|
63
|
+
const builder = await CatalogBuilder.create(env);
|
|
64
|
+
+ builder.addProcessor(
|
|
65
|
+
+ BitbucketDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
66
|
+
+ );
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**BREAKING**: Removed `AzureDevOpsDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-azure`. This processor was not part of the set of default processors. If you were using it, you should already have a reference to it in your backend code and only need to update the import.
|
|
70
|
+
|
|
71
|
+
**BREAKING**: Removed the formerly deprecated type `BitbucketRepositoryParser`, which is instead reintroduced in `@backstage/plugin-catalog-backend-module-bitbucket`.
|
|
72
|
+
|
|
73
|
+
- f115a7f8fd: **BREAKING**: Removed `AwsS3DiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-aws`.
|
|
74
|
+
- 55150919ed: - **BREAKING**: Support for `backstage.io/v1beta2` Software Templates has been removed. Please migrate your legacy templates to the new `scaffolder.backstage.io/v1beta3` `apiVersion` by following the [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3)
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- ab7cd7d70e: Do some groundwork for supporting the `better-sqlite3` driver, to maybe eventually replace `@vscode/sqlite3` (#9912)
|
|
79
|
+
- e0a69ba49f: build(deps): bump `fs-extra` from 9.1.0 to 10.0.1
|
|
80
|
+
- 616f02ade2: support Bitbucket Cloud's code search to discover catalog files (multiple per repo, Location entities for existing files only)
|
|
81
|
+
- e421d77536: **BREAKING**:
|
|
82
|
+
|
|
83
|
+
- Removed the previously deprecated `runPeriodically` export. Please use the `@backstage/backend-tasks` package instead, or copy [the actual implementation](https://github.com/backstage/backstage/blob/02875d4d56708c60f86f6b0a5b3da82e24988354/plugins/catalog-backend/src/util/runPeriodically.ts#L29) into your own code if you explicitly do not want coordination of task runs across your worker nodes.
|
|
84
|
+
- Removed the previously deprecated `CatalogProcessorLocationResult.optional` field. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
85
|
+
- Related to the previous point, the `processingResult.location` function no longer has a second boolean `optional` argument. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
86
|
+
- Removed the previously deprecated `StaticLocationProcessor`. It has not been in use for some time; its functionality is covered by `ConfigLocationEntityProvider` instead.
|
|
87
|
+
|
|
88
|
+
- 3c2bc73901: Use `setupRequestMockHandlers` from `@backstage/backend-test-utils`
|
|
89
|
+
- c1168bb440: Fixed display of the location in the log message that is printed when entity envelope validation fails.
|
|
90
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
91
|
+
- 3e54f6c436: Use `@backstage/plugin-search-common` package instead of `@backstage/search-common`.
|
|
92
|
+
- Updated dependencies
|
|
93
|
+
- @backstage/backend-common@0.13.0
|
|
94
|
+
- @backstage/plugin-scaffolder-common@0.3.0
|
|
95
|
+
- @backstage/catalog-model@0.13.0
|
|
96
|
+
- @backstage/plugin-catalog-common@0.2.2
|
|
97
|
+
- @backstage/plugin-search-common@0.3.1
|
|
98
|
+
- @backstage/catalog-client@0.9.0
|
|
99
|
+
- @backstage/plugin-permission-node@0.5.4
|
|
100
|
+
|
|
3
101
|
## 0.24.0-next.0
|
|
4
102
|
|
|
5
103
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
/// <reference types="node" />
|
|
8
8
|
|
|
9
|
-
import { BitbucketIntegration } from '@backstage/integration';
|
|
10
9
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
11
10
|
import { CatalogEntityDocument as CatalogEntityDocument_2 } from '@backstage/plugin-catalog-common';
|
|
12
11
|
import { CompoundEntityRef } from '@backstage/catalog-model';
|
|
@@ -18,8 +17,6 @@ import { Entity } from '@backstage/catalog-model';
|
|
|
18
17
|
import { EntityPolicy } from '@backstage/catalog-model';
|
|
19
18
|
import express from 'express';
|
|
20
19
|
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
|
21
|
-
import { GithubCredentialsProvider } from '@backstage/integration';
|
|
22
|
-
import { GitHubIntegrationConfig } from '@backstage/integration';
|
|
23
20
|
import { JsonObject } from '@backstage/types';
|
|
24
21
|
import { JsonValue } from '@backstage/types';
|
|
25
22
|
import { Location as Location_2 } from '@backstage/catalog-client';
|
|
@@ -115,47 +112,6 @@ export declare class AnnotateScmSlugEntityProcessor implements CatalogProcessor
|
|
|
115
112
|
preProcessEntity(entity: Entity, location: LocationSpec): Promise<Entity>;
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
/** @public */
|
|
119
|
-
export declare class BitbucketDiscoveryProcessor implements CatalogProcessor {
|
|
120
|
-
private readonly integrations;
|
|
121
|
-
private readonly parser;
|
|
122
|
-
private readonly logger;
|
|
123
|
-
static fromConfig(config: Config, options: {
|
|
124
|
-
parser?: (options: {
|
|
125
|
-
integration: BitbucketIntegration;
|
|
126
|
-
target: string;
|
|
127
|
-
presence?: 'optional' | 'required';
|
|
128
|
-
logger: Logger;
|
|
129
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
130
|
-
logger: Logger;
|
|
131
|
-
}): BitbucketDiscoveryProcessor;
|
|
132
|
-
constructor(options: {
|
|
133
|
-
integrations: ScmIntegrationRegistry;
|
|
134
|
-
parser?: (options: {
|
|
135
|
-
integration: BitbucketIntegration;
|
|
136
|
-
target: string;
|
|
137
|
-
presence?: 'optional' | 'required';
|
|
138
|
-
logger: Logger;
|
|
139
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
140
|
-
logger: Logger;
|
|
141
|
-
});
|
|
142
|
-
getProcessorName(): string;
|
|
143
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
144
|
-
private processCloudRepositories;
|
|
145
|
-
private processOrganisationRepositories;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @public
|
|
150
|
-
* @deprecated type inlined.
|
|
151
|
-
*/
|
|
152
|
-
export declare type BitbucketRepositoryParser = (options: {
|
|
153
|
-
integration: BitbucketIntegration;
|
|
154
|
-
target: string;
|
|
155
|
-
presence?: 'optional' | 'required';
|
|
156
|
-
logger: Logger;
|
|
157
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
158
|
-
|
|
159
115
|
/** @public */
|
|
160
116
|
export declare class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
|
161
117
|
private readonly validators;
|
|
@@ -347,6 +303,7 @@ export declare class CatalogBuilder {
|
|
|
347
303
|
private buildEntityPolicy;
|
|
348
304
|
private buildProcessors;
|
|
349
305
|
private checkDeprecatedReaderProcessors;
|
|
306
|
+
private checkMissingExternalProcessors;
|
|
350
307
|
}
|
|
351
308
|
|
|
352
309
|
/**
|
|
@@ -1030,130 +987,6 @@ export declare class FileReaderProcessor implements CatalogProcessor {
|
|
|
1030
987
|
*/
|
|
1031
988
|
declare function generalError(atLocation: LocationSpec, message: string): CatalogProcessorResult;
|
|
1032
989
|
|
|
1033
|
-
/**
|
|
1034
|
-
* Extracts repositories out of a GitHub org.
|
|
1035
|
-
*
|
|
1036
|
-
* The following will create locations for all projects which have a catalog-info.yaml
|
|
1037
|
-
* on the default branch. The first is shorthand for the second.
|
|
1038
|
-
*
|
|
1039
|
-
* target: "https://github.com/backstage"
|
|
1040
|
-
* or
|
|
1041
|
-
* target: https://github.com/backstage/*\/blob/-/catalog-info.yaml
|
|
1042
|
-
*
|
|
1043
|
-
* You may also explicitly specify the source branch:
|
|
1044
|
-
*
|
|
1045
|
-
* target: https://github.com/backstage/*\/blob/main/catalog-info.yaml
|
|
1046
|
-
*
|
|
1047
|
-
* @public
|
|
1048
|
-
**/
|
|
1049
|
-
export declare class GithubDiscoveryProcessor implements CatalogProcessor {
|
|
1050
|
-
private readonly integrations;
|
|
1051
|
-
private readonly logger;
|
|
1052
|
-
private readonly githubCredentialsProvider;
|
|
1053
|
-
static fromConfig(config: Config, options: {
|
|
1054
|
-
logger: Logger;
|
|
1055
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1056
|
-
}): GithubDiscoveryProcessor;
|
|
1057
|
-
constructor(options: {
|
|
1058
|
-
integrations: ScmIntegrationRegistry;
|
|
1059
|
-
logger: Logger;
|
|
1060
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1061
|
-
});
|
|
1062
|
-
getProcessorName(): string;
|
|
1063
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* The configuration parameters for a multi-org GitHub processor.
|
|
1068
|
-
* @public
|
|
1069
|
-
*/
|
|
1070
|
-
export declare type GithubMultiOrgConfig = Array<{
|
|
1071
|
-
/**
|
|
1072
|
-
* The name of the GitHub org to process.
|
|
1073
|
-
*/
|
|
1074
|
-
name: string;
|
|
1075
|
-
/**
|
|
1076
|
-
* The namespace of the group created for this org.
|
|
1077
|
-
*/
|
|
1078
|
-
groupNamespace: string;
|
|
1079
|
-
/**
|
|
1080
|
-
* The namespace of the users created for this org. If not specified defaults to undefined.
|
|
1081
|
-
*/
|
|
1082
|
-
userNamespace: string | undefined;
|
|
1083
|
-
}>;
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Extracts teams and users out of a multiple GitHub orgs namespaced per org.
|
|
1087
|
-
*
|
|
1088
|
-
* Be aware that this processor may not be compatible with future org structures in the catalog.
|
|
1089
|
-
*
|
|
1090
|
-
* @public
|
|
1091
|
-
*/
|
|
1092
|
-
export declare class GithubMultiOrgReaderProcessor implements CatalogProcessor {
|
|
1093
|
-
private readonly integrations;
|
|
1094
|
-
private readonly orgs;
|
|
1095
|
-
private readonly logger;
|
|
1096
|
-
private readonly githubCredentialsProvider;
|
|
1097
|
-
static fromConfig(config: Config, options: {
|
|
1098
|
-
logger: Logger;
|
|
1099
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1100
|
-
}): GithubMultiOrgReaderProcessor;
|
|
1101
|
-
constructor(options: {
|
|
1102
|
-
integrations: ScmIntegrationRegistry;
|
|
1103
|
-
logger: Logger;
|
|
1104
|
-
orgs: GithubMultiOrgConfig;
|
|
1105
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1106
|
-
});
|
|
1107
|
-
getProcessorName(): string;
|
|
1108
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1109
|
-
private getAllOrgs;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
/** @public */
|
|
1113
|
-
export declare class GitHubOrgEntityProvider implements EntityProvider {
|
|
1114
|
-
private options;
|
|
1115
|
-
private connection?;
|
|
1116
|
-
private githubCredentialsProvider;
|
|
1117
|
-
static fromConfig(config: Config, options: {
|
|
1118
|
-
id: string;
|
|
1119
|
-
orgUrl: string;
|
|
1120
|
-
logger: Logger;
|
|
1121
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1122
|
-
}): GitHubOrgEntityProvider;
|
|
1123
|
-
constructor(options: {
|
|
1124
|
-
id: string;
|
|
1125
|
-
orgUrl: string;
|
|
1126
|
-
gitHubConfig: GitHubIntegrationConfig;
|
|
1127
|
-
logger: Logger;
|
|
1128
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1129
|
-
});
|
|
1130
|
-
getProviderName(): string;
|
|
1131
|
-
connect(connection: EntityProviderConnection): Promise<void>;
|
|
1132
|
-
read(): Promise<void>;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
/**
|
|
1136
|
-
* Extracts teams and users out of a GitHub org.
|
|
1137
|
-
* @public
|
|
1138
|
-
*/
|
|
1139
|
-
export declare class GithubOrgReaderProcessor implements CatalogProcessor {
|
|
1140
|
-
private readonly integrations;
|
|
1141
|
-
private readonly logger;
|
|
1142
|
-
private readonly githubCredentialsProvider;
|
|
1143
|
-
static fromConfig(config: Config, options: {
|
|
1144
|
-
logger: Logger;
|
|
1145
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1146
|
-
}): GithubOrgReaderProcessor;
|
|
1147
|
-
constructor(options: {
|
|
1148
|
-
integrations: ScmIntegrationRegistry;
|
|
1149
|
-
logger: Logger;
|
|
1150
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1151
|
-
});
|
|
1152
|
-
getProcessorName(): string;
|
|
1153
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1154
|
-
private createClient;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
990
|
/**
|
|
1158
991
|
* @public
|
|
1159
992
|
* @deprecated import the processingResult symbol instead and use its fields
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
/// <reference types="node" />
|
|
8
8
|
|
|
9
|
-
import { BitbucketIntegration } from '@backstage/integration';
|
|
10
9
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
11
10
|
import { CatalogEntityDocument as CatalogEntityDocument_2 } from '@backstage/plugin-catalog-common';
|
|
12
11
|
import { CompoundEntityRef } from '@backstage/catalog-model';
|
|
@@ -18,8 +17,6 @@ import { Entity } from '@backstage/catalog-model';
|
|
|
18
17
|
import { EntityPolicy } from '@backstage/catalog-model';
|
|
19
18
|
import express from 'express';
|
|
20
19
|
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
|
21
|
-
import { GithubCredentialsProvider } from '@backstage/integration';
|
|
22
|
-
import { GitHubIntegrationConfig } from '@backstage/integration';
|
|
23
20
|
import { JsonObject } from '@backstage/types';
|
|
24
21
|
import { JsonValue } from '@backstage/types';
|
|
25
22
|
import { Location as Location_2 } from '@backstage/catalog-client';
|
|
@@ -115,47 +112,6 @@ export declare class AnnotateScmSlugEntityProcessor implements CatalogProcessor
|
|
|
115
112
|
preProcessEntity(entity: Entity, location: LocationSpec): Promise<Entity>;
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
/** @public */
|
|
119
|
-
export declare class BitbucketDiscoveryProcessor implements CatalogProcessor {
|
|
120
|
-
private readonly integrations;
|
|
121
|
-
private readonly parser;
|
|
122
|
-
private readonly logger;
|
|
123
|
-
static fromConfig(config: Config, options: {
|
|
124
|
-
parser?: (options: {
|
|
125
|
-
integration: BitbucketIntegration;
|
|
126
|
-
target: string;
|
|
127
|
-
presence?: 'optional' | 'required';
|
|
128
|
-
logger: Logger;
|
|
129
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
130
|
-
logger: Logger;
|
|
131
|
-
}): BitbucketDiscoveryProcessor;
|
|
132
|
-
constructor(options: {
|
|
133
|
-
integrations: ScmIntegrationRegistry;
|
|
134
|
-
parser?: (options: {
|
|
135
|
-
integration: BitbucketIntegration;
|
|
136
|
-
target: string;
|
|
137
|
-
presence?: 'optional' | 'required';
|
|
138
|
-
logger: Logger;
|
|
139
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
140
|
-
logger: Logger;
|
|
141
|
-
});
|
|
142
|
-
getProcessorName(): string;
|
|
143
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
144
|
-
private processCloudRepositories;
|
|
145
|
-
private processOrganisationRepositories;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @public
|
|
150
|
-
* @deprecated type inlined.
|
|
151
|
-
*/
|
|
152
|
-
export declare type BitbucketRepositoryParser = (options: {
|
|
153
|
-
integration: BitbucketIntegration;
|
|
154
|
-
target: string;
|
|
155
|
-
presence?: 'optional' | 'required';
|
|
156
|
-
logger: Logger;
|
|
157
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
158
|
-
|
|
159
115
|
/** @public */
|
|
160
116
|
export declare class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
|
161
117
|
private readonly validators;
|
|
@@ -347,6 +303,7 @@ export declare class CatalogBuilder {
|
|
|
347
303
|
private buildEntityPolicy;
|
|
348
304
|
private buildProcessors;
|
|
349
305
|
private checkDeprecatedReaderProcessors;
|
|
306
|
+
private checkMissingExternalProcessors;
|
|
350
307
|
}
|
|
351
308
|
|
|
352
309
|
/* Excluded from this release type: catalogConditions */
|
|
@@ -988,130 +945,6 @@ export declare class FileReaderProcessor implements CatalogProcessor {
|
|
|
988
945
|
*/
|
|
989
946
|
declare function generalError(atLocation: LocationSpec, message: string): CatalogProcessorResult;
|
|
990
947
|
|
|
991
|
-
/**
|
|
992
|
-
* Extracts repositories out of a GitHub org.
|
|
993
|
-
*
|
|
994
|
-
* The following will create locations for all projects which have a catalog-info.yaml
|
|
995
|
-
* on the default branch. The first is shorthand for the second.
|
|
996
|
-
*
|
|
997
|
-
* target: "https://github.com/backstage"
|
|
998
|
-
* or
|
|
999
|
-
* target: https://github.com/backstage/*\/blob/-/catalog-info.yaml
|
|
1000
|
-
*
|
|
1001
|
-
* You may also explicitly specify the source branch:
|
|
1002
|
-
*
|
|
1003
|
-
* target: https://github.com/backstage/*\/blob/main/catalog-info.yaml
|
|
1004
|
-
*
|
|
1005
|
-
* @public
|
|
1006
|
-
**/
|
|
1007
|
-
export declare class GithubDiscoveryProcessor implements CatalogProcessor {
|
|
1008
|
-
private readonly integrations;
|
|
1009
|
-
private readonly logger;
|
|
1010
|
-
private readonly githubCredentialsProvider;
|
|
1011
|
-
static fromConfig(config: Config, options: {
|
|
1012
|
-
logger: Logger;
|
|
1013
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1014
|
-
}): GithubDiscoveryProcessor;
|
|
1015
|
-
constructor(options: {
|
|
1016
|
-
integrations: ScmIntegrationRegistry;
|
|
1017
|
-
logger: Logger;
|
|
1018
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1019
|
-
});
|
|
1020
|
-
getProcessorName(): string;
|
|
1021
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
/**
|
|
1025
|
-
* The configuration parameters for a multi-org GitHub processor.
|
|
1026
|
-
* @public
|
|
1027
|
-
*/
|
|
1028
|
-
export declare type GithubMultiOrgConfig = Array<{
|
|
1029
|
-
/**
|
|
1030
|
-
* The name of the GitHub org to process.
|
|
1031
|
-
*/
|
|
1032
|
-
name: string;
|
|
1033
|
-
/**
|
|
1034
|
-
* The namespace of the group created for this org.
|
|
1035
|
-
*/
|
|
1036
|
-
groupNamespace: string;
|
|
1037
|
-
/**
|
|
1038
|
-
* The namespace of the users created for this org. If not specified defaults to undefined.
|
|
1039
|
-
*/
|
|
1040
|
-
userNamespace: string | undefined;
|
|
1041
|
-
}>;
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* Extracts teams and users out of a multiple GitHub orgs namespaced per org.
|
|
1045
|
-
*
|
|
1046
|
-
* Be aware that this processor may not be compatible with future org structures in the catalog.
|
|
1047
|
-
*
|
|
1048
|
-
* @public
|
|
1049
|
-
*/
|
|
1050
|
-
export declare class GithubMultiOrgReaderProcessor implements CatalogProcessor {
|
|
1051
|
-
private readonly integrations;
|
|
1052
|
-
private readonly orgs;
|
|
1053
|
-
private readonly logger;
|
|
1054
|
-
private readonly githubCredentialsProvider;
|
|
1055
|
-
static fromConfig(config: Config, options: {
|
|
1056
|
-
logger: Logger;
|
|
1057
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1058
|
-
}): GithubMultiOrgReaderProcessor;
|
|
1059
|
-
constructor(options: {
|
|
1060
|
-
integrations: ScmIntegrationRegistry;
|
|
1061
|
-
logger: Logger;
|
|
1062
|
-
orgs: GithubMultiOrgConfig;
|
|
1063
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1064
|
-
});
|
|
1065
|
-
getProcessorName(): string;
|
|
1066
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1067
|
-
private getAllOrgs;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
/** @public */
|
|
1071
|
-
export declare class GitHubOrgEntityProvider implements EntityProvider {
|
|
1072
|
-
private options;
|
|
1073
|
-
private connection?;
|
|
1074
|
-
private githubCredentialsProvider;
|
|
1075
|
-
static fromConfig(config: Config, options: {
|
|
1076
|
-
id: string;
|
|
1077
|
-
orgUrl: string;
|
|
1078
|
-
logger: Logger;
|
|
1079
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1080
|
-
}): GitHubOrgEntityProvider;
|
|
1081
|
-
constructor(options: {
|
|
1082
|
-
id: string;
|
|
1083
|
-
orgUrl: string;
|
|
1084
|
-
gitHubConfig: GitHubIntegrationConfig;
|
|
1085
|
-
logger: Logger;
|
|
1086
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1087
|
-
});
|
|
1088
|
-
getProviderName(): string;
|
|
1089
|
-
connect(connection: EntityProviderConnection): Promise<void>;
|
|
1090
|
-
read(): Promise<void>;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* Extracts teams and users out of a GitHub org.
|
|
1095
|
-
* @public
|
|
1096
|
-
*/
|
|
1097
|
-
export declare class GithubOrgReaderProcessor implements CatalogProcessor {
|
|
1098
|
-
private readonly integrations;
|
|
1099
|
-
private readonly logger;
|
|
1100
|
-
private readonly githubCredentialsProvider;
|
|
1101
|
-
static fromConfig(config: Config, options: {
|
|
1102
|
-
logger: Logger;
|
|
1103
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1104
|
-
}): GithubOrgReaderProcessor;
|
|
1105
|
-
constructor(options: {
|
|
1106
|
-
integrations: ScmIntegrationRegistry;
|
|
1107
|
-
logger: Logger;
|
|
1108
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1109
|
-
});
|
|
1110
|
-
getProcessorName(): string;
|
|
1111
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1112
|
-
private createClient;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
948
|
/**
|
|
1116
949
|
* @public
|
|
1117
950
|
* @deprecated import the processingResult symbol instead and use its fields
|