This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from liatrio/feat/autogov-commons-component
feat: autogov commons component
- Loading branch information
Showing
18 changed files
with
43,510 additions
and
18,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# autogov-common | ||
|
||
Welcome to the autogov-common plugin! | ||
|
||
_This plugin was created through the Backstage CLI_ | ||
|
||
## Getting started | ||
|
||
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/autogov-common](http://localhost:3000/autogov-common). | ||
|
||
You can also serve the plugin in isolation by running `yarn start` in the plugin directory. | ||
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. | ||
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("@backstage/cli/config/eslint-factory")(__dirname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "@liatrio/backstage-plugin-autogov-common", | ||
"version": "1.1.0", | ||
"main": "src/index.ts", | ||
"types": "src/index.ts", | ||
"license": "Apache-2.0", | ||
"private": true, | ||
"publishConfig": { | ||
"access": "public", | ||
"main": "dist/index.esm.js", | ||
"types": "dist/index.d.ts" | ||
}, | ||
"backstage": { | ||
"role": "frontend-plugin", | ||
"pluginId": "autogov-common", | ||
"pluginPackages": [] | ||
}, | ||
"sideEffects": false, | ||
"scripts": { | ||
"start": "backstage-cli package start", | ||
"build": "backstage-cli package build", | ||
"lint": "backstage-cli package lint", | ||
"test": "backstage-cli package test", | ||
"clean": "backstage-cli package clean", | ||
"prepack": "backstage-cli package prepack", | ||
"postpack": "backstage-cli package postpack" | ||
}, | ||
"dependencies": { | ||
"@backstage/core-components": "^0.15.0", | ||
"@backstage/core-plugin-api": "^1.9.4", | ||
"@backstage/theme": "^0.5.7", | ||
"@material-ui/core": "^4.9.13", | ||
"@material-ui/icons": "^4.9.1", | ||
"@material-ui/lab": "^4.0.0-alpha.61", | ||
"react-use": "^17.2.4" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0" | ||
}, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.27.1", | ||
"@backstage/core-app-api": "^1.15.0", | ||
"@backstage/dev-utils": "^1.1.0", | ||
"@backstage/test-utils": "^1.6.0", | ||
"@testing-library/jest-dom": "^6.0.0", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/user-event": "^14.0.0", | ||
"msw": "^1.0.0", | ||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0" | ||
}, | ||
"files": [ | ||
"dist" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const AUTOGOV_STATUS_FILE_ANNOTATION = "liatrio.com/autogov-result-file"; | ||
export const AUTOGOV_STATUS_ANNOTATION = | ||
"liatrio.com/autogov-latest-release-status"; | ||
|
||
export enum AUTOGOV_STATUSES { | ||
PASSED = "PASSED", | ||
FAILED = "FAILED", | ||
N_A = "N/A", | ||
ERROR = "ERROR", | ||
} | ||
|
||
export enum AUTOGOV_STATUS_WEIGHT { | ||
PASSED = 1, | ||
FAILED = 2, | ||
N_A = 3, | ||
UNKNOWN = 4, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./constants"; | ||
export * from "./utils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { autogovCommonPlugin } from "./plugin"; | ||
|
||
describe("autogov-common", () => { | ||
it("should export plugin", () => { | ||
expect(autogovCommonPlugin).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { createPlugin } from "@backstage/core-plugin-api"; | ||
|
||
export const autogovCommonPlugin = createPlugin({ | ||
id: "autogov-common", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "@testing-library/jest-dom"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { AUTOGOV_STATUSES, AUTOGOV_STATUS_WEIGHT } from "./constants"; | ||
|
||
export const getAutogovStatusWeight = ( | ||
status: string, | ||
): AUTOGOV_STATUS_WEIGHT => { | ||
switch (status) { | ||
case AUTOGOV_STATUSES.PASSED: | ||
return AUTOGOV_STATUS_WEIGHT.PASSED; | ||
case AUTOGOV_STATUSES.FAILED: | ||
return AUTOGOV_STATUS_WEIGHT.FAILED; | ||
case AUTOGOV_STATUSES.N_A: | ||
return AUTOGOV_STATUS_WEIGHT.N_A; | ||
default: | ||
return AUTOGOV_STATUS_WEIGHT.UNKNOWN; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": "@backstage/cli/config/tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "dist", // Compiled JS files go to 'dist' | ||
"rootDir": ".", // Use the root of the plugin folder to ensure the 'src' folder is preserved in output | ||
"declaration": true, // Generate declaration files | ||
"declarationDir": "../dist-types/backstage-plugin-autogov-common", // Output declaration files to correct path | ||
"declarationMap": true, | ||
"sourceMap": true, | ||
"module": "commonjs", | ||
"target": "es6", | ||
"strict": true | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.