@backstage-community/plugin-azure-devops 0.4.4

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.
@@ -0,0 +1,95 @@
1
+ import { a as azureDevOpsApiRef, A as AzureDevOpsClient, b as azurePullRequestDashboardRouteRef, c as azurePipelinesEntityContentRouteRef, d as azureGitTagsEntityContentRouteRef, e as azurePullRequestsEntityContentRouteRef } from './esm/AzureDevOpsApi-GBxs-uQ7.esm.js';
2
+ import { createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
3
+ import { AZURE_DEVOPS_REPO_ANNOTATION, AZURE_DEVOPS_PROJECT_ANNOTATION, AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION } from '@backstage-community/plugin-azure-devops-common';
4
+ export { A as AzurePullRequestsIcon } from './esm/AzurePullRequestsIcon-DOAkj-X3.esm.js';
5
+ export { F as FilterType } from './esm/PullRequestsPage-CkhRQsgx.esm.js';
6
+ import 'luxon';
7
+ import 'humanize-duration';
8
+ import '@backstage/errors';
9
+ import 'react';
10
+ import '@material-ui/core/SvgIcon';
11
+ import '@backstage/core-components';
12
+ import '@material-ui/core/Paper';
13
+ import '@material-ui/core/Typography';
14
+ import '@material-ui/core/styles';
15
+ import '@material-ui/core/Card';
16
+ import '@material-ui/core/CardContent';
17
+ import '@material-ui/core/CardHeader';
18
+ import '@material-ui/icons/DoneAll';
19
+ import '@material-ui/icons/Cancel';
20
+ import '@material-ui/icons/GroupWork';
21
+ import '@material-ui/icons/WatchLater';
22
+ import 'react-use/esm/useAsync';
23
+ import 'react-use/esm/useAsyncRetry';
24
+ import 'react-use/esm/useInterval';
25
+ import '@backstage/catalog-model';
26
+ import '@backstage/plugin-permission-react';
27
+
28
+ const isAzureDevOpsAvailable = (entity) => {
29
+ var _a;
30
+ return Boolean((_a = entity.metadata.annotations) == null ? void 0 : _a[AZURE_DEVOPS_REPO_ANNOTATION]);
31
+ };
32
+ const isAzurePipelinesAvailable = (entity) => {
33
+ var _a, _b, _c;
34
+ return Boolean((_a = entity.metadata.annotations) == null ? void 0 : _a[AZURE_DEVOPS_REPO_ANNOTATION]) || Boolean((_b = entity.metadata.annotations) == null ? void 0 : _b[AZURE_DEVOPS_PROJECT_ANNOTATION]) && Boolean(
35
+ (_c = entity.metadata.annotations) == null ? void 0 : _c[AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION]
36
+ );
37
+ };
38
+ const azureDevOpsPlugin = createPlugin({
39
+ id: "azureDevOps",
40
+ apis: [
41
+ createApiFactory({
42
+ api: azureDevOpsApiRef,
43
+ deps: {
44
+ discoveryApi: discoveryApiRef,
45
+ fetchApi: fetchApiRef
46
+ },
47
+ factory: ({ discoveryApi, fetchApi }) => new AzureDevOpsClient({ discoveryApi, fetchApi })
48
+ })
49
+ ]
50
+ });
51
+ const AzurePullRequestsPage = azureDevOpsPlugin.provide(
52
+ createRoutableExtension({
53
+ name: "AzurePullRequestsPage",
54
+ component: () => import('./esm/index-W1pvc5vi.esm.js').then((m) => m.PullRequestsPage),
55
+ mountPoint: azurePullRequestDashboardRouteRef
56
+ })
57
+ );
58
+ const EntityAzurePipelinesContent = azureDevOpsPlugin.provide(
59
+ createRoutableExtension({
60
+ name: "EntityAzurePipelinesContent",
61
+ component: () => import('./esm/index-Bwu2-Sgs.esm.js').then(
62
+ (m) => m.EntityPageAzurePipelines
63
+ ),
64
+ mountPoint: azurePipelinesEntityContentRouteRef
65
+ })
66
+ );
67
+ const EntityAzureGitTagsContent = azureDevOpsPlugin.provide(
68
+ createRoutableExtension({
69
+ name: "EntityAzureGitTagsContent",
70
+ component: () => import('./esm/index-1Rl7C23d.esm.js').then(
71
+ (m) => m.EntityPageAzureGitTags
72
+ ),
73
+ mountPoint: azureGitTagsEntityContentRouteRef
74
+ })
75
+ );
76
+ const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide(
77
+ createRoutableExtension({
78
+ name: "EntityAzurePullRequestsContent",
79
+ component: () => import('./esm/index-Bo-6jkQA.esm.js').then(
80
+ (m) => m.EntityPageAzurePullRequests
81
+ ),
82
+ mountPoint: azurePullRequestsEntityContentRouteRef
83
+ })
84
+ );
85
+ const EntityAzureReadmeCard = azureDevOpsPlugin.provide(
86
+ createComponentExtension({
87
+ name: "EntityAzureReadmeCard",
88
+ component: {
89
+ lazy: () => import('./esm/index-BJ_pWnMh.esm.js').then((m) => m.ReadmeCard)
90
+ }
91
+ })
92
+ );
93
+
94
+ export { AzureDevOpsClient, AzurePullRequestsPage, EntityAzureGitTagsContent, EntityAzurePipelinesContent, EntityAzurePullRequestsContent, EntityAzureReadmeCard, azureDevOpsApiRef, azureDevOpsPlugin, isAzureDevOpsAvailable, isAzurePipelinesAvailable };
95
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/plugin.ts"],"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 */\n\nimport {\n azurePipelinesEntityContentRouteRef,\n azurePullRequestDashboardRouteRef,\n azureGitTagsEntityContentRouteRef,\n azurePullRequestsEntityContentRouteRef,\n} from './routes';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n createComponentExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { AzureDevOpsClient } from './api/AzureDevOpsClient';\nimport { Entity } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from './api/AzureDevOpsApi';\nimport {\n AZURE_DEVOPS_REPO_ANNOTATION,\n AZURE_DEVOPS_PROJECT_ANNOTATION,\n AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION,\n} from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport const isAzureDevOpsAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]);\n\n/** @public */\nexport const isAzurePipelinesAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]) ||\n (Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_PROJECT_ANNOTATION]) &&\n Boolean(\n entity.metadata.annotations?.[AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION],\n ));\n\n/** @public */\nexport const azureDevOpsPlugin = createPlugin({\n id: 'azureDevOps',\n apis: [\n createApiFactory({\n api: azureDevOpsApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new AzureDevOpsClient({ discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/** @public */\nexport const AzurePullRequestsPage = azureDevOpsPlugin.provide(\n createRoutableExtension({\n name: 'AzurePullRequestsPage',\n component: () =>\n import('./components/PullRequestsPage').then(m => m.PullRequestsPage),\n mountPoint: azurePullRequestDashboardRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAzurePipelinesContent = azureDevOpsPlugin.provide(\n createRoutableExtension({\n name: 'EntityAzurePipelinesContent',\n component: () =>\n import('./components/EntityPageAzurePipelines').then(\n m => m.EntityPageAzurePipelines,\n ),\n mountPoint: azurePipelinesEntityContentRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAzureGitTagsContent = azureDevOpsPlugin.provide(\n createRoutableExtension({\n name: 'EntityAzureGitTagsContent',\n component: () =>\n import('./components/EntityPageAzureGitTags').then(\n m => m.EntityPageAzureGitTags,\n ),\n mountPoint: azureGitTagsEntityContentRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide(\n createRoutableExtension({\n name: 'EntityAzurePullRequestsContent',\n component: () =>\n import('./components/EntityPageAzurePullRequests').then(\n m => m.EntityPageAzurePullRequests,\n ),\n mountPoint: azurePullRequestsEntityContentRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAzureReadmeCard = azureDevOpsPlugin.provide(\n createComponentExtension({\n name: 'EntityAzureReadmeCard',\n component: {\n lazy: () => import('./components/ReadmeCard').then(m => m.ReadmeCard),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCa,MAAA,sBAAA,GAAyB,CAAC,MAAgB,KAAA;AAzCvD,EAAA,IAAA,EAAA,CAAA;AA0CE,EAAA,OAAA,OAAA,CAAA,CAAQ,EAAO,GAAA,MAAA,CAAA,QAAA,CAAS,WAAhB,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAA8B,4BAA6B,CAAA,CAAA,CAAA;AAAA,EAAA;AAGxD,MAAA,yBAAA,GAA4B,CAAC,MAAgB,KAAA;AA7C1D,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AA8CE,EAAA,OAAA,OAAA,CAAA,CAAQ,EAAO,GAAA,MAAA,CAAA,QAAA,CAAS,WAAhB,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAA8B,4BAA6B,CAAA,CAAA,IAClE,OAAQ,CAAA,CAAA,EAAA,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,KAAhB,IAA8B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,+BAAA,CAAgC,CACrE,IAAA,OAAA;AAAA,IACE,CAAA,EAAA,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,KAAhB,IAA8B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,wCAAA,CAAA;AAAA,GAChC,CAAA;AAAA,EAAA;AAGG,MAAM,oBAAoB,YAAa,CAAA;AAAA,EAC5C,EAAI,EAAA,aAAA;AAAA,EACJ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SAAW,EAAA,MACT,OAAO,6BAA0C,CAAE,CAAA,IAAA;AAAA,MACjD,OAAK,CAAE,CAAA,2BAAA;AAAA,KACT;AAAA,IACF,UAAY,EAAA,sCAAA;AAAA,GACb,CAAA;AACH,EAAA;AAGO,MAAM,wBAAwB,iBAAkB,CAAA,OAAA;AAAA,EACrD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,6BAAyB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,UAAU,CAAA;AAAA,KACtE;AAAA,GACD,CAAA;AACH;;;;"}
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@backstage-community/plugin-azure-devops",
3
+ "version": "0.4.4",
4
+ "backstage": {
5
+ "role": "frontend-plugin"
6
+ },
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "homepage": "https://backstage.io",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/backstage/community-plugins",
14
+ "directory": "workspaces/azure-devops/plugins/azure-devops"
15
+ },
16
+ "license": "Apache-2.0",
17
+ "sideEffects": false,
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/index.esm.js",
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.esm.js"
23
+ },
24
+ "./alpha": {
25
+ "import": "./dist/alpha.esm.js",
26
+ "types": "./dist/alpha.d.ts",
27
+ "default": "./dist/alpha.esm.js"
28
+ },
29
+ "./package.json": "./package.json"
30
+ },
31
+ "main": "./dist/index.esm.js",
32
+ "types": "./dist/index.d.ts",
33
+ "files": [
34
+ "dist",
35
+ "alpha"
36
+ ],
37
+ "scripts": {
38
+ "build": "backstage-cli package build",
39
+ "clean": "backstage-cli package clean",
40
+ "lint": "backstage-cli package lint",
41
+ "prepack": "backstage-cli package prepack",
42
+ "postpack": "backstage-cli package postpack",
43
+ "start": "backstage-cli package start",
44
+ "test": "backstage-cli package test"
45
+ },
46
+ "dependencies": {
47
+ "@backstage-community/plugin-azure-devops-common": "^0.4.2",
48
+ "@backstage/catalog-model": "^1.4.5",
49
+ "@backstage/core-compat-api": "^0.2.4",
50
+ "@backstage/core-components": "^0.14.4",
51
+ "@backstage/core-plugin-api": "^1.9.2",
52
+ "@backstage/errors": "^1.2.4",
53
+ "@backstage/frontend-plugin-api": "^0.6.4",
54
+ "@backstage/plugin-catalog-react": "^1.11.3",
55
+ "@backstage/plugin-permission-react": "^0.4.22",
56
+ "@material-ui/core": "^4.12.2",
57
+ "@material-ui/icons": "^4.9.1",
58
+ "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
59
+ "humanize-duration": "^3.27.0",
60
+ "luxon": "^3.0.0",
61
+ "react-use": "^17.2.4"
62
+ },
63
+ "devDependencies": {
64
+ "@backstage/cli": "^0.26.3",
65
+ "@backstage/dev-utils": "^1.0.31",
66
+ "@backstage/test-utils": "^1.5.4",
67
+ "@testing-library/dom": "^10.0.0",
68
+ "@testing-library/jest-dom": "^6.0.0",
69
+ "@testing-library/react": "^15.0.0",
70
+ "@types/humanize-duration": "^3.18.1",
71
+ "@types/react-dom": "^18.2.19",
72
+ "canvas": "^2.11.2",
73
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
74
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
75
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
76
+ },
77
+ "peerDependencies": {
78
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
79
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
80
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
81
+ },
82
+ "module": "./dist/index.esm.js"
83
+ }