@backstage/plugin-catalog-backend 0.23.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 +158 -0
- package/alpha/package.json +2 -2
- package/dist/index.alpha.d.ts +9 -254
- package/dist/index.beta.d.ts +9 -230
- package/dist/index.cjs.js +44 -1161
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -230
- package/migrations/20200702153613_entities.js +2 -2
- package/migrations/20200807120600_entitySearch.js +2 -2
- package/migrations/20201005122705_add_entity_full_name.js +1 -1
- package/migrations/20201006130744_entity_data_column.js +1 -1
- package/migrations/20201123205611_relations_table_uniq.js +2 -2
- package/migrations/20201210185851_fk_index.js +2 -2
- package/migrations/20201230103504_update_log_varchar.js +2 -2
- package/migrations/20210209121210_locations_fk_index.js +2 -2
- package/package.json +13 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,163 @@
|
|
|
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
|
+
|
|
101
|
+
## 0.24.0-next.0
|
|
102
|
+
|
|
103
|
+
### Minor Changes
|
|
104
|
+
|
|
105
|
+
- 66ba5d9023: **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.
|
|
106
|
+
|
|
107
|
+
```diff
|
|
108
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
109
|
+
+import { GitLabDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-gitlab';
|
|
110
|
+
|
|
111
|
+
export default async function createPlugin(
|
|
112
|
+
env: PluginEnvironment,
|
|
113
|
+
): Promise<Router> {
|
|
114
|
+
const builder = await CatalogBuilder.create(env);
|
|
115
|
+
+ builder.addProcessor(
|
|
116
|
+
+ GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
117
|
+
+ );
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**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.
|
|
121
|
+
|
|
122
|
+
- f115a7f8fd: **BREAKING**: Removed `AwsS3DiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-aws`.
|
|
123
|
+
- 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)
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- ab7cd7d70e: Do some groundwork for supporting the `better-sqlite3` driver, to maybe eventually replace `@vscode/sqlite3` (#9912)
|
|
128
|
+
- e0a69ba49f: build(deps): bump `fs-extra` from 9.1.0 to 10.0.1
|
|
129
|
+
- 616f02ade2: support Bitbucket Cloud's code search to discover catalog files (multiple per repo, Location entities for existing files only)
|
|
130
|
+
- e421d77536: **BREAKING**:
|
|
131
|
+
|
|
132
|
+
- 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.
|
|
133
|
+
- Removed the previously deprecated `CatalogProcessorLocationResult.optional` field. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
134
|
+
- 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.
|
|
135
|
+
- Removed the previously deprecated `StaticLocationProcessor`. It has not been in use for some time; its functionality is covered by `ConfigLocationEntityProvider` instead.
|
|
136
|
+
|
|
137
|
+
- 3c2bc73901: Use `setupRequestMockHandlers` from `@backstage/backend-test-utils`
|
|
138
|
+
- c1168bb440: Fixed display of the location in the log message that is printed when entity envelope validation fails.
|
|
139
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
140
|
+
- 3e54f6c436: Use `@backstage/plugin-search-common` package instead of `@backstage/search-common`.
|
|
141
|
+
- Updated dependencies
|
|
142
|
+
- @backstage/backend-common@0.13.0-next.0
|
|
143
|
+
- @backstage/plugin-scaffolder-common@0.3.0-next.0
|
|
144
|
+
- @backstage/catalog-model@0.13.0-next.0
|
|
145
|
+
- @backstage/plugin-catalog-common@0.2.2-next.0
|
|
146
|
+
- @backstage/plugin-search-common@0.3.1-next.0
|
|
147
|
+
- @backstage/catalog-client@0.9.0-next.0
|
|
148
|
+
- @backstage/plugin-permission-node@0.5.4-next.0
|
|
149
|
+
|
|
150
|
+
## 0.23.1
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- Marked `GithubMultiOrgReaderProcessor` as stable, as it was moved to `/alpha` by mistake.
|
|
155
|
+
- Fixed runtime resolution of the `/alpha` entry point.
|
|
156
|
+
- Updated dependencies
|
|
157
|
+
- @backstage/backend-common@0.12.1
|
|
158
|
+
- @backstage/catalog-model@0.12.1
|
|
159
|
+
- @backstage/plugin-catalog-common@0.2.1
|
|
160
|
+
|
|
3
161
|
## 0.23.0
|
|
4
162
|
|
|
5
163
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -6,20 +6,17 @@
|
|
|
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';
|
|
13
12
|
import { ConditionalPolicyDecision } from '@backstage/plugin-permission-node';
|
|
14
13
|
import { Conditions } from '@backstage/plugin-permission-node';
|
|
15
14
|
import { Config } from '@backstage/config';
|
|
16
|
-
import { DocumentCollatorFactory } from '@backstage/search-common';
|
|
15
|
+
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
|
17
16
|
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';
|
|
@@ -77,7 +74,7 @@ export declare type AnalyzeLocationExistingEntity = {
|
|
|
77
74
|
* enough info for the frontend to know what form data to show to the user
|
|
78
75
|
* for overriding/completing the info.
|
|
79
76
|
* @public
|
|
80
|
-
|
|
77
|
+
*/
|
|
81
78
|
export declare type AnalyzeLocationGenerateEntity = {
|
|
82
79
|
entity: RecursivePartial<Entity>;
|
|
83
80
|
fields: AnalyzeLocationEntityField[];
|
|
@@ -115,83 +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 AwsS3DiscoveryProcessor implements CatalogProcessor {
|
|
120
|
-
private readonly reader;
|
|
121
|
-
constructor(reader: UrlReader);
|
|
122
|
-
getProcessorName(): string;
|
|
123
|
-
readLocation(location: LocationSpec, optional: boolean, emit: CatalogProcessorEmit, parser: CatalogProcessorParser): Promise<boolean>;
|
|
124
|
-
private doRead;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Extracts repositories out of an Azure DevOps org.
|
|
129
|
-
*
|
|
130
|
-
* The following will create locations for all projects which have a catalog-info.yaml
|
|
131
|
-
* on the default branch. The first is shorthand for the second.
|
|
132
|
-
*
|
|
133
|
-
* target: "https://dev.azure.com/org/project"
|
|
134
|
-
* or
|
|
135
|
-
* target: https://dev.azure.com/org/project?path=/catalog-info.yaml
|
|
136
|
-
*
|
|
137
|
-
* You may also explicitly specify a single repo:
|
|
138
|
-
*
|
|
139
|
-
* target: https://dev.azure.com/org/project/_git/repo
|
|
140
|
-
*
|
|
141
|
-
* @public
|
|
142
|
-
**/
|
|
143
|
-
export declare class AzureDevOpsDiscoveryProcessor implements CatalogProcessor {
|
|
144
|
-
private readonly integrations;
|
|
145
|
-
private readonly logger;
|
|
146
|
-
static fromConfig(config: Config, options: {
|
|
147
|
-
logger: Logger;
|
|
148
|
-
}): AzureDevOpsDiscoveryProcessor;
|
|
149
|
-
constructor(options: {
|
|
150
|
-
integrations: ScmIntegrationRegistry;
|
|
151
|
-
logger: Logger;
|
|
152
|
-
});
|
|
153
|
-
getProcessorName(): string;
|
|
154
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/** @public */
|
|
158
|
-
export declare class BitbucketDiscoveryProcessor implements CatalogProcessor {
|
|
159
|
-
private readonly integrations;
|
|
160
|
-
private readonly parser;
|
|
161
|
-
private readonly logger;
|
|
162
|
-
static fromConfig(config: Config, options: {
|
|
163
|
-
parser?: (options: {
|
|
164
|
-
integration: BitbucketIntegration;
|
|
165
|
-
target: string;
|
|
166
|
-
logger: Logger;
|
|
167
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
168
|
-
logger: Logger;
|
|
169
|
-
}): BitbucketDiscoveryProcessor;
|
|
170
|
-
constructor(options: {
|
|
171
|
-
integrations: ScmIntegrationRegistry;
|
|
172
|
-
parser?: (options: {
|
|
173
|
-
integration: BitbucketIntegration;
|
|
174
|
-
target: string;
|
|
175
|
-
logger: Logger;
|
|
176
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
177
|
-
logger: Logger;
|
|
178
|
-
});
|
|
179
|
-
getProcessorName(): string;
|
|
180
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
181
|
-
private processCloudRepositories;
|
|
182
|
-
private processOrganisationRepositories;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @public
|
|
187
|
-
* @deprecated type inlined.
|
|
188
|
-
*/
|
|
189
|
-
export declare type BitbucketRepositoryParser = (options: {
|
|
190
|
-
integration: BitbucketIntegration;
|
|
191
|
-
target: string;
|
|
192
|
-
logger: Logger;
|
|
193
|
-
}) => AsyncIterable<CatalogProcessorResult>;
|
|
194
|
-
|
|
195
115
|
/** @public */
|
|
196
116
|
export declare class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
|
197
117
|
private readonly validators;
|
|
@@ -383,6 +303,7 @@ export declare class CatalogBuilder {
|
|
|
383
303
|
private buildEntityPolicy;
|
|
384
304
|
private buildProcessors;
|
|
385
305
|
private checkDeprecatedReaderProcessors;
|
|
306
|
+
private checkMissingExternalProcessors;
|
|
386
307
|
}
|
|
387
308
|
|
|
388
309
|
/**
|
|
@@ -424,7 +345,7 @@ export declare interface CatalogProcessingEngine {
|
|
|
424
345
|
/**
|
|
425
346
|
* Responsible for executing the individual processing steps in order to fully process an entity.
|
|
426
347
|
* @public
|
|
427
|
-
|
|
348
|
+
*/
|
|
428
349
|
export declare interface CatalogProcessingOrchestrator {
|
|
429
350
|
process(request: EntityProcessingRequest): Promise<EntityProcessingResult>;
|
|
430
351
|
}
|
|
@@ -539,8 +460,6 @@ export declare type CatalogProcessorErrorResult = {
|
|
|
539
460
|
export declare type CatalogProcessorLocationResult = {
|
|
540
461
|
type: 'location';
|
|
541
462
|
location: LocationSpec;
|
|
542
|
-
/** @deprecated Set `location.presence = 'optional'` instead */
|
|
543
|
-
optional?: boolean;
|
|
544
463
|
};
|
|
545
464
|
|
|
546
465
|
/**
|
|
@@ -818,7 +737,7 @@ export declare class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer
|
|
|
818
737
|
/**
|
|
819
738
|
* Entities that are not yet processed.
|
|
820
739
|
* @public
|
|
821
|
-
|
|
740
|
+
*/
|
|
822
741
|
export declare type DeferredEntity = {
|
|
823
742
|
entity: Entity;
|
|
824
743
|
locationKey?: string;
|
|
@@ -1068,146 +987,6 @@ export declare class FileReaderProcessor implements CatalogProcessor {
|
|
|
1068
987
|
*/
|
|
1069
988
|
declare function generalError(atLocation: LocationSpec, message: string): CatalogProcessorResult;
|
|
1070
989
|
|
|
1071
|
-
/**
|
|
1072
|
-
* Extracts repositories out of a GitHub org.
|
|
1073
|
-
*
|
|
1074
|
-
* The following will create locations for all projects which have a catalog-info.yaml
|
|
1075
|
-
* on the default branch. The first is shorthand for the second.
|
|
1076
|
-
*
|
|
1077
|
-
* target: "https://github.com/backstage"
|
|
1078
|
-
* or
|
|
1079
|
-
* target: https://github.com/backstage/*\/blob/-/catalog-info.yaml
|
|
1080
|
-
*
|
|
1081
|
-
* You may also explicitly specify the source branch:
|
|
1082
|
-
*
|
|
1083
|
-
* target: https://github.com/backstage/*\/blob/main/catalog-info.yaml
|
|
1084
|
-
*
|
|
1085
|
-
* @public
|
|
1086
|
-
**/
|
|
1087
|
-
export declare class GithubDiscoveryProcessor implements CatalogProcessor {
|
|
1088
|
-
private readonly integrations;
|
|
1089
|
-
private readonly logger;
|
|
1090
|
-
private readonly githubCredentialsProvider;
|
|
1091
|
-
static fromConfig(config: Config, options: {
|
|
1092
|
-
logger: Logger;
|
|
1093
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1094
|
-
}): GithubDiscoveryProcessor;
|
|
1095
|
-
constructor(options: {
|
|
1096
|
-
integrations: ScmIntegrationRegistry;
|
|
1097
|
-
logger: Logger;
|
|
1098
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1099
|
-
});
|
|
1100
|
-
getProcessorName(): string;
|
|
1101
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
/**
|
|
1105
|
-
* The configuration parameters for a multi-org GitHub processor.
|
|
1106
|
-
* @public
|
|
1107
|
-
*/
|
|
1108
|
-
export declare type GithubMultiOrgConfig = Array<{
|
|
1109
|
-
/**
|
|
1110
|
-
* The name of the GitHub org to process.
|
|
1111
|
-
*/
|
|
1112
|
-
name: string;
|
|
1113
|
-
/**
|
|
1114
|
-
* The namespace of the group created for this org.
|
|
1115
|
-
*/
|
|
1116
|
-
groupNamespace: string;
|
|
1117
|
-
/**
|
|
1118
|
-
* The namespace of the users created for this org. If not specified defaults to undefined.
|
|
1119
|
-
*/
|
|
1120
|
-
userNamespace: string | undefined;
|
|
1121
|
-
}>;
|
|
1122
|
-
|
|
1123
|
-
/**
|
|
1124
|
-
* @alpha
|
|
1125
|
-
* Extracts teams and users out of a multiple GitHub orgs namespaced per org.
|
|
1126
|
-
*
|
|
1127
|
-
* Be aware that this processor may not be compatible with future org structures in the catalog.
|
|
1128
|
-
*/
|
|
1129
|
-
export declare class GithubMultiOrgReaderProcessor implements CatalogProcessor {
|
|
1130
|
-
private readonly integrations;
|
|
1131
|
-
private readonly orgs;
|
|
1132
|
-
private readonly logger;
|
|
1133
|
-
private readonly githubCredentialsProvider;
|
|
1134
|
-
static fromConfig(config: Config, options: {
|
|
1135
|
-
logger: Logger;
|
|
1136
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1137
|
-
}): GithubMultiOrgReaderProcessor;
|
|
1138
|
-
constructor(options: {
|
|
1139
|
-
integrations: ScmIntegrationRegistry;
|
|
1140
|
-
logger: Logger;
|
|
1141
|
-
orgs: GithubMultiOrgConfig;
|
|
1142
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1143
|
-
});
|
|
1144
|
-
getProcessorName(): string;
|
|
1145
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1146
|
-
private getAllOrgs;
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
/** @public */
|
|
1150
|
-
export declare class GitHubOrgEntityProvider implements EntityProvider {
|
|
1151
|
-
private options;
|
|
1152
|
-
private connection?;
|
|
1153
|
-
private githubCredentialsProvider;
|
|
1154
|
-
static fromConfig(config: Config, options: {
|
|
1155
|
-
id: string;
|
|
1156
|
-
orgUrl: string;
|
|
1157
|
-
logger: Logger;
|
|
1158
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1159
|
-
}): GitHubOrgEntityProvider;
|
|
1160
|
-
constructor(options: {
|
|
1161
|
-
id: string;
|
|
1162
|
-
orgUrl: string;
|
|
1163
|
-
gitHubConfig: GitHubIntegrationConfig;
|
|
1164
|
-
logger: Logger;
|
|
1165
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1166
|
-
});
|
|
1167
|
-
getProviderName(): string;
|
|
1168
|
-
connect(connection: EntityProviderConnection): Promise<void>;
|
|
1169
|
-
read(): Promise<void>;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* Extracts teams and users out of a GitHub org.
|
|
1174
|
-
* @public
|
|
1175
|
-
*/
|
|
1176
|
-
export declare class GithubOrgReaderProcessor implements CatalogProcessor {
|
|
1177
|
-
private readonly integrations;
|
|
1178
|
-
private readonly logger;
|
|
1179
|
-
private readonly githubCredentialsProvider;
|
|
1180
|
-
static fromConfig(config: Config, options: {
|
|
1181
|
-
logger: Logger;
|
|
1182
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1183
|
-
}): GithubOrgReaderProcessor;
|
|
1184
|
-
constructor(options: {
|
|
1185
|
-
integrations: ScmIntegrationRegistry;
|
|
1186
|
-
logger: Logger;
|
|
1187
|
-
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
1188
|
-
});
|
|
1189
|
-
getProcessorName(): string;
|
|
1190
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1191
|
-
private createClient;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
/**
|
|
1195
|
-
* Extracts repositories out of an GitLab instance.
|
|
1196
|
-
* @public
|
|
1197
|
-
*/
|
|
1198
|
-
export declare class GitLabDiscoveryProcessor implements CatalogProcessor {
|
|
1199
|
-
private readonly integrations;
|
|
1200
|
-
private readonly logger;
|
|
1201
|
-
private readonly cache;
|
|
1202
|
-
static fromConfig(config: Config, options: {
|
|
1203
|
-
logger: Logger;
|
|
1204
|
-
}): GitLabDiscoveryProcessor;
|
|
1205
|
-
private constructor();
|
|
1206
|
-
getProcessorName(): string;
|
|
1207
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1208
|
-
private updateLastActivity;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
990
|
/**
|
|
1212
991
|
* @public
|
|
1213
992
|
* @deprecated import the processingResult symbol instead and use its fields
|
|
@@ -1218,7 +997,7 @@ declare function inputError(atLocation: LocationSpec, message: string): CatalogP
|
|
|
1218
997
|
* @public
|
|
1219
998
|
* @deprecated import the processingResult symbol instead and use its fields
|
|
1220
999
|
*/
|
|
1221
|
-
declare function location_2(newLocation: LocationSpec,
|
|
1000
|
+
declare function location_2(newLocation: LocationSpec, _optional?: boolean): CatalogProcessorResult;
|
|
1222
1001
|
|
|
1223
1002
|
/** @public */
|
|
1224
1003
|
export declare type LocationAnalyzer = {
|
|
@@ -1298,7 +1077,8 @@ export declare type LocationSpec = {
|
|
|
1298
1077
|
|
|
1299
1078
|
/**
|
|
1300
1079
|
* Interacts with the database to manage locations.
|
|
1301
|
-
* @public
|
|
1080
|
+
* @public
|
|
1081
|
+
*/
|
|
1302
1082
|
export declare interface LocationStore {
|
|
1303
1083
|
createLocation(location: LocationInput): Promise<Location_2>;
|
|
1304
1084
|
listLocations(): Promise<Location_2[]>;
|
|
@@ -1390,7 +1170,7 @@ export declare const processingResult: Readonly<{
|
|
|
1390
1170
|
readonly notFoundError: (atLocation: LocationSpec, message: string) => CatalogProcessorResult;
|
|
1391
1171
|
readonly inputError: (atLocation: LocationSpec, message: string) => CatalogProcessorResult;
|
|
1392
1172
|
readonly generalError: (atLocation: LocationSpec, message: string) => CatalogProcessorResult;
|
|
1393
|
-
readonly location: (newLocation: LocationSpec
|
|
1173
|
+
readonly location: (newLocation: LocationSpec) => CatalogProcessorResult;
|
|
1394
1174
|
readonly entity: (atLocation: LocationSpec, newEntity: Entity) => CatalogProcessorResult;
|
|
1395
1175
|
readonly relation: (spec: EntityRelationSpec) => CatalogProcessorResult;
|
|
1396
1176
|
}>;
|
|
@@ -1466,31 +1246,6 @@ export declare interface RouterOptions {
|
|
|
1466
1246
|
permissionIntegrationRouter?: express.Router;
|
|
1467
1247
|
}
|
|
1468
1248
|
|
|
1469
|
-
/**
|
|
1470
|
-
* Runs a function repeatedly, with a fixed wait between invocations.
|
|
1471
|
-
*
|
|
1472
|
-
* Supports async functions, and silently ignores exceptions and rejections.
|
|
1473
|
-
*
|
|
1474
|
-
* @param fn - The function to run. May return a Promise.
|
|
1475
|
-
* @param delayMs - The delay between a completed function invocation and the
|
|
1476
|
-
* next.
|
|
1477
|
-
* @returns A function that, when called, stops the invocation loop.
|
|
1478
|
-
* @deprecated use \@backstage/backend-tasks package instead.
|
|
1479
|
-
* @public
|
|
1480
|
-
*/
|
|
1481
|
-
export declare function runPeriodically(fn: () => any, delayMs: number): () => void;
|
|
1482
|
-
|
|
1483
|
-
/**
|
|
1484
|
-
* @deprecated no longer in use, replaced by the ConfigLocationEntityProvider.
|
|
1485
|
-
* @public
|
|
1486
|
-
*/
|
|
1487
|
-
export declare class StaticLocationProcessor implements StaticLocationProcessor {
|
|
1488
|
-
private readonly staticLocations;
|
|
1489
|
-
static fromConfig(config: Config): StaticLocationProcessor;
|
|
1490
|
-
constructor(staticLocations: LocationSpec[]);
|
|
1491
|
-
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
1249
|
/** @public */
|
|
1495
1250
|
export declare class UrlReaderProcessor implements CatalogProcessor {
|
|
1496
1251
|
private readonly options;
|