plugins: add config schema needed by frontend plugins

This commit is contained in:
Patrik Oldsberg
2020-11-15 21:30:49 +01:00
parent f6ed7d5d0d
commit feb9905a37
8 changed files with 145 additions and 41 deletions
+1 -34
View File
@@ -66,38 +66,5 @@
"files": [
"dist",
"migrations"
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/plugin-auth-backend",
"type": "object",
"properties": {
"auth": {
"type": "object",
"properties": {
"providers": {
"type": "object",
"properties": {
"google": {
"type": "object",
"visibility": "frontend",
"additionalProperties": {
"type": "object",
"properties": {
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "string",
"visibility": "secret"
}
}
}
}
}
}
}
}
}
}
]
}
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright 2020 Spotify AB
*
* 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.
*/
interface Config {
costInsights: {
/**
* @visibility frontend
*/
engineerCost: number;
products: {
[kind: string]: {
/**
* @visibility frontend
*/
name: string;
/**
* @visibility frontend
*/
icon: 'compute' | 'data' | 'database' | 'storage' | 'search' | 'ml';
};
};
metrics?: {
[kind: string]: {
/**
* @visibility frontend
*/
name: string;
/**
* @visibility frontend
*/
default?: boolean;
};
};
};
}
+4 -2
View File
@@ -61,6 +61,8 @@
"msw": "^0.21.2"
},
"files": [
"dist"
]
"dist",
"config.d.ts"
],
"configSchema": "config.d.ts"
}
+17 -1
View File
@@ -52,5 +52,21 @@
},
"files": [
"dist"
]
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/lighthouse",
"type": "object",
"properties": {
"lighthouse": {
"type": "object",
"properties": {
"baseUrl": {
"type": "string",
"visibility": "frontend"
}
}
}
}
}
}
+17 -1
View File
@@ -52,5 +52,21 @@
},
"files": [
"dist"
]
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/rollbar",
"type": "object",
"properties": {
"rollbar": {
"type": "object",
"properties": {
"organization": {
"type": "string",
"visibility": "frontend"
}
}
}
}
}
}
+17 -1
View File
@@ -49,5 +49,21 @@
},
"files": [
"dist"
]
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/sentry",
"type": "object",
"properties": {
"sentry": {
"type": "object",
"properties": {
"organization": {
"type": "string",
"visibility": "frontend"
}
}
}
}
}
}
+17 -1
View File
@@ -53,5 +53,21 @@
},
"files": [
"dist"
]
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/techdocs",
"type": "object",
"properties": {
"techdocs": {
"type": "object",
"properties": {
"requestUrl": {
"type": "string",
"visibility": "frontend"
}
}
}
}
}
}
+20 -1
View File
@@ -45,5 +45,24 @@
},
"files": [
"dist"
]
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/user-settings",
"type": "object",
"properties": {
"auth": {
"type": "object",
"properties": {
"providers": {
"type": "object",
"additionalProperties": {
"type": "object",
"visibility": "frontend"
}
}
}
}
}
}
}