@backstage-community/plugin-azure-devops 0.13.0 → 0.13.1

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,5 +1,11 @@
1
1
  # @backstage-community/plugin-azure-devops
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7f32b36: Added New Frontend System filter for cards and tabs so they use `isAzureDevOpsAvailable` and `isAzurePipelinesAvailable` to control their visibility
8
+
3
9
  ## 0.13.0
4
10
 
5
11
  ### Minor Changes
@@ -5,6 +5,7 @@ import { AzureDevOpsClient } from '../api/AzureDevOpsClient.esm.js';
5
5
  import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
6
6
  import { EntityContentBlueprint, EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
7
7
  import { azurePullRequestDashboardRouteRef } from '../routes.esm.js';
8
+ import { isAzurePipelinesAvailable, isAzureDevOpsAvailable } from '../plugin.esm.js';
8
9
 
9
10
  const azureDevOpsApi = ApiBlueprint.make({
10
11
  params: {
@@ -32,6 +33,7 @@ const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({
32
33
  params: {
33
34
  defaultPath: "/pipelines",
34
35
  defaultTitle: "Pipelines",
36
+ filter: isAzurePipelinesAvailable,
35
37
  loader: () => import('../components/EntityPageAzurePipelines/index.esm.js').then(
36
38
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.EntityPageAzurePipelines, null))
37
39
  )
@@ -42,6 +44,7 @@ const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({
42
44
  params: {
43
45
  defaultPath: "/git-tags",
44
46
  defaultTitle: "Git Tags",
47
+ filter: isAzureDevOpsAvailable,
45
48
  loader: () => import('../components/EntityPageAzureGitTags/index.esm.js').then(
46
49
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.EntityPageAzureGitTags, null))
47
50
  )
@@ -53,6 +56,7 @@ const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(
53
56
  params: {
54
57
  defaultPath: "/pull-requests",
55
58
  defaultTitle: "Pull Requests",
59
+ filter: isAzureDevOpsAvailable,
56
60
  loader: () => import('../components/EntityPageAzurePullRequests/index.esm.js').then(
57
61
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.EntityPageAzurePullRequests, null))
58
62
  )
@@ -62,6 +66,7 @@ const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(
62
66
  const azureDevOpsReadmeEntityCard = EntityCardBlueprint.make({
63
67
  name: "readme",
64
68
  params: {
69
+ filter: isAzureDevOpsAvailable,
65
70
  loader: async () => import('../components/ReadmeCard/index.esm.js').then(
66
71
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ReadmeCard, null))
67
72
  )
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 React from 'react';\nimport {\n ApiBlueprint,\n createApiFactory,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { azureDevOpsApiRef, AzureDevOpsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { azurePullRequestDashboardRouteRef } from '../routes';\n\n/** @alpha */\nexport const azureDevOpsApi = ApiBlueprint.make({\n params: {\n factory: 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/** @alpha */\nexport const azureDevOpsPullRequestPage = PageBlueprint.make({\n params: {\n defaultPath: '/azure-pull-requests',\n routeRef: convertLegacyRouteRef(azurePullRequestDashboardRouteRef),\n loader: () =>\n import('../components/PullRequestsPage').then(m =>\n compatWrapper(<m.PullRequestsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({\n name: 'pipelines',\n params: {\n defaultPath: '/pipelines',\n defaultTitle: 'Pipelines',\n loader: () =>\n import('../components/EntityPageAzurePipelines').then(m =>\n compatWrapper(<m.EntityPageAzurePipelines />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({\n name: 'git-tags',\n params: {\n defaultPath: '/git-tags',\n defaultTitle: 'Git Tags',\n loader: () =>\n import('../components/EntityPageAzureGitTags').then(m =>\n compatWrapper(<m.EntityPageAzureGitTags />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(\n {\n name: 'pull-requests',\n params: {\n defaultPath: '/pull-requests',\n defaultTitle: 'Pull Requests',\n loader: () =>\n import('../components/EntityPageAzurePullRequests').then(m =>\n compatWrapper(<m.EntityPageAzurePullRequests />),\n ),\n },\n },\n);\n\n/** @alpha */\nexport const azureDevOpsReadmeEntityCard = EntityCardBlueprint.make({\n name: 'readme',\n params: {\n loader: async () =>\n import('../components/ReadmeCard').then(m =>\n compatWrapper(<m.ReadmeCard />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'azure-devops',\n extensions: [\n azureDevOpsApi,\n azureDevOpsReadmeEntityCard,\n azureDevOpsPipelinesEntityContent,\n azureDevOpsGitTag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IACN,WAAa,EAAA,WAAA;AAAA,IACb,YAAc,EAAA,UAAA;AAAA,IACd,MAAQ,EAAA,MACN,OAAO,mDAAsC,CAAE,CAAA,IAAA;AAAA,MAAK,OAClD,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,sBAAA,EAAF,IAAyB,CAAE;AAAA;AAC5C;AAEN,CAAC;AAGM,MAAM,uCAAuC,sBAAuB,CAAA,IAAA;AAAA,EACzE;AAAA,IACE,IAAM,EAAA,eAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,WAAa,EAAA,gBAAA;AAAA,MACb,YAAc,EAAA,eAAA;AAAA,MACd,MAAQ,EAAA,MACN,OAAO,wDAA2C,CAAE,CAAA,IAAA;AAAA,QAAK,OACvD,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,2BAAA,EAAF,IAA8B,CAAE;AAAA;AACjD;AACJ;AAEJ;AAGa,MAAA,2BAAA,GAA8B,oBAAoB,IAAK,CAAA;AAAA,EAClE,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,YACN,OAAO,uCAA0B,CAAE,CAAA,IAAA;AAAA,MAAK,OACtC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,UAAA,EAAF,IAAa,CAAE;AAAA;AAChC;AAEN,CAAC;AAGD,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,cAAA;AAAA,EACJ,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,IACA,2BAAA;AAAA,IACA,iCAAA;AAAA,IACA,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 React from 'react';\nimport {\n ApiBlueprint,\n createApiFactory,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { azureDevOpsApiRef, AzureDevOpsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { azurePullRequestDashboardRouteRef } from '../routes';\nimport { isAzureDevOpsAvailable, isAzurePipelinesAvailable } from '../plugin';\n\n/** @alpha */\nexport const azureDevOpsApi = ApiBlueprint.make({\n params: {\n factory: 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/** @alpha */\nexport const azureDevOpsPullRequestPage = PageBlueprint.make({\n params: {\n defaultPath: '/azure-pull-requests',\n routeRef: convertLegacyRouteRef(azurePullRequestDashboardRouteRef),\n loader: () =>\n import('../components/PullRequestsPage').then(m =>\n compatWrapper(<m.PullRequestsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({\n name: 'pipelines',\n params: {\n defaultPath: '/pipelines',\n defaultTitle: 'Pipelines',\n filter: isAzurePipelinesAvailable,\n loader: () =>\n import('../components/EntityPageAzurePipelines').then(m =>\n compatWrapper(<m.EntityPageAzurePipelines />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({\n name: 'git-tags',\n params: {\n defaultPath: '/git-tags',\n defaultTitle: 'Git Tags',\n filter: isAzureDevOpsAvailable,\n loader: () =>\n import('../components/EntityPageAzureGitTags').then(m =>\n compatWrapper(<m.EntityPageAzureGitTags />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(\n {\n name: 'pull-requests',\n params: {\n defaultPath: '/pull-requests',\n defaultTitle: 'Pull Requests',\n filter: isAzureDevOpsAvailable,\n loader: () =>\n import('../components/EntityPageAzurePullRequests').then(m =>\n compatWrapper(<m.EntityPageAzurePullRequests />),\n ),\n },\n },\n);\n\n/** @alpha */\nexport const azureDevOpsReadmeEntityCard = EntityCardBlueprint.make({\n name: 'readme',\n params: {\n filter: isAzureDevOpsAvailable,\n loader: async () =>\n import('../components/ReadmeCard').then(m =>\n compatWrapper(<m.ReadmeCard />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'azure-devops',\n extensions: [\n azureDevOpsApi,\n azureDevOpsReadmeEntityCard,\n azureDevOpsPipelinesEntityContent,\n azureDevOpsGitTagsEntityContent,\n azureDevOpsPullRequestsEntityContent,\n azureDevOpsPullRequestPage,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;AAsCa,MAAA,cAAA,GAAiB,aAAa,IAAK,CAAA;AAAA,EAC9C,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,iBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,iBAAkB,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU;AAAA,KACnD;AAAA;AAEL,CAAC;AAGY,MAAA,0BAAA,GAA6B,cAAc,IAAK,CAAA;AAAA,EAC3D,MAAQ,EAAA;AAAA,IACN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AE,CAAA,IAAA;AAAA,QAAK,OACvD,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,2BAAA,EAAF,IAA8B,CAAE;AAAA;AACjD;AACJ;AAEJ;AAGa,MAAA,2BAAA,GAA8B,oBAAoB,IAAK,CAAA;AAAA,EAClE,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,sBAAA;AAAA,IACR,MAAQ,EAAA,YACN,OAAO,uCAA0B,CAAE,CAAA,IAAA;AAAA,MAAK,OACtC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,UAAA,EAAF,IAAa,CAAE;AAAA;AAChC;AAEN,CAAC;AAGD,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,cAAA;AAAA,EACJ,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,IACA,2BAAA;AAAA,IACA,iCAAA;AAAA,IACA,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-azure-devops",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "azure-devops",