fix: inline config interfaces

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
This commit is contained in:
Patrick Jungermann
2022-05-17 23:53:08 +02:00
parent 3954116130
commit eb2544b21b
5 changed files with 78 additions and 44 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-cost-insights': patch
---
Add missing `export` in configuration schema.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-backend-module-aws': patch
'@backstage/plugin-catalog-backend-module-gerrit': patch
---
Inline config interfaces
+44 -22
View File
@@ -14,27 +14,6 @@
* limitations under the License.
*/
interface AwsS3Config {
/**
* (Required) AWS S3 Bucket Name
* @visibility backend
*/
bucketName: string;
/**
* (Optional) AWS S3 Object key prefix
* If not set, all keys will be accepted, no filtering will be applied.
* @visibility backend
*/
prefix?: string;
/**
* (Optional) AWS Region.
* If not set, AWS_REGION environment variable or aws config file will be used.
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html
* @visibility backend
*/
region?: string;
}
export interface Config {
catalog?: {
/**
@@ -62,7 +41,50 @@ export interface Config {
*
* Uses "default" as default id for the single config variant.
*/
awsS3?: AwsS3Config | Record<string, AwsS3Config>;
awsS3?:
| {
/**
* (Required) AWS S3 Bucket Name
* @visibility backend
*/
bucketName: string;
/**
* (Optional) AWS S3 Object key prefix
* If not set, all keys will be accepted, no filtering will be applied.
* @visibility backend
*/
prefix?: string;
/**
* (Optional) AWS Region.
* If not set, AWS_REGION environment variable or aws config file will be used.
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html
* @visibility backend
*/
region?: string;
}
| Record<
string,
{
/**
* (Required) AWS S3 Bucket Name
* @visibility backend
*/
bucketName: string;
/**
* (Optional) AWS S3 Object key prefix
* If not set, all keys will be accepted, no filtering will be applied.
* @visibility backend
*/
prefix?: string;
/**
* (Optional) AWS Region.
* If not set, AWS_REGION environment variable or aws config file will be used.
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html
* @visibility backend
*/
region?: string;
}
>;
};
};
}
+22 -21
View File
@@ -14,26 +14,6 @@
* limitations under the License.
*/
interface GerritConfig {
/**
* (Required) The host of the Gerrit integration to use.
* @visibility backend
*/
host: string;
/**
* (Required) The query to use for the "List Projects" API call. Used to limit the
* scope of the projects that the provider tries to ingest.
* @visibility backend
*/
query: string;
/**
* (Optional) Branch.
* The branch where the provider will try to find entities. Defaults to "master".
* @visibility backend
*/
branch?: string;
}
export interface Config {
catalog?: {
/**
@@ -45,7 +25,28 @@ export interface Config {
*
* Maps provider id with configuration.
*/
gerrit?: Record<string, GerritConfig>;
gerrit?: Record<
string,
{
/**
* (Required) The host of the Gerrit integration to use.
* @visibility backend
*/
host: string;
/**
* (Required) The query to use for the "List Projects" API call. Used to limit the
* scope of the projects that the provider tries to ingest.
* @visibility backend
*/
query: string;
/**
* (Optional) Branch.
* The branch where the provider will try to find entities. Defaults to "master".
* @visibility backend
*/
branch?: string;
}
>;
};
};
}
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
interface Config {
export interface Config {
costInsights: {
/**
* @visibility frontend