Merge branch 'master' of github.com:Nek/backstage

This commit is contained in:
Ivan Shmidt
2020-05-18 17:19:45 +02:00
134 changed files with 2539 additions and 2758 deletions
+3
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-auth-backend",
"version": "0.1.1-alpha.5",
"main": "dist",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"scripts": {
@@ -9,6 +10,8 @@
"build": "tsc",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean"
},
"dependencies": {
+1 -1
View File
@@ -28,7 +28,7 @@ export async function createRouter(
const logger = options.logger.child({ plugin: 'auth' });
const router = Router();
router.get('/ping', async (req, res) => {
router.get('/ping', async (_req, res) => {
res.status(200).send('pong');
});
+3
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-catalog-backend",
"version": "0.1.1-alpha.5",
"main": "dist",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"scripts": {
@@ -9,6 +10,8 @@
"build": "tsc",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean"
},
"dependencies": {
@@ -36,7 +36,7 @@ export async function createRouter(
if (itemsCatalog) {
// Components
router
.get('/components', async (req, res) => {
.get('/components', async (_req, res) => {
const components = await itemsCatalog.components();
res.status(200).send(components);
})
@@ -55,7 +55,7 @@ export async function createRouter(
const output = await locationsCatalog.addLocation(input);
res.status(201).send(output);
})
.get('/locations', async (req, res) => {
.get('/locations', async (_req, res) => {
const output = await locationsCatalog.locations();
res.status(200).send(output);
})
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-catalog",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -29,9 +30,9 @@
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@backstage/test-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
-3
View File
@@ -1,6 +1,3 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint')],
rules: {
'no-use-before-define': ['error', { variables: false }],
},
};
@@ -22,8 +22,9 @@ import { makeStyles } from '@material-ui/core/styles';
import { PluginHeader } from '../../components/PluginHeader';
import { ActionOutput } from './lib/ActionOutput/ActionOutput';
import { Layout } from '../../components/Layout';
import { useBuildWithSteps, useSettings } from '../../state';
import LaunchIcon from '@material-ui/icons/Launch';
import { useSettings } from '../../state/useSettings';
import { useBuildWithSteps } from '../../state/useBuildWithSteps';
const IconLink = IconButton as typeof Link;
const BuildName: FC<{ build?: BuildWithSteps }> = ({ build }) => (
-3
View File
@@ -14,6 +14,3 @@
* limitations under the License.
*/
export * from './AppState';
export * from './useBuildWithSteps';
export * from './useBuilds';
export * from './useSettings';
@@ -33,5 +33,5 @@ export const useAsyncPolling = (
const stopPolling = () => {
isPolling.current = false;
};
return { isPolling, startPolling, stopPolling };
return { startPolling, stopPolling };
};
@@ -44,6 +44,11 @@ export function useBuildWithSteps(buildId: number) {
}
}, [token, owner, repo, buildId]);
const { startPolling, stopPolling } = useAsyncPolling(
getBuildWithSteps,
INTERVAL_AMOUNT,
);
const restartBuild = async () => {
try {
await api.retry(buildId, {
+5
View File
@@ -103,6 +103,11 @@ export function useBuilds() {
[repo, token, owner],
);
const { startPolling, stopPolling } = useAsyncPolling(
getBuilds,
INTERVAL_AMOUNT,
);
const restartBuild = async (buildId: number) => {
try {
await api.retry(buildId, {
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-explore",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -30,9 +31,9 @@
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@backstage/test-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+4 -2
View File
@@ -17,6 +17,7 @@
],
"license": "Apache-2.0",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"build": "backstage-cli plugin:build",
@@ -44,9 +45,10 @@
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@backstage/test-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/codemirror": "^0.0.93",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
@@ -22,7 +22,7 @@ import { ApiProvider, ApiRegistry } from '@backstage/core';
import { renderWithEffects } from '@backstage/test-utils';
import { GraphQLBrowseApi, graphQlBrowseApiRef } from '../../lib/api';
jest.mock('components/GraphiQLBrowser', () => ({
jest.mock('../GraphiQLBrowser', () => ({
GraphiQLBrowser: () => '<GraphiQLBrowser />',
}));
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-home-page",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -28,9 +29,9 @@
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,4 +14,4 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-lighthouse",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -31,9 +32,9 @@
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@backstage/test-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-register-component",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -29,9 +30,9 @@
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-scaffolder",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -28,9 +29,9 @@
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-tech-radar",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
@@ -32,9 +33,9 @@
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/color": "^3.0.1",
"@types/d3-force": "^1.2.1",
"@types/jest": "^25.2.1",
+1 -1
View File
@@ -14,5 +14,5 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
require('jest-fetch-mock').enableMocks();
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}
+3 -2
View File
@@ -2,6 +2,7 @@
"name": "@backstage/plugin-welcome",
"version": "0.1.1-alpha.5",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"types": "src/index.ts",
"private": true,
"license": "Apache-2.0",
@@ -29,9 +30,9 @@
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.5",
"@backstage/dev-utils": "^0.1.1-alpha.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@testing-library/user-event": "^10.2.4",
"@types/jest": "^25.2.1",
"@types/node": "^12.0.0",
"@types/testing-library__jest-dom": "^5.0.4",
+1 -1
View File
@@ -14,4 +14,4 @@
* limitations under the License.
*/
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
-5
View File
@@ -1,5 +0,0 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {}
}