@backstage-community/plugin-allure 0.5.1 → 0.6.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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useApi } from '@backstage/core-plugin-api';
|
|
3
3
|
import { allureApiRef } from '../../api/AllureApi.esm.js';
|
|
4
4
|
import { useEntity, MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react';
|
|
@@ -14,9 +14,9 @@ const AllureReport = (props) => {
|
|
|
14
14
|
return url;
|
|
15
15
|
});
|
|
16
16
|
if (loading) {
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(Progress, {});
|
|
18
18
|
}
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
20
|
"iframe",
|
|
21
21
|
{
|
|
22
22
|
style: {
|
|
@@ -32,8 +32,8 @@ const AllureReport = (props) => {
|
|
|
32
32
|
const AllureReportComponent = () => {
|
|
33
33
|
const { entity } = useEntity();
|
|
34
34
|
const isReportAvailable = entity && isAllureReportAvailable(entity);
|
|
35
|
-
if (isReportAvailable) return /* @__PURE__ */
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
if (isReportAvailable) return /* @__PURE__ */ jsx(AllureReport, { entity });
|
|
36
|
+
return /* @__PURE__ */ jsx(MissingAnnotationEmptyState, { annotation: ALLURE_PROJECT_ID_ANNOTATION });
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { AllureReportComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllureReportComponent.esm.js","sources":["../../../src/components/AllureReportComponent/AllureReportComponent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"AllureReportComponent.esm.js","sources":["../../../src/components/AllureReportComponent/AllureReportComponent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApi } from '@backstage/core-plugin-api';\nimport { allureApiRef } from '../../api';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport {\n ALLURE_PROJECT_ID_ANNOTATION,\n isAllureReportAvailable,\n getAllureProjectId,\n} from '../annotationHelpers';\nimport { Progress } from '@backstage/core-components';\nimport useAsync from 'react-use/esm/useAsync';\nimport { Entity } from '@backstage/catalog-model';\n\nconst AllureReport = (props: { entity: Entity }) => {\n const allureApi = useApi(allureApiRef);\n\n const allureProjectId = getAllureProjectId(props.entity);\n const { value, loading } = useAsync(async () => {\n const url = await allureApi.getReportUrl(allureProjectId);\n return url;\n });\n\n if (loading) {\n return <Progress />;\n }\n return (\n <iframe\n style={{\n display: 'table',\n width: '100%',\n height: '100%',\n }}\n title=\"Allure Report\"\n src={value}\n />\n );\n};\n\nexport const AllureReportComponent = () => {\n const { entity } = useEntity();\n const isReportAvailable = entity && isAllureReportAvailable(entity);\n\n if (isReportAvailable) return <AllureReport entity={entity} />;\n return (\n <MissingAnnotationEmptyState annotation={ALLURE_PROJECT_ID_ANNOTATION} />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,YAAA,GAAe,CAAC,KAA8B,KAAA;AAClD,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AAErC,EAAM,MAAA,eAAA,GAAkB,kBAAmB,CAAA,KAAA,CAAM,MAAM,CAAA;AACvD,EAAA,MAAM,EAAE,KAAA,EAAO,OAAQ,EAAA,GAAI,SAAS,YAAY;AAC9C,IAAA,MAAM,GAAM,GAAA,MAAM,SAAU,CAAA,YAAA,CAAa,eAAe,CAAA;AACxD,IAAO,OAAA,GAAA;AAAA,GACR,CAAA;AAED,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2BAAQ,QAAS,EAAA,EAAA,CAAA;AAAA;AAEnB,EACE,uBAAA,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,OAAS,EAAA,OAAA;AAAA,QACT,KAAO,EAAA,MAAA;AAAA,QACP,MAAQ,EAAA;AAAA,OACV;AAAA,MACA,KAAM,EAAA,eAAA;AAAA,MACN,GAAK,EAAA;AAAA;AAAA,GACP;AAEJ,CAAA;AAEO,MAAM,wBAAwB,MAAM;AACzC,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,iBAAA,GAAoB,MAAU,IAAA,uBAAA,CAAwB,MAAM,CAAA;AAElE,EAAA,IAAI,iBAAmB,EAAA,uBAAQ,GAAA,CAAA,YAAA,EAAA,EAAa,MAAgB,EAAA,CAAA;AAC5D,EACE,uBAAA,GAAA,CAAC,2BAA4B,EAAA,EAAA,UAAA,EAAY,4BAA8B,EAAA,CAAA;AAE3E;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as react from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
3
|
import { Entity } from '@backstage/catalog-model';
|
|
5
4
|
|
|
@@ -8,7 +7,7 @@ declare const allurePlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
8
7
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
9
8
|
}, {}, {}>;
|
|
10
9
|
/** @public */
|
|
11
|
-
declare const EntityAllureReportContent: () =>
|
|
10
|
+
declare const EntityAllureReportContent: () => react_jsx_runtime.JSX.Element;
|
|
12
11
|
|
|
13
12
|
/** @public */
|
|
14
13
|
declare const ALLURE_PROJECT_ID_ANNOTATION = "qameta.io/allure-project";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-allure",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A Backstage plugin that integrates with Allure",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@backstage/catalog-model": "^1.7.3",
|
|
41
|
-
"@backstage/core-components": "^0.17.
|
|
42
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
43
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
41
|
+
"@backstage/core-components": "^0.17.1",
|
|
42
|
+
"@backstage/core-plugin-api": "^1.10.6",
|
|
43
|
+
"@backstage/plugin-catalog-react": "^1.17.0",
|
|
44
44
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
45
45
|
"react-use": "^17.2.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@backstage/cli": "^0.
|
|
49
|
-
"@backstage/dev-utils": "^1.1.
|
|
50
|
-
"@backstage/test-utils": "^1.7.
|
|
48
|
+
"@backstage/cli": "^0.32.0",
|
|
49
|
+
"@backstage/dev-utils": "^1.1.9",
|
|
50
|
+
"@backstage/test-utils": "^1.7.7",
|
|
51
51
|
"@testing-library/dom": "^10.0.0",
|
|
52
52
|
"@testing-library/jest-dom": "^6.0.0",
|
|
53
53
|
"@testing-library/react": "^15.0.0",
|
|
@@ -78,5 +78,12 @@
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
+
"typesVersions": {
|
|
82
|
+
"*": {
|
|
83
|
+
"package.json": [
|
|
84
|
+
"package.json"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
81
88
|
"module": "./dist/index.esm.js"
|
|
82
89
|
}
|